kexi

sqlscanner.cpp

00001 #line 2 "sqlscanner.cpp"
00002 /* A lexical scanner generated by flex */
00003 
00004 /* Scanner skeleton version:
00005  * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
00006  */
00007 
00008 #define FLEX_SCANNER
00009 #define YY_FLEX_MAJOR_VERSION 2
00010 #define YY_FLEX_MINOR_VERSION 5
00011 
00012 #include <stdio.h>
00013 
00014 
00015 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
00016 #ifdef c_plusplus
00017 #ifndef __cplusplus
00018 #define __cplusplus
00019 #endif
00020 #endif
00021 
00022 
00023 #ifdef __cplusplus
00024 
00025 #include <stdlib.h>
00026 #include <unistd.h>
00027 
00028 /* Use prototypes in function declarations. */
00029 #define YY_USE_PROTOS
00030 
00031 /* The "const" storage-class-modifier is valid. */
00032 #define YY_USE_CONST
00033 
00034 #else   /* ! __cplusplus */
00035 
00036 #if __STDC__
00037 
00038 #define YY_USE_PROTOS
00039 #define YY_USE_CONST
00040 
00041 #endif  /* __STDC__ */
00042 #endif  /* ! __cplusplus */
00043 
00044 #ifdef __TURBOC__
00045  #pragma warn -rch
00046  #pragma warn -use
00047 #include <io.h>
00048 #include <stdlib.h>
00049 #define YY_USE_CONST
00050 #define YY_USE_PROTOS
00051 #endif
00052 
00053 #ifdef YY_USE_CONST
00054 #define yyconst const
00055 #else
00056 #define yyconst
00057 #endif
00058 
00059 
00060 #ifdef YY_USE_PROTOS
00061 #define YY_PROTO(proto) proto
00062 #else
00063 #define YY_PROTO(proto) ()
00064 #endif
00065 
00066 /* Returned upon end-of-file. */
00067 #define YY_NULL 0
00068 
00069 /* Promotes a possibly negative, possibly signed char to an unsigned
00070  * integer for use as an array index.  If the signed char is negative,
00071  * we want to instead treat it as an 8-bit unsigned char, hence the
00072  * double cast.
00073  */
00074 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
00075 
00076 /* Enter a start condition.  This macro really ought to take a parameter,
00077  * but we do it the disgusting crufty way forced on us by the ()-less
00078  * definition of BEGIN.
00079  */
00080 #define BEGIN yy_start = 1 + 2 *
00081 
00082 /* Translate the current start state into a value that can be later handed
00083  * to BEGIN to return to the state.  The YYSTATE alias is for lex
00084  * compatibility.
00085  */
00086 #define YY_START ((yy_start - 1) / 2)
00087 #define YYSTATE YY_START
00088 
00089 /* Action number for EOF rule of a given start state. */
00090 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
00091 
00092 /* Special action meaning "start processing a new file". */
00093 #define YY_NEW_FILE yyrestart( yyin )
00094 
00095 #define YY_END_OF_BUFFER_CHAR 0
00096 
00097 /* Size of default input buffer. */
00098 #define YY_BUF_SIZE 16384
00099 
00100 typedef struct yy_buffer_state *YY_BUFFER_STATE;
00101 
00102 extern int yyleng;
00103 extern FILE *yyin, *yyout;
00104 
00105 #define EOB_ACT_CONTINUE_SCAN 0
00106 #define EOB_ACT_END_OF_FILE 1
00107 #define EOB_ACT_LAST_MATCH 2
00108 
00109 /* The funky do-while in the following #define is used to turn the definition
00110  * int a single C statement (which needs a semi-colon terminator).  This
00111  * avoids problems with code like:
00112  *
00113  *  if ( condition_holds )
00114  *      yyless( 5 );
00115  *  else
00116  *      do_something_else();
00117  *
00118  * Prior to using the do-while the compiler would get upset at the
00119  * "else" because it interpreted the "if" statement as being all
00120  * done when it reached the ';' after the yyless() call.
00121  */
00122 
00123 /* Return all but the first 'n' matched characters back to the input stream. */
00124 
00125 #define yyless(n) \
00126     do \
00127         { \
00128         /* Undo effects of setting up yytext. */ \
00129         *yy_cp = yy_hold_char; \
00130         YY_RESTORE_YY_MORE_OFFSET \
00131         yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
00132         YY_DO_BEFORE_ACTION; /* set up yytext again */ \
00133         } \
00134     while ( 0 )
00135 
00136 #define unput(c) yyunput( c, yytext_ptr )
00137 
00138 /* The following is because we cannot portably get our hands on size_t
00139  * (without autoconf's help, which isn't available because we want
00140  * flex-generated scanners to compile on their own).
00141  */
00142 typedef unsigned int yy_size_t;
00143 
00144 
00145 struct yy_buffer_state
00146     {
00147     FILE *yy_input_file;
00148 
00149     char *yy_ch_buf;        /* input buffer */
00150     char *yy_buf_pos;       /* current position in input buffer */
00151 
00152     /* Size of input buffer in bytes, not including room for EOB
00153      * characters.
00154      */
00155     yy_size_t yy_buf_size;
00156 
00157     /* Number of characters read into yy_ch_buf, not including EOB
00158      * characters.
00159      */
00160     int yy_n_chars;
00161 
00162     /* Whether we "own" the buffer - i.e., we know we created it,
00163      * and can realloc() it to grow it, and should free() it to
00164      * delete it.
00165      */
00166     int yy_is_our_buffer;
00167 
00168     /* Whether this is an "interactive" input source; if so, and
00169      * if we're using stdio for input, then we want to use getc()
00170      * instead of fread(), to make sure we stop fetching input after
00171      * each newline.
00172      */
00173     int yy_is_interactive;
00174 
00175     /* Whether we're considered to be at the beginning of a line.
00176      * If so, '^' rules will be active on the next match, otherwise
00177      * not.
00178      */
00179     int yy_at_bol;
00180 
00181     /* Whether to try to fill the input buffer when we reach the
00182      * end of it.
00183      */
00184     int yy_fill_buffer;
00185 
00186     int yy_buffer_status;
00187 #define YY_BUFFER_NEW 0
00188 #define YY_BUFFER_NORMAL 1
00189     /* When an EOF's been seen but there's still some text to process
00190      * then we mark the buffer as YY_EOF_PENDING, to indicate that we
00191      * shouldn't try reading from the input source any more.  We might
00192      * still have a bunch of tokens to match, though, because of
00193      * possible backing-up.
00194      *
00195      * When we actually see the EOF, we change the status to "new"
00196      * (via yyrestart()), so that the user can continue scanning by
00197      * just pointing yyin at a new input file.
00198      */
00199 #define YY_BUFFER_EOF_PENDING 2
00200     };
00201 
00202 static YY_BUFFER_STATE yy_current_buffer = 0;
00203 
00204 /* We provide macros for accessing buffer states in case in the
00205  * future we want to put the buffer states in a more general
00206  * "scanner state".
00207  */
00208 #define YY_CURRENT_BUFFER yy_current_buffer
00209 
00210 
00211 /* yy_hold_char holds the character lost when yytext is formed. */
00212 static char yy_hold_char;
00213 
00214 static int yy_n_chars;      /* number of characters read into yy_ch_buf */
00215 
00216 
00217 int yyleng;
00218 
00219 /* Points to current character in buffer. */
00220 static char *yy_c_buf_p = (char *) 0;
00221 static int yy_init = 1;     /* whether we need to initialize */
00222 static int yy_start = 0;    /* start state number */
00223 
00224 /* Flag which is used to allow yywrap()'s to do buffer switches
00225  * instead of setting up a fresh yyin.  A bit of a hack ...
00226  */
00227 static int yy_did_buffer_switch_on_eof;
00228 
00229 void yyrestart YY_PROTO(( FILE *input_file ));
00230 
00231 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
00232 void yy_load_buffer_state YY_PROTO(( void ));
00233 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
00234 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
00235 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
00236 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
00237 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
00238 
00239 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
00240 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
00241 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
00242 
00243 static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
00244 static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
00245 static void yy_flex_free YY_PROTO(( void * ));
00246 
00247 #define yy_new_buffer yy_create_buffer
00248 
00249 #define yy_set_interactive(is_interactive) \
00250     { \
00251     if ( ! yy_current_buffer ) \
00252         yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
00253     yy_current_buffer->yy_is_interactive = is_interactive; \
00254     }
00255 
00256 #define yy_set_bol(at_bol) \
00257     { \
00258     if ( ! yy_current_buffer ) \
00259         yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
00260     yy_current_buffer->yy_at_bol = at_bol; \
00261     }
00262 
00263 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
00264 
00265 
00266 #define YY_USES_REJECT
00267 
00268 #define yywrap() 1
00269 #define YY_SKIP_YYWRAP
00270 typedef unsigned char YY_CHAR;
00271 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
00272 typedef int yy_state_type;
00273 #define YY_FLEX_LEX_COMPAT
00274 extern int yylineno;
00275 int yylineno = 1;
00276 extern char yytext[];
00277 
00278 
00279 static yy_state_type yy_get_previous_state YY_PROTO(( void ));
00280 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
00281 static int yy_get_next_buffer YY_PROTO(( void ));
00282 static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
00283 
00284 /* Done after the current pattern has been matched and before the
00285  * corresponding action - sets up yytext.
00286  */
00287 #define YY_DO_BEFORE_ACTION \
00288     yytext_ptr = yy_bp; \
00289     yyleng = (int) (yy_cp - yy_bp); \
00290     yy_hold_char = *yy_cp; \
00291     *yy_cp = '\0'; \
00292     if ( yyleng + yy_more_offset >= YYLMAX ) \
00293         YY_FATAL_ERROR( "token too large, exceeds YYLMAX" ); \
00294     yy_flex_strncpy( &yytext[yy_more_offset], yytext_ptr, yyleng + 1 ); \
00295     yyleng += yy_more_offset; \
00296     yy_prev_more_offset = yy_more_offset; \
00297     yy_more_offset = 0; \
00298     yy_c_buf_p = yy_cp;
00299 
00300 #define YY_NUM_RULES 39
00301 #define YY_END_OF_BUFFER 40
00302 static yyconst short int yy_acclist[154] =
00303     {   0,
00304        40,   39,   37,   39,   38,   39,   39,   38,   39,   38,
00305        39,   39,   38,   39,    7,   35,   39,   38,   39,   38,
00306        39,   38,   39,   35,   39,   35,   39,   35,   39,   35,
00307        39,   35,   39,   35,   39,   35,   39,   35,   39,   35,
00308        39,   35,   39,   35,   39,   35,   39,   35,   39,   35,
00309        39,   38,   39,   37,    2,    9,   34,    8,    8,    7,
00310        35,   35,   27,    4,    1,    3,    5,   28,   35,   10,
00311        35,   35,   35,    6,   35,   22,   35,   35,   35,   35,
00312        35,   35,   24,   35,   25,   35,   35,   35,   35,   35,
00313        35,   35,   26,   36,    8,    9,   35,   35,   35,   35,
00314 
00315        35,   35,   35,   21,   35,   35,   35,   35,   35,   35,
00316        35,   29,   35,   35,   12,   35,   35,   14,   35,   15,
00317        35,   16,   35,   23,   35,   35,   35,   35,   35,   35,
00318        35,   35,   30,   35,   35,   35,   32,   35,   33,   35,
00319        11,   35,   35,   31,   35,   35,   13,   35,   20,   35,
00320        18,   19,   17
00321     } ;
00322 
00323 static yyconst short int yy_accept[137] =
00324     {   0,
00325         1,    1,    1,    2,    3,    5,    7,    8,   10,   12,
00326        13,   15,   18,   20,   22,   24,   26,   28,   30,   32,
00327        34,   36,   38,   40,   42,   44,   46,   48,   50,   52,
00328        54,   55,   56,   56,   57,   57,   58,   59,   60,   62,
00329        63,   64,   65,   66,   67,   68,   69,   70,   72,   73,
00330        74,   76,   78,   79,   80,   81,   82,   83,   85,   87,
00331        88,   89,   90,   91,   92,   93,   94,   95,   96,   98,
00332        99,  100,  101,  101,  102,  103,  104,  106,  107,  108,
00333       109,  110,  111,  112,  114,  115,  117,  118,  118,  120,
00334       122,  124,  124,  126,  127,  128,  129,  130,  131,  132,
00335 
00336       133,  133,  133,  133,  135,  136,  137,  139,  141,  143,
00337       144,  144,  144,  144,  146,  147,  149,  149,  150,  150,
00338       151,  151,  151,  151,  151,  151,  151,  151,  151,  152,
00339       153,  153,  153,  153,  154,  154
00340     } ;
00341 
00342 static yyconst int yy_ec[256] =
00343     {   0,
00344         1,    1,    1,    1,    1,    1,    1,    1,    2,    2,
00345         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00346         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00347         1,    2,    3,    4,    5,    1,    5,    6,    7,    5,
00348         5,    5,    5,    5,    5,    8,    5,    9,    9,    9,
00349         9,    9,    9,    9,    9,    9,    9,    5,    5,   10,
00350        11,   12,    5,    5,   14,   15,   16,   17,   18,   19,
00351        20,   21,   22,   23,   24,   25,   26,   27,   28,   13,
00352        13,   29,   30,   31,   32,   13,   33,   34,   13,   13,
00353         5,    1,    5,    5,   13,    5,   14,   15,   16,   17,
00354 
00355        18,   19,   20,   21,   22,   23,   24,   25,   26,   27,
00356        28,   13,   13,   29,   30,   31,   32,   13,   33,   34,
00357        13,   13,    1,   35,    1,    5,    1,    1,    1,    1,
00358         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00359         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00360         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00361         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00362         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00363         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00364         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00365 
00366         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00367         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00368         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00369         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00370         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00371         1,    1,    1,    1,    1
00372     } ;
00373 
00374 static yyconst int yy_meta[36] =
00375     {   0,
00376         1,    1,    1,    1,    1,    1,    1,    2,    3,    1,
00377         1,    1,    3,    3,    3,    3,    3,    3,    3,    3,
00378         3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
00379         3,    3,    3,    3,    1
00380     } ;
00381 
00382 static yyconst short int yy_base[139] =
00383     {   0,
00384         0,    0,  228,  229,  225,  215,    0,  229,  219,  217,
00385       214,   28,   28,  211,   30,  213,   35,   37,   38,   41,
00386        36,   39,   42,   46,   47,   64,   44,   55,   51,  185,
00387       217,  229,  214,  229,  210,  229,  207,  206,   69,  206,
00388       229,  229,  229,  229,  229,  229,   43,  205,   72,   73,
00389        75,   83,   76,   80,   79,   81,   84,  204,  203,   85,
00390        86,   87,   89,   92,   88,  229,  229,  201,  201,   94,
00391        99,  106,  113,  108,  110,  111,  118,  113,  115,  114,
00392       120,  119,  122,  200,  123,  199,  125,  111,  198,  197,
00393       196,  132,  195,  129,   40,  138,  139,  140,  141,  147,
00394 
00395       165,  170,  172,  185,  142,  153,  184,  183,  182,  145,
00396       186,  162,  160,  177,  148,  176,  162,  229,  161,  164,
00397       150,  155,  150,  154,  164,  148,  150,  142,  229,  229,
00398       168,  166,  141,  229,  229,   50,  197,  199
00399     } ;
00400 
00401 static yyconst short int yy_def[139] =
00402     {   0,
00403       135,    1,  135,  135,  135,  135,  136,  135,  135,  137,
00404       135,  138,  135,  135,  135,  138,  138,  138,  138,  138,
00405       138,  138,  138,  138,  138,  138,  138,  138,  138,  135,
00406       135,  135,  136,  135,  137,  135,  135,  135,  138,  138,
00407       135,  135,  135,  135,  135,  135,  138,  138,  138,  138,
00408       138,  138,  138,  138,  138,  138,  138,  138,  138,  138,
00409       138,  138,  138,  138,  138,  135,  135,  135,  138,  138,
00410       138,  138,  135,  138,  138,  138,  138,  138,  138,  138,
00411       138,  138,  138,  138,  138,  138,  138,  135,  138,  138,
00412       138,  135,  138,  138,  138,  138,  138,  138,  138,  138,
00413 
00414       135,  135,  135,  138,  138,  138,  138,  138,  138,  138,
00415       135,  135,  135,  138,  138,  138,  135,  135,  135,  138,
00416       135,  135,  135,  135,  135,  135,  135,  135,  135,  135,
00417       135,  135,  135,  135,    0,  135,  135,  135
00418     } ;
00419 
00420 static yyconst short int yy_nxt[265] =
00421     {   0,
00422         4,    5,    6,    7,    8,    9,   10,   11,   12,   13,
00423        14,   15,   16,   17,   16,   18,   16,   16,   19,   16,
00424        16,   20,   21,   16,   22,   16,   23,   24,   25,   26,
00425        27,   16,   28,   29,   30,   38,   39,   41,   42,   43,
00426        45,   46,  135,  135,  135,  135,  135,  135,  135,  135,
00427       135,  135,   33,  135,  135,  105,   54,   63,  135,   69,
00428        55,   47,  135,   53,   48,   49,   50,   51,   60,   56,
00429        52,  135,   58,   57,   59,   64,   38,   39,   65,  135,
00430       135,   61,  135,  135,   73,   62,  135,  135,  135,   70,
00431       135,  135,  135,  135,  135,  135,  135,   74,   75,  135,
00432 
00433        71,  135,   76,   82,   79,   72,  135,   85,   78,   83,
00434        80,   77,   81,  135,   73,  135,   84,  135,  135,   92,
00435       135,  135,  135,   87,   86,  135,  135,  135,   91,  135,
00436       135,   95,  135,   92,   89,   94,  135,   93,  101,   88,
00437        90,   96,  102,   97,  100,  135,  135,  135,  135,  135,
00438        98,  123,  135,   99,  135,  135,  107,  108,  109,  104,
00439       135,  103,  106,  117,  110,  123,  115,  132,  134,  132,
00440       131,  135,  114,  116,  130,  129,  120,  128,  127,  125,
00441       126,  124,  122,  135,  135,  119,  118,  117,  121,  135,
00442       135,  135,  135,  113,  112,  111,  133,   35,   35,   35,
00443 
00444        40,   40,  135,  135,  135,  135,  135,  135,  135,   68,
00445       135,  135,  135,  135,   68,   37,   36,   67,   31,   66,
00446       135,   44,   37,   36,   34,   32,   31,  135,    3,  135,
00447       135,  135,  135,  135,  135,  135,  135,  135,  135,  135,
00448       135,  135,  135,  135,  135,  135,  135,  135,  135,  135,
00449       135,  135,  135,  135,  135,  135,  135,  135,  135,  135,
00450       135,  135,  135,  135
00451     } ;
00452 
00453 static yyconst short int yy_chk[265] =
00454     {   0,
00455         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00456         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00457         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00458         1,    1,    1,    1,    1,   12,   12,   13,   13,   13,
00459        15,   15,   17,   21,   18,   19,   22,   95,   20,   23,
00460        47,   27,  136,   24,   25,   95,   22,   27,   29,   47,
00461        22,   17,   28,   21,   17,   18,   19,   20,   25,   23,
00462        20,   26,   24,   23,   24,   28,   39,   39,   29,   49,
00463        50,   26,   51,   53,   52,   26,   55,   54,   56,   49,
00464        52,   57,   60,   61,   62,   65,   63,   53,   54,   64,
00465 
00466        50,   70,   55,   63,   60,   51,   71,   70,   57,   64,
00467        61,   56,   62,   72,   73,   74,   65,   75,   76,   77,
00468        78,   80,   79,   72,   71,   77,   82,   81,   76,   83,
00469        85,   80,   87,   92,   74,   79,   94,   78,   88,   73,
00470        75,   81,   88,   82,   87,   96,   97,   98,   99,  105,
00471        83,  123,  110,   85,  100,  115,   97,   98,   99,   94,
00472       106,   92,   96,  117,  100,  120,  106,  132,  133,  131,
00473       128,  120,  105,  110,  127,  126,  115,  125,  124,  122,
00474       123,  121,  119,  116,  114,  113,  112,  111,  117,  109,
00475       108,  107,  104,  103,  102,  101,  132,  137,  137,  137,
00476 
00477       138,  138,   93,   91,   90,   89,   86,   84,   69,   68,
00478        59,   58,   48,   40,   38,   37,   35,   33,   31,   30,
00479        16,   14,   11,   10,    9,    6,    5,    3,  135,  135,
00480       135,  135,  135,  135,  135,  135,  135,  135,  135,  135,
00481       135,  135,  135,  135,  135,  135,  135,  135,  135,  135,
00482       135,  135,  135,  135,  135,  135,  135,  135,  135,  135,
00483       135,  135,  135,  135
00484     } ;
00485 
00486 static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
00487 static char *yy_full_match;
00488 static int yy_lp;
00489 #define REJECT \
00490 { \
00491 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \
00492 yy_cp = yy_full_match; /* restore poss. backed-over text */ \
00493 ++yy_lp; \
00494 goto find_rule; \
00495 }
00496 static int yy_more_offset = 0;
00497 static int yy_prev_more_offset = 0;
00498 #define yymore() (yy_more_offset = yy_flex_strlen( yytext ))
00499 #define YY_NEED_STRLEN
00500 #define YY_MORE_ADJ 0
00501 #define YY_RESTORE_YY_MORE_OFFSET \
00502     { \
00503     yy_more_offset = yy_prev_more_offset; \
00504     yyleng -= yy_more_offset; \
00505     }
00506 #ifndef YYLMAX
00507 #define YYLMAX 8192
00508 #endif
00509 
00510 char yytext[YYLMAX];
00511 char *yytext_ptr;
00512 #line 1 "sqlscanner.l"
00513 #define INITIAL 0
00514 /* This file is part of the KDE project
00515    Copyright (C) 2004 Lucijan Busch <lucijan@kde.org>
00516    Copyright (C) 2004 Jaroslaw Staniek <js@iidea.pl>
00517 
00518    This library is free software; you can redistribute it and/or
00519    modify it under the terms of the GNU Library General Public
00520    License as published by the Free Software Foundation; either
00521    version 2 of the License, or (at your option) any later version.
00522 
00523    This library is distributed in the hope that it will be useful,
00524    but WITHOUT ANY WARRANTY; without even the implied warranty of
00525    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00526    Library General Public License for more details.
00527 
00528    You should have received a copy of the GNU Library General Public License
00529    along with this library; see the file COPYING.LIB.  If not, write to
00530    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00531    Boston, MA 02110-1301, USA.
00532 */
00533 #line 22 "sqlscanner.l"
00534 #include <field.h>
00535 #include <expression.h>
00536 
00537 #include "sqlparser.h"
00538 #include "sqltypes.h"
00539 #include <iostream>
00540 #include <kdebug.h>
00541 #include <klocale.h>
00542 
00543 #define YY_NO_UNPUT
00544 #define ECOUNT current += yyleng; ctoken = yytext
00545 
00546 extern void setError(const QString& errDesc);
00547 extern void setError(const QString& errName, const QString& errDesc);
00548 
00549 /* *** Please reflect changes to this file in ../driver_p.cpp *** */
00550 #define YY_NEVER_INTERACTIVE 1
00551 /*identifier    [a-zA-Z_][a-zA-Z_0-9]* */
00552 /* todo: support for real numbers */
00553 #line 554 "sqlscanner.cpp"
00554 
00555 /* Macros after this point can all be overridden by user definitions in
00556  * section 1.
00557  */
00558 
00559 #ifndef YY_SKIP_YYWRAP
00560 #ifdef __cplusplus
00561 extern "C" int yywrap YY_PROTO(( void ));
00562 #else
00563 extern int yywrap YY_PROTO(( void ));
00564 #endif
00565 #endif
00566 
00567 #ifndef YY_NO_UNPUT
00568 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
00569 #endif
00570 
00571 #ifndef yytext_ptr
00572 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
00573 #endif
00574 
00575 #ifdef YY_NEED_STRLEN
00576 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
00577 #endif
00578 
00579 #ifndef YY_NO_INPUT
00580 #ifdef __cplusplus
00581 static int yyinput YY_PROTO(( void ));
00582 #else
00583 static int input YY_PROTO(( void ));
00584 #endif
00585 #endif
00586 
00587 #if YY_STACK_USED
00588 static int yy_start_stack_ptr = 0;
00589 static int yy_start_stack_depth = 0;
00590 static int *yy_start_stack = 0;
00591 #ifndef YY_NO_PUSH_STATE
00592 static void yy_push_state YY_PROTO(( int new_state ));
00593 #endif
00594 #ifndef YY_NO_POP_STATE
00595 static void yy_pop_state YY_PROTO(( void ));
00596 #endif
00597 #ifndef YY_NO_TOP_STATE
00598 static int yy_top_state YY_PROTO(( void ));
00599 #endif
00600 
00601 #else
00602 #define YY_NO_PUSH_STATE 1
00603 #define YY_NO_POP_STATE 1
00604 #define YY_NO_TOP_STATE 1
00605 #endif
00606 
00607 #ifdef YY_MALLOC_DECL
00608 YY_MALLOC_DECL
00609 #else
00610 #if __STDC__
00611 #ifndef __cplusplus
00612 #include <stdlib.h>
00613 #endif
00614 #else
00615 /* Just try to get by without declaring the routines.  This will fail
00616  * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
00617  * or sizeof(void*) != sizeof(int).
00618  */
00619 #endif
00620 #endif
00621 
00622 /* Amount of stuff to slurp up with each read. */
00623 #ifndef YY_READ_BUF_SIZE
00624 #define YY_READ_BUF_SIZE 8192
00625 #endif
00626 
00627 /* Copy whatever the last rule matched to the standard output. */
00628 
00629 #ifndef ECHO
00630 /* This used to be an fputs(), but since the string might contain NUL's,
00631  * we now use fwrite().
00632  */
00633 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
00634 #endif
00635 
00636 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
00637  * is returned in "result".
00638  */
00639 #ifndef YY_INPUT
00640 #define YY_INPUT(buf,result,max_size) \
00641     if ( yy_current_buffer->yy_is_interactive ) \
00642         { \
00643         int c = '*', n; \
00644         for ( n = 0; n < max_size && \
00645                  (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
00646             buf[n] = (char) c; \
00647         if ( c == '\n' ) \
00648             buf[n++] = (char) c; \
00649         if ( c == EOF && ferror( yyin ) ) \
00650             YY_FATAL_ERROR( "input in flex scanner failed" ); \
00651         result = n; \
00652         } \
00653     else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
00654           && ferror( yyin ) ) \
00655         YY_FATAL_ERROR( "input in flex scanner failed" );
00656 #endif
00657 
00658 /* No semi-colon after return; correct usage is to write "yyterminate();" -
00659  * we don't want an extra ';' after the "return" because that will cause
00660  * some compilers to complain about unreachable statements.
00661  */
00662 #ifndef yyterminate
00663 #define yyterminate() return YY_NULL
00664 #endif
00665 
00666 /* Number of entries by which start-condition stack grows. */
00667 #ifndef YY_START_STACK_INCR
00668 #define YY_START_STACK_INCR 25
00669 #endif
00670 
00671 /* Report a fatal error. */
00672 #ifndef YY_FATAL_ERROR
00673 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
00674 #endif
00675 
00676 /* Default declaration of generated scanner - a define so the user can
00677  * easily add parameters.
00678  */
00679 #ifndef YY_DECL
00680 #define YY_DECL int yylex YY_PROTO(( void ))
00681 #endif
00682 
00683 /* Code executed at the beginning of each rule, after yytext and yyleng
00684  * have been set up.
00685  */
00686 #ifndef YY_USER_ACTION
00687 #define YY_USER_ACTION
00688 #endif
00689 
00690 /* Code executed at the end of each rule. */
00691 #ifndef YY_BREAK
00692 #define YY_BREAK break;
00693 #endif
00694 
00695 #define YY_RULE_SETUP \
00696     YY_USER_ACTION
00697 
00698 YY_DECL
00699     {
00700     register yy_state_type yy_current_state;
00701     register char *yy_cp, *yy_bp;
00702     register int yy_act;
00703 
00704 #line 57 "sqlscanner.l"
00705 
00706 
00707 
00708 #line 709 "sqlscanner.cpp"
00709 
00710     if ( yy_init )
00711         {
00712         yy_init = 0;
00713 
00714 #ifdef YY_USER_INIT
00715         YY_USER_INIT;
00716 #endif
00717 
00718         if ( ! yy_start )
00719             yy_start = 1;   /* first start state */
00720 
00721         if ( ! yyin )
00722             yyin = stdin;
00723 
00724         if ( ! yyout )
00725             yyout = stdout;
00726 
00727         if ( ! yy_current_buffer )
00728             yy_current_buffer =
00729                 yy_create_buffer( yyin, YY_BUF_SIZE );
00730 
00731         yy_load_buffer_state();
00732         }
00733 
00734     while ( 1 )     /* loops until end-of-file is reached */
00735         {
00736         yy_cp = yy_c_buf_p;
00737 
00738         /* Support of yytext. */
00739         *yy_cp = yy_hold_char;
00740 
00741         /* yy_bp points to the position in yy_ch_buf of the start of
00742          * the current run.
00743          */
00744         yy_bp = yy_cp;
00745 
00746         yy_current_state = yy_start;
00747         yy_state_ptr = yy_state_buf;
00748         *yy_state_ptr++ = yy_current_state;
00749 yy_match:
00750         do
00751             {
00752             register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
00753             while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
00754                 {
00755                 yy_current_state = (int) yy_def[yy_current_state];
00756                 if ( yy_current_state >= 136 )
00757                     yy_c = yy_meta[(unsigned int) yy_c];
00758                 }
00759             yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
00760             *yy_state_ptr++ = yy_current_state;
00761             ++yy_cp;
00762             }
00763         while ( yy_base[yy_current_state] != 229 );
00764 
00765 yy_find_action:
00766         yy_current_state = *--yy_state_ptr;
00767         yy_lp = yy_accept[yy_current_state];
00768 find_rule: /* we branch to this label when backing up */
00769         for ( ; ; ) /* until we find what rule we matched */
00770             {
00771             if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
00772                 {
00773                 yy_act = yy_acclist[yy_lp];
00774                     {
00775                     yy_full_match = yy_cp;
00776                     break;
00777                     }
00778                 }
00779             --yy_cp;
00780             yy_current_state = *--yy_state_ptr;
00781             yy_lp = yy_accept[yy_current_state];
00782             }
00783 
00784         YY_DO_BEFORE_ACTION;
00785 
00786         if ( yy_act != YY_END_OF_BUFFER )
00787             {
00788             int yyl;
00789             for ( yyl = 0; yyl < yyleng; ++yyl )
00790                 if ( yytext[yyl] == '\n' )
00791                     ++yylineno;
00792             }
00793 
00794 do_action:  /* This label is used only to access EOF actions. */
00795 
00796 
00797         switch ( yy_act )
00798     { /* beginning of action switch */
00799 case 1:
00800 YY_RULE_SETUP
00801 #line 60 "sqlscanner.l"
00802 {
00803     ECOUNT;
00804     return NOT_EQUAL;
00805 }
00806     YY_BREAK
00807 case 2:
00808 YY_RULE_SETUP
00809 #line 65 "sqlscanner.l"
00810 {
00811     ECOUNT;
00812     return NOT_EQUAL2;
00813 }
00814     YY_BREAK
00815 case 3:
00816 YY_RULE_SETUP
00817 #line 70 "sqlscanner.l"
00818 {
00819     ECOUNT;
00820     return '=';
00821 }
00822     YY_BREAK
00823 case 4:
00824 YY_RULE_SETUP
00825 #line 75 "sqlscanner.l"
00826 {
00827     ECOUNT;
00828     return LESS_OR_EQUAL;
00829 }
00830     YY_BREAK
00831 case 5:
00832 YY_RULE_SETUP
00833 #line 80 "sqlscanner.l"
00834 {
00835     ECOUNT;
00836     return GREATER_OR_EQUAL;
00837 }
00838     YY_BREAK
00839 case 6:
00840 YY_RULE_SETUP
00841 #line 85 "sqlscanner.l"
00842 {
00843     ECOUNT;
00844     return SQL_IN;
00845 }
00846     YY_BREAK
00847 case 7:
00848 YY_RULE_SETUP
00849 #line 90 "sqlscanner.l"
00850 {
00851 //TODO: what about hex or octal values?
00852     //we're using QString:toLongLong() here because atoll() is not so portable:
00853     ECOUNT;
00854     bool ok;
00855     yylval.integerValue = QString(yytext).toLongLong( &ok );
00856     if (!ok) {
00857         setError(i18n("Invalid integer number"),i18n("This integer number may be too large."));
00858         return SCAN_ERROR;
00859     }
00860 //  yylval.integerValue = atol(yytext);
00861     return INTEGER_CONST;
00862 }
00863     YY_BREAK
00864 case 8:
00865 YY_RULE_SETUP
00866 #line 104 "sqlscanner.l"
00867 {
00868     char *p = yytext;
00869     if (yytext[0]=='.') { /* no integer part */
00870         yylval.realValue.integer = 0;
00871     }
00872     else {
00873         yylval.realValue.integer = atoi(p);
00874         int i=0;
00875         while (p && i < yyleng && *p != '.') {
00876             i++;
00877             p++;
00878         }
00879         if (i==0 || !p || *p!='.') {
00880             yylval.realValue.fractional = 0;
00881             return REAL_CONST;
00882         }
00883     }
00884     /* fractional part */
00885     p++;
00886     yylval.realValue.fractional = atoi(p);
00887     return REAL_CONST;
00888 }
00889     YY_BREAK
00890 case 9:
00891 YY_RULE_SETUP
00892 #line 127 "sqlscanner.l"
00893 {
00894     ECOUNT;
00895     return AND;
00896 }
00897     YY_BREAK
00898 case 10:
00899 YY_RULE_SETUP
00900 #line 132 "sqlscanner.l"
00901 {
00902     ECOUNT;
00903     return AS;
00904 }
00905     YY_BREAK
00906 case 11:
00907 YY_RULE_SETUP
00908 #line 137 "sqlscanner.l"
00909 {
00910     ECOUNT;
00911     return CREATE;
00912 }
00913     YY_BREAK
00914 case 12:
00915 YY_RULE_SETUP
00916 #line 142 "sqlscanner.l"
00917 {
00918     ECOUNT;
00919     return FROM;
00920 }
00921     YY_BREAK
00922 case 13:
00923 YY_RULE_SETUP
00924 #line 147 "sqlscanner.l"
00925 {
00926     ECOUNT;
00927     return SQL_TYPE;
00928 }
00929     YY_BREAK
00930 case 14:
00931 YY_RULE_SETUP
00932 #line 152 "sqlscanner.l"
00933 {
00934     ECOUNT;
00935     return JOIN;
00936 }
00937     YY_BREAK
00938 case 15:
00939 YY_RULE_SETUP
00940 #line 157 "sqlscanner.l"
00941 {
00942     ECOUNT;
00943     return LEFT;
00944 }
00945     YY_BREAK
00946 case 16:
00947 YY_RULE_SETUP
00948 #line 162 "sqlscanner.l"
00949 {
00950     ECOUNT;
00951     return LIKE;
00952 }
00953     YY_BREAK
00954 case 17:
00955 YY_RULE_SETUP
00956 #line 167 "sqlscanner.l"
00957 {
00958     ECOUNT;
00959     return NOT_SIMILAR_TO;
00960 }
00961     YY_BREAK
00962 case 18:
00963 YY_RULE_SETUP
00964 #line 172 "sqlscanner.l"
00965 {
00966     ECOUNT;
00967     return SIMILAR_TO;
00968 }
00969     YY_BREAK
00970 case 19:
00971 YY_RULE_SETUP
00972 #line 177 "sqlscanner.l"
00973 {
00974     ECOUNT;
00975     return SQL_IS_NOT_NULL;
00976 }
00977     YY_BREAK
00978 case 20:
00979 YY_RULE_SETUP
00980 #line 182 "sqlscanner.l"
00981 {
00982     ECOUNT;
00983     return SQL_IS_NULL;
00984 }
00985     YY_BREAK
00986 case 21:
00987 YY_RULE_SETUP
00988 #line 187 "sqlscanner.l"
00989 {
00990     ECOUNT;
00991     return NOT;
00992 }
00993     YY_BREAK
00994 case 22:
00995 YY_RULE_SETUP
00996 #line 192 "sqlscanner.l"
00997 {
00998     ECOUNT;
00999     return SQL_IS;
01000 }
01001     YY_BREAK
01002 case 23:
01003 YY_RULE_SETUP
01004 #line 197 "sqlscanner.l"
01005 {
01006     ECOUNT;
01007     return SQL_NULL;
01008 }
01009     YY_BREAK
01010 case 24:
01011 YY_RULE_SETUP
01012 #line 202 "sqlscanner.l"
01013 {
01014     ECOUNT;
01015     return SQL_ON;
01016 }
01017     YY_BREAK
01018 case 25:
01019 YY_RULE_SETUP
01020 #line 207 "sqlscanner.l"
01021 {
01022     ECOUNT;
01023     return OR;
01024 }
01025     YY_BREAK
01026 case 26:
01027 YY_RULE_SETUP
01028 #line 212 "sqlscanner.l"
01029 { /* also means OR for numbers (mysql) */
01030     ECOUNT;
01031     return CONCATENATION;
01032 }
01033     YY_BREAK
01034 case 27:
01035 YY_RULE_SETUP
01036 #line 217 "sqlscanner.l"
01037 {
01038     ECOUNT;
01039     return BITWISE_SHIFT_LEFT;
01040 }
01041     YY_BREAK
01042 case 28:
01043 YY_RULE_SETUP
01044 #line 222 "sqlscanner.l"
01045 {
01046     ECOUNT;
01047     return BITWISE_SHIFT_RIGHT;
01048 }
01049     YY_BREAK
01050 case 29:
01051 YY_RULE_SETUP
01052 #line 227 "sqlscanner.l"
01053 {
01054     ECOUNT;
01055     return XOR;
01056 }
01057     YY_BREAK
01058 case 30:
01059 YY_RULE_SETUP
01060 #line 232 "sqlscanner.l"
01061 {
01062     ECOUNT;
01063     return RIGHT;
01064 }
01065     YY_BREAK
01066 case 31:
01067 YY_RULE_SETUP
01068 #line 237 "sqlscanner.l"
01069 {
01070     ECOUNT;
01071     return SELECT;
01072 }
01073     YY_BREAK
01074 case 32:
01075 YY_RULE_SETUP
01076 #line 242 "sqlscanner.l"
01077 {
01078     ECOUNT;
01079     return TABLE;
01080 }
01081     YY_BREAK
01082 case 33:
01083 YY_RULE_SETUP
01084 #line 247 "sqlscanner.l"
01085 {
01086     ECOUNT;
01087     return WHERE;
01088 }
01089     YY_BREAK
01090 case 34:
01091 YY_RULE_SETUP
01092 #line 253 "sqlscanner.l"
01093 {
01094     ECOUNT;
01095     strncpy(yylval.stringValue, yytext, yyleng + 1);
01096     return CHARACTER_STRING_LITERAL;
01097 
01098 /* "ZZZ" sentinel for script */
01099 }
01100     YY_BREAK
01101 case 35:
01102 YY_RULE_SETUP
01103 #line 261 "sqlscanner.l"
01104 {
01105     kdDebug() << "yytext: '" << yytext << "' (" << yyleng << ")" << endl;
01106     ECOUNT;
01107     strncpy(yylval.stringValue, yytext, yyleng + 1);
01108     if (yytext[0]>='0' && yytext[0]<='9') {
01109         setError(i18n("Invalid identifier"),
01110           i18n("Identifiers should start with a letter or '_' character"));
01111         return SCAN_ERROR;
01112 //      return ERROR_DIGIT_BEFORE_IDENTIFIER;
01113     }
01114     return IDENTIFIER;
01115 }
01116     YY_BREAK
01117 case 36:
01118 YY_RULE_SETUP
01119 #line 274 "sqlscanner.l"
01120 {
01121     kdDebug() << "yytext: '" << yytext << "' (" << yyleng << ")" << endl;
01122     ECOUNT;
01123     strncpy(yylval.stringValue, yytext + 1, yyleng - 1);
01124     yylval.stringValue[yyleng - 2] = 0x00;
01125     if (yytext[1]>='0' && yytext[1]<='9') {
01126         setError(i18n("Invalid identifier"),
01127           i18n("Identifiers should start with a letter or '_' character"));
01128         return SCAN_ERROR;
01129 //      return ERROR_DIGIT_BEFORE_IDENTIFIER;
01130     }
01131     return IDENTIFIER;
01132 }
01133     YY_BREAK
01134 case 37:
01135 YY_RULE_SETUP
01136 #line 288 "sqlscanner.l"
01137 {
01138     ECOUNT;
01139 }
01140     YY_BREAK
01141 case 38:
01142 YY_RULE_SETUP
01143 #line 292 "sqlscanner.l"
01144 {
01145     kdDebug() << "char: '" << yytext[0] << "'" << endl;
01146     ECOUNT;
01147     return yytext[0];
01148 }
01149     YY_BREAK
01150 case 39:
01151 YY_RULE_SETUP
01152 #line 298 "sqlscanner.l"
01153 ECHO;
01154     YY_BREAK
01155 #line 1156 "sqlscanner.cpp"
01156             case YY_STATE_EOF(INITIAL):
01157                 yyterminate();
01158 
01159     case YY_END_OF_BUFFER:
01160         {
01161         /* Amount of text matched not including the EOB char. */
01162         int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
01163 
01164         /* Undo the effects of YY_DO_BEFORE_ACTION. */
01165         *yy_cp = yy_hold_char;
01166         YY_RESTORE_YY_MORE_OFFSET
01167 
01168         if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
01169             {
01170             /* We're scanning a new file or input source.  It's
01171              * possible that this happened because the user
01172              * just pointed yyin at a new source and called
01173              * yylex().  If so, then we have to assure
01174              * consistency between yy_current_buffer and our
01175              * globals.  Here is the right place to do so, because
01176              * this is the first action (other than possibly a
01177              * back-up) that will match for the new input source.
01178              */
01179             yy_n_chars = yy_current_buffer->yy_n_chars;
01180             yy_current_buffer->yy_input_file = yyin;
01181             yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
01182             }
01183 
01184         /* Note that here we test for yy_c_buf_p "<=" to the position
01185          * of the first EOB in the buffer, since yy_c_buf_p will
01186          * already have been incremented past the NUL character
01187          * (since all states make transitions on EOB to the
01188          * end-of-buffer state).  Contrast this with the test
01189          * in input().
01190          */
01191         if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
01192             { /* This was really a NUL. */
01193             yy_state_type yy_next_state;
01194 
01195             yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
01196 
01197             yy_current_state = yy_get_previous_state();
01198 
01199             /* Okay, we're now positioned to make the NUL
01200              * transition.  We couldn't have
01201              * yy_get_previous_state() go ahead and do it
01202              * for us because it doesn't know how to deal
01203              * with the possibility of jamming (and we don't
01204              * want to build jamming into it because then it
01205              * will run more slowly).
01206              */
01207 
01208             yy_next_state = yy_try_NUL_trans( yy_current_state );
01209 
01210             yy_bp = yytext_ptr + YY_MORE_ADJ;
01211 
01212             if ( yy_next_state )
01213                 {
01214                 /* Consume the NUL. */
01215                 yy_cp = ++yy_c_buf_p;
01216                 yy_current_state = yy_next_state;
01217                 goto yy_match;
01218                 }
01219 
01220             else
01221                 {
01222                 yy_cp = yy_c_buf_p;
01223                 goto yy_find_action;
01224                 }
01225             }
01226 
01227         else switch ( yy_get_next_buffer() )
01228             {
01229             case EOB_ACT_END_OF_FILE:
01230                 {
01231                 yy_did_buffer_switch_on_eof = 0;
01232 
01233                 if ( yywrap() )
01234                     {
01235                     /* Note: because we've taken care in
01236                      * yy_get_next_buffer() to have set up
01237                      * yytext, we can now set up
01238                      * yy_c_buf_p so that if some total
01239                      * hoser (like flex itself) wants to
01240                      * call the scanner after we return the
01241                      * YY_NULL, it'll still work - another
01242                      * YY_NULL will get returned.
01243                      */
01244                     yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
01245 
01246                     yy_act = YY_STATE_EOF(YY_START);
01247                     goto do_action;
01248                     }
01249 
01250                 else
01251                     {
01252                     if ( ! yy_did_buffer_switch_on_eof )
01253                         YY_NEW_FILE;
01254                     }
01255                 break;
01256                 }
01257 
01258             case EOB_ACT_CONTINUE_SCAN:
01259                 yy_c_buf_p =
01260                     yytext_ptr + yy_amount_of_matched_text;
01261 
01262                 yy_current_state = yy_get_previous_state();
01263 
01264                 yy_cp = yy_c_buf_p;
01265                 yy_bp = yytext_ptr + YY_MORE_ADJ;
01266                 goto yy_match;
01267 
01268             case EOB_ACT_LAST_MATCH:
01269                 yy_c_buf_p =
01270                 &yy_current_buffer->yy_ch_buf[yy_n_chars];
01271 
01272                 yy_current_state = yy_get_previous_state();
01273 
01274                 yy_cp = yy_c_buf_p;
01275                 yy_bp = yytext_ptr + YY_MORE_ADJ;
01276                 goto yy_find_action;
01277             }
01278         break;
01279         }
01280 
01281     default:
01282         YY_FATAL_ERROR(
01283             "fatal flex scanner internal error--no action found" );
01284     } /* end of action switch */
01285         } /* end of scanning one token */
01286     } /* end of yylex */
01287 
01288 
01289 /* yy_get_next_buffer - try to read in a new buffer
01290  *
01291  * Returns a code representing an action:
01292  *  EOB_ACT_LAST_MATCH -
01293  *  EOB_ACT_CONTINUE_SCAN - continue scanning from current position
01294  *  EOB_ACT_END_OF_FILE - end of file
01295  */
01296 
01297 static int yy_get_next_buffer()
01298     {
01299     register char *dest = yy_current_buffer->yy_ch_buf;
01300     register char *source = yytext_ptr;
01301     register int number_to_move, i;
01302     int ret_val;
01303 
01304     if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
01305         YY_FATAL_ERROR(
01306         "fatal flex scanner internal error--end of buffer missed" );
01307 
01308     if ( yy_current_buffer->yy_fill_buffer == 0 )
01309         { /* Don't try to fill the buffer, so this is an EOF. */
01310         if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
01311             {
01312             /* We matched a single character, the EOB, so
01313              * treat this as a final EOF.
01314              */
01315             return EOB_ACT_END_OF_FILE;
01316             }
01317 
01318         else
01319             {
01320             /* We matched some text prior to the EOB, first
01321              * process it.
01322              */
01323             return EOB_ACT_LAST_MATCH;
01324             }
01325         }
01326 
01327     /* Try to read more data. */
01328 
01329     /* First move last chars to start of buffer. */
01330     number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
01331 
01332     for ( i = 0; i < number_to_move; ++i )
01333         *(dest++) = *(source++);
01334 
01335     if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
01336         /* don't do the read, it's not guaranteed to return an EOF,
01337          * just force an EOF
01338          */
01339         yy_current_buffer->yy_n_chars = yy_n_chars = 0;
01340 
01341     else
01342         {
01343         int num_to_read =
01344             yy_current_buffer->yy_buf_size - number_to_move - 1;
01345 
01346         while ( num_to_read <= 0 )
01347             { /* Not enough room in the buffer - grow it. */
01348 #ifdef YY_USES_REJECT
01349             YY_FATAL_ERROR(
01350 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
01351 #else
01352 
01353             /* just a shorter name for the current buffer */
01354             YY_BUFFER_STATE b = yy_current_buffer;
01355 
01356             int yy_c_buf_p_offset =
01357                 (int) (yy_c_buf_p - b->yy_ch_buf);
01358 
01359             if ( b->yy_is_our_buffer )
01360                 {
01361                 int new_size = b->yy_buf_size * 2;
01362 
01363                 if ( new_size <= 0 )
01364                     b->yy_buf_size += b->yy_buf_size / 8;
01365                 else
01366                     b->yy_buf_size *= 2;
01367 
01368                 b->yy_ch_buf = (char *)
01369                     /* Include room in for 2 EOB chars. */
01370                     yy_flex_realloc( (void *) b->yy_ch_buf,
01371                              b->yy_buf_size + 2 );
01372                 }
01373             else
01374                 /* Can't grow it, we don't own it. */
01375                 b->yy_ch_buf = 0;
01376 
01377             if ( ! b->yy_ch_buf )
01378                 YY_FATAL_ERROR(
01379                 "fatal error - scanner input buffer overflow" );
01380 
01381             yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
01382 
01383             num_to_read = yy_current_buffer->yy_buf_size -
01384                         number_to_move - 1;
01385 #endif
01386             }
01387 
01388         if ( num_to_read > YY_READ_BUF_SIZE )
01389             num_to_read = YY_READ_BUF_SIZE;
01390 
01391         /* Read in more data. */
01392         YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
01393             yy_n_chars, num_to_read );
01394 
01395         yy_current_buffer->yy_n_chars = yy_n_chars;
01396         }
01397 
01398     if ( yy_n_chars == 0 )
01399         {
01400         if ( number_to_move == YY_MORE_ADJ )
01401             {
01402             ret_val = EOB_ACT_END_OF_FILE;
01403             yyrestart( yyin );
01404             }
01405 
01406         else
01407             {
01408             ret_val = EOB_ACT_LAST_MATCH;
01409             yy_current_buffer->yy_buffer_status =
01410                 YY_BUFFER_EOF_PENDING;
01411             }
01412         }
01413 
01414     else
01415         ret_val = EOB_ACT_CONTINUE_SCAN;
01416 
01417     yy_n_chars += number_to_move;
01418     yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
01419     yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
01420 
01421     yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
01422 
01423     return ret_val;
01424     }
01425 
01426 
01427 /* yy_get_previous_state - get the state just before the EOB char was reached */
01428 
01429 static yy_state_type yy_get_previous_state()
01430     {
01431     register yy_state_type yy_current_state;
01432     register char *yy_cp;
01433 
01434     yy_current_state = yy_start;
01435     yy_state_ptr = yy_state_buf;
01436     *yy_state_ptr++ = yy_current_state;
01437 
01438     for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
01439         {
01440         register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
01441         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
01442             {
01443             yy_current_state = (int) yy_def[yy_current_state];
01444             if ( yy_current_state >= 136 )
01445                 yy_c = yy_meta[(unsigned int) yy_c];
01446             }
01447         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
01448         *yy_state_ptr++ = yy_current_state;
01449         }
01450 
01451     return yy_current_state;
01452     }
01453 
01454 
01455 /* yy_try_NUL_trans - try to make a transition on the NUL character
01456  *
01457  * synopsis
01458  *  next_state = yy_try_NUL_trans( current_state );
01459  */
01460 
01461 #ifdef YY_USE_PROTOS
01462 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
01463 #else
01464 static yy_state_type yy_try_NUL_trans( yy_current_state )
01465 yy_state_type yy_current_state;
01466 #endif
01467     {
01468     register int yy_is_jam;
01469 
01470     register YY_CHAR yy_c = 1;
01471     while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
01472         {
01473         yy_current_state = (int) yy_def[yy_current_state];
01474         if ( yy_current_state >= 136 )
01475             yy_c = yy_meta[(unsigned int) yy_c];
01476         }
01477     yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
01478     yy_is_jam = (yy_current_state == 135);
01479     if ( ! yy_is_jam )
01480         *yy_state_ptr++ = yy_current_state;
01481 
01482     return yy_is_jam ? 0 : yy_current_state;
01483     }
01484 
01485 
01486 #ifndef YY_NO_UNPUT
01487 #ifdef YY_USE_PROTOS
01488 static void yyunput( int c, register char *yy_bp )
01489 #else
01490 static void yyunput( c, yy_bp )
01491 int c;
01492 register char *yy_bp;
01493 #endif
01494     {
01495     register char *yy_cp = yy_c_buf_p;
01496 
01497     /* undo effects of setting up yytext */
01498     *yy_cp = yy_hold_char;
01499 
01500     if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
01501         { /* need to shift things up to make room */
01502         /* +2 for EOB chars. */
01503         register int number_to_move = yy_n_chars + 2;
01504         register char *dest = &yy_current_buffer->yy_ch_buf[
01505                     yy_current_buffer->yy_buf_size + 2];
01506         register char *source =
01507                 &yy_current_buffer->yy_ch_buf[number_to_move];
01508 
01509         while ( source > yy_current_buffer->yy_ch_buf )
01510             *--dest = *--source;
01511 
01512         yy_cp += (int) (dest - source);
01513         yy_bp += (int) (dest - source);
01514         yy_current_buffer->yy_n_chars =
01515             yy_n_chars = yy_current_buffer->yy_buf_size;
01516 
01517         if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
01518             YY_FATAL_ERROR( "flex scanner push-back overflow" );
01519         }
01520 
01521     *--yy_cp = (char) c;
01522 
01523     if ( c == '\n' )
01524         --yylineno;
01525 
01526     yytext_ptr = yy_bp;
01527     yy_hold_char = *yy_cp;
01528     yy_c_buf_p = yy_cp;
01529     }
01530 #endif  /* ifndef YY_NO_UNPUT */
01531 
01532 
01533 #ifdef __cplusplus
01534 static int yyinput()
01535 #else
01536 static int input()
01537 #endif
01538     {
01539     int c;
01540 
01541     *yy_c_buf_p = yy_hold_char;
01542 
01543     if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
01544         {
01545         /* yy_c_buf_p now points to the character we want to return.
01546          * If this occurs *before* the EOB characters, then it's a
01547          * valid NUL; if not, then we've hit the end of the buffer.
01548          */
01549         if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
01550             /* This was really a NUL. */
01551             *yy_c_buf_p = '\0';
01552 
01553         else
01554             { /* need more input */
01555             int offset = yy_c_buf_p - yytext_ptr;
01556             ++yy_c_buf_p;
01557 
01558             switch ( yy_get_next_buffer() )
01559                 {
01560                 case EOB_ACT_LAST_MATCH:
01561                     /* This happens because yy_g_n_b()
01562                      * sees that we've accumulated a
01563                      * token and flags that we need to
01564                      * try matching the token before
01565                      * proceeding.  But for input(),
01566                      * there's no matching to consider.
01567                      * So convert the EOB_ACT_LAST_MATCH
01568                      * to EOB_ACT_END_OF_FILE.
01569                      */
01570 
01571                     /* Reset buffer status. */
01572                     yyrestart( yyin );
01573 
01574                     /* fall through */
01575 
01576                 case EOB_ACT_END_OF_FILE:
01577                     {
01578                     if ( yywrap() )
01579                         return EOF;
01580 
01581                     if ( ! yy_did_buffer_switch_on_eof )
01582                         YY_NEW_FILE;
01583 #ifdef __cplusplus
01584                     return yyinput();
01585 #else
01586                     return input();
01587 #endif
01588                     }
01589 
01590                 case EOB_ACT_CONTINUE_SCAN:
01591                     yy_c_buf_p = yytext_ptr + offset;
01592                     break;
01593                 }
01594             }
01595         }
01596 
01597     c = *(unsigned char *) yy_c_buf_p;  /* cast for 8-bit char's */
01598     *yy_c_buf_p = '\0'; /* preserve yytext */
01599     yy_hold_char = *++yy_c_buf_p;
01600 
01601     if ( c == '\n' )
01602         ++yylineno;
01603 
01604     return c;
01605     }
01606 
01607 
01608 #ifdef YY_USE_PROTOS
01609 void yyrestart( FILE *input_file )
01610 #else
01611 void yyrestart( input_file )
01612 FILE *input_file;
01613 #endif
01614     {
01615     if ( ! yy_current_buffer )
01616         yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
01617 
01618     yy_init_buffer( yy_current_buffer, input_file );
01619     yy_load_buffer_state();
01620     }
01621 
01622 
01623 #ifdef YY_USE_PROTOS
01624 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
01625 #else
01626 void yy_switch_to_buffer( new_buffer )
01627 YY_BUFFER_STATE new_buffer;
01628 #endif
01629     {
01630     if ( yy_current_buffer == new_buffer )
01631         return;
01632 
01633     if ( yy_current_buffer )
01634         {
01635         /* Flush out information for old buffer. */
01636         *yy_c_buf_p = yy_hold_char;
01637         yy_current_buffer->yy_buf_pos = yy_c_buf_p;
01638         yy_current_buffer->yy_n_chars = yy_n_chars;
01639         }
01640 
01641     yy_current_buffer = new_buffer;
01642     yy_load_buffer_state();
01643 
01644     /* We don't actually know whether we did this switch during
01645      * EOF (yywrap()) processing, but the only time this flag
01646      * is looked at is after yywrap() is called, so it's safe
01647      * to go ahead and always set it.
01648      */
01649     yy_did_buffer_switch_on_eof = 1;
01650     }
01651 
01652 
01653 #ifdef YY_USE_PROTOS
01654 void yy_load_buffer_state( void )
01655 #else
01656 void yy_load_buffer_state()
01657 #endif
01658     {
01659     yy_n_chars = yy_current_buffer->yy_n_chars;
01660     yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
01661     yyin = yy_current_buffer->yy_input_file;
01662     yy_hold_char = *yy_c_buf_p;
01663     }
01664 
01665 
01666 #ifdef YY_USE_PROTOS
01667 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
01668 #else
01669 YY_BUFFER_STATE yy_create_buffer( file, size )
01670 FILE *file;
01671 int size;
01672 #endif
01673     {
01674     YY_BUFFER_STATE b;
01675 
01676     b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
01677     if ( ! b )
01678         YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
01679 
01680     b->yy_buf_size = size;
01681 
01682     /* yy_ch_buf has to be 2 characters longer than the size given because
01683      * we need to put in 2 end-of-buffer characters.
01684      */
01685     b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
01686     if ( ! b->yy_ch_buf )
01687         YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
01688 
01689     b->yy_is_our_buffer = 1;
01690 
01691     yy_init_buffer( b, file );
01692 
01693     return b;
01694     }
01695 
01696 
01697 #ifdef YY_USE_PROTOS
01698 void yy_delete_buffer( YY_BUFFER_STATE b )
01699 #else
01700 void yy_delete_buffer( b )
01701 YY_BUFFER_STATE b;
01702 #endif
01703     {
01704     if ( ! b )
01705         return;
01706 
01707     if ( b == yy_current_buffer )
01708         yy_current_buffer = (YY_BUFFER_STATE) 0;
01709 
01710     if ( b->yy_is_our_buffer )
01711         yy_flex_free( (void *) b->yy_ch_buf );
01712 
01713     yy_flex_free( (void *) b );
01714     }
01715 
01716 
01717 #ifndef YY_ALWAYS_INTERACTIVE
01718 #ifndef YY_NEVER_INTERACTIVE
01719 extern int isatty YY_PROTO(( int ));
01720 #endif
01721 #endif
01722 
01723 #ifdef YY_USE_PROTOS
01724 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
01725 #else
01726 void yy_init_buffer( b, file )
01727 YY_BUFFER_STATE b;
01728 FILE *file;
01729 #endif
01730 
01731 
01732     {
01733     yy_flush_buffer( b );
01734 
01735     b->yy_input_file = file;
01736     b->yy_fill_buffer = 1;
01737 
01738 #if YY_ALWAYS_INTERACTIVE
01739     b->yy_is_interactive = 1;
01740 #else
01741 #if YY_NEVER_INTERACTIVE
01742     b->yy_is_interactive = 0;
01743 #else
01744     b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
01745 #endif
01746 #endif
01747     }
01748 
01749 
01750 #ifdef YY_USE_PROTOS
01751 void yy_flush_buffer( YY_BUFFER_STATE b )
01752 #else
01753 void yy_flush_buffer( b )
01754 YY_BUFFER_STATE b;
01755 #endif
01756 
01757     {
01758     if ( ! b )
01759         return;
01760 
01761     b->yy_n_chars = 0;
01762 
01763     /* We always need two end-of-buffer characters.  The first causes
01764      * a transition to the end-of-buffer state.  The second causes
01765      * a jam in that state.
01766      */
01767     b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
01768     b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
01769 
01770     b->yy_buf_pos = &b->yy_ch_buf[0];
01771 
01772     b->yy_at_bol = 1;
01773     b->yy_buffer_status = YY_BUFFER_NEW;
01774 
01775     if ( b == yy_current_buffer )
01776         yy_load_buffer_state();
01777     }
01778 
01779 
01780 #ifndef YY_NO_SCAN_BUFFER
01781 #ifdef YY_USE_PROTOS
01782 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
01783 #else
01784 YY_BUFFER_STATE yy_scan_buffer( base, size )
01785 char *base;
01786 yy_size_t size;
01787 #endif
01788     {
01789     YY_BUFFER_STATE b;
01790 
01791     if ( size < 2 ||
01792          base[size-2] != YY_END_OF_BUFFER_CHAR ||
01793          base[size-1] != YY_END_OF_BUFFER_CHAR )
01794         /* They forgot to leave room for the EOB's. */
01795         return 0;
01796 
01797     b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
01798     if ( ! b )
01799         YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
01800 
01801     b->yy_buf_size = size - 2;  /* "- 2" to take care of EOB's */
01802     b->yy_buf_pos = b->yy_ch_buf = base;
01803     b->yy_is_our_buffer = 0;
01804     b->yy_input_file = 0;
01805     b->yy_n_chars = b->yy_buf_size;
01806     b->yy_is_interactive = 0;
01807     b->yy_at_bol = 1;
01808     b->yy_fill_buffer = 0;
01809     b->yy_buffer_status = YY_BUFFER_NEW;
01810 
01811     yy_switch_to_buffer( b );
01812 
01813     return b;
01814     }
01815 #endif
01816 
01817 
01818 #ifndef YY_NO_SCAN_STRING
01819 #ifdef YY_USE_PROTOS
01820 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
01821 #else
01822 YY_BUFFER_STATE yy_scan_string( yy_str )
01823 yyconst char *yy_str;
01824 #endif
01825     {
01826     int len;
01827     for ( len = 0; yy_str[len]; ++len )
01828         ;
01829 
01830     return yy_scan_bytes( yy_str, len );
01831     }
01832 #endif
01833 
01834 
01835 #ifndef YY_NO_SCAN_BYTES
01836 #ifdef YY_USE_PROTOS
01837 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
01838 #else
01839 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
01840 yyconst char *bytes;
01841 int len;
01842 #endif
01843     {
01844     YY_BUFFER_STATE b;
01845     char *buf;
01846     yy_size_t n;
01847     int i;
01848 
01849     /* Get memory for full buffer, including space for trailing EOB's. */
01850     n = len + 2;
01851     buf = (char *) yy_flex_alloc( n );
01852     if ( ! buf )
01853         YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
01854 
01855     for ( i = 0; i < len; ++i )
01856         buf[i] = bytes[i];
01857 
01858     buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
01859 
01860     b = yy_scan_buffer( buf, n );
01861     if ( ! b )
01862         YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
01863 
01864     /* It's okay to grow etc. this buffer, and we should throw it
01865      * away when we're done.
01866      */
01867     b->yy_is_our_buffer = 1;
01868 
01869     return b;
01870     }
01871 #endif
01872 
01873 
01874 #ifndef YY_NO_PUSH_STATE
01875 #ifdef YY_USE_PROTOS
01876 static void yy_push_state( int new_state )
01877 #else
01878 static void yy_push_state( new_state )
01879 int new_state;
01880 #endif
01881     {
01882     if ( yy_start_stack_ptr >= yy_start_stack_depth )
01883         {
01884         yy_size_t new_size;
01885 
01886         yy_start_stack_depth += YY_START_STACK_INCR;
01887         new_size = yy_start_stack_depth * sizeof( int );
01888 
01889         if ( ! yy_start_stack )
01890             yy_start_stack = (int *) yy_flex_alloc( new_size );
01891 
01892         else
01893             yy_start_stack = (int *) yy_flex_realloc(
01894                     (void *) yy_start_stack, new_size );
01895 
01896         if ( ! yy_start_stack )
01897             YY_FATAL_ERROR(
01898             "out of memory expanding start-condition stack" );
01899         }
01900 
01901     yy_start_stack[yy_start_stack_ptr++] = YY_START;
01902 
01903     BEGIN(new_state);
01904     }
01905 #endif
01906 
01907 
01908 #ifndef YY_NO_POP_STATE
01909 static void yy_pop_state()
01910     {
01911     if ( --yy_start_stack_ptr < 0 )
01912         YY_FATAL_ERROR( "start-condition stack underflow" );
01913 
01914     BEGIN(yy_start_stack[yy_start_stack_ptr]);
01915     }
01916 #endif
01917 
01918 
01919 #ifndef YY_NO_TOP_STATE
01920 static int yy_top_state()
01921     {
01922     return yy_start_stack[yy_start_stack_ptr - 1];
01923     }
01924 #endif
01925 
01926 #ifndef YY_EXIT_FAILURE
01927 #define YY_EXIT_FAILURE 2
01928 #endif
01929 
01930 #ifdef YY_USE_PROTOS
01931 static void yy_fatal_error( yyconst char msg[] )
01932 #else
01933 static void yy_fatal_error( msg )
01934 char msg[];
01935 #endif
01936     {
01937     (void) fprintf( stderr, "%s\n", msg );
01938     exit( YY_EXIT_FAILURE );
01939     }
01940 
01941 
01942 
01943 /* Redefine yyless() so it works in section 3 code. */
01944 
01945 #undef yyless
01946 #define yyless(n) \
01947     do \
01948         { \
01949         /* Undo effects of setting up yytext. */ \
01950         yytext[yyleng] = yy_hold_char; \
01951         yy_c_buf_p = yytext + n; \
01952         yy_hold_char = *yy_c_buf_p; \
01953         *yy_c_buf_p = '\0'; \
01954         yyleng = n; \
01955         } \
01956     while ( 0 )
01957 
01958 
01959 /* Internal utility routines. */
01960 
01961 #ifndef yytext_ptr
01962 #ifdef YY_USE_PROTOS
01963 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
01964 #else
01965 static void yy_flex_strncpy( s1, s2, n )
01966 char *s1;
01967 yyconst char *s2;
01968 int n;
01969 #endif
01970     {
01971     register int i;
01972     for ( i = 0; i < n; ++i )
01973         s1[i] = s2[i];
01974     }
01975 #endif
01976 
01977 #ifdef YY_NEED_STRLEN
01978 #ifdef YY_USE_PROTOS
01979 static int yy_flex_strlen( yyconst char *s )
01980 #else
01981 static int yy_flex_strlen( s )
01982 yyconst char *s;
01983 #endif
01984     {
01985     register int n;
01986     for ( n = 0; s[n]; ++n )
01987         ;
01988 
01989     return n;
01990     }
01991 #endif
01992 
01993 
01994 #ifdef YY_USE_PROTOS
01995 static void *yy_flex_alloc( yy_size_t size )
01996 #else
01997 static void *yy_flex_alloc( size )
01998 yy_size_t size;
01999 #endif
02000     {
02001     return (void *) malloc( size );
02002     }
02003 
02004 #ifdef YY_USE_PROTOS
02005 static void *yy_flex_realloc( void *ptr, yy_size_t size )
02006 #else
02007 static void *yy_flex_realloc( ptr, size )
02008 void *ptr;
02009 yy_size_t size;
02010 #endif
02011     {
02012     /* The cast to (char *) in the following accommodates both
02013      * implementations that use char* generic pointers, and those
02014      * that use void* generic pointers.  It works with the latter
02015      * because both ANSI C and C++ allow castless assignment from
02016      * any pointer type to void*, and deal with argument conversions
02017      * as though doing an assignment.
02018      */
02019     return (void *) realloc( (char *) ptr, size );
02020     }
02021 
02022 #ifdef YY_USE_PROTOS
02023 static void yy_flex_free( void *ptr )
02024 #else
02025 static void yy_flex_free( ptr )
02026 void *ptr;
02027 #endif
02028     {
02029     free( ptr );
02030     }
02031 
02032 #if YY_MAIN
02033 int main()
02034     {
02035     yylex();
02036     return 0;
02037     }
02038 #endif
02039 #line 298 "sqlscanner.l"
02040 
02041 
02042 void tokenize(const char *data)
02043 {
02044     yy_switch_to_buffer(yy_scan_string(data));
02045     ctoken = "";
02046     current = 0;
02047 }
02048 
KDE Home | KDE Accessibility Home | Description of Access Keys