#line 2 "lexer.c.tmp" #line 4 "lexer.c.tmp" #define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 #define YY_FLEX_SUBMINOR_VERSION 33 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ #include #include #include #include /* end standard C headers. */ /* flex integer type definitions */ #ifndef FLEXINT_H #define FLEXINT_H /* C99 systems have . Non-C99 systems may or may not. */ #if __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include typedef int8_t flex_int8_t; typedef uint8_t flex_uint8_t; typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; #endif /* ! C99 */ /* Limits of integral types. */ #ifndef INT8_MIN #define INT8_MIN (-128) #endif #ifndef INT16_MIN #define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN #define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX #define INT8_MAX (127) #endif #ifndef INT16_MAX #define INT16_MAX (32767) #endif #ifndef INT32_MAX #define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX #define UINT8_MAX (255U) #endif #ifndef UINT16_MAX #define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX #define UINT32_MAX (4294967295U) #endif #endif /* ! FLEXINT_H */ #ifdef __cplusplus /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ #if __STDC__ #define YY_USE_CONST #endif /* __STDC__ */ #endif /* ! __cplusplus */ #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif /* Returned upon end-of-file. */ #define YY_NULL 0 /* Promotes a possibly negative, possibly signed char to an unsigned * integer for use as an array index. If the signed char is negative, * we want to instead treat it as an 8-bit unsigned char, hence the * double cast. */ #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ #define BEGIN (yy_start) = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START (((yy_start) - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ #define YY_NEW_FILE yyrestart(yyin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #ifndef YY_BUF_SIZE #define YY_BUF_SIZE 16384 #endif /* The state buf must be large enough to hold one state per character in the main buffer. */ #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif extern int yyleng; extern FILE *yyin, *yyout; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ *yy_cp = (yy_hold_char); \ YY_RESTORE_YY_MORE_OFFSET \ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) #define unput(c) yyunput( c, (yytext_ptr) ) /* The following is because we cannot portably get our hands on size_t * (without autoconf's help, which isn't available because we want * flex-generated scanners to compile on their own). */ #ifndef YY_TYPEDEF_YY_SIZE_T #define YY_TYPEDEF_YY_SIZE_T typedef unsigned int yy_size_t; #endif #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { FILE *yy_input_file; char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process * then we mark the buffer as YY_EOF_PENDING, to indicate that we * shouldn't try reading from the input source any more. We might * still have a bunch of tokens to match, though, because of * possible backing-up. * * When we actually see the EOF, we change the status to "new" * (via yyrestart()), so that the user can continue scanning by * just pointing yyin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* Stack of input buffers. */ static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". * * Returns the top of the stack, or NULL. */ #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] /* yy_hold_char holds the character lost when yytext is formed. */ static char yy_hold_char; static int yy_n_chars; /* number of characters read into yy_ch_buf */ int yyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; static int yy_init = 0; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ /* Flag which is used to allow yywrap()'s to do buffer switches * instead of setting up a fresh yyin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; void yyrestart (FILE *input_file ); void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ); void yy_delete_buffer (YY_BUFFER_STATE b ); void yy_flush_buffer (YY_BUFFER_STATE b ); void yypush_buffer_state (YY_BUFFER_STATE new_buffer ); void yypop_buffer_state (void ); static void yyensure_buffer_stack (void ); static void yy_load_buffer_state (void ); static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ); void *yyalloc (yy_size_t ); void *yyrealloc (void *,yy_size_t ); void yyfree (void * ); #define yy_new_buffer yy_create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! YY_CURRENT_BUFFER ){ \ yyensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ yy_create_buffer(yyin,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ if ( ! YY_CURRENT_BUFFER ){\ yyensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ yy_create_buffer(yyin,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ typedef unsigned char YY_CHAR; FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; typedef int yy_state_type; extern int yylineno; int yylineno = 1; extern char *yytext; #define yytext_ptr yytext static yy_state_type yy_get_previous_state (void ); static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); static int yy_get_next_buffer (void ); static void yy_fatal_error (yyconst char msg[] ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ (yytext_ptr) = yy_bp; \ yyleng = (size_t) (yy_cp - yy_bp); \ (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; #define YY_NUM_RULES 114 #define YY_END_OF_BUFFER 115 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info { flex_int32_t yy_verify; flex_int32_t yy_nxt; }; static yyconst flex_int16_t yy_accept[776] = { 0, 0, 0, 0, 0, 0, 0, 115, 113, 67, 68, 113, 113, 113, 71, 113, 70, 70, 113, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 113, 67, 113, 112, 111, 112, 80, 78, 80, 0, 75, 0, 76, 71, 70, 0, 74, 71, 74, 74, 71, 77, 69, 71, 0, 49, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, 71, 0, 66, 0, 0, 71, 69, 72, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 29, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 42, 73, 27, 25, 73, 73, 73, 35, 73, 73, 73, 30, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 40, 73, 73, 73, 33, 73, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 104, 17, 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, 110, 73, 73, 73, 73, 73, 18, 38, 73, 73, 41, 31, 73, 73, 73, 73, 73, 28, 73, 73, 24, 73, 73, 73, 46, 73, 73, 73, 73, 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, 73, 73, 73, 73, 73, 73, 32, 73, 73, 73, 73, 73, 20, 73, 36, 39, 19, 73, 73, 73, 73, 73, 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, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 22, 73, 23, 73, 43, 73, 34, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 59, 47, 73, 45, 73, 48, 37, 6, 0, 0, 0, 0, 0, 7, 0, 0, 0, 81, 0, 0, 12, 0, 0, 108, 3, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 0, 0, 0, 0, 0, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 44, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 106, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 92, 0, 90, 0, 73, 73, 54, 53, 73, 73, 73, 57, 73, 73, 58, 73, 73, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 103, 0, 0, 0, 0, 60, 73, 73, 56, 52, 65, 73, 73, 73, 73, 107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 93, 91, 0, 0, 101, 0, 0, 0, 0, 1, 0, 0, 73, 51, 73, 73, 63, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 105, 0, 96, 0, 0, 0, 0, 0, 0, 0, 0, 0, 73, 61, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95, 0, 0, 0, 0, 87, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 0, 0, 0, 0, 0, 99, 0, 0, 0, 0, 83, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 85, 0, 0, 94, 100, 97, 0, 82, 0, 0, 0, 98, 0, 0, 0, 84, 0, 88, 89, 0 } ; static yyconst flex_int32_t yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 5, 1, 1, 6, 1, 7, 1, 1, 8, 9, 1, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 1, 1, 1, 1, 1, 1, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 26, 1, 1, 1, 1, 41, 1, 42, 43, 44, 45, 46, 47, 48, 49, 50, 26, 51, 52, 53, 54, 55, 56, 26, 57, 58, 59, 60, 61, 62, 63, 64, 26, 1, 65, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } ; static yyconst flex_int32_t yy_meta[66] = { 0, 1, 1, 2, 1, 1, 1, 1, 1, 1, 3, 3, 3, 4, 4, 1, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1 } ; static yyconst flex_int16_t yy_base[784] = { 0, 0, 64, 1646, 65, 64, 66, 1648, 1650, 1650, 1650, 70, 73, 68, 73, 80, 84, 88, 1632, 79, 96, 100, 103, 111, 106, 115, 128, 118, 131, 134, 138, 141, 163, 171, 145, 177, 180, 1581, 94, 220, 1650, 1650, 1625, 1650, 1650, 1632, 131, 1650, 130, 1650, 183, 205, 152, 195, 248, 155, 261, 167, 1650, 0, 1650, 0, 1650, 198, 253, 266, 271, 274, 277, 280, 288, 291, 294, 297, 300, 303, 310, 313, 317, 320, 325, 328, 331, 334, 342, 347, 361, 366, 375, 370, 380, 383, 386, 1650, 219, 420, 1599, 1618, 49, 1586, 105, 1594, 177, 354, 1589, 314, 1582, 354, 1595, 147, 150, 1582, 1585, 1580, 1650, 399, 443, 221, 171, 411, 448, 0, 0, 405, 453, 456, 460, 463, 466, 469, 472, 475, 478, 481, 486, 489, 492, 495, 499, 503, 518, 508, 521, 529, 532, 535, 538, 543, 546, 556, 561, 566, 569, 573, 217, 148, 204, 1581, 1608, 1581, 1586, 1607, 1573, 349, 1583, 1581, 223, 1583, 231, 1565, 1650, 1567, 1578, 1577, 371, 1561, 1574, 1559, 1573, 1574, 1557, 1568, 1563, 1581, 1552, 1557, 1553, 1558, 1550, 1561, 576, 589, 596, 593, 606, 609, 621, 624, 627, 631, 636, 639, 642, 645, 648, 651, 654, 658, 661, 667, 673, 676, 684, 694, 700, 704, 707, 711, 722, 725, 728, 264, 1561, 1548, 1558, 1556, 1555, 1555, 1543, 235, 1534, 1650, 1650, 1551, 1541, 1536, 1542, 1536, 1574, 1536, 1538, 1543, 1542, 1531, 1537, 1525, 1534, 1532, 1523, 1522, 343, 1522, 400, 1561, 1532, 1531, 1517, 1516, 1650, 731, 737, 743, 753, 756, 746, 759, 764, 776, 779, 783, 786, 789, 792, 795, 801, 804, 807, 811, 814, 817, 820, 823, 826, 842, 852, 856, 859, 1516, 1513, 1514, 1512, 1510, 1514, 1513, 1521, 1516, 1509, 1507, 1503, 1516, 1519, 1505, 1502, 1498, 1503, 1509, 1509, 1499, 1501, 1497, 1499, 1503, 1525, 1494, 1483, 1500, 1490, 1488, 1488, 1490, 416, 1523, 1480, 862, 874, 865, 884, 900, 905, 879, 908, 913, 916, 919, 922, 926, 929, 932, 935, 938, 941, 949, 952, 956, 962, 1487, 1480, 951, 1485, 1478, 1483, 1477, 1479, 1473, 1472, 1473, 1487, 1467, 1482, 1467, 1480, 1466, 1473, 1477, 1476, 1474, 1465, 1472, 1462, 1462, 1465, 1455, 1495, 1492, 1452, 1465, 1459, 1453, 1461, 1451, 1463, 965, 981, 991, 994, 999, 968, 1002, 1012, 1015, 1018, 1023, 1029, 1033, 1038, 1041, 1044, 1049, 1052, 1055, 1058, 1061, 1064, 1458, 1485, 1453, 1455, 1454, 1442, 1452, 1447, 1446, 1436, 1446, 1443, 1446, 1445, 1433, 1443, 1442, 1650, 1441, 1440, 1433, 1449, 1465, 541, 1440, 1463, 1423, 1429, 1419, 1428, 1421, 1422, 1424, 1427, 1418, 1426, 1428, 1424, 1416, 1069, 1072, 1075, 1090, 1094, 1097, 1100, 1103, 1106, 1117, 1125, 1128, 1133, 1136, 1139, 1142, 1145, 1148, 1650, 1412, 1424, 1423, 1416, 1413, 1650, 1403, 1416, 312, 1650, 1405, 1414, 1650, 1440, 1400, 1650, 1650, 1650, 1410, 1391, 1399, 1398, 1406, 1399, 1395, 1396, 1389, 1397, 1391, 1400, 1394, 1388, 1650, 1396, 1395, 1395, 1393, 1420, 1151, 1156, 1160, 1163, 1166, 1178, 1181, 1189, 1192, 1195, 1201, 1204, 1207, 1214, 1392, 1379, 1390, 1416, 1374, 1386, 1389, 1373, 1374, 1374, 342, 1372, 1368, 1650, 1369, 1379, 1378, 1380, 1397, 1375, 1361, 1368, 1375, 1362, 1369, 1355, 1359, 1650, 1650, 1366, 1650, 1369, 1219, 1222, 1229, 1232, 1235, 1238, 1245, 1249, 1252, 1256, 1259, 1266, 1269, 1364, 1392, 1391, 1352, 1360, 1377, 1345, 1348, 408, 1650, 1347, 1355, 1355, 1353, 1352, 1351, 1350, 1350, 1338, 1320, 1650, 1322, 1301, 1334, 1650, 1282, 1281, 1281, 1274, 1272, 1278, 1287, 1290, 1293, 1296, 1299, 1302, 1305, 1308, 1650, 1268, 1267, 1261, 1277, 1237, 1245, 1233, 1225, 1209, 1228, 1210, 1205, 1219, 1650, 1650, 1650, 1189, 1183, 1650, 1169, 1170, 1142, 1148, 1650, 1167, 1140, 1313, 1320, 1325, 1333, 1336, 1339, 1133, 1132, 1111, 1104, 1088, 1087, 1095, 1082, 1067, 1650, 1077, 1650, 1065, 1040, 1042, 1042, 1033, 1044, 1021, 1002, 997, 1345, 1348, 1351, 989, 984, 961, 972, 957, 979, 930, 972, 942, 940, 938, 964, 910, 899, 914, 908, 863, 868, 861, 1358, 859, 857, 881, 850, 835, 828, 825, 828, 860, 803, 812, 802, 810, 808, 790, 1650, 1650, 801, 789, 787, 786, 786, 794, 763, 763, 738, 739, 724, 760, 1650, 727, 715, 692, 700, 1650, 727, 726, 712, 684, 670, 1650, 665, 706, 649, 657, 646, 653, 1650, 647, 637, 636, 634, 620, 628, 627, 592, 585, 568, 578, 577, 1650, 558, 556, 564, 551, 548, 1650, 532, 540, 537, 556, 1650, 523, 509, 543, 505, 489, 488, 481, 1650, 476, 461, 1650, 441, 394, 1650, 1650, 1650, 390, 1650, 369, 355, 343, 1650, 197, 189, 108, 1650, 57, 1650, 1650, 1650, 1370, 1374, 1378, 1382, 1384, 1386, 1390, 74 } ; static yyconst flex_int16_t yy_def[784] = { 0, 775, 1, 776, 776, 777, 777, 775, 775, 775, 775, 778, 779, 775, 780, 775, 775, 775, 775, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 775, 775, 775, 775, 775, 775, 775, 775, 775, 778, 775, 779, 775, 775, 775, 780, 780, 780, 780, 780, 780, 775, 782, 775, 783, 775, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 780, 775, 780, 780, 782, 783, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 781, 781, 781, 781, 781, 781, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 781, 781, 781, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 781, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 0, 775, 775, 775, 775, 775, 775, 775, 775 } ; static yyconst flex_int16_t yy_nxt[1716] = { 0, 8, 9, 10, 9, 11, 8, 12, 8, 8, 13, 14, 15, 16, 17, 18, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 19, 19, 19, 19, 21, 19, 19, 19, 19, 19, 19, 19, 19, 22, 23, 24, 25, 26, 19, 19, 27, 19, 28, 19, 29, 30, 31, 19, 32, 33, 34, 35, 36, 19, 19, 37, 38, 44, 41, 44, 39, 42, 45, 47, 45, 47, 49, 162, 122, 50, 49, 51, 51, 52, 53, 52, 54, 54, 58, 52, 55, 52, 59, 56, 57, 50, 94, 51, 51, 50, 95, 51, 51, 774, 163, 60, 52, 55, 52, 60, 52, 55, 52, 52, 55, 52, 52, 55, 52, 56, 57, 52, 55, 52, 65, 52, 55, 52, 52, 55, 52, 60, 64, 49, 47, 60, 47, 49, 52, 55, 52, 52, 55, 52, 52, 55, 52, 61, 52, 55, 52, 52, 55, 52, 773, 52, 55, 52, 66, 165, 67, 70, 52, 68, 52, 52, 69, 52, 166, 71, 73, 183, 75, 52, 55, 52, 77, 52, 72, 52, 74, 52, 55, 52, 190, 190, 76, 52, 55, 52, 52, 55, 52, 184, 78, 168, 115, 115, 79, 89, 185, 80, 165, 116, 60, 52, 117, 52, 52, 55, 52, 222, 81, 82, 186, 83, 50, 85, 51, 51, 86, 94, 84, 169, 92, 95, 60, 90, 87, 116, 60, 52, 91, 52, 772, 88, 96, 97, 98, 99, 100, 101, 102, 771, 103, 162, 223, 104, 105, 236, 106, 107, 60, 108, 109, 110, 111, 112, 52, 224, 52, 54, 54, 52, 55, 52, 237, 233, 56, 57, 118, 119, 221, 52, 120, 120, 52, 55, 52, 234, 123, 52, 55, 52, 52, 55, 52, 52, 55, 52, 52, 55, 52, 293, 56, 57, 294, 124, 52, 55, 52, 52, 55, 52, 52, 55, 52, 52, 55, 52, 52, 55, 52, 52, 55, 52, 126, 228, 287, 127, 52, 55, 52, 52, 55, 52, 125, 52, 55, 52, 52, 55, 52, 520, 128, 52, 55, 52, 52, 55, 52, 52, 55, 52, 52, 55, 52, 521, 129, 132, 131, 130, 52, 55, 52, 133, 174, 52, 55, 52, 175, 568, 134, 137, 135, 569, 136, 313, 140, 176, 138, 52, 55, 52, 314, 139, 52, 55, 52, 142, 52, 55, 52, 141, 144, 52, 55, 52, 770, 143, 52, 55, 52, 52, 55, 52, 52, 55, 52, 145, 146, 170, 228, 229, 178, 230, 179, 171, 172, 180, 769, 181, 115, 115, 768, 52, 55, 52, 147, 116, 60, 52, 242, 52, 120, 120, 148, 243, 150, 316, 317, 149, 191, 152, 377, 153, 767, 151, 154, 378, 155, 101, 605, 606, 103, 116, 60, 104, 156, 766, 106, 157, 118, 118, 158, 159, 190, 190, 52, 765, 52, 120, 120, 52, 55, 52, 52, 55, 52, 57, 52, 55, 52, 52, 55, 52, 52, 55, 52, 52, 55, 52, 52, 55, 52, 52, 55, 52, 52, 55, 52, 52, 55, 52, 192, 57, 52, 55, 52, 52, 55, 52, 52, 55, 52, 52, 55, 52, 193, 52, 55, 52, 197, 52, 55, 52, 764, 194, 52, 55, 52, 195, 763, 201, 196, 198, 762, 199, 52, 55, 52, 52, 55, 52, 761, 760, 200, 202, 203, 52, 55, 52, 52, 55, 52, 52, 55, 52, 52, 55, 52, 759, 204, 52, 55, 52, 52, 55, 52, 482, 205, 758, 206, 757, 483, 208, 52, 55, 52, 756, 207, 52, 55, 52, 755, 209, 52, 55, 52, 52, 55, 52, 754, 52, 55, 52, 753, 752, 210, 190, 190, 211, 215, 751, 213, 212, 750, 60, 214, 52, 55, 52, 216, 52, 55, 52, 52, 55, 52, 749, 748, 217, 259, 747, 219, 220, 52, 55, 52, 52, 55, 52, 746, 60, 745, 218, 744, 260, 261, 262, 263, 52, 55, 52, 52, 55, 52, 52, 55, 52, 743, 52, 55, 52, 742, 741, 52, 55, 52, 52, 55, 52, 52, 55, 52, 52, 55, 52, 52, 55, 52, 52, 55, 52, 52, 55, 52, 264, 52, 55, 52, 52, 55, 52, 740, 739, 266, 52, 55, 52, 265, 267, 268, 52, 55, 52, 52, 55, 52, 738, 271, 737, 736, 272, 52, 55, 52, 735, 269, 734, 273, 733, 732, 270, 52, 55, 52, 731, 274, 276, 52, 55, 52, 277, 52, 55, 52, 52, 55, 52, 275, 52, 55, 52, 730, 729, 279, 728, 280, 727, 726, 278, 52, 55, 52, 52, 55, 52, 52, 55, 52, 52, 55, 52, 725, 724, 281, 52, 55, 52, 723, 722, 283, 52, 55, 52, 52, 55, 52, 284, 323, 721, 282, 52, 55, 52, 52, 55, 52, 52, 55, 52, 720, 325, 52, 55, 52, 324, 719, 718, 327, 717, 285, 328, 716, 286, 52, 55, 52, 52, 55, 52, 326, 52, 55, 52, 52, 55, 52, 52, 55, 52, 52, 55, 52, 52, 55, 52, 715, 714, 329, 52, 55, 52, 52, 55, 52, 52, 55, 52, 330, 52, 55, 52, 52, 55, 52, 52, 55, 52, 52, 55, 52, 52, 55, 52, 52, 55, 52, 334, 713, 712, 331, 711, 710, 335, 709, 708, 332, 707, 706, 333, 52, 55, 52, 705, 337, 704, 703, 336, 702, 338, 52, 55, 52, 340, 52, 55, 52, 52, 55, 52, 52, 55, 52, 52, 55, 52, 701, 339, 700, 699, 388, 698, 52, 55, 52, 697, 341, 52, 55, 52, 382, 383, 52, 55, 52, 696, 343, 695, 344, 384, 381, 694, 385, 693, 342, 692, 386, 387, 52, 55, 52, 691, 389, 52, 55, 52, 52, 55, 52, 690, 390, 52, 55, 52, 52, 55, 52, 52, 55, 52, 52, 55, 52, 391, 52, 55, 52, 52, 55, 52, 52, 55, 52, 52, 55, 52, 52, 55, 52, 52, 55, 52, 689, 393, 688, 687, 392, 52, 55, 52, 52, 55, 52, 395, 52, 55, 52, 405, 686, 394, 52, 55, 52, 52, 55, 52, 52, 55, 52, 396, 685, 684, 406, 407, 683, 397, 682, 408, 681, 52, 55, 52, 680, 447, 399, 443, 400, 442, 398, 52, 55, 52, 52, 55, 52, 679, 401, 52, 55, 52, 52, 55, 52, 444, 446, 678, 445, 677, 676, 402, 52, 55, 52, 52, 55, 52, 52, 55, 52, 675, 451, 52, 55, 52, 674, 450, 448, 52, 55, 52, 449, 52, 55, 52, 672, 452, 52, 55, 52, 52, 55, 52, 52, 55, 52, 671, 453, 52, 55, 52, 52, 55, 52, 52, 55, 52, 52, 55, 52, 52, 55, 52, 52, 55, 52, 455, 670, 52, 55, 52, 52, 55, 52, 52, 55, 52, 454, 669, 457, 668, 667, 501, 666, 456, 499, 665, 458, 500, 52, 55, 52, 459, 52, 55, 52, 52, 55, 52, 52, 55, 52, 52, 55, 52, 52, 55, 52, 503, 664, 504, 663, 662, 502, 661, 507, 52, 55, 52, 660, 505, 659, 658, 506, 52, 55, 52, 52, 55, 52, 509, 508, 52, 55, 52, 52, 55, 52, 52, 55, 52, 52, 55, 52, 52, 55, 52, 52, 55, 52, 52, 55, 52, 657, 656, 52, 55, 52, 510, 52, 55, 52, 52, 55, 52, 52, 55, 52, 655, 654, 545, 511, 546, 650, 649, 549, 512, 52, 55, 52, 52, 55, 52, 648, 547, 550, 647, 548, 52, 55, 52, 52, 55, 52, 52, 55, 52, 551, 552, 553, 52, 55, 52, 52, 55, 52, 52, 55, 52, 646, 645, 556, 557, 52, 55, 52, 644, 555, 52, 55, 52, 52, 55, 52, 643, 554, 642, 588, 52, 55, 52, 52, 55, 52, 52, 55, 52, 52, 55, 52, 641, 640, 589, 587, 52, 55, 52, 590, 52, 55, 52, 52, 55, 52, 591, 52, 55, 52, 52, 55, 52, 639, 638, 593, 594, 52, 55, 52, 52, 55, 52, 52, 55, 52, 637, 636, 592, 52, 55, 52, 635, 634, 596, 633, 624, 595, 52, 55, 52, 52, 55, 52, 52, 55, 52, 52, 55, 52, 52, 55, 52, 52, 55, 52, 52, 55, 52, 52, 55, 52, 632, 625, 52, 55, 52, 627, 631, 630, 626, 52, 55, 52, 623, 628, 52, 55, 52, 622, 621, 651, 620, 629, 52, 55, 52, 52, 55, 52, 52, 55, 52, 619, 618, 652, 52, 55, 52, 52, 55, 52, 52, 55, 52, 617, 673, 616, 653, 52, 55, 52, 40, 40, 40, 40, 43, 43, 43, 43, 46, 46, 46, 46, 48, 48, 48, 48, 55, 55, 63, 63, 121, 615, 121, 121, 614, 613, 612, 611, 610, 609, 608, 607, 604, 603, 602, 601, 600, 599, 598, 597, 586, 585, 584, 583, 582, 581, 580, 579, 578, 577, 576, 575, 574, 573, 572, 571, 570, 567, 566, 565, 564, 563, 562, 561, 560, 559, 558, 544, 543, 542, 541, 540, 539, 538, 537, 536, 535, 534, 533, 532, 531, 530, 529, 528, 527, 526, 525, 524, 523, 522, 519, 518, 517, 516, 515, 514, 513, 498, 497, 496, 495, 494, 493, 492, 491, 490, 489, 488, 487, 486, 485, 484, 481, 480, 479, 478, 477, 476, 475, 474, 473, 472, 471, 470, 469, 468, 467, 466, 465, 464, 463, 462, 461, 460, 441, 440, 439, 438, 437, 436, 435, 434, 433, 432, 431, 430, 429, 428, 427, 426, 425, 424, 423, 422, 421, 420, 419, 418, 417, 416, 415, 414, 413, 412, 411, 410, 409, 404, 403, 380, 379, 376, 375, 374, 373, 372, 371, 370, 369, 368, 367, 366, 365, 364, 363, 362, 361, 360, 359, 358, 357, 356, 355, 354, 353, 352, 351, 350, 349, 348, 347, 346, 345, 293, 322, 321, 320, 319, 318, 315, 312, 311, 310, 309, 308, 307, 306, 305, 304, 303, 302, 301, 300, 299, 298, 297, 296, 295, 292, 291, 290, 289, 288, 243, 233, 258, 257, 256, 255, 254, 253, 252, 251, 250, 249, 248, 247, 246, 245, 244, 241, 240, 239, 238, 235, 232, 231, 227, 226, 225, 185, 183, 179, 189, 188, 187, 182, 177, 173, 167, 164, 161, 160, 114, 113, 93, 62, 775, 41, 7, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775 } ; static yyconst flex_int16_t yy_chk[1716] = { 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, 2, 5, 4, 6, 2, 4, 5, 11, 6, 11, 12, 98, 783, 13, 12, 13, 13, 14, 14, 14, 14, 14, 15, 19, 19, 19, 15, 14, 14, 16, 38, 16, 16, 17, 38, 17, 17, 772, 98, 16, 20, 20, 20, 17, 21, 21, 21, 22, 22, 22, 24, 24, 24, 14, 14, 23, 23, 23, 21, 25, 25, 25, 27, 27, 27, 16, 20, 48, 46, 17, 46, 48, 26, 26, 26, 28, 28, 28, 29, 29, 29, 16, 30, 30, 30, 31, 31, 31, 770, 34, 34, 34, 22, 100, 23, 24, 52, 23, 52, 55, 23, 55, 100, 25, 26, 109, 27, 32, 32, 32, 29, 57, 25, 57, 26, 33, 33, 33, 118, 118, 28, 35, 35, 35, 36, 36, 36, 109, 30, 102, 50, 50, 31, 34, 110, 31, 155, 50, 50, 53, 53, 53, 63, 63, 63, 155, 32, 32, 110, 32, 51, 33, 51, 51, 33, 94, 32, 102, 36, 94, 51, 35, 33, 50, 50, 117, 35, 117, 769, 33, 39, 39, 39, 39, 39, 39, 39, 768, 39, 154, 156, 39, 39, 168, 39, 39, 51, 39, 39, 39, 39, 39, 54, 156, 54, 54, 54, 64, 64, 64, 168, 166, 54, 54, 56, 56, 154, 56, 56, 56, 65, 65, 65, 166, 64, 66, 66, 66, 67, 67, 67, 68, 68, 68, 69, 69, 69, 229, 54, 54, 229, 65, 70, 70, 70, 71, 71, 71, 72, 72, 72, 73, 73, 73, 74, 74, 74, 75, 75, 75, 67, 221, 221, 68, 76, 76, 76, 77, 77, 77, 66, 78, 78, 78, 79, 79, 79, 469, 69, 80, 80, 80, 81, 81, 81, 82, 82, 82, 83, 83, 83, 469, 70, 73, 72, 71, 84, 84, 84, 74, 105, 85, 85, 85, 105, 523, 75, 78, 76, 523, 77, 250, 80, 105, 79, 86, 86, 86, 250, 79, 87, 87, 87, 82, 89, 89, 89, 81, 84, 88, 88, 88, 766, 83, 90, 90, 90, 91, 91, 91, 92, 92, 92, 84, 85, 103, 163, 163, 107, 163, 107, 103, 103, 107, 765, 107, 115, 115, 764, 123, 123, 123, 86, 115, 115, 119, 174, 119, 119, 119, 87, 174, 89, 252, 252, 88, 123, 91, 320, 92, 762, 90, 95, 320, 95, 95, 566, 566, 95, 115, 115, 95, 95, 758, 95, 95, 116, 116, 95, 95, 116, 116, 120, 757, 120, 120, 120, 124, 124, 124, 125, 125, 125, 120, 126, 126, 126, 127, 127, 127, 128, 128, 128, 129, 129, 129, 130, 130, 130, 131, 131, 131, 132, 132, 132, 133, 133, 133, 124, 120, 134, 134, 134, 135, 135, 135, 136, 136, 136, 137, 137, 137, 125, 138, 138, 138, 129, 139, 139, 139, 755, 126, 141, 141, 141, 127, 754, 133, 128, 130, 752, 131, 140, 140, 140, 142, 142, 142, 751, 750, 132, 135, 136, 143, 143, 143, 144, 144, 144, 145, 145, 145, 146, 146, 146, 749, 137, 147, 147, 147, 148, 148, 148, 426, 138, 748, 139, 747, 426, 141, 149, 149, 149, 746, 140, 150, 150, 150, 744, 142, 151, 151, 151, 152, 152, 152, 743, 153, 153, 153, 742, 741, 143, 190, 190, 144, 148, 739, 146, 145, 738, 190, 147, 191, 191, 191, 149, 193, 193, 193, 192, 192, 192, 737, 736, 150, 192, 735, 152, 153, 194, 194, 194, 195, 195, 195, 733, 190, 732, 151, 731, 192, 192, 192, 192, 196, 196, 196, 197, 197, 197, 198, 198, 198, 730, 199, 199, 199, 729, 728, 200, 200, 200, 201, 201, 201, 202, 202, 202, 203, 203, 203, 204, 204, 204, 205, 205, 205, 206, 206, 206, 195, 207, 207, 207, 208, 208, 208, 727, 726, 197, 209, 209, 209, 196, 199, 200, 210, 210, 210, 211, 211, 211, 725, 204, 724, 723, 205, 212, 212, 212, 722, 201, 720, 206, 719, 718, 203, 213, 213, 213, 717, 207, 209, 214, 214, 214, 209, 215, 215, 215, 216, 216, 216, 208, 217, 217, 217, 716, 715, 211, 713, 212, 712, 711, 210, 218, 218, 218, 219, 219, 219, 220, 220, 220, 259, 259, 259, 710, 709, 213, 260, 260, 260, 707, 706, 216, 261, 261, 261, 264, 264, 264, 217, 259, 705, 214, 262, 262, 262, 263, 263, 263, 265, 265, 265, 704, 261, 266, 266, 266, 260, 702, 701, 263, 700, 218, 263, 699, 220, 267, 267, 267, 268, 268, 268, 262, 269, 269, 269, 270, 270, 270, 271, 271, 271, 272, 272, 272, 273, 273, 273, 698, 697, 266, 274, 274, 274, 275, 275, 275, 276, 276, 276, 267, 277, 277, 277, 278, 278, 278, 279, 279, 279, 280, 280, 280, 281, 281, 281, 282, 282, 282, 273, 696, 695, 270, 694, 693, 274, 692, 691, 271, 688, 687, 272, 283, 283, 283, 686, 277, 685, 684, 276, 683, 279, 284, 284, 284, 281, 285, 285, 285, 286, 286, 286, 323, 323, 323, 325, 325, 325, 682, 280, 681, 680, 325, 679, 324, 324, 324, 678, 283, 329, 329, 329, 324, 324, 326, 326, 326, 677, 285, 676, 286, 324, 323, 675, 324, 674, 284, 672, 324, 324, 327, 327, 327, 671, 326, 328, 328, 328, 330, 330, 330, 670, 327, 331, 331, 331, 332, 332, 332, 333, 333, 333, 334, 334, 334, 328, 335, 335, 335, 336, 336, 336, 337, 337, 337, 338, 338, 338, 339, 339, 339, 340, 340, 340, 669, 331, 668, 667, 330, 341, 341, 341, 342, 342, 342, 333, 343, 343, 343, 347, 666, 332, 344, 344, 344, 381, 381, 381, 386, 386, 386, 334, 665, 664, 347, 347, 663, 336, 662, 347, 661, 382, 382, 382, 660, 386, 341, 382, 342, 381, 340, 383, 383, 383, 384, 384, 384, 659, 343, 385, 385, 385, 387, 387, 387, 383, 385, 658, 384, 657, 656, 344, 388, 388, 388, 389, 389, 389, 390, 390, 390, 655, 389, 391, 391, 391, 654, 388, 387, 392, 392, 392, 387, 393, 393, 393, 650, 390, 394, 394, 394, 395, 395, 395, 396, 396, 396, 649, 391, 397, 397, 397, 398, 398, 398, 399, 399, 399, 400, 400, 400, 401, 401, 401, 402, 402, 402, 393, 648, 442, 442, 442, 443, 443, 443, 444, 444, 444, 392, 647, 396, 646, 645, 444, 644, 394, 442, 643, 398, 443, 445, 445, 445, 400, 446, 446, 446, 447, 447, 447, 448, 448, 448, 449, 449, 449, 450, 450, 450, 446, 642, 447, 640, 638, 445, 637, 450, 451, 451, 451, 636, 448, 635, 634, 449, 452, 452, 452, 453, 453, 453, 452, 451, 454, 454, 454, 455, 455, 455, 456, 456, 456, 457, 457, 457, 458, 458, 458, 459, 459, 459, 499, 499, 499, 633, 632, 500, 500, 500, 453, 501, 501, 501, 502, 502, 502, 503, 503, 503, 631, 630, 499, 455, 500, 623, 622, 503, 457, 504, 504, 504, 505, 505, 505, 620, 501, 504, 619, 502, 506, 506, 506, 507, 507, 507, 508, 508, 508, 505, 506, 507, 509, 509, 509, 510, 510, 510, 511, 511, 511, 618, 617, 510, 510, 512, 512, 512, 615, 509, 545, 545, 545, 546, 546, 546, 614, 508, 610, 546, 547, 547, 547, 548, 548, 548, 549, 549, 549, 550, 550, 550, 609, 608, 549, 545, 551, 551, 551, 550, 552, 552, 552, 553, 553, 553, 551, 554, 554, 554, 555, 555, 555, 607, 606, 554, 554, 556, 556, 556, 557, 557, 557, 587, 587, 587, 605, 604, 553, 588, 588, 588, 603, 602, 557, 601, 588, 556, 589, 589, 589, 590, 590, 590, 591, 591, 591, 592, 592, 592, 593, 593, 593, 594, 594, 594, 595, 595, 595, 596, 596, 596, 600, 589, 624, 624, 624, 594, 599, 598, 593, 625, 625, 625, 586, 595, 626, 626, 626, 585, 584, 624, 583, 596, 627, 627, 627, 628, 628, 628, 629, 629, 629, 581, 580, 626, 651, 651, 651, 652, 652, 652, 653, 653, 653, 579, 651, 577, 627, 673, 673, 673, 776, 776, 776, 776, 777, 777, 777, 777, 778, 778, 778, 778, 779, 779, 779, 779, 780, 780, 781, 781, 782, 576, 782, 782, 575, 574, 573, 572, 571, 570, 569, 568, 565, 564, 563, 562, 561, 560, 559, 558, 544, 542, 539, 538, 537, 536, 535, 534, 533, 532, 531, 530, 529, 528, 527, 525, 524, 522, 521, 520, 519, 518, 517, 516, 515, 514, 513, 498, 497, 496, 495, 494, 492, 491, 490, 489, 488, 487, 486, 485, 484, 483, 482, 481, 480, 479, 475, 474, 472, 471, 468, 467, 465, 464, 463, 462, 461, 441, 440, 439, 438, 437, 436, 435, 434, 433, 432, 431, 430, 429, 428, 427, 425, 424, 423, 422, 421, 419, 418, 417, 416, 415, 414, 413, 412, 411, 410, 409, 408, 407, 406, 405, 404, 403, 380, 379, 378, 377, 376, 375, 374, 373, 372, 371, 370, 369, 368, 367, 366, 365, 364, 363, 362, 361, 360, 359, 358, 357, 356, 355, 354, 353, 352, 351, 350, 349, 348, 346, 345, 322, 321, 319, 318, 317, 316, 315, 314, 313, 312, 311, 310, 309, 308, 307, 306, 305, 304, 303, 302, 301, 300, 299, 298, 297, 296, 295, 294, 293, 292, 291, 290, 289, 288, 287, 257, 256, 255, 254, 253, 251, 249, 248, 247, 246, 245, 244, 243, 242, 241, 240, 239, 238, 237, 236, 235, 234, 233, 230, 228, 227, 226, 225, 224, 223, 222, 189, 188, 187, 186, 185, 184, 183, 182, 181, 180, 179, 178, 177, 176, 175, 173, 172, 171, 169, 167, 165, 164, 162, 161, 160, 159, 158, 157, 113, 112, 111, 108, 106, 104, 101, 99, 97, 96, 45, 42, 37, 18, 7, 3, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775 } ; static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; extern int yy_flex_debug; int yy_flex_debug = 0; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */ #define REJECT reject_used_but_not_detected #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *yytext; #line 1 "lexer.l" /* * The SIP lexer. * * Copyright (c) 2007 * Phil Thompson * * This file is part of SIP. * * This copy of SIP is licensed for use under the terms of the SIP License * Agreement. See the file LICENSE for more details. * * SIP is supplied WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. */ #line 17 "lexer.l" #include #include #include #include #include "sip.h" #include "parser.h" #ifndef FLEX_SCANNER #error "Only flex is supported at the moment" #endif #define YY_FATAL_ERROR(s) fatallex(s) #define MAX_INCLUDE_DEPTH 10 #define MAX_CODE_LINE_LENGTH 1000 static struct inputFile { int lineno; /* The line number. */ YY_BUFFER_STATE bs; /* The flex buffer state handle. */ char *name; /* The file name. */ char *cwd; /* The path part of the file name. */ parserContext pc; /* The parser context. */ } inputFileStack[MAX_INCLUDE_DEPTH]; static int currentFile = -1; /* Index of the current input file. */ static char codeLine[MAX_CODE_LINE_LENGTH + 2]; /* The current code line. */ static int codeIdx = -1; /* Index of next code character. */ static FILE *openFile(char *); static void fatallex(char *); #line 1141 "lexer.c.tmp" #define INITIAL 0 #define code 1 #define ccomment 2 #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. */ #endif #ifndef YY_EXTRA_TYPE #define YY_EXTRA_TYPE void * #endif static int yy_init_globals (void ); /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int yywrap (void ); #else extern int yywrap (void ); #endif #endif static void yyunput (int c,char *buf_ptr ); #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ); #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * ); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void ); #else static int input (void ); #endif #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #define YY_READ_BUF_SIZE 8192 #endif /* Copy whatever the last rule matched to the standard output. */ #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ #define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ size_t n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ if ( c == EOF && ferror( yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else \ { \ errno=0; \ while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ { \ if( errno != EINTR) \ { \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ break; \ } \ errno=0; \ clearerr(yyin); \ } \ }\ \ #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */ #ifndef yyterminate #define yyterminate() return YY_NULL #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif /* Report a fatal error. */ #ifndef YY_FATAL_ERROR #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) #endif /* end tables serialization structures and prototypes */ /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL_IS_OURS 1 extern int yylex (void); #define YY_DECL int yylex (void) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after yytext and yyleng * have been set up. */ #ifndef YY_USER_ACTION #define YY_USER_ACTION #endif /* Code executed at the end of each rule. */ #ifndef YY_BREAK #define YY_BREAK break; #endif #define YY_RULE_SETUP \ if ( yyleng > 0 ) \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ (yytext[yyleng - 1] == '\n'); \ YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; #line 56 "lexer.l" #line 1302 "lexer.c.tmp" if ( !(yy_init) ) { (yy_init) = 1; #ifdef YY_USER_INIT YY_USER_INIT; #endif if ( ! (yy_start) ) (yy_start) = 1; /* first start state */ if ( ! yyin ) yyin = stdin; if ( ! yyout ) yyout = stdout; if ( ! YY_CURRENT_BUFFER ) { yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin,YY_BUF_SIZE ); } yy_load_buffer_state( ); } while ( 1 ) /* loops until end-of-file is reached */ { yy_cp = (yy_c_buf_p); /* Support of yytext. */ *yy_cp = (yy_hold_char); /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; yy_current_state = (yy_start); yy_current_state += YY_AT_BOL(); yy_match: do { register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 776 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } while ( yy_base[yy_current_state] != 1650 ); yy_find_action: yy_act = yy_accept[yy_current_state]; if ( yy_act == 0 ) { /* have to back up */ yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); yy_act = yy_accept[yy_current_state]; } YY_DO_BEFORE_ACTION; do_action: /* This label is used only to access EOF actions. */ switch ( yy_act ) { /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ *yy_cp = (yy_hold_char); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); goto yy_find_action; case 1: YY_RULE_SETUP #line 58 "lexer.l" {return TK_OPTIONS;} YY_BREAK case 2: YY_RULE_SETUP #line 59 "lexer.l" {return TK_NOEMITTERS;} YY_BREAK case 3: YY_RULE_SETUP #line 60 "lexer.l" {return TK_INCLUDE;} YY_BREAK case 4: YY_RULE_SETUP #line 61 "lexer.l" {return TK_OPTINCLUDE;} YY_BREAK case 5: YY_RULE_SETUP #line 62 "lexer.l" {return TK_IMPORT;} YY_BREAK case 6: YY_RULE_SETUP #line 63 "lexer.l" {return TK_MODULE;} YY_BREAK case 7: YY_RULE_SETUP #line 64 "lexer.l" {return TK_CMODULE;} YY_BREAK case 8: YY_RULE_SETUP #line 65 "lexer.l" {return TK_CONSMODULE;} YY_BREAK case 9: YY_RULE_SETUP #line 66 "lexer.l" {return TK_COMPOMODULE;} YY_BREAK case 10: YY_RULE_SETUP #line 67 "lexer.l" {return TK_TIMELINE;} YY_BREAK case 11: YY_RULE_SETUP #line 68 "lexer.l" {return TK_PLATFORMS;} YY_BREAK case 12: YY_RULE_SETUP #line 69 "lexer.l" {return TK_FEATURE;} YY_BREAK case 13: YY_RULE_SETUP #line 70 "lexer.l" {return TK_LICENSE;} YY_BREAK case 14: YY_RULE_SETUP #line 71 "lexer.l" {return TK_MAPPEDTYPE;} YY_BREAK case 15: YY_RULE_SETUP #line 72 "lexer.l" {return TK_EXCEPTION;} YY_BREAK case 16: YY_RULE_SETUP #line 73 "lexer.l" {return TK_IF;} YY_BREAK case 17: YY_RULE_SETUP #line 74 "lexer.l" {return TK_END;} YY_BREAK case 18: YY_RULE_SETUP #line 75 "lexer.l" {return TK_CLASS;} YY_BREAK case 19: YY_RULE_SETUP #line 76 "lexer.l" {return TK_STRUCT;} YY_BREAK case 20: YY_RULE_SETUP #line 77 "lexer.l" {return TK_PUBLIC;} YY_BREAK case 21: YY_RULE_SETUP #line 78 "lexer.l" {return TK_PROTECTED;} YY_BREAK case 22: YY_RULE_SETUP #line 79 "lexer.l" {return TK_PRIVATE;} YY_BREAK case 23: YY_RULE_SETUP #line 80 "lexer.l" {return TK_SIGNALS;} YY_BREAK case 24: YY_RULE_SETUP #line 81 "lexer.l" {return TK_SLOTS;} YY_BREAK case 25: YY_RULE_SETUP #line 82 "lexer.l" {return TK_CHAR;} YY_BREAK case 26: YY_RULE_SETUP #line 83 "lexer.l" {return TK_WCHAR_T;} YY_BREAK case 27: YY_RULE_SETUP #line 84 "lexer.l" {return TK_BOOL;} YY_BREAK case 28: YY_RULE_SETUP #line 85 "lexer.l" {return TK_SHORT;} YY_BREAK case 29: YY_RULE_SETUP #line 86 "lexer.l" {return TK_INT;} YY_BREAK case 30: YY_RULE_SETUP #line 87 "lexer.l" {return TK_LONG;} YY_BREAK case 31: YY_RULE_SETUP #line 88 "lexer.l" {return TK_FLOAT;} YY_BREAK case 32: YY_RULE_SETUP #line 89 "lexer.l" {return TK_DOUBLE;} YY_BREAK case 33: YY_RULE_SETUP #line 90 "lexer.l" {return TK_VOID;} YY_BREAK case 34: YY_RULE_SETUP #line 91 "lexer.l" {return TK_VIRTUAL;} YY_BREAK case 35: YY_RULE_SETUP #line 92 "lexer.l" {return TK_ENUM;} YY_BREAK case 36: YY_RULE_SETUP #line 93 "lexer.l" {return TK_SIGNED;} YY_BREAK case 37: YY_RULE_SETUP #line 94 "lexer.l" {return TK_UNSIGNED;} YY_BREAK case 38: YY_RULE_SETUP #line 95 "lexer.l" {return TK_CONST;} YY_BREAK case 39: YY_RULE_SETUP #line 96 "lexer.l" {return TK_STATIC;} YY_BREAK case 40: YY_RULE_SETUP #line 97 "lexer.l" {return TK_TRUE;} YY_BREAK case 41: YY_RULE_SETUP #line 98 "lexer.l" {return TK_FALSE;} YY_BREAK case 42: YY_RULE_SETUP #line 99 "lexer.l" {return TK_NULL;} YY_BREAK case 43: YY_RULE_SETUP #line 100 "lexer.l" {return TK_TYPEDEF;} YY_BREAK case 44: YY_RULE_SETUP #line 101 "lexer.l" {return TK_NAMESPACE;} YY_BREAK case 45: YY_RULE_SETUP #line 102 "lexer.l" {return TK_OPERATOR;} YY_BREAK case 46: YY_RULE_SETUP #line 103 "lexer.l" {return TK_THROW;} YY_BREAK case 47: YY_RULE_SETUP #line 104 "lexer.l" {return TK_EXPLICIT;} YY_BREAK case 48: YY_RULE_SETUP #line 105 "lexer.l" {return TK_TEMPLATE;} YY_BREAK case 49: YY_RULE_SETUP #line 106 "lexer.l" {return TK_SCOPE;} YY_BREAK case 50: YY_RULE_SETUP #line 107 "lexer.l" {return TK_LOGICAL_OR;} YY_BREAK case 51: YY_RULE_SETUP #line 108 "lexer.l" {return TK_PYOBJECT;} YY_BREAK case 52: YY_RULE_SETUP #line 109 "lexer.l" {return TK_PYTUPLE;} YY_BREAK case 53: YY_RULE_SETUP #line 110 "lexer.l" {return TK_PYLIST;} YY_BREAK case 54: YY_RULE_SETUP #line 111 "lexer.l" {return TK_PYDICT;} YY_BREAK case 55: YY_RULE_SETUP #line 112 "lexer.l" {return TK_PYCALLABLE;} YY_BREAK case 56: YY_RULE_SETUP #line 113 "lexer.l" {return TK_PYSLICE;} YY_BREAK case 57: YY_RULE_SETUP #line 114 "lexer.l" {return TK_PYTYPE;} YY_BREAK case 58: YY_RULE_SETUP #line 115 "lexer.l" {return TK_SIPSIGNAL;} YY_BREAK case 59: YY_RULE_SETUP #line 116 "lexer.l" {return TK_SIPSLOT;} YY_BREAK case 60: YY_RULE_SETUP #line 117 "lexer.l" {return TK_SIPANYSLOT;} YY_BREAK case 61: YY_RULE_SETUP #line 118 "lexer.l" {return TK_SIPRXCON;} YY_BREAK case 62: YY_RULE_SETUP #line 119 "lexer.l" {return TK_SIPRXDIS;} YY_BREAK case 63: YY_RULE_SETUP #line 120 "lexer.l" {return TK_SIPSLOTCON;} YY_BREAK case 64: YY_RULE_SETUP #line 121 "lexer.l" {return TK_SIPSLOTDIS;} YY_BREAK case 65: YY_RULE_SETUP #line 122 "lexer.l" {return TK_QOBJECT;} YY_BREAK case 66: YY_RULE_SETUP #line 123 "lexer.l" {return TK_ELLIPSIS;} YY_BREAK case 67: YY_RULE_SETUP #line 126 "lexer.l" { /* Ignore whitespace. */ ; } YY_BREAK case 68: /* rule 68 can match eol */ YY_RULE_SETUP #line 130 "lexer.l" { /* Maintain the line number. */ ++inputFileStack[currentFile].lineno; if (codeIdx == 0) { BEGIN code; } } YY_BREAK case 69: YY_RULE_SETUP #line 139 "lexer.l" { /* Ignore C++ style comments. */ ; } YY_BREAK case 70: YY_RULE_SETUP #line 144 "lexer.l" { /* A signed decimal number. */ yylval.number = strtol(yytext,NULL,0); return TK_NUMBER; } YY_BREAK case 71: YY_RULE_SETUP #line 150 "lexer.l" {/* A floating point number. */ yylval.real = strtod(yytext,NULL); return TK_REAL; } YY_BREAK case 72: YY_RULE_SETUP #line 156 "lexer.l" { /* An unsigned hexadecimal number. */ yylval.number = strtol(yytext,NULL,16); return TK_NUMBER; } YY_BREAK case 73: YY_RULE_SETUP #line 162 "lexer.l" { /* An identifier name. */ yylval.text = sipStrdup(yytext); return TK_NAME; } YY_BREAK case 74: YY_RULE_SETUP #line 168 "lexer.l" { /* A relative pathname. */ yylval.text = sipStrdup(yytext); return TK_PATHNAME; } YY_BREAK case 75: /* rule 75 can match eol */ YY_RULE_SETUP #line 174 "lexer.l" { /* A double-quoted string. */ char *dp, *sp; /* Copy the string without the quotes. */ yylval.text = sipMalloc(strlen(yytext) + 1); dp = yylval.text; sp = yytext; while (*sp != '\0') { if (*sp != '"') *dp++ = *sp; ++sp; } *dp = '\0'; return TK_STRING; } YY_BREAK case 76: /* rule 76 can match eol */ YY_RULE_SETUP #line 198 "lexer.l" { /* A single-quoted character. */ if (strlen(yytext) != 3) fatallex("Exactly one character expected between single quotes"); yylval.qchar = yytext[1]; return TK_QCHAR; } YY_BREAK case 77: YY_RULE_SETUP #line 208 "lexer.l" { /* Ignore C-style comments. */ BEGIN ccomment; } YY_BREAK case 78: /* rule 78 can match eol */ YY_RULE_SETUP #line 211 "lexer.l" { ++inputFileStack[currentFile].lineno; } YY_BREAK case 79: YY_RULE_SETUP #line 214 "lexer.l" { BEGIN INITIAL; } YY_BREAK case 80: YY_RULE_SETUP #line 217 "lexer.l" { ; } YY_BREAK case 81: YY_RULE_SETUP #line 222 "lexer.l" { /* The software license. */ codeIdx = 0; return TK_COPYING; } YY_BREAK case 82: YY_RULE_SETUP #line 227 "lexer.l" { /* The start of a from-type code block. */ codeIdx = 0; return TK_FROMTYPE; } YY_BREAK case 83: YY_RULE_SETUP #line 232 "lexer.l" { /* The start of a to-type code block. */ codeIdx = 0; return TK_TOTYPE; } YY_BREAK case 84: YY_RULE_SETUP #line 237 "lexer.l" { /* The start of a to-sub-class code block. */ codeIdx = 0; return TK_TOSUBCLASS; } YY_BREAK case 85: YY_RULE_SETUP #line 242 "lexer.l" { /* The start of an exported header code block. */ codeIdx = 0; return TK_EXPHEADERCODE; } YY_BREAK case 86: YY_RULE_SETUP #line 247 "lexer.l" { /* The start of a module header code block. */ codeIdx = 0; return TK_MODHEADERCODE; } YY_BREAK case 87: YY_RULE_SETUP #line 252 "lexer.l" { /* The start of a type header code block. */ codeIdx = 0; return TK_TYPEHEADERCODE; } YY_BREAK case 88: YY_RULE_SETUP #line 257 "lexer.l" { /* The start of a pre-initialisation code block. */ codeIdx = 0; return TK_PREINITCODE; } YY_BREAK case 89: YY_RULE_SETUP #line 262 "lexer.l" { /* The start of a post-initialisation code block. */ codeIdx = 0; return TK_POSTINITCODE; } YY_BREAK case 90: YY_RULE_SETUP #line 267 "lexer.l" { /* The start of a unit code block. */ codeIdx = 0; return TK_UNITCODE; } YY_BREAK case 91: YY_RULE_SETUP #line 272 "lexer.l" { /* The start of a module code block. */ codeIdx = 0; return TK_MODCODE; } YY_BREAK case 92: YY_RULE_SETUP #line 277 "lexer.l" { /* The start of a type code block. */ codeIdx = 0; return TK_TYPECODE; } YY_BREAK case 93: YY_RULE_SETUP #line 282 "lexer.l" { /* The start of a C++ method code block. */ codeIdx = 0; return TK_METHODCODE; } YY_BREAK case 94: YY_RULE_SETUP #line 287 "lexer.l" { /* The start of a C++ virtual code block. */ codeIdx = 0; return TK_VIRTUALCATCHERCODE; } YY_BREAK case 95: YY_RULE_SETUP #line 292 "lexer.l" { /* The start of a traverse code block. */ codeIdx = 0; return TK_TRAVERSECODE; } YY_BREAK case 96: YY_RULE_SETUP #line 297 "lexer.l" { /* The start of a clear code block. */ codeIdx = 0; return TK_CLEARCODE; } YY_BREAK case 97: YY_RULE_SETUP #line 302 "lexer.l" { /* The start of a read buffer code block. */ codeIdx = 0; return TK_READBUFFERCODE; } YY_BREAK case 98: YY_RULE_SETUP #line 307 "lexer.l" { /* The start of a write buffer code block. */ codeIdx = 0; return TK_WRITEBUFFERCODE; } YY_BREAK case 99: YY_RULE_SETUP #line 312 "lexer.l" { /* The start of a segment count code block. */ codeIdx = 0; return TK_SEGCOUNTCODE; } YY_BREAK case 100: YY_RULE_SETUP #line 317 "lexer.l" { /* The start of a char buffer code block. */ codeIdx = 0; return TK_CHARBUFFERCODE; } YY_BREAK case 101: YY_RULE_SETUP #line 322 "lexer.l" { /* The start of a pickle code block. */ codeIdx = 0; return TK_PICKLECODE; } YY_BREAK case 102: YY_RULE_SETUP #line 327 "lexer.l" { /* The start of a pre-Python code block. */ codeIdx = 0; return TK_PREPYCODE; } YY_BREAK case 103: YY_RULE_SETUP #line 332 "lexer.l" { /* The start of a raise exception code block. */ codeIdx = 0; return TK_RAISECODE; } YY_BREAK case 104: YY_RULE_SETUP #line 337 "lexer.l" { /* The start of a documentation block. */ codeIdx = 0; return TK_DOC; } YY_BREAK case 105: YY_RULE_SETUP #line 342 "lexer.l" { /* The start of an exported documentation block. */ codeIdx = 0; return TK_EXPORTEDDOC; } YY_BREAK case 106: YY_RULE_SETUP #line 347 "lexer.l" { /* The start of a Makefile code block. */ codeIdx = 0; return TK_MAKEFILE; } YY_BREAK case 107: YY_RULE_SETUP #line 352 "lexer.l" { /* The start of an access code block. */ codeIdx = 0; return TK_ACCESSCODE; } YY_BREAK case 108: YY_RULE_SETUP #line 357 "lexer.l" { /* The start of a get code block. */ codeIdx = 0; return TK_GETCODE; } YY_BREAK case 109: YY_RULE_SETUP #line 362 "lexer.l" { /* The start of a set code block. */ codeIdx = 0; return TK_SETCODE; } YY_BREAK case 110: YY_RULE_SETUP #line 367 "lexer.l" { /* The end of a code block. */ BEGIN INITIAL; codeIdx = -1; return TK_END; } YY_BREAK case 111: /* rule 111 can match eol */ YY_RULE_SETUP #line 373 "lexer.l" { /* The end of a code line . */ struct inputFile *ifp; codeLine[codeIdx] = '\n'; codeLine[codeIdx + 1] = '\0'; codeIdx = 0; ifp = &inputFileStack[currentFile]; yylval.codeb = sipMalloc(sizeof (codeBlock)); yylval.codeb -> frag = sipStrdup(codeLine); yylval.codeb -> linenr = ifp -> lineno++; yylval.codeb -> filename = sipStrdup(ifp -> name); yylval.codeb -> next = NULL; return TK_CODELINE; } YY_BREAK case 112: YY_RULE_SETUP #line 392 "lexer.l" { /* The contents of a code line. */ if (codeIdx == MAX_CODE_LINE_LENGTH) fatallex("Line is too long"); codeLine[codeIdx++] = yytext[0]; } YY_BREAK case 113: YY_RULE_SETUP #line 399 "lexer.l" { /* Anything else is returned as is. */ return yytext[0]; } YY_BREAK case 114: YY_RULE_SETUP #line 403 "lexer.l" ECHO; YY_BREAK #line 2138 "lexer.c.tmp" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(code): case YY_STATE_EOF(ccomment): yyterminate(); case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ *yy_cp = (yy_hold_char); YY_RESTORE_YY_MORE_OFFSET if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed yyin at a new source and called * yylex(). If so, then we have to assure * consistency between YY_CURRENT_BUFFER and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since yy_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the * end-of-buffer state). Contrast this with the test * in input(). */ if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) { /* This was really a NUL. */ yy_state_type yy_next_state; (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't * want to build jamming into it because then it * will run more slowly). */ yy_next_state = yy_try_NUL_trans( yy_current_state ); yy_bp = (yytext_ptr) + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ yy_cp = ++(yy_c_buf_p); yy_current_state = yy_next_state; goto yy_match; } else { yy_cp = (yy_c_buf_p); goto yy_find_action; } } else switch ( yy_get_next_buffer( ) ) { case EOB_ACT_END_OF_FILE: { (yy_did_buffer_switch_on_eof) = 0; if ( yywrap( ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up * yytext, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; } else { if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: (yy_c_buf_p) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_find_action; } break; } default: YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ static int yy_get_next_buffer (void) { register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; register char *source = (yytext_ptr); register int number_to_move, i; int ret_val; if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; else { int num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ /* just a shorter name for the current buffer */ YY_BUFFER_STATE b = YY_CURRENT_BUFFER; int yy_c_buf_p_offset = (int) ((yy_c_buf_p) - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; else b->yy_buf_size *= 2; b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); } else /* Can't grow it, we don't own it. */ b->yy_ch_buf = 0; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), (yy_n_chars), num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } if ( (yy_n_chars) == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; yyrestart(yyin ); } else { ret_val = EOB_ACT_LAST_MATCH; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; (yy_n_chars) += number_to_move; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ static yy_state_type yy_get_previous_state (void) { register yy_state_type yy_current_state; register char *yy_cp; yy_current_state = (yy_start); yy_current_state += YY_AT_BOL(); for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) { register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 776 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; } return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) { register int yy_is_jam; register char *yy_cp = (yy_c_buf_p); register YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 776 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_is_jam = (yy_current_state == 775); return yy_is_jam ? 0 : yy_current_state; } static void yyunput (int c, register char * yy_bp ) { register char *yy_cp; yy_cp = (yy_c_buf_p); /* undo effects of setting up yytext */ *yy_cp = (yy_hold_char); if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ register int number_to_move = (yy_n_chars) + 2; register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; register char *source = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) *--dest = *--source; yy_cp += (int) (dest - source); yy_bp += (int) (dest - source); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) YY_FATAL_ERROR( "flex scanner push-back overflow" ); } *--yy_cp = (char) c; (yytext_ptr) = yy_bp; (yy_hold_char) = *yy_cp; (yy_c_buf_p) = yy_cp; } #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void) #else static int input (void) #endif { int c; *(yy_c_buf_p) = (yy_hold_char); if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) /* This was really a NUL. */ *(yy_c_buf_p) = '\0'; else { /* need more input */ int offset = (yy_c_buf_p) - (yytext_ptr); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_g_n_b() * sees that we've accumulated a * token and flags that we need to * try matching the token before * proceeding. But for input(), * there's no matching to consider. * So convert the EOB_ACT_LAST_MATCH * to EOB_ACT_END_OF_FILE. */ /* Reset buffer status. */ yyrestart(yyin ); /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { if ( yywrap( ) ) return EOF; if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(); #else return input(); #endif } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + offset; break; } } } c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ *(yy_c_buf_p) = '\0'; /* preserve yytext */ (yy_hold_char) = *++(yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); return c; } #endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * * @note This function does not reset the start condition to @c INITIAL . */ void yyrestart (FILE * input_file ) { if ( ! YY_CURRENT_BUFFER ){ yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin,YY_BUF_SIZE ); } yy_init_buffer(YY_CURRENT_BUFFER,input_file ); yy_load_buffer_state( ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * */ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) { /* TODO. We should be able to replace this entire function body * with * yypop_buffer_state(); * yypush_buffer_state(new_buffer); */ yyensure_buffer_stack (); if ( YY_CURRENT_BUFFER == new_buffer ) return; if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } YY_CURRENT_BUFFER_LVALUE = new_buffer; yy_load_buffer_state( ); /* We don't actually know whether we did this switch during * EOF (yywrap()) processing, but the only time this flag * is looked at is after yywrap() is called, so it's safe * to go ahead and always set it. */ (yy_did_buffer_switch_on_eof) = 1; } static void yy_load_buffer_state (void) { (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; (yy_hold_char) = *(yy_c_buf_p); } /** Allocate and initialize an input buffer state. * @param file A readable stream. * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. * * @return the allocated buffer state. */ YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_is_our_buffer = 1; yy_init_buffer(b,file ); return b; } /** Destroy the buffer. * @param b a buffer created with yy_create_buffer() * */ void yy_delete_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) yyfree((void *) b->yy_ch_buf ); yyfree((void *) b ); } #ifndef _UNISTD_H /* assume unistd.h has isatty() for us */ #ifdef __cplusplus extern "C" { #endif #ifdef __THROW /* this is a gnuism */ extern int isatty (int ) __THROW; #else extern int isatty (int ); #endif #ifdef __cplusplus } #endif #endif /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a yyrestart() or at EOF. */ static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) { int oerrno = errno; yy_flush_buffer(b ); b->yy_input_file = file; b->yy_fill_buffer = 1; /* If b is the current buffer, then yy_init_buffer was _probably_ * called from yyrestart() or through yy_get_next_buffer. * In that case, we don't want to reset the lineno or column. */ if (b != YY_CURRENT_BUFFER){ b->yy_bs_lineno = 1; b->yy_bs_column = 0; } b->yy_is_interactive = 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. * */ void yy_flush_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; b->yy_n_chars = 0; /* We always need two end-of-buffer characters. The first causes * a transition to the end-of-buffer state. The second causes * a jam in that state. */ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; b->yy_buf_pos = &b->yy_ch_buf[0]; b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; if ( b == YY_CURRENT_BUFFER ) yy_load_buffer_state( ); } /** Pushes the new state onto the stack. The new state becomes * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. * */ void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) { if (new_buffer == NULL) return; yyensure_buffer_stack(); /* This block is copied from yy_switch_to_buffer. */ if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } /* Only push if top exists. Otherwise, replace top. */ if (YY_CURRENT_BUFFER) (yy_buffer_stack_top)++; YY_CURRENT_BUFFER_LVALUE = new_buffer; /* copied from yy_switch_to_buffer. */ yy_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * */ void yypop_buffer_state (void) { if (!YY_CURRENT_BUFFER) return; yy_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; if ((yy_buffer_stack_top) > 0) --(yy_buffer_stack_top); if (YY_CURRENT_BUFFER) { yy_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ static void yyensure_buffer_stack (void) { int num_to_alloc; if (!(yy_buffer_stack)) { /* First allocation is just for 2 elements, since we don't know if this * scanner will even need a stack. We use 2 instead of 1 to avoid an * immediate realloc on the next call. */ num_to_alloc = 1; (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc (num_to_alloc * sizeof(struct yy_buffer_state*) ); memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; (yy_buffer_stack_top) = 0; return; } if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ /* Increase the buffer to prepare for a possible push. */ int grow_size = 8 /* arbitrary grow size */; num_to_alloc = (yy_buffer_stack_max) + grow_size; (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc ((yy_buffer_stack), num_to_alloc * sizeof(struct yy_buffer_state*) ); /* zero only the new slots.*/ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; } } /** Setup the input buffer state to scan directly from a user-specified character buffer. * @param base the character buffer * @param size the size in bytes of the character buffer * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) { YY_BUFFER_STATE b; if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; b->yy_input_file = 0; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; yy_switch_to_buffer(b ); return b; } /** Setup the input buffer state to scan a string. The next call to yylex() will * scan from a @e copy of @a str. * @param str a NUL-terminated string to scan * * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * yy_scan_bytes() instead. */ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) { return yy_scan_bytes(yystr,strlen(yystr) ); } /** Setup the input buffer state to scan the given bytes. The next call to yylex() will * scan from a @e copy of @a bytes. * @param bytes the byte buffer to scan * @param len the number of bytes in the buffer pointed to by @a bytes. * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) { YY_BUFFER_STATE b; char *buf; yy_size_t n; int i; /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; buf = (char *) yyalloc(n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); for ( i = 0; i < _yybytes_len; ++i ) buf[i] = yybytes[i]; buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; b = yy_scan_buffer(buf,n ); if ( ! b ) YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. */ b->yy_is_our_buffer = 1; return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif static void yy_fatal_error (yyconst char* msg ) { (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ yytext[yyleng] = (yy_hold_char); \ (yy_c_buf_p) = yytext + yyless_macro_arg; \ (yy_hold_char) = *(yy_c_buf_p); \ *(yy_c_buf_p) = '\0'; \ yyleng = yyless_macro_arg; \ } \ while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ /** Get the current line number. * */ int yyget_lineno (void) { return yylineno; } /** Get the input stream. * */ FILE *yyget_in (void) { return yyin; } /** Get the output stream. * */ FILE *yyget_out (void) { return yyout; } /** Get the length of the current token. * */ int yyget_leng (void) { return yyleng; } /** Get the current token. * */ char *yyget_text (void) { return yytext; } /** Set the current line number. * @param line_number * */ void yyset_lineno (int line_number ) { yylineno = line_number; } /** Set the input stream. This does not discard the current * input buffer. * @param in_str A readable stream. * * @see yy_switch_to_buffer */ void yyset_in (FILE * in_str ) { yyin = in_str ; } void yyset_out (FILE * out_str ) { yyout = out_str ; } int yyget_debug (void) { return yy_flex_debug; } void yyset_debug (int bdebug ) { yy_flex_debug = bdebug ; } static int yy_init_globals (void) { /* Initialization is the same as for the non-reentrant scanner. * This function is called from yylex_destroy(), so don't allocate here. */ (yy_buffer_stack) = 0; (yy_buffer_stack_top) = 0; (yy_buffer_stack_max) = 0; (yy_c_buf_p) = (char *) 0; (yy_init) = 0; (yy_start) = 0; /* Defined in main.c */ #ifdef YY_STDINIT yyin = stdin; yyout = stdout; #else yyin = (FILE *) 0; yyout = (FILE *) 0; #endif /* For future reference: Set errno on error, since we are called by * yylex_init() */ return 0; } /* yylex_destroy is for both reentrant and non-reentrant scanners. */ int yylex_destroy (void) { /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ yy_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; yypop_buffer_state(); } /* Destroy the stack itself. */ yyfree((yy_buffer_stack) ); (yy_buffer_stack) = NULL; /* Reset the globals. This is important in a non-reentrant scanner so the next time * yylex() is called, initialization will occur. */ yy_init_globals( ); return 0; } /* * Internal utility routines. */ #ifndef yytext_ptr static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) { register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * s ) { register int n; for ( n = 0; s[n]; ++n ) ; return n; } #endif void *yyalloc (yy_size_t size ) { return (void *) malloc( size ); } void *yyrealloc (void * ptr, yy_size_t size ) { /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter * because both ANSI C and C++ allow castless assignment from * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ return (void *) realloc( (char *) ptr, size ); } void yyfree (void * ptr ) { free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" #line 403 "lexer.l" /* * Hook into EOF handling. Return 0 if there is more to process. */ int yywrap() { char *cwd; struct inputFile *ifp; if ((cwd = inputFileStack[currentFile].cwd) != NULL) free(cwd); ifp = &inputFileStack[currentFile--]; /* Tell the parser if this is the end of a file. */ parserEOF(ifp -> name, &ifp -> pc); /* Tidy up this file. */ fclose(yyin); free(ifp -> name); /* See if this was the original file. */ if (currentFile < 0) return 1; yy_delete_buffer(YY_CURRENT_BUFFER); yy_switch_to_buffer(ifp -> bs); return 0; } /* * Set up an input file to be read by the lexer, opening it if necessary. TRUE * is returned if the file has not already been read. */ int setInputFile(FILE *open_fp, parserContext *pc, int optional) { static stringList *all = NULL; char *cwd, *fullname = NULL; FILE *fp = open_fp; if (currentFile >= MAX_INCLUDE_DEPTH - 1) fatal("Too many nested %%Include, %%OptionalInclude or %%Import statements\n"); if (fp != NULL || (fp = openFile(pc->filename)) != NULL) fullname = sipStrdup(pc->filename); else { char *cwd; /* Try the directory that contains the current file. */ if (currentFile >= 0 && (cwd = inputFileStack[currentFile].cwd) != NULL) { fullname = concat(cwd, "/", pc->filename, NULL); if ((fp = openFile(fullname)) == NULL) { free(fullname); fullname = NULL; } } } /* Try the include path if we haven't found anything yet. */ if (fullname == NULL) { stringList *sl; fullname = NULL; for (sl = includeDirList; sl != NULL; sl = sl -> next) { if (fullname != NULL) free(fullname); fullname = concat(sl->s, "/", pc->filename, NULL); if ((fp = openFile(fullname)) != NULL) break; } if (fp == NULL) { if (optional) return FALSE; fatal("Unable to find file \"%s\"\n", pc->filename); } } /* * If we have just opened the file, make sure that we haven't already read * it. While it should never happen with normal modules (if the user * doesn't specify recursive %Imports or %Includes) it is likely to happen * with consolidated modules. */ if (open_fp == NULL) { stringList *sl; for (sl = all; sl != NULL; sl = sl->next) if (strcmp(sl->s, fullname) == 0) { fclose(fp); return FALSE; } } /* Remember the filename. */ appendString(&all, sipStrdup(fullname)); yyin = fp; ++currentFile; /* Remember the directory containing the new file and make it "current". */ if ((cwd = strchr(fullname, '/')) != NULL) { cwd = sipStrdup(fullname); *strrchr(cwd,'/') = '\0'; } inputFileStack[currentFile].lineno = 1; inputFileStack[currentFile].name = fullname; inputFileStack[currentFile].pc = *pc; inputFileStack[currentFile].cwd = cwd; if (currentFile > 0) { inputFileStack[currentFile].bs = YY_CURRENT_BUFFER; yy_switch_to_buffer(yy_create_buffer(yyin,YY_BUF_SIZE)); } return TRUE; } /* * Open a file for reading or return NULL if it doesn't exist. Any other error * is fatal. */ static FILE *openFile(char *name) { FILE *fp; if ((fp = fopen(name,"r")) == NULL && errno != ENOENT) fatal("Error in opening file %s\n",name); return fp; } /* * Handle fatal yacc errors. */ void yyerror(char *s) { if (currentFile < 0) fatal("%s\n", s); fatal("%s:%d: %s\n", inputFileStack[currentFile].name, inputFileStack[currentFile].lineno, s); } /* * Handle warnings while parsing. */ void yywarning(char *s) { warning("%s:%d: %s\n", inputFileStack[currentFile].name, inputFileStack[currentFile].lineno, s); } /* * Handle fatal lex errors. */ static void fatallex(char *s) { fatal("%s:%d: Lexical analyser error: %s\n", inputFileStack[currentFile].name, inputFileStack[currentFile].lineno, s); }