00001 #line 2 "drizzled/execute/scanner.cc"
00002 #line 41 "drizzled/execute/scanner.l"
00003
00004 #include <config.h>
00005 #include <drizzled/execute/parser.h>
00006 #include <drizzled/execute/context.h>
00007 #include <drizzled/execute/symbol.h>
00008 #include <drizzled/lex_string.h>
00009
00010 using namespace drizzled;
00011
00012 #ifndef __INTEL_COMPILER
00013 #pragma GCC diagnostic ignored "-Wold-style-cast"
00014 #pragma GCC diagnostic ignored "-Wsign-compare"
00015 #pragma GCC diagnostic ignored "-Wunused-parameter"
00016 #pragma GCC diagnostic ignored "-Wmissing-declarations"
00017 #endif
00018
00019 #define YY_EXTRA_TYPE ::drizzled::execute::Context*
00020
00021
00022
00023
00024 #line 25 "drizzled/execute/scanner.cc"
00025
00026 #define YY_INT_ALIGNED short int
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 #define FLEX_SCANNER
00039 #define YY_FLEX_MAJOR_VERSION 2
00040 #define YY_FLEX_MINOR_VERSION 5
00041 #define YY_FLEX_SUBMINOR_VERSION 35
00042 #if YY_FLEX_SUBMINOR_VERSION > 0
00043 #define FLEX_BETA
00044 #endif
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061 #include <stdio.h>
00062 #include <string.h>
00063 #include <errno.h>
00064 #include <stdlib.h>
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074 #ifndef FLEXINT_H
00075 #define FLEXINT_H
00076
00077
00078
00079 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
00080
00081
00082
00083
00084 #ifndef __STDC_LIMIT_MACROS
00085 #define __STDC_LIMIT_MACROS 1
00086 #endif
00087
00088 #include <inttypes.h>
00089 typedef int8_t flex_int8_t;
00090 typedef uint8_t flex_uint8_t;
00091 typedef int16_t flex_int16_t;
00092 typedef uint16_t flex_uint16_t;
00093 typedef int32_t flex_int32_t;
00094 typedef uint32_t flex_uint32_t;
00095 #else
00096 typedef signed char flex_int8_t;
00097 typedef short int flex_int16_t;
00098 typedef int flex_int32_t;
00099 typedef unsigned char flex_uint8_t;
00100 typedef unsigned short int flex_uint16_t;
00101 typedef unsigned int flex_uint32_t;
00102
00103
00104 #ifndef INT8_MIN
00105 #define INT8_MIN (-128)
00106 #endif
00107 #ifndef INT16_MIN
00108 #define INT16_MIN (-32767-1)
00109 #endif
00110 #ifndef INT32_MIN
00111 #define INT32_MIN (-2147483647-1)
00112 #endif
00113 #ifndef INT8_MAX
00114 #define INT8_MAX (127)
00115 #endif
00116 #ifndef INT16_MAX
00117 #define INT16_MAX (32767)
00118 #endif
00119 #ifndef INT32_MAX
00120 #define INT32_MAX (2147483647)
00121 #endif
00122 #ifndef UINT8_MAX
00123 #define UINT8_MAX (255U)
00124 #endif
00125 #ifndef UINT16_MAX
00126 #define UINT16_MAX (65535U)
00127 #endif
00128 #ifndef UINT32_MAX
00129 #define UINT32_MAX (4294967295U)
00130 #endif
00131
00132 #endif
00133
00134 #endif
00135
00136
00137
00138
00139
00140
00141 #ifdef __cplusplus
00142
00143
00144 #define YY_USE_CONST
00145
00146 #else
00147
00148
00149 #if defined (__STDC__)
00150
00151 #define YY_USE_CONST
00152
00153 #endif
00154 #endif
00155
00156 #ifdef YY_USE_CONST
00157 #define yyconst const
00158 #else
00159 #define yyconst
00160 #endif
00161
00162
00163
00164
00165 #define YY_NULL 0
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
00176
00177
00178
00179
00180
00181 #ifndef YY_TYPEDEF_YY_SCANNER_T
00182 #define YY_TYPEDEF_YY_SCANNER_T
00183 typedef void* yyscan_t;
00184 #endif
00185
00186
00187
00188 #define yyin yyg->yyin_r
00189 #define yyout yyg->yyout_r
00190 #define yyextra yyg->yyextra_r
00191 #define yyleng yyg->yyleng_r
00192 #define yytext yyg->yytext_r
00193 #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
00194 #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
00195 #define yy_flex_debug yyg->yy_flex_debug_r
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206 #define BEGIN yyg->yy_start = 1 + 2 *
00207
00208
00209
00210
00211
00212 #define YY_START ((yyg->yy_start - 1) / 2)
00213 #define YYSTATE YY_START
00214
00215
00216 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
00217
00218
00219 #define YY_NEW_FILE execute_restart(yyin ,yyscanner )
00220
00221 #define YY_END_OF_BUFFER_CHAR 0
00222
00223
00224 #ifndef YY_BUF_SIZE
00225 #ifdef __ia64__
00226
00227
00228
00229
00230 #define YY_BUF_SIZE 32768
00231 #else
00232 #define YY_BUF_SIZE 16384
00233 #endif
00234 #endif
00235
00236
00237
00238 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
00239
00240 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
00241 #define YY_TYPEDEF_YY_BUFFER_STATE
00242 typedef struct yy_buffer_state *YY_BUFFER_STATE;
00243 #endif
00244
00245
00246
00247
00248
00249
00250
00251
00252
00253 #define EOB_ACT_CONTINUE_SCAN 0
00254 #define EOB_ACT_END_OF_FILE 1
00255 #define EOB_ACT_LAST_MATCH 2
00256
00257 #define YY_LESS_LINENO(n)
00258
00259
00260 #define yyless(n) \
00261 do \
00262 { \
00263 \
00264 int yyless_macro_arg = (n); \
00265 YY_LESS_LINENO(yyless_macro_arg);\
00266 *yy_cp = yyg->yy_hold_char; \
00267 YY_RESTORE_YY_MORE_OFFSET \
00268 yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
00269 YY_DO_BEFORE_ACTION; \
00270 } \
00271 while ( 0 )
00272
00273 #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
00274
00275 #ifndef YY_TYPEDEF_YY_SIZE_T
00276 #define YY_TYPEDEF_YY_SIZE_T
00277 typedef size_t yy_size_t;
00278 #endif
00279
00280 #ifndef YY_STRUCT_YY_BUFFER_STATE
00281 #define YY_STRUCT_YY_BUFFER_STATE
00282 struct yy_buffer_state
00283 {
00284
00285 FILE *yy_input_file;
00286
00287
00288
00289
00290
00291 char *yy_ch_buf;
00292 char *yy_buf_pos;
00293
00294
00295
00296
00297 yy_size_t yy_buf_size;
00298
00299
00300
00301
00302 int yy_n_chars;
00303
00304
00305
00306
00307
00308 int yy_is_our_buffer;
00309
00310
00311
00312
00313
00314
00315 int yy_is_interactive;
00316
00317
00318
00319
00320
00321 int yy_at_bol;
00322
00323 int yy_bs_lineno;
00324 int yy_bs_column;
00326
00327
00328
00329 int yy_fill_buffer;
00330
00331 int yy_buffer_status;
00332
00333 #define YY_BUFFER_NEW 0
00334 #define YY_BUFFER_NORMAL 1
00335
00336
00337
00338
00339
00340
00341
00342
00343
00344
00345 #define YY_BUFFER_EOF_PENDING 2
00346
00347 };
00348 #endif
00349
00350
00351
00352
00353
00354
00355
00356
00357
00358
00359
00360
00361
00362
00363
00364
00365 #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
00366 ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
00367 : NULL)
00368
00369
00370
00371
00372 #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
00373
00374
00375
00376
00377
00378
00379
00380
00381
00382
00383 void execute_restart (FILE *input_file ,yyscan_t yyscanner );
00384 void execute__switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
00385 YY_BUFFER_STATE execute__create_buffer (FILE *file,int size ,yyscan_t yyscanner );
00386 void execute__delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
00387 void execute__flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
00388 void execute_push_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
00389 void execute_pop_buffer_state (yyscan_t yyscanner );
00390
00391 static void execute_ensure_buffer_stack (yyscan_t yyscanner );
00392 static void execute__load_buffer_state (yyscan_t yyscanner );
00393 static void execute__init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
00394
00395 #define YY_FLUSH_BUFFER execute__flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
00396
00397 YY_BUFFER_STATE execute__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
00398 YY_BUFFER_STATE execute__scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
00399 YY_BUFFER_STATE execute__scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
00400
00401
00402
00403 void *execute_alloc (yy_size_t ,yyscan_t yyscanner );
00404 void *execute_realloc (void *,yy_size_t ,yyscan_t yyscanner );
00405 void execute_free (void * ,yyscan_t yyscanner );
00406
00407 #define yy_new_buffer execute__create_buffer
00408
00409 #define yy_set_interactive(is_interactive) \
00410 { \
00411 if ( ! YY_CURRENT_BUFFER ){ \
00412 execute_ensure_buffer_stack (yyscanner); \
00413 YY_CURRENT_BUFFER_LVALUE = \
00414 execute__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
00415 } \
00416 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
00417 }
00418
00419 #define yy_set_bol(at_bol) \
00420 { \
00421 if ( ! YY_CURRENT_BUFFER ){\
00422 execute_ensure_buffer_stack (yyscanner); \
00423 YY_CURRENT_BUFFER_LVALUE = \
00424 execute__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
00425 } \
00426 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
00427 }
00428
00429 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
00430
00431
00432
00433
00434 #define execute_wrap(n) 1
00435 #define YY_SKIP_YYWRAP
00436
00437 #define FLEX_DEBUG
00438
00439 typedef unsigned char YY_CHAR;
00440
00441 typedef int yy_state_type;
00442
00443 #define yytext_ptr yytext_r
00444
00445
00446
00447 static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
00448 static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner);
00449 static int yy_get_next_buffer (yyscan_t yyscanner );
00450 static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
00451
00452
00453
00454
00455
00456
00457 #define YY_DO_BEFORE_ACTION \
00458 yyg->yytext_ptr = yy_bp; \
00459 \
00460 yyleng = (size_t) (yy_cp - yy_bp); \
00461 yyg->yy_hold_char = *yy_cp; \
00462 *yy_cp = '\0'; \
00463 \
00464 yyg->yy_c_buf_p = yy_cp;
00465
00466
00467 #define YY_NUM_RULES 5
00468 #define YY_END_OF_BUFFER 6
00469
00470
00471 struct yy_trans_info
00472 {
00473 flex_int32_t yy_verify;
00474 flex_int32_t yy_nxt;
00475 };
00476 static yyconst flex_int16_t yy_accept[46] =
00477 { 0,
00478 3, 3, 6, 3, 2, 2, 3, 3, 3, 3,
00479 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
00480 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
00481 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
00482 3, 1, 3, 3, 0
00483 } ;
00484
00485 static yyconst flex_int32_t yy_ec[256] =
00486 { 0,
00487 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
00488 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
00489 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00490 1, 2, 4, 5, 4, 4, 4, 4, 4, 4,
00491 4, 4, 4, 4, 5, 5, 4, 6, 7, 7,
00492 7, 7, 7, 7, 7, 7, 7, 4, 4, 4,
00493 4, 4, 4, 4, 8, 1, 1, 1, 1, 9,
00494 1, 1, 1, 1, 1, 8, 8, 8, 1, 1,
00495 1, 1, 1, 1, 8, 1, 1, 9, 1, 1,
00496 4, 4, 4, 4, 5, 4, 8, 1, 1, 1,
00497
00498 1, 9, 1, 1, 1, 1, 1, 8, 8, 8,
00499 1, 1, 1, 1, 1, 1, 8, 1, 1, 9,
00500 1, 1, 5, 4, 5, 4, 1, 10, 10, 10,
00501 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
00502 10, 10, 10, 11, 11, 11, 11, 11, 11, 11,
00503 11, 11, 11, 11, 11, 11, 11, 11, 11, 12,
00504 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
00505 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
00506 12, 12, 12, 12, 12, 12, 13, 12, 12, 12,
00507 14, 1, 1, 15, 15, 15, 15, 15, 15, 15,
00508
00509 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
00510 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
00511 15, 15, 15, 16, 17, 17, 17, 17, 17, 17,
00512 17, 17, 17, 17, 17, 17, 18, 19, 20, 1,
00513 21, 21, 21, 22, 1, 1, 1, 1, 1, 1,
00514 1, 1, 1, 1, 1
00515 } ;
00516
00517 static yyconst flex_int32_t yy_meta[23] =
00518 { 0,
00519 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00520 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00521 1, 1
00522 } ;
00523
00524 static yyconst flex_int16_t yy_base[46] =
00525 { 0,
00526 0, 0, 114, 22, 0, 34, 0, 0, 38, 0,
00527 0, 42, 47, 50, 55, 60, 62, 100, 67, 102,
00528 0, 71, 0, 75, 0, 0, 78, 0, 83, 0,
00529 0, 101, 85, 0, 0, 0, 0, 96, 90, 95,
00530 0, 0, 0, 0, 115
00531 } ;
00532
00533 static yyconst flex_int16_t yy_def[46] =
00534 { 0,
00535 45, 1, 45, 45, 4, 4, 4, 4, 4, 4,
00536 4, 4, 4, 4, 4, 4, 4, 17, 17, 4,
00537 4, 4, 4, 4, 4, 13, 4, 15, 4, 17,
00538 19, 4, 4, 13, 13, 13, 13, 13, 13, 13,
00539 13, 4, 13, 13, 0
00540 } ;
00541
00542 static yyconst flex_int16_t yy_nxt[138] =
00543 { 0,
00544 4, 5, 6, 7, 8, 9, 10, 11, 12, 4,
00545 4, 4, 4, 4, 13, 14, 15, 16, 17, 18,
00546 19, 20, 21, 21, 22, 21, 23, 24, 25, 23,
00547 22, 21, 21, 21, 21, 21, 26, 27, 28, 29,
00548 30, 30, 31, 32, 33, 33, 33, 33, 33, 33,
00549 33, 33, 33, 33, 33, 33, 25, 25, 25, 25,
00550 25, 34, 34, 34, 35, 35, 35, 35, 35, 36,
00551 36, 37, 37, 37, 37, 37, 39, 39, 39, 39,
00552 39, 33, 33, 33, 33, 33, 33, 33, 33, 34,
00553 34, 34, 36, 36, 41, 41, 41, 41, 41, 43,
00554
00555 43, 43, 43, 43, 44, 44, 44, 44, 44, 42,
00556 40, 40, 38, 45, 3, 45, 45, 45, 45, 45,
00557 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
00558 45, 45, 45, 45, 45, 45, 45
00559 } ;
00560
00561 static yyconst flex_int16_t yy_chk[138] =
00562 { 0,
00563 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00564 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00565 1, 1, 4, 4, 4, 4, 4, 4, 4, 4,
00566 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
00567 4, 4, 4, 4, 6, 6, 6, 6, 9, 9,
00568 9, 9, 12, 12, 12, 12, 13, 13, 13, 13,
00569 13, 14, 14, 14, 15, 15, 15, 15, 15, 16,
00570 16, 17, 17, 17, 17, 17, 19, 19, 19, 19,
00571 19, 22, 22, 22, 22, 24, 24, 24, 24, 27,
00572 27, 27, 29, 29, 33, 33, 33, 33, 33, 39,
00573
00574 39, 39, 39, 39, 40, 40, 40, 40, 40, 38,
00575 32, 20, 18, 3, 45, 45, 45, 45, 45, 45,
00576 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
00577 45, 45, 45, 45, 45, 45, 45
00578 } ;
00579
00580 static yyconst flex_int16_t yy_rule_linenum[5] =
00581 { 0,
00582 121, 123, 126, 131
00583 } ;
00584
00585
00586
00587
00588 #define REJECT reject_used_but_not_detected
00589 #define yymore() yymore_used_but_not_detected
00590 #define YY_MORE_ADJ 0
00591 #define YY_RESTORE_YY_MORE_OFFSET
00592 #line 1 "drizzled/execute/scanner.l"
00593
00594
00595
00596
00597
00598
00599
00600
00601
00602
00603
00604
00605
00606
00607
00608
00609
00610
00611
00612
00613
00614
00615
00616
00617
00618
00619
00620
00621
00622
00623
00624
00625
00626
00627
00628
00629
00630
00631
00632 #line 63 "drizzled/execute/scanner.l"
00633 #include <cstdio>
00634 #include <cstdlib>
00635 #include <cstring>
00636
00637 #define PARAM execute_get_extra(yyscanner)
00638
00639 #define get_lex_chars(buffer, result, max_size, context) \
00640 { \
00641 if (context->pos >= context->length) \
00642 { \
00643 result= YY_NULL; \
00644 } \
00645 else \
00646 { \
00647 result= (int)(context->length - context->pos); \
00648 (size_t)result > (size_t)max_size ? result= max_size : 0; \
00649 memcpy(buffer, context->buf + context->pos, result); \
00650 context->pos += result; \
00651 } \
00652 }
00653
00654
00655 #define YY_INPUT(buffer, result, max_size) get_lex_chars(buffer, result, max_size, PARAM)
00656
00657 #define YY_NO_UNISTD_H 1
00658 #line 659 "drizzled/execute/scanner.cc"
00659
00660 #define INITIAL 0
00661
00662 #ifndef YY_NO_UNISTD_H
00663
00664
00665
00666
00667
00668 #include <unistd.h>
00669
00670
00671
00672 #endif
00673
00674 #ifndef YY_EXTRA_TYPE
00675 #define YY_EXTRA_TYPE void *
00676 #endif
00677
00678
00679
00680
00681
00682 struct yyguts_t
00683 {
00684
00685
00686 YY_EXTRA_TYPE yyextra_r;
00687
00688
00689 FILE *yyin_r, *yyout_r;
00690 size_t yy_buffer_stack_top;
00691 size_t yy_buffer_stack_max;
00692 YY_BUFFER_STATE * yy_buffer_stack;
00693 char yy_hold_char;
00694 int yy_n_chars;
00695 int yyleng_r;
00696 char *yy_c_buf_p;
00697 int yy_init;
00698 int yy_start;
00699 int yy_did_buffer_switch_on_eof;
00700 int yy_start_stack_ptr;
00701 int yy_start_stack_depth;
00702 int *yy_start_stack;
00703 yy_state_type yy_last_accepting_state;
00704 char* yy_last_accepting_cpos;
00705
00706 int yylineno_r;
00707 int yy_flex_debug_r;
00708
00709 char *yytext_r;
00710 int yy_more_flag;
00711 int yy_more_len;
00712
00713 YYSTYPE * yylval_r;
00714
00715 };
00716
00717
00718
00719 static int yy_init_globals (yyscan_t yyscanner );
00720
00721
00722
00723
00724
00725
00726
00727 # define yylval yyg->yylval_r
00728
00729 int execute_lex_init (yyscan_t* scanner);
00730
00731 int execute_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
00732
00733
00734
00735
00736
00737
00738
00739
00740 int execute_lex_destroy (yyscan_t yyscanner );
00741
00742 int execute_get_debug (yyscan_t yyscanner );
00743
00744 void execute_set_debug (int debug_flag ,yyscan_t yyscanner );
00745
00746 YY_EXTRA_TYPE execute_get_extra (yyscan_t yyscanner );
00747
00748 void execute_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
00749
00750 FILE *execute_get_in (yyscan_t yyscanner );
00751
00752 void execute_set_in (FILE * in_str ,yyscan_t yyscanner );
00753
00754 FILE *execute_get_out (yyscan_t yyscanner );
00755
00756 void execute_set_out (FILE * out_str ,yyscan_t yyscanner );
00757
00758 int execute_get_leng (yyscan_t yyscanner );
00759
00760 char *execute_get_text (yyscan_t yyscanner );
00761
00762 int execute_get_lineno (yyscan_t yyscanner );
00763
00764 void execute_set_lineno (int line_number ,yyscan_t yyscanner );
00765
00766
00767
00768 YYSTYPE * execute_get_lval (yyscan_t yyscanner );
00769
00770 void execute_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
00771
00772
00773
00774
00775
00776
00777
00778 #ifndef YY_SKIP_YYWRAP
00779 #ifdef __cplusplus
00780 extern "C" int execute_wrap (yyscan_t yyscanner );
00781 #else
00782 extern int execute_wrap (yyscan_t yyscanner );
00783 #endif
00784 #endif
00785
00786
00787
00788
00789
00790
00791
00792 #ifndef yytext_ptr
00793 static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
00794 #endif
00795
00796 #ifdef YY_NEED_STRLEN
00797 static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
00798 #endif
00799
00800 #ifndef YY_NO_INPUT
00801
00802
00803
00804 #ifdef __cplusplus
00805 static int yyinput (yyscan_t yyscanner );
00806 #else
00807 static int input (yyscan_t yyscanner );
00808 #endif
00809
00810
00811
00812 #endif
00813
00814
00815
00816
00817
00818
00819 #ifndef YY_READ_BUF_SIZE
00820 #ifdef __ia64__
00821
00822 #define YY_READ_BUF_SIZE 16384
00823 #else
00824 #define YY_READ_BUF_SIZE 8192
00825 #endif
00826 #endif
00827
00828
00829 #ifndef ECHO
00830
00831
00832
00833
00834 #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
00835
00836
00837
00838 #endif
00839
00840
00841
00842
00843 #ifndef YY_INPUT
00844 #define YY_INPUT(buf,result,max_size) \
00845 \
00846 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
00847 { \
00848 int c = '*'; \
00849 size_t n; \
00850 for ( n = 0; n < max_size && \
00851 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
00852 buf[n] = (char) c; \
00853 if ( c == '\n' ) \
00854 buf[n++] = (char) c; \
00855 if ( c == EOF && ferror( yyin ) ) \
00856 YY_FATAL_ERROR( "input in flex scanner failed" ); \
00857 result = n; \
00858 } \
00859 else \
00860 { \
00861 errno=0; \
00862 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
00863 { \
00864 if( errno != EINTR) \
00865 { \
00866 YY_FATAL_ERROR( "input in flex scanner failed" ); \
00867 break; \
00868 } \
00869 errno=0; \
00870 clearerr(yyin); \
00871 } \
00872 }\
00873 \
00874 \
00875
00876
00877 #endif
00878
00879
00880
00881
00882
00883 #ifndef yyterminate
00884 #define yyterminate() return YY_NULL
00885 #endif
00886
00887
00888 #ifndef YY_START_STACK_INCR
00889 #define YY_START_STACK_INCR 25
00890 #endif
00891
00892
00893 #ifndef YY_FATAL_ERROR
00894
00895 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
00896
00897
00898
00899 #endif
00900
00901
00902
00903
00904
00905
00906
00907
00908
00909
00910
00911
00912
00913
00914
00915
00916
00917 #ifndef YY_DECL
00918 #define YY_DECL_IS_OURS 1
00919
00920
00921 extern int execute_lex \
00922 (YYSTYPE * yylval_param ,yyscan_t yyscanner);
00923
00924 #define YY_DECL int execute_lex \
00925 (YYSTYPE * yylval_param , yyscan_t yyscanner)
00926
00927
00928
00929 #endif
00930
00931
00932
00933
00934 #ifndef YY_USER_ACTION
00935 #define YY_USER_ACTION
00936 #endif
00937
00938
00939 #ifndef YY_BREAK
00940 #define YY_BREAK break;
00941 #endif
00942
00943
00944 #define YY_RULE_SETUP \
00945 YY_USER_ACTION
00946
00947
00948
00951 YY_DECL
00952 {
00953 register yy_state_type yy_current_state;
00954 register char *yy_cp, *yy_bp;
00955 register int yy_act;
00956 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
00957
00958
00959 #line 119 "drizzled/execute/scanner.l"
00960
00961
00962 #line 963 "drizzled/execute/scanner.cc"
00963
00964 yylval = yylval_param;
00965
00966 if ( !yyg->yy_init )
00967 {
00968 yyg->yy_init = 1;
00969
00970 #ifdef YY_USER_INIT
00971 YY_USER_INIT;
00972 #endif
00973
00974 if ( ! yyg->yy_start )
00975 yyg->yy_start = 1;
00976
00977 if ( ! yyin )
00978
00979 yyin = stdin;
00980
00981
00982
00983
00984 if ( ! yyout )
00985
00986 yyout = stdout;
00987
00988
00989
00990
00991 if ( ! YY_CURRENT_BUFFER ) {
00992 execute_ensure_buffer_stack (yyscanner);
00993 YY_CURRENT_BUFFER_LVALUE =
00994 execute__create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
00995 }
00996
00997 execute__load_buffer_state(yyscanner );
00998 }
00999
01000 while ( 1 )
01001 {
01002
01003 yy_cp = yyg->yy_c_buf_p;
01004
01005
01006 *yy_cp = yyg->yy_hold_char;
01007
01008
01009
01010
01011 yy_bp = yy_cp;
01012
01013
01014 yy_current_state = yyg->yy_start;
01015 yy_match:
01016 do
01017 {
01018 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
01019 if ( yy_accept[yy_current_state] )
01020 {
01021 yyg->yy_last_accepting_state = yy_current_state;
01022 yyg->yy_last_accepting_cpos = yy_cp;
01023 }
01024 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
01025 {
01026 yy_current_state = (int) yy_def[yy_current_state];
01027 if ( yy_current_state >= 46 )
01028 yy_c = yy_meta[(unsigned int) yy_c];
01029 }
01030 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
01031 ++yy_cp;
01032 }
01033 while ( yy_base[yy_current_state] != 115 );
01034
01035 yy_find_action:
01036
01037 yy_act = yy_accept[yy_current_state];
01038 if ( yy_act == 0 )
01039 {
01040 yy_cp = yyg->yy_last_accepting_cpos;
01041 yy_current_state = yyg->yy_last_accepting_state;
01042 yy_act = yy_accept[yy_current_state];
01043 }
01044
01045 YY_DO_BEFORE_ACTION;
01046
01047
01048
01049 do_action:
01050
01051
01052 if ( yy_flex_debug )
01053 {
01054 if ( yy_act == 0 )
01055 fprintf( stderr, "--scanner backing up\n" );
01056 else if ( yy_act < 5 )
01057 fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n",
01058 (long)yy_rule_linenum[yy_act], yytext );
01059 else if ( yy_act == 5 )
01060 fprintf( stderr, "--accepting default rule (\"%s\")\n",
01061 yytext );
01062 else if ( yy_act == 6 )
01063 fprintf( stderr, "--(end of buffer or a NUL)\n" );
01064 else
01065 fprintf( stderr, "--EOF (start condition %d)\n", YY_START );
01066 }
01067
01068 switch ( yy_act )
01069 {
01070
01071 case 0:
01072
01073 *yy_cp = yyg->yy_hold_char;
01074 yy_cp = yyg->yy_last_accepting_cpos;
01075 yy_current_state = yyg->yy_last_accepting_state;
01076 goto yy_find_action;
01077
01078 case 1:
01079 YY_RULE_SETUP
01080 #line 121 "drizzled/execute/scanner.l"
01081 { }
01082 YY_BREAK
01083 case 2:
01084
01085 YY_RULE_SETUP
01086 #line 123 "drizzled/execute/scanner.l"
01087 ;
01088 YY_BREAK
01089 case 3:
01090
01091 YY_RULE_SETUP
01092 #line 126 "drizzled/execute/scanner.l"
01093 {
01094 yylval->string.assign(yytext, yyleng);
01095 return STRING;
01096 }
01097 YY_BREAK
01098 case 4:
01099 YY_RULE_SETUP
01100 #line 131 "drizzled/execute/scanner.l"
01101 {
01102 yyextra->begin= yytext;
01103 return UNKNOWN;
01104 }
01105 YY_BREAK
01106 case 5:
01107 YY_RULE_SETUP
01108 #line 136 "drizzled/execute/scanner.l"
01109 ECHO;
01110 YY_BREAK
01111 #line 1112 "drizzled/execute/scanner.cc"
01112 case YY_STATE_EOF(INITIAL):
01113 yyterminate();
01114
01115 case YY_END_OF_BUFFER:
01116 {
01117
01118 int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
01119
01120
01121 *yy_cp = yyg->yy_hold_char;
01122 YY_RESTORE_YY_MORE_OFFSET
01123
01124 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
01125 {
01126
01127
01128
01129
01130
01131
01132
01133
01134
01135 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
01136 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
01137 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
01138 }
01139
01140
01141
01142
01143
01144
01145
01146
01147 if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
01148 {
01149 yy_state_type yy_next_state;
01150
01151 yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
01152
01153 yy_current_state = yy_get_previous_state( yyscanner );
01154
01155
01156
01157
01158
01159
01160
01161
01162
01163
01164 yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
01165
01166 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
01167
01168 if ( yy_next_state )
01169 {
01170
01171 yy_cp = ++yyg->yy_c_buf_p;
01172 yy_current_state = yy_next_state;
01173 goto yy_match;
01174 }
01175
01176 else
01177 {
01178
01179 yy_cp = yyg->yy_c_buf_p;
01180 goto yy_find_action;
01181 }
01182 }
01183
01184 else switch ( yy_get_next_buffer( yyscanner ) )
01185 {
01186 case EOB_ACT_END_OF_FILE:
01187 {
01188 yyg->yy_did_buffer_switch_on_eof = 0;
01189
01190 if ( execute_wrap(yyscanner ) )
01191 {
01192
01193
01194
01195
01196
01197
01198
01199
01200
01201 yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
01202
01203 yy_act = YY_STATE_EOF(YY_START);
01204 goto do_action;
01205 }
01206
01207 else
01208 {
01209 if ( ! yyg->yy_did_buffer_switch_on_eof )
01210 YY_NEW_FILE;
01211 }
01212 break;
01213 }
01214
01215 case EOB_ACT_CONTINUE_SCAN:
01216 yyg->yy_c_buf_p =
01217 yyg->yytext_ptr + yy_amount_of_matched_text;
01218
01219 yy_current_state = yy_get_previous_state( yyscanner );
01220
01221 yy_cp = yyg->yy_c_buf_p;
01222 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
01223 goto yy_match;
01224
01225 case EOB_ACT_LAST_MATCH:
01226 yyg->yy_c_buf_p =
01227 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
01228
01229 yy_current_state = yy_get_previous_state( yyscanner );
01230
01231 yy_cp = yyg->yy_c_buf_p;
01232 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
01233 goto yy_find_action;
01234 }
01235 break;
01236 }
01237
01238 default:
01239 YY_FATAL_ERROR(
01240 "fatal flex scanner internal error--no action found" );
01241 }
01242 }
01243 }
01244
01245
01246
01247
01248
01249
01250
01251
01252
01253
01254
01255
01256
01257
01258
01259
01260
01261 static int yy_get_next_buffer (yyscan_t yyscanner)
01262
01263
01264
01265 {
01266 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01267 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
01268 register char *source = yyg->yytext_ptr;
01269 register int number_to_move, i;
01270 int ret_val;
01271
01272 if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
01273 YY_FATAL_ERROR(
01274 "fatal flex scanner internal error--end of buffer missed" );
01275
01276 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
01277 {
01278 if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
01279 {
01280
01281
01282
01283 return EOB_ACT_END_OF_FILE;
01284 }
01285
01286 else
01287 {
01288
01289
01290
01291 return EOB_ACT_LAST_MATCH;
01292 }
01293 }
01294
01295
01296
01297
01298 number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
01299
01300 for ( i = 0; i < number_to_move; ++i )
01301 *(dest++) = *(source++);
01302
01303 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
01304
01305
01306
01307 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
01308
01309 else
01310 {
01311 int num_to_read =
01312 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
01313
01314 while ( num_to_read <= 0 )
01315 {
01316
01317
01318 YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
01319
01320 int yy_c_buf_p_offset =
01321 (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
01322
01323 if ( b->yy_is_our_buffer )
01324 {
01325 int new_size = b->yy_buf_size * 2;
01326
01327 if ( new_size <= 0 )
01328 b->yy_buf_size += b->yy_buf_size / 8;
01329 else
01330 b->yy_buf_size *= 2;
01331
01332 b->yy_ch_buf = (char *)
01333
01334 execute_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
01335 }
01336 else
01337
01338 b->yy_ch_buf = 0;
01339
01340 if ( ! b->yy_ch_buf )
01341 YY_FATAL_ERROR(
01342 "fatal error - scanner input buffer overflow" );
01343
01344 yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
01345
01346 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
01347 number_to_move - 1;
01348
01349 }
01350
01351 if ( num_to_read > YY_READ_BUF_SIZE )
01352 num_to_read = YY_READ_BUF_SIZE;
01353
01354
01355 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
01356 yyg->yy_n_chars, (size_t) num_to_read );
01357
01358 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
01359 }
01360
01361 if ( yyg->yy_n_chars == 0 )
01362 {
01363 if ( number_to_move == YY_MORE_ADJ )
01364 {
01365 ret_val = EOB_ACT_END_OF_FILE;
01366 execute_restart(yyin ,yyscanner);
01367 }
01368
01369 else
01370 {
01371 ret_val = EOB_ACT_LAST_MATCH;
01372 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
01373 YY_BUFFER_EOF_PENDING;
01374 }
01375 }
01376
01377 else
01378 ret_val = EOB_ACT_CONTINUE_SCAN;
01379
01380 if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
01381
01382 yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
01383 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) execute_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
01384 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
01385 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
01386 }
01387
01388 yyg->yy_n_chars += number_to_move;
01389 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
01390 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
01391
01392 yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
01393
01394 return ret_val;
01395 }
01396
01397
01398
01399
01400
01401
01402 static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
01403
01404
01405
01406 {
01407 register yy_state_type yy_current_state;
01408 register char *yy_cp;
01409 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01410
01411
01412 yy_current_state = yyg->yy_start;
01413
01414 for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
01415 {
01416
01417 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
01418 if ( yy_accept[yy_current_state] )
01419 {
01420 yyg->yy_last_accepting_state = yy_current_state;
01421 yyg->yy_last_accepting_cpos = yy_cp;
01422 }
01423 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
01424 {
01425 yy_current_state = (int) yy_def[yy_current_state];
01426 if ( yy_current_state >= 46 )
01427 yy_c = yy_meta[(unsigned int) yy_c];
01428 }
01429 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
01430 }
01431
01432 return yy_current_state;
01433 }
01434
01435
01436
01437
01438
01439
01440
01441 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
01442
01443
01444
01445 {
01446 register int yy_is_jam;
01447 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01448
01449 register char *yy_cp = yyg->yy_c_buf_p;
01450
01451 register YY_CHAR yy_c = 1;
01452 if ( yy_accept[yy_current_state] )
01453 {
01454 yyg->yy_last_accepting_state = yy_current_state;
01455 yyg->yy_last_accepting_cpos = yy_cp;
01456 }
01457 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
01458 {
01459 yy_current_state = (int) yy_def[yy_current_state];
01460 if ( yy_current_state >= 46 )
01461 yy_c = yy_meta[(unsigned int) yy_c];
01462 }
01463 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
01464 yy_is_jam = (yy_current_state == 45);
01465
01466 return yy_is_jam ? 0 : yy_current_state;
01467 }
01468
01469
01470
01471
01472
01473
01474 #ifndef YY_NO_INPUT
01475 #ifdef __cplusplus
01476 static int yyinput (yyscan_t yyscanner)
01477 #else
01478 static int input (yyscan_t yyscanner)
01479 #endif
01480
01481
01482
01483
01484 {
01485 int c;
01486 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01487
01488 *yyg->yy_c_buf_p = yyg->yy_hold_char;
01489
01490 if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
01491 {
01492
01493
01494
01495
01496 if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
01497
01498 *yyg->yy_c_buf_p = '\0';
01499
01500 else
01501 {
01502 int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
01503 ++yyg->yy_c_buf_p;
01504
01505 switch ( yy_get_next_buffer( yyscanner ) )
01506 {
01507 case EOB_ACT_LAST_MATCH:
01508
01509
01510
01511
01512
01513
01514
01515
01516
01517
01518
01519 execute_restart(yyin ,yyscanner);
01520
01521
01522
01523 case EOB_ACT_END_OF_FILE:
01524 {
01525 if ( execute_wrap(yyscanner ) )
01526 return EOF;
01527
01528 if ( ! yyg->yy_did_buffer_switch_on_eof )
01529 YY_NEW_FILE;
01530 #ifdef __cplusplus
01531 return yyinput(yyscanner);
01532 #else
01533 return input(yyscanner);
01534 #endif
01535 }
01536
01537 case EOB_ACT_CONTINUE_SCAN:
01538 yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
01539 break;
01540 }
01541 }
01542 }
01543
01544 c = *(unsigned char *) yyg->yy_c_buf_p;
01545 *yyg->yy_c_buf_p = '\0';
01546 yyg->yy_hold_char = *++yyg->yy_c_buf_p;
01547
01548
01549
01550 return c;
01551 }
01552
01553 #endif
01554
01555
01561
01562 void execute_restart (FILE * input_file , yyscan_t yyscanner)
01563
01564
01565
01566 {
01567 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01568
01569 if ( ! YY_CURRENT_BUFFER ){
01570 execute_ensure_buffer_stack (yyscanner);
01571 YY_CURRENT_BUFFER_LVALUE =
01572 execute__create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
01573 }
01574
01575 execute__init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
01576 execute__load_buffer_state(yyscanner );
01577 }
01578
01583
01584 void execute__switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
01585
01586
01587
01588 {
01589 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01590
01591
01592
01593
01594
01595
01596 execute_ensure_buffer_stack (yyscanner);
01597 if ( YY_CURRENT_BUFFER == new_buffer )
01598 return;
01599
01600 if ( YY_CURRENT_BUFFER )
01601 {
01602
01603 *yyg->yy_c_buf_p = yyg->yy_hold_char;
01604 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
01605 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
01606 }
01607
01608 YY_CURRENT_BUFFER_LVALUE = new_buffer;
01609 execute__load_buffer_state(yyscanner );
01610
01611
01612
01613
01614
01615
01616 yyg->yy_did_buffer_switch_on_eof = 1;
01617 }
01618
01619
01620 static void execute__load_buffer_state (yyscan_t yyscanner)
01621
01622
01623
01624 {
01625 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01626 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
01627 yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
01628 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
01629 yyg->yy_hold_char = *yyg->yy_c_buf_p;
01630 }
01631
01638
01639 YY_BUFFER_STATE execute__create_buffer (FILE * file, int size , yyscan_t yyscanner)
01640
01641
01642
01643 {
01644 YY_BUFFER_STATE b;
01645
01646 b = (YY_BUFFER_STATE) execute_alloc(sizeof( struct yy_buffer_state ) ,yyscanner );
01647 if ( ! b )
01648 YY_FATAL_ERROR( "out of dynamic memory in execute__create_buffer()" );
01649
01650 b->yy_buf_size = size;
01651
01652
01653
01654
01655 b->yy_ch_buf = (char *) execute_alloc(b->yy_buf_size + 2 ,yyscanner );
01656 if ( ! b->yy_ch_buf )
01657 YY_FATAL_ERROR( "out of dynamic memory in execute__create_buffer()" );
01658
01659 b->yy_is_our_buffer = 1;
01660
01661 execute__init_buffer(b,file ,yyscanner);
01662
01663 return b;
01664 }
01665
01670
01671 void execute__delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
01672
01673
01674
01675 {
01676 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01677
01678 if ( ! b )
01679 return;
01680
01681 if ( b == YY_CURRENT_BUFFER )
01682 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
01683
01684 if ( b->yy_is_our_buffer )
01685 execute_free((void *) b->yy_ch_buf ,yyscanner );
01686
01687 execute_free((void *) b ,yyscanner );
01688 }
01689
01690
01691
01692 #ifndef __cplusplus
01693 extern int isatty (int );
01694 #endif
01695
01696
01697
01698
01699
01700
01701
01702
01703
01704
01705
01706 static void execute__init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
01707
01708
01709
01710
01711 {
01712 int oerrno = errno;
01713 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01714
01715 execute__flush_buffer(b ,yyscanner);
01716
01717 b->yy_input_file = file;
01718 b->yy_fill_buffer = 1;
01719
01720
01721
01722
01723
01724 if (b != YY_CURRENT_BUFFER){
01725 b->yy_bs_lineno = 1;
01726 b->yy_bs_column = 0;
01727 }
01728
01729
01730
01731 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
01732
01733
01734
01735
01736 errno = oerrno;
01737 }
01738
01743
01744 void execute__flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
01745
01746
01747
01748 {
01749 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01750 if ( ! b )
01751 return;
01752
01753 b->yy_n_chars = 0;
01754
01755
01756
01757
01758
01759 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
01760 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
01761
01762 b->yy_buf_pos = &b->yy_ch_buf[0];
01763
01764 b->yy_at_bol = 1;
01765 b->yy_buffer_status = YY_BUFFER_NEW;
01766
01767 if ( b == YY_CURRENT_BUFFER )
01768 execute__load_buffer_state(yyscanner );
01769 }
01770
01771
01778
01779 void execute_push_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
01780
01781
01782
01783 {
01784 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01785 if (new_buffer == NULL)
01786 return;
01787
01788 execute_ensure_buffer_stack(yyscanner);
01789
01790
01791 if ( YY_CURRENT_BUFFER )
01792 {
01793
01794 *yyg->yy_c_buf_p = yyg->yy_hold_char;
01795 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
01796 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
01797 }
01798
01799
01800 if (YY_CURRENT_BUFFER)
01801 yyg->yy_buffer_stack_top++;
01802 YY_CURRENT_BUFFER_LVALUE = new_buffer;
01803
01804
01805 execute__load_buffer_state(yyscanner );
01806 yyg->yy_did_buffer_switch_on_eof = 1;
01807 }
01808
01809
01810
01815
01816 void execute_pop_buffer_state (yyscan_t yyscanner)
01817
01818
01819
01820 {
01821 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01822 if (!YY_CURRENT_BUFFER)
01823 return;
01824
01825 execute__delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
01826 YY_CURRENT_BUFFER_LVALUE = NULL;
01827 if (yyg->yy_buffer_stack_top > 0)
01828 --yyg->yy_buffer_stack_top;
01829
01830 if (YY_CURRENT_BUFFER) {
01831 execute__load_buffer_state(yyscanner );
01832 yyg->yy_did_buffer_switch_on_eof = 1;
01833 }
01834 }
01835
01836
01837
01838
01839
01840
01841
01842 static void execute_ensure_buffer_stack (yyscan_t yyscanner)
01843
01844
01845
01846 {
01847 int num_to_alloc;
01848 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01849
01850 if (!yyg->yy_buffer_stack) {
01851
01852
01853
01854
01855
01856 num_to_alloc = 1;
01857 yyg->yy_buffer_stack = (struct yy_buffer_state**)execute_alloc
01858 (num_to_alloc * sizeof(struct yy_buffer_state*)
01859 , yyscanner);
01860 if ( ! yyg->yy_buffer_stack )
01861 YY_FATAL_ERROR( "out of dynamic memory in execute_ensure_buffer_stack()" );
01862
01863 memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
01864
01865 yyg->yy_buffer_stack_max = num_to_alloc;
01866 yyg->yy_buffer_stack_top = 0;
01867 return;
01868 }
01869
01870 if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
01871
01872
01873 int grow_size = 8 ;
01874
01875 num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
01876 yyg->yy_buffer_stack = (struct yy_buffer_state**)execute_realloc
01877 (yyg->yy_buffer_stack,
01878 num_to_alloc * sizeof(struct yy_buffer_state*)
01879 , yyscanner);
01880 if ( ! yyg->yy_buffer_stack )
01881 YY_FATAL_ERROR( "out of dynamic memory in execute_ensure_buffer_stack()" );
01882
01883
01884 memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
01885 yyg->yy_buffer_stack_max = num_to_alloc;
01886 }
01887 }
01888
01889
01890
01897 YY_BUFFER_STATE execute__scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
01898 {
01899 YY_BUFFER_STATE b;
01900
01901 if ( size < 2 ||
01902 base[size-2] != YY_END_OF_BUFFER_CHAR ||
01903 base[size-1] != YY_END_OF_BUFFER_CHAR )
01904
01905 return 0;
01906
01907 b = (YY_BUFFER_STATE) execute_alloc(sizeof( struct yy_buffer_state ) ,yyscanner );
01908 if ( ! b )
01909 YY_FATAL_ERROR( "out of dynamic memory in execute__scan_buffer()" );
01910
01911 b->yy_buf_size = size - 2;
01912 b->yy_buf_pos = b->yy_ch_buf = base;
01913 b->yy_is_our_buffer = 0;
01914 b->yy_input_file = 0;
01915 b->yy_n_chars = b->yy_buf_size;
01916 b->yy_is_interactive = 0;
01917 b->yy_at_bol = 1;
01918 b->yy_fill_buffer = 0;
01919 b->yy_buffer_status = YY_BUFFER_NEW;
01920
01921 execute__switch_to_buffer(b ,yyscanner );
01922
01923 return b;
01924 }
01925
01926
01927
01936 YY_BUFFER_STATE execute__scan_string (yyconst char * yystr , yyscan_t yyscanner)
01937 {
01938
01939 return execute__scan_bytes(yystr,strlen(yystr) ,yyscanner);
01940 }
01941
01942
01943
01951 YY_BUFFER_STATE execute__scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner)
01952 {
01953 YY_BUFFER_STATE b;
01954 char *buf;
01955 yy_size_t n;
01956 int i;
01957
01958
01959 n = _yybytes_len + 2;
01960 buf = (char *) execute_alloc(n ,yyscanner );
01961 if ( ! buf )
01962 YY_FATAL_ERROR( "out of dynamic memory in execute__scan_bytes()" );
01963
01964 for ( i = 0; i < _yybytes_len; ++i )
01965 buf[i] = yybytes[i];
01966
01967 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
01968
01969 b = execute__scan_buffer(buf,n ,yyscanner);
01970 if ( ! b )
01971 YY_FATAL_ERROR( "bad buffer in execute__scan_bytes()" );
01972
01973
01974
01975
01976 b->yy_is_our_buffer = 1;
01977
01978 return b;
01979 }
01980
01981
01982 #ifndef YY_EXIT_FAILURE
01983 #define YY_EXIT_FAILURE 2
01984 #endif
01985
01986
01987 static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
01988 {
01989 (void) fprintf( stderr, "%s\n", msg );
01990 exit( YY_EXIT_FAILURE );
01991 }
01992
01993
01994
01995
01996
01997
01998 #undef yyless
01999 #define yyless(n) \
02000 do \
02001 { \
02002 \
02003 int yyless_macro_arg = (n); \
02004 YY_LESS_LINENO(yyless_macro_arg);\
02005 yytext[yyleng] = yyg->yy_hold_char; \
02006 yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
02007 yyg->yy_hold_char = *yyg->yy_c_buf_p; \
02008 *yyg->yy_c_buf_p = '\0'; \
02009 yyleng = yyless_macro_arg; \
02010 } \
02011 while ( 0 )
02012
02013
02014
02015
02016
02017
02021 YY_EXTRA_TYPE execute_get_extra (yyscan_t yyscanner)
02022 {
02023 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02024 return yyextra;
02025 }
02026
02027
02028
02032 int execute_get_lineno (yyscan_t yyscanner)
02033 {
02034 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02035
02036 if (! YY_CURRENT_BUFFER)
02037 return 0;
02038
02039 return yylineno;
02040 }
02041
02045 int execute_get_column (yyscan_t yyscanner)
02046 {
02047 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02048
02049 if (! YY_CURRENT_BUFFER)
02050 return 0;
02051
02052 return yycolumn;
02053 }
02054
02058 FILE *execute_get_in (yyscan_t yyscanner)
02059 {
02060 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02061 return yyin;
02062 }
02063
02067 FILE *execute_get_out (yyscan_t yyscanner)
02068 {
02069 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02070 return yyout;
02071 }
02072
02076 int execute_get_leng (yyscan_t yyscanner)
02077 {
02078 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02079 return yyleng;
02080 }
02081
02086 char *execute_get_text (yyscan_t yyscanner)
02087 {
02088 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02089 return yytext;
02090 }
02091
02092
02093
02098 void execute_set_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
02099 {
02100 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02101 yyextra = user_defined ;
02102 }
02103
02104
02105
02110 void execute_set_lineno (int line_number , yyscan_t yyscanner)
02111 {
02112 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02113
02114
02115 if (! YY_CURRENT_BUFFER )
02116 yy_fatal_error( "execute_set_lineno called with no buffer" , yyscanner);
02117
02118 yylineno = line_number;
02119 }
02120
02125 void execute_set_column (int column_no , yyscan_t yyscanner)
02126 {
02127 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02128
02129
02130 if (! YY_CURRENT_BUFFER )
02131 yy_fatal_error( "execute_set_column called with no buffer" , yyscanner);
02132
02133 yycolumn = column_no;
02134 }
02135
02142 void execute_set_in (FILE * in_str , yyscan_t yyscanner)
02143 {
02144 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02145 yyin = in_str ;
02146 }
02147
02148 void execute_set_out (FILE * out_str , yyscan_t yyscanner)
02149 {
02150 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02151 yyout = out_str ;
02152 }
02153
02154 int execute_get_debug (yyscan_t yyscanner)
02155 {
02156 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02157 return yy_flex_debug;
02158 }
02159
02160 void execute_set_debug (int bdebug , yyscan_t yyscanner)
02161 {
02162 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02163 yy_flex_debug = bdebug ;
02164 }
02165
02166
02167
02168
02169
02170
02171
02172
02173 YYSTYPE * execute_get_lval (yyscan_t yyscanner)
02174 {
02175 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02176 return yylval;
02177 }
02178
02179 void execute_set_lval (YYSTYPE * yylval_param , yyscan_t yyscanner)
02180 {
02181 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02182 yylval = yylval_param;
02183 }
02184
02185
02186
02187
02188
02189
02190
02191
02192
02193
02194 int execute_lex_init(yyscan_t* ptr_yy_globals)
02195
02196 {
02197 if (ptr_yy_globals == NULL){
02198 errno = EINVAL;
02199 return 1;
02200 }
02201
02202 *ptr_yy_globals = (yyscan_t) execute_alloc ( sizeof( struct yyguts_t ), NULL );
02203
02204 if (*ptr_yy_globals == NULL){
02205 errno = ENOMEM;
02206 return 1;
02207 }
02208
02209
02210 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
02211
02212 return yy_init_globals ( *ptr_yy_globals );
02213 }
02214
02215
02216
02217
02218
02219
02220
02221
02222
02223 int execute_lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
02224
02225 {
02226 struct yyguts_t dummy_yyguts;
02227
02228 execute_set_extra (yy_user_defined, &dummy_yyguts);
02229
02230 if (ptr_yy_globals == NULL){
02231 errno = EINVAL;
02232 return 1;
02233 }
02234
02235 *ptr_yy_globals = (yyscan_t) execute_alloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
02236
02237 if (*ptr_yy_globals == NULL){
02238 errno = ENOMEM;
02239 return 1;
02240 }
02241
02242
02243
02244 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
02245
02246 execute_set_extra (yy_user_defined, *ptr_yy_globals);
02247
02248 return yy_init_globals ( *ptr_yy_globals );
02249 }
02250
02251
02252
02253
02254 static int yy_init_globals (yyscan_t yyscanner)
02255 {
02256 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02257
02258
02259
02260
02261 yyg->yy_buffer_stack = 0;
02262 yyg->yy_buffer_stack_top = 0;
02263 yyg->yy_buffer_stack_max = 0;
02264 yyg->yy_c_buf_p = (char *) 0;
02265 yyg->yy_init = 0;
02266 yyg->yy_start = 0;
02267
02268 yyg->yy_start_stack_ptr = 0;
02269 yyg->yy_start_stack_depth = 0;
02270 yyg->yy_start_stack = NULL;
02271
02272
02273 #ifdef YY_STDINIT
02274 yyin = stdin;
02275 yyout = stdout;
02276 #else
02277 yyin = (FILE *) 0;
02278 yyout = (FILE *) 0;
02279 #endif
02280
02281
02282
02283
02284 return 0;
02285 }
02286
02287
02288
02289
02290 int execute_lex_destroy (yyscan_t yyscanner)
02291 {
02292 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02293
02294
02295 while(YY_CURRENT_BUFFER){
02296 execute__delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
02297 YY_CURRENT_BUFFER_LVALUE = NULL;
02298 execute_pop_buffer_state(yyscanner);
02299 }
02300
02301
02302 execute_free(yyg->yy_buffer_stack ,yyscanner);
02303 yyg->yy_buffer_stack = NULL;
02304
02305
02306 execute_free(yyg->yy_start_stack ,yyscanner );
02307 yyg->yy_start_stack = NULL;
02308
02309
02310
02311 yy_init_globals( yyscanner);
02312
02313
02314
02315 execute_free ( yyscanner , yyscanner );
02316 yyscanner = NULL;
02317
02318 return 0;
02319 }
02320
02321
02322
02323
02324
02325
02326 #ifndef yytext_ptr
02327 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
02328 {
02329 register int i;
02330 for ( i = 0; i < n; ++i )
02331 s1[i] = s2[i];
02332 }
02333 #endif
02334
02335 #ifdef YY_NEED_STRLEN
02336 static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
02337 {
02338 register int n;
02339 for ( n = 0; s[n]; ++n )
02340 ;
02341
02342 return n;
02343 }
02344 #endif
02345
02346 void *execute_alloc (yy_size_t size , yyscan_t yyscanner)
02347 {
02348 return (void *) malloc( size );
02349 }
02350
02351 void *execute_realloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
02352 {
02353
02354
02355
02356
02357
02358
02359
02360 return (void *) realloc( (char *) ptr, size );
02361 }
02362
02363 void execute_free (void * ptr , yyscan_t yyscanner)
02364 {
02365 free( (char *) ptr );
02366 }
02367
02368
02369
02370 #define YYTABLES_NAME "yytables"
02371
02372
02373
02374
02375 #line 136 "drizzled/execute/scanner.l"
02376
02377
02378 namespace drizzled {
02379 namespace execute {
02380
02381 void Context::init_scanner()
02382 {
02383 execute_lex_init(&scanner);
02384 execute_set_extra(this,scanner);
02385 }
02386
02387 void Context::destroy_scanner()
02388 {
02389 execute_lex_destroy(scanner);
02390 }
02391
02392 }
02393 }
02394
02395