2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-22 18:08:23 +00:00
sudo/toke.c

2792 lines
83 KiB
C
Raw Normal View History

2004-10-26 22:29:32 +00:00
#line 2 "toke.c"
2004-02-13 21:37:02 +00:00
/* $OpenBSD: flex.skl,v 1.8 2004/02/09 11:38:31 espie Exp $ */
1999-01-17 21:42:12 +00:00
/* 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>
1999-01-17 21:42:12 +00:00
/* 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)
2004-10-26 22:29:32 +00:00
#define yywrap() 1
#define YY_SKIP_YYWRAP
1999-01-17 21:42:12 +00:00
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;
2004-09-27 16:08:18 +00:00
#define YY_NUM_RULES 42
#define YY_END_OF_BUFFER 43
2004-10-26 22:29:32 +00:00
static yyconst short int yy_accept[385] =
1999-01-17 21:42:12 +00:00
{ 0,
2001-12-12 20:11:47 +00:00
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2004-09-27 16:08:18 +00:00
0, 0, 43, 32, 38, 37, 36, 41, 32, 26,
41, 32, 33, 32, 32, 32, 32, 35, 34, 27,
27, 27, 27, 27, 41, 32, 41, 27, 27, 27,
27, 27, 28, 41, 28, 29, 28, 28, 28, 28,
28, 27, 27, 27, 27, 27, 41, 28, 1, 12,
11, 12, 11, 11, 41, 41, 2, 8, 8, 8,
3, 8, 4, 41, 32, 0, 38, 36, 0, 40,
23, 0, 22, 0, 31, 31, 0, 32, 32, 32,
32, 32, 27, 27, 27, 27, 27, 32, 39, 32,
0, 32, 32, 32, 32, 32, 28, 0, 28, 23,
0, 22, 0, 28, 0, 28, 28, 28, 28, 28,
27, 27, 27, 27, 27, 28, 28, 1, 12, 12,
10, 9, 10, 0, 2, 8, 0, 8, 0, 0,
5, 6, 8, 8, 0, 32, 32, 32, 27, 27,
27, 27, 27, 27, 32, 0, 32, 32, 32, 32,
32, 28, 28, 28, 27, 27, 27, 27, 27, 27,
28, 7, 7, 0, 7, 8, 32, 32, 32, 32,
32, 27, 27, 27, 27, 27, 27, 32, 0, 32,
32, 32, 28, 28, 28, 28, 28, 27, 27, 27,
27, 27, 27, 28, 7, 32, 32, 32, 0, 19,
27, 27, 27, 27, 27, 32, 0, 32, 32, 28,
28, 28, 27, 27, 27, 27, 27, 28, 32, 32,
32, 32, 32, 27, 27, 27, 27, 27, 32, 0,
32, 32, 28, 28, 28, 28, 28, 27, 27, 27,
27, 27, 28, 24, 24, 24, 27, 0, 18, 27,
27, 0, 17, 32, 0, 32, 32, 24, 24, 24,
27, 27, 27, 28, 32, 24, 24, 24, 24, 0,
21, 27, 27, 30, 0, 32, 14, 28, 24, 24,
24, 24, 27, 27, 28, 32, 25, 25, 25, 27,
2004-10-26 22:29:32 +00:00
0, 16, 0, 32, 0, 32, 28, 25, 25, 25,
27, 32, 32, 25, 25, 25, 25, 25, 0, 20,
0, 15, 14, 0, 14, 0, 28, 28, 25, 25,
25, 25, 25, 32, 32, 32, 25, 25, 0, 13,
2004-10-26 22:29:32 +00:00
28, 28, 28, 25, 25, 32, 32, 32, 32, 32,
28, 28, 28, 28, 28, 32, 32, 32, 28, 28,
28, 32, 32, 32, 32, 32, 28, 28, 28, 28,
28, 24, 24, 24, 24, 24, 24, 24, 24, 24,
24, 24, 24, 0
1999-01-17 21:42:12 +00:00
} ;
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,
2004-05-17 22:10:20 +00:00
9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
19, 20, 21, 22, 22, 22, 22, 23, 1, 1,
2004-10-26 22:29:32 +00:00
24, 25, 10, 26, 27, 28, 29, 30, 31, 28,
28, 32, 33, 28, 28, 28, 34, 35, 36, 37,
28, 38, 39, 40, 41, 28, 42, 43, 28, 28,
10, 44, 10, 1, 45, 1, 46, 47, 48, 49,
50, 51, 47, 47, 52, 47, 47, 53, 54, 55,
56, 47, 47, 57, 58, 59, 60, 47, 47, 47,
47, 47, 1, 1, 1, 1, 1, 1, 1, 1,
1999-01-17 21:42:12 +00:00
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1
} ;
2004-10-26 22:29:32 +00:00
static yyconst int yy_meta[61] =
1999-01-17 21:42:12 +00:00
{ 0,
2001-12-12 20:11:47 +00:00
1, 2, 2, 3, 1, 4, 1, 3, 3, 1,
2004-05-17 22:10:20 +00:00
1, 2, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 5, 4, 3, 1, 1, 1, 1, 1,
2004-09-24 18:11:19 +00:00
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2004-10-26 22:29:32 +00:00
1, 1, 1, 6, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7
1999-01-17 21:42:12 +00:00
} ;
2004-10-26 22:29:32 +00:00
static yyconst short int yy_base[407] =
1999-01-17 21:42:12 +00:00
{ 0,
2004-10-26 22:29:32 +00:00
0, 55, 96, 0, 60, 61, 155, 160, 203, 262,
321, 364, 1453, 1394, 1435, 2039, 1425, 1417, 1367, 2039,
2039, 1362, 2039, 166, 176, 197, 253, 2039, 2039, 408,
1362, 1368, 1367, 1375, 467, 20, 170, 1346, 1349, 1342,
1337, 1337, 1350, 57, 1347, 2039, 1345, 177, 330, 339,
373, 492, 1344, 1346, 1345, 1343, 551, 21, 1365, 0,
2039, 1361, 0, 2039, 567, 69, 0, 1319, 580, 136,
2039, 144, 2039, 80, 1315, 221, 1356, 1353, 1353, 2039,
1311, 275, 1295, 492, 376, 1267, 591, 319, 157, 609,
618, 627, 0, 1279, 1266, 55, 1254, 232, 2039, 46,
173, 145, 180, 168, 188, 44, 1238, 652, 272, 1237,
661, 1227, 685, 670, 694, 704, 194, 713, 722, 733,
0, 1239, 1234, 205, 1229, 299, 133, 1265, 0, 1262,
293, 2039, 2039, 301, 0, 1219, 556, 756, 337, 359,
2039, 2039, 1180, 327, 582, 753, 765, 774, 1194, 1180,
1151, 1148, 1148, 1126, 342, 234, 329, 234, 338, 356,
355, 785, 794, 803, 1135, 1112, 1093, 1099, 1107, 1067,
360, 1061, 2039, 367, 825, 830, 839, 552, 859, 868,
877, 408, 1064, 1045, 1040, 1035, 1031, 428, 429, 361,
143, 430, 888, 558, 897, 906, 917, 585, 1006, 1014,
1001, 996, 974, 433, 573, 926, 935, 946, 587, 2039,
962, 930, 906, 863, 871, 436, 553, 352, 442, 955,
964, 975, 856, 805, 793, 759, 759, 440, 984, 598,
993, 1004, 1013, 727, 596, 716, 673, 599, 605, 237,
565, 607, 1022, 606, 1033, 1042, 1051, 674, 657, 671,
663, 681, 638, 1063, 1072, 1081, 690, 705, 2039, 652,
642, 714, 2039, 701, 618, 711, 523, 1093, 1102, 1111,
839, 619, 603, 804, 1122, 637, 1132, 1141, 1152, 841,
2039, 569, 842, 517, 562, 655, 827, 1161, 824, 1171,
1182, 1191, 449, 843, 437, 1200, 1211, 1220, 1229, 844,
849, 2039, 1250, 720, 389, 370, 1240, 1258, 1269, 1278,
1172, 1287, 732, 1298, 1307, 1316, 1327, 1336, 1338, 2039,
404, 310, 287, 1360, 284, 1384, 1357, 826, 1396, 1405,
1414, 1425, 1434, 1443, 1454, 1463, 1472, 1479, 302, 2039,
1492, 1508, 1521, 1528, 1487, 1537, 885, 1557, 1566, 1575,
1586, 886, 1595, 1604, 1615, 1624, 1633, 1644, 1653, 1662,
1673, 1682, 944, 1691, 1702, 1711, 1720, 973, 1731, 1740,
1749, 1760, 1769, 1778, 1789, 1798, 1807, 125, 1818, 1827,
121, 1836, 1847, 2039, 1891, 1898, 1905, 1912, 1919, 1926,
1933, 1940, 1947, 1954, 1961, 1968, 1975, 84, 1982, 1989,
1996, 2003, 2010, 2017, 2024, 2031
1999-01-17 21:42:12 +00:00
} ;
2004-10-26 22:29:32 +00:00
static yyconst short int yy_def[407] =
1999-01-17 21:42:12 +00:00
{ 0,
2004-10-26 22:29:32 +00:00
384, 1, 384, 3, 1, 1, 385, 385, 386, 386,
387, 387, 384, 388, 384, 384, 384, 389, 390, 384,
384, 391, 384, 392, 388, 388, 388, 384, 384, 384,
30, 30, 30, 30, 388, 388, 389, 30, 30, 30,
30, 30, 393, 384, 394, 384, 395, 396, 393, 393,
393, 384, 52, 52, 52, 52, 393, 393, 384, 397,
384, 397, 397, 384, 384, 384, 398, 399, 400, 399,
384, 399, 384, 401, 388, 388, 384, 384, 389, 384,
390, 390, 391, 391, 392, 402, 388, 388, 388, 388,
388, 388, 30, 30, 30, 30, 30, 388, 384, 388,
389, 388, 388, 388, 388, 388, 393, 393, 384, 394,
394, 395, 395, 396, 393, 393, 393, 393, 393, 393,
52, 52, 52, 52, 52, 393, 393, 384, 397, 397,
384, 384, 384, 384, 398, 399, 399, 400, 403, 400,
384, 384, 399, 399, 384, 388, 388, 388, 30, 30,
30, 30, 30, 30, 388, 389, 388, 388, 388, 388,
388, 393, 393, 393, 52, 52, 52, 52, 52, 52,
393, 399, 384, 403, 400, 400, 388, 388, 388, 388,
388, 30, 30, 30, 30, 30, 30, 388, 389, 388,
388, 388, 393, 393, 393, 393, 393, 52, 52, 52,
52, 52, 52, 393, 403, 388, 388, 388, 384, 384,
30, 30, 30, 30, 30, 388, 389, 388, 388, 393,
393, 393, 52, 52, 52, 52, 52, 393, 388, 388,
388, 388, 388, 30, 30, 30, 30, 30, 388, 389,
388, 388, 393, 393, 393, 393, 393, 52, 52, 52,
52, 52, 393, 388, 388, 388, 30, 384, 384, 30,
30, 384, 384, 388, 389, 388, 388, 393, 393, 393,
52, 52, 52, 393, 388, 388, 388, 388, 388, 384,
384, 30, 30, 388, 389, 388, 388, 393, 393, 393,
393, 393, 52, 52, 393, 388, 388, 388, 388, 30,
384, 384, 389, 388, 404, 405, 393, 393, 393, 393,
2004-10-26 22:29:32 +00:00
52, 388, 388, 388, 388, 388, 388, 388, 384, 384,
406, 388, 404, 404, 405, 405, 393, 393, 393, 393,
393, 393, 393, 388, 388, 388, 388, 388, 406, 384,
2004-10-26 22:29:32 +00:00
393, 393, 393, 393, 393, 388, 388, 388, 388, 388,
393, 393, 393, 393, 393, 388, 388, 388, 393, 393,
393, 388, 388, 388, 388, 388, 393, 393, 393, 393,
393, 388, 388, 388, 393, 393, 393, 388, 388, 388,
393, 393, 393, 0, 384, 384, 384, 384, 384, 384,
384, 384, 384, 384, 384, 384, 384, 384, 384, 384,
384, 384, 384, 384, 384, 384
1999-01-17 21:42:12 +00:00
} ;
static yyconst short int yy_nxt[2100] =
1999-01-17 21:42:12 +00:00
{ 0,
2004-05-17 22:10:20 +00:00
14, 15, 16, 17, 14, 18, 19, 20, 21, 14,
22, 23, 14, 14, 24, 25, 26, 27, 25, 25,
2004-10-26 22:29:32 +00:00
25, 25, 28, 29, 21, 14, 30, 30, 30, 30,
31, 30, 30, 32, 33, 30, 34, 30, 30, 30,
30, 30, 30, 35, 14, 14, 14, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 36, 14, 14,
37, 59, 59, 76, 108, 21, 21, 21, 21, 109,
134, 99, 109, 109, 109, 109, 109, 109, 109, 100,
127, 144, 99, 38, 39, 151, 40, 76, 152, 76,
135, 153, 41, 161, 155, 42, 43, 15, 16, 17,
43, 44, 45, 21, 46, 43, 47, 23, 43, 43,
48, 49, 50, 51, 49, 49, 49, 49, 28, 29,
21, 43, 52, 52, 52, 52, 53, 52, 52, 54,
55, 52, 56, 52, 52, 52, 52, 52, 52, 57,
43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
2004-10-26 22:29:32 +00:00
43, 43, 43, 58, 43, 43, 15, 61, 62, 141,
63, 15, 61, 62, 108, 63, 64, 142, 76, 86,
88, 64, 80, 86, 86, 80, 108, 64, 63, 137,
86, 171, 64, 63, 86, 86, 76, 137, 76, 88,
86, 89, 89, 89, 89, 89, 89, 89, 65, 157,
76, 86, 219, 65, 15, 16, 17, 116, 18, 87,
88, 76, 90, 90, 90, 90, 90, 90, 90, 76,
115, 101, 75, 76, 75, 159, 75, 156, 75, 75,
158, 76, 75, 134, 99, 167, 80, 108, 168, 80,
76, 169, 160, 75, 75, 75, 66, 67, 67, 67,
67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
67, 67, 67, 15, 16, 17, 88, 18, 91, 91,
91, 91, 91, 92, 89, 76, 81, 76, 81, 191,
81, 189, 81, 81, 109, 265, 81, 109, 109, 109,
109, 109, 109, 109, 134, 99, 76, 81, 81, 81,
2004-09-27 16:08:18 +00:00
134, 99, 134, 99, 340, 66, 67, 67, 67, 67,
67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
2004-10-26 22:29:32 +00:00
67, 67, 15, 16, 17, 69, 18, 326, 134, 99,
324, 70, 71, 72, 146, 147, 148, 146, 146, 146,
2004-10-26 22:29:32 +00:00
146, 173, 108, 116, 73, 117, 117, 117, 117, 117,
117, 117, 116, 76, 118, 118, 118, 118, 118, 118,
2004-10-26 22:29:32 +00:00
118, 139, 76, 175, 74, 15, 16, 17, 69, 18,
137, 205, 76, 108, 70, 71, 72, 190, 241, 86,
174, 76, 108, 86, 86, 76, 116, 73, 119, 119,
119, 119, 119, 120, 117, 76, 190, 188, 76, 76,
86, 192, 176, 108, 76, 218, 340, 74, 75, 209,
2004-10-26 22:29:32 +00:00
174, 190, 75, 326, 75, 204, 108, 75, 75, 87,
75, 75, 75, 93, 93, 93, 93, 93, 93, 93,
210, 80, 324, 75, 93, 93, 93, 93, 93, 93,
93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
2004-10-26 22:29:32 +00:00
93, 76, 93, 75, 75, 75, 75, 75, 75, 75,
75, 75, 75, 75, 75, 75, 75, 75, 98, 99,
75, 76, 75, 76, 75, 75, 108, 216, 75, 76,
108, 217, 228, 108, 239, 76, 311, 190, 253, 75,
2004-10-26 22:29:32 +00:00
75, 75, 107, 83, 242, 83, 107, 83, 107, 83,
83, 107, 107, 83, 107, 107, 107, 121, 121, 121,
121, 121, 121, 121, 83, 83, 83, 107, 121, 121,
2004-09-27 16:08:18 +00:00
121, 121, 121, 121, 121, 121, 121, 121, 121, 121,
121, 121, 121, 121, 121, 108, 121, 107, 107, 107,
2004-09-27 16:08:18 +00:00
107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
2004-10-26 22:29:32 +00:00
107, 107, 126, 99, 107, 80, 107, 136, 107, 107,
76, 136, 107, 303, 80, 177, 76, 136, 131, 99,
2004-10-26 22:29:32 +00:00
132, 193, 133, 107, 107, 107, 132, 173, 133, 136,
287, 139, 139, 86, 136, 139, 209, 86, 209, 133,
133, 139, 85, 86, 75, 76, 85, 258, 75, 75,
262, 108, 85, 139, 86, 86, 300, 210, 76, 210,
2004-10-26 22:29:32 +00:00
133, 229, 240, 85, 85, 75, 174, 266, 259, 243,
80, 263, 88, 140, 89, 89, 89, 89, 89, 89,
89, 88, 294, 89, 89, 89, 89, 89, 89, 89,
2004-10-26 22:29:32 +00:00
88, 76, 89, 89, 89, 89, 89, 89, 76, 108,
76, 275, 76, 107, 293, 107, 264, 107, 258, 107,
2004-10-26 22:29:32 +00:00
107, 76, 110, 107, 110, 267, 110, 285, 110, 110,
76, 283, 110, 86, 107, 107, 107, 86, 86, 259,
76, 108, 262, 110, 110, 110, 112, 282, 112, 274,
2004-10-26 22:29:32 +00:00
112, 280, 112, 112, 86, 114, 112, 107, 76, 114,
304, 107, 107, 263, 273, 114, 258, 112, 112, 112,
272, 271, 281, 115, 261, 262, 114, 114, 107, 162,
2004-10-26 22:29:32 +00:00
163, 164, 162, 162, 162, 162, 116, 259, 117, 117,
117, 117, 117, 117, 117, 116, 263, 117, 117, 117,
117, 117, 117, 117, 76, 312, 116, 108, 117, 117,
117, 117, 117, 117, 76, 260, 108, 139, 139, 284,
172, 139, 286, 76, 257, 108, 177, 139, 178, 178,
178, 178, 178, 178, 178, 76, 108, 322, 177, 139,
179, 179, 179, 179, 179, 179, 179, 177, 252, 180,
180, 180, 180, 180, 181, 178, 76, 251, 193, 140,
2004-10-26 22:29:32 +00:00
194, 194, 194, 194, 194, 194, 194, 193, 76, 195,
195, 195, 195, 195, 195, 195, 193, 76, 196, 196,
196, 196, 196, 197, 194, 250, 139, 139, 108, 172,
139, 139, 139, 249, 175, 139, 139, 108, 288, 327,
2004-10-26 22:29:32 +00:00
280, 139, 280, 301, 301, 319, 108, 108, 139, 305,
301, 305, 306, 139, 206, 207, 208, 206, 206, 206,
206, 281, 295, 281, 302, 302, 320, 108, 140, 108,
76, 302, 177, 140, 178, 178, 178, 178, 178, 178,
178, 177, 76, 178, 178, 178, 178, 178, 178, 178,
177, 248, 178, 178, 178, 178, 178, 178, 346, 351,
2004-10-26 22:29:32 +00:00
238, 237, 76, 220, 221, 222, 220, 220, 220, 220,
2004-10-26 22:29:32 +00:00
193, 76, 194, 194, 194, 194, 194, 194, 194, 193,
76, 194, 194, 194, 194, 194, 194, 194, 76, 108,
2004-10-26 22:29:32 +00:00
193, 108, 194, 194, 194, 194, 194, 194, 236, 229,
108, 230, 230, 230, 230, 230, 230, 230, 229, 108,
231, 231, 231, 231, 231, 231, 231, 362, 235, 229,
2004-10-26 22:29:32 +00:00
108, 232, 232, 232, 232, 232, 233, 230, 243, 76,
244, 244, 244, 244, 244, 244, 244, 243, 76, 245,
245, 245, 245, 245, 245, 245, 367, 76, 243, 76,
246, 246, 246, 246, 246, 247, 244, 234, 108, 254,
2004-10-26 22:29:32 +00:00
255, 256, 254, 254, 254, 254, 229, 108, 230, 230,
230, 230, 230, 230, 230, 227, 108, 229, 108, 230,
2004-10-26 22:29:32 +00:00
230, 230, 230, 230, 230, 230, 229, 76, 230, 230,
230, 230, 230, 230, 226, 225, 76, 268, 269, 270,
268, 268, 268, 268, 224, 223, 243, 76, 244, 244,
2004-10-26 22:29:32 +00:00
244, 244, 244, 244, 244, 243, 76, 244, 244, 244,
244, 244, 244, 244, 243, 108, 244, 244, 244, 244,
244, 244, 215, 214, 213, 212, 108, 275, 276, 276,
2004-10-26 22:29:32 +00:00
276, 276, 276, 276, 276, 108, 275, 277, 277, 277,
277, 277, 277, 277, 108, 275, 278, 278, 278, 278,
278, 279, 276, 211, 137, 203, 76, 288, 289, 289,
2004-10-26 22:29:32 +00:00
289, 289, 289, 289, 289, 76, 288, 290, 290, 290,
290, 290, 290, 290, 76, 288, 291, 291, 291, 291,
291, 292, 289, 202, 201, 200, 108, 296, 297, 298,
299, 296, 296, 296, 199, 108, 275, 276, 276, 276,
2004-10-26 22:29:32 +00:00
276, 276, 276, 276, 108, 275, 276, 276, 276, 276,
276, 276, 276, 198, 187, 76, 275, 276, 276, 276,
276, 276, 276, 319, 186, 76, 307, 308, 309, 310,
307, 307, 307, 185, 76, 288, 289, 289, 289, 289,
289, 289, 289, 184, 320, 76, 288, 289, 289, 289,
2004-10-26 22:29:32 +00:00
289, 289, 289, 289, 108, 288, 289, 289, 289, 289,
289, 289, 183, 312, 108, 313, 313, 313, 313, 313,
313, 313, 182, 137, 312, 108, 314, 314, 314, 314,
2004-10-26 22:29:32 +00:00
314, 314, 314, 312, 108, 315, 315, 315, 315, 315,
316, 317, 312, 76, 318, 318, 318, 313, 313, 313,
313, 303, 80, 327, 76, 328, 328, 328, 328, 328,
328, 328, 137, 76, 321, 130, 128, 170, 166, 165,
113, 327, 76, 329, 329, 329, 329, 329, 329, 329,
111, 108, 327, 108, 330, 330, 330, 330, 330, 331,
332, 327, 154, 333, 333, 333, 328, 328, 328, 328,
150, 108, 334, 335, 336, 334, 334, 334, 334, 149,
145, 312, 108, 317, 317, 317, 317, 317, 317, 317,
312, 108, 317, 317, 317, 317, 317, 317, 317, 312,
76, 317, 317, 317, 317, 317, 317, 337, 84, 319,
312, 76, 337, 337, 337, 337, 337, 337, 337, 312,
76, 338, 338, 338, 82, 80, 78, 77, 76, 76,
320, 323, 137, 323, 130, 323, 128, 323, 323, 125,
76, 323, 341, 342, 343, 341, 341, 341, 341, 76,
124, 123, 323, 323, 323, 325, 122, 325, 113, 325,
111, 325, 325, 108, 106, 325, 105, 104, 103, 102,
108, 97, 96, 95, 94, 84, 325, 325, 325, 327,
82, 332, 332, 332, 332, 332, 332, 332, 327, 80,
332, 332, 332, 332, 332, 332, 332, 327, 78, 332,
332, 332, 332, 332, 332, 344, 77, 76, 327, 108,
344, 344, 344, 344, 344, 344, 344, 327, 108, 345,
345, 345, 384, 384, 384, 384, 346, 108, 347, 347,
347, 347, 347, 347, 347, 384, 384, 346, 108, 348,
348, 348, 348, 348, 348, 348, 346, 108, 349, 349,
349, 349, 349, 350, 347, 384, 76, 337, 337, 337,
337, 337, 337, 337, 338, 338, 338, 76, 384, 384,
384, 384, 345, 345, 345, 351, 76, 352, 352, 352,
352, 352, 352, 352, 384, 76, 384, 384, 384, 384,
384, 351, 76, 353, 353, 353, 353, 353, 353, 353,
108, 384, 384, 384, 351, 108, 354, 354, 354, 354,
354, 355, 352, 344, 344, 344, 344, 344, 344, 344,
384, 108, 356, 357, 358, 356, 356, 356, 356, 384,
384, 384, 384, 384, 108, 384, 384, 384, 384, 384,
346, 108, 347, 347, 347, 347, 347, 347, 347, 346,
76, 347, 347, 347, 347, 347, 347, 347, 346, 384,
347, 347, 347, 347, 347, 347, 384, 384, 384, 384,
76, 359, 360, 361, 359, 359, 359, 359, 351, 76,
352, 352, 352, 352, 352, 352, 352, 351, 76, 352,
352, 352, 352, 352, 352, 352, 384, 384, 351, 108,
352, 352, 352, 352, 352, 352, 384, 362, 108, 363,
363, 363, 363, 363, 363, 363, 362, 108, 364, 364,
364, 364, 364, 364, 364, 384, 384, 362, 108, 365,
365, 365, 365, 365, 366, 363, 367, 76, 368, 368,
368, 368, 368, 368, 368, 367, 76, 369, 369, 369,
369, 369, 369, 369, 384, 384, 367, 76, 370, 370,
370, 370, 370, 371, 368, 384, 108, 372, 373, 374,
372, 372, 372, 372, 362, 108, 363, 363, 363, 363,
363, 363, 363, 384, 384, 362, 108, 363, 363, 363,
363, 363, 363, 363, 362, 76, 363, 363, 363, 363,
363, 363, 384, 384, 76, 375, 376, 377, 375, 375,
375, 375, 384, 384, 367, 76, 368, 368, 368, 368,
368, 368, 368, 367, 76, 368, 368, 368, 368, 368,
368, 368, 367, 108, 368, 368, 368, 368, 368, 368,
384, 384, 384, 384, 108, 378, 378, 378, 378, 378,
378, 378, 384, 108, 372, 372, 372, 372, 372, 372,
372, 384, 108, 379, 379, 379, 379, 379, 380, 378,
384, 384, 384, 76, 381, 381, 381, 381, 381, 381,
381, 384, 76, 375, 375, 375, 375, 375, 375, 375,
2004-10-26 22:29:32 +00:00
384, 76, 382, 382, 382, 382, 382, 383, 381, 384,
384, 384, 108, 378, 378, 378, 378, 378, 378, 378,
384, 108, 378, 378, 378, 378, 378, 378, 384, 384,
108, 381, 381, 381, 381, 381, 381, 381, 384, 384,
384, 76, 381, 381, 381, 381, 381, 381, 384, 384,
76, 384, 384, 384, 384, 384, 384, 384, 384, 108,
2004-10-26 22:29:32 +00:00
384, 384, 384, 384, 384, 384, 384, 384, 384, 384,
108, 60, 60, 60, 60, 60, 60, 60, 21, 21,
21, 21, 21, 21, 21, 68, 68, 68, 68, 68,
68, 68, 75, 384, 384, 384, 384, 75, 75, 79,
79, 79, 79, 79, 79, 79, 81, 384, 384, 384,
384, 81, 81, 83, 384, 384, 384, 384, 83, 83,
85, 384, 85, 384, 384, 85, 85, 107, 384, 384,
384, 384, 107, 107, 110, 384, 384, 384, 384, 110,
110, 112, 384, 384, 384, 384, 112, 112, 114, 384,
114, 384, 384, 114, 114, 129, 384, 129, 129, 384,
384, 129, 136, 384, 136, 384, 136, 136, 136, 138,
138, 138, 138, 138, 138, 138, 143, 143, 143, 143,
143, 143, 143, 86, 384, 86, 384, 384, 86, 86,
139, 139, 139, 139, 139, 139, 139, 323, 384, 384,
384, 384, 323, 323, 325, 384, 384, 384, 384, 325,
325, 339, 339, 339, 339, 339, 339, 339, 13, 384,
2004-10-26 22:29:32 +00:00
384, 384, 384, 384, 384, 384, 384, 384, 384, 384,
384, 384, 384, 384, 384, 384, 384, 384, 384, 384,
384, 384, 384, 384, 384, 384, 384, 384, 384, 384,
384, 384, 384, 384, 384, 384, 384, 384, 384, 384,
384, 384, 384, 384, 384, 384, 384, 384, 384, 384,
384, 384, 384, 384, 384, 384, 384, 384, 384
1999-01-17 21:42:12 +00:00
} ;
static yyconst short int yy_chk[2100] =
1999-01-17 21:42:12 +00:00
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1999-08-24 16:40:23 +00:00
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2004-10-26 22:29:32 +00:00
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2, 5, 6, 36, 58, 5, 6, 5, 6, 44,
66, 66, 44, 44, 44, 44, 44, 44, 44, 36,
58, 74, 74, 2, 2, 96, 2, 106, 96, 100,
398, 96, 2, 106, 100, 2, 3, 3, 3, 3,
2004-09-27 16:08:18 +00:00
1999-01-17 21:42:12 +00:00
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
2001-12-12 20:11:47 +00:00
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
2004-05-17 22:10:20 +00:00
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
2004-10-26 22:29:32 +00:00
3, 3, 3, 3, 3, 3, 7, 7, 7, 70,
7, 8, 8, 8, 381, 8, 7, 72, 378, 24,
89, 8, 37, 24, 24, 101, 127, 7, 7, 70,
48, 127, 8, 8, 48, 48, 191, 72, 102, 25,
24, 25, 25, 25, 25, 25, 25, 25, 7, 102,
89, 48, 191, 8, 9, 9, 9, 117, 9, 24,
26, 104, 26, 26, 26, 26, 26, 26, 26, 25,
48, 37, 76, 103, 76, 104, 76, 101, 76, 76,
103, 105, 76, 98, 98, 124, 156, 117, 124, 240,
26, 124, 105, 76, 76, 76, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 10, 10, 10, 27, 10, 27, 27,
27, 27, 27, 27, 27, 98, 82, 158, 82, 158,
82, 156, 82, 82, 109, 240, 82, 109, 109, 109,
109, 109, 109, 109, 131, 131, 27, 82, 82, 82,
126, 126, 134, 134, 339, 10, 10, 10, 10, 10,
10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
2004-10-26 22:29:32 +00:00
10, 10, 11, 11, 11, 11, 11, 325, 144, 144,
323, 11, 11, 11, 88, 88, 88, 88, 88, 88,
2004-10-26 22:29:32 +00:00
88, 139, 126, 49, 11, 49, 49, 49, 49, 49,
49, 49, 50, 322, 50, 50, 50, 50, 50, 50,
2004-10-26 22:29:32 +00:00
50, 140, 88, 140, 11, 12, 12, 12, 12, 12,
144, 174, 157, 49, 12, 12, 12, 157, 218, 85,
139, 159, 50, 85, 85, 155, 51, 12, 51, 51,
51, 51, 51, 51, 51, 218, 159, 155, 161, 160,
85, 160, 140, 171, 190, 190, 321, 12, 30, 182,
174, 161, 30, 306, 30, 171, 51, 30, 30, 85,
30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
182, 189, 305, 30, 30, 30, 30, 30, 30, 30,
30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
2004-10-26 22:29:32 +00:00
30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
30, 30, 30, 30, 30, 30, 30, 30, 35, 35,
35, 188, 35, 192, 35, 35, 204, 188, 35, 216,
295, 189, 204, 228, 216, 219, 293, 192, 228, 35,
2004-10-26 22:29:32 +00:00
35, 35, 52, 84, 219, 84, 52, 84, 52, 84,
2004-10-26 22:29:32 +00:00
84, 52, 52, 84, 52, 52, 52, 52, 52, 52,
52, 52, 52, 52, 84, 84, 84, 52, 52, 52,
2004-09-27 16:08:18 +00:00
52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
2004-10-26 22:29:32 +00:00
52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
52, 52, 57, 57, 57, 217, 57, 137, 57, 57,
284, 137, 57, 285, 285, 178, 267, 137, 65, 65,
2004-10-26 22:29:32 +00:00
65, 194, 65, 57, 57, 57, 65, 205, 65, 137,
267, 69, 69, 145, 69, 69, 198, 145, 209, 65,
65, 69, 87, 145, 87, 178, 87, 235, 87, 87,
238, 194, 87, 69, 145, 145, 282, 198, 241, 209,
2004-10-26 22:29:32 +00:00
65, 230, 217, 87, 87, 87, 205, 241, 235, 244,
265, 238, 90, 69, 90, 90, 90, 90, 90, 90,
90, 91, 273, 91, 91, 91, 91, 91, 91, 91,
2004-10-26 22:29:32 +00:00
92, 230, 92, 92, 92, 92, 92, 92, 239, 244,
242, 276, 90, 108, 272, 108, 239, 108, 249, 108,
2004-10-26 22:29:32 +00:00
108, 91, 111, 108, 111, 242, 111, 265, 111, 111,
92, 261, 111, 114, 108, 108, 108, 114, 114, 249,
276, 253, 252, 111, 111, 111, 113, 260, 113, 253,
2004-10-26 22:29:32 +00:00
113, 257, 113, 113, 114, 115, 113, 115, 286, 115,
286, 115, 115, 252, 251, 115, 258, 113, 113, 113,
250, 248, 257, 114, 237, 262, 115, 115, 115, 116,
2004-10-26 22:29:32 +00:00
116, 116, 116, 116, 116, 116, 118, 258, 118, 118,
118, 118, 118, 118, 118, 119, 262, 119, 119, 119,
119, 119, 119, 119, 264, 313, 120, 116, 120, 120,
120, 120, 120, 120, 266, 236, 118, 138, 138, 264,
138, 138, 266, 304, 234, 119, 146, 138, 146, 146,
2004-10-26 22:29:32 +00:00
146, 146, 146, 146, 146, 313, 120, 304, 147, 138,
147, 147, 147, 147, 147, 147, 147, 148, 227, 148,
148, 148, 148, 148, 148, 148, 146, 226, 162, 138,
2004-10-26 22:29:32 +00:00
162, 162, 162, 162, 162, 162, 162, 163, 147, 163,
163, 163, 163, 163, 163, 163, 164, 148, 164, 164,
164, 164, 164, 164, 164, 225, 175, 175, 162, 175,
175, 176, 176, 224, 176, 176, 175, 163, 289, 328,
2004-10-26 22:29:32 +00:00
271, 176, 280, 283, 294, 300, 164, 274, 175, 287,
301, 287, 287, 176, 177, 177, 177, 177, 177, 177,
177, 271, 274, 280, 283, 294, 300, 289, 175, 328,
2004-10-26 22:29:32 +00:00
287, 301, 179, 176, 179, 179, 179, 179, 179, 179,
179, 180, 177, 180, 180, 180, 180, 180, 180, 180,
181, 223, 181, 181, 181, 181, 181, 181, 347, 352,
2004-10-26 22:29:32 +00:00
215, 214, 179, 193, 193, 193, 193, 193, 193, 193,
2004-10-26 22:29:32 +00:00
195, 180, 195, 195, 195, 195, 195, 195, 195, 196,
181, 196, 196, 196, 196, 196, 196, 196, 347, 352,
2004-10-26 22:29:32 +00:00
197, 193, 197, 197, 197, 197, 197, 197, 213, 206,
195, 206, 206, 206, 206, 206, 206, 206, 207, 196,
207, 207, 207, 207, 207, 207, 207, 363, 212, 208,
2004-10-26 22:29:32 +00:00
197, 208, 208, 208, 208, 208, 208, 208, 220, 206,
220, 220, 220, 220, 220, 220, 220, 221, 207, 221,
221, 221, 221, 221, 221, 221, 368, 363, 222, 208,
222, 222, 222, 222, 222, 222, 222, 211, 220, 229,
2004-10-26 22:29:32 +00:00
229, 229, 229, 229, 229, 229, 231, 221, 231, 231,
231, 231, 231, 231, 231, 203, 368, 232, 222, 232,
2004-10-26 22:29:32 +00:00
232, 232, 232, 232, 232, 232, 233, 229, 233, 233,
233, 233, 233, 233, 202, 201, 231, 243, 243, 243,
243, 243, 243, 243, 200, 199, 245, 232, 245, 245,
2004-10-26 22:29:32 +00:00
245, 245, 245, 245, 245, 246, 233, 246, 246, 246,
246, 246, 246, 246, 247, 243, 247, 247, 247, 247,
247, 247, 187, 186, 185, 184, 245, 254, 254, 254,
2004-10-26 22:29:32 +00:00
254, 254, 254, 254, 254, 246, 255, 255, 255, 255,
255, 255, 255, 255, 247, 256, 256, 256, 256, 256,
256, 256, 256, 183, 172, 170, 254, 268, 268, 268,
2004-10-26 22:29:32 +00:00
268, 268, 268, 268, 268, 255, 269, 269, 269, 269,
269, 269, 269, 269, 256, 270, 270, 270, 270, 270,
270, 270, 270, 169, 168, 167, 268, 275, 275, 275,
275, 275, 275, 275, 166, 269, 277, 277, 277, 277,
2004-10-26 22:29:32 +00:00
277, 277, 277, 277, 270, 278, 278, 278, 278, 278,
278, 278, 278, 165, 154, 275, 279, 279, 279, 279,
279, 279, 279, 311, 153, 277, 288, 288, 288, 288,
288, 288, 288, 152, 278, 290, 290, 290, 290, 290,
290, 290, 290, 151, 311, 279, 291, 291, 291, 291,
2004-10-26 22:29:32 +00:00
291, 291, 291, 291, 288, 292, 292, 292, 292, 292,
292, 292, 150, 296, 290, 296, 296, 296, 296, 296,
296, 296, 149, 143, 297, 291, 297, 297, 297, 297,
2004-10-26 22:29:32 +00:00
297, 297, 297, 298, 292, 298, 298, 298, 298, 298,
298, 298, 299, 296, 299, 299, 299, 299, 299, 299,
299, 303, 303, 307, 297, 307, 307, 307, 307, 307,
307, 307, 136, 298, 303, 130, 128, 125, 123, 122,
112, 308, 299, 308, 308, 308, 308, 308, 308, 308,
110, 107, 309, 307, 309, 309, 309, 309, 309, 309,
309, 310, 97, 310, 310, 310, 310, 310, 310, 310,
95, 308, 312, 312, 312, 312, 312, 312, 312, 94,
86, 314, 309, 314, 314, 314, 314, 314, 314, 314,
315, 310, 315, 315, 315, 315, 315, 315, 315, 316,
312, 316, 316, 316, 316, 316, 316, 316, 83, 319,
317, 314, 317, 317, 317, 317, 317, 317, 317, 318,
315, 318, 318, 318, 81, 79, 78, 77, 75, 316,
319, 324, 68, 324, 62, 324, 59, 324, 324, 56,
317, 324, 327, 327, 327, 327, 327, 327, 327, 318,
55, 54, 324, 324, 324, 326, 53, 326, 47, 326,
45, 326, 326, 43, 42, 326, 41, 40, 39, 38,
327, 34, 33, 32, 31, 22, 326, 326, 326, 329,
19, 329, 329, 329, 329, 329, 329, 329, 330, 18,
330, 330, 330, 330, 330, 330, 330, 331, 17, 331,
331, 331, 331, 331, 331, 331, 15, 14, 332, 329,
332, 332, 332, 332, 332, 332, 332, 333, 330, 333,
333, 333, 13, 0, 0, 0, 334, 331, 334, 334,
334, 334, 334, 334, 334, 0, 0, 335, 332, 335,
335, 335, 335, 335, 335, 335, 336, 333, 336, 336,
336, 336, 336, 336, 336, 0, 334, 337, 337, 337,
337, 337, 337, 337, 338, 338, 338, 335, 0, 0,
0, 0, 345, 345, 345, 341, 336, 341, 341, 341,
341, 341, 341, 341, 0, 337, 0, 0, 0, 0,
0, 342, 338, 342, 342, 342, 342, 342, 342, 342,
345, 0, 0, 0, 343, 341, 343, 343, 343, 343,
343, 343, 343, 344, 344, 344, 344, 344, 344, 344,
0, 342, 346, 346, 346, 346, 346, 346, 346, 0,
0, 0, 0, 0, 343, 0, 0, 0, 0, 0,
348, 344, 348, 348, 348, 348, 348, 348, 348, 349,
346, 349, 349, 349, 349, 349, 349, 349, 350, 0,
350, 350, 350, 350, 350, 350, 0, 0, 0, 0,
348, 351, 351, 351, 351, 351, 351, 351, 353, 349,
353, 353, 353, 353, 353, 353, 353, 354, 350, 354,
354, 354, 354, 354, 354, 354, 0, 0, 355, 351,
355, 355, 355, 355, 355, 355, 0, 356, 353, 356,
356, 356, 356, 356, 356, 356, 357, 354, 357, 357,
357, 357, 357, 357, 357, 0, 0, 358, 355, 358,
358, 358, 358, 358, 358, 358, 359, 356, 359, 359,
359, 359, 359, 359, 359, 360, 357, 360, 360, 360,
360, 360, 360, 360, 0, 0, 361, 358, 361, 361,
361, 361, 361, 361, 361, 0, 359, 362, 362, 362,
362, 362, 362, 362, 364, 360, 364, 364, 364, 364,
364, 364, 364, 0, 0, 365, 361, 365, 365, 365,
365, 365, 365, 365, 366, 362, 366, 366, 366, 366,
366, 366, 0, 0, 364, 367, 367, 367, 367, 367,
367, 367, 0, 0, 369, 365, 369, 369, 369, 369,
369, 369, 369, 370, 366, 370, 370, 370, 370, 370,
370, 370, 371, 367, 371, 371, 371, 371, 371, 371,
0, 0, 0, 0, 369, 372, 372, 372, 372, 372,
372, 372, 0, 370, 373, 373, 373, 373, 373, 373,
373, 0, 371, 374, 374, 374, 374, 374, 374, 374,
0, 0, 0, 372, 375, 375, 375, 375, 375, 375,
375, 0, 373, 376, 376, 376, 376, 376, 376, 376,
2004-10-26 22:29:32 +00:00
0, 374, 377, 377, 377, 377, 377, 377, 377, 0,
0, 0, 375, 379, 379, 379, 379, 379, 379, 379,
0, 376, 380, 380, 380, 380, 380, 380, 0, 0,
377, 382, 382, 382, 382, 382, 382, 382, 0, 0,
0, 379, 383, 383, 383, 383, 383, 383, 0, 0,
380, 0, 0, 0, 0, 0, 0, 0, 0, 382,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
383, 385, 385, 385, 385, 385, 385, 385, 386, 386,
386, 386, 386, 386, 386, 387, 387, 387, 387, 387,
387, 387, 388, 0, 0, 0, 0, 388, 388, 389,
389, 389, 389, 389, 389, 389, 390, 0, 0, 0,
0, 390, 390, 391, 0, 0, 0, 0, 391, 391,
392, 0, 392, 0, 0, 392, 392, 393, 0, 0,
0, 0, 393, 393, 394, 0, 0, 0, 0, 394,
394, 395, 0, 0, 0, 0, 395, 395, 396, 0,
396, 0, 0, 396, 396, 397, 0, 397, 397, 0,
0, 397, 399, 0, 399, 0, 399, 399, 399, 400,
400, 400, 400, 400, 400, 400, 401, 401, 401, 401,
401, 401, 401, 402, 0, 402, 0, 0, 402, 402,
403, 403, 403, 403, 403, 403, 403, 404, 0, 0,
0, 0, 404, 404, 405, 0, 0, 0, 0, 405,
405, 406, 406, 406, 406, 406, 406, 406, 384, 384,
2004-10-26 22:29:32 +00:00
384, 384, 384, 384, 384, 384, 384, 384, 384, 384,
384, 384, 384, 384, 384, 384, 384, 384, 384, 384,
384, 384, 384, 384, 384, 384, 384, 384, 384, 384,
384, 384, 384, 384, 384, 384, 384, 384, 384, 384,
384, 384, 384, 384, 384, 384, 384, 384, 384, 384,
384, 384, 384, 384, 384, 384, 384, 384, 384
1999-01-17 21:42:12 +00:00
} ;
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;
2004-10-26 22:29:32 +00:00
#line 1 "toke.l"
1999-01-17 21:42:12 +00:00
#define INITIAL 0
2004-10-26 22:29:32 +00:00
#line 2 "toke.l"
1999-01-17 21:42:12 +00:00
/*
2004-01-05 17:15:32 +00:00
* Copyright (c) 1996, 1998-2004 Todd C. Miller <Todd.Miller@courtesan.com>
1999-01-17 21:42:12 +00:00
*
2004-02-13 21:37:02 +00:00
* 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.
1999-01-17 21:42:12 +00:00
*
2004-02-13 21:37:02 +00:00
* 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.
1999-07-22 13:12:27 +00:00
* 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.
1999-01-17 21:42:12 +00:00
*/
#include <config.h>
1999-01-17 21:42:12 +00:00
2001-12-14 19:59:57 +00:00
#include <sys/types.h>
#include <sys/param.h>
#include <stdio.h>
1999-01-17 21:42:12 +00:00
#ifdef STDC_HEADERS
2001-12-14 19:59:57 +00:00
# include <stdlib.h>
# include <stddef.h>
#else
# ifdef HAVE_STDLIB_H
# include <stdlib.h>
# endif
1999-01-17 21:42:12 +00:00
#endif /* STDC_HEADERS */
#ifdef HAVE_STRING_H
2001-12-14 19:59:57 +00:00
# include <string.h>
#else
# ifdef HAVE_STRINGS_H
# include <strings.h>
# endif
1999-01-17 21:42:12 +00:00
#endif /* HAVE_STRING_H */
2001-12-14 19:59:57 +00:00
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif /* HAVE_UNISTD_H */
1999-01-17 21:42:12 +00:00
#if defined(HAVE_MALLOC_H) && !defined(STDC_HEADERS)
2001-12-14 19:59:57 +00:00
# include <malloc.h>
1999-01-17 21:42:12 +00:00
#endif /* HAVE_MALLOC_H && !STDC_HEADERS */
#include <ctype.h>
#include "sudo.h"
1999-07-22 13:12:27 +00:00
#include "parse.h"
#include <gram.h>
1999-01-17 21:42:12 +00:00
#ifndef lint
1999-01-17 23:16:20 +00:00
static const char rcsid[] = "$Sudo$";
1999-01-17 21:42:12 +00:00
#endif /* lint */
extern YYSTYPE yylval;
int sudolineno = 1;
2004-09-28 18:37:08 +00:00
char *sudoers;
1999-01-17 21:42:12 +00:00
static int sawspace = 0;
static int arg_len = 0;
static int arg_size = 0;
2004-09-28 00:47:47 +00:00
static int fill __P((char *, int));
static int fill_cmnd __P((char *, int));
static int fill_args __P((char *, int, int));
2004-10-26 22:29:32 +00:00
static int switch_buffer __P((char *));
2004-09-27 16:08:18 +00:00
extern void yyerror __P((const char *));
2004-10-26 22:29:32 +00:00
#define push_include(_p) (switch_buffer((_p)))
#define pop_include() (switch_buffer(NULL))
1999-01-17 21:42:12 +00:00
/* 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
2004-09-29 19:22:38 +00:00
#define YY_NO_UNPUT 1
2001-12-12 20:11:47 +00:00
/* XXX - convert GOTRUNAS to exclusive state (GOTDEFS cannot be) */
#define GOTRUNAS 1
#define GOTDEFS 2
1999-01-17 21:42:12 +00:00
2001-12-12 20:11:47 +00:00
#define GOTCMND 3
1999-01-17 21:42:12 +00:00
2001-12-12 20:11:47 +00:00
#define STARTDEFS 4
2001-12-12 20:11:47 +00:00
#define INDEFS 5
#line 1059 "toke.c"
1999-01-17 21:42:12 +00:00
/* 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 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'); \
1999-01-17 21:42:12 +00:00
YY_USER_ACTION
YY_DECL
{
register yy_state_type yy_current_state;
register char *yy_cp, *yy_bp;
register int yy_act;
2004-10-26 22:29:32 +00:00
#line 103 "toke.l"
1999-01-17 21:42:12 +00:00
#line 1215 "toke.c"
1999-01-17 21:42:12 +00:00
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();
1999-01-17 21:42:12 +00:00
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];
2004-10-26 22:29:32 +00:00
if ( yy_current_state >= 385 )
1999-01-17 21:42:12 +00:00
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] != 2039 );
1999-01-17 21:42:12 +00:00
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
2004-10-26 22:29:32 +00:00
#line 104 "toke.l"
2001-12-12 20:11:47 +00:00
BEGIN STARTDEFS;
1999-01-17 21:42:12 +00:00
YY_BREAK
case 2:
YY_RULE_SETUP
2004-10-26 22:29:32 +00:00
#line 106 "toke.l"
{
2001-12-12 20:11:47 +00:00
BEGIN INDEFS;
LEXTRACE("DEFVAR ");
2004-09-28 00:47:47 +00:00
if (!fill(yytext, yyleng))
yyterminate();
2001-12-12 20:11:47 +00:00
return(DEFVAR);
}
1999-01-17 21:42:12 +00:00
YY_BREAK
2001-12-12 20:11:47 +00:00
1999-01-17 21:42:12 +00:00
case 3:
YY_RULE_SETUP
2004-10-26 22:29:32 +00:00
#line 115 "toke.l"
1999-01-17 21:42:12 +00:00
{
2001-12-12 20:11:47 +00:00
BEGIN STARTDEFS;
LEXTRACE(", ");
return(',');
} /* return ',' */
1999-01-17 21:42:12 +00:00
YY_BREAK
case 4:
YY_RULE_SETUP
2004-10-26 22:29:32 +00:00
#line 121 "toke.l"
{
2001-12-12 20:11:47 +00:00
LEXTRACE("= ");
return('=');
} /* return '=' */
YY_BREAK
case 5:
YY_RULE_SETUP
2004-10-26 22:29:32 +00:00
#line 126 "toke.l"
{
2001-12-12 20:11:47 +00:00
LEXTRACE("+= ");
return('+');
} /* return '+' */
YY_BREAK
case 6:
YY_RULE_SETUP
2004-10-26 22:29:32 +00:00
#line 131 "toke.l"
1999-01-17 21:42:12 +00:00
{
2001-12-12 20:11:47 +00:00
LEXTRACE("-= ");
return('-');
} /* return '-' */
1999-01-17 21:42:12 +00:00
YY_BREAK
case 7:
1999-01-17 21:42:12 +00:00
YY_RULE_SETUP
2004-10-26 22:29:32 +00:00
#line 136 "toke.l"
{
2001-12-12 20:11:47 +00:00
LEXTRACE("WORD(1) ");
2004-09-28 00:47:47 +00:00
if (!fill(yytext + 1, yyleng - 2))
yyterminate();
2001-12-12 20:11:47 +00:00
return(WORD);
}
1999-01-17 21:42:12 +00:00
YY_BREAK
2001-12-30 22:12:17 +00:00
case 8:
YY_RULE_SETUP
2004-10-26 22:29:32 +00:00
#line 143 "toke.l"
2001-12-30 22:12:17 +00:00
{
LEXTRACE("WORD(2) ");
2004-09-28 00:47:47 +00:00
if (!fill(yytext, yyleng))
yyterminate();
2001-12-30 22:12:17 +00:00
return(WORD);
}
YY_BREAK
2001-12-12 20:11:47 +00:00
2001-12-30 22:12:17 +00:00
case 9:
1999-01-17 21:42:12 +00:00
YY_RULE_SETUP
2004-10-26 22:29:32 +00:00
#line 152 "toke.l"
1999-01-17 21:42:12 +00:00
{
2004-05-17 22:10:20 +00:00
/* quoted fnmatch glob char, pass verbatim */
2001-12-12 20:11:47 +00:00
LEXTRACE("QUOTEDCHAR ");
2004-09-28 00:47:47 +00:00
if (!fill_args(yytext, 2, sawspace))
yyterminate();
2001-12-12 20:11:47 +00:00
sawspace = FALSE;
}
1999-01-17 21:42:12 +00:00
YY_BREAK
2001-12-30 22:12:17 +00:00
case 10:
1999-01-17 21:42:12 +00:00
YY_RULE_SETUP
2004-10-26 22:29:32 +00:00
#line 160 "toke.l"
2004-05-17 22:10:20 +00:00
{
/* quoted sudoers special char, strip backslash */
LEXTRACE("QUOTEDCHAR ");
2004-09-28 00:47:47 +00:00
if (!fill_args(yytext + 1, 1, sawspace))
yyterminate();
2004-05-17 22:10:20 +00:00
sawspace = FALSE;
}
YY_BREAK
case 11:
YY_RULE_SETUP
2004-10-26 22:29:32 +00:00
#line 168 "toke.l"
1999-01-17 21:42:12 +00:00
{
2001-12-12 20:11:47 +00:00
BEGIN INITIAL;
2004-10-04 20:15:38 +00:00
yyless(0);
2001-12-12 20:11:47 +00:00
return(COMMAND);
} /* end of command line args */
1999-01-17 21:42:12 +00:00
YY_BREAK
2004-05-17 22:10:20 +00:00
case 12:
1999-01-17 21:42:12 +00:00
YY_RULE_SETUP
2004-10-26 22:29:32 +00:00
#line 174 "toke.l"
1999-01-17 21:42:12 +00:00
{
2001-12-12 20:11:47 +00:00
LEXTRACE("ARG ");
2004-09-28 00:47:47 +00:00
if (!fill_args(yytext, yyleng, sawspace))
yyterminate();
2001-12-12 20:11:47 +00:00
sawspace = FALSE;
} /* a command line arg */
1999-01-17 21:42:12 +00:00
YY_BREAK
2001-12-12 20:11:47 +00:00
2004-05-17 22:10:20 +00:00
case 13:
1999-01-17 21:42:12 +00:00
YY_RULE_SETUP
2004-10-26 22:29:32 +00:00
#line 182 "toke.l"
2004-09-27 16:08:18 +00:00
{
char *cp, *ep;
2004-09-28 18:37:08 +00:00
++sudolineno;
2004-09-27 16:08:18 +00:00
/* pull out path from #include line */
for (cp = yytext + 9; isblank(*cp); cp++)
2004-09-27 16:08:18 +00:00
continue;
for (ep = cp; *ep != '\0' && !isspace(*ep); ep++)
continue;
*ep = '\0';
/* push current buffer and switch to include file */
2004-09-28 00:47:47 +00:00
if (!push_include(cp))
yyterminate();
2004-09-27 16:08:18 +00:00
LEXTRACE("INCLUDE\n");
2004-09-29 19:22:38 +00:00
return(COMMENT);
2004-09-27 16:08:18 +00:00
}
YY_BREAK
case 14:
YY_RULE_SETUP
2004-10-26 22:29:32 +00:00
#line 198 "toke.l"
1999-01-17 21:42:12 +00:00
{
2001-12-12 20:11:47 +00:00
BEGIN GOTDEFS;
switch (yytext[8]) {
case ':':
2004-09-27 16:08:18 +00:00
yyless(9);
2001-12-12 20:11:47 +00:00
LEXTRACE("DEFAULTS_USER ");
return(DEFAULTS_USER);
2003-01-17 23:10:05 +00:00
case '>':
2004-09-27 16:08:18 +00:00
yyless(9);
2003-01-17 23:10:05 +00:00
LEXTRACE("DEFAULTS_RUNAS ");
return(DEFAULTS_RUNAS);
2001-12-12 20:11:47 +00:00
case '@':
2004-09-27 16:08:18 +00:00
yyless(9);
2001-12-12 20:11:47 +00:00
LEXTRACE("DEFAULTS_HOST ");
return(DEFAULTS_HOST);
default:
LEXTRACE("DEFAULTS ");
return(DEFAULTS);
}
1999-01-17 21:42:12 +00:00
}
YY_BREAK
2004-09-27 16:08:18 +00:00
case 15:
1999-01-17 21:42:12 +00:00
YY_RULE_SETUP
2004-10-26 22:29:32 +00:00
#line 219 "toke.l"
1999-01-17 21:42:12 +00:00
{
2004-09-28 00:47:47 +00:00
if (!fill(yytext, yyleng))
yyterminate();
2001-12-12 20:11:47 +00:00
switch (*yytext) {
case 'H':
LEXTRACE("HOSTALIAS ");
return(HOSTALIAS);
case 'C':
LEXTRACE("CMNDALIAS ");
return(CMNDALIAS);
case 'U':
LEXTRACE("USERALIAS ");
return(USERALIAS);
case 'R':
LEXTRACE("RUNASALIAS ");
BEGIN GOTRUNAS;
return(RUNASALIAS);
}
}
1999-01-17 21:42:12 +00:00
YY_BREAK
2004-09-27 16:08:18 +00:00
case 16:
1999-01-17 21:42:12 +00:00
YY_RULE_SETUP
2004-10-26 22:29:32 +00:00
#line 239 "toke.l"
{
1999-01-17 21:42:12 +00:00
/* cmnd does not require passwd for this user */
LEXTRACE("NOPASSWD ");
return(NOPASSWD);
}
YY_BREAK
2004-09-27 16:08:18 +00:00
case 17:
1999-01-17 21:42:12 +00:00
YY_RULE_SETUP
2004-10-26 22:29:32 +00:00
#line 245 "toke.l"
{
1999-04-05 20:29:54 +00:00
/* cmnd requires passwd for this user */
LEXTRACE("PASSWD ");
return(PASSWD);
}
YY_BREAK
2004-09-27 16:08:18 +00:00
case 18:
1999-04-05 20:29:54 +00:00
YY_RULE_SETUP
2004-10-26 22:29:32 +00:00
#line 251 "toke.l"
{
LEXTRACE("NOEXEC ");
return(NOEXEC);
}
YY_BREAK
2004-09-27 16:08:18 +00:00
case 19:
YY_RULE_SETUP
2004-10-26 22:29:32 +00:00
#line 256 "toke.l"
{
LEXTRACE("EXEC ");
return(EXEC);
}
YY_BREAK
2004-09-27 16:08:18 +00:00
case 20:
YY_RULE_SETUP
2004-10-26 22:29:32 +00:00
#line 261 "toke.l"
2004-09-24 18:11:19 +00:00
{
LEXTRACE("NOMONITOR ");
return(NOMONITOR);
2004-09-24 18:11:19 +00:00
}
YY_BREAK
2004-09-27 16:08:18 +00:00
case 21:
2004-09-24 18:11:19 +00:00
YY_RULE_SETUP
2004-10-26 22:29:32 +00:00
#line 266 "toke.l"
2004-09-24 18:11:19 +00:00
{
LEXTRACE("MONITOR ");
return(MONITOR);
2004-09-24 18:11:19 +00:00
}
YY_BREAK
2004-09-27 16:08:18 +00:00
case 22:
2004-09-24 18:11:19 +00:00
YY_RULE_SETUP
2004-10-26 22:29:32 +00:00
#line 271 "toke.l"
1999-01-17 21:42:12 +00:00
{
/* netgroup */
2004-09-28 00:47:47 +00:00
if (!fill(yytext, yyleng))
yyterminate();
LEXTRACE("NETGROUP ");
1999-01-17 21:42:12 +00:00
return(NETGROUP);
}
YY_BREAK
2004-09-27 16:08:18 +00:00
case 23:
1999-01-17 21:42:12 +00:00
YY_RULE_SETUP
2004-10-26 22:29:32 +00:00
#line 279 "toke.l"
1999-01-17 21:42:12 +00:00
{
/* UN*X group */
2004-09-28 00:47:47 +00:00
if (!fill(yytext, yyleng))
yyterminate();
2004-10-26 22:29:32 +00:00
LEXTRACE("USERGROUP ");
1999-01-17 21:42:12 +00:00
return(USERGROUP);
}
YY_BREAK
2004-09-27 16:08:18 +00:00
case 24:
1999-01-17 21:42:12 +00:00
YY_RULE_SETUP
2004-10-26 22:29:32 +00:00
#line 287 "toke.l"
1999-01-17 21:42:12 +00:00
{
2004-09-28 00:47:47 +00:00
if (!fill(yytext, yyleng))
yyterminate();
1999-01-17 21:42:12 +00:00
LEXTRACE("NTWKADDR ");
return(NTWKADDR);
}
YY_BREAK
2004-09-27 16:08:18 +00:00
case 25:
1999-01-17 21:42:12 +00:00
YY_RULE_SETUP
2004-10-26 22:29:32 +00:00
#line 294 "toke.l"
1999-08-24 16:40:23 +00:00
{
2004-09-28 00:47:47 +00:00
if (!fill(yytext, yyleng))
yyterminate();
1999-08-24 16:40:23 +00:00
LEXTRACE("NTWKADDR ");
return(NTWKADDR);
}
YY_BREAK
2004-09-27 16:08:18 +00:00
case 26:
1999-08-24 16:40:23 +00:00
YY_RULE_SETUP
2004-10-26 22:29:32 +00:00
#line 301 "toke.l"
1999-01-17 21:42:12 +00:00
{
BEGIN GOTRUNAS;
LEXTRACE("RUNAS ");
return (RUNAS);
}
YY_BREAK
2004-09-27 16:08:18 +00:00
case 27:
1999-01-17 21:42:12 +00:00
YY_RULE_SETUP
2004-10-26 22:29:32 +00:00
#line 307 "toke.l"
1999-01-17 21:42:12 +00:00
{
if (strcmp(yytext, "ALL") == 0) {
LEXTRACE("ALL ");
return(ALL);
} else {
2004-09-28 00:47:47 +00:00
if (!fill(yytext, yyleng))
yyterminate();
1999-01-17 21:42:12 +00:00
LEXTRACE("ALIAS ");
return(ALIAS);
}
}
YY_BREAK
2004-09-27 16:08:18 +00:00
case 28:
1999-01-17 21:42:12 +00:00
YY_RULE_SETUP
2004-10-26 22:29:32 +00:00
#line 319 "toke.l"
1999-01-17 21:42:12 +00:00
{
/* username/uid that user can run command as */
2004-09-28 00:47:47 +00:00
if (!fill(yytext, yyleng))
yyterminate();
2001-12-30 22:12:17 +00:00
LEXTRACE("WORD(3) ");
return(WORD);
1999-01-17 21:42:12 +00:00
}
YY_BREAK
2004-09-27 16:08:18 +00:00
case 29:
1999-01-17 21:42:12 +00:00
YY_RULE_SETUP
2004-10-26 22:29:32 +00:00
#line 327 "toke.l"
1999-01-17 21:42:12 +00:00
{
BEGIN INITIAL;
}
1999-01-17 21:42:12 +00:00
YY_BREAK
2004-09-27 16:08:18 +00:00
case 30:
1999-01-17 21:42:12 +00:00
YY_RULE_SETUP
2004-10-26 22:29:32 +00:00
#line 331 "toke.l"
2004-01-22 01:03:16 +00:00
{
BEGIN GOTCMND;
LEXTRACE("COMMAND ");
2004-09-28 00:47:47 +00:00
if (!fill_cmnd(yytext, yyleng))
yyterminate();
2004-01-22 01:03:16 +00:00
} /* sudo -e */
YY_BREAK
2004-09-27 16:08:18 +00:00
case 31:
2004-01-22 01:03:16 +00:00
YY_RULE_SETUP
2004-10-26 22:29:32 +00:00
#line 338 "toke.l"
1999-01-17 21:42:12 +00:00
{
2001-12-12 20:11:47 +00:00
/* directories can't have args... */
if (yytext[yyleng - 1] == '/') {
LEXTRACE("COMMAND ");
2004-09-28 00:47:47 +00:00
if (!fill_cmnd(yytext, yyleng))
yyterminate();
2001-12-12 20:11:47 +00:00
return(COMMAND);
1999-08-04 15:31:47 +00:00
} else {
2001-12-12 20:11:47 +00:00
BEGIN GOTCMND;
LEXTRACE("COMMAND ");
2004-09-28 00:47:47 +00:00
if (!fill_cmnd(yytext, yyleng))
yyterminate();
1999-01-17 21:42:12 +00:00
}
2001-12-12 20:11:47 +00:00
} /* a pathname */
1999-01-17 21:42:12 +00:00
YY_BREAK
2004-09-27 16:08:18 +00:00
case 32:
YY_RULE_SETUP
2004-10-26 22:29:32 +00:00
#line 353 "toke.l"
{
2001-12-12 20:11:47 +00:00
/* a word */
2004-09-28 00:47:47 +00:00
if (!fill(yytext, yyleng))
yyterminate();
2001-12-30 22:12:17 +00:00
LEXTRACE("WORD(4) ");
return(WORD);
}
YY_BREAK
2004-09-27 16:08:18 +00:00
case 33:
2001-12-12 20:11:47 +00:00
YY_RULE_SETUP
2004-10-26 22:29:32 +00:00
#line 361 "toke.l"
2001-12-12 20:11:47 +00:00
{
LEXTRACE(", ");
return(',');
} /* return ',' */
YY_BREAK
2004-09-27 16:08:18 +00:00
case 34:
YY_RULE_SETUP
2004-10-26 22:29:32 +00:00
#line 366 "toke.l"
{
2001-12-12 20:11:47 +00:00
LEXTRACE("= ");
return('=');
} /* return '=' */
YY_BREAK
2004-09-27 16:08:18 +00:00
case 35:
1999-01-17 21:42:12 +00:00
YY_RULE_SETUP
2004-10-26 22:29:32 +00:00
#line 371 "toke.l"
1999-01-17 21:42:12 +00:00
{
2001-12-12 20:11:47 +00:00
LEXTRACE(": ");
return(':');
} /* return ':' */
1999-01-17 21:42:12 +00:00
YY_BREAK
2004-09-27 16:08:18 +00:00
case 36:
1999-01-17 21:42:12 +00:00
YY_RULE_SETUP
2004-10-26 22:29:32 +00:00
#line 376 "toke.l"
1999-01-17 21:42:12 +00:00
{
2001-12-12 20:11:47 +00:00
if (yyleng % 2 == 1)
return('!'); /* return '!' */
}
YY_BREAK
2004-09-27 16:08:18 +00:00
case 37:
YY_RULE_SETUP
2004-10-26 22:29:32 +00:00
#line 381 "toke.l"
{
2001-12-12 20:11:47 +00:00
BEGIN INITIAL;
++sudolineno;
LEXTRACE("\n");
return(COMMENT);
} /* return newline */
YY_BREAK
2004-09-27 16:08:18 +00:00
case 38:
YY_RULE_SETUP
2004-10-26 22:29:32 +00:00
#line 388 "toke.l"
2001-12-12 20:11:47 +00:00
{ /* throw away space/tabs */
sawspace = TRUE; /* but remember for fill_args */
}
YY_BREAK
2004-09-27 16:08:18 +00:00
case 39:
2001-12-12 20:11:47 +00:00
YY_RULE_SETUP
2004-10-26 22:29:32 +00:00
#line 392 "toke.l"
2001-12-12 20:11:47 +00:00
{
sawspace = TRUE; /* remember for fill_args */
++sudolineno;
LEXTRACE("\n\t");
} /* throw away EOL after \ */
YY_BREAK
2004-09-27 16:08:18 +00:00
case 40:
2001-12-12 20:11:47 +00:00
YY_RULE_SETUP
2004-10-26 22:29:32 +00:00
#line 398 "toke.l"
2001-12-12 20:11:47 +00:00
{
BEGIN INITIAL;
++sudolineno;
LEXTRACE("\n");
return(COMMENT);
} /* return comments */
YY_BREAK
2004-09-27 16:08:18 +00:00
case 41:
2001-12-12 20:11:47 +00:00
YY_RULE_SETUP
2004-10-26 22:29:32 +00:00
#line 405 "toke.l"
{
LEXTRACE("ERROR ");
1999-01-17 21:42:12 +00:00
return(ERROR);
} /* parse error */
YY_BREAK
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(GOTRUNAS):
case YY_STATE_EOF(GOTDEFS):
2001-12-12 20:11:47 +00:00
case YY_STATE_EOF(GOTCMND):
case YY_STATE_EOF(STARTDEFS):
case YY_STATE_EOF(INDEFS):
2004-10-26 22:29:32 +00:00
#line 410 "toke.l"
2003-01-17 23:10:05 +00:00
{
if (YY_START != INITIAL) {
BEGIN INITIAL;
LEXTRACE("ERROR ");
return(ERROR);
}
2004-09-27 16:08:18 +00:00
if (!pop_include())
yyterminate();
2003-01-17 23:10:05 +00:00
}
YY_BREAK
2004-09-27 16:08:18 +00:00
case 42:
2003-01-17 23:10:05 +00:00
YY_RULE_SETUP
2004-10-26 22:29:32 +00:00
#line 420 "toke.l"
2003-01-17 23:10:05 +00:00
ECHO;
YY_BREAK
#line 1750 "toke.c"
1999-01-17 21:42:12 +00:00
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();
1999-01-17 21:42:12 +00:00
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];
2004-10-26 22:29:32 +00:00
if ( yy_current_state >= 385 )
1999-01-17 21:42:12 +00:00
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];
2004-10-26 22:29:32 +00:00
if ( yy_current_state >= 385 )
1999-01-17 21:42:12 +00:00
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2004-10-26 22:29:32 +00:00
yy_is_jam = (yy_current_state == 384);
1999-01-17 21:42:12 +00:00
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');
1999-01-17 21:42:12 +00:00
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
2004-02-13 21:37:02 +00:00
#include <unistd.h>
1999-01-17 21:42:12 +00:00
#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;
1999-01-17 21:42:12 +00:00
yy_flush_buffer( b );
b->yy_input_file = file;
b->yy_fill_buffer = 1;
#if YY_ALWAYS_INTERACTIVE
b->yy_is_interactive = 1;
#else
#if YY_NEVER_INTERACTIVE
b->yy_is_interactive = 0;
#else
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
#endif
#endif
errno = oerrno;
1999-01-17 21:42:12 +00:00
}
#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 YY_MAIN
int main()
{
yylex();
return 0;
}
#endif
2004-10-26 22:29:32 +00:00
#line 420 "toke.l"
1999-01-17 21:42:12 +00:00
2004-09-28 00:47:47 +00:00
static int
fill(s, len)
1999-01-17 21:42:12 +00:00
char *s;
int len;
{
int i, j;
1999-01-17 21:42:12 +00:00
yylval.string = (char *) malloc(len + 1);
2003-03-13 20:27:38 +00:00
if (yylval.string == NULL) {
1999-01-17 21:42:12 +00:00
yyerror("unable to allocate memory");
2004-09-28 00:47:47 +00:00
return(FALSE);
2003-03-13 20:27:38 +00:00
}
1999-01-17 21:42:12 +00:00
/* Copy the string and collapse any escaped characters. */
for (i = 0, j = 0; i < len; i++, j++) {
if (s[i] == '\\' && i != len - 1)
yylval.string[j] = s[++i];
else
yylval.string[j] = s[i];
}
yylval.string[j] = '\0';
2004-09-28 00:47:47 +00:00
return(TRUE);
1999-01-17 21:42:12 +00:00
}
2004-09-28 00:47:47 +00:00
static int
fill_cmnd(s, len)
1999-01-17 21:42:12 +00:00
char *s;
int len;
{
arg_len = arg_size = 0;
2003-03-15 01:11:51 +00:00
yylval.command.cmnd = (char *) malloc(++len);
2003-03-13 20:27:38 +00:00
if (yylval.command.cmnd == NULL) {
1999-01-17 21:42:12 +00:00
yyerror("unable to allocate memory");
2004-09-28 00:47:47 +00:00
return(FALSE);
2003-03-13 20:27:38 +00:00
}
1999-01-17 21:42:12 +00:00
/* copy the string and NULL-terminate it (escapes handled by fnmatch) */
2003-03-15 01:11:51 +00:00
(void) strlcpy(yylval.command.cmnd, s, len);
1999-01-17 21:42:12 +00:00
yylval.command.args = NULL;
2004-09-28 00:47:47 +00:00
return(TRUE);
1999-01-17 21:42:12 +00:00
}
2004-09-28 00:47:47 +00:00
static int
fill_args(s, len, addspace)
1999-01-17 21:42:12 +00:00
char *s;
int len;
int addspace;
{
int new_len;
char *p;
if (yylval.command.args == NULL) {
addspace = 0;
new_len = len;
2003-03-13 20:17:41 +00:00
} else
new_len = arg_len + len + addspace;
1999-01-17 21:42:12 +00:00
2003-03-13 20:17:41 +00:00
if (new_len >= arg_size) {
/* Allocate more space than we need for subsequent args */
1999-01-17 21:42:12 +00:00
while (new_len >= (arg_size += COMMANDARGINC))
;
2003-03-13 20:27:38 +00:00
p = yylval.command.args ?
(char *) realloc(yylval.command.args, arg_size) :
(char *) malloc(arg_size);
if (p == NULL) {
2003-03-13 20:17:41 +00:00
if (yylval.command.args != NULL)
free(yylval.command.args);
2003-03-13 20:17:41 +00:00
yyerror("unable to allocate memory");
2004-09-28 00:47:47 +00:00
return(FALSE);
2003-03-13 20:17:41 +00:00
} else
yylval.command.args = p;
1999-01-17 21:42:12 +00:00
}
/* Efficiently append the arg (with a leading space if needed). */
p = yylval.command.args + arg_len;
if (addspace)
*p++ = ' ';
2004-09-28 00:47:47 +00:00
if (strlcpy(p, s, arg_size - (p - yylval.command.args)) != len) {
2003-03-13 20:17:41 +00:00
yyerror("fill_args: buffer overflow"); /* paranoia */
2004-09-28 00:47:47 +00:00
return(FALSE);
}
1999-01-17 21:42:12 +00:00
arg_len = new_len;
2004-09-28 00:47:47 +00:00
return(TRUE);
1999-01-17 21:42:12 +00:00
}
2004-09-28 18:37:08 +00:00
struct sudoers_state {
YY_BUFFER_STATE bs;
char *path;
int lineno;
};
#define MAX_SUDOERS_DEPTH 128
2004-10-26 22:29:32 +00:00
#define SUDOERS_STACK_INCREMENT 16
2004-09-28 18:37:08 +00:00
static int
2004-10-26 22:29:32 +00:00
switch_buffer(path)
2004-09-28 18:37:08 +00:00
char *path;
2004-09-27 16:08:18 +00:00
{
2004-09-28 00:47:47 +00:00
static size_t stacksize, depth;
2004-09-28 18:37:08 +00:00
static struct sudoers_state *state;
2004-09-29 19:22:38 +00:00
static int keepopen;
2004-09-27 16:08:18 +00:00
FILE *fp;
if (path != NULL) {
2004-09-28 18:37:08 +00:00
/* push current state */
if ((path = strdup(path)) == NULL) {
yyerror("unable to allocate memory");
return(FALSE);
}
2004-09-28 00:47:47 +00:00
if (depth >= stacksize) {
2004-09-28 18:37:08 +00:00
if (depth > MAX_SUDOERS_DEPTH) {
2004-09-28 00:47:47 +00:00
yyerror("too many levels of includes");
return(FALSE);
}
2004-10-26 22:29:32 +00:00
stacksize += SUDOERS_STACK_INCREMENT;
state = (struct sudoers_state *) realloc(state,
sizeof(state) * stacksize);
if (state == NULL) {
2004-09-27 16:08:18 +00:00
yyerror("unable to allocate memory");
2004-09-28 00:47:47 +00:00
return(FALSE);
}
2004-09-27 16:08:18 +00:00
}
2004-09-29 19:22:38 +00:00
if ((fp = open_sudoers(path, &keepopen)) == NULL) {
2004-09-27 16:08:18 +00:00
yyerror(path);
2004-09-28 00:47:47 +00:00
return(FALSE);
}
2004-09-28 18:37:08 +00:00
state[depth].bs = YY_CURRENT_BUFFER;
state[depth].path = sudoers;
state[depth].lineno = sudolineno;
depth++;
sudolineno = 1;
sudoers = path;
2004-09-27 16:08:18 +00:00
yy_switch_to_buffer(yy_create_buffer(fp, YY_BUF_SIZE));
} else {
/* pop */
2004-09-28 00:47:47 +00:00
if (depth == 0)
2004-09-27 16:08:18 +00:00
return(FALSE);
2004-09-28 18:37:08 +00:00
depth--;
2004-09-29 19:22:38 +00:00
if (!keepopen)
fclose(YY_CURRENT_BUFFER->yy_input_file);
2004-09-27 16:08:18 +00:00
yy_delete_buffer(YY_CURRENT_BUFFER);
2004-09-28 18:37:08 +00:00
yy_switch_to_buffer(state[depth].bs);
free(sudoers);
sudoers = state[depth].path;
sudolineno = state[depth].lineno;
2004-09-29 19:22:38 +00:00
keepopen = FALSE;
2004-09-27 16:08:18 +00:00
}
return(TRUE);
}