1 #line 2 "drizzled/execute/scanner.cc"
2 #line 41 "drizzled/execute/scanner.l"
6 #include <drizzled/execute/parser.h>
7 #include <drizzled/execute/context.h>
8 #include <drizzled/execute/symbol.h>
9 #include <drizzled/lex_string.h>
11 using namespace drizzled;
13 #ifndef __INTEL_COMPILER
14 #pragma GCC diagnostic ignored "-Wold-style-cast"
15 #pragma GCC diagnostic ignored "-Wsign-compare"
16 #pragma GCC diagnostic ignored "-Wunused-parameter"
17 #pragma GCC diagnostic ignored "-Wmissing-declarations"
20 #define YY_EXTRA_TYPE ::drizzled::execute::Context*
25 #line 26 "drizzled/execute/scanner.cc"
27 #define YY_INT_ALIGNED short int
40 #define YY_FLEX_MAJOR_VERSION 2
41 #define YY_FLEX_MINOR_VERSION 5
42 #define YY_FLEX_SUBMINOR_VERSION 35
43 #if YY_FLEX_SUBMINOR_VERSION > 0
80 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
85 #ifndef __STDC_LIMIT_MACROS
86 #define __STDC_LIMIT_MACROS 1
90 typedef int8_t flex_int8_t;
91 typedef uint8_t flex_uint8_t;
92 typedef int16_t flex_int16_t;
93 typedef uint16_t flex_uint16_t;
94 typedef int32_t flex_int32_t;
95 typedef uint32_t flex_uint32_t;
97 typedef signed char flex_int8_t;
98 typedef short int flex_int16_t;
99 typedef int flex_int32_t;
100 typedef unsigned char flex_uint8_t;
101 typedef unsigned short int flex_uint16_t;
102 typedef unsigned int flex_uint32_t;
106 #define INT8_MIN (-128)
109 #define INT16_MIN (-32767-1)
112 #define INT32_MIN (-2147483647-1)
115 #define INT8_MAX (127)
118 #define INT16_MAX (32767)
121 #define INT32_MAX (2147483647)
124 #define UINT8_MAX (255U)
127 #define UINT16_MAX (65535U)
130 #define UINT32_MAX (4294967295U)
150 #if defined (__STDC__)
158 #define yyconst const
176 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
182 #ifndef YY_TYPEDEF_YY_SCANNER_T
183 #define YY_TYPEDEF_YY_SCANNER_T
184 typedef void* yyscan_t;
189 #define yyin yyg->yyin_r
190 #define yyout yyg->yyout_r
191 #define yyextra yyg->yyextra_r
192 #define yyleng yyg->yyleng_r
193 #define yytext yyg->yytext_r
194 #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
195 #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
196 #define yy_flex_debug yyg->yy_flex_debug_r
207 #define BEGIN yyg->yy_start = 1 + 2 *
213 #define YY_START ((yyg->yy_start - 1) / 2)
214 #define YYSTATE YY_START
217 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
220 #define YY_NEW_FILE execute_restart(yyin ,yyscanner )
222 #define YY_END_OF_BUFFER_CHAR 0
231 #define YY_BUF_SIZE 32768
233 #define YY_BUF_SIZE 16384
239 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
241 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
242 #define YY_TYPEDEF_YY_BUFFER_STATE
254 #define EOB_ACT_CONTINUE_SCAN 0
255 #define EOB_ACT_END_OF_FILE 1
256 #define EOB_ACT_LAST_MATCH 2
258 #define YY_LESS_LINENO(n)
265 int yyless_macro_arg = (n); \
266 YY_LESS_LINENO(yyless_macro_arg);\
267 *yy_cp = yyg->yy_hold_char; \
268 YY_RESTORE_YY_MORE_OFFSET \
269 yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
270 YY_DO_BEFORE_ACTION; \
274 #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
276 #ifndef YY_TYPEDEF_YY_SIZE_T
277 #define YY_TYPEDEF_YY_SIZE_T
278 typedef size_t yy_size_t;
281 #ifndef YY_STRUCT_YY_BUFFER_STATE
282 #define YY_STRUCT_YY_BUFFER_STATE
298 yy_size_t yy_buf_size;
309 int yy_is_our_buffer;
316 int yy_is_interactive;
332 int yy_buffer_status;
334 #define YY_BUFFER_NEW 0
335 #define YY_BUFFER_NORMAL 1
346 #define YY_BUFFER_EOF_PENDING 2
366 #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
367 ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
373 #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
384 void execute_restart (FILE *input_file ,yyscan_t yyscanner );
385 void execute__switch_to_buffer (
YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
386 YY_BUFFER_STATE execute__create_buffer (FILE *file,
int size ,yyscan_t yyscanner );
389 void execute_push_buffer_state (
YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
390 void execute_pop_buffer_state (yyscan_t yyscanner );
392 static void execute_ensure_buffer_stack (yyscan_t yyscanner );
393 static void execute__load_buffer_state (yyscan_t yyscanner );
394 static void execute__init_buffer (
YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
396 #define YY_FLUSH_BUFFER execute__flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
398 YY_BUFFER_STATE execute__scan_buffer (
char *base,yy_size_t size ,yyscan_t yyscanner );
399 YY_BUFFER_STATE execute__scan_string (yyconst
char *yy_str ,yyscan_t yyscanner );
400 YY_BUFFER_STATE execute__scan_bytes (yyconst
char *bytes,
int len ,yyscan_t yyscanner );
404 void *execute_alloc (yy_size_t ,yyscan_t yyscanner );
405 void *execute_realloc (
void *,yy_size_t ,yyscan_t yyscanner );
406 void execute_free (
void * ,yyscan_t yyscanner );
408 #define yy_new_buffer execute__create_buffer
410 #define yy_set_interactive(is_interactive) \
412 if ( ! YY_CURRENT_BUFFER ){ \
413 execute_ensure_buffer_stack (yyscanner); \
414 YY_CURRENT_BUFFER_LVALUE = \
415 execute__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
417 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
420 #define yy_set_bol(at_bol) \
422 if ( ! YY_CURRENT_BUFFER ){\
423 execute_ensure_buffer_stack (yyscanner); \
424 YY_CURRENT_BUFFER_LVALUE = \
425 execute__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
427 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
430 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
435 #define execute_wrap(n) 1
436 #define YY_SKIP_YYWRAP
440 typedef unsigned char YY_CHAR;
442 typedef int yy_state_type;
444 #define yytext_ptr yytext_r
448 static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
449 static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner);
450 static int yy_get_next_buffer (yyscan_t yyscanner );
451 static void yy_fatal_error (yyconst
char msg[] ,yyscan_t yyscanner );
458 #define YY_DO_BEFORE_ACTION \
459 yyg->yytext_ptr = yy_bp; \
461 yyleng = (size_t) (yy_cp - yy_bp); \
462 yyg->yy_hold_char = *yy_cp; \
465 yyg->yy_c_buf_p = yy_cp;
468 #define YY_NUM_RULES 5
469 #define YY_END_OF_BUFFER 6
474 flex_int32_t yy_verify;
477 static yyconst flex_int16_t yy_accept[46] =
479 3, 3, 6, 3, 2, 2, 3, 3, 3, 3,
480 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
481 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
482 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
486 static yyconst flex_int32_t yy_ec[256] =
488 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
489 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
490 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
491 1, 2, 4, 5, 4, 4, 4, 4, 4, 4,
492 4, 4, 4, 4, 5, 5, 4, 6, 7, 7,
493 7, 7, 7, 7, 7, 7, 7, 4, 4, 4,
494 4, 4, 4, 4, 8, 1, 1, 1, 1, 9,
495 1, 1, 1, 1, 1, 8, 8, 8, 1, 1,
496 1, 1, 1, 1, 8, 1, 1, 9, 1, 1,
497 4, 4, 4, 4, 5, 4, 8, 1, 1, 1,
499 1, 9, 1, 1, 1, 1, 1, 8, 8, 8,
500 1, 1, 1, 1, 1, 1, 8, 1, 1, 9,
501 1, 1, 5, 4, 5, 4, 1, 10, 10, 10,
502 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
503 10, 10, 10, 11, 11, 11, 11, 11, 11, 11,
504 11, 11, 11, 11, 11, 11, 11, 11, 11, 12,
505 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
506 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
507 12, 12, 12, 12, 12, 12, 13, 12, 12, 12,
508 14, 1, 1, 15, 15, 15, 15, 15, 15, 15,
510 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
511 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
512 15, 15, 15, 16, 17, 17, 17, 17, 17, 17,
513 17, 17, 17, 17, 17, 17, 18, 19, 20, 1,
514 21, 21, 21, 22, 1, 1, 1, 1, 1, 1,
518 static yyconst flex_int32_t yy_meta[23] =
520 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
521 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
525 static yyconst flex_int16_t yy_base[46] =
527 0, 0, 114, 22, 0, 34, 0, 0, 38, 0,
528 0, 42, 47, 50, 55, 60, 62, 100, 67, 102,
529 0, 71, 0, 75, 0, 0, 78, 0, 83, 0,
530 0, 101, 85, 0, 0, 0, 0, 96, 90, 95,
534 static yyconst flex_int16_t yy_def[46] =
536 45, 1, 45, 45, 4, 4, 4, 4, 4, 4,
537 4, 4, 4, 4, 4, 4, 4, 17, 17, 4,
538 4, 4, 4, 4, 4, 13, 4, 15, 4, 17,
539 19, 4, 4, 13, 13, 13, 13, 13, 13, 13,
543 static yyconst flex_int16_t yy_nxt[138] =
545 4, 5, 6, 7, 8, 9, 10, 11, 12, 4,
546 4, 4, 4, 4, 13, 14, 15, 16, 17, 18,
547 19, 20, 21, 21, 22, 21, 23, 24, 25, 23,
548 22, 21, 21, 21, 21, 21, 26, 27, 28, 29,
549 30, 30, 31, 32, 33, 33, 33, 33, 33, 33,
550 33, 33, 33, 33, 33, 33, 25, 25, 25, 25,
551 25, 34, 34, 34, 35, 35, 35, 35, 35, 36,
552 36, 37, 37, 37, 37, 37, 39, 39, 39, 39,
553 39, 33, 33, 33, 33, 33, 33, 33, 33, 34,
554 34, 34, 36, 36, 41, 41, 41, 41, 41, 43,
556 43, 43, 43, 43, 44, 44, 44, 44, 44, 42,
557 40, 40, 38, 45, 3, 45, 45, 45, 45, 45,
558 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
559 45, 45, 45, 45, 45, 45, 45
562 static yyconst flex_int16_t yy_chk[138] =
564 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
565 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
566 1, 1, 4, 4, 4, 4, 4, 4, 4, 4,
567 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
568 4, 4, 4, 4, 6, 6, 6, 6, 9, 9,
569 9, 9, 12, 12, 12, 12, 13, 13, 13, 13,
570 13, 14, 14, 14, 15, 15, 15, 15, 15, 16,
571 16, 17, 17, 17, 17, 17, 19, 19, 19, 19,
572 19, 22, 22, 22, 22, 24, 24, 24, 24, 27,
573 27, 27, 29, 29, 33, 33, 33, 33, 33, 39,
575 39, 39, 39, 39, 40, 40, 40, 40, 40, 38,
576 32, 20, 18, 3, 45, 45, 45, 45, 45, 45,
577 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
578 45, 45, 45, 45, 45, 45, 45
581 static yyconst flex_int16_t yy_rule_linenum[5] =
589 #define REJECT reject_used_but_not_detected
590 #define yymore() yymore_used_but_not_detected
591 #define YY_MORE_ADJ 0
592 #define YY_RESTORE_YY_MORE_OFFSET
593 #line 1 "drizzled/execute/scanner.l"
633 #line 64 "drizzled/execute/scanner.l"
638 #define PARAM execute_get_extra(yyscanner)
640 #define get_lex_chars(buffer, result, max_size, context) \
642 if (context->pos >= context->length) \
648 result= (int)(context->length - context->pos); \
649 (size_t)result > (size_t)max_size ? result= max_size : 0; \
650 memcpy(buffer, context->buf + context->pos, result); \
651 context->pos += result; \
656 #define YY_INPUT(buffer, result, max_size) get_lex_chars(buffer, result, max_size, PARAM)
658 #define YY_NO_UNISTD_H 1
659 #line 660 "drizzled/execute/scanner.cc"
663 #ifndef YY_NO_UNISTD_H
675 #ifndef YY_EXTRA_TYPE
676 #define YY_EXTRA_TYPE void *
687 YY_EXTRA_TYPE yyextra_r;
690 FILE *yyin_r, *yyout_r;
700 int yy_did_buffer_switch_on_eof;
701 int yy_start_stack_ptr;
702 int yy_start_stack_depth;
704 yy_state_type yy_last_accepting_state;
705 char* yy_last_accepting_cpos;
720 static int yy_init_globals (yyscan_t yyscanner );
728 # define yylval yyg->yylval_r
730 int execute_lex_init (yyscan_t* scanner);
732 int execute_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
741 int execute_lex_destroy (yyscan_t yyscanner );
743 int execute_get_debug (yyscan_t yyscanner );
745 void execute_set_debug (
int debug_flag ,yyscan_t yyscanner );
747 YY_EXTRA_TYPE execute_get_extra (yyscan_t yyscanner );
749 void execute_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
751 FILE *execute_get_in (yyscan_t yyscanner );
753 void execute_set_in (FILE * in_str ,yyscan_t yyscanner );
755 FILE *execute_get_out (yyscan_t yyscanner );
757 void execute_set_out (FILE * out_str ,yyscan_t yyscanner );
759 int execute_get_leng (yyscan_t yyscanner );
761 char *execute_get_text (yyscan_t yyscanner );
763 int execute_get_lineno (yyscan_t yyscanner );
765 void execute_set_lineno (
int line_number ,yyscan_t yyscanner );
769 YYSTYPE * execute_get_lval (yyscan_t yyscanner );
771 void execute_set_lval (
YYSTYPE * yylval_param ,yyscan_t yyscanner );
779 #ifndef YY_SKIP_YYWRAP
781 extern "C" int execute_wrap (yyscan_t yyscanner );
783 extern int execute_wrap (yyscan_t yyscanner );
794 static void yy_flex_strncpy (
char *,yyconst
char *,
int ,yyscan_t yyscanner);
797 #ifdef YY_NEED_STRLEN
798 static int yy_flex_strlen (yyconst
char * ,yyscan_t yyscanner);
806 static int yyinput (yyscan_t yyscanner );
808 static int input (yyscan_t yyscanner );
820 #ifndef YY_READ_BUF_SIZE
823 #define YY_READ_BUF_SIZE 16384
825 #define YY_READ_BUF_SIZE 8192
835 #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
845 #define YY_INPUT(buf,result,max_size) \
847 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
851 for ( n = 0; n < max_size && \
852 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
855 buf[n++] = (char) c; \
856 if ( c == EOF && ferror( yyin ) ) \
857 YY_FATAL_ERROR( "input in flex scanner failed" ); \
863 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
865 if( errno != EINTR) \
867 YY_FATAL_ERROR( "input in flex scanner failed" ); \
885 #define yyterminate() return YY_NULL
889 #ifndef YY_START_STACK_INCR
890 #define YY_START_STACK_INCR 25
894 #ifndef YY_FATAL_ERROR
896 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
919 #define YY_DECL_IS_OURS 1
922 extern int execute_lex \
923 (
YYSTYPE * yylval_param ,yyscan_t yyscanner);
925 #define YY_DECL int execute_lex \
926 (YYSTYPE * yylval_param , yyscan_t yyscanner)
935 #ifndef YY_USER_ACTION
936 #define YY_USER_ACTION
941 #define YY_BREAK break;
945 #define YY_RULE_SETUP \
954 register yy_state_type yy_current_state;
955 register char *yy_cp, *yy_bp;
960 #line 121 "drizzled/execute/scanner.l"
963 #line 964 "drizzled/execute/scanner.cc"
965 yylval = yylval_param;
975 if ( ! yyg->yy_start )
992 if ( ! YY_CURRENT_BUFFER ) {
993 execute_ensure_buffer_stack (yyscanner);
994 YY_CURRENT_BUFFER_LVALUE =
995 execute__create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
998 execute__load_buffer_state(yyscanner );
1004 yy_cp = yyg->yy_c_buf_p;
1007 *yy_cp = yyg->yy_hold_char;
1015 yy_current_state = yyg->yy_start;
1019 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1020 if ( yy_accept[yy_current_state] )
1022 yyg->yy_last_accepting_state = yy_current_state;
1023 yyg->yy_last_accepting_cpos = yy_cp;
1025 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1027 yy_current_state = (int) yy_def[yy_current_state];
1028 if ( yy_current_state >= 46 )
1029 yy_c = yy_meta[(
unsigned int) yy_c];
1031 yy_current_state = yy_nxt[yy_base[yy_current_state] + (
unsigned int) yy_c];
1034 while ( yy_current_state != 45 );
1035 yy_cp = yyg->yy_last_accepting_cpos;
1036 yy_current_state = yyg->yy_last_accepting_state;
1040 yy_act = yy_accept[yy_current_state];
1042 YY_DO_BEFORE_ACTION;
1049 if ( yy_flex_debug )
1052 fprintf( stderr,
"--scanner backing up\n" );
1053 else if ( yy_act < 5 )
1054 fprintf( stderr,
"--accepting rule at line %ld (\"%s\")\n",
1055 (
long)yy_rule_linenum[yy_act], yytext );
1056 else if ( yy_act == 5 )
1057 fprintf( stderr,
"--accepting default rule (\"%s\")\n",
1059 else if ( yy_act == 6 )
1060 fprintf( stderr,
"--(end of buffer or a NUL)\n" );
1062 fprintf( stderr,
"--EOF (start condition %d)\n", YY_START );
1070 *yy_cp = yyg->yy_hold_char;
1071 yy_cp = yyg->yy_last_accepting_cpos;
1072 yy_current_state = yyg->yy_last_accepting_state;
1073 goto yy_find_action;
1077 #line 123 "drizzled/execute/scanner.l"
1083 #line 125 "drizzled/execute/scanner.l"
1089 #line 128 "drizzled/execute/scanner.l"
1091 yylval->string.assign(yytext, yyleng);
1097 #line 133 "drizzled/execute/scanner.l"
1099 yyextra->begin= yytext;
1105 #line 138 "drizzled/execute/scanner.l"
1108 #line 1109 "drizzled/execute/scanner.cc"
1109 case YY_STATE_EOF(INITIAL):
1112 case YY_END_OF_BUFFER:
1115 int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
1118 *yy_cp = yyg->yy_hold_char;
1119 YY_RESTORE_YY_MORE_OFFSET
1121 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1132 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1133 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1134 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1144 if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1146 yy_state_type yy_next_state;
1148 yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
1150 yy_current_state = yy_get_previous_state( yyscanner );
1161 yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
1163 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1165 if ( yy_next_state )
1168 yy_cp = ++yyg->yy_c_buf_p;
1169 yy_current_state = yy_next_state;
1176 yy_cp = yyg->yy_last_accepting_cpos;
1177 yy_current_state = yyg->yy_last_accepting_state;
1178 goto yy_find_action;
1182 else switch ( yy_get_next_buffer( yyscanner ) )
1184 case EOB_ACT_END_OF_FILE:
1186 yyg->yy_did_buffer_switch_on_eof = 0;
1188 if ( execute_wrap(yyscanner ) )
1199 yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
1201 yy_act = YY_STATE_EOF(YY_START);
1207 if ( ! yyg->yy_did_buffer_switch_on_eof )
1213 case EOB_ACT_CONTINUE_SCAN:
1215 yyg->yytext_ptr + yy_amount_of_matched_text;
1217 yy_current_state = yy_get_previous_state( yyscanner );
1219 yy_cp = yyg->yy_c_buf_p;
1220 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1223 case EOB_ACT_LAST_MATCH:
1225 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
1227 yy_current_state = yy_get_previous_state( yyscanner );
1229 yy_cp = yyg->yy_c_buf_p;
1230 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1231 goto yy_find_action;
1238 "fatal flex scanner internal error--no action found" );
1259 static int yy_get_next_buffer (yyscan_t yyscanner)
1265 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1266 register char *source = yyg->yytext_ptr;
1267 register int number_to_move, i;
1270 if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
1272 "fatal flex scanner internal error--end of buffer missed" );
1274 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1276 if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
1281 return EOB_ACT_END_OF_FILE;
1289 return EOB_ACT_LAST_MATCH;
1296 number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
1298 for ( i = 0; i < number_to_move; ++i )
1299 *(dest++) = *(source++);
1301 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1305 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
1310 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1312 while ( num_to_read <= 0 )
1318 int yy_c_buf_p_offset =
1319 (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
1321 if ( b->yy_is_our_buffer )
1323 int new_size = b->yy_buf_size * 2;
1325 if ( new_size <= 0 )
1326 b->yy_buf_size += b->yy_buf_size / 8;
1328 b->yy_buf_size *= 2;
1330 b->yy_ch_buf = (
char *)
1332 execute_realloc((
void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
1338 if ( ! b->yy_ch_buf )
1340 "fatal error - scanner input buffer overflow" );
1342 yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1344 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1349 if ( num_to_read > YY_READ_BUF_SIZE )
1350 num_to_read = YY_READ_BUF_SIZE;
1353 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1354 yyg->yy_n_chars, (
size_t) num_to_read );
1356 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1359 if ( yyg->yy_n_chars == 0 )
1361 if ( number_to_move == YY_MORE_ADJ )
1363 ret_val = EOB_ACT_END_OF_FILE;
1364 execute_restart(yyin ,yyscanner);
1369 ret_val = EOB_ACT_LAST_MATCH;
1370 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1371 YY_BUFFER_EOF_PENDING;
1376 ret_val = EOB_ACT_CONTINUE_SCAN;
1378 if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1380 yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
1381 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (
char *) execute_realloc((
void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
1382 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1383 YY_FATAL_ERROR(
"out of dynamic memory in yy_get_next_buffer()" );
1386 yyg->yy_n_chars += number_to_move;
1387 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1388 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1390 yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1400 static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
1405 register yy_state_type yy_current_state;
1406 register char *yy_cp;
1410 yy_current_state = yyg->yy_start;
1412 for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
1415 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1416 if ( yy_accept[yy_current_state] )
1418 yyg->yy_last_accepting_state = yy_current_state;
1419 yyg->yy_last_accepting_cpos = yy_cp;
1421 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1423 yy_current_state = (int) yy_def[yy_current_state];
1424 if ( yy_current_state >= 46 )
1425 yy_c = yy_meta[(
unsigned int) yy_c];
1427 yy_current_state = yy_nxt[yy_base[yy_current_state] + (
unsigned int) yy_c];
1430 return yy_current_state;
1439 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
1444 register int yy_is_jam;
1447 register char *yy_cp = yyg->yy_c_buf_p;
1449 register YY_CHAR yy_c = 1;
1450 if ( yy_accept[yy_current_state] )
1452 yyg->yy_last_accepting_state = yy_current_state;
1453 yyg->yy_last_accepting_cpos = yy_cp;
1455 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1457 yy_current_state = (int) yy_def[yy_current_state];
1458 if ( yy_current_state >= 46 )
1459 yy_c = yy_meta[(
unsigned int) yy_c];
1461 yy_current_state = yy_nxt[yy_base[yy_current_state] + (
unsigned int) yy_c];
1462 yy_is_jam = (yy_current_state == 45);
1464 return yy_is_jam ? 0 : yy_current_state;
1474 static int yyinput (yyscan_t yyscanner)
1476 static int input (yyscan_t yyscanner)
1486 *yyg->yy_c_buf_p = yyg->yy_hold_char;
1488 if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1494 if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1496 *yyg->yy_c_buf_p =
'\0';
1500 int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
1503 switch ( yy_get_next_buffer( yyscanner ) )
1505 case EOB_ACT_LAST_MATCH:
1517 execute_restart(yyin ,yyscanner);
1521 case EOB_ACT_END_OF_FILE:
1523 if ( execute_wrap(yyscanner ) )
1526 if ( ! yyg->yy_did_buffer_switch_on_eof )
1529 return yyinput(yyscanner);
1531 return input(yyscanner);
1535 case EOB_ACT_CONTINUE_SCAN:
1536 yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
1542 c = *(
unsigned char *) yyg->yy_c_buf_p;
1543 *yyg->yy_c_buf_p =
'\0';
1544 yyg->yy_hold_char = *++yyg->yy_c_buf_p;
1560 void execute_restart (FILE * input_file , yyscan_t yyscanner)
1567 if ( ! YY_CURRENT_BUFFER ){
1568 execute_ensure_buffer_stack (yyscanner);
1569 YY_CURRENT_BUFFER_LVALUE =
1570 execute__create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
1573 execute__init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
1574 execute__load_buffer_state(yyscanner );
1582 void execute__switch_to_buffer (
YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
1594 execute_ensure_buffer_stack (yyscanner);
1595 if ( YY_CURRENT_BUFFER == new_buffer )
1598 if ( YY_CURRENT_BUFFER )
1601 *yyg->yy_c_buf_p = yyg->yy_hold_char;
1602 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
1603 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1606 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1607 execute__load_buffer_state(yyscanner );
1614 yyg->yy_did_buffer_switch_on_eof = 1;
1618 static void execute__load_buffer_state (yyscan_t yyscanner)
1624 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1625 yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1626 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1627 yyg->yy_hold_char = *yyg->yy_c_buf_p;
1637 YY_BUFFER_STATE execute__create_buffer (FILE * file,
int size , yyscan_t yyscanner)
1646 YY_FATAL_ERROR(
"out of dynamic memory in execute__create_buffer()" );
1648 b->yy_buf_size = size;
1653 b->yy_ch_buf = (
char *) execute_alloc(b->yy_buf_size + 2 ,yyscanner );
1654 if ( ! b->yy_ch_buf )
1655 YY_FATAL_ERROR(
"out of dynamic memory in execute__create_buffer()" );
1657 b->yy_is_our_buffer = 1;
1659 execute__init_buffer(b,file ,yyscanner);
1679 if ( b == YY_CURRENT_BUFFER )
1682 if ( b->yy_is_our_buffer )
1683 execute_free((
void *) b->yy_ch_buf ,yyscanner );
1685 execute_free((
void *) b ,yyscanner );
1700 static void execute__init_buffer (
YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
1709 execute__flush_buffer(b ,yyscanner);
1711 b->yy_input_file = file;
1712 b->yy_fill_buffer = 1;
1718 if (b != YY_CURRENT_BUFFER){
1725 b->yy_is_interactive = 0;
1753 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1754 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1756 b->yy_buf_pos = &b->yy_ch_buf[0];
1759 b->yy_buffer_status = YY_BUFFER_NEW;
1761 if ( b == YY_CURRENT_BUFFER )
1762 execute__load_buffer_state(yyscanner );
1773 void execute_push_buffer_state (
YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
1779 if (new_buffer == NULL)
1782 execute_ensure_buffer_stack(yyscanner);
1785 if ( YY_CURRENT_BUFFER )
1788 *yyg->yy_c_buf_p = yyg->yy_hold_char;
1789 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
1790 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1794 if (YY_CURRENT_BUFFER)
1796 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1799 execute__load_buffer_state(yyscanner );
1800 yyg->yy_did_buffer_switch_on_eof = 1;
1810 void execute_pop_buffer_state (yyscan_t yyscanner)
1816 if (!YY_CURRENT_BUFFER)
1819 execute__delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
1820 YY_CURRENT_BUFFER_LVALUE = NULL;
1824 if (YY_CURRENT_BUFFER) {
1825 execute__load_buffer_state(yyscanner );
1826 yyg->yy_did_buffer_switch_on_eof = 1;
1836 static void execute_ensure_buffer_stack (yyscan_t yyscanner)
1855 YY_FATAL_ERROR(
"out of dynamic memory in execute_ensure_buffer_stack()" );
1875 YY_FATAL_ERROR(
"out of dynamic memory in execute_ensure_buffer_stack()" );
1891 YY_BUFFER_STATE execute__scan_buffer (
char * base, yy_size_t size , yyscan_t yyscanner)
1896 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1897 base[size-1] != YY_END_OF_BUFFER_CHAR )
1903 YY_FATAL_ERROR(
"out of dynamic memory in execute__scan_buffer()" );
1905 b->yy_buf_size = size - 2;
1906 b->yy_buf_pos = b->yy_ch_buf = base;
1907 b->yy_is_our_buffer = 0;
1908 b->yy_input_file = 0;
1909 b->yy_n_chars = b->yy_buf_size;
1910 b->yy_is_interactive = 0;
1912 b->yy_fill_buffer = 0;
1913 b->yy_buffer_status = YY_BUFFER_NEW;
1915 execute__switch_to_buffer(b ,yyscanner );
1930 YY_BUFFER_STATE execute__scan_string (yyconst
char * yystr , yyscan_t yyscanner)
1933 return execute__scan_bytes(yystr,strlen(yystr) ,yyscanner);
1945 YY_BUFFER_STATE execute__scan_bytes (yyconst
char * yybytes,
int _yybytes_len , yyscan_t yyscanner)
1953 n = _yybytes_len + 2;
1954 buf = (
char *) execute_alloc(n ,yyscanner );
1956 YY_FATAL_ERROR(
"out of dynamic memory in execute__scan_bytes()" );
1958 for ( i = 0; i < _yybytes_len; ++i )
1959 buf[i] = yybytes[i];
1961 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1963 b = execute__scan_buffer(buf,n ,yyscanner);
1965 YY_FATAL_ERROR(
"bad buffer in execute__scan_bytes()" );
1970 b->yy_is_our_buffer = 1;
1976 #ifndef YY_EXIT_FAILURE
1977 #define YY_EXIT_FAILURE 2
1981 static void yy_fatal_error (yyconst
char* msg , yyscan_t yyscanner)
1983 (void) fprintf( stderr,
"%s\n", msg );
1984 exit( YY_EXIT_FAILURE );
1997 int yyless_macro_arg = (n); \
1998 YY_LESS_LINENO(yyless_macro_arg);\
1999 yytext[yyleng] = yyg->yy_hold_char; \
2000 yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
2001 yyg->yy_hold_char = *yyg->yy_c_buf_p; \
2002 *yyg->yy_c_buf_p = '\0'; \
2003 yyleng = yyless_macro_arg; \
2015 YY_EXTRA_TYPE execute_get_extra (yyscan_t yyscanner)
2026 int execute_get_lineno (yyscan_t yyscanner)
2030 if (! YY_CURRENT_BUFFER)
2039 int execute_get_column (yyscan_t yyscanner)
2043 if (! YY_CURRENT_BUFFER)
2052 FILE *execute_get_in (yyscan_t yyscanner)
2061 FILE *execute_get_out (yyscan_t yyscanner)
2070 int execute_get_leng (yyscan_t yyscanner)
2080 char *execute_get_text (yyscan_t yyscanner)
2092 void execute_set_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
2095 yyextra = user_defined ;
2104 void execute_set_lineno (
int line_number , yyscan_t yyscanner)
2109 if (! YY_CURRENT_BUFFER )
2110 yy_fatal_error(
"execute_set_lineno called with no buffer" , yyscanner);
2112 yylineno = line_number;
2119 void execute_set_column (
int column_no , yyscan_t yyscanner)
2124 if (! YY_CURRENT_BUFFER )
2125 yy_fatal_error(
"execute_set_column called with no buffer" , yyscanner);
2127 yycolumn = column_no;
2136 void execute_set_in (FILE * in_str , yyscan_t yyscanner)
2142 void execute_set_out (FILE * out_str , yyscan_t yyscanner)
2148 int execute_get_debug (yyscan_t yyscanner)
2151 return yy_flex_debug;
2154 void execute_set_debug (
int bdebug , yyscan_t yyscanner)
2157 yy_flex_debug = bdebug ;
2167 YYSTYPE * execute_get_lval (yyscan_t yyscanner)
2173 void execute_set_lval (
YYSTYPE * yylval_param , yyscan_t yyscanner)
2176 yylval = yylval_param;
2188 int execute_lex_init(yyscan_t* ptr_yy_globals)
2191 if (ptr_yy_globals == NULL){
2196 *ptr_yy_globals = (yyscan_t) execute_alloc (
sizeof(
struct yyguts_t ), NULL );
2198 if (*ptr_yy_globals == NULL){
2204 memset(*ptr_yy_globals,0x00,
sizeof(
struct yyguts_t));
2206 return yy_init_globals ( *ptr_yy_globals );
2217 int execute_lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
2222 execute_set_extra (yy_user_defined, &dummy_yyguts);
2224 if (ptr_yy_globals == NULL){
2229 *ptr_yy_globals = (yyscan_t) execute_alloc (
sizeof(
struct yyguts_t ), &dummy_yyguts );
2231 if (*ptr_yy_globals == NULL){
2238 memset(*ptr_yy_globals,0x00,
sizeof(
struct yyguts_t));
2240 execute_set_extra (yy_user_defined, *ptr_yy_globals);
2242 return yy_init_globals ( *ptr_yy_globals );
2248 static int yy_init_globals (yyscan_t yyscanner)
2258 yyg->yy_c_buf_p = (
char *) 0;
2262 yyg->yy_start_stack_ptr = 0;
2263 yyg->yy_start_stack_depth = 0;
2264 yyg->yy_start_stack = NULL;
2284 int execute_lex_destroy (yyscan_t yyscanner)
2289 while(YY_CURRENT_BUFFER){
2290 execute__delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
2291 YY_CURRENT_BUFFER_LVALUE = NULL;
2292 execute_pop_buffer_state(yyscanner);
2300 execute_free(yyg->yy_start_stack ,yyscanner );
2301 yyg->yy_start_stack = NULL;
2305 yy_init_globals( yyscanner);
2309 execute_free ( yyscanner , yyscanner );
2321 static void yy_flex_strncpy (
char* s1, yyconst
char * s2,
int n , yyscan_t yyscanner)
2324 for ( i = 0; i < n; ++i )
2329 #ifdef YY_NEED_STRLEN
2330 static int yy_flex_strlen (yyconst
char * s , yyscan_t yyscanner)
2333 for ( n = 0; s[n]; ++n )
2340 void *execute_alloc (yy_size_t size , yyscan_t yyscanner)
2342 return (
void *) malloc( size );
2345 void *execute_realloc (
void * ptr, yy_size_t size , yyscan_t yyscanner)
2354 return (
void *) realloc( (
char *) ptr, size );
2357 void execute_free (
void * ptr , yyscan_t yyscanner)
2359 free( (
char *) ptr );
2364 #define YYTABLES_NAME "yytables"
2369 #line 138 "drizzled/execute/scanner.l"
2372 namespace drizzled {
2375 void Context::init_scanner()
2377 execute_lex_init(&scanner);
2378 execute_set_extra(
this,scanner);
2381 void Context::destroy_scanner()
2383 execute_lex_destroy(scanner);