#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: /usr/local/www/users/anoncvs/cvs/embedaddon/sudo/plugins/sudoers/toke.c,v 1.1.1.3 2012/10/09 09:29:52 misho 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 61
#define YY_END_OF_BUFFER 62
static yyconst short int yy_accept[622] =
{ 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 62, 49, 57, 56, 55, 48, 60, 32,
50, 51, 32, 52, 49, 49, 49, 49, 54, 53,
60, 44, 44, 44, 44, 44, 44, 44, 44, 44,
44, 60, 49, 49, 57, 60, 44, 44, 44, 44,
44, 2, 60, 1, 49, 44, 44, 49, 17, 16,
17, 16, 16, 60, 60, 60, 3, 9, 8, 9,
4, 9, 5, 60, 13, 13, 13, 11, 12, 49,
0, 57, 55, 0, 59, 0, 49, 34, 0, 32,
0, 33, 0, 47, 47, 0, 49, 49, 0, 49,
49, 49, 49, 0, 37, 44, 44, 44, 44, 44,
44, 44, 44, 44, 44, 44, 44, 49, 58, 49,
57, 0, 0, 0, 0, 0, 0, 49, 49, 49,
49, 49, 2, 1, 0, 1, 45, 45, 0, 49,
17, 17, 15, 14, 15, 0, 0, 3, 9, 0,
6, 7, 9, 9, 13, 0, 13, 13, 0, 10,
0, 0, 0, 34, 34, 0, 0, 49, 49, 49,
49, 49, 0, 0, 37, 37, 44, 39, 44, 44,
44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
49, 0, 0, 0, 0, 0, 0, 49, 49, 49,
49, 49, 0, 49, 10, 0, 49, 49, 49, 49,
49, 49, 0, 38, 38, 38, 0, 0, 37, 37,
37, 37, 37, 37, 37, 44, 44, 44, 44, 44,
44, 44, 44, 44, 44, 40, 44, 41, 49, 0,
0, 0, 0, 0, 0, 49, 49, 49, 49, 49,
49, 49, 0, 0, 38, 38, 38, 0, 37, 37,
0, 37, 37, 37, 37, 37, 37, 37, 37, 37,
37, 37, 0, 25, 44, 44, 44, 44, 44, 44,
44, 44, 42, 44, 49, 0, 0, 0, 0, 49,
49, 49, 49, 49, 49, 49, 49, 0, 38, 0,
37, 37, 37, 0, 0, 0, 37, 37, 37, 37,
37, 37, 37, 37, 37, 37, 37, 37, 37, 44,
44, 44, 44, 44, 44, 44, 44, 44, 49, 0,
0, 0, 49, 49, 49, 35, 35, 35, 0, 0,
37, 37, 37, 37, 37, 37, 37, 0, 0, 0,
0, 0, 37, 37, 37, 37, 37, 37, 37, 37,
37, 37, 37, 37, 37, 37, 44, 44, 44, 0,
24, 44, 44, 44, 44, 0, 23, 0, 26, 49,
0, 0, 0, 49, 49, 49, 49, 35, 35, 35,
35, 0, 37, 0, 37, 37, 37, 37, 37, 37,
37, 37, 37, 37, 37, 0, 0, 0, 37, 37,
37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
37, 44, 44, 44, 44, 44, 44, 44, 46, 0,
0, 0, 49, 20, 45, 36, 36, 36, 36, 37,
0, 0, 0, 37, 37, 37, 37, 37, 37, 37,
37, 37, 37, 37, 37, 37, 0, 0, 0, 0,
0, 37, 37, 37, 37, 37, 37, 37, 37, 44,
44, 44, 44, 44, 0, 22, 0, 27, 0, 20,
0, 0, 49, 0, 49, 49, 49, 36, 36, 36,
36, 0, 0, 0, 0, 0, 37, 37, 37, 37,
37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
37, 37, 37, 37, 37, 37, 43, 0, 30, 44,
44, 44, 0, 0, 0, 18, 0, 21, 20, 0,
0, 0, 0, 0, 20, 0, 49, 49, 49, 0,
0, 0, 37, 37, 37, 37, 37, 37, 37, 37,
37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
0, 28, 44, 44, 21, 0, 0, 20, 49, 49,
49, 49, 49, 0, 0, 0, 0, 0, 37, 37,
37, 37, 37, 37, 37, 37, 0, 31, 44, 0,
49, 49, 49, 37, 37, 37, 37, 37, 37, 0,
29, 0, 0, 19, 49, 49, 49, 49, 49, 37,
37, 37, 37, 37, 35, 35, 35, 35, 35, 35,
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, 38, 39, 40, 41,
36, 42, 43, 44, 45, 46, 47, 48, 49, 36,
10, 50, 10, 1, 51, 1, 52, 53, 54, 55,
56, 57, 58, 58, 59, 58, 58, 60, 61, 62,
63, 58, 58, 64, 65, 66, 67, 58, 58, 58,
58, 58, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 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[68] =
{ 0,
1, 2, 3, 4, 5, 6, 1, 7, 7, 1,
1, 8, 1, 9, 10, 11, 11, 11, 11, 11,
11, 11, 11, 12, 13, 7, 1, 11, 11, 11,
11, 11, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 14,
15, 16, 16, 16, 16, 16, 16, 15, 15, 15,
15, 15, 15, 15, 15, 15, 15
} ;
static yyconst short int yy_base[686] =
{ 0,
0, 66, 68, 76, 119, 124, 173, 239, 148, 197,
82, 90, 2937, 2886, 2933, 3595, 2929, 3595, 165, 65,
3595, 3595, 2882, 3595, 130, 293, 173, 146, 2907, 3595,
3595, 350, 2893, 42, 402, 41, 2889, 74, 2888, 2895,
2876, 458, 197, 57, 219, 482, 38, 207, 2854, 37,
2851, 117, 249, 2880, 326, 2841, 2852, 105, 0, 3595,
2875, 3595, 0, 469, 424, 143, 0, 2828, 3595, 48,
3595, 223, 3595, 155, 2827, 202, 97, 3595, 252, 2817,
504, 2855, 2852, 2852, 3595, 258, 504, 312, 526, 201,
548, 2796, 557, 528, 2795, 582, 579, 614, 2820, 2829,
593, 601, 266, 2818, 182, 656, 0, 2796, 2791, 2766,
2761, 296, 2727, 2725, 2713, 2696, 2691, 426, 3595, 87,
659, 2659, 2663, 2655, 2650, 2651, 257, 196, 318, 276,
258, 288, 436, 2694, 631, 2693, 655, 2644, 690, 303,
0, 2681, 168, 3595, 3595, 701, 352, 0, 2634, 723,
3595, 3595, 2633, 447, 2632, 2676, 467, 461, 433, 2670,
2659, 2600, 720, 733, 206, 755, 759, 771, 781, 791,
828, 2581, 2570, 870, 453, 913, 955, 0, 2563, 2557,
2540, 2523, 2530, 2541, 2536, 2516, 2502, 2496, 2475, 2473,
277, 2442, 2436, 2402, 2404, 2407, 477, 436, 2405, 424,
401, 292, 813, 488, 2454, 2450, 845, 438, 855, 890,
756, 465, 2428, 2418, 930, 554, 2409, 2408, 463, 898,
999, 939, 972, 1042, 980, 2403, 490, 2378, 500, 2380,
2338, 2327, 2325, 2321, 2310, 0, 2305, 0, 508, 2274,
2238, 2212, 2211, 2176, 515, 517, 615, 527, 529, 1018,
1061, 1086, 2212, 2210, 1026, 2209, 2203, 2171, 2166, 565,
1069, 754, 1096, 802, 1123, 0, 1106, 1134, 1151, 1159,
1177, 1196, 601, 3595, 2136, 2137, 2127, 2131, 2090, 2090,
2084, 2078, 0, 2062, 607, 2056, 2024, 2025, 573, 576,
578, 676, 1204, 591, 1221, 1239, 1231, 2064, 2031, 2006,
2004, 1274, 676, 1256, 1293, 1318, 682, 808, 815, 1301,
819, 1328, 0, 1339, 1350, 1367, 1247, 1393, 1377, 1955,
1915, 1888, 742, 692, 1884, 1891, 794, 980, 777, 1889,
1856, 652, 945, 680, 820, 1411, 1420, 1436, 1842, 1824,
1800, 1446, 1473, 1455, 1266, 1515, 1492, 1500, 1809, 1534,
1559, 1544, 1009, 1052, 1569, 1571, 1580, 1590, 1601, 0,
1612, 1623, 1590, 1463, 1666, 1642, 1762, 1737, 1740, 1108,
3595, 1696, 1672, 1662, 1628, 1157, 3595, 1158, 3595, 774,
1514, 1500, 730, 1152, 697, 913, 1650, 805, 1686, 1709,
1695, 1516, 1500, 1721, 1222, 1730, 1474, 1744, 0, 830,
1755, 1772, 1571, 1797, 1782, 1816, 1841, 1851, 1284, 1377,
1832, 1861, 1861, 1872, 1883, 0, 1894, 1905, 1872, 1824,
1924, 1414, 1400, 1375, 1336, 1331, 1159, 1483, 1312, 1274,
1260, 1539, 606, 1730, 1238, 1949, 1959, 1969, 1984, 1256,
1994, 2004, 2019, 1245, 1535, 1915, 1932, 1950, 2029, 0,
874, 2040, 2057, 2065, 2082, 2101, 2109, 1214, 2126, 2136,
2146, 1633, 1675, 2154, 924, 966, 2165, 0, 1003, 1092,
1731, 1087, 1056, 1052, 2042, 3595, 2063, 3595, 1017, 2147,
1126, 624, 1311, 2187, 2192, 2183, 1756, 2193, 2203, 2230,
1979, 2238, 992, 2248, 2265, 2275, 830, 811, 1970, 2194,
2281, 2214, 2291, 0, 1111, 2302, 2319, 2256, 2344, 2329,
2362, 2371, 2387, 1807, 813, 1170, 0, 2065, 3595, 2228,
738, 713, 680, 731, 1201, 3595, 900, 653, 2409, 2414,
2419, 2424, 2418, 2436, 2445, 2446, 2459, 2469, 2480, 2494,
2504, 2515, 569, 531, 2215, 2217, 2523, 2221, 2533, 0,
1278, 2544, 2561, 2569, 2588, 519, 2597, 2606, 2615, 492,
2304, 3595, 2393, 452, 3595, 1416, 2621, 2629, 2637, 1981,
2647, 2657, 2672, 2682, 345, 2692, 2707, 2717, 305, 264,
2303, 245, 191, 2725, 0, 1477, 2441, 3595, 2444, 1632,
2735, 2745, 2755, 2770, 2780, 2790, 90, 0, 92, 2482,
3595, 100, 1647, 3595, 2798, 1982, 2808, 2818, 2833, 3595,
2843, 2853, 2763, 3595, 2868, 2876, 2884, 19, 2892, 2903,
3595, 2953, 2969, 2985, 3001, 3017, 3033, 3049, 3065, 3081,
3087, 3103, 3119, 1676, 3135, 3151, 3167, 3183, 3199, 3215,
3231, 3237, 3244, 3260, 3276, 3282, 3289, 3295, 3301, 3307,
3314, 3320, 3326, 3332, 3339, 3347, 3353, 3359, 3365, 3372,
3380, 3386, 3392, 3399, 3407, 3413, 3421, 3428, 3436, 3442,
3450, 3457, 3465, 3481, 3497, 3513, 3519, 3527, 3534, 3540,
3548, 3554, 3562, 3578, 2159
} ;
static yyconst short int yy_def[686] =
{ 0,
621, 1, 1, 1, 622, 622, 623, 623, 624, 624,
625, 625, 621, 626, 621, 621, 621, 621, 627, 628,
621, 621, 629, 621, 630, 626, 26, 26, 631, 621,
621, 621, 32, 32, 32, 35, 35, 35, 35, 35,
35, 626, 26, 626, 621, 627, 32, 32, 35, 35,
35, 621, 621, 621, 632, 35, 35, 626, 633, 621,
633, 621, 633, 621, 627, 621, 634, 635, 621, 635,
621, 635, 621, 636, 637, 637, 637, 621, 621, 626,
626, 621, 621, 638, 621, 639, 621, 628, 621, 640,
628, 629, 629, 630, 641, 626, 626, 26, 631, 98,
98, 98, 98, 642, 643, 35, 35, 35, 35, 35,
35, 35, 35, 35, 35, 35, 35, 626, 621, 626,
621, 621, 621, 621, 621, 621, 638, 626, 98, 626,
626, 626, 621, 621, 621, 621, 632, 644, 626, 626,
633, 633, 621, 621, 621, 639, 621, 634, 635, 635,
621, 621, 635, 635, 637, 621, 637, 637, 621, 621,
638, 645, 621, 621, 640, 640, 621, 626, 626, 626,
98, 171, 646, 621, 647, 621, 106, 35, 35, 35,
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
626, 621, 621, 621, 621, 621, 638, 626, 171, 626,
626, 626, 621, 626, 621, 645, 626, 626, 626, 626,
626, 626, 648, 649, 649, 215, 650, 649, 651, 176,
621, 221, 221, 621, 221, 35, 35, 35, 35, 35,
35, 35, 35, 35, 35, 35, 35, 35, 626, 621,
621, 621, 621, 621, 638, 626, 626, 626, 626, 626,
626, 626, 621, 652, 652, 255, 652, 653, 654, 655,
621, 656, 224, 656, 656, 265, 656, 621, 268, 268,
621, 268, 621, 621, 35, 35, 35, 35, 35, 35,
35, 35, 35, 35, 626, 621, 621, 621, 638, 626,
626, 626, 626, 626, 626, 626, 626, 657, 657, 658,
659, 621, 621, 621, 621, 621, 660, 660, 661, 271,
661, 661, 312, 661, 621, 315, 315, 621, 315, 35,
35, 35, 35, 35, 35, 35, 35, 35, 626, 621,
621, 638, 626, 626, 626, 626, 626, 626, 621, 662,
663, 302, 621, 343, 343, 621, 343, 621, 621, 621,
621, 621, 621, 664, 664, 665, 318, 665, 665, 359,
665, 621, 362, 362, 621, 362, 35, 35, 35, 621,
621, 35, 35, 35, 35, 621, 621, 621, 621, 626,
621, 621, 638, 626, 626, 626, 626, 626, 626, 626,
626, 621, 666, 621, 667, 346, 667, 667, 398, 398,
621, 401, 401, 621, 401, 621, 621, 621, 621, 668,
668, 669, 365, 669, 669, 415, 669, 621, 418, 418,
418, 35, 35, 35, 35, 35, 35, 35, 626, 621,
621, 638, 626, 626, 626, 626, 626, 626, 626, 621,
621, 621, 621, 670, 670, 671, 404, 671, 671, 449,
449, 621, 452, 452, 621, 452, 621, 621, 621, 621,
621, 621, 672, 672, 673, 673, 673, 467, 467, 35,
35, 35, 35, 35, 621, 621, 621, 621, 621, 621,
674, 638, 626, 675, 676, 626, 626, 626, 626, 626,
626, 621, 621, 621, 621, 621, 621, 677, 677, 678,
455, 678, 678, 503, 503, 621, 506, 506, 621, 506,
621, 621, 621, 621, 679, 679, 35, 621, 621, 35,
35, 35, 621, 674, 674, 621, 638, 626, 675, 675,
675, 675, 621, 675, 676, 676, 626, 626, 626, 621,
621, 621, 621, 680, 680, 681, 509, 681, 681, 549,
549, 621, 552, 552, 552, 621, 621, 621, 621, 621,
621, 621, 35, 35, 621, 638, 621, 621, 626, 626,
626, 626, 626, 621, 621, 621, 621, 621, 621, 682,
682, 683, 683, 683, 584, 584, 621, 621, 35, 684,
626, 626, 626, 621, 621, 621, 621, 685, 685, 621,
621, 684, 684, 621, 626, 626, 626, 626, 626, 621,
621, 621, 621, 621, 626, 626, 626, 626, 626, 626,
0, 621, 621, 621, 621, 621, 621, 621, 621, 621,
621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
621, 621, 621, 621, 621
} ;
static yyconst short int yy_nxt[3663] =
{ 0,
14, 15, 16, 17, 18, 19, 20, 21, 22, 14,
23, 24, 14, 14, 25, 26, 27, 28, 26, 26,
26, 26, 26, 29, 30, 31, 14, 32, 33, 33,
33, 34, 35, 35, 35, 35, 36, 35, 37, 35,
38, 39, 40, 41, 35, 35, 35, 35, 35, 42,
14, 43, 43, 43, 43, 43, 43, 14, 14, 14,
14, 14, 14, 14, 44, 14, 14, 45, 81, 52,
89, 46, 151, 53, 107, 110, 115, 52, 107, 54,
111, 53, 55, 76, 16, 77, 78, 54, 90, 109,
55, 76, 16, 77, 78, 47, 48, 150, 128, 49,
158, 113, 604, 131, 56, 394, 81, 50, 57, 35,
51, 35, 56, 547, 91, 114, 57, 35, 133, 35,
15, 60, 61, 120, 62, 15, 60, 61, 134, 62,
62, 79, 58, 95, 95, 62, 81, 95, 95, 79,
58, 191, 62, 63, 147, 119, 156, 62, 63, 15,
16, 17, 69, 65, 81, 95, 154, 119, 70, 71,
72, 102, 102, 102, 102, 102, 103, 85, 64, 147,
119, 140, 73, 64, 15, 16, 17, 86, 65, 96,
87, 87, 87, 87, 87, 87, 87, 87, 101, 101,
101, 101, 101, 101, 101, 101, 174, 74, 15, 16,
17, 69, 65, 157, 621, 176, 89, 70, 71, 72,
80, 621, 100, 100, 100, 100, 100, 100, 100, 100,
121, 73, 66, 67, 67, 67, 67, 67, 67, 67,
67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
15, 16, 17, 107, 65, 81, 74, 152, 122, 123,
166, 156, 124, 159, 160, 166, 155, 198, 394, 85,
125, 135, 129, 126, 87, 87, 87, 87, 87, 87,
87, 87, 150, 87, 87, 87, 87, 87, 87, 87,
87, 172, 172, 172, 172, 172, 172, 547, 66, 67,
67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
67, 67, 67, 67, 67, 67, 97, 81, 98, 98,
98, 98, 98, 98, 98, 98, 99, 621, 197, 201,
100, 100, 100, 100, 100, 81, 81, 182, 501, 138,
138, 80, 183, 138, 138, 621, 184, 81, 185, 239,
200, 81, 81, 202, 100, 100, 100, 100, 100, 100,
80, 138, 81, 147, 119, 246, 80, 204, 574, 80,
80, 91, 80, 80, 80, 106, 106, 106, 106, 106,
106, 106, 106, 99, 199, 139, 80, 106, 106, 106,
106, 106, 107, 107, 107, 107, 108, 107, 107, 107,
107, 107, 107, 107, 107, 107, 107, 107, 107, 81,
107, 100, 100, 100, 100, 100, 100, 80, 80, 80,
80, 80, 80, 80, 80, 80, 80, 107, 107, 107,
107, 107, 107, 107, 107, 621, 85, 147, 119, 107,
107, 107, 107, 107, 159, 160, 146, 133, 107, 621,
621, 621, 621, 621, 621, 621, 621, 134, 147, 119,
81, 207, 248, 80, 80, 80, 80, 80, 80, 118,
119, 80, 80, 80, 158, 80, 80, 174, 157, 80,
143, 119, 144, 81, 145, 81, 220, 174, 144, 85,
145, 80, 80, 80, 85, 81, 220, 81, 99, 246,
246, 273, 145, 145, 86, 589, 150, 87, 87, 87,
87, 87, 87, 87, 87, 80, 174, 80, 80, 80,
156, 80, 80, 274, 81, 80, 156, 85, 145, 87,
87, 87, 87, 87, 87, 87, 87, 80, 80, 80,
245, 95, 95, 174, 276, 95, 95, 81, 163, 277,
127, 164, 164, 164, 164, 164, 164, 164, 164, 88,
249, 88, 88, 95, 501, 88, 88, 81, 92, 88,
92, 92, 92, 285, 92, 92, 81, 290, 92, 257,
257, 257, 88, 88, 289, 85, 81, 96, 81, 174,
92, 92, 92, 94, 292, 80, 80, 94, 220, 80,
80, 246, 447, 94, 168, 169, 170, 168, 168, 168,
168, 168, 273, 333, 293, 94, 94, 80, 172, 172,
172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
172, 172, 172, 172, 274, 81, 85, 81, 81, 171,
171, 171, 171, 171, 171, 171, 171, 334, 99, 332,
81, 171, 171, 171, 171, 171, 87, 87, 87, 87,
87, 87, 87, 87, 85, 81, 81, 483, 138, 138,
121, 329, 138, 138, 81, 171, 171, 171, 171, 171,
171, 177, 177, 177, 177, 177, 177, 177, 177, 99,
138, 291, 527, 177, 177, 177, 177, 177, 122, 123,
174, 137, 124, 80, 80, 137, 174, 80, 80, 220,
125, 137, 81, 126, 139, 263, 383, 171, 171, 171,
171, 171, 171, 137, 137, 80, 621, 621, 621, 621,
621, 621, 621, 621, 149, 81, 372, 149, 149, 81,
335, 373, 85, 526, 149, 164, 164, 164, 164, 164,
164, 164, 164, 370, 565, 385, 81, 149, 164, 164,
164, 164, 164, 164, 164, 164, 165, 564, 165, 165,
95, 434, 165, 165, 95, 371, 165, 261, 174, 207,
95, 208, 208, 208, 208, 208, 208, 263, 165, 165,
165, 563, 95, 95, 207, 432, 208, 208, 208, 208,
208, 208, 208, 208, 207, 376, 209, 209, 209, 209,
209, 209, 209, 209, 207, 81, 210, 210, 210, 210,
210, 211, 208, 208, 138, 621, 174, 377, 138, 387,
81, 261, 174, 81, 138, 263, 81, 174, 261, 174,
81, 263, 621, 174, 447, 380, 138, 138, 310, 429,
81, 80, 310, 212, 212, 212, 212, 212, 212, 212,
212, 444, 444, 396, 81, 212, 212, 212, 212, 212,
250, 251, 252, 250, 250, 250, 250, 250, 207, 81,
208, 208, 208, 208, 208, 208, 208, 208, 386, 212,
212, 212, 212, 212, 212, 214, 215, 216, 216, 216,
216, 216, 216, 217, 81, 498, 498, 218, 218, 218,
218, 218, 85, 207, 81, 208, 208, 208, 208, 208,
208, 208, 208, 225, 225, 225, 225, 225, 225, 225,
225, 218, 218, 218, 218, 218, 218, 174, 221, 222,
223, 221, 221, 221, 221, 221, 224, 261, 174, 81,
225, 225, 225, 225, 225, 255, 255, 256, 257, 257,
257, 257, 257, 217, 265, 265, 265, 265, 265, 265,
265, 265, 81, 566, 225, 225, 225, 225, 225, 225,
226, 226, 226, 226, 226, 226, 226, 226, 435, 621,
174, 378, 226, 226, 226, 226, 226, 266, 266, 266,
266, 266, 267, 621, 81, 264, 264, 264, 264, 264,
264, 264, 264, 379, 384, 492, 212, 212, 212, 212,
212, 212, 261, 174, 262, 262, 262, 262, 262, 262,
262, 262, 263, 174, 515, 515, 264, 264, 264, 264,
264, 293, 263, 294, 294, 294, 294, 294, 294, 294,
294, 299, 299, 299, 299, 299, 299, 299, 299, 217,
264, 264, 264, 264, 264, 264, 174, 268, 269, 270,
268, 268, 268, 268, 268, 271, 174, 81, 523, 272,
272, 272, 272, 272, 293, 310, 295, 295, 295, 295,
295, 295, 295, 295, 304, 305, 306, 304, 304, 304,
304, 304, 522, 272, 272, 272, 272, 272, 272, 293,
521, 296, 296, 296, 296, 296, 297, 294, 294, 370,
81, 272, 272, 272, 272, 272, 272, 272, 272, 261,
174, 308, 308, 308, 308, 308, 308, 525, 526, 263,
520, 371, 544, 544, 517, 81, 261, 174, 308, 308,
308, 308, 308, 308, 308, 308, 263, 261, 174, 309,
309, 309, 309, 309, 309, 309, 309, 310, 376, 378,
475, 311, 311, 311, 311, 311, 312, 312, 312, 312,
312, 312, 312, 312, 313, 313, 313, 313, 313, 314,
377, 379, 476, 261, 174, 311, 311, 311, 311, 311,
311, 174, 315, 316, 317, 315, 315, 315, 315, 315,
318, 81, 525, 526, 319, 319, 319, 319, 319, 621,
433, 311, 311, 311, 311, 311, 311, 311, 311, 336,
337, 338, 336, 336, 336, 336, 336, 457, 319, 319,
319, 319, 319, 319, 293, 394, 294, 294, 294, 294,
294, 294, 294, 294, 293, 396, 294, 294, 294, 294,
294, 294, 293, 81, 294, 294, 294, 294, 294, 294,
294, 294, 360, 360, 360, 360, 360, 361, 396, 348,
81, 349, 349, 349, 349, 349, 349, 349, 349, 342,
81, 399, 399, 399, 399, 399, 400, 81, 81, 343,
344, 345, 343, 343, 343, 343, 343, 346, 174, 580,
580, 347, 347, 347, 347, 347, 348, 310, 350, 350,
350, 350, 350, 350, 350, 350, 319, 319, 319, 319,
319, 319, 319, 319, 480, 347, 347, 347, 347, 347,
347, 348, 479, 351, 351, 351, 351, 351, 352, 349,
349, 261, 174, 355, 355, 355, 355, 355, 355, 355,
355, 310, 261, 174, 355, 355, 355, 355, 355, 355,
81, 81, 310, 261, 174, 356, 356, 356, 356, 356,
356, 356, 356, 357, 474, 528, 473, 358, 358, 358,
358, 358, 359, 359, 359, 359, 359, 359, 359, 359,
621, 174, 358, 358, 358, 358, 358, 358, 358, 358,
357, 358, 358, 358, 358, 358, 358, 174, 362, 363,
364, 362, 362, 362, 362, 362, 365, 590, 85, 472,
366, 366, 366, 366, 366, 387, 388, 388, 388, 388,
388, 388, 388, 388, 387, 389, 389, 389, 389, 389,
389, 389, 389, 471, 366, 366, 366, 366, 366, 366,
387, 390, 390, 390, 390, 390, 391, 388, 388, 470,
81, 347, 347, 347, 347, 347, 347, 347, 347, 81,
398, 398, 398, 398, 398, 398, 398, 398, 416, 416,
416, 416, 416, 417, 477, 81, 394, 621, 395, 395,
395, 395, 395, 395, 395, 395, 396, 396, 598, 598,
397, 397, 397, 397, 397, 621, 478, 397, 397, 397,
397, 397, 397, 397, 397, 406, 407, 408, 406, 406,
406, 406, 406, 342, 397, 397, 397, 397, 397, 397,
401, 402, 403, 401, 401, 401, 401, 401, 404, 259,
481, 85, 405, 405, 405, 405, 405, 348, 394, 349,
349, 349, 349, 349, 349, 349, 349, 348, 396, 349,
349, 349, 349, 349, 349, 431, 405, 405, 405, 405,
405, 405, 348, 430, 349, 349, 349, 349, 349, 349,
349, 349, 261, 174, 261, 174, 450, 450, 450, 450,
450, 451, 310, 482, 357, 366, 366, 366, 366, 366,
366, 366, 366, 621, 174, 415, 415, 415, 415, 415,
415, 415, 415, 357, 261, 174, 411, 411, 411, 411,
411, 411, 411, 411, 357, 261, 174, 411, 411, 411,
411, 411, 411, 603, 604, 357, 261, 174, 412, 412,
412, 412, 412, 412, 412, 412, 413, 174, 603, 604,
414, 414, 414, 414, 414, 621, 357, 414, 414, 414,
414, 414, 414, 414, 414, 436, 437, 438, 439, 436,
436, 436, 436, 428, 414, 414, 414, 414, 414, 414,
174, 418, 419, 420, 418, 418, 418, 418, 418, 174,
148, 148, 427, 421, 421, 421, 421, 421, 413, 81,
387, 388, 388, 388, 388, 388, 388, 388, 388, 387,
388, 388, 388, 388, 388, 388, 426, 421, 421, 421,
421, 421, 421, 387, 388, 388, 388, 388, 388, 388,
388, 388, 518, 484, 425, 81, 441, 442, 443, 441,
441, 441, 441, 441, 81, 405, 405, 405, 405, 405,
405, 405, 405, 484, 519, 484, 485, 394, 81, 445,
445, 445, 445, 445, 445, 445, 445, 396, 394, 486,
446, 446, 446, 446, 446, 446, 446, 446, 447, 81,
424, 423, 448, 448, 448, 448, 448, 449, 449, 449,
449, 449, 449, 449, 449, 621, 422, 448, 448, 448,
448, 448, 448, 448, 448, 81, 448, 448, 448, 448,
448, 448, 452, 453, 454, 452, 452, 452, 452, 452,
455, 174, 348, 342, 456, 456, 456, 456, 456, 457,
413, 458, 458, 458, 458, 458, 458, 458, 458, 468,
468, 468, 468, 468, 469, 261, 174, 259, 456, 456,
456, 456, 456, 456, 457, 357, 459, 459, 459, 459,
459, 459, 459, 459, 457, 217, 460, 460, 460, 460,
460, 461, 458, 458, 261, 174, 421, 421, 421, 421,
421, 421, 421, 421, 413, 621, 174, 467, 467, 467,
467, 467, 467, 467, 467, 413, 261, 174, 464, 464,
464, 464, 464, 464, 464, 464, 413, 261, 174, 464,
464, 464, 464, 464, 464, 382, 381, 413, 261, 174,
465, 465, 465, 465, 465, 465, 465, 465, 394, 375,
374, 369, 466, 466, 466, 466, 466, 621, 447, 466,
466, 466, 466, 466, 466, 466, 466, 456, 456, 456,
456, 456, 456, 456, 456, 368, 466, 466, 466, 466,
466, 466, 486, 621, 487, 487, 487, 487, 487, 487,
487, 487, 486, 447, 488, 488, 488, 488, 488, 488,
488, 488, 486, 394, 489, 489, 489, 489, 489, 490,
491, 491, 486, 447, 569, 605, 367, 486, 81, 491,
491, 491, 487, 487, 487, 487, 487, 492, 81, 493,
493, 493, 493, 493, 493, 493, 493, 492, 81, 494,
494, 494, 494, 494, 494, 494, 494, 342, 81, 259,
81, 81, 492, 81, 495, 495, 495, 495, 495, 496,
493, 493, 394, 475, 499, 499, 499, 499, 499, 499,
499, 499, 447, 394, 217, 500, 500, 500, 500, 500,
500, 500, 500, 501, 477, 476, 518, 502, 502, 502,
502, 502, 503, 503, 503, 503, 503, 503, 503, 503,
504, 504, 504, 504, 504, 505, 478, 217, 519, 286,
331, 502, 502, 502, 502, 502, 502, 506, 507, 508,
506, 506, 506, 506, 506, 509, 330, 328, 327, 510,
510, 510, 510, 510, 621, 326, 502, 502, 502, 502,
502, 502, 502, 502, 511, 512, 513, 511, 511, 511,
511, 511, 325, 510, 510, 510, 510, 510, 510, 457,
324, 458, 458, 458, 458, 458, 458, 458, 458, 457,
484, 458, 458, 458, 458, 458, 458, 458, 458, 457,
323, 458, 458, 458, 458, 458, 458, 261, 174, 614,
484, 322, 484, 484, 614, 321, 320, 413, 261, 174,
516, 516, 516, 516, 516, 516, 516, 516, 530, 302,
531, 532, 533, 530, 259, 531, 532, 533, 537, 538,
539, 537, 537, 537, 537, 537, 486, 394, 487, 487,
487, 487, 487, 487, 487, 487, 486, 501, 487, 487,
487, 487, 487, 487, 487, 487, 217, 621, 394, 561,
394, 298, 81, 217, 621, 105, 534, 501, 501, 286,
547, 536, 81, 486, 547, 487, 487, 487, 487, 487,
487, 562, 81, 540, 541, 542, 540, 540, 540, 540,
540, 492, 288, 493, 493, 493, 493, 493, 493, 493,
493, 550, 550, 550, 550, 550, 551, 286, 492, 81,
493, 493, 493, 493, 493, 493, 493, 493, 492, 287,
493, 493, 493, 493, 493, 493, 510, 510, 510, 510,
510, 510, 510, 510, 394, 561, 545, 545, 545, 545,
545, 545, 545, 545, 501, 394, 394, 546, 546, 546,
546, 546, 546, 546, 546, 547, 547, 562, 286, 548,
548, 548, 548, 548, 549, 549, 549, 549, 549, 549,
549, 549, 621, 284, 548, 548, 548, 548, 548, 548,
548, 548, 283, 548, 548, 548, 548, 548, 548, 552,
553, 554, 552, 552, 552, 552, 552, 282, 281, 280,
279, 555, 555, 555, 555, 555, 174, 556, 556, 556,
556, 556, 556, 556, 556, 174, 557, 557, 557, 557,
557, 557, 557, 557, 587, 555, 555, 555, 555, 555,
555, 174, 558, 558, 558, 558, 558, 559, 556, 556,
621, 278, 621, 621, 621, 530, 588, 531, 532, 533,
621, 275, 531, 532, 533, 621, 99, 621, 621, 533,
567, 217, 259, 568, 568, 568, 568, 568, 568, 568,
568, 217, 587, 529, 529, 600, 621, 529, 621, 621,
621, 105, 85, 535, 535, 205, 247, 535, 534, 529,
529, 529, 244, 534, 588, 243, 242, 601, 534, 535,
535, 535, 569, 534, 570, 570, 570, 570, 570, 570,
570, 570, 569, 600, 571, 571, 571, 571, 571, 571,
571, 571, 241, 569, 536, 572, 572, 572, 572, 572,
573, 570, 570, 240, 238, 601, 237, 574, 81, 575,
575, 575, 575, 575, 575, 575, 575, 574, 81, 576,
576, 576, 576, 576, 576, 576, 576, 236, 574, 81,
577, 577, 577, 577, 577, 578, 575, 575, 555, 555,
555, 555, 555, 555, 555, 555, 394, 235, 581, 581,
581, 581, 581, 581, 581, 581, 547, 394, 234, 582,
582, 582, 582, 582, 582, 582, 582, 233, 232, 231,
230, 583, 583, 583, 583, 583, 584, 584, 584, 584,
584, 584, 584, 584, 585, 585, 585, 585, 585, 586,
229, 228, 227, 105, 97, 583, 583, 583, 583, 583,
583, 621, 85, 583, 583, 583, 583, 583, 583, 583,
583, 174, 556, 556, 556, 556, 556, 556, 556, 556,
174, 556, 556, 556, 556, 556, 556, 556, 556, 174,
556, 556, 556, 556, 556, 556, 568, 568, 568, 568,
568, 568, 568, 568, 568, 568, 568, 568, 568, 568,
568, 568, 591, 592, 593, 591, 591, 591, 591, 591,
569, 85, 570, 570, 570, 570, 570, 570, 570, 570,
569, 205, 570, 570, 570, 570, 570, 570, 570, 570,
155, 156, 150, 150, 142, 569, 81, 570, 570, 570,
570, 570, 570, 203, 136, 136, 81, 594, 595, 596,
594, 594, 594, 594, 594, 574, 81, 575, 575, 575,
575, 575, 575, 575, 575, 196, 195, 194, 193, 192,
574, 81, 575, 575, 575, 575, 575, 575, 575, 575,
574, 190, 575, 575, 575, 575, 575, 575, 394, 189,
599, 599, 599, 599, 599, 599, 599, 599, 605, 188,
606, 606, 606, 606, 606, 606, 606, 606, 605, 187,
607, 607, 607, 607, 607, 607, 607, 607, 605, 186,
608, 608, 608, 608, 608, 609, 606, 606, 610, 610,
610, 610, 610, 610, 81, 610, 610, 610, 610, 610,
610, 610, 610, 181, 81, 611, 611, 611, 611, 611,
611, 611, 611, 180, 81, 612, 612, 612, 612, 612,
613, 610, 610, 615, 616, 617, 615, 615, 615, 615,
615, 605, 179, 606, 606, 606, 606, 606, 606, 606,
606, 605, 178, 606, 606, 606, 606, 606, 606, 606,
606, 105, 80, 105, 167, 93, 605, 81, 606, 606,
606, 606, 606, 606, 85, 83, 82, 81, 610, 610,
610, 610, 610, 610, 610, 610, 81, 81, 610, 610,
610, 610, 610, 610, 610, 610, 156, 150, 142, 113,
111, 136, 81, 618, 618, 618, 618, 618, 618, 618,
618, 615, 615, 615, 615, 615, 615, 615, 615, 619,
619, 619, 619, 619, 620, 618, 618, 618, 618, 618,
618, 618, 618, 618, 618, 132, 130, 81, 618, 618,
618, 618, 618, 618, 117, 81, 116, 115, 112, 107,
105, 93, 83, 81, 82, 81, 621, 621, 621, 621,
621, 81, 621, 621, 621, 621, 621, 621, 621, 621,
621, 621, 81, 59, 59, 59, 59, 59, 59, 59,
59, 59, 59, 59, 59, 59, 59, 59, 59, 31,
31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
31, 31, 31, 31, 31, 68, 68, 68, 68, 68,
68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
68, 75, 75, 75, 75, 75, 75, 75, 75, 75,
75, 75, 75, 75, 75, 75, 75, 80, 621, 621,
621, 621, 621, 621, 621, 80, 80, 80, 621, 621,
80, 80, 80, 84, 84, 84, 84, 84, 84, 84,
84, 84, 84, 84, 84, 84, 84, 84, 84, 88,
621, 621, 621, 621, 88, 621, 621, 88, 88, 88,
88, 621, 88, 88, 88, 92, 621, 621, 621, 621,
621, 621, 621, 92, 92, 92, 621, 621, 92, 92,
92, 94, 621, 621, 94, 94, 621, 94, 621, 94,
94, 94, 621, 621, 94, 94, 94, 104, 104, 621,
621, 621, 104, 137, 621, 621, 137, 137, 621, 137,
621, 137, 137, 137, 621, 621, 137, 137, 137, 141,
621, 621, 141, 141, 621, 141, 621, 141, 141, 141,
621, 141, 621, 141, 141, 149, 621, 621, 149, 621,
621, 149, 621, 149, 149, 149, 149, 621, 149, 149,
149, 153, 153, 153, 153, 153, 153, 153, 153, 153,
153, 153, 153, 153, 153, 153, 153, 155, 155, 621,
155, 621, 155, 155, 155, 155, 155, 155, 155, 155,
155, 155, 155, 161, 161, 161, 161, 161, 161, 161,
161, 161, 161, 161, 161, 161, 161, 161, 161, 162,
162, 621, 162, 162, 162, 162, 162, 162, 162, 162,
162, 162, 162, 162, 162, 165, 621, 621, 621, 621,
165, 621, 621, 165, 165, 165, 621, 621, 165, 165,
165, 95, 621, 621, 95, 95, 621, 95, 621, 95,
95, 95, 621, 621, 95, 95, 95, 173, 173, 621,
621, 621, 173, 175, 175, 175, 621, 621, 621, 175,
138, 621, 621, 138, 138, 621, 138, 621, 138, 138,
138, 621, 621, 138, 138, 138, 206, 206, 206, 206,
206, 206, 206, 206, 206, 206, 206, 206, 206, 206,
206, 206, 213, 213, 621, 621, 621, 213, 219, 219,
219, 621, 621, 621, 219, 253, 253, 621, 621, 621,
253, 254, 254, 621, 621, 621, 254, 258, 258, 621,
621, 621, 258, 260, 260, 260, 621, 621, 621, 260,
298, 298, 621, 621, 621, 298, 300, 300, 621, 621,
621, 300, 301, 301, 621, 621, 621, 301, 303, 303,
303, 621, 621, 621, 303, 307, 307, 307, 307, 621,
621, 621, 307, 339, 339, 621, 621, 621, 339, 340,
340, 621, 621, 621, 340, 341, 341, 621, 621, 621,
341, 353, 353, 353, 621, 621, 621, 353, 354, 354,
354, 354, 621, 621, 621, 354, 392, 392, 621, 621,
621, 392, 393, 393, 621, 621, 621, 393, 409, 409,
409, 621, 621, 621, 409, 410, 410, 410, 410, 621,
621, 621, 410, 440, 440, 621, 621, 621, 440, 444,
621, 444, 444, 621, 621, 621, 444, 462, 462, 462,
621, 621, 621, 462, 463, 463, 463, 463, 621, 621,
621, 463, 497, 497, 621, 621, 621, 497, 498, 621,
498, 498, 621, 621, 621, 498, 514, 514, 514, 621,
621, 621, 514, 515, 515, 515, 621, 621, 621, 621,
515, 524, 524, 524, 524, 524, 524, 524, 524, 524,
524, 524, 524, 524, 524, 524, 524, 529, 529, 621,
529, 529, 529, 621, 621, 529, 529, 529, 621, 621,
529, 529, 529, 535, 535, 621, 535, 535, 535, 621,
621, 535, 535, 535, 621, 621, 535, 535, 535, 543,
543, 621, 621, 621, 543, 544, 621, 544, 544, 621,
621, 621, 544, 560, 560, 621, 621, 621, 621, 560,
579, 579, 621, 621, 621, 579, 580, 621, 580, 580,
621, 621, 621, 580, 597, 597, 621, 621, 621, 597,
598, 621, 598, 621, 621, 621, 621, 598, 602, 602,
602, 602, 602, 602, 602, 602, 602, 602, 602, 602,
602, 602, 602, 602, 13, 621, 621, 621, 621, 621,
621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
621, 621
} ;
static yyconst short int yy_chk[3663] =
{ 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, 1, 1, 2, 618, 3,
20, 2, 70, 3, 47, 36, 50, 4, 34, 3,
36, 4, 3, 11, 11, 11, 11, 4, 20, 34,
4, 12, 12, 12, 12, 2, 2, 70, 47, 2,
77, 38, 602, 50, 3, 599, 44, 2, 3, 3,
2, 3, 4, 597, 20, 38, 4, 4, 52, 4,
5, 5, 5, 44, 5, 6, 6, 6, 52, 6,
5, 11, 3, 25, 25, 6, 120, 25, 25, 12,
4, 120, 5, 5, 66, 66, 77, 6, 6, 9,
9, 9, 9, 9, 58, 25, 74, 74, 9, 9,
9, 28, 28, 28, 28, 28, 28, 19, 5, 143,
143, 58, 9, 6, 7, 7, 7, 19, 7, 25,
19, 19, 19, 19, 19, 19, 19, 19, 27, 27,
27, 27, 27, 27, 27, 27, 105, 9, 10, 10,
10, 10, 10, 76, 583, 105, 90, 10, 10, 10,
43, 165, 43, 43, 43, 43, 43, 43, 43, 43,
45, 10, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
8, 8, 8, 48, 8, 128, 10, 72, 45, 45,
90, 76, 45, 79, 79, 165, 79, 128, 582, 127,
45, 53, 48, 45, 53, 53, 53, 53, 53, 53,
53, 53, 72, 86, 86, 86, 86, 86, 86, 86,
86, 103, 103, 103, 103, 103, 103, 580, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 8, 26, 131, 26, 26,
26, 26, 26, 26, 26, 26, 26, 88, 127, 131,
26, 26, 26, 26, 26, 130, 191, 112, 579, 55,
55, 129, 112, 55, 55, 88, 112, 132, 112, 191,
130, 202, 26, 132, 26, 26, 26, 26, 26, 26,
32, 55, 140, 147, 147, 202, 32, 140, 575, 32,
32, 88, 32, 32, 32, 32, 32, 32, 32, 32,
32, 32, 32, 32, 129, 55, 32, 32, 32, 32,
32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
32, 32, 32, 32, 32, 32, 32, 35, 35, 35,
35, 35, 35, 35, 35, 35, 65, 118, 118, 35,
35, 35, 35, 35, 159, 159, 65, 133, 35, 65,
65, 65, 65, 65, 65, 65, 65, 133, 154, 154,
201, 208, 201, 35, 35, 35, 35, 35, 35, 42,
42, 42, 42, 42, 158, 42, 42, 175, 157, 42,
64, 64, 64, 200, 64, 118, 175, 219, 64, 197,
64, 42, 42, 42, 46, 198, 219, 208, 212, 200,
198, 227, 64, 64, 46, 564, 154, 46, 46, 46,
46, 46, 46, 46, 46, 81, 560, 81, 81, 81,
158, 81, 81, 227, 212, 81, 157, 245, 64, 87,
87, 87, 87, 87, 87, 87, 87, 81, 81, 81,
197, 94, 94, 556, 229, 94, 94, 204, 89, 229,
46, 89, 89, 89, 89, 89, 89, 89, 89, 91,
204, 91, 91, 94, 544, 91, 91, 239, 93, 91,
93, 93, 93, 239, 93, 93, 246, 246, 93, 216,
216, 216, 91, 91, 245, 289, 248, 94, 249, 260,
93, 93, 93, 96, 249, 96, 96, 96, 260, 96,
96, 248, 543, 96, 97, 97, 97, 97, 97, 97,
97, 97, 273, 290, 294, 96, 96, 96, 101, 101,
101, 101, 101, 101, 101, 101, 102, 102, 102, 102,
102, 102, 102, 102, 273, 290, 482, 291, 97, 98,
98, 98, 98, 98, 98, 98, 98, 291, 247, 289,
294, 98, 98, 98, 98, 98, 135, 135, 135, 135,
135, 135, 135, 135, 332, 433, 285, 433, 137, 137,
121, 285, 137, 137, 247, 98, 98, 98, 98, 98,
98, 106, 106, 106, 106, 106, 106, 106, 106, 106,
137, 247, 482, 106, 106, 106, 106, 106, 121, 121,
303, 139, 121, 139, 139, 139, 307, 139, 139, 303,
121, 139, 528, 121, 137, 307, 332, 106, 106, 106,
106, 106, 106, 139, 139, 139, 146, 146, 146, 146,
146, 146, 146, 146, 150, 292, 324, 150, 150, 334,
292, 324, 383, 524, 150, 163, 163, 163, 163, 163,
163, 163, 163, 323, 523, 334, 385, 150, 164, 164,
164, 164, 164, 164, 164, 164, 166, 522, 166, 166,
167, 385, 166, 166, 167, 323, 166, 262, 262, 211,
167, 211, 211, 211, 211, 211, 211, 262, 166, 166,
166, 521, 167, 167, 168, 383, 168, 168, 168, 168,
168, 168, 168, 168, 169, 327, 169, 169, 169, 169,
169, 169, 169, 169, 170, 211, 170, 170, 170, 170,
170, 170, 170, 170, 203, 264, 264, 327, 203, 388,
168, 308, 308, 380, 203, 264, 329, 515, 309, 309,
169, 308, 311, 311, 498, 329, 203, 203, 309, 380,
170, 171, 311, 171, 171, 171, 171, 171, 171, 171,
171, 400, 400, 497, 388, 171, 171, 171, 171, 171,
207, 207, 207, 207, 207, 207, 207, 207, 209, 335,
209, 209, 209, 209, 209, 209, 209, 209, 335, 171,
171, 171, 171, 171, 171, 174, 174, 174, 174, 174,
174, 174, 174, 174, 207, 451, 451, 174, 174, 174,
174, 174, 527, 210, 209, 210, 210, 210, 210, 210,
210, 210, 210, 220, 220, 220, 220, 220, 220, 220,
220, 174, 174, 174, 174, 174, 174, 176, 176, 176,
176, 176, 176, 176, 176, 176, 176, 465, 465, 210,
176, 176, 176, 176, 176, 215, 215, 215, 215, 215,
215, 215, 215, 215, 222, 222, 222, 222, 222, 222,
222, 222, 386, 527, 176, 176, 176, 176, 176, 176,
177, 177, 177, 177, 177, 177, 177, 177, 386, 466,
466, 328, 177, 177, 177, 177, 177, 223, 223, 223,
223, 223, 223, 225, 333, 225, 225, 225, 225, 225,
225, 225, 225, 328, 333, 493, 177, 177, 177, 177,
177, 177, 221, 221, 221, 221, 221, 221, 221, 221,
221, 221, 221, 353, 469, 469, 221, 221, 221, 221,
221, 250, 353, 250, 250, 250, 250, 250, 250, 250,
250, 255, 255, 255, 255, 255, 255, 255, 255, 255,
221, 221, 221, 221, 221, 221, 224, 224, 224, 224,
224, 224, 224, 224, 224, 224, 354, 250, 479, 224,
224, 224, 224, 224, 251, 354, 251, 251, 251, 251,
251, 251, 251, 251, 261, 261, 261, 261, 261, 261,
261, 261, 474, 224, 224, 224, 224, 224, 224, 252,
473, 252, 252, 252, 252, 252, 252, 252, 252, 370,
251, 263, 263, 263, 263, 263, 263, 263, 263, 267,
267, 267, 267, 267, 267, 267, 267, 481, 481, 267,
472, 370, 505, 505, 470, 252, 265, 265, 265, 265,
265, 265, 265, 265, 265, 265, 265, 268, 268, 268,
268, 268, 268, 268, 268, 268, 268, 268, 376, 378,
427, 268, 268, 268, 268, 268, 269, 269, 269, 269,
269, 269, 269, 269, 270, 270, 270, 270, 270, 270,
376, 378, 427, 516, 516, 268, 268, 268, 268, 268,
268, 271, 271, 271, 271, 271, 271, 271, 271, 271,
271, 384, 525, 525, 271, 271, 271, 271, 271, 272,
384, 272, 272, 272, 272, 272, 272, 272, 272, 293,
293, 293, 293, 293, 293, 293, 293, 458, 271, 271,
271, 271, 271, 271, 295, 395, 295, 295, 295, 295,
295, 295, 295, 295, 297, 395, 297, 297, 297, 297,
297, 297, 296, 293, 296, 296, 296, 296, 296, 296,
296, 296, 317, 317, 317, 317, 317, 317, 444, 304,
295, 304, 304, 304, 304, 304, 304, 304, 304, 440,
297, 345, 345, 345, 345, 345, 345, 435, 296, 302,
302, 302, 302, 302, 302, 302, 302, 302, 409, 551,
551, 302, 302, 302, 302, 302, 305, 409, 305, 305,
305, 305, 305, 305, 305, 305, 310, 310, 310, 310,
310, 310, 310, 310, 431, 302, 302, 302, 302, 302,
302, 306, 430, 306, 306, 306, 306, 306, 306, 306,
306, 312, 312, 312, 312, 312, 312, 312, 312, 312,
312, 312, 314, 314, 314, 314, 314, 314, 314, 314,
483, 429, 314, 315, 315, 315, 315, 315, 315, 315,
315, 315, 315, 315, 426, 483, 425, 315, 315, 315,
315, 315, 316, 316, 316, 316, 316, 316, 316, 316,
319, 410, 319, 319, 319, 319, 319, 319, 319, 319,
410, 315, 315, 315, 315, 315, 315, 318, 318, 318,
318, 318, 318, 318, 318, 318, 318, 566, 566, 424,
318, 318, 318, 318, 318, 336, 336, 336, 336, 336,
336, 336, 336, 336, 337, 337, 337, 337, 337, 337,
337, 337, 337, 423, 318, 318, 318, 318, 318, 318,
338, 338, 338, 338, 338, 338, 338, 338, 338, 422,
336, 342, 342, 342, 342, 342, 342, 342, 342, 337,
344, 344, 344, 344, 344, 344, 344, 344, 364, 364,
364, 364, 364, 364, 428, 338, 343, 397, 343, 343,
343, 343, 343, 343, 343, 343, 343, 397, 586, 586,
343, 343, 343, 343, 343, 347, 428, 347, 347, 347,
347, 347, 347, 347, 347, 348, 348, 348, 348, 348,
348, 348, 348, 393, 343, 343, 343, 343, 343, 343,
346, 346, 346, 346, 346, 346, 346, 346, 346, 392,
432, 432, 346, 346, 346, 346, 346, 350, 445, 350,
350, 350, 350, 350, 350, 350, 350, 352, 445, 352,
352, 352, 352, 352, 352, 382, 346, 346, 346, 346,
346, 346, 351, 381, 351, 351, 351, 351, 351, 351,
351, 351, 355, 355, 356, 356, 403, 403, 403, 403,
403, 403, 355, 432, 356, 357, 357, 357, 357, 357,
357, 357, 357, 358, 358, 363, 363, 363, 363, 363,
363, 363, 363, 358, 359, 359, 359, 359, 359, 359,
359, 359, 359, 359, 359, 361, 361, 361, 361, 361,
361, 361, 361, 590, 590, 361, 362, 362, 362, 362,
362, 362, 362, 362, 362, 362, 362, 462, 603, 603,
362, 362, 362, 362, 362, 366, 462, 366, 366, 366,
366, 366, 366, 366, 366, 387, 387, 387, 387, 387,
387, 387, 387, 375, 362, 362, 362, 362, 362, 362,
365, 365, 365, 365, 365, 365, 365, 365, 365, 463,
634, 634, 374, 365, 365, 365, 365, 365, 463, 387,
389, 389, 389, 389, 389, 389, 389, 389, 389, 391,
391, 391, 391, 391, 391, 391, 373, 365, 365, 365,
365, 365, 365, 390, 390, 390, 390, 390, 390, 390,
390, 390, 471, 434, 372, 389, 394, 394, 394, 394,
394, 394, 394, 394, 391, 396, 396, 396, 396, 396,
396, 396, 396, 434, 471, 434, 434, 398, 390, 398,
398, 398, 398, 398, 398, 398, 398, 398, 401, 487,
401, 401, 401, 401, 401, 401, 401, 401, 401, 434,
369, 368, 401, 401, 401, 401, 401, 402, 402, 402,
402, 402, 402, 402, 402, 405, 367, 405, 405, 405,
405, 405, 405, 405, 405, 487, 401, 401, 401, 401,
401, 401, 404, 404, 404, 404, 404, 404, 404, 404,
404, 514, 349, 341, 404, 404, 404, 404, 404, 406,
514, 406, 406, 406, 406, 406, 406, 406, 406, 420,
420, 420, 420, 420, 420, 411, 411, 340, 404, 404,
404, 404, 404, 404, 407, 411, 407, 407, 407, 407,
407, 407, 407, 407, 408, 339, 408, 408, 408, 408,
408, 408, 408, 408, 412, 412, 413, 413, 413, 413,
413, 413, 413, 413, 412, 414, 414, 419, 419, 419,
419, 419, 419, 419, 419, 414, 415, 415, 415, 415,
415, 415, 415, 415, 415, 415, 415, 417, 417, 417,
417, 417, 417, 417, 417, 331, 330, 417, 418, 418,
418, 418, 418, 418, 418, 418, 418, 418, 446, 326,
325, 322, 418, 418, 418, 418, 418, 421, 446, 421,
421, 421, 421, 421, 421, 421, 421, 447, 447, 447,
447, 447, 447, 447, 447, 321, 418, 418, 418, 418,
418, 418, 436, 448, 436, 436, 436, 436, 436, 436,
436, 436, 437, 448, 437, 437, 437, 437, 437, 437,
437, 437, 438, 499, 438, 438, 438, 438, 438, 438,
438, 438, 491, 499, 570, 606, 320, 439, 436, 439,
439, 439, 439, 439, 439, 439, 439, 441, 437, 441,
441, 441, 441, 441, 441, 441, 441, 442, 438, 442,
442, 442, 442, 442, 442, 442, 442, 301, 491, 300,
570, 606, 443, 439, 443, 443, 443, 443, 443, 443,
443, 443, 449, 475, 449, 449, 449, 449, 449, 449,
449, 449, 449, 452, 299, 452, 452, 452, 452, 452,
452, 452, 452, 452, 477, 475, 518, 452, 452, 452,
452, 452, 453, 453, 453, 453, 453, 453, 453, 453,
454, 454, 454, 454, 454, 454, 477, 298, 518, 288,
287, 452, 452, 452, 452, 452, 452, 455, 455, 455,
455, 455, 455, 455, 455, 455, 286, 284, 282, 455,
455, 455, 455, 455, 456, 281, 456, 456, 456, 456,
456, 456, 456, 456, 457, 457, 457, 457, 457, 457,
457, 457, 280, 455, 455, 455, 455, 455, 455, 459,
279, 459, 459, 459, 459, 459, 459, 459, 459, 460,
480, 460, 460, 460, 460, 460, 460, 460, 460, 461,
278, 461, 461, 461, 461, 461, 461, 464, 464, 685,
480, 277, 480, 480, 685, 276, 275, 464, 467, 467,
467, 467, 467, 467, 467, 467, 467, 467, 484, 259,
484, 484, 484, 485, 258, 485, 485, 485, 486, 486,
486, 486, 486, 486, 486, 486, 488, 500, 488, 488,
488, 488, 488, 488, 488, 488, 489, 500, 489, 489,
489, 489, 489, 489, 489, 489, 257, 502, 545, 520,
546, 256, 486, 254, 548, 253, 484, 502, 545, 244,
546, 485, 488, 490, 548, 490, 490, 490, 490, 490,
490, 520, 489, 492, 492, 492, 492, 492, 492, 492,
492, 494, 243, 494, 494, 494, 494, 494, 494, 494,
494, 508, 508, 508, 508, 508, 508, 242, 495, 490,
495, 495, 495, 495, 495, 495, 495, 495, 496, 241,
496, 496, 496, 496, 496, 496, 501, 501, 501, 501,
501, 501, 501, 501, 503, 561, 503, 503, 503, 503,
503, 503, 503, 503, 503, 506, 581, 506, 506, 506,
506, 506, 506, 506, 506, 506, 581, 561, 240, 506,
506, 506, 506, 506, 507, 507, 507, 507, 507, 507,
507, 507, 510, 237, 510, 510, 510, 510, 510, 510,
510, 510, 235, 506, 506, 506, 506, 506, 506, 509,
509, 509, 509, 509, 509, 509, 509, 234, 233, 232,
231, 509, 509, 509, 509, 509, 511, 511, 511, 511,
511, 511, 511, 511, 511, 512, 512, 512, 512, 512,
512, 512, 512, 512, 563, 509, 509, 509, 509, 509,
509, 513, 513, 513, 513, 513, 513, 513, 513, 513,
529, 230, 529, 529, 529, 530, 563, 530, 530, 530,
531, 228, 531, 531, 531, 532, 226, 532, 532, 532,
533, 218, 217, 533, 533, 533, 533, 533, 533, 533,
533, 214, 587, 534, 534, 589, 535, 534, 535, 535,
535, 213, 206, 536, 536, 205, 199, 536, 529, 534,
534, 534, 196, 530, 587, 195, 194, 589, 531, 536,
536, 536, 537, 532, 537, 537, 537, 537, 537, 537,
537, 537, 538, 600, 538, 538, 538, 538, 538, 538,
538, 538, 193, 539, 535, 539, 539, 539, 539, 539,
539, 539, 539, 192, 190, 600, 189, 540, 537, 540,
540, 540, 540, 540, 540, 540, 540, 541, 538, 541,
541, 541, 541, 541, 541, 541, 541, 188, 542, 539,
542, 542, 542, 542, 542, 542, 542, 542, 547, 547,
547, 547, 547, 547, 547, 547, 549, 187, 549, 549,
549, 549, 549, 549, 549, 549, 549, 552, 186, 552,
552, 552, 552, 552, 552, 552, 552, 185, 184, 183,
182, 552, 552, 552, 552, 552, 553, 553, 553, 553,
553, 553, 553, 553, 554, 554, 554, 554, 554, 554,
181, 180, 179, 173, 172, 552, 552, 552, 552, 552,
552, 555, 162, 555, 555, 555, 555, 555, 555, 555,
555, 557, 557, 557, 557, 557, 557, 557, 557, 557,
558, 558, 558, 558, 558, 558, 558, 558, 558, 559,
559, 559, 559, 559, 559, 559, 567, 567, 567, 567,
567, 567, 567, 567, 568, 568, 568, 568, 568, 568,
568, 568, 569, 569, 569, 569, 569, 569, 569, 569,
571, 161, 571, 571, 571, 571, 571, 571, 571, 571,
572, 160, 572, 572, 572, 572, 572, 572, 572, 572,
156, 155, 153, 149, 142, 573, 569, 573, 573, 573,
573, 573, 573, 138, 136, 134, 571, 574, 574, 574,
574, 574, 574, 574, 574, 576, 572, 576, 576, 576,
576, 576, 576, 576, 576, 126, 125, 124, 123, 122,
577, 573, 577, 577, 577, 577, 577, 577, 577, 577,
578, 117, 578, 578, 578, 578, 578, 578, 584, 116,
584, 584, 584, 584, 584, 584, 584, 584, 591, 115,
591, 591, 591, 591, 591, 591, 591, 591, 592, 114,
592, 592, 592, 592, 592, 592, 592, 592, 593, 113,
593, 593, 593, 593, 593, 593, 593, 593, 613, 613,
613, 613, 613, 613, 591, 594, 594, 594, 594, 594,
594, 594, 594, 111, 592, 595, 595, 595, 595, 595,
595, 595, 595, 110, 593, 596, 596, 596, 596, 596,
596, 596, 596, 605, 605, 605, 605, 605, 605, 605,
605, 607, 109, 607, 607, 607, 607, 607, 607, 607,
607, 608, 108, 608, 608, 608, 608, 608, 608, 608,
608, 104, 100, 99, 95, 92, 609, 605, 609, 609,
609, 609, 609, 609, 84, 83, 82, 607, 611, 611,
611, 611, 611, 611, 611, 611, 80, 608, 612, 612,
612, 612, 612, 612, 612, 612, 75, 68, 61, 57,
56, 54, 609, 615, 615, 615, 615, 615, 615, 615,
615, 616, 616, 616, 616, 616, 616, 616, 616, 617,
617, 617, 617, 617, 617, 617, 617, 619, 619, 619,
619, 619, 619, 619, 619, 51, 49, 615, 620, 620,
620, 620, 620, 620, 41, 616, 40, 39, 37, 33,
29, 23, 17, 617, 15, 14, 13, 0, 0, 0,
0, 619, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 620, 622, 622, 622, 622, 622, 622, 622,
622, 622, 622, 622, 622, 622, 622, 622, 622, 623,
623, 623, 623, 623, 623, 623, 623, 623, 623, 623,
623, 623, 623, 623, 623, 624, 624, 624, 624, 624,
624, 624, 624, 624, 624, 624, 624, 624, 624, 624,
624, 625, 625, 625, 625, 625, 625, 625, 625, 625,
625, 625, 625, 625, 625, 625, 625, 626, 0, 0,
0, 0, 0, 0, 0, 626, 626, 626, 0, 0,
626, 626, 626, 627, 627, 627, 627, 627, 627, 627,
627, 627, 627, 627, 627, 627, 627, 627, 627, 628,
0, 0, 0, 0, 628, 0, 0, 628, 628, 628,
628, 0, 628, 628, 628, 629, 0, 0, 0, 0,
0, 0, 0, 629, 629, 629, 0, 0, 629, 629,
629, 630, 0, 0, 630, 630, 0, 630, 0, 630,
630, 630, 0, 0, 630, 630, 630, 631, 631, 0,
0, 0, 631, 632, 0, 0, 632, 632, 0, 632,
0, 632, 632, 632, 0, 0, 632, 632, 632, 633,
0, 0, 633, 633, 0, 633, 0, 633, 633, 633,
0, 633, 0, 633, 633, 635, 0, 0, 635, 0,
0, 635, 0, 635, 635, 635, 635, 0, 635, 635,
635, 636, 636, 636, 636, 636, 636, 636, 636, 636,
636, 636, 636, 636, 636, 636, 636, 637, 637, 0,
637, 0, 637, 637, 637, 637, 637, 637, 637, 637,
637, 637, 637, 638, 638, 638, 638, 638, 638, 638,
638, 638, 638, 638, 638, 638, 638, 638, 638, 639,
639, 0, 639, 639, 639, 639, 639, 639, 639, 639,
639, 639, 639, 639, 639, 640, 0, 0, 0, 0,
640, 0, 0, 640, 640, 640, 0, 0, 640, 640,
640, 641, 0, 0, 641, 641, 0, 641, 0, 641,
641, 641, 0, 0, 641, 641, 641, 642, 642, 0,
0, 0, 642, 643, 643, 643, 0, 0, 0, 643,
644, 0, 0, 644, 644, 0, 644, 0, 644, 644,
644, 0, 0, 644, 644, 644, 645, 645, 645, 645,
645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
645, 645, 646, 646, 0, 0, 0, 646, 647, 647,
647, 0, 0, 0, 647, 648, 648, 0, 0, 0,
648, 649, 649, 0, 0, 0, 649, 650, 650, 0,
0, 0, 650, 651, 651, 651, 0, 0, 0, 651,
652, 652, 0, 0, 0, 652, 653, 653, 0, 0,
0, 653, 654, 654, 0, 0, 0, 654, 655, 655,
655, 0, 0, 0, 655, 656, 656, 656, 656, 0,
0, 0, 656, 657, 657, 0, 0, 0, 657, 658,
658, 0, 0, 0, 658, 659, 659, 0, 0, 0,
659, 660, 660, 660, 0, 0, 0, 660, 661, 661,
661, 661, 0, 0, 0, 661, 662, 662, 0, 0,
0, 662, 663, 663, 0, 0, 0, 663, 664, 664,
664, 0, 0, 0, 664, 665, 665, 665, 665, 0,
0, 0, 665, 666, 666, 0, 0, 0, 666, 667,
0, 667, 667, 0, 0, 0, 667, 668, 668, 668,
0, 0, 0, 668, 669, 669, 669, 669, 0, 0,
0, 669, 670, 670, 0, 0, 0, 670, 671, 0,
671, 671, 0, 0, 0, 671, 672, 672, 672, 0,
0, 0, 672, 673, 673, 673, 0, 0, 0, 0,
673, 674, 674, 674, 674, 674, 674, 674, 674, 674,
674, 674, 674, 674, 674, 674, 674, 675, 675, 0,
675, 675, 675, 0, 0, 675, 675, 675, 0, 0,
675, 675, 675, 676, 676, 0, 676, 676, 676, 0,
0, 676, 676, 676, 0, 0, 676, 676, 676, 677,
677, 0, 0, 0, 677, 678, 0, 678, 678, 0,
0, 0, 678, 679, 679, 0, 0, 0, 0, 679,
680, 680, 0, 0, 0, 680, 681, 0, 681, 681,
0, 0, 0, 681, 682, 682, 0, 0, 0, 682,
683, 0, 683, 0, 0, 0, 0, 683, 684, 684,
684, 684, 684, 684, 684, 684, 684, 684, 684, 684,
684, 684, 684, 684, 621, 621, 621, 621, 621, 621,
621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
621, 621
} ;
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-2012
* 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 <errno.h>
#include <ctype.h>
#include "sudoers.h"
#include "parse.h"
#include "toke.h"
#include <gram.h>
#include "lbuf.h"
#include "secure_path.h"
extern YYSTYPE yylval;
extern bool parse_error;
extern bool sudoers_warnings;
int sudolineno;
int last_token;
char *sudoers;
/* Default sudoers path, mode and owner (may be set via sudo.conf) */
const char *sudoers_file = _PATH_SUDOERS;
mode_t sudoers_mode = SUDOERS_MODE;
uid_t sudoers_uid = SUDOERS_UID;
gid_t sudoers_gid = SUDOERS_GID;
static bool continued, sawspace;
static int prev_state;
static bool _push_include(char *, bool);
static bool pop_include(void);
static char *parse_include(char *);
int (*trace_print)(const char *msg) = sudoers_trace_print;
#define LEXRETURN(n) do { \
last_token = (n); \
return (n); \
} while (0)
#define ECHO ignore_result(fwrite(yytext, yyleng, 1, yyout))
#define push_include(_p) (_push_include((_p), false))
#define push_includedir(_p) (_push_include((_p), true))
#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 1514 "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 132 "toke.l"
#line 1670 "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 >= 622 )
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] != 3595 );
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 133 "toke.l"
{
LEXTRACE(", ");
LEXRETURN(',');
} /* return ',' */
YY_BREAK
case 2:
YY_RULE_SETUP
#line 138 "toke.l"
BEGIN STARTDEFS;
YY_BREAK
case 3:
YY_RULE_SETUP
#line 140 "toke.l"
{
BEGIN INDEFS;
LEXTRACE("DEFVAR ");
if (!fill(yytext, yyleng))
yyterminate();
LEXRETURN(DEFVAR);
}
YY_BREAK
case 4:
YY_RULE_SETUP
#line 149 "toke.l"
{
BEGIN STARTDEFS;
LEXTRACE(", ");
LEXRETURN(',');
} /* return ',' */
YY_BREAK
case 5:
YY_RULE_SETUP
#line 155 "toke.l"
{
LEXTRACE("= ");
LEXRETURN('=');
} /* return '=' */
YY_BREAK
case 6:
YY_RULE_SETUP
#line 160 "toke.l"
{
LEXTRACE("+= ");
LEXRETURN('+');
} /* return '+' */
YY_BREAK
case 7:
YY_RULE_SETUP
#line 165 "toke.l"
{
LEXTRACE("-= ");
LEXRETURN('-');
} /* return '-' */
YY_BREAK
case 8:
YY_RULE_SETUP
#line 170 "toke.l"
{
LEXTRACE("BEGINSTR ");
yylval.string = NULL;
prev_state = YY_START;
BEGIN INSTR;
}
YY_BREAK
case 9:
YY_RULE_SETUP
#line 177 "toke.l"
{
LEXTRACE("WORD(2) ");
if (!fill(yytext, yyleng))
yyterminate();
LEXRETURN(WORD);
}
YY_BREAK
case 10:
YY_RULE_SETUP
#line 186 "toke.l"
{
/* Line continuation char followed by newline. */
sudolineno++;
continued = true;
}
YY_BREAK
case 11:
YY_RULE_SETUP
#line 192 "toke.l"
{
LEXTRACE("ENDSTR ");
BEGIN prev_state;
if (yylval.string == NULL) {
LEXTRACE("ERROR "); /* empty string */
LEXRETURN(ERROR);
}
if (prev_state == INITIAL) {
switch (yylval.string[0]) {
case '%':
if (yylval.string[1] == '\0' ||
(yylval.string[1] == ':' &&
yylval.string[2] == '\0')) {
LEXTRACE("ERROR "); /* empty group */
LEXRETURN(ERROR);
}
LEXTRACE("USERGROUP ");
LEXRETURN(USERGROUP);
case '+':
if (yylval.string[1] == '\0') {
LEXTRACE("ERROR "); /* empty netgroup */
LEXRETURN(ERROR);
}
LEXTRACE("NETGROUP ");
LEXRETURN(NETGROUP);
}
}
LEXTRACE("WORD(4) ");
LEXRETURN(WORD);
}
YY_BREAK
case 12:
YY_RULE_SETUP
#line 224 "toke.l"
{
LEXTRACE("BACKSLASH ");
if (!append(yytext, yyleng))
yyterminate();
}
YY_BREAK
case 13:
YY_RULE_SETUP
#line 230 "toke.l"
{
LEXTRACE("STRBODY ");
if (!append(yytext, yyleng))
yyterminate();
}
YY_BREAK
case 14:
YY_RULE_SETUP
#line 238 "toke.l"
{
/* quoted fnmatch glob char, pass verbatim */
LEXTRACE("QUOTEDCHAR ");
if (!fill_args(yytext, 2, sawspace))
yyterminate();
sawspace = false;
}
YY_BREAK
case 15:
YY_RULE_SETUP
#line 246 "toke.l"
{
/* quoted sudoers special char, strip backslash */
LEXTRACE("QUOTEDCHAR ");
if (!fill_args(yytext + 1, 1, sawspace))
yyterminate();
sawspace = false;
}
YY_BREAK
case 16:
YY_RULE_SETUP
#line 254 "toke.l"
{
BEGIN INITIAL;
yyless(0);
LEXRETURN(COMMAND);
} /* end of command line args */
YY_BREAK
case 17:
YY_RULE_SETUP
#line 260 "toke.l"
{
LEXTRACE("ARG ");
if (!fill_args(yytext, yyleng, sawspace))
yyterminate();
sawspace = false;
} /* a command line arg */
YY_BREAK
case 18:
YY_RULE_SETUP
#line 268 "toke.l"
{
char *path;
if (continued) {
LEXTRACE("ERROR ");
LEXRETURN(ERROR);
}
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 19:
YY_RULE_SETUP
#line 286 "toke.l"
{
char *path;
if (continued) {
LEXTRACE("ERROR ");
LEXRETURN(ERROR);
}
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 20:
YY_RULE_SETUP
#line 307 "toke.l"
{
char deftype;
int n;
if (continued) {
LEXTRACE("ERROR ");
LEXRETURN(ERROR);
}
for (n = 0; isblank((unsigned char)yytext[n]); n++)
continue;
n += sizeof("Defaults") - 1;
if ((deftype = yytext[n++]) != '\0') {
while (isblank((unsigned char)yytext[n]))
n++;
}
BEGIN GOTDEFS;
switch (deftype) {
case ':':
yyless(n);
LEXTRACE("DEFAULTS_USER ");
LEXRETURN(DEFAULTS_USER);
case '>':
yyless(n);
LEXTRACE("DEFAULTS_RUNAS ");
LEXRETURN(DEFAULTS_RUNAS);
case '@':
yyless(n);
LEXTRACE("DEFAULTS_HOST ");
LEXRETURN(DEFAULTS_HOST);
case '!':
yyless(n);
LEXTRACE("DEFAULTS_CMND ");
LEXRETURN(DEFAULTS_CMND);
default:
LEXTRACE("DEFAULTS ");
LEXRETURN(DEFAULTS);
}
}
YY_BREAK
case 21:
YY_RULE_SETUP
#line 347 "toke.l"
{
int n;
if (continued) {
LEXTRACE("ERROR ");
LEXRETURN(ERROR);
}
for (n = 0; isblank((unsigned char)yytext[n]); n++)
continue;
switch (yytext[n]) {
case 'H':
LEXTRACE("HOSTALIAS ");
LEXRETURN(HOSTALIAS);
case 'C':
LEXTRACE("CMNDALIAS ");
LEXRETURN(CMNDALIAS);
case 'U':
LEXTRACE("USERALIAS ");
LEXRETURN(USERALIAS);
case 'R':
LEXTRACE("RUNASALIAS ");
LEXRETURN(RUNASALIAS);
}
}
YY_BREAK
case 22:
YY_RULE_SETUP
#line 373 "toke.l"
{
/* cmnd does not require passwd for this user */
LEXTRACE("NOPASSWD ");
LEXRETURN(NOPASSWD);
}
YY_BREAK
case 23:
YY_RULE_SETUP
#line 379 "toke.l"
{
/* cmnd requires passwd for this user */
LEXTRACE("PASSWD ");
LEXRETURN(PASSWD);
}
YY_BREAK
case 24:
YY_RULE_SETUP
#line 385 "toke.l"
{
LEXTRACE("NOEXEC ");
LEXRETURN(NOEXEC);
}
YY_BREAK
case 25:
YY_RULE_SETUP
#line 390 "toke.l"
{
LEXTRACE("EXEC ");
LEXRETURN(EXEC);
}
YY_BREAK
case 26:
YY_RULE_SETUP
#line 395 "toke.l"
{
LEXTRACE("SETENV ");
LEXRETURN(SETENV);
}
YY_BREAK
case 27:
YY_RULE_SETUP
#line 400 "toke.l"
{
LEXTRACE("NOSETENV ");
LEXRETURN(NOSETENV);
}
YY_BREAK
case 28:
YY_RULE_SETUP
#line 405 "toke.l"
{
LEXTRACE("LOG_OUTPUT ");
LEXRETURN(LOG_OUTPUT);
}
YY_BREAK
case 29:
YY_RULE_SETUP
#line 410 "toke.l"
{
LEXTRACE("NOLOG_OUTPUT ");
LEXRETURN(NOLOG_OUTPUT);
}
YY_BREAK
case 30:
YY_RULE_SETUP
#line 415 "toke.l"
{
LEXTRACE("LOG_INPUT ");
LEXRETURN(LOG_INPUT);
}
YY_BREAK
case 31:
YY_RULE_SETUP
#line 420 "toke.l"
{
LEXTRACE("NOLOG_INPUT ");
LEXRETURN(NOLOG_INPUT);
}
YY_BREAK
case 32:
YY_RULE_SETUP
#line 425 "toke.l"
{
/* empty group or netgroup */
LEXTRACE("ERROR ");
LEXRETURN(ERROR);
}
YY_BREAK
case 33:
YY_RULE_SETUP
#line 431 "toke.l"
{
/* netgroup */
if (!fill(yytext, yyleng))
yyterminate();
LEXTRACE("NETGROUP ");
LEXRETURN(NETGROUP);
}
YY_BREAK
case 34:
YY_RULE_SETUP
#line 439 "toke.l"
{
/* group */
if (!fill(yytext, yyleng))
yyterminate();
LEXTRACE("USERGROUP ");
LEXRETURN(USERGROUP);
}
YY_BREAK
case 35:
YY_RULE_SETUP
#line 447 "toke.l"
{
if (!fill(yytext, yyleng))
yyterminate();
LEXTRACE("NTWKADDR ");
LEXRETURN(NTWKADDR);
}
YY_BREAK
case 36:
YY_RULE_SETUP
#line 454 "toke.l"
{
if (!fill(yytext, yyleng))
yyterminate();
LEXTRACE("NTWKADDR ");
LEXRETURN(NTWKADDR);
}
YY_BREAK
case 37:
YY_RULE_SETUP
#line 461 "toke.l"
{
if (!ipv6_valid(yytext)) {
LEXTRACE("ERROR ");
LEXRETURN(ERROR);
}
if (!fill(yytext, yyleng))
yyterminate();
LEXTRACE("NTWKADDR ");
LEXRETURN(NTWKADDR);
}
YY_BREAK
case 38:
YY_RULE_SETUP
#line 472 "toke.l"
{
if (!ipv6_valid(yytext)) {
LEXTRACE("ERROR ");
LEXRETURN(ERROR);
}
if (!fill(yytext, yyleng))
yyterminate();
LEXTRACE("NTWKADDR ");
LEXRETURN(NTWKADDR);
}
YY_BREAK
case 39:
YY_RULE_SETUP
#line 483 "toke.l"
{
LEXTRACE("ALL ");
LEXRETURN(ALL);
}
YY_BREAK
case 40:
YY_RULE_SETUP
#line 489 "toke.l"
{
#ifdef HAVE_SELINUX
LEXTRACE("ROLE ");
LEXRETURN(ROLE);
#else
goto got_alias;
#endif
}
YY_BREAK
case 41:
YY_RULE_SETUP
#line 498 "toke.l"
{
#ifdef HAVE_SELINUX
LEXTRACE("TYPE ");
LEXRETURN(TYPE);
#else
goto got_alias;
#endif
}
YY_BREAK
case 42:
YY_RULE_SETUP
#line 506 "toke.l"
{
#ifdef HAVE_PRIV_SET
LEXTRACE("PRIVS ");
LEXRETURN(PRIVS);
#else
goto got_alias;
#endif
}
YY_BREAK
case 43:
YY_RULE_SETUP
#line 515 "toke.l"
{
#ifdef HAVE_PRIV_SET
LEXTRACE("LIMITPRIVS ");
LEXRETURN(LIMITPRIVS);
#else
goto got_alias;
#endif
}
YY_BREAK
case 44:
YY_RULE_SETUP
#line 524 "toke.l"
{
got_alias:
if (!fill(yytext, yyleng))
yyterminate();
LEXTRACE("ALIAS ");
LEXRETURN(ALIAS);
}
YY_BREAK
case 45:
YY_RULE_SETUP
#line 532 "toke.l"
{
/* no command args allowed for Defaults!/path */
if (!fill_cmnd(yytext, yyleng))
yyterminate();
LEXTRACE("COMMAND ");
LEXRETURN(COMMAND);
}
YY_BREAK
case 46:
YY_RULE_SETUP
#line 540 "toke.l"
{
BEGIN GOTCMND;
LEXTRACE("COMMAND ");
if (!fill_cmnd(yytext, yyleng))
yyterminate();
} /* sudo -e */
YY_BREAK
case 47:
YY_RULE_SETUP
#line 547 "toke.l"
{
/* directories can't have args... */
if (yytext[yyleng - 1] == '/') {
LEXTRACE("COMMAND ");
if (!fill_cmnd(yytext, yyleng))
yyterminate();
LEXRETURN(COMMAND);
} else {
BEGIN GOTCMND;
LEXTRACE("COMMAND ");
if (!fill_cmnd(yytext, yyleng))
yyterminate();
}
} /* a pathname */
YY_BREAK
case 48:
YY_RULE_SETUP
#line 562 "toke.l"
{
LEXTRACE("BEGINSTR ");
yylval.string = NULL;
prev_state = YY_START;
BEGIN INSTR;
}
YY_BREAK
case 49:
YY_RULE_SETUP
#line 569 "toke.l"
{
/* a word */
if (!fill(yytext, yyleng))
yyterminate();
LEXTRACE("WORD(5) ");
LEXRETURN(WORD);
}
YY_BREAK
case 50:
YY_RULE_SETUP
#line 577 "toke.l"
{
LEXTRACE("( ");
LEXRETURN('(');
}
YY_BREAK
case 51:
YY_RULE_SETUP
#line 582 "toke.l"
{
LEXTRACE(") ");
LEXRETURN(')');
}
YY_BREAK
case 52:
YY_RULE_SETUP
#line 587 "toke.l"
{
LEXTRACE(", ");
LEXRETURN(',');
} /* return ',' */
YY_BREAK
case 53:
YY_RULE_SETUP
#line 592 "toke.l"
{
LEXTRACE("= ");
LEXRETURN('=');
} /* return '=' */
YY_BREAK
case 54:
YY_RULE_SETUP
#line 597 "toke.l"
{
LEXTRACE(": ");
LEXRETURN(':');
} /* return ':' */
YY_BREAK
case 55:
YY_RULE_SETUP
#line 602 "toke.l"
{
if (yyleng & 1) {
LEXTRACE("!");
LEXRETURN('!'); /* return '!' */
}
}
YY_BREAK
case 56:
YY_RULE_SETUP
#line 609 "toke.l"
{
if (YY_START == INSTR) {
LEXTRACE("ERROR ");
LEXRETURN(ERROR); /* line break in string */
}
BEGIN INITIAL;
sudolineno++;
continued = false;
LEXTRACE("\n");
LEXRETURN(COMMENT);
} /* return newline */
YY_BREAK
case 57:
YY_RULE_SETUP
#line 621 "toke.l"
{ /* throw away space/tabs */
sawspace = true; /* but remember for fill_args */
}
YY_BREAK
case 58:
YY_RULE_SETUP
#line 625 "toke.l"
{
sawspace = true; /* remember for fill_args */
sudolineno++;
continued = true;
} /* throw away EOL after \ */
YY_BREAK
case 59:
YY_RULE_SETUP
#line 631 "toke.l"
{
BEGIN INITIAL;
sudolineno++;
continued = false;
LEXTRACE("#\n");
LEXRETURN(COMMENT);
} /* comment, not uid/gid */
YY_BREAK
case 60:
YY_RULE_SETUP
#line 639 "toke.l"
{
LEXTRACE("ERROR ");
LEXRETURN(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 644 "toke.l"
{
if (YY_START != INITIAL) {
BEGIN INITIAL;
LEXTRACE("ERROR ");
LEXRETURN(ERROR);
}
if (!pop_include())
yyterminate();
}
YY_BREAK
case 61:
YY_RULE_SETUP
#line 654 "toke.l"
ECHO;
YY_BREAK
#line 2468 "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 >= 622 )
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 >= 622 )
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 == 621);
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 654 "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;
bool 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;
debug_decl(switch_dir, SUDO_DEBUG_PARSER)
if (!(dir = opendir(dirpath))) {
if (errno != ENOENT) {
char *errbuf;
if (asprintf(&errbuf, _("%s: %s"), dirpath, strerror(errno)) != -1) {
yyerror(errbuf);
free(errbuf);
} else {
yyerror(_("unable to allocate memory"));
}
}
goto done;
}
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);
path = NULL;
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);
debug_return_str(path);
bad:
while (first != NULL) {
pl = first;
first = pl->next;
free(pl->path);
free(pl);
}
efree(sorted);
efree(dirpath);
efree(path);
debug_return_str(NULL);
}
#define MAX_SUDOERS_DEPTH 128
#define SUDOERS_STACK_INCREMENT 16
static size_t istacksize, idepth;
static struct include_stack *istack;
static bool keepopen;
void
init_lexer(void)
{
struct path_list *pl;
debug_decl(init_lexer, SUDO_DEBUG_PARSER)
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;
sudolineno = 1;
keepopen = false;
sawspace = false;
continued = false;
prev_state = INITIAL;
debug_return;
}
static bool
_push_include(char *path, bool isdir)
{
struct path_list *pl;
FILE *fp;
debug_decl(_push_include, SUDO_DEBUG_PARSER)
/* push current state onto stack */
if (idepth >= istacksize) {
if (idepth > MAX_SUDOERS_DEPTH) {
yyerror(_("too many levels of includes"));
debug_return_bool(false);
}
istacksize += SUDOERS_STACK_INCREMENT;
istack = (struct include_stack *) realloc(istack,
sizeof(*istack) * istacksize);
if (istack == NULL) {
yyerror(_("unable to allocate memory"));
debug_return_bool(false);
}
}
if (isdir) {
struct stat sb;
switch (sudo_secure_dir(path, sudoers_uid, sudoers_gid, &sb)) {
case SUDO_PATH_SECURE:
break;
case SUDO_PATH_MISSING:
debug_return_bool(false);
case SUDO_PATH_BAD_TYPE:
errno = ENOTDIR;
if (sudoers_warnings) {
warning("%s", path);
}
debug_return_bool(false);
case SUDO_PATH_WRONG_OWNER:
if (sudoers_warnings) {
warningx(_("%s is owned by uid %u, should be %u"),
path, (unsigned int) sb.st_uid,
(unsigned int) sudoers_uid);
}
debug_return_bool(false);
case SUDO_PATH_WORLD_WRITABLE:
if (sudoers_warnings) {
warningx(_("%s is world writable"), path);
}
debug_return_bool(false);
case SUDO_PATH_GROUP_WRITABLE:
if (sudoers_warnings) {
warningx(_("%s is owned by gid %u, should be %u"),
path, (unsigned int) sb.st_gid,
(unsigned int) sudoers_gid);
}
debug_return_bool(false);
default:
/* NOTREACHED */
debug_return_bool(false);
}
if (!(path = switch_dir(&istack[idepth], path))) {
/* switch_dir() called yyerror() for us */
debug_return_bool(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)
debug_return_bool(false);
path = pl->path;
istack[idepth].more = pl->next;
efree(pl);
}
} else {
if ((fp = open_sudoers(path, true, &keepopen)) == NULL) {
/* The error was already printed by open_sudoers() */
yyerror(NULL);
debug_return_bool(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));
debug_return_bool(true);
}
static bool
pop_include(void)
{
struct path_list *pl;
FILE *fp;
debug_decl(pop_include, SUDO_DEBUG_PARSER)
if (idepth == 0)
debug_return_bool(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;
}
debug_return_bool(true);
}
static char *
parse_include(char *base)
{
char *cp, *ep, *path, *pp;
int dirlen = 0, len = 0, subst = 0;
size_t shost_len = 0;
debug_decl(parse_include, SUDO_DEBUG_PARSER)
/* 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++;
}
/* Relative paths are located in the same dir as the sudoers file. */
if (*cp != '/') {
char *dirend = strrchr(sudoers, '/');
if (dirend != NULL)
dirlen = (int)(dirend - sudoers) + 1;
}
/* Make a copy of the fully-qualified path and return it. */
len += (int)(ep - cp);
path = pp = malloc(len + dirlen + 1);
if (path == NULL) {
yyerror(_("unable to allocate memory"));
debug_return_str(NULL);
}
if (dirlen) {
memcpy(path, sudoers, dirlen);
pp += dirlen;
}
if (subst) {
/* substitute for %h */
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(pp, cp, len);
pp[len] = '\0';
}
/* Push any excess characters (e.g. comment, newline) back to the lexer */
if (*ep != '\0')
yyless((int)(ep - base));
debug_return_str(path);
}
#ifdef TRACELEXER
int
sudoers_trace_print(const char *msg)
{
return fputs(msg, stderr);
}
#else
int
sudoers_trace_print(const char *msg)
{
static bool initialized;
static struct lbuf lbuf;
if (!initialized) {
initialized = true;
lbuf_init(&lbuf, NULL, 0, NULL, 0);
}
lbuf_append(&lbuf, "%s", msg);
/* XXX - assumes a final newline */
if (strchr(msg, '\n') != NULL)
{
sudo_debug_printf2(NULL, NULL, 0, SUDO_DEBUG_PARSER|SUDO_DEBUG_DEBUG,
"%s:%d %s", sudoers, sudolineno, lbuf.buf);
lbuf.len = 0;
}
return 0;
}
#endif /* TRACELEXER */
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>