Debian Codegraph @

storage/innobase/pars/lexyy.cc

raw
1 #include "univ.i"
2 static char *yytext;
3 #line 2 "lexyy.cc"
4
5 #line 4 "lexyy.cc"
6
7 #define YY_INT_ALIGNED short int
8
9 /* A lexical scanner generated by flex */
10
11 #define FLEX_SCANNER
12 #define YY_FLEX_MAJOR_VERSION 2
13 #define YY_FLEX_MINOR_VERSION 5
14 #define YY_FLEX_SUBMINOR_VERSION 39
15 #if YY_FLEX_SUBMINOR_VERSION > 0
16 #define FLEX_BETA
17 #endif
18
19 /* First, we deal with platform-specific or compiler-specific issues. */
20
21 /* begin standard C headers. */
22 #include <stdio.h>
23 #include <string.h>
24 #include <errno.h>
25 #include <stdlib.h>
26
27 /* end standard C headers. */
28
29 /* flex integer type definitions */
30
31 #ifndef FLEXINT_H
32 #define FLEXINT_H
33
34 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
35
36 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
37
38 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
39 * if you want the limit (max/min) macros for int types.
40 */
41 #ifndef __STDC_LIMIT_MACROS
42 #define __STDC_LIMIT_MACROS 1
43 #endif
44
45 #include <inttypes.h>
46 typedef int8_t flex_int8_t;
47 typedef uint8_t flex_uint8_t;
48 typedef int16_t flex_int16_t;
49 typedef uint16_t flex_uint16_t;
50 typedef int32_t flex_int32_t;
51 typedef uint32_t flex_uint32_t;
52 #else
53 typedef signed char flex_int8_t;
54 typedef short int flex_int16_t;
55 typedef int flex_int32_t;
56 typedef unsigned char flex_uint8_t;
57 typedef unsigned short int flex_uint16_t;
58 typedef unsigned int flex_uint32_t;
59
60 /* Limits of integral types. */
61 #ifndef INT8_MIN
62 #define INT8_MIN (-128)
63 #endif
64 #ifndef INT16_MIN
65 #define INT16_MIN (-32767-1)
66 #endif
67 #ifndef INT32_MIN
68 #define INT32_MIN (-2147483647-1)
69 #endif
70 #ifndef INT8_MAX
71 #define INT8_MAX (127)
72 #endif
73 #ifndef INT16_MAX
74 #define INT16_MAX (32767)
75 #endif
76 #ifndef INT32_MAX
77 #define INT32_MAX (2147483647)
78 #endif
79 #ifndef UINT8_MAX
80 #define UINT8_MAX (255U)
81 #endif
82 #ifndef UINT16_MAX
83 #define UINT16_MAX (65535U)
84 #endif
85 #ifndef UINT32_MAX
86 #define UINT32_MAX (4294967295U)
87 #endif
88
89 #endif /* ! C99 */
90
91 #endif /* ! FLEXINT_H */
92
93 #ifdef __cplusplus
94
95 /* The "const" storage-class-modifier is valid. */
96 #define YY_USE_CONST
97
98 #else /* ! __cplusplus */
99
100 /* C99 requires __STDC__ to be defined as 1. */
101 #if defined (__STDC__)
102
103 #define YY_USE_CONST
104
105 #endif /* defined (__STDC__) */
106 #endif /* ! __cplusplus */
107
108 #ifdef YY_USE_CONST
109 #define yyconst const
110 #else
111 #define yyconst
112 #endif
113
114 /* Returned upon end-of-file. */
115 #define YY_NULL 0
116
117 /* Promotes a possibly negative, possibly signed char to an unsigned
118 * integer for use as an array index. If the signed char is negative,
119 * we want to instead treat it as an 8-bit unsigned char, hence the
120 * double cast.
121 */
122 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
123
124 /* Enter a start condition. This macro really ought to take a parameter,
125 * but we do it the disgusting crufty way forced on us by the ()-less
126 * definition of BEGIN.
127 */
128 #define BEGIN (yy_start) = 1 + 2 *
129
130 /* Translate the current start state into a value that can be later handed
131 * to BEGIN to return to the state. The YYSTATE alias is for lex
132 * compatibility.
133 */
134 #define YY_START (((yy_start) - 1) / 2)
135 #define YYSTATE YY_START
136
137 /* Action number for EOF rule of a given start state. */
138 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
139
140 /* Special action meaning "start processing a new file". */
141 #define YY_NEW_FILE yyrestart(yyin )
142
143 #define YY_END_OF_BUFFER_CHAR 0
144
145 /* Size of default input buffer. */
146 #ifndef YY_BUF_SIZE
147 #ifdef __ia64__
148 /* On IA-64, the buffer size is 16k, not 8k.
149 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
150 * Ditto for the __ia64__ case accordingly.
151 */
152 #define YY_BUF_SIZE 32768
153 #else
154 #define YY_BUF_SIZE 16384
155 #endif /* __ia64__ */
156 #endif
157
158 /* The state buf must be large enough to hold one state per character in the main buffer.
159 */
160 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
161
162 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
163 #define YY_TYPEDEF_YY_BUFFER_STATE
164 typedef struct yy_buffer_state *YY_BUFFER_STATE;
165 #endif
166
167 #ifndef YY_TYPEDEF_YY_SIZE_T
168 #define YY_TYPEDEF_YY_SIZE_T
169 typedef size_t yy_size_t;
170 #endif
171
172 extern yy_size_t yyleng;
173
174 static FILE *yyin, *yyout;
175
176 #define EOB_ACT_CONTINUE_SCAN 0
177 #define EOB_ACT_END_OF_FILE 1
178 #define EOB_ACT_LAST_MATCH 2
179
180 #define YY_LESS_LINENO(n)
181 #define YY_LINENO_REWIND_TO(ptr)
182
183 /* Return all but the first "n" matched characters back to the input stream. */
184 #define yyless(n) \
185 do \
186 { \
187 /* Undo effects of setting up yytext. */ \
188 int yyless_macro_arg = (n); \
189 YY_LESS_LINENO(yyless_macro_arg);\
190 *yy_cp = (yy_hold_char); \
191 YY_RESTORE_YY_MORE_OFFSET \
192 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
193 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
194 } \
195 while ( 0 )
196
197 #define unput(c) yyunput( c, (yytext_ptr) )
198
199 #ifndef YY_STRUCT_YY_BUFFER_STATE
200 #define YY_STRUCT_YY_BUFFER_STATE
201 struct yy_buffer_state
202 {
203 FILE *yy_input_file;
204
205 char *yy_ch_buf; /* input buffer */
206 char *yy_buf_pos; /* current position in input buffer */
207
208 /* Size of input buffer in bytes, not including room for EOB
209 * characters.
210 */
211 yy_size_t yy_buf_size;
212
213 /* Number of characters read into yy_ch_buf, not including EOB
214 * characters.
215 */
216 yy_size_t yy_n_chars;
217
218 /* Whether we "own" the buffer - i.e., we know we created it,
219 * and can realloc() it to grow it, and should free() it to
220 * delete it.
221 */
222 int yy_is_our_buffer;
223
224 /* Whether this is an "interactive" input source; if so, and
225 * if we're using stdio for input, then we want to use getc()
226 * instead of fread(), to make sure we stop fetching input after
227 * each newline.
228 */
229 int yy_is_interactive;
230
231 /* Whether we're considered to be at the beginning of a line.
232 * If so, '^' rules will be active on the next match, otherwise
233 * not.
234 */
235 int yy_at_bol;
236
237 int yy_bs_lineno; /**< The line count. */
238 int yy_bs_column; /**< The column count. */
239
240 /* Whether to try to fill the input buffer when we reach the
241 * end of it.
242 */
243 int yy_fill_buffer;
244
245 int yy_buffer_status;
246
247 #define YY_BUFFER_NEW 0
248 #define YY_BUFFER_NORMAL 1
249 /* When an EOF's been seen but there's still some text to process
250 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
251 * shouldn't try reading from the input source any more. We might
252 * still have a bunch of tokens to match, though, because of
253 * possible backing-up.
254 *
255 * When we actually see the EOF, we change the status to "new"
256 * (via yyrestart()), so that the user can continue scanning by
257 * just pointing yyin at a new input file.
258 */
259 #define YY_BUFFER_EOF_PENDING 2
260
261 };
262 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
263
264 /* Stack of input buffers. */
265 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
266 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
267 static YY_BUFFER_STATE *yy_buffer_stack = nullptr; /**< Stack as an array. */
268
269 /* We provide macros for accessing buffer states in case in the
270 * future we want to put the buffer states in a more general
271 * "scanner state".
272 *
273 * Returns the top of the stack, or NULL.
274 */
275 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
276 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
277 : NULL)
278
279 /* Same as previous macro, but useful when we know that the buffer stack is not
280 * NULL or when we need an lvalue. For internal use only.
281 */
282 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
283
284 /* yy_hold_char holds the character lost when yytext is formed. */
285 static char yy_hold_char;
286 static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
287 yy_size_t yyleng;
288
289 /* Points to current character in buffer. */
290 static char *yy_c_buf_p = (char *)nullptr;
291 static int yy_init = 0; /* whether we need to initialize */
292 static int yy_start = 0; /* start state number */
293
294 /* Flag which is used to allow yywrap()'s to do buffer switches
295 * instead of setting up a fresh yyin. A bit of a hack ...
296 */
297 static int yy_did_buffer_switch_on_eof;
298
299 static void yyrestart (FILE *input_file );
300 [[maybe_unused]] static void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
301 static YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
302 static void yy_delete_buffer (YY_BUFFER_STATE b );
303 static void yy_flush_buffer (YY_BUFFER_STATE b );
304 [[maybe_unused]] static void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
305 [[maybe_unused]] static void yypop_buffer_state (void );
306
307 static void yyensure_buffer_stack (void );
308 static void yy_load_buffer_state (void );
309 static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
310
311 #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
312
313 YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
314 YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
315 YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len );
316
317 static void *yyalloc (yy_size_t );
318 static void *yyrealloc (void *,yy_size_t );
319 static void yyfree (void * );
320
321 #define yy_new_buffer yy_create_buffer
322
323 #define yy_set_interactive(is_interactive) \
324 { \
325 if ( ! YY_CURRENT_BUFFER ){ \
326 yyensure_buffer_stack (); \
327 YY_CURRENT_BUFFER_LVALUE = \
328 yy_create_buffer(yyin,YY_BUF_SIZE ); \
329 } \
330 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
331 }
332
333 #define yy_set_bol(at_bol) \
334 { \
335 if ( ! YY_CURRENT_BUFFER ){\
336 yyensure_buffer_stack (); \
337 YY_CURRENT_BUFFER_LVALUE = \
338 yy_create_buffer(yyin,YY_BUF_SIZE ); \
339 } \
340 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
341 }
342
343 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
344
345 /* Begin user sect3 */
346
347 #define yywrap() 1
348 #define YY_SKIP_YYWRAP
349
350 typedef unsigned char YY_CHAR;
351
352
353
354 typedef int yy_state_type;
355
356
357
358 static int yylineno = 1;
359
360
361 #define yytext_ptr yytext
362
363 static yy_state_type yy_get_previous_state (void );
364 static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
365 static int yy_get_next_buffer (void );
366 static void yy_fatal_error (yyconst char msg[] );
367
368 /* Done after the current pattern has been matched and before the
369 * corresponding action - sets up yytext.
370 */
371 #define YY_DO_BEFORE_ACTION \
372 (yytext_ptr) = yy_bp; \
373 yyleng = (size_t) (yy_cp - yy_bp); \
374 (yy_hold_char) = *yy_cp; \
375 *yy_cp = '\0'; \
376 (yy_c_buf_p) = yy_cp;
377
378 #define YY_NUM_RULES 114
379 #define YY_END_OF_BUFFER 115
380 /* This struct is not used in this scanner,
381 but its presence is necessary. */
382 struct yy_trans_info
383 {
384 flex_int32_t yy_verify;
385 flex_int32_t yy_nxt;
386 };
387 static yyconst flex_int16_t yy_accept[372] =
388 { 0,
389 0, 0, 109, 109, 0, 0, 0, 0, 115, 113,
390 112, 112, 8, 113, 104, 5, 93, 99, 102, 100,
391 97, 101, 113, 103, 1, 113, 98, 96, 94, 95,
392 107, 86, 86, 86, 86, 86, 86, 86, 86, 86,
393 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
394 105, 106, 109, 110, 6, 7, 9, 10, 112, 4,
395 88, 108, 2, 1, 3, 89, 90, 92, 91, 0,
396 86, 0, 86, 86, 86, 86, 86, 44, 86, 86,
397 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
398 86, 86, 86, 86, 28, 17, 25, 86, 86, 86,
399
400 86, 86, 86, 54, 63, 86, 14, 86, 86, 86,
401 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
402 86, 86, 86, 109, 110, 110, 111, 6, 7, 9,
403 10, 2, 0, 87, 13, 45, 86, 86, 86, 86,
404 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
405 86, 86, 86, 86, 27, 86, 86, 86, 41, 86,
406 86, 86, 86, 21, 86, 86, 86, 86, 86, 15,
407 86, 86, 86, 18, 86, 86, 86, 86, 86, 51,
408 86, 12, 86, 36, 86, 86, 86, 86, 86, 86,
409 86, 86, 86, 86, 0, 87, 86, 86, 86, 20,
410
411 86, 24, 86, 86, 86, 86, 86, 86, 86, 86,
412 86, 86, 86, 46, 86, 86, 30, 86, 79, 86,
413 86, 39, 86, 86, 86, 86, 86, 48, 86, 84,
414 81, 32, 83, 86, 11, 66, 86, 86, 42, 86,
415 86, 86, 86, 86, 86, 29, 86, 86, 86, 86,
416 86, 86, 86, 77, 0, 26, 86, 86, 86, 68,
417 86, 86, 86, 86, 37, 86, 86, 86, 86, 86,
418 86, 86, 31, 67, 23, 86, 59, 86, 73, 86,
419 86, 86, 43, 86, 86, 86, 86, 82, 86, 56,
420 86, 86, 86, 86, 86, 40, 33, 0, 85, 19,
421
422 86, 86, 75, 86, 72, 55, 86, 65, 86, 52,
423 86, 86, 86, 47, 86, 74, 86, 86, 34, 86,
424 35, 71, 86, 60, 86, 50, 49, 86, 86, 57,
425 53, 64, 86, 86, 86, 22, 86, 86, 86, 86,
426 86, 86, 86, 38, 86, 80, 69, 86, 76, 86,
427 78, 86, 61, 86, 16, 70, 58, 86, 86, 86,
428 86, 86, 86, 86, 86, 86, 86, 86, 86, 62,
429 0
430 } ;
431
432 static yyconst flex_int32_t yy_ec[256] =
433 { 0,
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, 5, 6, 7, 1, 8, 9,
438 10, 11, 12, 13, 14, 15, 16, 17, 17, 17,
439 17, 17, 17, 17, 17, 17, 17, 18, 19, 20,
440 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
441 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
442 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
443 1, 1, 1, 1, 51, 1, 34, 34, 34, 34,
444
445 34, 34, 34, 34, 34, 34, 34, 52, 34, 34,
446 34, 34, 53, 34, 54, 34, 34, 34, 34, 34,
447 34, 34, 55, 1, 56, 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,
455
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,
461 1, 1, 1, 1, 1
462 } ;
463
464 static yyconst flex_int32_t yy_meta[57] =
465 { 0,
466 1, 1, 1, 2, 3, 1, 1, 4, 1, 1,
467 5, 1, 1, 1, 1, 6, 7, 1, 1, 1,
468 8, 1, 1, 6, 9, 9, 9, 9, 9, 9,
469 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
470 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
471 9, 9, 9, 9, 1, 1
472 } ;
473
474 static yyconst flex_int16_t yy_base[385] =
475 { 0,
476 0, 0, 304, 293, 283, 277, 278, 265, 260, 1174,
477 55, 57, 1174, 0, 1174, 1174, 1174, 1174, 1174, 1174,
478 1174, 1174, 240, 242, 46, 206, 1174, 43, 1174, 202,
479 1174, 46, 50, 56, 52, 66, 64, 51, 81, 92,
480 91, 94, 96, 111, 113, 116, 130, 127, 53, 134,
481 1174, 1174, 0, 106, 0, 213, 0, 216, 157, 0,
482 1174, 1174, 192, 56, 185, 1174, 1174, 1174, 1174, 195,
483 140, 179, 147, 152, 154, 156, 158, 165, 167, 172,
484 177, 174, 183, 192, 186, 189, 188, 208, 210, 214,
485 217, 221, 223, 226, 224, 233, 228, 230, 235, 251,
486
487 255, 249, 250, 256, 265, 268, 271, 272, 278, 282,
488 284, 285, 287, 289, 298, 307, 303, 294, 314, 312,
489 318, 327, 325, 0, 112, 133, 1174, 0, 178, 0,
490 180, 160, 93, 0, 328, 334, 337, 339, 349, 352,
491 353, 359, 364, 366, 365, 370, 375, 369, 380, 381,
492 393, 397, 399, 398, 402, 408, 409, 413, 419, 423,
493 424, 429, 430, 433, 439, 440, 449, 451, 452, 455,
494 462, 464, 466, 473, 476, 477, 480, 483, 492, 490,
495 493, 494, 496, 499, 506, 508, 510, 513, 517, 524,
496 527, 528, 529, 531, 60, 0, 540, 543, 544, 545,
497
498 547, 559, 560, 561, 563, 574, 576, 564, 578, 587,
499 588, 590, 593, 594, 597, 604, 607, 608, 609, 610,
500 619, 620, 623, 624, 629, 633, 630, 634, 635, 636,
501 640, 646, 649, 650, 652, 653, 662, 664, 666, 667,
502 668, 671, 681, 683, 684, 687, 690, 696, 700, 701,
503 705, 706, 720, 702, 42, 716, 722, 723, 726, 727,
504 732, 736, 738, 739, 743, 752, 754, 755, 758, 769,
505 770, 771, 772, 775, 786, 787, 788, 789, 790, 799,
506 800, 801, 802, 803, 805, 814, 818, 820, 821, 824,
507 831, 825, 834, 835, 836, 837, 841, 73, 850, 851,
508
509 852, 854, 857, 861, 864, 866, 867, 868, 870, 873,
510 877, 882, 884, 886, 891, 893, 896, 898, 900, 902,
511 903, 912, 914, 916, 921, 925, 928, 930, 931, 932,
512 935, 937, 941, 942, 946, 948, 951, 952, 953, 957,
513 967, 958, 973, 974, 976, 980, 986, 987, 989, 990,
514 991, 993, 996, 1002, 1005, 1007, 1009, 1012, 1014, 1018,
515 1019, 1024, 1025, 1030, 1031, 1035, 1040, 1041, 1037, 1047,
516 1174, 1086, 1095, 1104, 1107, 1110, 1114, 1123, 1132, 1141,
517 1150, 1157, 1161, 1164
518 } ;
519
520 static yyconst flex_int16_t yy_def[385] =
521 { 0,
522 371, 1, 372, 372, 373, 373, 374, 374, 371, 371,
523 371, 371, 371, 375, 371, 371, 371, 371, 371, 371,
524 371, 371, 371, 371, 371, 376, 371, 371, 371, 371,
525 371, 377, 377, 377, 377, 377, 34, 377, 377, 377,
526 377, 377, 377, 377, 377, 377, 377, 377, 377, 377,
527 371, 371, 378, 379, 380, 371, 381, 371, 371, 375,
528 371, 371, 371, 371, 376, 371, 371, 371, 371, 382,
529 377, 383, 377, 377, 377, 377, 377, 377, 377, 377,
530 377, 377, 377, 377, 377, 377, 377, 377, 377, 377,
531 377, 377, 377, 377, 377, 377, 377, 377, 377, 377,
532
533 377, 377, 377, 377, 377, 377, 377, 377, 377, 377,
534 377, 377, 377, 377, 377, 377, 377, 377, 377, 377,
535 377, 377, 377, 378, 379, 379, 371, 380, 371, 381,
536 371, 371, 371, 384, 377, 377, 377, 377, 377, 377,
537 377, 377, 377, 377, 377, 377, 377, 377, 377, 377,
538 377, 377, 377, 377, 377, 377, 377, 377, 377, 377,
539 377, 377, 377, 377, 377, 377, 377, 377, 377, 377,
540 377, 377, 377, 377, 377, 377, 377, 377, 377, 377,
541 377, 377, 377, 377, 377, 377, 377, 377, 377, 377,
542 377, 377, 377, 377, 371, 384, 377, 377, 377, 377,
543
544 377, 377, 377, 377, 377, 377, 377, 377, 377, 377,
545 377, 377, 377, 377, 377, 377, 377, 377, 377, 377,
546 377, 377, 377, 377, 377, 377, 377, 377, 377, 377,
547 377, 377, 377, 377, 377, 377, 377, 377, 377, 377,
548 377, 377, 377, 377, 377, 377, 377, 377, 377, 377,
549 377, 377, 377, 377, 371, 377, 377, 377, 377, 377,
550 377, 377, 377, 377, 377, 377, 377, 377, 377, 377,
551 377, 377, 377, 377, 377, 377, 377, 377, 377, 377,
552 377, 377, 377, 377, 377, 377, 377, 377, 377, 377,
553 377, 377, 377, 377, 377, 377, 377, 371, 377, 377,
554
555 377, 377, 377, 377, 377, 377, 377, 377, 377, 377,
556 377, 377, 377, 377, 377, 377, 377, 377, 377, 377,
557 377, 377, 377, 377, 377, 377, 377, 377, 377, 377,
558 377, 377, 377, 377, 377, 377, 377, 377, 377, 377,
559 377, 377, 377, 377, 377, 377, 377, 377, 377, 377,
560 377, 377, 377, 377, 377, 377, 377, 377, 377, 377,
561 377, 377, 377, 377, 377, 377, 377, 377, 377, 377,
562 0, 371, 371, 371, 371, 371, 371, 371, 371, 371,
563 371, 371, 371, 371
564 } ;
565
566 static yyconst flex_int16_t yy_nxt[1231] =
567 { 0,
568 10, 11, 12, 13, 10, 14, 15, 16, 17, 18,
569 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
570 29, 30, 31, 10, 32, 33, 34, 35, 36, 37,
571 38, 38, 39, 38, 38, 40, 41, 42, 43, 44,
572 38, 45, 46, 47, 48, 49, 50, 38, 38, 38,
573 38, 38, 38, 38, 51, 52, 59, 59, 59, 59,
574 63, 70, 64, 67, 68, 70, 70, 70, 70, 72,
575 63, 70, 64, 72, 72, 72, 72, 121, 75, 72,
576 84, 70, 76, 73, 85, 77, 134, 79, 74, 72,
577 86, 80, 90, 298, 81, 71, 70, 82, 78, 91,
578
579 83, 87, 92, 88, 72, 93, 70, 70, 94, 70,
580 95, 70, 255, 89, 72, 72, 126, 72, 96, 72,
581 98, 127, 371, 97, 99, 104, 70, 371, 70, 101,
582 100, 70, 102, 105, 72, 106, 72, 107, 103, 72,
583 108, 110, 70, 126, 112, 70, 195, 113, 127, 70,
584 72, 111, 109, 72, 116, 70, 114, 72, 59, 59,
585 115, 117, 70, 72, 119, 122, 120, 70, 118, 70,
586 72, 70, 123, 70, 135, 72, 132, 72, 136, 72,
587 70, 72, 70, 131, 137, 129, 138, 70, 72, 70,
588 72, 141, 70, 139, 70, 72, 140, 72, 70, 133,
589
590 72, 70, 147, 70, 70, 371, 72, 70, 132, 72,
591 142, 72, 72, 144, 145, 72, 143, 153, 149, 131,
592 129, 146, 69, 70, 148, 70, 66, 150, 152, 70,
593 154, 72, 70, 72, 151, 155, 70, 72, 70, 70,
594 72, 70, 156, 70, 72, 70, 72, 72, 70, 72,
595 70, 72, 62, 72, 61, 158, 72, 157, 72, 371,
596 162, 160, 159, 161, 70, 70, 70, 165, 58, 166,
597 70, 70, 72, 72, 72, 163, 164, 167, 72, 72,
598 70, 58, 169, 70, 56, 171, 70, 70, 72, 168,
599 56, 72, 170, 70, 72, 72, 172, 70, 173, 70,
600
601 70, 72, 70, 54, 70, 72, 176, 72, 72, 70,
602 72, 181, 72, 70, 54, 174, 175, 72, 70, 178,
603 179, 72, 70, 183, 182, 177, 72, 70, 180, 70,
604 72, 186, 185, 70, 184, 72, 371, 72, 371, 190,
605 70, 72, 70, 70, 187, 371, 188, 371, 72, 70,
606 72, 72, 70, 191, 70, 192, 189, 72, 371, 193,
607 72, 371, 72, 371, 70, 371, 194, 70, 70, 197,
608 371, 198, 72, 199, 70, 72, 72, 200, 201, 70,
609 70, 70, 72, 371, 70, 70, 371, 72, 72, 72,
610 70, 207, 72, 72, 202, 70, 70, 371, 72, 209,
611
612 371, 203, 205, 72, 72, 206, 204, 208, 70, 213,
613 210, 211, 70, 70, 70, 212, 72, 70, 371, 214,
614 72, 72, 72, 70, 70, 72, 217, 371, 70, 371,
615 218, 72, 72, 371, 70, 220, 72, 221, 70, 70,
616 215, 216, 72, 371, 70, 70, 72, 72, 70, 371,
617 223, 219, 72, 72, 70, 70, 72, 224, 225, 222,
618 371, 227, 72, 72, 70, 371, 70, 70, 230, 229,
619 70, 228, 72, 226, 72, 72, 371, 70, 72, 70,
620 233, 70, 371, 231, 234, 72, 371, 72, 70, 72,
621 232, 70, 70, 371, 237, 70, 72, 235, 70, 72,
622
623 72, 236, 238, 72, 239, 70, 72, 70, 70, 70,
624 371, 70, 371, 72, 70, 72, 72, 72, 241, 72,
625 242, 70, 72, 70, 240, 70, 371, 371, 70, 72,
626 371, 72, 70, 72, 243, 247, 72, 371, 244, 70,
627 72, 245, 70, 70, 70, 246, 70, 72, 250, 249,
628 72, 72, 72, 248, 72, 70, 371, 371, 70, 70,
629 70, 371, 70, 72, 253, 254, 72, 72, 72, 252,
630 72, 251, 371, 371, 70, 70, 70, 256, 70, 70,
631 257, 259, 72, 72, 72, 258, 72, 72, 260, 70,
632 371, 70, 371, 70, 371, 262, 371, 72, 263, 72,
633
634 264, 72, 70, 70, 261, 70, 371, 265, 70, 70,
635 72, 72, 70, 72, 269, 267, 72, 72, 371, 70,
636 72, 266, 70, 70, 70, 70, 268, 72, 371, 271,
637 72, 72, 72, 72, 70, 70, 270, 273, 70, 70,
638 371, 274, 72, 72, 70, 70, 72, 72, 70, 70,
639 70, 70, 72, 72, 272, 70, 72, 72, 72, 72,
640 280, 70, 275, 72, 70, 70, 276, 70, 70, 72,
641 278, 277, 72, 72, 279, 72, 72, 70, 281, 70,
642 371, 70, 70, 70, 371, 72, 70, 72, 282, 72,
643 72, 72, 284, 286, 72, 371, 70, 287, 70, 70,
644
645 371, 371, 70, 283, 72, 70, 72, 72, 285, 288,
646 72, 70, 290, 72, 371, 70, 70, 70, 371, 72,
647 70, 70, 291, 72, 72, 72, 289, 371, 72, 72,
648 293, 70, 371, 295, 296, 70, 371, 70, 70, 72,
649 292, 70, 70, 72, 294, 72, 72, 70, 297, 72,
650 72, 70, 371, 70, 70, 72, 371, 371, 70, 72,
651 302, 72, 72, 371, 304, 299, 72, 70, 371, 70,
652 70, 300, 371, 70, 371, 72, 301, 72, 72, 303,
653 306, 72, 305, 371, 70, 70, 70, 70, 371, 371,
654 70, 307, 72, 72, 72, 72, 308, 310, 72, 309,
655
656 371, 70, 70, 70, 70, 70, 371, 311, 312, 72,
657 72, 72, 72, 72, 70, 70, 70, 70, 70, 313,
658 70, 371, 72, 72, 72, 72, 72, 315, 72, 70,
659 318, 316, 314, 70, 371, 70, 70, 72, 320, 70,
660 70, 72, 319, 72, 72, 317, 70, 72, 72, 70,
661 70, 70, 70, 324, 72, 371, 70, 72, 72, 72,
662 72, 321, 322, 326, 72, 70, 70, 70, 323, 70,
663 371, 325, 70, 72, 72, 72, 70, 72, 327, 70,
664 72, 70, 70, 70, 72, 70, 371, 72, 70, 72,
665 72, 72, 70, 72, 328, 329, 72, 70, 332, 70,
666
667 72, 70, 371, 333, 330, 72, 70, 72, 70, 72,
668 331, 70, 371, 70, 72, 70, 72, 70, 70, 72,
669 334, 72, 335, 72, 371, 72, 72, 70, 339, 70,
670 371, 70, 336, 337, 371, 72, 70, 72, 340, 72,
671 70, 371, 338, 70, 72, 70, 70, 70, 72, 341,
672 70, 72, 70, 72, 72, 72, 70, 70, 72, 343,
673 72, 70, 342, 70, 72, 72, 70, 70, 70, 72,
674 371, 72, 70, 70, 72, 72, 72, 371, 347, 371,
675 72, 72, 70, 346, 344, 345, 371, 349, 70, 70,
676 72, 70, 371, 348, 351, 70, 72, 72, 350, 72,
677
678 353, 70, 70, 72, 70, 70, 70, 352, 70, 72,
679 72, 70, 72, 72, 72, 355, 72, 70, 371, 72,
680 70, 357, 70, 371, 70, 72, 354, 70, 72, 70,
681 72, 358, 72, 70, 70, 72, 371, 72, 356, 70,
682 70, 72, 72, 371, 359, 70, 70, 72, 72, 371,
683 70, 362, 70, 72, 72, 70, 70, 360, 72, 366,
684 72, 363, 70, 72, 72, 371, 365, 371, 361, 371,
685 72, 367, 371, 371, 371, 364, 371, 371, 368, 371,
686 371, 371, 369, 371, 371, 370, 53, 53, 53, 53,
687 53, 53, 53, 53, 53, 55, 55, 55, 55, 55,
688
689 55, 55, 55, 55, 57, 57, 57, 57, 57, 57,
690 57, 57, 57, 60, 371, 60, 65, 65, 65, 71,
691 71, 371, 71, 124, 124, 124, 124, 371, 124, 124,
692 124, 124, 125, 125, 125, 125, 125, 125, 125, 125,
693 125, 128, 128, 128, 371, 128, 128, 128, 128, 128,
694 130, 371, 130, 130, 130, 130, 130, 130, 130, 134,
695 371, 371, 371, 371, 371, 134, 72, 72, 371, 72,
696 196, 371, 196, 9, 371, 371, 371, 371, 371, 371,
697 371, 371, 371, 371, 371, 371, 371, 371, 371, 371,
698 371, 371, 371, 371, 371, 371, 371, 371, 371, 371,
699
700 371, 371, 371, 371, 371, 371, 371, 371, 371, 371,
701 371, 371, 371, 371, 371, 371, 371, 371, 371, 371,
702 371, 371, 371, 371, 371, 371, 371, 371, 371, 371
703 } ;
704
705 static yyconst flex_int16_t yy_chk[1231] =
706 { 0,
707 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
708 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
709 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
710 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
711 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
712 1, 1, 1, 1, 1, 1, 11, 11, 12, 12,
713 25, 32, 25, 28, 28, 33, 38, 35, 49, 32,
714 64, 34, 64, 33, 38, 35, 49, 49, 33, 34,
715 35, 36, 33, 32, 35, 33, 298, 34, 32, 36,
716 35, 34, 37, 255, 34, 37, 39, 34, 33, 37,
717
718 34, 36, 37, 36, 39, 37, 41, 40, 37, 42,
719 39, 43, 195, 36, 41, 40, 54, 42, 39, 43,
720 40, 54, 125, 39, 40, 43, 44, 125, 45, 41,
721 40, 46, 42, 43, 44, 43, 45, 43, 42, 46,
722 43, 45, 48, 126, 46, 47, 133, 46, 126, 50,
723 48, 45, 44, 47, 47, 71, 46, 50, 59, 59,
724 46, 47, 73, 71, 48, 50, 48, 74, 47, 75,
725 73, 76, 50, 77, 73, 74, 132, 75, 74, 76,
726 78, 77, 79, 131, 75, 129, 76, 80, 78, 82,
727 79, 79, 81, 76, 72, 80, 77, 82, 83, 70,
728
729 81, 85, 82, 87, 86, 65, 83, 84, 63, 85,
730 80, 87, 86, 81, 81, 84, 80, 86, 84, 58,
731 56, 81, 30, 88, 83, 89, 26, 84, 85, 90,
732 87, 88, 91, 89, 84, 88, 92, 90, 93, 95,
733 91, 94, 89, 97, 92, 98, 93, 95, 96, 94,
734 99, 97, 24, 98, 23, 91, 96, 90, 99, 9,
735 96, 93, 92, 94, 102, 103, 100, 98, 8, 99,
736 101, 104, 102, 103, 100, 96, 96, 100, 101, 104,
737 105, 7, 101, 106, 6, 103, 107, 108, 105, 100,
738 5, 106, 102, 109, 107, 108, 106, 110, 107, 111,
739
740 112, 109, 113, 4, 114, 110, 110, 111, 112, 118,
741 113, 113, 114, 115, 3, 108, 109, 118, 117, 111,
742 112, 115, 116, 115, 114, 110, 117, 120, 112, 119,
743 116, 117, 116, 121, 115, 120, 0, 119, 0, 120,
744 123, 121, 122, 135, 118, 0, 119, 0, 123, 136,
745 122, 135, 137, 121, 138, 122, 119, 136, 0, 122,
746 137, 0, 138, 0, 139, 0, 123, 140, 141, 137,
747 0, 138, 139, 139, 142, 140, 141, 140, 140, 143,
748 145, 144, 142, 0, 148, 146, 0, 143, 145, 144,
749 147, 145, 148, 146, 141, 149, 150, 0, 147, 147,
750
751 0, 142, 144, 149, 150, 144, 143, 146, 151, 150,
752 148, 148, 152, 154, 153, 149, 151, 155, 0, 151,
753 152, 154, 153, 156, 157, 155, 154, 0, 158, 0,
754 154, 156, 157, 0, 159, 157, 158, 158, 160, 161,
755 152, 153, 159, 0, 162, 163, 160, 161, 164, 0,
756 161, 156, 162, 163, 165, 166, 164, 162, 163, 160,
757 0, 164, 165, 166, 167, 0, 168, 169, 166, 165,
758 170, 164, 167, 163, 168, 169, 0, 171, 170, 172,
759 169, 173, 0, 167, 170, 171, 0, 172, 174, 173,
760 168, 175, 176, 0, 173, 177, 174, 171, 178, 175,
761
762 176, 172, 175, 177, 176, 180, 178, 179, 181, 182,
763 0, 183, 0, 180, 184, 179, 181, 182, 178, 183,
764 179, 185, 184, 186, 177, 187, 0, 0, 188, 185,
765 0, 186, 189, 187, 181, 187, 188, 0, 183, 190,
766 189, 185, 191, 192, 193, 186, 194, 190, 190, 189,
767 191, 192, 193, 188, 194, 197, 0, 0, 198, 199,
768 200, 0, 201, 197, 193, 194, 198, 199, 200, 192,
769 201, 191, 0, 0, 202, 203, 204, 197, 205, 208,
770 198, 201, 202, 203, 204, 199, 205, 208, 203, 206,
771 0, 207, 0, 209, 0, 205, 0, 206, 206, 207,
772
773 207, 209, 210, 211, 204, 212, 0, 208, 213, 214,
774 210, 211, 215, 212, 212, 210, 213, 214, 0, 216,
775 215, 209, 217, 218, 219, 220, 211, 216, 0, 215,
776 217, 218, 219, 220, 221, 222, 213, 218, 223, 224,
777 0, 220, 221, 222, 225, 227, 223, 224, 226, 228,
778 229, 230, 225, 227, 216, 231, 226, 228, 229, 230,
779 227, 232, 221, 231, 233, 234, 223, 235, 236, 232,
780 225, 224, 233, 234, 226, 235, 236, 237, 229, 238,
781 0, 239, 240, 241, 0, 237, 242, 238, 234, 239,
782 240, 241, 238, 241, 242, 0, 243, 242, 244, 245,
783
784 0, 0, 246, 237, 243, 247, 244, 245, 240, 243,
785 246, 248, 245, 247, 0, 249, 250, 254, 0, 248,
786 251, 252, 247, 249, 250, 254, 244, 0, 251, 252,
787 249, 256, 0, 251, 252, 253, 0, 257, 258, 256,
788 248, 259, 260, 253, 250, 257, 258, 261, 253, 259,
789 260, 262, 0, 263, 264, 261, 0, 0, 265, 262,
790 261, 263, 264, 0, 263, 257, 265, 266, 0, 267,
791 268, 258, 0, 269, 0, 266, 259, 267, 268, 262,
792 266, 269, 264, 0, 270, 271, 272, 273, 0, 0,
793 274, 267, 270, 271, 272, 273, 268, 270, 274, 269,
794
795 0, 275, 276, 277, 278, 279, 0, 271, 272, 275,
796 276, 277, 278, 279, 280, 281, 282, 283, 284, 276,
797 285, 0, 280, 281, 282, 283, 284, 280, 285, 286,
798 284, 281, 278, 287, 0, 288, 289, 286, 286, 290,
799 292, 287, 285, 288, 289, 282, 291, 290, 292, 293,
800 294, 295, 296, 292, 291, 0, 297, 293, 294, 295,
801 296, 287, 289, 294, 297, 299, 300, 301, 291, 302,
802 0, 293, 303, 299, 300, 301, 304, 302, 295, 305,
803 303, 306, 307, 308, 304, 309, 0, 305, 310, 306,
804 307, 308, 311, 309, 301, 302, 310, 312, 309, 313,
805
806 311, 314, 0, 311, 304, 312, 315, 313, 316, 314,
807 307, 317, 0, 318, 315, 319, 316, 320, 321, 317,
808 312, 318, 313, 319, 0, 320, 321, 322, 320, 323,
809 0, 324, 315, 317, 0, 322, 325, 323, 323, 324,
810 326, 0, 318, 327, 325, 328, 329, 330, 326, 325,
811 331, 327, 332, 328, 329, 330, 333, 334, 331, 329,
812 332, 335, 328, 336, 333, 334, 337, 338, 339, 335,
813 0, 336, 340, 342, 337, 338, 339, 0, 337, 0,
814 340, 342, 341, 335, 333, 334, 0, 339, 343, 344,
815 341, 345, 0, 338, 341, 346, 343, 344, 340, 345,
816
817 343, 347, 348, 346, 349, 350, 351, 342, 352, 347,
818 348, 353, 349, 350, 351, 348, 352, 354, 0, 353,
819 355, 352, 356, 0, 357, 354, 345, 358, 355, 359,
820 356, 354, 357, 360, 361, 358, 0, 359, 350, 362,
821 363, 360, 361, 0, 358, 364, 365, 362, 363, 0,
822 366, 361, 369, 364, 365, 367, 368, 359, 366, 365,
823 369, 362, 370, 367, 368, 0, 364, 0, 360, 0,
824 370, 366, 0, 0, 0, 363, 0, 0, 367, 0,
825 0, 0, 368, 0, 0, 369, 372, 372, 372, 372,
826 372, 372, 372, 372, 372, 373, 373, 373, 373, 373,
827
828 373, 373, 373, 373, 374, 374, 374, 374, 374, 374,
829 374, 374, 374, 375, 0, 375, 376, 376, 376, 377,
830 377, 0, 377, 378, 378, 378, 378, 0, 378, 378,
831 378, 378, 379, 379, 379, 379, 379, 379, 379, 379,
832 379, 380, 380, 380, 0, 380, 380, 380, 380, 380,
833 381, 0, 381, 381, 381, 381, 381, 381, 381, 382,
834 0, 0, 0, 0, 0, 382, 383, 383, 0, 383,
835 384, 0, 384, 371, 371, 371, 371, 371, 371, 371,
836 371, 371, 371, 371, 371, 371, 371, 371, 371, 371,
837 371, 371, 371, 371, 371, 371, 371, 371, 371, 371,
838
839 371, 371, 371, 371, 371, 371, 371, 371, 371, 371,
840 371, 371, 371, 371, 371, 371, 371, 371, 371, 371,
841 371, 371, 371, 371, 371, 371, 371, 371, 371, 371
842 } ;
843
844 static yy_state_type yy_last_accepting_state;
845 static char *yy_last_accepting_cpos;
846
847
848 static int yy_flex_debug = 0;
849
850 /* The intent behind this definition is that it'll catch
851 * any uses of REJECT which flex missed.
852 */
853 #define REJECT reject_used_but_not_detected
854 #define yymore() yymore_used_but_not_detected
855 #define YY_MORE_ADJ 0
856 #define YY_RESTORE_YY_MORE_OFFSET
857
858 #line 1 "pars0lex.l"
859 /*****************************************************************************
860
861 Copyright (c) 1997, 2026, Oracle and/or its affiliates.
862
863 This program is free software; you can redistribute it and/or modify it under
864 the terms of the GNU General Public License, version 2.0, as published by the
865 Free Software Foundation.
866
867 This program is also distributed with certain software (including but not
868 limited to OpenSSL) that is licensed under separate terms, as designated in a
869 particular file or component or in included license documentation. The authors
870 of MySQL hereby grant you an additional permission to link the program and
871 your derivative works with the separately licensed software that they have
872 included with MySQL.
873
874 This program is distributed in the hope that it will be useful, but WITHOUT
875 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
876 FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0,
877 for more details.
878
879 You should have received a copy of the GNU General Public License along with
880 this program; if not, write to the Free Software Foundation, Inc.,
881 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
882
883 *****************************************************************************/
884 /******************************************************
885 SQL parser lexical analyzer: input file for the GNU Flex lexer generator
886
887 The InnoDB parser is frozen because MySQL takes care of SQL parsing.
888 Therefore we normally keep the InnoDB parser C files as they are, and do
889 not automatically generate them from pars0grm.y and pars0lex.l.
890
891 How to make the InnoDB parser and lexer C files:
892
893 1. Run ./make_flex.sh to generate lexer files.
894
895 2. Run ./make_bison.sh to generate parser files.
896
897 These instructions seem to work at least with bison-1.875d and flex-2.5.31 on
898 Linux.
899
900 Created 12/14/1997 Heikki Tuuri
901 *******************************************************/
902 #define YY_NO_INPUT 1
903 #define YY_NO_UNISTD_H 1
904 #line 53 "pars0lex.l"
905 #define YYSTYPE que_node_t*
906
907 #include "univ.i"
908 #include "pars0pars.h"
909 #include "pars0grm.h"
910 #include "pars0sym.h"
911 #include "mem0mem.h"
912 #include "os0proc.h"
913
914 #define malloc(A) ut::malloc_withkey(UT_NEW_THIS_FILE_PSI_KEY, A)
915 #define free(A) ut::free(A)
916 #define realloc(P, A) ut::realloc(P, A)
917 #define exit(A) ut_error
918
919 /* Note: We cast result from int to yy_size_t */
920 #define YY_INPUT(buf, result, max_size) \
921 ((result) = pars_get_lex_chars(buf, max_size))
922
923 /* String buffer for removing quotes */
924 static ulint stringbuf_len_alloc = 0; /* Allocated length */
925 static ulint stringbuf_len = 0; /* Current length */
926 static char* stringbuf; /* Start of buffer */
927 /** Appends a string to the buffer. */
928 static
929 void
930 string_append(
931 /*==========*/
932 const char* str, /*!< in: string to be appended */
933 ulint len) /*!< in: length of the string */
934 {
935 if (stringbuf == nullptr) {
936 stringbuf = static_cast<char *>(malloc(1));
937 stringbuf_len_alloc = 1;
938 }
939
940 if (stringbuf_len + len > stringbuf_len_alloc) {
941 while (stringbuf_len + len > stringbuf_len_alloc) {
942 stringbuf_len_alloc <<= 1;
943 }
944
945 stringbuf = static_cast<char*>(
946 realloc(stringbuf, stringbuf_len_alloc));
947 }
948
949 memcpy(stringbuf + stringbuf_len, str, len);
950 stringbuf_len += len;
951 }
952
953
954
955
956 #line 947 "lexyy.cc"
957
958 #define INITIAL 0
959 #define comment 1
960 #define quoted 2
961 #define id 3
962
963 #ifndef YY_NO_UNISTD_H
964 /* Special case for "unistd.h", since it is non-ANSI. We include it way
965 * down here because we want the user's section 1 to have been scanned first.
966 * The user has a chance to override it with an option.
967 */
968 #include <unistd.h>
969 #endif
970
971 #ifndef YY_EXTRA_TYPE
972 #define YY_EXTRA_TYPE void *
973 #endif
974
975 static int yy_init_globals (void );
976
977 /* Accessor methods to globals.
978 These are made visible to non-reentrant scanners for convenience. */
979
980 [[maybe_unused]] static int yylex_destroy (void );
981
982 [[maybe_unused]] static int yyget_debug (void );
983
984 [[maybe_unused]] static void yyset_debug (int debug_flag );
985
986 YY_EXTRA_TYPE yyget_extra (void );
987
988
989
990 [[maybe_unused]] static FILE *yyget_in (void );
991
992 [[maybe_unused]] static void yyset_in (FILE * in_str );
993
994 [[maybe_unused]] static FILE *yyget_out (void );
995
996 [[maybe_unused]] static void yyset_out (FILE * out_str );
997
998 yy_size_t yyget_leng (void );
999
1000 [[maybe_unused]] static char *yyget_text (void );
1001
1002 [[maybe_unused]] static int yyget_lineno (void );
1003
1004 [[maybe_unused]] static void yyset_lineno (int line_number );
1005
1006 /* Macros after this point can all be overridden by user definitions in
1007 * section 1.
1008 */
1009
1010 #ifndef YY_SKIP_YYWRAP
1011 #ifdef __cplusplus
1012 extern "C" int yywrap (void );
1013 #else
1014 extern int yywrap (void );
1015 #endif
1016 #endif
1017
1018 #ifndef yytext_ptr
1019 static void yy_flex_strncpy (char *,yyconst char *,int );
1020 #endif
1021
1022 #ifdef YY_NEED_STRLEN
1023 static int yy_flex_strlen (yyconst char * );
1024 #endif
1025
1026 #ifndef YY_NO_INPUT
1027
1028 #ifdef __cplusplus
1029 static int yyinput (void );
1030 #else
1031 static int input (void );
1032 #endif
1033
1034 #endif
1035
1036 /* Amount of stuff to slurp up with each read. */
1037 #ifndef YY_READ_BUF_SIZE
1038 #ifdef __ia64__
1039 /* On IA-64, the buffer size is 16k, not 8k */
1040 #define YY_READ_BUF_SIZE 16384
1041 #else
1042 #define YY_READ_BUF_SIZE 8192
1043 #endif /* __ia64__ */
1044 #endif
1045
1046 /* Copy whatever the last rule matched to the standard output. */
1047 #ifndef ECHO
1048 /* This used to be an fputs(), but since the string might contain NUL's,
1049 * we now use fwrite().
1050 */
1051 #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
1052 #endif
1053
1054 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1055 * is returned in "result".
1056 */
1057 #ifndef YY_INPUT
1058 #define YY_INPUT(buf,result,max_size) \
1059 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1060 { \
1061 int c = '*'; \
1062 size_t n; \
1063 for ( n = 0; n < max_size && \
1064 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1065 buf[n] = (char) c; \
1066 if ( c == '\n' ) \
1067 buf[n++] = (char) c; \
1068 if ( c == EOF && ferror( yyin ) ) \
1069 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1070 result = n; \
1071 } \
1072 else \
1073 { \
1074 errno=0; \
1075 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
1076 { \
1077 if( errno != EINTR) \
1078 { \
1079 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1080 break; \
1081 } \
1082 errno=0; \
1083 clearerr(yyin); \
1084 } \
1085 }\
1086 \
1087
1088 #endif
1089
1090 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1091 * we don't want an extra ';' after the "return" because that will cause
1092 * some compilers to complain about unreachable statements.
1093 */
1094 #ifndef yyterminate
1095 #define yyterminate() return YY_NULL
1096 #endif
1097
1098 /* Number of entries by which start-condition stack grows. */
1099 #ifndef YY_START_STACK_INCR
1100 #define YY_START_STACK_INCR 25
1101 #endif
1102
1103 /* Report a fatal error. */
1104 #ifndef YY_FATAL_ERROR
1105 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1106 #endif
1107
1108 /* end tables serialization structures and prototypes */
1109
1110 /* Default declaration of generated scanner - a define so the user can
1111 * easily add parameters.
1112 */
1113 #ifndef YY_DECL
1114 #define YY_DECL_IS_OURS 1
1115
1116 extern int yylex (void);
1117
1118 #define YY_DECL int yylex (void)
1119 #endif /* !YY_DECL */
1120
1121 /* Code executed at the beginning of each rule, after yytext and yyleng
1122 * have been set up.
1123 */
1124 #ifndef YY_USER_ACTION
1125 #define YY_USER_ACTION
1126 #endif
1127
1128 /* Code executed at the end of each rule. */
1129 #ifndef YY_BREAK
1130 #define YY_BREAK break;
1131 #endif
1132
1133 #define YY_RULE_SETUP \
1134 YY_USER_ACTION
1135
1136 /** The main scanner function which does all the work.
1137 */
1138 YY_DECL
1139 {
1140 yy_state_type yy_current_state;
1141 char *yy_cp, *yy_bp;
1142 int yy_act;
1143
1144 if ( !(yy_init) )
1145 {
1146 (yy_init) = 1;
1147
1148 #ifdef YY_USER_INIT
1149 YY_USER_INIT;
1150 #endif
1151
1152 if ( ! (yy_start) )
1153 (yy_start) = 1; /* first start state */
1154
1155 if ( ! yyin )
1156 yyin = stdin;
1157
1158 if ( ! yyout )
1159 yyout = stdout;
1160
1161 if ( ! YY_CURRENT_BUFFER ) {
1162 yyensure_buffer_stack ();
1163 YY_CURRENT_BUFFER_LVALUE =
1164 yy_create_buffer(yyin,YY_BUF_SIZE );
1165 }
1166
1167 yy_load_buffer_state( );
1168 }
1169
1170 {
1171 #line 112 "pars0lex.l"
1172
1173
1174 #line 1165 "lexyy.cc"
1175
1176 while ( true ) /* loops until end-of-file is reached */
1177 {
1178 yy_cp = (yy_c_buf_p);
1179
1180 /* Support of yytext. */
1181 *yy_cp = (yy_hold_char);
1182
1183 /* yy_bp points to the position in yy_ch_buf of the start of
1184 * the current run.
1185 */
1186 yy_bp = yy_cp;
1187
1188 yy_current_state = (yy_start);
1189 yy_match:
1190 do
1191 {
1192 YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
1193 if ( yy_accept[yy_current_state] )
1194 {
1195 (yy_last_accepting_state) = yy_current_state;
1196 (yy_last_accepting_cpos) = yy_cp;
1197 }
1198 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1199 {
1200 yy_current_state = (int) yy_def[yy_current_state];
1201 if ( yy_current_state >= 372 )
1202 yy_c = yy_meta[(unsigned int) yy_c];
1203 }
1204 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1205 ++yy_cp;
1206 }
1207 while ( yy_current_state != 371 );
1208 yy_cp = (yy_last_accepting_cpos);
1209 yy_current_state = (yy_last_accepting_state);
1210
1211 yy_find_action:
1212 yy_act = yy_accept[yy_current_state];
1213
1214 YY_DO_BEFORE_ACTION;
1215
1216 do_action: /* This label is used only to access EOF actions. */
1217
1218 switch ( yy_act )
1219 { /* beginning of action switch */
1220 case 0: /* must back up */
1221 /* undo the effects of YY_DO_BEFORE_ACTION */
1222 *yy_cp = (yy_hold_char);
1223 yy_cp = (yy_last_accepting_cpos);
1224 yy_current_state = (yy_last_accepting_state);
1225 goto yy_find_action;
1226
1227 case 1:
1228 YY_RULE_SETUP
1229 #line 114 "pars0lex.l"
1230 {
1231 yylval = sym_tab_add_int_lit(pars_sym_tab_global,
1232 atoi(yytext));
1233 return(PARS_INT_LIT);
1234 }
1235 YY_BREAK
1236 case 2:
1237 YY_RULE_SETUP
1238 #line 120 "pars0lex.l"
1239 {
1240 ut_error; /* not implemented */
1241
1242 return(PARS_FLOAT_LIT);
1243 }
1244 YY_BREAK
1245 case 3:
1246 YY_RULE_SETUP
1247 #line 126 "pars0lex.l"
1248 {
1249 ulint type;
1250
1251 yylval = sym_tab_add_bound_lit(pars_sym_tab_global,
1252 yytext + 1, &type);
1253
1254 return((int) type);
1255 }
1256 YY_BREAK
1257 case 4:
1258 YY_RULE_SETUP
1259 #line 135 "pars0lex.l"
1260 {
1261 yylval = sym_tab_add_bound_id(pars_sym_tab_global,
1262 yytext + 1);
1263
1264 return(PARS_ID_TOKEN);
1265 }
1266 YY_BREAK
1267 case 5:
1268 YY_RULE_SETUP
1269 #line 142 "pars0lex.l"
1270 {
1271 /* Quoted character string literals are handled in an explicit
1272 start state 'quoted'. This state is entered and the buffer for
1273 the scanned string is emptied upon encountering a starting quote.
1274
1275 In the state 'quoted', only two actions are possible (defined below). */
1276 BEGIN(quoted);
1277 stringbuf_len = 0;
1278 }
1279 YY_BREAK
1280 case 6:
1281 /* rule 6 can match eol */
1282 YY_RULE_SETUP
1283 #line 151 "pars0lex.l"
1284 {
1285 /* Got a sequence of characters other than "'":
1286 append to string buffer */
1287 string_append(yytext, yyleng);
1288 }
1289 YY_BREAK
1290 case 7:
1291 YY_RULE_SETUP
1292 #line 156 "pars0lex.l"
1293 {
1294 /* Got a sequence of "'" characters:
1295 append half of them to string buffer,
1296 as "''" represents a single "'".
1297 We apply truncating division,
1298 so that "'''" will result in "'". */
1299
1300 string_append(yytext, yyleng / 2);
1301
1302 /* If we got an odd number of quotes, then the
1303 last quote we got is the terminating quote.
1304 At the end of the string, we return to the
1305 initial start state and report the scanned
1306 string literal. */
1307
1308 if (yyleng % 2) {
1309 BEGIN(INITIAL);
1310 yylval = sym_tab_add_str_lit(
1311 pars_sym_tab_global,
1312 (byte*) stringbuf, stringbuf_len);
1313 return(PARS_STR_LIT);
1314 }
1315 }
1316 YY_BREAK
1317 case 8:
1318 YY_RULE_SETUP
1319 #line 180 "pars0lex.l"
1320 {
1321 /* Quoted identifiers are handled in an explicit start state 'id'.
1322 This state is entered and the buffer for the scanned string is emptied
1323 upon encountering a starting quote.
1324
1325 In the state 'id', only two actions are possible (defined below). */
1326 BEGIN(id);
1327 stringbuf_len = 0;
1328 }
1329 YY_BREAK
1330 case 9:
1331 /* rule 9 can match eol */
1332 YY_RULE_SETUP
1333 #line 189 "pars0lex.l"
1334 {
1335 /* Got a sequence of characters other than '"':
1336 append to string buffer */
1337 string_append(yytext, yyleng);
1338 }
1339 YY_BREAK
1340 case 10:
1341 YY_RULE_SETUP
1342 #line 194 "pars0lex.l"
1343 {
1344 /* Got a sequence of '"' characters:
1345 append half of them to string buffer,
1346 as '""' represents a single '"'.
1347 We apply truncating division,
1348 so that '"""' will result in '"'. */
1349
1350 string_append(yytext, yyleng / 2);
1351
1352 /* If we got an odd number of quotes, then the
1353 last quote we got is the terminating quote.
1354 At the end of the string, we return to the
1355 initial start state and report the scanned
1356 identifier. */
1357
1358 if (yyleng % 2) {
1359 BEGIN(INITIAL);
1360 yylval = sym_tab_add_id(
1361 pars_sym_tab_global,
1362 (byte*) stringbuf, stringbuf_len);
1363
1364 return(PARS_ID_TOKEN);
1365 }
1366 }
1367 YY_BREAK
1368 case 11:
1369 YY_RULE_SETUP
1370 #line 219 "pars0lex.l"
1371 {
1372 yylval = sym_tab_add_null_lit(pars_sym_tab_global);
1373
1374 return(PARS_NULL_LIT);
1375 }
1376 YY_BREAK
1377 case 12:
1378 YY_RULE_SETUP
1379 #line 225 "pars0lex.l"
1380 {
1381 /* Implicit cursor name */
1382 yylval = sym_tab_add_str_lit(pars_sym_tab_global,
1383 (byte*) yytext, yyleng);
1384 return(PARS_SQL_TOKEN);
1385 }
1386 YY_BREAK
1387 case 13:
1388 YY_RULE_SETUP
1389 #line 232 "pars0lex.l"
1390 {
1391 return(PARS_AND_TOKEN);
1392 }
1393 YY_BREAK
1394 case 14:
1395 YY_RULE_SETUP
1396 #line 236 "pars0lex.l"
1397 {
1398 return(PARS_OR_TOKEN);
1399 }
1400 YY_BREAK
1401 case 15:
1402 YY_RULE_SETUP
1403 #line 240 "pars0lex.l"
1404 {
1405 return(PARS_NOT_TOKEN);
1406 }
1407 YY_BREAK
1408 case 16:
1409 YY_RULE_SETUP
1410 #line 244 "pars0lex.l"
1411 {
1412 return(PARS_PROCEDURE_TOKEN);
1413 }
1414 YY_BREAK
1415 case 17:
1416 YY_RULE_SETUP
1417 #line 248 "pars0lex.l"
1418 {
1419 return(PARS_IN_TOKEN);
1420 }
1421 YY_BREAK
1422 case 18:
1423 YY_RULE_SETUP
1424 #line 252 "pars0lex.l"
1425 {
1426 return(PARS_OUT_TOKEN);
1427 }
1428 YY_BREAK
1429 case 19:
1430 YY_RULE_SETUP
1431 #line 256 "pars0lex.l"
1432 {
1433 return(PARS_BINARY_TOKEN);
1434 }
1435 YY_BREAK
1436 case 20:
1437 YY_RULE_SETUP
1438 #line 260 "pars0lex.l"
1439 {
1440 return(PARS_BLOB_TOKEN);
1441 }
1442 YY_BREAK
1443 case 21:
1444 YY_RULE_SETUP
1445 #line 264 "pars0lex.l"
1446 {
1447 return(PARS_INT_TOKEN);
1448 }
1449 YY_BREAK
1450 case 22:
1451 YY_RULE_SETUP
1452 #line 268 "pars0lex.l"
1453 {
1454 return(PARS_INT_TOKEN);
1455 }
1456 YY_BREAK
1457 case 23:
1458 YY_RULE_SETUP
1459 #line 272 "pars0lex.l"
1460 {
1461 return(PARS_FLOAT_TOKEN);
1462 }
1463 YY_BREAK
1464 case 24:
1465 YY_RULE_SETUP
1466 #line 276 "pars0lex.l"
1467 {
1468 return(PARS_CHAR_TOKEN);
1469 }
1470 YY_BREAK
1471 case 25:
1472 YY_RULE_SETUP
1473 #line 280 "pars0lex.l"
1474 {
1475 return(PARS_IS_TOKEN);
1476 }
1477 YY_BREAK
1478 case 26:
1479 YY_RULE_SETUP
1480 #line 284 "pars0lex.l"
1481 {
1482 return(PARS_BEGIN_TOKEN);
1483 }
1484 YY_BREAK
1485 case 27:
1486 YY_RULE_SETUP
1487 #line 288 "pars0lex.l"
1488 {
1489 return(PARS_END_TOKEN);
1490 }
1491 YY_BREAK
1492 case 28:
1493 YY_RULE_SETUP
1494 #line 292 "pars0lex.l"
1495 {
1496 return(PARS_IF_TOKEN);
1497 }
1498 YY_BREAK
1499 case 29:
1500 YY_RULE_SETUP
1501 #line 296 "pars0lex.l"
1502 {
1503 return(PARS_THEN_TOKEN);
1504 }
1505 YY_BREAK
1506 case 30:
1507 YY_RULE_SETUP
1508 #line 300 "pars0lex.l"
1509 {
1510 return(PARS_ELSE_TOKEN);
1511 }
1512 YY_BREAK
1513 case 31:
1514 YY_RULE_SETUP
1515 #line 304 "pars0lex.l"
1516 {
1517 return(PARS_ELSIF_TOKEN);
1518 }
1519 YY_BREAK
1520 case 32:
1521 YY_RULE_SETUP
1522 #line 308 "pars0lex.l"
1523 {
1524 return(PARS_LOOP_TOKEN);
1525 }
1526 YY_BREAK
1527 case 33:
1528 YY_RULE_SETUP
1529 #line 312 "pars0lex.l"
1530 {
1531 return(PARS_WHILE_TOKEN);
1532 }
1533 YY_BREAK
1534 case 34:
1535 YY_RULE_SETUP
1536 #line 316 "pars0lex.l"
1537 {
1538 return(PARS_RETURN_TOKEN);
1539 }
1540 YY_BREAK
1541 case 35:
1542 YY_RULE_SETUP
1543 #line 320 "pars0lex.l"
1544 {
1545 return(PARS_SELECT_TOKEN);
1546 }
1547 YY_BREAK
1548 case 36:
1549 YY_RULE_SETUP
1550 #line 324 "pars0lex.l"
1551 {
1552 return(PARS_SUM_TOKEN);
1553 }
1554 YY_BREAK
1555 case 37:
1556 YY_RULE_SETUP
1557 #line 328 "pars0lex.l"
1558 {
1559 return(PARS_COUNT_TOKEN);
1560 }
1561 YY_BREAK
1562 case 38:
1563 YY_RULE_SETUP
1564 #line 332 "pars0lex.l"
1565 {
1566 return(PARS_DISTINCT_TOKEN);
1567 }
1568 YY_BREAK
1569 case 39:
1570 YY_RULE_SETUP
1571 #line 336 "pars0lex.l"
1572 {
1573 return(PARS_FROM_TOKEN);
1574 }
1575 YY_BREAK
1576 case 40:
1577 YY_RULE_SETUP
1578 #line 340 "pars0lex.l"
1579 {
1580 return(PARS_WHERE_TOKEN);
1581 }
1582 YY_BREAK
1583 case 41:
1584 YY_RULE_SETUP
1585 #line 344 "pars0lex.l"
1586 {
1587 return(PARS_FOR_TOKEN);
1588 }
1589 YY_BREAK
1590 case 42:
1591 YY_RULE_SETUP
1592 #line 348 "pars0lex.l"
1593 {
1594 return(PARS_READ_TOKEN);
1595 }
1596 YY_BREAK
1597 case 43:
1598 YY_RULE_SETUP
1599 #line 352 "pars0lex.l"
1600 {
1601 return(PARS_ORDER_TOKEN);
1602 }
1603 YY_BREAK
1604 case 44:
1605 YY_RULE_SETUP
1606 #line 356 "pars0lex.l"
1607 {
1608 return(PARS_BY_TOKEN);
1609 }
1610 YY_BREAK
1611 case 45:
1612 YY_RULE_SETUP
1613 #line 360 "pars0lex.l"
1614 {
1615 return(PARS_ASC_TOKEN);
1616 }
1617 YY_BREAK
1618 case 46:
1619 YY_RULE_SETUP
1620 #line 364 "pars0lex.l"
1621 {
1622 return(PARS_DESC_TOKEN);
1623 }
1624 YY_BREAK
1625 case 47:
1626 YY_RULE_SETUP
1627 #line 368 "pars0lex.l"
1628 {
1629 return(PARS_INSERT_TOKEN);
1630 }
1631 YY_BREAK
1632 case 48:
1633 YY_RULE_SETUP
1634 #line 372 "pars0lex.l"
1635 {
1636 return(PARS_INTO_TOKEN);
1637 }
1638 YY_BREAK
1639 case 49:
1640 YY_RULE_SETUP
1641 #line 376 "pars0lex.l"
1642 {
1643 return(PARS_VALUES_TOKEN);
1644 }
1645 YY_BREAK
1646 case 50:
1647 YY_RULE_SETUP
1648 #line 380 "pars0lex.l"
1649 {
1650 return(PARS_UPDATE_TOKEN);
1651 }
1652 YY_BREAK
1653 case 51:
1654 YY_RULE_SETUP
1655 #line 384 "pars0lex.l"
1656 {
1657 return(PARS_SET_TOKEN);
1658 }
1659 YY_BREAK
1660 case 52:
1661 YY_RULE_SETUP
1662 #line 388 "pars0lex.l"
1663 {
1664 return(PARS_DELETE_TOKEN);
1665 }
1666 YY_BREAK
1667 case 53:
1668 YY_RULE_SETUP
1669 #line 392 "pars0lex.l"
1670 {
1671 return(PARS_CURRENT_TOKEN);
1672 }
1673 YY_BREAK
1674 case 54:
1675 YY_RULE_SETUP
1676 #line 396 "pars0lex.l"
1677 {
1678 return(PARS_OF_TOKEN);
1679 }
1680 YY_BREAK
1681 case 55:
1682 YY_RULE_SETUP
1683 #line 400 "pars0lex.l"
1684 {
1685 return(PARS_CREATE_TOKEN);
1686 }
1687 YY_BREAK
1688 case 56:
1689 YY_RULE_SETUP
1690 #line 404 "pars0lex.l"
1691 {
1692 return(PARS_TABLE_TOKEN);
1693 }
1694 YY_BREAK
1695 case 57:
1696 YY_RULE_SETUP
1697 #line 408 "pars0lex.l"
1698 {
1699 return(PARS_COMPACT_TOKEN);
1700 }
1701 YY_BREAK
1702 case 58:
1703 YY_RULE_SETUP
1704 #line 412 "pars0lex.l"
1705 {
1706 return(PARS_BLOCK_SIZE_TOKEN);
1707 }
1708 YY_BREAK
1709 case 59:
1710 YY_RULE_SETUP
1711 #line 416 "pars0lex.l"
1712 {
1713 return(PARS_INDEX_TOKEN);
1714 }
1715 YY_BREAK
1716 case 60:
1717 YY_RULE_SETUP
1718 #line 420 "pars0lex.l"
1719 {
1720 return(PARS_UNIQUE_TOKEN);
1721 }
1722 YY_BREAK
1723 case 61:
1724 YY_RULE_SETUP
1725 #line 424 "pars0lex.l"
1726 {
1727 return(PARS_CLUSTERED_TOKEN);
1728 }
1729 YY_BREAK
1730 case 62:
1731 YY_RULE_SETUP
1732 #line 428 "pars0lex.l"
1733 {
1734 return(PARS_DOES_NOT_FIT_IN_MEM_TOKEN);
1735 }
1736 YY_BREAK
1737 case 63:
1738 YY_RULE_SETUP
1739 #line 432 "pars0lex.l"
1740 {
1741 return(PARS_ON_TOKEN);
1742 }
1743 YY_BREAK
1744 case 64:
1745 YY_RULE_SETUP
1746 #line 436 "pars0lex.l"
1747 {
1748 return(PARS_DECLARE_TOKEN);
1749 }
1750 YY_BREAK
1751 case 65:
1752 YY_RULE_SETUP
1753 #line 440 "pars0lex.l"
1754 {
1755 return(PARS_CURSOR_TOKEN);
1756 }
1757 YY_BREAK
1758 case 66:
1759 YY_RULE_SETUP
1760 #line 444 "pars0lex.l"
1761 {
1762 return(PARS_OPEN_TOKEN);
1763 }
1764 YY_BREAK
1765 case 67:
1766 YY_RULE_SETUP
1767 #line 448 "pars0lex.l"
1768 {
1769 return(PARS_FETCH_TOKEN);
1770 }
1771 YY_BREAK
1772 case 68:
1773 YY_RULE_SETUP
1774 #line 452 "pars0lex.l"
1775 {
1776 return(PARS_CLOSE_TOKEN);
1777 }
1778 YY_BREAK
1779 case 69:
1780 YY_RULE_SETUP
1781 #line 456 "pars0lex.l"
1782 {
1783 return(PARS_NOTFOUND_TOKEN);
1784 }
1785 YY_BREAK
1786 case 70:
1787 YY_RULE_SETUP
1788 #line 460 "pars0lex.l"
1789 {
1790 return(PARS_TO_BINARY_TOKEN);
1791 }
1792 YY_BREAK
1793 case 71:
1794 YY_RULE_SETUP
1795 #line 464 "pars0lex.l"
1796 {
1797 return(PARS_SUBSTR_TOKEN);
1798 }
1799 YY_BREAK
1800 case 72:
1801 YY_RULE_SETUP
1802 #line 468 "pars0lex.l"
1803 {
1804 return(PARS_CONCAT_TOKEN);
1805 }
1806 YY_BREAK
1807 case 73:
1808 YY_RULE_SETUP
1809 #line 472 "pars0lex.l"
1810 {
1811 return(PARS_INSTR_TOKEN);
1812 }
1813 YY_BREAK
1814 case 74:
1815 YY_RULE_SETUP
1816 #line 476 "pars0lex.l"
1817 {
1818 return(PARS_LENGTH_TOKEN);
1819 }
1820 YY_BREAK
1821 case 75:
1822 YY_RULE_SETUP
1823 #line 480 "pars0lex.l"
1824 {
1825 return(PARS_COMMIT_TOKEN);
1826 }
1827 YY_BREAK
1828 case 76:
1829 YY_RULE_SETUP
1830 #line 484 "pars0lex.l"
1831 {
1832 return(PARS_ROLLBACK_TOKEN);
1833 }
1834 YY_BREAK
1835 case 77:
1836 YY_RULE_SETUP
1837 #line 488 "pars0lex.l"
1838 {
1839 return(PARS_WORK_TOKEN);
1840 }
1841 YY_BREAK
1842 case 78:
1843 YY_RULE_SETUP
1844 #line 492 "pars0lex.l"
1845 {
1846 return(PARS_UNSIGNED_TOKEN);
1847 }
1848 YY_BREAK
1849 case 79:
1850 YY_RULE_SETUP
1851 #line 496 "pars0lex.l"
1852 {
1853 return(PARS_EXIT_TOKEN);
1854 }
1855 YY_BREAK
1856 case 80:
1857 YY_RULE_SETUP
1858 #line 500 "pars0lex.l"
1859 {
1860 return(PARS_FUNCTION_TOKEN);
1861 }
1862 YY_BREAK
1863 case 81:
1864 YY_RULE_SETUP
1865 #line 504 "pars0lex.l"
1866 {
1867 return(PARS_LOCK_TOKEN);
1868 }
1869 YY_BREAK
1870 case 82:
1871 YY_RULE_SETUP
1872 #line 508 "pars0lex.l"
1873 {
1874 return(PARS_SHARE_TOKEN);
1875 }
1876 YY_BREAK
1877 case 83:
1878 YY_RULE_SETUP
1879 #line 512 "pars0lex.l"
1880 {
1881 return(PARS_MODE_TOKEN);
1882 }
1883 YY_BREAK
1884 case 84:
1885 YY_RULE_SETUP
1886 #line 516 "pars0lex.l"
1887 {
1888 return(PARS_LIKE_TOKEN);
1889 }
1890 YY_BREAK
1891 case 85:
1892 YY_RULE_SETUP
1893 #line 520 "pars0lex.l"
1894 {
1895 return(PARS_BIGINT_TOKEN);
1896 }
1897 YY_BREAK
1898 case 86:
1899 YY_RULE_SETUP
1900 #line 524 "pars0lex.l"
1901 {
1902 yylval = sym_tab_add_id(pars_sym_tab_global,
1903 (byte*) yytext,
1904 ut_strlen(yytext));
1905 return(PARS_ID_TOKEN);
1906 }
1907 YY_BREAK
1908 case 87:
1909 YY_RULE_SETUP
1910 #line 531 "pars0lex.l"
1911 {
1912 yylval = sym_tab_add_id(pars_sym_tab_global,
1913 (byte*) yytext,
1914 ut_strlen(yytext));
1915 return(PARS_TABLE_NAME_TOKEN);
1916 }
1917 YY_BREAK
1918 case 88:
1919 YY_RULE_SETUP
1920 #line 538 "pars0lex.l"
1921 {
1922 return(PARS_DDOT_TOKEN);
1923 }
1924 YY_BREAK
1925 case 89:
1926 YY_RULE_SETUP
1927 #line 542 "pars0lex.l"
1928 {
1929 return(PARS_ASSIGN_TOKEN);
1930 }
1931 YY_BREAK
1932 case 90:
1933 YY_RULE_SETUP
1934 #line 546 "pars0lex.l"
1935 {
1936 return(PARS_LE_TOKEN);
1937 }
1938 YY_BREAK
1939 case 91:
1940 YY_RULE_SETUP
1941 #line 550 "pars0lex.l"
1942 {
1943 return(PARS_GE_TOKEN);
1944 }
1945 YY_BREAK
1946 case 92:
1947 YY_RULE_SETUP
1948 #line 554 "pars0lex.l"
1949 {
1950 return(PARS_NE_TOKEN);
1951 }
1952 YY_BREAK
1953 case 93:
1954 YY_RULE_SETUP
1955 #line 558 "pars0lex.l"
1956 {
1957
1958 return((int)(*yytext));
1959 }
1960 YY_BREAK
1961 case 94:
1962 YY_RULE_SETUP
1963 #line 563 "pars0lex.l"
1964 {
1965
1966 return((int)(*yytext));
1967 }
1968 YY_BREAK
1969 case 95:
1970 YY_RULE_SETUP
1971 #line 568 "pars0lex.l"
1972 {
1973
1974 return((int)(*yytext));
1975 }
1976 YY_BREAK
1977 case 96:
1978 YY_RULE_SETUP
1979 #line 573 "pars0lex.l"
1980 {
1981
1982 return((int)(*yytext));
1983 }
1984 YY_BREAK
1985 case 97:
1986 YY_RULE_SETUP
1987 #line 578 "pars0lex.l"
1988 {
1989
1990 return((int)(*yytext));
1991 }
1992 YY_BREAK
1993 case 98:
1994 YY_RULE_SETUP
1995 #line 583 "pars0lex.l"
1996 {
1997
1998 return((int)(*yytext));
1999 }
2000 YY_BREAK
2001 case 99:
2002 YY_RULE_SETUP
2003 #line 588 "pars0lex.l"
2004 {
2005
2006 return((int)(*yytext));
2007 }
2008 YY_BREAK
2009 case 100:
2010 YY_RULE_SETUP
2011 #line 593 "pars0lex.l"
2012 {
2013
2014 return((int)(*yytext));
2015 }
2016 YY_BREAK
2017 case 101:
2018 YY_RULE_SETUP
2019 #line 598 "pars0lex.l"
2020 {
2021
2022 return((int)(*yytext));
2023 }
2024 YY_BREAK
2025 case 102:
2026 YY_RULE_SETUP
2027 #line 603 "pars0lex.l"
2028 {
2029
2030 return((int)(*yytext));
2031 }
2032 YY_BREAK
2033 case 103:
2034 YY_RULE_SETUP
2035 #line 608 "pars0lex.l"
2036 {
2037
2038 return((int)(*yytext));
2039 }
2040 YY_BREAK
2041 case 104:
2042 YY_RULE_SETUP
2043 #line 613 "pars0lex.l"
2044 {
2045
2046 return((int)(*yytext));
2047 }
2048 YY_BREAK
2049 case 105:
2050 YY_RULE_SETUP
2051 #line 618 "pars0lex.l"
2052 {
2053
2054 return((int)(*yytext));
2055 }
2056 YY_BREAK
2057 case 106:
2058 YY_RULE_SETUP
2059 #line 623 "pars0lex.l"
2060 {
2061
2062 return((int)(*yytext));
2063 }
2064 YY_BREAK
2065 case 107:
2066 YY_RULE_SETUP
2067 #line 628 "pars0lex.l"
2068 {
2069
2070 return((int)(*yytext));
2071 }
2072 YY_BREAK
2073 case 108:
2074 YY_RULE_SETUP
2075 #line 633 "pars0lex.l"
2076 BEGIN(comment); /* eat up comment */
2077 YY_BREAK
2078 case 109:
2079 /* rule 109 can match eol */
2080 YY_RULE_SETUP
2081 #line 635 "pars0lex.l"
2082
2083 YY_BREAK
2084 case 110:
2085 /* rule 110 can match eol */
2086 YY_RULE_SETUP
2087 #line 636 "pars0lex.l"
2088
2089 YY_BREAK
2090 case 111:
2091 YY_RULE_SETUP
2092 #line 637 "pars0lex.l"
2093 BEGIN(INITIAL);
2094 YY_BREAK
2095 case 112:
2096 /* rule 112 can match eol */
2097 YY_RULE_SETUP
2098 #line 639 "pars0lex.l"
2099 /* eat up whitespace */
2100 YY_BREAK
2101 case 113:
2102 YY_RULE_SETUP
2103 #line 642 "pars0lex.l"
2104 {
2105 fprintf(stderr,"Unrecognized character: %02x\n",
2106 *yytext);
2107
2108 ut_error;
2109
2110 return(0);
2111 }
2112 YY_BREAK
2113 case 114:
2114 YY_RULE_SETUP
2115 #line 651 "pars0lex.l"
2116 YY_FATAL_ERROR( "flex scanner jammed" );
2117 YY_BREAK
2118 #line 2109 "lexyy.cc"
2119 case YY_STATE_EOF(INITIAL):
2120 case YY_STATE_EOF(comment):
2121 case YY_STATE_EOF(quoted):
2122 case YY_STATE_EOF(id):
2123 yyterminate();
2124
2125 case YY_END_OF_BUFFER:
2126 {
2127 /* Amount of text matched not including the EOB char. */
2128 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
2129
2130 /* Undo the effects of YY_DO_BEFORE_ACTION. */
2131 *yy_cp = (yy_hold_char);
2132 YY_RESTORE_YY_MORE_OFFSET
2133
2134 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
2135 {
2136 /* We're scanning a new file or input source. It's
2137 * possible that this happened because the user
2138 * just pointed yyin at a new source and called
2139 * yylex(). If so, then we have to assure
2140 * consistency between YY_CURRENT_BUFFER and our
2141 * globals. Here is the right place to do so, because
2142 * this is the first action (other than possibly a
2143 * back-up) that will match for the new input source.
2144 */
2145 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2146 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
2147 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
2148 }
2149
2150 /* Note that here we test for yy_c_buf_p "<=" to the position
2151 * of the first EOB in the buffer, since yy_c_buf_p will
2152 * already have been incremented past the NUL character
2153 * (since all states make transitions on EOB to the
2154 * end-of-buffer state). Contrast this with the test
2155 * in input().
2156 */
2157 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2158 { /* This was really a NUL. */
2159 yy_state_type yy_next_state;
2160
2161 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
2162
2163 yy_current_state = yy_get_previous_state( );
2164
2165 /* Okay, we're now positioned to make the NUL
2166 * transition. We couldn't have
2167 * yy_get_previous_state() go ahead and do it
2168 * for us because it doesn't know how to deal
2169 * with the possibility of jamming (and we don't
2170 * want to build jamming into it because then it
2171 * will run more slowly).
2172 */
2173
2174 yy_next_state = yy_try_NUL_trans( yy_current_state );
2175
2176 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2177
2178 if ( yy_next_state )
2179 {
2180 /* Consume the NUL. */
2181 yy_cp = ++(yy_c_buf_p);
2182 yy_current_state = yy_next_state;
2183 goto yy_match;
2184 }
2185
2186 else
2187 {
2188 yy_cp = (yy_last_accepting_cpos);
2189 yy_current_state = (yy_last_accepting_state);
2190 goto yy_find_action;
2191 }
2192 }
2193
2194 else switch ( yy_get_next_buffer( ) )
2195 {
2196 case EOB_ACT_END_OF_FILE:
2197 {
2198 (yy_did_buffer_switch_on_eof) = 0;
2199
2200 if ( yywrap( ) )
2201 {
2202 /* Note: because we've taken care in
2203 * yy_get_next_buffer() to have set up
2204 * yytext, we can now set up
2205 * yy_c_buf_p so that if some total
2206 * hoser (like flex itself) wants to
2207 * call the scanner after we return the
2208 * YY_NULL, it'll still work - another
2209 * YY_NULL will get returned.
2210 */
2211 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
2212
2213 yy_act = YY_STATE_EOF(YY_START);
2214 goto do_action;
2215 }
2216
2217 else
2218 {
2219 if ( ! (yy_did_buffer_switch_on_eof) )
2220 YY_NEW_FILE;
2221 }
2222 break;
2223 }
2224
2225 case EOB_ACT_CONTINUE_SCAN:
2226 (yy_c_buf_p) =
2227 (yytext_ptr) + yy_amount_of_matched_text;
2228
2229 yy_current_state = yy_get_previous_state( );
2230
2231 yy_cp = (yy_c_buf_p);
2232 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2233 goto yy_match;
2234
2235 case EOB_ACT_LAST_MATCH:
2236 (yy_c_buf_p) =
2237 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
2238
2239 yy_current_state = yy_get_previous_state( );
2240
2241 yy_cp = (yy_c_buf_p);
2242 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2243 goto yy_find_action;
2244 }
2245 break;
2246 }
2247
2248 default:
2249 YY_FATAL_ERROR(
2250 "fatal flex scanner internal error--no action found" );
2251 } /* end of action switch */
2252 } /* end of scanning one token */
2253 } /* end of user's declarations */
2254 } /* end of yylex */
2255
2256 /* yy_get_next_buffer - try to read in a new buffer
2257 *
2258 * Returns a code representing an action:
2259 * EOB_ACT_LAST_MATCH -
2260 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2261 * EOB_ACT_END_OF_FILE - end of file
2262 */
2263 static int yy_get_next_buffer (void)
2264 {
2265 char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
2266 char *source = (yytext_ptr);
2267 int number_to_move, i;
2268 int ret_val;
2269
2270 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
2271 YY_FATAL_ERROR(
2272 "fatal flex scanner internal error--end of buffer missed" );
2273
2274 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
2275 { /* Don't try to fill the buffer, so this is an EOF. */
2276 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
2277 {
2278 /* We matched a single character, the EOB, so
2279 * treat this as a final EOF.
2280 */
2281 return EOB_ACT_END_OF_FILE;
2282 }
2283
2284 else
2285 {
2286 /* We matched some text prior to the EOB, first
2287 * process it.
2288 */
2289 return EOB_ACT_LAST_MATCH;
2290 }
2291 }
2292
2293 /* Try to read more data. */
2294
2295 /* First move last chars to start of buffer. */
2296 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
2297
2298 for ( i = 0; i < number_to_move; ++i )
2299 *(dest++) = *(source++);
2300
2301 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2302 /* don't do the read, it's not guaranteed to return an EOF,
2303 * just force an EOF
2304 */
2305 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
2306
2307 else
2308 {
2309 yy_size_t num_to_read =
2310 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
2311
2312 while ( num_to_read <= 0 )
2313 { /* Not enough room in the buffer - grow it. */
2314
2315 /* just a shorter name for the current buffer */
2316 YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
2317
2318 int yy_c_buf_p_offset =
2319 (int) ((yy_c_buf_p) - b->yy_ch_buf);
2320
2321 if ( b->yy_is_our_buffer )
2322 {
2323 yy_size_t new_size = b->yy_buf_size * 2;
2324
2325 if ( new_size <= 0 )
2326 b->yy_buf_size += b->yy_buf_size / 8;
2327 else
2328 b->yy_buf_size *= 2;
2329
2330 b->yy_ch_buf = (char *)
2331 /* Include room in for 2 EOB chars. */
2332 yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
2333 }
2334 else
2335 /* Can't grow it, we don't own it. */
2336 b->yy_ch_buf = nullptr;
2337
2338 if ( ! b->yy_ch_buf )
2339 YY_FATAL_ERROR(
2340 "fatal error - scanner input buffer overflow" );
2341
2342 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
2343
2344 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
2345 number_to_move - 1;
2346
2347 }
2348
2349 if ( num_to_read > YY_READ_BUF_SIZE )
2350 num_to_read = YY_READ_BUF_SIZE;
2351
2352 /* Read in more data. */
2353 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2354 (yy_n_chars), num_to_read );
2355
2356 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2357 }
2358
2359 if ( (yy_n_chars) == 0 )
2360 {
2361 if ( number_to_move == YY_MORE_ADJ )
2362 {
2363 ret_val = EOB_ACT_END_OF_FILE;
2364 yyrestart(yyin );
2365 }
2366
2367 else
2368 {
2369 ret_val = EOB_ACT_LAST_MATCH;
2370 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
2371 YY_BUFFER_EOF_PENDING;
2372 }
2373 }
2374
2375 else
2376 ret_val = EOB_ACT_CONTINUE_SCAN;
2377
2378 if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
2379 /* Extend the array by 50%, plus the number we really need. */
2380 yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
2381 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
2382 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2383 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
2384 }
2385
2386 (yy_n_chars) += number_to_move;
2387 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
2388 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
2389
2390 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
2391
2392 return ret_val;
2393 }
2394
2395 /* yy_get_previous_state - get the state just before the EOB char was reached */
2396
2397 static yy_state_type yy_get_previous_state (void)
2398 {
2399 yy_state_type yy_current_state;
2400 char *yy_cp;
2401
2402 yy_current_state = (yy_start);
2403
2404 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
2405 {
2406 YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2407 if ( yy_accept[yy_current_state] )
2408 {
2409 (yy_last_accepting_state) = yy_current_state;
2410 (yy_last_accepting_cpos) = yy_cp;
2411 }
2412 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2413 {
2414 yy_current_state = (int) yy_def[yy_current_state];
2415 if ( yy_current_state >= 372 )
2416 yy_c = yy_meta[(unsigned int) yy_c];
2417 }
2418 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2419 }
2420
2421 return yy_current_state;
2422 }
2423
2424 /* yy_try_NUL_trans - try to make a transition on the NUL character
2425 *
2426 * synopsis
2427 * next_state = yy_try_NUL_trans( current_state );
2428 */
2429 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
2430 {
2431 int yy_is_jam;
2432 char *yy_cp = (yy_c_buf_p);
2433
2434 YY_CHAR yy_c = 1;
2435 if ( yy_accept[yy_current_state] )
2436 {
2437 (yy_last_accepting_state) = yy_current_state;
2438 (yy_last_accepting_cpos) = yy_cp;
2439 }
2440 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2441 {
2442 yy_current_state = (int) yy_def[yy_current_state];
2443 if ( yy_current_state >= 372 )
2444 yy_c = yy_meta[(unsigned int) yy_c];
2445 }
2446 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2447 yy_is_jam = (yy_current_state == 371);
2448
2449 return yy_is_jam ? 0 : yy_current_state;
2450 }
2451
2452 #ifndef YY_NO_INPUT
2453 #ifdef __cplusplus
2454 static int yyinput (void)
2455 #else
2456 static int input (void)
2457 #endif
2458
2459 {
2460 int c;
2461
2462 *(yy_c_buf_p) = (yy_hold_char);
2463
2464 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
2465 {
2466 /* yy_c_buf_p now points to the character we want to return.
2467 * If this occurs *before* the EOB characters, then it's a
2468 * valid NUL; if not, then we've hit the end of the buffer.
2469 */
2470 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2471 /* This was really a NUL. */
2472 *(yy_c_buf_p) = '\0';
2473
2474 else
2475 { /* need more input */
2476 yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
2477 ++(yy_c_buf_p);
2478
2479 switch ( yy_get_next_buffer( ) )
2480 {
2481 case EOB_ACT_LAST_MATCH:
2482 /* This happens because yy_g_n_b()
2483 * sees that we've accumulated a
2484 * token and flags that we need to
2485 * try matching the token before
2486 * proceeding. But for input(),
2487 * there's no matching to consider.
2488 * So convert the EOB_ACT_LAST_MATCH
2489 * to EOB_ACT_END_OF_FILE.
2490 */
2491
2492 /* Reset buffer status. */
2493 yyrestart(yyin );
2494
2495 /*FALLTHROUGH*/
2496
2497 case EOB_ACT_END_OF_FILE:
2498 {
2499 if ( yywrap( ) )
2500 return EOF;
2501
2502 if ( ! (yy_did_buffer_switch_on_eof) )
2503 YY_NEW_FILE;
2504 #ifdef __cplusplus
2505 return yyinput();
2506 #else
2507 return input();
2508 #endif
2509 }
2510
2511 case EOB_ACT_CONTINUE_SCAN:
2512 (yy_c_buf_p) = (yytext_ptr) + offset;
2513 break;
2514 }
2515 }
2516 }
2517
2518 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
2519 *(yy_c_buf_p) = '\0'; /* preserve yytext */
2520 (yy_hold_char) = *++(yy_c_buf_p);
2521
2522 return c;
2523 }
2524 #endif /* ifndef YY_NO_INPUT */
2525
2526 /** Immediately switch to a different input stream.
2527 * @param input_file A readable stream.
2528 *
2529 * @note This function does not reset the start condition to @c INITIAL .
2530 */
2531 static void yyrestart (FILE * input_file )
2532 {
2533
2534 if ( ! YY_CURRENT_BUFFER ){
2535 yyensure_buffer_stack ();
2536 YY_CURRENT_BUFFER_LVALUE =
2537 yy_create_buffer(yyin,YY_BUF_SIZE );
2538 }
2539
2540 yy_init_buffer(YY_CURRENT_BUFFER,input_file );
2541 yy_load_buffer_state( );
2542 }
2543
2544 /** Switch to a different input buffer.
2545 * @param new_buffer The new input buffer.
2546 *
2547 */
2548 [[maybe_unused]] static void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
2549 {
2550
2551 /* TODO. We should be able to replace this entire function body
2552 * with
2553 * yypop_buffer_state();
2554 * yypush_buffer_state(new_buffer);
2555 */
2556 yyensure_buffer_stack ();
2557 if ( YY_CURRENT_BUFFER == new_buffer )
2558 return;
2559
2560 if ( YY_CURRENT_BUFFER )
2561 {
2562 /* Flush out information for old buffer. */
2563 *(yy_c_buf_p) = (yy_hold_char);
2564 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2565 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2566 }
2567
2568 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2569 yy_load_buffer_state( );
2570
2571 /* We don't actually know whether we did this switch during
2572 * EOF (yywrap()) processing, but the only time this flag
2573 * is looked at is after yywrap() is called, so it's safe
2574 * to go ahead and always set it.
2575 */
2576 (yy_did_buffer_switch_on_eof) = 1;
2577 }
2578
2579 static void yy_load_buffer_state (void)
2580 {
2581 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2582 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2583 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2584 (yy_hold_char) = *(yy_c_buf_p);
2585 }
2586
2587 /** Allocate and initialize an input buffer state.
2588 * @param file A readable stream.
2589 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2590 *
2591 * @return the allocated buffer state.
2592 */
2593 static YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
2594 {
2595 YY_BUFFER_STATE b;
2596
2597 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
2598 if ( ! b )
2599 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2600
2601 b->yy_buf_size = size;
2602
2603 /* yy_ch_buf has to be 2 characters longer than the size given because
2604 * we need to put in 2 end-of-buffer characters.
2605 */
2606 b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );
2607 if ( ! b->yy_ch_buf )
2608 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2609
2610 b->yy_is_our_buffer = 1;
2611
2612 yy_init_buffer(b,file );
2613
2614 return b;
2615 }
2616
2617 /** Destroy the buffer.
2618 * @param b a buffer created with yy_create_buffer()
2619 *
2620 */
2621 static void yy_delete_buffer (YY_BUFFER_STATE b )
2622 {
2623
2624 if ( ! b )
2625 return;
2626
2627 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2628 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) nullptr;
2629
2630 if ( b->yy_is_our_buffer )
2631 yyfree((void *) b->yy_ch_buf );
2632
2633 yyfree((void *) b );
2634 }
2635
2636 /* Initializes or reinitializes a buffer.
2637 * This function is sometimes called more than once on the same buffer,
2638 * such as during a yyrestart() or at EOF.
2639 */
2640 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
2641
2642 {
2643 int oerrno = errno;
2644
2645 yy_flush_buffer(b );
2646
2647 b->yy_input_file = file;
2648 b->yy_fill_buffer = 1;
2649
2650 /* If b is the current buffer, then yy_init_buffer was _probably_
2651 * called from yyrestart() or through yy_get_next_buffer.
2652 * In that case, we don't want to reset the lineno or column.
2653 */
2654 if (b != YY_CURRENT_BUFFER){
2655 b->yy_bs_lineno = 1;
2656 b->yy_bs_column = 0;
2657 }
2658
2659 b->yy_is_interactive = 0;
2660
2661 errno = oerrno;
2662 }
2663
2664 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2665 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2666 *
2667 */
2668 static void yy_flush_buffer (YY_BUFFER_STATE b )
2669 {
2670 if ( ! b )
2671 return;
2672
2673 b->yy_n_chars = 0;
2674
2675 /* We always need two end-of-buffer characters. The first causes
2676 * a transition to the end-of-buffer state. The second causes
2677 * a jam in that state.
2678 */
2679 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2680 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2681
2682 b->yy_buf_pos = &b->yy_ch_buf[0];
2683
2684 b->yy_at_bol = 1;
2685 b->yy_buffer_status = YY_BUFFER_NEW;
2686
2687 if ( b == YY_CURRENT_BUFFER )
2688 yy_load_buffer_state( );
2689 }
2690
2691 /** Pushes the new state onto the stack. The new state becomes
2692 * the current state. This function will allocate the stack
2693 * if necessary.
2694 * @param new_buffer The new state.
2695 *
2696 */
2697 [[maybe_unused]] static void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
2698 {
2699 if (new_buffer == nullptr) return;
2700
2701 yyensure_buffer_stack();
2702
2703 /* This block is copied from yy_switch_to_buffer. */
2704 if (YY_CURRENT_BUFFER) {
2705 /* Flush out information for old buffer. */
2706 *(yy_c_buf_p) = (yy_hold_char);
2707 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2708 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2709 }
2710
2711 /* Only push if top exists. Otherwise, replace top. */
2712 if (YY_CURRENT_BUFFER)
2713 (yy_buffer_stack_top)++;
2714 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2715
2716 /* copied from yy_switch_to_buffer. */
2717 yy_load_buffer_state( );
2718 (yy_did_buffer_switch_on_eof) = 1;
2719 }
2720
2721 /** Removes and deletes the top of the stack, if present.
2722 * The next element becomes the new top.
2723 *
2724 */
2725 [[maybe_unused]] static void yypop_buffer_state (void)
2726 {
2727 if (!YY_CURRENT_BUFFER)
2728 return;
2729
2730 yy_delete_buffer(YY_CURRENT_BUFFER );
2731 YY_CURRENT_BUFFER_LVALUE = nullptr;
2732 if ((yy_buffer_stack_top) > 0)
2733 --(yy_buffer_stack_top);
2734
2735 if (YY_CURRENT_BUFFER) {
2736 yy_load_buffer_state( );
2737 (yy_did_buffer_switch_on_eof) = 1;
2738 }
2739 }
2740
2741 /* Allocates the stack if it does not exist.
2742 * Guarantees space for at least one push.
2743 */
2744 static void yyensure_buffer_stack (void)
2745 {
2746 yy_size_t num_to_alloc;
2747
2748 if (!(yy_buffer_stack)) {
2749
2750 /* First allocation is just for 2 elements, since we don't know if this
2751 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2752 * immediate realloc on the next call.
2753 */
2754 num_to_alloc = 1;
2755 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
2756 (num_to_alloc * sizeof(struct yy_buffer_state*)
2757 );
2758 if ( ! (yy_buffer_stack) )
2759 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2760
2761 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2762
2763 (yy_buffer_stack_max) = num_to_alloc;
2764 (yy_buffer_stack_top) = 0;
2765 return;
2766 }
2767
2768 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
2769
2770 /* Increase the buffer to prepare for a possible push. */
2771 int grow_size = 8 /* arbitrary grow size */;
2772
2773 num_to_alloc = (yy_buffer_stack_max) + grow_size;
2774 (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
2775 ((yy_buffer_stack),
2776 num_to_alloc * sizeof(struct yy_buffer_state*)
2777 );
2778 if ( ! (yy_buffer_stack) )
2779 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2780
2781 /* zero only the new slots.*/
2782 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
2783 (yy_buffer_stack_max) = num_to_alloc;
2784 }
2785 }
2786
2787 #ifndef YY_EXIT_FAILURE
2788 #define YY_EXIT_FAILURE 2
2789 #endif
2790
2791 static void yy_fatal_error (yyconst char* msg )
2792 {
2793 (void) fprintf( stderr, "%s\n", msg );
2794 exit( YY_EXIT_FAILURE );
2795 }
2796
2797 /* Redefine yyless() so it works in section 3 code. */
2798
2799 #undef yyless
2800 #define yyless(n) \
2801 do \
2802 { \
2803 /* Undo effects of setting up yytext. */ \
2804 int yyless_macro_arg = (n); \
2805 YY_LESS_LINENO(yyless_macro_arg);\
2806 yytext[yyleng] = (yy_hold_char); \
2807 (yy_c_buf_p) = yytext + yyless_macro_arg; \
2808 (yy_hold_char) = *(yy_c_buf_p); \
2809 *(yy_c_buf_p) = '\0'; \
2810 yyleng = yyless_macro_arg; \
2811 } \
2812 while ( 0 )
2813
2814 /* Accessor methods (get/set functions) to struct members. */
2815
2816 /** Get the current line number.
2817 *
2818 */
2819 [[maybe_unused]] static int yyget_lineno (void)
2820 {
2821
2822 return yylineno;
2823 }
2824
2825 /** Get the input stream.
2826 *
2827 */
2828 [[maybe_unused]] static FILE *yyget_in (void)
2829 {
2830 return yyin;
2831 }
2832
2833 /** Get the output stream.
2834 *
2835 */
2836 [[maybe_unused]] static FILE *yyget_out (void)
2837 {
2838 return yyout;
2839 }
2840
2841 /** Get the length of the current token.
2842 *
2843 */
2844 yy_size_t yyget_leng (void)
2845 {
2846 return yyleng;
2847 }
2848
2849 /** Get the current token.
2850 *
2851 */
2852
2853 [[maybe_unused]] static char *yyget_text (void)
2854 {
2855 return yytext;
2856 }
2857
2858 /** Set the current line number.
2859 * @param line_number line number
2860 *
2861 */
2862 [[maybe_unused]] static void yyset_lineno (int line_number )
2863 {
2864
2865 yylineno = line_number;
2866 }
2867
2868 /** Set the input stream. This does not discard the current
2869 * input buffer.
2870 * @param in_str A readable stream.
2871 *
2872 * @see yy_switch_to_buffer
2873 */
2874 [[maybe_unused]] static void yyset_in (FILE * in_str )
2875 {
2876 yyin = in_str ;
2877 }
2878
2879 [[maybe_unused]] static void yyset_out (FILE * out_str )
2880 {
2881 yyout = out_str ;
2882 }
2883
2884 [[maybe_unused]] static int yyget_debug (void)
2885 {
2886 return yy_flex_debug;
2887 }
2888
2889 [[maybe_unused]] static void yyset_debug (int bdebug )
2890 {
2891 yy_flex_debug = bdebug ;
2892 }
2893
2894 static int yy_init_globals (void)
2895 {
2896 /* Initialization is the same as for the non-reentrant scanner.
2897 * This function is called from yylex_destroy(), so don't allocate here.
2898 */
2899
2900 (yy_buffer_stack) = nullptr;
2901 (yy_buffer_stack_top) = 0;
2902 (yy_buffer_stack_max) = 0;
2903 (yy_c_buf_p) = (char *)nullptr;
2904 (yy_init) = 0;
2905 (yy_start) = 0;
2906
2907 /* Defined in main.c */
2908 #ifdef YY_STDINIT
2909 yyin = stdin;
2910 yyout = stdout;
2911 #else
2912 yyin = (FILE *)nullptr;
2913 yyout = (FILE *)nullptr;
2914 #endif
2915
2916 /* For future reference: Set errno on error, since we are called by
2917 * yylex_init()
2918 */
2919 return 0;
2920 }
2921
2922 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
2923 [[maybe_unused]] static int yylex_destroy (void)
2924 {
2925
2926 /* Pop the buffer stack, destroying each element. */
2927 while(YY_CURRENT_BUFFER){
2928 yy_delete_buffer(YY_CURRENT_BUFFER );
2929 YY_CURRENT_BUFFER_LVALUE = nullptr;
2930 yypop_buffer_state();
2931 }
2932
2933 /* Destroy the stack itself. */
2934 yyfree((yy_buffer_stack) );
2935 (yy_buffer_stack) = nullptr;
2936
2937 /* Reset the globals. This is important in a non-reentrant scanner so
2938 * the next time yylex() is called, initialization will occur. */
2939 yy_init_globals();
2940
2941 return 0;
2942 }
2943
2944 /*
2945 * Internal utility routines.
2946 */
2947
2948 #ifndef yytext_ptr
2949 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
2950 {
2951 int i;
2952 for ( i = 0; i < n; ++i )
2953 s1[i] = s2[i];
2954 }
2955 #endif
2956
2957 #ifdef YY_NEED_STRLEN
2958 static int yy_flex_strlen (yyconst char * s )
2959 {
2960 int n;
2961 for ( n = 0; s[n]; ++n )
2962 ;
2963
2964 return n;
2965 }
2966 #endif
2967
2968 static void *yyalloc (yy_size_t size )
2969 {
2970 return (void *) malloc( size );
2971 }
2972
2973 static void *yyrealloc (void * ptr, yy_size_t size )
2974 {
2975 /* The cast to (char *) in the following accommodates both
2976 * implementations that use char* generic pointers, and those
2977 * that use void* generic pointers. It works with the latter
2978 * because both ANSI C and C++ allow castless assignment from
2979 * any pointer type to void*, and deal with argument conversions
2980 * as though doing an assignment.
2981 */
2982 return (void *) realloc( (char *) ptr, size );
2983 }
2984
2985 static void yyfree (void * ptr )
2986 {
2987 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
2988 }
2989
2990 #define YYTABLES_NAME "yytables"
2991
2992 #line 650 "pars0lex.l"
2993
2994
2995
2996 /**********************************************************************
2997 Release any resources used by the lexer. */
2998 void
2999 pars_lexer_close(void)
3000 /*==================*/
3001 {
3002 yylex_destroy();
3003 free(stringbuf);
3004 stringbuf = nullptr;
3005 stringbuf_len_alloc = stringbuf_len = 0;
3006 }
3007