#line 2 "levcomp.lex.cc" #line 4 "levcomp.lex.cc" #define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 #define YY_FLEX_SUBMINOR_VERSION 33 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ #include #include #include #include /* end standard C headers. */ /* flex integer type definitions */ #ifndef FLEXINT_H #define FLEXINT_H /* C99 systems have . Non-C99 systems may or may not. */ #if __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include typedef int8_t flex_int8_t; typedef uint8_t flex_uint8_t; typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; #endif /* ! C99 */ /* Limits of integral types. */ #ifndef INT8_MIN #define INT8_MIN (-128) #endif #ifndef INT16_MIN #define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN #define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX #define INT8_MAX (127) #endif #ifndef INT16_MAX #define INT16_MAX (32767) #endif #ifndef INT32_MAX #define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX #define UINT8_MAX (255U) #endif #ifndef UINT16_MAX #define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX #define UINT32_MAX (4294967295U) #endif #endif /* ! FLEXINT_H */ #ifdef __cplusplus /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ #if __STDC__ #define YY_USE_CONST #endif /* __STDC__ */ #endif /* ! __cplusplus */ #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif /* Returned upon end-of-file. */ #define YY_NULL 0 /* Promotes a possibly negative, possibly signed char to an unsigned * integer for use as an array index. If the signed char is negative, * we want to instead treat it as an 8-bit unsigned char, hence the * double cast. */ #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ #define BEGIN (yy_start) = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START (((yy_start) - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ #define YY_NEW_FILE yyrestart(yyin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #ifndef YY_BUF_SIZE #define YY_BUF_SIZE 16384 #endif /* The state buf must be large enough to hold one state per character in the main buffer. */ #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif extern int yyleng; extern FILE *yyin, *yyout; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires * access to the local variable yy_act. Since yyless() is a macro, it would break * existing scanners that call yyless() from OUTSIDE yylex. * One obvious solution it to make yy_act a global. I tried that, and saw * a 5% performance hit in a non-yylineno scanner, because yy_act is * normally declared as a register variable-- so it is not worth it. */ #define YY_LESS_LINENO(n) \ do { \ int yyl;\ for ( yyl = n; yyl < yyleng; ++yyl )\ if ( yytext[yyl] == '\n' )\ --yylineno;\ }while(0) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ *yy_cp = (yy_hold_char); \ YY_RESTORE_YY_MORE_OFFSET \ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) #define unput(c) yyunput( c, (yytext_ptr) ) /* The following is because we cannot portably get our hands on size_t * (without autoconf's help, which isn't available because we want * flex-generated scanners to compile on their own). */ #ifndef YY_TYPEDEF_YY_SIZE_T #define YY_TYPEDEF_YY_SIZE_T typedef unsigned int yy_size_t; #endif #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { FILE *yy_input_file; char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process * then we mark the buffer as YY_EOF_PENDING, to indicate that we * shouldn't try reading from the input source any more. We might * still have a bunch of tokens to match, though, because of * possible backing-up. * * When we actually see the EOF, we change the status to "new" * (via yyrestart()), so that the user can continue scanning by * just pointing yyin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* Stack of input buffers. */ static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". * * Returns the top of the stack, or NULL. */ #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] /* yy_hold_char holds the character lost when yytext is formed. */ static char yy_hold_char; static int yy_n_chars; /* number of characters read into yy_ch_buf */ int yyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; static int yy_init = 0; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ /* Flag which is used to allow yywrap()'s to do buffer switches * instead of setting up a fresh yyin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; void yyrestart (FILE *input_file ); void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ); void yy_delete_buffer (YY_BUFFER_STATE b ); void yy_flush_buffer (YY_BUFFER_STATE b ); void yypush_buffer_state (YY_BUFFER_STATE new_buffer ); void yypop_buffer_state (void ); static void yyensure_buffer_stack (void ); static void yy_load_buffer_state (void ); static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ); void *yyalloc (yy_size_t ); void *yyrealloc (void *,yy_size_t ); void yyfree (void * ); #define yy_new_buffer yy_create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! YY_CURRENT_BUFFER ){ \ yyensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ yy_create_buffer(yyin,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ if ( ! YY_CURRENT_BUFFER ){\ yyensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ yy_create_buffer(yyin,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ typedef unsigned char YY_CHAR; FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; typedef int yy_state_type; extern int yylineno; int yylineno = 1; extern char *yytext; #define yytext_ptr yytext static yy_state_type yy_get_previous_state (void ); static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); static int yy_get_next_buffer (void ); static void yy_fatal_error (yyconst char msg[] ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ (yytext_ptr) = yy_bp; \ yyleng = (size_t) (yy_cp - yy_bp); \ (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; #define YY_NUM_RULES 62 #define YY_END_OF_BUFFER 63 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info { flex_int32_t yy_verify; flex_int32_t yy_nxt; }; static yyconst flex_int16_t yy_accept[782] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 61, 59, 60, 61, 57, 58, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 59, 30, 32, 61, 61, 61, 61, 61, 61, 62, 6, 62, 62, 4, 2, 3, 62, 2, 2, 2, 2, 9, 10, 62, 9, 9, 62, 12, 62, 61, 26, 61, 57, 58, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 30, 32, 61, 61, 61, 61, 61, 61, 61, 24, 21, 24, 23, 58, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 24, 30, 32, 61, 61, 61, 61, 61, 61, 14, 15, 61, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 13, 13, 13, 13, 13, 17, 19, 20, 62, 18, 62, 29, 62, 62, 59, 60, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 59, 30, 32, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 35, 6, 5, 0, 0, 2, 3, 2, 0, 2, 2, 2, 2, 9, 9, 10, 9, 9, 9, 0, 11, 12, 25, 0, 26, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 30, 25, 25, 25, 25, 25, 25, 25, 25, 0, 24, 21, 24, 21, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 30, 0, 0, 0, 0, 0, 0, 0, 35, 14, 15, 0, 15, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 13, 13, 13, 13, 13, 13, 13, 16, 0, 19, 20, 0, 0, 28, 0, 28, 0, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 9, 9, 9, 7, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 0, 0, 2, 9, 8, 9, 7, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 0, 0, 25, 25, 25, 25, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 0, 0, 22, 22, 22, 22, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 0, 0, 0, 51, 0, 0, 0, 0, 50, 38, 0, 0, 0, 0, 0, 47, 0, 0, 0, 34, 0, 0, 0, 0, 2, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 0, 25, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 0, 22, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 0, 40, 46, 54, 55, 56, 0, 0, 0, 42, 0, 48, 0, 0, 0, 0, 0, 37, 1, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 44, 52, 49, 41, 0, 45, 0, 0, 0, 0, 1, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 13, 13, 13, 13, 13, 53, 43, 0, 0, 0, 0, 25, 25, 25, 0, 25, 25, 22, 22, 22, 0, 22, 22, 13, 13, 0, 33, 0, 0, 25, 25, 0, 25, 22, 22, 0, 22, 13, 0, 36, 25, 25, 22, 22, 13, 0, 25, 22, 13, 0, 25, 22, 13, 0, 25, 22, 13, 39, 25, 22, 0 } ; static yyconst flex_int32_t yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 6, 1, 1, 1, 1, 1, 1, 1, 1, 7, 8, 1, 1, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 1, 1, 1, 1, 1, 1, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 20, 27, 28, 29, 30, 20, 31, 20, 20, 20, 1, 32, 1, 1, 20, 1, 33, 20, 20, 34, 35, 36, 20, 37, 38, 20, 20, 39, 20, 20, 40, 41, 20, 42, 43, 44, 45, 46, 20, 20, 20, 20, 47, 1, 48, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } ; static yyconst flex_int32_t yy_meta[49] = { 0, 1, 2, 3, 4, 1, 1, 5, 6, 6, 1, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 1, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 1, 1 } ; static yyconst flex_int16_t yy_base[806] = { 0, 0, 34, 80, 85, 89, 91, 7, 14, 138, 172, 219, 253, 301, 348, 94, 100, 106, 112, 2034, 2035, 10, 2035, 2030, 2035, 2023, 2013, 2015, 2007, 1999, 95, 95, 97, 2000, 2004, 2, 2014, 2009, 1988, 394, 0, 2035, 101, 1977, 1979, 90, 84, 1973, 2035, 2035, 2016, 118, 2035, 0, 2035, 2015, 357, 0, 1993, 112, 1968, 2035, 2012, 81, 1966, 2010, 2035, 2009, 144, 2035, 2008, 166, 225, 361, 365, 370, 379, 401, 405, 410, 421, 427, 432, 440, 450, 454, 247, 459, 465, 469, 473, 477, 483, 489, 0, 493, 2035, 499, 2035, 2001, 1991, 1993, 1985, 1977, 137, 125, 340, 1978, 1982, 207, 1992, 1987, 1966, 503, 23, 0, 353, 1955, 1957, 333, 206, 1951, 507, 2035, 1994, 0, 1987, 1977, 1979, 1971, 1963, 374, 377, 390, 1964, 1968, 355, 1978, 1973, 1952, 519, 402, 1941, 1943, 334, 433, 350, 523, 2035, 1981, 2035, 379, 2035, 425, 481, 417, 2035, 1974, 1971, 1955, 1969, 1964, 1963, 1948, 1951, 1945, 1944, 1944, 1936, 1937, 1944, 1924, 1936, 1927, 424, 1907, 0, 0, 2035, 1897, 1894, 484, 1883, 0, 104, 1892, 1884, 1907, 437, 1868, 1862, 2035, 2035, 2035, 1902, 526, 0, 2035, 0, 1891, 529, 1819, 1808, 520, 1783, 1782, 2035, 188, 1781, 535, 1824, 2035, 2035, 537, 541, 2035, 545, 551, 555, 562, 567, 572, 584, 589, 593, 597, 601, 605, 613, 623, 634, 638, 642, 647, 651, 656, 663, 668, 672, 676, 680, 684, 694, 688, 698, 546, 710, 2035, 714, 2035, 556, 573, 628, 699, 614, 719, 718, 606, 621, 704, 720, 724, 733, 734, 735, 739, 744, 748, 753, 0, 755, 761, 766, 767, 771, 772, 773, 778, 779, 788, 2035, 1823, 2035, 0, 1814, 1806, 1785, 1795, 1790, 1776, 1750, 1753, 1750, 1734, 1725, 1706, 1716, 1720, 1700, 1712, 1699, 775, 1676, 0, 553, 1675, 1660, 1683, 449, 1642, 1631, 796, 798, 802, 2035, 1660, 609, 2035, 806, 2035, 811, 2035, 1631, 1613, 1623, 1609, 1617, 1609, 1596, 1595, 1582, 1576, 1572, 1568, 1559, 1547, 1530, 1526, 1528, 1528, 1504, 815, 819, 1493, 1499, 1479, 1473, 1486, 823, 827, 831, 2035, 835, 840, 844, 849, 853, 858, 863, 872, 876, 880, 884, 895, 901, 907, 911, 915, 920, 925, 929, 942, 946, 950, 954, 959, 963, 845, 889, 916, 955, 964, 930, 968, 970, 972, 981, 985, 986, 993, 1002, 1006, 1004, 1010, 1016, 1020, 1021, 1022, 1026, 1037, 1027, 1041, 1043, 1045, 1047, 1049, 1055, 1480, 1467, 1474, 1457, 1457, 1449, 1434, 1435, 1422, 1423, 1416, 1407, 1390, 1383, 1367, 1363, 1361, 1364, 1338, 1056, 1060, 1327, 1339, 1323, 1317, 1340, 1331, 1317, 1330, 1307, 1309, 1302, 1309, 1300, 1299, 1276, 1275, 1280, 1260, 1233, 1245, 1227, 1211, 1180, 1061, 2035, 1066, 1174, 1171, 1178, 1070, 1197, 1074, 2035, 1079, 2035, 1081, 1087, 1095, 1099, 1106, 1110, 1114, 1124, 1136, 1143, 1132, 1147, 1152, 1157, 1161, 1170, 1174, 1179, 1183, 1191, 1195, 1201, 1205, 1209, 1213, 1119, 1184, 1196, 1217, 1091, 1218, 1224, 1153, 1228, 1229, 1230, 1235, 1242, 1249, 1244, 1251, 1261, 1262, 1266, 1267, 1272, 1273, 1278, 1279, 1280, 1178, 1164, 1149, 1160, 1140, 1141, 1122, 1129, 1133, 1121, 1102, 1101, 1091, 1086, 1069, 1078, 1060, 1048, 1022, 1008, 1007, 1284, 1021, 1025, 1006, 2035, 1004, 1000, 990, 972, 2035, 2035, 965, 963, 972, 956, 966, 2035, 942, 926, 903, 2035, 907, 903, 1286, 881, 900, 1288, 1292, 1296, 1303, 1312, 1324, 1333, 1337, 1342, 1346, 1350, 1354, 1358, 1365, 1370, 1380, 1384, 1388, 1392, 1396, 1400, 1404, 1410, 1414, 1310, 1371, 1415, 1316, 1419, 1425, 1431, 1405, 1421, 1437, 1438, 1442, 1443, 1444, 1449, 1450, 1458, 1460, 1467, 1468, 1473, 1472, 1474, 1479, 893, 897, 892, 891, 882, 880, 856, 841, 827, 842, 819, 825, 802, 804, 784, 785, 777, 786, 2035, 2035, 2035, 2035, 2035, 776, 775, 769, 2035, 749, 2035, 746, 733, 698, 696, 686, 2035, 703, 1484, 1488, 1493, 1497, 1506, 1510, 1514, 1518, 1525, 1529, 1534, 1538, 1542, 1546, 1551, 1555, 1560, 1564, 1565, 1480, 1498, 1569, 1571, 1575, 1576, 1577, 1583, 1587, 1592, 1594, 1596, 1598, 1600, 1606, 1607, 1612, 687, 673, 669, 665, 656, 653, 647, 613, 610, 593, 2035, 2035, 2035, 2035, 612, 2035, 594, 592, 1613, 561, 587, 1617, 1621, 1625, 1629, 1633, 1643, 1648, 1657, 1652, 1662, 1634, 1644, 1666, 1667, 1668, 1672, 1674, 1678, 1680, 1685, 580, 575, 562, 1686, 533, 2035, 2035, 518, 1687, 497, 1691, 1696, 1700, 1705, 1709, 1713, 1717, 1701, 1721, 1723, 1727, 1735, 1739, 465, 1740, 418, 2035, 1741, 400, 1745, 1749, 1757, 1761, 1750, 1765, 1766, 1767, 404, 357, 2035, 1771, 1779, 1787, 1788, 345, 202, 1792, 1793, 121, 121, 1797, 1798, 98, 23, 1805, 1814, 12, 2035, 1816, 1820, 2035, 1837, 1843, 1849, 1855, 1861, 1867, 1873, 1879, 1885, 1891, 1897, 1903, 1909, 1915, 1921, 1927, 1933, 1939, 1945, 0, 1951, 1957, 1963, 1969 } ; static yyconst flex_int16_t yy_def[806] = { 0, 782, 781, 783, 784, 785, 785, 786, 786, 787, 781, 788, 781, 781, 13, 789, 789, 790, 790, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 791, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 792, 781, 793, 781, 781, 794, 793, 793, 793, 795, 781, 781, 795, 795, 796, 781, 781, 797, 781, 781, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 798, 797, 797, 797, 797, 797, 797, 797, 799, 781, 781, 781, 781, 799, 799, 799, 799, 799, 799, 799, 799, 799, 799, 799, 799, 799, 799, 39, 800, 799, 799, 799, 799, 799, 799, 799, 781, 781, 781, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 39, 801, 801, 801, 801, 801, 802, 781, 781, 781, 781, 803, 781, 803, 803, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 39, 791, 781, 781, 781, 781, 781, 791, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 793, 781, 793, 781, 793, 793, 793, 793, 795, 795, 781, 795, 795, 795, 796, 781, 781, 797, 797, 781, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 798, 798, 797, 797, 797, 797, 797, 797, 797, 797, 804, 781, 781, 781, 781, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 113, 805, 804, 804, 804, 804, 804, 804, 804, 804, 781, 781, 781, 781, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 140, 801, 801, 801, 801, 801, 801, 801, 802, 802, 781, 781, 781, 803, 781, 803, 781, 803, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 793, 795, 795, 795, 781, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 805, 804, 804, 804, 804, 804, 804, 804, 804, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 793, 795, 781, 795, 781, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 793, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 793, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 793, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 801, 801, 801, 801, 801, 781, 781, 781, 781, 781, 781, 797, 797, 797, 797, 797, 797, 804, 804, 804, 804, 804, 804, 801, 801, 781, 781, 781, 781, 797, 797, 797, 797, 804, 804, 804, 804, 801, 781, 781, 797, 797, 804, 804, 801, 781, 797, 804, 801, 781, 797, 804, 801, 781, 797, 804, 801, 781, 797, 804, 0, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781 } ; static yyconst flex_int16_t yy_nxt[2084] = { 0, 781, 21, 22, 23, 21, 283, 24, 781, 25, 66, 67, 155, 26, 27, 155, 28, 66, 67, 29, 171, 30, 778, 31, 32, 33, 34, 183, 35, 36, 183, 37, 172, 778, 38, 20, 39, 22, 23, 39, 40, 24, 20, 25, 41, 20, 20, 26, 27, 20, 28, 20, 20, 29, 20, 30, 20, 42, 32, 33, 34, 20, 35, 36, 20, 37, 20, 20, 38, 20, 20, 20, 20, 43, 20, 44, 20, 45, 20, 20, 46, 47, 20, 49, 50, 51, 52, 48, 54, 55, 56, 57, 61, 62, 61, 62, 147, 148, 149, 147, 58, 150, 147, 148, 149, 147, 165, 150, 167, 152, 153, 162, 184, 187, 163, 152, 153, 189, 164, 190, 166, 192, 194, 195, 207, 168, 166, 202, 59, 208, 341, 329, 63, 188, 63, 777, 258, 64, 154, 64, 21, 69, 70, 21, 154, 71, 214, 72, 214, 214, 259, 73, 74, 255, 75, 203, 256, 76, 774, 77, 257, 78, 79, 80, 81, 773, 82, 83, 214, 84, 214, 214, 85, 68, 39, 69, 70, 39, 86, 71, 68, 72, 87, 68, 68, 73, 74, 68, 75, 68, 68, 76, 68, 77, 68, 88, 79, 80, 81, 68, 82, 83, 68, 84, 68, 68, 85, 68, 68, 68, 68, 89, 68, 90, 68, 91, 68, 68, 92, 93, 68, 95, 96, 97, 95, 264, 98, 214, 99, 214, 214, 207, 100, 101, 216, 102, 208, 265, 103, 276, 104, 277, 105, 106, 107, 108, 770, 109, 110, 236, 111, 236, 236, 112, 94, 113, 96, 97, 113, 114, 98, 94, 99, 115, 94, 94, 100, 101, 94, 102, 94, 94, 103, 94, 104, 94, 116, 106, 107, 108, 94, 109, 110, 94, 111, 94, 94, 112, 94, 94, 94, 94, 117, 94, 118, 94, 119, 94, 94, 120, 121, 94, 20, 122, 123, 124, 122, 20, 24, 125, 126, 20, 125, 125, 127, 128, 125, 129, 125, 125, 130, 125, 131, 125, 132, 133, 134, 135, 125, 136, 137, 125, 138, 20, 125, 139, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 20, 20, 140, 260, 312, 140, 40, 312, 274, 307, 41, 193, 197, 199, 200, 214, 271, 214, 214, 214, 261, 214, 214, 141, 214, 298, 214, 214, 275, 308, 259, 217, 218, 214, 317, 214, 214, 299, 769, 142, 292, 143, 289, 144, 219, 290, 145, 47, 176, 291, 766, 176, 177, 294, 293, 214, 178, 214, 214, 214, 220, 214, 214, 318, 214, 304, 214, 214, 224, 221, 295, 155, 222, 226, 155, 214, 223, 214, 214, 293, 319, 214, 225, 214, 214, 179, 214, 180, 214, 214, 227, 765, 181, 182, 214, 338, 214, 214, 339, 760, 228, 229, 230, 232, 214, 759, 214, 214, 214, 318, 214, 214, 187, 214, 231, 214, 214, 233, 309, 214, 310, 214, 214, 214, 307, 214, 214, 214, 237, 214, 214, 214, 188, 214, 214, 320, 321, 214, 320, 214, 214, 234, 225, 214, 308, 214, 214, 246, 247, 248, 246, 758, 240, 248, 249, 248, 248, 269, 247, 248, 269, 279, 280, 281, 279, 318, 238, 239, 242, 189, 243, 190, 241, 303, 280, 281, 303, 313, 314, 315, 313, 192, 194, 195, 197, 199, 200, 202, 244, 350, 351, 214, 350, 214, 214, 214, 747, 214, 214, 214, 245, 214, 214, 245, 746, 214, 216, 214, 214, 214, 245, 214, 214, 245, 352, 203, 214, 378, 214, 214, 745, 214, 744, 214, 214, 354, 214, 245, 214, 214, 245, 426, 414, 353, 355, 348, 379, 727, 214, 356, 214, 214, 726, 214, 700, 214, 214, 214, 731, 214, 214, 214, 728, 214, 214, 214, 727, 214, 214, 214, 245, 214, 214, 245, 317, 357, 358, 214, 245, 214, 214, 245, 359, 360, 726, 245, 361, 214, 245, 214, 214, 382, 245, 385, 363, 245, 364, 362, 214, 725, 214, 214, 214, 318, 214, 214, 214, 724, 214, 214, 386, 214, 366, 214, 214, 214, 380, 214, 214, 723, 236, 367, 236, 236, 722, 695, 365, 236, 368, 236, 236, 369, 214, 721, 214, 214, 214, 693, 214, 214, 214, 692, 214, 214, 214, 691, 214, 214, 214, 370, 214, 214, 214, 374, 214, 214, 371, 359, 214, 690, 214, 214, 214, 245, 214, 214, 245, 372, 245, 240, 700, 245, 381, 373, 246, 247, 248, 246, 248, 247, 248, 248, 245, 245, 245, 245, 245, 245, 245, 241, 387, 245, 699, 698, 376, 375, 383, 245, 245, 245, 245, 245, 245, 245, 697, 388, 245, 391, 245, 384, 696, 245, 245, 393, 390, 245, 389, 245, 695, 270, 245, 183, 270, 394, 183, 245, 694, 392, 245, 395, 245, 245, 396, 245, 245, 245, 245, 245, 245, 245, 245, 693, 245, 245, 402, 245, 245, 692, 691, 399, 386, 397, 279, 280, 281, 279, 423, 403, 690, 424, 312, 400, 312, 312, 401, 312, 313, 314, 315, 313, 320, 321, 689, 320, 405, 320, 321, 404, 320, 451, 452, 688, 451, 453, 406, 687, 453, 459, 460, 686, 459, 461, 462, 685, 461, 350, 351, 636, 350, 214, 318, 214, 214, 684, 214, 318, 214, 214, 214, 245, 214, 214, 245, 214, 634, 214, 214, 214, 683, 214, 214, 463, 214, 465, 214, 214, 467, 214, 454, 214, 214, 464, 682, 348, 466, 468, 214, 348, 214, 214, 214, 205, 214, 214, 214, 681, 214, 214, 214, 469, 214, 214, 630, 245, 629, 470, 245, 472, 473, 214, 378, 214, 214, 628, 627, 214, 471, 214, 214, 626, 680, 214, 474, 214, 214, 214, 475, 214, 214, 214, 245, 214, 214, 245, 214, 476, 214, 214, 643, 214, 642, 214, 214, 214, 245, 214, 214, 245, 641, 479, 480, 477, 488, 640, 639, 478, 482, 452, 214, 482, 483, 638, 214, 483, 214, 491, 214, 214, 214, 245, 214, 214, 245, 214, 481, 214, 214, 214, 245, 214, 214, 245, 245, 637, 245, 245, 245, 245, 636, 245, 635, 492, 371, 490, 634, 245, 489, 493, 245, 245, 245, 485, 245, 245, 633, 484, 632, 245, 494, 486, 245, 631, 630, 497, 495, 487, 245, 498, 245, 245, 245, 245, 629, 245, 245, 496, 628, 245, 627, 499, 245, 500, 501, 245, 245, 245, 245, 245, 245, 245, 270, 508, 183, 270, 508, 183, 505, 626, 625, 504, 502, 507, 452, 624, 507, 245, 503, 245, 245, 245, 245, 245, 245, 245, 245, 623, 245, 506, 402, 245, 451, 452, 245, 451, 453, 451, 452, 453, 451, 622, 453, 399, 403, 453, 557, 621, 509, 557, 459, 460, 620, 459, 510, 461, 462, 214, 461, 214, 214, 511, 550, 214, 404, 214, 214, 245, 560, 512, 245, 214, 619, 214, 214, 214, 618, 214, 214, 561, 617, 454, 214, 563, 214, 214, 214, 454, 214, 214, 214, 558, 214, 214, 588, 245, 205, 562, 245, 616, 214, 205, 214, 214, 615, 544, 584, 565, 214, 564, 214, 214, 214, 567, 214, 214, 566, 543, 614, 214, 568, 214, 214, 214, 613, 214, 214, 569, 214, 245, 214, 214, 245, 214, 570, 214, 214, 214, 612, 214, 214, 572, 591, 611, 538, 571, 214, 573, 214, 214, 214, 610, 214, 214, 575, 214, 609, 214, 214, 214, 245, 214, 214, 245, 574, 608, 576, 482, 452, 214, 482, 483, 245, 214, 483, 245, 585, 214, 577, 214, 214, 214, 559, 214, 214, 214, 556, 214, 214, 582, 555, 214, 582, 245, 245, 554, 245, 245, 586, 553, 245, 587, 578, 245, 245, 245, 245, 245, 245, 245, 552, 245, 592, 593, 245, 589, 484, 581, 245, 551, 245, 245, 579, 245, 580, 245, 590, 245, 245, 550, 245, 596, 594, 595, 583, 599, 549, 245, 245, 597, 245, 245, 245, 507, 452, 245, 507, 598, 508, 245, 548, 508, 245, 600, 245, 245, 606, 245, 245, 606, 557, 601, 557, 557, 214, 557, 214, 214, 214, 547, 214, 214, 214, 546, 214, 214, 645, 644, 545, 214, 646, 214, 214, 544, 543, 602, 245, 605, 214, 245, 214, 214, 245, 509, 603, 245, 647, 604, 542, 662, 214, 607, 214, 214, 541, 558, 540, 558, 648, 214, 539, 214, 214, 214, 538, 214, 214, 649, 214, 537, 214, 214, 214, 536, 214, 214, 214, 535, 214, 214, 214, 534, 214, 214, 214, 533, 214, 214, 650, 426, 532, 214, 653, 214, 214, 531, 214, 245, 214, 214, 245, 530, 529, 651, 655, 663, 214, 652, 214, 214, 214, 654, 214, 214, 214, 528, 214, 214, 214, 527, 214, 214, 214, 526, 214, 214, 214, 525, 214, 214, 214, 245, 214, 214, 245, 657, 582, 656, 214, 582, 214, 245, 214, 214, 245, 245, 524, 245, 245, 664, 245, 245, 523, 665, 245, 658, 668, 245, 659, 666, 245, 660, 522, 245, 245, 667, 245, 245, 245, 245, 245, 245, 245, 245, 521, 245, 245, 671, 245, 245, 520, 583, 519, 673, 245, 661, 245, 245, 518, 245, 672, 669, 517, 245, 245, 670, 245, 245, 245, 245, 606, 245, 245, 606, 516, 245, 245, 675, 245, 245, 214, 674, 214, 214, 214, 515, 214, 214, 701, 214, 514, 214, 214, 214, 245, 214, 214, 245, 513, 678, 676, 677, 214, 458, 214, 214, 214, 457, 214, 214, 214, 456, 214, 214, 214, 607, 214, 214, 702, 341, 679, 214, 703, 214, 214, 214, 455, 214, 214, 704, 214, 450, 214, 214, 214, 449, 214, 214, 214, 448, 214, 214, 214, 705, 214, 214, 706, 214, 447, 214, 214, 214, 446, 214, 214, 707, 214, 445, 214, 214, 214, 245, 214, 214, 245, 245, 444, 245, 245, 711, 245, 245, 245, 245, 245, 245, 245, 443, 442, 245, 712, 713, 245, 245, 709, 441, 245, 714, 245, 708, 245, 245, 245, 245, 245, 245, 245, 245, 710, 245, 716, 715, 245, 245, 440, 245, 245, 717, 245, 729, 439, 245, 729, 214, 438, 214, 214, 214, 437, 214, 214, 214, 436, 214, 214, 214, 435, 214, 214, 214, 245, 214, 214, 245, 434, 719, 433, 732, 718, 214, 245, 214, 214, 245, 214, 720, 214, 214, 735, 432, 214, 735, 733, 214, 730, 214, 214, 314, 214, 734, 214, 214, 245, 245, 245, 245, 245, 245, 245, 431, 245, 245, 738, 245, 245, 430, 741, 245, 739, 741, 740, 245, 729, 729, 245, 729, 729, 748, 429, 428, 748, 737, 214, 736, 214, 214, 214, 245, 214, 214, 245, 214, 427, 214, 214, 735, 425, 214, 735, 214, 422, 214, 214, 752, 743, 214, 752, 245, 421, 245, 245, 742, 245, 741, 420, 419, 741, 730, 730, 418, 417, 245, 749, 750, 245, 756, 748, 748, 756, 748, 748, 214, 416, 214, 214, 214, 245, 214, 214, 245, 736, 754, 415, 752, 751, 214, 752, 214, 753, 214, 214, 245, 756, 245, 245, 756, 245, 214, 742, 214, 214, 414, 413, 412, 761, 214, 755, 214, 214, 763, 757, 749, 749, 245, 245, 411, 245, 245, 214, 245, 214, 214, 245, 214, 245, 214, 214, 245, 753, 410, 409, 214, 762, 214, 214, 408, 767, 757, 764, 779, 245, 407, 214, 245, 214, 214, 245, 284, 780, 245, 280, 211, 768, 349, 348, 205, 201, 347, 775, 776, 771, 772, 20, 20, 20, 20, 20, 20, 48, 48, 48, 48, 48, 48, 53, 53, 53, 53, 53, 53, 60, 60, 60, 60, 60, 60, 65, 65, 65, 65, 65, 65, 68, 68, 68, 68, 68, 68, 94, 94, 94, 94, 94, 94, 146, 146, 146, 146, 146, 146, 151, 151, 151, 151, 151, 151, 183, 183, 197, 183, 183, 183, 193, 193, 193, 193, 193, 193, 196, 192, 346, 345, 196, 196, 198, 198, 198, 198, 198, 198, 204, 204, 344, 343, 204, 204, 210, 210, 210, 342, 210, 210, 213, 213, 191, 213, 213, 213, 235, 235, 186, 235, 235, 235, 245, 245, 185, 340, 337, 245, 270, 270, 336, 270, 270, 270, 311, 311, 335, 334, 333, 311, 316, 316, 316, 316, 316, 316, 377, 377, 332, 331, 330, 377, 398, 398, 329, 398, 398, 398, 328, 327, 326, 325, 324, 323, 322, 157, 314, 306, 305, 302, 301, 300, 297, 296, 288, 287, 286, 285, 284, 282, 278, 273, 272, 268, 267, 266, 263, 262, 254, 253, 252, 251, 250, 215, 212, 211, 209, 206, 205, 201, 197, 192, 191, 186, 185, 175, 174, 173, 170, 169, 161, 160, 159, 158, 157, 156, 781, 19, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781 } ; static yyconst flex_int16_t yy_chk[2084] = { 0, 0, 1, 1, 1, 1, 801, 1, 0, 1, 7, 7, 21, 1, 1, 21, 1, 8, 8, 1, 35, 1, 777, 1, 1, 1, 1, 114, 1, 1, 114, 1, 35, 774, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 6, 6, 15, 15, 15, 15, 4, 15, 16, 16, 16, 16, 31, 16, 32, 17, 17, 30, 42, 45, 30, 18, 18, 46, 30, 46, 31, 51, 51, 51, 63, 32, 42, 59, 4, 63, 184, 184, 5, 45, 6, 773, 105, 5, 17, 6, 9, 9, 9, 9, 18, 9, 68, 9, 68, 68, 105, 9, 9, 104, 9, 59, 104, 9, 770, 9, 104, 9, 9, 9, 9, 769, 9, 9, 71, 9, 71, 71, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 109, 11, 72, 11, 72, 72, 207, 11, 11, 72, 11, 207, 109, 11, 120, 11, 120, 11, 11, 11, 11, 766, 11, 11, 86, 11, 86, 86, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 106, 146, 14, 14, 146, 119, 144, 14, 56, 56, 56, 56, 73, 116, 73, 73, 74, 106, 74, 74, 14, 75, 136, 75, 75, 119, 144, 116, 73, 74, 76, 151, 76, 76, 136, 765, 14, 132, 14, 131, 14, 75, 131, 14, 14, 39, 131, 759, 39, 39, 133, 132, 77, 39, 77, 77, 78, 76, 78, 78, 151, 79, 141, 79, 79, 78, 77, 133, 155, 77, 79, 155, 80, 77, 80, 80, 141, 153, 81, 78, 81, 81, 39, 82, 39, 82, 82, 79, 758, 39, 39, 83, 174, 83, 83, 174, 749, 80, 81, 82, 83, 84, 746, 84, 84, 85, 153, 85, 85, 188, 87, 82, 87, 87, 84, 145, 88, 145, 88, 88, 89, 308, 89, 89, 90, 88, 90, 90, 91, 188, 91, 91, 154, 154, 92, 154, 92, 92, 85, 88, 93, 308, 93, 93, 95, 95, 95, 95, 744, 91, 97, 97, 97, 97, 113, 113, 113, 113, 122, 122, 122, 122, 154, 89, 90, 92, 181, 92, 181, 91, 140, 140, 140, 140, 147, 147, 147, 147, 195, 195, 195, 200, 200, 200, 203, 93, 209, 209, 213, 209, 213, 213, 214, 730, 214, 214, 216, 245, 216, 216, 245, 728, 217, 216, 217, 217, 218, 250, 218, 218, 250, 217, 203, 219, 250, 219, 219, 725, 220, 723, 220, 220, 219, 221, 251, 221, 221, 251, 304, 304, 218, 220, 209, 251, 722, 222, 221, 222, 222, 721, 223, 700, 223, 223, 224, 699, 224, 224, 225, 697, 225, 225, 226, 696, 226, 226, 227, 257, 227, 227, 257, 316, 222, 223, 228, 254, 228, 228, 254, 224, 225, 694, 258, 226, 229, 258, 229, 229, 254, 252, 257, 228, 252, 229, 227, 230, 689, 230, 230, 231, 316, 231, 231, 232, 688, 232, 232, 258, 233, 231, 233, 233, 234, 252, 234, 234, 687, 235, 232, 235, 235, 686, 685, 230, 236, 233, 236, 236, 233, 237, 684, 237, 237, 238, 683, 238, 238, 239, 682, 239, 239, 240, 681, 240, 240, 241, 234, 241, 241, 243, 240, 243, 243, 237, 237, 242, 680, 242, 242, 244, 253, 244, 244, 253, 238, 259, 241, 643, 259, 253, 239, 246, 246, 246, 246, 248, 248, 248, 248, 256, 255, 260, 256, 255, 260, 261, 241, 259, 261, 641, 640, 243, 242, 255, 262, 263, 264, 262, 263, 264, 265, 639, 260, 265, 263, 266, 256, 638, 266, 267, 265, 262, 267, 261, 268, 637, 270, 268, 270, 270, 266, 270, 271, 635, 264, 271, 267, 272, 273, 267, 272, 273, 274, 275, 276, 274, 275, 276, 633, 277, 278, 274, 277, 278, 632, 631, 271, 271, 268, 279, 279, 279, 279, 301, 275, 625, 301, 311, 272, 312, 311, 273, 312, 313, 313, 313, 313, 318, 318, 624, 318, 276, 320, 320, 275, 320, 341, 341, 623, 341, 342, 277, 622, 342, 348, 348, 621, 348, 349, 349, 620, 349, 350, 350, 619, 350, 352, 318, 352, 352, 618, 353, 320, 353, 353, 354, 377, 354, 354, 377, 355, 617, 355, 355, 356, 616, 356, 356, 352, 357, 354, 357, 357, 356, 358, 342, 358, 358, 353, 615, 348, 355, 357, 359, 349, 359, 359, 360, 350, 360, 360, 361, 614, 361, 361, 362, 358, 362, 362, 613, 378, 612, 359, 378, 361, 362, 363, 378, 363, 363, 611, 610, 364, 360, 364, 364, 609, 608, 365, 363, 365, 365, 366, 364, 366, 366, 367, 379, 367, 367, 379, 368, 365, 368, 368, 559, 369, 558, 369, 369, 370, 382, 370, 370, 382, 556, 368, 369, 366, 379, 555, 553, 367, 371, 371, 371, 371, 372, 552, 372, 372, 373, 382, 373, 373, 374, 380, 374, 374, 380, 375, 370, 375, 375, 376, 381, 376, 376, 381, 383, 551, 384, 383, 385, 384, 549, 385, 548, 383, 374, 381, 547, 386, 380, 384, 386, 387, 388, 373, 387, 388, 546, 372, 545, 389, 385, 375, 389, 542, 541, 388, 386, 376, 390, 389, 392, 390, 391, 392, 540, 391, 393, 387, 539, 393, 537, 390, 394, 391, 392, 394, 395, 396, 397, 395, 396, 397, 398, 400, 398, 398, 400, 398, 396, 536, 535, 395, 393, 399, 399, 533, 399, 401, 394, 402, 401, 403, 402, 404, 403, 405, 404, 532, 405, 397, 403, 406, 426, 426, 406, 426, 427, 451, 451, 427, 451, 531, 453, 402, 404, 453, 457, 530, 400, 457, 459, 459, 529, 459, 401, 461, 461, 463, 461, 463, 463, 405, 528, 464, 404, 464, 464, 492, 463, 406, 492, 465, 527, 465, 465, 466, 526, 466, 466, 464, 525, 427, 467, 466, 467, 467, 468, 453, 468, 468, 469, 457, 469, 469, 492, 488, 459, 465, 488, 524, 470, 461, 470, 470, 523, 522, 488, 468, 473, 467, 473, 473, 471, 470, 471, 471, 469, 521, 520, 472, 471, 472, 472, 474, 519, 474, 474, 472, 475, 495, 475, 475, 495, 476, 473, 476, 476, 477, 518, 477, 477, 475, 495, 517, 516, 474, 478, 476, 478, 478, 479, 515, 479, 479, 478, 480, 514, 480, 480, 481, 489, 481, 481, 489, 477, 513, 479, 482, 482, 482, 482, 483, 490, 483, 483, 490, 489, 484, 480, 484, 484, 485, 458, 485, 485, 486, 456, 486, 486, 487, 455, 487, 487, 491, 493, 454, 491, 493, 490, 450, 494, 491, 481, 494, 496, 497, 498, 496, 497, 498, 449, 499, 496, 497, 499, 493, 483, 486, 500, 448, 502, 500, 484, 502, 485, 501, 494, 503, 501, 447, 503, 500, 498, 499, 487, 503, 446, 504, 505, 501, 504, 505, 506, 507, 507, 506, 507, 502, 508, 509, 445, 508, 509, 504, 510, 511, 512, 510, 511, 512, 534, 505, 557, 534, 560, 557, 560, 560, 561, 444, 561, 561, 562, 443, 562, 562, 561, 560, 442, 563, 562, 563, 563, 441, 440, 506, 584, 511, 564, 584, 564, 564, 587, 508, 509, 587, 564, 510, 439, 584, 565, 512, 565, 565, 438, 534, 437, 557, 565, 566, 436, 566, 566, 567, 435, 567, 567, 566, 568, 434, 568, 568, 569, 433, 569, 569, 570, 432, 570, 570, 571, 431, 571, 571, 572, 430, 572, 572, 567, 429, 428, 573, 572, 573, 573, 425, 574, 585, 574, 574, 585, 424, 423, 570, 574, 585, 575, 571, 575, 575, 576, 573, 576, 576, 577, 422, 577, 577, 578, 421, 578, 578, 579, 420, 579, 579, 580, 419, 580, 580, 581, 591, 581, 581, 591, 577, 582, 576, 582, 582, 583, 586, 583, 583, 586, 588, 418, 592, 588, 586, 592, 589, 417, 588, 589, 578, 591, 590, 580, 589, 590, 581, 416, 593, 594, 590, 593, 594, 595, 596, 597, 595, 596, 597, 415, 598, 599, 596, 598, 599, 414, 582, 413, 598, 600, 583, 601, 600, 412, 601, 597, 594, 411, 602, 603, 595, 602, 603, 605, 604, 606, 605, 604, 606, 410, 607, 663, 601, 607, 663, 644, 600, 644, 644, 645, 409, 645, 645, 644, 646, 408, 646, 646, 647, 664, 647, 647, 664, 407, 605, 602, 604, 648, 347, 648, 648, 649, 346, 649, 649, 650, 345, 650, 650, 651, 606, 651, 651, 650, 344, 607, 652, 651, 652, 652, 653, 343, 653, 653, 652, 654, 340, 654, 654, 655, 339, 655, 655, 656, 338, 656, 656, 657, 654, 657, 657, 656, 658, 337, 658, 658, 659, 336, 659, 659, 657, 660, 335, 660, 660, 661, 662, 661, 661, 662, 665, 334, 666, 665, 662, 666, 667, 668, 669, 667, 668, 669, 333, 332, 670, 668, 669, 670, 671, 659, 331, 671, 670, 672, 658, 673, 672, 674, 673, 675, 674, 676, 675, 660, 676, 674, 672, 677, 678, 330, 677, 678, 675, 679, 698, 329, 679, 698, 701, 328, 701, 701, 702, 327, 702, 702, 703, 326, 703, 703, 704, 325, 704, 704, 705, 711, 705, 705, 711, 324, 677, 323, 705, 676, 706, 712, 706, 706, 712, 707, 678, 707, 707, 709, 322, 709, 709, 707, 708, 698, 708, 708, 315, 710, 708, 710, 710, 713, 714, 715, 713, 714, 715, 716, 310, 717, 716, 715, 717, 718, 309, 719, 718, 717, 719, 718, 720, 724, 729, 720, 724, 729, 731, 307, 306, 731, 710, 732, 709, 732, 732, 733, 738, 733, 733, 738, 734, 305, 734, 734, 735, 302, 735, 735, 736, 300, 736, 736, 737, 720, 737, 737, 739, 299, 740, 739, 719, 740, 741, 298, 297, 741, 724, 729, 296, 295, 742, 731, 734, 742, 743, 745, 748, 743, 745, 748, 750, 294, 750, 750, 751, 754, 751, 751, 754, 735, 740, 293, 752, 736, 752, 752, 753, 737, 753, 753, 755, 756, 757, 755, 756, 757, 761, 741, 761, 761, 292, 291, 290, 750, 762, 742, 762, 762, 754, 743, 745, 748, 763, 764, 289, 763, 764, 767, 768, 767, 767, 768, 771, 772, 771, 771, 772, 752, 288, 287, 775, 753, 775, 775, 286, 761, 756, 757, 775, 776, 285, 779, 776, 779, 779, 780, 284, 776, 780, 281, 210, 763, 208, 205, 204, 202, 201, 771, 772, 767, 768, 782, 782, 782, 782, 782, 782, 783, 783, 783, 783, 783, 783, 784, 784, 784, 784, 784, 784, 785, 785, 785, 785, 785, 785, 786, 786, 786, 786, 786, 786, 787, 787, 787, 787, 787, 787, 788, 788, 788, 788, 788, 788, 789, 789, 789, 789, 789, 789, 790, 790, 790, 790, 790, 790, 791, 791, 199, 791, 791, 791, 792, 792, 792, 792, 792, 792, 793, 194, 190, 189, 793, 793, 794, 794, 794, 794, 794, 794, 795, 795, 187, 186, 795, 795, 796, 796, 796, 185, 796, 796, 797, 797, 182, 797, 797, 797, 798, 798, 180, 798, 798, 798, 799, 799, 179, 175, 173, 799, 800, 800, 172, 800, 800, 800, 802, 802, 171, 170, 169, 802, 803, 803, 803, 803, 803, 803, 804, 804, 168, 167, 166, 804, 805, 805, 165, 805, 805, 805, 164, 163, 162, 161, 160, 159, 158, 157, 149, 143, 142, 139, 138, 137, 135, 134, 130, 129, 128, 127, 126, 124, 121, 118, 117, 112, 111, 110, 108, 107, 103, 102, 101, 100, 99, 70, 67, 65, 64, 62, 60, 58, 55, 50, 47, 44, 43, 38, 37, 36, 34, 33, 29, 28, 27, 26, 25, 23, 19, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781 } ; /* Table of booleans, true if rule could match eol. */ static yyconst flex_int32_t yy_rule_can_match_eol[63] = { 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, }; static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; extern int yy_flex_debug; int yy_flex_debug = 0; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */ #define REJECT reject_used_but_not_detected #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *yytext; #line 1 "levcomp.lpp" #line 2 "levcomp.lpp" // levcomp.lpp: // Level compiler lexer for Dungeon Crawl Stone Soup. // // Based loosely on NetHack's lev_comp.l #include "AppHdr.h" #include "mapdef.h" #include "levcomp.tab.h" #include #include static bool alloced = false; std::queue free_queue; static void flush_free_queue(unsigned int max_allowed) { while (free_queue.size() > max_allowed) { const char *s = free_queue.front(); free((void *) s); free_queue.pop(); } } static void add_to_queue(const char *s) { free_queue.push(s); flush_free_queue(100); } static void clean() { if (yylval.text && alloced) add_to_queue(yylval.text); yylval.text = NULL; alloced = false; } static char *copy_text(bool trim_right, int strip_trailing) { char *newstring = NULL; if ((yylval.text = newstring = strdup(yytext))) { alloced = true; char *s = NULL; if (trim_right) { s = newstring + strlen(newstring) - 1; while (isspace(*s) && s >= newstring) *s-- = 0; } if (strip_trailing) { if (!s) s = newstring + strlen(newstring) - 1; while (s >= newstring && --strip_trailing >= 0) *s-- = 0; } } return (newstring); } static void settext(bool trim_right = false, int strip_trailing = 0) { clean(); char *newstring = copy_text(trim_right, strip_trailing); yylval.text = newstring; } #line 1276 "levcomp.lex.cc" #define INITIAL 0 #define MAPDEF 1 #define LUA 2 #define LUA_ONELINER 3 #define ARGUMENT 4 #define MNAME 5 #define KEYWORDS 6 #define ITEM_LIST 7 #define TOEOL 8 #ifndef YY_NO_UNISTD_H /* Special case for "unistd.h", since it is non-ANSI. We include it way * down here because we want the user's section 1 to have been scanned first. * The user has a chance to override it with an option. */ #include #endif #ifndef YY_EXTRA_TYPE #define YY_EXTRA_TYPE void * #endif static int yy_init_globals (void ); /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int yywrap (void ); #else extern int yywrap (void ); #endif #endif static void yyunput (int c,char *buf_ptr ); #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ); #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * ); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void ); #else static int input (void ); #endif #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #define YY_READ_BUF_SIZE 8192 #endif /* Copy whatever the last rule matched to the standard output. */ #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ #define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ size_t n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ if ( c == EOF && ferror( yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else \ { \ errno=0; \ while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ { \ if( errno != EINTR) \ { \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ break; \ } \ errno=0; \ clearerr(yyin); \ } \ }\ \ #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */ #ifndef yyterminate #define yyterminate() return YY_NULL #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif /* Report a fatal error. */ #ifndef YY_FATAL_ERROR #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) #endif /* end tables serialization structures and prototypes */ /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL_IS_OURS 1 extern int yylex (void); #define YY_DECL int yylex (void) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after yytext and yyleng * have been set up. */ #ifndef YY_USER_ACTION #define YY_USER_ACTION #endif /* Code executed at the end of each rule. */ #ifndef YY_BREAK #define YY_BREAK break; #endif #define YY_RULE_SETUP \ if ( yyleng > 0 ) \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ (yytext[yyleng - 1] == '\n'); \ YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; #line 89 "levcomp.lpp" #line 1443 "levcomp.lex.cc" if ( !(yy_init) ) { (yy_init) = 1; #ifdef YY_USER_INIT YY_USER_INIT; #endif if ( ! (yy_start) ) (yy_start) = 1; /* first start state */ if ( ! yyin ) yyin = stdin; if ( ! yyout ) yyout = stdout; if ( ! YY_CURRENT_BUFFER ) { yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin,YY_BUF_SIZE ); } yy_load_buffer_state( ); } while ( 1 ) /* loops until end-of-file is reached */ { yy_cp = (yy_c_buf_p); /* Support of yytext. */ *yy_cp = (yy_hold_char); /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; yy_current_state = (yy_start); yy_current_state += YY_AT_BOL(); yy_match: do { register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 782 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } while ( yy_current_state != 781 ); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); yy_find_action: yy_act = yy_accept[yy_current_state]; YY_DO_BEFORE_ACTION; if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) { int yyl; for ( yyl = 0; yyl < yyleng; ++yyl ) if ( yytext[yyl] == '\n' ) yylineno++; ; } do_action: /* This label is used only to access EOF actions. */ switch ( yy_act ) { /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ *yy_cp = (yy_hold_char); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); goto yy_find_action; case 1: YY_RULE_SETUP #line 91 "levcomp.lpp" { BEGIN(INITIAL); } YY_BREAK case 2: YY_RULE_SETUP #line 93 "levcomp.lpp" { settext(true); return MAP_LINE; } YY_BREAK case 3: /* rule 3 can match eol */ YY_RULE_SETUP #line 98 "levcomp.lpp" return CHARACTER; YY_BREAK case 4: YY_RULE_SETUP #line 99 "levcomp.lpp" return CHARACTER; YY_BREAK case 5: YY_RULE_SETUP #line 100 "levcomp.lpp" return CHARACTER; YY_BREAK case 6: /* rule 6 can match eol */ YY_RULE_SETUP #line 102 "levcomp.lpp" ; YY_BREAK case 7: *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 104 "levcomp.lpp" { BEGIN(INITIAL); } YY_BREAK case 8: *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 105 "levcomp.lpp" { settext(true, 2); BEGIN(INITIAL); return LUA_LINE; } YY_BREAK case 9: YY_RULE_SETUP #line 110 "levcomp.lpp" { settext(); return LUA_LINE; } YY_BREAK case 10: /* rule 10 can match eol */ YY_RULE_SETUP #line 114 "levcomp.lpp" ; YY_BREAK case 11: *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 116 "levcomp.lpp" { settext(); return LUA_LINE; } YY_BREAK case 12: /* rule 12 can match eol */ YY_RULE_SETUP #line 120 "levcomp.lpp" { BEGIN(INITIAL); } YY_BREAK case 13: YY_RULE_SETUP #line 122 "levcomp.lpp" { settext(); return STRING; } YY_BREAK case 14: YY_RULE_SETUP #line 127 "levcomp.lpp" ; YY_BREAK case 15: /* rule 15 can match eol */ YY_RULE_SETUP #line 128 "levcomp.lpp" { BEGIN(INITIAL); } YY_BREAK case 16: YY_RULE_SETUP #line 130 "levcomp.lpp" { settext(); return ITEM_INFO; } YY_BREAK case 17: YY_RULE_SETUP #line 135 "levcomp.lpp" { settext(); return ITEM_INFO; } YY_BREAK case 18: YY_RULE_SETUP #line 140 "levcomp.lpp" return COMMA; YY_BREAK case 19: YY_RULE_SETUP #line 141 "levcomp.lpp" ; YY_BREAK case 20: /* rule 20 can match eol */ YY_RULE_SETUP #line 142 "levcomp.lpp" { BEGIN(INITIAL); } YY_BREAK case 21: /* rule 21 can match eol */ YY_RULE_SETUP #line 144 "levcomp.lpp" { BEGIN(INITIAL); } YY_BREAK case 22: YY_RULE_SETUP #line 146 "levcomp.lpp" { settext(); return MONSTER_NAME; } YY_BREAK case 23: YY_RULE_SETUP #line 151 "levcomp.lpp" return COMMA; YY_BREAK case 24: YY_RULE_SETUP #line 152 "levcomp.lpp" ; YY_BREAK case 25: YY_RULE_SETUP #line 154 "levcomp.lpp" { BEGIN(INITIAL); settext(); return STRING; } YY_BREAK case 26: /* rule 26 can match eol */ YY_RULE_SETUP #line 160 "levcomp.lpp" { BEGIN(INITIAL); } YY_BREAK case 27: *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 162 "levcomp.lpp" { settext(true, 1); return STRING; } YY_BREAK case 28: *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 167 "levcomp.lpp" { BEGIN(INITIAL); settext(); return STRING; } YY_BREAK case 29: /* rule 29 can match eol */ YY_RULE_SETUP #line 172 "levcomp.lpp" ; YY_BREAK case 30: YY_RULE_SETUP #line 174 "levcomp.lpp" ; YY_BREAK case 31: *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 176 "levcomp.lpp" { BEGIN(MAPDEF); } YY_BREAK case 32: YY_RULE_SETUP #line 178 "levcomp.lpp" { BEGIN(LUA_ONELINER); return MAIN; } YY_BREAK case 33: YY_RULE_SETUP #line 180 "levcomp.lpp" { BEGIN(LUA); return PRELUDE; } YY_BREAK case 34: YY_RULE_SETUP #line 181 "levcomp.lpp" { BEGIN(LUA); return MAIN; } YY_BREAK case 35: YY_RULE_SETUP #line 182 "levcomp.lpp" { BEGIN(LUA); return MAIN; } YY_BREAK case 36: YY_RULE_SETUP #line 183 "levcomp.lpp" { BEGIN(LUA); return VALIDATE; } YY_BREAK case 37: YY_RULE_SETUP #line 184 "levcomp.lpp" { BEGIN(LUA); return VETO; } YY_BREAK case 38: YY_RULE_SETUP #line 187 "levcomp.lpp" { BEGIN(ARGUMENT); return NAME; } YY_BREAK case 39: YY_RULE_SETUP #line 188 "levcomp.lpp" { BEGIN(ARGUMENT); return DEFAULT_DEPTH; } YY_BREAK case 40: YY_RULE_SETUP #line 189 "levcomp.lpp" { BEGIN(ARGUMENT); return DEPTH; } YY_BREAK case 41: YY_RULE_SETUP #line 190 "levcomp.lpp" { BEGIN(ARGUMENT); return ORIENT; } YY_BREAK case 42: YY_RULE_SETUP #line 191 "levcomp.lpp" { BEGIN(ARGUMENT); return PLACE; } YY_BREAK case 43: YY_RULE_SETUP #line 192 "levcomp.lpp" { BEGIN(ARGUMENT); return WELCOME; } YY_BREAK case 44: YY_RULE_SETUP #line 193 "levcomp.lpp" return CHANCE; YY_BREAK case 45: YY_RULE_SETUP #line 194 "levcomp.lpp" return CHANCE; YY_BREAK case 46: YY_RULE_SETUP #line 195 "levcomp.lpp" { BEGIN(KEYWORDS); return TAGS; } YY_BREAK case 47: YY_RULE_SETUP #line 196 "levcomp.lpp" { BEGIN(KEYWORDS); return TAGS; } YY_BREAK case 48: YY_RULE_SETUP #line 197 "levcomp.lpp" { BEGIN(ITEM_LIST); return SUBST; } YY_BREAK case 49: YY_RULE_SETUP #line 198 "levcomp.lpp" { BEGIN(ITEM_LIST); return NSUBST; } YY_BREAK case 50: YY_RULE_SETUP #line 199 "levcomp.lpp" { BEGIN(MNAME); return MONS; } YY_BREAK case 51: YY_RULE_SETUP #line 200 "levcomp.lpp" { BEGIN(ITEM_LIST); return ITEM; } YY_BREAK case 52: YY_RULE_SETUP #line 201 "levcomp.lpp" { BEGIN(TOEOL); return MARKER; } YY_BREAK case 53: YY_RULE_SETUP #line 202 "levcomp.lpp" { BEGIN(ITEM_LIST); return SHUFFLE; } YY_BREAK case 54: YY_RULE_SETUP #line 204 "levcomp.lpp" { BEGIN(ARGUMENT); return KFEAT; } YY_BREAK case 55: YY_RULE_SETUP #line 205 "levcomp.lpp" { BEGIN(ARGUMENT); return KITEM; } YY_BREAK case 56: YY_RULE_SETUP #line 206 "levcomp.lpp" { BEGIN(ARGUMENT); return KMONS; } YY_BREAK case 57: YY_RULE_SETUP #line 208 "levcomp.lpp" return COMMA; YY_BREAK case 58: YY_RULE_SETUP #line 210 "levcomp.lpp" { clean(); yylval.i = atoi(yytext); return INTEGER; } YY_BREAK case 59: YY_RULE_SETUP #line 216 "levcomp.lpp" ; YY_BREAK case 60: /* rule 60 can match eol */ YY_RULE_SETUP #line 217 "levcomp.lpp" ; YY_BREAK case 61: YY_RULE_SETUP #line 218 "levcomp.lpp" return CHARACTER; YY_BREAK case 62: YY_RULE_SETUP #line 220 "levcomp.lpp" ECHO; YY_BREAK #line 1911 "levcomp.lex.cc" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(MAPDEF): case YY_STATE_EOF(LUA): case YY_STATE_EOF(LUA_ONELINER): case YY_STATE_EOF(ARGUMENT): case YY_STATE_EOF(MNAME): case YY_STATE_EOF(KEYWORDS): case YY_STATE_EOF(ITEM_LIST): case YY_STATE_EOF(TOEOL): yyterminate(); case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ *yy_cp = (yy_hold_char); YY_RESTORE_YY_MORE_OFFSET if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed yyin at a new source and called * yylex(). If so, then we have to assure * consistency between YY_CURRENT_BUFFER and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since yy_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the * end-of-buffer state). Contrast this with the test * in input(). */ if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) { /* This was really a NUL. */ yy_state_type yy_next_state; (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't * want to build jamming into it because then it * will run more slowly). */ yy_next_state = yy_try_NUL_trans( yy_current_state ); yy_bp = (yytext_ptr) + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ yy_cp = ++(yy_c_buf_p); yy_current_state = yy_next_state; goto yy_match; } else { yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); goto yy_find_action; } } else switch ( yy_get_next_buffer( ) ) { case EOB_ACT_END_OF_FILE: { (yy_did_buffer_switch_on_eof) = 0; if ( yywrap( ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up * yytext, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; } else { if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: (yy_c_buf_p) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_find_action; } break; } default: YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ static int yy_get_next_buffer (void) { register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; register char *source = (yytext_ptr); register int number_to_move, i; int ret_val; if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; else { int num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ /* just a shorter name for the current buffer */ YY_BUFFER_STATE b = YY_CURRENT_BUFFER; int yy_c_buf_p_offset = (int) ((yy_c_buf_p) - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; else b->yy_buf_size *= 2; b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); } else /* Can't grow it, we don't own it. */ b->yy_ch_buf = 0; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), (yy_n_chars), num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } if ( (yy_n_chars) == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; yyrestart(yyin ); } else { ret_val = EOB_ACT_LAST_MATCH; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; (yy_n_chars) += number_to_move; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ static yy_state_type yy_get_previous_state (void) { register yy_state_type yy_current_state; register char *yy_cp; yy_current_state = (yy_start); yy_current_state += YY_AT_BOL(); for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) { register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 782 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; } return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) { register int yy_is_jam; register char *yy_cp = (yy_c_buf_p); register YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 782 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_is_jam = (yy_current_state == 781); return yy_is_jam ? 0 : yy_current_state; } static void yyunput (int c, register char * yy_bp ) { register char *yy_cp; yy_cp = (yy_c_buf_p); /* undo effects of setting up yytext */ *yy_cp = (yy_hold_char); if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ register int number_to_move = (yy_n_chars) + 2; register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; register char *source = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) *--dest = *--source; yy_cp += (int) (dest - source); yy_bp += (int) (dest - source); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) YY_FATAL_ERROR( "flex scanner push-back overflow" ); } *--yy_cp = (char) c; if ( c == '\n' ){ --yylineno; } (yytext_ptr) = yy_bp; (yy_hold_char) = *yy_cp; (yy_c_buf_p) = yy_cp; } #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void) #else static int input (void) #endif { int c; *(yy_c_buf_p) = (yy_hold_char); if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) /* This was really a NUL. */ *(yy_c_buf_p) = '\0'; else { /* need more input */ int offset = (yy_c_buf_p) - (yytext_ptr); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_g_n_b() * sees that we've accumulated a * token and flags that we need to * try matching the token before * proceeding. But for input(), * there's no matching to consider. * So convert the EOB_ACT_LAST_MATCH * to EOB_ACT_END_OF_FILE. */ /* Reset buffer status. */ yyrestart(yyin ); /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { if ( yywrap( ) ) return EOF; if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(); #else return input(); #endif } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + offset; break; } } } c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ *(yy_c_buf_p) = '\0'; /* preserve yytext */ (yy_hold_char) = *++(yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); if ( YY_CURRENT_BUFFER_LVALUE->yy_at_bol ) yylineno++; ; return c; } #endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * * @note This function does not reset the start condition to @c INITIAL . */ void yyrestart (FILE * input_file ) { if ( ! YY_CURRENT_BUFFER ){ yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin,YY_BUF_SIZE ); } yy_init_buffer(YY_CURRENT_BUFFER,input_file ); yy_load_buffer_state( ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * */ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) { /* TODO. We should be able to replace this entire function body * with * yypop_buffer_state(); * yypush_buffer_state(new_buffer); */ yyensure_buffer_stack (); if ( YY_CURRENT_BUFFER == new_buffer ) return; if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } YY_CURRENT_BUFFER_LVALUE = new_buffer; yy_load_buffer_state( ); /* We don't actually know whether we did this switch during * EOF (yywrap()) processing, but the only time this flag * is looked at is after yywrap() is called, so it's safe * to go ahead and always set it. */ (yy_did_buffer_switch_on_eof) = 1; } static void yy_load_buffer_state (void) { (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; (yy_hold_char) = *(yy_c_buf_p); } /** Allocate and initialize an input buffer state. * @param file A readable stream. * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. * * @return the allocated buffer state. */ YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_is_our_buffer = 1; yy_init_buffer(b,file ); return b; } /** Destroy the buffer. * @param b a buffer created with yy_create_buffer() * */ void yy_delete_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) yyfree((void *) b->yy_ch_buf ); yyfree((void *) b ); } /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a yyrestart() or at EOF. */ static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) { int oerrno = errno; yy_flush_buffer(b ); b->yy_input_file = file; b->yy_fill_buffer = 1; /* If b is the current buffer, then yy_init_buffer was _probably_ * called from yyrestart() or through yy_get_next_buffer. * In that case, we don't want to reset the lineno or column. */ if (b != YY_CURRENT_BUFFER){ b->yy_bs_lineno = 1; b->yy_bs_column = 0; } b->yy_is_interactive = 0; errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * */ void yy_flush_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; b->yy_n_chars = 0; /* We always need two end-of-buffer characters. The first causes * a transition to the end-of-buffer state. The second causes * a jam in that state. */ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; b->yy_buf_pos = &b->yy_ch_buf[0]; b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; if ( b == YY_CURRENT_BUFFER ) yy_load_buffer_state( ); } /** Pushes the new state onto the stack. The new state becomes * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. * */ void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) { if (new_buffer == NULL) return; yyensure_buffer_stack(); /* This block is copied from yy_switch_to_buffer. */ if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } /* Only push if top exists. Otherwise, replace top. */ if (YY_CURRENT_BUFFER) (yy_buffer_stack_top)++; YY_CURRENT_BUFFER_LVALUE = new_buffer; /* copied from yy_switch_to_buffer. */ yy_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * */ void yypop_buffer_state (void) { if (!YY_CURRENT_BUFFER) return; yy_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; if ((yy_buffer_stack_top) > 0) --(yy_buffer_stack_top); if (YY_CURRENT_BUFFER) { yy_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ static void yyensure_buffer_stack (void) { int num_to_alloc; if (!(yy_buffer_stack)) { /* First allocation is just for 2 elements, since we don't know if this * scanner will even need a stack. We use 2 instead of 1 to avoid an * immediate realloc on the next call. */ num_to_alloc = 1; (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc (num_to_alloc * sizeof(struct yy_buffer_state*) ); memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; (yy_buffer_stack_top) = 0; return; } if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ /* Increase the buffer to prepare for a possible push. */ int grow_size = 8 /* arbitrary grow size */; num_to_alloc = (yy_buffer_stack_max) + grow_size; (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc ((yy_buffer_stack), num_to_alloc * sizeof(struct yy_buffer_state*) ); /* zero only the new slots.*/ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; } } /** Setup the input buffer state to scan directly from a user-specified character buffer. * @param base the character buffer * @param size the size in bytes of the character buffer * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) { YY_BUFFER_STATE b; if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; b->yy_input_file = 0; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; yy_switch_to_buffer(b ); return b; } /** Setup the input buffer state to scan a string. The next call to yylex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan * * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * yy_scan_bytes() instead. */ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) { return yy_scan_bytes(yystr,strlen(yystr) ); } /** Setup the input buffer state to scan the given bytes. The next call to yylex() will * scan from a @e copy of @a bytes. * @param bytes the byte buffer to scan * @param len the number of bytes in the buffer pointed to by @a bytes. * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) { YY_BUFFER_STATE b; char *buf; yy_size_t n; int i; /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; buf = (char *) yyalloc(n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); for ( i = 0; i < _yybytes_len; ++i ) buf[i] = yybytes[i]; buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; b = yy_scan_buffer(buf,n ); if ( ! b ) YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. */ b->yy_is_our_buffer = 1; return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif static void yy_fatal_error (yyconst char* msg ) { (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ yytext[yyleng] = (yy_hold_char); \ (yy_c_buf_p) = yytext + yyless_macro_arg; \ (yy_hold_char) = *(yy_c_buf_p); \ *(yy_c_buf_p) = '\0'; \ yyleng = yyless_macro_arg; \ } \ while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ /** Get the current line number. * */ int yyget_lineno (void) { return yylineno; } /** Get the input stream. * */ FILE *yyget_in (void) { return yyin; } /** Get the output stream. * */ FILE *yyget_out (void) { return yyout; } /** Get the length of the current token. * */ int yyget_leng (void) { return yyleng; } /** Get the current token. * */ char *yyget_text (void) { return yytext; } /** Set the current line number. * @param line_number * */ void yyset_lineno (int line_number ) { yylineno = line_number; } /** Set the input stream. This does not discard the current * input buffer. * @param in_str A readable stream. * * @see yy_switch_to_buffer */ void yyset_in (FILE * in_str ) { yyin = in_str ; } void yyset_out (FILE * out_str ) { yyout = out_str ; } int yyget_debug (void) { return yy_flex_debug; } void yyset_debug (int bdebug ) { yy_flex_debug = bdebug ; } static int yy_init_globals (void) { /* Initialization is the same as for the non-reentrant scanner. * This function is called from yylex_destroy(), so don't allocate here. */ /* We do not touch yylineno unless the option is enabled. */ yylineno = 1; (yy_buffer_stack) = 0; (yy_buffer_stack_top) = 0; (yy_buffer_stack_max) = 0; (yy_c_buf_p) = (char *) 0; (yy_init) = 0; (yy_start) = 0; /* Defined in main.c */ #ifdef YY_STDINIT yyin = stdin; yyout = stdout; #else yyin = (FILE *) 0; yyout = (FILE *) 0; #endif /* For future reference: Set errno on error, since we are called by * yylex_init() */ return 0; } /* yylex_destroy is for both reentrant and non-reentrant scanners. */ int yylex_destroy (void) { /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ yy_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; yypop_buffer_state(); } /* Destroy the stack itself. */ yyfree((yy_buffer_stack) ); (yy_buffer_stack) = NULL; /* Reset the globals. This is important in a non-reentrant scanner so the next time * yylex() is called, initialization will occur. */ yy_init_globals( ); return 0; } /* * Internal utility routines. */ #ifndef yytext_ptr static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) { register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * s ) { register int n; for ( n = 0; s[n]; ++n ) ; return n; } #endif void *yyalloc (yy_size_t size ) { return (void *) malloc( size ); } void *yyrealloc (void * ptr, yy_size_t size ) { /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter * because both ANSI C and C++ allow castless assignment from * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ return (void *) realloc( (char *) ptr, size ); } void yyfree (void * ptr ) { free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" #line 220 "levcomp.lpp" int yywrap() { clean(); flush_free_queue(0); return 1; }