2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 14:25:15 +00:00
Files
sudo/plugins/sudoers/toke.c
2011-03-17 15:06:55 -04:00

3512 lines
114 KiB
C

#include <config.h>
/* $OpenBSD: flex.skl,v 1.11 2010/08/04 18:24:50 millert Exp $ */
/* A lexical scanner generated by flex */
/* Scanner skeleton version:
* $Header: /cvs/src/usr.bin/lex/flex.skl,v 1.11 2010/08/04 18:24:50 millert 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 54
#define YY_END_OF_BUFFER 55
static yyconst short int yy_accept[589] =
{ 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 55, 42, 50, 49, 48, 41, 53, 42,
43, 44, 42, 45, 42, 42, 42, 42, 47, 46,
53, 37, 37, 37, 37, 37, 37, 37, 53, 42,
42, 50, 53, 37, 37, 37, 37, 37, 1, 53,
42, 42, 16, 15, 16, 15, 15, 53, 53, 53,
2, 8, 7, 8, 3, 8, 4, 53, 12, 12,
12, 10, 11, 42, 0, 50, 48, 0, 52, 0,
42, 32, 0, 0, 31, 0, 40, 40, 0, 42,
42, 0, 42, 42, 42, 42, 0, 35, 37, 37,
37, 37, 37, 37, 37, 42, 51, 42, 50, 0,
0, 0, 0, 0, 0, 42, 42, 42, 42, 42,
1, 0, 38, 38, 0, 42, 16, 16, 14, 13,
14, 0, 0, 2, 8, 0, 5, 6, 8, 8,
12, 0, 12, 12, 0, 9, 0, 0, 32, 0,
0, 42, 42, 42, 42, 42, 0, 0, 35, 35,
37, 37, 37, 37, 37, 37, 37, 37, 37, 42,
0, 0, 0, 0, 0, 0, 42, 42, 42, 42,
42, 0, 42, 9, 0, 42, 42, 42, 42, 42,
42, 0, 36, 36, 36, 0, 0, 35, 35, 35,
35, 35, 35, 35, 37, 37, 37, 37, 37, 37,
37, 37, 37, 42, 0, 0, 0, 0, 0, 0,
42, 42, 42, 42, 42, 42, 42, 0, 0, 36,
36, 36, 0, 35, 35, 0, 35, 35, 35, 35,
35, 35, 35, 35, 35, 35, 35, 0, 24, 37,
37, 37, 37, 37, 37, 37, 37, 42, 0, 0,
0, 0, 42, 42, 42, 42, 42, 42, 42, 42,
0, 36, 0, 35, 35, 35, 0, 0, 0, 35,
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
35, 35, 37, 37, 37, 37, 37, 37, 37, 37,
42, 0, 0, 0, 42, 42, 42, 33, 33, 33,
0, 0, 35, 35, 35, 35, 35, 35, 35, 0,
0, 0, 0, 0, 35, 35, 35, 35, 35, 35,
35, 35, 35, 35, 35, 35, 35, 35, 37, 37,
0, 23, 37, 37, 37, 37, 0, 22, 0, 25,
42, 0, 0, 0, 42, 42, 42, 42, 33, 33,
33, 33, 0, 35, 0, 35, 35, 35, 35, 35,
35, 35, 35, 35, 35, 35, 0, 0, 0, 35,
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
35, 35, 37, 37, 37, 37, 37, 37, 39, 0,
0, 0, 42, 19, 38, 42, 34, 34, 34, 35,
0, 0, 0, 35, 35, 35, 35, 35, 35, 35,
35, 35, 35, 35, 35, 35, 0, 0, 0, 0,
0, 35, 35, 35, 35, 35, 35, 35, 35, 37,
37, 37, 37, 0, 21, 0, 26, 0, 19, 0,
0, 42, 0, 42, 42, 42, 34, 34, 34, 34,
34, 0, 0, 0, 0, 0, 35, 35, 35, 35,
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
35, 35, 35, 35, 35, 35, 0, 29, 37, 37,
37, 0, 0, 0, 20, 19, 0, 0, 0, 19,
0, 42, 42, 42, 34, 34, 0, 0, 0, 35,
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
35, 35, 35, 35, 35, 35, 35, 0, 27, 37,
37, 20, 0, 17, 0, 42, 42, 42, 42, 42,
0, 0, 0, 0, 0, 35, 35, 35, 35, 35,
35, 35, 35, 0, 30, 37, 0, 42, 42, 42,
35, 35, 35, 35, 35, 35, 0, 28, 0, 42,
42, 42, 42, 42, 35, 35, 35, 35, 35, 0,
18, 33, 33, 33, 33, 33, 33, 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, 35, 36, 36, 37, 36, 38, 39, 40,
36, 41, 42, 43, 44, 45, 46, 47, 36, 36,
10, 48, 10, 1, 49, 1, 50, 51, 52, 53,
54, 55, 56, 56, 57, 56, 56, 58, 59, 60,
61, 56, 56, 62, 63, 64, 65, 56, 56, 56,
56, 56, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 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[66] =
{ 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, 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[653] =
{ 0,
0, 64, 65, 66, 72, 87, 134, 198, 262, 309,
83, 98, 2691, 2633, 2678, 3620, 2675, 3620, 355, 58,
3620, 3620, 2630, 3620, 113, 365, 131, 139, 2647, 3620,
3620, 420, 2622, 470, 2621, 2586, 2589, 2570, 524, 148,
44, 175, 548, 2536, 2540, 2532, 2527, 2514, 2560, 204,
275, 59, 0, 3620, 2551, 3620, 0, 292, 603, 111,
0, 2506, 3620, 79, 3620, 85, 3620, 113, 2505, 71,
75, 3620, 139, 2495, 625, 2530, 2525, 2525, 3620, 212,
220, 155, 2479, 323, 2470, 650, 397, 2460, 675, 343,
686, 2473, 2480, 487, 495, 194, 2469, 110, 726, 0,
2451, 2449, 249, 2439, 2437, 170, 3620, 127, 542, 2414,
2417, 2401, 2362, 2361, 66, 222, 230, 82, 228, 29,
2421, 536, 534, 2374, 780, 128, 0, 2417, 205, 3620,
3620, 571, 269, 0, 2372, 331, 3620, 3620, 2354, 290,
2344, 2369, 130, 293, 275, 2350, 2348, 2347, 2286, 805,
572, 818, 853, 888, 923, 2305, 2288, 963, 275, 1004,
1044, 2281, 2261, 2242, 2247, 2249, 2235, 2224, 2222, 257,
2190, 2194, 2183, 2184, 2189, 300, 271, 2192, 278, 258,
282, 636, 306, 2230, 2216, 591, 332, 1086, 1121, 649,
221, 2187, 2185, 672, 382, 2184, 2183, 285, 703, 1156,
711, 391, 1197, 745, 2181, 345, 316, 2152, 2148, 2138,
2135, 2131, 2138, 291, 2088, 2090, 2074, 2087, 2057, 367,
355, 553, 366, 374, 1239, 1274, 1309, 2094, 2093, 777,
2043, 2041, 2040, 2024, 516, 802, 621, 826, 629, 1344,
0, 836, 1355, 861, 753, 1396, 871, 422, 3620, 2009,
2002, 2012, 1977, 1983, 1982, 1969, 1934, 493, 1929, 1912,
1881, 516, 115, 487, 527, 899, 378, 1438, 1473, 909,
1903, 1901, 1900, 1899, 1506, 580, 942, 982, 1023, 617,
658, 736, 1061, 788, 1548, 0, 1096, 1559, 1069, 879,
1600, 1105, 1882, 1878, 561, 563, 1859, 1866, 662, 711,
811, 1858, 1826, 494, 599, 551, 855, 1641, 1675, 1709,
1840, 1839, 1809, 1129, 1744, 1137, 950, 1784, 1175, 1145,
1815, 1216, 1249, 1259, 909, 973, 1230, 1284, 1284, 1295,
1826, 0, 1297, 1837, 1317, 990, 1878, 1327, 1783, 1771,
751, 3620, 1772, 1726, 1724, 1675, 862, 3620, 911, 3620,
884, 1643, 1521, 860, 981, 886, 983, 1373, 663, 1919,
1953, 1382, 1525, 1493, 1415, 802, 1446, 1176, 1988, 0,
473, 1999, 1454, 1032, 2039, 1483, 1493, 1525, 1578, 1207,
1259, 1429, 1464, 1617, 1651, 2081, 0, 1653, 2092, 1625,
1335, 1662, 1399, 1298, 1284, 1246, 948, 988, 1237, 1207,
1138, 1128, 662, 1695, 1151, 2134, 2169, 2204, 2239, 1112,
1686, 1719, 1730, 1108, 1415, 1484, 1694, 1526, 2274, 0,
768, 2285, 1761, 1464, 2325, 1803, 1769, 1087, 1856, 1897,
1929, 1569, 1730, 1888, 813, 847, 2367, 0, 1046, 1069,
987, 945, 898, 1180, 3620, 1181, 3620, 881, 1527, 1517,
614, 1070, 1198, 1236, 1935, 1272, 2377, 2412, 2447, 2482,
1814, 1943, 851, 1968, 2018, 1978, 834, 809, 1745, 1857,
2056, 1979, 2517, 0, 1201, 2528, 2064, 1586, 2568, 2111,
2143, 2152, 2178, 1794, 800, 1228, 1380, 3620, 1421, 765,
743, 720, 749, 1067, 650, 1878, 1976, 2040, 2204, 2131,
2239, 2610, 2645, 2680, 2252, 1670, 2217, 2262, 2304, 661,
622, 2019, 2102, 2342, 2125, 2715, 0, 1259, 2726, 2350,
2312, 2387, 625, 2396, 2421, 2430, 613, 1531, 3620, 1584,
560, 3620, 597, 3620, 1378, 2436, 1374, 2768, 2803, 2458,
2469, 565, 2493, 2503, 2547, 538, 513, 2190, 520, 418,
2587, 0, 1418, 1625, 3620, 1732, 2200, 2838, 2873, 2908,
2553, 2618, 2626, 366, 0, 339, 1769, 3620, 347, 2634,
1504, 2943, 2978, 2656, 3620, 2667, 2689, 2595, 3620, 304,
3620, 2702, 2744, 2752, 126, 2785, 2793, 3620, 3026, 3040,
3054, 3068, 3082, 3096, 3110, 3124, 3138, 3144, 3158, 3172,
1612, 3186, 3200, 3214, 3228, 3242, 3256, 3270, 3276, 3283,
3297, 3311, 3317, 3324, 3330, 3336, 3342, 3349, 3355, 3361,
3367, 3374, 3382, 3388, 3394, 3400, 3407, 3415, 3421, 3427,
3434, 3442, 3448, 3456, 3463, 3471, 3477, 3485, 3492, 3500,
3514, 3528, 3534, 3542, 3549, 3563, 3569, 3577, 3583, 3591,
1871, 3605
} ;
static yyconst short int yy_def[653] =
{ 0,
588, 1, 1, 1, 589, 589, 590, 590, 591, 591,
592, 592, 588, 593, 588, 588, 588, 588, 594, 595,
588, 588, 596, 588, 597, 593, 26, 26, 598, 588,
588, 588, 32, 32, 34, 34, 34, 34, 593, 26,
593, 588, 594, 32, 32, 34, 34, 34, 588, 588,
599, 593, 600, 588, 600, 588, 600, 588, 594, 588,
601, 602, 588, 602, 588, 602, 588, 603, 604, 604,
604, 588, 588, 593, 593, 588, 588, 605, 588, 606,
588, 595, 607, 595, 596, 596, 597, 608, 593, 593,
26, 598, 91, 91, 91, 91, 609, 610, 32, 34,
34, 34, 34, 34, 34, 593, 588, 593, 588, 588,
588, 588, 588, 588, 605, 593, 91, 593, 593, 593,
588, 588, 599, 611, 593, 593, 600, 600, 588, 588,
588, 606, 588, 601, 602, 602, 588, 588, 602, 602,
604, 588, 604, 604, 588, 588, 605, 612, 607, 607,
588, 593, 593, 593, 91, 155, 613, 588, 614, 588,
32, 34, 34, 34, 34, 34, 34, 34, 34, 593,
588, 588, 588, 588, 588, 605, 593, 155, 593, 593,
593, 588, 593, 588, 612, 593, 593, 593, 593, 593,
593, 615, 616, 616, 194, 617, 616, 618, 160, 588,
200, 200, 588, 200, 34, 34, 34, 34, 34, 34,
34, 34, 34, 593, 588, 588, 588, 588, 588, 605,
593, 593, 593, 593, 593, 593, 593, 588, 619, 619,
230, 619, 620, 621, 622, 588, 623, 203, 623, 623,
240, 623, 588, 243, 243, 588, 243, 588, 588, 34,
34, 34, 34, 34, 34, 34, 34, 593, 588, 588,
588, 605, 593, 593, 593, 593, 593, 593, 593, 593,
624, 624, 625, 626, 588, 588, 588, 588, 588, 627,
627, 628, 246, 628, 628, 285, 628, 588, 288, 288,
588, 288, 34, 34, 34, 34, 34, 34, 34, 34,
593, 588, 588, 605, 593, 593, 593, 593, 593, 593,
588, 629, 630, 275, 588, 315, 315, 588, 315, 588,
588, 588, 588, 588, 588, 631, 631, 632, 291, 632,
632, 331, 632, 588, 334, 334, 588, 334, 34, 34,
588, 588, 34, 34, 34, 34, 588, 588, 588, 588,
593, 588, 588, 605, 593, 593, 593, 593, 593, 593,
593, 593, 588, 633, 588, 634, 318, 634, 634, 369,
369, 588, 372, 372, 588, 372, 588, 588, 588, 588,
635, 635, 636, 337, 636, 636, 386, 636, 588, 389,
389, 389, 34, 34, 34, 34, 34, 34, 593, 588,
588, 605, 593, 593, 593, 593, 593, 593, 593, 588,
588, 588, 588, 637, 637, 638, 375, 638, 638, 419,
419, 588, 422, 422, 588, 422, 588, 588, 588, 588,
588, 588, 639, 639, 640, 640, 640, 437, 437, 34,
34, 34, 34, 588, 588, 588, 588, 588, 588, 605,
605, 593, 641, 642, 593, 593, 593, 593, 593, 593,
593, 588, 588, 588, 588, 588, 588, 643, 643, 644,
425, 644, 644, 473, 473, 588, 476, 476, 588, 476,
588, 588, 588, 588, 645, 645, 588, 588, 34, 34,
34, 588, 646, 605, 593, 641, 641, 641, 641, 642,
642, 593, 593, 593, 593, 593, 588, 588, 588, 588,
647, 647, 648, 479, 648, 648, 516, 516, 588, 519,
519, 519, 588, 588, 588, 588, 588, 588, 588, 34,
34, 588, 646, 588, 605, 593, 593, 593, 593, 593,
588, 588, 588, 588, 588, 588, 649, 649, 650, 650,
650, 551, 551, 588, 588, 34, 605, 593, 593, 593,
588, 588, 588, 588, 651, 651, 588, 588, 652, 593,
593, 593, 593, 593, 588, 588, 588, 588, 588, 652,
588, 593, 593, 593, 593, 593, 593, 0, 588, 588,
588, 588, 588, 588, 588, 588, 588, 588, 588, 588,
588, 588, 588, 588, 588, 588, 588, 588, 588, 588,
588, 588, 588, 588, 588, 588, 588, 588, 588, 588,
588, 588, 588, 588, 588, 588, 588, 588, 588, 588,
588, 588, 588, 588, 588, 588, 588, 588, 588, 588,
588, 588, 588, 588, 588, 588, 588, 588, 588, 588,
588, 588
} ;
static yyconst short int yy_nxt[3686] =
{ 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, 34, 34, 35, 36, 34, 37,
34, 38, 34, 34, 34, 34, 34, 39, 14, 40,
40, 40, 40, 40, 40, 14, 14, 14, 14, 14,
14, 14, 41, 14, 14, 42, 49, 49, 79, 43,
50, 50, 143, 15, 54, 55, 75, 56, 144, 51,
51, 83, 181, 56, 70, 16, 71, 72, 15, 54,
55, 75, 56, 44, 45, 56, 57, 46, 56, 70,
16, 71, 72, 137, 47, 84, 75, 48, 108, 138,
56, 57, 133, 107, 140, 107, 88, 88, 142, 58,
88, 88, 142, 126, 158, 176, 136, 52, 52, 75,
73, 143, 136, 160, 58, 15, 16, 17, 88, 59,
145, 146, 305, 141, 179, 73, 94, 94, 94, 94,
94, 94, 94, 94, 95, 95, 95, 95, 95, 96,
89, 74, 75, 93, 93, 93, 93, 93, 93, 93,
93, 133, 107, 75, 75, 75, 109, 142, 588, 170,
183, 60, 61, 61, 61, 61, 61, 61, 61, 61,
61, 61, 61, 61, 61, 61, 61, 61, 61, 15,
16, 17, 84, 59, 110, 111, 133, 107, 112, 156,
156, 156, 156, 156, 156, 113, 122, 75, 114, 81,
81, 81, 81, 81, 81, 81, 81, 81, 81, 81,
81, 81, 81, 81, 81, 81, 81, 81, 81, 81,
81, 81, 81, 74, 92, 60, 61, 61, 61, 61,
61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
61, 61, 61, 15, 16, 17, 63, 59, 75, 75,
133, 107, 64, 65, 66, 75, 145, 146, 124, 124,
164, 177, 124, 124, 178, 165, 67, 180, 166, 158,
167, 133, 107, 129, 107, 130, 144, 131, 199, 158,
124, 130, 79, 131, 75, 75, 581, 223, 199, 68,
15, 16, 17, 63, 59, 131, 131, 214, 75, 64,
65, 66, 125, 221, 82, 75, 82, 82, 82, 75,
82, 82, 135, 67, 82, 135, 135, 136, 75, 131,
142, 221, 135, 221, 258, 186, 248, 82, 82, 581,
250, 220, 365, 75, 251, 135, 68, 79, 152, 153,
154, 152, 152, 152, 152, 152, 224, 80, 249, 79,
81, 81, 81, 81, 81, 81, 81, 81, 90, 75,
91, 91, 91, 91, 91, 91, 91, 91, 92, 514,
75, 266, 93, 93, 93, 93, 93, 232, 232, 232,
88, 88, 75, 263, 88, 88, 241, 241, 241, 241,
241, 242, 75, 75, 93, 93, 93, 93, 93, 93,
74, 75, 88, 248, 262, 75, 74, 265, 221, 74,
74, 588, 74, 74, 74, 99, 99, 99, 99, 99,
99, 99, 99, 92, 89, 249, 74, 99, 99, 99,
99, 99, 100, 100, 100, 100, 100, 100, 100, 100,
100, 100, 100, 100, 100, 100, 100, 75, 100, 93,
93, 93, 93, 93, 93, 74, 74, 74, 74, 74,
74, 74, 74, 74, 74, 100, 100, 100, 100, 100,
100, 100, 100, 588, 414, 414, 79, 100, 100, 100,
100, 100, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 79, 74,
74, 74, 74, 74, 74, 106, 107, 74, 74, 74,
158, 74, 74, 365, 75, 74, 514, 124, 124, 199,
75, 124, 124, 109, 306, 301, 354, 74, 74, 74,
79, 81, 81, 81, 81, 81, 81, 81, 81, 124,
80, 471, 341, 81, 81, 81, 81, 81, 81, 81,
81, 110, 111, 88, 75, 112, 92, 88, 541, 307,
304, 125, 113, 88, 342, 114, 588, 588, 588, 588,
588, 588, 588, 588, 158, 88, 88, 343, 75, 534,
75, 344, 556, 199, 115, 79, 225, 226, 227, 225,
225, 225, 225, 225, 356, 132, 79, 264, 588, 588,
588, 588, 588, 588, 588, 588, 74, 158, 74, 74,
74, 158, 74, 74, 236, 158, 74, 124, 75, 158,
238, 124, 588, 158, 238, 471, 75, 124, 74, 74,
74, 85, 238, 85, 85, 85, 355, 85, 85, 124,
124, 85, 186, 347, 187, 187, 187, 187, 187, 187,
494, 236, 158, 85, 85, 85, 87, 358, 74, 74,
87, 238, 74, 74, 417, 348, 87, 230, 230, 231,
232, 232, 232, 232, 232, 196, 75, 75, 87, 87,
74, 155, 155, 155, 155, 155, 155, 155, 155, 75,
75, 452, 349, 155, 155, 155, 155, 155, 204, 204,
204, 204, 204, 204, 204, 204, 240, 240, 240, 240,
240, 240, 240, 240, 350, 155, 155, 155, 155, 155,
155, 161, 161, 161, 161, 161, 161, 161, 161, 236,
158, 534, 341, 161, 161, 161, 161, 161, 588, 283,
239, 239, 239, 239, 239, 239, 239, 239, 286, 286,
286, 286, 286, 287, 342, 155, 155, 155, 155, 155,
155, 123, 532, 74, 74, 123, 531, 74, 74, 468,
468, 123, 272, 272, 272, 272, 272, 272, 272, 272,
196, 588, 158, 123, 123, 74, 149, 530, 149, 149,
149, 283, 149, 149, 158, 365, 149, 277, 278, 279,
277, 277, 277, 277, 277, 367, 236, 158, 149, 149,
149, 186, 417, 187, 187, 187, 187, 187, 187, 187,
187, 247, 247, 247, 247, 247, 247, 247, 247, 236,
158, 281, 281, 281, 281, 281, 281, 367, 75, 238,
588, 158, 79, 347, 462, 75, 186, 351, 188, 188,
188, 188, 188, 188, 188, 188, 285, 285, 285, 285,
285, 285, 285, 285, 588, 348, 284, 284, 284, 284,
284, 284, 284, 284, 332, 332, 332, 332, 332, 333,
75, 186, 75, 189, 189, 189, 189, 189, 190, 187,
187, 357, 349, 402, 308, 309, 310, 308, 308, 308,
308, 308, 266, 158, 267, 267, 267, 267, 267, 267,
492, 75, 238, 75, 350, 75, 74, 491, 191, 191,
191, 191, 191, 191, 191, 191, 75, 399, 404, 444,
191, 191, 191, 191, 191, 320, 75, 321, 321, 321,
321, 321, 321, 321, 321, 370, 370, 370, 370, 370,
371, 445, 191, 191, 191, 191, 191, 191, 193, 194,
195, 195, 195, 195, 195, 195, 196, 158, 490, 446,
197, 197, 197, 197, 197, 320, 283, 322, 322, 322,
322, 322, 322, 322, 322, 387, 387, 387, 387, 387,
388, 447, 197, 197, 197, 197, 197, 197, 158, 200,
201, 202, 200, 200, 200, 200, 200, 203, 75, 489,
75, 204, 204, 204, 204, 204, 320, 403, 323, 323,
323, 323, 323, 324, 321, 321, 405, 420, 420, 420,
420, 420, 421, 204, 204, 204, 204, 204, 204, 205,
205, 205, 205, 205, 205, 205, 205, 485, 485, 79,
487, 205, 205, 205, 205, 205, 292, 292, 292, 292,
292, 292, 292, 292, 331, 331, 331, 331, 331, 331,
331, 331, 488, 191, 191, 191, 191, 191, 191, 186,
427, 187, 187, 187, 187, 187, 187, 187, 187, 236,
158, 327, 327, 327, 327, 327, 327, 75, 588, 283,
330, 330, 330, 330, 330, 330, 330, 330, 535, 450,
79, 367, 495, 75, 186, 314, 187, 187, 187, 187,
187, 187, 187, 187, 319, 319, 319, 319, 319, 319,
319, 319, 369, 369, 369, 369, 369, 369, 369, 369,
377, 378, 379, 377, 377, 377, 377, 377, 75, 236,
158, 237, 237, 237, 237, 237, 237, 237, 237, 238,
451, 444, 446, 239, 239, 239, 239, 239, 588, 588,
368, 368, 368, 368, 368, 368, 368, 368, 75, 367,
449, 497, 498, 445, 447, 239, 239, 239, 239, 239,
239, 158, 243, 244, 245, 243, 243, 243, 243, 243,
246, 158, 511, 511, 247, 247, 247, 247, 247, 320,
283, 321, 321, 321, 321, 321, 321, 321, 321, 497,
498, 236, 158, 236, 158, 499, 247, 247, 247, 247,
247, 247, 266, 283, 267, 267, 267, 267, 267, 267,
267, 267, 320, 448, 321, 321, 321, 321, 321, 321,
321, 321, 320, 158, 321, 321, 321, 321, 321, 321,
547, 547, 329, 501, 75, 455, 75, 266, 443, 268,
268, 268, 268, 268, 268, 268, 268, 236, 158, 338,
338, 338, 338, 338, 338, 338, 338, 329, 588, 158,
236, 158, 382, 382, 382, 382, 382, 382, 329, 75,
329, 75, 266, 442, 269, 269, 269, 269, 269, 270,
267, 267, 386, 386, 386, 386, 386, 386, 386, 386,
588, 441, 385, 385, 385, 385, 385, 385, 385, 385,
438, 438, 438, 438, 438, 439, 75, 236, 158, 281,
281, 281, 281, 281, 281, 281, 281, 238, 236, 158,
282, 282, 282, 282, 282, 282, 282, 282, 283, 557,
79, 487, 284, 284, 284, 284, 284, 536, 406, 407,
408, 409, 406, 406, 406, 406, 358, 359, 359, 359,
359, 359, 359, 488, 284, 284, 284, 284, 284, 284,
158, 288, 289, 290, 288, 288, 288, 288, 288, 291,
75, 75, 528, 292, 292, 292, 292, 292, 365, 75,
411, 412, 413, 411, 411, 411, 411, 411, 367, 565,
565, 440, 236, 158, 529, 292, 292, 292, 292, 292,
292, 266, 329, 267, 267, 267, 267, 267, 267, 267,
267, 376, 376, 376, 376, 376, 376, 376, 376, 419,
419, 419, 419, 419, 419, 419, 419, 236, 158, 474,
474, 474, 474, 474, 475, 75, 266, 384, 267, 267,
267, 267, 267, 267, 267, 267, 588, 365, 418, 418,
418, 418, 418, 418, 418, 418, 427, 417, 428, 428,
428, 428, 428, 428, 428, 428, 314, 570, 450, 79,
75, 315, 316, 317, 315, 315, 315, 315, 315, 318,
453, 493, 528, 319, 319, 319, 319, 319, 427, 588,
429, 429, 429, 429, 429, 429, 429, 429, 234, 417,
453, 75, 453, 453, 529, 319, 319, 319, 319, 319,
319, 236, 158, 327, 327, 327, 327, 327, 327, 327,
327, 283, 236, 158, 328, 328, 328, 328, 328, 328,
328, 328, 329, 158, 401, 554, 330, 330, 330, 330,
330, 427, 329, 430, 430, 430, 430, 430, 431, 428,
428, 517, 517, 517, 517, 517, 518, 555, 330, 330,
330, 330, 330, 330, 158, 334, 335, 336, 334, 334,
334, 334, 334, 337, 134, 134, 554, 338, 338, 338,
338, 338, 392, 392, 392, 392, 392, 392, 392, 392,
437, 437, 437, 437, 437, 437, 437, 437, 555, 338,
338, 338, 338, 338, 338, 358, 359, 359, 359, 359,
359, 359, 359, 359, 588, 158, 236, 158, 434, 434,
434, 434, 434, 434, 384, 588, 384, 436, 436, 436,
436, 436, 436, 436, 436, 506, 506, 506, 75, 358,
360, 360, 360, 360, 360, 360, 360, 360, 453, 462,
400, 463, 463, 463, 463, 463, 463, 463, 463, 426,
426, 426, 426, 426, 426, 426, 426, 75, 453, 398,
453, 454, 75, 358, 361, 361, 361, 361, 361, 362,
359, 359, 462, 567, 464, 464, 464, 464, 464, 464,
464, 464, 75, 462, 158, 465, 465, 465, 465, 465,
466, 463, 463, 384, 397, 568, 75, 365, 365, 366,
366, 366, 366, 366, 366, 366, 366, 367, 417, 396,
567, 368, 368, 368, 368, 368, 473, 473, 473, 473,
473, 473, 473, 473, 481, 482, 483, 481, 481, 481,
481, 481, 568, 368, 368, 368, 368, 368, 368, 372,
373, 374, 372, 372, 372, 372, 372, 375, 158, 395,
394, 376, 376, 376, 376, 376, 588, 384, 472, 472,
472, 472, 472, 472, 472, 472, 393, 455, 320, 506,
506, 506, 314, 376, 376, 376, 376, 376, 376, 236,
158, 382, 382, 382, 382, 382, 382, 382, 382, 329,
236, 158, 383, 383, 383, 383, 383, 383, 383, 383,
384, 75, 234, 196, 385, 385, 385, 385, 385, 427,
365, 428, 428, 428, 428, 428, 428, 428, 428, 579,
471, 588, 588, 353, 579, 352, 385, 385, 385, 385,
385, 385, 158, 389, 390, 391, 389, 389, 389, 389,
389, 236, 158, 346, 345, 392, 392, 392, 392, 392,
427, 384, 428, 428, 428, 428, 428, 428, 428, 428,
340, 339, 314, 234, 196, 499, 196, 392, 392, 392,
392, 392, 392, 358, 359, 359, 359, 359, 359, 359,
359, 359, 427, 259, 428, 428, 428, 428, 428, 428,
502, 503, 504, 502, 502, 502, 502, 502, 507, 508,
509, 507, 507, 507, 507, 507, 75, 358, 359, 359,
359, 359, 359, 359, 359, 359, 303, 302, 300, 588,
498, 462, 75, 463, 463, 463, 463, 463, 463, 463,
463, 462, 588, 463, 463, 463, 463, 463, 463, 299,
75, 365, 471, 415, 415, 415, 415, 415, 415, 415,
415, 367, 365, 298, 416, 416, 416, 416, 416, 416,
416, 416, 417, 499, 297, 296, 418, 418, 418, 418,
418, 462, 365, 463, 463, 463, 463, 463, 463, 463,
463, 295, 471, 588, 588, 294, 293, 275, 418, 418,
418, 418, 418, 418, 422, 423, 424, 422, 422, 422,
422, 422, 425, 234, 196, 271, 426, 426, 426, 426,
426, 480, 480, 480, 480, 480, 480, 480, 480, 516,
516, 516, 516, 516, 516, 516, 516, 499, 426, 426,
426, 426, 426, 426, 236, 158, 434, 434, 434, 434,
434, 434, 434, 434, 384, 236, 158, 435, 435, 435,
435, 435, 435, 435, 435, 365, 196, 98, 259, 436,
436, 436, 436, 436, 588, 514, 515, 515, 515, 515,
515, 515, 515, 515, 588, 588, 261, 259, 588, 260,
259, 436, 436, 436, 436, 436, 436, 455, 514, 456,
456, 456, 456, 456, 456, 456, 456, 158, 523, 523,
523, 523, 523, 523, 523, 523, 158, 524, 524, 524,
524, 524, 524, 524, 524, 257, 256, 255, 501, 254,
253, 75, 455, 252, 457, 457, 457, 457, 457, 457,
457, 457, 158, 525, 525, 525, 525, 525, 526, 523,
523, 557, 79, 365, 92, 496, 196, 234, 196, 496,
98, 496, 496, 514, 569, 496, 75, 455, 79, 458,
458, 458, 458, 458, 459, 460, 460, 496, 496, 496,
541, 184, 542, 542, 542, 542, 542, 542, 542, 542,
500, 222, 219, 218, 500, 217, 500, 500, 216, 215,
500, 75, 455, 213, 461, 461, 461, 456, 456, 456,
456, 456, 500, 500, 500, 212, 211, 505, 505, 505,
505, 505, 505, 505, 505, 541, 210, 543, 543, 543,
543, 543, 543, 543, 543, 209, 75, 365, 208, 469,
469, 469, 469, 469, 469, 469, 469, 417, 365, 75,
470, 470, 470, 470, 470, 470, 470, 470, 471, 207,
206, 98, 472, 472, 472, 472, 472, 541, 90, 544,
544, 544, 544, 544, 545, 542, 542, 552, 552, 552,
552, 552, 553, 150, 472, 472, 472, 472, 472, 472,
476, 477, 478, 476, 476, 476, 476, 476, 479, 79,
79, 184, 480, 480, 480, 480, 480, 522, 522, 522,
522, 522, 522, 522, 522, 551, 551, 551, 551, 551,
551, 551, 551, 141, 480, 480, 480, 480, 480, 480,
236, 158, 486, 486, 486, 486, 486, 486, 486, 486,
455, 142, 460, 460, 460, 460, 460, 460, 460, 460,
588, 136, 550, 550, 550, 550, 550, 550, 550, 550,
158, 523, 523, 523, 523, 523, 523, 523, 523, 136,
128, 182, 121, 175, 75, 455, 174, 460, 460, 460,
460, 460, 460, 460, 460, 158, 523, 523, 523, 523,
523, 523, 523, 523, 158, 523, 523, 523, 523, 523,
523, 558, 559, 560, 558, 558, 558, 558, 558, 75,
455, 173, 460, 460, 460, 460, 460, 460, 505, 505,
172, 536, 171, 537, 537, 537, 537, 537, 537, 169,
168, 163, 162, 75, 561, 562, 563, 561, 561, 561,
561, 561, 98, 74, 75, 455, 98, 505, 505, 505,
505, 505, 505, 505, 505, 75, 541, 151, 542, 542,
542, 542, 542, 542, 542, 542, 541, 86, 542, 542,
542, 542, 542, 542, 542, 542, 150, 79, 77, 75,
365, 76, 512, 512, 512, 512, 512, 512, 512, 512,
471, 365, 75, 513, 513, 513, 513, 513, 513, 513,
513, 514, 142, 136, 128, 515, 515, 515, 515, 515,
541, 121, 542, 542, 542, 542, 542, 542, 575, 575,
575, 575, 575, 575, 575, 575, 120, 515, 515, 515,
515, 515, 515, 519, 520, 521, 519, 519, 519, 519,
519, 119, 118, 117, 116, 522, 522, 522, 522, 522,
365, 105, 566, 566, 566, 566, 566, 566, 566, 566,
575, 575, 575, 575, 575, 575, 104, 522, 522, 522,
522, 522, 522, 536, 103, 537, 537, 537, 537, 537,
537, 537, 537, 576, 576, 576, 576, 576, 576, 576,
576, 577, 577, 577, 577, 577, 578, 575, 575, 582,
583, 584, 582, 582, 582, 582, 582, 75, 536, 102,
538, 538, 538, 538, 538, 538, 538, 538, 101, 570,
98, 571, 571, 571, 571, 571, 571, 86, 77, 76,
75, 75, 575, 575, 575, 575, 575, 575, 575, 575,
588, 588, 75, 536, 588, 539, 539, 539, 539, 539,
540, 537, 537, 75, 575, 575, 575, 575, 575, 575,
575, 575, 588, 588, 588, 588, 588, 585, 585, 585,
585, 585, 585, 585, 585, 588, 588, 75, 365, 588,
548, 548, 548, 548, 548, 548, 548, 548, 514, 365,
588, 549, 549, 549, 549, 549, 549, 549, 549, 75,
588, 588, 588, 550, 550, 550, 550, 550, 588, 582,
582, 582, 582, 582, 582, 582, 582, 586, 586, 586,
586, 586, 587, 585, 585, 550, 550, 550, 550, 550,
550, 536, 588, 537, 537, 537, 537, 537, 537, 537,
537, 75, 588, 588, 588, 588, 588, 588, 588, 75,
585, 585, 585, 585, 585, 585, 585, 585, 585, 585,
585, 585, 585, 585, 588, 75, 536, 588, 537, 537,
537, 537, 537, 537, 537, 537, 588, 588, 588, 588,
588, 588, 75, 588, 588, 588, 588, 588, 588, 588,
75, 588, 588, 588, 588, 588, 588, 588, 588, 588,
75, 570, 588, 571, 571, 571, 571, 571, 571, 571,
571, 588, 588, 588, 588, 588, 588, 588, 588, 588,
588, 588, 588, 588, 588, 588, 588, 588, 588, 588,
588, 588, 588, 588, 588, 75, 570, 588, 572, 572,
572, 572, 572, 572, 572, 572, 588, 588, 588, 588,
588, 588, 588, 588, 588, 588, 588, 588, 588, 588,
588, 588, 588, 588, 588, 588, 588, 588, 588, 588,
75, 570, 588, 573, 573, 573, 573, 573, 574, 571,
571, 588, 588, 588, 588, 588, 588, 588, 588, 588,
588, 588, 588, 588, 588, 588, 588, 588, 588, 588,
588, 588, 588, 588, 588, 75, 570, 588, 571, 571,
571, 571, 571, 571, 571, 571, 588, 588, 588, 588,
588, 588, 588, 588, 588, 588, 588, 588, 588, 588,
588, 588, 588, 588, 588, 588, 588, 588, 588, 588,
75, 570, 588, 571, 571, 571, 571, 571, 571, 571,
571, 588, 588, 588, 588, 588, 588, 588, 588, 588,
588, 588, 588, 588, 588, 588, 588, 588, 588, 588,
588, 588, 588, 588, 588, 75, 53, 53, 53, 53,
53, 53, 53, 53, 53, 53, 53, 53, 53, 53,
31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
31, 31, 31, 31, 62, 62, 62, 62, 62, 62,
62, 62, 62, 62, 62, 62, 62, 62, 69, 69,
69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
69, 69, 74, 588, 588, 588, 588, 588, 74, 74,
74, 588, 588, 74, 74, 74, 78, 78, 78, 78,
78, 78, 78, 78, 78, 78, 78, 78, 78, 78,
82, 588, 588, 588, 588, 588, 82, 82, 82, 82,
588, 82, 82, 82, 85, 588, 588, 588, 588, 588,
85, 85, 85, 588, 588, 85, 85, 85, 87, 588,
588, 87, 87, 87, 87, 87, 87, 588, 588, 87,
87, 87, 97, 97, 588, 588, 588, 97, 123, 588,
588, 123, 123, 123, 123, 123, 123, 588, 588, 123,
123, 123, 127, 588, 588, 127, 127, 127, 127, 127,
127, 588, 127, 588, 127, 127, 135, 588, 588, 135,
588, 135, 135, 135, 135, 135, 588, 135, 135, 135,
139, 139, 139, 139, 139, 139, 139, 139, 139, 139,
139, 139, 139, 139, 141, 141, 588, 141, 588, 141,
141, 141, 141, 141, 141, 141, 141, 141, 147, 147,
147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
147, 147, 148, 148, 588, 148, 148, 148, 148, 148,
148, 148, 148, 148, 148, 148, 149, 588, 588, 588,
588, 588, 149, 149, 149, 588, 588, 149, 149, 149,
88, 588, 588, 88, 88, 88, 88, 88, 88, 588,
588, 88, 88, 88, 157, 157, 588, 588, 588, 157,
159, 159, 159, 588, 588, 588, 159, 124, 588, 588,
124, 124, 124, 124, 124, 124, 588, 588, 124, 124,
124, 185, 185, 185, 185, 185, 185, 185, 185, 185,
185, 185, 185, 185, 185, 192, 192, 588, 588, 588,
192, 198, 198, 198, 588, 588, 588, 198, 228, 228,
588, 588, 588, 228, 229, 229, 588, 588, 588, 229,
233, 233, 588, 588, 588, 233, 235, 235, 235, 588,
588, 588, 235, 271, 271, 588, 588, 588, 271, 273,
273, 588, 588, 588, 273, 274, 274, 588, 588, 588,
274, 276, 276, 276, 588, 588, 588, 276, 280, 280,
280, 280, 588, 588, 588, 280, 311, 311, 588, 588,
588, 311, 312, 312, 588, 588, 588, 312, 313, 313,
588, 588, 588, 313, 325, 325, 325, 588, 588, 588,
325, 326, 326, 326, 326, 588, 588, 588, 326, 363,
363, 588, 588, 588, 363, 364, 364, 588, 588, 588,
364, 380, 380, 380, 588, 588, 588, 380, 381, 381,
381, 381, 588, 588, 588, 381, 410, 410, 588, 588,
588, 410, 414, 588, 414, 414, 588, 588, 588, 414,
432, 432, 432, 588, 588, 588, 432, 433, 433, 433,
433, 588, 588, 588, 433, 467, 467, 588, 588, 588,
467, 468, 588, 468, 468, 588, 588, 588, 468, 484,
484, 484, 588, 588, 588, 484, 485, 485, 485, 588,
588, 588, 588, 485, 496, 588, 588, 496, 496, 588,
496, 496, 496, 588, 588, 496, 496, 496, 500, 588,
588, 500, 500, 588, 500, 500, 500, 588, 588, 500,
500, 500, 510, 510, 588, 588, 588, 510, 511, 588,
511, 511, 588, 588, 588, 511, 527, 527, 588, 588,
588, 588, 527, 533, 533, 533, 533, 533, 533, 533,
533, 533, 533, 533, 533, 533, 533, 546, 546, 588,
588, 588, 546, 547, 588, 547, 547, 588, 588, 588,
547, 564, 564, 588, 588, 588, 564, 565, 588, 565,
588, 588, 588, 588, 565, 580, 580, 580, 580, 580,
580, 580, 580, 580, 580, 580, 580, 580, 580, 13,
588, 588, 588, 588, 588, 588, 588, 588, 588, 588,
588, 588, 588, 588, 588, 588, 588, 588, 588, 588,
588, 588, 588, 588, 588, 588, 588, 588, 588, 588,
588, 588, 588, 588, 588, 588, 588, 588, 588, 588,
588, 588, 588, 588, 588, 588, 588, 588, 588, 588,
588, 588, 588, 588, 588, 588, 588, 588, 588, 588,
588, 588, 588, 588, 588
} ;
static yyconst short int yy_chk[3686] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 2, 3, 4, 115, 2,
3, 4, 70, 5, 5, 5, 120, 5, 71, 3,
4, 20, 120, 5, 11, 11, 11, 11, 6, 6,
6, 41, 6, 2, 2, 5, 5, 2, 6, 12,
12, 12, 12, 64, 2, 20, 52, 2, 41, 66,
6, 6, 60, 60, 68, 68, 25, 25, 70, 5,
25, 25, 71, 52, 98, 115, 64, 3, 4, 118,
11, 143, 66, 98, 6, 7, 7, 7, 25, 7,
73, 73, 263, 73, 118, 12, 27, 27, 27, 27,
27, 27, 27, 27, 28, 28, 28, 28, 28, 28,
25, 40, 263, 40, 40, 40, 40, 40, 40, 40,
40, 106, 106, 585, 108, 126, 42, 143, 82, 108,
126, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 8,
8, 8, 82, 8, 42, 42, 129, 129, 42, 96,
96, 96, 96, 96, 96, 42, 50, 106, 42, 50,
50, 50, 50, 50, 50, 50, 50, 80, 80, 80,
80, 80, 80, 80, 80, 81, 81, 81, 81, 81,
81, 81, 81, 117, 191, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 9, 9, 9, 9, 9, 191, 116,
133, 133, 9, 9, 9, 119, 145, 145, 51, 51,
103, 116, 51, 51, 117, 103, 9, 119, 103, 159,
103, 140, 140, 58, 58, 58, 144, 58, 159, 198,
51, 58, 176, 58, 170, 180, 580, 180, 198, 9,
10, 10, 10, 10, 10, 58, 58, 170, 177, 10,
10, 10, 51, 177, 84, 179, 84, 84, 84, 181,
84, 84, 136, 10, 84, 136, 136, 140, 214, 58,
144, 179, 136, 181, 214, 187, 206, 84, 84, 569,
207, 176, 566, 183, 207, 136, 10, 19, 90, 90,
90, 90, 90, 90, 90, 90, 183, 19, 206, 220,
19, 19, 19, 19, 19, 19, 19, 19, 26, 187,
26, 26, 26, 26, 26, 26, 26, 26, 26, 564,
90, 267, 26, 26, 26, 26, 26, 195, 195, 195,
87, 87, 221, 221, 87, 87, 202, 202, 202, 202,
202, 202, 26, 223, 26, 26, 26, 26, 26, 26,
32, 224, 87, 248, 220, 267, 32, 224, 223, 32,
32, 550, 32, 32, 32, 32, 32, 32, 32, 32,
32, 32, 32, 32, 87, 248, 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, 32, 32, 32, 34, 34, 34, 34, 34,
34, 34, 34, 34, 371, 371, 304, 34, 34, 34,
34, 34, 94, 94, 94, 94, 94, 94, 94, 94,
95, 95, 95, 95, 95, 95, 95, 95, 262, 34,
34, 34, 34, 34, 34, 39, 39, 39, 39, 39,
235, 39, 39, 549, 264, 39, 547, 123, 123, 235,
258, 123, 123, 109, 264, 258, 304, 39, 39, 39,
43, 122, 122, 122, 122, 122, 122, 122, 122, 123,
43, 546, 295, 43, 43, 43, 43, 43, 43, 43,
43, 109, 109, 151, 265, 109, 222, 151, 542, 265,
262, 123, 109, 151, 295, 109, 132, 132, 132, 132,
132, 132, 132, 132, 276, 151, 151, 296, 306, 533,
222, 296, 531, 276, 43, 59, 186, 186, 186, 186,
186, 186, 186, 186, 306, 59, 451, 222, 59, 59,
59, 59, 59, 59, 59, 59, 75, 527, 75, 75,
75, 280, 75, 75, 237, 237, 75, 182, 186, 523,
280, 182, 239, 239, 237, 511, 305, 182, 75, 75,
75, 86, 239, 86, 86, 86, 305, 86, 86, 182,
182, 86, 190, 299, 190, 190, 190, 190, 190, 190,
451, 281, 281, 86, 86, 86, 89, 359, 89, 89,
89, 281, 89, 89, 510, 299, 89, 194, 194, 194,
194, 194, 194, 194, 194, 194, 190, 495, 89, 89,
89, 91, 91, 91, 91, 91, 91, 91, 91, 403,
359, 403, 300, 91, 91, 91, 91, 91, 199, 199,
199, 199, 199, 199, 199, 199, 201, 201, 201, 201,
201, 201, 201, 201, 300, 91, 91, 91, 91, 91,
91, 99, 99, 99, 99, 99, 99, 99, 99, 282,
282, 493, 341, 99, 99, 99, 99, 99, 204, 282,
204, 204, 204, 204, 204, 204, 204, 204, 245, 245,
245, 245, 245, 245, 341, 99, 99, 99, 99, 99,
99, 125, 492, 125, 125, 125, 491, 125, 125, 421,
421, 125, 230, 230, 230, 230, 230, 230, 230, 230,
230, 284, 284, 125, 125, 125, 150, 490, 150, 150,
150, 284, 150, 150, 485, 366, 150, 236, 236, 236,
236, 236, 236, 236, 236, 366, 435, 435, 150, 150,
150, 152, 468, 152, 152, 152, 152, 152, 152, 152,
152, 238, 238, 238, 238, 238, 238, 238, 238, 242,
242, 242, 242, 242, 242, 242, 242, 467, 301, 242,
436, 436, 354, 347, 463, 152, 153, 301, 153, 153,
153, 153, 153, 153, 153, 153, 244, 244, 244, 244,
244, 244, 244, 244, 247, 347, 247, 247, 247, 247,
247, 247, 247, 247, 290, 290, 290, 290, 290, 290,
153, 154, 307, 154, 154, 154, 154, 154, 154, 154,
154, 307, 349, 354, 266, 266, 266, 266, 266, 266,
266, 266, 270, 325, 270, 270, 270, 270, 270, 270,
448, 351, 325, 356, 349, 154, 155, 443, 155, 155,
155, 155, 155, 155, 155, 155, 266, 351, 356, 397,
155, 155, 155, 155, 155, 277, 270, 277, 277, 277,
277, 277, 277, 277, 277, 317, 317, 317, 317, 317,
317, 397, 155, 155, 155, 155, 155, 155, 158, 158,
158, 158, 158, 158, 158, 158, 158, 326, 442, 398,
158, 158, 158, 158, 158, 278, 326, 278, 278, 278,
278, 278, 278, 278, 278, 336, 336, 336, 336, 336,
336, 398, 158, 158, 158, 158, 158, 158, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160, 355, 441,
357, 160, 160, 160, 160, 160, 279, 355, 279, 279,
279, 279, 279, 279, 279, 279, 357, 374, 374, 374,
374, 374, 374, 160, 160, 160, 160, 160, 160, 161,
161, 161, 161, 161, 161, 161, 161, 439, 439, 494,
440, 161, 161, 161, 161, 161, 283, 283, 283, 283,
283, 283, 283, 283, 289, 289, 289, 289, 289, 289,
289, 289, 440, 161, 161, 161, 161, 161, 161, 188,
428, 188, 188, 188, 188, 188, 188, 188, 188, 287,
287, 287, 287, 287, 287, 287, 287, 452, 292, 287,
292, 292, 292, 292, 292, 292, 292, 292, 494, 402,
402, 414, 452, 188, 189, 410, 189, 189, 189, 189,
189, 189, 189, 189, 314, 314, 314, 314, 314, 314,
314, 314, 316, 316, 316, 316, 316, 316, 316, 316,
320, 320, 320, 320, 320, 320, 320, 320, 189, 200,
200, 200, 200, 200, 200, 200, 200, 200, 200, 200,
402, 444, 446, 200, 200, 200, 200, 200, 319, 368,
319, 319, 319, 319, 319, 319, 319, 319, 405, 368,
401, 453, 453, 444, 446, 200, 200, 200, 200, 200,
200, 203, 203, 203, 203, 203, 203, 203, 203, 203,
203, 380, 475, 475, 203, 203, 203, 203, 203, 322,
380, 322, 322, 322, 322, 322, 322, 322, 322, 454,
454, 486, 486, 327, 327, 453, 203, 203, 203, 203,
203, 203, 225, 327, 225, 225, 225, 225, 225, 225,
225, 225, 323, 400, 323, 323, 323, 323, 323, 323,
323, 323, 324, 381, 324, 324, 324, 324, 324, 324,
518, 518, 381, 454, 399, 456, 225, 226, 396, 226,
226, 226, 226, 226, 226, 226, 226, 328, 328, 329,
329, 329, 329, 329, 329, 329, 329, 328, 330, 330,
333, 333, 333, 333, 333, 333, 333, 333, 330, 456,
333, 226, 227, 395, 227, 227, 227, 227, 227, 227,
227, 227, 335, 335, 335, 335, 335, 335, 335, 335,
338, 394, 338, 338, 338, 338, 338, 338, 338, 338,
391, 391, 391, 391, 391, 391, 227, 240, 240, 240,
240, 240, 240, 240, 240, 240, 240, 240, 243, 243,
243, 243, 243, 243, 243, 243, 243, 243, 243, 535,
535, 487, 243, 243, 243, 243, 243, 537, 358, 358,
358, 358, 358, 358, 358, 358, 362, 362, 362, 362,
362, 362, 362, 487, 243, 243, 243, 243, 243, 243,
246, 246, 246, 246, 246, 246, 246, 246, 246, 246,
358, 537, 489, 246, 246, 246, 246, 246, 415, 362,
365, 365, 365, 365, 365, 365, 365, 365, 415, 553,
553, 393, 382, 382, 489, 246, 246, 246, 246, 246,
246, 268, 382, 268, 268, 268, 268, 268, 268, 268,
268, 367, 367, 367, 367, 367, 367, 367, 367, 373,
373, 373, 373, 373, 373, 373, 373, 383, 383, 424,
424, 424, 424, 424, 424, 268, 269, 383, 269, 269,
269, 269, 269, 269, 269, 269, 376, 416, 376, 376,
376, 376, 376, 376, 376, 376, 377, 416, 377, 377,
377, 377, 377, 377, 377, 377, 364, 571, 450, 450,
269, 275, 275, 275, 275, 275, 275, 275, 275, 275,
449, 450, 528, 275, 275, 275, 275, 275, 378, 418,
378, 378, 378, 378, 378, 378, 378, 378, 363, 418,
449, 571, 449, 449, 528, 275, 275, 275, 275, 275,
275, 285, 285, 285, 285, 285, 285, 285, 285, 285,
285, 285, 288, 288, 288, 288, 288, 288, 288, 288,
288, 288, 288, 432, 353, 530, 288, 288, 288, 288,
288, 379, 432, 379, 379, 379, 379, 379, 379, 379,
379, 478, 478, 478, 478, 478, 478, 530, 288, 288,
288, 288, 288, 288, 291, 291, 291, 291, 291, 291,
291, 291, 291, 291, 601, 601, 554, 291, 291, 291,
291, 291, 384, 384, 384, 384, 384, 384, 384, 384,
390, 390, 390, 390, 390, 390, 390, 390, 554, 291,
291, 291, 291, 291, 291, 308, 308, 308, 308, 308,
308, 308, 308, 308, 385, 385, 388, 388, 388, 388,
388, 388, 388, 388, 385, 392, 388, 392, 392, 392,
392, 392, 392, 392, 392, 506, 506, 506, 308, 309,
309, 309, 309, 309, 309, 309, 309, 309, 404, 411,
352, 411, 411, 411, 411, 411, 411, 411, 411, 417,
417, 417, 417, 417, 417, 417, 417, 506, 404, 346,
404, 404, 309, 310, 310, 310, 310, 310, 310, 310,
310, 310, 412, 556, 412, 412, 412, 412, 412, 412,
412, 412, 404, 413, 433, 413, 413, 413, 413, 413,
413, 413, 413, 433, 345, 556, 310, 315, 469, 315,
315, 315, 315, 315, 315, 315, 315, 315, 469, 344,
567, 315, 315, 315, 315, 315, 423, 423, 423, 423,
423, 423, 423, 423, 427, 427, 427, 427, 427, 427,
427, 427, 567, 315, 315, 315, 315, 315, 315, 318,
318, 318, 318, 318, 318, 318, 318, 318, 484, 343,
340, 318, 318, 318, 318, 318, 426, 484, 426, 426,
426, 426, 426, 426, 426, 426, 339, 461, 321, 461,
461, 461, 313, 318, 318, 318, 318, 318, 318, 331,
331, 331, 331, 331, 331, 331, 331, 331, 331, 331,
334, 334, 334, 334, 334, 334, 334, 334, 334, 334,
334, 461, 312, 311, 334, 334, 334, 334, 334, 429,
470, 429, 429, 429, 429, 429, 429, 429, 429, 651,
470, 496, 496, 303, 651, 302, 334, 334, 334, 334,
334, 334, 337, 337, 337, 337, 337, 337, 337, 337,
337, 434, 434, 298, 297, 337, 337, 337, 337, 337,
430, 434, 430, 430, 430, 430, 430, 430, 430, 430,
294, 293, 274, 273, 272, 496, 271, 337, 337, 337,
337, 337, 337, 360, 360, 360, 360, 360, 360, 360,
360, 360, 431, 261, 431, 431, 431, 431, 431, 431,
455, 455, 455, 455, 455, 455, 455, 455, 462, 462,
462, 462, 462, 462, 462, 462, 360, 361, 361, 361,
361, 361, 361, 361, 361, 361, 260, 259, 257, 497,
497, 464, 455, 464, 464, 464, 464, 464, 464, 464,
464, 466, 472, 466, 466, 466, 466, 466, 466, 256,
361, 369, 472, 369, 369, 369, 369, 369, 369, 369,
369, 369, 372, 255, 372, 372, 372, 372, 372, 372,
372, 372, 372, 497, 254, 253, 372, 372, 372, 372,
372, 465, 512, 465, 465, 465, 465, 465, 465, 465,
465, 252, 512, 498, 498, 251, 250, 234, 372, 372,
372, 372, 372, 372, 375, 375, 375, 375, 375, 375,
375, 375, 375, 233, 232, 231, 375, 375, 375, 375,
375, 471, 471, 471, 471, 471, 471, 471, 471, 477,
477, 477, 477, 477, 477, 477, 477, 498, 375, 375,
375, 375, 375, 375, 386, 386, 386, 386, 386, 386,
386, 386, 386, 386, 386, 389, 389, 389, 389, 389,
389, 389, 389, 389, 389, 513, 229, 228, 219, 389,
389, 389, 389, 389, 480, 513, 480, 480, 480, 480,
480, 480, 480, 480, 500, 500, 218, 217, 515, 216,
215, 389, 389, 389, 389, 389, 389, 406, 515, 406,
406, 406, 406, 406, 406, 406, 406, 481, 481, 481,
481, 481, 481, 481, 481, 481, 482, 482, 482, 482,
482, 482, 482, 482, 482, 213, 212, 211, 500, 210,
209, 406, 407, 208, 407, 407, 407, 407, 407, 407,
407, 407, 483, 483, 483, 483, 483, 483, 483, 483,
483, 557, 557, 548, 205, 499, 197, 196, 193, 499,
192, 499, 499, 548, 557, 499, 407, 408, 185, 408,
408, 408, 408, 408, 408, 408, 408, 499, 499, 499,
507, 184, 507, 507, 507, 507, 507, 507, 507, 507,
501, 178, 175, 174, 501, 173, 501, 501, 172, 171,
501, 408, 409, 169, 409, 409, 409, 409, 409, 409,
409, 409, 501, 501, 501, 168, 167, 505, 505, 505,
505, 505, 505, 505, 505, 508, 166, 508, 508, 508,
508, 508, 508, 508, 508, 165, 409, 419, 164, 419,
419, 419, 419, 419, 419, 419, 419, 419, 422, 505,
422, 422, 422, 422, 422, 422, 422, 422, 422, 163,
162, 157, 422, 422, 422, 422, 422, 509, 156, 509,
509, 509, 509, 509, 509, 509, 509, 521, 521, 521,
521, 521, 521, 149, 422, 422, 422, 422, 422, 422,
425, 425, 425, 425, 425, 425, 425, 425, 425, 148,
147, 146, 425, 425, 425, 425, 425, 514, 514, 514,
514, 514, 514, 514, 514, 520, 520, 520, 520, 520,
520, 520, 520, 142, 425, 425, 425, 425, 425, 425,
437, 437, 437, 437, 437, 437, 437, 437, 437, 437,
457, 141, 457, 457, 457, 457, 457, 457, 457, 457,
522, 139, 522, 522, 522, 522, 522, 522, 522, 522,
524, 524, 524, 524, 524, 524, 524, 524, 524, 135,
128, 124, 121, 114, 457, 458, 113, 458, 458, 458,
458, 458, 458, 458, 458, 525, 525, 525, 525, 525,
525, 525, 525, 525, 526, 526, 526, 526, 526, 526,
526, 536, 536, 536, 536, 536, 536, 536, 536, 458,
459, 112, 459, 459, 459, 459, 459, 459, 459, 459,
111, 540, 110, 540, 540, 540, 540, 540, 540, 105,
104, 102, 101, 536, 541, 541, 541, 541, 541, 541,
541, 541, 97, 93, 459, 460, 92, 460, 460, 460,
460, 460, 460, 460, 460, 540, 543, 88, 543, 543,
543, 543, 543, 543, 543, 543, 544, 85, 544, 544,
544, 544, 544, 544, 544, 544, 83, 78, 77, 460,
473, 76, 473, 473, 473, 473, 473, 473, 473, 473,
473, 476, 74, 476, 476, 476, 476, 476, 476, 476,
476, 476, 69, 62, 55, 476, 476, 476, 476, 476,
545, 49, 545, 545, 545, 545, 545, 545, 561, 561,
561, 561, 561, 561, 561, 561, 48, 476, 476, 476,
476, 476, 476, 479, 479, 479, 479, 479, 479, 479,
479, 47, 46, 45, 44, 479, 479, 479, 479, 479,
551, 38, 551, 551, 551, 551, 551, 551, 551, 551,
578, 578, 578, 578, 578, 578, 37, 479, 479, 479,
479, 479, 479, 502, 36, 502, 502, 502, 502, 502,
502, 502, 502, 562, 562, 562, 562, 562, 562, 562,
562, 563, 563, 563, 563, 563, 563, 563, 563, 570,
570, 570, 570, 570, 570, 570, 570, 502, 503, 35,
503, 503, 503, 503, 503, 503, 503, 503, 33, 574,
29, 574, 574, 574, 574, 574, 574, 23, 17, 15,
14, 570, 576, 576, 576, 576, 576, 576, 576, 576,
13, 0, 503, 504, 0, 504, 504, 504, 504, 504,
504, 504, 504, 574, 577, 577, 577, 577, 577, 577,
577, 577, 0, 0, 0, 0, 0, 582, 582, 582,
582, 582, 582, 582, 582, 0, 0, 504, 516, 0,
516, 516, 516, 516, 516, 516, 516, 516, 516, 519,
0, 519, 519, 519, 519, 519, 519, 519, 519, 582,
0, 0, 0, 519, 519, 519, 519, 519, 0, 583,
583, 583, 583, 583, 583, 583, 583, 584, 584, 584,
584, 584, 584, 584, 584, 519, 519, 519, 519, 519,
519, 538, 0, 538, 538, 538, 538, 538, 538, 538,
538, 583, 0, 0, 0, 0, 0, 0, 0, 584,
586, 586, 586, 586, 586, 586, 586, 586, 587, 587,
587, 587, 587, 587, 0, 538, 539, 0, 539, 539,
539, 539, 539, 539, 539, 539, 0, 0, 0, 0,
0, 0, 586, 0, 0, 0, 0, 0, 0, 0,
587, 0, 0, 0, 0, 0, 0, 0, 0, 0,
539, 558, 0, 558, 558, 558, 558, 558, 558, 558,
558, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 558, 559, 0, 559, 559,
559, 559, 559, 559, 559, 559, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
559, 560, 0, 560, 560, 560, 560, 560, 560, 560,
560, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 560, 572, 0, 572, 572,
572, 572, 572, 572, 572, 572, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
572, 573, 0, 573, 573, 573, 573, 573, 573, 573,
573, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 573, 589, 589, 589, 589,
589, 589, 589, 589, 589, 589, 589, 589, 589, 589,
590, 590, 590, 590, 590, 590, 590, 590, 590, 590,
590, 590, 590, 590, 591, 591, 591, 591, 591, 591,
591, 591, 591, 591, 591, 591, 591, 591, 592, 592,
592, 592, 592, 592, 592, 592, 592, 592, 592, 592,
592, 592, 593, 0, 0, 0, 0, 0, 593, 593,
593, 0, 0, 593, 593, 593, 594, 594, 594, 594,
594, 594, 594, 594, 594, 594, 594, 594, 594, 594,
595, 0, 0, 0, 0, 0, 595, 595, 595, 595,
0, 595, 595, 595, 596, 0, 0, 0, 0, 0,
596, 596, 596, 0, 0, 596, 596, 596, 597, 0,
0, 597, 597, 597, 597, 597, 597, 0, 0, 597,
597, 597, 598, 598, 0, 0, 0, 598, 599, 0,
0, 599, 599, 599, 599, 599, 599, 0, 0, 599,
599, 599, 600, 0, 0, 600, 600, 600, 600, 600,
600, 0, 600, 0, 600, 600, 602, 0, 0, 602,
0, 602, 602, 602, 602, 602, 0, 602, 602, 602,
603, 603, 603, 603, 603, 603, 603, 603, 603, 603,
603, 603, 603, 603, 604, 604, 0, 604, 0, 604,
604, 604, 604, 604, 604, 604, 604, 604, 605, 605,
605, 605, 605, 605, 605, 605, 605, 605, 605, 605,
605, 605, 606, 606, 0, 606, 606, 606, 606, 606,
606, 606, 606, 606, 606, 606, 607, 0, 0, 0,
0, 0, 607, 607, 607, 0, 0, 607, 607, 607,
608, 0, 0, 608, 608, 608, 608, 608, 608, 0,
0, 608, 608, 608, 609, 609, 0, 0, 0, 609,
610, 610, 610, 0, 0, 0, 610, 611, 0, 0,
611, 611, 611, 611, 611, 611, 0, 0, 611, 611,
611, 612, 612, 612, 612, 612, 612, 612, 612, 612,
612, 612, 612, 612, 612, 613, 613, 0, 0, 0,
613, 614, 614, 614, 0, 0, 0, 614, 615, 615,
0, 0, 0, 615, 616, 616, 0, 0, 0, 616,
617, 617, 0, 0, 0, 617, 618, 618, 618, 0,
0, 0, 618, 619, 619, 0, 0, 0, 619, 620,
620, 0, 0, 0, 620, 621, 621, 0, 0, 0,
621, 622, 622, 622, 0, 0, 0, 622, 623, 623,
623, 623, 0, 0, 0, 623, 624, 624, 0, 0,
0, 624, 625, 625, 0, 0, 0, 625, 626, 626,
0, 0, 0, 626, 627, 627, 627, 0, 0, 0,
627, 628, 628, 628, 628, 0, 0, 0, 628, 629,
629, 0, 0, 0, 629, 630, 630, 0, 0, 0,
630, 631, 631, 631, 0, 0, 0, 631, 632, 632,
632, 632, 0, 0, 0, 632, 633, 633, 0, 0,
0, 633, 634, 0, 634, 634, 0, 0, 0, 634,
635, 635, 635, 0, 0, 0, 635, 636, 636, 636,
636, 0, 0, 0, 636, 637, 637, 0, 0, 0,
637, 638, 0, 638, 638, 0, 0, 0, 638, 639,
639, 639, 0, 0, 0, 639, 640, 640, 640, 0,
0, 0, 0, 640, 641, 0, 0, 641, 641, 0,
641, 641, 641, 0, 0, 641, 641, 641, 642, 0,
0, 642, 642, 0, 642, 642, 642, 0, 0, 642,
642, 642, 643, 643, 0, 0, 0, 643, 644, 0,
644, 644, 0, 0, 0, 644, 645, 645, 0, 0,
0, 0, 645, 646, 646, 646, 646, 646, 646, 646,
646, 646, 646, 646, 646, 646, 646, 647, 647, 0,
0, 0, 647, 648, 0, 648, 648, 0, 0, 0,
648, 649, 649, 0, 0, 0, 649, 650, 0, 650,
0, 0, 0, 0, 650, 652, 652, 652, 652, 652,
652, 652, 652, 652, 652, 652, 652, 652, 652, 588,
588, 588, 588, 588, 588, 588, 588, 588, 588, 588,
588, 588, 588, 588, 588, 588, 588, 588, 588, 588,
588, 588, 588, 588, 588, 588, 588, 588, 588, 588,
588, 588, 588, 588, 588, 588, 588, 588, 588, 588,
588, 588, 588, 588, 588, 588, 588, 588, 588, 588,
588, 588, 588, 588, 588, 588, 588, 588, 588, 588,
588, 588, 588, 588, 588
} ;
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-2011
* 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 "sudoers.h"
#include "parse.h"
#include "toke.h"
#include <gram.h>
extern YYSTYPE yylval;
extern int parse_error;
int sudolineno = 1;
char *sudoers;
static int sawspace = 0;
static int prev_state = INITIAL;
static int _push_include(char *, int);
static int pop_include(void);
static char *parse_include(char *);
#define push_include(_p) (_push_include((_p), FALSE))
#define push_includedir(_p) (_push_include((_p), TRUE))
#ifdef TRACELEXER
#define LEXTRACE(msg) fputs(msg, stderr)
#else
#define LEXTRACE(msg)
#endif
#define YY_NO_INPUT 1
#define YY_NO_UNPUT 1
#define GOTDEFS 1
#define GOTCMND 2
#define STARTDEFS 3
#define INDEFS 4
#define INSTR 5
#line 1492 "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 117 "toke.l"
#line 1648 "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 >= 589 )
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] != 3620 );
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 118 "toke.l"
BEGIN STARTDEFS;
YY_BREAK
case 2:
YY_RULE_SETUP
#line 120 "toke.l"
{
BEGIN INDEFS;
LEXTRACE("DEFVAR ");
if (!fill(yytext, yyleng))
yyterminate();
return DEFVAR;
}
YY_BREAK
case 3:
YY_RULE_SETUP
#line 129 "toke.l"
{
BEGIN STARTDEFS;
LEXTRACE(", ");
return ',';
} /* return ',' */
YY_BREAK
case 4:
YY_RULE_SETUP
#line 135 "toke.l"
{
LEXTRACE("= ");
return '=';
} /* return '=' */
YY_BREAK
case 5:
YY_RULE_SETUP
#line 140 "toke.l"
{
LEXTRACE("+= ");
return '+';
} /* return '+' */
YY_BREAK
case 6:
YY_RULE_SETUP
#line 145 "toke.l"
{
LEXTRACE("-= ");
return '-';
} /* return '-' */
YY_BREAK
case 7:
YY_RULE_SETUP
#line 150 "toke.l"
{
LEXTRACE("BEGINSTR ");
yylval.string = NULL;
prev_state = YY_START;
BEGIN INSTR;
}
YY_BREAK
case 8:
YY_RULE_SETUP
#line 157 "toke.l"
{
LEXTRACE("WORD(2) ");
if (!fill(yytext, yyleng))
yyterminate();
return WORD;
}
YY_BREAK
case 9:
YY_RULE_SETUP
#line 166 "toke.l"
{
/* Line continuation char followed by newline. */
++sudolineno;
LEXTRACE("\n");
}
YY_BREAK
case 10:
YY_RULE_SETUP
#line 172 "toke.l"
{
LEXTRACE("ENDSTR ");
BEGIN prev_state;
if (prev_state == INITIAL) {
switch (yylval.string[0]) {
case '%':
LEXTRACE("USERGROUP ");
return USERGROUP;
case '+':
LEXTRACE("NETGROUP ");
return NETGROUP;
}
}
LEXTRACE("WORD(4) ");
return WORD;
}
YY_BREAK
case 11:
YY_RULE_SETUP
#line 189 "toke.l"
{
LEXTRACE("BACKSLASH ");
if (!append(yytext, yyleng))
yyterminate();
}
YY_BREAK
case 12:
YY_RULE_SETUP
#line 195 "toke.l"
{
LEXTRACE("STRBODY ");
if (!append(yytext, yyleng))
yyterminate();
}
YY_BREAK
case 13:
YY_RULE_SETUP
#line 203 "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 211 "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 219 "toke.l"
{
BEGIN INITIAL;
yyless(0);
return COMMAND;
} /* end of command line args */
YY_BREAK
case 16:
YY_RULE_SETUP
#line 225 "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 233 "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 246 "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 262 "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 291 "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 311 "toke.l"
{
/* cmnd does not require passwd for this user */
LEXTRACE("NOPASSWD ");
return NOPASSWD;
}
YY_BREAK
case 22:
YY_RULE_SETUP
#line 317 "toke.l"
{
/* cmnd requires passwd for this user */
LEXTRACE("PASSWD ");
return PASSWD;
}
YY_BREAK
case 23:
YY_RULE_SETUP
#line 323 "toke.l"
{
LEXTRACE("NOEXEC ");
return NOEXEC;
}
YY_BREAK
case 24:
YY_RULE_SETUP
#line 328 "toke.l"
{
LEXTRACE("EXEC ");
return EXEC;
}
YY_BREAK
case 25:
YY_RULE_SETUP
#line 333 "toke.l"
{
LEXTRACE("SETENV ");
return SETENV;
}
YY_BREAK
case 26:
YY_RULE_SETUP
#line 338 "toke.l"
{
LEXTRACE("NOSETENV ");
return NOSETENV;
}
YY_BREAK
case 27:
YY_RULE_SETUP
#line 343 "toke.l"
{
LEXTRACE("LOG_OUTPUT ");
return LOG_OUTPUT;
}
YY_BREAK
case 28:
YY_RULE_SETUP
#line 348 "toke.l"
{
LEXTRACE("NOLOG_OUTPUT ");
return NOLOG_OUTPUT;
}
YY_BREAK
case 29:
YY_RULE_SETUP
#line 353 "toke.l"
{
LEXTRACE("LOG_INPUT ");
return LOG_INPUT;
}
YY_BREAK
case 30:
YY_RULE_SETUP
#line 358 "toke.l"
{
LEXTRACE("NOLOG_INPUT ");
return NOLOG_INPUT;
}
YY_BREAK
case 31:
YY_RULE_SETUP
#line 363 "toke.l"
{
/* netgroup */
if (!fill(yytext, yyleng))
yyterminate();
LEXTRACE("NETGROUP ");
return NETGROUP;
}
YY_BREAK
case 32:
YY_RULE_SETUP
#line 371 "toke.l"
{
/* UN*X group */
if (!fill(yytext, yyleng))
yyterminate();
LEXTRACE("USERGROUP ");
return USERGROUP;
}
YY_BREAK
case 33:
YY_RULE_SETUP
#line 379 "toke.l"
{
if (!fill(yytext, yyleng))
yyterminate();
LEXTRACE("NTWKADDR ");
return NTWKADDR;
}
YY_BREAK
case 34:
YY_RULE_SETUP
#line 386 "toke.l"
{
if (!fill(yytext, yyleng))
yyterminate();
LEXTRACE("NTWKADDR ");
return NTWKADDR;
}
YY_BREAK
case 35:
YY_RULE_SETUP
#line 393 "toke.l"
{
if (!ipv6_valid(yytext)) {
LEXTRACE("ERROR ");
return ERROR;
}
if (!fill(yytext, yyleng))
yyterminate();
LEXTRACE("NTWKADDR ");
return NTWKADDR;
}
YY_BREAK
case 36:
YY_RULE_SETUP
#line 404 "toke.l"
{
if (!ipv6_valid(yytext)) {
LEXTRACE("ERROR ");
return ERROR;
}
if (!fill(yytext, yyleng))
yyterminate();
LEXTRACE("NTWKADDR ");
return NTWKADDR;
}
YY_BREAK
case 37:
YY_RULE_SETUP
#line 415 "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 38:
YY_RULE_SETUP
#line 437 "toke.l"
{
/* no command args allowed for Defaults!/path */
if (!fill_cmnd(yytext, yyleng))
yyterminate();
LEXTRACE("COMMAND ");
return COMMAND;
}
YY_BREAK
case 39:
YY_RULE_SETUP
#line 445 "toke.l"
{
BEGIN GOTCMND;
LEXTRACE("COMMAND ");
if (!fill_cmnd(yytext, yyleng))
yyterminate();
} /* sudo -e */
YY_BREAK
case 40:
YY_RULE_SETUP
#line 452 "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 41:
YY_RULE_SETUP
#line 467 "toke.l"
{
LEXTRACE("BEGINSTR ");
yylval.string = NULL;
prev_state = YY_START;
BEGIN INSTR;
}
YY_BREAK
case 42:
YY_RULE_SETUP
#line 474 "toke.l"
{
/* a word */
if (!fill(yytext, yyleng))
yyterminate();
LEXTRACE("WORD(5) ");
return WORD;
}
YY_BREAK
case 43:
YY_RULE_SETUP
#line 482 "toke.l"
{
LEXTRACE("( ");
return '(';
}
YY_BREAK
case 44:
YY_RULE_SETUP
#line 487 "toke.l"
{
LEXTRACE(") ");
return ')';
}
YY_BREAK
case 45:
YY_RULE_SETUP
#line 492 "toke.l"
{
LEXTRACE(", ");
return ',';
} /* return ',' */
YY_BREAK
case 46:
YY_RULE_SETUP
#line 497 "toke.l"
{
LEXTRACE("= ");
return '=';
} /* return '=' */
YY_BREAK
case 47:
YY_RULE_SETUP
#line 502 "toke.l"
{
LEXTRACE(": ");
return ':';
} /* return ':' */
YY_BREAK
case 48:
YY_RULE_SETUP
#line 507 "toke.l"
{
if (yyleng % 2 == 1)
return '!'; /* return '!' */
}
YY_BREAK
case 49:
YY_RULE_SETUP
#line 512 "toke.l"
{
BEGIN INITIAL;
++sudolineno;
LEXTRACE("\n");
return COMMENT;
} /* return newline */
YY_BREAK
case 50:
YY_RULE_SETUP
#line 519 "toke.l"
{ /* throw away space/tabs */
sawspace = TRUE; /* but remember for fill_args */
}
YY_BREAK
case 51:
YY_RULE_SETUP
#line 523 "toke.l"
{
sawspace = TRUE; /* remember for fill_args */
++sudolineno;
LEXTRACE("\n\t");
} /* throw away EOL after \ */
YY_BREAK
case 52:
YY_RULE_SETUP
#line 529 "toke.l"
{
BEGIN INITIAL;
++sudolineno;
LEXTRACE("\n");
return COMMENT;
} /* comment, not uid/gid */
YY_BREAK
case 53:
YY_RULE_SETUP
#line 536 "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 541 "toke.l"
{
if (YY_START != INITIAL) {
BEGIN INITIAL;
LEXTRACE("ERROR ");
return ERROR;
}
if (!pop_include())
yyterminate();
}
YY_BREAK
case 54:
YY_RULE_SETUP
#line 551 "toke.l"
ECHO;
YY_BREAK
#line 2336 "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 >= 589 )
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 >= 589 )
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 == 588);
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 */
#ifndef YY_NO_INPUT
#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;
}
#endif /* ifndef YY_NO_INPUT */
#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 551 "toke.l"
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(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(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(void)
{
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(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(void)
{
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(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;
}