mySQL 5.0.11 sources for tomato
[tomato.git] / release / src / router / mysql / storage / innobase / pars / lexyy.c
blobb65de138573de0be6db873855372cd6c620f2e8a
1 #include "univ.i"
2 #line 2 "_flex_tmp.c"
4 #line 4 "_flex_tmp.c"
6 #define YY_INT_ALIGNED short int
8 /* A lexical scanner generated by flex */
10 #define FLEX_SCANNER
11 #define YY_FLEX_MAJOR_VERSION 2
12 #define YY_FLEX_MINOR_VERSION 5
13 #define YY_FLEX_SUBMINOR_VERSION 31
14 #if YY_FLEX_SUBMINOR_VERSION > 0
15 #define FLEX_BETA
16 #endif
18 /* First, we deal with platform-specific or compiler-specific issues. */
20 /* begin standard C headers. */
21 #include <stdio.h>
22 #include <string.h>
23 #include <errno.h>
24 #include <stdlib.h>
26 /* end standard C headers. */
28 /* flex integer type definitions */
30 #ifndef FLEXINT_H
31 #define FLEXINT_H
33 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
35 #if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
36 #include <inttypes.h>
37 typedef int8_t flex_int8_t;
38 typedef uint8_t flex_uint8_t;
39 typedef int16_t flex_int16_t;
40 typedef uint16_t flex_uint16_t;
41 typedef int32_t flex_int32_t;
42 typedef uint32_t flex_uint32_t;
43 #else
44 typedef signed char flex_int8_t;
45 typedef short int flex_int16_t;
46 typedef int flex_int32_t;
47 typedef unsigned char flex_uint8_t;
48 typedef unsigned short int flex_uint16_t;
49 typedef unsigned int flex_uint32_t;
50 #endif /* ! C99 */
52 /* Limits of integral types. */
53 #ifndef INT8_MIN
54 #define INT8_MIN (-128)
55 #endif
56 #ifndef INT16_MIN
57 #define INT16_MIN (-32767-1)
58 #endif
59 #ifndef INT32_MIN
60 #define INT32_MIN (-2147483647-1)
61 #endif
62 #ifndef INT8_MAX
63 #define INT8_MAX (127)
64 #endif
65 #ifndef INT16_MAX
66 #define INT16_MAX (32767)
67 #endif
68 #ifndef INT32_MAX
69 #define INT32_MAX (2147483647)
70 #endif
71 #ifndef UINT8_MAX
72 #define UINT8_MAX (255U)
73 #endif
74 #ifndef UINT16_MAX
75 #define UINT16_MAX (65535U)
76 #endif
77 #ifndef UINT32_MAX
78 #define UINT32_MAX (4294967295U)
79 #endif
81 #endif /* ! FLEXINT_H */
83 #ifdef __cplusplus
85 /* The "const" storage-class-modifier is valid. */
86 #define YY_USE_CONST
88 #else /* ! __cplusplus */
90 #if __STDC__
92 #define YY_USE_CONST
94 #endif /* __STDC__ */
95 #endif /* ! __cplusplus */
97 #ifdef YY_USE_CONST
98 #define yyconst const
99 #else
100 #define yyconst
101 #endif
103 /* Returned upon end-of-file. */
104 #define YY_NULL 0
106 /* Promotes a possibly negative, possibly signed char to an unsigned
107 * integer for use as an array index. If the signed char is negative,
108 * we want to instead treat it as an 8-bit unsigned char, hence the
109 * double cast.
111 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
113 /* Enter a start condition. This macro really ought to take a parameter,
114 * but we do it the disgusting crufty way forced on us by the ()-less
115 * definition of BEGIN.
117 #define BEGIN (yy_start) = 1 + 2 *
119 /* Translate the current start state into a value that can be later handed
120 * to BEGIN to return to the state. The YYSTATE alias is for lex
121 * compatibility.
123 #define YY_START (((yy_start) - 1) / 2)
124 #define YYSTATE YY_START
126 /* Action number for EOF rule of a given start state. */
127 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
129 /* Special action meaning "start processing a new file". */
130 #define YY_NEW_FILE yyrestart(yyin )
132 #define YY_END_OF_BUFFER_CHAR 0
134 /* Size of default input buffer. */
135 #ifndef YY_BUF_SIZE
136 #define YY_BUF_SIZE 16384
137 #endif
139 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
140 #define YY_TYPEDEF_YY_BUFFER_STATE
141 typedef struct yy_buffer_state *YY_BUFFER_STATE;
142 #endif
144 extern int yyleng;
146 extern FILE *yyin, *yyout;
148 #define EOB_ACT_CONTINUE_SCAN 0
149 #define EOB_ACT_END_OF_FILE 1
150 #define EOB_ACT_LAST_MATCH 2
152 #define YY_LESS_LINENO(n)
154 /* Return all but the first "n" matched characters back to the input stream. */
155 #define yyless(n) \
156 do \
158 /* Undo effects of setting up yytext. */ \
159 int yyless_macro_arg = (n); \
160 YY_LESS_LINENO(yyless_macro_arg);\
161 *yy_cp = (yy_hold_char); \
162 YY_RESTORE_YY_MORE_OFFSET \
163 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
164 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
166 while ( 0 )
168 #define unput(c) yyunput( c, (yytext_ptr) )
170 /* The following is because we cannot portably get our hands on size_t
171 * (without autoconf's help, which isn't available because we want
172 * flex-generated scanners to compile on their own).
175 #ifndef YY_TYPEDEF_YY_SIZE_T
176 #define YY_TYPEDEF_YY_SIZE_T
177 typedef unsigned int yy_size_t;
178 #endif
180 #ifndef YY_STRUCT_YY_BUFFER_STATE
181 #define YY_STRUCT_YY_BUFFER_STATE
182 struct yy_buffer_state
184 FILE *yy_input_file;
186 char *yy_ch_buf; /* input buffer */
187 char *yy_buf_pos; /* current position in input buffer */
189 /* Size of input buffer in bytes, not including room for EOB
190 * characters.
192 yy_size_t yy_buf_size;
194 /* Number of characters read into yy_ch_buf, not including EOB
195 * characters.
197 int yy_n_chars;
199 /* Whether we "own" the buffer - i.e., we know we created it,
200 * and can realloc() it to grow it, and should free() it to
201 * delete it.
203 int yy_is_our_buffer;
205 /* Whether this is an "interactive" input source; if so, and
206 * if we're using stdio for input, then we want to use getc()
207 * instead of fread(), to make sure we stop fetching input after
208 * each newline.
210 int yy_is_interactive;
212 /* Whether we're considered to be at the beginning of a line.
213 * If so, '^' rules will be active on the next match, otherwise
214 * not.
216 int yy_at_bol;
218 int yy_bs_lineno; /**< The line count. */
219 int yy_bs_column; /**< The column count. */
221 /* Whether to try to fill the input buffer when we reach the
222 * end of it.
224 int yy_fill_buffer;
226 int yy_buffer_status;
228 #define YY_BUFFER_NEW 0
229 #define YY_BUFFER_NORMAL 1
230 /* When an EOF's been seen but there's still some text to process
231 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
232 * shouldn't try reading from the input source any more. We might
233 * still have a bunch of tokens to match, though, because of
234 * possible backing-up.
236 * When we actually see the EOF, we change the status to "new"
237 * (via yyrestart()), so that the user can continue scanning by
238 * just pointing yyin at a new input file.
240 #define YY_BUFFER_EOF_PENDING 2
243 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
245 /* Stack of input buffers. */
246 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
247 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
248 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
250 /* We provide macros for accessing buffer states in case in the
251 * future we want to put the buffer states in a more general
252 * "scanner state".
254 * Returns the top of the stack, or NULL.
256 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
257 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
258 : NULL)
260 /* Same as previous macro, but useful when we know that the buffer stack is not
261 * NULL or when we need an lvalue. For internal use only.
263 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
265 /* yy_hold_char holds the character lost when yytext is formed. */
266 static char yy_hold_char;
267 static int yy_n_chars; /* number of characters read into yy_ch_buf */
268 int yyleng;
270 /* Points to current character in buffer. */
271 static char *yy_c_buf_p = (char *) 0;
272 static int yy_init = 1; /* whether we need to initialize */
273 static int yy_start = 0; /* start state number */
275 /* Flag which is used to allow yywrap()'s to do buffer switches
276 * instead of setting up a fresh yyin. A bit of a hack ...
278 static int yy_did_buffer_switch_on_eof;
280 void yyrestart (FILE *input_file );
281 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
282 YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
283 void yy_delete_buffer (YY_BUFFER_STATE b );
284 void yy_flush_buffer (YY_BUFFER_STATE b );
285 void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
286 void yypop_buffer_state (void );
288 static void yyensure_buffer_stack (void );
289 static void yy_load_buffer_state (void );
290 static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
292 #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
294 YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
295 YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
296 YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len );
298 void *yyalloc (yy_size_t );
299 void *yyrealloc (void *,yy_size_t );
300 void yyfree (void * );
302 #define yy_new_buffer yy_create_buffer
304 #define yy_set_interactive(is_interactive) \
306 if ( ! YY_CURRENT_BUFFER ){ \
307 yyensure_buffer_stack (); \
308 YY_CURRENT_BUFFER_LVALUE = \
309 yy_create_buffer(yyin,YY_BUF_SIZE ); \
311 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
314 #define yy_set_bol(at_bol) \
316 if ( ! YY_CURRENT_BUFFER ){\
317 yyensure_buffer_stack (); \
318 YY_CURRENT_BUFFER_LVALUE = \
319 yy_create_buffer(yyin,YY_BUF_SIZE ); \
321 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
324 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
326 /* Begin user sect3 */
328 #define yywrap(n) 1
329 #define YY_SKIP_YYWRAP
331 typedef unsigned char YY_CHAR;
333 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
335 typedef int yy_state_type;
337 extern int yylineno;
339 int yylineno = 1;
341 extern char *yytext;
342 #define yytext_ptr yytext
344 static yy_state_type yy_get_previous_state (void );
345 static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
346 static int yy_get_next_buffer (void );
347 static void yy_fatal_error (yyconst char msg[] );
349 /* Done after the current pattern has been matched and before the
350 * corresponding action - sets up yytext.
352 #define YY_DO_BEFORE_ACTION \
353 (yytext_ptr) = yy_bp; \
354 yyleng = (size_t) (yy_cp - yy_bp); \
355 (yy_hold_char) = *yy_cp; \
356 *yy_cp = '\0'; \
357 (yy_c_buf_p) = yy_cp;
359 #define YY_NUM_RULES 119
360 #define YY_END_OF_BUFFER 120
361 /* This struct is not used in this scanner,
362 but its presence is necessary. */
363 struct yy_trans_info
365 flex_int32_t yy_verify;
366 flex_int32_t yy_nxt;
368 static yyconst flex_int16_t yy_accept[399] =
369 { 0,
370 0, 0, 114, 114, 0, 0, 0, 0, 120, 118,
371 117, 117, 8, 118, 109, 5, 98, 104, 107, 105,
372 102, 106, 118, 108, 1, 118, 103, 101, 99, 100,
373 112, 92, 92, 92, 92, 92, 92, 92, 92, 92,
374 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
375 110, 111, 114, 115, 6, 7, 9, 10, 117, 4,
376 93, 113, 2, 1, 3, 94, 95, 97, 96, 92,
377 92, 92, 92, 92, 92, 44, 92, 92, 92, 92,
378 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
379 92, 92, 28, 17, 25, 92, 92, 92, 92, 92,
381 54, 61, 92, 14, 92, 92, 92, 92, 92, 92,
382 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
383 92, 92, 114, 115, 115, 116, 6, 7, 9, 10,
384 2, 13, 45, 92, 92, 92, 92, 92, 92, 92,
385 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
386 92, 27, 92, 92, 92, 41, 92, 92, 92, 92,
387 21, 92, 92, 92, 92, 15, 92, 92, 92, 18,
388 92, 92, 92, 92, 92, 80, 92, 92, 92, 51,
389 92, 12, 92, 36, 92, 92, 92, 92, 92, 92,
390 92, 92, 92, 92, 92, 92, 92, 92, 20, 24,
392 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
393 46, 92, 92, 30, 92, 87, 92, 92, 39, 92,
394 92, 92, 92, 92, 48, 92, 89, 32, 91, 92,
395 11, 64, 92, 92, 92, 42, 92, 92, 92, 92,
396 92, 92, 92, 92, 92, 92, 29, 92, 92, 92,
397 92, 92, 92, 92, 92, 92, 85, 92, 26, 92,
398 66, 92, 92, 92, 37, 92, 92, 92, 92, 92,
399 92, 92, 31, 65, 23, 92, 57, 92, 75, 92,
400 92, 92, 43, 92, 92, 92, 92, 92, 92, 92,
401 92, 90, 92, 92, 56, 92, 92, 92, 92, 92,
403 92, 92, 40, 33, 79, 19, 92, 83, 74, 55,
404 92, 63, 92, 52, 92, 92, 92, 47, 92, 76,
405 92, 78, 92, 92, 34, 92, 92, 92, 35, 72,
406 92, 92, 92, 92, 58, 92, 50, 49, 92, 92,
407 53, 62, 92, 92, 92, 22, 92, 92, 73, 81,
408 92, 92, 77, 92, 68, 92, 92, 92, 92, 38,
409 92, 88, 67, 92, 84, 92, 92, 92, 86, 92,
410 59, 92, 16, 92, 70, 69, 92, 92, 82, 92,
411 92, 92, 92, 92, 92, 92, 92, 92, 92, 71,
412 92, 92, 92, 92, 92, 92, 60, 0
416 static yyconst flex_int32_t yy_ec[256] =
417 { 0,
418 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
419 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
420 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
421 1, 2, 1, 4, 1, 5, 6, 1, 7, 8,
422 9, 10, 11, 12, 13, 14, 15, 16, 16, 16,
423 16, 16, 16, 16, 16, 16, 16, 17, 18, 19,
424 20, 21, 22, 1, 23, 24, 25, 26, 27, 28,
425 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
426 39, 40, 41, 42, 43, 44, 45, 46, 47, 32,
427 1, 1, 1, 1, 48, 1, 32, 32, 32, 32,
429 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
430 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
431 32, 32, 49, 1, 50, 1, 1, 1, 1, 1,
432 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
433 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
434 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
435 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
436 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
437 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
438 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
440 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
441 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
442 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
443 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
444 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
445 1, 1, 1, 1, 1
448 static yyconst flex_int32_t yy_meta[51] =
449 { 0,
450 1, 1, 1, 2, 1, 1, 3, 1, 1, 4,
451 1, 1, 1, 1, 1, 5, 1, 1, 1, 6,
452 1, 1, 5, 5, 5, 5, 5, 5, 5, 5,
453 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
454 5, 5, 5, 5, 5, 5, 5, 5, 1, 1
457 static yyconst flex_int16_t yy_base[409] =
458 { 0,
459 0, 0, 437, 436, 438, 437, 439, 438, 441, 448,
460 49, 51, 448, 0, 448, 448, 448, 448, 448, 448,
461 448, 448, 426, 429, 41, 418, 448, 38, 448, 417,
462 448, 20, 33, 32, 46, 40, 44, 0, 54, 52,
463 399, 48, 60, 395, 65, 67, 81, 27, 411, 75,
464 448, 448, 0, 98, 0, 426, 0, 428, 113, 0,
465 448, 448, 415, 54, 410, 448, 448, 448, 448, 0,
466 403, 68, 399, 391, 389, 0, 402, 80, 84, 397,
467 383, 96, 381, 394, 379, 393, 387, 375, 379, 375,
468 377, 377, 0, 98, 0, 376, 97, 385, 368, 375,
470 0, 0, 381, 381, 364, 94, 103, 379, 98, 65,
471 381, 369, 109, 361, 377, 373, 351, 97, 372, 363,
472 115, 356, 0, 137, 138, 448, 0, 388, 0, 390,
473 377, 0, 0, 365, 360, 367, 365, 348, 346, 345,
474 350, 359, 347, 359, 95, 347, 353, 354, 336, 336,
475 123, 0, 334, 350, 351, 0, 338, 347, 344, 122,
476 124, 341, 336, 330, 340, 338, 331, 328, 336, 0,
477 326, 336, 334, 325, 315, 309, 322, 307, 327, 0,
478 313, 0, 311, 0, 325, 316, 313, 131, 309, 316,
479 323, 302, 304, 309, 309, 301, 304, 299, 0, 0,
481 311, 295, 305, 312, 292, 291, 305, 294, 307, 287,
482 0, 297, 279, 0, 298, 0, 295, 282, 0, 281,
483 276, 281, 280, 290, 0, 276, 0, 0, 0, 280,
484 0, 0, 276, 273, 287, 0, 272, 272, 270, 286,
485 271, 283, 280, 264, 282, 277, 0, 272, 272, 258,
486 257, 270, 256, 270, 269, 268, 0, 252, 0, 246,
487 0, 265, 249, 248, 0, 262, 252, 247, 246, 258,
488 248, 247, 0, 0, 0, 251, 0, 239, 0, 253,
489 249, 235, 0, 249, 250, 233, 238, 231, 249, 231,
490 228, 0, 229, 226, 0, 231, 243, 230, 237, 227,
492 235, 220, 0, 0, 0, 212, 219, 0, 0, 0,
493 216, 0, 230, 0, 231, 218, 217, 0, 213, 0,
494 216, 0, 208, 210, 0, 209, 223, 216, 0, 0,
495 219, 222, 204, 219, 0, 215, 0, 0, 199, 213,
496 0, 0, 197, 196, 201, 0, 210, 195, 0, 0,
497 201, 197, 0, 192, 0, 204, 204, 192, 202, 0,
498 179, 0, 0, 199, 0, 183, 177, 183, 0, 174,
499 0, 193, 0, 192, 0, 0, 183, 187, 0, 174,
500 174, 180, 166, 189, 181, 180, 166, 151, 118, 0,
501 130, 136, 127, 123, 119, 111, 0, 448, 167, 173,
503 179, 152, 181, 124, 187, 193, 199, 205
506 static yyconst flex_int16_t yy_def[409] =
507 { 0,
508 398, 1, 399, 399, 400, 400, 401, 401, 398, 398,
509 398, 398, 398, 402, 398, 398, 398, 398, 398, 398,
510 398, 398, 398, 398, 398, 403, 398, 398, 398, 398,
511 398, 404, 404, 404, 404, 404, 404, 404, 404, 404,
512 404, 404, 404, 404, 404, 404, 404, 404, 404, 404,
513 398, 398, 405, 406, 407, 398, 408, 398, 398, 402,
514 398, 398, 398, 398, 403, 398, 398, 398, 398, 404,
515 404, 404, 404, 404, 404, 404, 404, 404, 404, 404,
516 404, 404, 404, 404, 404, 404, 404, 404, 404, 404,
517 404, 404, 404, 404, 404, 404, 404, 404, 404, 404,
519 404, 404, 404, 404, 404, 404, 404, 404, 404, 404,
520 404, 404, 404, 404, 404, 404, 404, 404, 404, 404,
521 404, 404, 405, 406, 406, 398, 407, 398, 408, 398,
522 398, 404, 404, 404, 404, 404, 404, 404, 404, 404,
523 404, 404, 404, 404, 404, 404, 404, 404, 404, 404,
524 404, 404, 404, 404, 404, 404, 404, 404, 404, 404,
525 404, 404, 404, 404, 404, 404, 404, 404, 404, 404,
526 404, 404, 404, 404, 404, 404, 404, 404, 404, 404,
527 404, 404, 404, 404, 404, 404, 404, 404, 404, 404,
528 404, 404, 404, 404, 404, 404, 404, 404, 404, 404,
530 404, 404, 404, 404, 404, 404, 404, 404, 404, 404,
531 404, 404, 404, 404, 404, 404, 404, 404, 404, 404,
532 404, 404, 404, 404, 404, 404, 404, 404, 404, 404,
533 404, 404, 404, 404, 404, 404, 404, 404, 404, 404,
534 404, 404, 404, 404, 404, 404, 404, 404, 404, 404,
535 404, 404, 404, 404, 404, 404, 404, 404, 404, 404,
536 404, 404, 404, 404, 404, 404, 404, 404, 404, 404,
537 404, 404, 404, 404, 404, 404, 404, 404, 404, 404,
538 404, 404, 404, 404, 404, 404, 404, 404, 404, 404,
539 404, 404, 404, 404, 404, 404, 404, 404, 404, 404,
541 404, 404, 404, 404, 404, 404, 404, 404, 404, 404,
542 404, 404, 404, 404, 404, 404, 404, 404, 404, 404,
543 404, 404, 404, 404, 404, 404, 404, 404, 404, 404,
544 404, 404, 404, 404, 404, 404, 404, 404, 404, 404,
545 404, 404, 404, 404, 404, 404, 404, 404, 404, 404,
546 404, 404, 404, 404, 404, 404, 404, 404, 404, 404,
547 404, 404, 404, 404, 404, 404, 404, 404, 404, 404,
548 404, 404, 404, 404, 404, 404, 404, 404, 404, 404,
549 404, 404, 404, 404, 404, 404, 404, 404, 404, 404,
550 404, 404, 404, 404, 404, 404, 404, 0, 398, 398,
552 398, 398, 398, 398, 398, 398, 398, 398
555 static yyconst flex_int16_t yy_nxt[499] =
556 { 0,
557 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
558 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
559 30, 31, 32, 33, 34, 35, 36, 37, 38, 38,
560 39, 38, 38, 40, 41, 42, 43, 44, 38, 45,
561 46, 47, 48, 49, 50, 38, 38, 38, 51, 52,
562 59, 59, 59, 59, 63, 71, 64, 67, 68, 73,
563 72, 77, 118, 74, 119, 78, 75, 63, 79, 64,
564 88, 80, 82, 85, 81, 86, 83, 89, 96, 76,
565 90, 93, 84, 91, 99, 87, 92, 101, 97, 94,
566 100, 107, 133, 110, 95, 102, 111, 103, 179, 104,
568 108, 109, 105, 115, 121, 112, 180, 125, 134, 113,
569 116, 122, 126, 114, 59, 59, 139, 117, 141, 142,
570 146, 163, 140, 159, 171, 173, 143, 189, 70, 147,
571 172, 177, 183, 164, 207, 208, 148, 190, 160, 161,
572 174, 193, 178, 184, 175, 194, 398, 125, 222, 214,
573 224, 398, 126, 215, 248, 249, 60, 397, 396, 395,
574 225, 394, 393, 223, 392, 391, 250, 53, 53, 53,
575 53, 53, 53, 55, 55, 55, 55, 55, 55, 57,
576 57, 57, 57, 57, 57, 65, 65, 123, 123, 123,
577 390, 123, 123, 124, 124, 124, 124, 124, 124, 127,
579 127, 389, 127, 127, 127, 129, 388, 129, 129, 129,
580 129, 387, 386, 385, 384, 383, 382, 381, 380, 379,
581 378, 377, 376, 375, 374, 373, 372, 371, 370, 369,
582 368, 367, 366, 365, 364, 363, 362, 361, 360, 359,
583 358, 357, 356, 355, 354, 353, 352, 351, 350, 349,
584 348, 347, 346, 345, 344, 343, 342, 341, 340, 339,
585 338, 337, 336, 335, 334, 333, 332, 331, 330, 329,
586 328, 327, 326, 325, 324, 323, 322, 321, 320, 319,
587 318, 317, 316, 315, 314, 313, 312, 311, 310, 309,
588 308, 307, 306, 305, 304, 303, 302, 301, 300, 299,
590 298, 297, 296, 295, 294, 293, 292, 291, 290, 289,
591 288, 287, 286, 285, 284, 283, 282, 281, 280, 279,
592 278, 277, 276, 275, 274, 273, 272, 271, 270, 269,
593 268, 267, 266, 265, 264, 263, 262, 261, 260, 259,
594 258, 257, 256, 255, 254, 253, 252, 251, 247, 246,
595 245, 244, 243, 242, 241, 240, 239, 238, 237, 236,
596 235, 234, 233, 232, 231, 230, 229, 228, 227, 226,
597 221, 220, 219, 218, 217, 216, 213, 212, 211, 210,
598 209, 206, 205, 204, 203, 202, 201, 200, 199, 198,
599 197, 196, 131, 130, 128, 195, 192, 191, 188, 187,
601 186, 185, 182, 181, 176, 170, 169, 168, 167, 166,
602 165, 162, 158, 157, 156, 155, 154, 153, 152, 151,
603 150, 149, 145, 144, 138, 137, 136, 135, 132, 398,
604 131, 130, 128, 120, 106, 98, 69, 66, 62, 61,
605 398, 58, 58, 56, 56, 54, 54, 9, 398, 398,
606 398, 398, 398, 398, 398, 398, 398, 398, 398, 398,
607 398, 398, 398, 398, 398, 398, 398, 398, 398, 398,
608 398, 398, 398, 398, 398, 398, 398, 398, 398, 398,
609 398, 398, 398, 398, 398, 398, 398, 398, 398, 398,
610 398, 398, 398, 398, 398, 398, 398, 398
614 static yyconst flex_int16_t yy_chk[499] =
615 { 0,
616 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
617 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
618 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
619 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
620 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
621 11, 11, 12, 12, 25, 32, 25, 28, 28, 33,
622 32, 34, 48, 33, 48, 34, 33, 64, 34, 64,
623 37, 34, 35, 36, 34, 36, 35, 37, 40, 33,
624 37, 39, 35, 37, 42, 36, 37, 43, 40, 39,
625 42, 45, 72, 46, 39, 43, 46, 43, 110, 43,
627 45, 45, 43, 47, 50, 46, 110, 54, 72, 46,
628 47, 50, 54, 46, 59, 59, 78, 47, 79, 79,
629 82, 97, 78, 94, 106, 107, 79, 118, 404, 82,
630 106, 109, 113, 97, 145, 145, 82, 118, 94, 94,
631 107, 121, 109, 113, 107, 121, 124, 125, 160, 151,
632 161, 124, 125, 151, 188, 188, 402, 396, 395, 394,
633 161, 393, 392, 160, 391, 389, 188, 399, 399, 399,
634 399, 399, 399, 400, 400, 400, 400, 400, 400, 401,
635 401, 401, 401, 401, 401, 403, 403, 405, 405, 405,
636 388, 405, 405, 406, 406, 406, 406, 406, 406, 407,
638 407, 387, 407, 407, 407, 408, 386, 408, 408, 408,
639 408, 385, 384, 383, 382, 381, 380, 378, 377, 374,
640 372, 370, 368, 367, 366, 364, 361, 359, 358, 357,
641 356, 354, 352, 351, 348, 347, 345, 344, 343, 340,
642 339, 336, 334, 333, 332, 331, 328, 327, 326, 324,
643 323, 321, 319, 317, 316, 315, 313, 311, 307, 306,
644 302, 301, 300, 299, 298, 297, 296, 294, 293, 291,
645 290, 289, 288, 287, 286, 285, 284, 282, 281, 280,
646 278, 276, 272, 271, 270, 269, 268, 267, 266, 264,
647 263, 262, 260, 258, 256, 255, 254, 253, 252, 251,
649 250, 249, 248, 246, 245, 244, 243, 242, 241, 240,
650 239, 238, 237, 235, 234, 233, 230, 226, 224, 223,
651 222, 221, 220, 218, 217, 215, 213, 212, 210, 209,
652 208, 207, 206, 205, 204, 203, 202, 201, 198, 197,
653 196, 195, 194, 193, 192, 191, 190, 189, 187, 186,
654 185, 183, 181, 179, 178, 177, 176, 175, 174, 173,
655 172, 171, 169, 168, 167, 166, 165, 164, 163, 162,
656 159, 158, 157, 155, 154, 153, 150, 149, 148, 147,
657 146, 144, 143, 142, 141, 140, 139, 138, 137, 136,
658 135, 134, 131, 130, 128, 122, 120, 119, 117, 116,
660 115, 114, 112, 111, 108, 105, 104, 103, 100, 99,
661 98, 96, 92, 91, 90, 89, 88, 87, 86, 85,
662 84, 83, 81, 80, 77, 75, 74, 73, 71, 65,
663 63, 58, 56, 49, 44, 41, 30, 26, 24, 23,
664 9, 8, 7, 6, 5, 4, 3, 398, 398, 398,
665 398, 398, 398, 398, 398, 398, 398, 398, 398, 398,
666 398, 398, 398, 398, 398, 398, 398, 398, 398, 398,
667 398, 398, 398, 398, 398, 398, 398, 398, 398, 398,
668 398, 398, 398, 398, 398, 398, 398, 398, 398, 398,
669 398, 398, 398, 398, 398, 398, 398, 398
673 static yy_state_type yy_last_accepting_state;
674 static char *yy_last_accepting_cpos;
676 extern int yy_flex_debug;
677 int yy_flex_debug = 0;
679 /* The intent behind this definition is that it'll catch
680 * any uses of REJECT which flex missed.
682 #define REJECT reject_used_but_not_detected
683 #define yymore() yymore_used_but_not_detected
684 #define YY_MORE_ADJ 0
685 #define YY_RESTORE_YY_MORE_OFFSET
686 char *yytext;
687 #line 1 "pars0lex.l"
688 /******************************************************
689 SQL parser lexical analyzer: input file for the GNU Flex lexer generator
691 (c) 1997 Innobase Oy
693 Created 12/14/1997 Heikki Tuuri
694 Published under the GPL version 2
696 The InnoDB parser is frozen because MySQL takes care of SQL parsing.
697 Therefore we normally keep the InnoDB parser C files as they are, and do
698 not automatically generate them from pars0grm.y and pars0lex.l.
700 How to make the InnoDB parser and lexer C files:
702 1. Run ./make_flex.sh to generate lexer files.
704 2. Run ./make_bison.sh to generate parser files.
706 These instructions seem to work at least with bison-1.875d and flex-2.5.31 on
707 Linux.
708 *******************************************************/
709 #define YY_NO_INPUT 1
710 #define YY_NO_UNISTD_H 1
711 #line 38 "pars0lex.l"
712 #define YYSTYPE que_node_t*
714 #include "univ.i"
715 #include "pars0pars.h"
716 #include "pars0grm.h"
717 #include "pars0sym.h"
718 #include "mem0mem.h"
719 #include "os0proc.h"
721 #define malloc(A) ut_malloc(A)
722 #define free(A) ut_free(A)
723 #define realloc(P, A) ut_realloc(P, A)
724 #define exit(A) ut_error
726 #define YY_INPUT(buf, result, max_size) pars_get_lex_chars(buf, &result, max_size)
728 /* String buffer for removing quotes */
729 static ulint stringbuf_len_alloc = 0; /* Allocated length */
730 static ulint stringbuf_len = 0; /* Current length */
731 static char* stringbuf; /* Start of buffer */
732 /* Appends a string to the buffer. */
733 static
734 void
735 string_append(
736 /*==========*/
737 const char* str, /* in: string to be appended */
738 ulint len) /* in: length of the string */
740 if (stringbuf == NULL) {
741 stringbuf = malloc(1);
742 stringbuf_len_alloc = 1;
745 if (stringbuf_len + len > stringbuf_len_alloc) {
746 while (stringbuf_len + len > stringbuf_len_alloc) {
747 stringbuf_len_alloc <<= 1;
749 stringbuf = realloc(stringbuf, stringbuf_len_alloc);
752 memcpy(stringbuf + stringbuf_len, str, len);
753 stringbuf_len += len;
759 #line 759 "_flex_tmp.c"
761 #define INITIAL 0
762 #define comment 1
763 #define quoted 2
764 #define id 3
766 #ifndef YY_NO_UNISTD_H
767 /* Special case for "unistd.h", since it is non-ANSI. We include it way
768 * down here because we want the user's section 1 to have been scanned first.
769 * The user has a chance to override it with an option.
771 #include <unistd.h>
772 #endif
774 #ifndef YY_EXTRA_TYPE
775 #define YY_EXTRA_TYPE void *
776 #endif
778 /* Macros after this point can all be overridden by user definitions in
779 * section 1.
782 #ifndef YY_SKIP_YYWRAP
783 #ifdef __cplusplus
784 extern "C" int yywrap (void );
785 #else
786 extern int yywrap (void );
787 #endif
788 #endif
790 #ifndef yytext_ptr
791 static void yy_flex_strncpy (char *,yyconst char *,int );
792 #endif
794 #ifdef YY_NEED_STRLEN
795 static int yy_flex_strlen (yyconst char * );
796 #endif
798 #ifndef YY_NO_INPUT
800 #ifdef __cplusplus
801 static int yyinput (void );
802 #else
803 static int input (void );
804 #endif
806 #endif
808 /* Amount of stuff to slurp up with each read. */
809 #ifndef YY_READ_BUF_SIZE
810 #define YY_READ_BUF_SIZE 8192
811 #endif
813 /* Copy whatever the last rule matched to the standard output. */
814 #ifndef ECHO
815 /* This used to be an fputs(), but since the string might contain NUL's,
816 * we now use fwrite().
818 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
819 #endif
821 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
822 * is returned in "result".
824 #ifndef YY_INPUT
825 #define YY_INPUT(buf,result,max_size) \
826 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
828 int c = '*'; \
829 size_t n; \
830 for ( n = 0; n < max_size && \
831 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
832 buf[n] = (char) c; \
833 if ( c == '\n' ) \
834 buf[n++] = (char) c; \
835 if ( c == EOF && ferror( yyin ) ) \
836 YY_FATAL_ERROR( "input in flex scanner failed" ); \
837 result = n; \
839 else \
841 errno=0; \
842 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
844 if( errno != EINTR) \
846 YY_FATAL_ERROR( "input in flex scanner failed" ); \
847 break; \
849 errno=0; \
850 clearerr(yyin); \
855 #endif
857 /* No semi-colon after return; correct usage is to write "yyterminate();" -
858 * we don't want an extra ';' after the "return" because that will cause
859 * some compilers to complain about unreachable statements.
861 #ifndef yyterminate
862 #define yyterminate() return YY_NULL
863 #endif
865 /* Number of entries by which start-condition stack grows. */
866 #ifndef YY_START_STACK_INCR
867 #define YY_START_STACK_INCR 25
868 #endif
870 /* Report a fatal error. */
871 #ifndef YY_FATAL_ERROR
872 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
873 #endif
875 /* end tables serialization structures and prototypes */
877 /* Default declaration of generated scanner - a define so the user can
878 * easily add parameters.
880 #ifndef YY_DECL
881 #define YY_DECL_IS_OURS 1
883 extern int yylex (void);
885 #define YY_DECL int yylex (void)
886 #endif /* !YY_DECL */
888 /* Code executed at the beginning of each rule, after yytext and yyleng
889 * have been set up.
891 #ifndef YY_USER_ACTION
892 #define YY_USER_ACTION
893 #endif
895 /* Code executed at the end of each rule. */
896 #ifndef YY_BREAK
897 #define YY_BREAK break;
898 #endif
900 #define YY_RULE_SETUP \
901 YY_USER_ACTION
903 /** The main scanner function which does all the work.
905 YY_DECL
907 register yy_state_type yy_current_state;
908 register char *yy_cp, *yy_bp;
909 register int yy_act;
911 #line 92 "pars0lex.l"
914 #line 914 "_flex_tmp.c"
916 if ( (yy_init) )
918 (yy_init) = 0;
920 #ifdef YY_USER_INIT
921 YY_USER_INIT;
922 #endif
924 if ( ! (yy_start) )
925 (yy_start) = 1; /* first start state */
927 if ( ! yyin )
928 yyin = stdin;
930 if ( ! yyout )
931 yyout = stdout;
933 if ( ! YY_CURRENT_BUFFER ) {
934 yyensure_buffer_stack ();
935 YY_CURRENT_BUFFER_LVALUE =
936 yy_create_buffer(yyin,YY_BUF_SIZE );
939 yy_load_buffer_state( );
942 while ( 1 ) /* loops until end-of-file is reached */
944 yy_cp = (yy_c_buf_p);
946 /* Support of yytext. */
947 *yy_cp = (yy_hold_char);
949 /* yy_bp points to the position in yy_ch_buf of the start of
950 * the current run.
952 yy_bp = yy_cp;
954 yy_current_state = (yy_start);
955 yy_match:
958 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
959 if ( yy_accept[yy_current_state] )
961 (yy_last_accepting_state) = yy_current_state;
962 (yy_last_accepting_cpos) = yy_cp;
964 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
966 yy_current_state = (int) yy_def[yy_current_state];
967 if ( yy_current_state >= 399 )
968 yy_c = yy_meta[(unsigned int) yy_c];
970 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
971 ++yy_cp;
973 while ( yy_current_state != 398 );
974 yy_cp = (yy_last_accepting_cpos);
975 yy_current_state = (yy_last_accepting_state);
977 yy_find_action:
978 yy_act = yy_accept[yy_current_state];
980 YY_DO_BEFORE_ACTION;
982 do_action: /* This label is used only to access EOF actions. */
984 switch ( yy_act )
985 { /* beginning of action switch */
986 case 0: /* must back up */
987 /* undo the effects of YY_DO_BEFORE_ACTION */
988 *yy_cp = (yy_hold_char);
989 yy_cp = (yy_last_accepting_cpos);
990 yy_current_state = (yy_last_accepting_state);
991 goto yy_find_action;
993 case 1:
994 YY_RULE_SETUP
995 #line 94 "pars0lex.l"
997 yylval = sym_tab_add_int_lit(pars_sym_tab_global,
998 atoi(yytext));
999 return(PARS_INT_LIT);
1001 YY_BREAK
1002 case 2:
1003 YY_RULE_SETUP
1004 #line 100 "pars0lex.l"
1006 ut_error; /* not implemented */
1008 return(PARS_FLOAT_LIT);
1010 YY_BREAK
1011 case 3:
1012 YY_RULE_SETUP
1013 #line 106 "pars0lex.l"
1015 ulint type;
1017 yylval = sym_tab_add_bound_lit(pars_sym_tab_global,
1018 yytext + 1, &type);
1020 return((int) type);
1022 YY_BREAK
1023 case 4:
1024 YY_RULE_SETUP
1025 #line 115 "pars0lex.l"
1027 yylval = sym_tab_add_bound_id(pars_sym_tab_global,
1028 yytext + 1);
1030 return(PARS_ID_TOKEN);
1032 YY_BREAK
1033 case 5:
1034 YY_RULE_SETUP
1035 #line 122 "pars0lex.l"
1037 /* Quoted character string literals are handled in an explicit
1038 start state 'quoted'. This state is entered and the buffer for
1039 the scanned string is emptied upon encountering a starting quote.
1041 In the state 'quoted', only two actions are possible (defined below). */
1042 BEGIN(quoted);
1043 stringbuf_len = 0;
1045 YY_BREAK
1046 case 6:
1047 /* rule 6 can match eol */
1048 YY_RULE_SETUP
1049 #line 131 "pars0lex.l"
1051 /* Got a sequence of characters other than "'":
1052 append to string buffer */
1053 string_append(yytext, yyleng);
1055 YY_BREAK
1056 case 7:
1057 YY_RULE_SETUP
1058 #line 136 "pars0lex.l"
1060 /* Got a sequence of "'" characters:
1061 append half of them to string buffer,
1062 as "''" represents a single "'".
1063 We apply truncating division,
1064 so that "'''" will result in "'". */
1066 string_append(yytext, yyleng / 2);
1068 /* If we got an odd number of quotes, then the
1069 last quote we got is the terminating quote.
1070 At the end of the string, we return to the
1071 initial start state and report the scanned
1072 string literal. */
1074 if (yyleng % 2) {
1075 BEGIN(INITIAL);
1076 yylval = sym_tab_add_str_lit(
1077 pars_sym_tab_global,
1078 (byte*) stringbuf, stringbuf_len);
1079 return(PARS_STR_LIT);
1082 YY_BREAK
1083 case 8:
1084 YY_RULE_SETUP
1085 #line 160 "pars0lex.l"
1087 /* Quoted identifiers are handled in an explicit start state 'id'.
1088 This state is entered and the buffer for the scanned string is emptied
1089 upon encountering a starting quote.
1091 In the state 'id', only two actions are possible (defined below). */
1092 BEGIN(id);
1093 stringbuf_len = 0;
1095 YY_BREAK
1096 case 9:
1097 /* rule 9 can match eol */
1098 YY_RULE_SETUP
1099 #line 169 "pars0lex.l"
1101 /* Got a sequence of characters other than '"':
1102 append to string buffer */
1103 string_append(yytext, yyleng);
1105 YY_BREAK
1106 case 10:
1107 YY_RULE_SETUP
1108 #line 174 "pars0lex.l"
1110 /* Got a sequence of '"' characters:
1111 append half of them to string buffer,
1112 as '""' represents a single '"'.
1113 We apply truncating division,
1114 so that '"""' will result in '"'. */
1116 string_append(yytext, yyleng / 2);
1118 /* If we got an odd number of quotes, then the
1119 last quote we got is the terminating quote.
1120 At the end of the string, we return to the
1121 initial start state and report the scanned
1122 identifier. */
1124 if (yyleng % 2) {
1125 BEGIN(INITIAL);
1126 yylval = sym_tab_add_id(
1127 pars_sym_tab_global,
1128 (byte*) stringbuf, stringbuf_len);
1130 return(PARS_ID_TOKEN);
1133 YY_BREAK
1134 case 11:
1135 YY_RULE_SETUP
1136 #line 199 "pars0lex.l"
1138 yylval = sym_tab_add_null_lit(pars_sym_tab_global);
1140 return(PARS_NULL_LIT);
1142 YY_BREAK
1143 case 12:
1144 YY_RULE_SETUP
1145 #line 205 "pars0lex.l"
1147 /* Implicit cursor name */
1148 yylval = sym_tab_add_str_lit(pars_sym_tab_global,
1149 (byte*) yytext, yyleng);
1150 return(PARS_SQL_TOKEN);
1152 YY_BREAK
1153 case 13:
1154 YY_RULE_SETUP
1155 #line 212 "pars0lex.l"
1157 return(PARS_AND_TOKEN);
1159 YY_BREAK
1160 case 14:
1161 YY_RULE_SETUP
1162 #line 216 "pars0lex.l"
1164 return(PARS_OR_TOKEN);
1166 YY_BREAK
1167 case 15:
1168 YY_RULE_SETUP
1169 #line 220 "pars0lex.l"
1171 return(PARS_NOT_TOKEN);
1173 YY_BREAK
1174 case 16:
1175 YY_RULE_SETUP
1176 #line 224 "pars0lex.l"
1178 return(PARS_PROCEDURE_TOKEN);
1180 YY_BREAK
1181 case 17:
1182 YY_RULE_SETUP
1183 #line 228 "pars0lex.l"
1185 return(PARS_IN_TOKEN);
1187 YY_BREAK
1188 case 18:
1189 YY_RULE_SETUP
1190 #line 232 "pars0lex.l"
1192 return(PARS_OUT_TOKEN);
1194 YY_BREAK
1195 case 19:
1196 YY_RULE_SETUP
1197 #line 236 "pars0lex.l"
1199 return(PARS_BINARY_TOKEN);
1201 YY_BREAK
1202 case 20:
1203 YY_RULE_SETUP
1204 #line 240 "pars0lex.l"
1206 return(PARS_BLOB_TOKEN);
1208 YY_BREAK
1209 case 21:
1210 YY_RULE_SETUP
1211 #line 244 "pars0lex.l"
1213 return(PARS_INT_TOKEN);
1215 YY_BREAK
1216 case 22:
1217 YY_RULE_SETUP
1218 #line 248 "pars0lex.l"
1220 return(PARS_INT_TOKEN);
1222 YY_BREAK
1223 case 23:
1224 YY_RULE_SETUP
1225 #line 252 "pars0lex.l"
1227 return(PARS_FLOAT_TOKEN);
1229 YY_BREAK
1230 case 24:
1231 YY_RULE_SETUP
1232 #line 256 "pars0lex.l"
1234 return(PARS_CHAR_TOKEN);
1236 YY_BREAK
1237 case 25:
1238 YY_RULE_SETUP
1239 #line 260 "pars0lex.l"
1241 return(PARS_IS_TOKEN);
1243 YY_BREAK
1244 case 26:
1245 YY_RULE_SETUP
1246 #line 264 "pars0lex.l"
1248 return(PARS_BEGIN_TOKEN);
1250 YY_BREAK
1251 case 27:
1252 YY_RULE_SETUP
1253 #line 268 "pars0lex.l"
1255 return(PARS_END_TOKEN);
1257 YY_BREAK
1258 case 28:
1259 YY_RULE_SETUP
1260 #line 272 "pars0lex.l"
1262 return(PARS_IF_TOKEN);
1264 YY_BREAK
1265 case 29:
1266 YY_RULE_SETUP
1267 #line 276 "pars0lex.l"
1269 return(PARS_THEN_TOKEN);
1271 YY_BREAK
1272 case 30:
1273 YY_RULE_SETUP
1274 #line 280 "pars0lex.l"
1276 return(PARS_ELSE_TOKEN);
1278 YY_BREAK
1279 case 31:
1280 YY_RULE_SETUP
1281 #line 284 "pars0lex.l"
1283 return(PARS_ELSIF_TOKEN);
1285 YY_BREAK
1286 case 32:
1287 YY_RULE_SETUP
1288 #line 288 "pars0lex.l"
1290 return(PARS_LOOP_TOKEN);
1292 YY_BREAK
1293 case 33:
1294 YY_RULE_SETUP
1295 #line 292 "pars0lex.l"
1297 return(PARS_WHILE_TOKEN);
1299 YY_BREAK
1300 case 34:
1301 YY_RULE_SETUP
1302 #line 296 "pars0lex.l"
1304 return(PARS_RETURN_TOKEN);
1306 YY_BREAK
1307 case 35:
1308 YY_RULE_SETUP
1309 #line 300 "pars0lex.l"
1311 return(PARS_SELECT_TOKEN);
1313 YY_BREAK
1314 case 36:
1315 YY_RULE_SETUP
1316 #line 304 "pars0lex.l"
1318 return(PARS_SUM_TOKEN);
1320 YY_BREAK
1321 case 37:
1322 YY_RULE_SETUP
1323 #line 308 "pars0lex.l"
1325 return(PARS_COUNT_TOKEN);
1327 YY_BREAK
1328 case 38:
1329 YY_RULE_SETUP
1330 #line 312 "pars0lex.l"
1332 return(PARS_DISTINCT_TOKEN);
1334 YY_BREAK
1335 case 39:
1336 YY_RULE_SETUP
1337 #line 316 "pars0lex.l"
1339 return(PARS_FROM_TOKEN);
1341 YY_BREAK
1342 case 40:
1343 YY_RULE_SETUP
1344 #line 320 "pars0lex.l"
1346 return(PARS_WHERE_TOKEN);
1348 YY_BREAK
1349 case 41:
1350 YY_RULE_SETUP
1351 #line 324 "pars0lex.l"
1353 return(PARS_FOR_TOKEN);
1355 YY_BREAK
1356 case 42:
1357 YY_RULE_SETUP
1358 #line 328 "pars0lex.l"
1360 return(PARS_READ_TOKEN);
1362 YY_BREAK
1363 case 43:
1364 YY_RULE_SETUP
1365 #line 332 "pars0lex.l"
1367 return(PARS_ORDER_TOKEN);
1369 YY_BREAK
1370 case 44:
1371 YY_RULE_SETUP
1372 #line 336 "pars0lex.l"
1374 return(PARS_BY_TOKEN);
1376 YY_BREAK
1377 case 45:
1378 YY_RULE_SETUP
1379 #line 340 "pars0lex.l"
1381 return(PARS_ASC_TOKEN);
1383 YY_BREAK
1384 case 46:
1385 YY_RULE_SETUP
1386 #line 344 "pars0lex.l"
1388 return(PARS_DESC_TOKEN);
1390 YY_BREAK
1391 case 47:
1392 YY_RULE_SETUP
1393 #line 348 "pars0lex.l"
1395 return(PARS_INSERT_TOKEN);
1397 YY_BREAK
1398 case 48:
1399 YY_RULE_SETUP
1400 #line 352 "pars0lex.l"
1402 return(PARS_INTO_TOKEN);
1404 YY_BREAK
1405 case 49:
1406 YY_RULE_SETUP
1407 #line 356 "pars0lex.l"
1409 return(PARS_VALUES_TOKEN);
1411 YY_BREAK
1412 case 50:
1413 YY_RULE_SETUP
1414 #line 360 "pars0lex.l"
1416 return(PARS_UPDATE_TOKEN);
1418 YY_BREAK
1419 case 51:
1420 YY_RULE_SETUP
1421 #line 364 "pars0lex.l"
1423 return(PARS_SET_TOKEN);
1425 YY_BREAK
1426 case 52:
1427 YY_RULE_SETUP
1428 #line 368 "pars0lex.l"
1430 return(PARS_DELETE_TOKEN);
1432 YY_BREAK
1433 case 53:
1434 YY_RULE_SETUP
1435 #line 372 "pars0lex.l"
1437 return(PARS_CURRENT_TOKEN);
1439 YY_BREAK
1440 case 54:
1441 YY_RULE_SETUP
1442 #line 376 "pars0lex.l"
1444 return(PARS_OF_TOKEN);
1446 YY_BREAK
1447 case 55:
1448 YY_RULE_SETUP
1449 #line 380 "pars0lex.l"
1451 return(PARS_CREATE_TOKEN);
1453 YY_BREAK
1454 case 56:
1455 YY_RULE_SETUP
1456 #line 384 "pars0lex.l"
1458 return(PARS_TABLE_TOKEN);
1460 YY_BREAK
1461 case 57:
1462 YY_RULE_SETUP
1463 #line 388 "pars0lex.l"
1465 return(PARS_INDEX_TOKEN);
1467 YY_BREAK
1468 case 58:
1469 YY_RULE_SETUP
1470 #line 392 "pars0lex.l"
1472 return(PARS_UNIQUE_TOKEN);
1474 YY_BREAK
1475 case 59:
1476 YY_RULE_SETUP
1477 #line 396 "pars0lex.l"
1479 return(PARS_CLUSTERED_TOKEN);
1481 YY_BREAK
1482 case 60:
1483 YY_RULE_SETUP
1484 #line 400 "pars0lex.l"
1486 return(PARS_DOES_NOT_FIT_IN_MEM_TOKEN);
1488 YY_BREAK
1489 case 61:
1490 YY_RULE_SETUP
1491 #line 404 "pars0lex.l"
1493 return(PARS_ON_TOKEN);
1495 YY_BREAK
1496 case 62:
1497 YY_RULE_SETUP
1498 #line 408 "pars0lex.l"
1500 return(PARS_DECLARE_TOKEN);
1502 YY_BREAK
1503 case 63:
1504 YY_RULE_SETUP
1505 #line 412 "pars0lex.l"
1507 return(PARS_CURSOR_TOKEN);
1509 YY_BREAK
1510 case 64:
1511 YY_RULE_SETUP
1512 #line 416 "pars0lex.l"
1514 return(PARS_OPEN_TOKEN);
1516 YY_BREAK
1517 case 65:
1518 YY_RULE_SETUP
1519 #line 420 "pars0lex.l"
1521 return(PARS_FETCH_TOKEN);
1523 YY_BREAK
1524 case 66:
1525 YY_RULE_SETUP
1526 #line 424 "pars0lex.l"
1528 return(PARS_CLOSE_TOKEN);
1530 YY_BREAK
1531 case 67:
1532 YY_RULE_SETUP
1533 #line 428 "pars0lex.l"
1535 return(PARS_NOTFOUND_TOKEN);
1537 YY_BREAK
1538 case 68:
1539 YY_RULE_SETUP
1540 #line 432 "pars0lex.l"
1542 return(PARS_TO_CHAR_TOKEN);
1544 YY_BREAK
1545 case 69:
1546 YY_RULE_SETUP
1547 #line 436 "pars0lex.l"
1549 return(PARS_TO_NUMBER_TOKEN);
1551 YY_BREAK
1552 case 70:
1553 YY_RULE_SETUP
1554 #line 440 "pars0lex.l"
1556 return(PARS_TO_BINARY_TOKEN);
1558 YY_BREAK
1559 case 71:
1560 YY_RULE_SETUP
1561 #line 444 "pars0lex.l"
1563 return(PARS_BINARY_TO_NUMBER_TOKEN);
1565 YY_BREAK
1566 case 72:
1567 YY_RULE_SETUP
1568 #line 448 "pars0lex.l"
1570 return(PARS_SUBSTR_TOKEN);
1572 YY_BREAK
1573 case 73:
1574 YY_RULE_SETUP
1575 #line 452 "pars0lex.l"
1577 return(PARS_REPLSTR_TOKEN);
1579 YY_BREAK
1580 case 74:
1581 YY_RULE_SETUP
1582 #line 456 "pars0lex.l"
1584 return(PARS_CONCAT_TOKEN);
1586 YY_BREAK
1587 case 75:
1588 YY_RULE_SETUP
1589 #line 460 "pars0lex.l"
1591 return(PARS_INSTR_TOKEN);
1593 YY_BREAK
1594 case 76:
1595 YY_RULE_SETUP
1596 #line 464 "pars0lex.l"
1598 return(PARS_LENGTH_TOKEN);
1600 YY_BREAK
1601 case 77:
1602 YY_RULE_SETUP
1603 #line 468 "pars0lex.l"
1605 return(PARS_SYSDATE_TOKEN);
1607 YY_BREAK
1608 case 78:
1609 YY_RULE_SETUP
1610 #line 472 "pars0lex.l"
1612 return(PARS_PRINTF_TOKEN);
1614 YY_BREAK
1615 case 79:
1616 YY_RULE_SETUP
1617 #line 476 "pars0lex.l"
1619 return(PARS_ASSERT_TOKEN);
1621 YY_BREAK
1622 case 80:
1623 YY_RULE_SETUP
1624 #line 480 "pars0lex.l"
1626 return(PARS_RND_TOKEN);
1628 YY_BREAK
1629 case 81:
1630 YY_RULE_SETUP
1631 #line 484 "pars0lex.l"
1633 return(PARS_RND_STR_TOKEN);
1635 YY_BREAK
1636 case 82:
1637 YY_RULE_SETUP
1638 #line 488 "pars0lex.l"
1640 return(PARS_ROW_PRINTF_TOKEN);
1642 YY_BREAK
1643 case 83:
1644 YY_RULE_SETUP
1645 #line 492 "pars0lex.l"
1647 return(PARS_COMMIT_TOKEN);
1649 YY_BREAK
1650 case 84:
1651 YY_RULE_SETUP
1652 #line 496 "pars0lex.l"
1654 return(PARS_ROLLBACK_TOKEN);
1656 YY_BREAK
1657 case 85:
1658 YY_RULE_SETUP
1659 #line 500 "pars0lex.l"
1661 return(PARS_WORK_TOKEN);
1663 YY_BREAK
1664 case 86:
1665 YY_RULE_SETUP
1666 #line 504 "pars0lex.l"
1668 return(PARS_UNSIGNED_TOKEN);
1670 YY_BREAK
1671 case 87:
1672 YY_RULE_SETUP
1673 #line 508 "pars0lex.l"
1675 return(PARS_EXIT_TOKEN);
1677 YY_BREAK
1678 case 88:
1679 YY_RULE_SETUP
1680 #line 512 "pars0lex.l"
1682 return(PARS_FUNCTION_TOKEN);
1684 YY_BREAK
1685 case 89:
1686 YY_RULE_SETUP
1687 #line 516 "pars0lex.l"
1689 return(PARS_LOCK_TOKEN);
1691 YY_BREAK
1692 case 90:
1693 YY_RULE_SETUP
1694 #line 520 "pars0lex.l"
1696 return(PARS_SHARE_TOKEN);
1698 YY_BREAK
1699 case 91:
1700 YY_RULE_SETUP
1701 #line 524 "pars0lex.l"
1703 return(PARS_MODE_TOKEN);
1705 YY_BREAK
1706 case 92:
1707 YY_RULE_SETUP
1708 #line 528 "pars0lex.l"
1710 yylval = sym_tab_add_id(pars_sym_tab_global,
1711 (byte*)yytext,
1712 ut_strlen(yytext));
1713 return(PARS_ID_TOKEN);
1715 YY_BREAK
1716 case 93:
1717 YY_RULE_SETUP
1718 #line 535 "pars0lex.l"
1720 return(PARS_DDOT_TOKEN);
1722 YY_BREAK
1723 case 94:
1724 YY_RULE_SETUP
1725 #line 539 "pars0lex.l"
1727 return(PARS_ASSIGN_TOKEN);
1729 YY_BREAK
1730 case 95:
1731 YY_RULE_SETUP
1732 #line 543 "pars0lex.l"
1734 return(PARS_LE_TOKEN);
1736 YY_BREAK
1737 case 96:
1738 YY_RULE_SETUP
1739 #line 547 "pars0lex.l"
1741 return(PARS_GE_TOKEN);
1743 YY_BREAK
1744 case 97:
1745 YY_RULE_SETUP
1746 #line 551 "pars0lex.l"
1748 return(PARS_NE_TOKEN);
1750 YY_BREAK
1751 case 98:
1752 YY_RULE_SETUP
1753 #line 555 "pars0lex.l"
1756 return((int)(*yytext));
1758 YY_BREAK
1759 case 99:
1760 YY_RULE_SETUP
1761 #line 560 "pars0lex.l"
1764 return((int)(*yytext));
1766 YY_BREAK
1767 case 100:
1768 YY_RULE_SETUP
1769 #line 565 "pars0lex.l"
1772 return((int)(*yytext));
1774 YY_BREAK
1775 case 101:
1776 YY_RULE_SETUP
1777 #line 570 "pars0lex.l"
1780 return((int)(*yytext));
1782 YY_BREAK
1783 case 102:
1784 YY_RULE_SETUP
1785 #line 575 "pars0lex.l"
1788 return((int)(*yytext));
1790 YY_BREAK
1791 case 103:
1792 YY_RULE_SETUP
1793 #line 580 "pars0lex.l"
1796 return((int)(*yytext));
1798 YY_BREAK
1799 case 104:
1800 YY_RULE_SETUP
1801 #line 585 "pars0lex.l"
1804 return((int)(*yytext));
1806 YY_BREAK
1807 case 105:
1808 YY_RULE_SETUP
1809 #line 590 "pars0lex.l"
1812 return((int)(*yytext));
1814 YY_BREAK
1815 case 106:
1816 YY_RULE_SETUP
1817 #line 595 "pars0lex.l"
1820 return((int)(*yytext));
1822 YY_BREAK
1823 case 107:
1824 YY_RULE_SETUP
1825 #line 600 "pars0lex.l"
1828 return((int)(*yytext));
1830 YY_BREAK
1831 case 108:
1832 YY_RULE_SETUP
1833 #line 605 "pars0lex.l"
1836 return((int)(*yytext));
1838 YY_BREAK
1839 case 109:
1840 YY_RULE_SETUP
1841 #line 610 "pars0lex.l"
1844 return((int)(*yytext));
1846 YY_BREAK
1847 case 110:
1848 YY_RULE_SETUP
1849 #line 615 "pars0lex.l"
1852 return((int)(*yytext));
1854 YY_BREAK
1855 case 111:
1856 YY_RULE_SETUP
1857 #line 620 "pars0lex.l"
1860 return((int)(*yytext));
1862 YY_BREAK
1863 case 112:
1864 YY_RULE_SETUP
1865 #line 625 "pars0lex.l"
1868 return((int)(*yytext));
1870 YY_BREAK
1871 case 113:
1872 YY_RULE_SETUP
1873 #line 630 "pars0lex.l"
1874 BEGIN(comment); /* eat up comment */
1875 YY_BREAK
1876 case 114:
1877 /* rule 114 can match eol */
1878 YY_RULE_SETUP
1879 #line 632 "pars0lex.l"
1881 YY_BREAK
1882 case 115:
1883 /* rule 115 can match eol */
1884 YY_RULE_SETUP
1885 #line 633 "pars0lex.l"
1887 YY_BREAK
1888 case 116:
1889 YY_RULE_SETUP
1890 #line 634 "pars0lex.l"
1891 BEGIN(INITIAL);
1892 YY_BREAK
1893 case 117:
1894 /* rule 117 can match eol */
1895 YY_RULE_SETUP
1896 #line 636 "pars0lex.l"
1897 /* eat up whitespace */
1898 YY_BREAK
1899 case 118:
1900 YY_RULE_SETUP
1901 #line 639 "pars0lex.l"
1903 fprintf(stderr,"Unrecognized character: %02x\n",
1904 *yytext);
1906 ut_error;
1908 return(0);
1910 YY_BREAK
1911 case 119:
1912 YY_RULE_SETUP
1913 #line 648 "pars0lex.l"
1914 YY_FATAL_ERROR( "flex scanner jammed" );
1915 YY_BREAK
1916 #line 1916 "_flex_tmp.c"
1917 case YY_STATE_EOF(INITIAL):
1918 case YY_STATE_EOF(comment):
1919 case YY_STATE_EOF(quoted):
1920 case YY_STATE_EOF(id):
1921 yyterminate();
1923 case YY_END_OF_BUFFER:
1925 /* Amount of text matched not including the EOB char. */
1926 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1928 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1929 *yy_cp = (yy_hold_char);
1930 YY_RESTORE_YY_MORE_OFFSET
1932 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1934 /* We're scanning a new file or input source. It's
1935 * possible that this happened because the user
1936 * just pointed yyin at a new source and called
1937 * yylex(). If so, then we have to assure
1938 * consistency between YY_CURRENT_BUFFER and our
1939 * globals. Here is the right place to do so, because
1940 * this is the first action (other than possibly a
1941 * back-up) that will match for the new input source.
1943 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1944 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1945 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1948 /* Note that here we test for yy_c_buf_p "<=" to the position
1949 * of the first EOB in the buffer, since yy_c_buf_p will
1950 * already have been incremented past the NUL character
1951 * (since all states make transitions on EOB to the
1952 * end-of-buffer state). Contrast this with the test
1953 * in input().
1955 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1956 { /* This was really a NUL. */
1957 yy_state_type yy_next_state;
1959 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1961 yy_current_state = yy_get_previous_state( );
1963 /* Okay, we're now positioned to make the NUL
1964 * transition. We couldn't have
1965 * yy_get_previous_state() go ahead and do it
1966 * for us because it doesn't know how to deal
1967 * with the possibility of jamming (and we don't
1968 * want to build jamming into it because then it
1969 * will run more slowly).
1972 yy_next_state = yy_try_NUL_trans( yy_current_state );
1974 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1976 if ( yy_next_state )
1978 /* Consume the NUL. */
1979 yy_cp = ++(yy_c_buf_p);
1980 yy_current_state = yy_next_state;
1981 goto yy_match;
1984 else
1986 yy_cp = (yy_last_accepting_cpos);
1987 yy_current_state = (yy_last_accepting_state);
1988 goto yy_find_action;
1992 else switch ( yy_get_next_buffer( ) )
1994 case EOB_ACT_END_OF_FILE:
1996 (yy_did_buffer_switch_on_eof) = 0;
1998 if ( yywrap( ) )
2000 /* Note: because we've taken care in
2001 * yy_get_next_buffer() to have set up
2002 * yytext, we can now set up
2003 * yy_c_buf_p so that if some total
2004 * hoser (like flex itself) wants to
2005 * call the scanner after we return the
2006 * YY_NULL, it'll still work - another
2007 * YY_NULL will get returned.
2009 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
2011 yy_act = YY_STATE_EOF(YY_START);
2012 goto do_action;
2015 else
2017 if ( ! (yy_did_buffer_switch_on_eof) )
2018 YY_NEW_FILE;
2020 break;
2023 case EOB_ACT_CONTINUE_SCAN:
2024 (yy_c_buf_p) =
2025 (yytext_ptr) + yy_amount_of_matched_text;
2027 yy_current_state = yy_get_previous_state( );
2029 yy_cp = (yy_c_buf_p);
2030 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2031 goto yy_match;
2033 case EOB_ACT_LAST_MATCH:
2034 (yy_c_buf_p) =
2035 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
2037 yy_current_state = yy_get_previous_state( );
2039 yy_cp = (yy_c_buf_p);
2040 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2041 goto yy_find_action;
2043 break;
2046 default:
2047 YY_FATAL_ERROR(
2048 "fatal flex scanner internal error--no action found" );
2049 } /* end of action switch */
2050 } /* end of scanning one token */
2051 } /* end of yylex */
2053 /* yy_get_next_buffer - try to read in a new buffer
2055 * Returns a code representing an action:
2056 * EOB_ACT_LAST_MATCH -
2057 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2058 * EOB_ACT_END_OF_FILE - end of file
2060 static int yy_get_next_buffer (void)
2062 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
2063 register char *source = (yytext_ptr);
2064 register int number_to_move, i;
2065 int ret_val;
2067 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
2068 YY_FATAL_ERROR(
2069 "fatal flex scanner internal error--end of buffer missed" );
2071 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
2072 { /* Don't try to fill the buffer, so this is an EOF. */
2073 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
2075 /* We matched a single character, the EOB, so
2076 * treat this as a final EOF.
2078 return EOB_ACT_END_OF_FILE;
2081 else
2083 /* We matched some text prior to the EOB, first
2084 * process it.
2086 return EOB_ACT_LAST_MATCH;
2090 /* Try to read more data. */
2092 /* First move last chars to start of buffer. */
2093 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
2095 for ( i = 0; i < number_to_move; ++i )
2096 *(dest++) = *(source++);
2098 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2099 /* don't do the read, it's not guaranteed to return an EOF,
2100 * just force an EOF
2102 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
2104 else
2106 size_t num_to_read =
2107 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
2109 while ( num_to_read <= 0 )
2110 { /* Not enough room in the buffer - grow it. */
2112 /* just a shorter name for the current buffer */
2113 YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
2115 int yy_c_buf_p_offset =
2116 (int) ((yy_c_buf_p) - b->yy_ch_buf);
2118 if ( b->yy_is_our_buffer )
2120 int new_size = b->yy_buf_size * 2;
2122 if ( new_size <= 0 )
2123 b->yy_buf_size += b->yy_buf_size / 8;
2124 else
2125 b->yy_buf_size *= 2;
2127 b->yy_ch_buf = (char *)
2128 /* Include room in for 2 EOB chars. */
2129 yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
2131 else
2132 /* Can't grow it, we don't own it. */
2133 b->yy_ch_buf = 0;
2135 if ( ! b->yy_ch_buf )
2136 YY_FATAL_ERROR(
2137 "fatal error - scanner input buffer overflow" );
2139 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
2141 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
2142 number_to_move - 1;
2146 if ( num_to_read > YY_READ_BUF_SIZE )
2147 num_to_read = YY_READ_BUF_SIZE;
2149 /* Read in more data. */
2150 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2151 (yy_n_chars), num_to_read );
2153 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2156 if ( (yy_n_chars) == 0 )
2158 if ( number_to_move == YY_MORE_ADJ )
2160 ret_val = EOB_ACT_END_OF_FILE;
2161 yyrestart(yyin );
2164 else
2166 ret_val = EOB_ACT_LAST_MATCH;
2167 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
2168 YY_BUFFER_EOF_PENDING;
2172 else
2173 ret_val = EOB_ACT_CONTINUE_SCAN;
2175 (yy_n_chars) += number_to_move;
2176 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
2177 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
2179 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
2181 return ret_val;
2184 /* yy_get_previous_state - get the state just before the EOB char was reached */
2186 static yy_state_type yy_get_previous_state (void)
2188 register yy_state_type yy_current_state;
2189 register char *yy_cp;
2191 yy_current_state = (yy_start);
2193 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
2195 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2196 if ( yy_accept[yy_current_state] )
2198 (yy_last_accepting_state) = yy_current_state;
2199 (yy_last_accepting_cpos) = yy_cp;
2201 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2203 yy_current_state = (int) yy_def[yy_current_state];
2204 if ( yy_current_state >= 399 )
2205 yy_c = yy_meta[(unsigned int) yy_c];
2207 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2210 return yy_current_state;
2213 /* yy_try_NUL_trans - try to make a transition on the NUL character
2215 * synopsis
2216 * next_state = yy_try_NUL_trans( current_state );
2218 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
2220 register int yy_is_jam;
2221 register char *yy_cp = (yy_c_buf_p);
2223 register YY_CHAR yy_c = 1;
2224 if ( yy_accept[yy_current_state] )
2226 (yy_last_accepting_state) = yy_current_state;
2227 (yy_last_accepting_cpos) = yy_cp;
2229 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2231 yy_current_state = (int) yy_def[yy_current_state];
2232 if ( yy_current_state >= 399 )
2233 yy_c = yy_meta[(unsigned int) yy_c];
2235 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2236 yy_is_jam = (yy_current_state == 398);
2238 return yy_is_jam ? 0 : yy_current_state;
2241 #ifndef YY_NO_INPUT
2242 #ifdef __cplusplus
2243 static int yyinput (void)
2244 #else
2245 static int input (void)
2246 #endif
2249 int c;
2251 *(yy_c_buf_p) = (yy_hold_char);
2253 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
2255 /* yy_c_buf_p now points to the character we want to return.
2256 * If this occurs *before* the EOB characters, then it's a
2257 * valid NUL; if not, then we've hit the end of the buffer.
2259 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2260 /* This was really a NUL. */
2261 *(yy_c_buf_p) = '\0';
2263 else
2264 { /* need more input */
2265 int offset = (int)((yy_c_buf_p) - (yytext_ptr));
2266 ++(yy_c_buf_p);
2268 switch ( yy_get_next_buffer( ) )
2270 case EOB_ACT_LAST_MATCH:
2271 /* This happens because yy_g_n_b()
2272 * sees that we've accumulated a
2273 * token and flags that we need to
2274 * try matching the token before
2275 * proceeding. But for input(),
2276 * there's no matching to consider.
2277 * So convert the EOB_ACT_LAST_MATCH
2278 * to EOB_ACT_END_OF_FILE.
2281 /* Reset buffer status. */
2282 yyrestart(yyin );
2284 /*FALLTHROUGH*/
2286 case EOB_ACT_END_OF_FILE:
2288 if ( yywrap( ) )
2289 return EOF;
2291 if ( ! (yy_did_buffer_switch_on_eof) )
2292 YY_NEW_FILE;
2293 #ifdef __cplusplus
2294 return yyinput();
2295 #else
2296 return input();
2297 #endif
2300 case EOB_ACT_CONTINUE_SCAN:
2301 (yy_c_buf_p) = (yytext_ptr) + offset;
2302 break;
2307 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
2308 *(yy_c_buf_p) = '\0'; /* preserve yytext */
2309 (yy_hold_char) = *++(yy_c_buf_p);
2311 return c;
2313 #endif /* ifndef YY_NO_INPUT */
2315 /** Immediately switch to a different input stream.
2316 * @param input_file A readable stream.
2318 * @note This function does not reset the start condition to @c INITIAL .
2320 void yyrestart (FILE * input_file )
2323 if ( ! YY_CURRENT_BUFFER ){
2324 yyensure_buffer_stack ();
2325 YY_CURRENT_BUFFER_LVALUE =
2326 yy_create_buffer(yyin,YY_BUF_SIZE );
2329 yy_init_buffer(YY_CURRENT_BUFFER,input_file );
2330 yy_load_buffer_state( );
2333 /** Switch to a different input buffer.
2334 * @param new_buffer The new input buffer.
2337 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
2340 /* TODO. We should be able to replace this entire function body
2341 * with
2342 * yypop_buffer_state();
2343 * yypush_buffer_state(new_buffer);
2345 yyensure_buffer_stack ();
2346 if ( YY_CURRENT_BUFFER == new_buffer )
2347 return;
2349 if ( YY_CURRENT_BUFFER )
2351 /* Flush out information for old buffer. */
2352 *(yy_c_buf_p) = (yy_hold_char);
2353 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2354 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2357 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2358 yy_load_buffer_state( );
2360 /* We don't actually know whether we did this switch during
2361 * EOF (yywrap()) processing, but the only time this flag
2362 * is looked at is after yywrap() is called, so it's safe
2363 * to go ahead and always set it.
2365 (yy_did_buffer_switch_on_eof) = 1;
2368 static void yy_load_buffer_state (void)
2370 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2371 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2372 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2373 (yy_hold_char) = *(yy_c_buf_p);
2376 /** Allocate and initialize an input buffer state.
2377 * @param file A readable stream.
2378 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2380 * @return the allocated buffer state.
2382 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
2384 YY_BUFFER_STATE b;
2386 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
2387 if ( ! b )
2388 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2390 b->yy_buf_size = size;
2392 /* yy_ch_buf has to be 2 characters longer than the size given because
2393 * we need to put in 2 end-of-buffer characters.
2395 b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );
2396 if ( ! b->yy_ch_buf )
2397 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2399 b->yy_is_our_buffer = 1;
2401 yy_init_buffer(b,file );
2403 return b;
2406 /** Destroy the buffer.
2407 * @param b a buffer created with yy_create_buffer()
2410 void yy_delete_buffer (YY_BUFFER_STATE b )
2413 if ( ! b )
2414 return;
2416 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2417 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
2419 if ( b->yy_is_our_buffer )
2420 yyfree((void *) b->yy_ch_buf );
2422 yyfree((void *) b );
2425 /* Initializes or reinitializes a buffer.
2426 * This function is sometimes called more than once on the same buffer,
2427 * such as during a yyrestart() or at EOF.
2429 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
2432 int oerrno = errno;
2434 yy_flush_buffer(b );
2436 b->yy_input_file = file;
2437 b->yy_fill_buffer = 1;
2439 /* If b is the current buffer, then yy_init_buffer was _probably_
2440 * called from yyrestart() or through yy_get_next_buffer.
2441 * In that case, we don't want to reset the lineno or column.
2443 if (b != YY_CURRENT_BUFFER){
2444 b->yy_bs_lineno = 1;
2445 b->yy_bs_column = 0;
2448 b->yy_is_interactive = 0;
2450 errno = oerrno;
2453 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2454 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2457 void yy_flush_buffer (YY_BUFFER_STATE b )
2459 if ( ! b )
2460 return;
2462 b->yy_n_chars = 0;
2464 /* We always need two end-of-buffer characters. The first causes
2465 * a transition to the end-of-buffer state. The second causes
2466 * a jam in that state.
2468 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2469 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2471 b->yy_buf_pos = &b->yy_ch_buf[0];
2473 b->yy_at_bol = 1;
2474 b->yy_buffer_status = YY_BUFFER_NEW;
2476 if ( b == YY_CURRENT_BUFFER )
2477 yy_load_buffer_state( );
2480 /** Pushes the new state onto the stack. The new state becomes
2481 * the current state. This function will allocate the stack
2482 * if necessary.
2483 * @param new_buffer The new state.
2486 void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
2488 if (new_buffer == NULL)
2489 return;
2491 yyensure_buffer_stack();
2493 /* This block is copied from yy_switch_to_buffer. */
2494 if ( YY_CURRENT_BUFFER )
2496 /* Flush out information for old buffer. */
2497 *(yy_c_buf_p) = (yy_hold_char);
2498 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2499 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2502 /* Only push if top exists. Otherwise, replace top. */
2503 if (YY_CURRENT_BUFFER)
2504 (yy_buffer_stack_top)++;
2505 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2507 /* copied from yy_switch_to_buffer. */
2508 yy_load_buffer_state( );
2509 (yy_did_buffer_switch_on_eof) = 1;
2512 /** Removes and deletes the top of the stack, if present.
2513 * The next element becomes the new top.
2516 void yypop_buffer_state (void)
2518 if (!YY_CURRENT_BUFFER)
2519 return;
2521 yy_delete_buffer(YY_CURRENT_BUFFER );
2522 YY_CURRENT_BUFFER_LVALUE = NULL;
2523 if ((yy_buffer_stack_top) > 0)
2524 --(yy_buffer_stack_top);
2526 if (YY_CURRENT_BUFFER) {
2527 yy_load_buffer_state( );
2528 (yy_did_buffer_switch_on_eof) = 1;
2532 /* Allocates the stack if it does not exist.
2533 * Guarantees space for at least one push.
2535 static void yyensure_buffer_stack (void)
2537 int num_to_alloc;
2539 if (!(yy_buffer_stack)) {
2541 /* First allocation is just for 2 elements, since we don't know if this
2542 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2543 * immediate realloc on the next call.
2545 num_to_alloc = 1;
2546 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
2547 (num_to_alloc * sizeof(struct yy_buffer_state*)
2550 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2552 (yy_buffer_stack_max) = num_to_alloc;
2553 (yy_buffer_stack_top) = 0;
2554 return;
2557 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
2559 /* Increase the buffer to prepare for a possible push. */
2560 int grow_size = 8 /* arbitrary grow size */;
2562 num_to_alloc = (yy_buffer_stack_max) + grow_size;
2563 (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
2564 ((yy_buffer_stack),
2565 num_to_alloc * sizeof(struct yy_buffer_state*)
2568 /* zero only the new slots.*/
2569 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
2570 (yy_buffer_stack_max) = num_to_alloc;
2574 #ifndef YY_EXIT_FAILURE
2575 #define YY_EXIT_FAILURE 2
2576 #endif
2578 static void yy_fatal_error (yyconst char* msg )
2580 (void) fprintf( stderr, "%s\n", msg );
2581 exit( YY_EXIT_FAILURE );
2584 /* Redefine yyless() so it works in section 3 code. */
2586 #undef yyless
2587 #define yyless(n) \
2588 do \
2590 /* Undo effects of setting up yytext. */ \
2591 int yyless_macro_arg = (n); \
2592 YY_LESS_LINENO(yyless_macro_arg);\
2593 yytext[yyleng] = (yy_hold_char); \
2594 (yy_c_buf_p) = yytext + yyless_macro_arg; \
2595 (yy_hold_char) = *(yy_c_buf_p); \
2596 *(yy_c_buf_p) = '\0'; \
2597 yyleng = yyless_macro_arg; \
2599 while ( 0 )
2601 /* Accessor methods (get/set functions) to struct members. */
2603 /** Get the current line number.
2606 int yyget_lineno (void)
2609 return yylineno;
2612 /** Get the input stream.
2615 FILE *yyget_in (void)
2617 return yyin;
2620 /** Get the output stream.
2623 FILE *yyget_out (void)
2625 return yyout;
2628 /** Get the length of the current token.
2631 int yyget_leng (void)
2633 return yyleng;
2636 /** Get the current token.
2640 char *yyget_text (void)
2642 return yytext;
2645 /** Set the current line number.
2646 * @param line_number
2649 void yyset_lineno (int line_number )
2652 yylineno = line_number;
2655 /** Set the input stream. This does not discard the current
2656 * input buffer.
2657 * @param in_str A readable stream.
2659 * @see yy_switch_to_buffer
2661 void yyset_in (FILE * in_str )
2663 yyin = in_str ;
2666 void yyset_out (FILE * out_str )
2668 yyout = out_str ;
2671 int yyget_debug (void)
2673 return yy_flex_debug;
2676 void yyset_debug (int bdebug )
2678 yy_flex_debug = bdebug ;
2681 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
2682 int yylex_destroy (void)
2685 /* Pop the buffer stack, destroying each element. */
2686 while(YY_CURRENT_BUFFER){
2687 yy_delete_buffer(YY_CURRENT_BUFFER );
2688 YY_CURRENT_BUFFER_LVALUE = NULL;
2689 yypop_buffer_state();
2692 /* Destroy the stack itself. */
2693 yyfree((yy_buffer_stack) );
2694 (yy_buffer_stack) = NULL;
2696 return 0;
2700 * Internal utility routines.
2703 #ifndef yytext_ptr
2704 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
2706 register int i;
2707 for ( i = 0; i < n; ++i )
2708 s1[i] = s2[i];
2710 #endif
2712 #ifdef YY_NEED_STRLEN
2713 static int yy_flex_strlen (yyconst char * s )
2715 register int n;
2716 for ( n = 0; s[n]; ++n )
2719 return n;
2721 #endif
2723 void *yyalloc (yy_size_t size )
2725 return (void *) malloc( size );
2728 void *yyrealloc (void * ptr, yy_size_t size )
2730 /* The cast to (char *) in the following accommodates both
2731 * implementations that use char* generic pointers, and those
2732 * that use void* generic pointers. It works with the latter
2733 * because both ANSI C and C++ allow castless assignment from
2734 * any pointer type to void*, and deal with argument conversions
2735 * as though doing an assignment.
2737 return (void *) realloc( (char *) ptr, size );
2740 void yyfree (void * ptr )
2742 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
2745 #define YYTABLES_NAME "yytables"
2747 #undef YY_NEW_FILE
2748 #undef YY_FLUSH_BUFFER
2749 #undef yy_set_bol
2750 #undef yy_new_buffer
2751 #undef yy_set_interactive
2752 #undef yytext_ptr
2753 #undef YY_DO_BEFORE_ACTION
2755 #ifdef YY_DECL_IS_OURS
2756 #undef YY_DECL_IS_OURS
2757 #undef YY_DECL
2758 #endif
2759 #line 648 "pars0lex.l"