00001 #line 2 "ast_expr2f.c"
00002
00003 #line 4 "ast_expr2f.c"
00004
00005 #define YY_INT_ALIGNED short int
00006
00007
00008
00009 #define FLEX_SCANNER
00010 #define YY_FLEX_MAJOR_VERSION 2
00011 #define YY_FLEX_MINOR_VERSION 5
00012 #define YY_FLEX_SUBMINOR_VERSION 33
00013 #if YY_FLEX_SUBMINOR_VERSION > 0
00014 #define FLEX_BETA
00015 #endif
00016
00017
00018
00019
00020 #include <stdio.h>
00021 #include <string.h>
00022 #include <errno.h>
00023 #include <stdlib.h>
00024
00025
00026
00027
00028
00029 #ifndef FLEXINT_H
00030 #define FLEXINT_H
00031
00032
00033
00034 #if !defined __STDC_VERSION__ || __STDC_VERSION__ >= 199901L
00035
00036
00037
00038
00039 #ifndef __STDC_LIMIT_MACROS
00040 #define __STDC_LIMIT_MACROS 1
00041 #endif
00042
00043 #include <inttypes.h>
00044 typedef int8_t flex_int8_t;
00045 typedef uint8_t flex_uint8_t;
00046 typedef int16_t flex_int16_t;
00047 typedef uint16_t flex_uint16_t;
00048 typedef int32_t flex_int32_t;
00049 typedef uint32_t flex_uint32_t;
00050 #else
00051 typedef signed char flex_int8_t;
00052 typedef short int flex_int16_t;
00053 typedef int flex_int32_t;
00054 typedef unsigned char flex_uint8_t;
00055 typedef unsigned short int flex_uint16_t;
00056 typedef unsigned int flex_uint32_t;
00057 #endif
00058
00059
00060 #ifndef INT8_MIN
00061 #define INT8_MIN (-128)
00062 #endif
00063 #ifndef INT16_MIN
00064 #define INT16_MIN (-32767-1)
00065 #endif
00066 #ifndef INT32_MIN
00067 #define INT32_MIN (-2147483647-1)
00068 #endif
00069 #ifndef INT8_MAX
00070 #define INT8_MAX (127)
00071 #endif
00072 #ifndef INT16_MAX
00073 #define INT16_MAX (32767)
00074 #endif
00075 #ifndef INT32_MAX
00076 #define INT32_MAX (2147483647)
00077 #endif
00078 #ifndef UINT8_MAX
00079 #define UINT8_MAX (255U)
00080 #endif
00081 #ifndef UINT16_MAX
00082 #define UINT16_MAX (65535U)
00083 #endif
00084 #ifndef UINT32_MAX
00085 #define UINT32_MAX (4294967295U)
00086 #endif
00087
00088 #endif
00089
00090 #ifdef __cplusplus
00091
00092
00093 #define YY_USE_CONST
00094
00095 #else
00096
00097 #if __STDC__
00098
00099 #define YY_USE_CONST
00100
00101 #endif
00102 #endif
00103
00104 #ifdef YY_USE_CONST
00105 #define yyconst const
00106 #else
00107 #define yyconst
00108 #endif
00109
00110
00111 #define YY_NULL 0
00112
00113
00114
00115
00116
00117
00118 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
00119
00120
00121 #ifndef YY_TYPEDEF_YY_SCANNER_T
00122 #define YY_TYPEDEF_YY_SCANNER_T
00123 typedef void* yyscan_t;
00124 #endif
00125
00126
00127
00128 #define yyin yyg->yyin_r
00129 #define yyout yyg->yyout_r
00130 #define yyextra yyg->yyextra_r
00131 #define yyleng yyg->yyleng_r
00132 #define yytext yyg->yytext_r
00133 #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
00134 #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
00135 #define yy_flex_debug yyg->yy_flex_debug_r
00136
00137 int ast_yylex_init (yyscan_t* scanner);
00138
00139
00140
00141
00142
00143 #define BEGIN yyg->yy_start = 1 + 2 *
00144
00145
00146
00147
00148
00149 #define YY_START ((yyg->yy_start - 1) / 2)
00150 #define YYSTATE YY_START
00151
00152
00153 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
00154
00155
00156 #define YY_NEW_FILE ast_yyrestart(yyin ,yyscanner )
00157
00158 #define YY_END_OF_BUFFER_CHAR 0
00159
00160
00161 #ifndef YY_BUF_SIZE
00162 #define YY_BUF_SIZE 16384
00163 #endif
00164
00165
00166
00167 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
00168
00169 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
00170 #define YY_TYPEDEF_YY_BUFFER_STATE
00171 typedef struct yy_buffer_state *YY_BUFFER_STATE;
00172 #endif
00173
00174 #define EOB_ACT_CONTINUE_SCAN 0
00175 #define EOB_ACT_END_OF_FILE 1
00176 #define EOB_ACT_LAST_MATCH 2
00177
00178 #define YY_LESS_LINENO(n)
00179
00180
00181 #define yyless(n) \
00182 do \
00183 { \
00184 \
00185 int yyless_macro_arg = (n); \
00186 YY_LESS_LINENO(yyless_macro_arg);\
00187 *yy_cp = yyg->yy_hold_char; \
00188 YY_RESTORE_YY_MORE_OFFSET \
00189 yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
00190 YY_DO_BEFORE_ACTION; \
00191 } \
00192 while ( 0 )
00193
00194 #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
00195
00196
00197
00198
00199
00200
00201 #ifndef YY_TYPEDEF_YY_SIZE_T
00202 #define YY_TYPEDEF_YY_SIZE_T
00203 typedef unsigned int yy_size_t;
00204 #endif
00205
00206 #ifndef YY_STRUCT_YY_BUFFER_STATE
00207 #define YY_STRUCT_YY_BUFFER_STATE
00208 struct yy_buffer_state
00209 {
00210 FILE *yy_input_file;
00211
00212 char *yy_ch_buf;
00213 char *yy_buf_pos;
00214
00215
00216
00217
00218 yy_size_t yy_buf_size;
00219
00220
00221
00222
00223 int yy_n_chars;
00224
00225
00226
00227
00228
00229 int yy_is_our_buffer;
00230
00231
00232
00233
00234
00235
00236 int yy_is_interactive;
00237
00238
00239
00240
00241
00242 int yy_at_bol;
00243
00244 int yy_bs_lineno;
00245 int yy_bs_column;
00246
00247
00248
00249
00250 int yy_fill_buffer;
00251
00252 int yy_buffer_status;
00253
00254 #define YY_BUFFER_NEW 0
00255 #define YY_BUFFER_NORMAL 1
00256
00257
00258
00259
00260
00261
00262
00263
00264
00265
00266 #define YY_BUFFER_EOF_PENDING 2
00267
00268 };
00269 #endif
00270
00271
00272
00273
00274
00275
00276
00277 #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
00278 ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
00279 : NULL)
00280
00281
00282
00283
00284 #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
00285
00286 void ast_yyrestart (FILE *input_file ,yyscan_t yyscanner );
00287 void ast_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
00288 YY_BUFFER_STATE ast_yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner );
00289 void ast_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
00290 void ast_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
00291 void ast_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
00292 void ast_yypop_buffer_state (yyscan_t yyscanner );
00293
00294 static void ast_yyensure_buffer_stack (yyscan_t yyscanner );
00295 static void ast_yy_load_buffer_state (yyscan_t yyscanner );
00296 static void ast_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
00297
00298 #define YY_FLUSH_BUFFER ast_yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
00299
00300 YY_BUFFER_STATE ast_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
00301 YY_BUFFER_STATE ast_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
00302 YY_BUFFER_STATE ast_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
00303
00304 void *ast_yyalloc (yy_size_t ,yyscan_t yyscanner );
00305 void *ast_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner );
00306 void ast_yyfree (void * ,yyscan_t yyscanner );
00307
00308 #define yy_new_buffer ast_yy_create_buffer
00309
00310 #define yy_set_interactive(is_interactive) \
00311 { \
00312 if ( ! YY_CURRENT_BUFFER ){ \
00313 ast_yyensure_buffer_stack (yyscanner); \
00314 YY_CURRENT_BUFFER_LVALUE = \
00315 ast_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
00316 } \
00317 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
00318 }
00319
00320 #define yy_set_bol(at_bol) \
00321 { \
00322 if ( ! YY_CURRENT_BUFFER ){\
00323 ast_yyensure_buffer_stack (yyscanner); \
00324 YY_CURRENT_BUFFER_LVALUE = \
00325 ast_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
00326 } \
00327 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
00328 }
00329
00330 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
00331
00332
00333
00334 #define ast_yywrap(n) 1
00335 #define YY_SKIP_YYWRAP
00336
00337 typedef unsigned char YY_CHAR;
00338
00339 typedef int yy_state_type;
00340
00341 #define yytext_ptr yytext_r
00342
00343 static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
00344 static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner);
00345 static int yy_get_next_buffer (yyscan_t yyscanner );
00346 static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
00347
00348
00349
00350
00351 #define YY_DO_BEFORE_ACTION \
00352 yyg->yytext_ptr = yy_bp; \
00353 yyg->yytext_ptr -= yyg->yy_more_len; \
00354 yyleng = (size_t) (yy_cp - yyg->yytext_ptr); \
00355 yyg->yy_hold_char = *yy_cp; \
00356 *yy_cp = '\0'; \
00357 yyg->yy_c_buf_p = yy_cp;
00358
00359 #define YY_NUM_RULES 35
00360 #define YY_END_OF_BUFFER 36
00361
00362
00363 struct yy_trans_info
00364 {
00365 flex_int32_t yy_verify;
00366 flex_int32_t yy_nxt;
00367 };
00368 static yyconst flex_int16_t yy_accept[55] =
00369 { 0,
00370 0, 0, 0, 0, 32, 32, 36, 35, 25, 27,
00371 19, 35, 29, 29, 17, 2, 22, 23, 15, 13,
00372 14, 16, 28, 20, 9, 3, 8, 18, 1, 35,
00373 31, 30, 32, 33, 33, 12, 0, 26, 29, 24,
00374 5, 28, 21, 11, 6, 7, 10, 4, 0, 31,
00375 30, 32, 34, 0
00376 } ;
00377
00378 static yyconst flex_int32_t yy_ec[256] =
00379 { 0,
00380 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
00381 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
00382 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00383 1, 2, 4, 5, 6, 7, 8, 9, 6, 10,
00384 11, 12, 13, 6, 14, 6, 15, 16, 16, 16,
00385 16, 16, 16, 16, 16, 16, 16, 17, 6, 18,
00386 19, 20, 21, 6, 6, 6, 6, 6, 6, 6,
00387 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
00388 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
00389 1, 6, 1, 6, 6, 1, 6, 6, 6, 6,
00390
00391 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
00392 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
00393 6, 6, 22, 23, 24, 25, 1, 1, 1, 1,
00394 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00395 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00396 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00397 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00398 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00399 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00400 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00401
00402 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00403 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00404 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00405 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00406 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00407 1, 1, 1, 1, 1
00408 } ;
00409
00410 static yyconst flex_int32_t yy_meta[26] =
00411 { 0,
00412 1, 2, 2, 2, 1, 3, 4, 2, 2, 2,
00413 2, 2, 2, 2, 2, 3, 2, 2, 2, 2,
00414 2, 3, 2, 1, 1
00415 } ;
00416
00417 static yyconst flex_int16_t yy_base[61] =
00418 { 0,
00419 0, 0, 4, 5, 29, 54, 71, 101, 101, 101,
00420 50, 63, 25, 45, 101, 56, 101, 101, 101, 101,
00421 101, 101, 31, 47, 44, 14, 43, 101, 29, 18,
00422 101, 101, 0, 101, 28, 101, 38, 101, 42, 101,
00423 101, 50, 101, 101, 101, 101, 101, 101, 22, 101,
00424 101, 0, 101, 101, 79, 83, 87, 89, 93, 97
00425 } ;
00426
00427 static yyconst flex_int16_t yy_def[61] =
00428 { 0,
00429 54, 1, 55, 55, 56, 56, 54, 54, 54, 54,
00430 54, 57, 54, 58, 54, 54, 54, 54, 54, 54,
00431 54, 54, 54, 54, 54, 54, 54, 54, 54, 59,
00432 54, 54, 60, 54, 54, 54, 57, 54, 54, 54,
00433 54, 54, 54, 54, 54, 54, 54, 54, 59, 54,
00434 54, 60, 54, 0, 54, 54, 54, 54, 54, 54
00435 } ;
00436
00437 static yyconst flex_int16_t yy_nxt[127] =
00438 { 0,
00439 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
00440 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
00441 28, 8, 29, 8, 8, 31, 31, 32, 32, 33,
00442 39, 39, 45, 33, 33, 35, 39, 39, 46, 50,
00443 39, 51, 38, 50, 33, 51, 42, 39, 39, 53,
00444 33, 48, 33, 33, 33, 39, 39, 39, 33, 33,
00445 35, 47, 44, 43, 41, 42, 40, 38, 36, 33,
00446 54, 54, 54, 54, 54, 33, 54, 33, 33, 30,
00447 30, 30, 30, 34, 34, 34, 34, 37, 37, 37,
00448 37, 39, 39, 49, 49, 49, 49, 52, 54, 52,
00449
00450 7, 54, 54, 54, 54, 54, 54, 54, 54, 54,
00451 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
00452 54, 54, 54, 54, 54, 54
00453 } ;
00454
00455 static yyconst flex_int16_t yy_chk[127] =
00456 { 0,
00457 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00458 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00459 1, 1, 1, 1, 1, 3, 4, 3, 4, 5,
00460 13, 13, 26, 5, 5, 5, 23, 23, 26, 30,
00461 13, 30, 37, 49, 5, 49, 23, 39, 39, 35,
00462 5, 29, 5, 5, 6, 42, 42, 39, 6, 6,
00463 6, 27, 25, 24, 16, 42, 14, 12, 11, 6,
00464 7, 0, 0, 0, 0, 6, 0, 6, 6, 55,
00465 55, 55, 55, 56, 56, 56, 56, 57, 57, 57,
00466 57, 58, 58, 59, 59, 59, 59, 60, 0, 60,
00467
00468 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
00469 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
00470 54, 54, 54, 54, 54, 54
00471 } ;
00472
00473
00474
00475
00476 #define REJECT reject_used_but_not_detected
00477 #define yymore() (yyg->yy_more_flag = 1)
00478 #define YY_MORE_ADJ yyg->yy_more_len
00479 #define YY_RESTORE_YY_MORE_OFFSET
00480 #line 1 "ast_expr2.fl"
00481 #line 2 "ast_expr2.fl"
00482
00483
00484
00485
00486
00487
00488
00489
00490
00491
00492
00493
00494
00495
00496
00497
00498
00499
00500
00501
00502
00503
00504
00505 #include "asterisk.h"
00506
00507 #if !defined(STANDALONE_AEL)
00508 ASTERISK_FILE_VERSION(__FILE__, "$Revision: 144924 $")
00509 #endif
00510
00511 #include <sys/types.h>
00512 #include <stdio.h>
00513 #include <stdlib.h>
00514 #include <string.h>
00515 #include <locale.h>
00516 #include <ctype.h>
00517 #if !defined(SOLARIS) && !defined(__CYGWIN__)
00518
00519 #else
00520 #define quad_t int64_t
00521 #endif
00522 #include <errno.h>
00523 #include <regex.h>
00524 #include <limits.h>
00525
00526 #include "asterisk/ast_expr.h"
00527 #include "asterisk/logger.h"
00528 #include "asterisk/strings.h"
00529
00530 enum valtype {
00531 AST_EXPR_integer, AST_EXPR_numeric_string, AST_EXPR_string
00532 } ;
00533
00534 struct val {
00535 enum valtype type;
00536 union {
00537 char *s;
00538 quad_t i;
00539 } u;
00540 } ;
00541
00542 #include "ast_expr2.h"
00543
00544 #define SET_COLUMNS do { \
00545 yylloc_param->first_column = (int)(yyg->yytext_r - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf); \
00546 yylloc_param->last_column += yyleng - 1; \
00547 yylloc_param->first_line = yylloc_param->last_line = 1; \
00548 } while (0)
00549
00550 #define SET_STRING do { \
00551 yylval_param->val = calloc(1, sizeof(struct val)); \
00552 yylval_param->val->type = AST_EXPR_string; \
00553 yylval_param->val->u.s = strdup(yytext); \
00554 } while (0)
00555
00556 #define SET_NUMERIC_STRING do { \
00557 yylval_param->val = calloc(1, sizeof(struct val)); \
00558 yylval_param->val->type = AST_EXPR_numeric_string; \
00559 yylval_param->val->u.s = strdup(yytext); \
00560 } while (0)
00561
00562 struct parse_io
00563 {
00564 char *string;
00565 struct val *val;
00566 yyscan_t scanner;
00567 };
00568
00569 void ast_yyset_column(int column_no, yyscan_t yyscanner);
00570 int ast_yyget_column(yyscan_t yyscanner);
00571 static int curlycount = 0;
00572 static char *expr2_token_subst(const char *mess);
00573
00574 #line 575 "ast_expr2f.c"
00575
00576 #define INITIAL 0
00577 #define var 1
00578 #define trail 2
00579
00580 #ifndef YY_NO_UNISTD_H
00581
00582
00583
00584
00585 #include <unistd.h>
00586 #endif
00587
00588 #ifndef YY_EXTRA_TYPE
00589 #define YY_EXTRA_TYPE void *
00590 #endif
00591
00592
00593 struct yyguts_t
00594 {
00595
00596
00597 YY_EXTRA_TYPE yyextra_r;
00598
00599
00600 FILE *yyin_r, *yyout_r;
00601 size_t yy_buffer_stack_top;
00602 size_t yy_buffer_stack_max;
00603 YY_BUFFER_STATE * yy_buffer_stack;
00604 char yy_hold_char;
00605 int yy_n_chars;
00606 int yyleng_r;
00607 char *yy_c_buf_p;
00608 int yy_init;
00609 int yy_start;
00610 int yy_did_buffer_switch_on_eof;
00611 int yy_start_stack_ptr;
00612 int yy_start_stack_depth;
00613 int *yy_start_stack;
00614 yy_state_type yy_last_accepting_state;
00615 char* yy_last_accepting_cpos;
00616
00617 int yylineno_r;
00618 int yy_flex_debug_r;
00619
00620 char *yytext_r;
00621 int yy_more_flag;
00622 int yy_more_len;
00623
00624 YYSTYPE * yylval_r;
00625
00626 YYLTYPE * yylloc_r;
00627
00628 };
00629
00630 static int yy_init_globals (yyscan_t yyscanner );
00631
00632
00633
00634 # define yylval yyg->yylval_r
00635
00636 # define yylloc yyg->yylloc_r
00637
00638
00639
00640
00641 int ast_yylex_destroy (yyscan_t yyscanner );
00642
00643 int ast_yyget_debug (yyscan_t yyscanner );
00644
00645 void ast_yyset_debug (int debug_flag ,yyscan_t yyscanner );
00646
00647 YY_EXTRA_TYPE ast_yyget_extra (yyscan_t yyscanner );
00648
00649 void ast_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
00650
00651 FILE *ast_yyget_in (yyscan_t yyscanner );
00652
00653 void ast_yyset_in (FILE * in_str ,yyscan_t yyscanner );
00654
00655 FILE *ast_yyget_out (yyscan_t yyscanner );
00656
00657 void ast_yyset_out (FILE * out_str ,yyscan_t yyscanner );
00658
00659 int ast_yyget_leng (yyscan_t yyscanner );
00660
00661 char *ast_yyget_text (yyscan_t yyscanner );
00662
00663 int ast_yyget_lineno (yyscan_t yyscanner );
00664
00665 void ast_yyset_lineno (int line_number ,yyscan_t yyscanner );
00666
00667 YYSTYPE * ast_yyget_lval (yyscan_t yyscanner );
00668
00669 void ast_yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
00670
00671 YYLTYPE *ast_yyget_lloc (yyscan_t yyscanner );
00672
00673 void ast_yyset_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner );
00674
00675
00676
00677
00678
00679 #ifndef YY_SKIP_YYWRAP
00680 #ifdef __cplusplus
00681 extern "C" int ast_yywrap (yyscan_t yyscanner );
00682 #else
00683 extern int ast_yywrap (yyscan_t yyscanner );
00684 #endif
00685 #endif
00686
00687 static void yyunput (int c,char *buf_ptr ,yyscan_t yyscanner);
00688
00689 #ifndef yytext_ptr
00690 static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
00691 #endif
00692
00693 #ifdef YY_NEED_STRLEN
00694 static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
00695 #endif
00696
00697 #ifndef YY_NO_INPUT
00698
00699 #ifdef __cplusplus
00700 static int yyinput (yyscan_t yyscanner );
00701 #else
00702 static int input (yyscan_t yyscanner );
00703 #endif
00704
00705 #endif
00706
00707
00708 #ifndef YY_READ_BUF_SIZE
00709 #define YY_READ_BUF_SIZE 8192
00710 #endif
00711
00712
00713 #ifndef ECHO
00714
00715
00716
00717 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
00718 #endif
00719
00720
00721
00722
00723 #ifndef YY_INPUT
00724 #define YY_INPUT(buf,result,max_size) \
00725 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
00726 { \
00727 int c = '*'; \
00728 size_t n; \
00729 for ( n = 0; n < max_size && \
00730 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
00731 buf[n] = (char) c; \
00732 if ( c == '\n' ) \
00733 buf[n++] = (char) c; \
00734 if ( c == EOF && ferror( yyin ) ) \
00735 YY_FATAL_ERROR( "input in flex scanner failed" ); \
00736 result = n; \
00737 } \
00738 else \
00739 { \
00740 errno=0; \
00741 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
00742 { \
00743 if( errno != EINTR) \
00744 { \
00745 YY_FATAL_ERROR( "input in flex scanner failed" ); \
00746 break; \
00747 } \
00748 errno=0; \
00749 clearerr(yyin); \
00750 } \
00751 }\
00752 \
00753
00754 #endif
00755
00756
00757
00758
00759
00760 #ifndef yyterminate
00761 #define yyterminate() return YY_NULL
00762 #endif
00763
00764
00765 #ifndef YY_START_STACK_INCR
00766 #define YY_START_STACK_INCR 25
00767 #endif
00768
00769
00770 #ifndef YY_FATAL_ERROR
00771 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
00772 #endif
00773
00774
00775
00776
00777
00778
00779 #ifndef YY_DECL
00780 #define YY_DECL_IS_OURS 1
00781
00782 extern int ast_yylex (YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner);
00783
00784 #define YY_DECL int ast_yylex (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
00785 #endif
00786
00787
00788
00789
00790 #ifndef YY_USER_ACTION
00791 #define YY_USER_ACTION
00792 #endif
00793
00794
00795 #ifndef YY_BREAK
00796 #define YY_BREAK break;
00797 #endif
00798
00799 #define YY_RULE_SETUP \
00800 YY_USER_ACTION
00801
00802
00803
00804 YY_DECL
00805 {
00806 register yy_state_type yy_current_state;
00807 register char *yy_cp, *yy_bp;
00808 register int yy_act;
00809 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
00810
00811 #line 105 "ast_expr2.fl"
00812
00813
00814 #line 815 "ast_expr2f.c"
00815
00816 yylval = yylval_param;
00817
00818 yylloc = yylloc_param;
00819
00820 if ( !yyg->yy_init )
00821 {
00822 yyg->yy_init = 1;
00823
00824 #ifdef YY_USER_INIT
00825 YY_USER_INIT;
00826 #endif
00827
00828 if ( ! yyg->yy_start )
00829 yyg->yy_start = 1;
00830
00831 if ( ! yyin )
00832 yyin = stdin;
00833
00834 if ( ! yyout )
00835 yyout = stdout;
00836
00837 if ( ! YY_CURRENT_BUFFER ) {
00838 ast_yyensure_buffer_stack (yyscanner);
00839 YY_CURRENT_BUFFER_LVALUE =
00840 ast_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
00841 }
00842
00843 ast_yy_load_buffer_state(yyscanner );
00844 }
00845
00846 while ( 1 )
00847 {
00848 yyg->yy_more_len = 0;
00849 if ( yyg->yy_more_flag )
00850 {
00851 yyg->yy_more_len = yyg->yy_c_buf_p - yyg->yytext_ptr;
00852 yyg->yy_more_flag = 0;
00853 }
00854 yy_cp = yyg->yy_c_buf_p;
00855
00856
00857 *yy_cp = yyg->yy_hold_char;
00858
00859
00860
00861
00862 yy_bp = yy_cp;
00863
00864 yy_current_state = yyg->yy_start;
00865 yy_match:
00866 do
00867 {
00868 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
00869 if ( yy_accept[yy_current_state] )
00870 {
00871 yyg->yy_last_accepting_state = yy_current_state;
00872 yyg->yy_last_accepting_cpos = yy_cp;
00873 }
00874 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
00875 {
00876 yy_current_state = (int) yy_def[yy_current_state];
00877 if ( yy_current_state >= 55 )
00878 yy_c = yy_meta[(unsigned int) yy_c];
00879 }
00880 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
00881 ++yy_cp;
00882 }
00883 while ( yy_current_state != 54 );
00884 yy_cp = yyg->yy_last_accepting_cpos;
00885 yy_current_state = yyg->yy_last_accepting_state;
00886
00887 yy_find_action:
00888 yy_act = yy_accept[yy_current_state];
00889
00890 YY_DO_BEFORE_ACTION;
00891
00892 do_action:
00893
00894 switch ( yy_act )
00895 {
00896 case 0:
00897
00898 *yy_cp = yyg->yy_hold_char;
00899 yy_cp = yyg->yy_last_accepting_cpos;
00900 yy_current_state = yyg->yy_last_accepting_state;
00901 goto yy_find_action;
00902
00903 case 1:
00904 YY_RULE_SETUP
00905 #line 107 "ast_expr2.fl"
00906 { SET_COLUMNS; SET_STRING; return TOK_OR;}
00907 YY_BREAK
00908 case 2:
00909 YY_RULE_SETUP
00910 #line 108 "ast_expr2.fl"
00911 { SET_COLUMNS; SET_STRING; return TOK_AND;}
00912 YY_BREAK
00913 case 3:
00914 YY_RULE_SETUP
00915 #line 109 "ast_expr2.fl"
00916 { SET_COLUMNS; SET_STRING; return TOK_EQ;}
00917 YY_BREAK
00918 case 4:
00919 YY_RULE_SETUP
00920 #line 110 "ast_expr2.fl"
00921 { SET_COLUMNS; SET_STRING; return TOK_OR;}
00922 YY_BREAK
00923 case 5:
00924 YY_RULE_SETUP
00925 #line 111 "ast_expr2.fl"
00926 { SET_COLUMNS; SET_STRING; return TOK_AND;}
00927 YY_BREAK
00928 case 6:
00929 YY_RULE_SETUP
00930 #line 112 "ast_expr2.fl"
00931 { SET_COLUMNS; SET_STRING; return TOK_EQ;}
00932 YY_BREAK
00933 case 7:
00934 YY_RULE_SETUP
00935 #line 113 "ast_expr2.fl"
00936 { SET_COLUMNS; SET_STRING; return TOK_EQTILDE;}
00937 YY_BREAK
00938 case 8:
00939 YY_RULE_SETUP
00940 #line 114 "ast_expr2.fl"
00941 { SET_COLUMNS; SET_STRING; return TOK_GT;}
00942 YY_BREAK
00943 case 9:
00944 YY_RULE_SETUP
00945 #line 115 "ast_expr2.fl"
00946 { SET_COLUMNS; SET_STRING; return TOK_LT;}
00947 YY_BREAK
00948 case 10:
00949 YY_RULE_SETUP
00950 #line 116 "ast_expr2.fl"
00951 { SET_COLUMNS; SET_STRING; return TOK_GE;}
00952 YY_BREAK
00953 case 11:
00954 YY_RULE_SETUP
00955 #line 117 "ast_expr2.fl"
00956 { SET_COLUMNS; SET_STRING; return TOK_LE;}
00957 YY_BREAK
00958 case 12:
00959 YY_RULE_SETUP
00960 #line 118 "ast_expr2.fl"
00961 { SET_COLUMNS; SET_STRING; return TOK_NE;}
00962 YY_BREAK
00963 case 13:
00964 YY_RULE_SETUP
00965 #line 119 "ast_expr2.fl"
00966 { SET_COLUMNS; SET_STRING; return TOK_PLUS;}
00967 YY_BREAK
00968 case 14:
00969 YY_RULE_SETUP
00970 #line 120 "ast_expr2.fl"
00971 { SET_COLUMNS; SET_STRING; return TOK_MINUS;}
00972 YY_BREAK
00973 case 15:
00974 YY_RULE_SETUP
00975 #line 121 "ast_expr2.fl"
00976 { SET_COLUMNS; SET_STRING; return TOK_MULT;}
00977 YY_BREAK
00978 case 16:
00979 YY_RULE_SETUP
00980 #line 122 "ast_expr2.fl"
00981 { SET_COLUMNS; SET_STRING; return TOK_DIV;}
00982 YY_BREAK
00983 case 17:
00984 YY_RULE_SETUP
00985 #line 123 "ast_expr2.fl"
00986 { SET_COLUMNS; SET_STRING; return TOK_MOD;}
00987 YY_BREAK
00988 case 18:
00989 YY_RULE_SETUP
00990 #line 124 "ast_expr2.fl"
00991 { SET_COLUMNS; SET_STRING; return TOK_COND;}
00992 YY_BREAK
00993 case 19:
00994 YY_RULE_SETUP
00995 #line 125 "ast_expr2.fl"
00996 { SET_COLUMNS; SET_STRING; return TOK_COMPL;}
00997 YY_BREAK
00998 case 20:
00999 YY_RULE_SETUP
01000 #line 126 "ast_expr2.fl"
01001 { SET_COLUMNS; SET_STRING; return TOK_COLON;}
01002 YY_BREAK
01003 case 21:
01004 YY_RULE_SETUP
01005 #line 127 "ast_expr2.fl"
01006 { SET_COLUMNS; SET_STRING; return TOK_COLONCOLON;}
01007 YY_BREAK
01008 case 22:
01009 YY_RULE_SETUP
01010 #line 128 "ast_expr2.fl"
01011 { SET_COLUMNS; SET_STRING; return TOK_LP;}
01012 YY_BREAK
01013 case 23:
01014 YY_RULE_SETUP
01015 #line 129 "ast_expr2.fl"
01016 { SET_COLUMNS; SET_STRING; return TOK_RP;}
01017 YY_BREAK
01018 case 24:
01019 YY_RULE_SETUP