1 #line 2 "route/cls/ematch_grammar.c" 3 #line 4 "route/cls/ematch_grammar.c" 5 #define YY_INT_ALIGNED short int 10 #define YY_FLEX_MAJOR_VERSION 2 11 #define YY_FLEX_MINOR_VERSION 6 12 #define YY_FLEX_SUBMINOR_VERSION 0 13 #if YY_FLEX_SUBMINOR_VERSION > 0 34 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 39 #ifndef __STDC_LIMIT_MACROS 40 #define __STDC_LIMIT_MACROS 1 44 typedef int8_t flex_int8_t;
45 typedef uint8_t flex_uint8_t;
46 typedef int16_t flex_int16_t;
47 typedef uint16_t flex_uint16_t;
48 typedef int32_t flex_int32_t;
49 typedef uint32_t flex_uint32_t;
51 typedef signed char flex_int8_t;
52 typedef short int flex_int16_t;
53 typedef int flex_int32_t;
54 typedef unsigned char flex_uint8_t;
55 typedef unsigned short int flex_uint16_t;
56 typedef unsigned int flex_uint32_t;
60 #define INT8_MIN (-128) 63 #define INT16_MIN (-32767-1) 66 #define INT32_MIN (-2147483647-1) 69 #define INT8_MAX (127) 72 #define INT16_MAX (32767) 75 #define INT32_MAX (2147483647) 78 #define UINT8_MAX (255U) 81 #define UINT16_MAX (65535U) 84 #define UINT32_MAX (4294967295U) 99 #if defined (__STDC__) 107 #define yyconst const 120 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) 123 #ifndef YY_TYPEDEF_YY_SCANNER_T 124 #define YY_TYPEDEF_YY_SCANNER_T 125 typedef void* yyscan_t;
130 #define yyin yyg->yyin_r 131 #define yyout yyg->yyout_r 132 #define yyextra yyg->yyextra_r 133 #define yyleng yyg->yyleng_r 134 #define yytext yyg->yytext_r 135 #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) 136 #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) 137 #define yy_flex_debug yyg->yy_flex_debug_r 143 #define BEGIN yyg->yy_start = 1 + 2 * 149 #define YY_START ((yyg->yy_start - 1) / 2) 150 #define YYSTATE YY_START 153 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) 156 #define YY_NEW_FILE ematch_restart(yyin ,yyscanner ) 158 #define YY_END_OF_BUFFER_CHAR 0 167 #define YY_BUF_SIZE 32768 169 #define YY_BUF_SIZE 16384 175 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) 177 #ifndef YY_TYPEDEF_YY_BUFFER_STATE 178 #define YY_TYPEDEF_YY_BUFFER_STATE 182 #ifndef YY_TYPEDEF_YY_SIZE_T 183 #define YY_TYPEDEF_YY_SIZE_T 184 typedef size_t yy_size_t;
187 #define EOB_ACT_CONTINUE_SCAN 0 188 #define EOB_ACT_END_OF_FILE 1 189 #define EOB_ACT_LAST_MATCH 2 191 #define YY_LESS_LINENO(n) 192 #define YY_LINENO_REWIND_TO(ptr) 199 yy_size_t yyless_macro_arg = (n); \ 200 YY_LESS_LINENO(yyless_macro_arg);\ 201 *yy_cp = yyg->yy_hold_char; \ 202 YY_RESTORE_YY_MORE_OFFSET \ 203 yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ 204 YY_DO_BEFORE_ACTION; \ 208 #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) 210 #ifndef YY_STRUCT_YY_BUFFER_STATE 211 #define YY_STRUCT_YY_BUFFER_STATE 222 yy_size_t yy_buf_size;
227 yy_size_t yy_n_chars;
233 int yy_is_our_buffer;
240 int yy_is_interactive;
256 int yy_buffer_status;
258 #define YY_BUFFER_NEW 0 259 #define YY_BUFFER_NORMAL 1 270 #define YY_BUFFER_EOF_PENDING 2 281 #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ 282 ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ 288 #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] 290 void ematch_restart (FILE *input_file ,yyscan_t yyscanner );
291 void ematch__switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
292 YY_BUFFER_STATE ematch__create_buffer (FILE *file,
int size ,yyscan_t yyscanner );
293 void ematch__delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
294 void ematch__flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
295 void ematch_push_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
296 void ematch_pop_buffer_state (yyscan_t yyscanner );
298 static void ematch_ensure_buffer_stack (yyscan_t yyscanner );
299 static void ematch__load_buffer_state (yyscan_t yyscanner );
300 static void ematch__init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
302 #define YY_FLUSH_BUFFER ematch__flush_buffer(YY_CURRENT_BUFFER ,yyscanner) 304 YY_BUFFER_STATE ematch__scan_buffer (
char *base,yy_size_t size ,yyscan_t yyscanner );
305 YY_BUFFER_STATE ematch__scan_string (yyconst
char *yy_str ,yyscan_t yyscanner );
306 YY_BUFFER_STATE ematch__scan_bytes (yyconst
char *bytes,yy_size_t len ,yyscan_t yyscanner );
308 void *ematch_alloc (yy_size_t ,yyscan_t yyscanner );
309 void *ematch_realloc (
void *,yy_size_t ,yyscan_t yyscanner );
310 void ematch_free (
void * ,yyscan_t yyscanner );
312 #define yy_new_buffer ematch__create_buffer 314 #define yy_set_interactive(is_interactive) \ 316 if ( ! YY_CURRENT_BUFFER ){ \ 317 ematch_ensure_buffer_stack (yyscanner); \ 318 YY_CURRENT_BUFFER_LVALUE = \ 319 ematch__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ 321 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ 324 #define yy_set_bol(at_bol) \ 326 if ( ! YY_CURRENT_BUFFER ){\ 327 ematch_ensure_buffer_stack (yyscanner); \ 328 YY_CURRENT_BUFFER_LVALUE = \ 329 ematch__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ 331 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ 334 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) 336 #define ematch_wrap(yyscanner) (1) 337 #define YY_SKIP_YYWRAP 339 typedef unsigned char YY_CHAR;
341 typedef int yy_state_type;
343 #define yytext_ptr yytext_r 345 static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
346 static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner);
347 static int yy_get_next_buffer (yyscan_t yyscanner );
348 #if defined(__GNUC__) && __GNUC__ >= 3 349 __attribute__((__noreturn__))
351 static void yy_fatal_error (yyconst
char msg[] ,yyscan_t yyscanner );
356 #define YY_DO_BEFORE_ACTION \ 357 yyg->yytext_ptr = yy_bp; \ 358 yyleng = (size_t) (yy_cp - yy_bp); \ 359 yyg->yy_hold_char = *yy_cp; \ 361 yyg->yy_c_buf_p = yy_cp; 363 #define YY_NUM_RULES 91 364 #define YY_END_OF_BUFFER 92 369 flex_int32_t yy_verify;
372 static yyconst flex_int16_t yy_accept[393] =
374 0, 0, 0, 0, 92, 90, 1, 18, 2, 26,
375 23, 24, 30, 5, 5, 12, 8, 10, 90, 90,
376 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
377 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
378 90, 91, 3, 91, 4, 90, 1, 14, 5, 90,
379 28, 90, 29, 90, 90, 90, 40, 90, 90, 90,
380 90, 90, 15, 90, 90, 90, 90, 32, 90, 90,
381 90, 33, 90, 90, 7, 9, 90, 11, 90, 90,
382 90, 90, 90, 90, 90, 90, 90, 16, 3, 6,
383 13, 19, 37, 90, 39, 90, 90, 90, 38, 17,
385 90, 90, 42, 90, 90, 34, 35, 90, 47, 90,
386 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
387 90, 90, 31, 36, 25, 22, 90, 90, 21, 90,
388 90, 90, 90, 90, 54, 90, 90, 48, 90, 90,
389 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
390 90, 90, 90, 90, 90, 90, 86, 90, 27, 90,
391 90, 90, 90, 90, 90, 90, 49, 90, 90, 57,
392 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
393 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
394 90, 90, 90, 90, 90, 90, 90, 90, 53, 51,
396 90, 43, 90, 87, 90, 90, 90, 90, 90, 90,
397 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
398 90, 90, 90, 90, 90, 90, 90, 90, 20, 90,
399 52, 88, 90, 50, 90, 90, 90, 90, 90, 90,
400 90, 76, 90, 90, 80, 90, 90, 90, 90, 90,
401 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
402 66, 90, 90, 55, 90, 90, 90, 90, 90, 90,
403 90, 90, 90, 90, 90, 65, 90, 90, 90, 90,
404 90, 60, 90, 90, 90, 90, 90, 90, 90, 59,
405 90, 90, 41, 44, 45, 46, 56, 90, 74, 90,
407 90, 58, 90, 90, 90, 90, 62, 90, 90, 61,
408 90, 90, 90, 90, 90, 63, 90, 90, 90, 90,
409 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
410 90, 90, 90, 90, 90, 90, 90, 90, 90, 89,
411 72, 90, 90, 90, 70, 81, 82, 90, 90, 90,
412 64, 71, 83, 90, 90, 90, 90, 90, 90, 90,
413 90, 90, 90, 90, 90, 90, 90, 90, 77, 90,
414 67, 75, 90, 68, 90, 90, 78, 90, 90, 84,
415 69, 90, 90, 90, 90, 90, 90, 85, 73, 90,
420 static yyconst YY_CHAR yy_ec[256] =
422 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
423 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
424 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
425 1, 2, 4, 5, 1, 1, 1, 6, 1, 7,
426 8, 1, 9, 1, 1, 1, 1, 10, 11, 12,
427 13, 14, 14, 15, 14, 16, 14, 1, 1, 17,
428 18, 19, 1, 1, 20, 21, 22, 23, 24, 25,
429 1, 26, 27, 1, 28, 29, 30, 31, 32, 33,
430 1, 34, 35, 36, 37, 1, 1, 38, 1, 1,
431 1, 39, 1, 1, 40, 1, 41, 42, 43, 44,
433 45, 46, 47, 48, 49, 1, 50, 51, 52, 53,
434 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
435 64, 1, 1, 65, 1, 1, 1, 1, 1, 1,
436 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
437 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
438 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
439 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
440 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
441 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
442 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
444 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
445 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
446 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
447 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
448 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
452 static yyconst YY_CHAR yy_meta[66] =
454 1, 2, 3, 1, 3, 2, 2, 2, 2, 1,
455 1, 1, 1, 1, 1, 1, 2, 2, 2, 1,
456 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
457 1, 1, 1, 1, 1, 1, 1, 1, 4, 1,
458 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
459 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
463 static yyconst flex_uint16_t yy_base[396] =
465 0, 0, 63, 64, 537, 0, 68, 0, 538, 530,
466 538, 538, 538, 62, 69, 538, 538, 516, 55, 57,
467 52, 55, 60, 67, 72, 73, 64, 79, 75, 100,
468 115, 65, 83, 475, 102, 117, 118, 89, 121, 131,
469 482, 467, 0, 538, 538, 0, 133, 538, 167, 179,
470 538, 123, 0, 111, 124, 132, 516, 153, 138, 151,
471 169, 171, 0, 172, 170, 178, 171, 0, 129, 515,
472 517, 0, 469, 466, 0, 0, 485, 0, 183, 466,
473 41, 471, 186, 475, 482, 183, 480, 538, 0, 0,
474 0, 0, 0, 184, 0, 187, 189, 207, 0, 0,
476 206, 218, 0, 208, 215, 0, 0, 479, 466, 474,
477 466, 466, 194, 461, 455, 469, 461, 462, 469, 228,
478 456, 455, 0, 0, 0, 0, 226, 213, 0, 217,
479 456, 465, 464, 459, 0, 458, 438, 0, 447, 446,
480 458, 452, 439, 204, 442, 438, 237, 453, 444, 451,
481 434, 249, 236, 426, 199, 445, 0, 220, 0, 227,
482 443, 435, 425, 432, 431, 428, 0, 430, 423, 0,
483 432, 429, 427, 417, 419, 423, 417, 415, 419, 408,
484 208, 409, 152, 424, 408, 414, 406, 421, 423, 408,
485 417, 412, 415, 235, 261, 406, 413, 410, 0, 0,
487 411, 0, 397, 0, 414, 399, 399, 411, 401, 387,
488 400, 400, 406, 391, 385, 257, 400, 384, 389, 381,
489 395, 379, 258, 378, 391, 383, 375, 370, 0, 262,
490 0, 0, 392, 0, 382, 388, 386, 384, 371, 375,
491 384, 0, 379, 382, 0, 368, 365, 360, 365, 369,
492 364, 371, 375, 369, 361, 368, 355, 350, 360, 363,
493 0, 367, 361, 0, 266, 294, 361, 363, 345, 362,
494 350, 336, 342, 341, 354, 0, 345, 349, 332, 341,
495 333, 0, 350, 350, 331, 334, 336, 340, 333, 0,
496 266, 344, 0, 0, 0, 0, 0, 340, 0, 333,
498 336, 0, 336, 320, 328, 332, 0, 335, 330, 0,
499 323, 330, 325, 309, 325, 0, 324, 317, 307, 311,
500 315, 318, 310, 322, 312, 320, 306, 299, 303, 305,
501 314, 314, 300, 299, 297, 299, 304, 303, 296, 0,
502 0, 305, 293, 302, 0, 0, 0, 289, 287, 287,
503 0, 0, 0, 286, 279, 285, 283, 285, 287, 290,
504 281, 265, 275, 277, 273, 270, 266, 261, 0, 268,
505 0, 0, 264, 0, 265, 214, 0, 207, 209, 0,
506 0, 205, 170, 109, 93, 75, 53, 0, 0, 57,
507 0, 538, 325, 329, 333
511 static yyconst flex_int16_t yy_def[396] =
513 392, 1, 393, 393, 392, 394, 392, 394, 392, 392,
514 392, 392, 392, 394, 394, 392, 392, 392, 394, 394,
515 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
516 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
517 394, 392, 395, 392, 392, 394, 392, 392, 394, 394,
518 392, 394, 394, 394, 394, 394, 394, 394, 394, 394,
519 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
520 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
521 394, 394, 394, 394, 394, 394, 394, 392, 395, 50,
522 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
524 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
525 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
526 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
527 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
528 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
529 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
530 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
531 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
532 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
533 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
535 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
536 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
537 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
538 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
539 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
540 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
541 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
542 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
543 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
544 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
546 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
547 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
548 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
549 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
550 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
551 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
552 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
553 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
554 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
555 394, 0, 392, 392, 392
559 static yyconst flex_uint16_t yy_nxt[604] =
561 6, 7, 7, 8, 9, 10, 11, 12, 13, 14,
562 15, 15, 15, 15, 15, 15, 16, 17, 18, 19,
563 6, 20, 6, 21, 22, 6, 23, 6, 24, 25,
564 26, 27, 28, 6, 29, 30, 31, 6, 6, 6,
565 19, 6, 20, 32, 33, 22, 34, 6, 23, 6,
566 35, 36, 26, 27, 37, 6, 38, 39, 40, 31,
567 41, 6, 6, 6, 42, 44, 44, 45, 45, 47,
568 47, 49, 49, 49, 49, 49, 49, 49, 49, 49,
569 49, 49, 49, 49, 49, 52, 54, 55, 56, 114,
570 53, 59, 57, 58, 115, 60, 61, 63, 64, 50,
572 65, 44, 44, 391, 62, 73, 390, 52, 54, 74,
573 55, 56, 59, 53, 57, 58, 60, 61, 55, 64,
574 63, 66, 65, 67, 50, 70, 62, 71, 58, 82,
575 72, 68, 389, 69, 47, 47, 59, 64, 75, 388,
576 60, 55, 66, 92, 67, 91, 65, 83, 105, 93,
577 58, 84, 66, 68, 67, 77, 69, 79, 64, 387,
578 78, 60, 68, 94, 69, 92, 91, 80, 65, 105,
579 85, 93, 97, 86, 81, 67, 49, 49, 49, 49,
580 49, 49, 49, 96, 68, 94, 98, 69, 90, 90,
581 90, 90, 90, 90, 90, 97, 102, 217, 90, 90,
583 90, 90, 90, 90, 99, 96, 100, 101, 104, 98,
584 103, 218, 386, 123, 124, 103, 125, 97, 102, 90,
585 90, 90, 90, 90, 90, 111, 126, 99, 117, 100,
586 101, 121, 103, 104, 118, 123, 124, 103, 125, 112,
587 97, 127, 128, 129, 136, 130, 172, 126, 159, 158,
588 191, 160, 137, 194, 173, 192, 214, 385, 384, 195,
589 383, 215, 382, 128, 127, 229, 129, 130, 144, 145,
590 158, 159, 146, 147, 160, 148, 194, 176, 149, 150,
591 186, 195, 151, 187, 152, 153, 154, 229, 188, 155,
592 177, 182, 230, 183, 189, 265, 247, 257, 248, 258,
594 184, 293, 185, 294, 295, 296, 318, 249, 381, 380,
595 379, 378, 377, 376, 230, 250, 259, 375, 265, 374,
596 373, 319, 372, 371, 293, 43, 43, 43, 43, 46,
597 370, 369, 46, 89, 89, 368, 367, 366, 365, 364,
598 363, 362, 361, 360, 359, 358, 357, 356, 355, 354,
599 353, 352, 351, 350, 349, 348, 347, 346, 345, 344,
600 343, 342, 341, 340, 339, 338, 337, 336, 335, 334,
601 333, 332, 331, 330, 329, 328, 327, 326, 325, 324,
602 323, 322, 321, 320, 317, 316, 315, 314, 313, 312,
603 311, 310, 309, 308, 307, 306, 305, 304, 303, 302,
605 301, 300, 299, 298, 297, 292, 291, 290, 289, 288,
606 287, 286, 285, 284, 283, 282, 281, 280, 279, 278,
607 277, 276, 275, 274, 273, 272, 271, 270, 269, 268,
608 267, 266, 264, 263, 262, 261, 260, 256, 255, 254,
609 253, 252, 251, 246, 245, 244, 243, 242, 241, 240,
610 239, 238, 237, 236, 235, 234, 233, 232, 231, 228,
611 227, 226, 225, 224, 223, 222, 221, 220, 219, 216,
612 213, 212, 211, 210, 209, 208, 207, 206, 205, 204,
613 203, 202, 201, 200, 199, 198, 197, 196, 193, 190,
614 181, 180, 179, 178, 175, 174, 171, 170, 169, 168,
616 167, 166, 165, 164, 163, 162, 161, 157, 156, 143,
617 142, 141, 140, 139, 138, 135, 134, 133, 132, 131,
618 122, 120, 119, 116, 113, 110, 109, 108, 107, 106,
619 95, 88, 87, 76, 51, 48, 392, 5, 392, 392,
620 392, 392, 392, 392, 392, 392, 392, 392, 392, 392,
621 392, 392, 392, 392, 392, 392, 392, 392, 392, 392,
622 392, 392, 392, 392, 392, 392, 392, 392, 392, 392,
623 392, 392, 392, 392, 392, 392, 392, 392, 392, 392,
624 392, 392, 392, 392, 392, 392, 392, 392, 392, 392,
625 392, 392, 392, 392, 392, 392, 392, 392, 392, 392,
630 static yyconst flex_int16_t yy_chk[604] =
632 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
633 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
634 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
635 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
636 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
637 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
638 1, 1, 1, 1, 1, 3, 4, 3, 4, 7,
639 7, 14, 14, 14, 14, 14, 14, 14, 15, 15,
640 15, 15, 15, 15, 15, 19, 20, 21, 22, 81,
641 19, 25, 23, 24, 81, 25, 26, 27, 28, 14,
643 29, 3, 4, 390, 26, 32, 387, 19, 20, 32,
644 21, 22, 25, 19, 23, 24, 25, 26, 33, 28,
645 27, 30, 29, 30, 14, 31, 26, 31, 35, 38,
646 31, 30, 386, 30, 47, 47, 36, 37, 33, 385,
647 36, 33, 30, 54, 30, 52, 39, 38, 69, 55,
648 35, 38, 40, 30, 40, 35, 30, 36, 37, 384,
649 35, 36, 40, 56, 40, 54, 52, 37, 39, 69,
650 39, 55, 59, 40, 37, 40, 49, 49, 49, 49,
651 49, 49, 49, 58, 40, 56, 60, 40, 50, 50,
652 50, 50, 50, 50, 50, 59, 65, 183, 50, 50,
654 50, 50, 50, 50, 61, 58, 62, 64, 67, 60,
655 66, 183, 383, 94, 96, 86, 97, 79, 65, 50,
656 50, 50, 50, 50, 50, 79, 98, 61, 83, 62,
657 64, 86, 66, 67, 83, 94, 96, 86, 97, 79,
658 79, 101, 102, 104, 113, 105, 144, 98, 128, 127,
659 155, 130, 113, 158, 144, 155, 181, 382, 379, 160,
660 378, 181, 376, 102, 101, 194, 104, 105, 120, 120,
661 127, 128, 120, 120, 130, 120, 158, 147, 120, 120,
662 153, 160, 120, 153, 120, 120, 120, 194, 153, 120,
663 147, 152, 195, 152, 153, 230, 216, 223, 216, 223,
665 152, 265, 152, 266, 266, 266, 291, 216, 375, 373,
666 370, 368, 367, 366, 195, 216, 223, 365, 230, 364,
667 363, 291, 362, 361, 265, 393, 393, 393, 393, 394,
668 360, 359, 394, 395, 395, 358, 357, 356, 355, 354,
669 350, 349, 348, 344, 343, 342, 339, 338, 337, 336,
670 335, 334, 333, 332, 331, 330, 329, 328, 327, 326,
671 325, 324, 323, 322, 321, 320, 319, 318, 317, 315,
672 314, 313, 312, 311, 309, 308, 306, 305, 304, 303,
673 301, 300, 298, 292, 289, 288, 287, 286, 285, 284,
674 283, 281, 280, 279, 278, 277, 275, 274, 273, 272,
676 271, 270, 269, 268, 267, 263, 262, 260, 259, 258,
677 257, 256, 255, 254, 253, 252, 251, 250, 249, 248,
678 247, 246, 244, 243, 241, 240, 239, 238, 237, 236,
679 235, 233, 228, 227, 226, 225, 224, 222, 221, 220,
680 219, 218, 217, 215, 214, 213, 212, 211, 210, 209,
681 208, 207, 206, 205, 203, 201, 198, 197, 196, 193,
682 192, 191, 190, 189, 188, 187, 186, 185, 184, 182,
683 180, 179, 178, 177, 176, 175, 174, 173, 172, 171,
684 169, 168, 166, 165, 164, 163, 162, 161, 156, 154,
685 151, 150, 149, 148, 146, 145, 143, 142, 141, 140,
687 139, 137, 136, 134, 133, 132, 131, 122, 121, 119,
688 118, 117, 116, 115, 114, 112, 111, 110, 109, 108,
689 87, 85, 84, 82, 80, 77, 74, 73, 71, 70,
690 57, 42, 41, 34, 18, 10, 5, 392, 392, 392,
691 392, 392, 392, 392, 392, 392, 392, 392, 392, 392,
692 392, 392, 392, 392, 392, 392, 392, 392, 392, 392,
693 392, 392, 392, 392, 392, 392, 392, 392, 392, 392,
694 392, 392, 392, 392, 392, 392, 392, 392, 392, 392,
695 392, 392, 392, 392, 392, 392, 392, 392, 392, 392,
696 392, 392, 392, 392, 392, 392, 392, 392, 392, 392,
704 #define REJECT reject_used_but_not_detected 705 #define yymore() yymore_used_but_not_detected 706 #define YY_MORE_ADJ 0 707 #define YY_RESTORE_YY_MORE_OFFSET 708 #line 1 "route/cls/ematch_grammar.l" 719 #line 13 "route/cls/ematch_grammar.l" 720 #include <netlink-private/netlink.h> 721 #include <netlink-private/tc.h> 722 #include <netlink/netlink.h> 723 #include <netlink/route/cls/ematch.h> 724 #include <netlink/route/cls/ematch/cmp.h> 725 #include "ematch_syntax.h" 726 #define YY_NO_INPUT 1 728 #line 729 "route/cls/ematch_grammar.c" 733 #ifndef YY_NO_UNISTD_H 741 #ifndef YY_EXTRA_TYPE 742 #define YY_EXTRA_TYPE void * 750 YY_EXTRA_TYPE yyextra_r;
753 FILE *yyin_r, *yyout_r;
758 yy_size_t yy_n_chars;
763 int yy_did_buffer_switch_on_eof;
764 int yy_start_stack_ptr;
765 int yy_start_stack_depth;
767 yy_state_type yy_last_accepting_state;
768 char* yy_last_accepting_cpos;
781 static int yy_init_globals (yyscan_t yyscanner );
785 # define yylval yyg->yylval_r 787 int ematch_lex_init (yyscan_t* scanner);
789 int ematch_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
794 int ematch_lex_destroy (yyscan_t yyscanner );
796 int ematch_get_debug (yyscan_t yyscanner );
798 void ematch_set_debug (
int debug_flag ,yyscan_t yyscanner );
800 YY_EXTRA_TYPE ematch_get_extra (yyscan_t yyscanner );
802 void ematch_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
804 FILE *ematch_get_in (yyscan_t yyscanner );
806 void ematch_set_in (FILE * _in_str ,yyscan_t yyscanner );
808 FILE *ematch_get_out (yyscan_t yyscanner );
810 void ematch_set_out (FILE * _out_str ,yyscan_t yyscanner );
812 yy_size_t ematch_get_leng (yyscan_t yyscanner );
814 char *ematch_get_text (yyscan_t yyscanner );
816 int ematch_get_lineno (yyscan_t yyscanner );
818 void ematch_set_lineno (
int _line_number ,yyscan_t yyscanner );
820 int ematch_get_column (yyscan_t yyscanner );
822 void ematch_set_column (
int _column_no ,yyscan_t yyscanner );
824 YYSTYPE * ematch_get_lval (yyscan_t yyscanner );
826 void ematch_set_lval (
YYSTYPE * yylval_param ,yyscan_t yyscanner );
832 #ifndef YY_SKIP_YYWRAP 834 extern "C" int ematch_wrap (yyscan_t yyscanner );
836 extern int ematch_wrap (yyscan_t yyscanner );
845 static void yy_flex_strncpy (
char *,yyconst
char *,
int ,yyscan_t yyscanner);
848 #ifdef YY_NEED_STRLEN 849 static int yy_flex_strlen (yyconst
char * ,yyscan_t yyscanner);
855 static int yyinput (yyscan_t yyscanner );
857 static int input (yyscan_t yyscanner );
863 #ifndef YY_READ_BUF_SIZE 866 #define YY_READ_BUF_SIZE 16384 868 #define YY_READ_BUF_SIZE 8192 877 #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) 884 #define YY_INPUT(buf,result,max_size) \ 885 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ 889 for ( n = 0; n < max_size && \ 890 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ 893 buf[n++] = (char) c; \ 894 if ( c == EOF && ferror( yyin ) ) \ 895 YY_FATAL_ERROR( "input in flex scanner failed" ); \ 901 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ 903 if( errno != EINTR) \ 905 YY_FATAL_ERROR( "input in flex scanner failed" ); \ 921 #define yyterminate() return YY_NULL 925 #ifndef YY_START_STACK_INCR 926 #define YY_START_STACK_INCR 25 930 #ifndef YY_FATAL_ERROR 931 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) 940 #define YY_DECL_IS_OURS 1 942 extern int ematch_lex \
943 (
YYSTYPE * yylval_param ,yyscan_t yyscanner);
945 #define YY_DECL int ematch_lex \ 946 (YYSTYPE * yylval_param , yyscan_t yyscanner) 952 #ifndef YY_USER_ACTION 953 #define YY_USER_ACTION 958 #define YY_BREAK break; 961 #define YY_RULE_SETUP \ 968 yy_state_type yy_current_state;
973 yylval = yylval_param;
983 if ( ! yyg->yy_start )
992 if ( ! YY_CURRENT_BUFFER ) {
993 ematch_ensure_buffer_stack (yyscanner);
994 YY_CURRENT_BUFFER_LVALUE =
995 ematch__create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
998 ematch__load_buffer_state(yyscanner );
1002 #line 32 "route/cls/ematch_grammar.l" 1005 #line 1006 "route/cls/ematch_grammar.c" 1009 yy_cp = yyg->yy_c_buf_p;
1012 *yy_cp = yyg->yy_hold_char;
1019 yy_current_state = yyg->yy_start;
1023 YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
1024 if ( yy_accept[yy_current_state] )
1026 yyg->yy_last_accepting_state = yy_current_state;
1027 yyg->yy_last_accepting_cpos = yy_cp;
1029 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1031 yy_current_state = (int) yy_def[yy_current_state];
1032 if ( yy_current_state >= 393 )
1033 yy_c = yy_meta[(
unsigned int) yy_c];
1035 yy_current_state = yy_nxt[yy_base[yy_current_state] + (
unsigned int) yy_c];
1038 while ( yy_base[yy_current_state] != 538 );
1041 yy_act = yy_accept[yy_current_state];
1044 yy_cp = yyg->yy_last_accepting_cpos;
1045 yy_current_state = yyg->yy_last_accepting_state;
1046 yy_act = yy_accept[yy_current_state];
1049 YY_DO_BEFORE_ACTION;
1057 *yy_cp = yyg->yy_hold_char;
1058 yy_cp = yyg->yy_last_accepting_cpos;
1059 yy_current_state = yyg->yy_last_accepting_state;
1060 goto yy_find_action;
1065 #line 34 "route/cls/ematch_grammar.l" 1070 #line 36 "route/cls/ematch_grammar.l" 1072 NL_DBG(4,
"Beginning of quote\n");
1074 if (!(yylval->q.data = calloc(1, yylval->q.len)))
1077 yylval->q.index = 0;
1083 #line 46 "route/cls/ematch_grammar.l" 1085 memcpy(yylval->q.data + yylval->q.index, yytext,
1087 yylval->q.index += strlen(yytext);
1092 #line 52 "route/cls/ematch_grammar.l" 1099 #line 59 "route/cls/ematch_grammar.l" 1102 #line 59 "route/cls/ematch_grammar.l" 1104 yylval->i = strtoul(yytext, NULL, 0);
1109 #line 65 "route/cls/ematch_grammar.l" 1112 #line 65 "route/cls/ematch_grammar.l" 1116 #line 67 "route/cls/ematch_grammar.l" 1119 #line 67 "route/cls/ematch_grammar.l" 1123 #line 69 "route/cls/ematch_grammar.l" 1126 #line 69 "route/cls/ematch_grammar.l" 1130 #line 72 "route/cls/ematch_grammar.l" 1133 #line 72 "route/cls/ematch_grammar.l" 1134 { yylval->i = TCF_EM_REL_AND;
return LOGIC; }
1137 #line 74 "route/cls/ematch_grammar.l" 1140 #line 74 "route/cls/ematch_grammar.l" 1141 { yylval->i = TCF_EM_REL_OR;
return LOGIC; }
1144 #line 76 "route/cls/ematch_grammar.l" 1147 #line 76 "route/cls/ematch_grammar.l" 1152 #line 78 "route/cls/ematch_grammar.l" 1153 { yylval->i = TCF_EM_CMP;
return EMATCH_CMP; }
1157 #line 79 "route/cls/ematch_grammar.l" 1158 { yylval->i = TCF_EM_NBYTE;
return EMATCH_NBYTE; }
1162 #line 80 "route/cls/ematch_grammar.l" 1163 { yylval->i = TCF_EM_TEXT;
return EMATCH_TEXT; }
1167 #line 81 "route/cls/ematch_grammar.l" 1168 { yylval->i = TCF_EM_META;
return EMATCH_META; }
1172 #line 83 "route/cls/ematch_grammar.l" 1177 #line 84 "route/cls/ematch_grammar.l" 1181 #line 86 "route/cls/ematch_grammar.l" 1184 #line 86 "route/cls/ematch_grammar.l" 1188 #line 88 "route/cls/ematch_grammar.l" 1191 #line 88 "route/cls/ematch_grammar.l" 1196 #line 89 "route/cls/ematch_grammar.l" 1201 #line 90 "route/cls/ematch_grammar.l" 1206 #line 91 "route/cls/ematch_grammar.l" 1211 #line 92 "route/cls/ematch_grammar.l" 1216 #line 94 "route/cls/ematch_grammar.l" 1217 { yylval->i = TCF_EM_ALIGN_U8;
return ALIGN; }
1221 #line 95 "route/cls/ematch_grammar.l" 1222 { yylval->i = TCF_EM_ALIGN_U16;
return ALIGN; }
1226 #line 96 "route/cls/ematch_grammar.l" 1227 { yylval->i = TCF_EM_ALIGN_U32;
return ALIGN; }
1230 #line 99 "route/cls/ematch_grammar.l" 1233 #line 99 "route/cls/ematch_grammar.l" 1234 { yylval->i = TCF_LAYER_LINK;
return LAYER; }
1237 #line 101 "route/cls/ematch_grammar.l" 1239 #line 102 "route/cls/ematch_grammar.l" 1242 #line 102 "route/cls/ematch_grammar.l" 1243 { yylval->i = TCF_LAYER_NETWORK;
return LAYER; }
1246 #line 104 "route/cls/ematch_grammar.l" 1249 #line 104 "route/cls/ematch_grammar.l" 1250 { yylval->i = TCF_LAYER_TRANSPORT;
return LAYER; }
1254 #line 106 "route/cls/ematch_grammar.l" 1259 #line 107 "route/cls/ematch_grammar.l" 1260 return META_LOADAVG_0;
1264 #line 108 "route/cls/ematch_grammar.l" 1265 return META_LOADAVG_1;
1269 #line 109 "route/cls/ematch_grammar.l" 1270 return META_LOADAVG_2;
1274 #line 110 "route/cls/ematch_grammar.l" 1279 #line 111 "route/cls/ematch_grammar.l" 1284 #line 112 "route/cls/ematch_grammar.l" 1289 #line 113 "route/cls/ematch_grammar.l" 1290 return META_PKTTYPE;
1294 #line 114 "route/cls/ematch_grammar.l" 1299 #line 115 "route/cls/ematch_grammar.l" 1300 return META_DATALEN;
1304 #line 116 "route/cls/ematch_grammar.l" 1309 #line 117 "route/cls/ematch_grammar.l" 1314 #line 118 "route/cls/ematch_grammar.l" 1315 return META_TCINDEX;
1319 #line 119 "route/cls/ematch_grammar.l" 1320 return META_RTCLASSID;
1324 #line 120 "route/cls/ematch_grammar.l" 1329 #line 121 "route/cls/ematch_grammar.l" 1330 return META_SK_FAMILY;
1334 #line 122 "route/cls/ematch_grammar.l" 1335 return META_SK_STATE;
1339 #line 123 "route/cls/ematch_grammar.l" 1340 return META_SK_REUSE;
1344 #line 124 "route/cls/ematch_grammar.l" 1345 return META_SK_REFCNT;
1349 #line 125 "route/cls/ematch_grammar.l" 1350 return META_SK_RCVBUF;
1354 #line 126 "route/cls/ematch_grammar.l" 1355 return META_SK_SNDBUF;
1359 #line 127 "route/cls/ematch_grammar.l" 1360 return META_SK_SHUTDOWN;
1364 #line 128 "route/cls/ematch_grammar.l" 1365 return META_SK_PROTO;
1369 #line 129 "route/cls/ematch_grammar.l" 1370 return META_SK_TYPE;
1374 #line 130 "route/cls/ematch_grammar.l" 1375 return META_SK_RMEM_ALLOC;
1379 #line 131 "route/cls/ematch_grammar.l" 1380 return META_SK_WMEM_ALLOC;
1384 #line 132 "route/cls/ematch_grammar.l" 1385 return META_SK_WMEM_QUEUED;
1389 #line 133 "route/cls/ematch_grammar.l" 1390 return META_SK_RCV_QLEN;
1394 #line 134 "route/cls/ematch_grammar.l" 1395 return META_SK_SND_QLEN;
1399 #line 135 "route/cls/ematch_grammar.l" 1400 return META_SK_ERR_QLEN;
1404 #line 136 "route/cls/ematch_grammar.l" 1405 return META_SK_FORWARD_ALLOCS;
1409 #line 137 "route/cls/ematch_grammar.l" 1410 return META_SK_ALLOCS;
1414 #line 138 "route/cls/ematch_grammar.l" 1415 return META_SK_ROUTE_CAPS;
1419 #line 139 "route/cls/ematch_grammar.l" 1420 return META_SK_HASH;
1424 #line 140 "route/cls/ematch_grammar.l" 1425 return META_SK_LINGERTIME;
1429 #line 141 "route/cls/ematch_grammar.l" 1430 return META_SK_ACK_BACKLOG;
1434 #line 142 "route/cls/ematch_grammar.l" 1435 return META_SK_MAX_ACK_BACKLOG;
1439 #line 143 "route/cls/ematch_grammar.l" 1440 return META_SK_PRIO;
1444 #line 144 "route/cls/ematch_grammar.l" 1445 return META_SK_RCVLOWAT;
1449 #line 145 "route/cls/ematch_grammar.l" 1450 return META_SK_RCVTIMEO;
1454 #line 146 "route/cls/ematch_grammar.l" 1455 return META_SK_SNDTIMEO;
1459 #line 147 "route/cls/ematch_grammar.l" 1460 return META_SK_SENDMSG_OFF;
1464 #line 148 "route/cls/ematch_grammar.l" 1465 return META_SK_WRITE_PENDING;
1469 #line 149 "route/cls/ematch_grammar.l" 1474 #line 150 "route/cls/ematch_grammar.l" 1479 #line 152 "route/cls/ematch_grammar.l" 1480 return META_DEVNAME;
1484 #line 153 "route/cls/ematch_grammar.l" 1485 return META_SK_BOUND_IF;
1489 #line 156 "route/cls/ematch_grammar.l" 1491 yylval->s = strdup(yytext);
1492 if (yylval->s == NULL)
1494 NL_DBG(4,
"lex STR=%s\n", yylval->s);
1500 #line 163 "route/cls/ematch_grammar.l" 1503 #line 1504 "route/cls/ematch_grammar.c" 1504 case YY_STATE_EOF(INITIAL):
1505 case YY_STATE_EOF(QUOTE):
1508 case YY_END_OF_BUFFER:
1511 int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
1514 *yy_cp = yyg->yy_hold_char;
1515 YY_RESTORE_YY_MORE_OFFSET
1517 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1528 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1529 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1530 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1540 if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1542 yy_state_type yy_next_state;
1544 yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
1546 yy_current_state = yy_get_previous_state( yyscanner );
1557 yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
1559 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1561 if ( yy_next_state )
1564 yy_cp = ++yyg->yy_c_buf_p;
1565 yy_current_state = yy_next_state;
1571 yy_cp = yyg->yy_c_buf_p;
1572 goto yy_find_action;
1576 else switch ( yy_get_next_buffer( yyscanner ) )
1578 case EOB_ACT_END_OF_FILE:
1580 yyg->yy_did_buffer_switch_on_eof = 0;
1582 if ( ematch_wrap(yyscanner ) )
1593 yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
1595 yy_act = YY_STATE_EOF(YY_START);
1601 if ( ! yyg->yy_did_buffer_switch_on_eof )
1607 case EOB_ACT_CONTINUE_SCAN:
1609 yyg->yytext_ptr + yy_amount_of_matched_text;
1611 yy_current_state = yy_get_previous_state( yyscanner );
1613 yy_cp = yyg->yy_c_buf_p;
1614 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1617 case EOB_ACT_LAST_MATCH:
1619 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
1621 yy_current_state = yy_get_previous_state( yyscanner );
1623 yy_cp = yyg->yy_c_buf_p;
1624 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1625 goto yy_find_action;
1632 "fatal flex scanner internal error--no action found" );
1645 static int yy_get_next_buffer (yyscan_t yyscanner)
1648 char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1649 char *source = yyg->yytext_ptr;
1650 yy_size_t number_to_move, i;
1653 if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
1655 "fatal flex scanner internal error--end of buffer missed" );
1657 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1659 if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
1664 return EOB_ACT_END_OF_FILE;
1672 return EOB_ACT_LAST_MATCH;
1679 number_to_move = (yy_size_t) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
1681 for ( i = 0; i < number_to_move; ++i )
1682 *(dest++) = *(source++);
1684 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1688 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
1693 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1695 while ( num_to_read <= 0 )
1699 YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
1701 int yy_c_buf_p_offset =
1702 (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
1704 if ( b->yy_is_our_buffer )
1706 yy_size_t new_size = b->yy_buf_size * 2;
1708 if ( new_size <= 0 )
1709 b->yy_buf_size += b->yy_buf_size / 8;
1711 b->yy_buf_size *= 2;
1713 b->yy_ch_buf = (
char *)
1715 ematch_realloc((
void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
1721 if ( ! b->yy_ch_buf )
1723 "fatal error - scanner input buffer overflow" );
1725 yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1727 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1732 if ( num_to_read > YY_READ_BUF_SIZE )
1733 num_to_read = YY_READ_BUF_SIZE;
1736 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1737 yyg->yy_n_chars, num_to_read );
1739 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1742 if ( yyg->yy_n_chars == 0 )
1744 if ( number_to_move == YY_MORE_ADJ )
1746 ret_val = EOB_ACT_END_OF_FILE;
1747 ematch_restart(yyin ,yyscanner);
1752 ret_val = EOB_ACT_LAST_MATCH;
1753 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1754 YY_BUFFER_EOF_PENDING;
1759 ret_val = EOB_ACT_CONTINUE_SCAN;
1761 if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1763 yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
1764 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (
char *) ematch_realloc((
void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
1765 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1766 YY_FATAL_ERROR(
"out of dynamic memory in yy_get_next_buffer()" );
1769 yyg->yy_n_chars += number_to_move;
1770 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1771 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1773 yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1780 static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
1782 yy_state_type yy_current_state;
1786 yy_current_state = yyg->yy_start;
1788 for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
1790 YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1791 if ( yy_accept[yy_current_state] )
1793 yyg->yy_last_accepting_state = yy_current_state;
1794 yyg->yy_last_accepting_cpos = yy_cp;
1796 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1798 yy_current_state = (int) yy_def[yy_current_state];
1799 if ( yy_current_state >= 393 )
1800 yy_c = yy_meta[(
unsigned int) yy_c];
1802 yy_current_state = yy_nxt[yy_base[yy_current_state] + (
unsigned int) yy_c];
1805 return yy_current_state;
1813 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
1817 char *yy_cp = yyg->yy_c_buf_p;
1820 if ( yy_accept[yy_current_state] )
1822 yyg->yy_last_accepting_state = yy_current_state;
1823 yyg->yy_last_accepting_cpos = yy_cp;
1825 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1827 yy_current_state = (int) yy_def[yy_current_state];
1828 if ( yy_current_state >= 393 )
1829 yy_c = yy_meta[(
unsigned int) yy_c];
1831 yy_current_state = yy_nxt[yy_base[yy_current_state] + (
unsigned int) yy_c];
1832 yy_is_jam = (yy_current_state == 392);
1835 return yy_is_jam ? 0 : yy_current_state;
1844 static int yyinput (yyscan_t yyscanner)
1846 static int input (yyscan_t yyscanner)
1853 *yyg->yy_c_buf_p = yyg->yy_hold_char;
1855 if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1861 if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1863 *yyg->yy_c_buf_p =
'\0';
1867 yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
1870 switch ( yy_get_next_buffer( yyscanner ) )
1872 case EOB_ACT_LAST_MATCH:
1884 ematch_restart(yyin ,yyscanner);
1888 case EOB_ACT_END_OF_FILE:
1890 if ( ematch_wrap(yyscanner ) )
1893 if ( ! yyg->yy_did_buffer_switch_on_eof )
1896 return yyinput(yyscanner);
1898 return input(yyscanner);
1902 case EOB_ACT_CONTINUE_SCAN:
1903 yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
1909 c = *(
unsigned char *) yyg->yy_c_buf_p;
1910 *yyg->yy_c_buf_p =
'\0';
1911 yyg->yy_hold_char = *++yyg->yy_c_buf_p;
1922 void ematch_restart (FILE * input_file , yyscan_t yyscanner)
1926 if ( ! YY_CURRENT_BUFFER ){
1927 ematch_ensure_buffer_stack (yyscanner);
1928 YY_CURRENT_BUFFER_LVALUE =
1929 ematch__create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
1932 ematch__init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
1933 ematch__load_buffer_state(yyscanner );
1940 void ematch__switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
1949 ematch_ensure_buffer_stack (yyscanner);
1950 if ( YY_CURRENT_BUFFER == new_buffer )
1953 if ( YY_CURRENT_BUFFER )
1956 *yyg->yy_c_buf_p = yyg->yy_hold_char;
1957 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
1958 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1961 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1962 ematch__load_buffer_state(yyscanner );
1969 yyg->yy_did_buffer_switch_on_eof = 1;
1972 static void ematch__load_buffer_state (yyscan_t yyscanner)
1975 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1976 yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1977 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1978 yyg->yy_hold_char = *yyg->yy_c_buf_p;
1987 YY_BUFFER_STATE ematch__create_buffer (FILE * file,
int size , yyscan_t yyscanner)
1991 b = (YY_BUFFER_STATE) ematch_alloc(
sizeof(
struct yy_buffer_state ) ,yyscanner );
1993 YY_FATAL_ERROR(
"out of dynamic memory in ematch__create_buffer()" );
1995 b->yy_buf_size = (yy_size_t)size;
2000 b->yy_ch_buf = (
char *) ematch_alloc(b->yy_buf_size + 2 ,yyscanner );
2001 if ( ! b->yy_ch_buf )
2002 YY_FATAL_ERROR(
"out of dynamic memory in ematch__create_buffer()" );
2004 b->yy_is_our_buffer = 1;
2006 ematch__init_buffer(b,file ,yyscanner);
2015 void ematch__delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
2022 if ( b == YY_CURRENT_BUFFER )
2023 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
2025 if ( b->yy_is_our_buffer )
2026 ematch_free((
void *) b->yy_ch_buf ,yyscanner );
2028 ematch_free((
void *) b ,yyscanner );
2035 static void ematch__init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
2041 ematch__flush_buffer(b ,yyscanner);
2043 b->yy_input_file = file;
2044 b->yy_fill_buffer = 1;
2050 if (b != YY_CURRENT_BUFFER){
2055 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2064 void ematch__flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
2076 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2077 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2079 b->yy_buf_pos = &b->yy_ch_buf[0];
2082 b->yy_buffer_status = YY_BUFFER_NEW;
2084 if ( b == YY_CURRENT_BUFFER )
2085 ematch__load_buffer_state(yyscanner );
2094 void ematch_push_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
2097 if (new_buffer == NULL)
2100 ematch_ensure_buffer_stack(yyscanner);
2103 if ( YY_CURRENT_BUFFER )
2106 *yyg->yy_c_buf_p = yyg->yy_hold_char;
2107 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
2108 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2112 if (YY_CURRENT_BUFFER)
2114 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2117 ematch__load_buffer_state(yyscanner );
2118 yyg->yy_did_buffer_switch_on_eof = 1;
2125 void ematch_pop_buffer_state (yyscan_t yyscanner)
2128 if (!YY_CURRENT_BUFFER)
2131 ematch__delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
2132 YY_CURRENT_BUFFER_LVALUE = NULL;
2136 if (YY_CURRENT_BUFFER) {
2137 ematch__load_buffer_state(yyscanner );
2138 yyg->yy_did_buffer_switch_on_eof = 1;
2145 static void ematch_ensure_buffer_stack (yyscan_t yyscanner)
2147 yy_size_t num_to_alloc;
2161 YY_FATAL_ERROR(
"out of dynamic memory in ematch_ensure_buffer_stack()" );
2173 yy_size_t grow_size = 8 ;
2181 YY_FATAL_ERROR(
"out of dynamic memory in ematch_ensure_buffer_stack()" );
2195 YY_BUFFER_STATE ematch__scan_buffer (
char * base, yy_size_t size , yyscan_t yyscanner)
2200 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2201 base[size-1] != YY_END_OF_BUFFER_CHAR )
2205 b = (YY_BUFFER_STATE) ematch_alloc(
sizeof(
struct yy_buffer_state ) ,yyscanner );
2207 YY_FATAL_ERROR(
"out of dynamic memory in ematch__scan_buffer()" );
2209 b->yy_buf_size = size - 2;
2210 b->yy_buf_pos = b->yy_ch_buf = base;
2211 b->yy_is_our_buffer = 0;
2212 b->yy_input_file = 0;
2213 b->yy_n_chars = b->yy_buf_size;
2214 b->yy_is_interactive = 0;
2216 b->yy_fill_buffer = 0;
2217 b->yy_buffer_status = YY_BUFFER_NEW;
2219 ematch__switch_to_buffer(b ,yyscanner );
2232 YY_BUFFER_STATE ematch__scan_string (yyconst
char * yystr , yyscan_t yyscanner)
2235 return ematch__scan_bytes(yystr,strlen(yystr) ,yyscanner);
2245 YY_BUFFER_STATE ematch__scan_bytes (yyconst
char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner)
2253 n = _yybytes_len + 2;
2254 buf = (
char *) ematch_alloc(n ,yyscanner );
2256 YY_FATAL_ERROR(
"out of dynamic memory in ematch__scan_bytes()" );
2258 for ( i = 0; i < _yybytes_len; ++i )
2259 buf[i] = yybytes[i];
2261 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2263 b = ematch__scan_buffer(buf,n ,yyscanner);
2265 YY_FATAL_ERROR(
"bad buffer in ematch__scan_bytes()" );
2270 b->yy_is_our_buffer = 1;
2275 #ifndef YY_EXIT_FAILURE 2276 #define YY_EXIT_FAILURE 2 2279 static void yy_fatal_error (yyconst
char* msg , yyscan_t yyscanner)
2283 (void) fprintf( stderr,
"%s\n", msg );
2284 exit( YY_EXIT_FAILURE );
2294 yy_size_t yyless_macro_arg = (n); \ 2295 YY_LESS_LINENO(yyless_macro_arg);\ 2296 yytext[yyleng] = yyg->yy_hold_char; \ 2297 yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ 2298 yyg->yy_hold_char = *yyg->yy_c_buf_p; \ 2299 *yyg->yy_c_buf_p = '\0'; \ 2300 yyleng = yyless_macro_arg; \ 2309 YY_EXTRA_TYPE ematch_get_extra (yyscan_t yyscanner)
2318 int ematch_get_lineno (yyscan_t yyscanner)
2322 if (! YY_CURRENT_BUFFER)
2331 int ematch_get_column (yyscan_t yyscanner)
2335 if (! YY_CURRENT_BUFFER)
2344 FILE *ematch_get_in (yyscan_t yyscanner)
2353 FILE *ematch_get_out (yyscan_t yyscanner)
2362 yy_size_t ematch_get_leng (yyscan_t yyscanner)
2372 char *ematch_get_text (yyscan_t yyscanner)
2382 void ematch_set_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
2385 yyextra = user_defined ;
2392 void ematch_set_lineno (
int _line_number , yyscan_t yyscanner)
2397 if (! YY_CURRENT_BUFFER )
2398 YY_FATAL_ERROR(
"ematch_set_lineno called with no buffer" );
2400 yylineno = _line_number;
2407 void ematch_set_column (
int _column_no , yyscan_t yyscanner)
2412 if (! YY_CURRENT_BUFFER )
2413 YY_FATAL_ERROR(
"ematch_set_column called with no buffer" );
2415 yycolumn = _column_no;
2424 void ematch_set_in (FILE * _in_str , yyscan_t yyscanner)
2430 void ematch_set_out (FILE * _out_str , yyscan_t yyscanner)
2436 int ematch_get_debug (yyscan_t yyscanner)
2439 return yy_flex_debug;
2442 void ematch_set_debug (
int _bdebug , yyscan_t yyscanner)
2445 yy_flex_debug = _bdebug ;
2450 YYSTYPE * ematch_get_lval (yyscan_t yyscanner)
2456 void ematch_set_lval (
YYSTYPE * yylval_param , yyscan_t yyscanner)
2459 yylval = yylval_param;
2469 int ematch_lex_init(yyscan_t* ptr_yy_globals)
2472 if (ptr_yy_globals == NULL){
2477 *ptr_yy_globals = (yyscan_t) ematch_alloc (
sizeof(
struct yyguts_t ), NULL );
2479 if (*ptr_yy_globals == NULL){
2485 memset(*ptr_yy_globals,0x00,
sizeof(
struct yyguts_t));
2487 return yy_init_globals ( *ptr_yy_globals );
2498 int ematch_lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
2503 ematch_set_extra (yy_user_defined, &dummy_yyguts);
2505 if (ptr_yy_globals == NULL){
2510 *ptr_yy_globals = (yyscan_t) ematch_alloc (
sizeof(
struct yyguts_t ), &dummy_yyguts );
2512 if (*ptr_yy_globals == NULL){
2519 memset(*ptr_yy_globals,0x00,
sizeof(
struct yyguts_t));
2521 ematch_set_extra (yy_user_defined, *ptr_yy_globals);
2523 return yy_init_globals ( *ptr_yy_globals );
2526 static int yy_init_globals (yyscan_t yyscanner)
2536 yyg->yy_c_buf_p = (
char *) 0;
2540 yyg->yy_start_stack_ptr = 0;
2541 yyg->yy_start_stack_depth = 0;
2542 yyg->yy_start_stack = NULL;
2560 int ematch_lex_destroy (yyscan_t yyscanner)
2565 while(YY_CURRENT_BUFFER){
2566 ematch__delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
2567 YY_CURRENT_BUFFER_LVALUE = NULL;
2568 ematch_pop_buffer_state(yyscanner);
2576 ematch_free(yyg->yy_start_stack ,yyscanner );
2577 yyg->yy_start_stack = NULL;
2581 yy_init_globals( yyscanner);
2584 ematch_free ( yyscanner , yyscanner );
2594 static void yy_flex_strncpy (
char* s1, yyconst
char * s2,
int n , yyscan_t yyscanner)
2600 for ( i = 0; i < n; ++i )
2605 #ifdef YY_NEED_STRLEN 2606 static int yy_flex_strlen (yyconst
char * s , yyscan_t yyscanner)
2609 for ( n = 0; s[n]; ++n )
2616 void *ematch_alloc (yy_size_t size , yyscan_t yyscanner)
2620 return (
void *) malloc( size );
2623 void *ematch_realloc (
void * ptr, yy_size_t size , yyscan_t yyscanner)
2635 return (
void *) realloc( (
char *) ptr, size );
2638 void ematch_free (
void * ptr , yyscan_t yyscanner)
2642 free( (
char *) ptr );
2645 #define YYTABLES_NAME "yytables" 2647 #line 163 "route/cls/ematch_grammar.l"
size_t yy_buffer_stack_top
index of top of stack.
int yy_bs_lineno
The line count.
size_t yy_buffer_stack_max
capacity of stack.
int yy_bs_column
The column count.
YY_BUFFER_STATE * yy_buffer_stack
Stack as an array.