Files
sudo/toke.c
2008-06-25 18:31:19 +00:00

3285 lines
106 KiB
C

/* $OpenBSD: flex.skl,v 1.10 2007/01/26 14:38:19 tsi Exp $ */
/* A lexical scanner generated by flex */
/* Scanner skeleton version:
* $Header$
*/
#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 47
#define YY_END_OF_BUFFER 48
static yyconst short int yy_accept[534] =
{ 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 48, 35, 43, 42, 41, 46, 35, 36,
37, 35, 38, 35, 35, 35, 35, 40, 39, 46,
31, 31, 31, 31, 31, 31, 46, 35, 35, 43,
46, 31, 31, 31, 31, 31, 1, 46, 35, 35,
15, 14, 15, 14, 14, 46, 46, 46, 2, 8,
7, 8, 3, 8, 4, 46, 11, 11, 11, 10,
11, 35, 0, 43, 41, 0, 0, 35, 26, 0,
25, 0, 34, 34, 0, 35, 35, 0, 35, 35,
35, 35, 0, 29, 31, 31, 31, 31, 31, 31,
35, 44, 35, 43, 0, 0, 0, 0, 0, 0,
35, 35, 35, 35, 35, 1, 32, 32, 0, 35,
15, 15, 13, 12, 13, 0, 2, 8, 0, 5,
6, 8, 8, 11, 11, 11, 11, 11, 9, 0,
45, 0, 35, 35, 35, 35, 35, 0, 0, 29,
29, 31, 31, 31, 31, 31, 31, 31, 35, 0,
0, 0, 0, 0, 0, 35, 35, 35, 35, 35,
0, 35, 9, 35, 35, 35, 35, 35, 35, 0,
30, 30, 30, 0, 0, 29, 29, 29, 29, 29,
29, 29, 31, 31, 31, 31, 31, 31, 31, 35,
0, 0, 0, 0, 0, 0, 35, 35, 35, 35,
35, 35, 35, 0, 0, 30, 30, 30, 0, 29,
29, 0, 29, 29, 29, 29, 29, 29, 29, 29,
29, 29, 29, 0, 22, 31, 31, 31, 31, 31,
35, 0, 0, 0, 0, 35, 35, 35, 35, 35,
35, 35, 35, 0, 30, 0, 29, 29, 29, 0,
0, 0, 29, 29, 29, 29, 29, 29, 29, 29,
29, 29, 29, 29, 29, 31, 31, 31, 31, 31,
35, 0, 0, 0, 35, 35, 35, 27, 27, 27,
0, 0, 29, 29, 29, 29, 29, 29, 29, 0,
0, 0, 0, 0, 29, 29, 29, 29, 29, 29,
29, 29, 29, 29, 29, 29, 29, 29, 0, 21,
31, 31, 0, 20, 0, 23, 35, 0, 0, 0,
35, 35, 35, 35, 27, 27, 27, 27, 0, 29,
0, 29, 29, 29, 29, 29, 29, 29, 29, 29,
29, 29, 0, 0, 0, 29, 29, 29, 29, 29,
29, 29, 29, 29, 29, 29, 29, 29, 31, 31,
33, 0, 0, 0, 35, 17, 32, 35, 28, 28,
28, 29, 0, 0, 0, 29, 29, 29, 29, 29,
29, 29, 29, 29, 29, 29, 29, 29, 0, 0,
0, 0, 0, 29, 29, 29, 29, 29, 29, 29,
29, 0, 19, 0, 24, 0, 17, 0, 35, 0,
35, 35, 35, 28, 28, 28, 28, 28, 0, 0,
0, 0, 0, 29, 29, 29, 29, 29, 29, 29,
29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
29, 29, 29, 0, 0, 18, 17, 0, 17, 0,
35, 35, 35, 28, 28, 0, 0, 0, 29, 29,
29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
29, 29, 29, 29, 29, 29, 18, 0, 16, 35,
35, 35, 35, 35, 0, 0, 0, 0, 0, 29,
29, 29, 29, 29, 29, 29, 29, 35, 35, 35,
29, 29, 29, 29, 29, 29, 35, 35, 35, 35,
35, 29, 29, 29, 29, 29, 27, 27, 27, 27,
27, 27, 0
} ;
static yyconst int yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 2, 4, 5, 6, 1, 7, 1, 1, 8,
9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
19, 20, 21, 22, 22, 22, 23, 24, 1, 1,
25, 26, 10, 27, 28, 29, 30, 31, 32, 29,
33, 34, 33, 33, 33, 33, 33, 35, 36, 37,
33, 38, 39, 40, 41, 42, 43, 44, 33, 33,
10, 45, 10, 1, 46, 1, 47, 48, 49, 50,
51, 52, 53, 53, 54, 53, 53, 55, 56, 57,
58, 53, 53, 59, 60, 61, 62, 53, 53, 53,
53, 53, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1
} ;
static yyconst int yy_meta[63] =
{ 0,
1, 2, 3, 4, 5, 6, 1, 4, 4, 1,
1, 2, 1, 7, 8, 9, 9, 9, 9, 9,
9, 9, 9, 10, 6, 4, 1, 9, 9, 9,
9, 9, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 11, 12, 13, 13, 13, 13,
13, 13, 12, 12, 12, 12, 12, 12, 12, 12,
12, 12
} ;
static yyconst short int yy_base[594] =
{ 0,
0, 61, 62, 63, 69, 84, 128, 189, 250, 294,
80, 101, 2177, 2129, 2171, 3367, 2168, 120, 2118, 3367,
3367, 2100, 3367, 109, 326, 139, 131, 2102, 3367, 3367,
378, 2081, 425, 2088, 2095, 2090, 476, 149, 35, 192,
490, 2051, 2055, 2047, 2027, 2028, 2085, 183, 256, 53,
0, 3367, 2079, 0, 3367, 264, 194, 98, 0, 2034,
3367, 82, 3367, 99, 3367, 108, 2032, 74, 75, 3367,
226, 2031, 306, 2068, 2065, 2065, 304, 343, 2002, 512,
1999, 521, 325, 1998, 546, 442, 557, 2018, 2021, 473,
543, 450, 1988, 97, 594, 0, 1978, 188, 1944, 1940,
283, 3367, 174, 597, 1922, 1900, 1890, 1885, 1886, 71,
152, 112, 212, 224, 228, 1899, 592, 1852, 645, 233,
0, 1866, 256, 3367, 3367, 288, 0, 1822, 627, 3367,
3367, 1794, 290, 1793, 272, 292, 307, 495, 1835, 1833,
3367, 653, 665, 697, 729, 761, 1806, 1795, 798, 289,
836, 873, 1753, 1738, 1732, 1724, 1687, 1658, 163, 1632,
1636, 1627, 1614, 1619, 67, 291, 1605, 242, 322, 173,
697, 323, 1649, 708, 339, 912, 944, 718, 358, 1626,
1625, 673, 434, 1609, 1608, 502, 738, 976, 748, 574,
1014, 780, 1559, 278, 1550, 1542, 1525, 1521, 1528, 335,
1512, 1514, 1485, 1498, 1472, 335, 459, 557, 327, 477,
1053, 1085, 1117, 1505, 1476, 815, 1476, 1474, 1457, 1436,
517, 853, 606, 890, 648, 1149, 0, 922, 1160, 931,
861, 1198, 954, 529, 3367, 1402, 1392, 1382, 1344, 1300,
436, 1280, 1263, 1264, 480, 506, 494, 553, 964, 622,
1237, 1269, 996, 1260, 1257, 1220, 1217, 1299, 649, 1033,
1063, 1073, 651, 771, 903, 1093, 964, 1338, 0, 1103,
1349, 1125, 1133, 1387, 1179, 533, 1197, 1204, 632, 656,
653, 1197, 1169, 658, 595, 454, 957, 1425, 1456, 1487,
1199, 1182, 1181, 1215, 1519, 1245, 1139, 1556, 1255, 1277,
1190, 1287, 1318, 1368, 1024, 1044, 1228, 1398, 1407, 1435,
1595, 0, 1437, 1606, 1446, 1374, 1644, 1466, 699, 3367,
1172, 1145, 738, 3367, 838, 3367, 522, 1131, 1100, 773,
1043, 524, 615, 1474, 659, 1682, 1713, 1507, 1108, 1105,
1495, 688, 1537, 931, 1745, 0, 683, 1756, 1573, 1581,
1793, 1625, 1663, 1692, 1702, 1170, 1255, 1506, 1654, 1721,
1731, 1832, 0, 1733, 1843, 1773, 1781, 1812, 839, 895,
1083, 1006, 943, 770, 759, 1872, 956, 1904, 1936, 1968,
2000, 932, 1863, 1886, 1914, 920, 945, 1288, 1922, 1319,
2032, 0, 765, 2043, 1944, 1894, 2080, 1954, 1976, 902,
1986, 2010, 2020, 1359, 1616, 1854, 828, 884, 2119, 0,
892, 1016, 3367, 1076, 3367, 853, 2054, 1418, 537, 816,
799, 2098, 1266, 2130, 2162, 2194, 2226, 2068, 2138, 811,
2148, 2172, 2182, 799, 783, 1520, 1693, 2202, 1757, 2258,
0, 997, 2269, 2210, 2234, 2306, 2242, 2287, 2324, 2344,
1803, 790, 1007, 684, 738, 688, 655, 2366, 623, 2375,
2388, 2420, 2452, 2399, 1871, 2409, 2431, 2441, 624, 544,
1905, 1955, 2460, 1987, 2484, 0, 1035, 2495, 2468, 2377,
2514, 541, 2533, 2542, 2551, 528, 3367, 516, 3367, 2557,
1299, 2589, 2621, 2568, 2574, 390, 2600, 2610, 2631, 292,
260, 2001, 184, 139, 2639, 0, 1103, 2653, 2685, 2717,
2661, 2669, 2693, 121, 0, 75, 2701, 1331, 2749, 2781,
2731, 3367, 2737, 2761, 2769, 3367, 2789, 2797, 2827, 21,
2835, 2819, 3367, 2880, 2893, 2906, 2919, 2932, 2945, 2958,
2971, 2984, 2989, 3002, 3015, 3017, 3030, 3043, 3056, 3069,
3082, 3087, 3093, 3106, 3111, 3117, 3122, 3127, 3132, 3138,
3143, 3148, 3153, 3159, 3166, 3171, 3176, 3181, 3187, 3194,
3199, 3204, 3210, 3217, 3222, 3229, 3235, 3242, 3247, 3254,
3260, 3267, 3280, 3293, 3298, 3305, 3311, 3324, 3329, 3336,
3341, 3348, 3353
} ;
static yyconst short int yy_def[594] =
{ 0,
533, 1, 1, 1, 534, 534, 535, 535, 536, 536,
537, 537, 533, 538, 533, 533, 533, 539, 540, 533,
533, 541, 533, 542, 538, 25, 25, 543, 533, 533,
533, 31, 31, 33, 33, 33, 538, 25, 538, 533,
539, 31, 31, 33, 33, 33, 533, 533, 544, 538,
545, 533, 545, 545, 533, 533, 539, 533, 546, 547,
533, 547, 533, 547, 533, 548, 549, 549, 549, 533,
549, 538, 538, 533, 533, 550, 533, 533, 540, 540,
541, 541, 542, 551, 538, 538, 25, 543, 87, 87,
87, 87, 552, 553, 31, 33, 33, 33, 33, 33,
538, 533, 538, 533, 533, 533, 533, 533, 533, 550,
538, 87, 538, 538, 538, 533, 544, 554, 538, 538,
545, 545, 533, 533, 533, 533, 546, 547, 547, 533,
533, 547, 547, 549, 549, 549, 549, 549, 533, 550,
533, 533, 538, 538, 538, 87, 146, 555, 533, 556,
533, 31, 33, 33, 33, 33, 33, 33, 538, 533,
533, 533, 533, 533, 550, 538, 146, 538, 538, 538,
533, 538, 533, 538, 538, 538, 538, 538, 538, 557,
558, 558, 182, 559, 558, 560, 151, 533, 188, 188,
533, 188, 33, 33, 33, 33, 33, 33, 33, 538,
533, 533, 533, 533, 533, 550, 538, 538, 538, 538,
538, 538, 538, 533, 561, 561, 216, 561, 562, 563,
564, 533, 565, 191, 565, 565, 226, 565, 533, 229,
229, 533, 229, 533, 533, 33, 33, 33, 33, 33,
538, 533, 533, 533, 550, 538, 538, 538, 538, 538,
538, 538, 538, 566, 566, 567, 568, 533, 533, 533,
533, 533, 569, 569, 570, 232, 570, 570, 268, 570,
533, 271, 271, 533, 271, 33, 33, 33, 33, 33,
538, 533, 533, 550, 538, 538, 538, 538, 538, 538,
533, 571, 572, 258, 533, 295, 295, 533, 295, 533,
533, 533, 533, 533, 533, 573, 573, 574, 274, 574,
574, 311, 574, 533, 314, 314, 533, 314, 533, 533,
33, 33, 533, 533, 533, 533, 538, 533, 533, 550,
538, 538, 538, 538, 538, 538, 538, 538, 533, 575,
533, 576, 298, 576, 576, 345, 345, 533, 348, 348,
533, 348, 533, 533, 533, 533, 577, 577, 578, 317,
578, 578, 362, 578, 533, 365, 365, 365, 33, 33,
538, 533, 533, 550, 538, 538, 538, 538, 538, 538,
538, 533, 533, 533, 533, 579, 579, 580, 351, 580,
580, 391, 391, 533, 394, 394, 533, 394, 533, 533,
533, 533, 533, 533, 581, 581, 582, 582, 582, 409,
409, 533, 533, 533, 533, 533, 533, 550, 538, 583,
584, 538, 538, 538, 538, 538, 538, 538, 533, 533,
533, 533, 533, 533, 585, 585, 586, 397, 586, 586,
440, 440, 533, 443, 443, 533, 443, 533, 533, 533,
533, 587, 587, 533, 588, 538, 583, 583, 584, 584,
538, 538, 538, 538, 538, 533, 533, 533, 533, 589,
589, 590, 446, 590, 590, 475, 475, 533, 478, 478,
478, 533, 533, 533, 533, 533, 533, 588, 533, 538,
538, 538, 538, 538, 533, 533, 533, 533, 533, 533,
591, 591, 592, 592, 592, 505, 505, 538, 538, 538,
533, 533, 533, 533, 593, 593, 538, 538, 538, 538,
538, 533, 533, 533, 533, 533, 538, 538, 538, 538,
538, 538, 0, 533, 533, 533, 533, 533, 533, 533,
533, 533, 533, 533, 533, 533, 533, 533, 533, 533,
533, 533, 533, 533, 533, 533, 533, 533, 533, 533,
533, 533, 533, 533, 533, 533, 533, 533, 533, 533,
533, 533, 533, 533, 533, 533, 533, 533, 533, 533,
533, 533, 533, 533, 533, 533, 533, 533, 533, 533,
533, 533, 533
} ;
static yyconst short int yy_nxt[3430] =
{ 0,
14, 15, 16, 17, 14, 18, 19, 20, 21, 14,
22, 23, 14, 14, 24, 25, 26, 27, 25, 25,
25, 25, 25, 28, 29, 30, 14, 31, 31, 31,
31, 32, 33, 33, 34, 33, 35, 33, 36, 33,
33, 33, 33, 33, 37, 14, 38, 38, 38, 38,
38, 38, 14, 14, 14, 14, 14, 14, 14, 39,
14, 14, 40, 47, 47, 73, 41, 48, 48, 141,
15, 52, 53, 141, 54, 136, 49, 49, 137, 73,
55, 68, 16, 69, 70, 15, 52, 53, 341, 54,
42, 43, 55, 54, 44, 55, 103, 73, 45, 126,
102, 46, 68, 16, 69, 70, 130, 55, 54, 133,
102, 149, 84, 56, 120, 206, 84, 84, 135, 135,
151, 50, 50, 131, 71, 72, 129, 165, 56, 15,
16, 17, 77, 57, 84, 78, 78, 78, 78, 78,
78, 78, 78, 129, 473, 71, 91, 91, 91, 91,
91, 92, 533, 85, 90, 90, 90, 90, 90, 90,
90, 90, 72, 167, 89, 89, 89, 89, 89, 89,
89, 89, 58, 59, 59, 59, 59, 59, 59, 59,
59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
15, 16, 17, 104, 57, 77, 73, 341, 78, 78,
78, 78, 78, 78, 78, 78, 533, 73, 166, 533,
533, 533, 533, 533, 533, 533, 533, 73, 73, 154,
200, 105, 106, 159, 155, 107, 156, 138, 139, 108,
134, 207, 109, 58, 59, 59, 59, 59, 59, 59,
59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
59, 15, 16, 17, 61, 57, 73, 126, 102, 118,
62, 63, 64, 118, 118, 123, 102, 124, 73, 125,
135, 168, 73, 124, 65, 125, 134, 73, 170, 234,
169, 118, 172, 473, 126, 102, 73, 125, 125, 126,
102, 126, 102, 136, 66, 15, 16, 17, 61, 57,
119, 235, 207, 149, 62, 63, 64, 72, 125, 72,
137, 72, 187, 72, 72, 438, 135, 72, 65, 78,
78, 78, 78, 78, 78, 78, 78, 73, 84, 72,
72, 72, 84, 84, 129, 73, 135, 141, 66, 86,
207, 87, 87, 87, 87, 87, 87, 87, 87, 88,
84, 135, 174, 89, 89, 89, 89, 89, 78, 78,
78, 78, 78, 78, 78, 78, 73, 73, 209, 85,
73, 73, 89, 89, 89, 89, 89, 89, 72, 73,
210, 88, 72, 73, 72, 241, 207, 72, 72, 245,
72, 72, 72, 95, 95, 95, 95, 95, 95, 95,
95, 88, 73, 495, 72, 95, 95, 95, 95, 95,
96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
96, 96, 73, 96, 89, 89, 89, 89, 89, 89,
72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
96, 96, 96, 96, 96, 96, 96, 96, 533, 218,
218, 218, 96, 96, 96, 96, 96, 143, 144, 145,
143, 143, 143, 143, 143, 147, 147, 147, 147, 147,
147, 72, 72, 72, 72, 72, 72, 101, 102, 72,
73, 72, 141, 72, 72, 281, 73, 72, 147, 147,
147, 147, 147, 147, 147, 147, 138, 102, 73, 72,
72, 72, 77, 73, 246, 78, 78, 78, 78, 78,
78, 78, 78, 79, 332, 79, 149, 79, 489, 79,
79, 73, 81, 79, 81, 187, 81, 248, 81, 81,
234, 149, 81, 285, 319, 79, 79, 79, 73, 135,
187, 284, 149, 110, 81, 81, 81, 83, 286, 72,
73, 83, 235, 72, 72, 149, 320, 83, 147, 147,
147, 147, 147, 147, 147, 147, 73, 438, 73, 83,
83, 72, 146, 146, 146, 146, 146, 146, 146, 146,
88, 73, 371, 376, 146, 146, 146, 146, 146, 227,
227, 227, 227, 227, 228, 118, 456, 73, 104, 118,
118, 73, 287, 146, 146, 146, 146, 146, 146, 152,
152, 152, 152, 152, 152, 152, 152, 118, 247, 222,
149, 152, 152, 152, 152, 152, 105, 106, 128, 224,
107, 128, 128, 323, 108, 249, 119, 109, 128, 73,
146, 146, 146, 146, 146, 146, 117, 389, 72, 331,
117, 128, 72, 72, 84, 324, 117, 325, 84, 73,
141, 533, 149, 149, 84, 149, 73, 460, 117, 117,
72, 224, 187, 334, 224, 377, 84, 84, 174, 326,
175, 175, 175, 175, 175, 175, 175, 175, 216, 216,
217, 218, 218, 218, 218, 218, 184, 73, 118, 458,
319, 341, 118, 73, 386, 386, 327, 330, 118, 73,
174, 343, 176, 176, 176, 176, 176, 176, 176, 176,
118, 118, 320, 211, 212, 213, 211, 211, 211, 211,
211, 174, 73, 175, 175, 175, 175, 175, 175, 323,
489, 73, 174, 487, 177, 177, 177, 177, 177, 178,
175, 175, 73, 192, 192, 192, 192, 192, 192, 192,
192, 324, 73, 226, 226, 226, 226, 226, 226, 226,
226, 418, 141, 73, 72, 141, 179, 179, 179, 179,
179, 179, 179, 179, 222, 149, 435, 435, 179, 179,
179, 179, 179, 533, 224, 225, 225, 225, 225, 225,
225, 225, 225, 73, 149, 419, 389, 179, 179, 179,
179, 179, 179, 181, 182, 183, 183, 183, 183, 183,
183, 184, 343, 374, 429, 185, 185, 185, 185, 185,
255, 255, 255, 255, 255, 255, 255, 255, 184, 325,
412, 222, 149, 460, 185, 185, 185, 185, 185, 185,
149, 188, 189, 190, 188, 188, 188, 188, 188, 191,
458, 326, 413, 192, 192, 192, 192, 192, 260, 261,
262, 260, 260, 260, 260, 260, 269, 269, 269, 269,
269, 270, 192, 192, 192, 192, 192, 192, 193, 193,
193, 193, 193, 193, 193, 193, 414, 533, 149, 454,
193, 193, 193, 193, 193, 233, 233, 233, 233, 233,
233, 233, 233, 452, 452, 399, 222, 149, 415, 179,
179, 179, 179, 179, 179, 174, 266, 175, 175, 175,
175, 175, 175, 175, 175, 222, 149, 264, 264, 264,
264, 264, 264, 343, 533, 224, 268, 268, 268, 268,
268, 268, 268, 268, 343, 294, 73, 174, 341, 175,
175, 175, 175, 175, 175, 175, 175, 533, 343, 267,
267, 267, 267, 267, 267, 267, 267, 533, 149, 288,
289, 290, 288, 288, 288, 288, 288, 266, 73, 222,
149, 223, 223, 223, 223, 223, 223, 223, 223, 224,
73, 73, 417, 225, 225, 225, 225, 225, 73, 249,
333, 250, 250, 250, 250, 250, 250, 412, 470, 470,
222, 149, 225, 225, 225, 225, 225, 225, 149, 229,
230, 231, 229, 229, 229, 229, 229, 232, 149, 413,
73, 233, 233, 233, 233, 233, 300, 224, 301, 301,
301, 301, 301, 301, 301, 301, 501, 501, 149, 416,
233, 233, 233, 233, 233, 233, 249, 266, 250, 250,
250, 250, 250, 250, 250, 250, 300, 414, 302, 302,
302, 302, 302, 302, 302, 302, 300, 73, 303, 303,
303, 303, 303, 304, 301, 301, 375, 73, 249, 415,
251, 251, 251, 251, 251, 251, 251, 251, 275, 275,
275, 275, 275, 275, 275, 275, 222, 149, 307, 307,
307, 307, 307, 307, 515, 515, 266, 73, 294, 73,
249, 220, 252, 252, 252, 252, 252, 253, 250, 250,
311, 311, 311, 311, 311, 311, 311, 311, 312, 312,
312, 312, 312, 313, 346, 346, 346, 346, 346, 347,
373, 73, 222, 149, 264, 264, 264, 264, 264, 264,
264, 264, 224, 222, 149, 265, 265, 265, 265, 265,
265, 265, 265, 266, 149, 372, 370, 267, 267, 267,
267, 267, 533, 266, 310, 310, 310, 310, 310, 310,
310, 310, 369, 300, 294, 220, 267, 267, 267, 267,
267, 267, 149, 271, 272, 273, 271, 271, 271, 271,
271, 274, 184, 329, 328, 275, 275, 275, 275, 275,
299, 299, 299, 299, 299, 299, 299, 299, 322, 321,
294, 222, 149, 220, 275, 275, 275, 275, 275, 275,
249, 266, 250, 250, 250, 250, 250, 250, 250, 250,
345, 345, 345, 345, 345, 345, 345, 345, 533, 149,
344, 344, 344, 344, 344, 344, 344, 344, 309, 422,
184, 73, 249, 184, 250, 250, 250, 250, 250, 250,
250, 250, 353, 354, 355, 353, 353, 353, 353, 353,
300, 341, 301, 301, 301, 301, 301, 301, 301, 301,
73, 389, 490, 73, 295, 296, 297, 295, 295, 295,
295, 295, 298, 242, 283, 282, 299, 299, 299, 299,
299, 300, 533, 301, 301, 301, 301, 301, 301, 301,
301, 280, 389, 73, 517, 299, 299, 299, 299, 299,
299, 222, 149, 307, 307, 307, 307, 307, 307, 307,
307, 266, 222, 149, 308, 308, 308, 308, 308, 308,
308, 308, 309, 149, 279, 73, 310, 310, 310, 310,
310, 300, 309, 301, 301, 301, 301, 301, 301, 363,
363, 363, 363, 363, 364, 310, 310, 310, 310, 310,
310, 149, 314, 315, 316, 314, 314, 314, 314, 314,
317, 222, 149, 278, 318, 318, 318, 318, 318, 418,
141, 309, 318, 318, 318, 318, 318, 318, 318, 318,
277, 276, 455, 318, 318, 318, 318, 318, 318, 334,
335, 335, 335, 335, 335, 335, 335, 335, 533, 149,
222, 149, 358, 358, 358, 358, 358, 358, 309, 258,
309, 362, 362, 362, 362, 362, 362, 362, 362, 73,
334, 336, 336, 336, 336, 336, 336, 336, 336, 533,
220, 361, 361, 361, 361, 361, 361, 361, 361, 378,
379, 380, 381, 378, 378, 378, 378, 184, 254, 184,
73, 334, 337, 337, 337, 337, 337, 338, 335, 335,
383, 384, 385, 383, 383, 383, 383, 383, 73, 222,
149, 334, 335, 335, 335, 335, 335, 335, 94, 309,
242, 73, 341, 341, 342, 342, 342, 342, 342, 342,
342, 342, 343, 389, 244, 242, 344, 344, 344, 344,
344, 73, 352, 352, 352, 352, 352, 352, 352, 352,
243, 242, 240, 239, 238, 344, 344, 344, 344, 344,
344, 348, 349, 350, 348, 348, 348, 348, 348, 351,
237, 236, 88, 352, 352, 352, 352, 352, 391, 391,
391, 391, 391, 391, 391, 391, 392, 392, 392, 392,
392, 393, 352, 352, 352, 352, 352, 352, 222, 149,
358, 358, 358, 358, 358, 358, 358, 358, 309, 222,
149, 359, 359, 359, 359, 359, 359, 359, 359, 360,
149, 184, 220, 361, 361, 361, 361, 361, 533, 360,
390, 390, 390, 390, 390, 390, 390, 390, 184, 94,
173, 208, 361, 361, 361, 361, 361, 361, 149, 365,
366, 367, 365, 365, 365, 365, 365, 222, 149, 205,
204, 368, 368, 368, 368, 368, 399, 360, 400, 400,
400, 400, 400, 400, 400, 400, 203, 202, 201, 199,
368, 368, 368, 368, 368, 368, 334, 335, 335, 335,
335, 335, 335, 335, 335, 399, 341, 401, 401, 401,
401, 401, 401, 401, 401, 399, 438, 402, 402, 402,
402, 402, 403, 400, 400, 198, 73, 334, 335, 335,
335, 335, 335, 335, 335, 335, 368, 368, 368, 368,
368, 368, 368, 368, 533, 149, 222, 149, 406, 406,
406, 406, 406, 406, 360, 197, 360, 73, 341, 196,
387, 387, 387, 387, 387, 387, 387, 387, 343, 341,
533, 388, 388, 388, 388, 388, 388, 388, 388, 389,
438, 195, 194, 390, 390, 390, 390, 390, 409, 409,
409, 409, 409, 409, 409, 409, 410, 410, 410, 410,
410, 411, 390, 390, 390, 390, 390, 390, 394, 395,
396, 394, 394, 394, 394, 394, 397, 149, 94, 86,
398, 398, 398, 398, 398, 533, 360, 408, 408, 408,
408, 408, 408, 408, 408, 141, 173, 135, 129, 398,
398, 398, 398, 398, 398, 222, 149, 406, 406, 406,
406, 406, 406, 406, 406, 360, 222, 149, 407, 407,
407, 407, 407, 407, 407, 407, 129, 222, 149, 122,
408, 408, 408, 408, 408, 420, 429, 360, 430, 430,
430, 430, 430, 430, 430, 430, 465, 465, 465, 408,
408, 408, 408, 408, 408, 420, 171, 420, 421, 429,
116, 431, 431, 431, 431, 431, 431, 431, 431, 441,
441, 441, 441, 441, 442, 73, 73, 422, 341, 423,
423, 423, 423, 423, 423, 423, 423, 429, 438, 432,
432, 432, 432, 432, 433, 430, 430, 398, 398, 398,
398, 398, 398, 398, 398, 164, 163, 162, 73, 422,
161, 424, 424, 424, 424, 424, 424, 424, 424, 440,
440, 440, 440, 440, 440, 440, 440, 533, 341, 439,
439, 439, 439, 439, 439, 439, 439, 160, 473, 158,
73, 422, 157, 425, 425, 425, 425, 425, 426, 427,
427, 448, 449, 450, 448, 448, 448, 448, 448, 399,
533, 400, 400, 400, 400, 400, 400, 400, 400, 153,
473, 94, 73, 422, 341, 428, 428, 428, 423, 423,
423, 423, 423, 399, 473, 400, 400, 400, 400, 400,
400, 400, 400, 399, 72, 400, 400, 400, 400, 400,
400, 94, 142, 82, 73, 341, 80, 436, 436, 436,
436, 436, 436, 436, 436, 389, 341, 420, 437, 437,
437, 437, 437, 437, 437, 437, 438, 141, 75, 74,
439, 439, 439, 439, 439, 73, 135, 420, 129, 420,
420, 422, 122, 465, 465, 465, 116, 115, 114, 439,
439, 439, 439, 439, 439, 443, 444, 445, 443, 443,
443, 443, 443, 446, 113, 112, 111, 447, 447, 447,
447, 447, 73, 461, 462, 463, 461, 461, 461, 461,
461, 100, 99, 98, 97, 94, 447, 447, 447, 447,
447, 447, 222, 149, 453, 453, 453, 453, 453, 453,
453, 453, 73, 422, 82, 427, 427, 427, 427, 427,
427, 427, 427, 466, 467, 468, 466, 466, 466, 466,
466, 429, 80, 430, 430, 430, 430, 430, 430, 430,
430, 75, 74, 73, 73, 422, 533, 427, 427, 427,
427, 427, 427, 427, 427, 429, 533, 430, 430, 430,
430, 430, 430, 430, 430, 429, 533, 430, 430, 430,
430, 430, 430, 533, 533, 533, 73, 422, 533, 427,
427, 427, 427, 427, 427, 464, 464, 447, 447, 447,
447, 447, 447, 447, 447, 475, 475, 475, 475, 475,
475, 475, 475, 533, 533, 533, 533, 533, 73, 422,
533, 464, 464, 464, 464, 464, 464, 464, 464, 476,
476, 476, 476, 476, 477, 533, 533, 474, 474, 474,
474, 474, 474, 474, 474, 533, 533, 533, 533, 533,
73, 341, 533, 471, 471, 471, 471, 471, 471, 471,
471, 438, 341, 533, 472, 472, 472, 472, 472, 472,
472, 472, 473, 533, 533, 533, 474, 474, 474, 474,
474, 149, 482, 482, 482, 482, 482, 482, 482, 482,
533, 533, 533, 533, 533, 474, 474, 474, 474, 474,
474, 478, 479, 480, 478, 478, 478, 478, 478, 533,
533, 533, 533, 481, 481, 481, 481, 481, 149, 483,
483, 483, 483, 483, 483, 483, 483, 533, 533, 533,
533, 533, 481, 481, 481, 481, 481, 481, 149, 484,
484, 484, 484, 484, 485, 482, 482, 457, 533, 457,
533, 457, 533, 457, 457, 533, 459, 457, 459, 533,
459, 533, 459, 459, 533, 533, 459, 533, 533, 457,
457, 457, 506, 506, 506, 506, 506, 507, 459, 459,
459, 490, 533, 491, 491, 491, 491, 491, 491, 491,
491, 533, 533, 533, 464, 464, 464, 464, 464, 464,
464, 464, 495, 533, 496, 496, 496, 496, 496, 496,
496, 496, 73, 490, 533, 492, 492, 492, 492, 492,
492, 492, 492, 73, 495, 533, 497, 497, 497, 497,
497, 497, 497, 497, 495, 533, 498, 498, 498, 498,
498, 499, 496, 496, 73, 490, 533, 493, 493, 493,
493, 493, 494, 491, 491, 481, 481, 481, 481, 481,
481, 481, 481, 505, 505, 505, 505, 505, 505, 505,
505, 533, 533, 533, 533, 533, 73, 341, 533, 502,
502, 502, 502, 502, 502, 502, 502, 473, 341, 533,
503, 503, 503, 503, 503, 503, 503, 503, 533, 533,
533, 533, 504, 504, 504, 504, 504, 533, 533, 504,
504, 504, 504, 504, 504, 504, 504, 533, 533, 533,
533, 504, 504, 504, 504, 504, 504, 149, 482, 482,
482, 482, 482, 482, 482, 482, 149, 482, 482, 482,
482, 482, 482, 482, 482, 149, 482, 482, 482, 482,
482, 482, 508, 509, 510, 508, 508, 508, 508, 508,
533, 490, 533, 491, 491, 491, 491, 491, 491, 511,
512, 513, 511, 511, 511, 511, 511, 533, 533, 533,
533, 73, 490, 533, 491, 491, 491, 491, 491, 491,
491, 491, 73, 495, 533, 496, 496, 496, 496, 496,
496, 496, 496, 495, 533, 496, 496, 496, 496, 496,
496, 496, 496, 73, 490, 533, 491, 491, 491, 491,
491, 491, 491, 491, 495, 533, 496, 496, 496, 496,
496, 496, 341, 533, 516, 516, 516, 516, 516, 516,
516, 516, 533, 533, 533, 73, 517, 533, 518, 518,
518, 518, 518, 518, 518, 518, 522, 522, 522, 522,
522, 522, 522, 522, 523, 523, 523, 523, 523, 523,
523, 523, 533, 533, 533, 533, 533, 73, 517, 533,
519, 519, 519, 519, 519, 519, 519, 519, 524, 524,
524, 524, 524, 525, 522, 522, 527, 528, 529, 527,
527, 527, 527, 527, 533, 533, 533, 533, 533, 73,
517, 533, 520, 520, 520, 520, 520, 521, 518, 518,
533, 533, 533, 533, 517, 73, 518, 518, 518, 518,
518, 518, 522, 522, 522, 522, 522, 522, 522, 522,
533, 73, 517, 533, 518, 518, 518, 518, 518, 518,
518, 518, 533, 533, 533, 73, 522, 522, 522, 522,
522, 522, 522, 522, 522, 522, 522, 522, 522, 522,
533, 533, 533, 73, 517, 533, 518, 518, 518, 518,
518, 518, 518, 518, 530, 530, 530, 530, 530, 530,
530, 530, 527, 527, 527, 527, 527, 527, 527, 527,
533, 533, 533, 533, 533, 73, 533, 533, 533, 533,
533, 533, 533, 73, 530, 530, 530, 530, 530, 530,
533, 73, 531, 531, 531, 531, 531, 532, 530, 530,
530, 530, 530, 530, 530, 530, 530, 530, 533, 533,
533, 533, 533, 73, 533, 533, 533, 533, 533, 533,
533, 73, 533, 533, 533, 533, 533, 533, 533, 73,
51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
51, 51, 51, 30, 30, 30, 30, 30, 30, 30,
30, 30, 30, 30, 30, 30, 60, 60, 60, 60,
60, 60, 60, 60, 60, 60, 60, 60, 60, 67,
67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
67, 67, 72, 533, 533, 533, 72, 533, 72, 72,
72, 533, 72, 72, 72, 76, 76, 76, 76, 76,
76, 76, 76, 76, 76, 76, 76, 76, 79, 533,
533, 533, 79, 533, 79, 79, 79, 533, 79, 79,
79, 81, 533, 533, 533, 81, 533, 81, 81, 81,
533, 81, 81, 81, 83, 533, 533, 83, 83, 533,
83, 83, 83, 533, 83, 83, 83, 93, 93, 533,
533, 93, 117, 533, 533, 117, 117, 533, 117, 117,
117, 533, 117, 117, 117, 121, 533, 533, 121, 121,
121, 121, 121, 121, 533, 533, 121, 121, 127, 127,
128, 533, 533, 128, 533, 533, 128, 128, 128, 128,
128, 128, 128, 132, 132, 132, 132, 132, 132, 132,
132, 132, 132, 132, 132, 132, 134, 134, 533, 134,
533, 134, 134, 134, 134, 134, 134, 134, 134, 140,
140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
140, 140, 84, 533, 533, 84, 84, 533, 84, 84,
84, 533, 84, 84, 84, 148, 148, 533, 533, 148,
150, 150, 150, 533, 533, 150, 118, 533, 533, 118,
118, 533, 118, 118, 118, 533, 118, 118, 118, 180,
180, 533, 533, 180, 186, 186, 186, 533, 533, 186,
214, 214, 533, 533, 214, 215, 215, 533, 533, 215,
219, 219, 533, 533, 219, 221, 221, 221, 533, 533,
221, 254, 254, 533, 533, 254, 256, 256, 533, 533,
256, 257, 257, 533, 533, 257, 259, 259, 259, 533,
533, 259, 263, 263, 263, 263, 533, 533, 263, 291,
291, 533, 533, 291, 292, 292, 533, 533, 292, 293,
293, 533, 533, 293, 305, 305, 305, 533, 533, 305,
306, 306, 306, 306, 533, 533, 306, 339, 339, 533,
533, 339, 340, 340, 533, 533, 340, 356, 356, 356,
533, 533, 356, 357, 357, 357, 357, 533, 533, 357,
382, 382, 533, 533, 382, 386, 533, 386, 386, 533,
533, 386, 404, 404, 404, 533, 533, 404, 405, 405,
405, 405, 533, 533, 405, 434, 434, 533, 533, 434,
435, 533, 435, 435, 533, 533, 435, 451, 451, 451,
533, 533, 451, 452, 452, 452, 533, 533, 533, 452,
457, 533, 533, 533, 457, 533, 457, 457, 457, 533,
457, 457, 457, 459, 533, 533, 533, 459, 533, 459,
459, 459, 533, 459, 459, 459, 469, 469, 533, 533,
469, 470, 533, 470, 470, 533, 533, 470, 486, 486,
533, 533, 533, 486, 488, 488, 488, 488, 488, 488,
488, 488, 488, 488, 488, 488, 488, 500, 500, 533,
533, 500, 501, 533, 501, 501, 533, 533, 501, 514,
514, 533, 533, 514, 515, 533, 515, 533, 533, 533,
515, 526, 533, 533, 533, 526, 13, 533, 533, 533,
533, 533, 533, 533, 533, 533, 533, 533, 533, 533,
533, 533, 533, 533, 533, 533, 533, 533, 533, 533,
533, 533, 533, 533, 533, 533, 533, 533, 533, 533,
533, 533, 533, 533, 533, 533, 533, 533, 533, 533,
533, 533, 533, 533, 533, 533, 533, 533, 533, 533,
533, 533, 533, 533, 533, 533, 533, 533, 533
} ;
static yyconst short int yy_chk[3430] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 2, 3, 4, 530, 2, 3, 4, 165,
5, 5, 5, 110, 5, 68, 3, 4, 69, 39,
5, 11, 11, 11, 11, 6, 6, 6, 516, 6,
2, 2, 5, 5, 2, 6, 39, 50, 2, 58,
58, 2, 12, 12, 12, 12, 62, 6, 6, 66,
66, 94, 24, 5, 50, 165, 24, 24, 68, 69,
94, 3, 4, 64, 11, 112, 62, 110, 6, 7,
7, 7, 18, 7, 24, 18, 18, 18, 18, 18,
18, 18, 18, 64, 514, 12, 27, 27, 27, 27,
27, 27, 504, 24, 26, 26, 26, 26, 26, 26,
26, 26, 38, 112, 38, 38, 38, 38, 38, 38,
38, 38, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
8, 8, 8, 40, 8, 48, 111, 503, 48, 48,
48, 48, 48, 48, 48, 48, 57, 159, 111, 57,
57, 57, 57, 57, 57, 57, 57, 170, 103, 98,
159, 40, 40, 103, 98, 40, 98, 71, 71, 40,
71, 170, 40, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 9, 9, 9, 9, 9, 113, 123, 123, 49,
9, 9, 9, 49, 49, 56, 56, 56, 114, 56,
71, 113, 115, 56, 9, 56, 135, 120, 115, 194,
114, 49, 120, 501, 101, 101, 168, 56, 56, 126,
126, 133, 133, 136, 9, 10, 10, 10, 10, 10,
49, 194, 168, 150, 10, 10, 10, 73, 56, 73,
137, 73, 150, 73, 73, 500, 135, 73, 10, 77,
77, 77, 77, 77, 77, 77, 77, 101, 83, 73,
73, 73, 83, 83, 133, 166, 136, 206, 10, 25,
166, 25, 25, 25, 25, 25, 25, 25, 25, 25,
83, 137, 175, 25, 25, 25, 25, 25, 78, 78,
78, 78, 78, 78, 78, 78, 169, 172, 169, 83,
25, 209, 25, 25, 25, 25, 25, 25, 31, 200,
172, 179, 31, 175, 31, 200, 209, 31, 31, 206,
31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
31, 31, 179, 496, 31, 31, 31, 31, 31, 31,
31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
33, 33, 33, 33, 33, 33, 33, 33, 33, 183,
183, 183, 33, 33, 33, 33, 33, 86, 86, 86,
86, 86, 86, 86, 86, 92, 92, 92, 92, 92,
92, 33, 33, 33, 33, 33, 33, 37, 37, 37,
241, 37, 245, 37, 37, 241, 86, 37, 90, 90,
90, 90, 90, 90, 90, 90, 138, 138, 286, 37,
37, 37, 41, 207, 207, 41, 41, 41, 41, 41,
41, 41, 41, 80, 286, 80, 186, 80, 488, 80,
80, 210, 82, 80, 82, 186, 82, 210, 82, 82,
234, 221, 82, 246, 276, 80, 80, 80, 247, 138,
221, 245, 486, 41, 82, 82, 82, 85, 247, 85,
246, 85, 234, 85, 85, 482, 276, 85, 91, 91,
91, 91, 91, 91, 91, 91, 327, 470, 332, 85,
85, 85, 87, 87, 87, 87, 87, 87, 87, 87,
208, 419, 327, 332, 87, 87, 87, 87, 87, 190,
190, 190, 190, 190, 190, 117, 419, 248, 104, 117,
117, 208, 248, 87, 87, 87, 87, 87, 87, 95,
95, 95, 95, 95, 95, 95, 95, 117, 208, 223,
223, 95, 95, 95, 95, 95, 104, 104, 129, 223,
104, 129, 129, 279, 104, 250, 117, 104, 129, 285,
95, 95, 95, 95, 95, 95, 119, 469, 119, 285,
119, 129, 119, 119, 142, 279, 119, 280, 142, 333,
284, 225, 225, 259, 142, 263, 250, 459, 119, 119,
119, 225, 259, 335, 263, 333, 142, 142, 143, 280,
143, 143, 143, 143, 143, 143, 143, 143, 182, 182,
182, 182, 182, 182, 182, 182, 182, 281, 171, 457,
319, 342, 171, 335, 347, 347, 281, 284, 171, 143,
144, 342, 144, 144, 144, 144, 144, 144, 144, 144,
171, 171, 319, 174, 174, 174, 174, 174, 174, 174,
174, 178, 456, 178, 178, 178, 178, 178, 178, 323,
455, 144, 145, 454, 145, 145, 145, 145, 145, 145,
145, 145, 174, 187, 187, 187, 187, 187, 187, 187,
187, 323, 178, 189, 189, 189, 189, 189, 189, 189,
189, 374, 374, 145, 146, 330, 146, 146, 146, 146,
146, 146, 146, 146, 264, 264, 393, 393, 146, 146,
146, 146, 146, 192, 264, 192, 192, 192, 192, 192,
192, 192, 192, 375, 452, 375, 435, 146, 146, 146,
146, 146, 146, 149, 149, 149, 149, 149, 149, 149,
149, 149, 434, 330, 430, 149, 149, 149, 149, 149,
216, 216, 216, 216, 216, 216, 216, 216, 216, 325,
369, 407, 407, 421, 149, 149, 149, 149, 149, 149,
151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
420, 325, 369, 151, 151, 151, 151, 151, 222, 222,
222, 222, 222, 222, 222, 222, 231, 231, 231, 231,
231, 231, 151, 151, 151, 151, 151, 151, 152, 152,
152, 152, 152, 152, 152, 152, 370, 408, 408, 416,
152, 152, 152, 152, 152, 224, 224, 224, 224, 224,
224, 224, 224, 411, 411, 400, 265, 265, 370, 152,
152, 152, 152, 152, 152, 176, 265, 176, 176, 176,
176, 176, 176, 176, 176, 228, 228, 228, 228, 228,
228, 228, 228, 386, 344, 228, 230, 230, 230, 230,
230, 230, 230, 230, 344, 382, 176, 177, 387, 177,
177, 177, 177, 177, 177, 177, 177, 233, 387, 233,
233, 233, 233, 233, 233, 233, 233, 267, 267, 249,
249, 249, 249, 249, 249, 249, 249, 267, 177, 188,
188, 188, 188, 188, 188, 188, 188, 188, 188, 188,
377, 287, 373, 188, 188, 188, 188, 188, 249, 253,
287, 253, 253, 253, 253, 253, 253, 412, 442, 442,
453, 453, 188, 188, 188, 188, 188, 188, 191, 191,
191, 191, 191, 191, 191, 191, 191, 191, 305, 412,
253, 191, 191, 191, 191, 191, 260, 305, 260, 260,
260, 260, 260, 260, 260, 260, 477, 477, 306, 372,
191, 191, 191, 191, 191, 191, 211, 306, 211, 211,
211, 211, 211, 211, 211, 211, 261, 414, 261, 261,
261, 261, 261, 261, 261, 261, 262, 331, 262, 262,
262, 262, 262, 262, 262, 262, 331, 211, 212, 414,
212, 212, 212, 212, 212, 212, 212, 212, 266, 266,
266, 266, 266, 266, 266, 266, 270, 270, 270, 270,
270, 270, 270, 270, 507, 507, 270, 371, 340, 212,
213, 339, 213, 213, 213, 213, 213, 213, 213, 213,
272, 272, 272, 272, 272, 272, 272, 272, 273, 273,
273, 273, 273, 273, 297, 297, 297, 297, 297, 297,
329, 213, 226, 226, 226, 226, 226, 226, 226, 226,
226, 226, 226, 229, 229, 229, 229, 229, 229, 229,
229, 229, 229, 229, 356, 328, 322, 229, 229, 229,
229, 229, 275, 356, 275, 275, 275, 275, 275, 275,
275, 275, 321, 301, 293, 292, 229, 229, 229, 229,
229, 229, 232, 232, 232, 232, 232, 232, 232, 232,
232, 232, 291, 283, 282, 232, 232, 232, 232, 232,
294, 294, 294, 294, 294, 294, 294, 294, 278, 277,
257, 307, 307, 256, 232, 232, 232, 232, 232, 232,
251, 307, 251, 251, 251, 251, 251, 251, 251, 251,
296, 296, 296, 296, 296, 296, 296, 296, 299, 357,
299, 299, 299, 299, 299, 299, 299, 299, 357, 423,
255, 251, 252, 254, 252, 252, 252, 252, 252, 252,
252, 252, 300, 300, 300, 300, 300, 300, 300, 300,
302, 388, 302, 302, 302, 302, 302, 302, 302, 302,
423, 388, 491, 252, 258, 258, 258, 258, 258, 258,
258, 258, 258, 244, 243, 242, 258, 258, 258, 258,
258, 303, 390, 303, 303, 303, 303, 303, 303, 303,
303, 240, 390, 491, 518, 258, 258, 258, 258, 258,
258, 268, 268, 268, 268, 268, 268, 268, 268, 268,
268, 268, 271, 271, 271, 271, 271, 271, 271, 271,
271, 271, 271, 404, 239, 518, 271, 271, 271, 271,
271, 304, 404, 304, 304, 304, 304, 304, 304, 316,
316, 316, 316, 316, 316, 271, 271, 271, 271, 271,
271, 274, 274, 274, 274, 274, 274, 274, 274, 274,
274, 308, 308, 238, 274, 274, 274, 274, 274, 418,
418, 308, 309, 309, 309, 309, 309, 309, 309, 309,
237, 236, 418, 274, 274, 274, 274, 274, 274, 288,
288, 288, 288, 288, 288, 288, 288, 288, 310, 310,
313, 313, 313, 313, 313, 313, 313, 313, 310, 220,
313, 315, 315, 315, 315, 315, 315, 315, 315, 288,
289, 289, 289, 289, 289, 289, 289, 289, 289, 318,
219, 318, 318, 318, 318, 318, 318, 318, 318, 334,
334, 334, 334, 334, 334, 334, 334, 218, 217, 215,
289, 290, 290, 290, 290, 290, 290, 290, 290, 290,
341, 341, 341, 341, 341, 341, 341, 341, 334, 358,
358, 338, 338, 338, 338, 338, 338, 338, 214, 358,
205, 290, 295, 436, 295, 295, 295, 295, 295, 295,
295, 295, 295, 436, 204, 203, 295, 295, 295, 295,
295, 338, 343, 343, 343, 343, 343, 343, 343, 343,
202, 201, 199, 198, 197, 295, 295, 295, 295, 295,
295, 298, 298, 298, 298, 298, 298, 298, 298, 298,
196, 195, 193, 298, 298, 298, 298, 298, 349, 349,
349, 349, 349, 349, 349, 349, 350, 350, 350, 350,
350, 350, 298, 298, 298, 298, 298, 298, 311, 311,
311, 311, 311, 311, 311, 311, 311, 311, 311, 314,
314, 314, 314, 314, 314, 314, 314, 314, 314, 314,
405, 185, 184, 314, 314, 314, 314, 314, 352, 405,
352, 352, 352, 352, 352, 352, 352, 352, 181, 180,
173, 167, 314, 314, 314, 314, 314, 314, 317, 317,
317, 317, 317, 317, 317, 317, 317, 359, 359, 164,
163, 317, 317, 317, 317, 317, 353, 359, 353, 353,
353, 353, 353, 353, 353, 353, 162, 161, 160, 158,
317, 317, 317, 317, 317, 317, 336, 336, 336, 336,
336, 336, 336, 336, 336, 354, 437, 354, 354, 354,
354, 354, 354, 354, 354, 355, 437, 355, 355, 355,
355, 355, 355, 355, 355, 157, 336, 337, 337, 337,
337, 337, 337, 337, 337, 337, 360, 360, 360, 360,
360, 360, 360, 360, 361, 361, 364, 364, 364, 364,
364, 364, 364, 364, 361, 156, 364, 337, 345, 155,
345, 345, 345, 345, 345, 345, 345, 345, 345, 348,
439, 348, 348, 348, 348, 348, 348, 348, 348, 348,
439, 154, 153, 348, 348, 348, 348, 348, 366, 366,
366, 366, 366, 366, 366, 366, 367, 367, 367, 367,
367, 367, 348, 348, 348, 348, 348, 348, 351, 351,
351, 351, 351, 351, 351, 351, 351, 451, 148, 147,
351, 351, 351, 351, 351, 368, 451, 368, 368, 368,
368, 368, 368, 368, 368, 140, 139, 134, 132, 351,
351, 351, 351, 351, 351, 362, 362, 362, 362, 362,
362, 362, 362, 362, 362, 362, 365, 365, 365, 365,
365, 365, 365, 365, 365, 365, 128, 406, 406, 122,
365, 365, 365, 365, 365, 376, 383, 406, 383, 383,
383, 383, 383, 383, 383, 383, 465, 465, 465, 365,
365, 365, 365, 365, 365, 376, 118, 376, 376, 384,
116, 384, 384, 384, 384, 384, 384, 384, 384, 396,
396, 396, 396, 396, 396, 465, 376, 378, 471, 378,
378, 378, 378, 378, 378, 378, 378, 385, 471, 385,
385, 385, 385, 385, 385, 385, 385, 389, 389, 389,
389, 389, 389, 389, 389, 109, 108, 107, 378, 379,
106, 379, 379, 379, 379, 379, 379, 379, 379, 395,
395, 395, 395, 395, 395, 395, 395, 398, 472, 398,
398, 398, 398, 398, 398, 398, 398, 105, 472, 100,
379, 380, 99, 380, 380, 380, 380, 380, 380, 380,
380, 399, 399, 399, 399, 399, 399, 399, 399, 401,
474, 401, 401, 401, 401, 401, 401, 401, 401, 97,
474, 93, 380, 381, 502, 381, 381, 381, 381, 381,
381, 381, 381, 402, 502, 402, 402, 402, 402, 402,
402, 402, 402, 403, 89, 403, 403, 403, 403, 403,
403, 88, 84, 81, 381, 391, 79, 391, 391, 391,
391, 391, 391, 391, 391, 391, 394, 417, 394, 394,
394, 394, 394, 394, 394, 394, 394, 76, 75, 74,
394, 394, 394, 394, 394, 72, 67, 417, 60, 417,
417, 428, 53, 428, 428, 428, 47, 46, 45, 394,
394, 394, 394, 394, 394, 397, 397, 397, 397, 397,
397, 397, 397, 397, 44, 43, 42, 397, 397, 397,
397, 397, 428, 422, 422, 422, 422, 422, 422, 422,
422, 36, 35, 34, 32, 28, 397, 397, 397, 397,
397, 397, 409, 409, 409, 409, 409, 409, 409, 409,
409, 409, 422, 424, 22, 424, 424, 424, 424, 424,
424, 424, 424, 429, 429, 429, 429, 429, 429, 429,
429, 431, 19, 431, 431, 431, 431, 431, 431, 431,
431, 17, 15, 14, 424, 425, 13, 425, 425, 425,
425, 425, 425, 425, 425, 432, 0, 432, 432, 432,
432, 432, 432, 432, 432, 433, 0, 433, 433, 433,
433, 433, 433, 0, 0, 0, 425, 426, 0, 426,
426, 426, 426, 426, 426, 426, 426, 438, 438, 438,
438, 438, 438, 438, 438, 444, 444, 444, 444, 444,
444, 444, 444, 0, 0, 0, 0, 0, 426, 427,
0, 427, 427, 427, 427, 427, 427, 427, 427, 445,
445, 445, 445, 445, 445, 447, 0, 447, 447, 447,
447, 447, 447, 447, 447, 0, 0, 0, 0, 0,
427, 440, 0, 440, 440, 440, 440, 440, 440, 440,
440, 440, 443, 0, 443, 443, 443, 443, 443, 443,
443, 443, 443, 0, 0, 0, 443, 443, 443, 443,
443, 448, 448, 448, 448, 448, 448, 448, 448, 448,
0, 0, 0, 0, 0, 443, 443, 443, 443, 443,
443, 446, 446, 446, 446, 446, 446, 446, 446, 0,
0, 0, 0, 446, 446, 446, 446, 446, 449, 449,
449, 449, 449, 449, 449, 449, 449, 0, 0, 0,
0, 0, 446, 446, 446, 446, 446, 446, 450, 450,
450, 450, 450, 450, 450, 450, 450, 458, 0, 458,
0, 458, 0, 458, 458, 0, 460, 458, 460, 0,
460, 0, 460, 460, 0, 0, 460, 0, 0, 458,
458, 458, 480, 480, 480, 480, 480, 480, 460, 460,
460, 461, 0, 461, 461, 461, 461, 461, 461, 461,
461, 0, 0, 0, 464, 464, 464, 464, 464, 464,
464, 464, 466, 0, 466, 466, 466, 466, 466, 466,
466, 466, 461, 462, 0, 462, 462, 462, 462, 462,
462, 462, 462, 464, 467, 0, 467, 467, 467, 467,
467, 467, 467, 467, 468, 0, 468, 468, 468, 468,
468, 468, 468, 468, 462, 463, 0, 463, 463, 463,
463, 463, 463, 463, 463, 473, 473, 473, 473, 473,
473, 473, 473, 479, 479, 479, 479, 479, 479, 479,
479, 0, 0, 0, 0, 0, 463, 475, 0, 475,
475, 475, 475, 475, 475, 475, 475, 475, 478, 0,
478, 478, 478, 478, 478, 478, 478, 478, 0, 0,
0, 0, 478, 478, 478, 478, 478, 481, 0, 481,
481, 481, 481, 481, 481, 481, 481, 0, 0, 0,
0, 478, 478, 478, 478, 478, 478, 483, 483, 483,
483, 483, 483, 483, 483, 483, 484, 484, 484, 484,
484, 484, 484, 484, 484, 485, 485, 485, 485, 485,
485, 485, 490, 490, 490, 490, 490, 490, 490, 490,
0, 494, 0, 494, 494, 494, 494, 494, 494, 495,
495, 495, 495, 495, 495, 495, 495, 0, 0, 0,
0, 490, 492, 0, 492, 492, 492, 492, 492, 492,
492, 492, 494, 497, 0, 497, 497, 497, 497, 497,
497, 497, 497, 498, 0, 498, 498, 498, 498, 498,
498, 498, 498, 492, 493, 0, 493, 493, 493, 493,
493, 493, 493, 493, 499, 0, 499, 499, 499, 499,
499, 499, 505, 0, 505, 505, 505, 505, 505, 505,
505, 505, 0, 0, 0, 493, 508, 0, 508, 508,
508, 508, 508, 508, 508, 508, 511, 511, 511, 511,
511, 511, 511, 511, 512, 512, 512, 512, 512, 512,
512, 512, 0, 0, 0, 0, 0, 508, 509, 0,
509, 509, 509, 509, 509, 509, 509, 509, 513, 513,
513, 513, 513, 513, 513, 513, 517, 517, 517, 517,
517, 517, 517, 517, 0, 0, 0, 0, 0, 509,
510, 0, 510, 510, 510, 510, 510, 510, 510, 510,
0, 0, 0, 0, 521, 517, 521, 521, 521, 521,
521, 521, 523, 523, 523, 523, 523, 523, 523, 523,
0, 510, 519, 0, 519, 519, 519, 519, 519, 519,
519, 519, 0, 0, 0, 521, 524, 524, 524, 524,
524, 524, 524, 524, 525, 525, 525, 525, 525, 525,
0, 0, 0, 519, 520, 0, 520, 520, 520, 520,
520, 520, 520, 520, 527, 527, 527, 527, 527, 527,
527, 527, 528, 528, 528, 528, 528, 528, 528, 528,
0, 0, 0, 0, 0, 520, 0, 0, 0, 0,
0, 0, 0, 527, 532, 532, 532, 532, 532, 532,
0, 528, 529, 529, 529, 529, 529, 529, 529, 529,
531, 531, 531, 531, 531, 531, 531, 531, 0, 0,
0, 0, 0, 532, 0, 0, 0, 0, 0, 0,
0, 529, 0, 0, 0, 0, 0, 0, 0, 531,
534, 534, 534, 534, 534, 534, 534, 534, 534, 534,
534, 534, 534, 535, 535, 535, 535, 535, 535, 535,
535, 535, 535, 535, 535, 535, 536, 536, 536, 536,
536, 536, 536, 536, 536, 536, 536, 536, 536, 537,
537, 537, 537, 537, 537, 537, 537, 537, 537, 537,
537, 537, 538, 0, 0, 0, 538, 0, 538, 538,
538, 0, 538, 538, 538, 539, 539, 539, 539, 539,
539, 539, 539, 539, 539, 539, 539, 539, 540, 0,
0, 0, 540, 0, 540, 540, 540, 0, 540, 540,
540, 541, 0, 0, 0, 541, 0, 541, 541, 541,
0, 541, 541, 541, 542, 0, 0, 542, 542, 0,
542, 542, 542, 0, 542, 542, 542, 543, 543, 0,
0, 543, 544, 0, 0, 544, 544, 0, 544, 544,
544, 0, 544, 544, 544, 545, 0, 0, 545, 545,
545, 545, 545, 545, 0, 0, 545, 545, 546, 546,
547, 0, 0, 547, 0, 0, 547, 547, 547, 547,
547, 547, 547, 548, 548, 548, 548, 548, 548, 548,
548, 548, 548, 548, 548, 548, 549, 549, 0, 549,
0, 549, 549, 549, 549, 549, 549, 549, 549, 550,
550, 550, 550, 550, 550, 550, 550, 550, 550, 550,
550, 550, 551, 0, 0, 551, 551, 0, 551, 551,
551, 0, 551, 551, 551, 552, 552, 0, 0, 552,
553, 553, 553, 0, 0, 553, 554, 0, 0, 554,
554, 0, 554, 554, 554, 0, 554, 554, 554, 555,
555, 0, 0, 555, 556, 556, 556, 0, 0, 556,
557, 557, 0, 0, 557, 558, 558, 0, 0, 558,
559, 559, 0, 0, 559, 560, 560, 560, 0, 0,
560, 561, 561, 0, 0, 561, 562, 562, 0, 0,
562, 563, 563, 0, 0, 563, 564, 564, 564, 0,
0, 564, 565, 565, 565, 565, 0, 0, 565, 566,
566, 0, 0, 566, 567, 567, 0, 0, 567, 568,
568, 0, 0, 568, 569, 569, 569, 0, 0, 569,
570, 570, 570, 570, 0, 0, 570, 571, 571, 0,
0, 571, 572, 572, 0, 0, 572, 573, 573, 573,
0, 0, 573, 574, 574, 574, 574, 0, 0, 574,
575, 575, 0, 0, 575, 576, 0, 576, 576, 0,
0, 576, 577, 577, 577, 0, 0, 577, 578, 578,
578, 578, 0, 0, 578, 579, 579, 0, 0, 579,
580, 0, 580, 580, 0, 0, 580, 581, 581, 581,
0, 0, 581, 582, 582, 582, 0, 0, 0, 582,
583, 0, 0, 0, 583, 0, 583, 583, 583, 0,
583, 583, 583, 584, 0, 0, 0, 584, 0, 584,
584, 584, 0, 584, 584, 584, 585, 585, 0, 0,
585, 586, 0, 586, 586, 0, 0, 586, 587, 587,
0, 0, 0, 587, 588, 588, 588, 588, 588, 588,
588, 588, 588, 588, 588, 588, 588, 589, 589, 0,
0, 589, 590, 0, 590, 590, 0, 0, 590, 591,
591, 0, 0, 591, 592, 0, 592, 0, 0, 0,
592, 593, 0, 0, 0, 593, 533, 533, 533, 533,
533, 533, 533, 533, 533, 533, 533, 533, 533, 533,
533, 533, 533, 533, 533, 533, 533, 533, 533, 533,
533, 533, 533, 533, 533, 533, 533, 533, 533, 533,
533, 533, 533, 533, 533, 533, 533, 533, 533, 533,
533, 533, 533, 533, 533, 533, 533, 533, 533, 533,
533, 533, 533, 533, 533, 533, 533, 533, 533
} ;
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
* 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 <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>
#else
# ifdef HAVE_STRINGS_H
# include <strings.h>
# endif
#endif /* HAVE_STRING_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 */
#include <ctype.h>
#include "sudo.h"
#include "parse.h"
#include <gram.h>
#ifndef lint
__unused static const char rcsid[] = "$Sudo$";
#endif /* lint */
extern YYSTYPE yylval;
int sudolineno = 1;
char *sudoers;
static int sawspace = 0;
static int arg_len = 0;
static int arg_size = 0;
static int append __P((char *, int));
static int _fill __P((char *, int, int));
static int fill_cmnd __P((char *, int));
static int fill_args __P((char *, int, int));
static int switch_buffer __P((char *));
static int ipv6_valid __P((const char *s));
static char *parse_include __P((char *));
extern void yyerror __P((const char *));
#define fill(a, b) _fill(a, b, 0)
#define push_include(_p) (switch_buffer((_p)))
#define pop_include() (switch_buffer(NULL))
/* realloc() to size + COMMANDARGINC to make room for command args */
#define COMMANDARGINC 64
#ifdef TRACELEXER
#define LEXTRACE(msg) fputs(msg, stderr)
#else
#define LEXTRACE(msg)
#endif
#define YY_NO_UNPUT 1
#define GOTDEFS 1
#define GOTCMND 2
#define STARTDEFS 3
#define INDEFS 4
#define INSTR 5
#line 1415 "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 113 "toke.l"
#line 1571 "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 >= 534 )
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] != 3367 );
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 114 "toke.l"
BEGIN STARTDEFS;
YY_BREAK
case 2:
YY_RULE_SETUP
#line 116 "toke.l"
{
BEGIN INDEFS;
LEXTRACE("DEFVAR ");
if (!fill(yytext, yyleng))
yyterminate();
return(DEFVAR);
}
YY_BREAK
case 3:
YY_RULE_SETUP
#line 125 "toke.l"
{
BEGIN STARTDEFS;
LEXTRACE(", ");
return(',');
} /* return ',' */
YY_BREAK
case 4:
YY_RULE_SETUP
#line 131 "toke.l"
{
LEXTRACE("= ");
return('=');
} /* return '=' */
YY_BREAK
case 5:
YY_RULE_SETUP
#line 136 "toke.l"
{
LEXTRACE("+= ");
return('+');
} /* return '+' */
YY_BREAK
case 6:
YY_RULE_SETUP
#line 141 "toke.l"
{
LEXTRACE("-= ");
return('-');
} /* return '-' */
YY_BREAK
case 7:
YY_RULE_SETUP
#line 146 "toke.l"
{
LEXTRACE("BEGINSTR ");
yylval.string = NULL;
BEGIN INSTR;
}
YY_BREAK
case 8:
YY_RULE_SETUP
#line 152 "toke.l"
{
LEXTRACE("WORD(2) ");
if (!fill(yytext, yyleng))
yyterminate();
return(WORD);
}
YY_BREAK
case 9:
YY_RULE_SETUP
#line 161 "toke.l"
{
/* Line continuation char followed by newline. */
++sudolineno;
LEXTRACE("\n");
}
YY_BREAK
case 10:
YY_RULE_SETUP
#line 167 "toke.l"
{
LEXTRACE("ENDSTR ");
BEGIN INDEFS;
return(WORD);
}
YY_BREAK
case 11:
YY_RULE_SETUP
#line 173 "toke.l"
{
LEXTRACE("STRBODY ");
/* Push back line continuation char if present */
if (yytext[yyleng - 1] == '\\')
yyless(yyleng - 1);
if (!append(yytext, yyleng))
yyterminate();
}
YY_BREAK
case 12:
YY_RULE_SETUP
#line 184 "toke.l"
{
/* quoted fnmatch glob char, pass verbatim */
LEXTRACE("QUOTEDCHAR ");
if (!fill_args(yytext, 2, sawspace))
yyterminate();
sawspace = FALSE;
}
YY_BREAK
case 13:
YY_RULE_SETUP
#line 192 "toke.l"
{
/* quoted sudoers special char, strip backslash */
LEXTRACE("QUOTEDCHAR ");
if (!fill_args(yytext + 1, 1, sawspace))
yyterminate();
sawspace = FALSE;
}
YY_BREAK
case 14:
YY_RULE_SETUP
#line 200 "toke.l"
{
BEGIN INITIAL;
yyless(0);
return(COMMAND);
} /* end of command line args */
YY_BREAK
case 15:
YY_RULE_SETUP
#line 206 "toke.l"
{
LEXTRACE("ARG ");
if (!fill_args(yytext, yyleng, sawspace))
yyterminate();
sawspace = FALSE;
} /* a command line arg */
YY_BREAK
case 16:
YY_RULE_SETUP
#line 214 "toke.l"
{
char *path;
if ((path = parse_include(yytext)) == NULL)
yyterminate();
LEXTRACE("INCLUDE\n");
/* Push current buffer and switch to include file */
if (!push_include(path))
yyterminate();
}
YY_BREAK
case 17:
YY_RULE_SETUP
#line 227 "toke.l"
{
int n;
for (n = 0; isblank((unsigned char)yytext[n]); n++)
continue;
n += 8;
BEGIN GOTDEFS;
switch (yytext[n++]) {
case ':':
yyless(n);
LEXTRACE("DEFAULTS_USER ");
return(DEFAULTS_USER);
case '>':
yyless(n);
LEXTRACE("DEFAULTS_RUNAS ");
return(DEFAULTS_RUNAS);
case '@':
yyless(n);
LEXTRACE("DEFAULTS_HOST ");
return(DEFAULTS_HOST);
case '!':
yyless(n);
LEXTRACE("DEFAULTS_CMND ");
return(DEFAULTS_CMND);
default:
LEXTRACE("DEFAULTS ");
return(DEFAULTS);
}
}
YY_BREAK
case 18:
YY_RULE_SETUP
#line 256 "toke.l"
{
int n;
for (n = 0; isblank((unsigned char)yytext[n]); n++)
continue;
switch (yytext[n]) {
case 'H':
LEXTRACE("HOSTALIAS ");
return(HOSTALIAS);
case 'C':
LEXTRACE("CMNDALIAS ");
return(CMNDALIAS);
case 'U':
LEXTRACE("USERALIAS ");
return(USERALIAS);
case 'R':
LEXTRACE("RUNASALIAS ");
return(RUNASALIAS);
}
}
YY_BREAK
case 19:
YY_RULE_SETUP
#line 276 "toke.l"
{
/* cmnd does not require passwd for this user */
LEXTRACE("NOPASSWD ");
return(NOPASSWD);
}
YY_BREAK
case 20:
YY_RULE_SETUP
#line 282 "toke.l"
{
/* cmnd requires passwd for this user */
LEXTRACE("PASSWD ");
return(PASSWD);
}
YY_BREAK
case 21:
YY_RULE_SETUP
#line 288 "toke.l"
{
LEXTRACE("NOEXEC ");
return(NOEXEC);
}
YY_BREAK
case 22:
YY_RULE_SETUP
#line 293 "toke.l"
{
LEXTRACE("EXEC ");
return(EXEC);
}
YY_BREAK
case 23:
YY_RULE_SETUP
#line 298 "toke.l"
{
LEXTRACE("SETENV ");
return(SETENV);
}
YY_BREAK
case 24:
YY_RULE_SETUP
#line 303 "toke.l"
{
LEXTRACE("NOSETENV ");
return(NOSETENV);
}
YY_BREAK
case 25:
YY_RULE_SETUP
#line 308 "toke.l"
{
/* netgroup */
if (!fill(yytext, yyleng))
yyterminate();
LEXTRACE("NETGROUP ");
return(NETGROUP);
}
YY_BREAK
case 26:
YY_RULE_SETUP
#line 316 "toke.l"
{
/* UN*X group */
if (!fill(yytext, yyleng))
yyterminate();
LEXTRACE("USERGROUP ");
return(USERGROUP);
}
YY_BREAK
case 27:
YY_RULE_SETUP
#line 324 "toke.l"
{
if (!fill(yytext, yyleng))
yyterminate();
LEXTRACE("NTWKADDR ");
return(NTWKADDR);
}
YY_BREAK
case 28:
YY_RULE_SETUP
#line 331 "toke.l"
{
if (!fill(yytext, yyleng))
yyterminate();
LEXTRACE("NTWKADDR ");
return(NTWKADDR);
}
YY_BREAK
case 29:
YY_RULE_SETUP
#line 338 "toke.l"
{
if (!ipv6_valid(yytext)) {
LEXTRACE("ERROR ");
return(ERROR);
}
if (!fill(yytext, yyleng))
yyterminate();
LEXTRACE("NTWKADDR ");
return(NTWKADDR);
}
YY_BREAK
case 30:
YY_RULE_SETUP
#line 349 "toke.l"
{
if (!ipv6_valid(yytext)) {
LEXTRACE("ERROR ");
return(ERROR);
}
if (!fill(yytext, yyleng))
yyterminate();
LEXTRACE("NTWKADDR ");
return(NTWKADDR);
}
YY_BREAK
case 31:
YY_RULE_SETUP
#line 360 "toke.l"
{
if (strcmp(yytext, "ALL") == 0) {
LEXTRACE("ALL ");
return(ALL);
}
#ifdef HAVE_SELINUX
/* XXX - restrict type/role to initial state */
if (strcmp(yytext, "TYPE") == 0) {
LEXTRACE("TYPE ");
return(TYPE);
}
if (strcmp(yytext, "ROLE") == 0) {
LEXTRACE("ROLE ");
return(ROLE);
}
#endif /* HAVE_SELINUX */
if (!fill(yytext, yyleng))
yyterminate();
LEXTRACE("ALIAS ");
return(ALIAS);
}
YY_BREAK
case 32:
YY_RULE_SETUP
#line 382 "toke.l"
{
/* no command args allowed for Defaults!/path */
if (!fill_cmnd(yytext, yyleng))
yyterminate();
LEXTRACE("COMMAND ");
return(COMMAND);
}
YY_BREAK
case 33:
YY_RULE_SETUP
#line 390 "toke.l"
{
BEGIN GOTCMND;
LEXTRACE("COMMAND ");
if (!fill_cmnd(yytext, yyleng))
yyterminate();
} /* sudo -e */
YY_BREAK
case 34:
YY_RULE_SETUP
#line 397 "toke.l"
{
/* directories can't have args... */
if (yytext[yyleng - 1] == '/') {
LEXTRACE("COMMAND ");
if (!fill_cmnd(yytext, yyleng))
yyterminate();
return(COMMAND);
} else {
BEGIN GOTCMND;
LEXTRACE("COMMAND ");
if (!fill_cmnd(yytext, yyleng))
yyterminate();
}
} /* a pathname */
YY_BREAK
case 35:
YY_RULE_SETUP
#line 412 "toke.l"
{
/* a word */
if (!fill(yytext, yyleng))
yyterminate();
LEXTRACE("WORD(4) ");
return(WORD);
}
YY_BREAK
case 36:
YY_RULE_SETUP
#line 420 "toke.l"
{
LEXTRACE("( ");
return ('(');
}
YY_BREAK
case 37:
YY_RULE_SETUP
#line 425 "toke.l"
{
LEXTRACE(") ");
return(')');
}
YY_BREAK
case 38:
YY_RULE_SETUP
#line 430 "toke.l"
{
LEXTRACE(", ");
return(',');
} /* return ',' */
YY_BREAK
case 39:
YY_RULE_SETUP
#line 435 "toke.l"
{
LEXTRACE("= ");
return('=');
} /* return '=' */
YY_BREAK
case 40:
YY_RULE_SETUP
#line 440 "toke.l"
{
LEXTRACE(": ");
return(':');
} /* return ':' */
YY_BREAK
case 41:
YY_RULE_SETUP
#line 445 "toke.l"
{
if (yyleng % 2 == 1)
return('!'); /* return '!' */
}
YY_BREAK
case 42:
YY_RULE_SETUP
#line 450 "toke.l"
{
BEGIN INITIAL;
++sudolineno;
LEXTRACE("\n");
return(COMMENT);
} /* return newline */
YY_BREAK
case 43:
YY_RULE_SETUP
#line 457 "toke.l"
{ /* throw away space/tabs */
sawspace = TRUE; /* but remember for fill_args */
}
YY_BREAK
case 44:
YY_RULE_SETUP
#line 461 "toke.l"
{
sawspace = TRUE; /* remember for fill_args */
++sudolineno;
LEXTRACE("\n\t");
} /* throw away EOL after \ */
YY_BREAK
case 45:
YY_RULE_SETUP
#line 467 "toke.l"
{
BEGIN INITIAL;
++sudolineno;
LEXTRACE("\n");
return(COMMENT);
} /* return comments */
YY_BREAK
case 46:
YY_RULE_SETUP
#line 474 "toke.l"
{
LEXTRACE("ERROR ");
return(ERROR);
} /* parse error */
YY_BREAK
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(GOTDEFS):
case YY_STATE_EOF(GOTCMND):
case YY_STATE_EOF(STARTDEFS):
case YY_STATE_EOF(INDEFS):
case YY_STATE_EOF(INSTR):
#line 479 "toke.l"
{
if (YY_START != INITIAL) {
BEGIN INITIAL;
LEXTRACE("ERROR ");
return(ERROR);
}
if (!pop_include())
yyterminate();
}
YY_BREAK
case 47:
YY_RULE_SETUP
#line 489 "toke.l"
ECHO;
YY_BREAK
#line 2180 "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 >= 534 )
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 >= 534 )
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 == 533);
return yy_is_jam ? 0 : yy_current_state;
}
#ifndef YY_NO_UNPUT
#ifdef YY_USE_PROTOS
static void yyunput( int c, register char *yy_bp )
#else
static void yyunput( c, yy_bp )
int c;
register char *yy_bp;
#endif
{
register char *yy_cp = yy_c_buf_p;
/* undo effects of setting up yytext */
*yy_cp = yy_hold_char;
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
{ /* need to shift things up to make room */
/* +2 for EOB chars. */
register int number_to_move = yy_n_chars + 2;
register char *dest = &yy_current_buffer->yy_ch_buf[
yy_current_buffer->yy_buf_size + 2];
register char *source =
&yy_current_buffer->yy_ch_buf[number_to_move];
while ( source > yy_current_buffer->yy_ch_buf )
*--dest = *--source;
yy_cp += (int) (dest - source);
yy_bp += (int) (dest - source);
yy_current_buffer->yy_n_chars =
yy_n_chars = yy_current_buffer->yy_buf_size;
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
YY_FATAL_ERROR( "flex scanner push-back overflow" );
}
*--yy_cp = (char) c;
yytext_ptr = yy_bp;
yy_hold_char = *yy_cp;
yy_c_buf_p = yy_cp;
}
#endif /* ifndef YY_NO_UNPUT */
#ifdef __cplusplus
static int yyinput()
#else
static int input()
#endif
{
int c;
*yy_c_buf_p = yy_hold_char;
if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
{
/* yy_c_buf_p now points to the character we want to return.
* If this occurs *before* the EOB characters, then it's a
* valid NUL; if not, then we've hit the end of the buffer.
*/
if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
/* This was really a NUL. */
*yy_c_buf_p = '\0';
else
{ /* need more input */
int offset = yy_c_buf_p - yytext_ptr;
++yy_c_buf_p;
switch ( yy_get_next_buffer() )
{
case EOB_ACT_LAST_MATCH:
/* This happens because yy_g_n_b()
* sees that we've accumulated a
* token and flags that we need to
* try matching the token before
* proceeding. But for input(),
* there's no matching to consider.
* So convert the EOB_ACT_LAST_MATCH
* to EOB_ACT_END_OF_FILE.
*/
/* Reset buffer status. */
yyrestart( yyin );
/* fall through */
case EOB_ACT_END_OF_FILE:
{
if ( yywrap() )
return EOF;
if ( ! yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
#ifdef __cplusplus
return yyinput();
#else
return input();
#endif
}
case EOB_ACT_CONTINUE_SCAN:
yy_c_buf_p = yytext_ptr + offset;
break;
}
}
}
c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
*yy_c_buf_p = '\0'; /* preserve yytext */
yy_hold_char = *++yy_c_buf_p;
yy_current_buffer->yy_at_bol = (c == '\n');
return c;
}
#ifdef YY_USE_PROTOS
void yyrestart( FILE *input_file )
#else
void yyrestart( input_file )
FILE *input_file;
#endif
{
if ( ! yy_current_buffer )
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
yy_init_buffer( yy_current_buffer, input_file );
yy_load_buffer_state();
}
#ifdef YY_USE_PROTOS
void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
#else
void yy_switch_to_buffer( new_buffer )
YY_BUFFER_STATE new_buffer;
#endif
{
if ( yy_current_buffer == new_buffer )
return;
if ( yy_current_buffer )
{
/* Flush out information for old buffer. */
*yy_c_buf_p = yy_hold_char;
yy_current_buffer->yy_buf_pos = yy_c_buf_p;
yy_current_buffer->yy_n_chars = yy_n_chars;
}
yy_current_buffer = new_buffer;
yy_load_buffer_state();
/* We don't actually know whether we did this switch during
* EOF (yywrap()) processing, but the only time this flag
* is looked at is after yywrap() is called, so it's safe
* to go ahead and always set it.
*/
yy_did_buffer_switch_on_eof = 1;
}
#ifdef YY_USE_PROTOS
void yy_load_buffer_state( void )
#else
void yy_load_buffer_state()
#endif
{
yy_n_chars = yy_current_buffer->yy_n_chars;
yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
yyin = yy_current_buffer->yy_input_file;
yy_hold_char = *yy_c_buf_p;
}
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
#else
YY_BUFFER_STATE yy_create_buffer( file, size )
FILE *file;
int size;
#endif
{
YY_BUFFER_STATE b;
b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_buf_size = size;
/* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters.
*/
b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_is_our_buffer = 1;
yy_init_buffer( b, file );
return b;
}
#ifdef YY_USE_PROTOS
void yy_delete_buffer( YY_BUFFER_STATE b )
#else
void yy_delete_buffer( b )
YY_BUFFER_STATE b;
#endif
{
if ( ! b )
return;
if ( b == yy_current_buffer )
yy_current_buffer = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer )
yy_flex_free( (void *) b->yy_ch_buf );
yy_flex_free( (void *) b );
}
#ifndef YY_ALWAYS_INTERACTIVE
#ifndef YY_NEVER_INTERACTIVE
#include <unistd.h>
#endif
#endif
#ifdef YY_USE_PROTOS
void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
#else
void yy_init_buffer( b, file )
YY_BUFFER_STATE b;
FILE *file;
#endif
{
int oerrno = errno;
yy_flush_buffer( b );
b->yy_input_file = file;
b->yy_fill_buffer = 1;
#if defined(YY_ALWAYS_INTERACTIVE) && YY_ALWAYS_INTERACTIVE
b->yy_is_interactive = 1;
#else
#if defined(YY_NEVER_INTERACTIVE) && YY_NEVER_INTERACTIVE
b->yy_is_interactive = 0;
#else
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
#endif
#endif
errno = oerrno;
}
#ifdef YY_USE_PROTOS
void yy_flush_buffer( YY_BUFFER_STATE b )
#else
void yy_flush_buffer( b )
YY_BUFFER_STATE b;
#endif
{
if ( ! b )
return;
b->yy_n_chars = 0;
/* We always need two end-of-buffer characters. The first causes
* a transition to the end-of-buffer state. The second causes
* a jam in that state.
*/
b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
b->yy_buf_pos = &b->yy_ch_buf[0];
b->yy_at_bol = 1;
b->yy_buffer_status = YY_BUFFER_NEW;
if ( b == yy_current_buffer )
yy_load_buffer_state();
}
#ifndef YY_NO_SCAN_BUFFER
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
#else
YY_BUFFER_STATE yy_scan_buffer( base, size )
char *base;
yy_size_t size;
#endif
{
YY_BUFFER_STATE b;
if ( size < 2 ||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR )
/* They forgot to leave room for the EOB's. */
return 0;
b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
b->yy_buf_pos = b->yy_ch_buf = base;
b->yy_is_our_buffer = 0;
b->yy_input_file = 0;
b->yy_n_chars = b->yy_buf_size;
b->yy_is_interactive = 0;
b->yy_at_bol = 1;
b->yy_fill_buffer = 0;
b->yy_buffer_status = YY_BUFFER_NEW;
yy_switch_to_buffer( b );
return b;
}
#endif
#ifndef YY_NO_SCAN_STRING
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
#else
YY_BUFFER_STATE yy_scan_string( yy_str )
yyconst char *yy_str;
#endif
{
int len;
for ( len = 0; yy_str[len]; ++len )
;
return yy_scan_bytes( yy_str, len );
}
#endif
#ifndef YY_NO_SCAN_BYTES
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
#else
YY_BUFFER_STATE yy_scan_bytes( bytes, len )
yyconst char *bytes;
int len;
#endif
{
YY_BUFFER_STATE b;
char *buf;
yy_size_t n;
int i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = len + 2;
buf = (char *) yy_flex_alloc( n );
if ( ! buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
for ( i = 0; i < len; ++i )
buf[i] = bytes[i];
buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
b = yy_scan_buffer( buf, n );
if ( ! b )
YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
/* It's okay to grow etc. this buffer, and we should throw it
* away when we're done.
*/
b->yy_is_our_buffer = 1;
return b;
}
#endif
#ifndef YY_NO_PUSH_STATE
#ifdef YY_USE_PROTOS
static void yy_push_state( int new_state )
#else
static void yy_push_state( new_state )
int new_state;
#endif
{
if ( yy_start_stack_ptr >= yy_start_stack_depth )
{
yy_size_t new_size;
yy_start_stack_depth += YY_START_STACK_INCR;
new_size = yy_start_stack_depth * sizeof( int );
if ( ! yy_start_stack )
yy_start_stack = (int *) yy_flex_alloc( new_size );
else
yy_start_stack = (int *) yy_flex_realloc(
(void *) yy_start_stack, new_size );
if ( ! yy_start_stack )
YY_FATAL_ERROR(
"out of memory expanding start-condition stack" );
}
yy_start_stack[yy_start_stack_ptr++] = YY_START;
BEGIN(new_state);
}
#endif
#ifndef YY_NO_POP_STATE
static void yy_pop_state()
{
if ( --yy_start_stack_ptr < 0 )
YY_FATAL_ERROR( "start-condition stack underflow" );
BEGIN(yy_start_stack[yy_start_stack_ptr]);
}
#endif
#ifndef YY_NO_TOP_STATE
static int yy_top_state()
{
return yy_start_stack[yy_start_stack_ptr - 1];
}
#endif
#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif
#ifdef YY_USE_PROTOS
static void yy_fatal_error( yyconst char msg[] )
#else
static void yy_fatal_error( msg )
char msg[];
#endif
{
(void) fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
}
/* Redefine yyless() so it works in section 3 code. */
#undef yyless
#define yyless(n) \
do \
{ \
/* Undo effects of setting up yytext. */ \
yytext[yyleng] = yy_hold_char; \
yy_c_buf_p = yytext + n; \
yy_hold_char = *yy_c_buf_p; \
*yy_c_buf_p = '\0'; \
yyleng = n; \
} \
while ( 0 )
/* Internal utility routines. */
#ifndef yytext_ptr
#ifdef YY_USE_PROTOS
static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
#else
static void yy_flex_strncpy( s1, s2, n )
char *s1;
yyconst char *s2;
int n;
#endif
{
register int i;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
}
#endif
#ifdef YY_NEED_STRLEN
#ifdef YY_USE_PROTOS
static int yy_flex_strlen( yyconst char *s )
#else
static int yy_flex_strlen( s )
yyconst char *s;
#endif
{
register int n;
for ( n = 0; s[n]; ++n )
;
return n;
}
#endif
#ifdef YY_USE_PROTOS
static void *yy_flex_alloc( yy_size_t size )
#else
static void *yy_flex_alloc( size )
yy_size_t size;
#endif
{
return (void *) malloc( size );
}
#ifdef YY_USE_PROTOS
static void *yy_flex_realloc( void *ptr, yy_size_t size )
#else
static void *yy_flex_realloc( ptr, size )
void *ptr;
yy_size_t size;
#endif
{
/* The cast to (char *) in the following accommodates both
* implementations that use char* generic pointers, and those
* that use void* generic pointers. It works with the latter
* because both ANSI C and C++ allow castless assignment from
* any pointer type to void*, and deal with argument conversions
* as though doing an assignment.
*/
return (void *) realloc( (char *) ptr, size );
}
#ifdef YY_USE_PROTOS
static void yy_flex_free( void *ptr )
#else
static void yy_flex_free( ptr )
void *ptr;
#endif
{
free( ptr );
}
#if defined(YY_MAIN) && YY_MAIN
int main()
{
yylex();
return 0;
}
#endif
#line 489 "toke.l"
static int
_fill(src, len, olen)
char *src;
int len, olen;
{
int i, j;
char *dst;
dst = olen ? realloc(yylval.string, olen + len + 1) : malloc(len + 1);
if (dst == NULL) {
yyerror("unable to allocate memory");
return(FALSE);
}
yylval.string = dst;
/* Copy the string and collapse any escaped characters. */
dst += olen;
for (i = 0, j = 0; i < len; i++, j++) {
if (src[i] == '\\' && i != len - 1)
dst[j] = src[++i];
else
dst[j] = src[i];
}
dst[j] = '\0';
return(TRUE);
}
static int
append(src, len)
char *src;
int len;
{
int olen = 0;
if (yylval.string != NULL)
olen = strlen(yylval.string);
return(_fill(src, len, olen));
}
static int
fill_cmnd(s, len)
char *s;
int len;
{
arg_len = arg_size = 0;
yylval.command.cmnd = (char *) malloc(++len);
if (yylval.command.cmnd == NULL) {
yyerror("unable to allocate memory");
return(FALSE);
}
/* copy the string and NULL-terminate it (escapes handled by fnmatch) */
(void) strlcpy(yylval.command.cmnd, s, len);
yylval.command.args = NULL;
return(TRUE);
}
static int
fill_args(s, len, addspace)
char *s;
int len;
int addspace;
{
int new_len;
char *p;
if (yylval.command.args == NULL) {
addspace = 0;
new_len = len;
} else
new_len = arg_len + len + addspace;
if (new_len >= arg_size) {
/* Allocate more space than we need for subsequent args */
while (new_len >= (arg_size += COMMANDARGINC))
;
p = yylval.command.args ?
(char *) realloc(yylval.command.args, arg_size) :
(char *) malloc(arg_size);
if (p == NULL) {
efree(yylval.command.args);
yyerror("unable to allocate memory");
return(FALSE);
} else
yylval.command.args = p;
}
/* Efficiently append the arg (with a leading space if needed). */
p = yylval.command.args + arg_len;
if (addspace)
*p++ = ' ';
if (strlcpy(p, s, arg_size - (p - yylval.command.args)) != len) {
yyerror("fill_args: buffer overflow"); /* paranoia */
return(FALSE);
}
arg_len = new_len;
return(TRUE);
}
struct sudoers_state {
YY_BUFFER_STATE bs;
char *path;
int lineno;
};
#define MAX_SUDOERS_DEPTH 128
#define SUDOERS_STACK_INCREMENT 16
static int
switch_buffer(path)
char *path;
{
static size_t stacksize, depth;
static struct sudoers_state *state;
static int keepopen;
FILE *fp;
if (path != NULL) {
/* push current state */
if (depth >= stacksize) {
if (depth > MAX_SUDOERS_DEPTH) {
yyerror("too many levels of includes");
return(FALSE);
}
stacksize += SUDOERS_STACK_INCREMENT;
state = (struct sudoers_state *) realloc(state,
sizeof(state) * stacksize);
if (state == NULL) {
yyerror("unable to allocate memory");
return(FALSE);
}
}
if ((fp = open_sudoers(path, &keepopen)) == NULL) {
yyerror(path);
return(FALSE);
}
state[depth].bs = YY_CURRENT_BUFFER;
state[depth].path = sudoers;
state[depth].lineno = sudolineno;
depth++;
sudolineno = 1;
sudoers = path;
yy_switch_to_buffer(yy_create_buffer(fp, YY_BUF_SIZE));
} else {
/* pop */
if (depth == 0)
return(FALSE);
depth--;
if (!keepopen)
fclose(YY_CURRENT_BUFFER->yy_input_file);
yy_delete_buffer(YY_CURRENT_BUFFER);
yy_switch_to_buffer(state[depth].bs);
efree(sudoers);
sudoers = state[depth].path;
sudolineno = state[depth].lineno;
keepopen = FALSE;
}
return(TRUE);
}
static char *
parse_include(base)
char *base;
{
char *cp, *ep, *path;
int len;
/* Pull out path from #include line. */
cp = base + sizeof("#include");
while (isblank((unsigned char) *cp))
cp++;
ep = cp;
while (*ep != '\0' && !isspace((unsigned char) *ep))
ep++;
/* Make a copy of path and return it. */
len = (int)(ep - cp);
if ((path = malloc(len + 1)) == NULL)
yyerror("unable to allocate memory");
memcpy(path, cp, len);
path[len] = '\0';
/* Push any excess characters (e.g. comment, newline) back to the lexer */
if (*ep != '\0')
yyless((int)(ep - base));
return(path);
}
/*
* Check to make sure an IPv6 address does not contain multiple instances
* of the string "::". Assumes strlen(s) >= 1.
* Returns TRUE if address is valid else FALSE.
*/
static int
ipv6_valid(s)
const char *s;
{
int nmatch = 0;
for (; *s != '\0'; s++) {
if (s[0] == ':' && s[1] == ':') {
if (++nmatch > 1)
break;
}
if (s[0] == '/')
nmatch = 0; /* reset if we hit netmask */
}
return (nmatch <= 1);
}