#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 6 #define YY_FLEX_SUBMINOR_VERSION 4 #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 defined (__STDC_VERSION__) && __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; /* 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 #ifndef SIZE_MAX #define SIZE_MAX (~(size_t)0) #endif #endif /* ! C99 */ #endif /* ! FLEXINT_H */ /* begin standard C++ headers. */ /* TODO: this is always defined, so inline it */ #define yyconst const #if defined(__GNUC__) && __GNUC__ >= 3 #define yynoreturn __attribute__((__noreturn__)) #else #define yynoreturn #endif /* Returned upon end-of-file. */ #define YY_NULL 0 /* Promotes a possibly negative, possibly signed char to an * integer in range [0..255] for use as an array index. */ #define YY_SC_TO_UI(c) ((YY_CHAR) (c)) /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T #define YY_TYPEDEF_YY_SCANNER_T typedef void* yyscan_t; #endif /* For convenience, these vars (plus the bison vars far below) are macros in the reentrant scanner. */ #define yyin yyg->yyin_r #define yyout yyg->yyout_r #define yyextra yyg->yyextra_r #define yyleng yyg->yyleng_r #define yytext yyg->yytext_r #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) #define yy_flex_debug yyg->yy_flex_debug_r /* 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 yyg->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 ((yyg->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 , yyscanner ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #ifndef YY_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k. * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. * Ditto for the __ia64__ case accordingly. */ #define YY_BUF_SIZE 32768 #else #define YY_BUF_SIZE 16384 #endif /* __ia64__ */ #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 #ifndef YY_TYPEDEF_YY_SIZE_T #define YY_TYPEDEF_YY_SIZE_T typedef size_t yy_size_t; #endif #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) #define YY_LINENO_REWIND_TO(dst) \ do {\ const char *p;\ for ( p = yy_cp-1; p >= (dst); --p)\ if ( *p == '\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 = yyg->yy_hold_char; \ YY_RESTORE_YY_MORE_OFFSET \ yyg->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, yyg->yytext_ptr , yyscanner ) #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. */ int 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 */ /* 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 ( yyg->yy_buffer_stack \ ? yyg->yy_buffer_stack[yyg->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 yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] void yyrestart ( FILE *input_file , yyscan_t yyscanner ); void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); void yypop_buffer_state ( yyscan_t yyscanner ); static void yyensure_buffer_stack ( yyscan_t yyscanner ); static void yy_load_buffer_state ( yyscan_t yyscanner ); static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner ); #define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner) YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner ); void *yyalloc ( yy_size_t , yyscan_t yyscanner ); void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); void yyfree ( void * , yyscan_t yyscanner ); #define yy_new_buffer yy_create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! YY_CURRENT_BUFFER ){ \ yyensure_buffer_stack (yyscanner); \ YY_CURRENT_BUFFER_LVALUE = \ yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ if ( ! YY_CURRENT_BUFFER ){\ yyensure_buffer_stack (yyscanner); \ YY_CURRENT_BUFFER_LVALUE = \ yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ typedef flex_uint8_t YY_CHAR; typedef int yy_state_type; #define yytext_ptr yytext_r static yy_state_type yy_get_previous_state ( yyscan_t yyscanner ); static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner); static int yy_get_next_buffer ( yyscan_t yyscanner ); static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ yyg->yytext_ptr = yy_bp; \ yyleng = (int) (yy_cp - yy_bp); \ yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; #define YY_NUM_RULES 171 #define YY_END_OF_BUFFER 172 /* 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 const flex_int16_t yy_accept[701] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 169, 169, 0, 0, 172, 133, 88, 87, 89, 133, 133, 132, 133, 133, 133, 133, 133, 133, 133, 133, 92, 91, 133, 133, 133, 133, 131, 131, 131, 133, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 133, 164, 136, 137, 164, 164, 164, 164, 164, 160, 159, 154, 152, 163, 163, 164, 163, 163, 163, 163, 163, 163, 164, 171, 130, 129, 130, 125, 124, 125, 169, 168, 171, 167, 166, 167, 88, 90, 0, 89, 105, 0, 120, 0, 110, 106, 115, 0, 0, 108, 99, 111, 100, 112, 97, 95, 0, 94, 122, 126, 109, 94, 92, 0, 0, 92, 92, 0, 91, 91, 91, 96, 101, 102, 104, 103, 0, 131, 0, 0, 0, 116, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 25, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 39, 131, 131, 131, 131, 131, 131, 131, 131, 51, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 117, 107, 136, 0, 158, 0, 150, 0, 0, 162, 162, 160, 0, 0, 160, 160, 0, 159, 159, 159, 155, 153, 163, 0, 0, 134, 0, 163, 163, 163, 163, 140, 163, 163, 163, 163, 151, 127, 0, 123, 169, 0, 0, 165, 0, 0, 119, 0, 0, 98, 118, 0, 94, 0, 94, 92, 93, 91, 113, 114, 0, 121, 131, 3, 5, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 36, 131, 131, 131, 41, 131, 131, 131, 45, 131, 47, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 73, 131, 131, 131, 131, 131, 131, 131, 131, 131, 85, 0, 0, 157, 0, 0, 0, 162, 0, 162, 160, 161, 159, 135, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 128, 170, 0, 165, 0, 0, 0, 0, 0, 94, 93, 93, 0, 131, 131, 6, 131, 131, 9, 131, 11, 131, 13, 131, 131, 131, 131, 131, 131, 131, 131, 131, 28, 29, 131, 131, 131, 131, 131, 131, 131, 38, 131, 42, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 69, 131, 131, 72, 131, 131, 131, 131, 131, 81, 131, 131, 131, 131, 0, 0, 0, 0, 0, 162, 161, 161, 163, 144, 143, 163, 163, 163, 163, 163, 146, 163, 163, 0, 165, 0, 0, 0, 0, 93, 0, 131, 131, 131, 8, 10, 12, 131, 131, 16, 17, 18, 131, 131, 131, 131, 131, 131, 131, 131, 131, 33, 34, 35, 131, 131, 131, 131, 131, 131, 131, 131, 52, 131, 131, 131, 131, 131, 131, 131, 60, 131, 131, 131, 131, 131, 131, 131, 71, 131, 131, 131, 77, 131, 79, 131, 131, 131, 84, 131, 0, 0, 0, 0, 161, 163, 145, 149, 141, 163, 163, 163, 148, 0, 165, 0, 131, 131, 4, 7, 131, 131, 131, 131, 131, 131, 131, 24, 26, 131, 131, 31, 32, 37, 40, 131, 131, 131, 48, 131, 131, 131, 131, 131, 56, 131, 131, 59, 61, 62, 63, 66, 67, 131, 131, 131, 75, 131, 131, 131, 131, 131, 86, 138, 142, 163, 147, 0, 165, 0, 1, 2, 131, 131, 131, 131, 131, 131, 23, 131, 131, 43, 131, 131, 49, 131, 131, 54, 131, 131, 131, 131, 131, 131, 74, 131, 131, 80, 131, 83, 139, 156, 0, 165, 0, 14, 15, 131, 131, 21, 22, 131, 30, 131, 46, 50, 53, 131, 57, 131, 131, 131, 68, 131, 76, 78, 82, 0, 165, 0, 131, 19, 131, 44, 55, 131, 131, 131, 131, 0, 165, 0, 20, 131, 131, 131, 131, 131, 0, 165, 0, 131, 131, 131, 65, 131, 0, 165, 0, 27, 131, 131, 70, 0, 165, 0, 131, 64, 0, 165, 0, 131, 0, 165, 0, 131, 0, 165, 0, 58, 0, 165, 0, 0, 165, 0, 165, 0 } ; static const YY_CHAR yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 9, 10, 11, 1, 12, 13, 14, 15, 16, 17, 18, 1, 19, 20, 21, 22, 23, 24, 25, 26, 26, 27, 26, 28, 28, 29, 1, 30, 31, 32, 33, 1, 34, 34, 34, 34, 35, 36, 37, 37, 37, 37, 37, 38, 37, 37, 37, 37, 37, 39, 37, 37, 40, 37, 37, 41, 37, 37, 1, 42, 1, 43, 44, 1, 45, 46, 47, 48, 49, 50, 51, 52, 53, 37, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 1, 70, 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, 1 } ; static const YY_CHAR yy_meta[71] = { 0, 1, 1, 2, 3, 4, 4, 4, 2, 1, 5, 1, 1, 1, 6, 7, 4, 1, 1, 1, 1, 1, 8, 8, 8, 8, 8, 8, 9, 1, 1, 1, 1, 5, 10, 10, 9, 11, 12, 11, 11, 11, 13, 1, 11, 14, 14, 10, 10, 10, 8, 11, 11, 11, 11, 12, 11, 15, 11, 11, 11, 15, 11, 15, 11, 15, 11, 15, 11, 11, 1 } ; static const flex_int16_t yy_base[758] = { 0, 0, 0, 70, 0, 0, 0, 137, 138, 139, 140, 142, 145, 143, 147, 1688, 1689, 161, 1689, 178, 1656, 148, 1689, 1655, 147, 1643, 1653, 143, 157, 174, 156, 183, 231, 1654, 140, 1651, 161, 0, 202, 1671, 1649, 158, 172, 182, 146, 162, 191, 1621, 178, 1620, 1613, 215, 180, 201, 1627, 215, 223, 169, 190, 230, 1617, 230, 1689, 285, 1689, 232, 1661, 1631, 279, 1651, 288, 336, 1640, 1639, 0, 275, 290, 1620, 263, 213, 1615, 1606, 1609, 1595, 1689, 1689, 1689, 292, 1689, 1689, 1643, 314, 1689, 0, 1689, 1689, 1653, 327, 1689, 341, 362, 1689, 299, 1689, 355, 1689, 1689, 1689, 311, 370, 1689, 1689, 1689, 1689, 1689, 1645, 1689, 1641, 416, 1689, 1689, 1689, 0, 316, 379, 393, 287, 281, 0, 0, 344, 283, 1689, 1629, 1689, 1689, 1689, 1628, 0, 330, 1616, 1642, 1689, 1603, 1607, 1598, 1590, 1589, 1593, 1601, 324, 1604, 1603, 332, 376, 1583, 1589, 1583, 1580, 291, 1588, 1585, 1583, 1579, 1586, 1575, 0, 99, 1580, 1573, 1579, 1568, 361, 1578, 1583, 1587, 1581, 372, 1583, 382, 1570, 358, 368, 1574, 1570, 337, 368, 1566, 393, 1571, 1562, 320, 1570, 1568, 1559, 1689, 1689, 454, 437, 1689, 450, 1689, 436, 458, 504, 0, 393, 466, 480, 423, 415, 0, 0, 455, 458, 1689, 1689, 0, 458, 1577, 1689, 1614, 1567, 396, 1568, 1554, 461, 1567, 1556, 1567, 1563, 1689, 1689, 1606, 1689, 461, 266, 1599, 1598, 523, 0, 1689, 544, 0, 1689, 1689, 554, 1689, 565, 486, 1689, 497, 1689, 1689, 1689, 1592, 1689, 1555, 1561, 0, 1546, 452, 1548, 1557, 1552, 1553, 1538, 1536, 1538, 449, 1541, 1550, 1545, 1547, 1547, 1542, 1534, 284, 1540, 1526, 1542, 1541, 0, 1536, 1526, 1528, 0, 1521, 1526, 1521, 0, 1499, 1516, 1502, 1495, 1506, 1490, 1477, 1478, 1485, 1483, 1473, 1463, 1465, 1468, 1472, 1449, 1447, 1447, 1447, 1438, 465, 1448, 0, 1447, 1437, 1438, 1425, 1418, 1432, 1431, 1425, 1412, 1422, 573, 0, 1689, 580, 0, 601, 1689, 586, 580, 1689, 593, 1689, 1689, 1412, 1411, 1403, 1398, 1392, 1397, 1392, 1382, 1387, 1384, 1382, 1689, 506, 1412, 1411, 627, 660, 618, 697, 639, 642, 480, 496, 1405, 1359, 1361, 0, 1350, 1345, 0, 1351, 0, 1349, 532, 1330, 1336, 1327, 1333, 1317, 1313, 1313, 1320, 1315, 0, 0, 1309, 1300, 1299, 1307, 1295, 1284, 1289, 0, 1288, 0, 1295, 1270, 1284, 1281, 1267, 1275, 1257, 1255, 1270, 1262, 1249, 1239, 1237, 1235, 1227, 1238, 1228, 1232, 1234, 1225, 1216, 0, 1225, 1200, 0, 620, 1203, 1206, 1205, 1191, 0, 1188, 1181, 1192, 1191, 726, 759, 748, 796, 690, 643, 520, 579, 1179, 0, 0, 1180, 1166, 1176, 1176, 1157, 0, 1156, 1161, 1200, 1196, 533, 0, 632, 0, 1689, 1185, 613, 1137, 1148, 0, 0, 0, 1168, 1168, 0, 0, 655, 1134, 1118, 1122, 1127, 1126, 1119, 1124, 1103, 1103, 0, 0, 0, 1109, 1107, 1100, 1093, 1102, 1087, 1083, 1082, 0, 1087, 1076, 1091, 1085, 1060, 1073, 1064, 0, 1070, 1067, 1066, 1049, 1059, 1061, 1057, 0, 1055, 1050, 1047, 0, 1032, 0, 1043, 1034, 1040, 0, 1023, 649, 0, 633, 0, 1689, 1033, 0, 0, 0, 1025, 1026, 1028, 0, 1062, 1060, 1049, 1001, 1012, 0, 0, 1017, 1015, 1007, 978, 980, 984, 977, 0, 0, 992, 985, 0, 0, 0, 0, 982, 985, 970, 0, 967, 968, 972, 970, 955, 0, 968, 954, 0, 0, 0, 966, 0, 0, 941, 957, 950, 0, 943, 936, 929, 925, 902, 0, 914, 0, 898, 0, 932, 917, 909, 0, 0, 846, 777, 794, 778, 787, 786, 0, 790, 770, 0, 782, 765, 0, 766, 777, 0, 776, 756, 757, 517, 766, 759, 0, 764, 764, 0, 762, 0, 0, 0, 793, 792, 785, 0, 0, 737, 737, 0, 0, 750, 0, 747, 0, 0, 0, 744, 0, 730, 727, 743, 0, 722, 0, 0, 0, 769, 768, 762, 713, 0, 722, 0, 0, 717, 703, 702, 716, 751, 750, 744, 0, 696, 694, 707, 692, 709, 731, 730, 723, 674, 691, 673, 0, 675, 719, 718, 712, 0, 679, 640, 0, 691, 690, 675, 644, 0, 666, 662, 641, 593, 629, 628, 621, 558, 591, 575, 559, 0, 553, 546, 506, 457, 438, 268, 1689, 1689, 846, 861, 876, 891, 906, 921, 929, 944, 959, 967, 982, 997, 1008, 1019, 1027, 1041, 1052, 1063, 1071, 1085, 1093, 1100, 1107, 1119, 1127, 1134, 1141, 1153, 1161, 1173, 1181, 1193, 1208, 1223, 1238, 1253, 1268, 1283, 1298, 1313, 1328, 1343, 1358, 1373, 1388, 1403, 1418, 1433, 1448, 1463, 1478, 1493, 1508, 1523, 1538, 1553, 1568 } ; static const flex_int16_t yy_def[758] = { 0, 700, 1, 700, 3, 701, 701, 702, 702, 703, 703, 701, 701, 704, 704, 700, 700, 700, 700, 700, 700, 705, 700, 700, 700, 706, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 707, 707, 707, 700, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 700, 700, 700, 700, 708, 700, 709, 700, 700, 700, 700, 700, 700, 710, 710, 700, 710, 710, 710, 710, 710, 710, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 711, 700, 700, 712, 700, 700, 700, 700, 700, 705, 700, 713, 700, 700, 700, 706, 714, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 118, 31, 700, 700, 700, 700, 715, 32, 700, 700, 700, 700, 700, 700, 700, 700, 707, 705, 706, 716, 700, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 700, 700, 700, 708, 700, 717, 700, 709, 718, 700, 204, 70, 700, 700, 700, 700, 719, 71, 700, 700, 700, 700, 710, 708, 709, 700, 700, 710, 710, 710, 710, 710, 710, 710, 710, 710, 700, 700, 700, 700, 700, 711, 720, 720, 705, 721, 700, 706, 722, 700, 700, 700, 700, 700, 723, 700, 715, 700, 700, 700, 724, 700, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 708, 725, 700, 709, 726, 700, 700, 700, 727, 700, 719, 700, 700, 710, 710, 710, 710, 710, 710, 710, 710, 710, 710, 710, 700, 711, 728, 728, 705, 705, 706, 706, 700, 729, 700, 700, 730, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 708, 708, 709, 709, 700, 731, 700, 700, 710, 710, 710, 710, 710, 710, 710, 710, 710, 710, 710, 732, 732, 705, 353, 706, 355, 700, 733, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 708, 428, 709, 430, 700, 710, 710, 710, 710, 710, 710, 710, 710, 734, 734, 735, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 710, 710, 710, 710, 736, 736, 737, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 710, 710, 738, 738, 739, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 740, 740, 741, 707, 707, 707, 707, 707, 707, 707, 707, 707, 742, 742, 743, 707, 707, 707, 707, 707, 707, 744, 744, 745, 707, 707, 707, 707, 707, 746, 746, 747, 707, 707, 707, 707, 748, 748, 749, 707, 707, 750, 750, 751, 707, 752, 752, 753, 707, 754, 754, 755, 707, 756, 756, 757, 700, 700, 700, 700, 0, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700 } ; static const flex_int16_t yy_nxt[1760] = { 0, 16, 16, 17, 18, 19, 19, 19, 17, 20, 21, 22, 23, 24, 25, 16, 16, 26, 27, 28, 29, 30, 31, 32, 32, 32, 32, 32, 32, 33, 34, 35, 36, 16, 37, 37, 37, 37, 38, 39, 37, 37, 16, 40, 37, 41, 42, 43, 44, 45, 46, 47, 37, 48, 37, 49, 50, 51, 52, 53, 37, 54, 55, 56, 57, 58, 59, 60, 37, 37, 61, 62, 63, 63, 64, 63, 62, 63, 63, 62, 65, 62, 62, 66, 67, 62, 62, 62, 62, 62, 68, 69, 70, 71, 71, 71, 71, 71, 71, 62, 72, 62, 73, 62, 74, 74, 74, 74, 75, 74, 74, 74, 76, 62, 74, 74, 74, 74, 77, 78, 74, 74, 74, 79, 74, 80, 74, 74, 74, 81, 74, 74, 74, 74, 82, 74, 74, 74, 74, 74, 83, 86, 86, 89, 89, 91, 92, 95, 91, 92, 91, 95, 93, 91, 285, 93, 90, 90, 103, 96, 106, 111, 286, 96, 97, 98, 99, 99, 99, 97, 133, 134, 93, 119, 112, 93, 113, 120, 107, 87, 87, 99, 98, 100, 100, 100, 99, 121, 114, 115, 104, 116, 136, 137, 117, 154, 118, 118, 118, 118, 118, 118, 118, 122, 155, 123, 123, 123, 123, 123, 123, 124, 139, 143, 156, 144, 140, 157, 125, 158, 145, 126, 146, 127, 128, 147, 188, 150, 166, 159, 148, 189, 125, 149, 151, 167, 160, 152, 126, 174, 153, 175, 199, 190, 161, 176, 162, 127, 191, 163, 128, 122, 164, 129, 129, 129, 129, 129, 129, 129, 170, 195, 177, 226, 171, 178, 125, 180, 181, 130, 227, 131, 184, 172, 200, 185, 349, 192, 182, 173, 125, 183, 193, 256, 186, 218, 130, 197, 197, 219, 197, 187, 197, 197, 220, 131, 232, 221, 349, 233, 196, 204, 204, 204, 204, 204, 204, 204, 205, 103, 206, 206, 206, 206, 206, 206, 207, 235, 223, 250, 224, 252, 235, 208, 225, 241, 209, 250, 210, 211, 97, 98, 99, 99, 99, 97, 250, 208, 252, 382, 103, 104, 383, 209, 99, 98, 99, 99, 99, 99, 277, 250, 210, 109, 278, 211, 205, 700, 212, 212, 212, 212, 212, 212, 212, 99, 98, 100, 100, 100, 99, 208, 104, 319, 213, 320, 214, 239, 239, 239, 239, 239, 239, 700, 252, 208, 264, 265, 268, 269, 310, 213, 242, 242, 242, 242, 242, 242, 311, 122, 214, 124, 124, 124, 124, 124, 124, 124, 252, 304, 291, 248, 248, 306, 125, 249, 249, 249, 249, 249, 249, 249, 240, 270, 292, 297, 271, 305, 125, 307, 298, 272, 312, 300, 700, 301, 313, 243, 118, 118, 118, 118, 118, 118, 118, 302, 315, 199, 699, 338, 326, 246, 247, 333, 247, 316, 197, 197, 339, 197, 700, 197, 197, 333, 235, 246, 247, 699, 199, 235, 333, 247, 324, 324, 324, 324, 324, 324, 203, 200, 327, 327, 327, 327, 327, 327, 205, 333, 207, 207, 207, 207, 207, 207, 207, 335, 335, 364, 331, 331, 200, 208, 332, 332, 332, 332, 332, 332, 332, 342, 365, 373, 374, 335, 414, 208, 349, 325, 343, 335, 452, 256, 247, 415, 247, 328, 204, 204, 204, 204, 204, 204, 204, 103, 452, 358, 247, 359, 349, 329, 330, 247, 330, 103, 452, 352, 352, 352, 352, 352, 352, 452, 358, 329, 330, 460, 697, 461, 241, 330, 517, 359, 633, 697, 634, 104, 354, 354, 354, 354, 354, 354, 356, 356, 256, 104, 357, 357, 357, 357, 357, 357, 357, 199, 517, 694, 109, 249, 249, 249, 249, 249, 249, 249, 326, 427, 427, 427, 427, 427, 427, 694, 429, 429, 429, 429, 429, 429, 332, 332, 332, 332, 332, 332, 332, 200, 330, 517, 330, 431, 431, 692, 203, 432, 432, 432, 432, 432, 432, 432, 330, 433, 241, 434, 517, 330, 256, 103, 690, 690, 450, 450, 450, 450, 450, 450, 241, 326, 433, 448, 448, 448, 448, 448, 448, 688, 256, 434, 529, 199, 109, 357, 357, 357, 357, 357, 357, 357, 502, 104, 103, 530, 686, 503, 109, 203, 686, 504, 247, 330, 247, 330, 449, 449, 449, 449, 449, 449, 449, 684, 256, 200, 247, 330, 449, 449, 449, 247, 330, 535, 682, 682, 104, 680, 536, 449, 449, 449, 449, 449, 449, 241, 432, 432, 432, 432, 432, 432, 432, 451, 451, 451, 451, 451, 451, 451, 679, 256, 677, 677, 675, 451, 451, 451, 674, 673, 199, 672, 256, 109, 670, 670, 451, 451, 451, 451, 451, 451, 513, 513, 513, 513, 513, 513, 668, 667, 666, 665, 664, 256, 662, 662, 326, 660, 659, 658, 657, 656, 200, 199, 515, 515, 515, 515, 515, 515, 655, 256, 653, 653, 651, 514, 514, 514, 514, 514, 514, 514, 650, 649, 203, 648, 647, 514, 514, 514, 646, 645, 644, 643, 256, 200, 641, 641, 514, 514, 514, 514, 514, 514, 326, 639, 638, 637, 636, 635, 632, 631, 516, 516, 516, 516, 516, 516, 516, 630, 629, 628, 627, 626, 516, 516, 516, 625, 624, 623, 622, 621, 203, 620, 619, 516, 516, 516, 516, 516, 516, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 102, 102, 618, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 108, 108, 256, 108, 108, 616, 108, 108, 108, 108, 108, 108, 108, 108, 108, 138, 138, 138, 138, 138, 616, 138, 138, 198, 198, 614, 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, 202, 202, 613, 202, 202, 612, 202, 202, 202, 202, 202, 202, 202, 202, 202, 217, 217, 217, 217, 217, 611, 217, 217, 236, 610, 609, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 237, 608, 607, 606, 237, 237, 605, 237, 237, 237, 237, 237, 604, 237, 237, 102, 102, 603, 102, 602, 601, 600, 599, 102, 102, 102, 108, 108, 598, 108, 597, 596, 595, 594, 108, 108, 108, 251, 251, 251, 593, 592, 591, 251, 255, 590, 589, 588, 255, 255, 255, 255, 255, 255, 255, 255, 587, 255, 255, 198, 198, 586, 198, 585, 584, 583, 256, 198, 198, 198, 202, 202, 581, 202, 581, 579, 578, 577, 202, 202, 202, 334, 334, 334, 576, 575, 574, 334, 350, 573, 572, 571, 350, 350, 570, 350, 350, 350, 350, 350, 569, 350, 350, 353, 353, 353, 568, 567, 566, 353, 355, 355, 355, 565, 564, 563, 355, 249, 249, 562, 561, 249, 360, 560, 559, 558, 360, 360, 360, 360, 360, 360, 360, 360, 557, 360, 360, 428, 428, 428, 556, 555, 554, 428, 430, 430, 430, 553, 552, 551, 430, 332, 332, 550, 549, 332, 446, 548, 547, 546, 446, 446, 545, 446, 446, 446, 446, 446, 544, 446, 446, 357, 357, 543, 542, 357, 453, 541, 540, 539, 453, 453, 453, 453, 453, 453, 453, 453, 538, 453, 453, 432, 432, 537, 534, 432, 526, 533, 532, 531, 526, 526, 256, 526, 526, 526, 526, 526, 527, 526, 526, 528, 527, 525, 524, 528, 528, 528, 528, 528, 528, 528, 528, 523, 528, 528, 580, 522, 521, 520, 580, 580, 519, 580, 580, 580, 580, 580, 518, 580, 580, 582, 512, 511, 510, 582, 582, 582, 582, 582, 582, 582, 582, 509, 582, 582, 615, 508, 507, 506, 615, 615, 505, 615, 615, 615, 615, 615, 501, 615, 615, 617, 500, 499, 498, 617, 617, 617, 617, 617, 617, 617, 617, 497, 617, 617, 640, 496, 495, 494, 640, 640, 493, 640, 640, 640, 640, 640, 492, 640, 640, 642, 491, 490, 489, 642, 642, 642, 642, 642, 642, 642, 642, 488, 642, 642, 652, 487, 486, 485, 652, 652, 484, 652, 652, 652, 652, 652, 483, 652, 652, 654, 482, 481, 480, 654, 654, 654, 654, 654, 654, 654, 654, 479, 654, 654, 661, 478, 477, 476, 661, 661, 475, 661, 661, 661, 661, 661, 474, 661, 661, 663, 473, 472, 471, 663, 663, 663, 663, 663, 663, 663, 663, 470, 663, 663, 669, 469, 468, 467, 669, 669, 466, 669, 669, 669, 669, 669, 465, 669, 669, 671, 464, 463, 462, 671, 671, 671, 671, 671, 671, 671, 671, 459, 671, 671, 676, 458, 457, 456, 676, 676, 455, 676, 676, 676, 676, 676, 454, 676, 676, 678, 256, 447, 447, 678, 678, 678, 678, 678, 678, 678, 678, 445, 678, 678, 681, 444, 443, 442, 681, 681, 441, 681, 681, 681, 681, 681, 440, 681, 681, 683, 439, 438, 437, 683, 683, 683, 683, 683, 683, 683, 683, 436, 683, 683, 685, 435, 426, 425, 685, 685, 424, 685, 685, 685, 685, 685, 423, 685, 685, 687, 422, 421, 420, 687, 687, 687, 687, 687, 687, 687, 687, 419, 687, 687, 689, 418, 417, 416, 689, 689, 413, 689, 689, 689, 689, 689, 412, 689, 689, 691, 411, 410, 409, 691, 691, 691, 691, 691, 691, 691, 691, 408, 691, 691, 693, 407, 406, 405, 693, 693, 404, 693, 693, 693, 693, 693, 403, 693, 693, 695, 402, 401, 400, 695, 695, 695, 695, 695, 695, 695, 695, 399, 695, 695, 696, 398, 397, 396, 696, 696, 395, 696, 696, 696, 696, 696, 394, 696, 696, 698, 393, 392, 391, 698, 698, 698, 698, 698, 698, 698, 698, 390, 698, 698, 389, 388, 387, 386, 385, 384, 381, 380, 379, 378, 377, 376, 375, 372, 371, 370, 369, 368, 367, 366, 363, 362, 361, 256, 351, 351, 348, 347, 346, 345, 344, 341, 340, 337, 336, 203, 323, 322, 321, 318, 317, 314, 309, 308, 303, 299, 296, 295, 294, 293, 290, 289, 288, 287, 284, 283, 282, 281, 280, 279, 276, 275, 274, 273, 267, 266, 263, 262, 261, 260, 259, 258, 257, 256, 109, 254, 253, 245, 244, 238, 234, 231, 230, 229, 228, 222, 216, 215, 120, 203, 201, 194, 179, 169, 168, 165, 142, 141, 135, 132, 110, 109, 105, 101, 700, 15, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700 } ; static const flex_int16_t yy_chk[1760] = { 0, 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, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 8, 9, 10, 11, 11, 13, 12, 12, 11, 14, 11, 12, 167, 12, 9, 10, 21, 13, 24, 27, 167, 14, 17, 17, 17, 17, 17, 17, 34, 34, 11, 30, 27, 12, 28, 30, 24, 7, 8, 19, 19, 19, 19, 19, 19, 30, 28, 28, 21, 29, 36, 36, 29, 44, 29, 29, 29, 29, 29, 29, 29, 31, 44, 31, 31, 31, 31, 31, 31, 31, 38, 41, 44, 41, 38, 45, 31, 45, 41, 31, 41, 31, 31, 42, 57, 43, 48, 45, 42, 57, 31, 42, 43, 48, 46, 43, 31, 52, 43, 52, 65, 58, 46, 52, 46, 31, 58, 46, 31, 32, 46, 32, 32, 32, 32, 32, 32, 32, 51, 61, 53, 79, 51, 53, 32, 55, 55, 32, 79, 32, 56, 51, 65, 56, 236, 59, 55, 51, 32, 55, 59, 698, 56, 75, 32, 63, 63, 75, 63, 56, 63, 63, 76, 32, 87, 76, 236, 87, 61, 68, 68, 68, 68, 68, 68, 68, 70, 102, 70, 70, 70, 70, 70, 70, 70, 91, 78, 127, 78, 131, 91, 70, 78, 108, 70, 126, 70, 70, 97, 97, 97, 97, 97, 97, 127, 70, 131, 277, 139, 102, 277, 70, 99, 99, 99, 99, 99, 99, 159, 126, 70, 108, 159, 70, 71, 123, 71, 71, 71, 71, 71, 71, 71, 100, 100, 100, 100, 100, 100, 71, 139, 191, 71, 191, 71, 104, 104, 104, 104, 104, 104, 123, 130, 71, 150, 150, 153, 153, 185, 71, 109, 109, 109, 109, 109, 109, 185, 124, 71, 124, 124, 124, 124, 124, 124, 124, 130, 181, 172, 125, 125, 182, 124, 125, 125, 125, 125, 125, 125, 125, 104, 154, 172, 177, 154, 181, 124, 182, 177, 154, 186, 179, 206, 179, 186, 109, 118, 118, 118, 118, 118, 118, 118, 179, 188, 198, 697, 223, 202, 118, 118, 210, 118, 188, 197, 197, 223, 197, 206, 197, 197, 209, 235, 118, 118, 696, 218, 235, 210, 118, 200, 200, 200, 200, 200, 200, 202, 198, 203, 203, 203, 203, 203, 203, 207, 209, 207, 207, 207, 207, 207, 207, 207, 213, 214, 261, 208, 208, 218, 207, 208, 208, 208, 208, 208, 208, 208, 226, 261, 269, 269, 214, 311, 207, 349, 200, 226, 213, 358, 695, 249, 311, 249, 203, 204, 204, 204, 204, 204, 204, 204, 239, 359, 251, 249, 251, 349, 204, 204, 249, 204, 448, 358, 239, 239, 239, 239, 239, 239, 359, 251, 204, 204, 370, 694, 370, 242, 204, 433, 251, 604, 693, 604, 239, 242, 242, 242, 242, 242, 242, 246, 246, 691, 448, 246, 246, 246, 246, 246, 246, 246, 324, 433, 690, 242, 248, 248, 248, 248, 248, 248, 248, 327, 324, 324, 324, 324, 324, 324, 689, 327, 327, 327, 327, 327, 327, 331, 331, 331, 331, 331, 331, 331, 324, 332, 434, 332, 329, 329, 688, 327, 329, 329, 329, 329, 329, 329, 329, 332, 334, 354, 334, 434, 332, 687, 352, 686, 685, 354, 354, 354, 354, 354, 354, 450, 515, 334, 352, 352, 352, 352, 352, 352, 684, 683, 334, 454, 513, 354, 356, 356, 356, 356, 356, 356, 356, 417, 352, 353, 454, 682, 417, 450, 515, 681, 417, 357, 432, 357, 432, 353, 353, 353, 353, 353, 353, 353, 679, 678, 513, 357, 432, 353, 353, 353, 357, 432, 464, 677, 676, 353, 674, 464, 353, 353, 353, 353, 353, 353, 355, 431, 431, 431, 431, 431, 431, 431, 355, 355, 355, 355, 355, 355, 355, 673, 671, 670, 669, 668, 355, 355, 355, 666, 665, 427, 664, 663, 355, 662, 661, 355, 355, 355, 355, 355, 355, 427, 427, 427, 427, 427, 427, 660, 659, 658, 657, 656, 654, 653, 652, 429, 651, 650, 649, 648, 645, 427, 428, 429, 429, 429, 429, 429, 429, 643, 642, 641, 640, 636, 428, 428, 428, 428, 428, 428, 428, 634, 633, 429, 632, 630, 428, 428, 428, 626, 624, 621, 620, 617, 428, 616, 615, 428, 428, 428, 428, 428, 428, 430, 611, 609, 608, 606, 605, 603, 602, 430, 430, 430, 430, 430, 430, 430, 601, 599, 598, 596, 595, 430, 430, 430, 593, 592, 590, 589, 588, 430, 587, 586, 430, 430, 430, 430, 430, 430, 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, 702, 702, 702, 702, 702, 702, 702, 702, 702, 702, 702, 702, 702, 702, 702, 703, 703, 703, 703, 703, 703, 703, 703, 703, 703, 703, 703, 703, 703, 703, 704, 704, 704, 704, 704, 704, 704, 704, 704, 704, 704, 704, 704, 704, 704, 705, 705, 585, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 706, 706, 582, 706, 706, 581, 706, 706, 706, 706, 706, 706, 706, 706, 706, 707, 707, 707, 707, 707, 580, 707, 707, 708, 708, 578, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 709, 709, 576, 709, 709, 574, 709, 709, 709, 709, 709, 709, 709, 709, 709, 710, 710, 710, 710, 710, 573, 710, 710, 711, 572, 571, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 712, 570, 568, 567, 712, 712, 566, 712, 712, 712, 712, 712, 563, 712, 712, 713, 713, 559, 713, 558, 556, 555, 554, 713, 713, 713, 714, 714, 553, 714, 552, 550, 549, 548, 714, 714, 714, 715, 715, 715, 543, 542, 539, 715, 716, 538, 537, 536, 716, 716, 716, 716, 716, 716, 716, 716, 535, 716, 716, 717, 717, 534, 717, 533, 530, 529, 528, 717, 717, 717, 718, 718, 527, 718, 526, 524, 523, 522, 718, 718, 718, 719, 719, 719, 518, 512, 510, 719, 720, 509, 508, 506, 720, 720, 504, 720, 720, 720, 720, 720, 503, 720, 720, 721, 721, 721, 502, 500, 499, 721, 722, 722, 722, 498, 497, 496, 722, 723, 723, 495, 494, 723, 724, 492, 491, 490, 724, 724, 724, 724, 724, 724, 724, 724, 489, 724, 724, 725, 725, 725, 488, 487, 486, 725, 726, 726, 726, 484, 483, 482, 726, 727, 727, 481, 480, 727, 728, 479, 478, 477, 728, 728, 473, 728, 728, 728, 728, 728, 472, 728, 728, 729, 729, 471, 470, 729, 730, 469, 468, 467, 730, 730, 730, 730, 730, 730, 730, 730, 466, 730, 730, 731, 731, 465, 461, 731, 732, 460, 456, 455, 732, 732, 453, 732, 732, 732, 732, 732, 447, 732, 732, 733, 446, 445, 444, 733, 733, 733, 733, 733, 733, 733, 733, 442, 733, 733, 734, 441, 440, 439, 734, 734, 438, 734, 734, 734, 734, 734, 435, 734, 734, 735, 426, 425, 424, 735, 735, 735, 735, 735, 735, 735, 735, 423, 735, 735, 736, 421, 420, 419, 736, 736, 418, 736, 736, 736, 736, 736, 415, 736, 736, 737, 414, 412, 411, 737, 737, 737, 737, 737, 737, 737, 737, 410, 737, 737, 738, 409, 408, 407, 738, 738, 406, 738, 738, 738, 738, 738, 405, 738, 738, 739, 404, 403, 402, 739, 739, 739, 739, 739, 739, 739, 739, 401, 739, 739, 740, 400, 399, 398, 740, 740, 397, 740, 740, 740, 740, 740, 396, 740, 740, 741, 395, 394, 393, 741, 741, 741, 741, 741, 741, 741, 741, 392, 741, 741, 742, 390, 388, 387, 742, 742, 386, 742, 742, 742, 742, 742, 385, 742, 742, 743, 384, 383, 382, 743, 743, 743, 743, 743, 743, 743, 743, 379, 743, 743, 744, 378, 377, 376, 744, 744, 375, 744, 744, 744, 744, 744, 374, 744, 744, 745, 373, 372, 371, 745, 745, 745, 745, 745, 745, 745, 745, 369, 745, 745, 746, 367, 365, 364, 746, 746, 362, 746, 746, 746, 746, 746, 361, 746, 746, 747, 360, 351, 350, 747, 747, 747, 747, 747, 747, 747, 747, 347, 747, 747, 748, 346, 345, 344, 748, 748, 343, 748, 748, 748, 748, 748, 342, 748, 748, 749, 341, 340, 339, 749, 749, 749, 749, 749, 749, 749, 749, 338, 749, 749, 750, 337, 323, 322, 750, 750, 321, 750, 750, 750, 750, 750, 320, 750, 750, 751, 319, 318, 317, 751, 751, 751, 751, 751, 751, 751, 751, 316, 751, 751, 752, 315, 314, 312, 752, 752, 310, 752, 752, 752, 752, 752, 309, 752, 752, 753, 308, 307, 306, 753, 753, 753, 753, 753, 753, 753, 753, 305, 753, 753, 754, 304, 303, 302, 754, 754, 301, 754, 754, 754, 754, 754, 300, 754, 754, 755, 299, 298, 297, 755, 755, 755, 755, 755, 755, 755, 755, 296, 755, 755, 756, 295, 294, 293, 756, 756, 292, 756, 756, 756, 756, 756, 291, 756, 756, 757, 289, 288, 287, 757, 757, 757, 757, 757, 757, 757, 757, 285, 757, 757, 284, 283, 281, 280, 279, 278, 276, 275, 274, 273, 272, 271, 270, 268, 267, 266, 265, 264, 263, 262, 260, 258, 257, 255, 238, 237, 233, 230, 229, 228, 227, 225, 224, 222, 221, 219, 194, 193, 192, 190, 189, 187, 184, 183, 180, 178, 176, 175, 174, 173, 171, 170, 169, 168, 165, 164, 163, 162, 161, 160, 158, 157, 156, 155, 152, 151, 149, 148, 147, 146, 145, 144, 143, 141, 140, 137, 133, 117, 115, 96, 90, 83, 82, 81, 80, 77, 73, 72, 69, 67, 66, 60, 54, 50, 49, 47, 40, 39, 35, 33, 26, 25, 23, 20, 15, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700 } ; /* Table of booleans, true if rule could match eol. */ static const flex_int32_t yy_rule_can_match_eol[172] = { 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, 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, 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, 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, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 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, 1, 0, 1, 0, 0, 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 // //====================-------------------------------------------------------------- // Eran Ifrah 2014 (c) //====================-------------------------------------------------------------- // // To generate a source file from this .l file, you will need // a flex version 2.5.34 and later // Under Windows, you will need to run the following command // from within *MSYS* terminal (or run codelite from an MSYS shell): // /usr/bin/flex --noline --batch --outfile=CxxLexer.cpp CxxScanner.l // //====================-------------------------------------------------------------- // extern "C" int yywrap(void*) { return 1; } #include #include #include #include "CxxLexerAPI.h" #include "CxxScannerTokens.h" #define YY_FATAL_ERROR(x) #define YYSTYPE char* #define ECHO #define P(s) #define YY_NO_UNISTD_H #define YY_USER_ACTION yycolumn += yyleng; #define RETURN_WHITESPACE() \ CppLexerUserData* userData = (CppLexerUserData*)yyg->yyextra_r; \ if(userData->IsCollectingWhitespace()) { \ return T_WHITESPACE; \ } #define RETURN_NEWLINE() \ CppLexerUserData* userData = (CppLexerUserData*)yyg->yyextra_r; \ if(userData->IsCollectingWhitespace()) { \ return T_NEWLINE; \ } /* regex and modes */ /* options */ #define INITIAL 0 #define PREPR 1 #define WRAP_PREP 2 #define CPP_COMMENT 3 #define C_COMMENT 4 #define INCLUDE 5 #define RAW_STRING 6 #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 /* Holds the entire state of the reentrant scanner. */ struct yyguts_t { /* User-defined. Not touched by flex. */ YY_EXTRA_TYPE yyextra_r; /* The rest are the same as the globals declared in the non-reentrant scanner. */ FILE *yyin_r, *yyout_r; size_t yy_buffer_stack_top; /**< index of top of stack. */ size_t yy_buffer_stack_max; /**< capacity of stack. */ YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ char yy_hold_char; int yy_n_chars; int yyleng_r; char *yy_c_buf_p; int yy_init; int yy_start; int yy_did_buffer_switch_on_eof; int yy_start_stack_ptr; int yy_start_stack_depth; int *yy_start_stack; yy_state_type yy_last_accepting_state; char* yy_last_accepting_cpos; int yylineno_r; int yy_flex_debug_r; char *yytext_r; int yy_more_flag; int yy_more_len; }; /* end struct yyguts_t */ static int yy_init_globals ( yyscan_t yyscanner ); int yylex_init (yyscan_t* scanner); int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ int yylex_destroy ( yyscan_t yyscanner ); int yyget_debug ( yyscan_t yyscanner ); void yyset_debug ( int debug_flag , yyscan_t yyscanner ); YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); FILE *yyget_in ( yyscan_t yyscanner ); void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); FILE *yyget_out ( yyscan_t yyscanner ); void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); int yyget_leng ( yyscan_t yyscanner ); char *yyget_text ( yyscan_t yyscanner ); int yyget_lineno ( yyscan_t yyscanner ); void yyset_lineno ( int _line_number , yyscan_t yyscanner ); int yyget_column ( yyscan_t yyscanner ); void yyset_column ( int _column_no , yyscan_t yyscanner ); /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int yywrap ( yyscan_t yyscanner ); #else extern int yywrap ( yyscan_t yyscanner ); #endif #endif #ifndef YY_NO_UNPUT static void yyunput ( int c, char *buf_ptr , yyscan_t yyscanner); #endif #ifndef yytext_ptr static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen ( const char * , yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput ( yyscan_t yyscanner ); #else static int input ( yyscan_t yyscanner ); #endif #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k */ #define YY_READ_BUF_SIZE 16384 #else #define YY_READ_BUF_SIZE 8192 #endif /* __ia64__ */ #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 do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) #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 = '*'; \ int 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 = (int) fread(buf, 1, (yy_size_t) 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 , yyscanner) #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 (yyscan_t yyscanner); #define YY_DECL int yylex (yyscan_t yyscanner) #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 /*LINTED*/break; #endif #define YY_RULE_SETUP \ YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { yy_state_type yy_current_state; char *yy_cp, *yy_bp; int yy_act; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if ( !yyg->yy_init ) { yyg->yy_init = 1; #ifdef YY_USER_INIT YY_USER_INIT; #endif if ( ! yyg->yy_start ) yyg->yy_start = 1; /* first start state */ if ( ! yyin ) yyin = stdin; if ( ! yyout ) yyout = stdout; if ( ! YY_CURRENT_BUFFER ) { yyensure_buffer_stack (yyscanner); YY_CURRENT_BUFFER_LVALUE = yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); } yy_load_buffer_state( yyscanner ); } { while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { yy_cp = yyg->yy_c_buf_p; /* Support of yytext. */ *yy_cp = yyg->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 = yyg->yy_start; yy_match: do { YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; yyg->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 >= 701 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ++yy_cp; } while ( yy_current_state != 700 ); yy_cp = yyg->yy_last_accepting_cpos; yy_current_state = yyg->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' ) do{ yylineno++; yycolumn=0; }while(0) ; } 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 = yyg->yy_hold_char; yy_cp = yyg->yy_last_accepting_cpos; yy_current_state = yyg->yy_last_accepting_state; goto yy_find_action; case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(PREPR): case YY_STATE_EOF(WRAP_PREP): case YY_STATE_EOF(CPP_COMMENT): case YY_STATE_EOF(C_COMMENT): case YY_STATE_EOF(INCLUDE): case YY_STATE_EOF(RAW_STRING): {yyterminate();} YY_BREAK case 1: YY_RULE_SETUP { return T_ALIGNAS; } YY_BREAK case 2: YY_RULE_SETUP { return T_ALIGNOF; } YY_BREAK case 3: YY_RULE_SETUP { return T_AND; } YY_BREAK case 4: YY_RULE_SETUP { return T_AND_EQ; } YY_BREAK case 5: YY_RULE_SETUP { return T_ASM; } YY_BREAK case 6: YY_RULE_SETUP { return T_AUTO; } YY_BREAK case 7: YY_RULE_SETUP { return T_BITAND; } YY_BREAK case 8: YY_RULE_SETUP { return T_BITOR; } YY_BREAK case 9: YY_RULE_SETUP { return T_BOOL; } YY_BREAK case 10: YY_RULE_SETUP { return T_BREAK; } YY_BREAK case 11: YY_RULE_SETUP { return T_CASE; } YY_BREAK case 12: YY_RULE_SETUP { return T_CATCH;} YY_BREAK case 13: YY_RULE_SETUP { return T_CHAR;} YY_BREAK case 14: YY_RULE_SETUP { return T_CHAR16_T;} YY_BREAK case 15: YY_RULE_SETUP { return T_CHAR32_T;} YY_BREAK case 16: YY_RULE_SETUP { return T_CLASS;} YY_BREAK case 17: YY_RULE_SETUP { return T_COMPL;} YY_BREAK case 18: YY_RULE_SETUP { return T_CONST;} YY_BREAK case 19: YY_RULE_SETUP { return T_CONSTEXPR;} YY_BREAK case 20: YY_RULE_SETUP { return T_CONST_CAST;} YY_BREAK case 21: YY_RULE_SETUP { return T_CONTINUE;} YY_BREAK case 22: YY_RULE_SETUP { return T_DECLTYPE;} YY_BREAK case 23: YY_RULE_SETUP { return T_DEFAULT;} YY_BREAK case 24: YY_RULE_SETUP { return T_DELETE;} YY_BREAK case 25: YY_RULE_SETUP { return T_DO;} YY_BREAK case 26: YY_RULE_SETUP { return T_DOUBLE;} YY_BREAK case 27: YY_RULE_SETUP { return T_DYNAMIC_CAST;} YY_BREAK case 28: YY_RULE_SETUP { return T_ELSE;} YY_BREAK case 29: YY_RULE_SETUP { return T_ENUM;} YY_BREAK case 30: YY_RULE_SETUP { return T_EXPLICIT;} YY_BREAK case 31: YY_RULE_SETUP { return T_EXPORT;} YY_BREAK case 32: YY_RULE_SETUP { return T_EXTERN;} YY_BREAK case 33: YY_RULE_SETUP { return T_FALSE;} YY_BREAK case 34: YY_RULE_SETUP { return T_FINAL;} YY_BREAK case 35: YY_RULE_SETUP { return T_FLOAT;} YY_BREAK case 36: YY_RULE_SETUP { return T_FOR;} YY_BREAK case 37: YY_RULE_SETUP { return T_FRIEND;} YY_BREAK case 38: YY_RULE_SETUP { return T_GOTO;} YY_BREAK case 39: YY_RULE_SETUP { return T_IF;} YY_BREAK case 40: YY_RULE_SETUP { return T_INLINE;} YY_BREAK case 41: YY_RULE_SETUP { return T_INT;} YY_BREAK case 42: YY_RULE_SETUP { return T_LONG;} YY_BREAK case 43: YY_RULE_SETUP { return T_MUTABLE;} YY_BREAK case 44: YY_RULE_SETUP { return T_NAMESPACE;} YY_BREAK case 45: YY_RULE_SETUP { return T_NEW;} YY_BREAK case 46: YY_RULE_SETUP { return T_NOEXCEPT;} YY_BREAK case 47: YY_RULE_SETUP { return T_NOT;} YY_BREAK case 48: YY_RULE_SETUP { return T_NOT_EQ;} YY_BREAK case 49: YY_RULE_SETUP { return T_NULLPTR;} YY_BREAK case 50: YY_RULE_SETUP { return T_OPERATOR;} YY_BREAK case 51: YY_RULE_SETUP { return T_OR;} YY_BREAK case 52: YY_RULE_SETUP { return T_OR_EQ;} YY_BREAK case 53: YY_RULE_SETUP { return T_OVERRIDE;} YY_BREAK case 54: YY_RULE_SETUP { return T_PRIVATE;} YY_BREAK case 55: YY_RULE_SETUP { return T_PROTECTED;} YY_BREAK case 56: YY_RULE_SETUP { return T_PUBLIC;} YY_BREAK case 57: YY_RULE_SETUP { return T_REGISTER;} YY_BREAK case 58: YY_RULE_SETUP { return T_REINTERPRET_CAST;} YY_BREAK case 59: YY_RULE_SETUP { return T_RETURN;} YY_BREAK case 60: YY_RULE_SETUP { return T_SHORT;} YY_BREAK case 61: YY_RULE_SETUP { return T_SIGNED;} YY_BREAK case 62: YY_RULE_SETUP { return T_SIZEOF;} YY_BREAK case 63: YY_RULE_SETUP { return T_STATIC;} YY_BREAK case 64: YY_RULE_SETUP { return T_STATIC_ASSERT;} YY_BREAK case 65: YY_RULE_SETUP { return T_STATIC_CAST;} YY_BREAK case 66: YY_RULE_SETUP { return T_STRUCT;} YY_BREAK case 67: YY_RULE_SETUP { return T_SWITCH;} YY_BREAK case 68: YY_RULE_SETUP { return T_TEMPLATE;} YY_BREAK case 69: YY_RULE_SETUP { return T_THIS;} YY_BREAK case 70: YY_RULE_SETUP { return T_THREAD_LOCAL;} YY_BREAK case 71: YY_RULE_SETUP { return T_THROW;} YY_BREAK case 72: YY_RULE_SETUP { return T_TRUE;} YY_BREAK case 73: YY_RULE_SETUP { return T_TRY;} YY_BREAK case 74: YY_RULE_SETUP { return T_TYPEDEF;} YY_BREAK case 75: YY_RULE_SETUP { return T_TYPEID;} YY_BREAK case 76: YY_RULE_SETUP { return T_TYPENAME;} YY_BREAK case 77: YY_RULE_SETUP { return T_UNION;} YY_BREAK case 78: YY_RULE_SETUP { return T_UNSIGNED;} YY_BREAK case 79: YY_RULE_SETUP { return T_USING;} YY_BREAK case 80: YY_RULE_SETUP { return T_VIRTUAL;} YY_BREAK case 81: YY_RULE_SETUP { return T_VOID;} YY_BREAK case 82: YY_RULE_SETUP { return T_VOLATILE;} YY_BREAK case 83: YY_RULE_SETUP { return T_WCHAR_T;} YY_BREAK case 84: YY_RULE_SETUP { return T_WHILE;} YY_BREAK case 85: YY_RULE_SETUP { return T_XOR;} YY_BREAK case 86: YY_RULE_SETUP { return T_XOR_EQ;} YY_BREAK case 87: /* rule 87 can match eol */ YY_RULE_SETUP {} YY_BREAK case 88: YY_RULE_SETUP { RETURN_WHITESPACE(); } YY_BREAK case 89: YY_RULE_SETUP {RETURN_WHITESPACE();} YY_BREAK case 90: /* rule 90 can match eol */ YY_RULE_SETUP { RETURN_NEWLINE(); } YY_BREAK case 91: YY_RULE_SETUP { return T_DEC_NUMBER;} YY_BREAK case 92: YY_RULE_SETUP { return T_OCTAL_NUMBER;} YY_BREAK case 93: YY_RULE_SETUP { return T_HEX_NUMBER; } YY_BREAK case 94: YY_RULE_SETUP { return T_FLOAT_NUMBER;} YY_BREAK case 95: YY_RULE_SETUP { return T_DOT_STAR; } YY_BREAK case 96: YY_RULE_SETUP { return T_DOUBLE_COLONS; } YY_BREAK case 97: YY_RULE_SETUP { return T_ARROW; } YY_BREAK case 98: YY_RULE_SETUP { return T_ARROW_STAR; } YY_BREAK case 99: YY_RULE_SETUP { return T_PLUS_PLUS; } YY_BREAK case 100: YY_RULE_SETUP { return T_MINUS_MINUS; } YY_BREAK case 101: YY_RULE_SETUP { return T_LS; } YY_BREAK case 102: YY_RULE_SETUP { return T_LE; } YY_BREAK case 103: YY_RULE_SETUP { return T_GE; } YY_BREAK case 104: YY_RULE_SETUP { return T_EQUAL; } YY_BREAK case 105: YY_RULE_SETUP { return T_NOT_EQUAL; } YY_BREAK case 106: YY_RULE_SETUP { return T_AND_AND;} YY_BREAK case 107: YY_RULE_SETUP { return T_OR_OR;} YY_BREAK case 108: YY_RULE_SETUP { return T_STAR_EQUAL;} YY_BREAK case 109: YY_RULE_SETUP { return T_SLASH_EQUAL;} YY_BREAK case 110: YY_RULE_SETUP { return T_DIV_EQUAL;} YY_BREAK case 111: YY_RULE_SETUP { return T_PLUS_EQUAL;} YY_BREAK case 112: YY_RULE_SETUP { return T_MINUS_EQUAL;} YY_BREAK case 113: YY_RULE_SETUP { return T_LS_ASSIGN;} YY_BREAK case 114: YY_RULE_SETUP { return T_RS_ASSIGN;} YY_BREAK case 115: YY_RULE_SETUP { return T_AND_EQUAL;} YY_BREAK case 116: YY_RULE_SETUP { return T_POW_EQUAL;} YY_BREAK case 117: YY_RULE_SETUP { return T_OR_EQUAL;} YY_BREAK case 118: YY_RULE_SETUP { return T_3_DOTS;} YY_BREAK case 119: YY_RULE_SETUP { return T_STRING; } YY_BREAK case 120: YY_RULE_SETUP { return T_STRING; } YY_BREAK case 121: YY_RULE_SETUP { BEGIN(RAW_STRING); CppLexerUserData* userData = (CppLexerUserData*)yyg->yyextra_r; // R"( userData->set_raw_string_label(yytext + 2 /* skip the `R"` */, yyleng - 3 /* we want just the d-char */); userData->clear_raw_string(); } YY_BREAK case 122: YY_RULE_SETUP { // Clear the comment collected BEGIN C_COMMENT; CppLexerUserData* userData = (CppLexerUserData*)yyg->yyextra_r; if(userData->IsCollectingComments()) { userData->ClearComment(); userData->AppendToComment("/*"); userData->SetCommentStartLine(yylineno); } } YY_BREAK case 123: YY_RULE_SETUP { CppLexerUserData* userData = (CppLexerUserData*)yyg->yyextra_r; if(userData->IsCollectingComments()) { userData->AppendToComment("*/"); userData->SetCommentEndLine(yylineno); } BEGIN INITIAL; if(userData->IsCollectingComments()) { return T_C_COMMENT; } } YY_BREAK case 124: /* rule 124 can match eol */ YY_RULE_SETUP { CppLexerUserData* userData = (CppLexerUserData*)yyg->yyextra_r; if(userData->IsCollectingComments()) { userData->AppendToComment("\n"); } } YY_BREAK case 125: YY_RULE_SETUP { CppLexerUserData* userData = (CppLexerUserData*)yyg->yyextra_r; if(userData->IsCollectingComments()) { userData->AppendToComment(yytext[0]); } } YY_BREAK case 126: YY_RULE_SETUP { int oldState = yyg->yy_start; BEGIN CPP_COMMENT; CppLexerUserData* userData = (CppLexerUserData*)yyg->yyextra_r; if(userData->IsCollectingComments()) { userData->ClearComment(); userData->AppendToComment("//"); userData->SetCommentStartLine(yylineno); } if((1 + 2 * PREPR) == oldState) { return T_PP_STATE_EXIT; } } YY_BREAK case 127: /* rule 127 can match eol */ YY_RULE_SETUP { CppLexerUserData* userData = (CppLexerUserData*)yyg->yyextra_r; if(userData->IsCollectingComments()) { userData->AppendToComment("\\\n"); } } YY_BREAK case 128: /* rule 128 can match eol */ YY_RULE_SETUP { CppLexerUserData* userData = (CppLexerUserData*)yyg->yyextra_r; if(userData->IsCollectingComments()) { userData->AppendToComment("\\\r\n"); } } YY_BREAK case 129: /* rule 129 can match eol */ YY_RULE_SETUP { BEGIN INITIAL; CppLexerUserData* userData = (CppLexerUserData*)yyg->yyextra_r; if(userData->IsCollectingComments()) { userData->AppendToComment("\n"); return T_CXX_COMMENT; } } YY_BREAK case 130: YY_RULE_SETUP { CppLexerUserData* userData = (CppLexerUserData*)yyg->yyextra_r; if(userData->IsCollectingComments()) { userData->AppendToComment(yytext[0]); } } YY_BREAK case 131: YY_RULE_SETUP { return T_IDENTIFIER; } YY_BREAK case 132: YY_RULE_SETUP { BEGIN(PREPR); CppLexerUserData* userData = (CppLexerUserData*)yyg->yyextra_r; userData->SetPreProcessorSection(true); } YY_BREAK case 133: YY_RULE_SETUP { return yytext[0]; } YY_BREAK case 134: /* rule 134 can match eol */ YY_RULE_SETUP { /* keep the current state */ } YY_BREAK case 135: /* rule 135 can match eol */ YY_RULE_SETUP { /* keep the current state */ } YY_BREAK case 136: YY_RULE_SETUP { /* do nothing */ RETURN_WHITESPACE(); } YY_BREAK case 137: /* rule 137 can match eol */ YY_RULE_SETUP { BEGIN(INITIAL); CppLexerUserData* userData = (CppLexerUserData*)yyg->yyextra_r; userData->SetPreProcessorSection(false); return T_PP_STATE_EXIT; } YY_BREAK case 138: YY_RULE_SETUP { return T_PP_DEFINE; } YY_BREAK case 139: YY_RULE_SETUP { return T_PP_DEFINED; } YY_BREAK case 140: YY_RULE_SETUP { return T_PP_IF; } YY_BREAK case 141: YY_RULE_SETUP { return T_PP_IFDEF; } YY_BREAK case 142: YY_RULE_SETUP { return T_PP_IFNDEF; } YY_BREAK case 143: YY_RULE_SETUP { return T_PP_ELSE; } YY_BREAK case 144: YY_RULE_SETUP { return T_PP_ELIF; } YY_BREAK case 145: YY_RULE_SETUP { return T_PP_ENDIF; } YY_BREAK case 146: YY_RULE_SETUP { return T_PP_LINE; } YY_BREAK case 147: YY_RULE_SETUP { return T_PP_PRAGMA; } YY_BREAK case 148: YY_RULE_SETUP { return T_PP_UNDEF; } YY_BREAK case 149: YY_RULE_SETUP { return T_PP_ERROR; } YY_BREAK case 150: YY_RULE_SETUP { return T_PP_AND; } YY_BREAK case 151: YY_RULE_SETUP { return T_PP_OR; } YY_BREAK case 152: YY_RULE_SETUP { return T_PP_GT; } YY_BREAK case 153: YY_RULE_SETUP { return T_PP_GTEQ; } YY_BREAK case 154: YY_RULE_SETUP { return T_PP_LT; } YY_BREAK case 155: YY_RULE_SETUP { return T_PP_LTEQ; } YY_BREAK case 156: YY_RULE_SETUP { BEGIN(INCLUDE); } YY_BREAK case 157: YY_RULE_SETUP { return T_PP_STRING; } YY_BREAK case 158: YY_RULE_SETUP { return T_PP_STRING; } YY_BREAK case 159: YY_RULE_SETUP { return T_PP_DEC_NUMBER;} YY_BREAK case 160: YY_RULE_SETUP { return T_PP_OCTAL_NUMBER;} YY_BREAK case 161: YY_RULE_SETUP { return T_PP_HEX_NUMBER; } YY_BREAK case 162: YY_RULE_SETUP { return T_PP_FLOAT_NUMBER;} YY_BREAK case 163: YY_RULE_SETUP { return T_PP_IDENTIFIER; } YY_BREAK case 164: YY_RULE_SETUP { return yytext[0]; } YY_BREAK case 165: YY_RULE_SETUP { CppLexerUserData* userData = (CppLexerUserData*)yyg->yyextra_r; std::string delim_found(yytext + 1, yyleng - 2); // we just want the `dchar_seq` sequence if(delim_found == userData->get_raw_string_label()) { BEGIN(INITIAL); return T_RAW_STRING; } else { userData->append_raw_string(yytext, yyleng); } } YY_BREAK case 166: /* rule 166 can match eol */ YY_RULE_SETUP { CppLexerUserData* userData = (CppLexerUserData*)yyg->yyextra_r; userData->append_raw_string('\n'); } YY_BREAK case 167: YY_RULE_SETUP { CppLexerUserData* userData = (CppLexerUserData*)yyg->yyextra_r; userData->append_raw_string(yytext[0]); } YY_BREAK case 168: /* rule 168 can match eol */ YY_RULE_SETUP { BEGIN(INITIAL); CppLexerUserData* userData = (CppLexerUserData*)yyg->yyextra_r; userData->SetPreProcessorSection(false); return T_PP_STATE_EXIT; } YY_BREAK case 169: YY_RULE_SETUP { RETURN_WHITESPACE(); } YY_BREAK case 170: YY_RULE_SETUP { /* got the include file name */ return T_PP_INCLUDE_FILENAME; } YY_BREAK case 171: YY_RULE_SETUP ECHO; YY_BREAK case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ *yy_cp = yyg->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. */ yyg->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 ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) { /* This was really a NUL. */ yy_state_type yy_next_state; yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( yyscanner ); /* 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 , yyscanner); yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ yy_cp = ++yyg->yy_c_buf_p; yy_current_state = yy_next_state; goto yy_match; } else { yy_cp = yyg->yy_last_accepting_cpos; yy_current_state = yyg->yy_last_accepting_state; goto yy_find_action; } } else switch ( yy_get_next_buffer( yyscanner ) ) { case EOB_ACT_END_OF_FILE: { yyg->yy_did_buffer_switch_on_eof = 0; if ( yywrap( yyscanner ) ) { /* 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. */ yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; } else { if ( ! yyg->yy_did_buffer_switch_on_eof ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( yyscanner ); yy_cp = yyg->yy_c_buf_p; yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: yyg->yy_c_buf_p = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; yy_current_state = yy_get_previous_state( yyscanner ); yy_cp = yyg->yy_c_buf_p; yy_bp = yyg->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 user's declarations */ } /* 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 (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; char *source = yyg->yytext_ptr; int number_to_move, i; int ret_val; if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->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 ( yyg->yy_c_buf_p - yyg->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) (yyg->yy_c_buf_p - yyg->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 = yyg->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_LVALUE; int yy_c_buf_p_offset = (int) (yyg->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, (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); } else /* Can't grow it, we don't own it. */ b->yy_ch_buf = NULL; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); yyg->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]), yyg->yy_n_chars, num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; } if ( yyg->yy_n_chars == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; yyrestart( yyin , yyscanner); } 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; if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); /* "- 2" to take care of EOB's */ YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); } yyg->yy_n_chars += number_to_move; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; yyg->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 (yyscan_t yyscanner) { yy_state_type yy_current_state; char *yy_cp; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yy_current_state = yyg->yy_start; for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) { YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; yyg->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 >= 701 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + 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 , yyscan_t yyscanner) { int yy_is_jam; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ char *yy_cp = yyg->yy_c_buf_p; YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; yyg->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 >= 701 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; yy_is_jam = (yy_current_state == 700); (void)yyg; return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_UNPUT static void yyunput (int c, char * yy_bp , yyscan_t yyscanner) { char *yy_cp; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yy_cp = yyg->yy_c_buf_p; /* undo effects of setting up yytext */ *yy_cp = yyg->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. */ int number_to_move = yyg->yy_n_chars + 2; char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; 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 = yyg->yy_n_chars = (int) 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; } yyg->yytext_ptr = yy_bp; yyg->yy_hold_char = *yy_cp; yyg->yy_c_buf_p = yy_cp; } #endif #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (yyscan_t yyscanner) #else static int input (yyscan_t yyscanner) #endif { int c; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; *yyg->yy_c_buf_p = yyg->yy_hold_char; if ( *yyg->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 ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) /* This was really a NUL. */ *yyg->yy_c_buf_p = '\0'; else { /* need more input */ int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr); ++yyg->yy_c_buf_p; switch ( yy_get_next_buffer( yyscanner ) ) { 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 , yyscanner); /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { if ( yywrap( yyscanner ) ) return 0; if ( ! yyg->yy_did_buffer_switch_on_eof ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(yyscanner); #else return input(yyscanner); #endif } case EOB_ACT_CONTINUE_SCAN: yyg->yy_c_buf_p = yyg->yytext_ptr + offset; break; } } } c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ yyg->yy_hold_char = *++yyg->yy_c_buf_p; if ( c == '\n' ) do{ yylineno++; yycolumn=0; }while(0) ; return c; } #endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * @param yyscanner The scanner object. * @note This function does not reset the start condition to @c INITIAL . */ void yyrestart (FILE * input_file , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if ( ! YY_CURRENT_BUFFER ){ yyensure_buffer_stack (yyscanner); YY_CURRENT_BUFFER_LVALUE = yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); } yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner); yy_load_buffer_state( yyscanner ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * @param yyscanner The scanner object. */ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* TODO. We should be able to replace this entire function body * with * yypop_buffer_state(); * yypush_buffer_state(new_buffer); */ yyensure_buffer_stack (yyscanner); if ( YY_CURRENT_BUFFER == new_buffer ) return; if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *yyg->yy_c_buf_p = yyg->yy_hold_char; YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; } YY_CURRENT_BUFFER_LVALUE = new_buffer; yy_load_buffer_state( yyscanner ); /* 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. */ yyg->yy_did_buffer_switch_on_eof = 1; } static void yy_load_buffer_state (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; yyg->yy_hold_char = *yyg->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. * @param yyscanner The scanner object. * @return the allocated buffer state. */ YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); 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( (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); 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 , yyscanner); return b; } /** Destroy the buffer. * @param b a buffer created with yy_create_buffer() * @param yyscanner The scanner object. */ void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 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 , yyscanner ); yyfree( (void *) b , yyscanner ); } /* 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 , yyscan_t yyscanner) { int oerrno = errno; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yy_flush_buffer( b , yyscanner); 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 = file ? (isatty( fileno(file) ) > 0) : 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. * @param yyscanner The scanner object. */ void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 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( yyscanner ); } /** 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. * @param yyscanner The scanner object. */ void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if (new_buffer == NULL) return; yyensure_buffer_stack(yyscanner); /* This block is copied from yy_switch_to_buffer. */ if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *yyg->yy_c_buf_p = yyg->yy_hold_char; YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; } /* Only push if top exists. Otherwise, replace top. */ if (YY_CURRENT_BUFFER) yyg->yy_buffer_stack_top++; YY_CURRENT_BUFFER_LVALUE = new_buffer; /* copied from yy_switch_to_buffer. */ yy_load_buffer_state( yyscanner ); yyg->yy_did_buffer_switch_on_eof = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * @param yyscanner The scanner object. */ void yypop_buffer_state (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if (!YY_CURRENT_BUFFER) return; yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner); YY_CURRENT_BUFFER_LVALUE = NULL; if (yyg->yy_buffer_stack_top > 0) --yyg->yy_buffer_stack_top; if (YY_CURRENT_BUFFER) { yy_load_buffer_state( yyscanner ); yyg->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 (yyscan_t yyscanner) { yy_size_t num_to_alloc; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if (!yyg->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; /* After all that talk, this was set to 1 anyways... */ yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc (num_to_alloc * sizeof(struct yy_buffer_state*) , yyscanner); if ( ! yyg->yy_buffer_stack ) YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); yyg->yy_buffer_stack_max = num_to_alloc; yyg->yy_buffer_stack_top = 0; return; } if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ /* Increase the buffer to prepare for a possible push. */ yy_size_t grow_size = 8 /* arbitrary grow size */; num_to_alloc = yyg->yy_buffer_stack_max + grow_size; yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc (yyg->yy_buffer_stack, num_to_alloc * sizeof(struct yy_buffer_state*) , yyscanner); if ( ! yyg->yy_buffer_stack ) YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); /* zero only the new slots.*/ memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); yyg->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 * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) { 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 NULL; b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); b->yy_buf_size = (int) (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 = NULL; 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 , yyscanner ); 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 * @param yyscanner The scanner object. * @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 (const char * yystr , yyscan_t yyscanner) { return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner); } /** 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 yybytes the byte buffer to scan * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner) { YY_BUFFER_STATE b; char *buf; yy_size_t n; int i; /* Get memory for full buffer, including space for trailing EOB's. */ n = (yy_size_t) (_yybytes_len + 2); buf = (char *) yyalloc( n , yyscanner ); 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 , yyscanner); 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 yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; (void)yyg; 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] = yyg->yy_hold_char; \ yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ yyg->yy_hold_char = *yyg->yy_c_buf_p; \ *yyg->yy_c_buf_p = '\0'; \ yyleng = yyless_macro_arg; \ } \ while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ /** Get the user-defined data for this scanner. * @param yyscanner The scanner object. */ YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyextra; } /** Get the current line number. * @param yyscanner The scanner object. */ int yyget_lineno (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if (! YY_CURRENT_BUFFER) return 0; return yylineno; } /** Get the current column number. * @param yyscanner The scanner object. */ int yyget_column (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if (! YY_CURRENT_BUFFER) return 0; return yycolumn; } /** Get the input stream. * @param yyscanner The scanner object. */ FILE *yyget_in (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyin; } /** Get the output stream. * @param yyscanner The scanner object. */ FILE *yyget_out (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyout; } /** Get the length of the current token. * @param yyscanner The scanner object. */ int yyget_leng (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyleng; } /** Get the current token. * @param yyscanner The scanner object. */ char *yyget_text (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yytext; } /** Set the user-defined data. This data is never touched by the scanner. * @param user_defined The data to be associated with this scanner. * @param yyscanner The scanner object. */ void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yyextra = user_defined ; } /** Set the current line number. * @param _line_number line number * @param yyscanner The scanner object. */ void yyset_lineno (int _line_number , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* lineno is only valid if an input buffer exists. */ if (! YY_CURRENT_BUFFER ) YY_FATAL_ERROR( "yyset_lineno called with no buffer" ); yylineno = _line_number; } /** Set the current column. * @param _column_no column number * @param yyscanner The scanner object. */ void yyset_column (int _column_no , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* column is only valid if an input buffer exists. */ if (! YY_CURRENT_BUFFER ) YY_FATAL_ERROR( "yyset_column called with no buffer" ); yycolumn = _column_no; } /** Set the input stream. This does not discard the current * input buffer. * @param _in_str A readable stream. * @param yyscanner The scanner object. * @see yy_switch_to_buffer */ void yyset_in (FILE * _in_str , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yyin = _in_str ; } void yyset_out (FILE * _out_str , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yyout = _out_str ; } int yyget_debug (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yy_flex_debug; } void yyset_debug (int _bdebug , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yy_flex_debug = _bdebug ; } /* Accessor methods for yylval and yylloc */ /* User-visible API */ /* yylex_init is special because it creates the scanner itself, so it is * the ONLY reentrant function that doesn't take the scanner as the last argument. * That's why we explicitly handle the declaration, instead of using our macros. */ int yylex_init(yyscan_t* ptr_yy_globals) { if (ptr_yy_globals == NULL){ errno = EINVAL; return 1; } *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL ); if (*ptr_yy_globals == NULL){ errno = ENOMEM; return 1; } /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); return yy_init_globals ( *ptr_yy_globals ); } /* yylex_init_extra has the same functionality as yylex_init, but follows the * convention of taking the scanner as the last argument. Note however, that * this is a *pointer* to a scanner, as it will be allocated by this call (and * is the reason, too, why this function also must handle its own declaration). * The user defined value in the first argument will be available to yyalloc in * the yyextra field. */ int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals ) { struct yyguts_t dummy_yyguts; yyset_extra (yy_user_defined, &dummy_yyguts); if (ptr_yy_globals == NULL){ errno = EINVAL; return 1; } *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); if (*ptr_yy_globals == NULL){ errno = ENOMEM; return 1; } /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); yyset_extra (yy_user_defined, *ptr_yy_globals); return yy_init_globals ( *ptr_yy_globals ); } static int yy_init_globals (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* Initialization is the same as for the non-reentrant scanner. * This function is called from yylex_destroy(), so don't allocate here. */ yyg->yy_buffer_stack = NULL; yyg->yy_buffer_stack_top = 0; yyg->yy_buffer_stack_max = 0; yyg->yy_c_buf_p = NULL; yyg->yy_init = 0; yyg->yy_start = 0; yyg->yy_start_stack_ptr = 0; yyg->yy_start_stack_depth = 0; yyg->yy_start_stack = NULL; /* Defined in main.c */ #ifdef YY_STDINIT yyin = stdin; yyout = stdout; #else yyin = NULL; yyout = NULL; #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 (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner ); YY_CURRENT_BUFFER_LVALUE = NULL; yypop_buffer_state(yyscanner); } /* Destroy the stack itself. */ yyfree(yyg->yy_buffer_stack , yyscanner); yyg->yy_buffer_stack = NULL; /* Destroy the start condition stack. */ yyfree( yyg->yy_start_stack , yyscanner ); yyg->yy_start_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( yyscanner); /* Destroy the main struct (reentrant only). */ yyfree ( yyscanner , yyscanner ); yyscanner = NULL; return 0; } /* * Internal utility routines. */ #ifndef yytext_ptr static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; (void)yyg; int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (const char * s , yyscan_t yyscanner) { int n; for ( n = 0; s[n]; ++n ) ; return n; } #endif void *yyalloc (yy_size_t size , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; (void)yyg; return malloc(size); } void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; (void)yyg; /* 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 realloc(ptr, size); } void yyfree (void * ptr , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; (void)yyg; free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" //=============------------------------------- // API methods implementation //=============------------------------------- void* LexerNew(const wxString& content, size_t options ) { yyscan_t scanner; yylex_init(&scanner); struct yyguts_t * yyg = (struct yyguts_t*)scanner; CppLexerUserData *userData = new CppLexerUserData(options); // keep the file pointer (and make sure we close it at the end) userData->SetCurrentPF(NULL); yyg->yyextra_r = userData; wxCharBuffer cb = content.mb_str(wxConvUTF8); yy_switch_to_buffer(yy_scan_string(cb.data(), scanner), scanner); yycolumn = 0; yylineno = 0; return scanner; } void* LexerNew(const wxFileName& filename, size_t options ) { wxFileName fn = filename; if(fn.IsRelative()) { fn.MakeAbsolute(); } FILE* fp = ::fopen(fn.GetFullPath().mb_str(wxConvUTF8).data(), "rb"); if(!fp) { return NULL; } yyscan_t scanner; yylex_init(&scanner); struct yyguts_t * yyg = (struct yyguts_t*)scanner; CppLexerUserData *userData = new CppLexerUserData(options); // keep the file pointer (and make sure we close it at the end) userData->SetCurrentPF(fp); yyg->yyextra_r = userData; yy_switch_to_buffer(yy_create_buffer(fp, YY_BUF_SIZE, scanner), scanner); yycolumn = 1; yylineno = 0; return scanner; } void LexerDestroy(void** scanner) { struct yyguts_t * yyg = (struct yyguts_t*)(*scanner); delete (CppLexerUserData*)yyg->yyextra_r; yy_delete_buffer(YY_CURRENT_BUFFER, *scanner); yylex_destroy(*scanner); *scanner = NULL; } void LexerUnget(void* scanner) { // return the entire token back to the input stream struct yyguts_t * yyg = (struct yyguts_t*)scanner; yyless(0); } bool LexerNext(void* scanner, CxxLexerToken& token) { token.SetColumn(0); token.SetType(yylex(scanner)); token.ClearComment(); token.ClearRawString(); if(!token.IsEOF()) { struct yyguts_t * yyg = (struct yyguts_t*)scanner; CppLexerUserData* userData = (CppLexerUserData*)yyg->yyextra_r; switch(token.GetType()) { case T_RAW_STRING: token.SetLineNumber(yylineno); token.SetRawString(userData->get_raw_string()); userData->clear_raw_string_label(); break; case T_CXX_COMMENT: // One line up for CXX comments token.SetLineNumber(userData->GetCommentStartLine()); token.SetComment(userData->GetComment()); userData->ClearComment(); break; case T_C_COMMENT: token.SetLineNumber(userData->GetCommentStartLine()); token.SetComment(userData->GetComment()); userData->ClearComment(); break; default: token.SetLineNumber(yylineno); token.SetText(yytext); token.SetColumn(yycolumn); break; } } else { token.SetText(NULL); token.SetLineNumber(0); token.SetColumn(0); } return !token.IsEOF(); } wxString LexerCurrentToken(void* scanner) { struct yyguts_t * yyg = (struct yyguts_t*)scanner; return yytext; } CppLexerUserData* LexerGetUserData(void* scanner) { struct yyguts_t * yyg = (struct yyguts_t*)scanner; return (CppLexerUserData*) yyg->yyextra_r; }