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