1 #line 2 "drizzled/execute/scanner.cc"
2 #line 41 "drizzled/execute/scanner.l"
7 #ifndef execute_HEADER_H
8 # define execute_HEADER_H 1
11 #include "drizzled/execute/common.h"
12 #include "drizzled/lex_string.h"
16 #ifndef __INTEL_COMPILER
17 #pragma GCC diagnostic ignored "-Wold-style-cast"
18 #pragma GCC diagnostic ignored "-Wsign-compare"
19 #pragma GCC diagnostic ignored "-Wunused-parameter"
20 #pragma GCC diagnostic ignored "-Wmissing-declarations"
24 # define YY_EXTRA_TYPE drizzled::execute::Context*
30 #line 31 "drizzled/execute/scanner.cc"
32 #define YY_INT_ALIGNED short int
45 #define YY_FLEX_MAJOR_VERSION 2
46 #define YY_FLEX_MINOR_VERSION 5
47 #define YY_FLEX_SUBMINOR_VERSION 39
48 #if YY_FLEX_SUBMINOR_VERSION > 0
85 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
90 #ifndef __STDC_LIMIT_MACROS
91 #define __STDC_LIMIT_MACROS 1
95 typedef int8_t flex_int8_t;
96 typedef uint8_t flex_uint8_t;
97 typedef int16_t flex_int16_t;
98 typedef uint16_t flex_uint16_t;
99 typedef int32_t flex_int32_t;
100 typedef uint32_t flex_uint32_t;
102 typedef signed char flex_int8_t;
103 typedef short int flex_int16_t;
104 typedef int flex_int32_t;
105 typedef unsigned char flex_uint8_t;
106 typedef unsigned short int flex_uint16_t;
107 typedef unsigned int flex_uint32_t;
111 #define INT8_MIN (-128)
114 #define INT16_MIN (-32767-1)
117 #define INT32_MIN (-2147483647-1)
120 #define INT8_MAX (127)
123 #define INT16_MAX (32767)
126 #define INT32_MAX (2147483647)
129 #define UINT8_MAX (255U)
132 #define UINT16_MAX (65535U)
135 #define UINT32_MAX (4294967295U)
155 #if defined (__STDC__)
163 #define yyconst const
181 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
187 #ifndef YY_TYPEDEF_YY_SCANNER_T
188 #define YY_TYPEDEF_YY_SCANNER_T
189 typedef void* yyscan_t;
194 #define yyin yyg->yyin_r
195 #define yyout yyg->yyout_r
196 #define yyextra yyg->yyextra_r
197 #define yyleng yyg->yyleng_r
198 #define yytext yyg->yytext_r
199 #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
200 #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
201 #define yy_flex_debug yyg->yy_flex_debug_r
212 #define BEGIN yyg->yy_start = 1 + 2 *
218 #define YY_START ((yyg->yy_start - 1) / 2)
219 #define YYSTATE YY_START
222 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
225 #define YY_NEW_FILE execute_restart(yyin ,yyscanner )
227 #define YY_END_OF_BUFFER_CHAR 0
236 #define YY_BUF_SIZE 32768
238 #define YY_BUF_SIZE 16384
244 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
246 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
247 #define YY_TYPEDEF_YY_BUFFER_STATE
251 #ifndef YY_TYPEDEF_YY_SIZE_T
252 #define YY_TYPEDEF_YY_SIZE_T
253 typedef size_t yy_size_t;
264 #define EOB_ACT_CONTINUE_SCAN 0
265 #define EOB_ACT_END_OF_FILE 1
266 #define EOB_ACT_LAST_MATCH 2
268 #define YY_LESS_LINENO(n)
269 #define YY_LINENO_REWIND_TO(ptr)
276 int yyless_macro_arg = (n); \
277 YY_LESS_LINENO(yyless_macro_arg);\
278 *yy_cp = yyg->yy_hold_char; \
279 YY_RESTORE_YY_MORE_OFFSET \
280 yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
281 YY_DO_BEFORE_ACTION; \
285 #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
287 #ifndef YY_STRUCT_YY_BUFFER_STATE
288 #define YY_STRUCT_YY_BUFFER_STATE
304 yy_size_t yy_buf_size;
309 yy_size_t yy_n_chars;
315 int yy_is_our_buffer;
322 int yy_is_interactive;
338 int yy_buffer_status;
340 #define YY_BUFFER_NEW 0
341 #define YY_BUFFER_NORMAL 1
352 #define YY_BUFFER_EOF_PENDING 2
372 #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
373 ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
379 #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
390 void execute_restart (FILE *input_file ,yyscan_t yyscanner );
391 void execute__switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
392 YY_BUFFER_STATE execute__create_buffer (FILE *file,
int size ,yyscan_t yyscanner );
393 void execute__delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
394 void execute__flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
395 void execute_push_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
396 void execute_pop_buffer_state (yyscan_t yyscanner );
398 static void execute_ensure_buffer_stack (yyscan_t yyscanner );
399 static void execute__load_buffer_state (yyscan_t yyscanner );
400 static void execute__init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
402 #define YY_FLUSH_BUFFER execute__flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
404 YY_BUFFER_STATE execute__scan_buffer (
char *base,yy_size_t size ,yyscan_t yyscanner );
405 YY_BUFFER_STATE execute__scan_string (yyconst
char *yy_str ,yyscan_t yyscanner );
406 YY_BUFFER_STATE execute__scan_bytes (yyconst
char *bytes,yy_size_t len ,yyscan_t yyscanner );
410 void *execute_alloc (yy_size_t ,yyscan_t yyscanner );
411 void *execute_realloc (
void *,yy_size_t ,yyscan_t yyscanner );
412 void execute_free (
void * ,yyscan_t yyscanner );
414 #define yy_new_buffer execute__create_buffer
416 #define yy_set_interactive(is_interactive) \
418 if ( ! YY_CURRENT_BUFFER ){ \
419 execute_ensure_buffer_stack (yyscanner); \
420 YY_CURRENT_BUFFER_LVALUE = \
421 execute__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
423 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
426 #define yy_set_bol(at_bol) \
428 if ( ! YY_CURRENT_BUFFER ){\
429 execute_ensure_buffer_stack (yyscanner); \
430 YY_CURRENT_BUFFER_LVALUE = \
431 execute__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
433 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
436 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
441 #define execute_wrap(yyscanner) 1
442 #define YY_SKIP_YYWRAP
446 typedef unsigned char YY_CHAR;
448 typedef int yy_state_type;
450 #define yytext_ptr yytext_r
456 static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
457 static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner);
458 static int yy_get_next_buffer (yyscan_t yyscanner );
459 static void yy_fatal_error (yyconst
char msg[] ,yyscan_t yyscanner );
466 #define YY_DO_BEFORE_ACTION \
467 yyg->yytext_ptr = yy_bp; \
469 yyleng = (size_t) (yy_cp - yy_bp); \
470 yyg->yy_hold_char = *yy_cp; \
473 yyg->yy_c_buf_p = yy_cp;
476 #define YY_NUM_RULES 5
477 #define YY_END_OF_BUFFER 6
482 flex_int32_t yy_verify;
485 static yyconst flex_int16_t yy_accept[46] =
487 3, 3, 6, 3, 2, 2, 3, 3, 3, 3,
488 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
489 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
490 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
494 static yyconst flex_int32_t yy_ec[256] =
496 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
497 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
498 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
499 1, 2, 4, 5, 4, 4, 4, 4, 4, 4,
500 4, 4, 4, 4, 5, 5, 4, 6, 7, 7,
501 7, 7, 7, 7, 7, 7, 7, 4, 4, 4,
502 4, 4, 4, 4, 8, 1, 1, 1, 1, 9,
503 1, 1, 1, 1, 1, 8, 8, 8, 1, 1,
504 1, 1, 1, 1, 8, 1, 1, 9, 1, 1,
505 4, 4, 4, 4, 5, 4, 8, 1, 1, 1,
507 1, 9, 1, 1, 1, 1, 1, 8, 8, 8,
508 1, 1, 1, 1, 1, 1, 8, 1, 1, 9,
509 1, 1, 5, 4, 5, 4, 1, 10, 10, 10,
510 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
511 10, 10, 10, 11, 11, 11, 11, 11, 11, 11,
512 11, 11, 11, 11, 11, 11, 11, 11, 11, 12,
513 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
514 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
515 12, 12, 12, 12, 12, 12, 13, 12, 12, 12,
516 14, 1, 1, 15, 15, 15, 15, 15, 15, 15,
518 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
519 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
520 15, 15, 15, 16, 17, 17, 17, 17, 17, 17,
521 17, 17, 17, 17, 17, 17, 18, 19, 20, 1,
522 21, 21, 21, 22, 1, 1, 1, 1, 1, 1,
526 static yyconst flex_int32_t yy_meta[23] =
528 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
529 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
533 static yyconst flex_int16_t yy_base[46] =
535 0, 0, 114, 22, 0, 34, 0, 0, 38, 0,
536 0, 42, 47, 50, 55, 60, 62, 100, 67, 102,
537 0, 71, 0, 75, 0, 0, 78, 0, 83, 0,
538 0, 101, 85, 0, 0, 0, 0, 96, 90, 95,
542 static yyconst flex_int16_t yy_def[46] =
544 45, 1, 45, 45, 4, 4, 4, 4, 4, 4,
545 4, 4, 4, 4, 4, 4, 4, 17, 17, 4,
546 4, 4, 4, 4, 4, 13, 4, 15, 4, 17,
547 19, 4, 4, 13, 13, 13, 13, 13, 13, 13,
551 static yyconst flex_int16_t yy_nxt[138] =
553 4, 5, 6, 7, 8, 9, 10, 11, 12, 4,
554 4, 4, 4, 4, 13, 14, 15, 16, 17, 18,
555 19, 20, 21, 21, 22, 21, 23, 24, 25, 23,
556 22, 21, 21, 21, 21, 21, 26, 27, 28, 29,
557 30, 30, 31, 32, 33, 33, 33, 33, 33, 33,
558 33, 33, 33, 33, 33, 33, 25, 25, 25, 25,
559 25, 34, 34, 34, 35, 35, 35, 35, 35, 36,
560 36, 37, 37, 37, 37, 37, 39, 39, 39, 39,
561 39, 33, 33, 33, 33, 33, 33, 33, 33, 34,
562 34, 34, 36, 36, 41, 41, 41, 41, 41, 43,
564 43, 43, 43, 43, 44, 44, 44, 44, 44, 42,
565 40, 40, 38, 45, 3, 45, 45, 45, 45, 45,
566 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
567 45, 45, 45, 45, 45, 45, 45
570 static yyconst flex_int16_t yy_chk[138] =
572 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
573 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
574 1, 1, 4, 4, 4, 4, 4, 4, 4, 4,
575 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
576 4, 4, 4, 4, 6, 6, 6, 6, 9, 9,
577 9, 9, 12, 12, 12, 12, 13, 13, 13, 13,
578 13, 14, 14, 14, 15, 15, 15, 15, 15, 16,
579 16, 17, 17, 17, 17, 17, 19, 19, 19, 19,
580 19, 22, 22, 22, 22, 24, 24, 24, 24, 27,
581 27, 27, 29, 29, 33, 33, 33, 33, 33, 39,
583 39, 39, 39, 39, 40, 40, 40, 40, 40, 38,
584 32, 20, 18, 3, 45, 45, 45, 45, 45, 45,
585 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
586 45, 45, 45, 45, 45, 45, 45
589 static yyconst flex_int16_t yy_rule_linenum[5] =
597 #define REJECT reject_used_but_not_detected
598 #define yymore() yymore_used_but_not_detected
599 #define YY_MORE_ADJ 0
600 #define YY_RESTORE_YY_MORE_OFFSET
601 #line 1 "drizzled/execute/scanner.l"
641 #line 69 "drizzled/execute/scanner.l"
646 #define PARAM execute_get_extra(yyscanner)
648 #define get_lex_chars(buffer, result, max_size, context) \
650 if (context->pos >= context->length) \
656 result= (int)(context->length - context->pos); \
657 (size_t)result > (size_t)max_size ? result= max_size : 0; \
658 memcpy(buffer, context->buf + context->pos, result); \
659 context->pos += result; \
664 #define YY_INPUT(buffer, result, max_size) get_lex_chars(buffer, result, max_size, PARAM)
666 #define YY_NO_UNISTD_H 1
667 #line 668 "drizzled/execute/scanner.cc"
671 #ifndef YY_NO_UNISTD_H
683 #ifndef YY_EXTRA_TYPE
684 #define YY_EXTRA_TYPE void *
695 YY_EXTRA_TYPE yyextra_r;
698 FILE *yyin_r, *yyout_r;
703 yy_size_t yy_n_chars;
708 int yy_did_buffer_switch_on_eof;
709 int yy_start_stack_ptr;
710 int yy_start_stack_depth;
712 yy_state_type yy_last_accepting_state;
713 char* yy_last_accepting_cpos;
728 static int yy_init_globals (yyscan_t yyscanner );
736 # define yylval yyg->yylval_r
738 int execute_lex_init (yyscan_t* scanner);
740 int execute_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
749 int execute_lex_destroy (yyscan_t yyscanner );
751 int execute_get_debug (yyscan_t yyscanner );
753 void execute_set_debug (
int debug_flag ,yyscan_t yyscanner );
755 YY_EXTRA_TYPE execute_get_extra (yyscan_t yyscanner );
757 void execute_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
759 FILE *execute_get_in (yyscan_t yyscanner );
761 void execute_set_in (FILE * in_str ,yyscan_t yyscanner );
763 FILE *execute_get_out (yyscan_t yyscanner );
765 void execute_set_out (FILE * out_str ,yyscan_t yyscanner );
767 yy_size_t execute_get_leng (yyscan_t yyscanner );
769 char *execute_get_text (yyscan_t yyscanner );
771 int execute_get_lineno (yyscan_t yyscanner );
773 void execute_set_lineno (
int line_number ,yyscan_t yyscanner );
775 int execute_get_column (yyscan_t yyscanner );
777 void execute_set_column (
int column_no ,yyscan_t yyscanner );
781 YYSTYPE * execute_get_lval (yyscan_t yyscanner );
783 void execute_set_lval (
YYSTYPE * yylval_param ,yyscan_t yyscanner );
791 #ifndef YY_SKIP_YYWRAP
793 extern "C" int execute_wrap (yyscan_t yyscanner );
795 extern int execute_wrap (yyscan_t yyscanner );
806 static void yy_flex_strncpy (
char *,yyconst
char *,
int ,yyscan_t yyscanner);
809 #ifdef YY_NEED_STRLEN
810 static int yy_flex_strlen (yyconst
char * ,yyscan_t yyscanner);
818 static int yyinput (yyscan_t yyscanner );
820 static int input (yyscan_t yyscanner );
832 #ifndef YY_READ_BUF_SIZE
835 #define YY_READ_BUF_SIZE 16384
837 #define YY_READ_BUF_SIZE 8192
847 #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
857 #define YY_INPUT(buf,result,max_size) \
859 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
863 for ( n = 0; n < max_size && \
864 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
867 buf[n++] = (char) c; \
868 if ( c == EOF && ferror( yyin ) ) \
869 YY_FATAL_ERROR( "input in flex scanner failed" ); \
875 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
877 if( errno != EINTR) \
879 YY_FATAL_ERROR( "input in flex scanner failed" ); \
897 #define yyterminate() return YY_NULL
901 #ifndef YY_START_STACK_INCR
902 #define YY_START_STACK_INCR 25
906 #ifndef YY_FATAL_ERROR
908 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
931 #define YY_DECL_IS_OURS 1
934 extern int execute_lex \
935 (
YYSTYPE * yylval_param ,yyscan_t yyscanner);
937 #define YY_DECL int execute_lex \
938 (YYSTYPE * yylval_param , yyscan_t yyscanner)
947 #ifndef YY_USER_ACTION
948 #define YY_USER_ACTION
953 #define YY_BREAK break;
957 #define YY_RULE_SETUP \
966 register yy_state_type yy_current_state;
967 register char *yy_cp, *yy_bp;
971 yylval = yylval_param;
981 if ( ! yyg->yy_start )
998 if ( ! YY_CURRENT_BUFFER ) {
999 execute_ensure_buffer_stack (yyscanner);
1000 YY_CURRENT_BUFFER_LVALUE =
1001 execute__create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
1004 execute__load_buffer_state(yyscanner );
1009 #line 126 "drizzled/execute/scanner.l"
1012 #line 1013 "drizzled/execute/scanner.cc"
1017 yy_cp = yyg->yy_c_buf_p;
1020 *yy_cp = yyg->yy_hold_char;
1028 yy_current_state = yyg->yy_start;
1032 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
1033 if ( yy_accept[yy_current_state] )
1035 yyg->yy_last_accepting_state = yy_current_state;
1036 yyg->yy_last_accepting_cpos = yy_cp;
1038 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1040 yy_current_state = (int) yy_def[yy_current_state];
1041 if ( yy_current_state >= 46 )
1042 yy_c = yy_meta[(
unsigned int) yy_c];
1044 yy_current_state = yy_nxt[yy_base[yy_current_state] + (
unsigned int) yy_c];
1047 while ( yy_current_state != 45 );
1048 yy_cp = yyg->yy_last_accepting_cpos;
1049 yy_current_state = yyg->yy_last_accepting_state;
1053 yy_act = yy_accept[yy_current_state];
1055 YY_DO_BEFORE_ACTION;
1062 if ( yy_flex_debug )
1065 fprintf( stderr,
"--scanner backing up\n" );
1066 else if ( yy_act < 5 )
1067 fprintf( stderr,
"--accepting rule at line %ld (\"%s\")\n",
1068 (
long)yy_rule_linenum[yy_act], yytext );
1069 else if ( yy_act == 5 )
1070 fprintf( stderr,
"--accepting default rule (\"%s\")\n",
1072 else if ( yy_act == 6 )
1073 fprintf( stderr,
"--(end of buffer or a NUL)\n" );
1075 fprintf( stderr,
"--EOF (start condition %d)\n", YY_START );
1083 *yy_cp = yyg->yy_hold_char;
1084 yy_cp = yyg->yy_last_accepting_cpos;
1085 yy_current_state = yyg->yy_last_accepting_state;
1086 goto yy_find_action;
1090 #line 128 "drizzled/execute/scanner.l"
1096 #line 130 "drizzled/execute/scanner.l"
1102 #line 133 "drizzled/execute/scanner.l"
1104 yylval->string.assign(yytext, yyleng);
1110 #line 138 "drizzled/execute/scanner.l"
1112 yyextra->begin= yytext;
1118 #line 143 "drizzled/execute/scanner.l"
1121 #line 1122 "drizzled/execute/scanner.cc"
1122 case YY_STATE_EOF(INITIAL):
1125 case YY_END_OF_BUFFER:
1128 int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
1131 *yy_cp = yyg->yy_hold_char;
1132 YY_RESTORE_YY_MORE_OFFSET
1134 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1145 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1146 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1147 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1157 if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1159 yy_state_type yy_next_state;
1161 yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
1163 yy_current_state = yy_get_previous_state( yyscanner );
1174 yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
1176 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1178 if ( yy_next_state )
1181 yy_cp = ++yyg->yy_c_buf_p;
1182 yy_current_state = yy_next_state;
1189 yy_cp = yyg->yy_last_accepting_cpos;
1190 yy_current_state = yyg->yy_last_accepting_state;
1191 goto yy_find_action;
1195 else switch ( yy_get_next_buffer( yyscanner ) )
1197 case EOB_ACT_END_OF_FILE:
1199 yyg->yy_did_buffer_switch_on_eof = 0;
1201 if ( execute_wrap(yyscanner ) )
1212 yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
1214 yy_act = YY_STATE_EOF(YY_START);
1220 if ( ! yyg->yy_did_buffer_switch_on_eof )
1226 case EOB_ACT_CONTINUE_SCAN:
1228 yyg->yytext_ptr + yy_amount_of_matched_text;
1230 yy_current_state = yy_get_previous_state( yyscanner );
1232 yy_cp = yyg->yy_c_buf_p;
1233 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1236 case EOB_ACT_LAST_MATCH:
1238 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
1240 yy_current_state = yy_get_previous_state( yyscanner );
1242 yy_cp = yyg->yy_c_buf_p;
1243 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1244 goto yy_find_action;
1251 "fatal flex scanner internal error--no action found" );
1273 static int yy_get_next_buffer (yyscan_t yyscanner)
1279 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1280 register char *source = yyg->yytext_ptr;
1281 register int number_to_move, i;
1284 if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
1286 "fatal flex scanner internal error--end of buffer missed" );
1288 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1290 if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
1295 return EOB_ACT_END_OF_FILE;
1303 return EOB_ACT_LAST_MATCH;
1310 number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
1312 for ( i = 0; i < number_to_move; ++i )
1313 *(dest++) = *(source++);
1315 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1319 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
1323 yy_size_t num_to_read =
1324 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1326 while ( num_to_read <= 0 )
1330 YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
1332 int yy_c_buf_p_offset =
1333 (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
1335 if ( b->yy_is_our_buffer )
1337 yy_size_t new_size = b->yy_buf_size * 2;
1339 if ( new_size <= 0 )
1340 b->yy_buf_size += b->yy_buf_size / 8;
1342 b->yy_buf_size *= 2;
1344 b->yy_ch_buf = (
char *)
1346 execute_realloc((
void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
1352 if ( ! b->yy_ch_buf )
1354 "fatal error - scanner input buffer overflow" );
1356 yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1358 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1363 if ( num_to_read > YY_READ_BUF_SIZE )
1364 num_to_read = YY_READ_BUF_SIZE;
1367 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1368 yyg->yy_n_chars, num_to_read );
1370 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1373 if ( yyg->yy_n_chars == 0 )
1375 if ( number_to_move == YY_MORE_ADJ )
1377 ret_val = EOB_ACT_END_OF_FILE;
1378 execute_restart(yyin ,yyscanner);
1383 ret_val = EOB_ACT_LAST_MATCH;
1384 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1385 YY_BUFFER_EOF_PENDING;
1390 ret_val = EOB_ACT_CONTINUE_SCAN;
1392 if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1394 yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
1395 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (
char *) execute_realloc((
void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
1396 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1397 YY_FATAL_ERROR(
"out of dynamic memory in yy_get_next_buffer()" );
1400 yyg->yy_n_chars += number_to_move;
1401 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1402 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1404 yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1414 static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
1419 register yy_state_type yy_current_state;
1420 register char *yy_cp;
1424 yy_current_state = yyg->yy_start;
1426 for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
1429 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1430 if ( yy_accept[yy_current_state] )
1432 yyg->yy_last_accepting_state = yy_current_state;
1433 yyg->yy_last_accepting_cpos = yy_cp;
1435 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1437 yy_current_state = (int) yy_def[yy_current_state];
1438 if ( yy_current_state >= 46 )
1439 yy_c = yy_meta[(
unsigned int) yy_c];
1441 yy_current_state = yy_nxt[yy_base[yy_current_state] + (
unsigned int) yy_c];
1444 return yy_current_state;
1453 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
1458 register int yy_is_jam;
1461 register char *yy_cp = yyg->yy_c_buf_p;
1463 register YY_CHAR yy_c = 1;
1464 if ( yy_accept[yy_current_state] )
1466 yyg->yy_last_accepting_state = yy_current_state;
1467 yyg->yy_last_accepting_cpos = yy_cp;
1469 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1471 yy_current_state = (int) yy_def[yy_current_state];
1472 if ( yy_current_state >= 46 )
1473 yy_c = yy_meta[(
unsigned int) yy_c];
1475 yy_current_state = yy_nxt[yy_base[yy_current_state] + (
unsigned int) yy_c];
1476 yy_is_jam = (yy_current_state == 45);
1479 return yy_is_jam ? 0 : yy_current_state;
1489 static int yyinput (yyscan_t yyscanner)
1491 static int input (yyscan_t yyscanner)
1501 *yyg->yy_c_buf_p = yyg->yy_hold_char;
1503 if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1509 if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1511 *yyg->yy_c_buf_p =
'\0';
1515 yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
1518 switch ( yy_get_next_buffer( yyscanner ) )
1520 case EOB_ACT_LAST_MATCH:
1532 execute_restart(yyin ,yyscanner);
1536 case EOB_ACT_END_OF_FILE:
1538 if ( execute_wrap(yyscanner ) )
1541 if ( ! yyg->yy_did_buffer_switch_on_eof )
1544 return yyinput(yyscanner);
1546 return input(yyscanner);
1550 case EOB_ACT_CONTINUE_SCAN:
1551 yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
1557 c = *(
unsigned char *) yyg->yy_c_buf_p;
1558 *yyg->yy_c_buf_p =
'\0';
1559 yyg->yy_hold_char = *++yyg->yy_c_buf_p;
1575 void execute_restart (FILE * input_file , yyscan_t yyscanner)
1582 if ( ! YY_CURRENT_BUFFER ){
1583 execute_ensure_buffer_stack (yyscanner);
1584 YY_CURRENT_BUFFER_LVALUE =
1585 execute__create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
1588 execute__init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
1589 execute__load_buffer_state(yyscanner );
1597 void execute__switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
1609 execute_ensure_buffer_stack (yyscanner);
1610 if ( YY_CURRENT_BUFFER == new_buffer )
1613 if ( YY_CURRENT_BUFFER )
1616 *yyg->yy_c_buf_p = yyg->yy_hold_char;
1617 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
1618 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1621 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1622 execute__load_buffer_state(yyscanner );
1629 yyg->yy_did_buffer_switch_on_eof = 1;
1633 static void execute__load_buffer_state (yyscan_t yyscanner)
1639 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1640 yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1641 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1642 yyg->yy_hold_char = *yyg->yy_c_buf_p;
1652 YY_BUFFER_STATE execute__create_buffer (FILE * file,
int size , yyscan_t yyscanner)
1659 b = (YY_BUFFER_STATE) execute_alloc(
sizeof(
struct yy_buffer_state ) ,yyscanner );
1661 YY_FATAL_ERROR(
"out of dynamic memory in execute__create_buffer()" );
1663 b->yy_buf_size = size;
1668 b->yy_ch_buf = (
char *) execute_alloc(b->yy_buf_size + 2 ,yyscanner );
1669 if ( ! b->yy_ch_buf )
1670 YY_FATAL_ERROR(
"out of dynamic memory in execute__create_buffer()" );
1672 b->yy_is_our_buffer = 1;
1674 execute__init_buffer(b,file ,yyscanner);
1684 void execute__delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
1694 if ( b == YY_CURRENT_BUFFER )
1695 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1697 if ( b->yy_is_our_buffer )
1698 execute_free((
void *) b->yy_ch_buf ,yyscanner );
1700 execute_free((
void *) b ,yyscanner );
1708 static void execute__init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
1717 execute__flush_buffer(b ,yyscanner);
1719 b->yy_input_file = file;
1720 b->yy_fill_buffer = 1;
1726 if (b != YY_CURRENT_BUFFER){
1733 b->yy_is_interactive = 0;
1746 void execute__flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
1761 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1762 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1764 b->yy_buf_pos = &b->yy_ch_buf[0];
1767 b->yy_buffer_status = YY_BUFFER_NEW;
1769 if ( b == YY_CURRENT_BUFFER )
1770 execute__load_buffer_state(yyscanner );
1781 void execute_push_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
1787 if (new_buffer == NULL)
1790 execute_ensure_buffer_stack(yyscanner);
1793 if ( YY_CURRENT_BUFFER )
1796 *yyg->yy_c_buf_p = yyg->yy_hold_char;
1797 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
1798 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1802 if (YY_CURRENT_BUFFER)
1804 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1807 execute__load_buffer_state(yyscanner );
1808 yyg->yy_did_buffer_switch_on_eof = 1;
1818 void execute_pop_buffer_state (yyscan_t yyscanner)
1824 if (!YY_CURRENT_BUFFER)
1827 execute__delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
1828 YY_CURRENT_BUFFER_LVALUE = NULL;
1832 if (YY_CURRENT_BUFFER) {
1833 execute__load_buffer_state(yyscanner );
1834 yyg->yy_did_buffer_switch_on_eof = 1;
1844 static void execute_ensure_buffer_stack (yyscan_t yyscanner)
1849 yy_size_t num_to_alloc;
1863 YY_FATAL_ERROR(
"out of dynamic memory in execute_ensure_buffer_stack()" );
1883 YY_FATAL_ERROR(
"out of dynamic memory in execute_ensure_buffer_stack()" );
1899 YY_BUFFER_STATE execute__scan_buffer (
char * base, yy_size_t size , yyscan_t yyscanner)
1904 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1905 base[size-1] != YY_END_OF_BUFFER_CHAR )
1909 b = (YY_BUFFER_STATE) execute_alloc(
sizeof(
struct yy_buffer_state ) ,yyscanner );
1911 YY_FATAL_ERROR(
"out of dynamic memory in execute__scan_buffer()" );
1913 b->yy_buf_size = size - 2;
1914 b->yy_buf_pos = b->yy_ch_buf = base;
1915 b->yy_is_our_buffer = 0;
1916 b->yy_input_file = 0;
1917 b->yy_n_chars = b->yy_buf_size;
1918 b->yy_is_interactive = 0;
1920 b->yy_fill_buffer = 0;
1921 b->yy_buffer_status = YY_BUFFER_NEW;
1923 execute__switch_to_buffer(b ,yyscanner );
1938 YY_BUFFER_STATE execute__scan_string (yyconst
char * yystr , yyscan_t yyscanner)
1941 return execute__scan_bytes(yystr,strlen(yystr) ,yyscanner);
1953 YY_BUFFER_STATE execute__scan_bytes (yyconst
char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner)
1961 n = _yybytes_len + 2;
1962 buf = (
char *) execute_alloc(n ,yyscanner );
1964 YY_FATAL_ERROR(
"out of dynamic memory in execute__scan_bytes()" );
1966 for ( i = 0; i < _yybytes_len; ++i )
1967 buf[i] = yybytes[i];
1969 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1971 b = execute__scan_buffer(buf,n ,yyscanner);
1973 YY_FATAL_ERROR(
"bad buffer in execute__scan_bytes()" );
1978 b->yy_is_our_buffer = 1;
1984 #ifndef YY_EXIT_FAILURE
1985 #define YY_EXIT_FAILURE 2
1989 static void yy_fatal_error (yyconst
char* msg , yyscan_t yyscanner)
1991 (void) fprintf( stderr,
"%s\n", msg );
1992 exit( YY_EXIT_FAILURE );
2005 int yyless_macro_arg = (n); \
2006 YY_LESS_LINENO(yyless_macro_arg);\
2007 yytext[yyleng] = yyg->yy_hold_char; \
2008 yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
2009 yyg->yy_hold_char = *yyg->yy_c_buf_p; \
2010 *yyg->yy_c_buf_p = '\0'; \
2011 yyleng = yyless_macro_arg; \
2023 YY_EXTRA_TYPE execute_get_extra (yyscan_t yyscanner)
2034 int execute_get_lineno (yyscan_t yyscanner)
2038 if (! YY_CURRENT_BUFFER)
2047 int execute_get_column (yyscan_t yyscanner)
2051 if (! YY_CURRENT_BUFFER)
2060 FILE *execute_get_in (yyscan_t yyscanner)
2069 FILE *execute_get_out (yyscan_t yyscanner)
2078 yy_size_t execute_get_leng (yyscan_t yyscanner)
2088 char *execute_get_text (yyscan_t yyscanner)
2100 void execute_set_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
2103 yyextra = user_defined ;
2112 void execute_set_lineno (
int line_number , yyscan_t yyscanner)
2117 if (! YY_CURRENT_BUFFER )
2118 YY_FATAL_ERROR(
"execute_set_lineno called with no buffer" );
2120 yylineno = line_number;
2127 void execute_set_column (
int column_no , yyscan_t yyscanner)
2132 if (! YY_CURRENT_BUFFER )
2133 YY_FATAL_ERROR(
"execute_set_column called with no buffer" );
2135 yycolumn = column_no;
2144 void execute_set_in (FILE * in_str , yyscan_t yyscanner)
2150 void execute_set_out (FILE * out_str , yyscan_t yyscanner)
2156 int execute_get_debug (yyscan_t yyscanner)
2159 return yy_flex_debug;
2162 void execute_set_debug (
int bdebug , yyscan_t yyscanner)
2165 yy_flex_debug = bdebug ;
2175 YYSTYPE * execute_get_lval (yyscan_t yyscanner)
2181 void execute_set_lval (
YYSTYPE * yylval_param , yyscan_t yyscanner)
2184 yylval = yylval_param;
2196 int execute_lex_init(yyscan_t* ptr_yy_globals)
2199 if (ptr_yy_globals == NULL){
2204 *ptr_yy_globals = (yyscan_t) execute_alloc (
sizeof(
struct yyguts_t ), NULL );
2206 if (*ptr_yy_globals == NULL){
2212 memset(*ptr_yy_globals,0x00,
sizeof(
struct yyguts_t));
2214 return yy_init_globals ( *ptr_yy_globals );
2225 int execute_lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
2230 execute_set_extra (yy_user_defined, &dummy_yyguts);
2232 if (ptr_yy_globals == NULL){
2237 *ptr_yy_globals = (yyscan_t) execute_alloc (
sizeof(
struct yyguts_t ), &dummy_yyguts );
2239 if (*ptr_yy_globals == NULL){
2246 memset(*ptr_yy_globals,0x00,
sizeof(
struct yyguts_t));
2248 execute_set_extra (yy_user_defined, *ptr_yy_globals);
2250 return yy_init_globals ( *ptr_yy_globals );
2256 static int yy_init_globals (yyscan_t yyscanner)
2266 yyg->yy_c_buf_p = (
char *) 0;
2270 yyg->yy_start_stack_ptr = 0;
2271 yyg->yy_start_stack_depth = 0;
2272 yyg->yy_start_stack = NULL;
2292 int execute_lex_destroy (yyscan_t yyscanner)
2297 while(YY_CURRENT_BUFFER){
2298 execute__delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
2299 YY_CURRENT_BUFFER_LVALUE = NULL;
2300 execute_pop_buffer_state(yyscanner);
2308 execute_free(yyg->yy_start_stack ,yyscanner );
2309 yyg->yy_start_stack = NULL;
2313 yy_init_globals( yyscanner);
2317 execute_free ( yyscanner , yyscanner );
2329 static void yy_flex_strncpy (
char* s1, yyconst
char * s2,
int n , yyscan_t yyscanner)
2332 for ( i = 0; i < n; ++i )
2337 #ifdef YY_NEED_STRLEN
2338 static int yy_flex_strlen (yyconst
char * s , yyscan_t yyscanner)
2341 for ( n = 0; s[n]; ++n )
2348 void *execute_alloc (yy_size_t size , yyscan_t yyscanner)
2350 return (
void *) malloc( size );
2353 void *execute_realloc (
void * ptr, yy_size_t size , yyscan_t yyscanner)
2362 return (
void *) realloc( (
char *) ptr, size );
2365 void execute_free (
void * ptr , yyscan_t yyscanner)
2367 free( (
char *) ptr );
2372 #define YYTABLES_NAME "yytables"
2377 #line 142 "drizzled/execute/scanner.l"
2383 void Context::init_scanner()
2385 execute_lex_init(&scanner);
2386 execute_set_extra(
this,scanner);
2389 void Context::destroy_scanner()
2391 execute_lex_destroy(scanner);
size_t yy_buffer_stack_top
TODO: Rename this file - func.h is stupid.
size_t yy_buffer_stack_max
YY_BUFFER_STATE * yy_buffer_stack