1
/*****************************************************************************
3
Copyright (c) 1995, 2009, Innobase Oy. All Rights Reserved.
5
This program is free software; you can redistribute it and/or modify it under
6
the terms of the GNU General Public License as published by the Free Software
7
Foundation; version 2 of the License.
9
This program is distributed in the hope that it will be useful, but WITHOUT
10
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
13
You should have received a copy of the GNU General Public License along with
14
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
15
Place, Suite 330, Boston, MA 02111-1307 USA
17
*****************************************************************************/
24
#define YY_INT_ALIGNED short int
26
/* A lexical scanner generated by flex */
29
#define YY_FLEX_MAJOR_VERSION 2
30
#define YY_FLEX_MINOR_VERSION 5
31
#define YY_FLEX_SUBMINOR_VERSION 31
32
#if YY_FLEX_SUBMINOR_VERSION > 0
36
/* First, we deal with platform-specific or compiler-specific issues. */
38
/* begin standard C headers. */
44
/* end standard C headers. */
46
/* flex integer type definitions */
51
/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
53
#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
55
typedef int8_t flex_int8_t;
56
typedef uint8_t flex_uint8_t;
57
typedef int16_t flex_int16_t;
58
typedef uint16_t flex_uint16_t;
59
typedef int32_t flex_int32_t;
60
typedef uint32_t flex_uint32_t;
62
typedef signed char flex_int8_t;
63
typedef short int flex_int16_t;
64
typedef int flex_int32_t;
65
typedef unsigned char flex_uint8_t;
66
typedef unsigned short int flex_uint16_t;
67
typedef unsigned int flex_uint32_t;
70
/* Limits of integral types. */
72
#define INT8_MIN (-128)
75
#define INT16_MIN (-32767-1)
78
#define INT32_MIN (-2147483647-1)
81
#define INT8_MAX (127)
84
#define INT16_MAX (32767)
87
#define INT32_MAX (2147483647)
90
#define UINT8_MAX (255U)
93
#define UINT16_MAX (65535U)
96
#define UINT32_MAX (4294967295U)
99
#endif /* ! FLEXINT_H */
103
/* The "const" storage-class-modifier is valid. */
106
#else /* ! __cplusplus */
112
#endif /* __STDC__ */
113
#endif /* ! __cplusplus */
116
#define yyconst const
121
/* Returned upon end-of-file. */
124
/* Promotes a possibly negative, possibly signed char to an unsigned
125
* integer for use as an array index. If the signed char is negative,
126
* we want to instead treat it as an 8-bit unsigned char, hence the
129
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
131
/* Enter a start condition. This macro really ought to take a parameter,
132
* but we do it the disgusting crufty way forced on us by the ()-less
133
* definition of BEGIN.
135
#define BEGIN (yy_start) = 1 + 2 *
137
/* Translate the current start state into a value that can be later handed
138
* to BEGIN to return to the state. The YYSTATE alias is for lex
141
#define YY_START (((yy_start) - 1) / 2)
142
#define YYSTATE YY_START
144
/* Action number for EOF rule of a given start state. */
145
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
147
/* Special action meaning "start processing a new file". */
148
#define YY_NEW_FILE yyrestart(yyin )
150
#define YY_END_OF_BUFFER_CHAR 0
152
/* Size of default input buffer. */
154
#define YY_BUF_SIZE 16384
157
#ifndef YY_TYPEDEF_YY_BUFFER_STATE
158
#define YY_TYPEDEF_YY_BUFFER_STATE
159
typedef struct yy_buffer_state *YY_BUFFER_STATE;
162
static FILE *yyin, *yyout;
164
#define EOB_ACT_CONTINUE_SCAN 0
165
#define EOB_ACT_END_OF_FILE 1
166
#define EOB_ACT_LAST_MATCH 2
168
#define YY_LESS_LINENO(n)
170
/* Return all but the first "n" matched characters back to the input stream. */
174
/* Undo effects of setting up yytext. */ \
175
int yyless_macro_arg = (n); \
176
YY_LESS_LINENO(yyless_macro_arg);\
177
*yy_cp = (yy_hold_char); \
178
YY_RESTORE_YY_MORE_OFFSET \
179
(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
180
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
184
#define unput(c) yyunput( c, (yytext_ptr) )
186
/* The following is because we cannot portably get our hands on size_t
187
* (without autoconf's help, which isn't available because we want
188
* flex-generated scanners to compile on their own).
191
#ifndef YY_TYPEDEF_YY_SIZE_T
192
#define YY_TYPEDEF_YY_SIZE_T
193
typedef unsigned int yy_size_t;
196
#ifndef YY_STRUCT_YY_BUFFER_STATE
197
#define YY_STRUCT_YY_BUFFER_STATE
198
struct yy_buffer_state
202
char *yy_ch_buf; /* input buffer */
203
char *yy_buf_pos; /* current position in input buffer */
205
/* Size of input buffer in bytes, not including room for EOB
208
yy_size_t yy_buf_size;
210
/* Number of characters read into yy_ch_buf, not including EOB
215
/* Whether we "own" the buffer - i.e., we know we created it,
216
* and can realloc() it to grow it, and should free() it to
219
int yy_is_our_buffer;
221
/* Whether this is an "interactive" input source; if so, and
222
* if we're using stdio for input, then we want to use getc()
223
* instead of fread(), to make sure we stop fetching input after
226
int yy_is_interactive;
228
/* Whether we're considered to be at the beginning of a line.
229
* If so, '^' rules will be active on the next match, otherwise
234
int yy_bs_lineno; /**< The line count. */
235
int yy_bs_column; /**< The column count. */
237
/* Whether to try to fill the input buffer when we reach the
242
int yy_buffer_status;
244
#define YY_BUFFER_NEW 0
245
#define YY_BUFFER_NORMAL 1
246
/* When an EOF's been seen but there's still some text to process
247
* then we mark the buffer as YY_EOF_PENDING, to indicate that we
248
* shouldn't try reading from the input source any more. We might
249
* still have a bunch of tokens to match, though, because of
250
* possible backing-up.
252
* When we actually see the EOF, we change the status to "new"
253
* (via yyrestart()), so that the user can continue scanning by
254
* just pointing yyin at a new input file.
256
#define YY_BUFFER_EOF_PENDING 2
259
#endif /* !YY_STRUCT_YY_BUFFER_STATE */
261
/* Stack of input buffers. */
262
static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
263
static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
264
static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
266
/* We provide macros for accessing buffer states in case in the
267
* future we want to put the buffer states in a more general
270
* Returns the top of the stack, or NULL.
272
#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
273
? (yy_buffer_stack)[(yy_buffer_stack_top)] \
276
/* Same as previous macro, but useful when we know that the buffer stack is not
277
* NULL or when we need an lvalue. For internal use only.
279
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
281
/* yy_hold_char holds the character lost when yytext is formed. */
282
static char yy_hold_char;
283
static int yy_n_chars; /* number of characters read into yy_ch_buf */
286
/* Points to current character in buffer. */
287
static char *yy_c_buf_p = (char *) 0;
288
static int yy_init = 1; /* whether we need to initialize */
289
static int yy_start = 0; /* start state number */
291
/* Flag which is used to allow yywrap()'s to do buffer switches
292
* instead of setting up a fresh yyin. A bit of a hack ...
294
static int yy_did_buffer_switch_on_eof;
296
static void yyrestart (FILE *input_file );
297
__attribute__((unused)) static void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
298
static YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
299
static void yy_delete_buffer (YY_BUFFER_STATE b );
300
static void yy_flush_buffer (YY_BUFFER_STATE b );
301
__attribute__((unused)) static void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
302
__attribute__((unused)) static void yypop_buffer_state (void );
304
static void yyensure_buffer_stack (void );
305
static void yy_load_buffer_state (void );
306
static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
308
#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
310
YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
311
YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
312
YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len );
314
static void *yyalloc (yy_size_t );
315
static void *yyrealloc (void *,yy_size_t );
316
static void yyfree (void * );
318
#define yy_new_buffer yy_create_buffer
320
#define yy_set_interactive(is_interactive) \
322
if ( ! YY_CURRENT_BUFFER ){ \
323
yyensure_buffer_stack (); \
324
YY_CURRENT_BUFFER_LVALUE = \
325
yy_create_buffer(yyin,YY_BUF_SIZE ); \
327
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
330
#define yy_set_bol(at_bol) \
332
if ( ! YY_CURRENT_BUFFER ){\
333
yyensure_buffer_stack (); \
334
YY_CURRENT_BUFFER_LVALUE = \
335
yy_create_buffer(yyin,YY_BUF_SIZE ); \
337
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
340
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
342
/* Begin user sect3 */
345
#define YY_SKIP_YYWRAP
347
typedef unsigned char YY_CHAR;
349
static FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
351
typedef int yy_state_type;
355
static int yylineno = 1;
358
#define yytext_ptr yytext
360
static yy_state_type yy_get_previous_state (void );
361
static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
362
static int yy_get_next_buffer (void );
363
static void yy_fatal_error (yyconst char msg[] );
365
/* Done after the current pattern has been matched and before the
366
* corresponding action - sets up yytext.
368
#define YY_DO_BEFORE_ACTION \
369
(yytext_ptr) = yy_bp; \
370
yyleng = (size_t) (yy_cp - yy_bp); \
371
(yy_hold_char) = *yy_cp; \
373
(yy_c_buf_p) = yy_cp;
375
#define YY_NUM_RULES 119
376
#define YY_END_OF_BUFFER 120
377
/* This struct is not used in this scanner,
378
but its presence is necessary. */
381
flex_int32_t yy_verify;
384
static yyconst flex_int16_t yy_accept[399] =
386
0, 0, 114, 114, 0, 0, 0, 0, 120, 118,
387
117, 117, 8, 118, 109, 5, 98, 104, 107, 105,
388
102, 106, 118, 108, 1, 118, 103, 101, 99, 100,
389
112, 92, 92, 92, 92, 92, 92, 92, 92, 92,
390
92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
391
110, 111, 114, 115, 6, 7, 9, 10, 117, 4,
392
93, 113, 2, 1, 3, 94, 95, 97, 96, 92,
393
92, 92, 92, 92, 92, 44, 92, 92, 92, 92,
394
92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
395
92, 92, 28, 17, 25, 92, 92, 92, 92, 92,
397
54, 61, 92, 14, 92, 92, 92, 92, 92, 92,
398
92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
399
92, 92, 114, 115, 115, 116, 6, 7, 9, 10,
400
2, 13, 45, 92, 92, 92, 92, 92, 92, 92,
401
92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
402
92, 27, 92, 92, 92, 41, 92, 92, 92, 92,
403
21, 92, 92, 92, 92, 15, 92, 92, 92, 18,
404
92, 92, 92, 92, 92, 80, 92, 92, 92, 51,
405
92, 12, 92, 36, 92, 92, 92, 92, 92, 92,
406
92, 92, 92, 92, 92, 92, 92, 92, 20, 24,
408
92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
409
46, 92, 92, 30, 92, 87, 92, 92, 39, 92,
410
92, 92, 92, 92, 48, 92, 89, 32, 91, 92,
411
11, 64, 92, 92, 92, 42, 92, 92, 92, 92,
412
92, 92, 92, 92, 92, 92, 29, 92, 92, 92,
413
92, 92, 92, 92, 92, 92, 85, 92, 26, 92,
414
66, 92, 92, 92, 37, 92, 92, 92, 92, 92,
415
92, 92, 31, 65, 23, 92, 57, 92, 75, 92,
416
92, 92, 43, 92, 92, 92, 92, 92, 92, 92,
417
92, 90, 92, 92, 56, 92, 92, 92, 92, 92,
419
92, 92, 40, 33, 79, 19, 92, 83, 74, 55,
420
92, 63, 92, 52, 92, 92, 92, 47, 92, 76,
421
92, 78, 92, 92, 34, 92, 92, 92, 35, 72,
422
92, 92, 92, 92, 58, 92, 50, 49, 92, 92,
423
53, 62, 92, 92, 92, 22, 92, 92, 73, 81,
424
92, 92, 77, 92, 68, 92, 92, 92, 92, 38,
425
92, 88, 67, 92, 84, 92, 92, 92, 86, 92,
426
59, 92, 16, 92, 70, 69, 92, 92, 82, 92,
427
92, 92, 92, 92, 92, 92, 92, 92, 92, 71,
428
92, 92, 92, 92, 92, 92, 60, 0
432
static yyconst flex_int32_t yy_ec[256] =
434
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
435
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
436
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
437
1, 2, 1, 4, 1, 5, 6, 1, 7, 8,
438
9, 10, 11, 12, 13, 14, 15, 16, 16, 16,
439
16, 16, 16, 16, 16, 16, 16, 17, 18, 19,
440
20, 21, 22, 1, 23, 24, 25, 26, 27, 28,
441
29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
442
39, 40, 41, 42, 43, 44, 45, 46, 47, 32,
443
1, 1, 1, 1, 48, 1, 32, 32, 32, 32,
445
32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
446
32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
447
32, 32, 49, 1, 50, 1, 1, 1, 1, 1,
448
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
449
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
450
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
451
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
452
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
453
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
454
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
456
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
457
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
458
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
459
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
460
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
464
static yyconst flex_int32_t yy_meta[51] =
466
1, 1, 1, 2, 1, 1, 3, 1, 1, 4,
467
1, 1, 1, 1, 1, 5, 1, 1, 1, 6,
468
1, 1, 5, 5, 5, 5, 5, 5, 5, 5,
469
5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
470
5, 5, 5, 5, 5, 5, 5, 5, 1, 1
473
static yyconst flex_int16_t yy_base[409] =
475
0, 0, 437, 436, 438, 437, 439, 438, 441, 448,
476
49, 51, 448, 0, 448, 448, 448, 448, 448, 448,
477
448, 448, 426, 429, 41, 418, 448, 38, 448, 417,
478
448, 20, 33, 32, 46, 40, 44, 0, 54, 52,
479
399, 48, 60, 395, 65, 67, 81, 27, 411, 75,
480
448, 448, 0, 98, 0, 426, 0, 428, 113, 0,
481
448, 448, 415, 54, 410, 448, 448, 448, 448, 0,
482
403, 68, 399, 391, 389, 0, 402, 80, 84, 397,
483
383, 96, 381, 394, 379, 393, 387, 375, 379, 375,
484
377, 377, 0, 98, 0, 376, 97, 385, 368, 375,
486
0, 0, 381, 381, 364, 94, 103, 379, 98, 65,
487
381, 369, 109, 361, 377, 373, 351, 97, 372, 363,
488
115, 356, 0, 137, 138, 448, 0, 388, 0, 390,
489
377, 0, 0, 365, 360, 367, 365, 348, 346, 345,
490
350, 359, 347, 359, 95, 347, 353, 354, 336, 336,
491
123, 0, 334, 350, 351, 0, 338, 347, 344, 122,
492
124, 341, 336, 330, 340, 338, 331, 328, 336, 0,
493
326, 336, 334, 325, 315, 309, 322, 307, 327, 0,
494
313, 0, 311, 0, 325, 316, 313, 131, 309, 316,
495
323, 302, 304, 309, 309, 301, 304, 299, 0, 0,
497
311, 295, 305, 312, 292, 291, 305, 294, 307, 287,
498
0, 297, 279, 0, 298, 0, 295, 282, 0, 281,
499
276, 281, 280, 290, 0, 276, 0, 0, 0, 280,
500
0, 0, 276, 273, 287, 0, 272, 272, 270, 286,
501
271, 283, 280, 264, 282, 277, 0, 272, 272, 258,
502
257, 270, 256, 270, 269, 268, 0, 252, 0, 246,
503
0, 265, 249, 248, 0, 262, 252, 247, 246, 258,
504
248, 247, 0, 0, 0, 251, 0, 239, 0, 253,
505
249, 235, 0, 249, 250, 233, 238, 231, 249, 231,
506
228, 0, 229, 226, 0, 231, 243, 230, 237, 227,
508
235, 220, 0, 0, 0, 212, 219, 0, 0, 0,
509
216, 0, 230, 0, 231, 218, 217, 0, 213, 0,
510
216, 0, 208, 210, 0, 209, 223, 216, 0, 0,
511
219, 222, 204, 219, 0, 215, 0, 0, 199, 213,
512
0, 0, 197, 196, 201, 0, 210, 195, 0, 0,
513
201, 197, 0, 192, 0, 204, 204, 192, 202, 0,
514
179, 0, 0, 199, 0, 183, 177, 183, 0, 174,
515
0, 193, 0, 192, 0, 0, 183, 187, 0, 174,
516
174, 180, 166, 189, 181, 180, 166, 151, 118, 0,
517
130, 136, 127, 123, 119, 111, 0, 448, 167, 173,
519
179, 152, 181, 124, 187, 193, 199, 205
522
static yyconst flex_int16_t yy_def[409] =
524
398, 1, 399, 399, 400, 400, 401, 401, 398, 398,
525
398, 398, 398, 402, 398, 398, 398, 398, 398, 398,
526
398, 398, 398, 398, 398, 403, 398, 398, 398, 398,
527
398, 404, 404, 404, 404, 404, 404, 404, 404, 404,
528
404, 404, 404, 404, 404, 404, 404, 404, 404, 404,
529
398, 398, 405, 406, 407, 398, 408, 398, 398, 402,
530
398, 398, 398, 398, 403, 398, 398, 398, 398, 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,
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, 405, 406, 406, 398, 407, 398, 408, 398,
538
398, 404, 404, 404, 404, 404, 404, 404, 404, 404,
539
404, 404, 404, 404, 404, 404, 404, 404, 404, 404,
540
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,
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, 404, 404, 404,
551
404, 404, 404, 404, 404, 404, 404, 404, 404, 404,
552
404, 404, 404, 404, 404, 404, 404, 404, 404, 404,
553
404, 404, 404, 404, 404, 404, 404, 404, 404, 404,
554
404, 404, 404, 404, 404, 404, 404, 404, 404, 404,
555
404, 404, 404, 404, 404, 404, 404, 404, 404, 404,
557
404, 404, 404, 404, 404, 404, 404, 404, 404, 404,
558
404, 404, 404, 404, 404, 404, 404, 404, 404, 404,
559
404, 404, 404, 404, 404, 404, 404, 404, 404, 404,
560
404, 404, 404, 404, 404, 404, 404, 404, 404, 404,
561
404, 404, 404, 404, 404, 404, 404, 404, 404, 404,
562
404, 404, 404, 404, 404, 404, 404, 404, 404, 404,
563
404, 404, 404, 404, 404, 404, 404, 404, 404, 404,
564
404, 404, 404, 404, 404, 404, 404, 404, 404, 404,
565
404, 404, 404, 404, 404, 404, 404, 404, 404, 404,
566
404, 404, 404, 404, 404, 404, 404, 0, 398, 398,
568
398, 398, 398, 398, 398, 398, 398, 398
571
static yyconst flex_int16_t yy_nxt[499] =
573
10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
574
20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
575
30, 31, 32, 33, 34, 35, 36, 37, 38, 38,
576
39, 38, 38, 40, 41, 42, 43, 44, 38, 45,
577
46, 47, 48, 49, 50, 38, 38, 38, 51, 52,
578
59, 59, 59, 59, 63, 71, 64, 67, 68, 73,
579
72, 77, 118, 74, 119, 78, 75, 63, 79, 64,
580
88, 80, 82, 85, 81, 86, 83, 89, 96, 76,
581
90, 93, 84, 91, 99, 87, 92, 101, 97, 94,
582
100, 107, 133, 110, 95, 102, 111, 103, 179, 104,
584
108, 109, 105, 115, 121, 112, 180, 125, 134, 113,
585
116, 122, 126, 114, 59, 59, 139, 117, 141, 142,
586
146, 163, 140, 159, 171, 173, 143, 189, 70, 147,
587
172, 177, 183, 164, 207, 208, 148, 190, 160, 161,
588
174, 193, 178, 184, 175, 194, 398, 125, 222, 214,
589
224, 398, 126, 215, 248, 249, 60, 397, 396, 395,
590
225, 394, 393, 223, 392, 391, 250, 53, 53, 53,
591
53, 53, 53, 55, 55, 55, 55, 55, 55, 57,
592
57, 57, 57, 57, 57, 65, 65, 123, 123, 123,
593
390, 123, 123, 124, 124, 124, 124, 124, 124, 127,
595
127, 389, 127, 127, 127, 129, 388, 129, 129, 129,
596
129, 387, 386, 385, 384, 383, 382, 381, 380, 379,
597
378, 377, 376, 375, 374, 373, 372, 371, 370, 369,
598
368, 367, 366, 365, 364, 363, 362, 361, 360, 359,
599
358, 357, 356, 355, 354, 353, 352, 351, 350, 349,
600
348, 347, 346, 345, 344, 343, 342, 341, 340, 339,
601
338, 337, 336, 335, 334, 333, 332, 331, 330, 329,
602
328, 327, 326, 325, 324, 323, 322, 321, 320, 319,
603
318, 317, 316, 315, 314, 313, 312, 311, 310, 309,
604
308, 307, 306, 305, 304, 303, 302, 301, 300, 299,
606
298, 297, 296, 295, 294, 293, 292, 291, 290, 289,
607
288, 287, 286, 285, 284, 283, 282, 281, 280, 279,
608
278, 277, 276, 275, 274, 273, 272, 271, 270, 269,
609
268, 267, 266, 265, 264, 263, 262, 261, 260, 259,
610
258, 257, 256, 255, 254, 253, 252, 251, 247, 246,
611
245, 244, 243, 242, 241, 240, 239, 238, 237, 236,
612
235, 234, 233, 232, 231, 230, 229, 228, 227, 226,
613
221, 220, 219, 218, 217, 216, 213, 212, 211, 210,
614
209, 206, 205, 204, 203, 202, 201, 200, 199, 198,
615
197, 196, 131, 130, 128, 195, 192, 191, 188, 187,
617
186, 185, 182, 181, 176, 170, 169, 168, 167, 166,
618
165, 162, 158, 157, 156, 155, 154, 153, 152, 151,
619
150, 149, 145, 144, 138, 137, 136, 135, 132, 398,
620
131, 130, 128, 120, 106, 98, 69, 66, 62, 61,
621
398, 58, 58, 56, 56, 54, 54, 9, 398, 398,
622
398, 398, 398, 398, 398, 398, 398, 398, 398, 398,
623
398, 398, 398, 398, 398, 398, 398, 398, 398, 398,
624
398, 398, 398, 398, 398, 398, 398, 398, 398, 398,
625
398, 398, 398, 398, 398, 398, 398, 398, 398, 398,
626
398, 398, 398, 398, 398, 398, 398, 398
630
static yyconst flex_int16_t yy_chk[499] =
632
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
633
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
634
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
635
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
636
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
637
11, 11, 12, 12, 25, 32, 25, 28, 28, 33,
638
32, 34, 48, 33, 48, 34, 33, 64, 34, 64,
639
37, 34, 35, 36, 34, 36, 35, 37, 40, 33,
640
37, 39, 35, 37, 42, 36, 37, 43, 40, 39,
641
42, 45, 72, 46, 39, 43, 46, 43, 110, 43,
643
45, 45, 43, 47, 50, 46, 110, 54, 72, 46,
644
47, 50, 54, 46, 59, 59, 78, 47, 79, 79,
645
82, 97, 78, 94, 106, 107, 79, 118, 404, 82,
646
106, 109, 113, 97, 145, 145, 82, 118, 94, 94,
647
107, 121, 109, 113, 107, 121, 124, 125, 160, 151,
648
161, 124, 125, 151, 188, 188, 402, 396, 395, 394,
649
161, 393, 392, 160, 391, 389, 188, 399, 399, 399,
650
399, 399, 399, 400, 400, 400, 400, 400, 400, 401,
651
401, 401, 401, 401, 401, 403, 403, 405, 405, 405,
652
388, 405, 405, 406, 406, 406, 406, 406, 406, 407,
654
407, 387, 407, 407, 407, 408, 386, 408, 408, 408,
655
408, 385, 384, 383, 382, 381, 380, 378, 377, 374,
656
372, 370, 368, 367, 366, 364, 361, 359, 358, 357,
657
356, 354, 352, 351, 348, 347, 345, 344, 343, 340,
658
339, 336, 334, 333, 332, 331, 328, 327, 326, 324,
659
323, 321, 319, 317, 316, 315, 313, 311, 307, 306,
660
302, 301, 300, 299, 298, 297, 296, 294, 293, 291,
661
290, 289, 288, 287, 286, 285, 284, 282, 281, 280,
662
278, 276, 272, 271, 270, 269, 268, 267, 266, 264,
663
263, 262, 260, 258, 256, 255, 254, 253, 252, 251,
665
250, 249, 248, 246, 245, 244, 243, 242, 241, 240,
666
239, 238, 237, 235, 234, 233, 230, 226, 224, 223,
667
222, 221, 220, 218, 217, 215, 213, 212, 210, 209,
668
208, 207, 206, 205, 204, 203, 202, 201, 198, 197,
669
196, 195, 194, 193, 192, 191, 190, 189, 187, 186,
670
185, 183, 181, 179, 178, 177, 176, 175, 174, 173,
671
172, 171, 169, 168, 167, 166, 165, 164, 163, 162,
672
159, 158, 157, 155, 154, 153, 150, 149, 148, 147,
673
146, 144, 143, 142, 141, 140, 139, 138, 137, 136,
674
135, 134, 131, 130, 128, 122, 120, 119, 117, 116,
676
115, 114, 112, 111, 108, 105, 104, 103, 100, 99,
677
98, 96, 92, 91, 90, 89, 88, 87, 86, 85,
678
84, 83, 81, 80, 77, 75, 74, 73, 71, 65,
679
63, 58, 56, 49, 44, 41, 30, 26, 24, 23,
680
9, 8, 7, 6, 5, 4, 3, 398, 398, 398,
681
398, 398, 398, 398, 398, 398, 398, 398, 398, 398,
682
398, 398, 398, 398, 398, 398, 398, 398, 398, 398,
683
398, 398, 398, 398, 398, 398, 398, 398, 398, 398,
684
398, 398, 398, 398, 398, 398, 398, 398, 398, 398,
685
398, 398, 398, 398, 398, 398, 398, 398
689
static yy_state_type yy_last_accepting_state;
690
static char *yy_last_accepting_cpos;
692
static int yy_flex_debug;
693
static int yy_flex_debug = 0;
695
/* The intent behind this definition is that it'll catch
696
* any uses of REJECT which flex missed.
698
#define REJECT reject_used_but_not_detected
699
#define yymore() yymore_used_but_not_detected
700
#define YY_MORE_ADJ 0
701
#define YY_RESTORE_YY_MORE_OFFSET
703
/******************************************************
704
SQL parser lexical analyzer: input file for the GNU Flex lexer generator
708
Created 12/14/1997 Heikki Tuuri
709
Published under the GPL version 2
711
The InnoDB parser is frozen because MySQL takes care of SQL parsing.
712
Therefore we normally keep the InnoDB parser C files as they are, and do
713
not automatically generate them from pars0grm.y and pars0lex.l.
715
How to make the InnoDB parser and lexer C files:
717
1. Run ./make_flex.sh to generate lexer files.
719
2. Run ./make_bison.sh to generate parser files.
721
These instructions seem to work at least with bison-1.875d and flex-2.5.31 on
723
*******************************************************/
724
#define YY_NO_INPUT 1
725
#define YY_NO_UNISTD_H 1
726
#line 38 "pars0lex.l"
727
#define YYSTYPE que_node_t*
730
#include "pars0pars.h"
731
#include "pars0grm.h"
732
#include "pars0sym.h"
736
#define malloc(A) ut_malloc(A)
737
#define free(A) ut_free(A)
738
#define realloc(P, A) ut_realloc(P, A)
739
#define exit(A) ut_error
741
#define YY_INPUT(buf, result, max_size) pars_get_lex_chars(buf, &result, max_size)
743
/* String buffer for removing quotes */
744
static ulint stringbuf_len_alloc = 0; /* Allocated length */
745
static ulint stringbuf_len = 0; /* Current length */
746
static char* stringbuf; /* Start of buffer */
747
/* Appends a string to the buffer. */
752
const char* str, /* in: string to be appended */
753
ulint len) /* in: length of the string */
755
if (stringbuf == NULL) {
756
stringbuf = malloc(1);
757
stringbuf_len_alloc = 1;
760
if (stringbuf_len + len > stringbuf_len_alloc) {
761
while (stringbuf_len + len > stringbuf_len_alloc) {
762
stringbuf_len_alloc <<= 1;
764
stringbuf = realloc(stringbuf, stringbuf_len_alloc);
767
memcpy(stringbuf + stringbuf_len, str, len);
768
stringbuf_len += len;
781
#ifndef YY_NO_UNISTD_H
782
/* Special case for "unistd.h", since it is non-ANSI. We include it way
783
* down here because we want the user's section 1 to have been scanned first.
784
* The user has a chance to override it with an option.
789
#ifndef YY_EXTRA_TYPE
790
#define YY_EXTRA_TYPE void *
793
/* Macros after this point can all be overridden by user definitions in
797
#ifndef YY_SKIP_YYWRAP
799
extern "C" int yywrap (void );
801
extern int yywrap (void );
806
static void yy_flex_strncpy (char *,yyconst char *,int );
809
#ifdef YY_NEED_STRLEN
810
static int yy_flex_strlen (yyconst char * );
816
static int yyinput (void );
818
static int input (void );
823
/* Amount of stuff to slurp up with each read. */
824
#ifndef YY_READ_BUF_SIZE
825
#define YY_READ_BUF_SIZE 8192
828
/* Copy whatever the last rule matched to the standard output. */
830
/* This used to be an fputs(), but since the string might contain NUL's,
831
* we now use fwrite().
833
#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
836
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
837
* is returned in "result".
840
#define YY_INPUT(buf,result,max_size) \
841
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
845
for ( n = 0; n < max_size && \
846
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
849
buf[n++] = (char) c; \
850
if ( c == EOF && ferror( yyin ) ) \
851
YY_FATAL_ERROR( "input in flex scanner failed" ); \
857
while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
859
if( errno != EINTR) \
861
YY_FATAL_ERROR( "input in flex scanner failed" ); \
872
/* No semi-colon after return; correct usage is to write "yyterminate();" -
873
* we don't want an extra ';' after the "return" because that will cause
874
* some compilers to complain about unreachable statements.
877
#define yyterminate() return YY_NULL
880
/* Number of entries by which start-condition stack grows. */
881
#ifndef YY_START_STACK_INCR
882
#define YY_START_STACK_INCR 25
885
/* Report a fatal error. */
886
#ifndef YY_FATAL_ERROR
887
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
890
/* end tables serialization structures and prototypes */
892
/* Default declaration of generated scanner - a define so the user can
893
* easily add parameters.
896
#define YY_DECL_IS_OURS 1
898
UNIV_INTERN int yylex (void);
900
#define YY_DECL UNIV_INTERN int yylex (void)
901
#endif /* !YY_DECL */
903
/* Code executed at the beginning of each rule, after yytext and yyleng
906
#ifndef YY_USER_ACTION
907
#define YY_USER_ACTION
910
/* Code executed at the end of each rule. */
912
#define YY_BREAK break;
915
#define YY_RULE_SETUP \
918
/** The main scanner function which does all the work.
922
register yy_state_type yy_current_state;
923
register char *yy_cp, *yy_bp;
926
#line 92 "pars0lex.l"
940
(yy_start) = 1; /* first start state */
948
if ( ! YY_CURRENT_BUFFER ) {
949
yyensure_buffer_stack ();
950
YY_CURRENT_BUFFER_LVALUE =
951
yy_create_buffer(yyin,YY_BUF_SIZE );
954
yy_load_buffer_state( );
957
while ( 1 ) /* loops until end-of-file is reached */
959
yy_cp = (yy_c_buf_p);
961
/* Support of yytext. */
962
*yy_cp = (yy_hold_char);
964
/* yy_bp points to the position in yy_ch_buf of the start of
969
yy_current_state = (yy_start);
973
register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
974
if ( yy_accept[yy_current_state] )
976
(yy_last_accepting_state) = yy_current_state;
977
(yy_last_accepting_cpos) = yy_cp;
979
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
981
yy_current_state = (int) yy_def[yy_current_state];
982
if ( yy_current_state >= 399 )
983
yy_c = yy_meta[(unsigned int) yy_c];
985
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
988
while ( yy_current_state != 398 );
989
yy_cp = (yy_last_accepting_cpos);
990
yy_current_state = (yy_last_accepting_state);
993
yy_act = yy_accept[yy_current_state];
997
do_action: /* This label is used only to access EOF actions. */
1000
{ /* beginning of action switch */
1001
case 0: /* must back up */
1002
/* undo the effects of YY_DO_BEFORE_ACTION */
1003
*yy_cp = (yy_hold_char);
1004
yy_cp = (yy_last_accepting_cpos);
1005
yy_current_state = (yy_last_accepting_state);
1006
goto yy_find_action;
1010
#line 94 "pars0lex.l"
1012
yylval = sym_tab_add_int_lit(pars_sym_tab_global,
1014
return(PARS_INT_LIT);
1019
#line 100 "pars0lex.l"
1021
ut_error; /* not implemented */
1023
return(PARS_FLOAT_LIT);
1028
#line 106 "pars0lex.l"
1032
yylval = sym_tab_add_bound_lit(pars_sym_tab_global,
1040
#line 115 "pars0lex.l"
1042
yylval = sym_tab_add_bound_id(pars_sym_tab_global,
1045
return(PARS_ID_TOKEN);
1050
#line 122 "pars0lex.l"
1052
/* Quoted character string literals are handled in an explicit
1053
start state 'quoted'. This state is entered and the buffer for
1054
the scanned string is emptied upon encountering a starting quote.
1056
In the state 'quoted', only two actions are possible (defined below). */
1062
/* rule 6 can match eol */
1064
#line 131 "pars0lex.l"
1066
/* Got a sequence of characters other than "'":
1067
append to string buffer */
1068
string_append(yytext, yyleng);
1073
#line 136 "pars0lex.l"
1075
/* Got a sequence of "'" characters:
1076
append half of them to string buffer,
1077
as "''" represents a single "'".
1078
We apply truncating division,
1079
so that "'''" will result in "'". */
1081
string_append(yytext, yyleng / 2);
1083
/* If we got an odd number of quotes, then the
1084
last quote we got is the terminating quote.
1085
At the end of the string, we return to the
1086
initial start state and report the scanned
1091
yylval = sym_tab_add_str_lit(
1092
pars_sym_tab_global,
1093
(byte*) stringbuf, stringbuf_len);
1094
return(PARS_STR_LIT);
1100
#line 160 "pars0lex.l"
1102
/* Quoted identifiers are handled in an explicit start state 'id'.
1103
This state is entered and the buffer for the scanned string is emptied
1104
upon encountering a starting quote.
1106
In the state 'id', only two actions are possible (defined below). */
1112
/* rule 9 can match eol */
1114
#line 169 "pars0lex.l"
1116
/* Got a sequence of characters other than '"':
1117
append to string buffer */
1118
string_append(yytext, yyleng);
1123
#line 174 "pars0lex.l"
1125
/* Got a sequence of '"' characters:
1126
append half of them to string buffer,
1127
as '""' represents a single '"'.
1128
We apply truncating division,
1129
so that '"""' will result in '"'. */
1131
string_append(yytext, yyleng / 2);
1133
/* If we got an odd number of quotes, then the
1134
last quote we got is the terminating quote.
1135
At the end of the string, we return to the
1136
initial start state and report the scanned
1141
yylval = sym_tab_add_id(
1142
pars_sym_tab_global,
1143
(byte*) stringbuf, stringbuf_len);
1145
return(PARS_ID_TOKEN);
1151
#line 199 "pars0lex.l"
1153
yylval = sym_tab_add_null_lit(pars_sym_tab_global);
1155
return(PARS_NULL_LIT);
1160
#line 205 "pars0lex.l"
1162
/* Implicit cursor name */
1163
yylval = sym_tab_add_str_lit(pars_sym_tab_global,
1164
(byte*) yytext, yyleng);
1165
return(PARS_SQL_TOKEN);
1170
#line 212 "pars0lex.l"
1172
return(PARS_AND_TOKEN);
1177
#line 216 "pars0lex.l"
1179
return(PARS_OR_TOKEN);
1184
#line 220 "pars0lex.l"
1186
return(PARS_NOT_TOKEN);
1191
#line 224 "pars0lex.l"
1193
return(PARS_PROCEDURE_TOKEN);
1198
#line 228 "pars0lex.l"
1200
return(PARS_IN_TOKEN);
1205
#line 232 "pars0lex.l"
1207
return(PARS_OUT_TOKEN);
1212
#line 236 "pars0lex.l"
1214
return(PARS_BINARY_TOKEN);
1219
#line 240 "pars0lex.l"
1221
return(PARS_BLOB_TOKEN);
1226
#line 244 "pars0lex.l"
1228
return(PARS_INT_TOKEN);
1233
#line 248 "pars0lex.l"
1235
return(PARS_INT_TOKEN);
1240
#line 252 "pars0lex.l"
1242
return(PARS_FLOAT_TOKEN);
1247
#line 256 "pars0lex.l"
1249
return(PARS_CHAR_TOKEN);
1254
#line 260 "pars0lex.l"
1256
return(PARS_IS_TOKEN);
1261
#line 264 "pars0lex.l"
1263
return(PARS_BEGIN_TOKEN);
1268
#line 268 "pars0lex.l"
1270
return(PARS_END_TOKEN);
1275
#line 272 "pars0lex.l"
1277
return(PARS_IF_TOKEN);
1282
#line 276 "pars0lex.l"
1284
return(PARS_THEN_TOKEN);
1289
#line 280 "pars0lex.l"
1291
return(PARS_ELSE_TOKEN);
1296
#line 284 "pars0lex.l"
1298
return(PARS_ELSIF_TOKEN);
1303
#line 288 "pars0lex.l"
1305
return(PARS_LOOP_TOKEN);
1310
#line 292 "pars0lex.l"
1312
return(PARS_WHILE_TOKEN);
1317
#line 296 "pars0lex.l"
1319
return(PARS_RETURN_TOKEN);
1324
#line 300 "pars0lex.l"
1326
return(PARS_SELECT_TOKEN);
1331
#line 304 "pars0lex.l"
1333
return(PARS_SUM_TOKEN);
1338
#line 308 "pars0lex.l"
1340
return(PARS_COUNT_TOKEN);
1345
#line 312 "pars0lex.l"
1347
return(PARS_DISTINCT_TOKEN);
1352
#line 316 "pars0lex.l"
1354
return(PARS_FROM_TOKEN);
1359
#line 320 "pars0lex.l"
1361
return(PARS_WHERE_TOKEN);
1366
#line 324 "pars0lex.l"
1368
return(PARS_FOR_TOKEN);
1373
#line 328 "pars0lex.l"
1375
return(PARS_READ_TOKEN);
1380
#line 332 "pars0lex.l"
1382
return(PARS_ORDER_TOKEN);
1387
#line 336 "pars0lex.l"
1389
return(PARS_BY_TOKEN);
1394
#line 340 "pars0lex.l"
1396
return(PARS_ASC_TOKEN);
1401
#line 344 "pars0lex.l"
1403
return(PARS_DESC_TOKEN);
1408
#line 348 "pars0lex.l"
1410
return(PARS_INSERT_TOKEN);
1415
#line 352 "pars0lex.l"
1417
return(PARS_INTO_TOKEN);
1422
#line 356 "pars0lex.l"
1424
return(PARS_VALUES_TOKEN);
1429
#line 360 "pars0lex.l"
1431
return(PARS_UPDATE_TOKEN);
1436
#line 364 "pars0lex.l"
1438
return(PARS_SET_TOKEN);
1443
#line 368 "pars0lex.l"
1445
return(PARS_DELETE_TOKEN);
1450
#line 372 "pars0lex.l"
1452
return(PARS_CURRENT_TOKEN);
1457
#line 376 "pars0lex.l"
1459
return(PARS_OF_TOKEN);
1464
#line 380 "pars0lex.l"
1466
return(PARS_CREATE_TOKEN);
1471
#line 384 "pars0lex.l"
1473
return(PARS_TABLE_TOKEN);
1478
#line 388 "pars0lex.l"
1480
return(PARS_INDEX_TOKEN);
1485
#line 392 "pars0lex.l"
1487
return(PARS_UNIQUE_TOKEN);
1492
#line 396 "pars0lex.l"
1494
return(PARS_CLUSTERED_TOKEN);
1499
#line 400 "pars0lex.l"
1501
return(PARS_DOES_NOT_FIT_IN_MEM_TOKEN);
1506
#line 404 "pars0lex.l"
1508
return(PARS_ON_TOKEN);
1513
#line 408 "pars0lex.l"
1515
return(PARS_DECLARE_TOKEN);
1520
#line 412 "pars0lex.l"
1522
return(PARS_CURSOR_TOKEN);
1527
#line 416 "pars0lex.l"
1529
return(PARS_OPEN_TOKEN);
1534
#line 420 "pars0lex.l"
1536
return(PARS_FETCH_TOKEN);
1541
#line 424 "pars0lex.l"
1543
return(PARS_CLOSE_TOKEN);
1548
#line 428 "pars0lex.l"
1550
return(PARS_NOTFOUND_TOKEN);
1555
#line 432 "pars0lex.l"
1557
return(PARS_TO_CHAR_TOKEN);
1562
#line 436 "pars0lex.l"
1564
return(PARS_TO_NUMBER_TOKEN);
1569
#line 440 "pars0lex.l"
1571
return(PARS_TO_BINARY_TOKEN);
1576
#line 444 "pars0lex.l"
1578
return(PARS_BINARY_TO_NUMBER_TOKEN);
1583
#line 448 "pars0lex.l"
1585
return(PARS_SUBSTR_TOKEN);
1590
#line 452 "pars0lex.l"
1592
return(PARS_REPLSTR_TOKEN);
1597
#line 456 "pars0lex.l"
1599
return(PARS_CONCAT_TOKEN);
1604
#line 460 "pars0lex.l"
1606
return(PARS_INSTR_TOKEN);
1611
#line 464 "pars0lex.l"
1613
return(PARS_LENGTH_TOKEN);
1618
#line 468 "pars0lex.l"
1620
return(PARS_SYSDATE_TOKEN);
1625
#line 472 "pars0lex.l"
1627
return(PARS_PRINTF_TOKEN);
1632
#line 476 "pars0lex.l"
1634
return(PARS_ASSERT_TOKEN);
1639
#line 480 "pars0lex.l"
1641
return(PARS_RND_TOKEN);
1646
#line 484 "pars0lex.l"
1648
return(PARS_RND_STR_TOKEN);
1653
#line 488 "pars0lex.l"
1655
return(PARS_ROW_PRINTF_TOKEN);
1660
#line 492 "pars0lex.l"
1662
return(PARS_COMMIT_TOKEN);
1667
#line 496 "pars0lex.l"
1669
return(PARS_ROLLBACK_TOKEN);
1674
#line 500 "pars0lex.l"
1676
return(PARS_WORK_TOKEN);
1681
#line 504 "pars0lex.l"
1683
return(PARS_UNSIGNED_TOKEN);
1688
#line 508 "pars0lex.l"
1690
return(PARS_EXIT_TOKEN);
1695
#line 512 "pars0lex.l"
1697
return(PARS_FUNCTION_TOKEN);
1702
#line 516 "pars0lex.l"
1704
return(PARS_LOCK_TOKEN);
1709
#line 520 "pars0lex.l"
1711
return(PARS_SHARE_TOKEN);
1716
#line 524 "pars0lex.l"
1718
return(PARS_MODE_TOKEN);
1723
#line 528 "pars0lex.l"
1725
yylval = sym_tab_add_id(pars_sym_tab_global,
1728
return(PARS_ID_TOKEN);
1733
#line 535 "pars0lex.l"
1735
return(PARS_DDOT_TOKEN);
1740
#line 539 "pars0lex.l"
1742
return(PARS_ASSIGN_TOKEN);
1747
#line 543 "pars0lex.l"
1749
return(PARS_LE_TOKEN);
1754
#line 547 "pars0lex.l"
1756
return(PARS_GE_TOKEN);
1761
#line 551 "pars0lex.l"
1763
return(PARS_NE_TOKEN);
1768
#line 555 "pars0lex.l"
1771
return((int)(*yytext));
1776
#line 560 "pars0lex.l"
1779
return((int)(*yytext));
1784
#line 565 "pars0lex.l"
1787
return((int)(*yytext));
1792
#line 570 "pars0lex.l"
1795
return((int)(*yytext));
1800
#line 575 "pars0lex.l"
1803
return((int)(*yytext));
1808
#line 580 "pars0lex.l"
1811
return((int)(*yytext));
1816
#line 585 "pars0lex.l"
1819
return((int)(*yytext));
1824
#line 590 "pars0lex.l"
1827
return((int)(*yytext));
1832
#line 595 "pars0lex.l"
1835
return((int)(*yytext));
1840
#line 600 "pars0lex.l"
1843
return((int)(*yytext));
1848
#line 605 "pars0lex.l"
1851
return((int)(*yytext));
1856
#line 610 "pars0lex.l"
1859
return((int)(*yytext));
1864
#line 615 "pars0lex.l"
1867
return((int)(*yytext));
1872
#line 620 "pars0lex.l"
1875
return((int)(*yytext));
1880
#line 625 "pars0lex.l"
1883
return((int)(*yytext));
1888
#line 630 "pars0lex.l"
1889
BEGIN(comment); /* eat up comment */
1892
/* rule 114 can match eol */
1894
#line 632 "pars0lex.l"
1898
/* rule 115 can match eol */
1900
#line 633 "pars0lex.l"
1905
#line 634 "pars0lex.l"
1909
/* rule 117 can match eol */
1911
#line 636 "pars0lex.l"
1912
/* eat up whitespace */
1916
#line 639 "pars0lex.l"
1918
fprintf(stderr,"Unrecognized character: %02x\n",
1928
#line 648 "pars0lex.l"
1929
YY_FATAL_ERROR( "flex scanner jammed" );
1931
#line 1916 "lexyy.c"
1932
case YY_STATE_EOF(INITIAL):
1933
case YY_STATE_EOF(comment):
1934
case YY_STATE_EOF(quoted):
1935
case YY_STATE_EOF(id):
1938
case YY_END_OF_BUFFER:
1940
/* Amount of text matched not including the EOB char. */
1941
int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1943
/* Undo the effects of YY_DO_BEFORE_ACTION. */
1944
*yy_cp = (yy_hold_char);
1945
YY_RESTORE_YY_MORE_OFFSET
1947
if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1949
/* We're scanning a new file or input source. It's
1950
* possible that this happened because the user
1951
* just pointed yyin at a new source and called
1952
* yylex(). If so, then we have to assure
1953
* consistency between YY_CURRENT_BUFFER and our
1954
* globals. Here is the right place to do so, because
1955
* this is the first action (other than possibly a
1956
* back-up) that will match for the new input source.
1958
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1959
YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1960
YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1963
/* Note that here we test for yy_c_buf_p "<=" to the position
1964
* of the first EOB in the buffer, since yy_c_buf_p will
1965
* already have been incremented past the NUL character
1966
* (since all states make transitions on EOB to the
1967
* end-of-buffer state). Contrast this with the test
1970
if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1971
{ /* This was really a NUL. */
1972
yy_state_type yy_next_state;
1974
(yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1976
yy_current_state = yy_get_previous_state( );
1978
/* Okay, we're now positioned to make the NUL
1979
* transition. We couldn't have
1980
* yy_get_previous_state() go ahead and do it
1981
* for us because it doesn't know how to deal
1982
* with the possibility of jamming (and we don't
1983
* want to build jamming into it because then it
1984
* will run more slowly).
1987
yy_next_state = yy_try_NUL_trans( yy_current_state );
1989
yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1991
if ( yy_next_state )
1993
/* Consume the NUL. */
1994
yy_cp = ++(yy_c_buf_p);
1995
yy_current_state = yy_next_state;
2001
yy_cp = (yy_last_accepting_cpos);
2002
yy_current_state = (yy_last_accepting_state);
2003
goto yy_find_action;
2007
else switch ( yy_get_next_buffer( ) )
2009
case EOB_ACT_END_OF_FILE:
2011
(yy_did_buffer_switch_on_eof) = 0;
2015
/* Note: because we've taken care in
2016
* yy_get_next_buffer() to have set up
2017
* yytext, we can now set up
2018
* yy_c_buf_p so that if some total
2019
* hoser (like flex itself) wants to
2020
* call the scanner after we return the
2021
* YY_NULL, it'll still work - another
2022
* YY_NULL will get returned.
2024
(yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
2026
yy_act = YY_STATE_EOF(YY_START);
2032
if ( ! (yy_did_buffer_switch_on_eof) )
2038
case EOB_ACT_CONTINUE_SCAN:
2040
(yytext_ptr) + yy_amount_of_matched_text;
2042
yy_current_state = yy_get_previous_state( );
2044
yy_cp = (yy_c_buf_p);
2045
yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2048
case EOB_ACT_LAST_MATCH:
2050
&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
2052
yy_current_state = yy_get_previous_state( );
2054
yy_cp = (yy_c_buf_p);
2055
yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2056
goto yy_find_action;
2063
"fatal flex scanner internal error--no action found" );
2064
} /* end of action switch */
2065
} /* end of scanning one token */
2066
} /* end of yylex */
2068
/* yy_get_next_buffer - try to read in a new buffer
2070
* Returns a code representing an action:
2071
* EOB_ACT_LAST_MATCH -
2072
* EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2073
* EOB_ACT_END_OF_FILE - end of file
2075
static int yy_get_next_buffer (void)
2077
register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
2078
register char *source = (yytext_ptr);
2079
register int number_to_move, i;
2082
if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
2084
"fatal flex scanner internal error--end of buffer missed" );
2086
if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
2087
{ /* Don't try to fill the buffer, so this is an EOF. */
2088
if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
2090
/* We matched a single character, the EOB, so
2091
* treat this as a final EOF.
2093
return EOB_ACT_END_OF_FILE;
2098
/* We matched some text prior to the EOB, first
2101
return EOB_ACT_LAST_MATCH;
2105
/* Try to read more data. */
2107
/* First move last chars to start of buffer. */
2108
number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
2110
for ( i = 0; i < number_to_move; ++i )
2111
*(dest++) = *(source++);
2113
if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2114
/* don't do the read, it's not guaranteed to return an EOF,
2117
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
2121
size_t num_to_read =
2122
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
2124
while ( num_to_read <= 0 )
2125
{ /* Not enough room in the buffer - grow it. */
2127
/* just a shorter name for the current buffer */
2128
YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
2130
int yy_c_buf_p_offset =
2131
(int) ((yy_c_buf_p) - b->yy_ch_buf);
2133
if ( b->yy_is_our_buffer )
2135
int new_size = b->yy_buf_size * 2;
2137
if ( new_size <= 0 )
2138
b->yy_buf_size += b->yy_buf_size / 8;
2140
b->yy_buf_size *= 2;
2142
b->yy_ch_buf = (char *)
2143
/* Include room in for 2 EOB chars. */
2144
yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
2147
/* Can't grow it, we don't own it. */
2150
if ( ! b->yy_ch_buf )
2152
"fatal error - scanner input buffer overflow" );
2154
(yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
2156
num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
2161
if ( num_to_read > YY_READ_BUF_SIZE )
2162
num_to_read = YY_READ_BUF_SIZE;
2164
/* Read in more data. */
2165
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2166
(yy_n_chars), num_to_read );
2168
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2171
if ( (yy_n_chars) == 0 )
2173
if ( number_to_move == YY_MORE_ADJ )
2175
ret_val = EOB_ACT_END_OF_FILE;
2181
ret_val = EOB_ACT_LAST_MATCH;
2182
YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
2183
YY_BUFFER_EOF_PENDING;
2188
ret_val = EOB_ACT_CONTINUE_SCAN;
2190
(yy_n_chars) += number_to_move;
2191
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
2192
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
2194
(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
2199
/* yy_get_previous_state - get the state just before the EOB char was reached */
2201
static yy_state_type yy_get_previous_state (void)
2203
register yy_state_type yy_current_state;
2204
register char *yy_cp;
2206
yy_current_state = (yy_start);
2208
for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
2210
register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2211
if ( yy_accept[yy_current_state] )
2213
(yy_last_accepting_state) = yy_current_state;
2214
(yy_last_accepting_cpos) = yy_cp;
2216
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2218
yy_current_state = (int) yy_def[yy_current_state];
2219
if ( yy_current_state >= 399 )
2220
yy_c = yy_meta[(unsigned int) yy_c];
2222
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2225
return yy_current_state;
2228
/* yy_try_NUL_trans - try to make a transition on the NUL character
2231
* next_state = yy_try_NUL_trans( current_state );
2233
static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
2235
register int yy_is_jam;
2236
register char *yy_cp = (yy_c_buf_p);
2238
register YY_CHAR yy_c = 1;
2239
if ( yy_accept[yy_current_state] )
2241
(yy_last_accepting_state) = yy_current_state;
2242
(yy_last_accepting_cpos) = yy_cp;
2244
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2246
yy_current_state = (int) yy_def[yy_current_state];
2247
if ( yy_current_state >= 399 )
2248
yy_c = yy_meta[(unsigned int) yy_c];
2250
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2251
yy_is_jam = (yy_current_state == 398);
2253
return yy_is_jam ? 0 : yy_current_state;
2258
static int yyinput (void)
2260
static int input (void)
2266
*(yy_c_buf_p) = (yy_hold_char);
2268
if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
2270
/* yy_c_buf_p now points to the character we want to return.
2271
* If this occurs *before* the EOB characters, then it's a
2272
* valid NUL; if not, then we've hit the end of the buffer.
2274
if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2275
/* This was really a NUL. */
2276
*(yy_c_buf_p) = '\0';
2279
{ /* need more input */
2280
int offset = (int)((yy_c_buf_p) - (yytext_ptr));
2283
switch ( yy_get_next_buffer( ) )
2285
case EOB_ACT_LAST_MATCH:
2286
/* This happens because yy_g_n_b()
2287
* sees that we've accumulated a
2288
* token and flags that we need to
2289
* try matching the token before
2290
* proceeding. But for input(),
2291
* there's no matching to consider.
2292
* So convert the EOB_ACT_LAST_MATCH
2293
* to EOB_ACT_END_OF_FILE.
2296
/* Reset buffer status. */
2301
case EOB_ACT_END_OF_FILE:
2306
if ( ! (yy_did_buffer_switch_on_eof) )
2315
case EOB_ACT_CONTINUE_SCAN:
2316
(yy_c_buf_p) = (yytext_ptr) + offset;
2322
c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
2323
*(yy_c_buf_p) = '\0'; /* preserve yytext */
2324
(yy_hold_char) = *++(yy_c_buf_p);
2328
#endif /* ifndef YY_NO_INPUT */
2330
/** Immediately switch to a different input stream.
2331
* @param input_file A readable stream.
2333
* @note This function does not reset the start condition to @c INITIAL .
2335
static void yyrestart (FILE * input_file )
2338
if ( ! YY_CURRENT_BUFFER ){
2339
yyensure_buffer_stack ();
2340
YY_CURRENT_BUFFER_LVALUE =
2341
yy_create_buffer(yyin,YY_BUF_SIZE );
2344
yy_init_buffer(YY_CURRENT_BUFFER,input_file );
2345
yy_load_buffer_state( );
2348
/** Switch to a different input buffer.
2349
* @param new_buffer The new input buffer.
2352
__attribute__((unused)) static void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
2355
/* TODO. We should be able to replace this entire function body
2357
* yypop_buffer_state();
2358
* yypush_buffer_state(new_buffer);
2360
yyensure_buffer_stack ();
2361
if ( YY_CURRENT_BUFFER == new_buffer )
2364
if ( YY_CURRENT_BUFFER )
2366
/* Flush out information for old buffer. */
2367
*(yy_c_buf_p) = (yy_hold_char);
2368
YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2369
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2372
YY_CURRENT_BUFFER_LVALUE = new_buffer;
2373
yy_load_buffer_state( );
2375
/* We don't actually know whether we did this switch during
2376
* EOF (yywrap()) processing, but the only time this flag
2377
* is looked at is after yywrap() is called, so it's safe
2378
* to go ahead and always set it.
2380
(yy_did_buffer_switch_on_eof) = 1;
2383
static void yy_load_buffer_state (void)
2385
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2386
(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2387
yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2388
(yy_hold_char) = *(yy_c_buf_p);
2391
/** Allocate and initialize an input buffer state.
2392
* @param file A readable stream.
2393
* @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2395
* @return the allocated buffer state.
2397
static YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
2401
b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
2403
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2405
b->yy_buf_size = size;
2407
/* yy_ch_buf has to be 2 characters longer than the size given because
2408
* we need to put in 2 end-of-buffer characters.
2410
b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );
2411
if ( ! b->yy_ch_buf )
2412
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2414
b->yy_is_our_buffer = 1;
2416
yy_init_buffer(b,file );
2421
/** Destroy the buffer.
2422
* @param b a buffer created with yy_create_buffer()
2425
static void yy_delete_buffer (YY_BUFFER_STATE b )
2431
if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2432
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
2434
if ( b->yy_is_our_buffer )
2435
yyfree((void *) b->yy_ch_buf );
2437
yyfree((void *) b );
2440
/* Initializes or reinitializes a buffer.
2441
* This function is sometimes called more than once on the same buffer,
2442
* such as during a yyrestart() or at EOF.
2444
static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
2449
yy_flush_buffer(b );
2451
b->yy_input_file = file;
2452
b->yy_fill_buffer = 1;
2454
/* If b is the current buffer, then yy_init_buffer was _probably_
2455
* called from yyrestart() or through yy_get_next_buffer.
2456
* In that case, we don't want to reset the lineno or column.
2458
if (b != YY_CURRENT_BUFFER){
2459
b->yy_bs_lineno = 1;
2460
b->yy_bs_column = 0;
2463
b->yy_is_interactive = 0;
2468
/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2469
* @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2472
static void yy_flush_buffer (YY_BUFFER_STATE b )
2479
/* We always need two end-of-buffer characters. The first causes
2480
* a transition to the end-of-buffer state. The second causes
2481
* a jam in that state.
2483
b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2484
b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2486
b->yy_buf_pos = &b->yy_ch_buf[0];
2489
b->yy_buffer_status = YY_BUFFER_NEW;
2491
if ( b == YY_CURRENT_BUFFER )
2492
yy_load_buffer_state( );
2495
/** Pushes the new state onto the stack. The new state becomes
2496
* the current state. This function will allocate the stack
2498
* @param new_buffer The new state.
2501
__attribute__((unused)) static void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
2503
if (new_buffer == NULL)
2506
yyensure_buffer_stack();
2508
/* This block is copied from yy_switch_to_buffer. */
2509
if ( YY_CURRENT_BUFFER )
2511
/* Flush out information for old buffer. */
2512
*(yy_c_buf_p) = (yy_hold_char);
2513
YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2514
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2517
/* Only push if top exists. Otherwise, replace top. */
2518
if (YY_CURRENT_BUFFER)
2519
(yy_buffer_stack_top)++;
2520
YY_CURRENT_BUFFER_LVALUE = new_buffer;
2522
/* copied from yy_switch_to_buffer. */
2523
yy_load_buffer_state( );
2524
(yy_did_buffer_switch_on_eof) = 1;
2527
/** Removes and deletes the top of the stack, if present.
2528
* The next element becomes the new top.
2531
__attribute__((unused)) static void yypop_buffer_state (void)
2533
if (!YY_CURRENT_BUFFER)
2536
yy_delete_buffer(YY_CURRENT_BUFFER );
2537
YY_CURRENT_BUFFER_LVALUE = NULL;
2538
if ((yy_buffer_stack_top) > 0)
2539
--(yy_buffer_stack_top);
2541
if (YY_CURRENT_BUFFER) {
2542
yy_load_buffer_state( );
2543
(yy_did_buffer_switch_on_eof) = 1;
2547
/* Allocates the stack if it does not exist.
2548
* Guarantees space for at least one push.
2550
static void yyensure_buffer_stack (void)
2554
if (!(yy_buffer_stack)) {
2556
/* First allocation is just for 2 elements, since we don't know if this
2557
* scanner will even need a stack. We use 2 instead of 1 to avoid an
2558
* immediate realloc on the next call.
2561
(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
2562
(num_to_alloc * sizeof(struct yy_buffer_state*)
2565
memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2567
(yy_buffer_stack_max) = num_to_alloc;
2568
(yy_buffer_stack_top) = 0;
2572
if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
2574
/* Increase the buffer to prepare for a possible push. */
2575
int grow_size = 8 /* arbitrary grow size */;
2577
num_to_alloc = (yy_buffer_stack_max) + grow_size;
2578
(yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
2580
num_to_alloc * sizeof(struct yy_buffer_state*)
2583
/* zero only the new slots.*/
2584
memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
2585
(yy_buffer_stack_max) = num_to_alloc;
2589
#ifndef YY_EXIT_FAILURE
2590
#define YY_EXIT_FAILURE 2
2593
static void yy_fatal_error (yyconst char* msg )
2595
(void) fprintf( stderr, "%s\n", msg );
2596
exit( YY_EXIT_FAILURE );
2599
/* Redefine yyless() so it works in section 3 code. */
2605
/* Undo effects of setting up yytext. */ \
2606
int yyless_macro_arg = (n); \
2607
YY_LESS_LINENO(yyless_macro_arg);\
2608
yytext[yyleng] = (yy_hold_char); \
2609
(yy_c_buf_p) = yytext + yyless_macro_arg; \
2610
(yy_hold_char) = *(yy_c_buf_p); \
2611
*(yy_c_buf_p) = '\0'; \
2612
yyleng = yyless_macro_arg; \
2616
/* Accessor methods (get/set functions) to struct members. */
2618
/** Get the current line number.
2621
__attribute__((unused)) static int yyget_lineno (void)
2627
/** Get the input stream.
2630
__attribute__((unused)) static FILE *yyget_in (void)
2635
/** Get the output stream.
2638
__attribute__((unused)) static FILE *yyget_out (void)
2643
/** Get the length of the current token.
2646
__attribute__((unused)) static int yyget_leng (void)
2651
/** Get the current token.
2655
__attribute__((unused)) static char *yyget_text (void)
2660
/** Set the current line number.
2661
* @param line_number
2664
__attribute__((unused)) static void yyset_lineno (int line_number )
2667
yylineno = line_number;
2670
/** Set the input stream. This does not discard the current
2672
* @param in_str A readable stream.
2674
* @see yy_switch_to_buffer
2676
__attribute__((unused)) static void yyset_in (FILE * in_str )
2681
__attribute__((unused)) static void yyset_out (FILE * out_str )
2686
__attribute__((unused)) static int yyget_debug (void)
2688
return yy_flex_debug;
2691
__attribute__((unused)) static void yyset_debug (int bdebug )
2693
yy_flex_debug = bdebug ;
2696
/* yylex_destroy is for both reentrant and non-reentrant scanners. */
2697
__attribute__((unused)) static int yylex_destroy (void)
2700
/* Pop the buffer stack, destroying each element. */
2701
while(YY_CURRENT_BUFFER){
2702
yy_delete_buffer(YY_CURRENT_BUFFER );
2703
YY_CURRENT_BUFFER_LVALUE = NULL;
2704
yypop_buffer_state();
2707
/* Destroy the stack itself. */
2708
yyfree((yy_buffer_stack) );
2709
(yy_buffer_stack) = NULL;
2715
* Internal utility routines.
2719
static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
2722
for ( i = 0; i < n; ++i )
2727
#ifdef YY_NEED_STRLEN
2728
static int yy_flex_strlen (yyconst char * s )
2731
for ( n = 0; s[n]; ++n )
2738
static void *yyalloc (yy_size_t size )
2740
return (void *) malloc( size );
2743
static void *yyrealloc (void * ptr, yy_size_t size )
2745
/* The cast to (char *) in the following accommodates both
2746
* implementations that use char* generic pointers, and those
2747
* that use void* generic pointers. It works with the latter
2748
* because both ANSI C and C++ allow castless assignment from
2749
* any pointer type to void*, and deal with argument conversions
2750
* as though doing an assignment.
2752
return (void *) realloc( (char *) ptr, size );
2755
static void yyfree (void * ptr )
2757
free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
2760
#define YYTABLES_NAME "yytables"
2763
#undef YY_FLUSH_BUFFER
2765
#undef yy_new_buffer
2766
#undef yy_set_interactive
2768
#undef YY_DO_BEFORE_ACTION
2770
#ifdef YY_DECL_IS_OURS
2771
#undef YY_DECL_IS_OURS
2774
#line 648 "pars0lex.l"