3328 lines
107 KiB
C
3328 lines
107 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 48
|
|
#define YY_END_OF_BUFFER 49
|
|
static yyconst short int yy_accept[538] =
|
|
{ 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 49, 36, 44, 43, 42, 47, 36, 37,
|
|
38, 36, 39, 36, 36, 36, 36, 41, 40, 47,
|
|
32, 32, 32, 32, 32, 32, 47, 36, 36, 44,
|
|
47, 32, 32, 32, 32, 32, 1, 47, 36, 36,
|
|
16, 15, 16, 15, 15, 47, 47, 47, 2, 8,
|
|
7, 8, 3, 8, 4, 47, 12, 12, 12, 10,
|
|
11, 36, 0, 44, 42, 0, 46, 0, 36, 27,
|
|
0, 26, 0, 35, 35, 0, 36, 36, 0, 36,
|
|
36, 36, 36, 0, 30, 32, 32, 32, 32, 32,
|
|
|
|
32, 36, 45, 36, 44, 0, 0, 0, 0, 0,
|
|
0, 36, 36, 36, 36, 36, 1, 0, 33, 33,
|
|
0, 36, 16, 16, 14, 13, 14, 0, 0, 2,
|
|
8, 0, 5, 6, 8, 8, 12, 0, 12, 12,
|
|
0, 9, 0, 0, 0, 36, 36, 36, 36, 36,
|
|
0, 0, 30, 30, 32, 32, 32, 32, 32, 32,
|
|
32, 36, 0, 0, 0, 0, 0, 0, 36, 36,
|
|
36, 36, 36, 0, 36, 9, 0, 36, 36, 36,
|
|
36, 36, 36, 0, 31, 31, 31, 0, 0, 30,
|
|
30, 30, 30, 30, 30, 30, 32, 32, 32, 32,
|
|
|
|
32, 32, 32, 36, 0, 0, 0, 0, 0, 0,
|
|
36, 36, 36, 36, 36, 36, 36, 0, 0, 31,
|
|
31, 31, 0, 30, 30, 0, 30, 30, 30, 30,
|
|
30, 30, 30, 30, 30, 30, 30, 0, 23, 32,
|
|
32, 32, 32, 32, 36, 0, 0, 0, 0, 36,
|
|
36, 36, 36, 36, 36, 36, 36, 0, 31, 0,
|
|
30, 30, 30, 0, 0, 0, 30, 30, 30, 30,
|
|
30, 30, 30, 30, 30, 30, 30, 30, 30, 32,
|
|
32, 32, 32, 32, 36, 0, 0, 0, 36, 36,
|
|
36, 28, 28, 28, 0, 0, 30, 30, 30, 30,
|
|
|
|
30, 30, 30, 0, 0, 0, 0, 0, 30, 30,
|
|
30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
|
|
30, 30, 0, 22, 32, 32, 0, 21, 0, 24,
|
|
36, 0, 0, 0, 36, 36, 36, 36, 28, 28,
|
|
28, 28, 0, 30, 0, 30, 30, 30, 30, 30,
|
|
30, 30, 30, 30, 30, 30, 0, 0, 0, 30,
|
|
30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
|
|
30, 30, 32, 32, 34, 0, 0, 0, 36, 18,
|
|
33, 36, 29, 29, 29, 30, 0, 0, 0, 30,
|
|
30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
|
|
|
|
30, 30, 0, 0, 0, 0, 0, 30, 30, 30,
|
|
30, 30, 30, 30, 30, 0, 20, 0, 25, 0,
|
|
18, 0, 36, 0, 36, 36, 36, 29, 29, 29,
|
|
29, 29, 0, 0, 0, 0, 0, 30, 30, 30,
|
|
30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
|
|
30, 30, 30, 30, 30, 30, 30, 0, 0, 19,
|
|
18, 0, 18, 0, 36, 36, 36, 29, 29, 0,
|
|
0, 0, 30, 30, 30, 30, 30, 30, 30, 30,
|
|
30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
|
|
19, 0, 17, 36, 36, 36, 36, 36, 0, 0,
|
|
|
|
0, 0, 0, 30, 30, 30, 30, 30, 30, 30,
|
|
30, 36, 36, 36, 30, 30, 30, 30, 30, 30,
|
|
36, 36, 36, 36, 36, 30, 30, 30, 30, 30,
|
|
28, 28, 28, 28, 28, 28, 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[600] =
|
|
{ 0,
|
|
0, 61, 62, 63, 69, 84, 128, 189, 250, 294,
|
|
80, 101, 2317, 2271, 2304, 3379, 2291, 337, 2247, 3379,
|
|
3379, 2246, 3379, 107, 347, 119, 137, 2266, 3379, 3379,
|
|
399, 2219, 446, 2224, 2231, 2226, 497, 145, 35, 167,
|
|
521, 2193, 2180, 2170, 2165, 2166, 2223, 193, 256, 55,
|
|
0, 3379, 2220, 0, 3379, 264, 573, 110, 0, 2164,
|
|
3379, 73, 3379, 76, 3379, 117, 2154, 105, 106, 3379,
|
|
142, 2151, 306, 2185, 2173, 2164, 3379, 201, 209, 2085,
|
|
506, 2084, 543, 276, 2048, 554, 306, 581, 2068, 2067,
|
|
325, 364, 317, 2046, 55, 618, 0, 2035, 240, 2027,
|
|
|
|
2025, 125, 3379, 98, 523, 2005, 2008, 1998, 1986, 1978,
|
|
146, 115, 219, 29, 212, 149, 2024, 463, 579, 1958,
|
|
649, 154, 0, 1998, 256, 3379, 3379, 598, 284, 0,
|
|
1956, 674, 3379, 3379, 1926, 488, 1925, 1964, 271, 307,
|
|
288, 1966, 1964, 1939, 676, 688, 720, 752, 784, 1925,
|
|
1869, 821, 268, 859, 896, 1860, 1818, 1833, 1827, 1804,
|
|
1810, 236, 1784, 1773, 1764, 1766, 1771, 300, 157, 1759,
|
|
259, 79, 329, 691, 344, 1803, 1791, 701, 348, 935,
|
|
967, 711, 366, 1759, 1747, 731, 455, 1706, 1689, 487,
|
|
741, 999, 760, 768, 1037, 803, 1688, 401, 1679, 1671,
|
|
|
|
1654, 1650, 1640, 356, 1624, 1625, 1595, 1608, 1595, 369,
|
|
442, 503, 233, 462, 1076, 1108, 1140, 1601, 1600, 838,
|
|
1599, 1582, 1581, 1580, 502, 876, 505, 913, 557, 1172,
|
|
0, 945, 1183, 954, 774, 1221, 977, 526, 3379, 1539,
|
|
1529, 1522, 1522, 1510, 532, 1476, 1458, 1444, 581, 363,
|
|
21, 577, 987, 490, 1260, 1292, 1019, 1479, 1432, 1431,
|
|
1430, 1322, 630, 1056, 1086, 1096, 647, 670, 794, 1116,
|
|
926, 1361, 0, 1126, 1372, 1148, 884, 1410, 1158, 583,
|
|
1409, 1402, 640, 657, 618, 1407, 1344, 486, 632, 599,
|
|
638, 1448, 1479, 1510, 1374, 1373, 1325, 1200, 1542, 1238,
|
|
|
|
1208, 1579, 1270, 1278, 1334, 1302, 1312, 1341, 674, 711,
|
|
987, 1010, 1389, 1067, 1618, 0, 1429, 1629, 1456, 1246,
|
|
1667, 1466, 688, 3379, 1273, 1261, 689, 3379, 743, 3379,
|
|
766, 1247, 1187, 605, 1017, 514, 785, 1489, 501, 1705,
|
|
1736, 1498, 1223, 1222, 1519, 954, 1528, 968, 1768, 0,
|
|
603, 1779, 1559, 1347, 1816, 1598, 1648, 1686, 1715, 1096,
|
|
1158, 1677, 1725, 1725, 1746, 1855, 0, 1748, 1866, 1757,
|
|
1397, 1798, 861, 862, 1165, 1155, 1148, 693, 820, 1895,
|
|
1139, 1927, 1959, 1991, 2023, 1131, 1835, 1886, 1909, 1127,
|
|
1261, 1293, 1935, 1467, 2055, 0, 806, 2066, 1943, 1567,
|
|
|
|
2103, 1969, 1977, 1069, 2001, 2011, 2033, 1312, 1332, 1877,
|
|
833, 906, 2142, 0, 900, 1039, 3379, 1099, 3379, 1033,
|
|
2031, 1909, 1391, 981, 934, 2083, 1138, 2152, 2184, 2216,
|
|
2248, 2046, 2120, 953, 2162, 2172, 2194, 918, 915, 1543,
|
|
1599, 2200, 1649, 2280, 0, 915, 2291, 2224, 1917, 2328,
|
|
2234, 2257, 2266, 2309, 1789, 869, 1028, 806, 807, 754,
|
|
751, 2359, 699, 2384, 2397, 2429, 2461, 2381, 2317, 2411,
|
|
2439, 2449, 690, 628, 1836, 1896, 2469, 1960, 2493, 0,
|
|
1022, 2504, 2477, 2091, 2523, 608, 2542, 2551, 2420, 591,
|
|
3379, 570, 3379, 2559, 1476, 2591, 2623, 2570, 2576, 556,
|
|
|
|
2602, 2612, 2633, 468, 381, 1992, 359, 303, 2641, 0,
|
|
1126, 2655, 2687, 2719, 2663, 2671, 2695, 289, 0, 182,
|
|
2703, 1478, 2751, 2783, 2733, 3379, 2739, 2763, 2128, 3379,
|
|
2771, 2791, 2801, 126, 2821, 2813, 3379, 2866, 2879, 2892,
|
|
2905, 2918, 2931, 2944, 2957, 2970, 2975, 2988, 3001, 3003,
|
|
3016, 3029, 3042, 3055, 3068, 3081, 3086, 3092, 3105, 3118,
|
|
3123, 3129, 3134, 3139, 3144, 3150, 3155, 3160, 3165, 3171,
|
|
3178, 3183, 3188, 3193, 3199, 3206, 3211, 3216, 3222, 3229,
|
|
3234, 3241, 3247, 3254, 3259, 3266, 3272, 3279, 3292, 3305,
|
|
3310, 3317, 3323, 3336, 3341, 3348, 3353, 3360, 3365
|
|
|
|
} ;
|
|
|
|
static yyconst short int yy_def[600] =
|
|
{ 0,
|
|
537, 1, 1, 1, 538, 538, 539, 539, 540, 540,
|
|
541, 541, 537, 542, 537, 537, 537, 543, 544, 537,
|
|
537, 545, 537, 546, 542, 25, 25, 547, 537, 537,
|
|
537, 31, 31, 33, 33, 33, 542, 25, 542, 537,
|
|
543, 31, 31, 33, 33, 33, 537, 537, 548, 542,
|
|
549, 537, 549, 549, 537, 537, 543, 537, 550, 551,
|
|
537, 551, 537, 551, 537, 552, 553, 553, 553, 537,
|
|
537, 542, 542, 537, 537, 554, 537, 555, 537, 544,
|
|
544, 545, 545, 546, 556, 542, 542, 25, 547, 88,
|
|
88, 88, 88, 557, 558, 31, 33, 33, 33, 33,
|
|
|
|
33, 542, 537, 542, 537, 537, 537, 537, 537, 537,
|
|
554, 542, 88, 542, 542, 542, 537, 537, 548, 559,
|
|
542, 542, 549, 549, 537, 537, 537, 555, 537, 550,
|
|
551, 551, 537, 537, 551, 551, 553, 537, 553, 553,
|
|
537, 537, 554, 560, 537, 542, 542, 542, 88, 149,
|
|
561, 537, 562, 537, 31, 33, 33, 33, 33, 33,
|
|
33, 542, 537, 537, 537, 537, 537, 554, 542, 149,
|
|
542, 542, 542, 537, 542, 537, 560, 542, 542, 542,
|
|
542, 542, 542, 563, 564, 564, 186, 565, 564, 566,
|
|
154, 537, 192, 192, 537, 192, 33, 33, 33, 33,
|
|
|
|
33, 33, 33, 542, 537, 537, 537, 537, 537, 554,
|
|
542, 542, 542, 542, 542, 542, 542, 537, 567, 567,
|
|
220, 567, 568, 569, 570, 537, 571, 195, 571, 571,
|
|
230, 571, 537, 233, 233, 537, 233, 537, 537, 33,
|
|
33, 33, 33, 33, 542, 537, 537, 537, 554, 542,
|
|
542, 542, 542, 542, 542, 542, 542, 572, 572, 573,
|
|
574, 537, 537, 537, 537, 537, 575, 575, 576, 236,
|
|
576, 576, 272, 576, 537, 275, 275, 537, 275, 33,
|
|
33, 33, 33, 33, 542, 537, 537, 554, 542, 542,
|
|
542, 542, 542, 542, 537, 577, 578, 262, 537, 299,
|
|
|
|
299, 537, 299, 537, 537, 537, 537, 537, 537, 579,
|
|
579, 580, 278, 580, 580, 315, 580, 537, 318, 318,
|
|
537, 318, 537, 537, 33, 33, 537, 537, 537, 537,
|
|
542, 537, 537, 554, 542, 542, 542, 542, 542, 542,
|
|
542, 542, 537, 581, 537, 582, 302, 582, 582, 349,
|
|
349, 537, 352, 352, 537, 352, 537, 537, 537, 537,
|
|
583, 583, 584, 321, 584, 584, 366, 584, 537, 369,
|
|
369, 369, 33, 33, 542, 537, 537, 554, 542, 542,
|
|
542, 542, 542, 542, 542, 537, 537, 537, 537, 585,
|
|
585, 586, 355, 586, 586, 395, 395, 537, 398, 398,
|
|
|
|
537, 398, 537, 537, 537, 537, 537, 537, 587, 587,
|
|
588, 588, 588, 413, 413, 537, 537, 537, 537, 537,
|
|
537, 554, 542, 589, 590, 542, 542, 542, 542, 542,
|
|
542, 542, 537, 537, 537, 537, 537, 537, 591, 591,
|
|
592, 401, 592, 592, 444, 444, 537, 447, 447, 537,
|
|
447, 537, 537, 537, 537, 593, 593, 537, 594, 542,
|
|
589, 589, 590, 590, 542, 542, 542, 542, 542, 537,
|
|
537, 537, 537, 595, 595, 596, 450, 596, 596, 479,
|
|
479, 537, 482, 482, 482, 537, 537, 537, 537, 537,
|
|
537, 594, 537, 542, 542, 542, 542, 542, 537, 537,
|
|
|
|
537, 537, 537, 537, 597, 597, 598, 598, 598, 509,
|
|
509, 542, 542, 542, 537, 537, 537, 537, 599, 599,
|
|
542, 542, 542, 542, 542, 537, 537, 537, 537, 537,
|
|
542, 542, 542, 542, 542, 542, 0, 537, 537, 537,
|
|
537, 537, 537, 537, 537, 537, 537, 537, 537, 537,
|
|
537, 537, 537, 537, 537, 537, 537, 537, 537, 537,
|
|
537, 537, 537, 537, 537, 537, 537, 537, 537, 537,
|
|
537, 537, 537, 537, 537, 537, 537, 537, 537, 537,
|
|
537, 537, 537, 537, 537, 537, 537, 537, 537, 537,
|
|
537, 537, 537, 537, 537, 537, 537, 537, 537
|
|
|
|
} ;
|
|
|
|
static yyconst short int yy_nxt[3442] =
|
|
{ 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, 152,
|
|
15, 52, 53, 73, 54, 290, 49, 49, 154, 73,
|
|
55, 68, 16, 69, 70, 15, 52, 53, 171, 54,
|
|
42, 43, 55, 54, 44, 55, 104, 133, 45, 73,
|
|
|
|
134, 46, 68, 16, 69, 70, 139, 55, 54, 140,
|
|
85, 129, 103, 56, 85, 85, 122, 132, 136, 103,
|
|
132, 50, 50, 73, 71, 213, 129, 103, 56, 15,
|
|
16, 17, 85, 57, 91, 91, 91, 91, 91, 91,
|
|
91, 91, 73, 141, 142, 71, 137, 162, 77, 138,
|
|
138, 86, 92, 92, 92, 92, 92, 93, 72, 73,
|
|
90, 90, 90, 90, 90, 90, 90, 90, 105, 73,
|
|
73, 169, 58, 59, 59, 59, 59, 59, 59, 59,
|
|
59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
|
|
15, 16, 17, 73, 57, 345, 106, 107, 73, 173,
|
|
|
|
108, 73, 168, 175, 109, 118, 211, 110, 79, 79,
|
|
79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
|
|
79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
|
|
79, 79, 72, 58, 59, 59, 59, 59, 59, 59,
|
|
59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
|
|
59, 15, 16, 17, 61, 57, 73, 129, 103, 120,
|
|
62, 63, 64, 120, 120, 125, 103, 126, 172, 127,
|
|
170, 157, 139, 126, 65, 127, 158, 73, 159, 85,
|
|
73, 120, 152, 85, 85, 129, 103, 127, 127, 141,
|
|
142, 191, 211, 204, 66, 15, 16, 17, 61, 57,
|
|
|
|
121, 85, 77, 73, 62, 63, 64, 72, 127, 72,
|
|
140, 72, 477, 72, 72, 138, 537, 72, 65, 211,
|
|
86, 146, 147, 148, 146, 146, 146, 146, 146, 72,
|
|
72, 72, 150, 150, 150, 150, 150, 150, 66, 77,
|
|
150, 150, 150, 150, 150, 150, 150, 150, 210, 78,
|
|
73, 138, 79, 79, 79, 79, 79, 79, 79, 79,
|
|
87, 178, 88, 88, 88, 88, 88, 88, 88, 88,
|
|
89, 77, 345, 73, 90, 90, 90, 90, 90, 150,
|
|
150, 150, 150, 150, 150, 150, 150, 211, 73, 89,
|
|
289, 73, 73, 90, 90, 90, 90, 90, 90, 72,
|
|
|
|
73, 214, 238, 72, 477, 72, 245, 73, 72, 72,
|
|
73, 72, 72, 72, 96, 96, 96, 96, 96, 96,
|
|
96, 96, 89, 249, 239, 72, 96, 96, 96, 96,
|
|
96, 97, 97, 97, 97, 97, 97, 97, 97, 97,
|
|
97, 97, 97, 73, 97, 90, 90, 90, 90, 90,
|
|
90, 72, 72, 72, 72, 72, 72, 72, 72, 72,
|
|
72, 97, 97, 97, 97, 97, 97, 97, 97, 537,
|
|
222, 222, 222, 97, 97, 97, 97, 97, 79, 79,
|
|
79, 79, 79, 79, 79, 79, 73, 250, 77, 129,
|
|
103, 442, 72, 72, 72, 72, 72, 72, 102, 103,
|
|
|
|
72, 152, 72, 253, 72, 72, 73, 80, 72, 80,
|
|
191, 80, 252, 80, 80, 338, 152, 80, 226, 152,
|
|
72, 72, 72, 77, 105, 191, 89, 238, 228, 80,
|
|
80, 80, 132, 78, 73, 334, 79, 79, 79, 79,
|
|
79, 79, 79, 79, 82, 73, 82, 73, 82, 239,
|
|
82, 82, 106, 107, 82, 84, 108, 72, 73, 84,
|
|
109, 72, 72, 110, 251, 84, 82, 82, 82, 499,
|
|
537, 152, 493, 380, 111, 77, 73, 84, 84, 72,
|
|
228, 285, 120, 77, 323, 128, 120, 120, 537, 537,
|
|
537, 537, 537, 537, 537, 537, 149, 149, 149, 149,
|
|
|
|
149, 149, 149, 149, 120, 152, 324, 77, 149, 149,
|
|
149, 149, 149, 537, 537, 537, 537, 537, 537, 537,
|
|
537, 73, 152, 121, 390, 390, 291, 149, 149, 149,
|
|
149, 149, 149, 155, 155, 155, 155, 155, 155, 155,
|
|
155, 327, 288, 73, 152, 155, 155, 155, 155, 155,
|
|
119, 442, 72, 191, 119, 378, 72, 72, 329, 336,
|
|
119, 152, 73, 328, 149, 149, 149, 149, 149, 149,
|
|
228, 331, 119, 119, 72, 131, 73, 85, 131, 131,
|
|
330, 85, 73, 226, 152, 131, 335, 85, 152, 323,
|
|
327, 337, 120, 228, 422, 77, 120, 228, 131, 85,
|
|
|
|
85, 178, 120, 179, 179, 179, 179, 179, 179, 179,
|
|
179, 324, 328, 393, 120, 120, 215, 216, 217, 215,
|
|
215, 215, 215, 215, 178, 152, 179, 179, 179, 179,
|
|
179, 179, 73, 178, 270, 180, 180, 180, 180, 180,
|
|
180, 180, 180, 464, 329, 73, 220, 220, 221, 222,
|
|
222, 222, 222, 222, 188, 73, 196, 196, 196, 196,
|
|
196, 196, 196, 196, 73, 178, 330, 181, 181, 181,
|
|
181, 181, 182, 179, 179, 230, 230, 230, 230, 230,
|
|
230, 230, 230, 231, 231, 231, 231, 231, 232, 273,
|
|
273, 273, 273, 273, 274, 462, 73, 72, 73, 183,
|
|
|
|
183, 183, 183, 183, 183, 183, 183, 226, 152, 493,
|
|
73, 183, 183, 183, 183, 183, 537, 270, 229, 229,
|
|
229, 229, 229, 229, 229, 229, 375, 439, 439, 73,
|
|
183, 183, 183, 183, 183, 183, 185, 186, 187, 187,
|
|
187, 187, 187, 187, 188, 381, 226, 152, 189, 189,
|
|
189, 189, 189, 259, 259, 259, 259, 259, 259, 259,
|
|
259, 188, 416, 418, 73, 491, 423, 189, 189, 189,
|
|
189, 189, 189, 152, 192, 193, 194, 192, 192, 192,
|
|
192, 192, 195, 152, 417, 419, 196, 196, 196, 196,
|
|
196, 264, 265, 266, 264, 264, 264, 264, 264, 316,
|
|
|
|
316, 316, 316, 316, 317, 196, 196, 196, 196, 196,
|
|
196, 197, 197, 197, 197, 197, 197, 197, 197, 537,
|
|
152, 456, 456, 197, 197, 197, 197, 197, 237, 237,
|
|
237, 237, 237, 237, 237, 237, 474, 474, 393, 537,
|
|
152, 347, 183, 183, 183, 183, 183, 183, 178, 270,
|
|
179, 179, 179, 179, 179, 179, 179, 179, 226, 152,
|
|
268, 268, 268, 268, 268, 268, 433, 345, 228, 272,
|
|
272, 272, 272, 272, 272, 272, 272, 347, 464, 73,
|
|
178, 537, 179, 179, 179, 179, 179, 179, 179, 179,
|
|
537, 347, 271, 271, 271, 271, 271, 271, 271, 271,
|
|
|
|
226, 152, 292, 293, 294, 292, 292, 292, 292, 292,
|
|
270, 73, 226, 152, 227, 227, 227, 227, 227, 227,
|
|
227, 227, 228, 226, 152, 462, 229, 229, 229, 229,
|
|
229, 73, 253, 313, 254, 254, 254, 254, 254, 254,
|
|
416, 226, 152, 505, 505, 229, 229, 229, 229, 229,
|
|
229, 152, 233, 234, 235, 233, 233, 233, 233, 233,
|
|
236, 73, 417, 73, 237, 237, 237, 237, 237, 304,
|
|
379, 305, 305, 305, 305, 305, 305, 305, 305, 458,
|
|
537, 152, 403, 237, 237, 237, 237, 237, 237, 253,
|
|
313, 254, 254, 254, 254, 254, 254, 254, 254, 304,
|
|
|
|
418, 306, 306, 306, 306, 306, 306, 306, 306, 304,
|
|
152, 307, 307, 307, 307, 307, 308, 305, 305, 270,
|
|
73, 253, 419, 255, 255, 255, 255, 255, 255, 255,
|
|
255, 279, 279, 279, 279, 279, 279, 279, 279, 226,
|
|
152, 311, 311, 311, 311, 311, 311, 519, 519, 270,
|
|
347, 426, 73, 253, 298, 256, 256, 256, 256, 256,
|
|
257, 254, 254, 315, 315, 315, 315, 315, 315, 315,
|
|
315, 537, 152, 314, 314, 314, 314, 314, 314, 314,
|
|
314, 313, 73, 73, 73, 226, 152, 268, 268, 268,
|
|
268, 268, 268, 268, 268, 228, 226, 152, 269, 269,
|
|
|
|
269, 269, 269, 269, 269, 269, 270, 421, 420, 73,
|
|
271, 271, 271, 271, 271, 303, 303, 303, 303, 303,
|
|
303, 303, 303, 350, 350, 350, 350, 350, 351, 271,
|
|
271, 271, 271, 271, 271, 152, 275, 276, 277, 275,
|
|
275, 275, 275, 275, 278, 298, 224, 377, 279, 279,
|
|
279, 279, 279, 349, 349, 349, 349, 349, 349, 349,
|
|
349, 367, 367, 367, 367, 367, 368, 279, 279, 279,
|
|
279, 279, 279, 253, 345, 254, 254, 254, 254, 254,
|
|
254, 254, 254, 537, 347, 348, 348, 348, 348, 348,
|
|
348, 348, 348, 357, 358, 359, 357, 357, 357, 357,
|
|
|
|
357, 376, 374, 373, 73, 253, 345, 254, 254, 254,
|
|
254, 254, 254, 254, 254, 304, 393, 305, 305, 305,
|
|
305, 305, 305, 305, 305, 304, 152, 305, 305, 305,
|
|
305, 305, 305, 305, 305, 313, 73, 299, 300, 301,
|
|
299, 299, 299, 299, 299, 302, 152, 304, 298, 303,
|
|
303, 303, 303, 303, 304, 364, 305, 305, 305, 305,
|
|
305, 305, 396, 396, 396, 396, 396, 397, 303, 303,
|
|
303, 303, 303, 303, 226, 152, 311, 311, 311, 311,
|
|
311, 311, 311, 311, 270, 226, 152, 312, 312, 312,
|
|
312, 312, 312, 312, 312, 313, 224, 188, 333, 314,
|
|
|
|
314, 314, 314, 314, 322, 322, 322, 322, 322, 322,
|
|
322, 322, 414, 414, 414, 414, 414, 415, 314, 314,
|
|
314, 314, 314, 314, 152, 318, 319, 320, 318, 318,
|
|
318, 318, 318, 321, 332, 73, 326, 322, 322, 322,
|
|
322, 322, 226, 152, 362, 362, 362, 362, 362, 362,
|
|
460, 325, 313, 298, 224, 188, 322, 322, 322, 322,
|
|
322, 322, 338, 339, 339, 339, 339, 339, 339, 339,
|
|
339, 366, 366, 366, 366, 366, 366, 366, 366, 537,
|
|
537, 365, 365, 365, 365, 365, 365, 365, 365, 494,
|
|
393, 521, 73, 338, 340, 340, 340, 340, 340, 340,
|
|
|
|
340, 340, 188, 246, 382, 383, 384, 385, 382, 382,
|
|
382, 382, 338, 339, 339, 339, 339, 339, 339, 287,
|
|
73, 286, 73, 73, 338, 341, 341, 341, 341, 341,
|
|
342, 339, 339, 73, 387, 388, 389, 387, 387, 387,
|
|
387, 387, 73, 356, 356, 356, 356, 356, 356, 356,
|
|
356, 284, 283, 282, 73, 345, 345, 346, 346, 346,
|
|
346, 346, 346, 346, 346, 347, 393, 281, 280, 348,
|
|
348, 348, 348, 348, 395, 395, 395, 395, 395, 395,
|
|
395, 395, 445, 445, 445, 445, 445, 446, 348, 348,
|
|
348, 348, 348, 348, 352, 353, 354, 352, 352, 352,
|
|
|
|
352, 352, 355, 262, 224, 188, 356, 356, 356, 356,
|
|
356, 537, 345, 394, 394, 394, 394, 394, 394, 394,
|
|
394, 258, 442, 188, 95, 356, 356, 356, 356, 356,
|
|
356, 226, 152, 362, 362, 362, 362, 362, 362, 362,
|
|
362, 313, 226, 152, 363, 363, 363, 363, 363, 363,
|
|
363, 363, 364, 246, 248, 246, 365, 365, 365, 365,
|
|
365, 403, 537, 404, 404, 404, 404, 404, 404, 404,
|
|
404, 247, 442, 246, 244, 365, 365, 365, 365, 365,
|
|
365, 152, 369, 370, 371, 369, 369, 369, 369, 369,
|
|
226, 152, 243, 242, 372, 372, 372, 372, 372, 403,
|
|
|
|
313, 405, 405, 405, 405, 405, 405, 405, 405, 241,
|
|
240, 89, 188, 372, 372, 372, 372, 372, 372, 338,
|
|
339, 339, 339, 339, 339, 339, 339, 339, 403, 224,
|
|
406, 406, 406, 406, 406, 407, 404, 404, 226, 152,
|
|
372, 372, 372, 372, 372, 372, 372, 372, 364, 73,
|
|
338, 339, 339, 339, 339, 339, 339, 339, 339, 537,
|
|
152, 226, 152, 410, 410, 410, 410, 410, 410, 364,
|
|
188, 364, 413, 413, 413, 413, 413, 413, 413, 413,
|
|
73, 345, 95, 391, 391, 391, 391, 391, 391, 391,
|
|
391, 347, 345, 77, 392, 392, 392, 392, 392, 392,
|
|
|
|
392, 392, 393, 152, 176, 212, 394, 394, 394, 394,
|
|
394, 537, 364, 412, 412, 412, 412, 412, 412, 412,
|
|
412, 209, 208, 207, 206, 394, 394, 394, 394, 394,
|
|
394, 398, 399, 400, 398, 398, 398, 398, 398, 401,
|
|
205, 203, 202, 402, 402, 402, 402, 402, 433, 345,
|
|
434, 434, 434, 434, 434, 434, 434, 434, 201, 442,
|
|
200, 199, 402, 402, 402, 402, 402, 402, 226, 152,
|
|
410, 410, 410, 410, 410, 410, 410, 410, 364, 226,
|
|
152, 411, 411, 411, 411, 411, 411, 411, 411, 198,
|
|
226, 152, 95, 412, 412, 412, 412, 412, 424, 433,
|
|
|
|
364, 435, 435, 435, 435, 435, 435, 435, 435, 345,
|
|
422, 77, 412, 412, 412, 412, 412, 412, 424, 477,
|
|
424, 425, 433, 459, 436, 436, 436, 436, 436, 437,
|
|
434, 434, 480, 480, 480, 480, 480, 481, 87, 73,
|
|
426, 77, 427, 427, 427, 427, 427, 427, 427, 427,
|
|
402, 402, 402, 402, 402, 402, 402, 402, 444, 444,
|
|
444, 444, 444, 444, 444, 444, 77, 176, 137, 138,
|
|
132, 73, 426, 537, 428, 428, 428, 428, 428, 428,
|
|
428, 428, 537, 477, 443, 443, 443, 443, 443, 443,
|
|
443, 443, 452, 453, 454, 452, 452, 452, 452, 452,
|
|
|
|
132, 124, 174, 73, 426, 345, 429, 429, 429, 429,
|
|
429, 430, 431, 431, 403, 477, 404, 404, 404, 404,
|
|
404, 404, 404, 404, 403, 117, 404, 404, 404, 404,
|
|
404, 404, 404, 404, 424, 73, 426, 167, 432, 432,
|
|
432, 427, 427, 427, 427, 427, 403, 166, 404, 404,
|
|
404, 404, 404, 404, 424, 165, 424, 424, 164, 426,
|
|
163, 469, 469, 469, 161, 160, 156, 73, 345, 95,
|
|
440, 440, 440, 440, 440, 440, 440, 440, 393, 345,
|
|
72, 441, 441, 441, 441, 441, 441, 441, 441, 442,
|
|
73, 95, 145, 443, 443, 443, 443, 443, 465, 466,
|
|
|
|
467, 465, 465, 465, 465, 465, 510, 510, 510, 510,
|
|
510, 511, 443, 443, 443, 443, 443, 443, 447, 448,
|
|
449, 447, 447, 447, 447, 447, 450, 73, 83, 81,
|
|
451, 451, 451, 451, 451, 470, 471, 472, 470, 470,
|
|
470, 470, 470, 526, 526, 526, 526, 526, 526, 451,
|
|
451, 451, 451, 451, 451, 226, 152, 457, 457, 457,
|
|
457, 457, 457, 457, 457, 426, 77, 431, 431, 431,
|
|
431, 431, 431, 431, 431, 433, 75, 434, 434, 434,
|
|
434, 434, 434, 434, 434, 433, 74, 434, 434, 434,
|
|
434, 434, 434, 434, 434, 73, 73, 426, 138, 431,
|
|
|
|
431, 431, 431, 431, 431, 431, 431, 433, 132, 434,
|
|
434, 434, 434, 434, 434, 451, 451, 451, 451, 451,
|
|
451, 451, 451, 124, 117, 116, 115, 114, 73, 426,
|
|
113, 431, 431, 431, 431, 431, 431, 468, 468, 479,
|
|
479, 479, 479, 479, 479, 479, 479, 537, 112, 478,
|
|
478, 478, 478, 478, 478, 478, 478, 101, 100, 99,
|
|
73, 426, 98, 468, 468, 468, 468, 468, 468, 468,
|
|
468, 152, 486, 486, 486, 486, 486, 486, 486, 486,
|
|
152, 487, 487, 487, 487, 487, 487, 487, 487, 95,
|
|
83, 81, 73, 345, 75, 475, 475, 475, 475, 475,
|
|
|
|
475, 475, 475, 442, 345, 74, 476, 476, 476, 476,
|
|
476, 476, 476, 476, 477, 73, 537, 537, 478, 478,
|
|
478, 478, 478, 152, 488, 488, 488, 488, 488, 489,
|
|
486, 486, 469, 469, 469, 537, 537, 478, 478, 478,
|
|
478, 478, 478, 482, 483, 484, 482, 482, 482, 482,
|
|
482, 537, 537, 537, 537, 485, 485, 485, 485, 485,
|
|
461, 73, 461, 537, 461, 537, 461, 461, 537, 537,
|
|
461, 537, 537, 537, 485, 485, 485, 485, 485, 485,
|
|
537, 537, 461, 461, 461, 463, 537, 463, 537, 463,
|
|
537, 463, 463, 537, 537, 463, 468, 468, 468, 468,
|
|
|
|
468, 468, 468, 468, 537, 537, 537, 463, 463, 463,
|
|
494, 537, 495, 495, 495, 495, 495, 495, 495, 495,
|
|
537, 537, 537, 537, 499, 73, 500, 500, 500, 500,
|
|
500, 500, 500, 500, 152, 486, 486, 486, 486, 486,
|
|
486, 73, 494, 537, 496, 496, 496, 496, 496, 496,
|
|
496, 496, 499, 537, 501, 501, 501, 501, 501, 501,
|
|
501, 501, 499, 537, 502, 502, 502, 502, 502, 503,
|
|
500, 500, 537, 73, 494, 537, 497, 497, 497, 497,
|
|
497, 498, 495, 495, 485, 485, 485, 485, 485, 485,
|
|
485, 485, 509, 509, 509, 509, 509, 509, 509, 509,
|
|
|
|
537, 537, 537, 537, 537, 73, 345, 537, 506, 506,
|
|
506, 506, 506, 506, 506, 506, 477, 345, 537, 507,
|
|
507, 507, 507, 507, 507, 507, 507, 537, 537, 537,
|
|
537, 508, 508, 508, 508, 508, 537, 537, 508, 508,
|
|
508, 508, 508, 508, 508, 508, 537, 537, 537, 537,
|
|
508, 508, 508, 508, 508, 508, 152, 486, 486, 486,
|
|
486, 486, 486, 486, 486, 152, 486, 486, 486, 486,
|
|
486, 486, 486, 486, 512, 513, 514, 512, 512, 512,
|
|
512, 512, 537, 494, 537, 495, 495, 495, 495, 495,
|
|
495, 515, 516, 517, 515, 515, 515, 515, 515, 537,
|
|
|
|
537, 537, 537, 73, 494, 537, 495, 495, 495, 495,
|
|
495, 495, 495, 495, 73, 499, 537, 500, 500, 500,
|
|
500, 500, 500, 500, 500, 499, 537, 500, 500, 500,
|
|
500, 500, 500, 500, 500, 73, 494, 537, 495, 495,
|
|
495, 495, 495, 495, 495, 495, 499, 537, 500, 500,
|
|
500, 500, 500, 500, 345, 537, 520, 520, 520, 520,
|
|
520, 520, 520, 520, 537, 537, 537, 73, 521, 537,
|
|
522, 522, 522, 522, 522, 522, 522, 522, 526, 526,
|
|
526, 526, 526, 526, 526, 526, 527, 527, 527, 527,
|
|
527, 527, 527, 527, 537, 537, 537, 537, 537, 73,
|
|
|
|
521, 537, 523, 523, 523, 523, 523, 523, 523, 523,
|
|
528, 528, 528, 528, 528, 529, 526, 526, 531, 532,
|
|
533, 531, 531, 531, 531, 531, 537, 537, 537, 537,
|
|
537, 73, 521, 537, 524, 524, 524, 524, 524, 525,
|
|
522, 522, 537, 537, 537, 537, 521, 73, 522, 522,
|
|
522, 522, 522, 522, 526, 526, 526, 526, 526, 526,
|
|
526, 526, 537, 73, 521, 537, 522, 522, 522, 522,
|
|
522, 522, 522, 522, 537, 537, 537, 73, 526, 526,
|
|
526, 526, 526, 526, 526, 526, 534, 534, 534, 534,
|
|
534, 534, 534, 534, 537, 73, 521, 537, 522, 522,
|
|
|
|
522, 522, 522, 522, 522, 522, 531, 531, 531, 531,
|
|
531, 531, 531, 531, 537, 73, 535, 535, 535, 535,
|
|
535, 536, 534, 534, 537, 537, 537, 73, 534, 534,
|
|
534, 534, 534, 534, 537, 73, 534, 534, 534, 534,
|
|
534, 534, 534, 534, 537, 73, 537, 537, 537, 537,
|
|
537, 537, 537, 537, 537, 537, 537, 73, 537, 537,
|
|
537, 537, 537, 537, 537, 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, 537,
|
|
537, 537, 72, 537, 72, 72, 72, 537, 72, 72,
|
|
72, 76, 76, 76, 76, 76, 76, 76, 76, 76,
|
|
76, 76, 76, 76, 80, 537, 537, 537, 80, 537,
|
|
80, 80, 80, 537, 80, 80, 80, 82, 537, 537,
|
|
537, 82, 537, 82, 82, 82, 537, 82, 82, 82,
|
|
84, 537, 537, 84, 84, 537, 84, 84, 84, 537,
|
|
84, 84, 84, 94, 94, 537, 537, 94, 119, 537,
|
|
537, 119, 119, 537, 119, 119, 119, 537, 119, 119,
|
|
|
|
119, 123, 537, 537, 123, 123, 123, 123, 123, 123,
|
|
537, 537, 123, 123, 130, 130, 131, 537, 537, 131,
|
|
537, 537, 131, 131, 131, 131, 131, 131, 131, 135,
|
|
135, 135, 135, 135, 135, 135, 135, 135, 135, 135,
|
|
135, 135, 137, 137, 537, 137, 537, 137, 137, 137,
|
|
137, 137, 137, 137, 137, 143, 143, 143, 143, 143,
|
|
143, 143, 143, 143, 143, 143, 143, 143, 144, 144,
|
|
537, 144, 144, 144, 144, 144, 144, 144, 144, 144,
|
|
144, 85, 537, 537, 85, 85, 537, 85, 85, 85,
|
|
537, 85, 85, 85, 151, 151, 537, 537, 151, 153,
|
|
|
|
153, 153, 537, 537, 153, 120, 537, 537, 120, 120,
|
|
537, 120, 120, 120, 537, 120, 120, 120, 177, 177,
|
|
177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
|
|
177, 184, 184, 537, 537, 184, 190, 190, 190, 537,
|
|
537, 190, 218, 218, 537, 537, 218, 219, 219, 537,
|
|
537, 219, 223, 223, 537, 537, 223, 225, 225, 225,
|
|
537, 537, 225, 258, 258, 537, 537, 258, 260, 260,
|
|
537, 537, 260, 261, 261, 537, 537, 261, 263, 263,
|
|
263, 537, 537, 263, 267, 267, 267, 267, 537, 537,
|
|
267, 295, 295, 537, 537, 295, 296, 296, 537, 537,
|
|
|
|
296, 297, 297, 537, 537, 297, 309, 309, 309, 537,
|
|
537, 309, 310, 310, 310, 310, 537, 537, 310, 343,
|
|
343, 537, 537, 343, 344, 344, 537, 537, 344, 360,
|
|
360, 360, 537, 537, 360, 361, 361, 361, 361, 537,
|
|
537, 361, 386, 386, 537, 537, 386, 390, 537, 390,
|
|
390, 537, 537, 390, 408, 408, 408, 537, 537, 408,
|
|
409, 409, 409, 409, 537, 537, 409, 438, 438, 537,
|
|
537, 438, 439, 537, 439, 439, 537, 537, 439, 455,
|
|
455, 455, 537, 537, 455, 456, 456, 456, 537, 537,
|
|
537, 456, 461, 537, 537, 537, 461, 537, 461, 461,
|
|
|
|
461, 537, 461, 461, 461, 463, 537, 537, 537, 463,
|
|
537, 463, 463, 463, 537, 463, 463, 463, 473, 473,
|
|
537, 537, 473, 474, 537, 474, 474, 537, 537, 474,
|
|
490, 490, 537, 537, 537, 490, 492, 492, 492, 492,
|
|
492, 492, 492, 492, 492, 492, 492, 492, 492, 504,
|
|
504, 537, 537, 504, 505, 537, 505, 505, 537, 537,
|
|
505, 518, 518, 537, 537, 518, 519, 537, 519, 537,
|
|
537, 537, 519, 530, 537, 537, 537, 530, 13, 537,
|
|
537, 537, 537, 537, 537, 537, 537, 537, 537, 537,
|
|
537, 537, 537, 537, 537, 537, 537, 537, 537, 537,
|
|
|
|
537, 537, 537, 537, 537, 537, 537, 537, 537, 537,
|
|
537, 537, 537, 537, 537, 537, 537, 537, 537, 537,
|
|
537, 537, 537, 537, 537, 537, 537, 537, 537, 537,
|
|
537, 537, 537, 537, 537, 537, 537, 537, 537, 537,
|
|
537
|
|
} ;
|
|
|
|
static yyconst short int yy_chk[3442] =
|
|
{ 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, 251, 2, 3, 4, 95,
|
|
5, 5, 5, 114, 5, 251, 3, 4, 95, 39,
|
|
5, 11, 11, 11, 11, 6, 6, 6, 114, 6,
|
|
2, 2, 5, 5, 2, 6, 39, 62, 2, 50,
|
|
|
|
64, 2, 12, 12, 12, 12, 68, 6, 6, 69,
|
|
24, 58, 58, 5, 24, 24, 50, 62, 66, 66,
|
|
64, 3, 4, 172, 11, 172, 102, 102, 6, 7,
|
|
7, 7, 24, 7, 26, 26, 26, 26, 26, 26,
|
|
26, 26, 104, 71, 71, 12, 71, 104, 111, 68,
|
|
69, 24, 27, 27, 27, 27, 27, 27, 38, 112,
|
|
38, 38, 38, 38, 38, 38, 38, 38, 40, 102,
|
|
534, 112, 7, 7, 7, 7, 7, 7, 7, 7,
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
|
|
8, 8, 8, 116, 8, 520, 40, 40, 122, 116,
|
|
|
|
40, 169, 111, 122, 40, 48, 169, 40, 48, 48,
|
|
48, 48, 48, 48, 48, 48, 78, 78, 78, 78,
|
|
78, 78, 78, 78, 79, 79, 79, 79, 79, 79,
|
|
79, 79, 113, 8, 8, 8, 8, 8, 8, 8,
|
|
8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
|
|
8, 9, 9, 9, 9, 9, 115, 125, 125, 49,
|
|
9, 9, 9, 49, 49, 56, 56, 56, 115, 56,
|
|
113, 99, 139, 56, 9, 56, 99, 213, 99, 84,
|
|
162, 49, 153, 84, 84, 129, 129, 56, 56, 141,
|
|
141, 153, 213, 162, 9, 10, 10, 10, 10, 10,
|
|
|
|
49, 84, 168, 171, 10, 10, 10, 73, 56, 73,
|
|
140, 73, 518, 73, 73, 139, 508, 73, 10, 171,
|
|
84, 87, 87, 87, 87, 87, 87, 87, 87, 73,
|
|
73, 73, 93, 93, 93, 93, 93, 93, 10, 18,
|
|
91, 91, 91, 91, 91, 91, 91, 91, 168, 18,
|
|
87, 140, 18, 18, 18, 18, 18, 18, 18, 18,
|
|
25, 179, 25, 25, 25, 25, 25, 25, 25, 25,
|
|
25, 210, 507, 173, 25, 25, 25, 25, 25, 92,
|
|
92, 92, 92, 92, 92, 92, 92, 173, 175, 183,
|
|
250, 25, 179, 25, 25, 25, 25, 25, 25, 31,
|
|
|
|
204, 175, 198, 31, 505, 31, 204, 250, 31, 31,
|
|
183, 31, 31, 31, 31, 31, 31, 31, 31, 31,
|
|
31, 31, 31, 210, 198, 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,
|
|
187, 187, 187, 33, 33, 33, 33, 33, 118, 118,
|
|
118, 118, 118, 118, 118, 118, 211, 211, 288, 136,
|
|
136, 504, 33, 33, 33, 33, 33, 33, 37, 37,
|
|
|
|
37, 190, 37, 254, 37, 37, 214, 81, 37, 81,
|
|
190, 81, 214, 81, 81, 339, 225, 81, 227, 227,
|
|
37, 37, 37, 41, 105, 225, 212, 238, 227, 81,
|
|
81, 81, 136, 41, 254, 288, 41, 41, 41, 41,
|
|
41, 41, 41, 41, 83, 339, 83, 212, 83, 238,
|
|
83, 83, 105, 105, 83, 86, 105, 86, 336, 86,
|
|
105, 86, 86, 105, 212, 86, 83, 83, 83, 500,
|
|
229, 229, 492, 336, 41, 57, 245, 86, 86, 86,
|
|
229, 245, 119, 249, 280, 57, 119, 119, 57, 57,
|
|
57, 57, 57, 57, 57, 57, 88, 88, 88, 88,
|
|
|
|
88, 88, 88, 88, 119, 490, 280, 334, 88, 88,
|
|
88, 88, 88, 128, 128, 128, 128, 128, 128, 128,
|
|
128, 252, 486, 119, 351, 351, 252, 88, 88, 88,
|
|
88, 88, 88, 96, 96, 96, 96, 96, 96, 96,
|
|
96, 283, 249, 290, 263, 96, 96, 96, 96, 96,
|
|
121, 474, 121, 263, 121, 334, 121, 121, 284, 290,
|
|
121, 267, 285, 283, 96, 96, 96, 96, 96, 96,
|
|
267, 285, 121, 121, 121, 132, 289, 145, 132, 132,
|
|
284, 145, 291, 268, 268, 132, 289, 145, 309, 323,
|
|
327, 291, 174, 268, 378, 378, 174, 309, 132, 145,
|
|
|
|
145, 146, 174, 146, 146, 146, 146, 146, 146, 146,
|
|
146, 323, 327, 473, 174, 174, 178, 178, 178, 178,
|
|
178, 178, 178, 178, 182, 310, 182, 182, 182, 182,
|
|
182, 182, 146, 147, 310, 147, 147, 147, 147, 147,
|
|
147, 147, 147, 463, 329, 178, 186, 186, 186, 186,
|
|
186, 186, 186, 186, 186, 182, 191, 191, 191, 191,
|
|
191, 191, 191, 191, 147, 148, 329, 148, 148, 148,
|
|
148, 148, 148, 148, 148, 193, 193, 193, 193, 193,
|
|
193, 193, 193, 194, 194, 194, 194, 194, 194, 235,
|
|
235, 235, 235, 235, 235, 461, 148, 149, 460, 149,
|
|
|
|
149, 149, 149, 149, 149, 149, 149, 269, 269, 459,
|
|
331, 149, 149, 149, 149, 149, 196, 269, 196, 196,
|
|
196, 196, 196, 196, 196, 196, 331, 397, 397, 337,
|
|
149, 149, 149, 149, 149, 149, 152, 152, 152, 152,
|
|
152, 152, 152, 152, 152, 337, 411, 411, 152, 152,
|
|
152, 152, 152, 220, 220, 220, 220, 220, 220, 220,
|
|
220, 220, 373, 374, 379, 458, 379, 152, 152, 152,
|
|
152, 152, 152, 154, 154, 154, 154, 154, 154, 154,
|
|
154, 154, 154, 456, 373, 374, 154, 154, 154, 154,
|
|
154, 226, 226, 226, 226, 226, 226, 226, 226, 277,
|
|
|
|
277, 277, 277, 277, 277, 154, 154, 154, 154, 154,
|
|
154, 155, 155, 155, 155, 155, 155, 155, 155, 412,
|
|
412, 415, 415, 155, 155, 155, 155, 155, 228, 228,
|
|
228, 228, 228, 228, 228, 228, 446, 446, 439, 271,
|
|
271, 438, 155, 155, 155, 155, 155, 155, 180, 271,
|
|
180, 180, 180, 180, 180, 180, 180, 180, 232, 232,
|
|
232, 232, 232, 232, 232, 232, 434, 346, 232, 234,
|
|
234, 234, 234, 234, 234, 234, 234, 346, 425, 180,
|
|
181, 348, 181, 181, 181, 181, 181, 181, 181, 181,
|
|
237, 348, 237, 237, 237, 237, 237, 237, 237, 237,
|
|
|
|
311, 311, 253, 253, 253, 253, 253, 253, 253, 253,
|
|
311, 181, 192, 192, 192, 192, 192, 192, 192, 192,
|
|
192, 192, 192, 312, 312, 424, 192, 192, 192, 192,
|
|
192, 253, 257, 312, 257, 257, 257, 257, 257, 257,
|
|
416, 457, 457, 481, 481, 192, 192, 192, 192, 192,
|
|
192, 195, 195, 195, 195, 195, 195, 195, 195, 195,
|
|
195, 335, 416, 257, 195, 195, 195, 195, 195, 264,
|
|
335, 264, 264, 264, 264, 264, 264, 264, 264, 420,
|
|
314, 314, 404, 195, 195, 195, 195, 195, 195, 215,
|
|
314, 215, 215, 215, 215, 215, 215, 215, 215, 265,
|
|
|
|
418, 265, 265, 265, 265, 265, 265, 265, 265, 266,
|
|
360, 266, 266, 266, 266, 266, 266, 266, 266, 360,
|
|
215, 216, 418, 216, 216, 216, 216, 216, 216, 216,
|
|
216, 270, 270, 270, 270, 270, 270, 270, 270, 274,
|
|
274, 274, 274, 274, 274, 274, 274, 511, 511, 274,
|
|
390, 427, 216, 217, 386, 217, 217, 217, 217, 217,
|
|
217, 217, 217, 276, 276, 276, 276, 276, 276, 276,
|
|
276, 279, 361, 279, 279, 279, 279, 279, 279, 279,
|
|
279, 361, 427, 381, 217, 230, 230, 230, 230, 230,
|
|
230, 230, 230, 230, 230, 230, 233, 233, 233, 233,
|
|
|
|
233, 233, 233, 233, 233, 233, 233, 377, 376, 375,
|
|
233, 233, 233, 233, 233, 298, 298, 298, 298, 298,
|
|
298, 298, 298, 301, 301, 301, 301, 301, 301, 233,
|
|
233, 233, 233, 233, 233, 236, 236, 236, 236, 236,
|
|
236, 236, 236, 236, 236, 344, 343, 333, 236, 236,
|
|
236, 236, 236, 300, 300, 300, 300, 300, 300, 300,
|
|
300, 320, 320, 320, 320, 320, 320, 236, 236, 236,
|
|
236, 236, 236, 255, 391, 255, 255, 255, 255, 255,
|
|
255, 255, 255, 303, 391, 303, 303, 303, 303, 303,
|
|
303, 303, 303, 304, 304, 304, 304, 304, 304, 304,
|
|
|
|
304, 332, 326, 325, 255, 256, 392, 256, 256, 256,
|
|
256, 256, 256, 256, 256, 306, 392, 306, 306, 306,
|
|
306, 306, 306, 306, 306, 307, 408, 307, 307, 307,
|
|
307, 307, 307, 307, 307, 408, 256, 262, 262, 262,
|
|
262, 262, 262, 262, 262, 262, 409, 305, 297, 262,
|
|
262, 262, 262, 262, 308, 409, 308, 308, 308, 308,
|
|
308, 308, 354, 354, 354, 354, 354, 354, 262, 262,
|
|
262, 262, 262, 262, 272, 272, 272, 272, 272, 272,
|
|
272, 272, 272, 272, 272, 275, 275, 275, 275, 275,
|
|
275, 275, 275, 275, 275, 275, 296, 295, 287, 275,
|
|
|
|
275, 275, 275, 275, 313, 313, 313, 313, 313, 313,
|
|
313, 313, 371, 371, 371, 371, 371, 371, 275, 275,
|
|
275, 275, 275, 275, 278, 278, 278, 278, 278, 278,
|
|
278, 278, 278, 278, 286, 423, 282, 278, 278, 278,
|
|
278, 278, 317, 317, 317, 317, 317, 317, 317, 317,
|
|
423, 281, 317, 261, 260, 259, 278, 278, 278, 278,
|
|
278, 278, 292, 292, 292, 292, 292, 292, 292, 292,
|
|
292, 319, 319, 319, 319, 319, 319, 319, 319, 322,
|
|
394, 322, 322, 322, 322, 322, 322, 322, 322, 495,
|
|
394, 522, 292, 293, 293, 293, 293, 293, 293, 293,
|
|
|
|
293, 293, 258, 248, 338, 338, 338, 338, 338, 338,
|
|
338, 338, 342, 342, 342, 342, 342, 342, 342, 247,
|
|
495, 246, 522, 293, 294, 294, 294, 294, 294, 294,
|
|
294, 294, 294, 338, 345, 345, 345, 345, 345, 345,
|
|
345, 345, 342, 347, 347, 347, 347, 347, 347, 347,
|
|
347, 244, 243, 242, 294, 299, 440, 299, 299, 299,
|
|
299, 299, 299, 299, 299, 299, 440, 241, 240, 299,
|
|
299, 299, 299, 299, 353, 353, 353, 353, 353, 353,
|
|
353, 353, 400, 400, 400, 400, 400, 400, 299, 299,
|
|
299, 299, 299, 299, 302, 302, 302, 302, 302, 302,
|
|
|
|
302, 302, 302, 224, 223, 222, 302, 302, 302, 302,
|
|
302, 356, 441, 356, 356, 356, 356, 356, 356, 356,
|
|
356, 221, 441, 219, 218, 302, 302, 302, 302, 302,
|
|
302, 315, 315, 315, 315, 315, 315, 315, 315, 315,
|
|
315, 315, 318, 318, 318, 318, 318, 318, 318, 318,
|
|
318, 318, 318, 209, 208, 207, 318, 318, 318, 318,
|
|
318, 357, 443, 357, 357, 357, 357, 357, 357, 357,
|
|
357, 206, 443, 205, 203, 318, 318, 318, 318, 318,
|
|
318, 321, 321, 321, 321, 321, 321, 321, 321, 321,
|
|
362, 362, 202, 201, 321, 321, 321, 321, 321, 358,
|
|
|
|
362, 358, 358, 358, 358, 358, 358, 358, 358, 200,
|
|
199, 197, 189, 321, 321, 321, 321, 321, 321, 340,
|
|
340, 340, 340, 340, 340, 340, 340, 340, 359, 188,
|
|
359, 359, 359, 359, 359, 359, 359, 359, 363, 363,
|
|
364, 364, 364, 364, 364, 364, 364, 364, 363, 340,
|
|
341, 341, 341, 341, 341, 341, 341, 341, 341, 365,
|
|
365, 368, 368, 368, 368, 368, 368, 368, 368, 365,
|
|
185, 368, 370, 370, 370, 370, 370, 370, 370, 370,
|
|
341, 349, 184, 349, 349, 349, 349, 349, 349, 349,
|
|
349, 349, 352, 177, 352, 352, 352, 352, 352, 352,
|
|
|
|
352, 352, 352, 455, 176, 170, 352, 352, 352, 352,
|
|
352, 372, 455, 372, 372, 372, 372, 372, 372, 372,
|
|
372, 167, 166, 165, 164, 352, 352, 352, 352, 352,
|
|
352, 355, 355, 355, 355, 355, 355, 355, 355, 355,
|
|
163, 161, 160, 355, 355, 355, 355, 355, 387, 475,
|
|
387, 387, 387, 387, 387, 387, 387, 387, 159, 475,
|
|
158, 157, 355, 355, 355, 355, 355, 355, 366, 366,
|
|
366, 366, 366, 366, 366, 366, 366, 366, 366, 369,
|
|
369, 369, 369, 369, 369, 369, 369, 369, 369, 156,
|
|
410, 410, 151, 369, 369, 369, 369, 369, 380, 388,
|
|
|
|
410, 388, 388, 388, 388, 388, 388, 388, 388, 476,
|
|
422, 422, 369, 369, 369, 369, 369, 369, 380, 476,
|
|
380, 380, 389, 422, 389, 389, 389, 389, 389, 389,
|
|
389, 389, 449, 449, 449, 449, 449, 449, 150, 380,
|
|
382, 144, 382, 382, 382, 382, 382, 382, 382, 382,
|
|
393, 393, 393, 393, 393, 393, 393, 393, 399, 399,
|
|
399, 399, 399, 399, 399, 399, 143, 142, 138, 137,
|
|
135, 382, 383, 478, 383, 383, 383, 383, 383, 383,
|
|
383, 383, 402, 478, 402, 402, 402, 402, 402, 402,
|
|
402, 402, 403, 403, 403, 403, 403, 403, 403, 403,
|
|
|
|
131, 124, 120, 383, 384, 506, 384, 384, 384, 384,
|
|
384, 384, 384, 384, 405, 506, 405, 405, 405, 405,
|
|
405, 405, 405, 405, 406, 117, 406, 406, 406, 406,
|
|
406, 406, 406, 406, 421, 384, 385, 110, 385, 385,
|
|
385, 385, 385, 385, 385, 385, 407, 109, 407, 407,
|
|
407, 407, 407, 407, 421, 108, 421, 421, 107, 432,
|
|
106, 432, 432, 432, 101, 100, 98, 385, 395, 94,
|
|
395, 395, 395, 395, 395, 395, 395, 395, 395, 398,
|
|
90, 398, 398, 398, 398, 398, 398, 398, 398, 398,
|
|
432, 89, 85, 398, 398, 398, 398, 398, 426, 426,
|
|
|
|
426, 426, 426, 426, 426, 426, 484, 484, 484, 484,
|
|
484, 484, 398, 398, 398, 398, 398, 398, 401, 401,
|
|
401, 401, 401, 401, 401, 401, 401, 426, 82, 80,
|
|
401, 401, 401, 401, 401, 433, 433, 433, 433, 433,
|
|
433, 433, 433, 529, 529, 529, 529, 529, 529, 401,
|
|
401, 401, 401, 401, 401, 413, 413, 413, 413, 413,
|
|
413, 413, 413, 413, 413, 428, 76, 428, 428, 428,
|
|
428, 428, 428, 428, 428, 435, 75, 435, 435, 435,
|
|
435, 435, 435, 435, 435, 436, 74, 436, 436, 436,
|
|
436, 436, 436, 436, 436, 72, 428, 429, 67, 429,
|
|
|
|
429, 429, 429, 429, 429, 429, 429, 437, 60, 437,
|
|
437, 437, 437, 437, 437, 442, 442, 442, 442, 442,
|
|
442, 442, 442, 53, 47, 46, 45, 44, 429, 430,
|
|
43, 430, 430, 430, 430, 430, 430, 430, 430, 448,
|
|
448, 448, 448, 448, 448, 448, 448, 451, 42, 451,
|
|
451, 451, 451, 451, 451, 451, 451, 36, 35, 34,
|
|
430, 431, 32, 431, 431, 431, 431, 431, 431, 431,
|
|
431, 452, 452, 452, 452, 452, 452, 452, 452, 452,
|
|
453, 453, 453, 453, 453, 453, 453, 453, 453, 28,
|
|
22, 19, 431, 444, 17, 444, 444, 444, 444, 444,
|
|
|
|
444, 444, 444, 444, 447, 15, 447, 447, 447, 447,
|
|
447, 447, 447, 447, 447, 14, 13, 0, 447, 447,
|
|
447, 447, 447, 454, 454, 454, 454, 454, 454, 454,
|
|
454, 454, 469, 469, 469, 0, 0, 447, 447, 447,
|
|
447, 447, 447, 450, 450, 450, 450, 450, 450, 450,
|
|
450, 0, 0, 0, 0, 450, 450, 450, 450, 450,
|
|
462, 469, 462, 0, 462, 0, 462, 462, 0, 0,
|
|
462, 0, 0, 0, 450, 450, 450, 450, 450, 450,
|
|
0, 0, 462, 462, 462, 464, 0, 464, 0, 464,
|
|
0, 464, 464, 0, 0, 464, 468, 468, 468, 468,
|
|
|
|
468, 468, 468, 468, 0, 0, 0, 464, 464, 464,
|
|
465, 0, 465, 465, 465, 465, 465, 465, 465, 465,
|
|
0, 0, 0, 0, 470, 468, 470, 470, 470, 470,
|
|
470, 470, 470, 470, 489, 489, 489, 489, 489, 489,
|
|
489, 465, 466, 0, 466, 466, 466, 466, 466, 466,
|
|
466, 466, 471, 0, 471, 471, 471, 471, 471, 471,
|
|
471, 471, 472, 0, 472, 472, 472, 472, 472, 472,
|
|
472, 472, 0, 466, 467, 0, 467, 467, 467, 467,
|
|
467, 467, 467, 467, 477, 477, 477, 477, 477, 477,
|
|
477, 477, 483, 483, 483, 483, 483, 483, 483, 483,
|
|
|
|
0, 0, 0, 0, 0, 467, 479, 0, 479, 479,
|
|
479, 479, 479, 479, 479, 479, 479, 482, 0, 482,
|
|
482, 482, 482, 482, 482, 482, 482, 0, 0, 0,
|
|
0, 482, 482, 482, 482, 482, 485, 0, 485, 485,
|
|
485, 485, 485, 485, 485, 485, 0, 0, 0, 0,
|
|
482, 482, 482, 482, 482, 482, 487, 487, 487, 487,
|
|
487, 487, 487, 487, 487, 488, 488, 488, 488, 488,
|
|
488, 488, 488, 488, 494, 494, 494, 494, 494, 494,
|
|
494, 494, 0, 498, 0, 498, 498, 498, 498, 498,
|
|
498, 499, 499, 499, 499, 499, 499, 499, 499, 0,
|
|
|
|
0, 0, 0, 494, 496, 0, 496, 496, 496, 496,
|
|
496, 496, 496, 496, 498, 501, 0, 501, 501, 501,
|
|
501, 501, 501, 501, 501, 502, 0, 502, 502, 502,
|
|
502, 502, 502, 502, 502, 496, 497, 0, 497, 497,
|
|
497, 497, 497, 497, 497, 497, 503, 0, 503, 503,
|
|
503, 503, 503, 503, 509, 0, 509, 509, 509, 509,
|
|
509, 509, 509, 509, 0, 0, 0, 497, 512, 0,
|
|
512, 512, 512, 512, 512, 512, 512, 512, 515, 515,
|
|
515, 515, 515, 515, 515, 515, 516, 516, 516, 516,
|
|
516, 516, 516, 516, 0, 0, 0, 0, 0, 512,
|
|
|
|
513, 0, 513, 513, 513, 513, 513, 513, 513, 513,
|
|
517, 517, 517, 517, 517, 517, 517, 517, 521, 521,
|
|
521, 521, 521, 521, 521, 521, 0, 0, 0, 0,
|
|
0, 513, 514, 0, 514, 514, 514, 514, 514, 514,
|
|
514, 514, 0, 0, 0, 0, 525, 521, 525, 525,
|
|
525, 525, 525, 525, 527, 527, 527, 527, 527, 527,
|
|
527, 527, 0, 514, 523, 0, 523, 523, 523, 523,
|
|
523, 523, 523, 523, 0, 0, 0, 525, 528, 528,
|
|
528, 528, 528, 528, 528, 528, 531, 531, 531, 531,
|
|
531, 531, 531, 531, 0, 523, 524, 0, 524, 524,
|
|
|
|
524, 524, 524, 524, 524, 524, 532, 532, 532, 532,
|
|
532, 532, 532, 532, 0, 531, 533, 533, 533, 533,
|
|
533, 533, 533, 533, 0, 0, 0, 524, 536, 536,
|
|
536, 536, 536, 536, 0, 532, 535, 535, 535, 535,
|
|
535, 535, 535, 535, 0, 533, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 536, 0, 0,
|
|
0, 0, 0, 0, 0, 535, 538, 538, 538, 538,
|
|
538, 538, 538, 538, 538, 538, 538, 538, 538, 539,
|
|
539, 539, 539, 539, 539, 539, 539, 539, 539, 539,
|
|
539, 539, 540, 540, 540, 540, 540, 540, 540, 540,
|
|
|
|
540, 540, 540, 540, 540, 541, 541, 541, 541, 541,
|
|
541, 541, 541, 541, 541, 541, 541, 541, 542, 0,
|
|
0, 0, 542, 0, 542, 542, 542, 0, 542, 542,
|
|
542, 543, 543, 543, 543, 543, 543, 543, 543, 543,
|
|
543, 543, 543, 543, 544, 0, 0, 0, 544, 0,
|
|
544, 544, 544, 0, 544, 544, 544, 545, 0, 0,
|
|
0, 545, 0, 545, 545, 545, 0, 545, 545, 545,
|
|
546, 0, 0, 546, 546, 0, 546, 546, 546, 0,
|
|
546, 546, 546, 547, 547, 0, 0, 547, 548, 0,
|
|
0, 548, 548, 0, 548, 548, 548, 0, 548, 548,
|
|
|
|
548, 549, 0, 0, 549, 549, 549, 549, 549, 549,
|
|
0, 0, 549, 549, 550, 550, 551, 0, 0, 551,
|
|
0, 0, 551, 551, 551, 551, 551, 551, 551, 552,
|
|
552, 552, 552, 552, 552, 552, 552, 552, 552, 552,
|
|
552, 552, 553, 553, 0, 553, 0, 553, 553, 553,
|
|
553, 553, 553, 553, 553, 554, 554, 554, 554, 554,
|
|
554, 554, 554, 554, 554, 554, 554, 554, 555, 555,
|
|
0, 555, 555, 555, 555, 555, 555, 555, 555, 555,
|
|
555, 556, 0, 0, 556, 556, 0, 556, 556, 556,
|
|
0, 556, 556, 556, 557, 557, 0, 0, 557, 558,
|
|
|
|
558, 558, 0, 0, 558, 559, 0, 0, 559, 559,
|
|
0, 559, 559, 559, 0, 559, 559, 559, 560, 560,
|
|
560, 560, 560, 560, 560, 560, 560, 560, 560, 560,
|
|
560, 561, 561, 0, 0, 561, 562, 562, 562, 0,
|
|
0, 562, 563, 563, 0, 0, 563, 564, 564, 0,
|
|
0, 564, 565, 565, 0, 0, 565, 566, 566, 566,
|
|
0, 0, 566, 567, 567, 0, 0, 567, 568, 568,
|
|
0, 0, 568, 569, 569, 0, 0, 569, 570, 570,
|
|
570, 0, 0, 570, 571, 571, 571, 571, 0, 0,
|
|
571, 572, 572, 0, 0, 572, 573, 573, 0, 0,
|
|
|
|
573, 574, 574, 0, 0, 574, 575, 575, 575, 0,
|
|
0, 575, 576, 576, 576, 576, 0, 0, 576, 577,
|
|
577, 0, 0, 577, 578, 578, 0, 0, 578, 579,
|
|
579, 579, 0, 0, 579, 580, 580, 580, 580, 0,
|
|
0, 580, 581, 581, 0, 0, 581, 582, 0, 582,
|
|
582, 0, 0, 582, 583, 583, 583, 0, 0, 583,
|
|
584, 584, 584, 584, 0, 0, 584, 585, 585, 0,
|
|
0, 585, 586, 0, 586, 586, 0, 0, 586, 587,
|
|
587, 587, 0, 0, 587, 588, 588, 588, 0, 0,
|
|
0, 588, 589, 0, 0, 0, 589, 0, 589, 589,
|
|
|
|
589, 0, 589, 589, 589, 590, 0, 0, 0, 590,
|
|
0, 590, 590, 590, 0, 590, 590, 590, 591, 591,
|
|
0, 0, 591, 592, 0, 592, 592, 0, 0, 592,
|
|
593, 593, 0, 0, 0, 593, 594, 594, 594, 594,
|
|
594, 594, 594, 594, 594, 594, 594, 594, 594, 595,
|
|
595, 0, 0, 595, 596, 0, 596, 596, 0, 0,
|
|
596, 597, 597, 0, 0, 597, 598, 0, 598, 0,
|
|
0, 0, 598, 599, 0, 0, 0, 599, 537, 537,
|
|
537, 537, 537, 537, 537, 537, 537, 537, 537, 537,
|
|
537, 537, 537, 537, 537, 537, 537, 537, 537, 537,
|
|
|
|
537, 537, 537, 537, 537, 537, 537, 537, 537, 537,
|
|
537, 537, 537, 537, 537, 537, 537, 537, 537, 537,
|
|
537, 537, 537, 537, 537, 537, 537, 537, 537, 537,
|
|
537, 537, 537, 537, 537, 537, 537, 537, 537, 537,
|
|
537
|
|
} ;
|
|
|
|
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-2008
|
|
* 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 1419 "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 1575 "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 >= 538 )
|
|
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] != 3379 );
|
|
|
|
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("BACKSLASH ");
|
|
if (!append(yytext, yyleng))
|
|
yyterminate();
|
|
}
|
|
YY_BREAK
|
|
case 12:
|
|
YY_RULE_SETUP
|
|
#line 179 "toke.l"
|
|
{
|
|
LEXTRACE("STRBODY ");
|
|
if (!append(yytext, yyleng))
|
|
yyterminate();
|
|
}
|
|
YY_BREAK
|
|
|
|
|
|
case 13:
|
|
YY_RULE_SETUP
|
|
#line 187 "toke.l"
|
|
{
|
|
/* quoted fnmatch glob char, pass verbatim */
|
|
LEXTRACE("QUOTEDCHAR ");
|
|
if (!fill_args(yytext, 2, sawspace))
|
|
yyterminate();
|
|
sawspace = FALSE;
|
|
}
|
|
YY_BREAK
|
|
case 14:
|
|
YY_RULE_SETUP
|
|
#line 195 "toke.l"
|
|
{
|
|
/* quoted sudoers special char, strip backslash */
|
|
LEXTRACE("QUOTEDCHAR ");
|
|
if (!fill_args(yytext + 1, 1, sawspace))
|
|
yyterminate();
|
|
sawspace = FALSE;
|
|
}
|
|
YY_BREAK
|
|
case 15:
|
|
YY_RULE_SETUP
|
|
#line 203 "toke.l"
|
|
{
|
|
BEGIN INITIAL;
|
|
yyless(0);
|
|
return(COMMAND);
|
|
} /* end of command line args */
|
|
YY_BREAK
|
|
case 16:
|
|
YY_RULE_SETUP
|
|
#line 209 "toke.l"
|
|
{
|
|
LEXTRACE("ARG ");
|
|
if (!fill_args(yytext, yyleng, sawspace))
|
|
yyterminate();
|
|
sawspace = FALSE;
|
|
} /* a command line arg */
|
|
YY_BREAK
|
|
|
|
case 17:
|
|
YY_RULE_SETUP
|
|
#line 217 "toke.l"
|
|
{
|
|
char *path;
|
|
|
|
if ((path = parse_include(yytext)) == NULL)
|
|
yyterminate();
|
|
|
|
LEXTRACE("INCLUDE\n");
|
|
|
|
/* Push current buffer and switch to include file */
|
|
if (!push_include(path))
|
|
yyterminate();
|
|
}
|
|
YY_BREAK
|
|
case 18:
|
|
YY_RULE_SETUP
|
|
#line 230 "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 19:
|
|
YY_RULE_SETUP
|
|
#line 259 "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 20:
|
|
YY_RULE_SETUP
|
|
#line 279 "toke.l"
|
|
{
|
|
/* cmnd does not require passwd for this user */
|
|
LEXTRACE("NOPASSWD ");
|
|
return(NOPASSWD);
|
|
}
|
|
YY_BREAK
|
|
case 21:
|
|
YY_RULE_SETUP
|
|
#line 285 "toke.l"
|
|
{
|
|
/* cmnd requires passwd for this user */
|
|
LEXTRACE("PASSWD ");
|
|
return(PASSWD);
|
|
}
|
|
YY_BREAK
|
|
case 22:
|
|
YY_RULE_SETUP
|
|
#line 291 "toke.l"
|
|
{
|
|
LEXTRACE("NOEXEC ");
|
|
return(NOEXEC);
|
|
}
|
|
YY_BREAK
|
|
case 23:
|
|
YY_RULE_SETUP
|
|
#line 296 "toke.l"
|
|
{
|
|
LEXTRACE("EXEC ");
|
|
return(EXEC);
|
|
}
|
|
YY_BREAK
|
|
case 24:
|
|
YY_RULE_SETUP
|
|
#line 301 "toke.l"
|
|
{
|
|
LEXTRACE("SETENV ");
|
|
return(SETENV);
|
|
}
|
|
YY_BREAK
|
|
case 25:
|
|
YY_RULE_SETUP
|
|
#line 306 "toke.l"
|
|
{
|
|
LEXTRACE("NOSETENV ");
|
|
return(NOSETENV);
|
|
}
|
|
YY_BREAK
|
|
case 26:
|
|
YY_RULE_SETUP
|
|
#line 311 "toke.l"
|
|
{
|
|
/* netgroup */
|
|
if (!fill(yytext, yyleng))
|
|
yyterminate();
|
|
LEXTRACE("NETGROUP ");
|
|
return(NETGROUP);
|
|
}
|
|
YY_BREAK
|
|
case 27:
|
|
YY_RULE_SETUP
|
|
#line 319 "toke.l"
|
|
{
|
|
/* UN*X group */
|
|
if (!fill(yytext, yyleng))
|
|
yyterminate();
|
|
LEXTRACE("USERGROUP ");
|
|
return(USERGROUP);
|
|
}
|
|
YY_BREAK
|
|
case 28:
|
|
YY_RULE_SETUP
|
|
#line 327 "toke.l"
|
|
{
|
|
if (!fill(yytext, yyleng))
|
|
yyterminate();
|
|
LEXTRACE("NTWKADDR ");
|
|
return(NTWKADDR);
|
|
}
|
|
YY_BREAK
|
|
case 29:
|
|
YY_RULE_SETUP
|
|
#line 334 "toke.l"
|
|
{
|
|
if (!fill(yytext, yyleng))
|
|
yyterminate();
|
|
LEXTRACE("NTWKADDR ");
|
|
return(NTWKADDR);
|
|
}
|
|
YY_BREAK
|
|
case 30:
|
|
YY_RULE_SETUP
|
|
#line 341 "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 352 "toke.l"
|
|
{
|
|
if (!ipv6_valid(yytext)) {
|
|
LEXTRACE("ERROR ");
|
|
return(ERROR);
|
|
}
|
|
if (!fill(yytext, yyleng))
|
|
yyterminate();
|
|
LEXTRACE("NTWKADDR ");
|
|
return(NTWKADDR);
|
|
}
|
|
YY_BREAK
|
|
case 32:
|
|
YY_RULE_SETUP
|
|
#line 363 "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 33:
|
|
YY_RULE_SETUP
|
|
#line 385 "toke.l"
|
|
{
|
|
/* no command args allowed for Defaults!/path */
|
|
if (!fill_cmnd(yytext, yyleng))
|
|
yyterminate();
|
|
LEXTRACE("COMMAND ");
|
|
return(COMMAND);
|
|
}
|
|
YY_BREAK
|
|
case 34:
|
|
YY_RULE_SETUP
|
|
#line 393 "toke.l"
|
|
{
|
|
BEGIN GOTCMND;
|
|
LEXTRACE("COMMAND ");
|
|
if (!fill_cmnd(yytext, yyleng))
|
|
yyterminate();
|
|
} /* sudo -e */
|
|
YY_BREAK
|
|
case 35:
|
|
YY_RULE_SETUP
|
|
#line 400 "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 36:
|
|
YY_RULE_SETUP
|
|
#line 415 "toke.l"
|
|
{
|
|
/* a word */
|
|
if (!fill(yytext, yyleng))
|
|
yyterminate();
|
|
LEXTRACE("WORD(4) ");
|
|
return(WORD);
|
|
}
|
|
YY_BREAK
|
|
case 37:
|
|
YY_RULE_SETUP
|
|
#line 423 "toke.l"
|
|
{
|
|
LEXTRACE("( ");
|
|
return ('(');
|
|
}
|
|
YY_BREAK
|
|
case 38:
|
|
YY_RULE_SETUP
|
|
#line 428 "toke.l"
|
|
{
|
|
LEXTRACE(") ");
|
|
return(')');
|
|
}
|
|
YY_BREAK
|
|
case 39:
|
|
YY_RULE_SETUP
|
|
#line 433 "toke.l"
|
|
{
|
|
LEXTRACE(", ");
|
|
return(',');
|
|
} /* return ',' */
|
|
YY_BREAK
|
|
case 40:
|
|
YY_RULE_SETUP
|
|
#line 438 "toke.l"
|
|
{
|
|
LEXTRACE("= ");
|
|
return('=');
|
|
} /* return '=' */
|
|
YY_BREAK
|
|
case 41:
|
|
YY_RULE_SETUP
|
|
#line 443 "toke.l"
|
|
{
|
|
LEXTRACE(": ");
|
|
return(':');
|
|
} /* return ':' */
|
|
YY_BREAK
|
|
case 42:
|
|
YY_RULE_SETUP
|
|
#line 448 "toke.l"
|
|
{
|
|
if (yyleng % 2 == 1)
|
|
return('!'); /* return '!' */
|
|
}
|
|
YY_BREAK
|
|
case 43:
|
|
YY_RULE_SETUP
|
|
#line 453 "toke.l"
|
|
{
|
|
BEGIN INITIAL;
|
|
++sudolineno;
|
|
LEXTRACE("\n");
|
|
return(COMMENT);
|
|
} /* return newline */
|
|
YY_BREAK
|
|
case 44:
|
|
YY_RULE_SETUP
|
|
#line 460 "toke.l"
|
|
{ /* throw away space/tabs */
|
|
sawspace = TRUE; /* but remember for fill_args */
|
|
}
|
|
YY_BREAK
|
|
case 45:
|
|
YY_RULE_SETUP
|
|
#line 464 "toke.l"
|
|
{
|
|
sawspace = TRUE; /* remember for fill_args */
|
|
++sudolineno;
|
|
LEXTRACE("\n\t");
|
|
} /* throw away EOL after \ */
|
|
YY_BREAK
|
|
case 46:
|
|
YY_RULE_SETUP
|
|
#line 470 "toke.l"
|
|
{
|
|
BEGIN INITIAL;
|
|
++sudolineno;
|
|
LEXTRACE("\n");
|
|
return(COMMENT);
|
|
} /* comment, not uid/gid */
|
|
YY_BREAK
|
|
case 47:
|
|
YY_RULE_SETUP
|
|
#line 477 "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 482 "toke.l"
|
|
{
|
|
if (YY_START != INITIAL) {
|
|
BEGIN INITIAL;
|
|
LEXTRACE("ERROR ");
|
|
return(ERROR);
|
|
}
|
|
if (!pop_include())
|
|
yyterminate();
|
|
}
|
|
YY_BREAK
|
|
case 48:
|
|
YY_RULE_SETUP
|
|
#line 492 "toke.l"
|
|
ECHO;
|
|
YY_BREAK
|
|
#line 2190 "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 >= 538 )
|
|
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 >= 538 )
|
|
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 == 537);
|
|
|
|
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 492 "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));
|
|
}
|
|
|
|
#define SPECIAL(c) \
|
|
((c) == ',' || (c) == ':' || (c) == '=' || (c) == ' ' || (c) == '\t' || (c) == '#')
|
|
|
|
static int
|
|
fill_cmnd(src, len)
|
|
char *src;
|
|
int len;
|
|
{
|
|
char *dst;
|
|
int i;
|
|
|
|
arg_len = arg_size = 0;
|
|
|
|
dst = yylval.command.cmnd = (char *) malloc(len + 1);
|
|
if (yylval.command.cmnd == NULL) {
|
|
yyerror("unable to allocate memory");
|
|
return(FALSE);
|
|
}
|
|
|
|
/* Copy the string and collapse any escaped sudo-specific characters. */
|
|
for (i = 0; i < len; i++) {
|
|
if (src[i] == '\\' && i != len - 1 && SPECIAL(src[i + 1]))
|
|
*dst++ = src[++i];
|
|
else
|
|
*dst++ = src[i];
|
|
}
|
|
*dst = '\0';
|
|
|
|
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 = 0, subst = 0;
|
|
size_t shost_len = 0;
|
|
|
|
/* 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)) {
|
|
if (ep[0] == '%' && ep[1] == 'h') {
|
|
shost_len = strlen(user_shost);
|
|
len += shost_len - 2;
|
|
subst = 1;
|
|
}
|
|
ep++;
|
|
}
|
|
|
|
/* Make a copy of path and return it. */
|
|
len += (int)(ep - cp);
|
|
if ((path = malloc(len + 1)) == NULL)
|
|
yyerror("unable to allocate memory");
|
|
if (subst) {
|
|
/* substitute for %h */
|
|
char *pp = path;
|
|
while (cp < ep) {
|
|
if (cp[0] == '%' && cp[1] == 'h') {
|
|
memcpy(pp, user_shost, shost_len);
|
|
pp += shost_len;
|
|
cp += 2;
|
|
}
|
|
*pp++ = *cp++;
|
|
}
|
|
*pp = '\0';
|
|
} else {
|
|
memcpy(path, cp, len);
|
|
path[len] = '\0';
|
|
}
|
|
|
|
/* Push any excess characters (e.g. comment, newline) back to the lexer */
|
|
if (*ep != '\0')
|
|
yyless((int)(ep - base));
|
|
|
|
return(path);
|
|
}
|
|
|
|
/*
|
|
* 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);
|
|
}
|