scan_s.c.preserve
上传用户:dgyhgb
上传日期:2007-01-07
资源大小:676k
文件大小:67k
- /* A lexical scanner generated by flex */
- /* scanner skeleton version:
- * $Header: /home/horse/u0/vern/flex/RCS/flex.skel,v 2.16 90/08/03 14:09:36 vern Exp Locker: vern $
- */
- #define FLEX_SCANNER
- #include <stdio.h>
- /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
- #ifdef c_plusplus
- #ifndef __cplusplus
- #define __cplusplus
- #endif
- #endif
- #ifdef __cplusplus
- #include <stdlib.h>
- #include <osfcn.h>
- /* use prototypes in function declarations */
- #define YY_USE_PROTOS
- /* the "const" storage-class-modifier is valid */
- #define YY_USE_CONST
- #else /* ! __cplusplus */
- #ifdef __STDC__
- #ifdef __GNUC__
- #include <stddef.h>
- void *malloc( size_t );
- void free( void* );
- #else
- #include <stdlib.h>
- #endif /* __GNUC__ */
- #define YY_USE_PROTOS
- #define YY_USE_CONST
- #endif /* __STDC__ */
- #endif /* ! __cplusplus */
- #ifdef __TURBOC__
- #define YY_USE_CONST
- #endif
- #ifndef YY_USE_CONST
- #define const
- #endif
- #ifdef YY_USE_PROTOS
- #define YY_PROTO(proto) proto
- #else
- #define YY_PROTO(proto) ()
- /* we can't get here if it's an ANSI C compiler, or a C++ compiler,
- * so it's got to be a K&R compiler, and therefore there's no standard
- * place from which to include these definitions
- */
- char *malloc();
- int free();
- int read();
- #endif
- /* amount of stuff to slurp up with each read */
- #ifndef YY_READ_BUF_SIZE
- #define YY_READ_BUF_SIZE 8192
- #endif
- /* returned upon end-of-file */
- #define YY_END_TOK 0
- /* copy whatever the last rule matched to the standard output */
- /* cast to (char *) is because for 8-bit chars, yytext is (unsigned char *) */
- /* this used to be an fputs(), but since the string might contain NUL's,
- * we now use fwrite()
- */
- #define ECHO (void) fwrite( (char *) yytext, yyleng, 1, yyout )
- /* gets input and stuffs it into "buf". number of characters read, or YY_NULL,
- * is returned in "result".
- */
- #define YY_INPUT(buf,result,max_size)
- if ( (result = read( fileno(yyin), (char *) buf, max_size )) < 0 )
- YY_FATAL_ERROR( "read() in flex scanner failed" );
- #define YY_NULL 0
- /* no semi-colon after return; correct usage is to write "yyterminate();" -
- * we don't want an extra ';' after the "return" because that will cause
- * some compilers to complain about unreachable statements.
- */
- #define yyterminate() return ( YY_NULL )
- /* report a fatal error */
- /* The funky do-while is used to turn this macro definition into
- * a single C statement (which needs a semi-colon terminator).
- * This avoids problems with code like:
- *
- * if ( something_happens )
- * YY_FATAL_ERROR( "oops, the something happened" );
- * else
- * everything_okay();
- *
- * Prior to using the do-while the compiler would get upset at the
- * "else" because it interpreted the "if" statement as being all
- * done when it reached the ';' after the YY_FATAL_ERROR() call.
- */
- #define YY_FATAL_ERROR(msg)
- do
- {
- (void) fputs( msg, stderr );
- (void) putc( 'n', stderr );
- exit( 1 );
- }
- while ( 0 )
- /* default yywrap function - always treat EOF as an EOF */
- #define yywrap() 1
- /* enter a start condition. This macro really ought to take a parameter,
- * but we do it the disgusting crufty way forced on us by the ()-less
- * definition of BEGIN
- */
- #define BEGIN yy_start = 1 + 2 *
- /* action number for EOF rule of a given start state */
- #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
- /* special action meaning "start processing a new file" */
- #define YY_NEW_FILE
- do
- {
- yy_init_buffer( yy_current_buffer, yyin );
- yy_load_buffer_state();
- }
- while ( 0 )
- /* default declaration of generated scanner - a define so the user can
- * easily add parameters
- */
- #define YY_DECL int yylex YY_PROTO(( void ))
- /* code executed at the end of each rule */
- #define YY_BREAK break;
- #define YY_END_OF_BUFFER_CHAR 0
- #ifndef YY_BUF_SIZE
- #define YY_BUF_SIZE (YY_READ_BUF_SIZE * 2) /* size of default input buffer */
- #endif
- typedef struct yy_buffer_state *YY_BUFFER_STATE;
- #define FLEX_DEBUG
- #define YY_CHAR unsigned char
- # line 1 "scan_s.l"
- #define INITIAL 0
- # line 2 "scan_s.l"
- /*
- * scan_s.l - SQL scanner / server side.
- *
- * This file is a part of GNU SQL Server
- *
- * Copyright (c) 1996, 1997, Free Software Foundation, Inc
- * Developed at the Institute of System Programming
- * This file is written by Michael Kimelman
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * Contact: gss@ispras.ru
- *
- */
- /* $Id: scan_s.l,v 1.245 1997/03/31 03:46:38 kml Exp $ */
-
- #include "xmem.h"
- #include "sql_decl.h"
- #include "trl.h"
- #include "parse.h"
- #include "const.h"
-
-
- #if defined(stderr)
- # undef stderr
- #endif
- #if defined(stdout)
- # undef stdout
- #endif
- #define stderr STDERR
- #define stdout STDOUT
- #define SQL_PROC(code) if(code)
- {
- yylloc.first_line=line_num; file_pos=yylloc.last_line=line_num;
- if (code==TOK_IDENTIFIER && !strcmp(STRING(yylval.ltrp),"DEFINITION_SCHEMA"))
- yylval.ltrp = ltr_rec(SYSADM);
- return code;
- }
- #undef YY_INPUT
- #define YY_INPUT(buf,result,max_size) serv_scan_buf_inp(buf,&result,max_size)
- extern YYLTYPE yylloc;
- static i4_t line_num=0;
- static char *bufstring=NULL;
- static void
- serv_scan_buf_inp(char *buf, i4_t *result, i4_t max_size)
- {
- register i4_t l = strlen (bufstring );
- l= l > max_size ? max_size : l ;
- if(l)
- {
- bcopy (bufstring, buf, l);
- bufstring += l;
- *result = l;
- }
- else
- {
- *result = YY_NULL ;
- *buf = 0 ;
- }
- }
- /* void SAVESTR(char *s,LTRLREF d); */
- #define SAVESTR(s,d) d=ltr_rec(s)
- static str_buf s_scanner_buffer={0,0,NULL};
- #define sql_str(s,l) buffer_string(&s_scanner_buffer,s,l)
- #define SQL_str 1
- #define SQL_comment 2
- #define Identifier 3
- # line 108 "scan_s.l"
- /* done after the current pattern has been matched and before the
- * corresponding action - sets up yytext
- */
- #define YY_DO_BEFORE_ACTION
- yytext = yy_bp;
- yyleng = yy_cp - yy_bp;
- yy_hold_char = *yy_cp;
- *yy_cp = ' ';
- yy_c_buf_p = yy_cp;
- #define EOB_ACT_CONTINUE_SCAN 0
- #define EOB_ACT_END_OF_FILE 1
- #define EOB_ACT_LAST_MATCH 2
- /* return all but the first 'n' matched characters back to the input stream */
- #define yyless(n)
- do
- {
- /* undo effects of setting up yytext */
- *yy_cp = yy_hold_char;
- yy_c_buf_p = yy_cp = yy_bp + n;
- YY_DO_BEFORE_ACTION; /* set up yytext again */
- }
- while ( 0 )
- #define unput(c) yyunput( c, yytext )
- struct yy_buffer_state
- {
- FILE *yy_input_file;
- YY_CHAR *yy_ch_buf; /* input buffer */
- YY_CHAR *yy_buf_pos; /* current position in input buffer */
- /* size of input buffer in bytes, not including room for EOB characters */
- int yy_buf_size;
- /* number of characters read into yy_ch_buf, not including EOB characters */
- int yy_n_chars;
- int yy_eof_status; /* whether we've seen an EOF on this buffer */
- #define EOF_NOT_SEEN 0
- /* "pending" happens when the EOF has been seen but there's still
- * some text process
- */
- #define EOF_PENDING 1
- #define EOF_DONE 2
- };
- static YY_BUFFER_STATE yy_current_buffer;
- /* we provide macros for accessing buffer states in case in the
- * future we want to put the buffer states in a more general
- * "scanner state"
- */
- #define YY_CURRENT_BUFFER yy_current_buffer
- /* yy_hold_char holds the character lost when yytext is formed */
- static YY_CHAR yy_hold_char;
- static int yy_n_chars; /* number of characters read into yy_ch_buf */
- #ifndef YY_USER_ACTION
- #define YY_USER_ACTION
- #endif
- #ifndef YY_USER_INIT
- #define YY_USER_INIT
- #endif
- extern YY_CHAR *yytext;
- extern int yyleng;
- extern FILE *yyin, *yyout;
- YY_CHAR *yytext;
- int yyleng;
- FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
- #define YY_END_OF_BUFFER 133
- typedef int yy_state_type;
- static const short int yy_accept[471] =
- { 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 133, 121,
- 116, 120, 118, 117, 107, 108, 99, 97, 109, 98,
- 110, 100, 112, 121, 16, 104, 101, 103, 11, 111,
- 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
- 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
- 111, 124, 123, 125, 130, 131, 128, 127, 129, 116,
- 119, 113, 115, 113, 112, 10, 106, 102, 105, 111,
- 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
- 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
- 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
- 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
- 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
- 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
- 124, 122, 128, 126, 115, 114, 10, 111, 111, 111,
- 111, 40, 111, 111, 111, 111, 111, 43, 111, 111,
- 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
- 111, 111, 111, 7, 111, 111, 111, 111, 111, 111,
- 111, 5, 111, 111, 111, 111, 58, 111, 111, 111,
- 62, 29, 111, 111, 111, 111, 111, 111, 111, 111,
- 65, 66, 111, 111, 90, 111, 111, 111, 111, 111,
- 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
- 111, 111, 111, 26, 111, 111, 111, 111, 111, 111,
- 111, 111, 38, 111, 89, 39, 41, 111, 92, 111,
- 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
- 82, 111, 111, 111, 111, 111, 111, 111, 18, 111,
- 111, 111, 111, 54, 111, 111, 55, 111, 111, 111,
- 111, 111, 111, 111, 83, 111, 61, 111, 63, 93,
- 94, 111, 91, 64, 111, 67, 111, 111, 111, 111,
- 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
- 71, 111, 72, 111, 111, 95, 111, 111, 111, 111,
- 75, 111, 22, 111, 111, 78, 79, 19, 111, 6,
- 111, 80, 111, 25, 44, 111, 111, 111, 111, 111,
- 111, 111, 111, 111, 111, 49, 111, 111, 111, 111,
- 53, 111, 111, 2, 23, 56, 111, 31, 111, 111,
- 111, 111, 111, 111, 111, 68, 111, 111, 111, 111,
- 111, 86, 111, 111, 111, 111, 111, 111, 111, 111,
- 111, 21, 73, 111, 111, 111, 111, 77, 111, 111,
- 111, 45, 111, 96, 17, 111, 47, 111, 111, 111,
- 48, 111, 111, 51, 52, 85, 111, 57, 111, 60,
- 111, 111, 12, 111, 32, 111, 111, 111, 111, 34,
- 111, 24, 111, 20, 111, 70, 111, 111, 111, 36,
- 74, 76, 111, 111, 42, 111, 111, 46, 111, 8,
- 27, 111, 87, 28, 111, 111, 111, 111, 111, 30,
- 111, 111, 111, 111, 9, 111, 15, 111, 111, 111,
- 111, 4, 50, 111, 13, 81, 111, 111, 111, 111,
- 69, 111, 3, 1, 111, 111, 59, 111, 111, 14,
- 111, 84, 111, 88, 33, 35, 111, 111, 37, 0
- } ;
- static const YY_CHAR yy_ec[256] =
- { 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
- 1, 2, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 2, 1, 4, 1, 1, 1, 1, 5, 6,
- 7, 8, 9, 10, 11, 12, 13, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 15, 16, 17,
- 18, 19, 20, 1, 22, 23, 24, 25, 26, 27,
- 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
- 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 1, 1, 1, 1, 21, 1, 22, 23, 24, 25,
- 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
- 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
- 46, 47, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1
- } ;
- static const YY_CHAR yy_meta[48] =
- { 0,
- 1, 1, 2, 3, 4, 1, 1, 1, 1, 1,
- 1, 1, 1, 5, 1, 1, 1, 1, 1, 1,
- 5, 6, 6, 6, 6, 6, 6, 6, 6, 6,
- 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
- 6, 6, 6, 6, 6, 6, 6
- } ;
- static const short int yy_base[479] =
- { 0,
- 0, 0, 45, 46, 1065, 1064, 49, 51, 1066, 1069,
- 1063, 1069, 1069, 1069, 1069, 1069, 1069, 1069, 1069, 1053,
- 42, 1069, 45, 0, 1069, 42, 1069, 1045, 1069, 29,
- 32, 34, 49, 42, 57, 45, 1040, 51, 0, 1035,
- 44, 67, 56, 67, 66, 73, 86, 78, 76, 85,
- 89, 0, 1069, 1055, 1069, 1069, 0, 1069, 1055, 1056,
- 1069, 103, 112, 113, 118, 0, 1069, 1069, 1069, 0,
- 100, 55, 141, 1016, 1028, 127, 168, 109, 1019, 155,
- 1028, 1014, 167, 1012, 1009, 1014, 1024, 1024, 1017, 1005,
- 1009, 95, 1008, 207, 160, 1000, 248, 289, 996, 1006,
- 1008, 994, 1003, 1012, 995, 129, 309, 329, 180, 349,
- 169, 1012, 219, 1001, 1004, 204, 1010, 997, 997, 995,
- 1005, 374, 997, 1001, 999, 991, 997, 996, 980, 981,
- 0, 1069, 0, 1069, 1005, 1004, 0, 394, 991, 414,
- 434, 1069, 454, 987, 474, 985, 970, 1069, 974, 988,
- 971, 976, 968, 973, 985, 127, 494, 984, 979, 980,
- 962, 979, 964, 0, 978, 959, 974, 975, 527, 961,
- 961, 1069, 958, 958, 950, 961, 1069, 110, 964, 553,
- 1069, 0, 961, 962, 589, 609, 945, 629, 953, 959,
- 1069, 1069, 949, 953, 1069, 956, 957, 158, 956, 946,
- 945, 951, 940, 942, 948, 932, 946, 649, 938, 944,
- 178, 669, 936, 1069, 193, 946, 928, 924, 921, 195,
- 935, 931, 1069, 923, 1069, 1069, 1069, 925, 1069, 925,
- 933, 689, 926, 931, 926, 925, 913, 912, 926, 915,
- 1069, 916, 927, 906, 906, 711, 916, 912, 0, 907,
- 902, 913, 900, 1069, 910, 914, 0, 897, 896, 899,
- 900, 889, 909, 893, 1069, 903, 0, 888, 0, 1069,
- 1069, 896, 1069, 0, 889, 0, 891, 887, 895, 902,
- 893, 896, 891, 731, 881, 887, 895, 883, 886, 891,
- 1069, 881, 0, 877, 873, 1069, 885, 875, 867, 867,
- 0, 881, 0, 880, 874, 0, 0, 0, 860, 0,
- 869, 1069, 869, 0, 0, 824, 810, 751, 799, 770,
- 746, 743, 706, 692, 684, 1069, 668, 657, 637, 603,
- 0, 771, 595, 0, 0, 0, 575, 0, 566, 546,
- 560, 563, 558, 553, 547, 0, 541, 541, 545, 552,
- 552, 1069, 549, 548, 545, 530, 515, 509, 519, 523,
- 502, 0, 0, 500, 499, 483, 479, 0, 491, 485,
- 478, 0, 476, 1069, 0, 476, 0, 483, 489, 467,
- 0, 464, 791, 0, 0, 1069, 433, 0, 407, 0,
- 389, 380, 0, 364, 0, 343, 326, 345, 328, 0,
- 328, 0, 319, 0, 288, 0, 268, 261, 250, 0,
- 0, 0, 259, 237, 0, 257, 256, 0, 202, 0,
- 0, 240, 1069, 0, 244, 167, 253, 811, 242, 0,
- 249, 237, 251, 242, 0, 231, 0, 232, 231, 247,
- 208, 0, 0, 205, 0, 1069, 208, 216, 214, 213,
- 0, 831, 0, 0, 197, 214, 0, 851, 193, 0,
- 158, 1069, 134, 1069, 0, 0, 102, 60, 0, 1069,
- 871, 877, 883, 59, 885, 891, 897, 899
- } ;
- static const short int yy_def[479] =
- { 0,
- 470, 1, 471, 471, 472, 472, 473, 473, 470, 470,
- 470, 470, 470, 470, 470, 470, 470, 470, 470, 470,
- 470, 470, 470, 474, 470, 470, 470, 470, 470, 475,
- 475, 475, 475, 475, 475, 475, 475, 475, 475, 475,
- 475, 475, 475, 475, 475, 475, 475, 475, 475, 475,
- 475, 476, 470, 470, 470, 470, 477, 470, 470, 470,
- 470, 470, 470, 470, 470, 478, 470, 470, 470, 475,
- 475, 475, 475, 475, 475, 475, 475, 475, 475, 475,
- 475, 475, 475, 475, 475, 475, 475, 475, 475, 475,
- 475, 475, 475, 475, 475, 475, 475, 475, 475, 475,
- 475, 475, 475, 475, 475, 475, 475, 475, 475, 475,
- 475, 475, 475, 475, 475, 475, 475, 475, 475, 475,
- 475, 475, 475, 475, 475, 475, 475, 475, 475, 475,
- 476, 470, 477, 470, 470, 470, 478, 475, 475, 475,
- 475, 470, 475, 475, 475, 475, 475, 470, 475, 475,
- 475, 475, 475, 475, 475, 475, 475, 475, 475, 475,
- 475, 475, 475, 475, 475, 475, 475, 475, 475, 475,
- 475, 470, 475, 475, 475, 475, 470, 475, 475, 475,
- 470, 475, 475, 475, 475, 475, 475, 475, 475, 475,
- 470, 470, 475, 475, 470, 475, 475, 475, 475, 475,
- 475, 475, 475, 475, 475, 475, 475, 475, 475, 475,
- 475, 475, 475, 470, 475, 475, 475, 475, 475, 475,
- 475, 475, 470, 475, 470, 470, 470, 475, 470, 475,
- 475, 475, 475, 475, 475, 475, 475, 475, 475, 475,
- 470, 475, 475, 475, 475, 475, 475, 475, 475, 475,
- 475, 475, 475, 470, 475, 475, 475, 94, 475, 475,
- 475, 475, 475, 475, 470, 475, 475, 475, 475, 470,
- 470, 475, 470, 475, 475, 475, 475, 475, 475, 475,
- 475, 475, 475, 475, 475, 475, 475, 475, 475, 475,
- 470, 475, 475, 475, 475, 470, 475, 475, 475, 475,
- 475, 475, 475, 475, 475, 475, 475, 475, 475, 475,
- 475, 470, 475, 475, 475, 475, 475, 475, 475, 475,
- 475, 475, 475, 475, 475, 470, 475, 475, 475, 475,
- 475, 475, 475, 475, 475, 475, 475, 475, 475, 475,
- 475, 475, 475, 475, 475, 475, 475, 475, 475, 475,
- 475, 470, 475, 475, 475, 475, 475, 475, 475, 475,
- 475, 475, 475, 475, 475, 475, 475, 475, 475, 475,
- 475, 475, 475, 470, 475, 475, 475, 475, 475, 475,
- 475, 475, 475, 475, 475, 470, 475, 475, 475, 475,
- 475, 475, 475, 475, 475, 475, 475, 475, 475, 475,
- 475, 475, 475, 475, 475, 475, 475, 475, 475, 475,
- 475, 475, 475, 475, 475, 475, 475, 475, 157, 475,
- 475, 475, 470, 475, 475, 180, 475, 475, 475, 475,
- 475, 475, 475, 475, 475, 475, 475, 475, 475, 475,
- 475, 475, 475, 475, 475, 470, 475, 475, 475, 475,
- 475, 475, 475, 475, 475, 232, 475, 475, 475, 475,
- 475, 470, 475, 470, 475, 475, 475, 475, 475, 0,
- 470, 470, 470, 470, 470, 470, 470, 470
- } ;
- static const short int yy_nxt[1117] =
- { 0,
- 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
- 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
- 10, 30, 31, 32, 33, 34, 35, 36, 37, 38,
- 39, 40, 41, 42, 43, 44, 45, 39, 46, 47,
- 48, 49, 50, 51, 39, 39, 39, 53, 53, 54,
- 54, 58, 59, 58, 59, 62, 64, 76, 65, 67,
- 68, 71, 78, 72, 66, 100, 79, 63, 73, 80,
- 74, 75, 81, 101, 83, 82, 87, 77, 84, 140,
- 94, 88, 90, 95, 85, 97, 89, 86, 102, 91,
- 98, 105, 92, 107, 469, 93, 103, 106, 113, 121,
- 141, 108, 104, 109, 111, 110, 126, 112, 114, 115,
- 123, 116, 124, 122, 127, 125, 62, 128, 129, 117,
- 135, 118, 135, 119, 130, 136, 62, 120, 63, 64,
- 149, 65, 138, 169, 150, 262, 170, 468, 63, 263,
- 139, 142, 142, 142, 142, 142, 142, 142, 142, 142,
- 142, 142, 142, 142, 146, 142, 142, 142, 142, 142,
- 142, 189, 190, 467, 143, 239, 240, 147, 148, 148,
- 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
- 148, 174, 148, 148, 148, 148, 148, 148, 152, 153,
- 157, 280, 70, 158, 197, 175, 154, 466, 198, 159,
- 281, 294, 70, 295, 199, 193, 160, 172, 172, 172,
- 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
- 194, 172, 172, 172, 172, 172, 172, 206, 298, 304,
- 299, 70, 465, 305, 70, 70, 207, 463, 461, 460,
- 201, 459, 458, 457, 208, 202, 456, 173, 177, 177,
- 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
- 177, 203, 177, 177, 177, 177, 177, 177, 455, 454,
- 453, 452, 178, 451, 450, 449, 448, 447, 445, 444,
- 443, 442, 441, 440, 439, 438, 437, 179, 180, 181,
- 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
- 181, 181, 436, 181, 181, 181, 181, 181, 181, 191,
- 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
- 191, 191, 435, 191, 191, 191, 191, 191, 191, 192,
- 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
- 192, 192, 434, 192, 192, 192, 192, 192, 192, 195,
- 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
- 195, 195, 433, 195, 195, 195, 195, 195, 195, 432,
- 431, 430, 429, 196, 214, 214, 214, 214, 214, 214,
- 214, 214, 214, 214, 214, 214, 214, 428, 214, 214,
- 214, 214, 214, 214, 223, 223, 223, 223, 223, 223,
- 223, 223, 223, 223, 223, 223, 223, 427, 223, 223,
- 223, 223, 223, 223, 225, 225, 225, 225, 225, 225,
- 225, 225, 225, 225, 225, 225, 225, 426, 225, 225,
- 225, 225, 225, 225, 226, 226, 226, 226, 226, 226,
- 226, 226, 226, 226, 226, 226, 226, 425, 226, 226,
- 226, 226, 226, 226, 227, 227, 227, 227, 227, 227,
- 227, 227, 227, 227, 227, 227, 227, 424, 227, 227,
- 227, 227, 227, 227, 229, 229, 229, 229, 229, 229,
- 229, 229, 229, 229, 229, 229, 229, 422, 229, 229,
- 229, 229, 229, 229, 241, 241, 241, 241, 241, 241,
- 241, 241, 241, 241, 241, 241, 241, 421, 241, 241,
- 241, 241, 241, 241, 420, 419, 418, 417, 416, 415,
- 414, 413, 412, 242, 411, 410, 243, 254, 254, 254,
- 254, 254, 254, 254, 254, 254, 254, 254, 254, 254,
- 409, 254, 254, 254, 254, 254, 254, 408, 407, 406,
- 405, 404, 255, 265, 265, 265, 265, 265, 265, 265,
- 265, 265, 265, 265, 265, 265, 403, 265, 265, 265,
- 265, 265, 265, 402, 401, 400, 399, 398, 266, 397,
- 396, 395, 394, 393, 392, 391, 390, 389, 267, 270,
- 270, 270, 270, 270, 270, 270, 270, 270, 270, 270,
- 270, 270, 388, 270, 270, 270, 270, 270, 270, 271,
- 271, 271, 271, 271, 271, 271, 271, 271, 271, 271,
- 271, 271, 387, 271, 271, 271, 271, 271, 271, 273,
- 273, 273, 273, 273, 273, 273, 273, 273, 273, 273,
- 273, 273, 385, 273, 273, 273, 273, 273, 273, 291,
- 291, 291, 291, 291, 291, 291, 291, 291, 291, 291,
- 291, 291, 384, 291, 291, 291, 291, 291, 291, 296,
- 296, 296, 296, 296, 296, 296, 296, 296, 296, 296,
- 296, 296, 383, 296, 296, 296, 296, 296, 296, 312,
- 312, 312, 312, 312, 312, 312, 312, 312, 312, 312,
- 312, 312, 382, 312, 312, 312, 312, 312, 312, 381,
- 313, 326, 326, 326, 326, 326, 326, 326, 326, 326,
- 326, 326, 326, 326, 380, 326, 326, 326, 326, 326,
- 326, 352, 352, 352, 352, 352, 352, 352, 352, 352,
- 352, 352, 352, 352, 379, 352, 352, 352, 352, 352,
- 352, 374, 374, 374, 374, 374, 374, 374, 374, 374,
- 374, 374, 374, 374, 378, 374, 374, 374, 374, 374,
- 374, 386, 386, 386, 386, 386, 386, 386, 386, 386,
- 386, 386, 386, 386, 377, 386, 386, 386, 386, 386,
- 386, 423, 423, 423, 423, 423, 423, 423, 423, 423,
- 423, 423, 423, 423, 376, 423, 423, 423, 423, 423,
- 423, 446, 446, 446, 446, 446, 446, 446, 446, 446,
- 446, 446, 446, 446, 375, 446, 446, 446, 446, 446,
- 446, 462, 462, 462, 462, 462, 462, 462, 462, 462,
- 462, 462, 462, 462, 373, 462, 462, 462, 462, 462,
- 462, 464, 464, 464, 464, 464, 464, 464, 464, 464,
- 464, 464, 464, 464, 372, 464, 464, 464, 464, 464,
- 464, 52, 52, 52, 52, 52, 52, 55, 55, 55,
- 55, 55, 55, 57, 57, 57, 57, 57, 57, 70,
- 70, 131, 371, 131, 370, 131, 131, 133, 369, 368,
- 133, 133, 133, 137, 137, 367, 366, 365, 364, 363,
- 362, 361, 360, 359, 358, 357, 356, 355, 354, 353,
- 351, 350, 349, 348, 347, 346, 345, 344, 343, 342,
- 341, 340, 339, 338, 337, 336, 335, 70, 334, 333,
- 332, 331, 330, 329, 328, 327, 325, 324, 323, 322,
- 321, 320, 319, 318, 317, 316, 315, 314, 311, 310,
- 309, 308, 307, 306, 303, 302, 301, 300, 297, 293,
- 292, 290, 289, 288, 287, 286, 285, 284, 283, 282,
- 279, 278, 277, 276, 275, 274, 272, 269, 268, 264,
- 261, 260, 259, 258, 257, 256, 253, 252, 251, 250,
- 249, 248, 247, 246, 245, 244, 238, 237, 236, 235,
- 234, 233, 232, 231, 230, 228, 224, 136, 136, 222,
- 221, 220, 219, 218, 217, 216, 215, 213, 212, 211,
- 210, 209, 205, 204, 200, 188, 187, 186, 185, 184,
- 183, 182, 176, 171, 168, 167, 166, 165, 164, 163,
- 162, 161, 156, 155, 151, 145, 144, 60, 134, 132,
- 99, 96, 69, 61, 60, 470, 56, 56, 9, 470,
- 470, 470, 470, 470, 470, 470, 470, 470, 470, 470,
- 470, 470, 470, 470, 470, 470, 470, 470, 470, 470,
- 470, 470, 470, 470, 470, 470, 470, 470, 470, 470,
- 470, 470, 470, 470, 470, 470, 470, 470, 470, 470,
- 470, 470, 470, 470, 470, 470
- } ;
- static const short int yy_chk[1117] =
- { 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 3, 4, 3,
- 4, 7, 7, 8, 8, 21, 23, 31, 23, 26,
- 26, 30, 32, 30, 474, 41, 32, 21, 30, 32,
- 30, 30, 32, 41, 33, 32, 34, 31, 33, 72,
- 36, 34, 35, 36, 33, 38, 34, 33, 42, 35,
- 38, 43, 35, 44, 468, 35, 42, 43, 46, 48,
- 72, 44, 42, 44, 45, 44, 50, 45, 46, 47,
- 49, 47, 49, 48, 50, 49, 62, 51, 51, 47,
- 63, 47, 63, 47, 51, 63, 64, 47, 62, 65,
- 78, 65, 71, 92, 78, 178, 92, 467, 64, 178,
- 71, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- 73, 73, 73, 73, 76, 73, 73, 73, 73, 73,
- 73, 106, 106, 463, 73, 156, 156, 76, 77, 77,
- 77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
- 77, 95, 77, 77, 77, 77, 77, 77, 80, 80,
- 83, 198, 426, 83, 111, 95, 80, 461, 111, 83,
- 198, 211, 426, 211, 111, 109, 83, 94, 94, 94,
- 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
- 109, 94, 94, 94, 94, 94, 94, 116, 215, 220,
- 215, 419, 459, 220, 419, 456, 116, 455, 450, 449,
- 113, 448, 447, 444, 116, 113, 441, 94, 97, 97,
- 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
- 97, 113, 97, 97, 97, 97, 97, 97, 440, 439,
- 438, 436, 97, 434, 433, 432, 431, 429, 427, 425,
- 422, 417, 416, 414, 413, 409, 408, 97, 97, 98,
- 98, 98, 98, 98, 98, 98, 98, 98, 98, 98,
- 98, 98, 407, 98, 98, 98, 98, 98, 98, 107,
- 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
- 107, 107, 405, 107, 107, 107, 107, 107, 107, 108,
- 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
- 108, 108, 403, 108, 108, 108, 108, 108, 108, 110,
- 110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
- 110, 110, 401, 110, 110, 110, 110, 110, 110, 399,
- 398, 397, 396, 110, 122, 122, 122, 122, 122, 122,
- 122, 122, 122, 122, 122, 122, 122, 394, 122, 122,
- 122, 122, 122, 122, 138, 138, 138, 138, 138, 138,
- 138, 138, 138, 138, 138, 138, 138, 392, 138, 138,
- 138, 138, 138, 138, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 391, 140, 140,
- 140, 140, 140, 140, 141, 141, 141, 141, 141, 141,
- 141, 141, 141, 141, 141, 141, 141, 389, 141, 141,
- 141, 141, 141, 141, 143, 143, 143, 143, 143, 143,
- 143, 143, 143, 143, 143, 143, 143, 387, 143, 143,
- 143, 143, 143, 143, 145, 145, 145, 145, 145, 145,
- 145, 145, 145, 145, 145, 145, 145, 382, 145, 145,
- 145, 145, 145, 145, 157, 157, 157, 157, 157, 157,
- 157, 157, 157, 157, 157, 157, 157, 380, 157, 157,
- 157, 157, 157, 157, 379, 378, 376, 373, 371, 370,
- 369, 367, 366, 157, 365, 364, 157, 169, 169, 169,
- 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
- 361, 169, 169, 169, 169, 169, 169, 360, 359, 358,
- 357, 356, 169, 180, 180, 180, 180, 180, 180, 180,
- 180, 180, 180, 180, 180, 180, 355, 180, 180, 180,
- 180, 180, 180, 354, 353, 351, 350, 349, 180, 348,
- 347, 345, 344, 343, 342, 341, 340, 339, 180, 185,
- 185, 185, 185, 185, 185, 185, 185, 185, 185, 185,
- 185, 185, 337, 185, 185, 185, 185, 185, 185, 186,
- 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
- 186, 186, 333, 186, 186, 186, 186, 186, 186, 188,
- 188, 188, 188, 188, 188, 188, 188, 188, 188, 188,
- 188, 188, 330, 188, 188, 188, 188, 188, 188, 208,
- 208, 208, 208, 208, 208, 208, 208, 208, 208, 208,
- 208, 208, 329, 208, 208, 208, 208, 208, 208, 212,
- 212, 212, 212, 212, 212, 212, 212, 212, 212, 212,
- 212, 212, 328, 212, 212, 212, 212, 212, 212, 232,
- 232, 232, 232, 232, 232, 232, 232, 232, 232, 232,
- 232, 232, 327, 232, 232, 232, 232, 232, 232, 325,
- 232, 246, 246, 246, 246, 246, 246, 246, 246, 246,
- 246, 246, 246, 246, 324, 246, 246, 246, 246, 246,
- 246, 284, 284, 284, 284, 284, 284, 284, 284, 284,
- 284, 284, 284, 284, 323, 284, 284, 284, 284, 284,
- 284, 318, 318, 318, 318, 318, 318, 318, 318, 318,
- 318, 318, 318, 318, 322, 318, 318, 318, 318, 318,
- 318, 332, 332, 332, 332, 332, 332, 332, 332, 332,
- 332, 332, 332, 332, 321, 332, 332, 332, 332, 332,
- 332, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 320, 383, 383, 383, 383, 383,
- 383, 428, 428, 428, 428, 428, 428, 428, 428, 428,
- 428, 428, 428, 428, 319, 428, 428, 428, 428, 428,
- 428, 452, 452, 452, 452, 452, 452, 452, 452, 452,
- 452, 452, 452, 452, 317, 452, 452, 452, 452, 452,
- 452, 458, 458, 458, 458, 458, 458, 458, 458, 458,
- 458, 458, 458, 458, 316, 458, 458, 458, 458, 458,
- 458, 471, 471, 471, 471, 471, 471, 472, 472, 472,
- 472, 472, 472, 473, 473, 473, 473, 473, 473, 475,
- 475, 476, 313, 476, 311, 476, 476, 477, 309, 305,
- 477, 477, 477, 478, 478, 304, 302, 300, 299, 298,
- 297, 295, 294, 292, 290, 289, 288, 287, 286, 285,
- 283, 282, 281, 280, 279, 278, 277, 275, 272, 268,
- 266, 264, 263, 262, 261, 260, 259, 258, 256, 255,
- 253, 252, 251, 250, 248, 247, 245, 244, 243, 242,
- 240, 239, 238, 237, 236, 235, 234, 233, 231, 230,
- 228, 224, 222, 221, 219, 218, 217, 216, 213, 210,
- 209, 207, 206, 205, 204, 203, 202, 201, 200, 199,
- 197, 196, 194, 193, 190, 189, 187, 184, 183, 179,
- 176, 175, 174, 173, 171, 170, 168, 167, 166, 165,
- 163, 162, 161, 160, 159, 158, 155, 154, 153, 152,
- 151, 150, 149, 147, 146, 144, 139, 136, 135, 130,
- 129, 128, 127, 126, 125, 124, 123, 121, 120, 119,
- 118, 117, 115, 114, 112, 105, 104, 103, 102, 101,
- 100, 99, 96, 93, 91, 90, 89, 88, 87, 86,
- 85, 84, 82, 81, 79, 75, 74, 60, 59, 54,
- 40, 37, 28, 20, 11, 9, 6, 5, 470, 470,
- 470, 470, 470, 470, 470, 470, 470, 470, 470, 470,
- 470, 470, 470, 470, 470, 470, 470, 470, 470, 470,
- 470, 470, 470, 470, 470, 470, 470, 470, 470, 470,
- 470, 470, 470, 470, 470, 470, 470, 470, 470, 470,
- 470, 470, 470, 470, 470, 470
- } ;
- static yy_state_type yy_last_accepting_state;
- static YY_CHAR *yy_last_accepting_cpos;
- extern int yy_flex_debug;
- int yy_flex_debug = 1;
- static const short int yy_rule_linenum[132] =
- { 0,
- 113, 114, 115, 116, 117, 118, 119, 120, 121, 122,
- 130, 141, 142, 143, 144, 145, 150, 151, 152, 153,
- 154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
- 164, 165, 166, 167, 168, 169, 174, 179, 180, 181,
- 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
- 192, 193, 194, 195, 196, 197, 198, 199, 200, 201,
- 202, 203, 204, 205, 206, 207, 208, 209, 210, 211,
- 212, 213, 214, 215, 216, 217, 218, 219, 220, 225,
- 226, 227, 228, 229, 230, 231, 232, 233, 238, 239,
- 240, 242, 243, 244, 245, 246, 248, 249, 250, 251,
- 253, 254, 255, 256, 257, 258, 260, 261, 262, 263,
- 265, 268, 271, 274, 277, 286, 287, 288, 289, 290,
- 291, 302, 303, 308, 309, 318, 319, 324, 325, 333,
- 334
- } ;
- /* the intent behind this definition is that it'll catch
- * any uses of REJECT which flex missed
- */
- #define REJECT reject_used_but_not_detected
- #define yymore() yymore_used_but_not_detected
- #define YY_MORE_ADJ 0
- /* these variables are all declared out here so that section 3 code can
- * manipulate them
- */
- /* points to current character in buffer */
- static YY_CHAR *yy_c_buf_p = (YY_CHAR *) 0;
- static int yy_init = 1; /* whether we need to initialize */
- static int yy_start = 0; /* start state number */
- /* flag which is used to allow yywrap()'s to do buffer switches
- * instead of setting up a fresh yyin. A bit of a hack ...
- */
- static int yy_did_buffer_switch_on_eof;
- static yy_state_type yy_get_previous_state YY_PROTO(( void ));
- static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
- static int yy_get_next_buffer YY_PROTO(( void ));
- static void yyunput YY_PROTO(( YY_CHAR c, YY_CHAR *buf_ptr ));
- void yyrestart YY_PROTO(( FILE *input_file ));
- void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
- void yy_load_buffer_state YY_PROTO(( void ));
- YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
- void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
- void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
- #define yy_new_buffer yy_create_buffer
- #ifdef __cplusplus
- static int yyinput YY_PROTO(( void ));
- #else
- static int input YY_PROTO(( void ));
- #endif
- YY_DECL
- {
- register yy_state_type yy_current_state;
- register YY_CHAR *yy_cp, *yy_bp;
- register int yy_act;
- yy_flex_debug=server_scanner_debug;
- /*********************************************
- * embedded SQL lexics *
- *********************************************/
- if ( yy_init )
- {
- YY_USER_INIT;
- if ( ! yy_start )
- yy_start = 1; /* first start state */
- if ( ! yyin )
- yyin = stdin;
- if ( ! yyout )
- yyout = stdout;
- if ( yy_current_buffer )
- yy_init_buffer( yy_current_buffer, yyin );
- else
- yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
- yy_load_buffer_state();
- yy_init = 0;
- }
- while ( 1 ) /* loops until end-of-file is reached */
- {
- yy_cp = yy_c_buf_p;
- /* support of yytext */
- *yy_cp = yy_hold_char;
- /* yy_bp points to the position in yy_ch_buf of the start of the
- * current run.
- */
- yy_bp = yy_cp;
- yy_current_state = yy_start;
- yy_match:
- do
- {
- register YY_CHAR yy_c = yy_ec[*yy_cp];
- if ( yy_accept[yy_current_state] )
- {
- yy_last_accepting_state = yy_current_state;
- yy_last_accepting_cpos = yy_cp;
- }
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
- yy_current_state = yy_def[yy_current_state];
- if ( yy_current_state >= 471 )
- yy_c = yy_meta[yy_c];
- }
- yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
- ++yy_cp;
- }
- while ( yy_current_state != 470 );
- yy_cp = yy_last_accepting_cpos;
- yy_current_state = yy_last_accepting_state;
- yy_find_action:
- yy_act = yy_accept[yy_current_state];
- YY_DO_BEFORE_ACTION;
- YY_USER_ACTION;
- do_action: /* this label is used only to access EOF actions */
- if ( yy_flex_debug )
- {
- if ( yy_act == 0 )
- fprintf( stderr, "--scanner backtrackingn" );
- else if ( yy_act < 132 )
- fprintf( stderr, "--accepting rule at line %d ("%s")n",
- yy_rule_linenum[yy_act], yytext );
- else if ( yy_act == 132 )
- fprintf( stderr, "--accepting default rule ("%s")n",
- yytext );
- else if ( yy_act == 133 )
- fprintf( stderr, "--(end of buffer or a NUL)n" );
- else
- fprintf( stderr, "--EOFn" );
- }
- switch ( yy_act )
- {
- case 0: /* must backtrack */
- /* undo the effects of YY_DO_BEFORE_ACTION */
- *yy_cp = yy_hold_char;
- yy_cp = yy_last_accepting_cpos;
- yy_current_state = yy_last_accepting_state;
- goto yy_find_action;
- case 1:
- # line 113 "scan_s.l"
- SQL_PROC(TOK_WHENEVER);
- YY_BREAK
- case 2:
- # line 114 "scan_s.l"
- SQL_PROC(TOK_FOUND );
- YY_BREAK
- case 3:
- # line 115 "scan_s.l"
- SQL_PROC(TOK_SQLERROR);
- YY_BREAK
- case 4:
- # line 116 "scan_s.l"
- SQL_PROC(TOK_CONTINUE);
- YY_BREAK
- case 5:
- *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
- yy_c_buf_p = yy_cp -= 1;
- YY_DO_BEFORE_ACTION; /* set up yytext again */
- # line 117 "scan_s.l"
- SQL_PROC(TOK_GOTO );
- YY_BREAK
- case 6:
- # line 118 "scan_s.l"
- SQL_PROC(TOK_BEGIN );
- YY_BREAK
- case 7:
- # line 119 "scan_s.l"
- SQL_PROC(TOK_END );
- YY_BREAK
- case 8:
- # line 120 "scan_s.l"
- SQL_PROC(TOK_DECLARE );
- YY_BREAK
- case 9:
- # line 121 "scan_s.l"
- SQL_PROC(TOK_SECTION );
- YY_BREAK
- case 10:
- # line 122 "scan_s.l"
- {
- SAVESTR(yytext+1,yylval.ltrp);
- SQL_PROC(TOK_PARAM);
- }
- YY_BREAK
- /*********************************************
- * Dynamic SQL lexics *
- *********************************************/
- case 11:
- # line 130 "scan_s.l"
- {
- static i4_t placeholders_counter = 0;
- char str[100];
- sprintf(str,"__%d",placeholders_counter++);
- SAVESTR(str,yylval.ltrp);
- SQL_PROC(TOK_PARAM);
- }
- YY_BREAK
- /*********************************************
- * clean SQL MODULE lexic *
- *********************************************/
- case 12:
- # line 141 "scan_s.l"
- SQL_PROC(TOK_MODULE );
- YY_BREAK
- case 13:
- # line 142 "scan_s.l"
- SQL_PROC(TOK_LANGUAGE );
- YY_BREAK
- case 14:
- # line 143 "scan_s.l"
- SQL_PROC(TOK_PROCEDURE );
- YY_BREAK
- case 15:
- # line 144 "scan_s.l"
- SQL_PROC(TOK_SQLCODE );
- YY_BREAK
- case 16:
- # line 145 "scan_s.l"
- SQL_PROC(';' );
- YY_BREAK
- /*********************************************
- * clean SQL SCHEMA lexic *
- *********************************************/
- case 17:
- # line 150 "scan_s.l"
- SQL_PROC(TOK_CREATE );
- YY_BREAK
- case 18:
- # line 151 "scan_s.l"
- SQL_PROC(TOK_DROP );
- YY_BREAK
- case 19:
- # line 152 "scan_s.l"
- SQL_PROC(TOK_ALTER );
- YY_BREAK
- case 20:
- # line 153 "scan_s.l"
- SQL_PROC(TOK_SCHEMA );
- YY_BREAK
- case 21:
- # line 154 "scan_s.l"
- SQL_PROC(TOK_TABLE );
- YY_BREAK
- case 22:
- # line 155 "scan_s.l"
- SQL_PROC(TOK_VIEW );
- YY_BREAK
- case 23:
- # line 156 "scan_s.l"
- SQL_PROC(TOK_GRANT );
- YY_BREAK
- case 24:
- # line 157 "scan_s.l"
- SQL_PROC(TOK_REVOKE );
- YY_BREAK
- case 25:
- # line 158 "scan_s.l"
- SQL_PROC(TOK_CHECK );
- YY_BREAK
- case 26:
- *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
- yy_c_buf_p = yy_cp = yy_bp + 2;
- YY_DO_BEFORE_ACTION; /* set up yytext again */
- # line 159 "scan_s.l"
- SQL_PROC(TOK_TO );
- YY_BREAK
- case 27:
- # line 160 "scan_s.l"
- SQL_PROC(TOK_DEFAULT );
- YY_BREAK
- case 28:
- # line 161 "scan_s.l"
- SQL_PROC(TOK_FOREIGN );
- YY_BREAK
- case 29:
- # line 162 "scan_s.l"
- SQL_PROC(TOK_KEY );
- YY_BREAK
- case 30:
- # line 163 "scan_s.l"
- SQL_PROC(TOK_PRIMARY );
- YY_BREAK
- case 31:
- # line 164 "scan_s.l"
- SQL_PROC(TOK_INDEX );
- YY_BREAK
- case 32:
- # line 165 "scan_s.l"
- SQL_PROC(TOK_OPTION );
- YY_BREAK
- case 33:
- # line 166 "scan_s.l"
- SQL_PROC(TOK_PRIVILEGES);
- YY_BREAK
- case 34:
- # line 167 "scan_s.l"
- SQL_PROC(TOK_PUBLIC );
- YY_BREAK
- case 35:
- # line 168 "scan_s.l"
- SQL_PROC(TOK_REFERENCES);
- YY_BREAK
- case 36:
- # line 169 "scan_s.l"
- SQL_PROC(TOK_UNIQUE );
- YY_BREAK
- /*********************************************
- * clean SQL lexic *
- *********************************************/
- case 37:
- # line 174 "scan_s.l"
- SQL_PROC(TOK_AUTHORIZATION);
- YY_BREAK
- /*********************************************
- * common SQL keywords *
- *********************************************/
- case 38:
- *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
- yy_c_buf_p = yy_cp = yy_bp + 3;
- YY_DO_BEFORE_ACTION; /* set up yytext again */
- # line 179 "scan_s.l"
- SQL_PROC(TOK_ALL );
- YY_BREAK
- case 39:
- *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
- yy_c_buf_p = yy_cp = yy_bp + 3;
- YY_DO_BEFORE_ACTION; /* set up yytext again */
- # line 180 "scan_s.l"
- SQL_PROC(TOK_ANY );
- YY_BREAK
- case 40:
- *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
- yy_c_buf_p = yy_cp = yy_bp + 2;
- YY_DO_BEFORE_ACTION; /* set up yytext again */
- # line 181 "scan_s.l"
- SQL_PROC(TOK_AS );
- YY_BREAK
- case 41:
- *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
- yy_c_buf_p = yy_cp = yy_bp + 3;
- YY_DO_BEFORE_ACTION; /* set up yytext again */
- # line 182 "scan_s.l"
- SQL_PROC(TOK_ASC );
- YY_BREAK
- case 42:
- # line 183 "scan_s.l"
- SQL_PROC(TOK_BETWEEN );
- YY_BREAK
- case 43:
- *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
- yy_c_buf_p = yy_cp = yy_bp + 2;
- YY_DO_BEFORE_ACTION; /* set up yytext again */
- # line 184 "scan_s.l"
- SQL_PROC(TOK_BY );
- YY_BREAK
- case 44:
- # line 185 "scan_s.l"
- SQL_PROC(TOK_CLOSE );
- YY_BREAK
- case 45:
- # line 186 "scan_s.l"
- SQL_PROC(TOK_COMMIT );
- YY_BREAK
- case 46:
- # line 187 "scan_s.l"
- SQL_PROC(TOK_CURRENT );
- YY_BREAK
- case 47:
- # line 188 "scan_s.l"
- SQL_PROC(TOK_CURSOR );
- YY_BREAK
- case 48:
- # line 189 "scan_s.l"
- SQL_PROC(TOK_DELETE );
- YY_BREAK
- case 49:
- *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
- yy_c_buf_p = yy_cp = yy_bp + 4;
- YY_DO_BEFORE_ACTION; /* set up yytext again */
- # line 190 "scan_s.l"
- SQL_PROC(TOK_DESC );
- YY_BREAK
- case 50:
- # line 191 "scan_s.l"
- SQL_PROC(TOK_DISTINCT );
- YY_BREAK
- case 51:
- # line 192 "scan_s.l"
- SQL_PROC(TOK_ESCAPE );
- YY_BREAK
- case 52:
- # line 193 "scan_s.l"
- SQL_PROC(TOK_EXISTS );
- YY_BREAK
- case 53:
- # line 194 "scan_s.l"
- SQL_PROC(TOK_FETCH );
- YY_BREAK
- case 54:
- *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
- yy_c_buf_p = yy_cp = yy_bp + 3;
- YY_DO_BEFORE_ACTION; /* set up yytext again */
- # line 195 "scan_s.l"
- SQL_PROC(TOK_FOR );
- YY_BREAK
- case 55:
- # line 196 "scan_s.l"
- SQL_PROC(TOK_FROM );
- YY_BREAK
- case 56:
- # line 197 "scan_s.l"
- SQL_PROC(TOK_GROUP );
- YY_BREAK
- case 57:
- # line 198 "scan_s.l"
- SQL_PROC(TOK_HAVING );
- YY_BREAK
- case 58:
- *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
- yy_c_buf_p = yy_cp = yy_bp + 2;
- YY_DO_BEFORE_ACTION; /* set up yytext again */
- # line 199 "scan_s.l"
- SQL_PROC(TOK_IN );
- YY_BREAK
- case 59:
- # line 200 "scan_s.l"
- SQL_PROC(TOK_INDICATOR );
- YY_BREAK
- case 60:
- # line 201 "scan_s.l"
- SQL_PROC(TOK_INSERT );
- YY_BREAK
- case 61:
- # line 202 "scan_s.l"
- SQL_PROC(TOK_INTO );
- YY_BREAK
- case 62:
- *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
- yy_c_buf_p = yy_cp = yy_bp + 2;
- YY_DO_BEFORE_ACTION; /* set up yytext again */
- # line 203 "scan_s.l"
- SQL_PROC(TOK_IS );
- YY_BREAK
- case 63:
- # line 204 "scan_s.l"
- SQL_PROC(TOK_LIKE );
- YY_BREAK
- case 64:
- # line 205 "scan_s.l"
- SQL_PROC(TOK_NULL );
- YY_BREAK
- case 65:
- *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
- yy_c_buf_p = yy_cp = yy_bp + 2;
- YY_DO_BEFORE_ACTION; /* set up yytext again */
- # line 206 "scan_s.l"
- SQL_PROC(TOK_OF );
- YY_BREAK
- case 66:
- *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
- yy_c_buf_p = yy_cp = yy_bp + 2;
- YY_DO_BEFORE_ACTION; /* set up yytext again */
- # line 207 "scan_s.l"
- SQL_PROC(TOK_ON );
- YY_BREAK
- case 67:
- # line 208 "scan_s.l"
- SQL_PROC(TOK_OPEN );
- YY_BREAK
- case 68:
- # line 209 "scan_s.l"
- SQL_PROC(TOK_ORDER );
- YY_BREAK
- case 69:
- # line 210 "scan_s.l"
- SQL_PROC(TOK_ROLLBACK );
- YY_BREAK
- case 70:
- # line 211 "scan_s.l"
- SQL_PROC(TOK_SELECT );
- YY_BREAK
- case 71:
- *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
- yy_c_buf_p = yy_cp = yy_bp + 3;
- YY_DO_BEFORE_ACTION; /* set up yytext again */
- # line 212 "scan_s.l"
- SQL_PROC(TOK_SET );
- YY_BREAK
- case 72:
- # line 213 "scan_s.l"
- SQL_PROC(TOK_SOME );
- YY_BREAK
- case 73:
- # line 214 "scan_s.l"
- SQL_PROC(TOK_UNION );
- YY_BREAK
- case 74:
- # line 215 "scan_s.l"
- SQL_PROC(TOK_UPDATE );
- YY_BREAK
- case 75:
- # line 216 "scan_s.l"
- SQL_PROC(TOK_USER );
- YY_BREAK
- case 76:
- # line 217 "scan_s.l"
- SQL_PROC(TOK_VALUES );
- YY_BREAK
- case 77:
- # line 218 "scan_s.l"
- SQL_PROC(TOK_WHERE );
- YY_BREAK
- case 78:
- # line 219 "scan_s.l"
- SQL_PROC(TOK_WITH );
- YY_BREAK
- case 79:
- # line 220 "scan_s.l"
- SQL_PROC(TOK_WORK );
- YY_BREAK
- /******************************************
- * common SQL keywords for data type *
- ******************************************/
- case 80:
- *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
- yy_c_buf_p = yy_cp -= 1;
- YY_DO_BEFORE_ACTION; /* set up yytext again */
- # line 225 "scan_s.l"
- SQL_PROC(TOK_T_CHAR);
- YY_BREAK
- case 81:
- *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
- yy_c_buf_p = yy_cp = yy_bp + 7;
- YY_DO_BEFORE_ACTION; /* set up yytext again */
- # line 226 "scan_s.l"
- SQL_PROC(TOK_T_NUM);
- YY_BREAK
- case 82:
- *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
- yy_c_buf_p = yy_cp -= 1;
- YY_DO_BEFORE_ACTION; /* set up yytext again */
- # line 227 "scan_s.l"
- SQL_PROC(TOK_T_NUM);
- YY_BREAK
- case 83:
- *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
- yy_c_buf_p = yy_cp -= 1;
- YY_DO_BEFORE_ACTION; /* set up yytext again */
- # line 228 "scan_s.l"
- SQL_PROC(TOK_T_INT);
- YY_BREAK
- case 84:
- *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
- yy_c_buf_p = yy_cp = yy_bp + 8;
- YY_DO_BEFORE_ACTION; /* set up yytext again */
- # line 229 "scan_s.l"
- SQL_PROC(TOK_T_SINT);
- YY_BREAK
- case 85:
- *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
- yy_c_buf_p = yy_cp = yy_bp + 5;
- YY_DO_BEFORE_ACTION; /* set up yytext again */
- # line 230 "scan_s.l"
- SQL_PROC(TOK_T_FLT);
- YY_BREAK
- case 86:
- *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
- yy_c_buf_p = yy_cp = yy_bp + 4;
- YY_DO_BEFORE_ACTION; /* set up yytext again */
- # line 231 "scan_s.l"
- SQL_PROC(TOK_T_REAL);
- YY_BREAK
- case 87:
- *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
- yy_c_buf_p = yy_cp = yy_bp + 6;
- YY_DO_BEFORE_ACTION; /* set up yytext again */
- # line 232 "scan_s.l"
- SQL_PROC(TOK_T_DOUBLE);
- YY_BREAK
- case 88:
- *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
- yy_c_buf_p = yy_cp = yy_bp + 9;
- YY_DO_BEFORE_ACTION; /* set up yytext again */
- # line 233 "scan_s.l"
- SQL_PROC(TOK_T_PRECISION);
- YY_BREAK
- /******************************************
- * common SQL keywords for expression *
- ******************************************/
- case 89:
- *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
- yy_c_buf_p = yy_cp = yy_bp + 3;
- YY_DO_BEFORE_ACTION; /* set up yytext again */
- # line 238 "scan_s.l"
- SQL_PROC(TOK_AND );
- YY_BREAK
- case 90:
- *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
- yy_c_buf_p = yy_cp = yy_bp + 2;
- YY_DO_BEFORE_ACTION; /* set up yytext again */
- # line 239 "scan_s.l"
- SQL_PROC(TOK_OR );
- YY_BREAK
- case 91:
- *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
- yy_c_buf_p = yy_cp = yy_bp + 3;
- YY_DO_BEFORE_ACTION; /* set up yytext again */
- # line 240 "scan_s.l"
- SQL_PROC(TOK_NOT );
- YY_BREAK
- case 92:
- *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
- yy_c_buf_p = yy_cp = yy_bp + 3;
- YY_DO_BEFORE_ACTION; /* set up yytext again */
- # line 242 "scan_s.l"
- SQL_PROC(TOK_AVG );
- YY_BREAK
- case 93:
- *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
- yy_c_buf_p = yy_cp = yy_bp + 3;
- YY_DO_BEFORE_ACTION; /* set up yytext again */
- # line 243 "scan_s.l"
- SQL_PROC(TOK_MAX );
- YY_BREAK
- case 94:
- *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
- yy_c_buf_p = yy_cp = yy_bp + 3;
- YY_DO_BEFORE_ACTION; /* set up yytext again */
- # line 244 "scan_s.l"
- SQL_PROC(TOK_MIN );
- YY_BREAK
- case 95:
- *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
- yy_c_buf_p = yy_cp = yy_bp + 3;
- YY_DO_BEFORE_ACTION; /* set up yytext again */
- # line 245 "scan_s.l"
- SQL_PROC(TOK_SUM );
- YY_BREAK
- case 96:
- *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
- yy_c_buf_p = yy_cp = yy_bp + 5;
- YY_DO_BEFORE_ACTION; /* set up yytext again */
- # line 246 "scan_s.l"
- SQL_PROC(TOK_COUNT );
- YY_BREAK
- case 97:
- # line 248 "scan_s.l"
- SQL_PROC('+' );
- YY_BREAK
- case 98:
- # line 249 "scan_s.l"
- SQL_PROC('-' );
- YY_BREAK
- case 99:
- # line 250 "scan_s.l"
- SQL_PROC('*' );
- YY_BREAK
- case 100:
- # line 251 "scan_s.l"
- SQL_PROC('/' );
- YY_BREAK
- case 101:
- # line 253 "scan_s.l"
- SQL_PROC('=' );
- YY_BREAK
- case 102:
- # line 254 "scan_s.l"
- SQL_PROC(TOK_NE);
- YY_BREAK
- case 103:
- # line 255 "scan_s.l"
- SQL_PROC('>' );
- YY_BREAK
- case 104:
- # line 256 "scan_s.l"
- SQL_PROC('<' );
- YY_BREAK
- case 105:
- # line 257 "scan_s.l"
- SQL_PROC(TOK_GE);
- YY_BREAK
- case 106:
- # line 258 "scan_s.l"
- SQL_PROC(TOK_LE);
- YY_BREAK
- case 107:
- # line 260 "scan_s.l"
- SQL_PROC('(' );
- YY_BREAK
- case 108:
- # line 261 "scan_s.l"
- SQL_PROC(')' );
- YY_BREAK
- case 109:
- # line 262 "scan_s.l"
- SQL_PROC(',' );
- YY_BREAK
- case 110:
- # line 263 "scan_s.l"
- SQL_PROC('.' );
- YY_BREAK
- case 111:
- # line 265 "scan_s.l"
- { SAVESTR(yytext,yylval.ltrp);
- SQL_PROC(TOK_IDENTIFIER);}
- YY_BREAK
- case 112:
- # line 268 "scan_s.l"
- { /* read decimal constant */
- yylval.node=gen_const_node(SQLType_Int,yytext);
- SQL_PROC(TOK_INTEGER_CONST); }
- YY_BREAK
- case 113:
- # line 271 "scan_s.l"
- { /* read float constant */
- yylval.node=gen_const_node(SQLType_Num,yytext);
- SQL_PROC(TOK_NUM_CONST); }
- YY_BREAK
- case 114:
- # line 274 "scan_s.l"
- { /* read float constant */
- yylval.node=gen_const_node(SQLType_Real,yytext);
- SQL_PROC(TOK_REAL_CONST); }
- YY_BREAK
- case 115:
- # line 277 "scan_s.l"
- { /* read float constant with error in exponent */
- yyerror("Lex: error format for floating constant");
- sql_str(yytext,yyleng);
- sql_str("0",1); /* recovery error as possible */
- {
- char *ptr=sql_str(NULL,0);
- yylval.node=gen_const_node(SQLType_Real,ptr);
- }
- SQL_PROC(TOK_REAL_CONST); }
- YY_BREAK
- case 116:
- # line 286 "scan_s.l"
- /* do nothing */
- YY_BREAK
- case 117:
- # line 287 "scan_s.l"
- BEGIN(SQL_str);
- YY_BREAK
- case 118:
- # line 288 "scan_s.l"
- BEGIN(Identifier);
- YY_BREAK
- case 119:
- # line 289 "scan_s.l"
- BEGIN(SQL_comment); /* ? ? obsolete */
- YY_BREAK
- case 120:
- # line 290 "scan_s.l"
- line_num++;
- YY_BREAK
- case 121:
- # line 291 "scan_s.l"
- {
- char strng[100];
- file_pos=line_num;
- sprintf(strng,
- "syntax error: unexpected char '%c'",
- *yytext);
- yyerror(strng);
- }
- YY_BREAK
- /*********************************************
- * SQL string recognizer *
- *********************************************/
- case 122:
- # line 302 "scan_s.l"
- sql_str("'",1);
- YY_BREAK
- case 123:
- # line 303 "scan_s.l"
- {
- yyerror(" Unterminated SQL string ");
- line_num++;
- BEGIN(INITIAL);
- }
- YY_BREAK
- case 124:
- # line 308 "scan_s.l"
- sql_str(yytext,yyleng);
- YY_BREAK
- case 125:
- # line 309 "scan_s.l"
- {
- char *ptr=sql_str(NULL,0);
- BEGIN(INITIAL);
- yylval.node=gen_const_node(SQLType_Char,ptr);
- SQL_PROC(TOK_STRING_CONST);
- }
- YY_BREAK
- /*********************************************
- * SQL quoted identifiers *
- *********************************************/
- case 126:
- # line 318 "scan_s.l"
- sql_str(""",1);
- YY_BREAK
- case 127:
- # line 319 "scan_s.l"
- {
- yyerror(" Unterminated quoted identifier ");
- line_num++;
- BEGIN(INITIAL);
- }
- YY_BREAK
- case 128:
- # line 324 "scan_s.l"
- sql_str(yytext,yyleng);
- YY_BREAK
- case 129:
- # line 325 "scan_s.l"
- {
- BEGIN(INITIAL);
- SAVESTR(sql_str(NULL,0),yylval.ltrp);
- SQL_PROC(TOK_IDENTIFIER);
- }
- YY_BREAK
- /*********************************************
- * SQL comment recognizer *
- *********************************************/
- case 130:
- # line 333 "scan_s.l"
- /* do nothing */;
- YY_BREAK
- case 131:
- # line 334 "scan_s.l"
- { line_num++; BEGIN(INITIAL); }
- YY_BREAK
- case 132:
- # line 336 "scan_s.l"
- ECHO;
- YY_BREAK
- case YY_STATE_EOF(INITIAL):
- case YY_STATE_EOF(SQL_str):
- case YY_STATE_EOF(SQL_comment):
- case YY_STATE_EOF(Identifier):
- yyterminate();
- case YY_END_OF_BUFFER:
- {
- /* amount of text matched not including the EOB char */
- int yy_amount_of_matched_text = yy_cp - yytext - 1;
- /* undo the effects of YY_DO_BEFORE_ACTION */
- *yy_cp = yy_hold_char;
- /* note that here we test for yy_c_buf_p "<=" to the position
- * of the first EOB in the buffer, since yy_c_buf_p will
- * already have been incremented past the NUL character
- * (since all states make transitions on EOB to the end-
- * of-buffer state). Contrast this with the test in yyinput().
- */
- if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
- /* this was really a NUL */
- {
- yy_state_type yy_next_state;
- yy_c_buf_p = yytext + yy_amount_of_matched_text;
- yy_current_state = yy_get_previous_state();
- /* okay, we're now positioned to make the
- * NUL transition. We couldn't have
- * yy_get_previous_state() go ahead and do it
- * for us because it doesn't know how to deal
- * with the possibility of jamming (and we
- * don't want to build jamming into it because
- * then it will run more slowly)
- */
- yy_next_state = yy_try_NUL_trans( yy_current_state );
- yy_bp = yytext + YY_MORE_ADJ;
- if ( yy_next_state )
- {
- /* consume the NUL */
- yy_cp = ++yy_c_buf_p;
- yy_current_state = yy_next_state;
- goto yy_match;
- }
- else
- {
- yy_cp = yy_last_accepting_cpos;
- yy_current_state = yy_last_accepting_state;
- goto yy_find_action;
- }
- }
- else switch ( yy_get_next_buffer() )
- {
- case EOB_ACT_END_OF_FILE:
- {
- yy_did_buffer_switch_on_eof = 0;
- if ( yywrap() )
- {
- /* note: because we've taken care in
- * yy_get_next_buffer() to have set up yytext,
- * we can now set up yy_c_buf_p so that if some
- * total hoser (like flex itself) wants
- * to call the scanner after we return the
- * YY_NULL, it'll still work - another YY_NULL
- * will get returned.
- */
- yy_c_buf_p = yytext + YY_MORE_ADJ;
- yy_act = YY_STATE_EOF((yy_start - 1) / 2);
- goto do_action;
- }
- else
- {
- if ( ! yy_did_buffer_switch_on_eof )
- YY_NEW_FILE;
- }
- }
- break;
- case EOB_ACT_CONTINUE_SCAN:
- yy_c_buf_p = yytext + yy_amount_of_matched_text;
- yy_current_state = yy_get_previous_state();
- yy_cp = yy_c_buf_p;
- yy_bp = yytext + YY_MORE_ADJ;
- goto yy_match;
- case EOB_ACT_LAST_MATCH:
- yy_c_buf_p =
- &yy_current_buffer->yy_ch_buf[yy_n_chars];
- yy_current_state = yy_get_previous_state();
- yy_cp = yy_c_buf_p;
- yy_bp = yytext + YY_MORE_ADJ;
- goto yy_find_action;
- }
- break;
- }
- default:
- #ifdef FLEX_DEBUG
- printf( "action # %dn", yy_act );
- #endif
- YY_FATAL_ERROR(
- "fatal flex scanner internal error--no action found" );
- }
- }
- }
- /* yy_get_next_buffer - try to read in a new buffer
- *
- * synopsis
- * int yy_get_next_buffer();
- *
- * returns a code representing an action
- * EOB_ACT_LAST_MATCH -
- * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
- * EOB_ACT_END_OF_FILE - end of file
- */
- static int yy_get_next_buffer()
- {
- register YY_CHAR *dest = yy_current_buffer->yy_ch_buf;
- register YY_CHAR *source = yytext - 1; /* copy prev. char, too */
- register int number_to_move, i;
- int ret_val;
- if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
- YY_FATAL_ERROR(
- "fatal flex scanner internal error--end of buffer missed" );
- /* try to read more data */
- /* first move last chars to start of buffer */
- number_to_move = yy_c_buf_p - yytext;
- for ( i = 0; i < number_to_move; ++i )
- *(dest++) = *(source++);
- if ( yy_current_buffer->yy_eof_status != EOF_NOT_SEEN )
- /* don't do the read, it's not guaranteed to return an EOF,
- * just force an EOF
- */
- yy_n_chars = 0;
- else
- {
- int num_to_read = yy_current_buffer->yy_buf_size - number_to_move - 1;
- if ( num_to_read > YY_READ_BUF_SIZE )
- num_to_read = YY_READ_BUF_SIZE;
- else if ( num_to_read <= 0 )
- YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" );
- /* read in more data */
- YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
- yy_n_chars, num_to_read );
- }
- if ( yy_n_chars == 0 )
- {
- if ( number_to_move - YY_MORE_ADJ == 1 )
- {
- ret_val = EOB_ACT_END_OF_FILE;
- yy_current_buffer->yy_eof_status = EOF_DONE;
- }
- else
- {
- ret_val = EOB_ACT_LAST_MATCH;
- yy_current_buffer->yy_eof_status = EOF_PENDING;
- }
- }
- else
- ret_val = EOB_ACT_CONTINUE_SCAN;
- yy_n_chars += number_to_move;
- yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
- yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
- /* yytext begins at the second character in yy_ch_buf; the first
- * character is the one which preceded it before reading in the latest
- * buffer; it needs to be kept around in case it's a newline, so
- * yy_get_previous_state() will have with '^' rules active
- */
- yytext = &yy_current_buffer->yy_ch_buf[1];
- return ( ret_val );
- }
- /* yy_get_previous_state - get the state just before the EOB char was reached
- *
- * synopsis
- * yy_state_type yy_get_previous_state();
- */
- static yy_state_type yy_get_previous_state()
- {
- register yy_state_type yy_current_state;
- register YY_CHAR *yy_cp;
- yy_current_state = yy_start;
- for ( yy_cp = yytext + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
- {
- register YY_CHAR yy_c = (*yy_cp ? yy_ec[*yy_cp] : 1);
- if ( yy_accept[yy_current_state] )
- {
- yy_last_accepting_state = yy_current_state;
- yy_last_accepting_cpos = yy_cp;
- }
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
- yy_current_state = yy_def[yy_current_state];
- if ( yy_current_state >= 471 )
- yy_c = yy_meta[yy_c];
- }
- yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
- }
- return ( yy_current_state );
- }
- /* yy_try_NUL_trans - try to make a transition on the NUL character
- *
- * synopsis
- * next_state = yy_try_NUL_trans( current_state );
- */
- #ifdef YY_USE_PROTOS
- static yy_state_type yy_try_NUL_trans( register yy_state_type yy_current_state )
- #else
- static yy_state_type yy_try_NUL_trans( yy_current_state )
- register yy_state_type yy_current_state;
- #endif
- {
- register int yy_is_jam;
- register YY_CHAR *yy_cp = yy_c_buf_p;
- register YY_CHAR yy_c = 1;
- if ( yy_accept[yy_current_state] )
- {
- yy_last_accepting_state = yy_current_state;
- yy_last_accepting_cpos = yy_cp;
- }
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
- yy_current_state = yy_def[yy_current_state];
- if ( yy_current_state >= 471 )
- yy_c = yy_meta[yy_c];
- }
- yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
- yy_is_jam = (yy_current_state == 470);
- return ( yy_is_jam ? 0 : yy_current_state );
- }
- #ifdef YY_USE_PROTOS
- static void yyunput( YY_CHAR c, register YY_CHAR *yy_bp )
- #else
- static void yyunput( c, yy_bp )
- YY_CHAR c;
- register YY_CHAR *yy_bp;
- #endif
- {
- register YY_CHAR *yy_cp = yy_c_buf_p;
- /* undo effects of setting up yytext */
- *yy_cp = yy_hold_char;
- if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
- { /* need to shift things up to make room */
- register int number_to_move = yy_n_chars + 2; /* +2 for EOB chars */
- register YY_CHAR *dest =
- &yy_current_buffer->yy_ch_buf[yy_current_buffer->yy_buf_size + 2];
- register YY_CHAR *source =
- &yy_current_buffer->yy_ch_buf[number_to_move];
- while ( source > yy_current_buffer->yy_ch_buf )
- *--dest = *--source;
- yy_cp += dest - source;
- yy_bp += dest - source;
- yy_n_chars = yy_current_buffer->yy_buf_size;
- if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
- YY_FATAL_ERROR( "flex scanner push-back overflow" );
- }
- if ( yy_cp > yy_bp && yy_cp[-1] == 'n' )
- yy_cp[-2] = 'n';
- *--yy_cp = c;
- /* note: the formal parameter *must* be called "yy_bp" for this
- * macro to now work correctly
- */
- YY_DO_BEFORE_ACTION; /* set up yytext again */
- }
- #ifdef __cplusplus
- static int yyinput()
- #else
- static int input()
- #endif
- {
- int c;
- YY_CHAR *yy_cp = yy_c_buf_p;
- *yy_cp = yy_hold_char;
- if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
- {
- /* yy_c_buf_p now points to the character we want to return.
- * If this occurs *before* the EOB characters, then it's a
- * valid NUL; if not, then we've hit the end of the buffer.
- */
- if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
- /* this was really a NUL */
- *yy_c_buf_p = ' ';
- else
- { /* need more input */
- yytext = yy_c_buf_p;
- ++yy_c_buf_p;
- switch ( yy_get_next_buffer() )
- {
- case EOB_ACT_END_OF_FILE:
- {
- if ( yywrap() )
- {
- yy_c_buf_p = yytext + YY_MORE_ADJ;
- return ( EOF );
- }
- YY_NEW_FILE;
- #ifdef __cplusplus
- return ( yyinput() );
- #else
- return ( input() );
- #endif
- }
- break;
- case EOB_ACT_CONTINUE_SCAN:
- yy_c_buf_p = yytext + YY_MORE_ADJ;
- break;
- case EOB_ACT_LAST_MATCH:
- #ifdef __cplusplus
- YY_FATAL_ERROR( "unexpected last match in yyinput()" );
- #else
- YY_FATAL_ERROR( "unexpected last match in input()" );
- #endif
- }
- }
- }
- c = *yy_c_buf_p;
- yy_hold_char = *++yy_c_buf_p;
- return ( c );
- }
- #ifdef YY_USE_PROTOS
- void yyrestart( FILE *input_file )
- #else
- void yyrestart( input_file )
- FILE *input_file;
- #endif
- {
- yy_init_buffer( yy_current_buffer, input_file );
- yy_load_buffer_state();
- }
- #ifdef YY_USE_PROTOS
- void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
- #else
- void yy_switch_to_buffer( new_buffer )
- YY_BUFFER_STATE new_buffer;
- #endif
- {
- if ( yy_current_buffer == new_buffer )
- return;
- if ( yy_current_buffer )
- {
- /* flush out information for old buffer */
- *yy_c_buf_p = yy_hold_char;
- yy_current_buffer->yy_buf_pos = yy_c_buf_p;
- yy_current_buffer->yy_n_chars = yy_n_chars;
- }
- yy_current_buffer = new_buffer;
- yy_load_buffer_state();
- /* we don't actually know whether we did this switch during
- * EOF (yywrap()) processing, but the only time this flag
- * is looked at is after yywrap() is called, so it's safe
- * to go ahead and always set it.
- */
- yy_did_buffer_switch_on_eof = 1;
- }
- #ifdef YY_USE_PROTOS
- void yy_load_buffer_state( void )
- #else
- void yy_load_buffer_state()
- #endif
- {
- yy_n_chars = yy_current_buffer->yy_n_chars;
- yytext = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
- yyin = yy_current_buffer->yy_input_file;
- yy_hold_char = *yy_c_buf_p;
- }
- #ifdef YY_USE_PROTOS
- YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
- #else
- YY_BUFFER_STATE yy_create_buffer( file, size )
- FILE *file;
- int size;
- #endif
- {
- YY_BUFFER_STATE b;
- b = (YY_BUFFER_STATE) malloc( sizeof( struct yy_buffer_state ) );
- if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
- b->yy_buf_size = size;
- /* yy_ch_buf has to be 2 characters longer than the size given because
- * we need to put in 2 end-of-buffer characters.
- */
- b->yy_ch_buf = (YY_CHAR *) malloc( (unsigned) (b->yy_buf_size + 2) );
- if ( ! b->yy_ch_buf )
- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
- yy_init_buffer( b, file );
- return ( b );
- }
- #ifdef YY_USE_PROTOS
- void yy_delete_buffer( YY_BUFFER_STATE b )
- #else
- void yy_delete_buffer( b )
- YY_BUFFER_STATE b;
- #endif
- {
- if ( b == yy_current_buffer )
- yy_current_buffer = (YY_BUFFER_STATE) 0;
- free( (char *) b->yy_ch_buf );
- free( (char *) b );
- }
- #ifdef YY_USE_PROTOS
- void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
- #else
- void yy_init_buffer( b, file )
- YY_BUFFER_STATE b;
- FILE *file;
- #endif
- {
- b->yy_input_file = file;
- /* we put in the 'n' and start reading from [1] so that an
- * initial match-at-newline will be true.
- */
- b->yy_ch_buf[0] = 'n';
- b->yy_n_chars = 1;
- /* we always need two end-of-buffer characters. The first causes
- * a transition to the end-of-buffer state. The second causes
- * a jam in that state.
- */
- b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
- b->yy_ch_buf[2] = YY_END_OF_BUFFER_CHAR;
- b->yy_buf_pos = &b->yy_ch_buf[1];
- b->yy_eof_status = EOF_NOT_SEEN;
- }
- # line 336 "scan_s.l"
- void
- restart_server_scanner(char *stmt,i4_t bline)
- {
- yy_init=1;
- line_num=bline;
- bufstring=stmt;
- }
- int yywrap() { return 1; }