| /* $OpenBSD: flex.skl,v 1.10 2007/01/26 14:38:19 tsi Exp $ */ |
| |
| /* A lexical scanner generated by flex */ |
| |
| /* Scanner skeleton version: |
| * $Header: /home/cvs/openbsd/src/usr.bin/lex/flex.skl,v 1.10 2007/01/26 14:38:19 tsi Exp $ |
| */ |
| |
| #define FLEX_SCANNER |
| #define YY_FLEX_MAJOR_VERSION 2 |
| #define YY_FLEX_MINOR_VERSION 5 |
| |
| #include <stdio.h> |
| #include <errno.h> |
| |
| |
| /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ |
| #ifdef c_plusplus |
| #ifndef __cplusplus |
| #define __cplusplus |
| #endif |
| #endif |
| |
| |
| #ifdef __cplusplus |
| |
| #include <stdlib.h> |
| #include <unistd.h> |
| |
| /* Use prototypes in function declarations. */ |
| #define YY_USE_PROTOS |
| |
| /* The "const" storage-class-modifier is valid. */ |
| #define YY_USE_CONST |
| |
| #else /* ! __cplusplus */ |
| |
| #ifdef __STDC__ |
| |
| #define YY_USE_PROTOS |
| #define YY_USE_CONST |
| |
| #endif /* __STDC__ */ |
| #endif /* ! __cplusplus */ |
| |
| #ifdef __TURBOC__ |
| #pragma warn -rch |
| #pragma warn -use |
| #include <io.h> |
| #include <stdlib.h> |
| #define YY_USE_CONST |
| #define YY_USE_PROTOS |
| #endif |
| |
| #ifdef YY_USE_CONST |
| #define yyconst const |
| #else |
| #define yyconst |
| #endif |
| |
| |
| #ifdef YY_USE_PROTOS |
| #define YY_PROTO(proto) proto |
| #else |
| #define YY_PROTO(proto) () |
| #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. */ |
| #define YY_BUF_SIZE 16384 |
| |
| typedef struct yy_buffer_state *YY_BUFFER_STATE; |
| |
| 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 |
| |
| /* The funky do-while in the following #define is used to turn the definition |
| * int a single C statement (which needs a semi-colon terminator). This |
| * avoids problems with code like: |
| * |
| * if ( condition_holds ) |
| * yyless( 5 ); |
| * else |
| * do_something_else(); |
| * |
| * Prior to using the do-while the compiler would get upset at the |
| * "else" because it interpreted the "if" statement as being all |
| * done when it reached the ';' after the yyless() call. |
| */ |
| |
| /* Return all but the first 'n' matched characters back to the input stream. */ |
| |
| #define yyless(n) \ |
| do \ |
| { \ |
| /* Undo effects of setting up yytext. */ \ |
| *yy_cp = yy_hold_char; \ |
| YY_RESTORE_YY_MORE_OFFSET \ |
| yy_c_buf_p = yy_cp = yy_bp + n - 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). |
| */ |
| typedef unsigned int yy_size_t; |
| |
| |
| 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; |
| |
| /* 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 |
| }; |
| |
| static YY_BUFFER_STATE yy_current_buffer = 0; |
| |
| /* 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". |
| */ |
| #define YY_CURRENT_BUFFER yy_current_buffer |
| |
| |
| /* 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 = 1; /* 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 YY_PROTO(( FILE *input_file )); |
| |
| void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); |
| void yy_load_buffer_state YY_PROTO(( void )); |
| YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); |
| void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); |
| void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); |
| void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); |
| #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) |
| |
| YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); |
| YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); |
| YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); |
| |
| static void *yy_flex_alloc YY_PROTO(( yy_size_t )); |
| static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); |
| static void yy_flex_free YY_PROTO(( void * )); |
| |
| #define yy_new_buffer yy_create_buffer |
| |
| #define yy_set_interactive(is_interactive) \ |
| { \ |
| if ( ! yy_current_buffer ) \ |
| yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ |
| yy_current_buffer->yy_is_interactive = is_interactive; \ |
| } |
| |
| #define yy_set_bol(at_bol) \ |
| { \ |
| if ( ! yy_current_buffer ) \ |
| yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ |
| yy_current_buffer->yy_at_bol = at_bol; \ |
| } |
| |
| #define YY_AT_BOL() (yy_current_buffer->yy_at_bol) |
| |
| |
| #define yywrap() 1 |
| #define YY_SKIP_YYWRAP |
| typedef unsigned char YY_CHAR; |
| FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; |
| typedef int yy_state_type; |
| extern char *yytext; |
| #define yytext_ptr yytext |
| |
| static yy_state_type yy_get_previous_state YY_PROTO(( void )); |
| static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); |
| static int yy_get_next_buffer YY_PROTO(( void )); |
| static void yy_fatal_error YY_PROTO(( 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 = (int) (yy_cp - yy_bp); \ |
| yy_hold_char = *yy_cp; \ |
| *yy_cp = '\0'; \ |
| yy_c_buf_p = yy_cp; |
| |
| #define YY_NUM_RULES 50 |
| #define YY_END_OF_BUFFER 51 |
| static yyconst short int yy_accept[555] = |
| { 0, |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 0, 0, 51, 38, 46, 45, 44, 38, 49, 38, |
| 39, 40, 38, 41, 38, 38, 38, 38, 43, 42, |
| 49, 33, 33, 33, 33, 33, 33, 49, 38, 38, |
| 46, 49, 33, 33, 33, 33, 33, 1, 49, 38, |
| 38, 16, 15, 16, 15, 15, 49, 49, 49, 2, |
| 8, 7, 8, 3, 8, 4, 49, 12, 12, 12, |
| 10, 11, 38, 0, 46, 44, 38, 0, 0, 0, |
| 48, 0, 38, 28, 0, 0, 27, 0, 36, 36, |
| 0, 38, 38, 0, 38, 38, 38, 38, 0, 31, |
| |
| 33, 33, 33, 33, 33, 33, 38, 47, 38, 46, |
| 0, 0, 0, 0, 0, 0, 38, 38, 38, 38, |
| 38, 1, 0, 34, 34, 0, 38, 16, 16, 14, |
| 13, 14, 0, 0, 2, 8, 0, 5, 6, 8, |
| 8, 12, 0, 12, 12, 0, 9, 37, 37, 0, |
| 0, 28, 0, 0, 38, 38, 38, 38, 38, 0, |
| 0, 31, 31, 33, 33, 33, 33, 33, 33, 33, |
| 38, 0, 0, 0, 0, 0, 0, 38, 38, 38, |
| 38, 38, 0, 38, 9, 0, 38, 38, 38, 38, |
| 38, 38, 0, 32, 32, 32, 0, 0, 31, 31, |
| |
| 31, 31, 31, 31, 31, 33, 33, 33, 33, 33, |
| 33, 33, 38, 0, 0, 0, 0, 0, 0, 38, |
| 38, 38, 38, 38, 38, 38, 0, 0, 32, 32, |
| 32, 0, 31, 31, 0, 31, 31, 31, 31, 31, |
| 31, 31, 31, 31, 31, 31, 0, 24, 33, 33, |
| 33, 33, 33, 38, 0, 0, 0, 0, 38, 38, |
| 38, 38, 38, 38, 38, 38, 0, 32, 0, 31, |
| 31, 31, 0, 0, 0, 31, 31, 31, 31, 31, |
| 31, 31, 31, 31, 31, 31, 31, 31, 33, 33, |
| 33, 33, 33, 38, 0, 0, 0, 38, 38, 38, |
| |
| 29, 29, 29, 0, 0, 31, 31, 31, 31, 31, |
| 31, 31, 0, 0, 0, 0, 0, 31, 31, 31, |
| 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, |
| 31, 0, 23, 33, 33, 0, 22, 0, 25, 38, |
| 0, 0, 0, 38, 38, 38, 38, 29, 29, 29, |
| 29, 0, 31, 0, 31, 31, 31, 31, 31, 31, |
| 31, 31, 31, 31, 31, 0, 0, 0, 31, 31, |
| 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, |
| 31, 33, 33, 35, 0, 0, 0, 38, 19, 34, |
| 38, 30, 30, 30, 31, 0, 0, 0, 31, 31, |
| |
| 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, |
| 31, 0, 0, 0, 0, 0, 31, 31, 31, 31, |
| 31, 31, 31, 31, 0, 21, 0, 26, 0, 19, |
| 0, 0, 38, 0, 38, 38, 38, 30, 30, 30, |
| 30, 30, 0, 0, 0, 0, 0, 31, 31, 31, |
| 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, |
| 31, 31, 31, 31, 31, 31, 31, 0, 0, 0, |
| 20, 19, 0, 0, 19, 0, 38, 38, 38, 30, |
| 30, 0, 0, 0, 31, 31, 31, 31, 31, 31, |
| 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, |
| |
| 31, 31, 20, 0, 17, 0, 38, 38, 38, 38, |
| 38, 0, 0, 0, 0, 0, 31, 31, 31, 31, |
| 31, 31, 31, 31, 0, 38, 38, 38, 31, 31, |
| 31, 31, 31, 31, 0, 38, 38, 38, 38, 38, |
| 31, 31, 31, 31, 31, 0, 18, 29, 29, 29, |
| 29, 29, 29, 0 |
| } ; |
| |
| static yyconst int yy_ec[256] = |
| { 0, |
| 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, |
| 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 1, 2, 4, 5, 6, 1, 7, 1, 1, 8, |
| 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, |
| 19, 20, 21, 22, 22, 22, 23, 24, 1, 1, |
| 25, 26, 10, 27, 28, 29, 30, 31, 32, 29, |
| 33, 34, 33, 33, 33, 33, 33, 35, 36, 37, |
| 33, 38, 39, 40, 41, 42, 43, 44, 33, 33, |
| 10, 45, 10, 1, 46, 1, 47, 48, 49, 50, |
| |
| 51, 52, 53, 53, 54, 53, 53, 55, 56, 57, |
| 58, 53, 53, 59, 60, 61, 62, 53, 53, 53, |
| 53, 53, 1, 1, 1, 1, 1, 1, 1, 1, |
| 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| |
| 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 1, 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 int yy_meta[63] = |
| { 0, |
| 1, 2, 3, 4, 5, 2, 1, 6, 6, 1, |
| 1, 2, 1, 7, 8, 9, 9, 9, 9, 9, |
| 9, 9, 9, 10, 11, 6, 1, 9, 9, 9, |
| 9, 9, 1, 1, 1, 1, 1, 1, 1, 1, |
| 1, 1, 1, 1, 12, 13, 14, 14, 14, 14, |
| 14, 14, 13, 13, 13, 13, 13, 13, 13, 13, |
| 13, 13 |
| } ; |
| |
| static yyconst short int yy_base[621] = |
| { 0, |
| 0, 61, 62, 63, 69, 84, 128, 189, 250, 294, |
| 80, 101, 2394, 2348, 2390, 3541, 2387, 338, 381, 52, |
| 3541, 3541, 2345, 3541, 107, 391, 119, 137, 2351, 3541, |
| 3541, 443, 2330, 490, 2337, 2335, 2320, 541, 145, 55, |
| 167, 565, 2293, 2297, 2289, 2258, 2257, 2314, 193, 256, |
| 56, 0, 3541, 2311, 3541, 0, 264, 617, 77, 0, |
| 2261, 3541, 82, 3541, 99, 3541, 110, 2243, 126, 106, |
| 3541, 145, 2240, 306, 2282, 2279, 639, 2277, 2276, 2263, |
| 3541, 201, 209, 74, 2211, 347, 2208, 550, 276, 2199, |
| 587, 410, 669, 2210, 2210, 306, 358, 317, 2163, 179, |
| |
| 706, 0, 2154, 240, 2111, 2109, 389, 3541, 76, 355, |
| 2082, 2076, 2066, 2061, 2062, 63, 115, 219, 29, 212, |
| 98, 2116, 507, 361, 2071, 598, 154, 0, 2111, 256, |
| 3541, 3541, 636, 284, 0, 2069, 567, 3541, 3541, 2066, |
| 532, 2050, 2087, 271, 300, 288, 2089, 2038, 3541, 2057, |
| 2055, 1986, 669, 603, 745, 777, 809, 841, 2014, 2003, |
| 878, 268, 916, 953, 1996, 1980, 1971, 1945, 1911, 1915, |
| 236, 1862, 1866, 1856, 1843, 1848, 317, 157, 1851, 307, |
| 266, 258, 777, 296, 1880, 1877, 686, 402, 992, 1024, |
| 725, 337, 1839, 1838, 787, 499, 1782, 1781, 343, 755, |
| |
| 1056, 796, 694, 1094, 819, 1745, 393, 1736, 1728, 1711, |
| 1707, 1697, 373, 1681, 1666, 1651, 1664, 1623, 543, 400, |
| 556, 233, 506, 1133, 1165, 1197, 1657, 1655, 827, 1640, |
| 1638, 1637, 1621, 540, 858, 546, 895, 602, 1229, 0, |
| 935, 1240, 970, 731, 1278, 1002, 601, 3541, 1614, 1604, |
| 1610, 1595, 1583, 486, 1565, 1548, 1548, 387, 343, 380, |
| 616, 1010, 423, 1317, 1349, 1044, 1555, 1554, 1553, 1506, |
| 1379, 645, 1076, 1113, 1143, 652, 983, 1035, 1151, 1042, |
| 1418, 0, 1175, 1429, 1184, 866, 1467, 1207, 644, 1451, |
| 1458, 648, 672, 625, 1447, 1419, 680, 576, 487, 715, |
| |
| 1505, 1536, 1567, 1449, 1447, 1432, 1215, 1599, 1257, 903, |
| 1636, 1297, 1325, 1441, 1335, 1359, 1369, 841, 1024, 1067, |
| 1124, 1396, 1308, 1675, 0, 1448, 1686, 1484, 1265, 1724, |
| 1515, 955, 3541, 1423, 1364, 956, 3541, 975, 3541, 807, |
| 1350, 1300, 591, 1074, 569, 917, 1523, 155, 1762, 1793, |
| 1546, 1336, 1300, 1553, 768, 1576, 810, 1825, 0, 429, |
| 1836, 1584, 1404, 1873, 1618, 1655, 1705, 1743, 1288, 1335, |
| 1734, 1772, 1772, 1803, 1912, 0, 1805, 1923, 1781, 1492, |
| 1814, 993, 1156, 1276, 1251, 1244, 730, 635, 1952, 1222, |
| 1984, 2016, 2048, 2080, 1242, 1855, 1892, 1943, 1241, 1184, |
| |
| 1198, 1964, 1350, 2112, 0, 762, 2123, 1972, 1992, 2160, |
| 2000, 2024, 1227, 2034, 2058, 2068, 1369, 1609, 1934, 772, |
| 806, 2199, 0, 844, 1173, 3541, 1468, 3541, 1192, 2086, |
| 1389, 142, 991, 604, 736, 2140, 1038, 2209, 2241, 2273, |
| 2305, 2103, 2177, 1163, 2219, 2229, 2251, 1152, 1116, 1656, |
| 1706, 2257, 1837, 2337, 0, 881, 2348, 2281, 2088, 2385, |
| 2291, 2314, 2323, 2366, 1855, 1122, 927, 1042, 1031, 902, |
| 951, 990, 1725, 2416, 1836, 2437, 2450, 2482, 2514, 2434, |
| 1951, 2464, 2492, 2502, 936, 919, 1893, 2001, 2522, 2035, |
| 2546, 0, 1031, 2557, 2530, 2148, 2576, 838, 2595, 2604, |
| |
| 2473, 773, 3541, 659, 3541, 1065, 2612, 1195, 2644, 2676, |
| 2623, 2629, 618, 2655, 2665, 2686, 573, 566, 2049, 557, |
| 549, 2694, 0, 1078, 1545, 2708, 2740, 2772, 2716, 2724, |
| 2748, 509, 0, 455, 357, 2756, 1535, 2804, 2836, 2786, |
| 3541, 2792, 2816, 2185, 3541, 345, 3541, 2824, 2844, 2854, |
| 25, 2874, 2866, 3541, 2919, 2933, 2947, 2961, 2975, 2989, |
| 3003, 3017, 3031, 3045, 3051, 3065, 3079, 1107, 3093, 3107, |
| 3121, 3135, 3149, 3163, 3177, 3191, 3197, 3204, 3218, 3232, |
| 3238, 3245, 3251, 3257, 3263, 3270, 3276, 3282, 3288, 3295, |
| 3303, 3309, 3315, 3321, 3328, 3336, 3342, 3348, 3355, 3363, |
| |
| 3369, 3377, 3384, 3392, 3398, 3406, 3413, 3421, 3435, 3449, |
| 3455, 3463, 3470, 3484, 3490, 3498, 3504, 3512, 1600, 3526 |
| } ; |
| |
| static yyconst short int yy_def[621] = |
| { 0, |
| 554, 1, 1, 1, 555, 555, 556, 556, 557, 557, |
| 558, 558, 554, 559, 554, 554, 554, 560, 561, 562, |
| 554, 554, 563, 554, 564, 559, 26, 26, 565, 554, |
| 554, 554, 32, 32, 34, 34, 34, 559, 26, 559, |
| 554, 561, 32, 32, 34, 34, 34, 554, 554, 566, |
| 559, 567, 554, 567, 554, 567, 554, 561, 554, 568, |
| 569, 554, 569, 554, 569, 554, 570, 571, 571, 571, |
| 554, 554, 559, 559, 554, 554, 560, 572, 560, 573, |
| 554, 574, 554, 562, 575, 562, 563, 563, 564, 576, |
| 559, 559, 26, 565, 93, 93, 93, 93, 577, 578, |
| |
| 32, 34, 34, 34, 34, 34, 559, 554, 559, 554, |
| 554, 554, 554, 554, 554, 573, 559, 93, 559, 559, |
| 559, 554, 554, 566, 579, 559, 559, 567, 567, 554, |
| 554, 554, 574, 554, 568, 569, 569, 554, 554, 569, |
| 569, 571, 554, 571, 571, 554, 554, 559, 554, 573, |
| 580, 575, 575, 554, 559, 559, 559, 93, 158, 581, |
| 554, 582, 554, 32, 34, 34, 34, 34, 34, 34, |
| 559, 554, 554, 554, 554, 554, 573, 559, 158, 559, |
| 559, 559, 554, 559, 554, 580, 559, 559, 559, 559, |
| 559, 559, 583, 584, 584, 195, 585, 584, 586, 163, |
| |
| 554, 201, 201, 554, 201, 34, 34, 34, 34, 34, |
| 34, 34, 559, 554, 554, 554, 554, 554, 573, 559, |
| 559, 559, 559, 559, 559, 559, 554, 587, 587, 229, |
| 587, 588, 589, 590, 554, 591, 204, 591, 591, 239, |
| 591, 554, 242, 242, 554, 242, 554, 554, 34, 34, |
| 34, 34, 34, 559, 554, 554, 554, 573, 559, 559, |
| 559, 559, 559, 559, 559, 559, 592, 592, 593, 594, |
| 554, 554, 554, 554, 554, 595, 595, 596, 245, 596, |
| 596, 281, 596, 554, 284, 284, 554, 284, 34, 34, |
| 34, 34, 34, 559, 554, 554, 573, 559, 559, 559, |
| |
| 559, 559, 559, 554, 597, 598, 271, 554, 308, 308, |
| 554, 308, 554, 554, 554, 554, 554, 554, 599, 599, |
| 600, 287, 600, 600, 324, 600, 554, 327, 327, 554, |
| 327, 554, 554, 34, 34, 554, 554, 554, 554, 559, |
| 554, 554, 573, 559, 559, 559, 559, 559, 559, 559, |
| 559, 554, 601, 554, 602, 311, 602, 602, 358, 358, |
| 554, 361, 361, 554, 361, 554, 554, 554, 554, 603, |
| 603, 604, 330, 604, 604, 375, 604, 554, 378, 378, |
| 378, 34, 34, 559, 554, 554, 573, 559, 559, 559, |
| 559, 559, 559, 559, 554, 554, 554, 554, 605, 605, |
| |
| 606, 364, 606, 606, 404, 404, 554, 407, 407, 554, |
| 407, 554, 554, 554, 554, 554, 554, 607, 607, 608, |
| 608, 608, 422, 422, 554, 554, 554, 554, 554, 554, |
| 573, 573, 559, 609, 610, 559, 559, 559, 559, 559, |
| 559, 559, 554, 554, 554, 554, 554, 554, 611, 611, |
| 612, 410, 612, 612, 454, 454, 554, 457, 457, 554, |
| 457, 554, 554, 554, 554, 613, 613, 554, 614, 573, |
| 559, 609, 609, 609, 610, 610, 559, 559, 559, 559, |
| 559, 554, 554, 554, 554, 615, 615, 616, 460, 616, |
| 616, 491, 491, 554, 494, 494, 494, 554, 554, 554, |
| |
| 554, 554, 554, 614, 554, 573, 559, 559, 559, 559, |
| 559, 554, 554, 554, 554, 554, 554, 617, 617, 618, |
| 618, 618, 522, 522, 573, 559, 559, 559, 554, 554, |
| 554, 554, 619, 619, 620, 559, 559, 559, 559, 559, |
| 554, 554, 554, 554, 554, 620, 554, 559, 559, 559, |
| 559, 559, 559, 0, 554, 554, 554, 554, 554, 554, |
| 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, |
| 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, |
| 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, |
| 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, |
| |
| 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, |
| 554, 554, 554, 554, 554, 554, 554, 554, 554, 554 |
| } ; |
| |
| static yyconst short int yy_nxt[3604] = |
| { 0, |
| 14, 15, 16, 17, 18, 19, 20, 21, 22, 14, |
| 23, 24, 14, 14, 25, 26, 27, 28, 26, 26, |
| 26, 26, 26, 29, 30, 31, 14, 32, 32, 32, |
| 32, 33, 34, 34, 35, 34, 36, 34, 37, 34, |
| 34, 34, 34, 34, 38, 14, 39, 39, 39, 39, |
| 39, 39, 14, 14, 14, 14, 14, 14, 14, 40, |
| 14, 14, 41, 48, 48, 81, 42, 49, 49, 74, |
| 15, 53, 54, 74, 55, 85, 50, 50, 134, 108, |
| 55, 69, 16, 70, 71, 15, 53, 54, 180, 55, |
| 43, 44, 55, 56, 45, 55, 86, 554, 46, 74, |
| |
| 74, 47, 69, 16, 70, 71, 138, 55, 56, 145, |
| 90, 141, 108, 57, 90, 90, 109, 127, 86, 177, |
| 74, 51, 51, 139, 72, 171, 137, 144, 57, 15, |
| 16, 17, 90, 58, 96, 96, 96, 96, 96, 96, |
| 96, 96, 74, 137, 81, 72, 146, 147, 182, 142, |
| 143, 91, 97, 97, 97, 97, 97, 98, 73, 74, |
| 95, 95, 95, 95, 95, 95, 95, 95, 110, 347, |
| 143, 178, 59, 60, 60, 60, 60, 60, 60, 60, |
| 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, |
| 15, 16, 17, 161, 58, 470, 111, 112, 74, 74, |
| |
| 113, 74, 163, 184, 114, 123, 220, 115, 83, 83, |
| 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, |
| 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, |
| 83, 83, 73, 59, 60, 60, 60, 60, 60, 60, |
| 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, |
| 60, 15, 16, 17, 62, 58, 74, 134, 108, 125, |
| 63, 64, 65, 125, 125, 130, 108, 131, 181, 132, |
| 179, 166, 144, 131, 66, 132, 167, 74, 168, 90, |
| 74, 125, 161, 90, 90, 134, 108, 132, 132, 146, |
| 147, 200, 220, 213, 67, 15, 16, 17, 62, 58, |
| |
| 126, 90, 74, 145, 63, 64, 65, 73, 132, 73, |
| 74, 73, 222, 73, 73, 143, 220, 73, 66, 81, |
| 91, 159, 159, 159, 159, 159, 159, 159, 159, 73, |
| 73, 73, 159, 159, 159, 159, 159, 159, 67, 78, |
| 74, 78, 73, 78, 143, 78, 78, 547, 84, 78, |
| 84, 74, 84, 223, 84, 84, 110, 161, 84, 547, |
| 94, 78, 78, 78, 125, 219, 200, 220, 125, 125, |
| 298, 84, 84, 159, 159, 159, 159, 159, 159, 159, |
| 159, 74, 79, 81, 111, 112, 125, 74, 113, 81, |
| 134, 108, 114, 82, 247, 115, 83, 83, 83, 83, |
| |
| 83, 83, 83, 83, 92, 126, 93, 93, 93, 93, |
| 93, 93, 93, 93, 94, 187, 248, 74, 95, 95, |
| 95, 95, 95, 254, 74, 155, 156, 157, 155, 155, |
| 155, 155, 155, 74, 299, 74, 262, 95, 95, 95, |
| 95, 95, 95, 73, 74, 259, 74, 73, 297, 73, |
| 399, 399, 73, 73, 74, 73, 73, 73, 101, 101, |
| 101, 101, 101, 101, 101, 101, 94, 74, 354, 73, |
| 101, 101, 101, 101, 101, 102, 102, 102, 102, 102, |
| 102, 102, 102, 102, 102, 102, 102, 74, 102, 95, |
| 95, 95, 95, 95, 95, 73, 73, 73, 73, 73, |
| |
| 73, 73, 73, 73, 73, 102, 102, 102, 102, 102, |
| 102, 102, 102, 554, 231, 231, 231, 102, 102, 102, |
| 102, 102, 83, 83, 83, 83, 83, 83, 83, 83, |
| 74, 74, 489, 134, 108, 294, 73, 73, 73, 73, |
| 73, 73, 107, 108, 73, 81, 73, 345, 73, 73, |
| 74, 87, 73, 87, 161, 87, 261, 87, 87, 235, |
| 161, 87, 554, 200, 73, 73, 73, 81, 136, 237, |
| 354, 136, 136, 87, 87, 87, 137, 82, 136, 94, |
| 83, 83, 83, 83, 83, 83, 83, 83, 89, 489, |
| 73, 136, 89, 81, 73, 73, 452, 258, 89, 124, |
| |
| 74, 73, 247, 124, 90, 73, 73, 473, 90, 124, |
| 89, 89, 73, 74, 90, 554, 161, 260, 116, 81, |
| 74, 124, 124, 73, 248, 237, 90, 90, 389, 133, |
| 344, 512, 554, 554, 554, 554, 554, 554, 554, 554, |
| 78, 387, 78, 148, 78, 332, 78, 78, 474, 336, |
| 78, 554, 554, 554, 554, 554, 554, 554, 554, 161, |
| 74, 505, 78, 78, 78, 300, 161, 333, 200, 74, |
| 152, 337, 152, 338, 152, 237, 152, 152, 340, 74, |
| 152, 433, 81, 79, 158, 158, 158, 158, 158, 158, |
| 158, 158, 152, 152, 152, 339, 158, 158, 158, 158, |
| |
| 158, 224, 225, 226, 224, 224, 224, 224, 224, 240, |
| 240, 240, 240, 240, 241, 158, 158, 158, 158, 158, |
| 158, 164, 164, 164, 164, 164, 164, 164, 164, 343, |
| 74, 431, 81, 164, 164, 164, 164, 164, 187, 473, |
| 188, 188, 188, 188, 188, 188, 282, 282, 282, 282, |
| 282, 283, 158, 158, 158, 158, 158, 158, 187, 74, |
| 188, 188, 188, 188, 188, 188, 188, 188, 346, 74, |
| 205, 205, 205, 205, 205, 205, 205, 205, 125, 432, |
| 476, 354, 125, 449, 449, 235, 161, 161, 125, 74, |
| 187, 356, 189, 189, 189, 189, 189, 189, 189, 189, |
| |
| 125, 125, 229, 229, 230, 231, 231, 231, 231, 231, |
| 197, 239, 239, 239, 239, 239, 239, 239, 239, 554, |
| 161, 74, 187, 554, 190, 190, 190, 190, 190, 191, |
| 188, 188, 554, 356, 238, 238, 238, 238, 238, 238, |
| 238, 238, 268, 268, 268, 268, 268, 268, 268, 268, |
| 197, 74, 161, 74, 73, 161, 192, 192, 192, 192, |
| 192, 192, 192, 192, 237, 466, 466, 384, 192, 192, |
| 192, 192, 192, 273, 274, 275, 273, 273, 273, 273, |
| 273, 325, 325, 325, 325, 325, 326, 192, 192, 192, |
| 192, 192, 192, 194, 195, 196, 196, 196, 196, 196, |
| |
| 196, 197, 486, 486, 81, 198, 198, 198, 198, 198, |
| 246, 246, 246, 246, 246, 246, 246, 246, 359, 359, |
| 359, 359, 359, 360, 198, 198, 198, 198, 198, 198, |
| 161, 201, 202, 203, 201, 201, 201, 201, 201, 204, |
| 235, 161, 452, 205, 205, 205, 205, 205, 235, 161, |
| 277, 277, 277, 277, 277, 277, 332, 336, 237, 402, |
| 506, 74, 205, 205, 205, 205, 205, 205, 206, 206, |
| 206, 206, 206, 206, 206, 206, 338, 390, 333, 337, |
| 206, 206, 206, 206, 206, 281, 281, 281, 281, 281, |
| 281, 281, 281, 554, 425, 74, 235, 161, 339, 192, |
| |
| 192, 192, 192, 192, 192, 187, 237, 188, 188, 188, |
| 188, 188, 188, 188, 188, 554, 426, 280, 280, 280, |
| 280, 280, 280, 280, 280, 301, 302, 303, 301, 301, |
| 301, 301, 301, 505, 474, 74, 74, 187, 161, 188, |
| 188, 188, 188, 188, 188, 188, 188, 279, 235, 161, |
| 471, 436, 518, 518, 74, 554, 161, 262, 279, 263, |
| 263, 263, 263, 263, 263, 279, 525, 81, 74, 235, |
| 161, 236, 236, 236, 236, 236, 236, 236, 236, 237, |
| 235, 161, 74, 238, 238, 238, 238, 238, 74, 313, |
| 279, 314, 314, 314, 314, 314, 314, 314, 314, 533, |
| |
| 533, 503, 238, 238, 238, 238, 238, 238, 161, 242, |
| 243, 244, 242, 242, 242, 242, 242, 245, 74, 135, |
| 135, 246, 246, 246, 246, 246, 313, 388, 315, 315, |
| 315, 315, 315, 315, 315, 315, 161, 235, 161, 402, |
| 246, 246, 246, 246, 246, 246, 262, 322, 263, 263, |
| 263, 263, 263, 263, 263, 263, 313, 427, 316, 316, |
| 316, 316, 316, 317, 314, 314, 288, 288, 288, 288, |
| 288, 288, 288, 288, 425, 356, 443, 74, 262, 428, |
| 264, 264, 264, 264, 264, 264, 264, 264, 235, 161, |
| 320, 320, 320, 320, 320, 320, 426, 354, 279, 324, |
| |
| 324, 324, 324, 324, 324, 324, 324, 356, 507, 74, |
| 262, 354, 265, 265, 265, 265, 265, 266, 263, 263, |
| 554, 402, 323, 323, 323, 323, 323, 323, 323, 323, |
| 312, 312, 312, 312, 312, 312, 312, 312, 468, 74, |
| 412, 74, 235, 161, 277, 277, 277, 277, 277, 277, |
| 277, 277, 237, 235, 161, 278, 278, 278, 278, 278, |
| 278, 278, 278, 279, 356, 307, 74, 280, 280, 280, |
| 280, 280, 358, 358, 358, 358, 358, 358, 358, 358, |
| 376, 376, 376, 376, 376, 377, 280, 280, 280, 280, |
| 280, 280, 161, 284, 285, 286, 284, 284, 284, 284, |
| |
| 284, 287, 161, 430, 429, 288, 288, 288, 288, 288, |
| 554, 279, 357, 357, 357, 357, 357, 357, 357, 357, |
| 74, 554, 161, 307, 288, 288, 288, 288, 288, 288, |
| 262, 322, 263, 263, 263, 263, 263, 263, 263, 263, |
| 366, 367, 368, 366, 366, 366, 366, 366, 313, 161, |
| 314, 314, 314, 314, 314, 314, 314, 314, 322, 233, |
| 386, 74, 262, 554, 263, 263, 263, 263, 263, 263, |
| 263, 263, 313, 402, 314, 314, 314, 314, 314, 314, |
| 314, 314, 313, 161, 314, 314, 314, 314, 314, 314, |
| 431, 81, 322, 74, 308, 309, 310, 308, 308, 308, |
| |
| 308, 308, 311, 469, 385, 383, 312, 312, 312, 312, |
| 312, 331, 331, 331, 331, 331, 331, 331, 331, 405, |
| 405, 405, 405, 405, 406, 312, 312, 312, 312, 312, |
| 312, 235, 161, 320, 320, 320, 320, 320, 320, 320, |
| 320, 279, 235, 161, 321, 321, 321, 321, 321, 321, |
| 321, 321, 322, 382, 313, 307, 323, 323, 323, 323, |
| 323, 235, 161, 371, 371, 371, 371, 371, 371, 427, |
| 233, 322, 197, 342, 341, 323, 323, 323, 323, 323, |
| 323, 161, 327, 328, 329, 327, 327, 327, 327, 327, |
| 330, 428, 335, 334, 331, 331, 331, 331, 331, 375, |
| |
| 375, 375, 375, 375, 375, 375, 375, 423, 423, 423, |
| 423, 423, 424, 331, 331, 331, 331, 331, 331, 347, |
| 348, 348, 348, 348, 348, 348, 348, 348, 554, 307, |
| 374, 374, 374, 374, 374, 374, 374, 374, 391, 392, |
| 393, 394, 391, 391, 391, 391, 525, 81, 536, 74, |
| 347, 349, 349, 349, 349, 349, 349, 349, 349, 535, |
| 347, 348, 348, 348, 348, 348, 348, 74, 396, 397, |
| 398, 396, 396, 396, 396, 396, 233, 197, 197, 74, |
| 74, 347, 350, 350, 350, 350, 350, 351, 348, 348, |
| 74, 365, 365, 365, 365, 365, 365, 365, 365, 404, |
| |
| 404, 404, 404, 404, 404, 404, 404, 255, 545, 296, |
| 295, 74, 354, 545, 355, 355, 355, 355, 355, 355, |
| 355, 355, 356, 161, 293, 292, 357, 357, 357, 357, |
| 357, 554, 373, 403, 403, 403, 403, 403, 403, 403, |
| 403, 291, 290, 289, 271, 357, 357, 357, 357, 357, |
| 357, 361, 362, 363, 361, 361, 361, 361, 361, 364, |
| 233, 197, 267, 365, 365, 365, 365, 365, 412, 354, |
| 413, 413, 413, 413, 413, 413, 413, 413, 197, 402, |
| 100, 255, 365, 365, 365, 365, 365, 365, 235, 161, |
| 371, 371, 371, 371, 371, 371, 371, 371, 322, 235, |
| |
| 161, 372, 372, 372, 372, 372, 372, 372, 372, 373, |
| 257, 255, 256, 374, 374, 374, 374, 374, 412, 354, |
| 414, 414, 414, 414, 414, 414, 414, 414, 554, 452, |
| 255, 253, 374, 374, 374, 374, 374, 374, 161, 378, |
| 379, 380, 378, 378, 378, 378, 378, 235, 161, 252, |
| 251, 381, 381, 381, 381, 381, 412, 322, 415, 415, |
| 415, 415, 415, 416, 413, 413, 250, 249, 94, 474, |
| 381, 381, 381, 381, 381, 381, 347, 348, 348, 348, |
| 348, 348, 348, 348, 348, 235, 161, 381, 381, 381, |
| 381, 381, 381, 381, 381, 373, 422, 422, 422, 422, |
| |
| 422, 422, 422, 422, 197, 233, 74, 347, 348, 348, |
| 348, 348, 348, 348, 348, 348, 554, 161, 235, 161, |
| 419, 419, 419, 419, 419, 419, 373, 554, 373, 421, |
| 421, 421, 421, 421, 421, 421, 421, 74, 354, 554, |
| 400, 400, 400, 400, 400, 400, 400, 400, 356, 354, |
| 554, 401, 401, 401, 401, 401, 401, 401, 401, 402, |
| 452, 197, 100, 403, 403, 403, 403, 403, 443, 161, |
| 444, 444, 444, 444, 444, 444, 444, 444, 373, 81, |
| 476, 185, 403, 403, 403, 403, 403, 403, 407, 408, |
| 409, 407, 407, 407, 407, 407, 410, 221, 218, 217, |
| |
| 411, 411, 411, 411, 411, 443, 354, 445, 445, 445, |
| 445, 445, 445, 445, 445, 216, 452, 215, 214, 411, |
| 411, 411, 411, 411, 411, 235, 161, 419, 419, 419, |
| 419, 419, 419, 419, 419, 373, 235, 161, 420, 420, |
| 420, 420, 420, 420, 420, 420, 212, 235, 161, 211, |
| 421, 421, 421, 421, 421, 434, 443, 373, 446, 446, |
| 446, 446, 446, 447, 444, 444, 481, 481, 481, 421, |
| 421, 421, 421, 421, 421, 434, 210, 434, 435, 411, |
| 411, 411, 411, 411, 411, 411, 411, 454, 454, 454, |
| 454, 454, 454, 454, 454, 74, 74, 436, 209, 437, |
| |
| 437, 437, 437, 437, 437, 437, 437, 455, 455, 455, |
| 455, 455, 456, 554, 354, 453, 453, 453, 453, 453, |
| 453, 453, 453, 208, 489, 207, 100, 92, 74, 436, |
| 153, 438, 438, 438, 438, 438, 438, 438, 438, 462, |
| 463, 464, 462, 462, 462, 462, 462, 412, 554, 413, |
| 413, 413, 413, 413, 413, 413, 413, 81, 489, 81, |
| 74, 436, 354, 439, 439, 439, 439, 439, 440, 441, |
| 441, 412, 489, 413, 413, 413, 413, 413, 413, 413, |
| 413, 412, 74, 413, 413, 413, 413, 413, 413, 434, |
| 185, 142, 74, 436, 143, 442, 442, 442, 437, 437, |
| |
| 437, 437, 437, 492, 492, 492, 492, 492, 493, 434, |
| 137, 434, 434, 137, 129, 183, 436, 122, 481, 481, |
| 481, 176, 175, 174, 74, 354, 173, 450, 450, 450, |
| 450, 450, 450, 450, 450, 402, 354, 172, 451, 451, |
| 451, 451, 451, 451, 451, 451, 452, 74, 170, 169, |
| 453, 453, 453, 453, 453, 477, 478, 479, 477, 477, |
| 477, 477, 477, 523, 523, 523, 523, 523, 524, 453, |
| 453, 453, 453, 453, 453, 457, 458, 459, 457, 457, |
| 457, 457, 457, 460, 74, 165, 100, 461, 461, 461, |
| 461, 461, 482, 483, 484, 482, 482, 482, 482, 482, |
| |
| 541, 541, 541, 541, 541, 541, 461, 461, 461, 461, |
| 461, 461, 235, 161, 467, 467, 467, 467, 467, 467, |
| 467, 467, 436, 73, 441, 441, 441, 441, 441, 441, |
| 441, 441, 443, 100, 444, 444, 444, 444, 444, 444, |
| 444, 444, 443, 154, 444, 444, 444, 444, 444, 444, |
| 444, 444, 88, 74, 436, 153, 441, 441, 441, 441, |
| 441, 441, 441, 441, 443, 81, 444, 444, 444, 444, |
| 444, 444, 461, 461, 461, 461, 461, 461, 461, 461, |
| 148, 149, 76, 75, 74, 74, 436, 143, 441, 441, |
| 441, 441, 441, 441, 480, 480, 491, 491, 491, 491, |
| |
| 491, 491, 491, 491, 554, 137, 490, 490, 490, 490, |
| 490, 490, 490, 490, 129, 122, 121, 74, 436, 120, |
| 480, 480, 480, 480, 480, 480, 480, 480, 161, 498, |
| 498, 498, 498, 498, 498, 498, 498, 161, 499, 499, |
| 499, 499, 499, 499, 499, 499, 119, 118, 117, 74, |
| 354, 106, 487, 487, 487, 487, 487, 487, 487, 487, |
| 452, 354, 105, 488, 488, 488, 488, 488, 488, 488, |
| 488, 489, 104, 103, 100, 490, 490, 490, 490, 490, |
| 161, 500, 500, 500, 500, 500, 501, 498, 498, 88, |
| 76, 75, 74, 554, 490, 490, 490, 490, 490, 490, |
| |
| 494, 495, 496, 494, 494, 494, 494, 494, 554, 554, |
| 554, 554, 497, 497, 497, 497, 497, 472, 554, 554, |
| 554, 472, 554, 472, 472, 554, 554, 472, 554, 554, |
| 554, 497, 497, 497, 497, 497, 497, 554, 475, 472, |
| 472, 472, 475, 554, 475, 475, 554, 554, 475, 480, |
| 480, 480, 480, 480, 480, 480, 480, 554, 554, 554, |
| 475, 475, 475, 507, 554, 508, 508, 508, 508, 508, |
| 508, 508, 508, 554, 554, 554, 554, 512, 74, 513, |
| 513, 513, 513, 513, 513, 513, 513, 161, 498, 498, |
| 498, 498, 498, 498, 74, 507, 554, 509, 509, 509, |
| |
| 509, 509, 509, 509, 509, 512, 554, 514, 514, 514, |
| 514, 514, 514, 514, 514, 512, 554, 515, 515, 515, |
| 515, 515, 516, 513, 513, 554, 74, 507, 554, 510, |
| 510, 510, 510, 510, 511, 508, 508, 497, 497, 497, |
| 497, 497, 497, 497, 497, 522, 522, 522, 522, 522, |
| 522, 522, 522, 554, 554, 554, 554, 554, 74, 354, |
| 554, 519, 519, 519, 519, 519, 519, 519, 519, 489, |
| 354, 554, 520, 520, 520, 520, 520, 520, 520, 520, |
| 554, 554, 554, 554, 521, 521, 521, 521, 521, 554, |
| 554, 521, 521, 521, 521, 521, 521, 521, 521, 554, |
| |
| 554, 554, 554, 521, 521, 521, 521, 521, 521, 161, |
| 498, 498, 498, 498, 498, 498, 498, 498, 161, 498, |
| 498, 498, 498, 498, 498, 498, 498, 526, 527, 528, |
| 526, 526, 526, 526, 526, 554, 507, 554, 508, 508, |
| 508, 508, 508, 508, 529, 530, 531, 529, 529, 529, |
| 529, 529, 554, 554, 554, 554, 74, 507, 554, 508, |
| 508, 508, 508, 508, 508, 508, 508, 74, 512, 554, |
| 513, 513, 513, 513, 513, 513, 513, 513, 512, 554, |
| 513, 513, 513, 513, 513, 513, 513, 513, 74, 507, |
| 554, 508, 508, 508, 508, 508, 508, 508, 508, 512, |
| |
| 554, 513, 513, 513, 513, 513, 513, 354, 554, 534, |
| 534, 534, 534, 534, 534, 534, 534, 554, 554, 554, |
| 74, 536, 554, 537, 537, 537, 537, 537, 537, 537, |
| 537, 541, 541, 541, 541, 541, 541, 541, 541, 542, |
| 542, 542, 542, 542, 542, 542, 542, 554, 554, 554, |
| 554, 554, 74, 536, 554, 538, 538, 538, 538, 538, |
| 538, 538, 538, 543, 543, 543, 543, 543, 544, 541, |
| 541, 548, 549, 550, 548, 548, 548, 548, 548, 554, |
| 554, 554, 554, 554, 74, 536, 554, 539, 539, 539, |
| 539, 539, 540, 537, 537, 554, 554, 554, 554, 536, |
| |
| 74, 537, 537, 537, 537, 537, 537, 541, 541, 541, |
| 541, 541, 541, 541, 541, 554, 74, 536, 554, 537, |
| 537, 537, 537, 537, 537, 537, 537, 554, 554, 554, |
| 74, 541, 541, 541, 541, 541, 541, 541, 541, 551, |
| 551, 551, 551, 551, 551, 551, 551, 554, 74, 536, |
| 554, 537, 537, 537, 537, 537, 537, 537, 537, 548, |
| 548, 548, 548, 548, 548, 548, 548, 554, 74, 552, |
| 552, 552, 552, 552, 553, 551, 551, 554, 554, 554, |
| 74, 551, 551, 551, 551, 551, 551, 554, 74, 551, |
| 551, 551, 551, 551, 551, 551, 551, 554, 74, 554, |
| |
| 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, |
| 74, 554, 554, 554, 554, 554, 554, 554, 74, 52, |
| 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, |
| 52, 52, 52, 31, 31, 31, 31, 31, 31, 31, |
| 31, 31, 31, 31, 31, 31, 31, 61, 61, 61, |
| 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, |
| 61, 68, 68, 68, 68, 68, 68, 68, 68, 68, |
| 68, 68, 68, 68, 68, 73, 554, 554, 554, 73, |
| 554, 73, 73, 73, 554, 554, 73, 73, 73, 77, |
| 77, 554, 77, 77, 77, 77, 77, 77, 77, 77, |
| |
| 77, 77, 77, 80, 80, 80, 80, 80, 80, 80, |
| 80, 80, 80, 80, 80, 80, 80, 84, 554, 554, |
| 554, 84, 554, 84, 84, 84, 84, 554, 84, 84, |
| 84, 87, 554, 554, 554, 87, 554, 87, 87, 87, |
| 554, 554, 87, 87, 87, 89, 554, 554, 89, 89, |
| 89, 89, 89, 89, 554, 554, 89, 89, 89, 99, |
| 99, 554, 554, 554, 99, 124, 554, 554, 124, 124, |
| 124, 124, 124, 124, 554, 554, 124, 124, 124, 128, |
| 554, 554, 128, 128, 128, 128, 128, 128, 554, 128, |
| 554, 128, 128, 136, 554, 554, 136, 554, 136, 136, |
| |
| 136, 136, 136, 554, 136, 136, 136, 140, 140, 140, |
| 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, |
| 140, 142, 142, 554, 142, 554, 142, 142, 142, 142, |
| 142, 142, 142, 142, 142, 78, 78, 554, 78, 78, |
| 78, 78, 78, 78, 78, 78, 78, 78, 78, 150, |
| 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, |
| 150, 150, 150, 151, 151, 554, 151, 151, 151, 151, |
| 151, 151, 151, 151, 151, 151, 151, 152, 554, 554, |
| 554, 152, 554, 152, 152, 152, 554, 554, 152, 152, |
| 152, 90, 554, 554, 90, 90, 90, 90, 90, 90, |
| |
| 554, 554, 90, 90, 90, 160, 160, 554, 554, 554, |
| 160, 162, 162, 162, 554, 554, 554, 162, 125, 554, |
| 554, 125, 125, 125, 125, 125, 125, 554, 554, 125, |
| 125, 125, 186, 186, 186, 186, 186, 186, 186, 186, |
| 186, 186, 186, 186, 186, 186, 193, 193, 554, 554, |
| 554, 193, 199, 199, 199, 554, 554, 554, 199, 227, |
| 227, 554, 554, 554, 227, 228, 228, 554, 554, 554, |
| 228, 232, 232, 554, 554, 554, 232, 234, 234, 234, |
| 554, 554, 554, 234, 267, 267, 554, 554, 554, 267, |
| 269, 269, 554, 554, 554, 269, 270, 270, 554, 554, |
| |
| 554, 270, 272, 272, 272, 554, 554, 554, 272, 276, |
| 276, 276, 276, 554, 554, 554, 276, 304, 304, 554, |
| 554, 554, 304, 305, 305, 554, 554, 554, 305, 306, |
| 306, 554, 554, 554, 306, 318, 318, 318, 554, 554, |
| 554, 318, 319, 319, 319, 319, 554, 554, 554, 319, |
| 352, 352, 554, 554, 554, 352, 353, 353, 554, 554, |
| 554, 353, 369, 369, 369, 554, 554, 554, 369, 370, |
| 370, 370, 370, 554, 554, 554, 370, 395, 395, 554, |
| 554, 554, 395, 399, 554, 399, 399, 554, 554, 554, |
| 399, 417, 417, 417, 554, 554, 554, 417, 418, 418, |
| |
| 418, 418, 554, 554, 554, 418, 448, 448, 554, 554, |
| 554, 448, 449, 554, 449, 449, 554, 554, 554, 449, |
| 465, 465, 465, 554, 554, 554, 465, 466, 466, 466, |
| 554, 554, 554, 554, 466, 472, 554, 554, 472, 472, |
| 554, 472, 472, 472, 554, 554, 472, 472, 472, 475, |
| 554, 554, 475, 475, 554, 475, 475, 475, 554, 554, |
| 475, 475, 475, 485, 485, 554, 554, 554, 485, 486, |
| 554, 486, 486, 554, 554, 554, 486, 502, 502, 554, |
| 554, 554, 554, 502, 504, 504, 504, 504, 504, 504, |
| 504, 504, 504, 504, 504, 504, 504, 504, 517, 517, |
| |
| 554, 554, 554, 517, 518, 554, 518, 518, 554, 554, |
| 554, 518, 532, 532, 554, 554, 554, 532, 533, 554, |
| 533, 554, 554, 554, 554, 533, 546, 546, 546, 546, |
| 546, 546, 546, 546, 546, 546, 546, 546, 546, 546, |
| 13, 554, 554, 554, 554, 554, 554, 554, 554, 554, |
| 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, |
| 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, |
| 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, |
| 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, |
| 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, |
| |
| 554, 554, 554 |
| } ; |
| |
| static yyconst short int yy_chk[3604] = |
| { 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, 2, 3, 4, 116, 2, 3, 4, 551, |
| 5, 5, 5, 119, 5, 20, 3, 4, 59, 59, |
| 5, 11, 11, 11, 11, 6, 6, 6, 119, 6, |
| 2, 2, 5, 5, 2, 6, 20, 84, 2, 40, |
| |
| 51, 2, 12, 12, 12, 12, 63, 6, 6, 70, |
| 25, 67, 67, 5, 25, 25, 40, 51, 84, 116, |
| 109, 3, 4, 65, 11, 109, 63, 69, 6, 7, |
| 7, 7, 25, 7, 27, 27, 27, 27, 27, 27, |
| 27, 27, 121, 65, 432, 12, 72, 72, 121, 72, |
| 70, 25, 28, 28, 28, 28, 28, 28, 39, 117, |
| 39, 39, 39, 39, 39, 39, 39, 39, 41, 348, |
| 69, 117, 7, 7, 7, 7, 7, 7, 7, 7, |
| 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, |
| 8, 8, 8, 100, 8, 432, 41, 41, 127, 348, |
| |
| 41, 178, 100, 127, 41, 49, 178, 41, 49, 49, |
| 49, 49, 49, 49, 49, 49, 82, 82, 82, 82, |
| 82, 82, 82, 82, 83, 83, 83, 83, 83, 83, |
| 83, 83, 118, 8, 8, 8, 8, 8, 8, 8, |
| 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, |
| 8, 9, 9, 9, 9, 9, 120, 130, 130, 50, |
| 9, 9, 9, 50, 50, 57, 57, 57, 120, 57, |
| 118, 104, 144, 57, 9, 57, 104, 222, 104, 89, |
| 171, 50, 162, 89, 89, 134, 134, 57, 57, 146, |
| 146, 162, 222, 171, 9, 10, 10, 10, 10, 10, |
| |
| 50, 89, 182, 145, 10, 10, 10, 74, 57, 74, |
| 181, 74, 181, 74, 74, 144, 182, 74, 10, 177, |
| 89, 96, 96, 96, 96, 96, 96, 96, 96, 74, |
| 74, 74, 98, 98, 98, 98, 98, 98, 10, 18, |
| 184, 18, 18, 18, 145, 18, 18, 546, 86, 18, |
| 86, 180, 86, 184, 86, 86, 110, 199, 86, 535, |
| 192, 18, 18, 18, 124, 177, 199, 180, 124, 124, |
| 259, 86, 86, 97, 97, 97, 97, 97, 97, 97, |
| 97, 192, 18, 19, 110, 110, 124, 259, 110, 258, |
| 107, 107, 110, 19, 207, 110, 19, 19, 19, 19, |
| |
| 19, 19, 19, 19, 26, 124, 26, 26, 26, 26, |
| 26, 26, 26, 26, 26, 188, 207, 213, 26, 26, |
| 26, 26, 26, 213, 260, 92, 92, 92, 92, 92, |
| 92, 92, 92, 107, 260, 26, 263, 26, 26, 26, |
| 26, 26, 26, 32, 220, 220, 188, 32, 258, 32, |
| 360, 360, 32, 32, 92, 32, 32, 32, 32, 32, |
| 32, 32, 32, 32, 32, 32, 32, 263, 534, 32, |
| 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, |
| 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, |
| 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, |
| |
| 32, 32, 32, 32, 32, 34, 34, 34, 34, 34, |
| 34, 34, 34, 34, 196, 196, 196, 34, 34, 34, |
| 34, 34, 123, 123, 123, 123, 123, 123, 123, 123, |
| 254, 299, 532, 141, 141, 254, 34, 34, 34, 34, |
| 34, 34, 38, 38, 38, 219, 38, 299, 38, 38, |
| 223, 88, 38, 88, 234, 88, 223, 88, 88, 236, |
| 236, 88, 521, 234, 38, 38, 38, 42, 137, 236, |
| 520, 137, 137, 88, 88, 88, 141, 42, 137, 221, |
| 42, 42, 42, 42, 42, 42, 42, 42, 91, 518, |
| 91, 137, 91, 343, 91, 91, 517, 219, 91, 126, |
| |
| 221, 126, 247, 126, 154, 126, 126, 434, 154, 126, |
| 91, 91, 91, 345, 154, 238, 238, 221, 42, 58, |
| 298, 126, 126, 126, 247, 238, 154, 154, 345, 58, |
| 298, 513, 58, 58, 58, 58, 58, 58, 58, 58, |
| 77, 343, 77, 77, 77, 289, 77, 77, 434, 292, |
| 77, 133, 133, 133, 133, 133, 133, 133, 133, 272, |
| 261, 504, 77, 77, 77, 261, 276, 289, 272, 294, |
| 153, 292, 153, 293, 153, 276, 153, 153, 294, 388, |
| 153, 388, 297, 77, 93, 93, 93, 93, 93, 93, |
| 93, 93, 153, 153, 153, 293, 93, 93, 93, 93, |
| |
| 93, 187, 187, 187, 187, 187, 187, 187, 187, 203, |
| 203, 203, 203, 203, 203, 93, 93, 93, 93, 93, |
| 93, 101, 101, 101, 101, 101, 101, 101, 101, 297, |
| 187, 387, 387, 101, 101, 101, 101, 101, 191, 435, |
| 191, 191, 191, 191, 191, 191, 244, 244, 244, 244, |
| 244, 244, 101, 101, 101, 101, 101, 101, 155, 300, |
| 155, 155, 155, 155, 155, 155, 155, 155, 300, 191, |
| 200, 200, 200, 200, 200, 200, 200, 200, 183, 387, |
| 435, 355, 183, 406, 406, 420, 420, 502, 183, 155, |
| 156, 355, 156, 156, 156, 156, 156, 156, 156, 156, |
| |
| 183, 183, 195, 195, 195, 195, 195, 195, 195, 195, |
| 195, 202, 202, 202, 202, 202, 202, 202, 202, 421, |
| 421, 156, 157, 357, 157, 157, 157, 157, 157, 157, |
| 157, 157, 205, 357, 205, 205, 205, 205, 205, 205, |
| 205, 205, 229, 229, 229, 229, 229, 229, 229, 229, |
| 229, 340, 498, 157, 158, 318, 158, 158, 158, 158, |
| 158, 158, 158, 158, 318, 424, 424, 340, 158, 158, |
| 158, 158, 158, 235, 235, 235, 235, 235, 235, 235, |
| 235, 286, 286, 286, 286, 286, 286, 158, 158, 158, |
| 158, 158, 158, 161, 161, 161, 161, 161, 161, 161, |
| |
| 161, 161, 456, 456, 470, 161, 161, 161, 161, 161, |
| 237, 237, 237, 237, 237, 237, 237, 237, 310, 310, |
| 310, 310, 310, 310, 161, 161, 161, 161, 161, 161, |
| 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, |
| 467, 467, 486, 163, 163, 163, 163, 163, 241, 241, |
| 241, 241, 241, 241, 241, 241, 332, 336, 241, 485, |
| 470, 346, 163, 163, 163, 163, 163, 163, 164, 164, |
| 164, 164, 164, 164, 164, 164, 338, 346, 332, 336, |
| 164, 164, 164, 164, 164, 243, 243, 243, 243, 243, |
| 243, 243, 243, 472, 382, 471, 277, 277, 338, 164, |
| |
| 164, 164, 164, 164, 164, 189, 277, 189, 189, 189, |
| 189, 189, 189, 189, 189, 246, 382, 246, 246, 246, |
| 246, 246, 246, 246, 246, 262, 262, 262, 262, 262, |
| 262, 262, 262, 469, 472, 433, 189, 190, 319, 190, |
| 190, 190, 190, 190, 190, 190, 190, 319, 278, 278, |
| 433, 437, 493, 493, 262, 280, 280, 266, 278, 266, |
| 266, 266, 266, 266, 266, 280, 506, 506, 190, 201, |
| 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, |
| 320, 320, 437, 201, 201, 201, 201, 201, 266, 273, |
| 320, 273, 273, 273, 273, 273, 273, 273, 273, 524, |
| |
| 524, 468, 201, 201, 201, 201, 201, 201, 204, 204, |
| 204, 204, 204, 204, 204, 204, 204, 204, 344, 568, |
| 568, 204, 204, 204, 204, 204, 274, 344, 274, 274, |
| 274, 274, 274, 274, 274, 274, 466, 321, 321, 449, |
| 204, 204, 204, 204, 204, 204, 224, 321, 224, 224, |
| 224, 224, 224, 224, 224, 224, 275, 383, 275, 275, |
| 275, 275, 275, 275, 275, 275, 279, 279, 279, 279, |
| 279, 279, 279, 279, 425, 448, 444, 224, 225, 383, |
| 225, 225, 225, 225, 225, 225, 225, 225, 283, 283, |
| 283, 283, 283, 283, 283, 283, 425, 400, 283, 285, |
| |
| 285, 285, 285, 285, 285, 285, 285, 400, 508, 225, |
| 226, 401, 226, 226, 226, 226, 226, 226, 226, 226, |
| 288, 401, 288, 288, 288, 288, 288, 288, 288, 288, |
| 307, 307, 307, 307, 307, 307, 307, 307, 429, 508, |
| 413, 226, 239, 239, 239, 239, 239, 239, 239, 239, |
| 239, 239, 239, 242, 242, 242, 242, 242, 242, 242, |
| 242, 242, 242, 242, 399, 395, 390, 242, 242, 242, |
| 242, 242, 309, 309, 309, 309, 309, 309, 309, 309, |
| 329, 329, 329, 329, 329, 329, 242, 242, 242, 242, |
| 242, 242, 245, 245, 245, 245, 245, 245, 245, 245, |
| |
| 245, 245, 369, 386, 385, 245, 245, 245, 245, 245, |
| 312, 369, 312, 312, 312, 312, 312, 312, 312, 312, |
| 384, 323, 323, 353, 245, 245, 245, 245, 245, 245, |
| 264, 323, 264, 264, 264, 264, 264, 264, 264, 264, |
| 313, 313, 313, 313, 313, 313, 313, 313, 315, 370, |
| 315, 315, 315, 315, 315, 315, 315, 315, 370, 352, |
| 342, 264, 265, 403, 265, 265, 265, 265, 265, 265, |
| 265, 265, 316, 403, 316, 316, 316, 316, 316, 316, |
| 316, 316, 317, 417, 317, 317, 317, 317, 317, 317, |
| 431, 431, 417, 265, 271, 271, 271, 271, 271, 271, |
| |
| 271, 271, 271, 431, 341, 335, 271, 271, 271, 271, |
| 271, 322, 322, 322, 322, 322, 322, 322, 322, 363, |
| 363, 363, 363, 363, 363, 271, 271, 271, 271, 271, |
| 271, 281, 281, 281, 281, 281, 281, 281, 281, 281, |
| 281, 281, 284, 284, 284, 284, 284, 284, 284, 284, |
| 284, 284, 284, 334, 314, 306, 284, 284, 284, 284, |
| 284, 326, 326, 326, 326, 326, 326, 326, 326, 427, |
| 305, 326, 304, 296, 295, 284, 284, 284, 284, 284, |
| 284, 287, 287, 287, 287, 287, 287, 287, 287, 287, |
| 287, 427, 291, 290, 287, 287, 287, 287, 287, 328, |
| |
| 328, 328, 328, 328, 328, 328, 328, 380, 380, 380, |
| 380, 380, 380, 287, 287, 287, 287, 287, 287, 301, |
| 301, 301, 301, 301, 301, 301, 301, 301, 331, 270, |
| 331, 331, 331, 331, 331, 331, 331, 331, 347, 347, |
| 347, 347, 347, 347, 347, 347, 525, 525, 537, 301, |
| 302, 302, 302, 302, 302, 302, 302, 302, 302, 525, |
| 351, 351, 351, 351, 351, 351, 351, 347, 354, 354, |
| 354, 354, 354, 354, 354, 354, 269, 268, 267, 537, |
| 302, 303, 303, 303, 303, 303, 303, 303, 303, 303, |
| 351, 356, 356, 356, 356, 356, 356, 356, 356, 362, |
| |
| 362, 362, 362, 362, 362, 362, 362, 257, 619, 256, |
| 255, 303, 308, 619, 308, 308, 308, 308, 308, 308, |
| 308, 308, 308, 418, 253, 252, 308, 308, 308, 308, |
| 308, 365, 418, 365, 365, 365, 365, 365, 365, 365, |
| 365, 251, 250, 249, 233, 308, 308, 308, 308, 308, |
| 308, 311, 311, 311, 311, 311, 311, 311, 311, 311, |
| 232, 231, 230, 311, 311, 311, 311, 311, 366, 450, |
| 366, 366, 366, 366, 366, 366, 366, 366, 228, 450, |
| 227, 218, 311, 311, 311, 311, 311, 311, 324, 324, |
| 324, 324, 324, 324, 324, 324, 324, 324, 324, 327, |
| |
| 327, 327, 327, 327, 327, 327, 327, 327, 327, 327, |
| 217, 216, 215, 327, 327, 327, 327, 327, 367, 451, |
| 367, 367, 367, 367, 367, 367, 367, 367, 473, 451, |
| 214, 212, 327, 327, 327, 327, 327, 327, 330, 330, |
| 330, 330, 330, 330, 330, 330, 330, 371, 371, 211, |
| 210, 330, 330, 330, 330, 330, 368, 371, 368, 368, |
| 368, 368, 368, 368, 368, 368, 209, 208, 206, 473, |
| 330, 330, 330, 330, 330, 330, 349, 349, 349, 349, |
| 349, 349, 349, 349, 349, 372, 372, 373, 373, 373, |
| 373, 373, 373, 373, 373, 372, 379, 379, 379, 379, |
| |
| 379, 379, 379, 379, 198, 197, 349, 350, 350, 350, |
| 350, 350, 350, 350, 350, 350, 374, 374, 377, 377, |
| 377, 377, 377, 377, 377, 377, 374, 381, 377, 381, |
| 381, 381, 381, 381, 381, 381, 381, 350, 358, 475, |
| 358, 358, 358, 358, 358, 358, 358, 358, 358, 361, |
| 453, 361, 361, 361, 361, 361, 361, 361, 361, 361, |
| 453, 194, 193, 361, 361, 361, 361, 361, 396, 465, |
| 396, 396, 396, 396, 396, 396, 396, 396, 465, 186, |
| 475, 185, 361, 361, 361, 361, 361, 361, 364, 364, |
| 364, 364, 364, 364, 364, 364, 364, 179, 176, 175, |
| |
| 364, 364, 364, 364, 364, 397, 487, 397, 397, 397, |
| 397, 397, 397, 397, 397, 174, 487, 173, 172, 364, |
| 364, 364, 364, 364, 364, 375, 375, 375, 375, 375, |
| 375, 375, 375, 375, 375, 375, 378, 378, 378, 378, |
| 378, 378, 378, 378, 378, 378, 170, 419, 419, 169, |
| 378, 378, 378, 378, 378, 389, 398, 419, 398, 398, |
| 398, 398, 398, 398, 398, 398, 481, 481, 481, 378, |
| 378, 378, 378, 378, 378, 389, 168, 389, 389, 402, |
| 402, 402, 402, 402, 402, 402, 402, 408, 408, 408, |
| 408, 408, 408, 408, 408, 481, 389, 391, 167, 391, |
| |
| 391, 391, 391, 391, 391, 391, 391, 409, 409, 409, |
| 409, 409, 409, 411, 488, 411, 411, 411, 411, 411, |
| 411, 411, 411, 166, 488, 165, 160, 159, 391, 392, |
| 152, 392, 392, 392, 392, 392, 392, 392, 392, 412, |
| 412, 412, 412, 412, 412, 412, 412, 414, 490, 414, |
| 414, 414, 414, 414, 414, 414, 414, 151, 490, 150, |
| 392, 393, 519, 393, 393, 393, 393, 393, 393, 393, |
| 393, 415, 519, 415, 415, 415, 415, 415, 415, 415, |
| 415, 416, 148, 416, 416, 416, 416, 416, 416, 430, |
| 147, 143, 393, 394, 142, 394, 394, 394, 394, 394, |
| |
| 394, 394, 394, 459, 459, 459, 459, 459, 459, 430, |
| 140, 430, 430, 136, 129, 125, 442, 122, 442, 442, |
| 442, 115, 114, 113, 394, 404, 112, 404, 404, 404, |
| 404, 404, 404, 404, 404, 404, 407, 111, 407, 407, |
| 407, 407, 407, 407, 407, 407, 407, 442, 106, 105, |
| 407, 407, 407, 407, 407, 436, 436, 436, 436, 436, |
| 436, 436, 436, 496, 496, 496, 496, 496, 496, 407, |
| 407, 407, 407, 407, 407, 410, 410, 410, 410, 410, |
| 410, 410, 410, 410, 436, 103, 99, 410, 410, 410, |
| 410, 410, 443, 443, 443, 443, 443, 443, 443, 443, |
| |
| 544, 544, 544, 544, 544, 544, 410, 410, 410, 410, |
| 410, 410, 422, 422, 422, 422, 422, 422, 422, 422, |
| 422, 422, 438, 95, 438, 438, 438, 438, 438, 438, |
| 438, 438, 445, 94, 445, 445, 445, 445, 445, 445, |
| 445, 445, 446, 90, 446, 446, 446, 446, 446, 446, |
| 446, 446, 87, 438, 439, 85, 439, 439, 439, 439, |
| 439, 439, 439, 439, 447, 80, 447, 447, 447, 447, |
| 447, 447, 452, 452, 452, 452, 452, 452, 452, 452, |
| 79, 78, 76, 75, 73, 439, 440, 68, 440, 440, |
| 440, 440, 440, 440, 440, 440, 458, 458, 458, 458, |
| |
| 458, 458, 458, 458, 461, 61, 461, 461, 461, 461, |
| 461, 461, 461, 461, 54, 48, 47, 440, 441, 46, |
| 441, 441, 441, 441, 441, 441, 441, 441, 462, 462, |
| 462, 462, 462, 462, 462, 462, 462, 463, 463, 463, |
| 463, 463, 463, 463, 463, 463, 45, 44, 43, 441, |
| 454, 37, 454, 454, 454, 454, 454, 454, 454, 454, |
| 454, 457, 36, 457, 457, 457, 457, 457, 457, 457, |
| 457, 457, 35, 33, 29, 457, 457, 457, 457, 457, |
| 464, 464, 464, 464, 464, 464, 464, 464, 464, 23, |
| 17, 15, 14, 13, 457, 457, 457, 457, 457, 457, |
| |
| 460, 460, 460, 460, 460, 460, 460, 460, 0, 0, |
| 0, 0, 460, 460, 460, 460, 460, 474, 0, 0, |
| 0, 474, 0, 474, 474, 0, 0, 474, 0, 0, |
| 0, 460, 460, 460, 460, 460, 460, 0, 476, 474, |
| 474, 474, 476, 0, 476, 476, 0, 0, 476, 480, |
| 480, 480, 480, 480, 480, 480, 480, 0, 0, 0, |
| 476, 476, 476, 477, 0, 477, 477, 477, 477, 477, |
| 477, 477, 477, 0, 0, 0, 0, 482, 480, 482, |
| 482, 482, 482, 482, 482, 482, 482, 501, 501, 501, |
| 501, 501, 501, 501, 477, 478, 0, 478, 478, 478, |
| |
| 478, 478, 478, 478, 478, 483, 0, 483, 483, 483, |
| 483, 483, 483, 483, 483, 484, 0, 484, 484, 484, |
| 484, 484, 484, 484, 484, 0, 478, 479, 0, 479, |
| 479, 479, 479, 479, 479, 479, 479, 489, 489, 489, |
| 489, 489, 489, 489, 489, 495, 495, 495, 495, 495, |
| 495, 495, 495, 0, 0, 0, 0, 0, 479, 491, |
| 0, 491, 491, 491, 491, 491, 491, 491, 491, 491, |
| 494, 0, 494, 494, 494, 494, 494, 494, 494, 494, |
| 0, 0, 0, 0, 494, 494, 494, 494, 494, 497, |
| 0, 497, 497, 497, 497, 497, 497, 497, 497, 0, |
| |
| 0, 0, 0, 494, 494, 494, 494, 494, 494, 499, |
| 499, 499, 499, 499, 499, 499, 499, 499, 500, 500, |
| 500, 500, 500, 500, 500, 500, 500, 507, 507, 507, |
| 507, 507, 507, 507, 507, 0, 511, 0, 511, 511, |
| 511, 511, 511, 511, 512, 512, 512, 512, 512, 512, |
| 512, 512, 0, 0, 0, 0, 507, 509, 0, 509, |
| 509, 509, 509, 509, 509, 509, 509, 511, 514, 0, |
| 514, 514, 514, 514, 514, 514, 514, 514, 515, 0, |
| 515, 515, 515, 515, 515, 515, 515, 515, 509, 510, |
| 0, 510, 510, 510, 510, 510, 510, 510, 510, 516, |
| |
| 0, 516, 516, 516, 516, 516, 516, 522, 0, 522, |
| 522, 522, 522, 522, 522, 522, 522, 0, 0, 0, |
| 510, 526, 0, 526, 526, 526, 526, 526, 526, 526, |
| 526, 529, 529, 529, 529, 529, 529, 529, 529, 530, |
| 530, 530, 530, 530, 530, 530, 530, 0, 0, 0, |
| 0, 0, 526, 527, 0, 527, 527, 527, 527, 527, |
| 527, 527, 527, 531, 531, 531, 531, 531, 531, 531, |
| 531, 536, 536, 536, 536, 536, 536, 536, 536, 0, |
| 0, 0, 0, 0, 527, 528, 0, 528, 528, 528, |
| 528, 528, 528, 528, 528, 0, 0, 0, 0, 540, |
| |
| 536, 540, 540, 540, 540, 540, 540, 542, 542, 542, |
| 542, 542, 542, 542, 542, 0, 528, 538, 0, 538, |
| 538, 538, 538, 538, 538, 538, 538, 0, 0, 0, |
| 540, 543, 543, 543, 543, 543, 543, 543, 543, 548, |
| 548, 548, 548, 548, 548, 548, 548, 0, 538, 539, |
| 0, 539, 539, 539, 539, 539, 539, 539, 539, 549, |
| 549, 549, 549, 549, 549, 549, 549, 0, 548, 550, |
| 550, 550, 550, 550, 550, 550, 550, 0, 0, 0, |
| 539, 553, 553, 553, 553, 553, 553, 0, 549, 552, |
| 552, 552, 552, 552, 552, 552, 552, 0, 550, 0, |
| |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 553, 0, 0, 0, 0, 0, 0, 0, 552, 555, |
| 555, 555, 555, 555, 555, 555, 555, 555, 555, 555, |
| 555, 555, 555, 556, 556, 556, 556, 556, 556, 556, |
| 556, 556, 556, 556, 556, 556, 556, 557, 557, 557, |
| 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, |
| 557, 558, 558, 558, 558, 558, 558, 558, 558, 558, |
| 558, 558, 558, 558, 558, 559, 0, 0, 0, 559, |
| 0, 559, 559, 559, 0, 0, 559, 559, 559, 560, |
| 560, 0, 560, 560, 560, 560, 560, 560, 560, 560, |
| |
| 560, 560, 560, 561, 561, 561, 561, 561, 561, 561, |
| 561, 561, 561, 561, 561, 561, 561, 562, 0, 0, |
| 0, 562, 0, 562, 562, 562, 562, 0, 562, 562, |
| 562, 563, 0, 0, 0, 563, 0, 563, 563, 563, |
| 0, 0, 563, 563, 563, 564, 0, 0, 564, 564, |
| 564, 564, 564, 564, 0, 0, 564, 564, 564, 565, |
| 565, 0, 0, 0, 565, 566, 0, 0, 566, 566, |
| 566, 566, 566, 566, 0, 0, 566, 566, 566, 567, |
| 0, 0, 567, 567, 567, 567, 567, 567, 0, 567, |
| 0, 567, 567, 569, 0, 0, 569, 0, 569, 569, |
| |
| 569, 569, 569, 0, 569, 569, 569, 570, 570, 570, |
| 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, |
| 570, 571, 571, 0, 571, 0, 571, 571, 571, 571, |
| 571, 571, 571, 571, 571, 572, 572, 0, 572, 572, |
| 572, 572, 572, 572, 572, 572, 572, 572, 572, 573, |
| 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, |
| 573, 573, 573, 574, 574, 0, 574, 574, 574, 574, |
| 574, 574, 574, 574, 574, 574, 574, 575, 0, 0, |
| 0, 575, 0, 575, 575, 575, 0, 0, 575, 575, |
| 575, 576, 0, 0, 576, 576, 576, 576, 576, 576, |
| |
| 0, 0, 576, 576, 576, 577, 577, 0, 0, 0, |
| 577, 578, 578, 578, 0, 0, 0, 578, 579, 0, |
| 0, 579, 579, 579, 579, 579, 579, 0, 0, 579, |
| 579, 579, 580, 580, 580, 580, 580, 580, 580, 580, |
| 580, 580, 580, 580, 580, 580, 581, 581, 0, 0, |
| 0, 581, 582, 582, 582, 0, 0, 0, 582, 583, |
| 583, 0, 0, 0, 583, 584, 584, 0, 0, 0, |
| 584, 585, 585, 0, 0, 0, 585, 586, 586, 586, |
| 0, 0, 0, 586, 587, 587, 0, 0, 0, 587, |
| 588, 588, 0, 0, 0, 588, 589, 589, 0, 0, |
| |
| 0, 589, 590, 590, 590, 0, 0, 0, 590, 591, |
| 591, 591, 591, 0, 0, 0, 591, 592, 592, 0, |
| 0, 0, 592, 593, 593, 0, 0, 0, 593, 594, |
| 594, 0, 0, 0, 594, 595, 595, 595, 0, 0, |
| 0, 595, 596, 596, 596, 596, 0, 0, 0, 596, |
| 597, 597, 0, 0, 0, 597, 598, 598, 0, 0, |
| 0, 598, 599, 599, 599, 0, 0, 0, 599, 600, |
| 600, 600, 600, 0, 0, 0, 600, 601, 601, 0, |
| 0, 0, 601, 602, 0, 602, 602, 0, 0, 0, |
| 602, 603, 603, 603, 0, 0, 0, 603, 604, 604, |
| |
| 604, 604, 0, 0, 0, 604, 605, 605, 0, 0, |
| 0, 605, 606, 0, 606, 606, 0, 0, 0, 606, |
| 607, 607, 607, 0, 0, 0, 607, 608, 608, 608, |
| 0, 0, 0, 0, 608, 609, 0, 0, 609, 609, |
| 0, 609, 609, 609, 0, 0, 609, 609, 609, 610, |
| 0, 0, 610, 610, 0, 610, 610, 610, 0, 0, |
| 610, 610, 610, 611, 611, 0, 0, 0, 611, 612, |
| 0, 612, 612, 0, 0, 0, 612, 613, 613, 0, |
| 0, 0, 0, 613, 614, 614, 614, 614, 614, 614, |
| 614, 614, 614, 614, 614, 614, 614, 614, 615, 615, |
| |
| 0, 0, 0, 615, 616, 0, 616, 616, 0, 0, |
| 0, 616, 617, 617, 0, 0, 0, 617, 618, 0, |
| 618, 0, 0, 0, 0, 618, 620, 620, 620, 620, |
| 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, |
| 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, |
| 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, |
| 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, |
| 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, |
| 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, |
| 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, |
| |
| 554, 554, 554 |
| } ; |
| |
| static yy_state_type yy_last_accepting_state; |
| static char *yy_last_accepting_cpos; |
| |
| /* 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 "toke.l" |
| #define INITIAL 0 |
| #line 2 "toke.l" |
| /* |
| * Copyright (c) 1996, 1998-2005, 2007-2010 |
| * Todd C. Miller <Todd.Miller@courtesan.com> |
| * |
| * Permission to use, copy, modify, and distribute this software for any |
| * purpose with or without fee is hereby granted, provided that the above |
| * copyright notice and this permission notice appear in all copies. |
| * |
| * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
| * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
| * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
| * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
| * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
| * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
| * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR |
| * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF |
| * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| * |
| * Sponsored in part by the Defense Advanced Research Projects |
| * Agency (DARPA) and Air Force Research Laboratory, Air Force |
| * Materiel Command, USAF, under agreement number F39502-99-1-0512. |
| */ |
| |
| #include <config.h> |
| |
| #include <sys/types.h> |
| #include <sys/param.h> |
| #include <sys/stat.h> |
| #include <stdio.h> |
| #ifdef STDC_HEADERS |
| # include <stdlib.h> |
| # include <stddef.h> |
| #else |
| # ifdef HAVE_STDLIB_H |
| # include <stdlib.h> |
| # endif |
| #endif /* STDC_HEADERS */ |
| #ifdef HAVE_STRING_H |
| # include <string.h> |
| #endif /* HAVE_STRING_H */ |
| #ifdef HAVE_STRINGS_H |
| # include <strings.h> |
| #endif /* HAVE_STRINGS_H */ |
| #ifdef HAVE_UNISTD_H |
| # include <unistd.h> |
| #endif /* HAVE_UNISTD_H */ |
| #if defined(HAVE_MALLOC_H) && !defined(STDC_HEADERS) |
| # include <malloc.h> |
| #endif /* HAVE_MALLOC_H && !STDC_HEADERS */ |
| #ifdef HAVE_DIRENT_H |
| # include <dirent.h> |
| # define NAMLEN(dirent) strlen((dirent)->d_name) |
| #else |
| # define dirent direct |
| # define NAMLEN(dirent) (dirent)->d_namlen |
| # ifdef HAVE_SYS_NDIR_H |
| # include <sys/ndir.h> |
| # endif |
| # ifdef HAVE_SYS_DIR_H |
| # include <sys/dir.h> |
| # endif |
| # ifdef HAVE_NDIR_H |
| # include <ndir.h> |
| # endif |
| #endif |
| #include <ctype.h> |
| #include "sudo.h" |
| #include "parse.h" |
| #include <gram.h> |
| |
| extern YYSTYPE yylval; |
| extern int parse_error; |
| int sudolineno = 1; |
| char *sudoers; |
| static int sawspace = 0; |
| static int arg_len = 0; |
| static int arg_size = 0; |
| |
| static int append __P((char *, int)); |
| static int _fill __P((char *, int, int)); |
| static int fill_cmnd __P((char *, int)); |
| static int fill_args __P((char *, int, int)); |
| static int _push_include __P((char *, int)); |
| static int pop_include __P((void)); |
| static int ipv6_valid __P((const char *s)); |
| static char *parse_include __P((char *)); |
| extern void yyerror __P((const char *)); |
| |
| #define fill(a, b) _fill(a, b, 0) |
| |
| #define push_include(_p) (_push_include((_p), FALSE)) |
| #define push_includedir(_p) (_push_include((_p), TRUE)) |
| |
| /* realloc() to size + COMMANDARGINC to make room for command args */ |
| #define COMMANDARGINC 64 |
| |
| #ifdef TRACELEXER |
| #define LEXTRACE(msg) fputs(msg, stderr) |
| #else |
| #define LEXTRACE(msg) |
| #endif |
| #define YY_NO_UNPUT 1 |
| #define GOTDEFS 1 |
| |
| #define GOTCMND 2 |
| |
| #define STARTDEFS 3 |
| |
| #define INDEFS 4 |
| |
| #define INSTR 5 |
| |
| #line 1475 "lex.yy.c" |
| |
| /* Macros after this point can all be overridden by user definitions in |
| * section 1. |
| */ |
| |
| #ifndef YY_SKIP_YYWRAP |
| #ifdef __cplusplus |
| extern "C" int yywrap YY_PROTO(( void )); |
| #else |
| extern int yywrap YY_PROTO(( void )); |
| #endif |
| #endif |
| |
| #ifndef YY_NO_UNPUT |
| static void yyunput YY_PROTO(( int c, char *buf_ptr )); |
| #endif |
| |
| #ifndef yytext_ptr |
| static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); |
| #endif |
| |
| #ifdef YY_NEED_STRLEN |
| static int yy_flex_strlen YY_PROTO(( yyconst char * )); |
| #endif |
| |
| #ifndef YY_NO_INPUT |
| #ifdef __cplusplus |
| static int yyinput YY_PROTO(( void )); |
| #else |
| static int input YY_PROTO(( void )); |
| #endif |
| #endif |
| |
| #if defined(YY_STACK_USED) && YY_STACK_USED |
| static int yy_start_stack_ptr = 0; |
| static int yy_start_stack_depth = 0; |
| static int *yy_start_stack = 0; |
| #ifndef YY_NO_PUSH_STATE |
| static void yy_push_state YY_PROTO(( int new_state )); |
| #endif |
| #ifndef YY_NO_POP_STATE |
| static void yy_pop_state YY_PROTO(( void )); |
| #endif |
| #ifndef YY_NO_TOP_STATE |
| static int yy_top_state YY_PROTO(( void )); |
| #endif |
| |
| #else |
| #define YY_NO_PUSH_STATE 1 |
| #define YY_NO_POP_STATE 1 |
| #define YY_NO_TOP_STATE 1 |
| #endif |
| |
| #ifdef YY_MALLOC_DECL |
| YY_MALLOC_DECL |
| #else |
| #ifdef __STDC__ |
| #ifndef __cplusplus |
| #include <stdlib.h> |
| #endif |
| #else |
| /* Just try to get by without declaring the routines. This will fail |
| * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) |
| * or sizeof(void*) != sizeof(int). |
| */ |
| #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->yy_is_interactive ) \ |
| { \ |
| int c = '*', 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 if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ |
| && ferror( yyin ) ) \ |
| YY_FATAL_ERROR( "input in flex scanner failed" ); |
| #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 |
| |
| /* Default declaration of generated scanner - a define so the user can |
| * easily add parameters. |
| */ |
| #ifndef YY_DECL |
| #define YY_DECL int yylex YY_PROTO(( void )) |
| #endif |
| |
| /* 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->yy_at_bol = \ |
| (yytext[yyleng - 1] == '\n'); \ |
| YY_USER_ACTION |
| |
| YY_DECL |
| { |
| register yy_state_type yy_current_state; |
| register char *yy_cp, *yy_bp; |
| register int yy_act; |
| |
| #line 127 "toke.l" |
| |
| #line 1631 "lex.yy.c" |
| |
| if ( yy_init ) |
| { |
| yy_init = 0; |
| |
| #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 ) |
| yy_current_buffer = |
| 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 >= 555 ) |
| 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] != 3541 ); |
| |
| 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 128 "toke.l" |
| BEGIN STARTDEFS; |
| YY_BREAK |
| case 2: |
| YY_RULE_SETUP |
| #line 130 "toke.l" |
| { |
| BEGIN INDEFS; |
| LEXTRACE("DEFVAR "); |
| if (!fill(yytext, yyleng)) |
| yyterminate(); |
| return(DEFVAR); |
| } |
| YY_BREAK |
| |
| case 3: |
| YY_RULE_SETUP |
| #line 139 "toke.l" |
| { |
| BEGIN STARTDEFS; |
| LEXTRACE(", "); |
| return(','); |
| } /* return ',' */ |
| YY_BREAK |
| case 4: |
| YY_RULE_SETUP |
| #line 145 "toke.l" |
| { |
| LEXTRACE("= "); |
| return('='); |
| } /* return '=' */ |
| YY_BREAK |
| case 5: |
| YY_RULE_SETUP |
| #line 150 "toke.l" |
| { |
| LEXTRACE("+= "); |
| return('+'); |
| } /* return '+' */ |
| YY_BREAK |
| case 6: |
| YY_RULE_SETUP |
| #line 155 "toke.l" |
| { |
| LEXTRACE("-= "); |
| return('-'); |
| } /* return '-' */ |
| YY_BREAK |
| case 7: |
| YY_RULE_SETUP |
| #line 160 "toke.l" |
| { |
| LEXTRACE("BEGINSTR "); |
| yylval.string = NULL; |
| BEGIN INSTR; |
| } |
| YY_BREAK |
| case 8: |
| YY_RULE_SETUP |
| #line 166 "toke.l" |
| { |
| LEXTRACE("WORD(2) "); |
| if (!fill(yytext, yyleng)) |
| yyterminate(); |
| return(WORD); |
| } |
| YY_BREAK |
| |
| |
| case 9: |
| YY_RULE_SETUP |
| #line 175 "toke.l" |
| { |
| /* Line continuation char followed by newline. */ |
| ++sudolineno; |
| LEXTRACE("\n"); |
| } |
| YY_BREAK |
| case 10: |
| YY_RULE_SETUP |
| #line 181 "toke.l" |
| { |
| LEXTRACE("ENDSTR "); |
| BEGIN INDEFS; |
| return(WORD); |
| } |
| YY_BREAK |
| case 11: |
| YY_RULE_SETUP |
| #line 187 "toke.l" |
| { |
| LEXTRACE("BACKSLASH "); |
| if (!append(yytext, yyleng)) |
| yyterminate(); |
| } |
| YY_BREAK |
| case 12: |
| YY_RULE_SETUP |
| #line 193 "toke.l" |
| { |
| LEXTRACE("STRBODY "); |
| if (!append(yytext, yyleng)) |
| yyterminate(); |
| } |
| YY_BREAK |
| |
| |
| case 13: |
| YY_RULE_SETUP |
| #line 201 "toke.l" |
| { |
| /* quoted fnmatch glob char, pass verbatim */ |
| LEXTRACE("QUOTEDCHAR "); |
| if (!fill_args(yytext, 2, sawspace)) |
| yyterminate(); |
| sawspace = FALSE; |
| } |
| YY_BREAK |
| case 14: |
| YY_RULE_SETUP |
| #line 209 "toke.l" |
| { |
| /* quoted sudoers special char, strip backslash */ |
| LEXTRACE("QUOTEDCHAR "); |
| if (!fill_args(yytext + 1, 1, sawspace)) |
| yyterminate(); |
| sawspace = FALSE; |
| } |
| YY_BREAK |
| case 15: |
| YY_RULE_SETUP |
| #line 217 "toke.l" |
| { |
| BEGIN INITIAL; |
| yyless(0); |
| return(COMMAND); |
| } /* end of command line args */ |
| YY_BREAK |
| case 16: |
| YY_RULE_SETUP |
| #line 223 "toke.l" |
| { |
| LEXTRACE("ARG "); |
| if (!fill_args(yytext, yyleng, sawspace)) |
| yyterminate(); |
| sawspace = FALSE; |
| } /* a command line arg */ |
| YY_BREAK |
| |
| case 17: |
| YY_RULE_SETUP |
| #line 231 "toke.l" |
| { |
| char *path; |
| |
| if ((path = parse_include(yytext)) == NULL) |
| yyterminate(); |
| |
| LEXTRACE("INCLUDE\n"); |
| |
| /* Push current buffer and switch to include file */ |
| if (!push_include(path)) |
| yyterminate(); |
| } |
| YY_BREAK |
| case 18: |
| YY_RULE_SETUP |
| #line 244 "toke.l" |
| { |
| char *path; |
| |
| if ((path = parse_include(yytext)) == NULL) |
| yyterminate(); |
| |
| LEXTRACE("INCLUDEDIR\n"); |
| |
| /* |
| * Push current buffer and switch to include file. |
| * We simply ignore empty directories. |
| */ |
| if (!push_includedir(path) && parse_error) |
| yyterminate(); |
| } |
| YY_BREAK |
| case 19: |
| YY_RULE_SETUP |
| #line 260 "toke.l" |
| { |
| int n; |
| for (n = 0; isblank((unsigned char)yytext[n]); n++) |
| continue; |
| n += 8; |
| BEGIN GOTDEFS; |
| switch (yytext[n++]) { |
| case ':': |
| yyless(n); |
| LEXTRACE("DEFAULTS_USER "); |
| return(DEFAULTS_USER); |
| case '>': |
| yyless(n); |
| LEXTRACE("DEFAULTS_RUNAS "); |
| return(DEFAULTS_RUNAS); |
| case '@': |
| yyless(n); |
| LEXTRACE("DEFAULTS_HOST "); |
| return(DEFAULTS_HOST); |
| case '!': |
| yyless(n); |
| LEXTRACE("DEFAULTS_CMND "); |
| return(DEFAULTS_CMND); |
| default: |
| LEXTRACE("DEFAULTS "); |
| return(DEFAULTS); |
| } |
| } |
| YY_BREAK |
| case 20: |
| YY_RULE_SETUP |
| #line 289 "toke.l" |
| { |
| int n; |
| for (n = 0; isblank((unsigned char)yytext[n]); n++) |
| continue; |
| switch (yytext[n]) { |
| case 'H': |
| LEXTRACE("HOSTALIAS "); |
| return(HOSTALIAS); |
| case 'C': |
| LEXTRACE("CMNDALIAS "); |
| return(CMNDALIAS); |
| case 'U': |
| LEXTRACE("USERALIAS "); |
| return(USERALIAS); |
| case 'R': |
| LEXTRACE("RUNASALIAS "); |
| return(RUNASALIAS); |
| } |
| } |
| YY_BREAK |
| case 21: |
| YY_RULE_SETUP |
| #line 309 "toke.l" |
| { |
| /* cmnd does not require passwd for this user */ |
| LEXTRACE("NOPASSWD "); |
| return(NOPASSWD); |
| } |
| YY_BREAK |
| case 22: |
| YY_RULE_SETUP |
| #line 315 "toke.l" |
| { |
| /* cmnd requires passwd for this user */ |
| LEXTRACE("PASSWD "); |
| return(PASSWD); |
| } |
| YY_BREAK |
| case 23: |
| YY_RULE_SETUP |
| #line 321 "toke.l" |
| { |
| LEXTRACE("NOEXEC "); |
| return(NOEXEC); |
| } |
| YY_BREAK |
| case 24: |
| YY_RULE_SETUP |
| #line 326 "toke.l" |
| { |
| LEXTRACE("EXEC "); |
| return(EXEC); |
| } |
| YY_BREAK |
| case 25: |
| YY_RULE_SETUP |
| #line 331 "toke.l" |
| { |
| LEXTRACE("SETENV "); |
| return(SETENV); |
| } |
| YY_BREAK |
| case 26: |
| YY_RULE_SETUP |
| #line 336 "toke.l" |
| { |
| LEXTRACE("NOSETENV "); |
| return(NOSETENV); |
| } |
| YY_BREAK |
| case 27: |
| YY_RULE_SETUP |
| #line 341 "toke.l" |
| { |
| /* netgroup */ |
| if (!fill(yytext, yyleng)) |
| yyterminate(); |
| LEXTRACE("NETGROUP "); |
| return(NETGROUP); |
| } |
| YY_BREAK |
| case 28: |
| YY_RULE_SETUP |
| #line 349 "toke.l" |
| { |
| /* UN*X group */ |
| if (!fill(yytext, yyleng)) |
| yyterminate(); |
| LEXTRACE("USERGROUP "); |
| return(USERGROUP); |
| } |
| YY_BREAK |
| case 29: |
| YY_RULE_SETUP |
| #line 357 "toke.l" |
| { |
| if (!fill(yytext, yyleng)) |
| yyterminate(); |
| LEXTRACE("NTWKADDR "); |
| return(NTWKADDR); |
| } |
| YY_BREAK |
| case 30: |
| YY_RULE_SETUP |
| #line 364 "toke.l" |
| { |
| if (!fill(yytext, yyleng)) |
| yyterminate(); |
| LEXTRACE("NTWKADDR "); |
| return(NTWKADDR); |
| } |
| YY_BREAK |
| case 31: |
| YY_RULE_SETUP |
| #line 371 "toke.l" |
| { |
| if (!ipv6_valid(yytext)) { |
| LEXTRACE("ERROR "); |
| return(ERROR); |
| } |
| if (!fill(yytext, yyleng)) |
| yyterminate(); |
| LEXTRACE("NTWKADDR "); |
| return(NTWKADDR); |
| } |
| YY_BREAK |
| case 32: |
| YY_RULE_SETUP |
| #line 382 "toke.l" |
| { |
| if (!ipv6_valid(yytext)) { |
| LEXTRACE("ERROR "); |
| return(ERROR); |
| } |
| if (!fill(yytext, yyleng)) |
| yyterminate(); |
| LEXTRACE("NTWKADDR "); |
| return(NTWKADDR); |
| } |
| YY_BREAK |
| case 33: |
| YY_RULE_SETUP |
| #line 393 "toke.l" |
| { |
| if (strcmp(yytext, "ALL") == 0) { |
| LEXTRACE("ALL "); |
| return(ALL); |
| } |
| #ifdef HAVE_SELINUX |
| /* XXX - restrict type/role to initial state */ |
| if (strcmp(yytext, "TYPE") == 0) { |
| LEXTRACE("TYPE "); |
| return(TYPE); |
| } |
| if (strcmp(yytext, "ROLE") == 0) { |
| LEXTRACE("ROLE "); |
| return(ROLE); |
| } |
| #endif /* HAVE_SELINUX */ |
| if (!fill(yytext, yyleng)) |
| yyterminate(); |
| LEXTRACE("ALIAS "); |
| return(ALIAS); |
| } |
| YY_BREAK |
| case 34: |
| YY_RULE_SETUP |
| #line 415 "toke.l" |
| { |
| /* no command args allowed for Defaults!/path */ |
| if (!fill_cmnd(yytext, yyleng)) |
| yyterminate(); |
| LEXTRACE("COMMAND "); |
| return(COMMAND); |
| } |
| YY_BREAK |
| case 35: |
| YY_RULE_SETUP |
| #line 423 "toke.l" |
| { |
| BEGIN GOTCMND; |
| LEXTRACE("COMMAND "); |
| if (!fill_cmnd(yytext, yyleng)) |
| yyterminate(); |
| } /* sudo -e */ |
| YY_BREAK |
| case 36: |
| YY_RULE_SETUP |
| #line 430 "toke.l" |
| { |
| /* directories can't have args... */ |
| if (yytext[yyleng - 1] == '/') { |
| LEXTRACE("COMMAND "); |
| if (!fill_cmnd(yytext, yyleng)) |
| yyterminate(); |
| return(COMMAND); |
| } else { |
| BEGIN GOTCMND; |
| LEXTRACE("COMMAND "); |
| if (!fill_cmnd(yytext, yyleng)) |
| yyterminate(); |
| } |
| } /* a pathname */ |
| YY_BREAK |
| case 37: |
| YY_RULE_SETUP |
| #line 445 "toke.l" |
| { |
| /* a quoted user/group name */ |
| if (!fill(yytext + 1, yyleng - 2)) |
| yyterminate(); |
| switch (yytext[1]) { |
| case '%': |
| LEXTRACE("USERGROUP "); |
| return(USERGROUP); |
| case '+': |
| LEXTRACE("NETGROUP "); |
| return(NETGROUP); |
| default: |
| LEXTRACE("WORD(4) "); |
| return(WORD); |
| } |
| } |
| YY_BREAK |
| case 38: |
| YY_RULE_SETUP |
| #line 462 "toke.l" |
| { |
| /* a word */ |
| if (!fill(yytext, yyleng)) |
| yyterminate(); |
| LEXTRACE("WORD(5) "); |
| return(WORD); |
| } |
| YY_BREAK |
| case 39: |
| YY_RULE_SETUP |
| #line 470 "toke.l" |
| { |
| LEXTRACE("( "); |
| return ('('); |
| } |
| YY_BREAK |
| case 40: |
| YY_RULE_SETUP |
| #line 475 "toke.l" |
| { |
| LEXTRACE(") "); |
| return(')'); |
| } |
| YY_BREAK |
| case 41: |
| YY_RULE_SETUP |
| #line 480 "toke.l" |
| { |
| LEXTRACE(", "); |
| return(','); |
| } /* return ',' */ |
| YY_BREAK |
| case 42: |
| YY_RULE_SETUP |
| #line 485 "toke.l" |
| { |
| LEXTRACE("= "); |
| return('='); |
| } /* return '=' */ |
| YY_BREAK |
| case 43: |
| YY_RULE_SETUP |
| #line 490 "toke.l" |
| { |
| LEXTRACE(": "); |
| return(':'); |
| } /* return ':' */ |
| YY_BREAK |
| case 44: |
| YY_RULE_SETUP |
| #line 495 "toke.l" |
| { |
| if (yyleng % 2 == 1) |
| return('!'); /* return '!' */ |
| } |
| YY_BREAK |
| case 45: |
| YY_RULE_SETUP |
| #line 500 "toke.l" |
| { |
| BEGIN INITIAL; |
| ++sudolineno; |
| LEXTRACE("\n"); |
| return(COMMENT); |
| } /* return newline */ |
| YY_BREAK |
| case 46: |
| YY_RULE_SETUP |
| #line 507 "toke.l" |
| { /* throw away space/tabs */ |
| sawspace = TRUE; /* but remember for fill_args */ |
| } |
| YY_BREAK |
| case 47: |
| YY_RULE_SETUP |
| #line 511 "toke.l" |
| { |
| sawspace = TRUE; /* remember for fill_args */ |
| ++sudolineno; |
| LEXTRACE("\n\t"); |
| } /* throw away EOL after \ */ |
| YY_BREAK |
| case 48: |
| YY_RULE_SETUP |
| #line 517 "toke.l" |
| { |
| BEGIN INITIAL; |
| ++sudolineno; |
| LEXTRACE("\n"); |
| return(COMMENT); |
| } /* comment, not uid/gid */ |
| YY_BREAK |
| case 49: |
| YY_RULE_SETUP |
| #line 524 "toke.l" |
| { |
| LEXTRACE("ERROR "); |
| return(ERROR); |
| } /* parse error */ |
| YY_BREAK |
| case YY_STATE_EOF(INITIAL): |
| case YY_STATE_EOF(GOTDEFS): |
| case YY_STATE_EOF(GOTCMND): |
| case YY_STATE_EOF(STARTDEFS): |
| case YY_STATE_EOF(INDEFS): |
| case YY_STATE_EOF(INSTR): |
| #line 529 "toke.l" |
| { |
| if (YY_START != INITIAL) { |
| BEGIN INITIAL; |
| LEXTRACE("ERROR "); |
| return(ERROR); |
| } |
| if (!pop_include()) |
| yyterminate(); |
| } |
| YY_BREAK |
| case 50: |
| YY_RULE_SETUP |
| #line 539 "toke.l" |
| ECHO; |
| YY_BREAK |
| #line 2285 "lex.yy.c" |
| |
| 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->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->yy_n_chars; |
| yy_current_buffer->yy_input_file = yyin; |
| yy_current_buffer->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->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->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() |
| { |
| register char *dest = yy_current_buffer->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->yy_ch_buf[yy_n_chars + 1] ) |
| YY_FATAL_ERROR( |
| "fatal flex scanner internal error--end of buffer missed" ); |
| |
| if ( yy_current_buffer->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->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->yy_n_chars = yy_n_chars = 0; |
| |
| else |
| { |
| int num_to_read = |
| yy_current_buffer->yy_buf_size - number_to_move - 1; |
| |
| while ( num_to_read <= 0 ) |
| { /* Not enough room in the buffer - grow it. */ |
| #ifdef YY_USES_REJECT |
| YY_FATAL_ERROR( |
| "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); |
| #else |
| |
| /* 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. */ |
| yy_flex_realloc( (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->yy_buf_size - |
| number_to_move - 1; |
| #endif |
| } |
| |
| if ( num_to_read > YY_READ_BUF_SIZE ) |
| num_to_read = YY_READ_BUF_SIZE; |
| |
| /* Read in more data. */ |
| YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), |
| yy_n_chars, num_to_read ); |
| |
| yy_current_buffer->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->yy_buffer_status = |
| YY_BUFFER_EOF_PENDING; |
| } |
| } |
| |
| else |
| ret_val = EOB_ACT_CONTINUE_SCAN; |
| |
| yy_n_chars += number_to_move; |
| yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; |
| yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; |
| |
| yytext_ptr = &yy_current_buffer->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() |
| { |
| 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 >= 555 ) |
| 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 ); |
| */ |
| |
| #ifdef YY_USE_PROTOS |
| static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) |
| #else |
| static yy_state_type yy_try_NUL_trans( yy_current_state ) |
| yy_state_type yy_current_state; |
| #endif |
| { |
| 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 >= 555 ) |
| 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 == 554); |
| |
| return yy_is_jam ? 0 : yy_current_state; |
| } |
| |
| |
| #ifndef YY_NO_UNPUT |
| #ifdef YY_USE_PROTOS |
| static void yyunput( int c, register char *yy_bp ) |
| #else |
| static void yyunput( c, yy_bp ) |
| int c; |
| register char *yy_bp; |
| #endif |
| { |
| register char *yy_cp = yy_c_buf_p; |
| |
| /* undo effects of setting up yytext */ |
| *yy_cp = yy_hold_char; |
| |
| if ( yy_cp < yy_current_buffer->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->yy_ch_buf[ |
| yy_current_buffer->yy_buf_size + 2]; |
| register char *source = |
| &yy_current_buffer->yy_ch_buf[number_to_move]; |
| |
| while ( source > yy_current_buffer->yy_ch_buf ) |
| *--dest = *--source; |
| |
| yy_cp += (int) (dest - source); |
| yy_bp += (int) (dest - source); |
| yy_current_buffer->yy_n_chars = |
| yy_n_chars = yy_current_buffer->yy_buf_size; |
| |
| if ( yy_cp < yy_current_buffer->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; |
| } |
| #endif /* ifndef YY_NO_UNPUT */ |
| |
| |
| #ifdef __cplusplus |
| static int yyinput() |
| #else |
| static int input() |
| #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->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 ); |
| |
| /* fall through */ |
| |
| 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->yy_at_bol = (c == '\n'); |
| |
| return c; |
| } |
| |
| |
| #ifdef YY_USE_PROTOS |
| void yyrestart( FILE *input_file ) |
| #else |
| void yyrestart( input_file ) |
| FILE *input_file; |
| #endif |
| { |
| if ( ! yy_current_buffer ) |
| yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); |
| |
| yy_init_buffer( yy_current_buffer, input_file ); |
| yy_load_buffer_state(); |
| } |
| |
| |
| #ifdef YY_USE_PROTOS |
| void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) |
| #else |
| void yy_switch_to_buffer( new_buffer ) |
| YY_BUFFER_STATE new_buffer; |
| #endif |
| { |
| 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->yy_buf_pos = yy_c_buf_p; |
| yy_current_buffer->yy_n_chars = yy_n_chars; |
| } |
| |
| yy_current_buffer = 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; |
| } |
| |
| |
| #ifdef YY_USE_PROTOS |
| void yy_load_buffer_state( void ) |
| #else |
| void yy_load_buffer_state() |
| #endif |
| { |
| yy_n_chars = yy_current_buffer->yy_n_chars; |
| yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; |
| yyin = yy_current_buffer->yy_input_file; |
| yy_hold_char = *yy_c_buf_p; |
| } |
| |
| |
| #ifdef YY_USE_PROTOS |
| YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) |
| #else |
| YY_BUFFER_STATE yy_create_buffer( file, size ) |
| FILE *file; |
| int size; |
| #endif |
| { |
| YY_BUFFER_STATE b; |
| |
| b = (YY_BUFFER_STATE) yy_flex_alloc( 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 *) yy_flex_alloc( 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; |
| } |
| |
| |
| #ifdef YY_USE_PROTOS |
| void yy_delete_buffer( YY_BUFFER_STATE b ) |
| #else |
| void yy_delete_buffer( b ) |
| YY_BUFFER_STATE b; |
| #endif |
| { |
| if ( ! b ) |
| return; |
| |
| if ( b == yy_current_buffer ) |
| yy_current_buffer = (YY_BUFFER_STATE) 0; |
| |
| if ( b->yy_is_our_buffer ) |
| yy_flex_free( (void *) b->yy_ch_buf ); |
| |
| yy_flex_free( (void *) b ); |
| } |
| |
| |
| #ifndef YY_ALWAYS_INTERACTIVE |
| #ifndef YY_NEVER_INTERACTIVE |
| #include <unistd.h> |
| #endif |
| #endif |
| |
| #ifdef YY_USE_PROTOS |
| void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) |
| #else |
| void yy_init_buffer( b, file ) |
| YY_BUFFER_STATE b; |
| FILE *file; |
| #endif |
| |
| |
| { |
| int oerrno = errno; |
| |
| yy_flush_buffer( b ); |
| |
| b->yy_input_file = file; |
| b->yy_fill_buffer = 1; |
| |
| #if defined(YY_ALWAYS_INTERACTIVE) && YY_ALWAYS_INTERACTIVE |
| b->yy_is_interactive = 1; |
| #else |
| #if defined(YY_NEVER_INTERACTIVE) && YY_NEVER_INTERACTIVE |
| b->yy_is_interactive = 0; |
| #else |
| b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; |
| #endif |
| #endif |
| errno = oerrno; |
| } |
| |
| |
| #ifdef YY_USE_PROTOS |
| void yy_flush_buffer( YY_BUFFER_STATE b ) |
| #else |
| void yy_flush_buffer( b ) |
| YY_BUFFER_STATE b; |
| #endif |
| |
| { |
| 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(); |
| } |
| |
| |
| #ifndef YY_NO_SCAN_BUFFER |
| #ifdef YY_USE_PROTOS |
| YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) |
| #else |
| YY_BUFFER_STATE yy_scan_buffer( base, size ) |
| char *base; |
| yy_size_t size; |
| #endif |
| { |
| 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) yy_flex_alloc( 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; |
| } |
| #endif |
| |
| |
| #ifndef YY_NO_SCAN_STRING |
| #ifdef YY_USE_PROTOS |
| YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) |
| #else |
| YY_BUFFER_STATE yy_scan_string( yy_str ) |
| yyconst char *yy_str; |
| #endif |
| { |
| int len; |
| for ( len = 0; yy_str[len]; ++len ) |
| ; |
| |
| return yy_scan_bytes( yy_str, len ); |
| } |
| #endif |
| |
| |
| #ifndef YY_NO_SCAN_BYTES |
| #ifdef YY_USE_PROTOS |
| YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) |
| #else |
| YY_BUFFER_STATE yy_scan_bytes( bytes, len ) |
| yyconst char *bytes; |
| int len; |
| #endif |
| { |
| YY_BUFFER_STATE b; |
| char *buf; |
| yy_size_t n; |
| int i; |
| |
| /* Get memory for full buffer, including space for trailing EOB's. */ |
| n = len + 2; |
| buf = (char *) yy_flex_alloc( n ); |
| if ( ! buf ) |
| YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); |
| |
| for ( i = 0; i < len; ++i ) |
| buf[i] = bytes[i]; |
| |
| buf[len] = buf[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; |
| } |
| #endif |
| |
| |
| #ifndef YY_NO_PUSH_STATE |
| #ifdef YY_USE_PROTOS |
| static void yy_push_state( int new_state ) |
| #else |
| static void yy_push_state( new_state ) |
| int new_state; |
| #endif |
| { |
| if ( yy_start_stack_ptr >= yy_start_stack_depth ) |
| { |
| yy_size_t new_size; |
| |
| yy_start_stack_depth += YY_START_STACK_INCR; |
| new_size = yy_start_stack_depth * sizeof( int ); |
| |
| if ( ! yy_start_stack ) |
| yy_start_stack = (int *) yy_flex_alloc( new_size ); |
| |
| else |
| yy_start_stack = (int *) yy_flex_realloc( |
| (void *) yy_start_stack, new_size ); |
| |
| if ( ! yy_start_stack ) |
| YY_FATAL_ERROR( |
| "out of memory expanding start-condition stack" ); |
| } |
| |
| yy_start_stack[yy_start_stack_ptr++] = YY_START; |
| |
| BEGIN(new_state); |
| } |
| #endif |
| |
| |
| #ifndef YY_NO_POP_STATE |
| static void yy_pop_state() |
| { |
| if ( --yy_start_stack_ptr < 0 ) |
| YY_FATAL_ERROR( "start-condition stack underflow" ); |
| |
| BEGIN(yy_start_stack[yy_start_stack_ptr]); |
| } |
| #endif |
| |
| |
| #ifndef YY_NO_TOP_STATE |
| static int yy_top_state() |
| { |
| return yy_start_stack[yy_start_stack_ptr - 1]; |
| } |
| #endif |
| |
| #ifndef YY_EXIT_FAILURE |
| #define YY_EXIT_FAILURE 2 |
| #endif |
| |
| #ifdef YY_USE_PROTOS |
| static void yy_fatal_error( yyconst char msg[] ) |
| #else |
| static void yy_fatal_error( msg ) |
| char msg[]; |
| #endif |
| { |
| (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. */ \ |
| yytext[yyleng] = yy_hold_char; \ |
| yy_c_buf_p = yytext + n; \ |
| yy_hold_char = *yy_c_buf_p; \ |
| *yy_c_buf_p = '\0'; \ |
| yyleng = n; \ |
| } \ |
| while ( 0 ) |
| |
| |
| /* Internal utility routines. */ |
| |
| #ifndef yytext_ptr |
| #ifdef YY_USE_PROTOS |
| static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) |
| #else |
| static void yy_flex_strncpy( s1, s2, n ) |
| char *s1; |
| yyconst char *s2; |
| int n; |
| #endif |
| { |
| register int i; |
| for ( i = 0; i < n; ++i ) |
| s1[i] = s2[i]; |
| } |
| #endif |
| |
| #ifdef YY_NEED_STRLEN |
| #ifdef YY_USE_PROTOS |
| static int yy_flex_strlen( yyconst char *s ) |
| #else |
| static int yy_flex_strlen( s ) |
| yyconst char *s; |
| #endif |
| { |
| register int n; |
| for ( n = 0; s[n]; ++n ) |
| ; |
| |
| return n; |
| } |
| #endif |
| |
| |
| #ifdef YY_USE_PROTOS |
| static void *yy_flex_alloc( yy_size_t size ) |
| #else |
| static void *yy_flex_alloc( size ) |
| yy_size_t size; |
| #endif |
| { |
| return (void *) malloc( size ); |
| } |
| |
| #ifdef YY_USE_PROTOS |
| static void *yy_flex_realloc( void *ptr, yy_size_t size ) |
| #else |
| static void *yy_flex_realloc( ptr, size ) |
| void *ptr; |
| yy_size_t size; |
| #endif |
| { |
| /* 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 ); |
| } |
| |
| #ifdef YY_USE_PROTOS |
| static void yy_flex_free( void *ptr ) |
| #else |
| static void yy_flex_free( ptr ) |
| void *ptr; |
| #endif |
| { |
| free( ptr ); |
| } |
| |
| #if defined(YY_MAIN) && YY_MAIN |
| int main() |
| { |
| yylex(); |
| return 0; |
| } |
| #endif |
| #line 539 "toke.l" |
| |
| static unsigned char |
| hexchar(s) |
| const char *s; |
| { |
| int i; |
| int result = 0; |
| |
| s += 2; /* skip \\x */ |
| for (i = 0; i < 2; i++) { |
| switch (*s) { |
| case 'A': |
| case 'a': |
| result += 10; |
| break; |
| case 'B': |
| case 'b': |
| result += 11; |
| break; |
| case 'C': |
| case 'c': |
| result += 12; |
| break; |
| case 'D': |
| case 'd': |
| result += 13; |
| break; |
| case 'E': |
| case 'e': |
| result += 14; |
| break; |
| case 'F': |
| case 'f': |
| result += 15; |
| break; |
| default: |
| result += *s - '0'; |
| break; |
| } |
| if (i == 0) { |
| result *= 16; |
| s++; |
| } |
| } |
| return((unsigned char)result); |
| } |
| |
| static int |
| _fill(src, len, olen) |
| char *src; |
| int len, olen; |
| { |
| char *dst; |
| |
| dst = olen ? realloc(yylval.string, olen + len + 1) : malloc(len + 1); |
| if (dst == NULL) { |
| yyerror("unable to allocate memory"); |
| return(FALSE); |
| } |
| yylval.string = dst; |
| |
| /* Copy the string and collapse any escaped characters. */ |
| dst += olen; |
| while (len--) { |
| if (*src == '\\' && len) { |
| if (src[1] == 'x' && len >= 3 && |
| isxdigit((unsigned char) src[2]) && |
| isxdigit((unsigned char) src[3])) { |
| *dst++ = hexchar(src); |
| src += 4; |
| len -= 3; |
| } else { |
| src++; |
| len--; |
| *dst++ = *src++; |
| } |
| } else { |
| *dst++ = *src++; |
| } |
| } |
| *dst = '\0'; |
| return(TRUE); |
| } |
| |
| static int |
| append(src, len) |
| char *src; |
| int len; |
| { |
| int olen = 0; |
| |
| if (yylval.string != NULL) |
| olen = strlen(yylval.string); |
| |
| return(_fill(src, len, olen)); |
| } |
| |
| #define SPECIAL(c) \ |
| ((c) == ',' || (c) == ':' || (c) == '=' || (c) == ' ' || (c) == '\t' || (c) == '#') |
| |
| static int |
| fill_cmnd(src, len) |
| char *src; |
| int len; |
| { |
| char *dst; |
| int i; |
| |
| arg_len = arg_size = 0; |
| |
| dst = yylval.command.cmnd = (char *) malloc(len + 1); |
| if (yylval.command.cmnd == NULL) { |
| yyerror("unable to allocate memory"); |
| return(FALSE); |
| } |
| |
| /* Copy the string and collapse any escaped sudo-specific characters. */ |
| for (i = 0; i < len; i++) { |
| if (src[i] == '\\' && i != len - 1 && SPECIAL(src[i + 1])) |
| *dst++ = src[++i]; |
| else |
| *dst++ = src[i]; |
| } |
| *dst = '\0'; |
| |
| yylval.command.args = NULL; |
| return(TRUE); |
| } |
| |
| static int |
| fill_args(s, len, addspace) |
| char *s; |
| int len; |
| int addspace; |
| { |
| int new_len; |
| char *p; |
| |
| if (yylval.command.args == NULL) { |
| addspace = 0; |
| new_len = len; |
| } else |
| new_len = arg_len + len + addspace; |
| |
| if (new_len >= arg_size) { |
| /* Allocate more space than we need for subsequent args */ |
| while (new_len >= (arg_size += COMMANDARGINC)) |
| ; |
| |
| p = yylval.command.args ? |
| (char *) realloc(yylval.command.args, arg_size) : |
| (char *) malloc(arg_size); |
| if (p == NULL) { |
| efree(yylval.command.args); |
| yyerror("unable to allocate memory"); |
| return(FALSE); |
| } else |
| yylval.command.args = p; |
| } |
| |
| /* Efficiently append the arg (with a leading space if needed). */ |
| p = yylval.command.args + arg_len; |
| if (addspace) |
| *p++ = ' '; |
| if (strlcpy(p, s, arg_size - (p - yylval.command.args)) != len) { |
| yyerror("fill_args: buffer overflow"); /* paranoia */ |
| return(FALSE); |
| } |
| arg_len = new_len; |
| return(TRUE); |
| } |
| |
| struct path_list { |
| char *path; |
| struct path_list *next; |
| }; |
| |
| struct include_stack { |
| YY_BUFFER_STATE bs; |
| char *path; |
| struct path_list *more; /* more files in case of includedir */ |
| int lineno; |
| int keepopen; |
| }; |
| |
| static int |
| pl_compare(v1, v2) |
| const void *v1; |
| const void *v2; |
| { |
| const struct path_list * const *p1 = v1; |
| const struct path_list * const *p2 = v2; |
| |
| return(strcmp((*p1)->path, (*p2)->path)); |
| } |
| |
| static char * |
| switch_dir(stack, dirpath) |
| struct include_stack *stack; |
| char *dirpath; |
| { |
| DIR *dir; |
| int i, count = 0; |
| char *path = NULL; |
| struct dirent *dent; |
| struct stat sb; |
| struct path_list *pl, *first = NULL; |
| struct path_list **sorted = NULL; |
| |
| if (!(dir = opendir(dirpath))) { |
| yyerror(dirpath); |
| return(NULL); |
| } |
| while ((dent = readdir(dir))) { |
| /* Ignore files that end in '~' or have a '.' in them. */ |
| if (dent->d_name[0] == '\0' || dent->d_name[NAMLEN(dent) - 1] == '~' |
| || strchr(dent->d_name, '.') != NULL) { |
| continue; |
| } |
| if (asprintf(&path, "%s/%s", dirpath, dent->d_name) == -1) { |
| closedir(dir); |
| goto bad; |
| } |
| if (stat(path, &sb) != 0 || !S_ISREG(sb.st_mode)) { |
| efree(path); |
| continue; |
| } |
| pl = malloc(sizeof(*pl)); |
| if (pl == NULL) |
| goto bad; |
| pl->path = path; |
| pl->next = first; |
| first = pl; |
| count++; |
| } |
| closedir(dir); |
| |
| if (count == 0) |
| goto done; |
| |
| /* Sort the list as an array. */ |
| sorted = malloc(sizeof(*sorted) * count); |
| if (sorted == NULL) |
| goto bad; |
| pl = first; |
| for (i = 0; i < count; i++) { |
| sorted[i] = pl; |
| pl = pl->next; |
| } |
| qsort(sorted, count, sizeof(*sorted), pl_compare); |
| |
| /* Apply sorting to the list. */ |
| first = sorted[0]; |
| sorted[count - 1]->next = NULL; |
| for (i = 1; i < count; i++) |
| sorted[i - 1]->next = sorted[i]; |
| efree(sorted); |
| |
| /* Pull out the first element for parsing, leave the rest for later. */ |
| if (count) { |
| path = first->path; |
| pl = first->next; |
| efree(first); |
| stack->more = pl; |
| } else { |
| path = NULL; |
| } |
| done: |
| efree(dirpath); |
| return(path); |
| bad: |
| while (first != NULL) { |
| pl = first; |
| first = pl->next; |
| free(pl->path); |
| free(pl); |
| } |
| efree(sorted); |
| efree(dirpath); |
| efree(path); |
| return(NULL); |
| } |
| |
| #define MAX_SUDOERS_DEPTH 128 |
| #define SUDOERS_STACK_INCREMENT 16 |
| |
| static size_t istacksize, idepth; |
| static struct include_stack *istack; |
| static int keepopen; |
| |
| void |
| init_lexer() |
| { |
| struct path_list *pl; |
| |
| while (idepth) { |
| idepth--; |
| while ((pl = istack[idepth].more) != NULL) { |
| istack[idepth].more = pl->next; |
| efree(pl->path); |
| efree(pl); |
| } |
| efree(istack[idepth].path); |
| if (idepth && !istack[idepth].keepopen) |
| fclose(istack[idepth].bs->yy_input_file); |
| yy_delete_buffer(istack[idepth].bs); |
| } |
| efree(istack); |
| istack = NULL; |
| istacksize = idepth = 0; |
| keepopen = FALSE; |
| } |
| |
| static int |
| _push_include(path, isdir) |
| char *path; |
| int isdir; |
| { |
| struct path_list *pl; |
| FILE *fp; |
| |
| /* push current state onto stack */ |
| if (idepth >= istacksize) { |
| if (idepth > MAX_SUDOERS_DEPTH) { |
| yyerror("too many levels of includes"); |
| return(FALSE); |
| } |
| istacksize += SUDOERS_STACK_INCREMENT; |
| istack = (struct include_stack *) realloc(istack, |
| sizeof(*istack) * istacksize); |
| if (istack == NULL) { |
| yyerror("unable to allocate memory"); |
| return(FALSE); |
| } |
| } |
| if (isdir) { |
| if (!(path = switch_dir(&istack[idepth], path))) { |
| /* switch_dir() called yyerror() for us */ |
| return(FALSE); |
| } |
| while ((fp = open_sudoers(path, FALSE, &keepopen)) == NULL) { |
| /* Unable to open path in includedir, go to next one, if any. */ |
| efree(path); |
| if ((pl = istack[idepth].more) == NULL) |
| return(FALSE); |
| path = pl->path; |
| istack[idepth].more = pl->next; |
| efree(pl); |
| } |
| } else { |
| if ((fp = open_sudoers(path, TRUE, &keepopen)) == NULL) { |
| yyerror(path); |
| return(FALSE); |
| } |
| istack[idepth].more = NULL; |
| } |
| /* Push the old (current) file and open the new one. */ |
| istack[idepth].path = sudoers; /* push old path */ |
| istack[idepth].bs = YY_CURRENT_BUFFER; |
| istack[idepth].lineno = sudolineno; |
| istack[idepth].keepopen = keepopen; |
| idepth++; |
| sudolineno = 1; |
| sudoers = path; |
| yy_switch_to_buffer(yy_create_buffer(fp, YY_BUF_SIZE)); |
| |
| return(TRUE); |
| } |
| |
| static int |
| pop_include() |
| { |
| struct path_list *pl; |
| FILE *fp; |
| |
| if (idepth == 0) |
| return(FALSE); |
| |
| if (!keepopen) |
| fclose(YY_CURRENT_BUFFER->yy_input_file); |
| yy_delete_buffer(YY_CURRENT_BUFFER); |
| /* If we are in an include dir, move to the next file. */ |
| while ((pl = istack[idepth - 1].more) != NULL) { |
| fp = open_sudoers(pl->path, FALSE, &keepopen); |
| if (fp != NULL) { |
| istack[idepth - 1].more = pl->next; |
| efree(sudoers); |
| sudoers = pl->path; |
| sudolineno = 1; |
| yy_switch_to_buffer(yy_create_buffer(fp, YY_BUF_SIZE)); |
| efree(pl); |
| break; |
| } |
| /* Unable to open path in include dir, go to next one. */ |
| istack[idepth - 1].more = pl->next; |
| efree(pl->path); |
| efree(pl); |
| } |
| /* If no path list, just pop the last dir on the stack. */ |
| if (pl == NULL) { |
| idepth--; |
| yy_switch_to_buffer(istack[idepth].bs); |
| efree(sudoers); |
| sudoers = istack[idepth].path; |
| sudolineno = istack[idepth].lineno; |
| keepopen = istack[idepth].keepopen; |
| } |
| return(TRUE); |
| } |
| |
| static char * |
| parse_include(base) |
| char *base; |
| { |
| char *cp, *ep, *path; |
| int len = 0, subst = 0; |
| size_t shost_len = 0; |
| |
| /* Pull out path from #include line. */ |
| cp = base + sizeof("#include"); |
| if (*cp == 'i') |
| cp += 3; /* includedir */ |
| while (isblank((unsigned char) *cp)) |
| cp++; |
| ep = cp; |
| while (*ep != '\0' && !isspace((unsigned char) *ep)) { |
| if (ep[0] == '%' && ep[1] == 'h') { |
| shost_len = strlen(user_shost); |
| len += shost_len - 2; |
| subst = 1; |
| } |
| ep++; |
| } |
| |
| /* Make a copy of path and return it. */ |
| len += (int)(ep - cp); |
| if ((path = malloc(len + 1)) == NULL) |
| yyerror("unable to allocate memory"); |
| if (subst) { |
| /* substitute for %h */ |
| char *pp = path; |
| while (cp < ep) { |
| if (cp[0] == '%' && cp[1] == 'h') { |
| memcpy(pp, user_shost, shost_len); |
| pp += shost_len; |
| cp += 2; |
| continue; |
| } |
| *pp++ = *cp++; |
| } |
| *pp = '\0'; |
| } else { |
| memcpy(path, cp, len); |
| path[len] = '\0'; |
| } |
| |
| /* Push any excess characters (e.g. comment, newline) back to the lexer */ |
| if (*ep != '\0') |
| yyless((int)(ep - base)); |
| |
| return(path); |
| } |
| |
| /* |
| * Check to make sure an IPv6 address does not contain multiple instances |
| * of the string "::". Assumes strlen(s) >= 1. |
| * Returns TRUE if address is valid else FALSE. |
| */ |
| static int |
| ipv6_valid(s) |
| const char *s; |
| { |
| int nmatch = 0; |
| |
| for (; *s != '\0'; s++) { |
| if (s[0] == ':' && s[1] == ':') { |
| if (++nmatch > 1) |
| break; |
| } |
| if (s[0] == '/') |
| nmatch = 0; /* reset if we hit netmask */ |
| } |
| |
| return (nmatch <= 1); |
| } |