1#line 2 "generated/sqlscanner.cpp"
3#line 4 "generated/sqlscanner.cpp"
5#define YY_INT_ALIGNED short int
10#define YY_FLEX_MAJOR_VERSION 2
11#define YY_FLEX_MINOR_VERSION 5
12#define YY_FLEX_SUBMINOR_VERSION 37
13#if YY_FLEX_SUBMINOR_VERSION > 0
34#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
39#ifndef __STDC_LIMIT_MACROS
40#define __STDC_LIMIT_MACROS 1
44typedef int8_t flex_int8_t;
45typedef uint8_t flex_uint8_t;
46typedef int16_t flex_int16_t;
47typedef uint16_t flex_uint16_t;
48typedef int32_t flex_int32_t;
49typedef uint32_t flex_uint32_t;
51typedef signed char flex_int8_t;
52typedef short int flex_int16_t;
53typedef int flex_int32_t;
54typedef unsigned char flex_uint8_t;
55typedef unsigned short int flex_uint16_t;
56typedef unsigned int flex_uint32_t;
60#define INT8_MIN (-128)
63#define INT16_MIN (-32767-1)
66#define INT32_MIN (-2147483647-1)
72#define INT16_MAX (32767)
75#define INT32_MAX (2147483647)
78#define UINT8_MAX (255U)
81#define UINT16_MAX (65535U)
84#define UINT32_MAX (4294967295U)
120#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
126#define BEGIN (yy_start) = 1 + 2 *
132#define YY_START (((yy_start) - 1) / 2)
133#define YYSTATE YY_START
136#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
139#define YY_NEW_FILE yyrestart(yyin )
141#define YY_END_OF_BUFFER_CHAR 0
145#define YY_BUF_SIZE 16384
150#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
152#ifndef YY_TYPEDEF_YY_BUFFER_STATE
153#define YY_TYPEDEF_YY_BUFFER_STATE
154typedef struct yy_buffer_state *YY_BUFFER_STATE;
157#ifndef YY_TYPEDEF_YY_SIZE_T
158#define YY_TYPEDEF_YY_SIZE_T
159typedef size_t yy_size_t;
162extern yy_size_t yyleng;
164extern FILE *yyin, *yyout;
166#define EOB_ACT_CONTINUE_SCAN 0
167#define EOB_ACT_END_OF_FILE 1
168#define EOB_ACT_LAST_MATCH 2
170 #define YY_LESS_LINENO(n)
177 int yyless_macro_arg = (n); \
178 YY_LESS_LINENO(yyless_macro_arg);\
179 *yy_cp = (yy_hold_char); \
180 YY_RESTORE_YY_MORE_OFFSET \
181 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
182 YY_DO_BEFORE_ACTION; \
186#define unput(c) yyunput( c, (yytext_ptr) )
188#ifndef YY_STRUCT_YY_BUFFER_STATE
189#define YY_STRUCT_YY_BUFFER_STATE
190struct yy_buffer_state
211 int yy_is_our_buffer;
218 int yy_is_interactive;
234 int yy_buffer_status;
236#define YY_BUFFER_NEW 0
237#define YY_BUFFER_NORMAL 1
248#define YY_BUFFER_EOF_PENDING 2
254static size_t yy_buffer_stack_top = 0;
255static size_t yy_buffer_stack_max = 0;
256static YY_BUFFER_STATE * yy_buffer_stack = 0;
264#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
265 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
271#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
274static char yy_hold_char;
275static int yy_n_chars;
279static char *yy_c_buf_p = (
char *) 0;
280static int yy_init = 0;
281static int yy_start = 0;
286static int yy_did_buffer_switch_on_eof;
288void yyrestart (FILE *input_file );
289void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
290YY_BUFFER_STATE yy_create_buffer (FILE *file,
int size );
291void yy_delete_buffer (YY_BUFFER_STATE b );
292void yy_flush_buffer (YY_BUFFER_STATE b );
293void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
294void yypop_buffer_state (
void );
296static void yyensure_buffer_stack (
void );
297static void yy_load_buffer_state (
void );
298static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
300#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
302YY_BUFFER_STATE yy_scan_buffer (
char *base,yy_size_t size );
303YY_BUFFER_STATE yy_scan_string (yyconst
char *yy_str );
304YY_BUFFER_STATE yy_scan_bytes (yyconst
char *bytes,yy_size_t len );
306void *yyalloc (yy_size_t );
307void *yyrealloc (
void *,yy_size_t );
308void yyfree (
void * );
310#define yy_new_buffer yy_create_buffer
312#define yy_set_interactive(is_interactive) \
314 if ( ! YY_CURRENT_BUFFER ){ \
315 yyensure_buffer_stack (); \
316 YY_CURRENT_BUFFER_LVALUE = \
317 yy_create_buffer(yyin,YY_BUF_SIZE ); \
319 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
322#define yy_set_bol(at_bol) \
324 if ( ! YY_CURRENT_BUFFER ){\
325 yyensure_buffer_stack (); \
326 YY_CURRENT_BUFFER_LVALUE = \
327 yy_create_buffer(yyin,YY_BUF_SIZE ); \
329 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
332#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
337#define YY_SKIP_YYWRAP
339typedef unsigned char YY_CHAR;
341FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
343typedef int yy_state_type;
350#define yytext_ptr yytext
352static yy_state_type yy_get_previous_state (
void );
353static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
354static int yy_get_next_buffer (
void );
355static void yy_fatal_error (yyconst
char msg[] );
360#define YY_DO_BEFORE_ACTION \
361 (yytext_ptr) = yy_bp; \
362 yyleng = (size_t) (yy_cp - yy_bp); \
363 (yy_hold_char) = *yy_cp; \
365 (yy_c_buf_p) = yy_cp;
367#define YY_NUM_RULES 57
368#define YY_END_OF_BUFFER 58
373 flex_int32_t yy_verify;
376static yyconst flex_int16_t yy_accept[195] =
378 0, 0, 0, 0, 58, 56, 54, 54, 55, 56,
379 9, 55, 55, 56, 55, 7, 55, 55, 55, 52,
380 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
381 52, 52, 52, 52, 52, 55, 55, 16, 12, 57,
382 15, 10, 11, 16, 16, 54, 2, 0, 51, 0,
383 17, 0, 51, 0, 8, 8, 7, 52, 40, 4,
384 1, 3, 5, 41, 52, 18, 52, 48, 52, 52,
385 52, 52, 6, 33, 52, 52, 52, 52, 52, 37,
386 38, 52, 52, 52, 52, 52, 52, 52, 0, 39,
387 12, 0, 0, 11, 13, 14, 51, 51, 8, 17,
389 49, 52, 52, 52, 52, 52, 52, 0, 52, 52,
390 52, 32, 52, 52, 52, 52, 52, 52, 52, 52,
391 42, 53, 52, 52, 50, 52, 20, 52, 0, 22,
392 23, 24, 0, 34, 52, 52, 52, 52, 52, 35,
393 52, 52, 52, 36, 52, 0, 0, 0, 0, 0,
394 47, 43, 52, 52, 45, 46, 52, 19, 52, 0,
395 0, 0, 0, 0, 44, 52, 26, 21, 0, 31,
396 0, 0, 0, 52, 0, 0, 25, 0, 0, 0,
397 0, 0, 0, 0, 0, 0, 29, 30, 27, 0,
402static yyconst flex_int32_t yy_ec[256] =
404 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
405 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
406 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
407 1, 2, 4, 5, 6, 1, 7, 8, 9, 7,
408 7, 7, 10, 7, 10, 11, 10, 12, 12, 12,
409 12, 12, 12, 12, 12, 12, 12, 10, 7, 13,
410 14, 15, 7, 7, 16, 17, 18, 19, 20, 21,
411 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
412 32, 33, 34, 35, 36, 32, 37, 38, 39, 32,
413 40, 41, 42, 7, 32, 7, 43, 44, 45, 46,
415 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
416 57, 58, 32, 59, 60, 61, 62, 32, 63, 64,
417 65, 32, 1, 66, 1, 7, 1, 1, 1, 1,
418 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
419 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
420 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
421 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
422 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
423 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
424 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
426 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
427 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
428 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
429 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
430 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
434static yyconst flex_int32_t yy_meta[67] =
436 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
437 2, 2, 1, 1, 1, 2, 2, 2, 2, 2,
438 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
439 2, 2, 2, 2, 2, 2, 2, 2, 2, 3,
440 1, 3, 2, 2, 2, 2, 2, 2, 2, 2,
441 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
445static yyconst flex_int16_t yy_base[200] =
447 0, 0, 65, 70, 488, 516, 67, 76, 473, 69,
448 516, 516, 478, 74, 473, 73, 74, 470, 76, 82,
449 83, 81, 84, 472, 86, 98, 87, 113, 123, 110,
450 96, 141, 130, 144, 138, 0, 416, 516, 155, 516,
451 516, 516, 469, 71, 107, 103, 516, 95, 475, 146,
452 516, 109, 470, 161, 464, 463, 163, 463, 516, 516,
453 516, 516, 516, 516, 165, 161, 166, 462, 170, 171,
454 172, 167, 180, 201, 185, 189, 182, 203, 196, 461,
455 209, 207, 205, 211, 208, 210, 222, 229, 429, 516,
456 232, 202, 215, 458, 516, 516, 239, 236, 457, 457,
458 456, 236, 238, 240, 242, 250, 254, 265, 260, 249,
459 271, 284, 281, 286, 289, 287, 272, 282, 293, 292,
460 455, 516, 300, 303, 453, 306, 452, 308, 292, 451,
461 447, 445, 329, 443, 326, 313, 332, 318, 341, 442,
462 347, 349, 351, 437, 355, 280, 328, 345, 344, 346,
463 432, 424, 365, 368, 333, 331, 375, 316, 370, 388,
464 351, 345, 361, 365, 268, 388, 145, 114, 405, 516,
465 364, 389, 386, 413, 376, 393, 516, 390, 416, 395,
466 403, 409, 398, 403, 403, 406, 516, 516, 516, 439,
467 443, 403, 516, 516, 504, 507, 510, 110, 513
471static yyconst flex_int16_t yy_def[200] =
473 194, 1, 195, 195, 194, 194, 194, 194, 194, 196,
474 194, 194, 194, 197, 194, 198, 194, 194, 194, 198,
475 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
476 198, 198, 198, 198, 198, 199, 194, 194, 194, 194,
477 194, 194, 194, 194, 194, 194, 194, 196, 194, 196,
478 194, 197, 194, 197, 194, 194, 198, 198, 194, 194,
479 194, 194, 194, 194, 198, 198, 198, 198, 198, 198,
480 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
481 198, 198, 198, 198, 198, 198, 198, 198, 199, 194,
482 194, 194, 194, 194, 194, 194, 196, 197, 194, 198,
484 198, 198, 198, 198, 198, 198, 198, 194, 198, 198,
485 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
486 198, 194, 198, 198, 198, 198, 198, 198, 194, 198,
487 198, 198, 194, 198, 198, 198, 198, 198, 198, 198,
488 198, 198, 198, 198, 198, 194, 194, 194, 194, 194,
489 198, 198, 198, 198, 198, 198, 198, 198, 198, 194,
490 194, 194, 194, 194, 198, 198, 198, 198, 194, 194,
491 194, 194, 194, 198, 194, 194, 194, 194, 194, 194,
492 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
493 194, 194, 194, 0, 194, 194, 194, 194, 194
497static yyconst flex_int16_t yy_nxt[583] =
499 6, 7, 8, 9, 10, 11, 12, 13, 14, 12,
500 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
501 25, 24, 24, 26, 27, 24, 28, 24, 29, 30,
502 24, 24, 31, 32, 33, 24, 34, 35, 24, 36,
503 6, 12, 20, 21, 22, 23, 24, 25, 24, 24,
504 26, 27, 24, 28, 24, 29, 30, 24, 31, 32,
505 33, 24, 34, 35, 24, 37, 39, 40, 46, 46,
506 41, 39, 40, 49, 42, 41, 43, 46, 46, 42,
507 44, 43, 53, 56, 57, 44, 59, 60, 61, 63,
508 64, 194, 194, 194, 194, 45, 194, 194, 95, 49,
510 45, 71, 67, 70, 46, 46, 194, 44, 194, 50,
511 65, 58, 44, 69, 54, 66, 75, 53, 72, 82,
512 194, 68, 45, 194, 194, 95, 73, 45, 71, 67,
513 70, 74, 76, 194, 96, 50, 77, 65, 80, 69,
514 194, 66, 81, 75, 72, 85, 82, 68, 194, 54,
515 97, 194, 78, 73, 194, 194, 91, 74, 79, 76,
516 83, 96, 86, 77, 84, 80, 87, 88, 81, 98,
517 92, 194, 85, 56, 57, 194, 194, 194, 101, 78,
518 194, 194, 194, 100, 79, 93, 50, 83, 86, 103,
519 194, 84, 194, 87, 88, 194, 106, 92, 105, 194,
521 102, 54, 108, 108, 104, 101, 194, 111, 109, 110,
522 100, 194, 93, 194, 107, 194, 103, 194, 194, 194,
523 194, 194, 113, 106, 118, 105, 102, 114, 115, 95,
524 104, 116, 194, 91, 111, 109, 110, 112, 117, 194,
525 107, 120, 96, 97, 98, 119, 194, 92, 194, 113,
526 194, 118, 194, 124, 114, 115, 95, 125, 116, 194,
527 194, 121, 93, 112, 194, 117, 108, 108, 120, 96,
528 194, 119, 123, 128, 92, 126, 54, 127, 194, 50,
529 124, 194, 194, 131, 125, 133, 133, 121, 130, 93,
530 132, 194, 194, 129, 194, 138, 194, 194, 123, 194,
532 128, 126, 194, 194, 127, 135, 137, 134, 139, 131,
533 194, 136, 140, 194, 160, 130, 194, 132, 194, 142,
534 129, 146, 138, 194, 141, 144, 194, 147, 194, 145,
535 133, 133, 135, 137, 134, 139, 194, 143, 136, 140,
536 160, 194, 194, 194, 154, 148, 142, 152, 146, 153,
537 141, 194, 144, 147, 161, 149, 145, 194, 151, 194,
538 155, 194, 150, 143, 162, 194, 156, 163, 157, 164,
539 158, 154, 148, 152, 159, 194, 153, 170, 194, 171,
540 194, 161, 149, 166, 151, 194, 172, 155, 150, 169,
541 169, 162, 173, 156, 163, 157, 164, 158, 194, 165,
543 176, 159, 168, 167, 170, 171, 169, 169, 177, 178,
544 166, 180, 181, 172, 179, 179, 182, 179, 179, 173,
545 174, 184, 185, 194, 186, 165, 176, 187, 168, 188,
546 167, 189, 193, 175, 194, 177, 178, 180, 190, 181,
547 191, 191, 194, 182, 191, 191, 174, 194, 184, 185,
548 183, 186, 194, 194, 187, 194, 188, 194, 189, 193,
549 175, 194, 194, 194, 190, 194, 194, 194, 99, 94,
550 122, 194, 194, 194, 99, 55, 183, 192, 52, 48,
551 94, 90, 194, 62, 55, 51, 47, 194, 194, 194,
552 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
554 194, 194, 194, 192, 38, 38, 38, 48, 48, 48,
555 52, 52, 52, 89, 89, 5, 194, 194, 194, 194,
556 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
557 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
558 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
559 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
560 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
561 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
565static yyconst flex_int16_t yy_chk[583] =
567 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
568 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
569 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
570 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
571 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
572 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
573 1, 1, 1, 1, 1, 1, 3, 3, 7, 7,
574 3, 4, 4, 10, 3, 4, 3, 8, 8, 4,
575 3, 4, 14, 16, 16, 4, 17, 17, 17, 19,
576 19, 22, 20, 21, 23, 3, 25, 27, 44, 48,
578 4, 25, 21, 23, 46, 46, 31, 3, 26, 10,
579 20, 198, 4, 22, 14, 20, 27, 52, 25, 31,
580 30, 21, 3, 28, 168, 44, 26, 4, 25, 21,
581 23, 26, 28, 29, 45, 48, 28, 20, 30, 22,
582 33, 20, 30, 27, 25, 33, 31, 21, 35, 52,
583 50, 32, 29, 26, 34, 167, 39, 26, 29, 28,
584 32, 45, 33, 28, 32, 30, 34, 35, 30, 54,
585 39, 66, 33, 57, 57, 65, 67, 72, 66, 29,
586 69, 70, 71, 65, 29, 39, 50, 32, 33, 69,
587 73, 32, 77, 34, 35, 75, 72, 39, 71, 76,
589 67, 54, 74, 74, 70, 66, 79, 77, 75, 76,
590 65, 74, 39, 78, 73, 83, 69, 82, 85, 81,
591 86, 84, 79, 72, 85, 71, 67, 81, 82, 92,
592 70, 83, 87, 91, 77, 75, 76, 78, 84, 88,
593 73, 87, 93, 97, 98, 86, 102, 91, 103, 79,
594 104, 85, 105, 103, 81, 82, 92, 104, 83, 110,
595 106, 88, 91, 78, 107, 84, 108, 108, 87, 93,
596 109, 86, 102, 107, 91, 105, 98, 106, 165, 97,
597 103, 111, 117, 110, 104, 112, 112, 88, 109, 91,
598 111, 113, 118, 108, 112, 117, 114, 116, 102, 115,
600 107, 105, 120, 119, 106, 114, 116, 113, 118, 110,
601 123, 115, 119, 124, 146, 109, 126, 111, 128, 123,
602 108, 129, 117, 136, 120, 126, 158, 129, 138, 128,
603 133, 133, 114, 116, 113, 118, 135, 124, 115, 119,
604 146, 156, 137, 155, 138, 133, 123, 136, 129, 137,
605 120, 139, 126, 129, 147, 133, 128, 141, 135, 142,
606 139, 143, 133, 124, 148, 145, 141, 149, 142, 150,
607 143, 138, 133, 136, 145, 153, 137, 161, 154, 162,
608 159, 147, 133, 154, 135, 157, 163, 139, 133, 160,
609 160, 148, 164, 141, 149, 142, 150, 143, 166, 153,
611 171, 145, 159, 157, 161, 162, 169, 169, 172, 173,
612 154, 175, 176, 163, 174, 174, 178, 179, 179, 164,
613 166, 180, 181, 174, 182, 153, 171, 183, 159, 184,
614 157, 185, 192, 169, 152, 172, 173, 175, 186, 176,
615 190, 190, 151, 178, 191, 191, 166, 144, 180, 181,
616 179, 182, 140, 134, 183, 132, 184, 131, 185, 192,
617 169, 130, 127, 125, 186, 121, 101, 100, 99, 94,
618 89, 80, 68, 58, 56, 55, 179, 191, 53, 49,
619 43, 37, 24, 18, 15, 13, 9, 5, 0, 0,
620 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
622 0, 0, 0, 191, 195, 195, 195, 196, 196, 196,
623 197, 197, 197, 199, 199, 194, 194, 194, 194, 194,
624 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
625 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
626 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
627 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
628 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
629 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
633static yy_state_type yy_last_accepting_state;
634static char *yy_last_accepting_cpos;
636extern int yy_flex_debug;
637int yy_flex_debug = 0;
642#define REJECT reject_used_but_not_detected
643#define yymore() yymore_used_but_not_detected
645#define YY_RESTORE_YY_MORE_OFFSET
647#line 1 "KDbSqlScanner.l"
667#line 22 "KDbSqlScanner.l"
668#include "sqlparser.h"
670#include "KDbExpression.h"
671#include "KDbParser.h"
672#include "KDbSqlTypes.h"
673#include "kdb_debug.h"
675extern int globalCurrentPos;
679#define ECOUNT globalCurrentPos += yyleng; globalToken = yytext
681extern void setError(
const QString& errDesc);
682extern void setError(
const QString& errName,
const QString& errDesc);
692 return QStringLiteral(
"\"%1\"").arg(
string);
698#line 699 "generated/sqlscanner.cpp"
701#define DATE_OR_TIME 1
703#ifndef YY_NO_UNISTD_H
712#define YY_EXTRA_TYPE void *
715static int yy_init_globals (
void );
720int yylex_destroy (
void );
722int yyget_debug (
void );
724void yyset_debug (
int debug_flag );
726YY_EXTRA_TYPE yyget_extra (
void );
728void yyset_extra (YY_EXTRA_TYPE user_defined );
730FILE *yyget_in (
void );
732void yyset_in (FILE * in_str );
734FILE *yyget_out (
void );
736void yyset_out (FILE * out_str );
738yy_size_t yyget_leng (
void );
740char *yyget_text (
void );
742int yyget_lineno (
void );
744void yyset_lineno (
int line_number );
750#ifndef YY_SKIP_YYWRAP
752extern "C" int yywrap (
void );
754extern int yywrap (
void );
758 static void yyunput (
int c,
char *buf_ptr );
761static void yy_flex_strncpy (
char *,yyconst
char *,
int );
765static int yy_flex_strlen (yyconst
char * );
771static int yyinput (
void );
773static int input (
void );
779#ifndef YY_READ_BUF_SIZE
780#define YY_READ_BUF_SIZE 8192
788#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
795#define YY_INPUT(buf,result,max_size) \
796 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
800 for ( n = 0; n < max_size && \
801 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
804 buf[n++] = (char) c; \
805 if ( c == EOF && ferror( yyin ) ) \
806 YY_FATAL_ERROR( "input in flex scanner failed" ); \
812 while ( (result = (int) fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
814 if( errno != EINTR) \
816 YY_FATAL_ERROR( "input in flex scanner failed" ); \
832#define yyterminate() return YY_NULL
836#ifndef YY_START_STACK_INCR
837#define YY_START_STACK_INCR 25
841#ifndef YY_FATAL_ERROR
842#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
851#define YY_DECL_IS_OURS 1
853extern int yylex (
void);
855#define YY_DECL int yylex (void)
861#ifndef YY_USER_ACTION
862#define YY_USER_ACTION
867#define YY_BREAK break;
870#define YY_RULE_SETUP \
877 yy_state_type yy_current_state;
881#line 73 "KDbSqlScanner.l"
884 int DATE_OR_TIME_caller = 0;
886#line 887 "generated/sqlscanner.cpp"
905 if ( ! YY_CURRENT_BUFFER ) {
906 yyensure_buffer_stack ();
907 YY_CURRENT_BUFFER_LVALUE =
908 yy_create_buffer(yyin,YY_BUF_SIZE );
911 yy_load_buffer_state( );
916 yy_cp = (yy_c_buf_p);
919 *yy_cp = (yy_hold_char);
926 yy_current_state = (yy_start);
930 YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
931 if ( yy_accept[yy_current_state] )
933 (yy_last_accepting_state) = yy_current_state;
934 (yy_last_accepting_cpos) = yy_cp;
936 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
938 yy_current_state = (int) yy_def[yy_current_state];
939 if ( yy_current_state >= 195 )
940 yy_c = yy_meta[(
unsigned int) yy_c];
942 yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
945 while ( yy_current_state != 194 );
946 yy_cp = (yy_last_accepting_cpos);
947 yy_current_state = (yy_last_accepting_state);
950 yy_act = yy_accept[yy_current_state];
960 *yy_cp = (yy_hold_char);
961 yy_cp = (yy_last_accepting_cpos);
962 yy_current_state = (yy_last_accepting_state);
967#line 77 "KDbSqlScanner.l"
975#line 82 "KDbSqlScanner.l"
983#line 87 "KDbSqlScanner.l"
991#line 92 "KDbSqlScanner.l"
994 return LESS_OR_EQUAL;
999#line 97 "KDbSqlScanner.l"
1002 return GREATER_OR_EQUAL;
1007#line 102 "KDbSqlScanner.l"
1015#line 107 "KDbSqlScanner.l"
1023 setError(KDbParser::tr(
"Invalid integer number"), KDbParser::tr(
"This integer number may be too large."));
1026 return INTEGER_CONST;
1031#line 120 "KDbSqlScanner.l"
1034 yylval.binaryValue =
new QByteArray(yytext, yyleng);
1041#line 127 "KDbSqlScanner.l"
1044 sqlParserDebug() <<
"### begin DATE_OR_TIME" << yytext <<
"(" << yyleng <<
")";
1045 DATE_OR_TIME_caller = YYSTATE;
1046 BEGIN(DATE_OR_TIME);
1053#line 137 "KDbSqlScanner.l"
1061#line 142 "KDbSqlScanner.l"
1064 yylval.binaryValue =
new QByteArray(yytext, yyleng);
1065 return DATE_TIME_INTEGER;
1070#line 148 "KDbSqlScanner.l"
1073 return TABS_OR_SPACES;
1078#line 153 "KDbSqlScanner.l"
1086#line 158 "KDbSqlScanner.l"
1094#line 163 "KDbSqlScanner.l"
1097 sqlParserDebug() <<
"### end DATE_OR_TIME" << yytext <<
"(" << yyleng <<
")";
1098 BEGIN(DATE_OR_TIME_caller);
1104#line 171 "KDbSqlScanner.l"
1109 setError(KDbParser::tr(
"Unexpected character %1 in date/time").arg(maybeQuote(
string)));
1117#line 182 "KDbSqlScanner.l"
1125#line 187 "KDbSqlScanner.l"
1133#line 192 "KDbSqlScanner.l"
1141#line 197 "KDbSqlScanner.l"
1149#line 202 "KDbSqlScanner.l"
1157#line 207 "KDbSqlScanner.l"
1165#line 212 "KDbSqlScanner.l"
1173#line 217 "KDbSqlScanner.l"
1182#line 222 "KDbSqlScanner.l"
1190#line 227 "KDbSqlScanner.l"
1199#line 232 "KDbSqlScanner.l"
1208#line 237 "KDbSqlScanner.l"
1211 return NOT_SIMILAR_TO;
1217#line 242 "KDbSqlScanner.l"
1226#line 247 "KDbSqlScanner.l"
1229 return SQL_IS_NOT_NULL;
1235#line 252 "KDbSqlScanner.l"
1243#line 257 "KDbSqlScanner.l"
1251#line 262 "KDbSqlScanner.l"
1259#line 267 "KDbSqlScanner.l"
1267#line 272 "KDbSqlScanner.l"
1275#line 277 "KDbSqlScanner.l"
1283#line 282 "KDbSqlScanner.l"
1291#line 287 "KDbSqlScanner.l"
1299#line 292 "KDbSqlScanner.l"
1302 return CONCATENATION;
1307#line 297 "KDbSqlScanner.l"
1310 return BITWISE_SHIFT_LEFT;
1315#line 302 "KDbSqlScanner.l"
1318 return BITWISE_SHIFT_RIGHT;
1323#line 307 "KDbSqlScanner.l"
1331#line 312 "KDbSqlScanner.l"
1339#line 317 "KDbSqlScanner.l"
1347#line 322 "KDbSqlScanner.l"
1355#line 327 "KDbSqlScanner.l"
1363#line 332 "KDbSqlScanner.l"
1371#line 337 "KDbSqlScanner.l"
1379#line 342 "KDbSqlScanner.l"
1387#line 347 "KDbSqlScanner.l"
1396#line 352 "KDbSqlScanner.l"
1399 sqlParserDebug() <<
"{string} yytext: '" << yytext <<
"' (" << yyleng <<
")";
1403 if (errorPosition >= 0) {
1404 setError(KDbParser::tr(
"Invalid string"),
1405 KDbParser::tr(
"Invalid character in string"));
1408 yylval.stringValue =
new QString(unescaped);
1409 return CHARACTER_STRING_LITERAL;
1416#line 369 "KDbSqlScanner.l"
1418 sqlParserDebug() <<
"{identifier} yytext: '" << yytext <<
"' (" << yyleng <<
")";
1420 if (yytext[0]>=
'0' && yytext[0]<=
'9') {
1421 setError(KDbParser::tr(
"Invalid identifier"),
1422 KDbParser::tr(
"Identifiers should start with a letter or '_' character"));
1432#line 381 "KDbSqlScanner.l"
1434 sqlParserDebug() <<
"{query_parameter} yytext: '" << yytext <<
"' (" << yyleng <<
")";
1437 return QUERY_PARAMETER;
1443#line 388 "KDbSqlScanner.l"
1450#line 392 "KDbSqlScanner.l"
1452 sqlParserDebug() <<
"char: '" << yytext[0] <<
"'";
1459#line 398 "KDbSqlScanner.l"
1464 setError(KDbParser::tr(
"Unexpected character %1").arg(maybeQuote(
string)));
1470#line 406 "KDbSqlScanner.l"
1473#line 1474 "generated/sqlscanner.cpp"
1474case YY_STATE_EOF(INITIAL):
1475case YY_STATE_EOF(DATE_OR_TIME):
1478 case YY_END_OF_BUFFER:
1481 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1484 *yy_cp = (yy_hold_char);
1485 YY_RESTORE_YY_MORE_OFFSET
1487 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1498 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1499 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1500 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1510 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1512 yy_state_type yy_next_state;
1514 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1516 yy_current_state = yy_get_previous_state( );
1527 yy_next_state = yy_try_NUL_trans( yy_current_state );
1529 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1531 if ( yy_next_state )
1534 yy_cp = ++(yy_c_buf_p);
1535 yy_current_state = yy_next_state;
1541 yy_cp = (yy_last_accepting_cpos);
1542 yy_current_state = (yy_last_accepting_state);
1543 goto yy_find_action;
1547 else switch ( yy_get_next_buffer( ) )
1549 case EOB_ACT_END_OF_FILE:
1551 (yy_did_buffer_switch_on_eof) = 0;
1564 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1566 yy_act = YY_STATE_EOF(YY_START);
1572 if ( ! (yy_did_buffer_switch_on_eof) )
1578 case EOB_ACT_CONTINUE_SCAN:
1580 (yytext_ptr) + yy_amount_of_matched_text;
1582 yy_current_state = yy_get_previous_state( );
1584 yy_cp = (yy_c_buf_p);
1585 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1588 case EOB_ACT_LAST_MATCH:
1590 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1592 yy_current_state = yy_get_previous_state( );
1594 yy_cp = (yy_c_buf_p);
1595 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1596 goto yy_find_action;
1603 "fatal flex scanner internal error--no action found" );
1615static int yy_get_next_buffer (
void)
1617 char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1618 char *source = (yytext_ptr);
1619 int number_to_move, i;
1622 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1624 "fatal flex scanner internal error--end of buffer missed" );
1626 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1628 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1633 return EOB_ACT_END_OF_FILE;
1641 return EOB_ACT_LAST_MATCH;
1648 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
1650 for ( i = 0; i < number_to_move; ++i )
1651 *(dest++) = *(source++);
1653 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1657 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1662 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1664 while ( num_to_read <= 0 )
1668 YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
1670 int yy_c_buf_p_offset =
1671 (int) ((yy_c_buf_p) - b->yy_ch_buf);
1673 if ( b->yy_is_our_buffer )
1675 yy_size_t new_size = b->yy_buf_size * 2;
1677 if ( new_size <= 0 )
1678 b->yy_buf_size += b->yy_buf_size / 8;
1680 b->yy_buf_size *= 2;
1682 b->yy_ch_buf = (
char *)
1684 yyrealloc((
void *) b->yy_ch_buf,b->yy_buf_size + 2 );
1690 if ( ! b->yy_ch_buf )
1692 "fatal error - scanner input buffer overflow" );
1694 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1696 num_to_read = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1701 if ( num_to_read > YY_READ_BUF_SIZE )
1702 num_to_read = YY_READ_BUF_SIZE;
1705 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1706 (yy_n_chars), num_to_read );
1708 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1711 if ( (yy_n_chars) == 0 )
1713 if ( number_to_move == YY_MORE_ADJ )
1715 ret_val = EOB_ACT_END_OF_FILE;
1721 ret_val = EOB_ACT_LAST_MATCH;
1722 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1723 YY_BUFFER_EOF_PENDING;
1728 ret_val = EOB_ACT_CONTINUE_SCAN;
1730 if ((
int) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1732 int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1733 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (
char *) yyrealloc((
void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
1734 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1735 YY_FATAL_ERROR(
"out of dynamic memory in yy_get_next_buffer()" );
1738 (yy_n_chars) += number_to_move;
1739 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1740 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1742 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1749 static yy_state_type yy_get_previous_state (
void)
1751 yy_state_type yy_current_state;
1754 yy_current_state = (yy_start);
1756 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1758 YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1759 if ( yy_accept[yy_current_state] )
1761 (yy_last_accepting_state) = yy_current_state;
1762 (yy_last_accepting_cpos) = yy_cp;
1764 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1766 yy_current_state = (int) yy_def[yy_current_state];
1767 if ( yy_current_state >= 195 )
1768 yy_c = yy_meta[(
unsigned int) yy_c];
1770 yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
1773 return yy_current_state;
1781 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1784 char *yy_cp = (yy_c_buf_p);
1787 if ( yy_accept[yy_current_state] )
1789 (yy_last_accepting_state) = yy_current_state;
1790 (yy_last_accepting_cpos) = yy_cp;
1792 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1794 yy_current_state = (int) yy_def[yy_current_state];
1795 if ( yy_current_state >= 195 )
1796 yy_c = yy_meta[(
unsigned int) yy_c];
1798 yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
1799 yy_is_jam = (yy_current_state == 194);
1801 return yy_is_jam ? 0 : yy_current_state;
1804 static void yyunput (
int c,
char * yy_bp )
1808 yy_cp = (yy_c_buf_p);
1811 *yy_cp = (yy_hold_char);
1813 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1816 int number_to_move = (yy_n_chars) + 2;
1817 char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1818 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1820 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1822 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1823 *--dest = *--source;
1825 yy_cp += (int) (dest - source);
1826 yy_bp += (int) (dest - source);
1827 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1828 (yy_n_chars) = (
int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1830 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1831 YY_FATAL_ERROR(
"flex scanner push-back overflow" );
1834 *--yy_cp = (char) c;
1836 (yytext_ptr) = yy_bp;
1837 (yy_hold_char) = *yy_cp;
1838 (yy_c_buf_p) = yy_cp;
1843 static int yyinput (
void)
1845 static int input (
void)
1851 *(yy_c_buf_p) = (yy_hold_char);
1853 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1859 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1861 *(yy_c_buf_p) =
'\0';
1865 yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
1868 switch ( yy_get_next_buffer( ) )
1870 case EOB_ACT_LAST_MATCH:
1886 case EOB_ACT_END_OF_FILE:
1891 if ( ! (yy_did_buffer_switch_on_eof) )
1900 case EOB_ACT_CONTINUE_SCAN:
1901 (yy_c_buf_p) = (yytext_ptr) + offset;
1907 c = *(
unsigned char *) (yy_c_buf_p);
1908 *(yy_c_buf_p) =
'\0';
1909 (yy_hold_char) = *++(yy_c_buf_p);
1920 void yyrestart (FILE * input_file )
1923 if ( ! YY_CURRENT_BUFFER ){
1924 yyensure_buffer_stack ();
1925 YY_CURRENT_BUFFER_LVALUE =
1926 yy_create_buffer(yyin,YY_BUF_SIZE );
1929 yy_init_buffer(YY_CURRENT_BUFFER,input_file );
1930 yy_load_buffer_state( );
1937 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
1945 yyensure_buffer_stack ();
1946 if ( YY_CURRENT_BUFFER == new_buffer )
1949 if ( YY_CURRENT_BUFFER )
1952 *(yy_c_buf_p) = (yy_hold_char);
1953 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1954 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1957 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1958 yy_load_buffer_state( );
1965 (yy_did_buffer_switch_on_eof) = 1;
1968static void yy_load_buffer_state (
void)
1970 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1971 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1972 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1973 (yy_hold_char) = *(yy_c_buf_p);
1982 YY_BUFFER_STATE yy_create_buffer (FILE * file,
int size )
1986 b = (YY_BUFFER_STATE) yyalloc(
sizeof(
struct yy_buffer_state ) );
1988 YY_FATAL_ERROR(
"out of dynamic memory in yy_create_buffer()" );
1990 b->yy_buf_size = size;
1995 b->yy_ch_buf = (
char *) yyalloc(b->yy_buf_size + 2 );
1996 if ( ! b->yy_ch_buf )
1997 YY_FATAL_ERROR(
"out of dynamic memory in yy_create_buffer()" );
1999 b->yy_is_our_buffer = 1;
2001 yy_init_buffer(b,file );
2010 void yy_delete_buffer (YY_BUFFER_STATE b )
2016 if ( b == YY_CURRENT_BUFFER )
2017 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
2019 if ( b->yy_is_our_buffer )
2020 yyfree((
void *) b->yy_ch_buf );
2022 yyfree((
void *) b );
2029 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
2034 yy_flush_buffer(b );
2036 b->yy_input_file = file;
2037 b->yy_fill_buffer = 1;
2043 if (b != YY_CURRENT_BUFFER){
2044 b->yy_bs_lineno = 1;
2045 b->yy_bs_column = 0;
2048 b->yy_is_interactive = 0;
2057 void yy_flush_buffer (YY_BUFFER_STATE b )
2068 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2069 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2071 b->yy_buf_pos = &b->yy_ch_buf[0];
2074 b->yy_buffer_status = YY_BUFFER_NEW;
2076 if ( b == YY_CURRENT_BUFFER )
2077 yy_load_buffer_state( );
2086void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
2088 if (new_buffer == NULL)
2091 yyensure_buffer_stack();
2094 if ( YY_CURRENT_BUFFER )
2097 *(yy_c_buf_p) = (yy_hold_char);
2098 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2099 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2103 if (YY_CURRENT_BUFFER)
2104 (yy_buffer_stack_top)++;
2105 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2108 yy_load_buffer_state( );
2109 (yy_did_buffer_switch_on_eof) = 1;
2116void yypop_buffer_state (
void)
2118 if (!YY_CURRENT_BUFFER)
2121 yy_delete_buffer(YY_CURRENT_BUFFER );
2122 YY_CURRENT_BUFFER_LVALUE = NULL;
2123 if ((yy_buffer_stack_top) > 0)
2124 --(yy_buffer_stack_top);
2126 if (YY_CURRENT_BUFFER) {
2127 yy_load_buffer_state( );
2128 (yy_did_buffer_switch_on_eof) = 1;
2135static void yyensure_buffer_stack (
void)
2137 yy_size_t num_to_alloc;
2139 if (!(yy_buffer_stack)) {
2146 (yy_buffer_stack) = (
struct yy_buffer_state**)yyalloc
2147 (num_to_alloc *
sizeof(
struct yy_buffer_state*)
2149 if ( ! (yy_buffer_stack) )
2150 YY_FATAL_ERROR(
"out of dynamic memory in yyensure_buffer_stack()" );
2152 memset((yy_buffer_stack), 0, num_to_alloc *
sizeof(
struct yy_buffer_state*));
2154 (yy_buffer_stack_max) = num_to_alloc;
2155 (yy_buffer_stack_top) = 0;
2159 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
2164 num_to_alloc = (yy_buffer_stack_max) + grow_size;
2165 (yy_buffer_stack) = (
struct yy_buffer_state**)yyrealloc
2167 num_to_alloc *
sizeof(
struct yy_buffer_state*)
2169 if ( ! (yy_buffer_stack) )
2170 YY_FATAL_ERROR(
"out of dynamic memory in yyensure_buffer_stack()" );
2173 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size *
sizeof(
struct yy_buffer_state*));
2174 (yy_buffer_stack_max) = num_to_alloc;
2184YY_BUFFER_STATE yy_scan_buffer (
char * base, yy_size_t size )
2189 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2190 base[size-1] != YY_END_OF_BUFFER_CHAR )
2194 b = (YY_BUFFER_STATE) yyalloc(
sizeof(
struct yy_buffer_state ) );
2196 YY_FATAL_ERROR(
"out of dynamic memory in yy_scan_buffer()" );
2198 b->yy_buf_size = size - 2;
2199 b->yy_buf_pos = b->yy_ch_buf = base;
2200 b->yy_is_our_buffer = 0;
2201 b->yy_input_file = 0;
2202 b->yy_n_chars = b->yy_buf_size;
2203 b->yy_is_interactive = 0;
2205 b->yy_fill_buffer = 0;
2206 b->yy_buffer_status = YY_BUFFER_NEW;
2208 yy_switch_to_buffer(b );
2221YY_BUFFER_STATE yy_scan_string (yyconst
char * yystr )
2224 return yy_scan_bytes(yystr,(
int) strlen(yystr) );
2234YY_BUFFER_STATE yy_scan_bytes (yyconst
char * yybytes, yy_size_t _yybytes_len )
2242 n = (yy_size_t) _yybytes_len + 2;
2243 buf = (
char *) yyalloc(n );
2245 YY_FATAL_ERROR(
"out of dynamic memory in yy_scan_bytes()" );
2247 for ( i = 0; i < _yybytes_len; ++i )
2248 buf[i] = yybytes[i];
2250 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2252 b = yy_scan_buffer(buf,n );
2254 YY_FATAL_ERROR(
"bad buffer in yy_scan_bytes()" );
2259 b->yy_is_our_buffer = 1;
2264#ifndef YY_EXIT_FAILURE
2265#define YY_EXIT_FAILURE 2
2268static void yy_fatal_error (yyconst
char* msg )
2270 (void) fprintf( stderr,
"%s\n", msg );
2271 exit( YY_EXIT_FAILURE );
2281 int yyless_macro_arg = (n); \
2282 YY_LESS_LINENO(yyless_macro_arg);\
2283 yytext[yyleng] = (yy_hold_char); \
2284 (yy_c_buf_p) = yytext + yyless_macro_arg; \
2285 (yy_hold_char) = *(yy_c_buf_p); \
2286 *(yy_c_buf_p) = '\0'; \
2287 yyleng = yyless_macro_arg; \
2296int yyget_lineno (
void)
2305FILE *yyget_in (
void)
2313FILE *yyget_out (
void)
2321yy_size_t yyget_leng (
void)
2330char *yyget_text (
void)
2339void yyset_lineno (
int line_number )
2342 yylineno = line_number;
2351void yyset_in (FILE * in_str )
2356void yyset_out (FILE * out_str )
2361int yyget_debug (
void)
2363 return yy_flex_debug;
2366void yyset_debug (
int bdebug )
2368 yy_flex_debug = bdebug ;
2371static int yy_init_globals (
void)
2377 (yy_buffer_stack) = 0;
2378 (yy_buffer_stack_top) = 0;
2379 (yy_buffer_stack_max) = 0;
2380 (yy_c_buf_p) = (
char *) 0;
2400int yylex_destroy (
void)
2404 while(YY_CURRENT_BUFFER){
2405 yy_delete_buffer(YY_CURRENT_BUFFER );
2406 YY_CURRENT_BUFFER_LVALUE = NULL;
2407 yypop_buffer_state();
2411 yyfree((yy_buffer_stack) );
2412 (yy_buffer_stack) = NULL;
2426static void yy_flex_strncpy (
char* s1, yyconst
char * s2,
int n )
2429 for ( i = 0; i < n; ++i )
2434#ifdef YY_NEED_STRLEN
2435static int yy_flex_strlen (yyconst
char * s )
2438 for ( n = 0; s[n]; ++n )
2445void *yyalloc (yy_size_t size )
2447 return (
void *) malloc( size );
2450void *yyrealloc (
void * ptr, yy_size_t size )
2459 return (
void *) realloc( (
char *) ptr, size );
2462void yyfree (
void * ptr )
2464 free( (
char *) ptr );
2467#define YYTABLES_NAME "yytables"
2469#line 406 "KDbSqlScanner.l"
2473void tokenize(
const char *data)
2475 yy_switch_to_buffer(yy_scan_string(data));
2476 globalToken.
clear();
2477 globalCurrentPos = 0;
KDB_EXPORT QString unescapeString(const QString &string, char quote, int *errorPosition=nullptr)
Unescapes characters in string string for the KDBSQL dialect.
qlonglong toLongLong(bool *ok, int base) const const
QString fromUtf8(QByteArrayView str)