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 );
772 int execute_get_column (yyscan_t yyscanner );
774 void execute_set_column (
int column_no ,yyscan_t yyscanner );
778 YYSTYPE * execute_get_lval (yyscan_t yyscanner );
780 void execute_set_lval (
YYSTYPE * yylval_param ,yyscan_t yyscanner );
788 #ifndef YY_SKIP_YYWRAP
790 extern "C" int execute_wrap (yyscan_t yyscanner );
792 extern int execute_wrap (yyscan_t yyscanner );
803 static void yy_flex_strncpy (
char *,yyconst
char *,
int ,yyscan_t yyscanner);
806 #ifdef YY_NEED_STRLEN
807 static int yy_flex_strlen (yyconst
char * ,yyscan_t yyscanner);
815 static int yyinput (yyscan_t yyscanner );
817 static int input (yyscan_t yyscanner );
829 #ifndef YY_READ_BUF_SIZE
832 #define YY_READ_BUF_SIZE 16384
834 #define YY_READ_BUF_SIZE 8192
844 #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
854 #define YY_INPUT(buf,result,max_size) \
856 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
860 for ( n = 0; n < max_size && \
861 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
864 buf[n++] = (char) c; \
865 if ( c == EOF && ferror( yyin ) ) \
866 YY_FATAL_ERROR( "input in flex scanner failed" ); \
872 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
874 if( errno != EINTR) \
876 YY_FATAL_ERROR( "input in flex scanner failed" ); \
894 #define yyterminate() return YY_NULL
898 #ifndef YY_START_STACK_INCR
899 #define YY_START_STACK_INCR 25
903 #ifndef YY_FATAL_ERROR
905 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
928 #define YY_DECL_IS_OURS 1
931 extern int execute_lex \
932 (
YYSTYPE * yylval_param ,yyscan_t yyscanner);
934 #define YY_DECL int execute_lex \
935 (YYSTYPE * yylval_param , yyscan_t yyscanner)
944 #ifndef YY_USER_ACTION
945 #define YY_USER_ACTION
950 #define YY_BREAK break;
954 #define YY_RULE_SETUP \
963 register yy_state_type yy_current_state;
964 register char *yy_cp, *yy_bp;
969 #line 126 "drizzled/execute/scanner.l"
972 #line 973 "drizzled/execute/scanner.cc"
974 yylval = yylval_param;
984 if ( ! yyg->yy_start )
1001 if ( ! YY_CURRENT_BUFFER ) {
1002 execute_ensure_buffer_stack (yyscanner);
1003 YY_CURRENT_BUFFER_LVALUE =
1004 execute__create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
1007 execute__load_buffer_state(yyscanner );
1013 yy_cp = yyg->yy_c_buf_p;
1016 *yy_cp = yyg->yy_hold_char;
1024 yy_current_state = yyg->yy_start;
1028 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1029 if ( yy_accept[yy_current_state] )
1031 yyg->yy_last_accepting_state = yy_current_state;
1032 yyg->yy_last_accepting_cpos = yy_cp;
1034 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1036 yy_current_state = (int) yy_def[yy_current_state];
1037 if ( yy_current_state >= 46 )
1038 yy_c = yy_meta[(
unsigned int) yy_c];
1040 yy_current_state = yy_nxt[yy_base[yy_current_state] + (
unsigned int) yy_c];
1043 while ( yy_current_state != 45 );
1044 yy_cp = yyg->yy_last_accepting_cpos;
1045 yy_current_state = yyg->yy_last_accepting_state;
1049 yy_act = yy_accept[yy_current_state];
1051 YY_DO_BEFORE_ACTION;
1058 if ( yy_flex_debug )
1061 fprintf( stderr,
"--scanner backing up\n" );
1062 else if ( yy_act < 5 )
1063 fprintf( stderr,
"--accepting rule at line %ld (\"%s\")\n",
1064 (
long)yy_rule_linenum[yy_act], yytext );
1065 else if ( yy_act == 5 )
1066 fprintf( stderr,
"--accepting default rule (\"%s\")\n",
1068 else if ( yy_act == 6 )
1069 fprintf( stderr,
"--(end of buffer or a NUL)\n" );
1071 fprintf( stderr,
"--EOF (start condition %d)\n", YY_START );
1079 *yy_cp = yyg->yy_hold_char;
1080 yy_cp = yyg->yy_last_accepting_cpos;
1081 yy_current_state = yyg->yy_last_accepting_state;
1082 goto yy_find_action;
1086 #line 128 "drizzled/execute/scanner.l"
1092 #line 130 "drizzled/execute/scanner.l"
1098 #line 133 "drizzled/execute/scanner.l"
1100 yylval->string.assign(yytext, yyleng);
1106 #line 138 "drizzled/execute/scanner.l"
1108 yyextra->begin= yytext;
1114 #line 143 "drizzled/execute/scanner.l"
1117 #line 1118 "drizzled/execute/scanner.cc"
1118 case YY_STATE_EOF(INITIAL):
1121 case YY_END_OF_BUFFER:
1124 int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
1127 *yy_cp = yyg->yy_hold_char;
1128 YY_RESTORE_YY_MORE_OFFSET
1130 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1141 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1142 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1143 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1153 if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1155 yy_state_type yy_next_state;
1157 yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
1159 yy_current_state = yy_get_previous_state( yyscanner );
1170 yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
1172 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1174 if ( yy_next_state )
1177 yy_cp = ++yyg->yy_c_buf_p;
1178 yy_current_state = yy_next_state;
1185 yy_cp = yyg->yy_last_accepting_cpos;
1186 yy_current_state = yyg->yy_last_accepting_state;
1187 goto yy_find_action;
1191 else switch ( yy_get_next_buffer( yyscanner ) )
1193 case EOB_ACT_END_OF_FILE:
1195 yyg->yy_did_buffer_switch_on_eof = 0;
1197 if ( execute_wrap(yyscanner ) )
1208 yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
1210 yy_act = YY_STATE_EOF(YY_START);
1216 if ( ! yyg->yy_did_buffer_switch_on_eof )
1222 case EOB_ACT_CONTINUE_SCAN:
1224 yyg->yytext_ptr + yy_amount_of_matched_text;
1226 yy_current_state = yy_get_previous_state( yyscanner );
1228 yy_cp = yyg->yy_c_buf_p;
1229 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1232 case EOB_ACT_LAST_MATCH:
1234 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
1236 yy_current_state = yy_get_previous_state( yyscanner );
1238 yy_cp = yyg->yy_c_buf_p;
1239 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1240 goto yy_find_action;
1247 "fatal flex scanner internal error--no action found" );
1268 static int yy_get_next_buffer (yyscan_t yyscanner)
1274 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1275 register char *source = yyg->yytext_ptr;
1276 register int number_to_move, i;
1279 if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
1281 "fatal flex scanner internal error--end of buffer missed" );
1283 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1285 if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
1290 return EOB_ACT_END_OF_FILE;
1298 return EOB_ACT_LAST_MATCH;
1305 number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
1307 for ( i = 0; i < number_to_move; ++i )
1308 *(dest++) = *(source++);
1310 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1314 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
1319 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1321 while ( num_to_read <= 0 )
1327 int yy_c_buf_p_offset =
1328 (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
1330 if ( b->yy_is_our_buffer )
1332 int new_size = b->yy_buf_size * 2;
1334 if ( new_size <= 0 )
1335 b->yy_buf_size += b->yy_buf_size / 8;
1337 b->yy_buf_size *= 2;
1339 b->yy_ch_buf = (
char *)
1341 execute_realloc((
void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
1347 if ( ! b->yy_ch_buf )
1349 "fatal error - scanner input buffer overflow" );
1351 yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1353 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1358 if ( num_to_read > YY_READ_BUF_SIZE )
1359 num_to_read = YY_READ_BUF_SIZE;
1362 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1363 yyg->yy_n_chars, (
size_t) num_to_read );
1365 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1368 if ( yyg->yy_n_chars == 0 )
1370 if ( number_to_move == YY_MORE_ADJ )
1372 ret_val = EOB_ACT_END_OF_FILE;
1373 execute_restart(yyin ,yyscanner);
1378 ret_val = EOB_ACT_LAST_MATCH;
1379 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1380 YY_BUFFER_EOF_PENDING;
1385 ret_val = EOB_ACT_CONTINUE_SCAN;
1387 if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1389 yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
1390 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (
char *) execute_realloc((
void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
1391 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1392 YY_FATAL_ERROR(
"out of dynamic memory in yy_get_next_buffer()" );
1395 yyg->yy_n_chars += number_to_move;
1396 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1397 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1399 yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1409 static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
1414 register yy_state_type yy_current_state;
1415 register char *yy_cp;
1419 yy_current_state = yyg->yy_start;
1421 for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
1424 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1425 if ( yy_accept[yy_current_state] )
1427 yyg->yy_last_accepting_state = yy_current_state;
1428 yyg->yy_last_accepting_cpos = yy_cp;
1430 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1432 yy_current_state = (int) yy_def[yy_current_state];
1433 if ( yy_current_state >= 46 )
1434 yy_c = yy_meta[(
unsigned int) yy_c];
1436 yy_current_state = yy_nxt[yy_base[yy_current_state] + (
unsigned int) yy_c];
1439 return yy_current_state;
1448 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
1453 register int yy_is_jam;
1456 register char *yy_cp = yyg->yy_c_buf_p;
1458 register YY_CHAR yy_c = 1;
1459 if ( yy_accept[yy_current_state] )
1461 yyg->yy_last_accepting_state = yy_current_state;
1462 yyg->yy_last_accepting_cpos = yy_cp;
1464 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1466 yy_current_state = (int) yy_def[yy_current_state];
1467 if ( yy_current_state >= 46 )
1468 yy_c = yy_meta[(
unsigned int) yy_c];
1470 yy_current_state = yy_nxt[yy_base[yy_current_state] + (
unsigned int) yy_c];
1471 yy_is_jam = (yy_current_state == 45);
1473 return yy_is_jam ? 0 : yy_current_state;
1483 static int yyinput (yyscan_t yyscanner)
1485 static int input (yyscan_t yyscanner)
1495 *yyg->yy_c_buf_p = yyg->yy_hold_char;
1497 if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1503 if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1505 *yyg->yy_c_buf_p =
'\0';
1509 int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
1512 switch ( yy_get_next_buffer( yyscanner ) )
1514 case EOB_ACT_LAST_MATCH:
1526 execute_restart(yyin ,yyscanner);
1530 case EOB_ACT_END_OF_FILE:
1532 if ( execute_wrap(yyscanner ) )
1535 if ( ! yyg->yy_did_buffer_switch_on_eof )
1538 return yyinput(yyscanner);
1540 return input(yyscanner);
1544 case EOB_ACT_CONTINUE_SCAN:
1545 yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
1551 c = *(
unsigned char *) yyg->yy_c_buf_p;
1552 *yyg->yy_c_buf_p =
'\0';
1553 yyg->yy_hold_char = *++yyg->yy_c_buf_p;
1569 void execute_restart (FILE * input_file , yyscan_t yyscanner)
1576 if ( ! YY_CURRENT_BUFFER ){
1577 execute_ensure_buffer_stack (yyscanner);
1578 YY_CURRENT_BUFFER_LVALUE =
1579 execute__create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
1582 execute__init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
1583 execute__load_buffer_state(yyscanner );
1591 void execute__switch_to_buffer (
YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
1603 execute_ensure_buffer_stack (yyscanner);
1604 if ( YY_CURRENT_BUFFER == new_buffer )
1607 if ( YY_CURRENT_BUFFER )
1610 *yyg->yy_c_buf_p = yyg->yy_hold_char;
1611 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
1612 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1615 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1616 execute__load_buffer_state(yyscanner );
1623 yyg->yy_did_buffer_switch_on_eof = 1;
1627 static void execute__load_buffer_state (yyscan_t yyscanner)
1633 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1634 yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1635 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1636 yyg->yy_hold_char = *yyg->yy_c_buf_p;
1646 YY_BUFFER_STATE execute__create_buffer (FILE * file,
int size , yyscan_t yyscanner)
1655 YY_FATAL_ERROR(
"out of dynamic memory in execute__create_buffer()" );
1657 b->yy_buf_size = size;
1662 b->yy_ch_buf = (
char *) execute_alloc(b->yy_buf_size + 2 ,yyscanner );
1663 if ( ! b->yy_ch_buf )
1664 YY_FATAL_ERROR(
"out of dynamic memory in execute__create_buffer()" );
1666 b->yy_is_our_buffer = 1;
1668 execute__init_buffer(b,file ,yyscanner);
1688 if ( b == YY_CURRENT_BUFFER )
1691 if ( b->yy_is_our_buffer )
1692 execute_free((
void *) b->yy_ch_buf ,yyscanner );
1694 execute_free((
void *) b ,yyscanner );
1709 static void execute__init_buffer (
YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
1718 execute__flush_buffer(b ,yyscanner);
1720 b->yy_input_file = file;
1721 b->yy_fill_buffer = 1;
1727 if (b != YY_CURRENT_BUFFER){
1734 b->yy_is_interactive = 0;
1762 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1763 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1765 b->yy_buf_pos = &b->yy_ch_buf[0];
1768 b->yy_buffer_status = YY_BUFFER_NEW;
1770 if ( b == YY_CURRENT_BUFFER )
1771 execute__load_buffer_state(yyscanner );
1782 void execute_push_buffer_state (
YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
1788 if (new_buffer == NULL)
1791 execute_ensure_buffer_stack(yyscanner);
1794 if ( YY_CURRENT_BUFFER )
1797 *yyg->yy_c_buf_p = yyg->yy_hold_char;
1798 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
1799 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1803 if (YY_CURRENT_BUFFER)
1805 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1808 execute__load_buffer_state(yyscanner );
1809 yyg->yy_did_buffer_switch_on_eof = 1;
1819 void execute_pop_buffer_state (yyscan_t yyscanner)
1825 if (!YY_CURRENT_BUFFER)
1828 execute__delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
1829 YY_CURRENT_BUFFER_LVALUE = NULL;
1833 if (YY_CURRENT_BUFFER) {
1834 execute__load_buffer_state(yyscanner );
1835 yyg->yy_did_buffer_switch_on_eof = 1;
1845 static void execute_ensure_buffer_stack (yyscan_t yyscanner)
1864 YY_FATAL_ERROR(
"out of dynamic memory in execute_ensure_buffer_stack()" );
1884 YY_FATAL_ERROR(
"out of dynamic memory in execute_ensure_buffer_stack()" );
1900 YY_BUFFER_STATE execute__scan_buffer (
char * base, yy_size_t size , yyscan_t yyscanner)
1905 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1906 base[size-1] != YY_END_OF_BUFFER_CHAR )
1912 YY_FATAL_ERROR(
"out of dynamic memory in execute__scan_buffer()" );
1914 b->yy_buf_size = size - 2;
1915 b->yy_buf_pos = b->yy_ch_buf = base;
1916 b->yy_is_our_buffer = 0;
1917 b->yy_input_file = 0;
1918 b->yy_n_chars = b->yy_buf_size;
1919 b->yy_is_interactive = 0;
1921 b->yy_fill_buffer = 0;
1922 b->yy_buffer_status = YY_BUFFER_NEW;
1924 execute__switch_to_buffer(b ,yyscanner );
1939 YY_BUFFER_STATE execute__scan_string (yyconst
char * yystr , yyscan_t yyscanner)
1942 return execute__scan_bytes(yystr,strlen(yystr) ,yyscanner);
1954 YY_BUFFER_STATE execute__scan_bytes (yyconst
char * yybytes,
int _yybytes_len , yyscan_t yyscanner)
1962 n = _yybytes_len + 2;
1963 buf = (
char *) execute_alloc(n ,yyscanner );
1965 YY_FATAL_ERROR(
"out of dynamic memory in execute__scan_bytes()" );
1967 for ( i = 0; i < _yybytes_len; ++i )
1968 buf[i] = yybytes[i];
1970 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1972 b = execute__scan_buffer(buf,n ,yyscanner);
1974 YY_FATAL_ERROR(
"bad buffer in execute__scan_bytes()" );
1979 b->yy_is_our_buffer = 1;
1985 #ifndef YY_EXIT_FAILURE
1986 #define YY_EXIT_FAILURE 2
1990 static void yy_fatal_error (yyconst
char* msg , yyscan_t yyscanner)
1992 (void) fprintf( stderr,
"%s\n", msg );
1993 exit( YY_EXIT_FAILURE );
2006 int yyless_macro_arg = (n); \
2007 YY_LESS_LINENO(yyless_macro_arg);\
2008 yytext[yyleng] = yyg->yy_hold_char; \
2009 yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
2010 yyg->yy_hold_char = *yyg->yy_c_buf_p; \
2011 *yyg->yy_c_buf_p = '\0'; \
2012 yyleng = yyless_macro_arg; \
2024 YY_EXTRA_TYPE execute_get_extra (yyscan_t yyscanner)
2035 int execute_get_lineno (yyscan_t yyscanner)
2039 if (! YY_CURRENT_BUFFER)
2048 int execute_get_column (yyscan_t yyscanner)
2052 if (! YY_CURRENT_BUFFER)
2061 FILE *execute_get_in (yyscan_t yyscanner)
2070 FILE *execute_get_out (yyscan_t yyscanner)
2079 int execute_get_leng (yyscan_t yyscanner)
2089 char *execute_get_text (yyscan_t yyscanner)
2101 void execute_set_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
2104 yyextra = user_defined ;
2113 void execute_set_lineno (
int line_number , yyscan_t yyscanner)
2118 if (! YY_CURRENT_BUFFER )
2119 yy_fatal_error(
"execute_set_lineno called with no buffer" , yyscanner);
2121 yylineno = line_number;
2128 void execute_set_column (
int column_no , yyscan_t yyscanner)
2133 if (! YY_CURRENT_BUFFER )
2134 yy_fatal_error(
"execute_set_column called with no buffer" , yyscanner);
2136 yycolumn = column_no;
2145 void execute_set_in (FILE * in_str , yyscan_t yyscanner)
2151 void execute_set_out (FILE * out_str , yyscan_t yyscanner)
2157 int execute_get_debug (yyscan_t yyscanner)
2160 return yy_flex_debug;
2163 void execute_set_debug (
int bdebug , yyscan_t yyscanner)
2166 yy_flex_debug = bdebug ;
2176 YYSTYPE * execute_get_lval (yyscan_t yyscanner)
2182 void execute_set_lval (
YYSTYPE * yylval_param , yyscan_t yyscanner)
2185 yylval = yylval_param;
2197 int execute_lex_init(yyscan_t* ptr_yy_globals)
2200 if (ptr_yy_globals == NULL){
2205 *ptr_yy_globals = (yyscan_t) execute_alloc (
sizeof(
struct yyguts_t ), NULL );
2207 if (*ptr_yy_globals == NULL){
2213 memset(*ptr_yy_globals,0x00,
sizeof(
struct yyguts_t));
2215 return yy_init_globals ( *ptr_yy_globals );
2226 int execute_lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
2231 execute_set_extra (yy_user_defined, &dummy_yyguts);
2233 if (ptr_yy_globals == NULL){
2238 *ptr_yy_globals = (yyscan_t) execute_alloc (
sizeof(
struct yyguts_t ), &dummy_yyguts );
2240 if (*ptr_yy_globals == NULL){
2247 memset(*ptr_yy_globals,0x00,
sizeof(
struct yyguts_t));
2249 execute_set_extra (yy_user_defined, *ptr_yy_globals);
2251 return yy_init_globals ( *ptr_yy_globals );
2257 static int yy_init_globals (yyscan_t yyscanner)
2267 yyg->yy_c_buf_p = (
char *) 0;
2271 yyg->yy_start_stack_ptr = 0;
2272 yyg->yy_start_stack_depth = 0;
2273 yyg->yy_start_stack = NULL;
2293 int execute_lex_destroy (yyscan_t yyscanner)
2298 while(YY_CURRENT_BUFFER){
2299 execute__delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
2300 YY_CURRENT_BUFFER_LVALUE = NULL;
2301 execute_pop_buffer_state(yyscanner);
2309 execute_free(yyg->yy_start_stack ,yyscanner );
2310 yyg->yy_start_stack = NULL;
2314 yy_init_globals( yyscanner);
2318 execute_free ( yyscanner , yyscanner );
2330 static void yy_flex_strncpy (
char* s1, yyconst
char * s2,
int n , yyscan_t yyscanner)
2333 for ( i = 0; i < n; ++i )
2338 #ifdef YY_NEED_STRLEN
2339 static int yy_flex_strlen (yyconst
char * s , yyscan_t yyscanner)
2342 for ( n = 0; s[n]; ++n )
2349 void *execute_alloc (yy_size_t size , yyscan_t yyscanner)
2351 return (
void *) malloc( size );
2354 void *execute_realloc (
void * ptr, yy_size_t size , yyscan_t yyscanner)
2363 return (
void *) realloc( (
char *) ptr, size );
2366 void execute_free (
void * ptr , yyscan_t yyscanner)
2368 free( (
char *) ptr );
2373 #define YYTABLES_NAME "yytables"
2378 #line 143 "drizzled/execute/scanner.l"
2381 namespace drizzled {
2384 void Context::init_scanner()
2386 execute_lex_init(&scanner);
2387 execute_set_extra(
this,scanner);
2390 void Context::destroy_scanner()
2392 execute_lex_destroy(scanner);