/* $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/courtesan/sudo/Attic/lex.yy.c,v 1.46.2.11 2008/06/26 11:53:49 millert Exp $ */ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 #include #include /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ #ifdef c_plusplus #ifndef __cplusplus #define __cplusplus #endif #endif #ifdef __cplusplus #include #include /* 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 #include #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) 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 48 #define YY_END_OF_BUFFER 49 static yyconst short int yy_accept[610] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 38, 44, 43, 42, 47, 38, 31, 47, 38, 39, 38, 38, 38, 38, 41, 40, 32, 32, 32, 32, 32, 32, 47, 38, 38, 32, 32, 32, 32, 32, 33, 47, 33, 35, 33, 33, 33, 33, 33, 32, 32, 32, 32, 32, 32, 47, 33, 33, 1, 16, 15, 16, 15, 15, 47, 47, 2, 8, 7, 8, 3, 8, 4, 47, 12, 12, 12, 10, 11, 38, 0, 44, 42, 0, 46, 26, 0, 25, 0, 37, 37, 0, 38, 38, 0, 38, 38, 38, 38, 0, 29, 32, 32, 32, 32, 32, 32, 38, 45, 38, 38, 38, 38, 38, 38, 33, 0, 0, 33, 26, 0, 25, 0, 33, 0, 33, 33, 33, 33, 33, 33, 32, 32, 32, 32, 32, 32, 33, 33, 1, 16, 16, 14, 13, 14, 0, 2, 8, 0, 5, 6, 8, 8, 12, 0, 12, 12, 0, 9, 0, 38, 38, 38, 38, 38, 0, 0, 29, 29, 32, 32, 32, 32, 32, 32, 32, 38, 38, 38, 38, 38, 38, 0, 34, 33, 33, 33, 33, 33, 32, 32, 32, 32, 32, 32, 32, 33, 9, 38, 38, 38, 38, 38, 38, 0, 30, 30, 30, 0, 0, 29, 29, 29, 29, 29, 29, 29, 32, 32, 32, 32, 32, 32, 32, 38, 38, 38, 38, 33, 33, 33, 33, 33, 33, 32, 32, 32, 32, 32, 32, 32, 33, 38, 38, 38, 0, 0, 30, 30, 30, 0, 29, 29, 0, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 0, 22, 32, 32, 32, 32, 32, 38, 38, 38, 33, 33, 33, 32, 32, 32, 32, 32, 33, 38, 38, 38, 38, 38, 0, 30, 0, 29, 29, 29, 0, 0, 0, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 32, 32, 32, 32, 32, 38, 38, 38, 33, 33, 33, 33, 33, 32, 32, 32, 32, 32, 33, 27, 27, 27, 0, 0, 29, 29, 29, 29, 29, 29, 29, 0, 0, 0, 0, 0, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 0, 21, 32, 32, 0, 20, 0, 23, 38, 38, 38, 27, 27, 27, 32, 32, 33, 38, 27, 27, 27, 27, 0, 29, 0, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 0, 0, 0, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 32, 32, 36, 38, 17, 33, 27, 27, 27, 27, 32, 32, 33, 38, 28, 28, 28, 29, 0, 0, 0, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 0, 0, 0, 0, 0, 29, 29, 29, 29, 29, 29, 29, 29, 0, 19, 0, 24, 38, 17, 33, 28, 28, 28, 38, 38, 28, 28, 28, 28, 28, 0, 0, 0, 0, 0, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 18, 33, 33, 28, 28, 28, 28, 28, 38, 38, 38, 28, 28, 0, 0, 0, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 33, 33, 33, 28, 28, 38, 38, 38, 38, 38, 0, 0, 0, 0, 0, 29, 29, 29, 29, 29, 29, 29, 29, 33, 33, 33, 33, 33, 38, 38, 38, 29, 29, 29, 29, 29, 29, 33, 33, 33, 38, 38, 38, 38, 38, 29, 29, 29, 29, 29, 33, 33, 33, 33, 33, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 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, 26, 27, 28, 29, 30, 31, 28, 32, 33, 32, 32, 32, 32, 32, 34, 35, 36, 32, 37, 38, 39, 40, 41, 42, 43, 32, 32, 10, 44, 10, 1, 45, 1, 46, 47, 47, 48, 49, 50, 51, 51, 52, 51, 51, 53, 54, 55, 56, 51, 51, 57, 58, 59, 60, 51, 51, 51, 51, 51, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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[61] = { 0, 1, 2, 3, 4, 5, 6, 1, 4, 4, 1, 1, 2, 7, 8, 9, 10, 10, 10, 10, 10, 10, 10, 10, 11, 6, 4, 12, 12, 12, 12, 12, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13, 14, 15, 15, 15, 15, 15, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14 } ; static yyconst short int yy_base[681] = { 0, 0, 32, 72, 0, 62, 131, 132, 139, 182, 241, 300, 343, 145, 150, 3097, 3052, 3093, 3790, 3068, 3059, 3008, 3790, 3790, 2996, 3790, 161, 374, 179, 161, 3015, 3790, 424, 2995, 469, 3002, 3009, 2982, 518, 190, 102, 2949, 2944, 2927, 2913, 2905, 2909, 201, 2873, 3790, 2864, 306, 531, 232, 240, 581, 2855, 626, 2855, 2852, 2838, 675, 248, 114, 2847, 0, 3790, 2844, 0, 3790, 314, 64, 0, 2803, 3790, 115, 3790, 146, 3790, 158, 2802, 171, 275, 3790, 270, 2801, 355, 2836, 2818, 2808, 3790, 2757, 684, 2739, 709, 325, 2729, 718, 355, 729, 2739, 2739, 390, 485, 493, 2675, 151, 764, 0, 2665, 245, 2657, 2649, 338, 3790, 124, 148, 232, 219, 287, 278, 2633, 794, 2656, 0, 2605, 819, 2593, 828, 530, 853, 549, 864, 2622, 642, 745, 650, 899, 0, 2604, 292, 2596, 2571, 382, 230, 2566, 0, 2548, 305, 3790, 3790, 333, 0, 2507, 700, 3790, 3790, 2505, 492, 2489, 2527, 384, 339, 350, 2529, 844, 936, 880, 720, 967, 2484, 2460, 1002, 201, 1038, 1073, 2454, 2433, 2438, 2431, 2409, 2403, 265, 236, 2369, 356, 147, 370, 2411, 3790, 1110, 915, 753, 1141, 2399, 1176, 2354, 2315, 2302, 2283, 2275, 2281, 479, 2293, 947, 375, 0, 0, 343, 392, 2270, 2236, 955, 515, 2222, 2221, 513, 983, 1213, 1018, 854, 1249, 1056, 2214, 539, 2196, 2186, 2153, 2149, 2125, 540, 388, 764, 529, 1090, 532, 0, 0, 427, 661, 2133, 583, 2110, 2101, 2084, 2080, 2087, 645, 1121, 1159, 1194, 2095, 2080, 1129, 2080, 2033, 2032, 2021, 667, 1229, 683, 1265, 775, 1286, 0, 1304, 1323, 1339, 888, 1359, 1377, 729, 3790, 2009, 1999, 1972, 1972, 1948, 481, 513, 651, 1396, 1406, 1416, 1959, 1919, 1925, 1925, 1913, 675, 1424, 791, 1434, 1444, 1455, 1926, 1873, 1856, 1819, 1484, 792, 1811, 1810, 1463, 802, 824, 827, 1471, 852, 1521, 0, 1502, 1558, 1537, 923, 1594, 1576, 730, 1745, 1737, 958, 1040, 19, 805, 670, 1610, 819, 1639, 1649, 1631, 1081, 1711, 1718, 1112, 1251, 318, 1661, 1669, 991, 1694, 1677, 1615, 1677, 1692, 1708, 1273, 1727, 1745, 1762, 1624, 1621, 1620, 1772, 1056, 1101, 1387, 1622, 1778, 1788, 1799, 0, 1817, 1836, 1788, 1347, 1872, 1854, 1324, 3790, 1590, 1578, 1325, 3790, 1522, 3790, 984, 757, 771, 1908, 1888, 1545, 1572, 1543, 1038, 1916, 636, 0, 0, 866, 1559, 1505, 1924, 937, 1945, 1142, 1955, 0, 1966, 1977, 1993, 1716, 2012, 2030, 1496, 1482, 2049, 1150, 1185, 1934, 2040, 2057, 2067, 2078, 0, 2096, 2115, 2067, 1896, 2133, 1523, 1837, 1434, 879, 1194, 2150, 1377, 0, 0, 970, 1838, 1957, 1426, 2181, 2158, 2166, 1028, 1407, 1390, 1389, 2191, 1306, 1435, 1577, 2199, 1650, 2212, 0, 2223, 2234, 2250, 2001, 2269, 2287, 2304, 1260, 1244, 1225, 2314, 1745, 1854, 2322, 1084, 1103, 2333, 0, 2324, 1968, 3790, 2116, 3790, 1451, 3790, 2343, 2351, 2359, 1167, 2372, 846, 2380, 2388, 2401, 2409, 2419, 2422, 1172, 1153, 1101, 2432, 1057, 1039, 1693, 2134, 2438, 2182, 2450, 0, 2461, 2472, 2488, 2258, 2507, 2525, 1032, 1012, 2543, 2287, 947, 1187, 880, 2553, 1483, 2561, 2569, 2577, 2585, 2595, 2600, 2610, 2624, 2634, 2368, 850, 833, 2644, 798, 780, 2235, 2473, 2652, 2526, 2662, 0, 2673, 2684, 2700, 2496, 2721, 782, 740, 713, 2730, 701, 2738, 2748, 2758, 2768, 2692, 2776, 1484, 2786, 2796, 2807, 2813, 689, 638, 592, 2823, 566, 559, 2601, 550, 416, 2836, 0, 1232, 2844, 1659, 2854, 2864, 2875, 2883, 2893, 2904, 2912, 2920, 2928, 393, 0, 346, 2938, 2948, 2958, 2968, 2146, 2978, 2988, 2998, 3790, 3004, 3012, 2708, 3790, 3027, 2179, 3037, 3047, 3057, 3063, 3071, 3100, 3108, 3116, 3145, 293, 3153, 3137, 123, 3182, 3166, 3790, 3226, 3241, 3256, 3271, 3286, 3301, 3316, 3331, 3346, 3352, 3367, 3382, 3397, 3412, 3427, 3442, 1242, 3457, 3472, 3487, 3502, 3508, 3515, 3530, 1593, 3536, 3543, 3549, 3555, 3561, 3568, 3574, 3580, 3586, 3593, 3601, 3607, 3613, 3619, 1211, 1321, 3626, 3634, 3640, 3646, 3653, 3661, 3667, 3675, 1694, 1762, 3682, 3690, 1834, 1871, 3696, 3704, 3711, 3719, 3725, 3733, 1302, 1375, 3740, 1888, 1943, 3746, 3754, 3760, 3768, 3774 } ; static yyconst short int yy_def[681] = { 0, 609, 1, 609, 3, 1, 1, 610, 610, 611, 611, 612, 612, 613, 613, 609, 614, 609, 609, 609, 615, 616, 609, 609, 617, 609, 618, 614, 27, 27, 619, 609, 609, 32, 32, 34, 34, 34, 614, 27, 614, 32, 32, 34, 34, 34, 620, 621, 622, 609, 623, 624, 620, 52, 52, 609, 55, 55, 57, 57, 57, 620, 52, 620, 609, 625, 609, 625, 625, 609, 609, 609, 626, 627, 609, 627, 609, 627, 609, 628, 629, 629, 629, 609, 609, 614, 614, 609, 609, 615, 609, 616, 616, 617, 617, 618, 630, 614, 614, 27, 619, 99, 99, 99, 99, 631, 632, 32, 34, 34, 34, 34, 34, 614, 609, 614, 614, 99, 614, 614, 614, 620, 620, 633, 634, 622, 622, 623, 623, 624, 620, 620, 52, 132, 132, 132, 132, 55, 57, 57, 57, 57, 57, 620, 620, 609, 625, 625, 609, 609, 609, 609, 626, 627, 627, 609, 609, 627, 627, 629, 609, 629, 629, 609, 609, 609, 614, 166, 166, 99, 169, 635, 609, 636, 609, 32, 34, 34, 34, 34, 34, 34, 614, 614, 169, 614, 614, 614, 633, 609, 620, 190, 190, 132, 193, 55, 57, 57, 57, 57, 57, 57, 620, 609, 614, 614, 166, 166, 166, 614, 637, 638, 638, 212, 639, 638, 640, 174, 609, 218, 218, 609, 218, 34, 34, 34, 34, 34, 34, 34, 614, 614, 614, 614, 620, 620, 190, 190, 190, 620, 57, 57, 57, 57, 57, 57, 57, 620, 166, 166, 166, 609, 641, 641, 253, 641, 642, 643, 644, 609, 645, 221, 645, 609, 263, 645, 609, 266, 266, 609, 266, 609, 609, 34, 34, 34, 34, 34, 614, 614, 614, 190, 190, 190, 57, 57, 57, 57, 57, 620, 614, 614, 166, 166, 614, 646, 646, 647, 648, 609, 609, 649, 650, 609, 651, 651, 652, 269, 652, 609, 309, 652, 609, 312, 312, 609, 312, 34, 34, 34, 34, 34, 614, 614, 614, 620, 620, 190, 190, 620, 57, 57, 57, 57, 57, 620, 614, 336, 336, 609, 653, 654, 299, 609, 343, 343, 609, 343, 609, 609, 649, 649, 609, 609, 655, 655, 656, 315, 656, 609, 359, 656, 609, 362, 362, 609, 362, 609, 609, 34, 34, 609, 609, 609, 609, 614, 614, 614, 620, 378, 378, 57, 57, 620, 614, 614, 336, 336, 336, 609, 657, 609, 658, 346, 658, 658, 395, 658, 609, 398, 398, 609, 398, 659, 660, 609, 609, 661, 661, 662, 365, 662, 609, 412, 662, 609, 415, 415, 415, 34, 34, 614, 614, 614, 620, 620, 378, 378, 378, 57, 57, 620, 614, 432, 432, 432, 609, 663, 664, 609, 665, 665, 666, 401, 666, 666, 445, 666, 609, 448, 448, 609, 448, 609, 609, 659, 659, 609, 609, 667, 667, 668, 668, 668, 463, 668, 609, 609, 609, 609, 614, 609, 620, 472, 472, 472, 614, 614, 432, 432, 432, 432, 614, 609, 609, 663, 663, 609, 609, 669, 669, 670, 451, 670, 670, 494, 670, 609, 497, 497, 609, 497, 671, 672, 609, 609, 673, 673, 614, 472, 620, 472, 472, 472, 472, 620, 432, 432, 432, 432, 614, 674, 675, 609, 609, 676, 676, 677, 500, 677, 677, 530, 677, 609, 533, 533, 533, 609, 671, 671, 609, 609, 472, 472, 472, 472, 620, 614, 614, 432, 432, 614, 609, 609, 674, 674, 609, 609, 678, 678, 679, 679, 679, 562, 562, 620, 620, 472, 472, 620, 432, 432, 432, 609, 609, 609, 609, 680, 680, 472, 472, 472, 432, 614, 432, 432, 614, 609, 609, 609, 609, 609, 472, 620, 472, 472, 620, 614, 614, 614, 620, 620, 620, 614, 614, 614, 620, 620, 620, 0, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609 } ; static yyconst short int yy_nxt[3851] = { 0, 16, 17, 18, 19, 16, 20, 21, 22, 23, 16, 24, 25, 16, 16, 26, 27, 28, 29, 27, 27, 27, 27, 27, 30, 31, 23, 32, 32, 32, 32, 33, 34, 34, 35, 34, 36, 34, 37, 34, 34, 34, 34, 34, 38, 16, 39, 39, 39, 39, 39, 16, 16, 16, 16, 16, 16, 16, 40, 16, 16, 41, 42, 86, 64, 43, 151, 114, 23, 44, 23, 375, 45, 46, 17, 18, 19, 46, 47, 48, 23, 49, 46, 50, 25, 46, 46, 51, 52, 53, 54, 52, 52, 52, 52, 52, 30, 31, 23, 55, 55, 55, 55, 56, 57, 57, 58, 57, 59, 57, 60, 57, 57, 57, 57, 57, 61, 46, 62, 62, 62, 62, 62, 46, 46, 46, 46, 46, 46, 46, 63, 46, 46, 64, 17, 66, 67, 23, 68, 23, 155, 17, 66, 67, 69, 68, 86, 81, 18, 82, 83, 69, 81, 18, 82, 83, 69, 68, 122, 154, 158, 114, 115, 69, 68, 96, 172, 122, 86, 96, 96, 156, 182, 161, 144, 174, 70, 103, 103, 103, 103, 103, 104, 70, 17, 18, 19, 96, 20, 84, 154, 86, 86, 233, 84, 102, 102, 102, 102, 102, 102, 102, 102, 183, 85, 97, 101, 101, 101, 101, 101, 101, 101, 101, 124, 160, 172, 124, 124, 124, 124, 124, 124, 124, 124, 217, 71, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 17, 18, 19, 85, 20, 134, 134, 134, 134, 134, 134, 134, 134, 135, 135, 135, 135, 135, 136, 121, 86, 133, 133, 133, 133, 133, 133, 133, 133, 163, 164, 122, 159, 177, 185, 202, 162, 86, 178, 184, 179, 231, 71, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 17, 18, 19, 74, 20, 151, 114, 86, 96, 75, 76, 77, 96, 96, 148, 114, 149, 160, 150, 230, 86, 197, 149, 78, 150, 187, 198, 96, 199, 86, 96, 96, 96, 151, 114, 86, 150, 150, 151, 114, 186, 162, 79, 17, 18, 19, 74, 20, 130, 96, 163, 164, 75, 76, 77, 85, 150, 85, 391, 85, 122, 85, 85, 85, 85, 85, 78, 97, 383, 166, 167, 168, 166, 166, 166, 166, 166, 85, 85, 85, 86, 160, 151, 114, 161, 79, 98, 204, 99, 99, 99, 99, 99, 99, 99, 99, 100, 86, 86, 101, 101, 101, 101, 101, 170, 170, 170, 170, 170, 170, 170, 170, 86, 231, 100, 528, 86, 86, 101, 101, 101, 101, 101, 85, 122, 231, 160, 85, 609, 85, 86, 279, 85, 85, 86, 85, 85, 85, 107, 107, 107, 107, 107, 107, 107, 107, 100, 121, 121, 107, 107, 107, 107, 107, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 86, 108, 101, 101, 101, 101, 101, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 108, 108, 108, 108, 108, 108, 108, 108, 609, 151, 114, 108, 108, 108, 108, 108, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 85, 85, 85, 85, 85, 113, 114, 85, 122, 85, 86, 85, 85, 172, 322, 85, 255, 255, 255, 96, 247, 154, 217, 96, 96, 323, 271, 85, 85, 85, 131, 234, 132, 132, 132, 132, 132, 132, 132, 132, 100, 96, 86, 133, 133, 133, 133, 133, 272, 391, 190, 191, 192, 190, 190, 190, 190, 190, 86, 130, 122, 122, 133, 133, 133, 133, 133, 121, 528, 86, 271, 121, 231, 121, 278, 492, 121, 121, 122, 121, 121, 121, 137, 137, 137, 137, 137, 137, 137, 137, 100, 552, 272, 137, 137, 137, 137, 137, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 122, 138, 133, 133, 133, 133, 133, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 138, 138, 138, 138, 138, 138, 138, 138, 609, 384, 552, 138, 138, 138, 138, 138, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 121, 121, 121, 121, 121, 143, 114, 121, 86, 121, 172, 121, 121, 100, 91, 121, 91, 122, 91, 217, 91, 91, 289, 86, 91, 259, 172, 121, 121, 121, 153, 552, 324, 122, 153, 261, 91, 91, 91, 93, 153, 93, 86, 93, 172, 93, 93, 122, 95, 93, 85, 335, 95, 153, 85, 85, 172, 377, 95, 271, 367, 93, 93, 93, 207, 207, 207, 207, 207, 208, 95, 95, 85, 169, 169, 169, 169, 169, 169, 169, 169, 272, 368, 172, 169, 169, 169, 169, 169, 194, 194, 194, 194, 194, 194, 194, 194, 237, 237, 237, 237, 237, 238, 169, 169, 169, 169, 169, 175, 175, 175, 175, 175, 175, 175, 175, 100, 609, 172, 175, 175, 175, 175, 175, 121, 172, 121, 261, 121, 86, 121, 121, 492, 290, 121, 172, 86, 422, 169, 169, 169, 169, 169, 86, 217, 172, 121, 121, 121, 125, 443, 125, 280, 125, 261, 125, 125, 423, 127, 125, 127, 325, 127, 86, 127, 127, 259, 172, 127, 259, 172, 125, 125, 125, 96, 552, 261, 86, 96, 307, 127, 127, 127, 129, 96, 121, 376, 129, 476, 121, 121, 122, 552, 129, 609, 172, 96, 96, 264, 264, 264, 264, 264, 265, 307, 129, 129, 121, 193, 193, 193, 193, 193, 193, 193, 193, 85, 85, 86, 193, 193, 193, 193, 193, 206, 206, 206, 206, 206, 206, 206, 206, 310, 310, 310, 310, 310, 311, 193, 193, 193, 193, 193, 195, 195, 195, 195, 195, 195, 195, 195, 86, 86, 470, 195, 195, 195, 195, 195, 236, 236, 236, 236, 236, 236, 236, 236, 360, 360, 360, 360, 360, 361, 193, 193, 193, 193, 193, 204, 391, 205, 205, 205, 205, 205, 205, 205, 205, 371, 393, 172, 248, 249, 250, 248, 248, 248, 248, 248, 253, 253, 254, 255, 255, 255, 255, 255, 214, 86, 85, 372, 209, 209, 209, 209, 209, 209, 209, 209, 86, 121, 121, 209, 209, 209, 209, 209, 222, 222, 222, 222, 222, 222, 222, 222, 387, 387, 387, 387, 387, 388, 209, 209, 209, 209, 209, 211, 212, 213, 213, 213, 213, 213, 213, 214, 172, 86, 215, 215, 215, 215, 215, 263, 263, 263, 263, 263, 263, 263, 263, 373, 421, 482, 482, 482, 172, 215, 215, 215, 215, 215, 172, 218, 219, 220, 218, 218, 218, 218, 218, 221, 443, 374, 222, 222, 222, 222, 222, 609, 172, 262, 262, 262, 262, 262, 262, 262, 262, 261, 393, 122, 367, 222, 222, 222, 222, 222, 223, 223, 223, 223, 223, 223, 223, 223, 431, 259, 172, 223, 223, 223, 223, 223, 368, 281, 282, 283, 281, 281, 281, 281, 281, 371, 483, 172, 609, 172, 209, 209, 209, 209, 209, 234, 307, 235, 235, 235, 235, 235, 235, 235, 235, 122, 290, 372, 291, 291, 291, 291, 291, 291, 291, 291, 296, 296, 296, 296, 296, 296, 296, 296, 214, 122, 121, 609, 239, 239, 239, 239, 239, 239, 239, 239, 172, 393, 483, 239, 239, 239, 239, 239, 290, 307, 292, 292, 292, 292, 292, 292, 292, 292, 515, 515, 515, 483, 239, 239, 239, 239, 239, 240, 240, 240, 240, 240, 240, 240, 240, 172, 259, 172, 240, 240, 240, 240, 240, 290, 357, 293, 293, 293, 293, 293, 294, 291, 291, 471, 349, 471, 349, 239, 239, 239, 239, 239, 259, 172, 260, 260, 260, 260, 260, 260, 260, 260, 261, 86, 453, 262, 262, 262, 262, 262, 301, 302, 303, 301, 301, 301, 301, 301, 373, 577, 577, 152, 152, 453, 262, 262, 262, 262, 262, 172, 266, 267, 268, 266, 266, 266, 266, 266, 269, 453, 374, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 396, 396, 396, 396, 396, 397, 270, 270, 270, 270, 270, 259, 172, 305, 305, 305, 305, 305, 305, 305, 305, 261, 537, 537, 304, 304, 304, 304, 304, 259, 172, 305, 305, 305, 305, 305, 305, 367, 371, 261, 350, 393, 350, 304, 304, 304, 304, 304, 259, 172, 306, 306, 306, 306, 306, 306, 306, 306, 307, 368, 372, 308, 308, 308, 308, 308, 309, 309, 309, 309, 309, 309, 309, 309, 413, 413, 413, 413, 413, 414, 308, 308, 308, 308, 308, 172, 312, 313, 314, 312, 312, 312, 312, 312, 315, 538, 538, 316, 316, 316, 316, 316, 609, 424, 308, 308, 308, 308, 308, 308, 308, 308, 259, 172, 483, 483, 316, 316, 316, 316, 316, 325, 307, 326, 326, 326, 326, 326, 326, 326, 326, 325, 122, 327, 327, 327, 327, 327, 327, 327, 327, 325, 342, 328, 328, 328, 328, 328, 329, 326, 326, 336, 337, 338, 336, 336, 336, 336, 336, 290, 391, 291, 291, 291, 291, 291, 291, 291, 291, 290, 393, 291, 291, 291, 291, 291, 291, 291, 291, 86, 290, 122, 291, 291, 291, 291, 291, 291, 348, 86, 351, 351, 351, 351, 351, 352, 349, 349, 316, 316, 316, 316, 316, 316, 316, 316, 86, 453, 509, 547, 86, 343, 344, 345, 343, 343, 343, 343, 343, 346, 508, 453, 347, 347, 347, 347, 347, 259, 172, 355, 355, 355, 355, 355, 355, 373, 466, 307, 122, 86, 342, 347, 347, 347, 347, 347, 259, 172, 355, 355, 355, 355, 355, 355, 355, 355, 307, 374, 467, 354, 354, 354, 354, 354, 359, 359, 359, 359, 359, 359, 359, 359, 427, 427, 427, 427, 427, 428, 354, 354, 354, 354, 354, 259, 172, 356, 356, 356, 356, 356, 356, 356, 356, 357, 257, 430, 358, 358, 358, 358, 358, 609, 391, 358, 358, 358, 358, 358, 358, 358, 358, 124, 443, 429, 124, 358, 358, 358, 358, 358, 172, 362, 363, 364, 362, 362, 362, 362, 362, 365, 420, 419, 366, 366, 366, 366, 366, 378, 379, 380, 378, 378, 378, 378, 378, 348, 348, 259, 172, 348, 342, 366, 366, 366, 366, 366, 325, 357, 326, 326, 326, 326, 326, 326, 325, 122, 326, 326, 326, 326, 326, 326, 326, 326, 325, 609, 326, 326, 326, 326, 326, 326, 326, 326, 565, 443, 122, 384, 385, 385, 385, 385, 385, 385, 385, 385, 386, 386, 386, 386, 386, 386, 386, 386, 347, 347, 347, 347, 347, 347, 347, 347, 257, 454, 122, 454, 86, 391, 391, 392, 392, 392, 392, 392, 392, 392, 392, 393, 443, 214, 394, 394, 394, 394, 394, 395, 395, 395, 395, 395, 395, 395, 395, 446, 446, 446, 446, 446, 447, 394, 394, 394, 394, 394, 398, 399, 400, 398, 398, 398, 398, 398, 401, 382, 381, 402, 402, 402, 402, 402, 609, 172, 394, 394, 394, 394, 394, 394, 394, 394, 357, 455, 370, 455, 402, 402, 402, 402, 402, 403, 404, 405, 403, 403, 403, 403, 403, 348, 369, 349, 349, 349, 349, 349, 349, 366, 366, 366, 366, 366, 366, 366, 366, 609, 172, 412, 412, 412, 412, 412, 412, 412, 412, 357, 259, 172, 408, 408, 408, 408, 408, 408, 408, 408, 357, 348, 348, 407, 407, 407, 407, 407, 259, 172, 408, 408, 408, 408, 408, 408, 468, 466, 357, 484, 342, 484, 407, 407, 407, 407, 407, 259, 172, 409, 409, 409, 409, 409, 409, 409, 409, 410, 469, 467, 411, 411, 411, 411, 411, 609, 172, 411, 411, 411, 411, 411, 411, 411, 411, 410, 485, 257, 485, 411, 411, 411, 411, 411, 172, 415, 416, 417, 415, 415, 415, 415, 415, 553, 214, 553, 418, 418, 418, 418, 418, 426, 426, 426, 426, 426, 426, 426, 426, 464, 464, 464, 464, 464, 465, 418, 418, 418, 418, 418, 424, 425, 425, 425, 425, 425, 425, 425, 425, 432, 433, 434, 435, 432, 432, 432, 432, 437, 438, 439, 437, 437, 437, 437, 437, 259, 172, 214, 554, 122, 554, 334, 333, 332, 331, 357, 468, 86, 402, 402, 402, 402, 402, 402, 402, 402, 391, 466, 441, 441, 441, 441, 441, 441, 441, 441, 393, 391, 469, 441, 441, 441, 441, 441, 441, 330, 321, 393, 391, 467, 442, 442, 442, 442, 442, 442, 442, 442, 443, 320, 319, 444, 444, 444, 444, 444, 445, 445, 445, 445, 445, 445, 445, 445, 495, 495, 495, 495, 495, 496, 444, 444, 444, 444, 444, 448, 449, 450, 448, 448, 448, 448, 448, 451, 318, 317, 452, 452, 452, 452, 452, 609, 299, 444, 444, 444, 444, 444, 444, 444, 444, 259, 172, 257, 214, 452, 452, 452, 452, 452, 453, 410, 456, 456, 456, 456, 456, 457, 454, 454, 418, 418, 418, 418, 418, 418, 418, 418, 609, 172, 463, 463, 463, 463, 463, 463, 463, 463, 410, 259, 172, 460, 460, 460, 460, 460, 460, 460, 460, 410, 295, 214, 459, 459, 459, 459, 459, 259, 172, 460, 460, 460, 460, 460, 460, 468, 106, 410, 288, 287, 286, 459, 459, 459, 459, 459, 259, 172, 461, 461, 461, 461, 461, 461, 461, 461, 285, 469, 284, 462, 462, 462, 462, 462, 609, 391, 462, 462, 462, 462, 462, 462, 462, 462, 100, 492, 277, 582, 462, 462, 462, 462, 462, 472, 473, 474, 475, 472, 472, 472, 472, 478, 478, 478, 478, 478, 478, 478, 478, 479, 479, 479, 479, 479, 480, 481, 481, 86, 276, 275, 592, 122, 476, 609, 477, 477, 477, 477, 477, 477, 477, 477, 483, 492, 486, 486, 486, 486, 486, 487, 484, 484, 452, 452, 452, 452, 452, 452, 452, 452, 122, 274, 86, 391, 273, 490, 490, 490, 490, 490, 490, 490, 490, 443, 391, 100, 490, 490, 490, 490, 490, 490, 214, 257, 443, 391, 391, 491, 491, 491, 491, 491, 491, 491, 491, 492, 492, 214, 493, 493, 493, 493, 493, 494, 494, 494, 494, 494, 494, 494, 494, 531, 531, 531, 531, 531, 532, 493, 493, 493, 493, 493, 497, 498, 499, 497, 497, 497, 497, 497, 500, 106, 203, 501, 501, 501, 501, 501, 609, 172, 493, 493, 493, 493, 493, 493, 493, 493, 410, 246, 245, 244, 501, 501, 501, 501, 501, 502, 503, 504, 502, 502, 502, 502, 502, 453, 243, 454, 454, 454, 454, 454, 454, 259, 172, 259, 172, 507, 507, 507, 507, 507, 507, 410, 259, 172, 507, 507, 507, 507, 507, 507, 507, 507, 509, 242, 510, 510, 510, 510, 510, 510, 510, 510, 511, 511, 511, 511, 511, 511, 511, 511, 512, 512, 512, 512, 512, 513, 514, 514, 241, 520, 520, 520, 122, 516, 517, 518, 516, 516, 516, 516, 516, 481, 481, 481, 481, 481, 481, 481, 481, 481, 481, 481, 481, 481, 481, 481, 481, 86, 131, 189, 232, 86, 481, 481, 481, 481, 481, 481, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 476, 229, 520, 520, 520, 521, 522, 523, 521, 521, 521, 521, 521, 483, 228, 484, 484, 484, 484, 484, 484, 501, 501, 501, 501, 501, 501, 501, 501, 227, 86, 391, 226, 526, 526, 526, 526, 526, 526, 526, 526, 492, 391, 225, 526, 526, 526, 526, 526, 526, 224, 106, 492, 391, 391, 527, 527, 527, 527, 527, 527, 527, 527, 528, 528, 98, 529, 529, 529, 529, 529, 530, 530, 530, 530, 530, 530, 530, 530, 563, 563, 563, 563, 563, 564, 529, 529, 529, 529, 529, 533, 534, 535, 533, 533, 533, 533, 533, 203, 159, 160, 536, 536, 536, 536, 536, 609, 609, 529, 529, 529, 529, 529, 529, 529, 529, 154, 528, 154, 147, 536, 536, 536, 536, 536, 172, 539, 539, 539, 539, 539, 540, 537, 537, 121, 145, 542, 543, 544, 542, 542, 542, 542, 542, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 545, 545, 545, 545, 545, 545, 545, 545, 545, 545, 509, 201, 546, 546, 546, 547, 391, 548, 548, 548, 548, 548, 548, 548, 548, 547, 528, 549, 549, 549, 549, 549, 549, 549, 549, 200, 196, 121, 128, 547, 122, 550, 550, 550, 550, 550, 551, 548, 548, 85, 126, 519, 519, 519, 519, 519, 519, 519, 519, 552, 189, 555, 555, 555, 555, 555, 556, 553, 553, 536, 536, 536, 536, 536, 536, 536, 536, 391, 122, 559, 559, 559, 559, 559, 559, 559, 559, 528, 391, 181, 559, 559, 559, 559, 559, 559, 180, 176, 528, 391, 106, 560, 560, 560, 560, 560, 560, 560, 560, 546, 546, 546, 561, 561, 561, 561, 561, 562, 562, 562, 562, 562, 562, 562, 562, 587, 587, 587, 587, 587, 587, 561, 561, 561, 561, 561, 609, 122, 561, 561, 561, 561, 561, 561, 561, 561, 172, 537, 537, 537, 537, 537, 537, 565, 85, 566, 566, 566, 566, 566, 566, 566, 566, 565, 106, 567, 567, 567, 567, 567, 567, 567, 567, 565, 165, 568, 568, 568, 568, 568, 569, 566, 566, 121, 94, 545, 545, 545, 545, 545, 545, 545, 545, 570, 571, 572, 570, 570, 570, 570, 570, 547, 92, 548, 548, 548, 548, 548, 548, 548, 548, 547, 90, 548, 548, 548, 548, 548, 548, 548, 548, 86, 547, 88, 548, 548, 548, 548, 548, 548, 573, 574, 575, 573, 573, 573, 573, 573, 552, 87, 553, 553, 553, 553, 553, 553, 86, 160, 154, 147, 145, 391, 86, 578, 578, 578, 578, 578, 578, 578, 578, 579, 580, 581, 579, 579, 579, 579, 579, 565, 142, 566, 566, 566, 566, 566, 566, 566, 566, 565, 141, 566, 566, 566, 566, 566, 566, 566, 566, 122, 565, 140, 566, 566, 566, 566, 566, 566, 582, 139, 583, 583, 583, 583, 583, 583, 583, 583, 582, 128, 584, 584, 584, 584, 584, 584, 584, 584, 126, 582, 122, 585, 585, 585, 585, 585, 586, 583, 583, 587, 587, 587, 587, 587, 587, 587, 587, 588, 588, 588, 588, 588, 588, 588, 588, 589, 589, 589, 589, 589, 590, 587, 587, 592, 122, 593, 593, 593, 593, 593, 593, 593, 593, 592, 120, 594, 594, 594, 594, 594, 594, 594, 594, 592, 119, 595, 595, 595, 595, 595, 596, 593, 593, 85, 118, 597, 598, 599, 597, 597, 597, 597, 597, 582, 117, 583, 583, 583, 583, 583, 583, 583, 583, 582, 116, 583, 583, 583, 583, 583, 583, 583, 583, 582, 112, 583, 583, 583, 583, 583, 583, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 111, 110, 109, 106, 94, 121, 86, 600, 601, 602, 600, 600, 600, 600, 600, 592, 92, 593, 593, 593, 593, 593, 593, 593, 593, 592, 90, 593, 593, 593, 593, 593, 593, 593, 593, 592, 88, 593, 593, 593, 593, 593, 593, 603, 603, 603, 603, 603, 603, 603, 603, 597, 597, 597, 597, 597, 597, 597, 597, 87, 86, 609, 609, 609, 609, 122, 609, 609, 609, 609, 609, 86, 609, 609, 609, 609, 609, 609, 609, 86, 604, 604, 604, 604, 604, 605, 603, 603, 606, 606, 606, 606, 606, 606, 606, 606, 600, 600, 600, 600, 600, 600, 600, 600, 609, 609, 609, 609, 86, 609, 609, 609, 609, 609, 609, 609, 122, 603, 603, 603, 603, 603, 603, 609, 122, 607, 607, 607, 607, 607, 608, 606, 606, 603, 603, 603, 603, 603, 603, 603, 603, 609, 609, 609, 609, 86, 606, 606, 606, 606, 606, 606, 609, 122, 609, 609, 609, 609, 609, 609, 609, 86, 606, 606, 606, 606, 606, 606, 606, 606, 609, 609, 609, 609, 122, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 122, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 85, 609, 609, 609, 85, 609, 85, 85, 85, 85, 609, 85, 85, 85, 85, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 91, 609, 609, 609, 91, 609, 91, 91, 91, 91, 609, 91, 91, 91, 91, 93, 609, 609, 609, 93, 609, 93, 93, 93, 93, 609, 93, 93, 93, 93, 95, 609, 609, 95, 95, 609, 95, 95, 95, 95, 609, 95, 95, 95, 95, 105, 105, 105, 609, 609, 105, 121, 609, 609, 609, 121, 609, 121, 121, 121, 121, 609, 121, 121, 121, 121, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 125, 609, 609, 609, 125, 609, 125, 125, 125, 125, 609, 125, 125, 125, 125, 127, 609, 609, 609, 127, 609, 127, 127, 127, 127, 609, 127, 127, 127, 127, 129, 609, 609, 129, 129, 609, 129, 129, 129, 129, 609, 129, 129, 129, 129, 146, 609, 609, 146, 146, 146, 146, 146, 146, 146, 609, 146, 609, 146, 146, 153, 609, 609, 153, 153, 609, 153, 153, 153, 153, 153, 153, 153, 153, 153, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 159, 159, 609, 159, 609, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 96, 609, 609, 96, 96, 609, 96, 96, 96, 96, 609, 96, 96, 96, 96, 171, 171, 171, 609, 609, 171, 173, 173, 173, 173, 609, 609, 173, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 210, 210, 210, 609, 609, 210, 216, 216, 216, 216, 609, 609, 216, 251, 251, 251, 609, 609, 251, 252, 252, 252, 609, 609, 252, 256, 256, 256, 609, 609, 256, 258, 258, 258, 258, 609, 609, 258, 295, 295, 295, 609, 609, 295, 297, 297, 297, 609, 609, 297, 298, 298, 298, 609, 609, 298, 300, 300, 300, 300, 609, 609, 300, 304, 304, 304, 304, 304, 609, 609, 304, 339, 339, 339, 609, 609, 339, 340, 340, 340, 609, 609, 340, 341, 341, 341, 609, 609, 341, 353, 353, 353, 353, 609, 609, 353, 354, 354, 354, 354, 354, 609, 609, 354, 389, 389, 389, 609, 609, 389, 390, 390, 390, 609, 609, 390, 406, 406, 406, 406, 609, 609, 406, 407, 407, 407, 407, 407, 609, 609, 407, 436, 436, 436, 609, 609, 436, 440, 609, 440, 440, 440, 609, 609, 440, 458, 458, 458, 458, 609, 609, 458, 459, 459, 459, 459, 459, 609, 609, 459, 488, 488, 488, 609, 609, 488, 489, 609, 489, 489, 489, 609, 609, 489, 505, 505, 505, 505, 609, 609, 505, 506, 506, 506, 609, 506, 609, 609, 506, 524, 524, 524, 609, 609, 524, 525, 609, 525, 525, 525, 609, 609, 525, 541, 541, 609, 541, 609, 609, 541, 557, 557, 557, 609, 609, 557, 558, 609, 558, 558, 558, 609, 609, 558, 576, 576, 576, 609, 609, 576, 577, 609, 577, 609, 577, 609, 609, 577, 591, 609, 591, 609, 609, 591, 15, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609 } ; static yyconst short int yy_chk[3851] = { 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, 2, 2, 322, 5, 2, 71, 71, 5, 2, 5, 322, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 7, 7, 7, 6, 7, 6, 75, 8, 8, 8, 7, 8, 40, 13, 13, 13, 13, 8, 14, 14, 14, 14, 7, 7, 63, 75, 79, 79, 40, 8, 8, 26, 106, 606, 115, 26, 26, 77, 115, 81, 63, 106, 7, 29, 29, 29, 29, 29, 29, 8, 9, 9, 9, 26, 9, 13, 77, 186, 116, 186, 14, 28, 28, 28, 28, 28, 28, 28, 28, 116, 39, 26, 39, 39, 39, 39, 39, 39, 39, 39, 47, 81, 173, 47, 47, 47, 47, 47, 47, 47, 47, 173, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 117, 10, 53, 53, 53, 53, 53, 53, 53, 53, 54, 54, 54, 54, 54, 54, 62, 118, 62, 62, 62, 62, 62, 62, 62, 62, 84, 84, 144, 84, 110, 118, 144, 82, 183, 110, 117, 110, 183, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 148, 148, 182, 51, 11, 11, 11, 51, 51, 70, 70, 70, 82, 70, 182, 120, 140, 70, 11, 70, 120, 140, 95, 140, 119, 51, 95, 95, 151, 151, 603, 70, 70, 113, 113, 119, 162, 11, 12, 12, 12, 12, 12, 51, 95, 163, 163, 12, 12, 12, 86, 70, 86, 578, 86, 335, 86, 86, 208, 208, 86, 12, 95, 335, 98, 98, 98, 98, 98, 98, 98, 98, 86, 86, 86, 113, 162, 143, 143, 161, 12, 27, 205, 27, 27, 27, 27, 27, 27, 27, 27, 27, 98, 185, 27, 27, 27, 27, 27, 102, 102, 102, 102, 102, 102, 102, 102, 187, 185, 209, 576, 27, 205, 27, 27, 27, 27, 27, 32, 143, 187, 161, 32, 561, 32, 231, 231, 32, 32, 209, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 238, 238, 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, 158, 158, 34, 34, 34, 34, 34, 103, 103, 103, 103, 103, 103, 103, 103, 104, 104, 104, 104, 104, 104, 34, 34, 34, 34, 34, 38, 38, 38, 202, 38, 278, 38, 38, 216, 278, 38, 213, 213, 213, 129, 202, 158, 216, 129, 129, 279, 224, 38, 38, 38, 52, 235, 52, 52, 52, 52, 52, 52, 52, 52, 52, 129, 279, 52, 52, 52, 52, 52, 224, 560, 131, 131, 131, 131, 131, 131, 131, 131, 233, 129, 52, 235, 52, 52, 52, 52, 52, 55, 558, 230, 241, 55, 233, 55, 230, 557, 55, 55, 131, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 555, 241, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 57, 57, 57, 57, 57, 57, 57, 57, 57, 385, 554, 57, 57, 57, 57, 57, 134, 134, 134, 134, 134, 134, 134, 134, 136, 136, 136, 136, 136, 136, 57, 57, 57, 57, 57, 61, 61, 61, 385, 61, 258, 61, 61, 239, 92, 61, 92, 247, 92, 258, 92, 92, 247, 280, 92, 260, 260, 61, 61, 61, 154, 553, 280, 239, 154, 260, 92, 92, 92, 94, 154, 94, 324, 94, 541, 94, 94, 289, 97, 94, 97, 289, 97, 154, 97, 97, 539, 324, 97, 271, 317, 94, 94, 94, 168, 168, 168, 168, 168, 168, 97, 97, 97, 99, 99, 99, 99, 99, 99, 99, 99, 271, 317, 538, 99, 99, 99, 99, 99, 135, 135, 135, 135, 135, 135, 135, 135, 192, 192, 192, 192, 192, 192, 99, 99, 99, 99, 99, 107, 107, 107, 107, 107, 107, 107, 107, 232, 262, 262, 107, 107, 107, 107, 107, 122, 537, 122, 262, 122, 376, 122, 122, 525, 291, 122, 300, 232, 376, 107, 107, 107, 107, 107, 377, 300, 304, 122, 122, 122, 126, 524, 126, 232, 126, 304, 126, 126, 377, 128, 126, 128, 326, 128, 291, 128, 128, 305, 305, 128, 306, 306, 126, 126, 126, 165, 522, 305, 323, 165, 306, 128, 128, 128, 130, 165, 130, 323, 130, 477, 130, 130, 326, 521, 130, 308, 308, 165, 165, 220, 220, 220, 220, 220, 220, 308, 130, 130, 130, 132, 132, 132, 132, 132, 132, 132, 132, 388, 388, 477, 132, 132, 132, 132, 132, 167, 167, 167, 167, 167, 167, 167, 167, 268, 268, 268, 268, 268, 268, 132, 132, 132, 132, 132, 137, 137, 137, 137, 137, 137, 137, 137, 422, 508, 422, 137, 137, 137, 137, 137, 191, 191, 191, 191, 191, 191, 191, 191, 314, 314, 314, 314, 314, 314, 137, 137, 137, 137, 137, 166, 392, 166, 166, 166, 166, 166, 166, 166, 166, 320, 392, 506, 204, 204, 204, 204, 204, 204, 204, 204, 212, 212, 212, 212, 212, 212, 212, 212, 212, 166, 169, 320, 169, 169, 169, 169, 169, 169, 169, 169, 204, 428, 428, 169, 169, 169, 169, 169, 217, 217, 217, 217, 217, 217, 217, 217, 338, 338, 338, 338, 338, 338, 169, 169, 169, 169, 169, 172, 172, 172, 172, 172, 172, 172, 172, 172, 503, 375, 172, 172, 172, 172, 172, 219, 219, 219, 219, 219, 219, 219, 219, 321, 375, 435, 435, 435, 502, 172, 172, 172, 172, 172, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 489, 321, 174, 174, 174, 174, 174, 222, 353, 222, 222, 222, 222, 222, 222, 222, 222, 353, 488, 383, 330, 174, 174, 174, 174, 174, 175, 175, 175, 175, 175, 175, 175, 175, 383, 461, 461, 175, 175, 175, 175, 175, 330, 234, 234, 234, 234, 234, 234, 234, 234, 333, 486, 354, 462, 462, 175, 175, 175, 175, 175, 190, 354, 190, 190, 190, 190, 190, 190, 190, 190, 234, 248, 333, 248, 248, 248, 248, 248, 248, 248, 248, 253, 253, 253, 253, 253, 253, 253, 253, 253, 190, 193, 394, 193, 193, 193, 193, 193, 193, 193, 193, 406, 394, 485, 193, 193, 193, 193, 193, 249, 406, 249, 249, 249, 249, 249, 249, 249, 249, 475, 475, 475, 484, 193, 193, 193, 193, 193, 195, 195, 195, 195, 195, 195, 195, 195, 407, 507, 507, 195, 195, 195, 195, 195, 250, 407, 250, 250, 250, 250, 250, 250, 250, 250, 423, 649, 423, 649, 195, 195, 195, 195, 195, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 423, 456, 218, 218, 218, 218, 218, 259, 259, 259, 259, 259, 259, 259, 259, 334, 564, 564, 626, 626, 455, 218, 218, 218, 218, 218, 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, 454, 334, 221, 221, 221, 221, 221, 261, 261, 261, 261, 261, 261, 261, 261, 345, 345, 345, 345, 345, 345, 221, 221, 221, 221, 221, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 671, 671, 263, 263, 263, 263, 263, 265, 265, 265, 265, 265, 265, 265, 265, 367, 371, 265, 650, 440, 650, 263, 263, 263, 263, 263, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, 367, 371, 266, 266, 266, 266, 266, 267, 267, 267, 267, 267, 267, 267, 267, 364, 364, 364, 364, 364, 364, 266, 266, 266, 266, 266, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 672, 672, 269, 269, 269, 269, 269, 270, 425, 270, 270, 270, 270, 270, 270, 270, 270, 355, 355, 438, 437, 269, 269, 269, 269, 269, 281, 355, 281, 281, 281, 281, 281, 281, 281, 281, 282, 425, 282, 282, 282, 282, 282, 282, 282, 282, 283, 436, 283, 283, 283, 283, 283, 283, 283, 283, 290, 290, 290, 290, 290, 290, 290, 290, 292, 441, 292, 292, 292, 292, 292, 292, 292, 292, 293, 441, 293, 293, 293, 293, 293, 293, 293, 293, 290, 294, 431, 294, 294, 294, 294, 294, 294, 303, 421, 303, 303, 303, 303, 303, 303, 303, 303, 307, 307, 307, 307, 307, 307, 307, 307, 470, 404, 510, 548, 294, 299, 299, 299, 299, 299, 299, 299, 299, 299, 470, 403, 299, 299, 299, 299, 299, 311, 311, 311, 311, 311, 311, 311, 311, 373, 419, 311, 510, 548, 390, 299, 299, 299, 299, 299, 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, 373, 419, 309, 309, 309, 309, 309, 313, 313, 313, 313, 313, 313, 313, 313, 380, 380, 380, 380, 380, 380, 309, 309, 309, 309, 309, 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, 389, 382, 312, 312, 312, 312, 312, 316, 442, 316, 316, 316, 316, 316, 316, 316, 316, 634, 442, 381, 634, 312, 312, 312, 312, 312, 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, 370, 369, 315, 315, 315, 315, 315, 325, 325, 325, 325, 325, 325, 325, 325, 351, 350, 356, 356, 349, 341, 315, 315, 315, 315, 315, 329, 356, 329, 329, 329, 329, 329, 329, 327, 325, 327, 327, 327, 327, 327, 327, 327, 327, 328, 444, 328, 328, 328, 328, 328, 328, 328, 328, 566, 444, 329, 336, 336, 336, 336, 336, 336, 336, 336, 336, 337, 337, 337, 337, 337, 337, 337, 337, 342, 342, 342, 342, 342, 342, 342, 342, 340, 659, 566, 659, 336, 343, 490, 343, 343, 343, 343, 343, 343, 343, 343, 343, 490, 339, 343, 343, 343, 343, 343, 344, 344, 344, 344, 344, 344, 344, 344, 400, 400, 400, 400, 400, 400, 343, 343, 343, 343, 343, 346, 346, 346, 346, 346, 346, 346, 346, 346, 332, 331, 346, 346, 346, 346, 346, 347, 458, 347, 347, 347, 347, 347, 347, 347, 347, 458, 660, 319, 660, 346, 346, 346, 346, 346, 348, 348, 348, 348, 348, 348, 348, 348, 352, 318, 352, 352, 352, 352, 352, 352, 357, 357, 357, 357, 357, 357, 357, 357, 358, 358, 363, 363, 363, 363, 363, 363, 363, 363, 358, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 302, 301, 359, 359, 359, 359, 359, 361, 361, 361, 361, 361, 361, 361, 361, 420, 429, 361, 663, 298, 663, 359, 359, 359, 359, 359, 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, 420, 429, 362, 362, 362, 362, 362, 366, 459, 366, 366, 366, 366, 366, 366, 366, 366, 459, 664, 297, 664, 362, 362, 362, 362, 362, 365, 365, 365, 365, 365, 365, 365, 365, 365, 674, 296, 674, 365, 365, 365, 365, 365, 379, 379, 379, 379, 379, 379, 379, 379, 417, 417, 417, 417, 417, 417, 365, 365, 365, 365, 365, 378, 378, 378, 378, 378, 378, 378, 378, 378, 384, 384, 384, 384, 384, 384, 384, 384, 391, 391, 391, 391, 391, 391, 391, 391, 408, 408, 295, 675, 378, 675, 288, 287, 286, 285, 408, 430, 384, 393, 393, 393, 393, 393, 393, 393, 393, 395, 466, 395, 395, 395, 395, 395, 395, 395, 395, 395, 397, 430, 397, 397, 397, 397, 397, 397, 284, 277, 397, 398, 466, 398, 398, 398, 398, 398, 398, 398, 398, 398, 276, 275, 398, 398, 398, 398, 398, 399, 399, 399, 399, 399, 399, 399, 399, 450, 450, 450, 450, 450, 450, 398, 398, 398, 398, 398, 401, 401, 401, 401, 401, 401, 401, 401, 401, 274, 273, 401, 401, 401, 401, 401, 402, 257, 402, 402, 402, 402, 402, 402, 402, 402, 409, 409, 256, 255, 401, 401, 401, 401, 401, 405, 409, 405, 405, 405, 405, 405, 405, 405, 405, 410, 410, 410, 410, 410, 410, 410, 410, 411, 411, 416, 416, 416, 416, 416, 416, 416, 416, 411, 412, 412, 412, 412, 412, 412, 412, 412, 412, 412, 412, 254, 252, 412, 412, 412, 412, 412, 414, 414, 414, 414, 414, 414, 414, 414, 468, 251, 414, 246, 245, 244, 412, 412, 412, 412, 412, 415, 415, 415, 415, 415, 415, 415, 415, 415, 415, 243, 468, 242, 415, 415, 415, 415, 415, 418, 491, 418, 418, 418, 418, 418, 418, 418, 418, 240, 491, 229, 583, 415, 415, 415, 415, 415, 424, 424, 424, 424, 424, 424, 424, 424, 433, 433, 433, 433, 433, 433, 433, 433, 434, 434, 434, 434, 434, 434, 434, 434, 583, 228, 227, 593, 424, 432, 493, 432, 432, 432, 432, 432, 432, 432, 432, 439, 493, 439, 439, 439, 439, 439, 439, 439, 439, 443, 443, 443, 443, 443, 443, 443, 443, 593, 226, 432, 445, 225, 445, 445, 445, 445, 445, 445, 445, 445, 445, 447, 223, 447, 447, 447, 447, 447, 447, 215, 214, 447, 448, 526, 448, 448, 448, 448, 448, 448, 448, 448, 448, 526, 211, 448, 448, 448, 448, 448, 449, 449, 449, 449, 449, 449, 449, 449, 499, 499, 499, 499, 499, 499, 448, 448, 448, 448, 448, 451, 451, 451, 451, 451, 451, 451, 451, 451, 210, 203, 451, 451, 451, 451, 451, 452, 505, 452, 452, 452, 452, 452, 452, 452, 452, 505, 201, 200, 199, 451, 451, 451, 451, 451, 453, 453, 453, 453, 453, 453, 453, 453, 457, 198, 457, 457, 457, 457, 457, 457, 460, 460, 465, 465, 465, 465, 465, 465, 465, 465, 460, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 472, 197, 472, 472, 472, 472, 472, 472, 472, 472, 473, 473, 473, 473, 473, 473, 473, 473, 474, 474, 474, 474, 474, 474, 474, 474, 196, 520, 520, 520, 472, 476, 476, 476, 476, 476, 476, 476, 476, 478, 478, 478, 478, 478, 478, 478, 478, 479, 479, 479, 479, 479, 479, 479, 479, 520, 194, 188, 184, 476, 480, 480, 480, 480, 480, 480, 480, 480, 481, 481, 481, 481, 481, 481, 481, 481, 482, 181, 482, 482, 482, 483, 483, 483, 483, 483, 483, 483, 483, 487, 180, 487, 487, 487, 487, 487, 487, 492, 492, 492, 492, 492, 492, 492, 492, 179, 482, 494, 178, 494, 494, 494, 494, 494, 494, 494, 494, 494, 496, 177, 496, 496, 496, 496, 496, 496, 176, 171, 496, 497, 527, 497, 497, 497, 497, 497, 497, 497, 497, 497, 527, 170, 497, 497, 497, 497, 497, 498, 498, 498, 498, 498, 498, 498, 498, 535, 535, 535, 535, 535, 535, 497, 497, 497, 497, 497, 500, 500, 500, 500, 500, 500, 500, 500, 164, 160, 159, 500, 500, 500, 500, 500, 501, 529, 501, 501, 501, 501, 501, 501, 501, 501, 157, 529, 153, 147, 500, 500, 500, 500, 500, 504, 504, 504, 504, 504, 504, 504, 504, 504, 509, 145, 509, 509, 509, 509, 509, 509, 509, 509, 511, 511, 511, 511, 511, 511, 511, 511, 512, 512, 512, 512, 512, 512, 512, 512, 513, 513, 513, 513, 513, 513, 513, 513, 514, 514, 514, 514, 514, 514, 514, 514, 515, 142, 515, 515, 515, 516, 559, 516, 516, 516, 516, 516, 516, 516, 516, 517, 559, 517, 517, 517, 517, 517, 517, 517, 517, 141, 139, 133, 127, 518, 515, 518, 518, 518, 518, 518, 518, 518, 518, 519, 125, 519, 519, 519, 519, 519, 519, 519, 519, 523, 123, 523, 523, 523, 523, 523, 523, 523, 523, 528, 528, 528, 528, 528, 528, 528, 528, 530, 121, 530, 530, 530, 530, 530, 530, 530, 530, 530, 532, 112, 532, 532, 532, 532, 532, 532, 111, 109, 532, 533, 105, 533, 533, 533, 533, 533, 533, 533, 533, 546, 546, 546, 533, 533, 533, 533, 533, 534, 534, 534, 534, 534, 534, 534, 534, 590, 590, 590, 590, 590, 590, 533, 533, 533, 533, 533, 536, 546, 536, 536, 536, 536, 536, 536, 536, 536, 540, 540, 540, 540, 540, 540, 540, 542, 101, 542, 542, 542, 542, 542, 542, 542, 542, 543, 100, 543, 543, 543, 543, 543, 543, 543, 543, 544, 96, 544, 544, 544, 544, 544, 544, 544, 544, 545, 93, 545, 545, 545, 545, 545, 545, 545, 545, 547, 547, 547, 547, 547, 547, 547, 547, 549, 91, 549, 549, 549, 549, 549, 549, 549, 549, 550, 89, 550, 550, 550, 550, 550, 550, 550, 550, 547, 551, 88, 551, 551, 551, 551, 551, 551, 552, 552, 552, 552, 552, 552, 552, 552, 556, 87, 556, 556, 556, 556, 556, 556, 85, 80, 73, 67, 64, 562, 551, 562, 562, 562, 562, 562, 562, 562, 562, 565, 565, 565, 565, 565, 565, 565, 565, 567, 60, 567, 567, 567, 567, 567, 567, 567, 567, 568, 59, 568, 568, 568, 568, 568, 568, 568, 568, 565, 569, 58, 569, 569, 569, 569, 569, 569, 570, 56, 570, 570, 570, 570, 570, 570, 570, 570, 571, 50, 571, 571, 571, 571, 571, 571, 571, 571, 48, 572, 569, 572, 572, 572, 572, 572, 572, 572, 572, 573, 573, 573, 573, 573, 573, 573, 573, 574, 574, 574, 574, 574, 574, 574, 574, 575, 575, 575, 575, 575, 575, 575, 575, 579, 46, 579, 579, 579, 579, 579, 579, 579, 579, 580, 45, 580, 580, 580, 580, 580, 580, 580, 580, 581, 44, 581, 581, 581, 581, 581, 581, 581, 581, 582, 43, 582, 582, 582, 582, 582, 582, 582, 582, 584, 42, 584, 584, 584, 584, 584, 584, 584, 584, 585, 41, 585, 585, 585, 585, 585, 585, 585, 585, 586, 37, 586, 586, 586, 586, 586, 586, 588, 588, 588, 588, 588, 588, 588, 588, 589, 589, 589, 589, 589, 589, 589, 589, 36, 35, 33, 30, 24, 592, 586, 592, 592, 592, 592, 592, 592, 592, 592, 594, 21, 594, 594, 594, 594, 594, 594, 594, 594, 595, 20, 595, 595, 595, 595, 595, 595, 595, 595, 596, 19, 596, 596, 596, 596, 596, 596, 597, 597, 597, 597, 597, 597, 597, 597, 598, 598, 598, 598, 598, 598, 598, 598, 17, 16, 15, 0, 0, 0, 596, 0, 0, 0, 0, 0, 597, 0, 0, 0, 0, 0, 0, 0, 598, 599, 599, 599, 599, 599, 599, 599, 599, 600, 600, 600, 600, 600, 600, 600, 600, 601, 601, 601, 601, 601, 601, 601, 601, 0, 0, 0, 0, 599, 0, 0, 0, 0, 0, 0, 0, 600, 605, 605, 605, 605, 605, 605, 0, 601, 602, 602, 602, 602, 602, 602, 602, 602, 604, 604, 604, 604, 604, 604, 604, 604, 0, 0, 0, 0, 605, 608, 608, 608, 608, 608, 608, 0, 602, 0, 0, 0, 0, 0, 0, 0, 604, 607, 607, 607, 607, 607, 607, 607, 607, 0, 0, 0, 0, 608, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 607, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 614, 0, 0, 0, 614, 0, 614, 614, 614, 614, 0, 614, 614, 614, 614, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 616, 0, 0, 0, 616, 0, 616, 616, 616, 616, 0, 616, 616, 616, 616, 617, 0, 0, 0, 617, 0, 617, 617, 617, 617, 0, 617, 617, 617, 617, 618, 0, 0, 618, 618, 0, 618, 618, 618, 618, 0, 618, 618, 618, 618, 619, 619, 619, 0, 0, 619, 620, 0, 0, 0, 620, 0, 620, 620, 620, 620, 0, 620, 620, 620, 620, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 622, 0, 0, 0, 622, 0, 622, 622, 622, 622, 0, 622, 622, 622, 622, 623, 0, 0, 0, 623, 0, 623, 623, 623, 623, 0, 623, 623, 623, 623, 624, 0, 0, 624, 624, 0, 624, 624, 624, 624, 0, 624, 624, 624, 624, 625, 0, 0, 625, 625, 625, 625, 625, 625, 625, 0, 625, 0, 625, 625, 627, 0, 0, 627, 627, 0, 627, 627, 627, 627, 627, 627, 627, 627, 627, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 629, 629, 0, 629, 0, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 630, 0, 0, 630, 630, 0, 630, 630, 630, 630, 0, 630, 630, 630, 630, 631, 631, 631, 0, 0, 631, 632, 632, 632, 632, 0, 0, 632, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 635, 635, 635, 0, 0, 635, 636, 636, 636, 636, 0, 0, 636, 637, 637, 637, 0, 0, 637, 638, 638, 638, 0, 0, 638, 639, 639, 639, 0, 0, 639, 640, 640, 640, 640, 0, 0, 640, 641, 641, 641, 0, 0, 641, 642, 642, 642, 0, 0, 642, 643, 643, 643, 0, 0, 643, 644, 644, 644, 644, 0, 0, 644, 645, 645, 645, 645, 645, 0, 0, 645, 646, 646, 646, 0, 0, 646, 647, 647, 647, 0, 0, 647, 648, 648, 648, 0, 0, 648, 651, 651, 651, 651, 0, 0, 651, 652, 652, 652, 652, 652, 0, 0, 652, 653, 653, 653, 0, 0, 653, 654, 654, 654, 0, 0, 654, 655, 655, 655, 655, 0, 0, 655, 656, 656, 656, 656, 656, 0, 0, 656, 657, 657, 657, 0, 0, 657, 658, 0, 658, 658, 658, 0, 0, 658, 661, 661, 661, 661, 0, 0, 661, 662, 662, 662, 662, 662, 0, 0, 662, 665, 665, 665, 0, 0, 665, 666, 0, 666, 666, 666, 0, 0, 666, 667, 667, 667, 667, 0, 0, 667, 668, 668, 668, 0, 668, 0, 0, 668, 669, 669, 669, 0, 0, 669, 670, 0, 670, 670, 670, 0, 0, 670, 673, 673, 0, 673, 0, 0, 673, 676, 676, 676, 0, 0, 676, 677, 0, 677, 677, 677, 0, 0, 677, 678, 678, 678, 0, 0, 678, 679, 0, 679, 0, 679, 0, 0, 679, 680, 0, 680, 0, 0, 680, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609 } ; 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 "parse.lex" #define INITIAL 0 #line 2 "parse.lex" /* * Copyright (c) 1996, 1998-2004, 2007 * Todd C. Miller * * 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 #include #include #include #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif /* STDC_HEADERS */ #ifdef HAVE_STRING_H # include #else # ifdef HAVE_STRINGS_H # include # endif #endif /* HAVE_STRING_H */ #ifdef HAVE_UNISTD_H # include #endif /* HAVE_UNISTD_H */ #if defined(HAVE_MALLOC_H) && !defined(STDC_HEADERS) # include #endif /* HAVE_MALLOC_H && !STDC_HEADERS */ #include #include "sudo.h" #include "parse.h" #include #ifndef lint __unused static const char rcsid[] = "$Sudo: lex.yy.c,v 1.46.2.11 2008/06/26 11:53:49 millert Exp $"; #endif /* lint */ #undef yywrap /* guard against a yywrap macro */ extern YYSTYPE yylval; extern int clearaliases; int sudolineno = 1; static int sawspace = 0; static int arg_len = 0; static int arg_size = 0; static int ipv6_valid __P((const char *s)); static void _fill __P((char *, int, int)); static void append __P((char *, int)); static void fill_cmnd __P((char *, int)); static void fill_args __P((char *, int, int)); extern void reset_aliases __P((void)); extern void yyerror __P((char *)); #define fill(a, b) _fill(a, b, 0) /* 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 /* XXX - convert GOTRUNAS to exclusive state (GOTDEFS cannot be) */ #define GOTRUNAS 1 #define GOTDEFS 2 #define GOTCMND 3 #define STARTDEFS 4 #define INDEFS 5 #define INSTR 6 #line 1527 "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 #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 108 "parse.lex" #line 1683 "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 >= 610 ) 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] != 3790 ); 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 109 "parse.lex" BEGIN STARTDEFS; YY_BREAK case 2: YY_RULE_SETUP #line 111 "parse.lex" { BEGIN INDEFS; LEXTRACE("DEFVAR "); fill(yytext, yyleng); return(DEFVAR); } YY_BREAK case 3: YY_RULE_SETUP #line 119 "parse.lex" { BEGIN STARTDEFS; LEXTRACE(", "); return(','); } /* return ',' */ YY_BREAK case 4: YY_RULE_SETUP #line 125 "parse.lex" { LEXTRACE("= "); return('='); } /* return '=' */ YY_BREAK case 5: YY_RULE_SETUP #line 130 "parse.lex" { LEXTRACE("+= "); return('+'); } /* return '+' */ YY_BREAK case 6: YY_RULE_SETUP #line 135 "parse.lex" { LEXTRACE("-= "); return('-'); } /* return '-' */ YY_BREAK case 7: YY_RULE_SETUP #line 140 "parse.lex" { LEXTRACE("BEGINSTR "); yylval.string = NULL; BEGIN INSTR; } YY_BREAK case 8: YY_RULE_SETUP #line 146 "parse.lex" { LEXTRACE("WORD(2) "); fill(yytext, yyleng); return(WORD); } YY_BREAK case 9: YY_RULE_SETUP #line 154 "parse.lex" { /* Line continuation char followed by newline. */ ++sudolineno; LEXTRACE("\n"); } YY_BREAK case 10: YY_RULE_SETUP #line 160 "parse.lex" { LEXTRACE("ENDSTR "); BEGIN INDEFS; return(WORD); } YY_BREAK case 11: YY_RULE_SETUP #line 166 "parse.lex" { LEXTRACE("BACKSLASH "); append(yytext, yyleng); } YY_BREAK case 12: YY_RULE_SETUP #line 171 "parse.lex" { LEXTRACE("STRBODY "); append(yytext, yyleng); } YY_BREAK case 13: YY_RULE_SETUP #line 178 "parse.lex" { /* quoted fnmatch glob char, pass verbatim */ LEXTRACE("QUOTEDCHAR "); fill_args(yytext, 2, sawspace); sawspace = FALSE; } YY_BREAK case 14: YY_RULE_SETUP #line 185 "parse.lex" { /* quoted sudoers special char, strip backslash */ LEXTRACE("QUOTEDCHAR "); fill_args(yytext + 1, 1, sawspace); sawspace = FALSE; } YY_BREAK case 15: YY_RULE_SETUP #line 192 "parse.lex" { BEGIN INITIAL; unput(*yytext); return(COMMAND); } /* end of command line args */ YY_BREAK case 16: YY_RULE_SETUP #line 198 "parse.lex" { LEXTRACE("ARG "); fill_args(yytext, yyleng, sawspace); sawspace = FALSE; } /* a command line arg */ YY_BREAK case 17: YY_RULE_SETUP #line 205 "parse.lex" { BEGIN GOTDEFS; switch (yytext[8]) { case ':': LEXTRACE("DEFAULTS_USER "); return(DEFAULTS_USER); case '>': LEXTRACE("DEFAULTS_RUNAS "); return(DEFAULTS_RUNAS); case '@': LEXTRACE("DEFAULTS_HOST "); return(DEFAULTS_HOST); default: LEXTRACE("DEFAULTS "); return(DEFAULTS); } } YY_BREAK case 18: YY_RULE_SETUP #line 223 "parse.lex" { fill(yytext, yyleng); switch (*yytext) { case 'H': LEXTRACE("HOSTALIAS "); return(HOSTALIAS); case 'C': LEXTRACE("CMNDALIAS "); return(CMNDALIAS); case 'U': LEXTRACE("USERALIAS "); return(USERALIAS); case 'R': LEXTRACE("RUNASALIAS "); BEGIN GOTRUNAS; return(RUNASALIAS); } } YY_BREAK case 19: YY_RULE_SETUP #line 242 "parse.lex" { /* cmnd does not require passwd for this user */ LEXTRACE("NOPASSWD "); return(NOPASSWD); } YY_BREAK case 20: YY_RULE_SETUP #line 248 "parse.lex" { /* cmnd requires passwd for this user */ LEXTRACE("PASSWD "); return(PASSWD); } YY_BREAK case 21: YY_RULE_SETUP #line 254 "parse.lex" { LEXTRACE("NOEXEC "); return(NOEXEC); } YY_BREAK case 22: YY_RULE_SETUP #line 259 "parse.lex" { LEXTRACE("EXEC "); return(EXEC); } YY_BREAK case 23: YY_RULE_SETUP #line 264 "parse.lex" { LEXTRACE("SETENV "); return(SETENV); } YY_BREAK case 24: YY_RULE_SETUP #line 269 "parse.lex" { LEXTRACE("NOSETENV "); return(NOSETENV); } YY_BREAK case 25: YY_RULE_SETUP #line 274 "parse.lex" { /* netgroup */ fill(yytext, yyleng); LEXTRACE("NETGROUP "); return(NETGROUP); } YY_BREAK case 26: YY_RULE_SETUP #line 281 "parse.lex" { /* UN*X group */ fill(yytext, yyleng); LEXTRACE("GROUP "); return(USERGROUP); } YY_BREAK case 27: YY_RULE_SETUP #line 288 "parse.lex" { fill(yytext, yyleng); LEXTRACE("NTWKADDR "); return(NTWKADDR); } YY_BREAK case 28: YY_RULE_SETUP #line 294 "parse.lex" { fill(yytext, yyleng); LEXTRACE("NTWKADDR "); return(NTWKADDR); } YY_BREAK case 29: YY_RULE_SETUP #line 300 "parse.lex" { if (!ipv6_valid(yytext)) { LEXTRACE("ERROR "); return(ERROR); } fill(yytext, yyleng); LEXTRACE("NTWKADDR "); return(NTWKADDR); } YY_BREAK case 30: YY_RULE_SETUP #line 310 "parse.lex" { if (!ipv6_valid(yytext)) { LEXTRACE("ERROR "); return(ERROR); } fill(yytext, yyleng); LEXTRACE("NTWKADDR "); return(NTWKADDR); } YY_BREAK case 31: YY_RULE_SETUP #line 320 "parse.lex" { BEGIN GOTRUNAS; LEXTRACE("RUNAS "); return (RUNAS); } YY_BREAK case 32: YY_RULE_SETUP #line 326 "parse.lex" { 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 */ fill(yytext, yyleng); LEXTRACE("ALIAS "); return(ALIAS); } YY_BREAK case 33: YY_RULE_SETUP #line 347 "parse.lex" { /* username/uid that user can run command as */ fill(yytext, yyleng); LEXTRACE("WORD(3) "); return(WORD); } YY_BREAK case 34: YY_RULE_SETUP #line 354 "parse.lex" { BEGIN INITIAL; ++sudolineno; LEXTRACE("\n"); return(COMMENT); } YY_BREAK case 35: YY_RULE_SETUP #line 361 "parse.lex" { BEGIN INITIAL; } YY_BREAK case 36: YY_RULE_SETUP #line 365 "parse.lex" { BEGIN GOTCMND; LEXTRACE("COMMAND "); fill_cmnd(yytext, yyleng); } /* sudo -e */ YY_BREAK case 37: YY_RULE_SETUP #line 371 "parse.lex" { /* directories can't have args... */ if (yytext[yyleng - 1] == '/') { LEXTRACE("COMMAND "); fill_cmnd(yytext, yyleng); return(COMMAND); } else { BEGIN GOTCMND; LEXTRACE("COMMAND "); fill_cmnd(yytext, yyleng); } } /* a pathname */ YY_BREAK case 38: YY_RULE_SETUP #line 384 "parse.lex" { /* a word */ fill(yytext, yyleng); LEXTRACE("WORD(4) "); return(WORD); } YY_BREAK case 39: YY_RULE_SETUP #line 391 "parse.lex" { LEXTRACE(", "); return(','); } /* return ',' */ YY_BREAK case 40: YY_RULE_SETUP #line 396 "parse.lex" { LEXTRACE("= "); return('='); } /* return '=' */ YY_BREAK case 41: YY_RULE_SETUP #line 401 "parse.lex" { LEXTRACE(": "); return(':'); } /* return ':' */ YY_BREAK case 42: YY_RULE_SETUP #line 406 "parse.lex" { if (yyleng % 2 == 1) return('!'); /* return '!' */ } YY_BREAK case 43: YY_RULE_SETUP #line 411 "parse.lex" { BEGIN INITIAL; ++sudolineno; LEXTRACE("\n"); return(COMMENT); } /* return newline */ YY_BREAK case 44: YY_RULE_SETUP #line 418 "parse.lex" { /* throw away space/tabs */ sawspace = TRUE; /* but remember for fill_args */ } YY_BREAK case 45: YY_RULE_SETUP #line 422 "parse.lex" { sawspace = TRUE; /* remember for fill_args */ ++sudolineno; LEXTRACE("\n\t"); } /* throw away EOL after \ */ YY_BREAK case 46: YY_RULE_SETUP #line 428 "parse.lex" { BEGIN INITIAL; ++sudolineno; LEXTRACE("\n"); return(COMMENT); } /* return comments */ YY_BREAK case 47: YY_RULE_SETUP #line 435 "parse.lex" { LEXTRACE("ERROR "); return(ERROR); } /* parse error */ YY_BREAK case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(GOTRUNAS): 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 440 "parse.lex" { if (YY_START != INITIAL) { BEGIN INITIAL; LEXTRACE("ERROR "); return(ERROR); } yyterminate(); } YY_BREAK case 48: YY_RULE_SETUP #line 449 "parse.lex" ECHO; YY_BREAK #line 2261 "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 >= 610 ) 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 >= 610 ) 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 == 609); 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 #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 449 "parse.lex" static void _fill(src, len, olen) char *src; int len, olen; { int i, j; char *dst; dst = olen ? realloc(yylval.string, olen + len + 1) : malloc(len + 1); if (dst == NULL) { yyerror("unable to allocate memory"); return; } yylval.string = dst; /* Copy the string and collapse any escaped characters. */ dst += olen; for (i = 0, j = 0; i < len; i++, j++) { if (src[i] == '\\' && i != len - 1) dst[j] = src[++i]; else dst[j] = src[i]; } dst[j] = '\0'; } static void append(src, len) char *src; int len; { int olen = 0; if (yylval.string != NULL) olen = strlen(yylval.string); _fill(src, len, olen); } static void fill_cmnd(s, len) char *s; int len; { arg_len = arg_size = 0; yylval.command.cmnd = (char *) malloc(++len); if (yylval.command.cmnd == NULL) { yyerror("unable to allocate memory"); return; } /* copy the string and NULL-terminate it (escapes handled by fnmatch) */ (void) strlcpy(yylval.command.cmnd, s, len); yylval.command.args = NULL; } static void 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; } 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 */ arg_len = new_len; } /* * 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); } int yywrap() { /* Free space used by the aliases unless called by testsudoers. */ if (clearaliases) reset_aliases(); return(TRUE); }