Files
sudo/plugins/sudoers/toke.c
Todd C. Miller 342e351d58 match quoted strings the same way whether in a Defaults line or as
a user/group/netgroup name.  Fixes escaped double quotes in quoted
user/group/netgroup names.
2011-01-31 15:13:51 -05:00

3516 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: /home/cvs/openbsd/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[588] =
{ 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 55, 42, 50, 49, 48, 53, 53, 42,
43, 44, 42, 45, 42, 42, 42, 42, 47, 46,
37, 37, 37, 37, 37, 37, 37, 53, 42, 42,
50, 41, 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, 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[652] =
{ 0,
0, 64, 65, 70, 75, 100, 147, 211, 275, 322,
86, 111, 2608, 2559, 2604, 3633, 2601, 3633, 368, 44,
3633, 3633, 2542, 3633, 113, 378, 124, 146, 2551, 3633,
433, 2521, 483, 2528, 2527, 2528, 2513, 537, 154, 36,
150, 3633, 561, 2483, 2479, 2460, 2455, 2456, 2508, 203,
288, 45, 0, 3633, 2503, 3633, 0, 305, 616, 71,
0, 2458, 3633, 61, 3633, 71, 3633, 80, 2457, 109,
131, 3633, 124, 2440, 638, 2485, 2482, 2482, 3633, 211,
219, 83, 2436, 336, 2427, 663, 410, 2424, 688, 234,
699, 2416, 2423, 356, 500, 169, 2412, 145, 739, 0,
2403, 2401, 262, 2391, 2372, 134, 3633, 130, 524, 2346,
2333, 2304, 2299, 2300, 94, 72, 229, 235, 198, 237,
2330, 569, 567, 2277, 793, 196, 0, 2320, 153, 3633,
3633, 578, 190, 0, 2275, 344, 3633, 3633, 2254, 303,
2251, 2285, 310, 241, 245, 2278, 2276, 2264, 2215, 818,
545, 831, 866, 901, 936, 2248, 2235, 976, 286, 1017,
1057, 2226, 2206, 2198, 2193, 2199, 2192, 2179, 2188, 242,
2158, 2162, 2134, 2134, 2139, 313, 265, 2142, 273, 272,
295, 600, 271, 2189, 2187, 635, 345, 1099, 1134, 511,
307, 2108, 2107, 685, 350, 2106, 2105, 339, 716, 1169,
724, 404, 1210, 758, 2077, 358, 377, 2054, 2046, 2036,
2034, 2015, 2022, 357, 2006, 2008, 1993, 2005, 1977, 377,
355, 580, 379, 391, 1252, 1287, 1322, 2014, 1992, 790,
1990, 1988, 1987, 1985, 529, 815, 593, 839, 596, 1357,
0, 849, 1368, 874, 660, 1409, 884, 435, 3633, 1941,
1932, 1945, 1925, 1915, 1886, 1886, 1854, 561, 1828, 1811,
1783, 557, 110, 508, 568, 912, 369, 1451, 1486, 922,
1818, 1800, 1799, 1782, 1519, 646, 955, 995, 1036, 658,
671, 749, 1074, 772, 1561, 0, 1109, 1572, 1082, 892,
1613, 1118, 1744, 1740, 603, 513, 1723, 1729, 624, 724,
768, 1719, 1673, 570, 555, 460, 824, 1654, 1688, 1722,
1690, 1677, 1676, 1142, 1757, 1150, 963, 1797, 1188, 1158,
1626, 1229, 1262, 1272, 901, 922, 1243, 1297, 1297, 1308,
1839, 0, 1310, 1850, 1330, 1003, 1891, 1340, 1595, 1598,
764, 3633, 1579, 1571, 1535, 1519, 780, 3633, 875, 3633,
736, 1504, 1482, 656, 953, 636, 897, 1386, 626, 1932,
1966, 1395, 1487, 1431, 1428, 815, 1459, 1037, 2001, 0,
487, 2012, 1467, 1196, 2052, 1496, 1506, 1538, 1591, 1179,
1220, 1442, 1477, 1630, 1664, 2094, 0, 1666, 2105, 1638,
1278, 1675, 1411, 1409, 1354, 1350, 924, 961, 1318, 1307,
1274, 1061, 675, 1708, 1254, 2147, 2182, 2217, 2252, 1212,
1699, 1732, 1743, 1171, 1263, 1341, 1707, 1428, 2287, 0,
608, 2298, 1774, 1477, 2338, 1816, 1782, 1135, 1869, 1910,
1942, 1506, 1529, 1901, 826, 860, 2380, 0, 980, 1041,
1103, 1087, 1041, 1042, 3633, 1058, 3633, 992, 1541, 1962,
708, 899, 291, 1058, 1950, 1319, 2390, 2425, 2460, 2495,
1827, 1974, 1011, 1985, 2031, 2071, 927, 920, 1592, 1744,
2077, 1758, 2530, 0, 1061, 2541, 2122, 1877, 2581, 2157,
2131, 2166, 2191, 1807, 912, 1128, 1194, 3633, 1235, 835,
802, 765, 818, 721, 767, 1614, 1836, 2217, 1930, 2252,
2623, 2658, 2693, 2265, 1515, 2230, 2275, 2317, 779, 761,
1986, 2013, 2355, 2032, 2728, 0, 1122, 2739, 2363, 1919,
2400, 683, 2409, 2434, 2326, 676, 1393, 3633, 1434, 623,
3633, 657, 3633, 1251, 2442, 1387, 2781, 2816, 2475, 2481,
635, 2508, 2518, 2560, 543, 526, 2148, 427, 424, 2600,
0, 1233, 1595, 3633, 1596, 2213, 2851, 2886, 2921, 2566,
2631, 2639, 389, 0, 350, 1597, 3633, 349, 2647, 1685,
2956, 2991, 2669, 3633, 2680, 2702, 2450, 3633, 215, 3633,
2715, 2757, 2765, 82, 2798, 2806, 3633, 3039, 3053, 3067,
3081, 3095, 3109, 3123, 3137, 3151, 3157, 3171, 3185, 1355,
3199, 3213, 3227, 3241, 3255, 3269, 3283, 3289, 3296, 3310,
3324, 3330, 3337, 3343, 3349, 3355, 3362, 3368, 3374, 3380,
3387, 3395, 3401, 3407, 3413, 3420, 3428, 3434, 3440, 3447,
3455, 3461, 3469, 3476, 3484, 3490, 3498, 3505, 3513, 3527,
3541, 3547, 3555, 3562, 3576, 3582, 3590, 3596, 3604, 862,
3618
} ;
static yyconst short int yy_def[652] =
{ 0,
587, 1, 1, 1, 588, 588, 589, 589, 590, 590,
591, 591, 587, 592, 587, 587, 587, 587, 593, 594,
587, 587, 595, 587, 596, 592, 26, 26, 597, 587,
587, 31, 31, 33, 33, 33, 33, 592, 26, 592,
587, 587, 593, 31, 31, 33, 33, 33, 587, 587,
598, 592, 599, 587, 599, 587, 599, 587, 593, 587,
600, 601, 587, 601, 587, 601, 587, 602, 603, 603,
603, 587, 587, 592, 592, 587, 587, 604, 587, 605,
587, 594, 606, 594, 595, 595, 596, 607, 592, 592,
26, 597, 91, 91, 91, 91, 608, 609, 31, 33,
33, 33, 33, 33, 33, 592, 587, 592, 587, 587,
587, 587, 587, 587, 604, 592, 91, 592, 592, 592,
587, 587, 598, 610, 592, 592, 599, 599, 587, 587,
587, 605, 587, 600, 601, 601, 587, 587, 601, 601,
603, 587, 603, 603, 587, 587, 604, 611, 606, 606,
587, 592, 592, 592, 91, 155, 612, 587, 613, 587,
31, 33, 33, 33, 33, 33, 33, 33, 33, 592,
587, 587, 587, 587, 587, 604, 592, 155, 592, 592,
592, 587, 592, 587, 611, 592, 592, 592, 592, 592,
592, 614, 615, 615, 194, 616, 615, 617, 160, 587,
200, 200, 587, 200, 33, 33, 33, 33, 33, 33,
33, 33, 33, 592, 587, 587, 587, 587, 587, 604,
592, 592, 592, 592, 592, 592, 592, 587, 618, 618,
230, 618, 619, 620, 621, 587, 622, 203, 622, 622,
240, 622, 587, 243, 243, 587, 243, 587, 587, 33,
33, 33, 33, 33, 33, 33, 33, 592, 587, 587,
587, 604, 592, 592, 592, 592, 592, 592, 592, 592,
623, 623, 624, 625, 587, 587, 587, 587, 587, 626,
626, 627, 246, 627, 627, 285, 627, 587, 288, 288,
587, 288, 33, 33, 33, 33, 33, 33, 33, 33,
592, 587, 587, 604, 592, 592, 592, 592, 592, 592,
587, 628, 629, 275, 587, 315, 315, 587, 315, 587,
587, 587, 587, 587, 587, 630, 630, 631, 291, 631,
631, 331, 631, 587, 334, 334, 587, 334, 33, 33,
587, 587, 33, 33, 33, 33, 587, 587, 587, 587,
592, 587, 587, 604, 592, 592, 592, 592, 592, 592,
592, 592, 587, 632, 587, 633, 318, 633, 633, 369,
369, 587, 372, 372, 587, 372, 587, 587, 587, 587,
634, 634, 635, 337, 635, 635, 386, 635, 587, 389,
389, 389, 33, 33, 33, 33, 33, 33, 592, 587,
587, 604, 592, 592, 592, 592, 592, 592, 592, 587,
587, 587, 587, 636, 636, 637, 375, 637, 637, 419,
419, 587, 422, 422, 587, 422, 587, 587, 587, 587,
587, 587, 638, 638, 639, 639, 639, 437, 437, 33,
33, 33, 33, 587, 587, 587, 587, 587, 587, 604,
604, 592, 640, 641, 592, 592, 592, 592, 592, 592,
592, 587, 587, 587, 587, 587, 587, 642, 642, 643,
425, 643, 643, 473, 473, 587, 476, 476, 587, 476,
587, 587, 587, 587, 644, 644, 587, 587, 33, 33,
33, 587, 645, 604, 592, 640, 640, 640, 641, 641,
592, 592, 592, 592, 592, 587, 587, 587, 587, 646,
646, 647, 479, 647, 647, 515, 515, 587, 518, 518,
518, 587, 587, 587, 587, 587, 587, 587, 33, 33,
587, 645, 587, 604, 592, 592, 592, 592, 592, 587,
587, 587, 587, 587, 587, 648, 648, 649, 649, 649,
550, 550, 587, 587, 33, 604, 592, 592, 592, 587,
587, 587, 587, 650, 650, 587, 587, 651, 592, 592,
592, 592, 592, 587, 587, 587, 587, 587, 651, 587,
592, 592, 592, 592, 592, 592, 0, 587, 587, 587,
587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
587
} ;
static yyconst short int yy_nxt[3699] =
{ 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, 18, 14, 31, 31, 31,
31, 32, 33, 33, 33, 33, 34, 35, 33, 36,
33, 37, 33, 33, 33, 33, 33, 38, 14, 39,
39, 39, 39, 39, 39, 14, 14, 14, 14, 14,
14, 14, 40, 14, 14, 41, 49, 83, 42, 43,
50, 49, 133, 107, 42, 50, 15, 54, 55, 51,
56, 140, 107, 75, 51, 137, 56, 70, 16, 71,
72, 84, 75, 44, 45, 138, 79, 46, 56, 57,
108, 15, 54, 55, 47, 56, 587, 48, 136, 126,
143, 56, 70, 16, 71, 72, 88, 88, 136, 75,
88, 88, 58, 56, 57, 145, 146, 52, 141, 75,
84, 177, 52, 73, 144, 133, 107, 305, 88, 94,
94, 94, 94, 94, 94, 94, 94, 58, 15, 16,
17, 109, 59, 176, 133, 107, 142, 75, 73, 158,
89, 95, 95, 95, 95, 95, 96, 74, 160, 93,
93, 93, 93, 93, 93, 93, 93, 75, 142, 110,
111, 75, 170, 112, 156, 156, 156, 156, 156, 156,
113, 133, 107, 114, 60, 61, 61, 61, 61, 61,
61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
61, 61, 15, 16, 17, 122, 59, 580, 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, 75, 144, 75, 145, 146, 183, 152,
153, 154, 152, 152, 152, 152, 152, 180, 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, 178, 75, 64, 65, 66, 142, 75,
181, 124, 124, 164, 497, 124, 124, 179, 165, 67,
158, 166, 214, 167, 133, 107, 129, 107, 130, 199,
131, 143, 75, 124, 130, 79, 131, 221, 75, 75,
75, 223, 68, 15, 16, 17, 63, 59, 131, 131,
92, 224, 64, 65, 66, 125, 221, 82, 498, 82,
82, 82, 75, 82, 82, 135, 67, 82, 135, 135,
136, 580, 131, 158, 75, 135, 221, 142, 186, 248,
82, 82, 199, 365, 220, 232, 232, 232, 135, 68,
79, 156, 156, 156, 156, 156, 156, 156, 156, 79,
80, 249, 266, 81, 81, 81, 81, 81, 81, 81,
81, 90, 75, 91, 91, 91, 91, 91, 91, 91,
91, 92, 75, 263, 75, 93, 93, 93, 93, 93,
258, 250, 513, 88, 88, 251, 75, 88, 88, 241,
241, 241, 241, 241, 242, 75, 75, 93, 93, 93,
93, 93, 93, 74, 262, 88, 248, 587, 75, 74,
365, 221, 74, 74, 265, 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, 587, 75, 414, 414,
100, 100, 100, 100, 100, 156, 156, 156, 156, 156,
156, 156, 156, 356, 186, 109, 187, 187, 187, 187,
187, 187, 74, 74, 74, 74, 74, 74, 106, 107,
74, 74, 74, 158, 74, 74, 88, 343, 74, 513,
88, 344, 199, 110, 111, 75, 88, 112, 75, 79,
74, 74, 74, 79, 113, 306, 471, 114, 88, 88,
124, 124, 79, 80, 124, 124, 81, 81, 81, 81,
81, 81, 81, 81, 81, 81, 81, 81, 81, 81,
81, 81, 124, 587, 587, 587, 587, 587, 587, 587,
587, 124, 75, 92, 341, 124, 236, 158, 75, 587,
158, 124, 355, 301, 125, 75, 238, 115, 79, 238,
307, 304, 354, 124, 124, 347, 342, 75, 132, 468,
468, 587, 587, 587, 587, 587, 587, 587, 587, 74,
358, 74, 74, 74, 264, 74, 74, 348, 540, 74,
225, 226, 227, 225, 225, 225, 225, 225, 79, 533,
158, 74, 74, 74, 85, 555, 85, 85, 85, 199,
85, 85, 158, 75, 85, 286, 286, 286, 286, 286,
287, 238, 75, 75, 236, 158, 85, 85, 85, 87,
158, 74, 74, 87, 238, 74, 74, 158, 404, 87,
230, 230, 231, 232, 232, 232, 232, 232, 196, 402,
79, 87, 87, 74, 155, 155, 155, 155, 155, 155,
155, 155, 75, 79, 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, 494, 341, 161, 161, 161, 161,
161, 587, 283, 239, 239, 239, 239, 239, 239, 239,
239, 347, 534, 75, 471, 587, 158, 342, 155, 155,
155, 155, 155, 155, 123, 283, 74, 74, 123, 399,
74, 74, 417, 348, 123, 272, 272, 272, 272, 272,
272, 272, 272, 196, 75, 75, 123, 123, 74, 149,
533, 149, 149, 149, 351, 149, 149, 531, 365, 149,
277, 278, 279, 277, 277, 277, 277, 277, 367, 236,
158, 149, 149, 149, 186, 530, 187, 187, 187, 187,
187, 187, 187, 187, 247, 247, 247, 247, 247, 247,
247, 247, 236, 158, 281, 281, 281, 281, 281, 281,
578, 75, 238, 587, 158, 578, 349, 529, 75, 186,
357, 188, 188, 188, 188, 188, 188, 188, 188, 285,
285, 285, 285, 285, 285, 285, 285, 587, 350, 284,
284, 284, 284, 284, 284, 284, 284, 332, 332, 332,
332, 332, 333, 75, 186, 158, 189, 189, 189, 189,
189, 190, 187, 187, 238, 444, 158, 308, 309, 310,
308, 308, 308, 308, 308, 266, 158, 267, 267, 267,
267, 267, 267, 417, 75, 283, 75, 445, 75, 74,
367, 191, 191, 191, 191, 191, 191, 191, 191, 75,
405, 495, 446, 191, 191, 191, 191, 191, 320, 75,
321, 321, 321, 321, 321, 321, 321, 321, 370, 370,
370, 370, 370, 371, 447, 191, 191, 191, 191, 191,
191, 193, 194, 195, 195, 195, 195, 195, 195, 196,
75, 485, 485, 197, 197, 197, 197, 197, 320, 403,
322, 322, 322, 322, 322, 322, 322, 322, 387, 387,
387, 387, 387, 388, 462, 197, 197, 197, 197, 197,
197, 158, 200, 201, 202, 200, 200, 200, 200, 200,
203, 492, 487, 444, 204, 204, 204, 204, 204, 320,
587, 323, 323, 323, 323, 323, 324, 321, 321, 446,
367, 497, 450, 79, 488, 445, 204, 204, 204, 204,
204, 204, 205, 205, 205, 205, 205, 205, 205, 205,
491, 447, 510, 510, 205, 205, 205, 205, 205, 292,
292, 292, 292, 292, 292, 292, 292, 331, 331, 331,
331, 331, 331, 331, 331, 500, 191, 191, 191, 191,
191, 191, 186, 451, 187, 187, 187, 187, 187, 187,
187, 187, 236, 158, 327, 327, 327, 327, 327, 327,
490, 587, 283, 330, 330, 330, 330, 330, 330, 330,
330, 236, 158, 546, 546, 489, 75, 186, 427, 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, 158, 367, 487, 239, 239, 239, 239,
239, 587, 283, 368, 368, 368, 368, 368, 368, 368,
368, 420, 420, 420, 420, 420, 421, 488, 239, 239,
239, 239, 239, 239, 158, 243, 244, 245, 243, 243,
243, 243, 243, 246, 158, 314, 527, 247, 247, 247,
247, 247, 320, 329, 321, 321, 321, 321, 321, 321,
321, 321, 556, 79, 564, 564, 236, 158, 528, 247,
247, 247, 247, 247, 247, 266, 283, 267, 267, 267,
267, 267, 267, 267, 267, 320, 365, 321, 321, 321,
321, 321, 321, 321, 321, 320, 367, 321, 321, 321,
321, 321, 321, 438, 438, 438, 438, 438, 439, 75,
266, 75, 268, 268, 268, 268, 268, 268, 268, 268,
236, 158, 338, 338, 338, 338, 338, 338, 338, 338,
329, 587, 158, 236, 158, 382, 382, 382, 382, 382,
382, 329, 455, 329, 75, 266, 449, 269, 269, 269,
269, 269, 270, 267, 267, 386, 386, 386, 386, 386,
386, 386, 386, 587, 365, 385, 385, 385, 385, 385,
385, 385, 385, 448, 417, 75, 75, 134, 134, 75,
236, 158, 281, 281, 281, 281, 281, 281, 281, 281,
238, 236, 158, 282, 282, 282, 282, 282, 282, 282,
282, 283, 443, 442, 527, 284, 284, 284, 284, 284,
535, 406, 407, 408, 409, 406, 406, 406, 406, 358,
359, 359, 359, 359, 359, 359, 528, 284, 284, 284,
284, 284, 284, 158, 288, 289, 290, 288, 288, 288,
288, 288, 291, 75, 75, 553, 292, 292, 292, 292,
292, 587, 75, 411, 412, 413, 411, 411, 411, 411,
411, 417, 441, 440, 314, 236, 158, 554, 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, 587,
234, 418, 418, 418, 418, 418, 418, 418, 418, 427,
158, 428, 428, 428, 428, 428, 428, 428, 428, 329,
505, 505, 505, 75, 315, 316, 317, 315, 315, 315,
315, 315, 318, 158, 453, 401, 319, 319, 319, 319,
319, 427, 384, 429, 429, 429, 429, 429, 429, 429,
429, 400, 75, 398, 453, 397, 453, 453, 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, 553, 566, 566, 330,
330, 330, 330, 330, 427, 365, 430, 430, 430, 430,
430, 431, 428, 428, 396, 417, 395, 587, 554, 567,
567, 330, 330, 330, 330, 330, 330, 158, 334, 335,
336, 334, 334, 334, 334, 334, 337, 394, 393, 320,
338, 338, 338, 338, 338, 392, 392, 392, 392, 392,
392, 392, 392, 437, 437, 437, 437, 437, 437, 437,
437, 498, 338, 338, 338, 338, 338, 338, 358, 359,
359, 359, 359, 359, 359, 359, 359, 587, 158, 236,
158, 434, 434, 434, 434, 434, 434, 384, 587, 384,
436, 436, 436, 436, 436, 436, 436, 436, 569, 314,
234, 75, 358, 360, 360, 360, 360, 360, 360, 360,
360, 453, 462, 196, 463, 463, 463, 463, 463, 463,
463, 463, 426, 426, 426, 426, 426, 426, 426, 426,
353, 453, 75, 453, 454, 75, 358, 361, 361, 361,
361, 361, 362, 359, 359, 462, 352, 464, 464, 464,
464, 464, 464, 464, 464, 75, 462, 365, 465, 465,
465, 465, 465, 466, 463, 463, 346, 471, 345, 75,
365, 587, 366, 366, 366, 366, 366, 366, 366, 366,
367, 471, 340, 339, 368, 368, 368, 368, 368, 473,
473, 473, 473, 473, 473, 473, 473, 481, 482, 483,
481, 481, 481, 481, 481, 314, 368, 368, 368, 368,
368, 368, 372, 373, 374, 372, 372, 372, 372, 372,
375, 158, 234, 196, 376, 376, 376, 376, 376, 587,
384, 472, 472, 472, 472, 472, 472, 472, 472, 587,
455, 196, 505, 505, 505, 259, 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, 303, 302, 385, 385, 385,
385, 385, 427, 498, 428, 428, 428, 428, 428, 428,
428, 428, 516, 516, 516, 516, 516, 517, 300, 385,
385, 385, 385, 385, 385, 158, 389, 390, 391, 389,
389, 389, 389, 389, 236, 158, 299, 298, 392, 392,
392, 392, 392, 427, 384, 428, 428, 428, 428, 428,
428, 428, 428, 587, 551, 551, 551, 551, 551, 552,
392, 392, 392, 392, 392, 392, 358, 359, 359, 359,
359, 359, 359, 359, 359, 427, 297, 428, 428, 428,
428, 428, 428, 450, 79, 501, 502, 503, 501, 501,
501, 501, 501, 296, 295, 294, 493, 500, 293, 75,
358, 359, 359, 359, 359, 359, 359, 359, 359, 506,
507, 508, 506, 506, 506, 506, 506, 75, 462, 365,
463, 463, 463, 463, 463, 463, 463, 463, 275, 471,
234, 196, 271, 75, 365, 196, 415, 415, 415, 415,
415, 415, 415, 415, 367, 365, 365, 416, 416, 416,
416, 416, 416, 416, 416, 417, 513, 98, 259, 418,
418, 418, 418, 418, 462, 587, 463, 463, 463, 463,
463, 463, 463, 463, 261, 513, 259, 260, 259, 257,
256, 418, 418, 418, 418, 418, 418, 422, 423, 424,
422, 422, 422, 422, 422, 425, 255, 254, 253, 426,
426, 426, 426, 426, 462, 252, 463, 463, 463, 463,
463, 463, 480, 480, 480, 480, 480, 480, 480, 480,
92, 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, 196, 234,
196, 98, 436, 436, 436, 436, 436, 515, 515, 515,
515, 515, 515, 515, 515, 158, 522, 522, 522, 522,
522, 522, 522, 522, 436, 436, 436, 436, 436, 436,
455, 365, 456, 456, 456, 456, 456, 456, 456, 456,
587, 513, 514, 514, 514, 514, 514, 514, 514, 514,
158, 523, 523, 523, 523, 523, 523, 523, 523, 79,
184, 222, 219, 218, 75, 455, 217, 457, 457, 457,
457, 457, 457, 457, 457, 158, 524, 524, 524, 524,
524, 525, 522, 522, 556, 79, 216, 215, 496, 213,
212, 496, 496, 211, 496, 496, 210, 568, 496, 75,
455, 209, 458, 458, 458, 458, 458, 459, 460, 460,
496, 496, 496, 540, 208, 541, 541, 541, 541, 541,
541, 541, 541, 499, 207, 206, 499, 499, 98, 499,
499, 90, 150, 499, 75, 455, 79, 461, 461, 461,
456, 456, 456, 456, 456, 499, 499, 499, 79, 184,
504, 504, 504, 504, 504, 504, 504, 504, 540, 141,
542, 542, 542, 542, 542, 542, 542, 542, 142, 75,
365, 136, 469, 469, 469, 469, 469, 469, 469, 469,
417, 365, 75, 470, 470, 470, 470, 470, 470, 470,
470, 471, 136, 128, 182, 472, 472, 472, 472, 472,
540, 121, 543, 543, 543, 543, 543, 544, 541, 541,
158, 522, 522, 522, 522, 522, 522, 472, 472, 472,
472, 472, 472, 476, 477, 478, 476, 476, 476, 476,
476, 479, 175, 174, 173, 480, 480, 480, 480, 480,
521, 521, 521, 521, 521, 521, 521, 521, 550, 550,
550, 550, 550, 550, 550, 550, 172, 480, 480, 480,
480, 480, 480, 236, 158, 486, 486, 486, 486, 486,
486, 486, 486, 455, 171, 460, 460, 460, 460, 460,
460, 460, 460, 587, 169, 549, 549, 549, 549, 549,
549, 549, 549, 158, 522, 522, 522, 522, 522, 522,
522, 522, 168, 163, 162, 98, 74, 75, 455, 98,
460, 460, 460, 460, 460, 460, 460, 460, 158, 522,
522, 522, 522, 522, 522, 522, 522, 557, 558, 559,
557, 557, 557, 557, 557, 574, 574, 574, 574, 574,
574, 151, 75, 455, 86, 460, 460, 460, 460, 460,
460, 504, 504, 150, 79, 77, 76, 75, 535, 75,
536, 536, 536, 536, 536, 536, 560, 561, 562, 560,
560, 560, 560, 560, 142, 136, 128, 75, 455, 121,
504, 504, 504, 504, 504, 504, 504, 504, 120, 119,
118, 540, 75, 541, 541, 541, 541, 541, 541, 541,
541, 540, 117, 541, 541, 541, 541, 541, 541, 541,
541, 116, 75, 365, 105, 511, 511, 511, 511, 511,
511, 511, 511, 471, 365, 104, 512, 512, 512, 512,
512, 512, 512, 512, 513, 103, 102, 101, 514, 514,
514, 514, 514, 540, 98, 541, 541, 541, 541, 541,
541, 574, 574, 574, 574, 574, 574, 574, 574, 86,
514, 514, 514, 514, 514, 514, 518, 519, 520, 518,
518, 518, 518, 518, 77, 76, 75, 587, 521, 521,
521, 521, 521, 365, 587, 565, 565, 565, 565, 565,
565, 565, 565, 587, 587, 587, 587, 587, 587, 587,
521, 521, 521, 521, 521, 521, 535, 587, 536, 536,
536, 536, 536, 536, 536, 536, 575, 575, 575, 575,
575, 575, 575, 575, 576, 576, 576, 576, 576, 577,
574, 574, 581, 582, 583, 581, 581, 581, 581, 581,
75, 535, 587, 537, 537, 537, 537, 537, 537, 537,
537, 587, 569, 587, 570, 570, 570, 570, 570, 570,
587, 587, 587, 587, 75, 574, 574, 574, 574, 574,
574, 574, 574, 587, 587, 75, 535, 587, 538, 538,
538, 538, 538, 539, 536, 536, 75, 574, 574, 574,
574, 574, 574, 574, 574, 587, 587, 587, 587, 587,
584, 584, 584, 584, 584, 584, 584, 584, 587, 587,
75, 365, 587, 547, 547, 547, 547, 547, 547, 547,
547, 513, 365, 587, 548, 548, 548, 548, 548, 548,
548, 548, 75, 587, 587, 587, 549, 549, 549, 549,
549, 587, 581, 581, 581, 581, 581, 581, 581, 581,
585, 585, 585, 585, 585, 586, 584, 584, 549, 549,
549, 549, 549, 549, 535, 587, 536, 536, 536, 536,
536, 536, 536, 536, 75, 587, 587, 587, 587, 587,
587, 587, 75, 584, 584, 584, 584, 584, 584, 584,
584, 584, 584, 584, 584, 584, 584, 587, 75, 535,
587, 536, 536, 536, 536, 536, 536, 536, 536, 587,
587, 587, 587, 587, 587, 75, 587, 587, 587, 587,
587, 587, 587, 75, 587, 587, 587, 587, 587, 587,
587, 587, 587, 75, 569, 587, 570, 570, 570, 570,
570, 570, 570, 570, 587, 587, 587, 587, 587, 587,
587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
587, 587, 587, 587, 587, 587, 587, 587, 75, 569,
587, 571, 571, 571, 571, 571, 571, 571, 571, 587,
587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
587, 587, 587, 75, 569, 587, 572, 572, 572, 572,
572, 573, 570, 570, 587, 587, 587, 587, 587, 587,
587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
587, 587, 587, 587, 587, 587, 587, 587, 75, 569,
587, 570, 570, 570, 570, 570, 570, 570, 570, 587,
587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
587, 587, 587, 75, 569, 587, 570, 570, 570, 570,
570, 570, 570, 570, 587, 587, 587, 587, 587, 587,
587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
587, 587, 587, 587, 587, 587, 587, 587, 75, 53,
53, 53, 53, 53, 53, 53, 53, 53, 53, 53,
53, 53, 53, 18, 18, 18, 18, 18, 18, 18,
18, 18, 18, 18, 18, 18, 18, 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, 587, 587, 587, 587,
587, 74, 74, 74, 587, 587, 74, 74, 74, 78,
78, 78, 78, 78, 78, 78, 78, 78, 78, 78,
78, 78, 78, 82, 587, 587, 587, 587, 587, 82,
82, 82, 82, 587, 82, 82, 82, 85, 587, 587,
587, 587, 587, 85, 85, 85, 587, 587, 85, 85,
85, 87, 587, 587, 87, 87, 87, 87, 87, 87,
587, 587, 87, 87, 87, 97, 97, 587, 587, 587,
97, 123, 587, 587, 123, 123, 123, 123, 123, 123,
587, 587, 123, 123, 123, 127, 587, 587, 127, 127,
127, 127, 127, 127, 587, 127, 587, 127, 127, 135,
587, 587, 135, 587, 135, 135, 135, 135, 135, 587,
135, 135, 135, 139, 139, 139, 139, 139, 139, 139,
139, 139, 139, 139, 139, 139, 139, 141, 141, 587,
141, 587, 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, 587, 148, 148,
148, 148, 148, 148, 148, 148, 148, 148, 148, 149,
587, 587, 587, 587, 587, 149, 149, 149, 587, 587,
149, 149, 149, 88, 587, 587, 88, 88, 88, 88,
88, 88, 587, 587, 88, 88, 88, 157, 157, 587,
587, 587, 157, 159, 159, 159, 587, 587, 587, 159,
124, 587, 587, 124, 124, 124, 124, 124, 124, 587,
587, 124, 124, 124, 185, 185, 185, 185, 185, 185,
185, 185, 185, 185, 185, 185, 185, 185, 192, 192,
587, 587, 587, 192, 198, 198, 198, 587, 587, 587,
198, 228, 228, 587, 587, 587, 228, 229, 229, 587,
587, 587, 229, 233, 233, 587, 587, 587, 233, 235,
235, 235, 587, 587, 587, 235, 271, 271, 587, 587,
587, 271, 273, 273, 587, 587, 587, 273, 274, 274,
587, 587, 587, 274, 276, 276, 276, 587, 587, 587,
276, 280, 280, 280, 280, 587, 587, 587, 280, 311,
311, 587, 587, 587, 311, 312, 312, 587, 587, 587,
312, 313, 313, 587, 587, 587, 313, 325, 325, 325,
587, 587, 587, 325, 326, 326, 326, 326, 587, 587,
587, 326, 363, 363, 587, 587, 587, 363, 364, 364,
587, 587, 587, 364, 380, 380, 380, 587, 587, 587,
380, 381, 381, 381, 381, 587, 587, 587, 381, 410,
410, 587, 587, 587, 410, 414, 587, 414, 414, 587,
587, 587, 414, 432, 432, 432, 587, 587, 587, 432,
433, 433, 433, 433, 587, 587, 587, 433, 467, 467,
587, 587, 587, 467, 468, 587, 468, 468, 587, 587,
587, 468, 484, 484, 484, 587, 587, 587, 484, 485,
485, 485, 587, 587, 587, 587, 485, 496, 587, 587,
496, 587, 587, 496, 496, 496, 587, 587, 496, 496,
496, 499, 587, 587, 499, 587, 587, 499, 499, 499,
587, 587, 499, 499, 499, 509, 509, 587, 587, 587,
509, 510, 587, 510, 510, 587, 587, 587, 510, 526,
526, 587, 587, 587, 587, 526, 532, 532, 532, 532,
532, 532, 532, 532, 532, 532, 532, 532, 532, 532,
545, 545, 587, 587, 587, 545, 546, 587, 546, 546,
587, 587, 587, 546, 563, 563, 587, 587, 587, 563,
564, 587, 564, 587, 587, 587, 587, 564, 579, 579,
579, 579, 579, 579, 579, 579, 579, 579, 579, 579,
579, 579, 13, 587, 587, 587, 587, 587, 587, 587,
587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
587, 587, 587, 587, 587, 587, 587, 587
} ;
static yyconst short int yy_chk[3699] =
{ 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, 20, 2, 2,
3, 4, 60, 60, 4, 4, 5, 5, 5, 3,
5, 68, 68, 40, 4, 64, 5, 11, 11, 11,
11, 20, 52, 2, 2, 66, 115, 2, 5, 5,
40, 6, 6, 6, 2, 6, 82, 2, 64, 52,
70, 6, 12, 12, 12, 12, 25, 25, 66, 116,
25, 25, 5, 6, 6, 73, 73, 3, 73, 584,
82, 116, 4, 11, 71, 106, 106, 263, 25, 27,
27, 27, 27, 27, 27, 27, 27, 6, 7, 7,
7, 41, 7, 115, 129, 129, 70, 263, 12, 98,
25, 28, 28, 28, 28, 28, 28, 39, 98, 39,
39, 39, 39, 39, 39, 39, 39, 108, 71, 41,
41, 106, 108, 41, 96, 96, 96, 96, 96, 96,
41, 133, 133, 41, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 8, 8, 8, 50, 8, 579, 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, 126, 144, 119, 145, 145, 126, 90,
90, 90, 90, 90, 90, 90, 90, 119, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 8, 9, 9, 9, 9,
9, 90, 118, 117, 120, 9, 9, 9, 144, 170,
120, 51, 51, 103, 453, 51, 51, 118, 103, 9,
159, 103, 170, 103, 140, 140, 58, 58, 58, 159,
58, 143, 177, 51, 58, 176, 58, 177, 183, 180,
179, 180, 9, 10, 10, 10, 10, 10, 58, 58,
191, 183, 10, 10, 10, 51, 179, 84, 453, 84,
84, 84, 181, 84, 84, 136, 10, 84, 136, 136,
140, 568, 58, 198, 191, 136, 181, 143, 187, 206,
84, 84, 198, 565, 176, 195, 195, 195, 136, 10,
19, 94, 94, 94, 94, 94, 94, 94, 94, 220,
19, 206, 267, 19, 19, 19, 19, 19, 19, 19,
19, 26, 187, 26, 26, 26, 26, 26, 26, 26,
26, 26, 221, 221, 214, 26, 26, 26, 26, 26,
214, 207, 563, 87, 87, 207, 267, 87, 87, 202,
202, 202, 202, 202, 202, 26, 223, 26, 26, 26,
26, 26, 26, 31, 220, 87, 248, 549, 224, 31,
548, 223, 31, 31, 224, 31, 31, 31, 31, 31,
31, 31, 31, 31, 31, 31, 31, 87, 248, 31,
31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
31, 31, 31, 31, 31, 31, 31, 31, 33, 33,
33, 33, 33, 33, 33, 33, 33, 306, 371, 371,
33, 33, 33, 33, 33, 95, 95, 95, 95, 95,
95, 95, 95, 306, 190, 109, 190, 190, 190, 190,
190, 190, 33, 33, 33, 33, 33, 33, 38, 38,
38, 38, 38, 235, 38, 38, 151, 296, 38, 546,
151, 296, 235, 109, 109, 264, 151, 109, 190, 262,
38, 38, 38, 43, 109, 264, 545, 109, 151, 151,
123, 123, 304, 43, 123, 123, 43, 43, 43, 43,
43, 43, 43, 43, 122, 122, 122, 122, 122, 122,
122, 122, 123, 132, 132, 132, 132, 132, 132, 132,
132, 182, 305, 222, 295, 182, 237, 237, 258, 239,
239, 182, 305, 258, 123, 265, 237, 43, 59, 239,
265, 262, 304, 182, 182, 299, 295, 222, 59, 421,
421, 59, 59, 59, 59, 59, 59, 59, 59, 75,
359, 75, 75, 75, 222, 75, 75, 299, 541, 75,
186, 186, 186, 186, 186, 186, 186, 186, 354, 532,
276, 75, 75, 75, 86, 530, 86, 86, 86, 276,
86, 86, 280, 359, 86, 245, 245, 245, 245, 245,
245, 280, 186, 356, 281, 281, 86, 86, 86, 89,
526, 89, 89, 89, 281, 89, 89, 522, 356, 89,
194, 194, 194, 194, 194, 194, 194, 194, 194, 354,
451, 89, 89, 89, 91, 91, 91, 91, 91, 91,
91, 91, 403, 494, 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, 451, 341, 99, 99, 99, 99,
99, 204, 282, 204, 204, 204, 204, 204, 204, 204,
204, 347, 494, 351, 510, 284, 284, 341, 99, 99,
99, 99, 99, 99, 125, 284, 125, 125, 125, 351,
125, 125, 509, 347, 125, 230, 230, 230, 230, 230,
230, 230, 230, 230, 495, 301, 125, 125, 125, 150,
493, 150, 150, 150, 301, 150, 150, 492, 366, 150,
236, 236, 236, 236, 236, 236, 236, 236, 366, 435,
435, 150, 150, 150, 152, 491, 152, 152, 152, 152,
152, 152, 152, 152, 238, 238, 238, 238, 238, 238,
238, 238, 242, 242, 242, 242, 242, 242, 242, 242,
650, 307, 242, 436, 436, 650, 349, 490, 152, 153,
307, 153, 153, 153, 153, 153, 153, 153, 153, 244,
244, 244, 244, 244, 244, 244, 244, 247, 349, 247,
247, 247, 247, 247, 247, 247, 247, 290, 290, 290,
290, 290, 290, 153, 154, 325, 154, 154, 154, 154,
154, 154, 154, 154, 325, 397, 485, 266, 266, 266,
266, 266, 266, 266, 266, 270, 326, 270, 270, 270,
270, 270, 270, 468, 357, 326, 452, 397, 154, 155,
467, 155, 155, 155, 155, 155, 155, 155, 155, 266,
357, 452, 398, 155, 155, 155, 155, 155, 277, 270,
277, 277, 277, 277, 277, 277, 277, 277, 317, 317,
317, 317, 317, 317, 398, 155, 155, 155, 155, 155,
155, 158, 158, 158, 158, 158, 158, 158, 158, 158,
355, 439, 439, 158, 158, 158, 158, 158, 278, 355,
278, 278, 278, 278, 278, 278, 278, 278, 336, 336,
336, 336, 336, 336, 463, 158, 158, 158, 158, 158,
158, 160, 160, 160, 160, 160, 160, 160, 160, 160,
160, 448, 440, 444, 160, 160, 160, 160, 160, 279,
368, 279, 279, 279, 279, 279, 279, 279, 279, 446,
368, 454, 402, 402, 440, 444, 160, 160, 160, 160,
160, 160, 161, 161, 161, 161, 161, 161, 161, 161,
443, 446, 475, 475, 161, 161, 161, 161, 161, 283,
283, 283, 283, 283, 283, 283, 283, 289, 289, 289,
289, 289, 289, 289, 289, 454, 161, 161, 161, 161,
161, 161, 188, 402, 188, 188, 188, 188, 188, 188,
188, 188, 287, 287, 287, 287, 287, 287, 287, 287,
442, 292, 287, 292, 292, 292, 292, 292, 292, 292,
292, 486, 486, 517, 517, 441, 188, 189, 428, 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, 380, 414, 487, 200, 200, 200, 200,
200, 319, 380, 319, 319, 319, 319, 319, 319, 319,
319, 374, 374, 374, 374, 374, 374, 487, 200, 200,
200, 200, 200, 200, 203, 203, 203, 203, 203, 203,
203, 203, 203, 203, 381, 410, 489, 203, 203, 203,
203, 203, 322, 381, 322, 322, 322, 322, 322, 322,
322, 322, 534, 534, 552, 552, 327, 327, 489, 203,
203, 203, 203, 203, 203, 225, 327, 225, 225, 225,
225, 225, 225, 225, 225, 323, 415, 323, 323, 323,
323, 323, 323, 323, 323, 324, 415, 324, 324, 324,
324, 324, 324, 391, 391, 391, 391, 391, 391, 225,
226, 405, 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, 401, 227, 227, 227,
227, 227, 227, 227, 227, 335, 335, 335, 335, 335,
335, 335, 335, 338, 416, 338, 338, 338, 338, 338,
338, 338, 338, 400, 416, 399, 456, 600, 600, 227,
240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
240, 243, 243, 243, 243, 243, 243, 243, 243, 243,
243, 243, 396, 395, 527, 243, 243, 243, 243, 243,
536, 358, 358, 358, 358, 358, 358, 358, 358, 362,
362, 362, 362, 362, 362, 362, 527, 243, 243, 243,
243, 243, 243, 246, 246, 246, 246, 246, 246, 246,
246, 246, 246, 358, 536, 529, 246, 246, 246, 246,
246, 418, 362, 365, 365, 365, 365, 365, 365, 365,
365, 418, 394, 393, 364, 382, 382, 529, 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,
363, 376, 376, 376, 376, 376, 376, 376, 376, 377,
432, 377, 377, 377, 377, 377, 377, 377, 377, 432,
505, 505, 505, 269, 275, 275, 275, 275, 275, 275,
275, 275, 275, 433, 449, 353, 275, 275, 275, 275,
275, 378, 433, 378, 378, 378, 378, 378, 378, 378,
378, 352, 505, 346, 449, 345, 449, 449, 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, 553, 555, 566, 288,
288, 288, 288, 288, 379, 469, 379, 379, 379, 379,
379, 379, 379, 379, 344, 469, 343, 496, 553, 555,
566, 288, 288, 288, 288, 288, 288, 291, 291, 291,
291, 291, 291, 291, 291, 291, 291, 340, 339, 321,
291, 291, 291, 291, 291, 384, 384, 384, 384, 384,
384, 384, 384, 390, 390, 390, 390, 390, 390, 390,
390, 496, 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, 570, 313,
312, 308, 309, 309, 309, 309, 309, 309, 309, 309,
309, 404, 411, 311, 411, 411, 411, 411, 411, 411,
411, 411, 417, 417, 417, 417, 417, 417, 417, 417,
303, 404, 570, 404, 404, 309, 310, 310, 310, 310,
310, 310, 310, 310, 310, 412, 302, 412, 412, 412,
412, 412, 412, 412, 412, 404, 413, 470, 413, 413,
413, 413, 413, 413, 413, 413, 298, 470, 297, 310,
315, 472, 315, 315, 315, 315, 315, 315, 315, 315,
315, 472, 294, 293, 315, 315, 315, 315, 315, 423,
423, 423, 423, 423, 423, 423, 423, 427, 427, 427,
427, 427, 427, 427, 427, 274, 315, 315, 315, 315,
315, 315, 318, 318, 318, 318, 318, 318, 318, 318,
318, 484, 273, 272, 318, 318, 318, 318, 318, 426,
484, 426, 426, 426, 426, 426, 426, 426, 426, 497,
461, 271, 461, 461, 461, 261, 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, 260, 259, 334, 334, 334,
334, 334, 429, 497, 429, 429, 429, 429, 429, 429,
429, 429, 478, 478, 478, 478, 478, 478, 257, 334,
334, 334, 334, 334, 334, 337, 337, 337, 337, 337,
337, 337, 337, 337, 434, 434, 256, 255, 337, 337,
337, 337, 337, 430, 434, 430, 430, 430, 430, 430,
430, 430, 430, 499, 520, 520, 520, 520, 520, 520,
337, 337, 337, 337, 337, 337, 360, 360, 360, 360,
360, 360, 360, 360, 360, 431, 254, 431, 431, 431,
431, 431, 431, 450, 450, 455, 455, 455, 455, 455,
455, 455, 455, 253, 252, 251, 450, 499, 250, 360,
361, 361, 361, 361, 361, 361, 361, 361, 361, 462,
462, 462, 462, 462, 462, 462, 462, 455, 464, 511,
464, 464, 464, 464, 464, 464, 464, 464, 234, 511,
233, 232, 231, 361, 369, 229, 369, 369, 369, 369,
369, 369, 369, 369, 369, 372, 512, 372, 372, 372,
372, 372, 372, 372, 372, 372, 512, 228, 219, 372,
372, 372, 372, 372, 465, 514, 465, 465, 465, 465,
465, 465, 465, 465, 218, 514, 217, 216, 215, 213,
212, 372, 372, 372, 372, 372, 372, 375, 375, 375,
375, 375, 375, 375, 375, 375, 211, 210, 209, 375,
375, 375, 375, 375, 466, 208, 466, 466, 466, 466,
466, 466, 471, 471, 471, 471, 471, 471, 471, 471,
205, 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, 197, 196,
193, 192, 389, 389, 389, 389, 389, 477, 477, 477,
477, 477, 477, 477, 477, 481, 481, 481, 481, 481,
481, 481, 481, 481, 389, 389, 389, 389, 389, 389,
406, 547, 406, 406, 406, 406, 406, 406, 406, 406,
480, 547, 480, 480, 480, 480, 480, 480, 480, 480,
482, 482, 482, 482, 482, 482, 482, 482, 482, 185,
184, 178, 175, 174, 406, 407, 173, 407, 407, 407,
407, 407, 407, 407, 407, 483, 483, 483, 483, 483,
483, 483, 483, 483, 556, 556, 172, 171, 498, 169,
168, 498, 498, 167, 498, 498, 166, 556, 498, 407,
408, 165, 408, 408, 408, 408, 408, 408, 408, 408,
498, 498, 498, 506, 164, 506, 506, 506, 506, 506,
506, 506, 506, 500, 163, 162, 500, 500, 157, 500,
500, 156, 149, 500, 408, 409, 148, 409, 409, 409,
409, 409, 409, 409, 409, 500, 500, 500, 147, 146,
504, 504, 504, 504, 504, 504, 504, 504, 507, 142,
507, 507, 507, 507, 507, 507, 507, 507, 141, 409,
419, 139, 419, 419, 419, 419, 419, 419, 419, 419,
419, 422, 504, 422, 422, 422, 422, 422, 422, 422,
422, 422, 135, 128, 124, 422, 422, 422, 422, 422,
508, 121, 508, 508, 508, 508, 508, 508, 508, 508,
525, 525, 525, 525, 525, 525, 525, 422, 422, 422,
422, 422, 422, 425, 425, 425, 425, 425, 425, 425,
425, 425, 114, 113, 112, 425, 425, 425, 425, 425,
513, 513, 513, 513, 513, 513, 513, 513, 519, 519,
519, 519, 519, 519, 519, 519, 111, 425, 425, 425,
425, 425, 425, 437, 437, 437, 437, 437, 437, 437,
437, 437, 437, 457, 110, 457, 457, 457, 457, 457,
457, 457, 457, 521, 105, 521, 521, 521, 521, 521,
521, 521, 521, 523, 523, 523, 523, 523, 523, 523,
523, 523, 104, 102, 101, 97, 93, 457, 458, 92,
458, 458, 458, 458, 458, 458, 458, 458, 524, 524,
524, 524, 524, 524, 524, 524, 524, 535, 535, 535,
535, 535, 535, 535, 535, 577, 577, 577, 577, 577,
577, 88, 458, 459, 85, 459, 459, 459, 459, 459,
459, 459, 459, 83, 78, 77, 76, 74, 539, 535,
539, 539, 539, 539, 539, 539, 540, 540, 540, 540,
540, 540, 540, 540, 69, 62, 55, 459, 460, 49,
460, 460, 460, 460, 460, 460, 460, 460, 48, 47,
46, 542, 539, 542, 542, 542, 542, 542, 542, 542,
542, 543, 45, 543, 543, 543, 543, 543, 543, 543,
543, 44, 460, 473, 37, 473, 473, 473, 473, 473,
473, 473, 473, 473, 476, 36, 476, 476, 476, 476,
476, 476, 476, 476, 476, 35, 34, 32, 476, 476,
476, 476, 476, 544, 29, 544, 544, 544, 544, 544,
544, 560, 560, 560, 560, 560, 560, 560, 560, 23,
476, 476, 476, 476, 476, 476, 479, 479, 479, 479,
479, 479, 479, 479, 17, 15, 14, 13, 479, 479,
479, 479, 479, 550, 0, 550, 550, 550, 550, 550,
550, 550, 550, 0, 0, 0, 0, 0, 0, 0,
479, 479, 479, 479, 479, 479, 501, 0, 501, 501,
501, 501, 501, 501, 501, 501, 561, 561, 561, 561,
561, 561, 561, 561, 562, 562, 562, 562, 562, 562,
562, 562, 569, 569, 569, 569, 569, 569, 569, 569,
501, 502, 0, 502, 502, 502, 502, 502, 502, 502,
502, 0, 573, 0, 573, 573, 573, 573, 573, 573,
0, 0, 0, 0, 569, 575, 575, 575, 575, 575,
575, 575, 575, 0, 0, 502, 503, 0, 503, 503,
503, 503, 503, 503, 503, 503, 573, 576, 576, 576,
576, 576, 576, 576, 576, 0, 0, 0, 0, 0,
581, 581, 581, 581, 581, 581, 581, 581, 0, 0,
503, 515, 0, 515, 515, 515, 515, 515, 515, 515,
515, 515, 518, 0, 518, 518, 518, 518, 518, 518,
518, 518, 581, 0, 0, 0, 518, 518, 518, 518,
518, 0, 582, 582, 582, 582, 582, 582, 582, 582,
583, 583, 583, 583, 583, 583, 583, 583, 518, 518,
518, 518, 518, 518, 537, 0, 537, 537, 537, 537,
537, 537, 537, 537, 582, 0, 0, 0, 0, 0,
0, 0, 583, 585, 585, 585, 585, 585, 585, 585,
585, 586, 586, 586, 586, 586, 586, 0, 537, 538,
0, 538, 538, 538, 538, 538, 538, 538, 538, 0,
0, 0, 0, 0, 0, 585, 0, 0, 0, 0,
0, 0, 0, 586, 0, 0, 0, 0, 0, 0,
0, 0, 0, 538, 557, 0, 557, 557, 557, 557,
557, 557, 557, 557, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 557, 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, 571,
0, 571, 571, 571, 571, 571, 571, 571, 571, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 571, 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, 588,
588, 588, 588, 588, 588, 588, 588, 588, 588, 588,
588, 588, 588, 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, 0, 0, 0, 0,
0, 592, 592, 592, 0, 0, 592, 592, 592, 593,
593, 593, 593, 593, 593, 593, 593, 593, 593, 593,
593, 593, 593, 594, 0, 0, 0, 0, 0, 594,
594, 594, 594, 0, 594, 594, 594, 595, 0, 0,
0, 0, 0, 595, 595, 595, 0, 0, 595, 595,
595, 596, 0, 0, 596, 596, 596, 596, 596, 596,
0, 0, 596, 596, 596, 597, 597, 0, 0, 0,
597, 598, 0, 0, 598, 598, 598, 598, 598, 598,
0, 0, 598, 598, 598, 599, 0, 0, 599, 599,
599, 599, 599, 599, 0, 599, 0, 599, 599, 601,
0, 0, 601, 0, 601, 601, 601, 601, 601, 0,
601, 601, 601, 602, 602, 602, 602, 602, 602, 602,
602, 602, 602, 602, 602, 602, 602, 603, 603, 0,
603, 0, 603, 603, 603, 603, 603, 603, 603, 603,
603, 604, 604, 604, 604, 604, 604, 604, 604, 604,
604, 604, 604, 604, 604, 605, 605, 0, 605, 605,
605, 605, 605, 605, 605, 605, 605, 605, 605, 606,
0, 0, 0, 0, 0, 606, 606, 606, 0, 0,
606, 606, 606, 607, 0, 0, 607, 607, 607, 607,
607, 607, 0, 0, 607, 607, 607, 608, 608, 0,
0, 0, 608, 609, 609, 609, 0, 0, 0, 609,
610, 0, 0, 610, 610, 610, 610, 610, 610, 0,
0, 610, 610, 610, 611, 611, 611, 611, 611, 611,
611, 611, 611, 611, 611, 611, 611, 611, 612, 612,
0, 0, 0, 612, 613, 613, 613, 0, 0, 0,
613, 614, 614, 0, 0, 0, 614, 615, 615, 0,
0, 0, 615, 616, 616, 0, 0, 0, 616, 617,
617, 617, 0, 0, 0, 617, 618, 618, 0, 0,
0, 618, 619, 619, 0, 0, 0, 619, 620, 620,
0, 0, 0, 620, 621, 621, 621, 0, 0, 0,
621, 622, 622, 622, 622, 0, 0, 0, 622, 623,
623, 0, 0, 0, 623, 624, 624, 0, 0, 0,
624, 625, 625, 0, 0, 0, 625, 626, 626, 626,
0, 0, 0, 626, 627, 627, 627, 627, 0, 0,
0, 627, 628, 628, 0, 0, 0, 628, 629, 629,
0, 0, 0, 629, 630, 630, 630, 0, 0, 0,
630, 631, 631, 631, 631, 0, 0, 0, 631, 632,
632, 0, 0, 0, 632, 633, 0, 633, 633, 0,
0, 0, 633, 634, 634, 634, 0, 0, 0, 634,
635, 635, 635, 635, 0, 0, 0, 635, 636, 636,
0, 0, 0, 636, 637, 0, 637, 637, 0, 0,
0, 637, 638, 638, 638, 0, 0, 0, 638, 639,
639, 639, 0, 0, 0, 0, 639, 640, 0, 0,
640, 0, 0, 640, 640, 640, 0, 0, 640, 640,
640, 641, 0, 0, 641, 0, 0, 641, 641, 641,
0, 0, 641, 641, 641, 642, 642, 0, 0, 0,
642, 643, 0, 643, 643, 0, 0, 0, 643, 644,
644, 0, 0, 0, 0, 644, 645, 645, 645, 645,
645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
646, 646, 0, 0, 0, 646, 647, 0, 647, 647,
0, 0, 0, 647, 648, 648, 0, 0, 0, 648,
649, 0, 649, 0, 0, 0, 0, 649, 651, 651,
651, 651, 651, 651, 651, 651, 651, 651, 651, 651,
651, 651, 587, 587, 587, 587, 587, 587, 587, 587,
587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
587, 587, 587, 587, 587, 587, 587, 587
} ;
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 1496 "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 1652 "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 >= 588 )
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] != 3633 );
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 2340 "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 >= 588 )
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 >= 588 )
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 == 587);
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;
}