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"
14 using namespace drizzled;
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 35
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
259 #define EOB_ACT_CONTINUE_SCAN 0
260 #define EOB_ACT_END_OF_FILE 1
261 #define EOB_ACT_LAST_MATCH 2
263 #define YY_LESS_LINENO(n)
270 int yyless_macro_arg = (n); \
271 YY_LESS_LINENO(yyless_macro_arg);\
272 *yy_cp = yyg->yy_hold_char; \
273 YY_RESTORE_YY_MORE_OFFSET \
274 yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
275 YY_DO_BEFORE_ACTION; \
279 #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
281 #ifndef YY_TYPEDEF_YY_SIZE_T
282 #define YY_TYPEDEF_YY_SIZE_T
283 typedef size_t yy_size_t;
286 #ifndef YY_STRUCT_YY_BUFFER_STATE
287 #define YY_STRUCT_YY_BUFFER_STATE
303 yy_size_t yy_buf_size;
314 int yy_is_our_buffer;
321 int yy_is_interactive;
337 int yy_buffer_status;
339 #define YY_BUFFER_NEW 0
340 #define YY_BUFFER_NORMAL 1
351 #define YY_BUFFER_EOF_PENDING 2
371 #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
372 ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
378 #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
389 void execute_restart (FILE *input_file ,yyscan_t yyscanner );
390 void execute__switch_to_buffer (
YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
391 YY_BUFFER_STATE execute__create_buffer (FILE *file,
int size ,yyscan_t yyscanner );
394 void execute_push_buffer_state (
YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
395 void execute_pop_buffer_state (yyscan_t yyscanner );
397 static void execute_ensure_buffer_stack (yyscan_t yyscanner );
398 static void execute__load_buffer_state (yyscan_t yyscanner );
399 static void execute__init_buffer (
YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
401 #define YY_FLUSH_BUFFER execute__flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
403 YY_BUFFER_STATE execute__scan_buffer (
char *base,yy_size_t size ,yyscan_t yyscanner );
404 YY_BUFFER_STATE execute__scan_string (yyconst
char *yy_str ,yyscan_t yyscanner );
405 YY_BUFFER_STATE execute__scan_bytes (yyconst
char *bytes,
int len ,yyscan_t yyscanner );
409 void *execute_alloc (yy_size_t ,yyscan_t yyscanner );
410 void *execute_realloc (
void *,yy_size_t ,yyscan_t yyscanner );
411 void execute_free (
void * ,yyscan_t yyscanner );
413 #define yy_new_buffer execute__create_buffer
415 #define yy_set_interactive(is_interactive) \
417 if ( ! YY_CURRENT_BUFFER ){ \
418 execute_ensure_buffer_stack (yyscanner); \
419 YY_CURRENT_BUFFER_LVALUE = \
420 execute__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
422 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
425 #define yy_set_bol(at_bol) \
427 if ( ! YY_CURRENT_BUFFER ){\
428 execute_ensure_buffer_stack (yyscanner); \
429 YY_CURRENT_BUFFER_LVALUE = \
430 execute__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
432 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
435 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
440 #define execute_wrap(n) 1
441 #define YY_SKIP_YYWRAP
445 typedef unsigned char YY_CHAR;
447 typedef int yy_state_type;
449 #define yytext_ptr yytext_r
453 static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
454 static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner);
455 static int yy_get_next_buffer (yyscan_t yyscanner );
456 static void yy_fatal_error (yyconst
char msg[] ,yyscan_t yyscanner );
463 #define YY_DO_BEFORE_ACTION \
464 yyg->yytext_ptr = yy_bp; \
466 yyleng = (size_t) (yy_cp - yy_bp); \
467 yyg->yy_hold_char = *yy_cp; \
470 yyg->yy_c_buf_p = yy_cp;
473 #define YY_NUM_RULES 5
474 #define YY_END_OF_BUFFER 6
479 flex_int32_t yy_verify;
482 static yyconst flex_int16_t yy_accept[46] =
484 3, 3, 6, 3, 2, 2, 3, 3, 3, 3,
485 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
486 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
487 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
491 static yyconst flex_int32_t yy_ec[256] =
493 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
494 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
495 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
496 1, 2, 4, 5, 4, 4, 4, 4, 4, 4,
497 4, 4, 4, 4, 5, 5, 4, 6, 7, 7,
498 7, 7, 7, 7, 7, 7, 7, 4, 4, 4,
499 4, 4, 4, 4, 8, 1, 1, 1, 1, 9,
500 1, 1, 1, 1, 1, 8, 8, 8, 1, 1,
501 1, 1, 1, 1, 8, 1, 1, 9, 1, 1,
502 4, 4, 4, 4, 5, 4, 8, 1, 1, 1,
504 1, 9, 1, 1, 1, 1, 1, 8, 8, 8,
505 1, 1, 1, 1, 1, 1, 8, 1, 1, 9,
506 1, 1, 5, 4, 5, 4, 1, 10, 10, 10,
507 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
508 10, 10, 10, 11, 11, 11, 11, 11, 11, 11,
509 11, 11, 11, 11, 11, 11, 11, 11, 11, 12,
510 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
511 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
512 12, 12, 12, 12, 12, 12, 13, 12, 12, 12,
513 14, 1, 1, 15, 15, 15, 15, 15, 15, 15,
515 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
516 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
517 15, 15, 15, 16, 17, 17, 17, 17, 17, 17,
518 17, 17, 17, 17, 17, 17, 18, 19, 20, 1,
519 21, 21, 21, 22, 1, 1, 1, 1, 1, 1,
523 static yyconst flex_int32_t yy_meta[23] =
525 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
526 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
530 static yyconst flex_int16_t yy_base[46] =
532 0, 0, 114, 22, 0, 34, 0, 0, 38, 0,
533 0, 42, 47, 50, 55, 60, 62, 100, 67, 102,
534 0, 71, 0, 75, 0, 0, 78, 0, 83, 0,
535 0, 101, 85, 0, 0, 0, 0, 96, 90, 95,
539 static yyconst flex_int16_t yy_def[46] =
541 45, 1, 45, 45, 4, 4, 4, 4, 4, 4,
542 4, 4, 4, 4, 4, 4, 4, 17, 17, 4,
543 4, 4, 4, 4, 4, 13, 4, 15, 4, 17,
544 19, 4, 4, 13, 13, 13, 13, 13, 13, 13,
548 static yyconst flex_int16_t yy_nxt[138] =
550 4, 5, 6, 7, 8, 9, 10, 11, 12, 4,
551 4, 4, 4, 4, 13, 14, 15, 16, 17, 18,
552 19, 20, 21, 21, 22, 21, 23, 24, 25, 23,
553 22, 21, 21, 21, 21, 21, 26, 27, 28, 29,
554 30, 30, 31, 32, 33, 33, 33, 33, 33, 33,
555 33, 33, 33, 33, 33, 33, 25, 25, 25, 25,
556 25, 34, 34, 34, 35, 35, 35, 35, 35, 36,
557 36, 37, 37, 37, 37, 37, 39, 39, 39, 39,
558 39, 33, 33, 33, 33, 33, 33, 33, 33, 34,
559 34, 34, 36, 36, 41, 41, 41, 41, 41, 43,
561 43, 43, 43, 43, 44, 44, 44, 44, 44, 42,
562 40, 40, 38, 45, 3, 45, 45, 45, 45, 45,
563 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
564 45, 45, 45, 45, 45, 45, 45
567 static yyconst flex_int16_t yy_chk[138] =
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, 4, 4, 4, 4, 4, 4, 4, 4,
572 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
573 4, 4, 4, 4, 6, 6, 6, 6, 9, 9,
574 9, 9, 12, 12, 12, 12, 13, 13, 13, 13,
575 13, 14, 14, 14, 15, 15, 15, 15, 15, 16,
576 16, 17, 17, 17, 17, 17, 19, 19, 19, 19,
577 19, 22, 22, 22, 22, 24, 24, 24, 24, 27,
578 27, 27, 29, 29, 33, 33, 33, 33, 33, 39,
580 39, 39, 39, 39, 40, 40, 40, 40, 40, 38,
581 32, 20, 18, 3, 45, 45, 45, 45, 45, 45,
582 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
583 45, 45, 45, 45, 45, 45, 45
586 static yyconst flex_int16_t yy_rule_linenum[5] =
594 #define REJECT reject_used_but_not_detected
595 #define yymore() yymore_used_but_not_detected
596 #define YY_MORE_ADJ 0
597 #define YY_RESTORE_YY_MORE_OFFSET
598 #line 1 "drizzled/execute/scanner.l"
638 #line 69 "drizzled/execute/scanner.l"
643 #define PARAM execute_get_extra(yyscanner)
645 #define get_lex_chars(buffer, result, max_size, context) \
647 if (context->pos >= context->length) \
653 result= (int)(context->length - context->pos); \
654 (size_t)result > (size_t)max_size ? result= max_size : 0; \
655 memcpy(buffer, context->buf + context->pos, result); \
656 context->pos += result; \
661 #define YY_INPUT(buffer, result, max_size) get_lex_chars(buffer, result, max_size, PARAM)
663 #define YY_NO_UNISTD_H 1
664 #line 665 "drizzled/execute/scanner.cc"
668 #ifndef YY_NO_UNISTD_H
680 #ifndef YY_EXTRA_TYPE
681 #define YY_EXTRA_TYPE void *
692 YY_EXTRA_TYPE yyextra_r;
695 FILE *yyin_r, *yyout_r;
705 int yy_did_buffer_switch_on_eof;
706 int yy_start_stack_ptr;
707 int yy_start_stack_depth;
709 yy_state_type yy_last_accepting_state;
710 char* yy_last_accepting_cpos;
725 static int yy_init_globals (yyscan_t yyscanner );
733 # define yylval yyg->yylval_r
735 int execute_lex_init (yyscan_t* scanner);
737 int execute_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
746 int execute_lex_destroy (yyscan_t yyscanner );
748 int execute_get_debug (yyscan_t yyscanner );
750 void execute_set_debug (
int debug_flag ,yyscan_t yyscanner );
752 YY_EXTRA_TYPE execute_get_extra (yyscan_t yyscanner );
754 void execute_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
756 FILE *execute_get_in (yyscan_t yyscanner );
758 void execute_set_in (FILE * in_str ,yyscan_t yyscanner );
760 FILE *execute_get_out (yyscan_t yyscanner );
762 void execute_set_out (FILE * out_str ,yyscan_t yyscanner );
764 int execute_get_leng (yyscan_t yyscanner );
766 char *execute_get_text (yyscan_t yyscanner );
768 int execute_get_lineno (yyscan_t yyscanner );
770 void execute_set_lineno (
int line_number ,yyscan_t yyscanner );
774 YYSTYPE * execute_get_lval (yyscan_t yyscanner );
776 void execute_set_lval (
YYSTYPE * yylval_param ,yyscan_t yyscanner );
784 #ifndef YY_SKIP_YYWRAP
786 extern "C" int execute_wrap (yyscan_t yyscanner );
788 extern int execute_wrap (yyscan_t yyscanner );
799 static void yy_flex_strncpy (
char *,yyconst
char *,
int ,yyscan_t yyscanner);
802 #ifdef YY_NEED_STRLEN
803 static int yy_flex_strlen (yyconst
char * ,yyscan_t yyscanner);
811 static int yyinput (yyscan_t yyscanner );
813 static int input (yyscan_t yyscanner );
825 #ifndef YY_READ_BUF_SIZE
828 #define YY_READ_BUF_SIZE 16384
830 #define YY_READ_BUF_SIZE 8192
840 #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
850 #define YY_INPUT(buf,result,max_size) \
852 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
856 for ( n = 0; n < max_size && \
857 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
860 buf[n++] = (char) c; \
861 if ( c == EOF && ferror( yyin ) ) \
862 YY_FATAL_ERROR( "input in flex scanner failed" ); \
868 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
870 if( errno != EINTR) \
872 YY_FATAL_ERROR( "input in flex scanner failed" ); \
890 #define yyterminate() return YY_NULL
894 #ifndef YY_START_STACK_INCR
895 #define YY_START_STACK_INCR 25
899 #ifndef YY_FATAL_ERROR
901 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
924 #define YY_DECL_IS_OURS 1
927 extern int execute_lex \
928 (
YYSTYPE * yylval_param ,yyscan_t yyscanner);
930 #define YY_DECL int execute_lex \
931 (YYSTYPE * yylval_param , yyscan_t yyscanner)
940 #ifndef YY_USER_ACTION
941 #define YY_USER_ACTION
946 #define YY_BREAK break;
950 #define YY_RULE_SETUP \
959 register yy_state_type yy_current_state;
960 register char *yy_cp, *yy_bp;
965 #line 126 "drizzled/execute/scanner.l"
968 #line 969 "drizzled/execute/scanner.cc"
970 yylval = yylval_param;
980 if ( ! yyg->yy_start )
997 if ( ! YY_CURRENT_BUFFER ) {
998 execute_ensure_buffer_stack (yyscanner);
999 YY_CURRENT_BUFFER_LVALUE =
1000 execute__create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
1003 execute__load_buffer_state(yyscanner );
1009 yy_cp = yyg->yy_c_buf_p;
1012 *yy_cp = yyg->yy_hold_char;
1020 yy_current_state = yyg->yy_start;
1024 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1025 if ( yy_accept[yy_current_state] )
1027 yyg->yy_last_accepting_state = yy_current_state;
1028 yyg->yy_last_accepting_cpos = yy_cp;
1030 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1032 yy_current_state = (int) yy_def[yy_current_state];
1033 if ( yy_current_state >= 46 )
1034 yy_c = yy_meta[(
unsigned int) yy_c];
1036 yy_current_state = yy_nxt[yy_base[yy_current_state] + (
unsigned int) yy_c];
1039 while ( yy_current_state != 45 );
1040 yy_cp = yyg->yy_last_accepting_cpos;
1041 yy_current_state = yyg->yy_last_accepting_state;
1045 yy_act = yy_accept[yy_current_state];
1047 YY_DO_BEFORE_ACTION;
1054 if ( yy_flex_debug )
1057 fprintf( stderr,
"--scanner backing up\n" );
1058 else if ( yy_act < 5 )
1059 fprintf( stderr,
"--accepting rule at line %ld (\"%s\")\n",
1060 (
long)yy_rule_linenum[yy_act], yytext );
1061 else if ( yy_act == 5 )
1062 fprintf( stderr,
"--accepting default rule (\"%s\")\n",
1064 else if ( yy_act == 6 )
1065 fprintf( stderr,
"--(end of buffer or a NUL)\n" );
1067 fprintf( stderr,
"--EOF (start condition %d)\n", YY_START );
1075 *yy_cp = yyg->yy_hold_char;
1076 yy_cp = yyg->yy_last_accepting_cpos;
1077 yy_current_state = yyg->yy_last_accepting_state;
1078 goto yy_find_action;
1082 #line 128 "drizzled/execute/scanner.l"
1088 #line 130 "drizzled/execute/scanner.l"
1094 #line 133 "drizzled/execute/scanner.l"
1096 yylval->string.assign(yytext, yyleng);
1102 #line 138 "drizzled/execute/scanner.l"
1104 yyextra->begin= yytext;
1110 #line 143 "drizzled/execute/scanner.l"
1113 #line 1114 "drizzled/execute/scanner.cc"
1114 case YY_STATE_EOF(INITIAL):
1117 case YY_END_OF_BUFFER:
1120 int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
1123 *yy_cp = yyg->yy_hold_char;
1124 YY_RESTORE_YY_MORE_OFFSET
1126 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1137 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1138 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1139 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1149 if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1151 yy_state_type yy_next_state;
1153 yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
1155 yy_current_state = yy_get_previous_state( yyscanner );
1166 yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
1168 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1170 if ( yy_next_state )
1173 yy_cp = ++yyg->yy_c_buf_p;
1174 yy_current_state = yy_next_state;
1181 yy_cp = yyg->yy_last_accepting_cpos;
1182 yy_current_state = yyg->yy_last_accepting_state;
1183 goto yy_find_action;
1187 else switch ( yy_get_next_buffer( yyscanner ) )
1189 case EOB_ACT_END_OF_FILE:
1191 yyg->yy_did_buffer_switch_on_eof = 0;
1193 if ( execute_wrap(yyscanner ) )
1204 yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
1206 yy_act = YY_STATE_EOF(YY_START);
1212 if ( ! yyg->yy_did_buffer_switch_on_eof )
1218 case EOB_ACT_CONTINUE_SCAN:
1220 yyg->yytext_ptr + yy_amount_of_matched_text;
1222 yy_current_state = yy_get_previous_state( yyscanner );
1224 yy_cp = yyg->yy_c_buf_p;
1225 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1228 case EOB_ACT_LAST_MATCH:
1230 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
1232 yy_current_state = yy_get_previous_state( yyscanner );
1234 yy_cp = yyg->yy_c_buf_p;
1235 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1236 goto yy_find_action;
1243 "fatal flex scanner internal error--no action found" );
1264 static int yy_get_next_buffer (yyscan_t yyscanner)
1270 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1271 register char *source = yyg->yytext_ptr;
1272 register int number_to_move, i;
1275 if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
1277 "fatal flex scanner internal error--end of buffer missed" );
1279 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1281 if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
1286 return EOB_ACT_END_OF_FILE;
1294 return EOB_ACT_LAST_MATCH;
1301 number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
1303 for ( i = 0; i < number_to_move; ++i )
1304 *(dest++) = *(source++);
1306 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1310 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
1315 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1317 while ( num_to_read <= 0 )
1323 int yy_c_buf_p_offset =
1324 (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
1326 if ( b->yy_is_our_buffer )
1328 int new_size = b->yy_buf_size * 2;
1330 if ( new_size <= 0 )
1331 b->yy_buf_size += b->yy_buf_size / 8;
1333 b->yy_buf_size *= 2;
1335 b->yy_ch_buf = (
char *)
1337 execute_realloc((
void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
1343 if ( ! b->yy_ch_buf )
1345 "fatal error - scanner input buffer overflow" );
1347 yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1349 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1354 if ( num_to_read > YY_READ_BUF_SIZE )
1355 num_to_read = YY_READ_BUF_SIZE;
1358 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1359 yyg->yy_n_chars, (
size_t) num_to_read );
1361 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1364 if ( yyg->yy_n_chars == 0 )
1366 if ( number_to_move == YY_MORE_ADJ )
1368 ret_val = EOB_ACT_END_OF_FILE;
1369 execute_restart(yyin ,yyscanner);
1374 ret_val = EOB_ACT_LAST_MATCH;
1375 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1376 YY_BUFFER_EOF_PENDING;
1381 ret_val = EOB_ACT_CONTINUE_SCAN;
1383 if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1385 yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
1386 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (
char *) execute_realloc((
void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
1387 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1388 YY_FATAL_ERROR(
"out of dynamic memory in yy_get_next_buffer()" );
1391 yyg->yy_n_chars += number_to_move;
1392 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1393 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1395 yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1405 static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
1410 register yy_state_type yy_current_state;
1411 register char *yy_cp;
1415 yy_current_state = yyg->yy_start;
1417 for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
1420 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1421 if ( yy_accept[yy_current_state] )
1423 yyg->yy_last_accepting_state = yy_current_state;
1424 yyg->yy_last_accepting_cpos = yy_cp;
1426 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1428 yy_current_state = (int) yy_def[yy_current_state];
1429 if ( yy_current_state >= 46 )
1430 yy_c = yy_meta[(
unsigned int) yy_c];
1432 yy_current_state = yy_nxt[yy_base[yy_current_state] + (
unsigned int) yy_c];
1435 return yy_current_state;
1444 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
1449 register int yy_is_jam;
1452 register char *yy_cp = yyg->yy_c_buf_p;
1454 register YY_CHAR yy_c = 1;
1455 if ( yy_accept[yy_current_state] )
1457 yyg->yy_last_accepting_state = yy_current_state;
1458 yyg->yy_last_accepting_cpos = yy_cp;
1460 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1462 yy_current_state = (int) yy_def[yy_current_state];
1463 if ( yy_current_state >= 46 )
1464 yy_c = yy_meta[(
unsigned int) yy_c];
1466 yy_current_state = yy_nxt[yy_base[yy_current_state] + (
unsigned int) yy_c];
1467 yy_is_jam = (yy_current_state == 45);
1469 return yy_is_jam ? 0 : yy_current_state;
1479 static int yyinput (yyscan_t yyscanner)
1481 static int input (yyscan_t yyscanner)
1491 *yyg->yy_c_buf_p = yyg->yy_hold_char;
1493 if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1499 if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1501 *yyg->yy_c_buf_p =
'\0';
1505 int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
1508 switch ( yy_get_next_buffer( yyscanner ) )
1510 case EOB_ACT_LAST_MATCH:
1522 execute_restart(yyin ,yyscanner);
1526 case EOB_ACT_END_OF_FILE:
1528 if ( execute_wrap(yyscanner ) )
1531 if ( ! yyg->yy_did_buffer_switch_on_eof )
1534 return yyinput(yyscanner);
1536 return input(yyscanner);
1540 case EOB_ACT_CONTINUE_SCAN:
1541 yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
1547 c = *(
unsigned char *) yyg->yy_c_buf_p;
1548 *yyg->yy_c_buf_p =
'\0';
1549 yyg->yy_hold_char = *++yyg->yy_c_buf_p;
1565 void execute_restart (FILE * input_file , yyscan_t yyscanner)
1572 if ( ! YY_CURRENT_BUFFER ){
1573 execute_ensure_buffer_stack (yyscanner);
1574 YY_CURRENT_BUFFER_LVALUE =
1575 execute__create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
1578 execute__init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
1579 execute__load_buffer_state(yyscanner );
1587 void execute__switch_to_buffer (
YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
1599 execute_ensure_buffer_stack (yyscanner);
1600 if ( YY_CURRENT_BUFFER == new_buffer )
1603 if ( YY_CURRENT_BUFFER )
1606 *yyg->yy_c_buf_p = yyg->yy_hold_char;
1607 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
1608 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1611 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1612 execute__load_buffer_state(yyscanner );
1619 yyg->yy_did_buffer_switch_on_eof = 1;
1623 static void execute__load_buffer_state (yyscan_t yyscanner)
1629 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1630 yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1631 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1632 yyg->yy_hold_char = *yyg->yy_c_buf_p;
1642 YY_BUFFER_STATE execute__create_buffer (FILE * file,
int size , yyscan_t yyscanner)
1651 YY_FATAL_ERROR(
"out of dynamic memory in execute__create_buffer()" );
1653 b->yy_buf_size = size;
1658 b->yy_ch_buf = (
char *) execute_alloc(b->yy_buf_size + 2 ,yyscanner );
1659 if ( ! b->yy_ch_buf )
1660 YY_FATAL_ERROR(
"out of dynamic memory in execute__create_buffer()" );
1662 b->yy_is_our_buffer = 1;
1664 execute__init_buffer(b,file ,yyscanner);
1684 if ( b == YY_CURRENT_BUFFER )
1687 if ( b->yy_is_our_buffer )
1688 execute_free((
void *) b->yy_ch_buf ,yyscanner );
1690 execute_free((
void *) b ,yyscanner );
1705 static void execute__init_buffer (
YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
1714 execute__flush_buffer(b ,yyscanner);
1716 b->yy_input_file = file;
1717 b->yy_fill_buffer = 1;
1723 if (b != YY_CURRENT_BUFFER){
1730 b->yy_is_interactive = 0;
1758 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1759 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1761 b->yy_buf_pos = &b->yy_ch_buf[0];
1764 b->yy_buffer_status = YY_BUFFER_NEW;
1766 if ( b == YY_CURRENT_BUFFER )
1767 execute__load_buffer_state(yyscanner );
1778 void execute_push_buffer_state (
YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
1784 if (new_buffer == NULL)
1787 execute_ensure_buffer_stack(yyscanner);
1790 if ( YY_CURRENT_BUFFER )
1793 *yyg->yy_c_buf_p = yyg->yy_hold_char;
1794 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
1795 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1799 if (YY_CURRENT_BUFFER)
1801 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1804 execute__load_buffer_state(yyscanner );
1805 yyg->yy_did_buffer_switch_on_eof = 1;
1815 void execute_pop_buffer_state (yyscan_t yyscanner)
1821 if (!YY_CURRENT_BUFFER)
1824 execute__delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
1825 YY_CURRENT_BUFFER_LVALUE = NULL;
1829 if (YY_CURRENT_BUFFER) {
1830 execute__load_buffer_state(yyscanner );
1831 yyg->yy_did_buffer_switch_on_eof = 1;
1841 static void execute_ensure_buffer_stack (yyscan_t yyscanner)
1860 YY_FATAL_ERROR(
"out of dynamic memory in execute_ensure_buffer_stack()" );
1880 YY_FATAL_ERROR(
"out of dynamic memory in execute_ensure_buffer_stack()" );
1896 YY_BUFFER_STATE execute__scan_buffer (
char * base, yy_size_t size , yyscan_t yyscanner)
1901 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1902 base[size-1] != YY_END_OF_BUFFER_CHAR )
1908 YY_FATAL_ERROR(
"out of dynamic memory in execute__scan_buffer()" );
1910 b->yy_buf_size = size - 2;
1911 b->yy_buf_pos = b->yy_ch_buf = base;
1912 b->yy_is_our_buffer = 0;
1913 b->yy_input_file = 0;
1914 b->yy_n_chars = b->yy_buf_size;
1915 b->yy_is_interactive = 0;
1917 b->yy_fill_buffer = 0;
1918 b->yy_buffer_status = YY_BUFFER_NEW;
1920 execute__switch_to_buffer(b ,yyscanner );
1935 YY_BUFFER_STATE execute__scan_string (yyconst
char * yystr , yyscan_t yyscanner)
1938 return execute__scan_bytes(yystr,strlen(yystr) ,yyscanner);
1950 YY_BUFFER_STATE execute__scan_bytes (yyconst
char * yybytes,
int _yybytes_len , yyscan_t yyscanner)
1958 n = _yybytes_len + 2;
1959 buf = (
char *) execute_alloc(n ,yyscanner );
1961 YY_FATAL_ERROR(
"out of dynamic memory in execute__scan_bytes()" );
1963 for ( i = 0; i < _yybytes_len; ++i )
1964 buf[i] = yybytes[i];
1966 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1968 b = execute__scan_buffer(buf,n ,yyscanner);
1970 YY_FATAL_ERROR(
"bad buffer in execute__scan_bytes()" );
1975 b->yy_is_our_buffer = 1;
1981 #ifndef YY_EXIT_FAILURE
1982 #define YY_EXIT_FAILURE 2
1986 static void yy_fatal_error (yyconst
char* msg , yyscan_t yyscanner)
1988 (void) fprintf( stderr,
"%s\n", msg );
1989 exit( YY_EXIT_FAILURE );
2002 int yyless_macro_arg = (n); \
2003 YY_LESS_LINENO(yyless_macro_arg);\
2004 yytext[yyleng] = yyg->yy_hold_char; \
2005 yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
2006 yyg->yy_hold_char = *yyg->yy_c_buf_p; \
2007 *yyg->yy_c_buf_p = '\0'; \
2008 yyleng = yyless_macro_arg; \
2020 YY_EXTRA_TYPE execute_get_extra (yyscan_t yyscanner)
2031 int execute_get_lineno (yyscan_t yyscanner)
2035 if (! YY_CURRENT_BUFFER)
2044 int execute_get_column (yyscan_t yyscanner)
2048 if (! YY_CURRENT_BUFFER)
2057 FILE *execute_get_in (yyscan_t yyscanner)
2066 FILE *execute_get_out (yyscan_t yyscanner)
2075 int execute_get_leng (yyscan_t yyscanner)
2085 char *execute_get_text (yyscan_t yyscanner)
2097 void execute_set_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
2100 yyextra = user_defined ;
2109 void execute_set_lineno (
int line_number , yyscan_t yyscanner)
2114 if (! YY_CURRENT_BUFFER )
2115 yy_fatal_error(
"execute_set_lineno called with no buffer" , yyscanner);
2117 yylineno = line_number;
2124 void execute_set_column (
int column_no , yyscan_t yyscanner)
2129 if (! YY_CURRENT_BUFFER )
2130 yy_fatal_error(
"execute_set_column called with no buffer" , yyscanner);
2132 yycolumn = column_no;
2141 void execute_set_in (FILE * in_str , yyscan_t yyscanner)
2147 void execute_set_out (FILE * out_str , yyscan_t yyscanner)
2153 int execute_get_debug (yyscan_t yyscanner)
2156 return yy_flex_debug;
2159 void execute_set_debug (
int bdebug , yyscan_t yyscanner)
2162 yy_flex_debug = bdebug ;
2172 YYSTYPE * execute_get_lval (yyscan_t yyscanner)
2178 void execute_set_lval (
YYSTYPE * yylval_param , yyscan_t yyscanner)
2181 yylval = yylval_param;
2193 int execute_lex_init(yyscan_t* ptr_yy_globals)
2196 if (ptr_yy_globals == NULL){
2201 *ptr_yy_globals = (yyscan_t) execute_alloc (
sizeof(
struct yyguts_t ), NULL );
2203 if (*ptr_yy_globals == NULL){
2209 memset(*ptr_yy_globals,0x00,
sizeof(
struct yyguts_t));
2211 return yy_init_globals ( *ptr_yy_globals );
2222 int execute_lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
2227 execute_set_extra (yy_user_defined, &dummy_yyguts);
2229 if (ptr_yy_globals == NULL){
2234 *ptr_yy_globals = (yyscan_t) execute_alloc (
sizeof(
struct yyguts_t ), &dummy_yyguts );
2236 if (*ptr_yy_globals == NULL){
2243 memset(*ptr_yy_globals,0x00,
sizeof(
struct yyguts_t));
2245 execute_set_extra (yy_user_defined, *ptr_yy_globals);
2247 return yy_init_globals ( *ptr_yy_globals );
2253 static int yy_init_globals (yyscan_t yyscanner)
2263 yyg->yy_c_buf_p = (
char *) 0;
2267 yyg->yy_start_stack_ptr = 0;
2268 yyg->yy_start_stack_depth = 0;
2269 yyg->yy_start_stack = NULL;
2289 int execute_lex_destroy (yyscan_t yyscanner)
2294 while(YY_CURRENT_BUFFER){
2295 execute__delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
2296 YY_CURRENT_BUFFER_LVALUE = NULL;
2297 execute_pop_buffer_state(yyscanner);
2305 execute_free(yyg->yy_start_stack ,yyscanner );
2306 yyg->yy_start_stack = NULL;
2310 yy_init_globals( yyscanner);
2314 execute_free ( yyscanner , yyscanner );
2326 static void yy_flex_strncpy (
char* s1, yyconst
char * s2,
int n , yyscan_t yyscanner)
2329 for ( i = 0; i < n; ++i )
2334 #ifdef YY_NEED_STRLEN
2335 static int yy_flex_strlen (yyconst
char * s , yyscan_t yyscanner)
2338 for ( n = 0; s[n]; ++n )
2345 void *execute_alloc (yy_size_t size , yyscan_t yyscanner)
2347 return (
void *) malloc( size );
2350 void *execute_realloc (
void * ptr, yy_size_t size , yyscan_t yyscanner)
2359 return (
void *) realloc( (
char *) ptr, size );
2362 void execute_free (
void * ptr , yyscan_t yyscanner)
2364 free( (
char *) ptr );
2369 #define YYTABLES_NAME "yytables"
2374 #line 143 "drizzled/execute/scanner.l"
2377 namespace drizzled {
2380 void Context::init_scanner()
2382 execute_lex_init(&scanner);
2383 execute_set_extra(
this,scanner);
2386 void Context::destroy_scanner()
2388 execute_lex_destroy(scanner);