6dfe12c54f375d235e0a2c8a861d64c03b831dca
[debian/sudo] / plugins / sudoers / toke.c
1 #include <config.h>
2 /*      $OpenBSD: flex.skl,v 1.11 2010/08/04 18:24:50 millert Exp $     */
3
4 /* A lexical scanner generated by flex */
5
6 /* Scanner skeleton version:
7  * $Header: /home/cvs/openbsd/src/usr.bin/lex/flex.skl,v 1.11 2010/08/04 18:24:50 millert Exp $
8  */
9
10 #define FLEX_SCANNER
11 #define YY_FLEX_MAJOR_VERSION 2
12 #define YY_FLEX_MINOR_VERSION 5
13
14 #include <stdio.h>
15 #include <errno.h>
16
17
18 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
19 #ifdef c_plusplus
20 #ifndef __cplusplus
21 #define __cplusplus
22 #endif
23 #endif
24
25
26 #ifdef __cplusplus
27
28 #include <stdlib.h>
29 #include <unistd.h>
30
31 /* Use prototypes in function declarations. */
32 #define YY_USE_PROTOS
33
34 /* The "const" storage-class-modifier is valid. */
35 #define YY_USE_CONST
36
37 #else   /* ! __cplusplus */
38
39 #ifdef __STDC__
40
41 #define YY_USE_PROTOS
42 #define YY_USE_CONST
43
44 #endif  /* __STDC__ */
45 #endif  /* ! __cplusplus */
46
47 #ifdef __TURBOC__
48  #pragma warn -rch
49  #pragma warn -use
50 #include <io.h>
51 #include <stdlib.h>
52 #define YY_USE_CONST
53 #define YY_USE_PROTOS
54 #endif
55
56 #ifdef YY_USE_CONST
57 #define yyconst const
58 #else
59 #define yyconst
60 #endif
61
62
63 #ifdef YY_USE_PROTOS
64 #define YY_PROTO(proto) proto
65 #else
66 #define YY_PROTO(proto) ()
67 #endif
68
69 /* Returned upon end-of-file. */
70 #define YY_NULL 0
71
72 /* Promotes a possibly negative, possibly signed char to an unsigned
73  * integer for use as an array index.  If the signed char is negative,
74  * we want to instead treat it as an 8-bit unsigned char, hence the
75  * double cast.
76  */
77 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
78
79 /* Enter a start condition.  This macro really ought to take a parameter,
80  * but we do it the disgusting crufty way forced on us by the ()-less
81  * definition of BEGIN.
82  */
83 #define BEGIN yy_start = 1 + 2 *
84
85 /* Translate the current start state into a value that can be later handed
86  * to BEGIN to return to the state.  The YYSTATE alias is for lex
87  * compatibility.
88  */
89 #define YY_START ((yy_start - 1) / 2)
90 #define YYSTATE YY_START
91
92 /* Action number for EOF rule of a given start state. */
93 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
94
95 /* Special action meaning "start processing a new file". */
96 #define YY_NEW_FILE yyrestart( yyin )
97
98 #define YY_END_OF_BUFFER_CHAR 0
99
100 /* Size of default input buffer. */
101 #define YY_BUF_SIZE 16384
102
103 typedef struct yy_buffer_state *YY_BUFFER_STATE;
104
105 extern int yyleng;
106 extern FILE *yyin, *yyout;
107
108 #define EOB_ACT_CONTINUE_SCAN 0
109 #define EOB_ACT_END_OF_FILE 1
110 #define EOB_ACT_LAST_MATCH 2
111
112 /* The funky do-while in the following #define is used to turn the definition
113  * int a single C statement (which needs a semi-colon terminator).  This
114  * avoids problems with code like:
115  *
116  *      if ( condition_holds )
117  *              yyless( 5 );
118  *      else
119  *              do_something_else();
120  *
121  * Prior to using the do-while the compiler would get upset at the
122  * "else" because it interpreted the "if" statement as being all
123  * done when it reached the ';' after the yyless() call.
124  */
125
126 /* Return all but the first 'n' matched characters back to the input stream. */
127
128 #define yyless(n) \
129         do \
130                 { \
131                 /* Undo effects of setting up yytext. */ \
132                 *yy_cp = yy_hold_char; \
133                 YY_RESTORE_YY_MORE_OFFSET \
134                 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
135                 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
136                 } \
137         while ( 0 )
138
139 #define unput(c) yyunput( c, yytext_ptr )
140
141 /* The following is because we cannot portably get our hands on size_t
142  * (without autoconf's help, which isn't available because we want
143  * flex-generated scanners to compile on their own).
144  */
145 typedef unsigned int yy_size_t;
146
147
148 struct yy_buffer_state
149         {
150         FILE *yy_input_file;
151
152         char *yy_ch_buf;                /* input buffer */
153         char *yy_buf_pos;               /* current position in input buffer */
154
155         /* Size of input buffer in bytes, not including room for EOB
156          * characters.
157          */
158         yy_size_t yy_buf_size;
159
160         /* Number of characters read into yy_ch_buf, not including EOB
161          * characters.
162          */
163         int yy_n_chars;
164
165         /* Whether we "own" the buffer - i.e., we know we created it,
166          * and can realloc() it to grow it, and should free() it to
167          * delete it.
168          */
169         int yy_is_our_buffer;
170
171         /* Whether this is an "interactive" input source; if so, and
172          * if we're using stdio for input, then we want to use getc()
173          * instead of fread(), to make sure we stop fetching input after
174          * each newline.
175          */
176         int yy_is_interactive;
177
178         /* Whether we're considered to be at the beginning of a line.
179          * If so, '^' rules will be active on the next match, otherwise
180          * not.
181          */
182         int yy_at_bol;
183
184         /* Whether to try to fill the input buffer when we reach the
185          * end of it.
186          */
187         int yy_fill_buffer;
188
189         int yy_buffer_status;
190 #define YY_BUFFER_NEW 0
191 #define YY_BUFFER_NORMAL 1
192         /* When an EOF's been seen but there's still some text to process
193          * then we mark the buffer as YY_EOF_PENDING, to indicate that we
194          * shouldn't try reading from the input source any more.  We might
195          * still have a bunch of tokens to match, though, because of
196          * possible backing-up.
197          *
198          * When we actually see the EOF, we change the status to "new"
199          * (via yyrestart()), so that the user can continue scanning by
200          * just pointing yyin at a new input file.
201          */
202 #define YY_BUFFER_EOF_PENDING 2
203         };
204
205 static YY_BUFFER_STATE yy_current_buffer = 0;
206
207 /* We provide macros for accessing buffer states in case in the
208  * future we want to put the buffer states in a more general
209  * "scanner state".
210  */
211 #define YY_CURRENT_BUFFER yy_current_buffer
212
213
214 /* yy_hold_char holds the character lost when yytext is formed. */
215 static char yy_hold_char;
216
217 static int yy_n_chars;          /* number of characters read into yy_ch_buf */
218
219
220 int yyleng;
221
222 /* Points to current character in buffer. */
223 static char *yy_c_buf_p = (char *) 0;
224 static int yy_init = 1;         /* whether we need to initialize */
225 static int yy_start = 0;        /* start state number */
226
227 /* Flag which is used to allow yywrap()'s to do buffer switches
228  * instead of setting up a fresh yyin.  A bit of a hack ...
229  */
230 static int yy_did_buffer_switch_on_eof;
231
232 void yyrestart YY_PROTO(( FILE *input_file ));
233
234 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
235 void yy_load_buffer_state YY_PROTO(( void ));
236 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
237 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
238 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
239 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
240 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
241
242 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
243 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
244 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
245
246 static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
247 static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
248 static void yy_flex_free YY_PROTO(( void * ));
249
250 #define yy_new_buffer yy_create_buffer
251
252 #define yy_set_interactive(is_interactive) \
253         { \
254         if ( ! yy_current_buffer ) \
255                 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
256         yy_current_buffer->yy_is_interactive = is_interactive; \
257         }
258
259 #define yy_set_bol(at_bol) \
260         { \
261         if ( ! yy_current_buffer ) \
262                 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
263         yy_current_buffer->yy_at_bol = at_bol; \
264         }
265
266 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
267
268
269 #define yywrap() 1
270 #define YY_SKIP_YYWRAP
271 typedef unsigned char YY_CHAR;
272 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
273 typedef int yy_state_type;
274 extern char *yytext;
275 #define yytext_ptr yytext
276
277 static yy_state_type yy_get_previous_state YY_PROTO(( void ));
278 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
279 static int yy_get_next_buffer YY_PROTO(( void ));
280 static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
281
282 /* Done after the current pattern has been matched and before the
283  * corresponding action - sets up yytext.
284  */
285 #define YY_DO_BEFORE_ACTION \
286         yytext_ptr = yy_bp; \
287         yyleng = (int) (yy_cp - yy_bp); \
288         yy_hold_char = *yy_cp; \
289         *yy_cp = '\0'; \
290         yy_c_buf_p = yy_cp;
291
292 #define YY_NUM_RULES 61
293 #define YY_END_OF_BUFFER 62
294 static yyconst short int yy_accept[622] =
295     {   0,
296         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
297         0,    0,   62,   49,   57,   56,   55,   48,   60,   32,
298        50,   51,   32,   52,   49,   49,   49,   49,   54,   53,
299        60,   44,   44,   44,   44,   44,   44,   44,   44,   44,
300        44,   60,   49,   49,   57,   60,   44,   44,   44,   44,
301        44,    2,   60,    1,   49,   44,   44,   49,   17,   16,
302        17,   16,   16,   60,   60,   60,    3,    9,    8,    9,
303         4,    9,    5,   60,   13,   13,   13,   11,   12,   49,
304         0,   57,   55,    0,   59,    0,   49,   34,    0,   32,
305         0,   33,    0,   47,   47,    0,   49,   49,    0,   49,
306
307        49,   49,   49,    0,   37,   44,   44,   44,   44,   44,
308        44,   44,   44,   44,   44,   44,   44,   49,   58,   49,
309        57,    0,    0,    0,    0,    0,    0,   49,   49,   49,
310        49,   49,    2,    1,    0,    1,   45,   45,    0,   49,
311        17,   17,   15,   14,   15,    0,    0,    3,    9,    0,
312         6,    7,    9,    9,   13,    0,   13,   13,    0,   10,
313         0,    0,    0,   34,   34,    0,    0,   49,   49,   49,
314        49,   49,    0,    0,   37,   37,   44,   39,   44,   44,
315        44,   44,   44,   44,   44,   44,   44,   44,   44,   44,
316        49,    0,    0,    0,    0,    0,    0,   49,   49,   49,
317
318        49,   49,    0,   49,   10,    0,   49,   49,   49,   49,
319        49,   49,    0,   38,   38,   38,    0,    0,   37,   37,
320        37,   37,   37,   37,   37,   44,   44,   44,   44,   44,
321        44,   44,   44,   44,   44,   40,   44,   41,   49,    0,
322         0,    0,    0,    0,    0,   49,   49,   49,   49,   49,
323        49,   49,    0,    0,   38,   38,   38,    0,   37,   37,
324         0,   37,   37,   37,   37,   37,   37,   37,   37,   37,
325        37,   37,    0,   25,   44,   44,   44,   44,   44,   44,
326        44,   44,   42,   44,   49,    0,    0,    0,    0,   49,
327        49,   49,   49,   49,   49,   49,   49,    0,   38,    0,
328
329        37,   37,   37,    0,    0,    0,   37,   37,   37,   37,
330        37,   37,   37,   37,   37,   37,   37,   37,   37,   44,
331        44,   44,   44,   44,   44,   44,   44,   44,   49,    0,
332         0,    0,   49,   49,   49,   35,   35,   35,    0,    0,
333        37,   37,   37,   37,   37,   37,   37,    0,    0,    0,
334         0,    0,   37,   37,   37,   37,   37,   37,   37,   37,
335        37,   37,   37,   37,   37,   37,   44,   44,   44,    0,
336        24,   44,   44,   44,   44,    0,   23,    0,   26,   49,
337         0,    0,    0,   49,   49,   49,   49,   35,   35,   35,
338        35,    0,   37,    0,   37,   37,   37,   37,   37,   37,
339
340        37,   37,   37,   37,   37,    0,    0,    0,   37,   37,
341        37,   37,   37,   37,   37,   37,   37,   37,   37,   37,
342        37,   44,   44,   44,   44,   44,   44,   44,   46,    0,
343         0,    0,   49,   20,   45,   36,   36,   36,   36,   37,
344         0,    0,    0,   37,   37,   37,   37,   37,   37,   37,
345        37,   37,   37,   37,   37,   37,    0,    0,    0,    0,
346         0,   37,   37,   37,   37,   37,   37,   37,   37,   44,
347        44,   44,   44,   44,    0,   22,    0,   27,    0,   20,
348         0,    0,   49,    0,   49,   49,   49,   36,   36,   36,
349        36,    0,    0,    0,    0,    0,   37,   37,   37,   37,
350
351        37,   37,   37,   37,   37,   37,   37,   37,   37,   37,
352        37,   37,   37,   37,   37,   37,   43,    0,   30,   44,
353        44,   44,    0,    0,    0,   18,    0,   21,   20,    0,
354         0,    0,    0,    0,   20,    0,   49,   49,   49,    0,
355         0,    0,   37,   37,   37,   37,   37,   37,   37,   37,
356        37,   37,   37,   37,   37,   37,   37,   37,   37,   37,
357         0,   28,   44,   44,   21,    0,    0,   20,   49,   49,
358        49,   49,   49,    0,    0,    0,    0,    0,   37,   37,
359        37,   37,   37,   37,   37,   37,    0,   31,   44,    0,
360        49,   49,   49,   37,   37,   37,   37,   37,   37,    0,
361
362        29,    0,    0,   19,   49,   49,   49,   49,   49,   37,
363        37,   37,   37,   37,   35,   35,   35,   35,   35,   35,
364         0
365     } ;
366
367 static yyconst int yy_ec[256] =
368     {   0,
369         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
370         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
371         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
372         1,    2,    4,    5,    6,    1,    7,    1,    1,    8,
373         9,   10,   11,   12,   13,   14,   15,   16,   17,   18,
374        19,   20,   21,   22,   22,   22,   23,   24,    1,    1,
375        25,   26,   10,   27,   28,   29,   30,   31,   32,   29,
376        33,   34,   35,   36,   36,   37,   38,   39,   40,   41,
377        36,   42,   43,   44,   45,   46,   47,   48,   49,   36,
378        10,   50,   10,    1,   51,    1,   52,   53,   54,   55,
379
380        56,   57,   58,   58,   59,   58,   58,   60,   61,   62,
381        63,   58,   58,   64,   65,   66,   67,   58,   58,   58,
382        58,   58,    1,    1,    1,    1,    1,    1,    1,    1,
383         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
384         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
385         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
386         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
387         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
388         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
389         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
390
391         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
392         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
393         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
394         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
395         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
396         1,    1,    1,    1,    1
397     } ;
398
399 static yyconst int yy_meta[68] =
400     {   0,
401         1,    2,    3,    4,    5,    6,    1,    7,    7,    1,
402         1,    8,    1,    9,   10,   11,   11,   11,   11,   11,
403        11,   11,   11,   12,   13,    7,    1,   11,   11,   11,
404        11,   11,    1,    1,    1,    1,    1,    1,    1,    1,
405         1,    1,    1,    1,    1,    1,    1,    1,    1,   14,
406        15,   16,   16,   16,   16,   16,   16,   15,   15,   15,
407        15,   15,   15,   15,   15,   15,   15
408     } ;
409
410 static yyconst short int yy_base[686] =
411     {   0,
412         0,   66,   68,   76,  119,  124,  173,  239,  148,  197,
413        82,   90, 2937, 2886, 2933, 3595, 2929, 3595,  165,   65,
414      3595, 3595, 2882, 3595,  130,  293,  173,  146, 2907, 3595,
415      3595,  350, 2893,   42,  402,   41, 2889,   74, 2888, 2895,
416      2876,  458,  197,   57,  219,  482,   38,  207, 2854,   37,
417      2851,  117,  249, 2880,  326, 2841, 2852,  105,    0, 3595,
418      2875, 3595,    0,  469,  424,  143,    0, 2828, 3595,   48,
419      3595,  223, 3595,  155, 2827,  202,   97, 3595,  252, 2817,
420       504, 2855, 2852, 2852, 3595,  258,  504,  312,  526,  201,
421       548, 2796,  557,  528, 2795,  582,  579,  614, 2820, 2829,
422
423       593,  601,  266, 2818,  182,  656,    0, 2796, 2791, 2766,
424      2761,  296, 2727, 2725, 2713, 2696, 2691,  426, 3595,   87,
425       659, 2659, 2663, 2655, 2650, 2651,  257,  196,  318,  276,
426       258,  288,  436, 2694,  631, 2693,  655, 2644,  690,  303,
427         0, 2681,  168, 3595, 3595,  701,  352,    0, 2634,  723,
428      3595, 3595, 2633,  447, 2632, 2676,  467,  461,  433, 2670,
429      2659, 2600,  720,  733,  206,  755,  759,  771,  781,  791,
430       828, 2581, 2570,  870,  453,  913,  955,    0, 2563, 2557,
431      2540, 2523, 2530, 2541, 2536, 2516, 2502, 2496, 2475, 2473,
432       277, 2442, 2436, 2402, 2404, 2407,  477,  436, 2405,  424,
433
434       401,  292,  813,  488, 2454, 2450,  845,  438,  855,  890,
435       756,  465, 2428, 2418,  930,  554, 2409, 2408,  463,  898,
436       999,  939,  972, 1042,  980, 2403,  490, 2378,  500, 2380,
437      2338, 2327, 2325, 2321, 2310,    0, 2305,    0,  508, 2274,
438      2238, 2212, 2211, 2176,  515,  517,  615,  527,  529, 1018,
439      1061, 1086, 2212, 2210, 1026, 2209, 2203, 2171, 2166,  565,
440      1069,  754, 1096,  802, 1123,    0, 1106, 1134, 1151, 1159,
441      1177, 1196,  601, 3595, 2136, 2137, 2127, 2131, 2090, 2090,
442      2084, 2078,    0, 2062,  607, 2056, 2024, 2025,  573,  576,
443       578,  676, 1204,  591, 1221, 1239, 1231, 2064, 2031, 2006,
444
445      2004, 1274,  676, 1256, 1293, 1318,  682,  808,  815, 1301,
446       819, 1328,    0, 1339, 1350, 1367, 1247, 1393, 1377, 1955,
447      1915, 1888,  742,  692, 1884, 1891,  794,  980,  777, 1889,
448      1856,  652,  945,  680,  820, 1411, 1420, 1436, 1842, 1824,
449      1800, 1446, 1473, 1455, 1266, 1515, 1492, 1500, 1809, 1534,
450      1559, 1544, 1009, 1052, 1569, 1571, 1580, 1590, 1601,    0,
451      1612, 1623, 1590, 1463, 1666, 1642, 1762, 1737, 1740, 1108,
452      3595, 1696, 1672, 1662, 1628, 1157, 3595, 1158, 3595,  774,
453      1514, 1500,  730, 1152,  697,  913, 1650,  805, 1686, 1709,
454      1695, 1516, 1500, 1721, 1222, 1730, 1474, 1744,    0,  830,
455
456      1755, 1772, 1571, 1797, 1782, 1816, 1841, 1851, 1284, 1377,
457      1832, 1861, 1861, 1872, 1883,    0, 1894, 1905, 1872, 1824,
458      1924, 1414, 1400, 1375, 1336, 1331, 1159, 1483, 1312, 1274,
459      1260, 1539,  606, 1730, 1238, 1949, 1959, 1969, 1984, 1256,
460      1994, 2004, 2019, 1245, 1535, 1915, 1932, 1950, 2029,    0,
461       874, 2040, 2057, 2065, 2082, 2101, 2109, 1214, 2126, 2136,
462      2146, 1633, 1675, 2154,  924,  966, 2165,    0, 1003, 1092,
463      1731, 1087, 1056, 1052, 2042, 3595, 2063, 3595, 1017, 2147,
464      1126,  624, 1311, 2187, 2192, 2183, 1756, 2193, 2203, 2230,
465      1979, 2238,  992, 2248, 2265, 2275,  830,  811, 1970, 2194,
466
467      2281, 2214, 2291,    0, 1111, 2302, 2319, 2256, 2344, 2329,
468      2362, 2371, 2387, 1807,  813, 1170,    0, 2065, 3595, 2228,
469       738,  713,  680,  731, 1201, 3595,  900,  653, 2409, 2414,
470      2419, 2424, 2418, 2436, 2445, 2446, 2459, 2469, 2480, 2494,
471      2504, 2515,  569,  531, 2215, 2217, 2523, 2221, 2533,    0,
472      1278, 2544, 2561, 2569, 2588,  519, 2597, 2606, 2615,  492,
473      2304, 3595, 2393,  452, 3595, 1416, 2621, 2629, 2637, 1981,
474      2647, 2657, 2672, 2682,  345, 2692, 2707, 2717,  305,  264,
475      2303,  245,  191, 2725,    0, 1477, 2441, 3595, 2444, 1632,
476      2735, 2745, 2755, 2770, 2780, 2790,   90,    0,   92, 2482,
477
478      3595,  100, 1647, 3595, 2798, 1982, 2808, 2818, 2833, 3595,
479      2843, 2853, 2763, 3595, 2868, 2876, 2884,   19, 2892, 2903,
480      3595, 2953, 2969, 2985, 3001, 3017, 3033, 3049, 3065, 3081,
481      3087, 3103, 3119, 1676, 3135, 3151, 3167, 3183, 3199, 3215,
482      3231, 3237, 3244, 3260, 3276, 3282, 3289, 3295, 3301, 3307,
483      3314, 3320, 3326, 3332, 3339, 3347, 3353, 3359, 3365, 3372,
484      3380, 3386, 3392, 3399, 3407, 3413, 3421, 3428, 3436, 3442,
485      3450, 3457, 3465, 3481, 3497, 3513, 3519, 3527, 3534, 3540,
486      3548, 3554, 3562, 3578, 2159
487     } ;
488
489 static yyconst short int yy_def[686] =
490     {   0,
491       621,    1,    1,    1,  622,  622,  623,  623,  624,  624,
492       625,  625,  621,  626,  621,  621,  621,  621,  627,  628,
493       621,  621,  629,  621,  630,  626,   26,   26,  631,  621,
494       621,  621,   32,   32,   32,   35,   35,   35,   35,   35,
495        35,  626,   26,  626,  621,  627,   32,   32,   35,   35,
496        35,  621,  621,  621,  632,   35,   35,  626,  633,  621,
497       633,  621,  633,  621,  627,  621,  634,  635,  621,  635,
498       621,  635,  621,  636,  637,  637,  637,  621,  621,  626,
499       626,  621,  621,  638,  621,  639,  621,  628,  621,  640,
500       628,  629,  629,  630,  641,  626,  626,   26,  631,   98,
501
502        98,   98,   98,  642,  643,   35,   35,   35,   35,   35,
503        35,   35,   35,   35,   35,   35,   35,  626,  621,  626,
504       621,  621,  621,  621,  621,  621,  638,  626,   98,  626,
505       626,  626,  621,  621,  621,  621,  632,  644,  626,  626,
506       633,  633,  621,  621,  621,  639,  621,  634,  635,  635,
507       621,  621,  635,  635,  637,  621,  637,  637,  621,  621,
508       638,  645,  621,  621,  640,  640,  621,  626,  626,  626,
509        98,  171,  646,  621,  647,  621,  106,   35,   35,   35,
510        35,   35,   35,   35,   35,   35,   35,   35,   35,   35,
511       626,  621,  621,  621,  621,  621,  638,  626,  171,  626,
512
513       626,  626,  621,  626,  621,  645,  626,  626,  626,  626,
514       626,  626,  648,  649,  649,  215,  650,  649,  651,  176,
515       621,  221,  221,  621,  221,   35,   35,   35,   35,   35,
516        35,   35,   35,   35,   35,   35,   35,   35,  626,  621,
517       621,  621,  621,  621,  638,  626,  626,  626,  626,  626,
518       626,  626,  621,  652,  652,  255,  652,  653,  654,  655,
519       621,  656,  224,  656,  656,  265,  656,  621,  268,  268,
520       621,  268,  621,  621,   35,   35,   35,   35,   35,   35,
521        35,   35,   35,   35,  626,  621,  621,  621,  638,  626,
522       626,  626,  626,  626,  626,  626,  626,  657,  657,  658,
523
524       659,  621,  621,  621,  621,  621,  660,  660,  661,  271,
525       661,  661,  312,  661,  621,  315,  315,  621,  315,   35,
526        35,   35,   35,   35,   35,   35,   35,   35,  626,  621,
527       621,  638,  626,  626,  626,  626,  626,  626,  621,  662,
528       663,  302,  621,  343,  343,  621,  343,  621,  621,  621,
529       621,  621,  621,  664,  664,  665,  318,  665,  665,  359,
530       665,  621,  362,  362,  621,  362,   35,   35,   35,  621,
531       621,   35,   35,   35,   35,  621,  621,  621,  621,  626,
532       621,  621,  638,  626,  626,  626,  626,  626,  626,  626,
533       626,  621,  666,  621,  667,  346,  667,  667,  398,  398,
534
535       621,  401,  401,  621,  401,  621,  621,  621,  621,  668,
536       668,  669,  365,  669,  669,  415,  669,  621,  418,  418,
537       418,   35,   35,   35,   35,   35,   35,   35,  626,  621,
538       621,  638,  626,  626,  626,  626,  626,  626,  626,  621,
539       621,  621,  621,  670,  670,  671,  404,  671,  671,  449,
540       449,  621,  452,  452,  621,  452,  621,  621,  621,  621,
541       621,  621,  672,  672,  673,  673,  673,  467,  467,   35,
542        35,   35,   35,   35,  621,  621,  621,  621,  621,  621,
543       674,  638,  626,  675,  676,  626,  626,  626,  626,  626,
544       626,  621,  621,  621,  621,  621,  621,  677,  677,  678,
545
546       455,  678,  678,  503,  503,  621,  506,  506,  621,  506,
547       621,  621,  621,  621,  679,  679,   35,  621,  621,   35,
548        35,   35,  621,  674,  674,  621,  638,  626,  675,  675,
549       675,  675,  621,  675,  676,  676,  626,  626,  626,  621,
550       621,  621,  621,  680,  680,  681,  509,  681,  681,  549,
551       549,  621,  552,  552,  552,  621,  621,  621,  621,  621,
552       621,  621,   35,   35,  621,  638,  621,  621,  626,  626,
553       626,  626,  626,  621,  621,  621,  621,  621,  621,  682,
554       682,  683,  683,  683,  584,  584,  621,  621,   35,  684,
555       626,  626,  626,  621,  621,  621,  621,  685,  685,  621,
556
557       621,  684,  684,  621,  626,  626,  626,  626,  626,  621,
558       621,  621,  621,  621,  626,  626,  626,  626,  626,  626,
559         0,  621,  621,  621,  621,  621,  621,  621,  621,  621,
560       621,  621,  621,  621,  621,  621,  621,  621,  621,  621,
561       621,  621,  621,  621,  621,  621,  621,  621,  621,  621,
562       621,  621,  621,  621,  621,  621,  621,  621,  621,  621,
563       621,  621,  621,  621,  621,  621,  621,  621,  621,  621,
564       621,  621,  621,  621,  621,  621,  621,  621,  621,  621,
565       621,  621,  621,  621,  621
566     } ;
567
568 static yyconst short int yy_nxt[3663] =
569     {   0,
570        14,   15,   16,   17,   18,   19,   20,   21,   22,   14,
571        23,   24,   14,   14,   25,   26,   27,   28,   26,   26,
572        26,   26,   26,   29,   30,   31,   14,   32,   33,   33,
573        33,   34,   35,   35,   35,   35,   36,   35,   37,   35,
574        38,   39,   40,   41,   35,   35,   35,   35,   35,   42,
575        14,   43,   43,   43,   43,   43,   43,   14,   14,   14,
576        14,   14,   14,   14,   44,   14,   14,   45,   81,   52,
577        89,   46,  151,   53,  107,  110,  115,   52,  107,   54,
578       111,   53,   55,   76,   16,   77,   78,   54,   90,  109,
579        55,   76,   16,   77,   78,   47,   48,  150,  128,   49,
580
581       158,  113,  604,  131,   56,  394,   81,   50,   57,   35,
582        51,   35,   56,  547,   91,  114,   57,   35,  133,   35,
583        15,   60,   61,  120,   62,   15,   60,   61,  134,   62,
584        62,   79,   58,   95,   95,   62,   81,   95,   95,   79,
585        58,  191,   62,   63,  147,  119,  156,   62,   63,   15,
586        16,   17,   69,   65,   81,   95,  154,  119,   70,   71,
587        72,  102,  102,  102,  102,  102,  103,   85,   64,  147,
588       119,  140,   73,   64,   15,   16,   17,   86,   65,   96,
589        87,   87,   87,   87,   87,   87,   87,   87,  101,  101,
590       101,  101,  101,  101,  101,  101,  174,   74,   15,   16,
591
592        17,   69,   65,  157,  621,  176,   89,   70,   71,   72,
593        80,  621,  100,  100,  100,  100,  100,  100,  100,  100,
594       121,   73,   66,   67,   67,   67,   67,   67,   67,   67,
595        67,   67,   67,   67,   67,   67,   67,   67,   67,   67,
596        15,   16,   17,  107,   65,   81,   74,  152,  122,  123,
597       166,  156,  124,  159,  160,  166,  155,  198,  394,   85,
598       125,  135,  129,  126,   87,   87,   87,   87,   87,   87,
599        87,   87,  150,   87,   87,   87,   87,   87,   87,   87,
600        87,  172,  172,  172,  172,  172,  172,  547,   66,   67,
601        67,   67,   67,   67,   67,   67,   67,   67,   67,   67,
602
603        67,   67,   67,   67,   67,   67,   97,   81,   98,   98,
604        98,   98,   98,   98,   98,   98,   99,  621,  197,  201,
605       100,  100,  100,  100,  100,   81,   81,  182,  501,  138,
606       138,   80,  183,  138,  138,  621,  184,   81,  185,  239,
607       200,   81,   81,  202,  100,  100,  100,  100,  100,  100,
608        80,  138,   81,  147,  119,  246,   80,  204,  574,   80,
609        80,   91,   80,   80,   80,  106,  106,  106,  106,  106,
610       106,  106,  106,   99,  199,  139,   80,  106,  106,  106,
611       106,  106,  107,  107,  107,  107,  108,  107,  107,  107,
612       107,  107,  107,  107,  107,  107,  107,  107,  107,   81,
613
614       107,  100,  100,  100,  100,  100,  100,   80,   80,   80,
615        80,   80,   80,   80,   80,   80,   80,  107,  107,  107,
616       107,  107,  107,  107,  107,  621,   85,  147,  119,  107,
617       107,  107,  107,  107,  159,  160,  146,  133,  107,  621,
618       621,  621,  621,  621,  621,  621,  621,  134,  147,  119,
619        81,  207,  248,   80,   80,   80,   80,   80,   80,  118,
620       119,   80,   80,   80,  158,   80,   80,  174,  157,   80,
621       143,  119,  144,   81,  145,   81,  220,  174,  144,   85,
622       145,   80,   80,   80,   85,   81,  220,   81,   99,  246,
623       246,  273,  145,  145,   86,  589,  150,   87,   87,   87,
624
625        87,   87,   87,   87,   87,   80,  174,   80,   80,   80,
626       156,   80,   80,  274,   81,   80,  156,   85,  145,   87,
627        87,   87,   87,   87,   87,   87,   87,   80,   80,   80,
628       245,   95,   95,  174,  276,   95,   95,   81,  163,  277,
629       127,  164,  164,  164,  164,  164,  164,  164,  164,   88,
630       249,   88,   88,   95,  501,   88,   88,   81,   92,   88,
631        92,   92,   92,  285,   92,   92,   81,  290,   92,  257,
632       257,  257,   88,   88,  289,   85,   81,   96,   81,  174,
633        92,   92,   92,   94,  292,   80,   80,   94,  220,   80,
634        80,  246,  447,   94,  168,  169,  170,  168,  168,  168,
635
636       168,  168,  273,  333,  293,   94,   94,   80,  172,  172,
637       172,  172,  172,  172,  172,  172,  172,  172,  172,  172,
638       172,  172,  172,  172,  274,   81,   85,   81,   81,  171,
639       171,  171,  171,  171,  171,  171,  171,  334,   99,  332,
640        81,  171,  171,  171,  171,  171,   87,   87,   87,   87,
641        87,   87,   87,   87,   85,   81,   81,  483,  138,  138,
642       121,  329,  138,  138,   81,  171,  171,  171,  171,  171,
643       171,  177,  177,  177,  177,  177,  177,  177,  177,   99,
644       138,  291,  527,  177,  177,  177,  177,  177,  122,  123,
645       174,  137,  124,   80,   80,  137,  174,   80,   80,  220,
646
647       125,  137,   81,  126,  139,  263,  383,  171,  171,  171,
648       171,  171,  171,  137,  137,   80,  621,  621,  621,  621,
649       621,  621,  621,  621,  149,   81,  372,  149,  149,   81,
650       335,  373,   85,  526,  149,  164,  164,  164,  164,  164,
651       164,  164,  164,  370,  565,  385,   81,  149,  164,  164,
652       164,  164,  164,  164,  164,  164,  165,  564,  165,  165,
653        95,  434,  165,  165,   95,  371,  165,  261,  174,  207,
654        95,  208,  208,  208,  208,  208,  208,  263,  165,  165,
655       165,  563,   95,   95,  207,  432,  208,  208,  208,  208,
656       208,  208,  208,  208,  207,  376,  209,  209,  209,  209,
657
658       209,  209,  209,  209,  207,   81,  210,  210,  210,  210,
659       210,  211,  208,  208,  138,  621,  174,  377,  138,  387,
660        81,  261,  174,   81,  138,  263,   81,  174,  261,  174,
661        81,  263,  621,  174,  447,  380,  138,  138,  310,  429,
662        81,   80,  310,  212,  212,  212,  212,  212,  212,  212,
663       212,  444,  444,  396,   81,  212,  212,  212,  212,  212,
664       250,  251,  252,  250,  250,  250,  250,  250,  207,   81,
665       208,  208,  208,  208,  208,  208,  208,  208,  386,  212,
666       212,  212,  212,  212,  212,  214,  215,  216,  216,  216,
667       216,  216,  216,  217,   81,  498,  498,  218,  218,  218,
668
669       218,  218,   85,  207,   81,  208,  208,  208,  208,  208,
670       208,  208,  208,  225,  225,  225,  225,  225,  225,  225,
671       225,  218,  218,  218,  218,  218,  218,  174,  221,  222,
672       223,  221,  221,  221,  221,  221,  224,  261,  174,   81,
673       225,  225,  225,  225,  225,  255,  255,  256,  257,  257,
674       257,  257,  257,  217,  265,  265,  265,  265,  265,  265,
675       265,  265,   81,  566,  225,  225,  225,  225,  225,  225,
676       226,  226,  226,  226,  226,  226,  226,  226,  435,  621,
677       174,  378,  226,  226,  226,  226,  226,  266,  266,  266,
678       266,  266,  267,  621,   81,  264,  264,  264,  264,  264,
679
680       264,  264,  264,  379,  384,  492,  212,  212,  212,  212,
681       212,  212,  261,  174,  262,  262,  262,  262,  262,  262,
682       262,  262,  263,  174,  515,  515,  264,  264,  264,  264,
683       264,  293,  263,  294,  294,  294,  294,  294,  294,  294,
684       294,  299,  299,  299,  299,  299,  299,  299,  299,  217,
685       264,  264,  264,  264,  264,  264,  174,  268,  269,  270,
686       268,  268,  268,  268,  268,  271,  174,   81,  523,  272,
687       272,  272,  272,  272,  293,  310,  295,  295,  295,  295,
688       295,  295,  295,  295,  304,  305,  306,  304,  304,  304,
689       304,  304,  522,  272,  272,  272,  272,  272,  272,  293,
690
691       521,  296,  296,  296,  296,  296,  297,  294,  294,  370,
692        81,  272,  272,  272,  272,  272,  272,  272,  272,  261,
693       174,  308,  308,  308,  308,  308,  308,  525,  526,  263,
694       520,  371,  544,  544,  517,   81,  261,  174,  308,  308,
695       308,  308,  308,  308,  308,  308,  263,  261,  174,  309,
696       309,  309,  309,  309,  309,  309,  309,  310,  376,  378,
697       475,  311,  311,  311,  311,  311,  312,  312,  312,  312,
698       312,  312,  312,  312,  313,  313,  313,  313,  313,  314,
699       377,  379,  476,  261,  174,  311,  311,  311,  311,  311,
700       311,  174,  315,  316,  317,  315,  315,  315,  315,  315,
701
702       318,   81,  525,  526,  319,  319,  319,  319,  319,  621,
703       433,  311,  311,  311,  311,  311,  311,  311,  311,  336,
704       337,  338,  336,  336,  336,  336,  336,  457,  319,  319,
705       319,  319,  319,  319,  293,  394,  294,  294,  294,  294,
706       294,  294,  294,  294,  293,  396,  294,  294,  294,  294,
707       294,  294,  293,   81,  294,  294,  294,  294,  294,  294,
708       294,  294,  360,  360,  360,  360,  360,  361,  396,  348,
709        81,  349,  349,  349,  349,  349,  349,  349,  349,  342,
710        81,  399,  399,  399,  399,  399,  400,   81,   81,  343,
711       344,  345,  343,  343,  343,  343,  343,  346,  174,  580,
712
713       580,  347,  347,  347,  347,  347,  348,  310,  350,  350,
714       350,  350,  350,  350,  350,  350,  319,  319,  319,  319,
715       319,  319,  319,  319,  480,  347,  347,  347,  347,  347,
716       347,  348,  479,  351,  351,  351,  351,  351,  352,  349,
717       349,  261,  174,  355,  355,  355,  355,  355,  355,  355,
718       355,  310,  261,  174,  355,  355,  355,  355,  355,  355,
719        81,   81,  310,  261,  174,  356,  356,  356,  356,  356,
720       356,  356,  356,  357,  474,  528,  473,  358,  358,  358,
721       358,  358,  359,  359,  359,  359,  359,  359,  359,  359,
722       621,  174,  358,  358,  358,  358,  358,  358,  358,  358,
723
724       357,  358,  358,  358,  358,  358,  358,  174,  362,  363,
725       364,  362,  362,  362,  362,  362,  365,  590,   85,  472,
726       366,  366,  366,  366,  366,  387,  388,  388,  388,  388,
727       388,  388,  388,  388,  387,  389,  389,  389,  389,  389,
728       389,  389,  389,  471,  366,  366,  366,  366,  366,  366,
729       387,  390,  390,  390,  390,  390,  391,  388,  388,  470,
730        81,  347,  347,  347,  347,  347,  347,  347,  347,   81,
731       398,  398,  398,  398,  398,  398,  398,  398,  416,  416,
732       416,  416,  416,  417,  477,   81,  394,  621,  395,  395,
733       395,  395,  395,  395,  395,  395,  396,  396,  598,  598,
734
735       397,  397,  397,  397,  397,  621,  478,  397,  397,  397,
736       397,  397,  397,  397,  397,  406,  407,  408,  406,  406,
737       406,  406,  406,  342,  397,  397,  397,  397,  397,  397,
738       401,  402,  403,  401,  401,  401,  401,  401,  404,  259,
739       481,   85,  405,  405,  405,  405,  405,  348,  394,  349,
740       349,  349,  349,  349,  349,  349,  349,  348,  396,  349,
741       349,  349,  349,  349,  349,  431,  405,  405,  405,  405,
742       405,  405,  348,  430,  349,  349,  349,  349,  349,  349,
743       349,  349,  261,  174,  261,  174,  450,  450,  450,  450,
744       450,  451,  310,  482,  357,  366,  366,  366,  366,  366,
745
746       366,  366,  366,  621,  174,  415,  415,  415,  415,  415,
747       415,  415,  415,  357,  261,  174,  411,  411,  411,  411,
748       411,  411,  411,  411,  357,  261,  174,  411,  411,  411,
749       411,  411,  411,  603,  604,  357,  261,  174,  412,  412,
750       412,  412,  412,  412,  412,  412,  413,  174,  603,  604,
751       414,  414,  414,  414,  414,  621,  357,  414,  414,  414,
752       414,  414,  414,  414,  414,  436,  437,  438,  439,  436,
753       436,  436,  436,  428,  414,  414,  414,  414,  414,  414,
754       174,  418,  419,  420,  418,  418,  418,  418,  418,  174,
755       148,  148,  427,  421,  421,  421,  421,  421,  413,   81,
756
757       387,  388,  388,  388,  388,  388,  388,  388,  388,  387,
758       388,  388,  388,  388,  388,  388,  426,  421,  421,  421,
759       421,  421,  421,  387,  388,  388,  388,  388,  388,  388,
760       388,  388,  518,  484,  425,   81,  441,  442,  443,  441,
761       441,  441,  441,  441,   81,  405,  405,  405,  405,  405,
762       405,  405,  405,  484,  519,  484,  485,  394,   81,  445,
763       445,  445,  445,  445,  445,  445,  445,  396,  394,  486,
764       446,  446,  446,  446,  446,  446,  446,  446,  447,   81,
765       424,  423,  448,  448,  448,  448,  448,  449,  449,  449,
766       449,  449,  449,  449,  449,  621,  422,  448,  448,  448,
767
768       448,  448,  448,  448,  448,   81,  448,  448,  448,  448,
769       448,  448,  452,  453,  454,  452,  452,  452,  452,  452,
770       455,  174,  348,  342,  456,  456,  456,  456,  456,  457,
771       413,  458,  458,  458,  458,  458,  458,  458,  458,  468,
772       468,  468,  468,  468,  469,  261,  174,  259,  456,  456,
773       456,  456,  456,  456,  457,  357,  459,  459,  459,  459,
774       459,  459,  459,  459,  457,  217,  460,  460,  460,  460,
775       460,  461,  458,  458,  261,  174,  421,  421,  421,  421,
776       421,  421,  421,  421,  413,  621,  174,  467,  467,  467,
777       467,  467,  467,  467,  467,  413,  261,  174,  464,  464,
778
779       464,  464,  464,  464,  464,  464,  413,  261,  174,  464,
780       464,  464,  464,  464,  464,  382,  381,  413,  261,  174,
781       465,  465,  465,  465,  465,  465,  465,  465,  394,  375,
782       374,  369,  466,  466,  466,  466,  466,  621,  447,  466,
783       466,  466,  466,  466,  466,  466,  466,  456,  456,  456,
784       456,  456,  456,  456,  456,  368,  466,  466,  466,  466,
785       466,  466,  486,  621,  487,  487,  487,  487,  487,  487,
786       487,  487,  486,  447,  488,  488,  488,  488,  488,  488,
787       488,  488,  486,  394,  489,  489,  489,  489,  489,  490,
788       491,  491,  486,  447,  569,  605,  367,  486,   81,  491,
789
790       491,  491,  487,  487,  487,  487,  487,  492,   81,  493,
791       493,  493,  493,  493,  493,  493,  493,  492,   81,  494,
792       494,  494,  494,  494,  494,  494,  494,  342,   81,  259,
793        81,   81,  492,   81,  495,  495,  495,  495,  495,  496,
794       493,  493,  394,  475,  499,  499,  499,  499,  499,  499,
795       499,  499,  447,  394,  217,  500,  500,  500,  500,  500,
796       500,  500,  500,  501,  477,  476,  518,  502,  502,  502,
797       502,  502,  503,  503,  503,  503,  503,  503,  503,  503,
798       504,  504,  504,  504,  504,  505,  478,  217,  519,  286,
799       331,  502,  502,  502,  502,  502,  502,  506,  507,  508,
800
801       506,  506,  506,  506,  506,  509,  330,  328,  327,  510,
802       510,  510,  510,  510,  621,  326,  502,  502,  502,  502,
803       502,  502,  502,  502,  511,  512,  513,  511,  511,  511,
804       511,  511,  325,  510,  510,  510,  510,  510,  510,  457,
805       324,  458,  458,  458,  458,  458,  458,  458,  458,  457,
806       484,  458,  458,  458,  458,  458,  458,  458,  458,  457,
807       323,  458,  458,  458,  458,  458,  458,  261,  174,  614,
808       484,  322,  484,  484,  614,  321,  320,  413,  261,  174,
809       516,  516,  516,  516,  516,  516,  516,  516,  530,  302,
810       531,  532,  533,  530,  259,  531,  532,  533,  537,  538,
811
812       539,  537,  537,  537,  537,  537,  486,  394,  487,  487,
813       487,  487,  487,  487,  487,  487,  486,  501,  487,  487,
814       487,  487,  487,  487,  487,  487,  217,  621,  394,  561,
815       394,  298,   81,  217,  621,  105,  534,  501,  501,  286,
816       547,  536,   81,  486,  547,  487,  487,  487,  487,  487,
817       487,  562,   81,  540,  541,  542,  540,  540,  540,  540,
818       540,  492,  288,  493,  493,  493,  493,  493,  493,  493,
819       493,  550,  550,  550,  550,  550,  551,  286,  492,   81,
820       493,  493,  493,  493,  493,  493,  493,  493,  492,  287,
821       493,  493,  493,  493,  493,  493,  510,  510,  510,  510,
822
823       510,  510,  510,  510,  394,  561,  545,  545,  545,  545,
824       545,  545,  545,  545,  501,  394,  394,  546,  546,  546,
825       546,  546,  546,  546,  546,  547,  547,  562,  286,  548,
826       548,  548,  548,  548,  549,  549,  549,  549,  549,  549,
827       549,  549,  621,  284,  548,  548,  548,  548,  548,  548,
828       548,  548,  283,  548,  548,  548,  548,  548,  548,  552,
829       553,  554,  552,  552,  552,  552,  552,  282,  281,  280,
830       279,  555,  555,  555,  555,  555,  174,  556,  556,  556,
831       556,  556,  556,  556,  556,  174,  557,  557,  557,  557,
832       557,  557,  557,  557,  587,  555,  555,  555,  555,  555,
833
834       555,  174,  558,  558,  558,  558,  558,  559,  556,  556,
835       621,  278,  621,  621,  621,  530,  588,  531,  532,  533,
836       621,  275,  531,  532,  533,  621,   99,  621,  621,  533,
837       567,  217,  259,  568,  568,  568,  568,  568,  568,  568,
838       568,  217,  587,  529,  529,  600,  621,  529,  621,  621,
839       621,  105,   85,  535,  535,  205,  247,  535,  534,  529,
840       529,  529,  244,  534,  588,  243,  242,  601,  534,  535,
841       535,  535,  569,  534,  570,  570,  570,  570,  570,  570,
842       570,  570,  569,  600,  571,  571,  571,  571,  571,  571,
843       571,  571,  241,  569,  536,  572,  572,  572,  572,  572,
844
845       573,  570,  570,  240,  238,  601,  237,  574,   81,  575,
846       575,  575,  575,  575,  575,  575,  575,  574,   81,  576,
847       576,  576,  576,  576,  576,  576,  576,  236,  574,   81,
848       577,  577,  577,  577,  577,  578,  575,  575,  555,  555,
849       555,  555,  555,  555,  555,  555,  394,  235,  581,  581,
850       581,  581,  581,  581,  581,  581,  547,  394,  234,  582,
851       582,  582,  582,  582,  582,  582,  582,  233,  232,  231,
852       230,  583,  583,  583,  583,  583,  584,  584,  584,  584,
853       584,  584,  584,  584,  585,  585,  585,  585,  585,  586,
854       229,  228,  227,  105,   97,  583,  583,  583,  583,  583,
855
856       583,  621,   85,  583,  583,  583,  583,  583,  583,  583,
857       583,  174,  556,  556,  556,  556,  556,  556,  556,  556,
858       174,  556,  556,  556,  556,  556,  556,  556,  556,  174,
859       556,  556,  556,  556,  556,  556,  568,  568,  568,  568,
860       568,  568,  568,  568,  568,  568,  568,  568,  568,  568,
861       568,  568,  591,  592,  593,  591,  591,  591,  591,  591,
862       569,   85,  570,  570,  570,  570,  570,  570,  570,  570,
863       569,  205,  570,  570,  570,  570,  570,  570,  570,  570,
864       155,  156,  150,  150,  142,  569,   81,  570,  570,  570,
865       570,  570,  570,  203,  136,  136,   81,  594,  595,  596,
866
867       594,  594,  594,  594,  594,  574,   81,  575,  575,  575,
868       575,  575,  575,  575,  575,  196,  195,  194,  193,  192,
869       574,   81,  575,  575,  575,  575,  575,  575,  575,  575,
870       574,  190,  575,  575,  575,  575,  575,  575,  394,  189,
871       599,  599,  599,  599,  599,  599,  599,  599,  605,  188,
872       606,  606,  606,  606,  606,  606,  606,  606,  605,  187,
873       607,  607,  607,  607,  607,  607,  607,  607,  605,  186,
874       608,  608,  608,  608,  608,  609,  606,  606,  610,  610,
875       610,  610,  610,  610,   81,  610,  610,  610,  610,  610,
876       610,  610,  610,  181,   81,  611,  611,  611,  611,  611,
877
878       611,  611,  611,  180,   81,  612,  612,  612,  612,  612,
879       613,  610,  610,  615,  616,  617,  615,  615,  615,  615,
880       615,  605,  179,  606,  606,  606,  606,  606,  606,  606,
881       606,  605,  178,  606,  606,  606,  606,  606,  606,  606,
882       606,  105,   80,  105,  167,   93,  605,   81,  606,  606,
883       606,  606,  606,  606,   85,   83,   82,   81,  610,  610,
884       610,  610,  610,  610,  610,  610,   81,   81,  610,  610,
885       610,  610,  610,  610,  610,  610,  156,  150,  142,  113,
886       111,  136,   81,  618,  618,  618,  618,  618,  618,  618,
887       618,  615,  615,  615,  615,  615,  615,  615,  615,  619,
888
889       619,  619,  619,  619,  620,  618,  618,  618,  618,  618,
890       618,  618,  618,  618,  618,  132,  130,   81,  618,  618,
891       618,  618,  618,  618,  117,   81,  116,  115,  112,  107,
892       105,   93,   83,   81,   82,   81,  621,  621,  621,  621,
893       621,   81,  621,  621,  621,  621,  621,  621,  621,  621,
894       621,  621,   81,   59,   59,   59,   59,   59,   59,   59,
895        59,   59,   59,   59,   59,   59,   59,   59,   59,   31,
896        31,   31,   31,   31,   31,   31,   31,   31,   31,   31,
897        31,   31,   31,   31,   31,   68,   68,   68,   68,   68,
898        68,   68,   68,   68,   68,   68,   68,   68,   68,   68,
899
900        68,   75,   75,   75,   75,   75,   75,   75,   75,   75,
901        75,   75,   75,   75,   75,   75,   75,   80,  621,  621,
902       621,  621,  621,  621,  621,   80,   80,   80,  621,  621,
903        80,   80,   80,   84,   84,   84,   84,   84,   84,   84,
904        84,   84,   84,   84,   84,   84,   84,   84,   84,   88,
905       621,  621,  621,  621,   88,  621,  621,   88,   88,   88,
906        88,  621,   88,   88,   88,   92,  621,  621,  621,  621,
907       621,  621,  621,   92,   92,   92,  621,  621,   92,   92,
908        92,   94,  621,  621,   94,   94,  621,   94,  621,   94,
909        94,   94,  621,  621,   94,   94,   94,  104,  104,  621,
910
911       621,  621,  104,  137,  621,  621,  137,  137,  621,  137,
912       621,  137,  137,  137,  621,  621,  137,  137,  137,  141,
913       621,  621,  141,  141,  621,  141,  621,  141,  141,  141,
914       621,  141,  621,  141,  141,  149,  621,  621,  149,  621,
915       621,  149,  621,  149,  149,  149,  149,  621,  149,  149,
916       149,  153,  153,  153,  153,  153,  153,  153,  153,  153,
917       153,  153,  153,  153,  153,  153,  153,  155,  155,  621,
918       155,  621,  155,  155,  155,  155,  155,  155,  155,  155,
919       155,  155,  155,  161,  161,  161,  161,  161,  161,  161,
920       161,  161,  161,  161,  161,  161,  161,  161,  161,  162,
921
922       162,  621,  162,  162,  162,  162,  162,  162,  162,  162,
923       162,  162,  162,  162,  162,  165,  621,  621,  621,  621,
924       165,  621,  621,  165,  165,  165,  621,  621,  165,  165,
925       165,   95,  621,  621,   95,   95,  621,   95,  621,   95,
926        95,   95,  621,  621,   95,   95,   95,  173,  173,  621,
927       621,  621,  173,  175,  175,  175,  621,  621,  621,  175,
928       138,  621,  621,  138,  138,  621,  138,  621,  138,  138,
929       138,  621,  621,  138,  138,  138,  206,  206,  206,  206,
930       206,  206,  206,  206,  206,  206,  206,  206,  206,  206,
931       206,  206,  213,  213,  621,  621,  621,  213,  219,  219,
932
933       219,  621,  621,  621,  219,  253,  253,  621,  621,  621,
934       253,  254,  254,  621,  621,  621,  254,  258,  258,  621,
935       621,  621,  258,  260,  260,  260,  621,  621,  621,  260,
936       298,  298,  621,  621,  621,  298,  300,  300,  621,  621,
937       621,  300,  301,  301,  621,  621,  621,  301,  303,  303,
938       303,  621,  621,  621,  303,  307,  307,  307,  307,  621,
939       621,  621,  307,  339,  339,  621,  621,  621,  339,  340,
940       340,  621,  621,  621,  340,  341,  341,  621,  621,  621,
941       341,  353,  353,  353,  621,  621,  621,  353,  354,  354,
942       354,  354,  621,  621,  621,  354,  392,  392,  621,  621,
943
944       621,  392,  393,  393,  621,  621,  621,  393,  409,  409,
945       409,  621,  621,  621,  409,  410,  410,  410,  410,  621,
946       621,  621,  410,  440,  440,  621,  621,  621,  440,  444,
947       621,  444,  444,  621,  621,  621,  444,  462,  462,  462,
948       621,  621,  621,  462,  463,  463,  463,  463,  621,  621,
949       621,  463,  497,  497,  621,  621,  621,  497,  498,  621,
950       498,  498,  621,  621,  621,  498,  514,  514,  514,  621,
951       621,  621,  514,  515,  515,  515,  621,  621,  621,  621,
952       515,  524,  524,  524,  524,  524,  524,  524,  524,  524,
953       524,  524,  524,  524,  524,  524,  524,  529,  529,  621,
954
955       529,  529,  529,  621,  621,  529,  529,  529,  621,  621,
956       529,  529,  529,  535,  535,  621,  535,  535,  535,  621,
957       621,  535,  535,  535,  621,  621,  535,  535,  535,  543,
958       543,  621,  621,  621,  543,  544,  621,  544,  544,  621,
959       621,  621,  544,  560,  560,  621,  621,  621,  621,  560,
960       579,  579,  621,  621,  621,  579,  580,  621,  580,  580,
961       621,  621,  621,  580,  597,  597,  621,  621,  621,  597,
962       598,  621,  598,  621,  621,  621,  621,  598,  602,  602,
963       602,  602,  602,  602,  602,  602,  602,  602,  602,  602,
964       602,  602,  602,  602,   13,  621,  621,  621,  621,  621,
965
966       621,  621,  621,  621,  621,  621,  621,  621,  621,  621,
967       621,  621,  621,  621,  621,  621,  621,  621,  621,  621,
968       621,  621,  621,  621,  621,  621,  621,  621,  621,  621,
969       621,  621,  621,  621,  621,  621,  621,  621,  621,  621,
970       621,  621,  621,  621,  621,  621,  621,  621,  621,  621,
971       621,  621,  621,  621,  621,  621,  621,  621,  621,  621,
972       621,  621
973     } ;
974
975 static yyconst short int yy_chk[3663] =
976     {   0,
977         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
978         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
979         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
980         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
981         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
982         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
983         1,    1,    1,    1,    1,    1,    1,    2,  618,    3,
984        20,    2,   70,    3,   47,   36,   50,    4,   34,    3,
985        36,    4,    3,   11,   11,   11,   11,    4,   20,   34,
986         4,   12,   12,   12,   12,    2,    2,   70,   47,    2,
987
988        77,   38,  602,   50,    3,  599,   44,    2,    3,    3,
989         2,    3,    4,  597,   20,   38,    4,    4,   52,    4,
990         5,    5,    5,   44,    5,    6,    6,    6,   52,    6,
991         5,   11,    3,   25,   25,    6,  120,   25,   25,   12,
992         4,  120,    5,    5,   66,   66,   77,    6,    6,    9,
993         9,    9,    9,    9,   58,   25,   74,   74,    9,    9,
994         9,   28,   28,   28,   28,   28,   28,   19,    5,  143,
995       143,   58,    9,    6,    7,    7,    7,   19,    7,   25,
996        19,   19,   19,   19,   19,   19,   19,   19,   27,   27,
997        27,   27,   27,   27,   27,   27,  105,    9,   10,   10,
998
999        10,   10,   10,   76,  583,  105,   90,   10,   10,   10,
1000        43,  165,   43,   43,   43,   43,   43,   43,   43,   43,
1001        45,   10,    7,    7,    7,    7,    7,    7,    7,    7,
1002         7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
1003         8,    8,    8,   48,    8,  128,   10,   72,   45,   45,
1004        90,   76,   45,   79,   79,  165,   79,  128,  582,  127,
1005        45,   53,   48,   45,   53,   53,   53,   53,   53,   53,
1006        53,   53,   72,   86,   86,   86,   86,   86,   86,   86,
1007        86,  103,  103,  103,  103,  103,  103,  580,    8,    8,
1008         8,    8,    8,    8,    8,    8,    8,    8,    8,    8,
1009
1010         8,    8,    8,    8,    8,    8,   26,  131,   26,   26,
1011        26,   26,   26,   26,   26,   26,   26,   88,  127,  131,
1012        26,   26,   26,   26,   26,  130,  191,  112,  579,   55,
1013        55,  129,  112,   55,   55,   88,  112,  132,  112,  191,
1014       130,  202,   26,  132,   26,   26,   26,   26,   26,   26,
1015        32,   55,  140,  147,  147,  202,   32,  140,  575,   32,
1016        32,   88,   32,   32,   32,   32,   32,   32,   32,   32,
1017        32,   32,   32,   32,  129,   55,   32,   32,   32,   32,
1018        32,   32,   32,   32,   32,   32,   32,   32,   32,   32,
1019        32,   32,   32,   32,   32,   32,   32,   32,   32,   32,
1020
1021        32,   32,   32,   32,   32,   32,   32,   32,   32,   32,
1022        32,   32,   32,   32,   32,   32,   32,   35,   35,   35,
1023        35,   35,   35,   35,   35,   35,   65,  118,  118,   35,
1024        35,   35,   35,   35,  159,  159,   65,  133,   35,   65,
1025        65,   65,   65,   65,   65,   65,   65,  133,  154,  154,
1026       201,  208,  201,   35,   35,   35,   35,   35,   35,   42,
1027        42,   42,   42,   42,  158,   42,   42,  175,  157,   42,
1028        64,   64,   64,  200,   64,  118,  175,  219,   64,  197,
1029        64,   42,   42,   42,   46,  198,  219,  208,  212,  200,
1030       198,  227,   64,   64,   46,  564,  154,   46,   46,   46,
1031
1032        46,   46,   46,   46,   46,   81,  560,   81,   81,   81,
1033       158,   81,   81,  227,  212,   81,  157,  245,   64,   87,
1034        87,   87,   87,   87,   87,   87,   87,   81,   81,   81,
1035       197,   94,   94,  556,  229,   94,   94,  204,   89,  229,
1036        46,   89,   89,   89,   89,   89,   89,   89,   89,   91,
1037       204,   91,   91,   94,  544,   91,   91,  239,   93,   91,
1038        93,   93,   93,  239,   93,   93,  246,  246,   93,  216,
1039       216,  216,   91,   91,  245,  289,  248,   94,  249,  260,
1040        93,   93,   93,   96,  249,   96,   96,   96,  260,   96,
1041        96,  248,  543,   96,   97,   97,   97,   97,   97,   97,
1042
1043        97,   97,  273,  290,  294,   96,   96,   96,  101,  101,
1044       101,  101,  101,  101,  101,  101,  102,  102,  102,  102,
1045       102,  102,  102,  102,  273,  290,  482,  291,   97,   98,
1046        98,   98,   98,   98,   98,   98,   98,  291,  247,  289,
1047       294,   98,   98,   98,   98,   98,  135,  135,  135,  135,
1048       135,  135,  135,  135,  332,  433,  285,  433,  137,  137,
1049       121,  285,  137,  137,  247,   98,   98,   98,   98,   98,
1050        98,  106,  106,  106,  106,  106,  106,  106,  106,  106,
1051       137,  247,  482,  106,  106,  106,  106,  106,  121,  121,
1052       303,  139,  121,  139,  139,  139,  307,  139,  139,  303,
1053
1054       121,  139,  528,  121,  137,  307,  332,  106,  106,  106,
1055       106,  106,  106,  139,  139,  139,  146,  146,  146,  146,
1056       146,  146,  146,  146,  150,  292,  324,  150,  150,  334,
1057       292,  324,  383,  524,  150,  163,  163,  163,  163,  163,
1058       163,  163,  163,  323,  523,  334,  385,  150,  164,  164,
1059       164,  164,  164,  164,  164,  164,  166,  522,  166,  166,
1060       167,  385,  166,  166,  167,  323,  166,  262,  262,  211,
1061       167,  211,  211,  211,  211,  211,  211,  262,  166,  166,
1062       166,  521,  167,  167,  168,  383,  168,  168,  168,  168,
1063       168,  168,  168,  168,  169,  327,  169,  169,  169,  169,
1064
1065       169,  169,  169,  169,  170,  211,  170,  170,  170,  170,
1066       170,  170,  170,  170,  203,  264,  264,  327,  203,  388,
1067       168,  308,  308,  380,  203,  264,  329,  515,  309,  309,
1068       169,  308,  311,  311,  498,  329,  203,  203,  309,  380,
1069       170,  171,  311,  171,  171,  171,  171,  171,  171,  171,
1070       171,  400,  400,  497,  388,  171,  171,  171,  171,  171,
1071       207,  207,  207,  207,  207,  207,  207,  207,  209,  335,
1072       209,  209,  209,  209,  209,  209,  209,  209,  335,  171,
1073       171,  171,  171,  171,  171,  174,  174,  174,  174,  174,
1074       174,  174,  174,  174,  207,  451,  451,  174,  174,  174,
1075
1076       174,  174,  527,  210,  209,  210,  210,  210,  210,  210,
1077       210,  210,  210,  220,  220,  220,  220,  220,  220,  220,
1078       220,  174,  174,  174,  174,  174,  174,  176,  176,  176,
1079       176,  176,  176,  176,  176,  176,  176,  465,  465,  210,
1080       176,  176,  176,  176,  176,  215,  215,  215,  215,  215,
1081       215,  215,  215,  215,  222,  222,  222,  222,  222,  222,
1082       222,  222,  386,  527,  176,  176,  176,  176,  176,  176,
1083       177,  177,  177,  177,  177,  177,  177,  177,  386,  466,
1084       466,  328,  177,  177,  177,  177,  177,  223,  223,  223,
1085       223,  223,  223,  225,  333,  225,  225,  225,  225,  225,
1086
1087       225,  225,  225,  328,  333,  493,  177,  177,  177,  177,
1088       177,  177,  221,  221,  221,  221,  221,  221,  221,  221,
1089       221,  221,  221,  353,  469,  469,  221,  221,  221,  221,
1090       221,  250,  353,  250,  250,  250,  250,  250,  250,  250,
1091       250,  255,  255,  255,  255,  255,  255,  255,  255,  255,
1092       221,  221,  221,  221,  221,  221,  224,  224,  224,  224,
1093       224,  224,  224,  224,  224,  224,  354,  250,  479,  224,
1094       224,  224,  224,  224,  251,  354,  251,  251,  251,  251,
1095       251,  251,  251,  251,  261,  261,  261,  261,  261,  261,
1096       261,  261,  474,  224,  224,  224,  224,  224,  224,  252,
1097
1098       473,  252,  252,  252,  252,  252,  252,  252,  252,  370,
1099       251,  263,  263,  263,  263,  263,  263,  263,  263,  267,
1100       267,  267,  267,  267,  267,  267,  267,  481,  481,  267,
1101       472,  370,  505,  505,  470,  252,  265,  265,  265,  265,
1102       265,  265,  265,  265,  265,  265,  265,  268,  268,  268,
1103       268,  268,  268,  268,  268,  268,  268,  268,  376,  378,
1104       427,  268,  268,  268,  268,  268,  269,  269,  269,  269,
1105       269,  269,  269,  269,  270,  270,  270,  270,  270,  270,
1106       376,  378,  427,  516,  516,  268,  268,  268,  268,  268,
1107       268,  271,  271,  271,  271,  271,  271,  271,  271,  271,
1108
1109       271,  384,  525,  525,  271,  271,  271,  271,  271,  272,
1110       384,  272,  272,  272,  272,  272,  272,  272,  272,  293,
1111       293,  293,  293,  293,  293,  293,  293,  458,  271,  271,
1112       271,  271,  271,  271,  295,  395,  295,  295,  295,  295,
1113       295,  295,  295,  295,  297,  395,  297,  297,  297,  297,
1114       297,  297,  296,  293,  296,  296,  296,  296,  296,  296,
1115       296,  296,  317,  317,  317,  317,  317,  317,  444,  304,
1116       295,  304,  304,  304,  304,  304,  304,  304,  304,  440,
1117       297,  345,  345,  345,  345,  345,  345,  435,  296,  302,
1118       302,  302,  302,  302,  302,  302,  302,  302,  409,  551,
1119
1120       551,  302,  302,  302,  302,  302,  305,  409,  305,  305,
1121       305,  305,  305,  305,  305,  305,  310,  310,  310,  310,
1122       310,  310,  310,  310,  431,  302,  302,  302,  302,  302,
1123       302,  306,  430,  306,  306,  306,  306,  306,  306,  306,
1124       306,  312,  312,  312,  312,  312,  312,  312,  312,  312,
1125       312,  312,  314,  314,  314,  314,  314,  314,  314,  314,
1126       483,  429,  314,  315,  315,  315,  315,  315,  315,  315,
1127       315,  315,  315,  315,  426,  483,  425,  315,  315,  315,
1128       315,  315,  316,  316,  316,  316,  316,  316,  316,  316,
1129       319,  410,  319,  319,  319,  319,  319,  319,  319,  319,
1130
1131       410,  315,  315,  315,  315,  315,  315,  318,  318,  318,
1132       318,  318,  318,  318,  318,  318,  318,  566,  566,  424,
1133       318,  318,  318,  318,  318,  336,  336,  336,  336,  336,
1134       336,  336,  336,  336,  337,  337,  337,  337,  337,  337,
1135       337,  337,  337,  423,  318,  318,  318,  318,  318,  318,
1136       338,  338,  338,  338,  338,  338,  338,  338,  338,  422,
1137       336,  342,  342,  342,  342,  342,  342,  342,  342,  337,
1138       344,  344,  344,  344,  344,  344,  344,  344,  364,  364,
1139       364,  364,  364,  364,  428,  338,  343,  397,  343,  343,
1140       343,  343,  343,  343,  343,  343,  343,  397,  586,  586,
1141
1142       343,  343,  343,  343,  343,  347,  428,  347,  347,  347,
1143       347,  347,  347,  347,  347,  348,  348,  348,  348,  348,
1144       348,  348,  348,  393,  343,  343,  343,  343,  343,  343,
1145       346,  346,  346,  346,  346,  346,  346,  346,  346,  392,
1146       432,  432,  346,  346,  346,  346,  346,  350,  445,  350,
1147       350,  350,  350,  350,  350,  350,  350,  352,  445,  352,
1148       352,  352,  352,  352,  352,  382,  346,  346,  346,  346,
1149       346,  346,  351,  381,  351,  351,  351,  351,  351,  351,
1150       351,  351,  355,  355,  356,  356,  403,  403,  403,  403,
1151       403,  403,  355,  432,  356,  357,  357,  357,  357,  357,
1152
1153       357,  357,  357,  358,  358,  363,  363,  363,  363,  363,
1154       363,  363,  363,  358,  359,  359,  359,  359,  359,  359,
1155       359,  359,  359,  359,  359,  361,  361,  361,  361,  361,
1156       361,  361,  361,  590,  590,  361,  362,  362,  362,  362,
1157       362,  362,  362,  362,  362,  362,  362,  462,  603,  603,
1158       362,  362,  362,  362,  362,  366,  462,  366,  366,  366,
1159       366,  366,  366,  366,  366,  387,  387,  387,  387,  387,
1160       387,  387,  387,  375,  362,  362,  362,  362,  362,  362,
1161       365,  365,  365,  365,  365,  365,  365,  365,  365,  463,
1162       634,  634,  374,  365,  365,  365,  365,  365,  463,  387,
1163
1164       389,  389,  389,  389,  389,  389,  389,  389,  389,  391,
1165       391,  391,  391,  391,  391,  391,  373,  365,  365,  365,
1166       365,  365,  365,  390,  390,  390,  390,  390,  390,  390,
1167       390,  390,  471,  434,  372,  389,  394,  394,  394,  394,
1168       394,  394,  394,  394,  391,  396,  396,  396,  396,  396,
1169       396,  396,  396,  434,  471,  434,  434,  398,  390,  398,
1170       398,  398,  398,  398,  398,  398,  398,  398,  401,  487,
1171       401,  401,  401,  401,  401,  401,  401,  401,  401,  434,
1172       369,  368,  401,  401,  401,  401,  401,  402,  402,  402,
1173       402,  402,  402,  402,  402,  405,  367,  405,  405,  405,
1174
1175       405,  405,  405,  405,  405,  487,  401,  401,  401,  401,
1176       401,  401,  404,  404,  404,  404,  404,  404,  404,  404,
1177       404,  514,  349,  341,  404,  404,  404,  404,  404,  406,
1178       514,  406,  406,  406,  406,  406,  406,  406,  406,  420,
1179       420,  420,  420,  420,  420,  411,  411,  340,  404,  404,
1180       404,  404,  404,  404,  407,  411,  407,  407,  407,  407,
1181       407,  407,  407,  407,  408,  339,  408,  408,  408,  408,
1182       408,  408,  408,  408,  412,  412,  413,  413,  413,  413,
1183       413,  413,  413,  413,  412,  414,  414,  419,  419,  419,
1184       419,  419,  419,  419,  419,  414,  415,  415,  415,  415,
1185
1186       415,  415,  415,  415,  415,  415,  415,  417,  417,  417,
1187       417,  417,  417,  417,  417,  331,  330,  417,  418,  418,
1188       418,  418,  418,  418,  418,  418,  418,  418,  446,  326,
1189       325,  322,  418,  418,  418,  418,  418,  421,  446,  421,
1190       421,  421,  421,  421,  421,  421,  421,  447,  447,  447,
1191       447,  447,  447,  447,  447,  321,  418,  418,  418,  418,
1192       418,  418,  436,  448,  436,  436,  436,  436,  436,  436,
1193       436,  436,  437,  448,  437,  437,  437,  437,  437,  437,
1194       437,  437,  438,  499,  438,  438,  438,  438,  438,  438,
1195       438,  438,  491,  499,  570,  606,  320,  439,  436,  439,
1196
1197       439,  439,  439,  439,  439,  439,  439,  441,  437,  441,
1198       441,  441,  441,  441,  441,  441,  441,  442,  438,  442,
1199       442,  442,  442,  442,  442,  442,  442,  301,  491,  300,
1200       570,  606,  443,  439,  443,  443,  443,  443,  443,  443,
1201       443,  443,  449,  475,  449,  449,  449,  449,  449,  449,
1202       449,  449,  449,  452,  299,  452,  452,  452,  452,  452,
1203       452,  452,  452,  452,  477,  475,  518,  452,  452,  452,
1204       452,  452,  453,  453,  453,  453,  453,  453,  453,  453,
1205       454,  454,  454,  454,  454,  454,  477,  298,  518,  288,
1206       287,  452,  452,  452,  452,  452,  452,  455,  455,  455,
1207
1208       455,  455,  455,  455,  455,  455,  286,  284,  282,  455,
1209       455,  455,  455,  455,  456,  281,  456,  456,  456,  456,
1210       456,  456,  456,  456,  457,  457,  457,  457,  457,  457,
1211       457,  457,  280,  455,  455,  455,  455,  455,  455,  459,
1212       279,  459,  459,  459,  459,  459,  459,  459,  459,  460,
1213       480,  460,  460,  460,  460,  460,  460,  460,  460,  461,
1214       278,  461,  461,  461,  461,  461,  461,  464,  464,  685,
1215       480,  277,  480,  480,  685,  276,  275,  464,  467,  467,
1216       467,  467,  467,  467,  467,  467,  467,  467,  484,  259,
1217       484,  484,  484,  485,  258,  485,  485,  485,  486,  486,
1218
1219       486,  486,  486,  486,  486,  486,  488,  500,  488,  488,
1220       488,  488,  488,  488,  488,  488,  489,  500,  489,  489,
1221       489,  489,  489,  489,  489,  489,  257,  502,  545,  520,
1222       546,  256,  486,  254,  548,  253,  484,  502,  545,  244,
1223       546,  485,  488,  490,  548,  490,  490,  490,  490,  490,
1224       490,  520,  489,  492,  492,  492,  492,  492,  492,  492,
1225       492,  494,  243,  494,  494,  494,  494,  494,  494,  494,
1226       494,  508,  508,  508,  508,  508,  508,  242,  495,  490,
1227       495,  495,  495,  495,  495,  495,  495,  495,  496,  241,
1228       496,  496,  496,  496,  496,  496,  501,  501,  501,  501,
1229
1230       501,  501,  501,  501,  503,  561,  503,  503,  503,  503,
1231       503,  503,  503,  503,  503,  506,  581,  506,  506,  506,
1232       506,  506,  506,  506,  506,  506,  581,  561,  240,  506,
1233       506,  506,  506,  506,  507,  507,  507,  507,  507,  507,
1234       507,  507,  510,  237,  510,  510,  510,  510,  510,  510,
1235       510,  510,  235,  506,  506,  506,  506,  506,  506,  509,
1236       509,  509,  509,  509,  509,  509,  509,  234,  233,  232,
1237       231,  509,  509,  509,  509,  509,  511,  511,  511,  511,
1238       511,  511,  511,  511,  511,  512,  512,  512,  512,  512,
1239       512,  512,  512,  512,  563,  509,  509,  509,  509,  509,
1240
1241       509,  513,  513,  513,  513,  513,  513,  513,  513,  513,
1242       529,  230,  529,  529,  529,  530,  563,  530,  530,  530,
1243       531,  228,  531,  531,  531,  532,  226,  532,  532,  532,
1244       533,  218,  217,  533,  533,  533,  533,  533,  533,  533,
1245       533,  214,  587,  534,  534,  589,  535,  534,  535,  535,
1246       535,  213,  206,  536,  536,  205,  199,  536,  529,  534,
1247       534,  534,  196,  530,  587,  195,  194,  589,  531,  536,
1248       536,  536,  537,  532,  537,  537,  537,  537,  537,  537,
1249       537,  537,  538,  600,  538,  538,  538,  538,  538,  538,
1250       538,  538,  193,  539,  535,  539,  539,  539,  539,  539,
1251
1252       539,  539,  539,  192,  190,  600,  189,  540,  537,  540,
1253       540,  540,  540,  540,  540,  540,  540,  541,  538,  541,
1254       541,  541,  541,  541,  541,  541,  541,  188,  542,  539,
1255       542,  542,  542,  542,  542,  542,  542,  542,  547,  547,
1256       547,  547,  547,  547,  547,  547,  549,  187,  549,  549,
1257       549,  549,  549,  549,  549,  549,  549,  552,  186,  552,
1258       552,  552,  552,  552,  552,  552,  552,  185,  184,  183,
1259       182,  552,  552,  552,  552,  552,  553,  553,  553,  553,
1260       553,  553,  553,  553,  554,  554,  554,  554,  554,  554,
1261       181,  180,  179,  173,  172,  552,  552,  552,  552,  552,
1262
1263       552,  555,  162,  555,  555,  555,  555,  555,  555,  555,
1264       555,  557,  557,  557,  557,  557,  557,  557,  557,  557,
1265       558,  558,  558,  558,  558,  558,  558,  558,  558,  559,
1266       559,  559,  559,  559,  559,  559,  567,  567,  567,  567,
1267       567,  567,  567,  567,  568,  568,  568,  568,  568,  568,
1268       568,  568,  569,  569,  569,  569,  569,  569,  569,  569,
1269       571,  161,  571,  571,  571,  571,  571,  571,  571,  571,
1270       572,  160,  572,  572,  572,  572,  572,  572,  572,  572,
1271       156,  155,  153,  149,  142,  573,  569,  573,  573,  573,
1272       573,  573,  573,  138,  136,  134,  571,  574,  574,  574,
1273
1274       574,  574,  574,  574,  574,  576,  572,  576,  576,  576,
1275       576,  576,  576,  576,  576,  126,  125,  124,  123,  122,
1276       577,  573,  577,  577,  577,  577,  577,  577,  577,  577,
1277       578,  117,  578,  578,  578,  578,  578,  578,  584,  116,
1278       584,  584,  584,  584,  584,  584,  584,  584,  591,  115,
1279       591,  591,  591,  591,  591,  591,  591,  591,  592,  114,
1280       592,  592,  592,  592,  592,  592,  592,  592,  593,  113,
1281       593,  593,  593,  593,  593,  593,  593,  593,  613,  613,
1282       613,  613,  613,  613,  591,  594,  594,  594,  594,  594,
1283       594,  594,  594,  111,  592,  595,  595,  595,  595,  595,
1284
1285       595,  595,  595,  110,  593,  596,  596,  596,  596,  596,
1286       596,  596,  596,  605,  605,  605,  605,  605,  605,  605,
1287       605,  607,  109,  607,  607,  607,  607,  607,  607,  607,
1288       607,  608,  108,  608,  608,  608,  608,  608,  608,  608,
1289       608,  104,  100,   99,   95,   92,  609,  605,  609,  609,
1290       609,  609,  609,  609,   84,   83,   82,  607,  611,  611,
1291       611,  611,  611,  611,  611,  611,   80,  608,  612,  612,
1292       612,  612,  612,  612,  612,  612,   75,   68,   61,   57,
1293        56,   54,  609,  615,  615,  615,  615,  615,  615,  615,
1294       615,  616,  616,  616,  616,  616,  616,  616,  616,  617,
1295
1296       617,  617,  617,  617,  617,  617,  617,  619,  619,  619,
1297       619,  619,  619,  619,  619,   51,   49,  615,  620,  620,
1298       620,  620,  620,  620,   41,  616,   40,   39,   37,   33,
1299        29,   23,   17,  617,   15,   14,   13,    0,    0,    0,
1300         0,  619,    0,    0,    0,    0,    0,    0,    0,    0,
1301         0,    0,  620,  622,  622,  622,  622,  622,  622,  622,
1302       622,  622,  622,  622,  622,  622,  622,  622,  622,  623,
1303       623,  623,  623,  623,  623,  623,  623,  623,  623,  623,
1304       623,  623,  623,  623,  623,  624,  624,  624,  624,  624,
1305       624,  624,  624,  624,  624,  624,  624,  624,  624,  624,
1306
1307       624,  625,  625,  625,  625,  625,  625,  625,  625,  625,
1308       625,  625,  625,  625,  625,  625,  625,  626,    0,    0,
1309         0,    0,    0,    0,    0,  626,  626,  626,    0,    0,
1310       626,  626,  626,  627,  627,  627,  627,  627,  627,  627,
1311       627,  627,  627,  627,  627,  627,  627,  627,  627,  628,
1312         0,    0,    0,    0,  628,    0,    0,  628,  628,  628,
1313       628,    0,  628,  628,  628,  629,    0,    0,    0,    0,
1314         0,    0,    0,  629,  629,  629,    0,    0,  629,  629,
1315       629,  630,    0,    0,  630,  630,    0,  630,    0,  630,
1316       630,  630,    0,    0,  630,  630,  630,  631,  631,    0,
1317
1318         0,    0,  631,  632,    0,    0,  632,  632,    0,  632,
1319         0,  632,  632,  632,    0,    0,  632,  632,  632,  633,
1320         0,    0,  633,  633,    0,  633,    0,  633,  633,  633,
1321         0,  633,    0,  633,  633,  635,    0,    0,  635,    0,
1322         0,  635,    0,  635,  635,  635,  635,    0,  635,  635,
1323       635,  636,  636,  636,  636,  636,  636,  636,  636,  636,
1324       636,  636,  636,  636,  636,  636,  636,  637,  637,    0,
1325       637,    0,  637,  637,  637,  637,  637,  637,  637,  637,
1326       637,  637,  637,  638,  638,  638,  638,  638,  638,  638,
1327       638,  638,  638,  638,  638,  638,  638,  638,  638,  639,
1328
1329       639,    0,  639,  639,  639,  639,  639,  639,  639,  639,
1330       639,  639,  639,  639,  639,  640,    0,    0,    0,    0,
1331       640,    0,    0,  640,  640,  640,    0,    0,  640,  640,
1332       640,  641,    0,    0,  641,  641,    0,  641,    0,  641,
1333       641,  641,    0,    0,  641,  641,  641,  642,  642,    0,
1334         0,    0,  642,  643,  643,  643,    0,    0,    0,  643,
1335       644,    0,    0,  644,  644,    0,  644,    0,  644,  644,
1336       644,    0,    0,  644,  644,  644,  645,  645,  645,  645,
1337       645,  645,  645,  645,  645,  645,  645,  645,  645,  645,
1338       645,  645,  646,  646,    0,    0,    0,  646,  647,  647,
1339
1340       647,    0,    0,    0,  647,  648,  648,    0,    0,    0,
1341       648,  649,  649,    0,    0,    0,  649,  650,  650,    0,
1342         0,    0,  650,  651,  651,  651,    0,    0,    0,  651,
1343       652,  652,    0,    0,    0,  652,  653,  653,    0,    0,
1344         0,  653,  654,  654,    0,    0,    0,  654,  655,  655,
1345       655,    0,    0,    0,  655,  656,  656,  656,  656,    0,
1346         0,    0,  656,  657,  657,    0,    0,    0,  657,  658,
1347       658,    0,    0,    0,  658,  659,  659,    0,    0,    0,
1348       659,  660,  660,  660,    0,    0,    0,  660,  661,  661,
1349       661,  661,    0,    0,    0,  661,  662,  662,    0,    0,
1350
1351         0,  662,  663,  663,    0,    0,    0,  663,  664,  664,
1352       664,    0,    0,    0,  664,  665,  665,  665,  665,    0,
1353         0,    0,  665,  666,  666,    0,    0,    0,  666,  667,
1354         0,  667,  667,    0,    0,    0,  667,  668,  668,  668,
1355         0,    0,    0,  668,  669,  669,  669,  669,    0,    0,
1356         0,  669,  670,  670,    0,    0,    0,  670,  671,    0,
1357       671,  671,    0,    0,    0,  671,  672,  672,  672,    0,
1358         0,    0,  672,  673,  673,  673,    0,    0,    0,    0,
1359       673,  674,  674,  674,  674,  674,  674,  674,  674,  674,
1360       674,  674,  674,  674,  674,  674,  674,  675,  675,    0,
1361
1362       675,  675,  675,    0,    0,  675,  675,  675,    0,    0,
1363       675,  675,  675,  676,  676,    0,  676,  676,  676,    0,
1364         0,  676,  676,  676,    0,    0,  676,  676,  676,  677,
1365       677,    0,    0,    0,  677,  678,    0,  678,  678,    0,
1366         0,    0,  678,  679,  679,    0,    0,    0,    0,  679,
1367       680,  680,    0,    0,    0,  680,  681,    0,  681,  681,
1368         0,    0,    0,  681,  682,  682,    0,    0,    0,  682,
1369       683,    0,  683,    0,    0,    0,    0,  683,  684,  684,
1370       684,  684,  684,  684,  684,  684,  684,  684,  684,  684,
1371       684,  684,  684,  684,  621,  621,  621,  621,  621,  621,
1372
1373       621,  621,  621,  621,  621,  621,  621,  621,  621,  621,
1374       621,  621,  621,  621,  621,  621,  621,  621,  621,  621,
1375       621,  621,  621,  621,  621,  621,  621,  621,  621,  621,
1376       621,  621,  621,  621,  621,  621,  621,  621,  621,  621,
1377       621,  621,  621,  621,  621,  621,  621,  621,  621,  621,
1378       621,  621,  621,  621,  621,  621,  621,  621,  621,  621,
1379       621,  621
1380     } ;
1381
1382 static yy_state_type yy_last_accepting_state;
1383 static char *yy_last_accepting_cpos;
1384
1385 /* The intent behind this definition is that it'll catch
1386  * any uses of REJECT which flex missed.
1387  */
1388 #define REJECT reject_used_but_not_detected
1389 #define yymore() yymore_used_but_not_detected
1390 #define YY_MORE_ADJ 0
1391 #define YY_RESTORE_YY_MORE_OFFSET
1392 char *yytext;
1393 #line 1 "toke.l"
1394 #define INITIAL 0
1395 #line 2 "toke.l"
1396 /*
1397  * Copyright (c) 1996, 1998-2005, 2007-2012
1398  *      Todd C. Miller <Todd.Miller@courtesan.com>
1399  *
1400  * Permission to use, copy, modify, and distribute this software for any
1401  * purpose with or without fee is hereby granted, provided that the above
1402  * copyright notice and this permission notice appear in all copies.
1403  *
1404  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
1405  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
1406  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
1407  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1408  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
1409  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1410  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1411  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
1412  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
1413  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1414  *
1415  * Sponsored in part by the Defense Advanced Research Projects
1416  * Agency (DARPA) and Air Force Research Laboratory, Air Force
1417  * Materiel Command, USAF, under agreement number F39502-99-1-0512.
1418  */
1419
1420 #include <config.h>
1421
1422 #include <sys/types.h>
1423 #include <sys/param.h>
1424 #include <sys/stat.h>
1425 #include <stdio.h>
1426 #ifdef STDC_HEADERS
1427 # include <stdlib.h>
1428 # include <stddef.h>
1429 #else
1430 # ifdef HAVE_STDLIB_H
1431 #  include <stdlib.h>
1432 # endif
1433 #endif /* STDC_HEADERS */
1434 #ifdef HAVE_STRING_H
1435 # include <string.h>
1436 #endif /* HAVE_STRING_H */
1437 #ifdef HAVE_STRINGS_H
1438 # include <strings.h>
1439 #endif /* HAVE_STRINGS_H */
1440 #ifdef HAVE_UNISTD_H
1441 # include <unistd.h>
1442 #endif /* HAVE_UNISTD_H */
1443 #if defined(HAVE_MALLOC_H) && !defined(STDC_HEADERS)
1444 # include <malloc.h>
1445 #endif /* HAVE_MALLOC_H && !STDC_HEADERS */
1446 #ifdef HAVE_DIRENT_H
1447 # include <dirent.h>
1448 # define NAMLEN(dirent) strlen((dirent)->d_name)
1449 #else
1450 # define dirent direct
1451 # define NAMLEN(dirent) (dirent)->d_namlen
1452 # ifdef HAVE_SYS_NDIR_H
1453 #  include <sys/ndir.h>
1454 # endif
1455 # ifdef HAVE_SYS_DIR_H
1456 #  include <sys/dir.h>
1457 # endif
1458 # ifdef HAVE_NDIR_H
1459 #  include <ndir.h>
1460 # endif
1461 #endif
1462 #include <errno.h>
1463 #include <ctype.h>
1464 #include "sudoers.h"
1465 #include "parse.h"
1466 #include "toke.h"
1467 #include <gram.h>
1468 #include "lbuf.h"
1469 #include "secure_path.h"
1470
1471 extern YYSTYPE yylval;
1472 extern bool parse_error;
1473 extern bool sudoers_warnings;
1474 int sudolineno;
1475 int last_token;
1476 char *sudoers;
1477
1478 /* Default sudoers path, mode and owner (may be set via sudo.conf) */
1479 const char *sudoers_file = _PATH_SUDOERS;
1480 mode_t sudoers_mode = SUDOERS_MODE;
1481 uid_t sudoers_uid = SUDOERS_UID;
1482 gid_t sudoers_gid = SUDOERS_GID;
1483
1484 static bool continued, sawspace;
1485 static int prev_state;
1486
1487 static bool _push_include(char *, bool);
1488 static bool pop_include(void);
1489 static char *parse_include(char *);
1490
1491 int (*trace_print)(const char *msg) = sudoers_trace_print;
1492
1493 #define LEXRETURN(n)    do {    \
1494         last_token = (n);       \
1495         return (n);             \
1496 } while (0)
1497
1498 #define ECHO    ignore_result(fwrite(yytext, yyleng, 1, yyout))
1499
1500 #define push_include(_p)        (_push_include((_p), false))
1501 #define push_includedir(_p)     (_push_include((_p), true))
1502 #define YY_NO_INPUT 1
1503 #define YY_NO_UNPUT 1
1504 #define GOTDEFS 1
1505
1506 #define GOTCMND 2
1507
1508 #define STARTDEFS 3
1509
1510 #define INDEFS 4
1511
1512 #define INSTR 5
1513
1514 #line 1514 "lex.yy.c"
1515
1516 /* Macros after this point can all be overridden by user definitions in
1517  * section 1.
1518  */
1519
1520 #ifndef YY_SKIP_YYWRAP
1521 #ifdef __cplusplus
1522 extern "C" int yywrap YY_PROTO(( void ));
1523 #else
1524 extern int yywrap YY_PROTO(( void ));
1525 #endif
1526 #endif
1527
1528 #ifndef YY_NO_UNPUT
1529 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
1530 #endif
1531
1532 #ifndef yytext_ptr
1533 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
1534 #endif
1535
1536 #ifdef YY_NEED_STRLEN
1537 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
1538 #endif
1539
1540 #ifndef YY_NO_INPUT
1541 #ifdef __cplusplus
1542 static int yyinput YY_PROTO(( void ));
1543 #else
1544 static int input YY_PROTO(( void ));
1545 #endif
1546 #endif
1547
1548 #if defined(YY_STACK_USED) && YY_STACK_USED
1549 static int yy_start_stack_ptr = 0;
1550 static int yy_start_stack_depth = 0;
1551 static int *yy_start_stack = 0;
1552 #ifndef YY_NO_PUSH_STATE
1553 static void yy_push_state YY_PROTO(( int new_state ));
1554 #endif
1555 #ifndef YY_NO_POP_STATE
1556 static void yy_pop_state YY_PROTO(( void ));
1557 #endif
1558 #ifndef YY_NO_TOP_STATE
1559 static int yy_top_state YY_PROTO(( void ));
1560 #endif
1561
1562 #else
1563 #define YY_NO_PUSH_STATE 1
1564 #define YY_NO_POP_STATE 1
1565 #define YY_NO_TOP_STATE 1
1566 #endif
1567
1568 #ifdef YY_MALLOC_DECL
1569 YY_MALLOC_DECL
1570 #else
1571 #ifdef __STDC__
1572 #ifndef __cplusplus
1573 #include <stdlib.h>
1574 #endif
1575 #else
1576 /* Just try to get by without declaring the routines.  This will fail
1577  * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
1578  * or sizeof(void*) != sizeof(int).
1579  */
1580 #endif
1581 #endif
1582
1583 /* Amount of stuff to slurp up with each read. */
1584 #ifndef YY_READ_BUF_SIZE
1585 #define YY_READ_BUF_SIZE 8192
1586 #endif
1587
1588 /* Copy whatever the last rule matched to the standard output. */
1589
1590 #ifndef ECHO
1591 /* This used to be an fputs(), but since the string might contain NUL's,
1592  * we now use fwrite().
1593  */
1594 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
1595 #endif
1596
1597 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
1598  * is returned in "result".
1599  */
1600 #ifndef YY_INPUT
1601 #define YY_INPUT(buf,result,max_size) \
1602         if ( yy_current_buffer->yy_is_interactive ) \
1603                 { \
1604                 int c = '*', n; \
1605                 for ( n = 0; n < max_size && \
1606                              (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1607                         buf[n] = (char) c; \
1608                 if ( c == '\n' ) \
1609                         buf[n++] = (char) c; \
1610                 if ( c == EOF && ferror( yyin ) ) \
1611                         YY_FATAL_ERROR( "input in flex scanner failed" ); \
1612                 result = n; \
1613                 } \
1614         else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
1615                   && ferror( yyin ) ) \
1616                 YY_FATAL_ERROR( "input in flex scanner failed" );
1617 #endif
1618
1619 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1620  * we don't want an extra ';' after the "return" because that will cause
1621  * some compilers to complain about unreachable statements.
1622  */
1623 #ifndef yyterminate
1624 #define yyterminate() return YY_NULL
1625 #endif
1626
1627 /* Number of entries by which start-condition stack grows. */
1628 #ifndef YY_START_STACK_INCR
1629 #define YY_START_STACK_INCR 25
1630 #endif
1631
1632 /* Report a fatal error. */
1633 #ifndef YY_FATAL_ERROR
1634 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1635 #endif
1636
1637 /* Default declaration of generated scanner - a define so the user can
1638  * easily add parameters.
1639  */
1640 #ifndef YY_DECL
1641 #define YY_DECL int yylex YY_PROTO(( void ))
1642 #endif
1643
1644 /* Code executed at the beginning of each rule, after yytext and yyleng
1645  * have been set up.
1646  */
1647 #ifndef YY_USER_ACTION
1648 #define YY_USER_ACTION
1649 #endif
1650
1651 /* Code executed at the end of each rule. */
1652 #ifndef YY_BREAK
1653 #define YY_BREAK break;
1654 #endif
1655
1656 #define YY_RULE_SETUP \
1657         if ( yyleng > 0 ) \
1658                 yy_current_buffer->yy_at_bol = \
1659                                 (yytext[yyleng - 1] == '\n'); \
1660         YY_USER_ACTION
1661
1662 YY_DECL
1663         {
1664         register yy_state_type yy_current_state;
1665         register char *yy_cp, *yy_bp;
1666         register int yy_act;
1667
1668 #line 132 "toke.l"
1669
1670 #line 1670 "lex.yy.c"
1671
1672         if ( yy_init )
1673                 {
1674                 yy_init = 0;
1675
1676 #ifdef YY_USER_INIT
1677                 YY_USER_INIT;
1678 #endif
1679
1680                 if ( ! yy_start )
1681                         yy_start = 1;   /* first start state */
1682
1683                 if ( ! yyin )
1684                         yyin = stdin;
1685
1686                 if ( ! yyout )
1687                         yyout = stdout;
1688
1689                 if ( ! yy_current_buffer )
1690                         yy_current_buffer =
1691                                 yy_create_buffer( yyin, YY_BUF_SIZE );
1692
1693                 yy_load_buffer_state();
1694                 }
1695
1696         while ( 1 )             /* loops until end-of-file is reached */
1697                 {
1698                 yy_cp = yy_c_buf_p;
1699
1700                 /* Support of yytext. */
1701                 *yy_cp = yy_hold_char;
1702
1703                 /* yy_bp points to the position in yy_ch_buf of the start of
1704                  * the current run.
1705                  */
1706                 yy_bp = yy_cp;
1707
1708                 yy_current_state = yy_start;
1709                 yy_current_state += YY_AT_BOL();
1710 yy_match:
1711                 do
1712                         {
1713                         register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1714                         if ( yy_accept[yy_current_state] )
1715                                 {
1716                                 yy_last_accepting_state = yy_current_state;
1717                                 yy_last_accepting_cpos = yy_cp;
1718                                 }
1719                         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1720                                 {
1721                                 yy_current_state = (int) yy_def[yy_current_state];
1722                                 if ( yy_current_state >= 622 )
1723                                         yy_c = yy_meta[(unsigned int) yy_c];
1724                                 }
1725                         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1726                         ++yy_cp;
1727                         }
1728                 while ( yy_base[yy_current_state] != 3595 );
1729
1730 yy_find_action:
1731                 yy_act = yy_accept[yy_current_state];
1732                 if ( yy_act == 0 )
1733                         { /* have to back up */
1734                         yy_cp = yy_last_accepting_cpos;
1735                         yy_current_state = yy_last_accepting_state;
1736                         yy_act = yy_accept[yy_current_state];
1737                         }
1738
1739                 YY_DO_BEFORE_ACTION;
1740
1741
1742 do_action:      /* This label is used only to access EOF actions. */
1743
1744
1745                 switch ( yy_act )
1746         { /* beginning of action switch */
1747                         case 0: /* must back up */
1748                         /* undo the effects of YY_DO_BEFORE_ACTION */
1749                         *yy_cp = yy_hold_char;
1750                         yy_cp = yy_last_accepting_cpos;
1751                         yy_current_state = yy_last_accepting_state;
1752                         goto yy_find_action;
1753
1754 case 1:
1755 YY_RULE_SETUP
1756 #line 133 "toke.l"
1757 {
1758                             LEXTRACE(", ");
1759                             LEXRETURN(',');
1760                         }                       /* return ',' */
1761         YY_BREAK
1762 case 2:
1763 YY_RULE_SETUP
1764 #line 138 "toke.l"
1765 BEGIN STARTDEFS;
1766         YY_BREAK
1767 case 3:
1768 YY_RULE_SETUP
1769 #line 140 "toke.l"
1770 {
1771                             BEGIN INDEFS;
1772                             LEXTRACE("DEFVAR ");
1773                             if (!fill(yytext, yyleng))
1774                                 yyterminate();
1775                             LEXRETURN(DEFVAR);
1776                         }
1777         YY_BREAK
1778
1779 case 4:
1780 YY_RULE_SETUP
1781 #line 149 "toke.l"
1782 {
1783                             BEGIN STARTDEFS;
1784                             LEXTRACE(", ");
1785                             LEXRETURN(',');
1786                         }                       /* return ',' */
1787         YY_BREAK
1788 case 5:
1789 YY_RULE_SETUP
1790 #line 155 "toke.l"
1791 {
1792                             LEXTRACE("= ");
1793                             LEXRETURN('=');
1794                         }                       /* return '=' */
1795         YY_BREAK
1796 case 6:
1797 YY_RULE_SETUP
1798 #line 160 "toke.l"
1799 {
1800                             LEXTRACE("+= ");
1801                             LEXRETURN('+');
1802                         }                       /* return '+' */
1803         YY_BREAK
1804 case 7:
1805 YY_RULE_SETUP
1806 #line 165 "toke.l"
1807 {
1808                             LEXTRACE("-= ");
1809                             LEXRETURN('-');
1810                         }                       /* return '-' */
1811         YY_BREAK
1812 case 8:
1813 YY_RULE_SETUP
1814 #line 170 "toke.l"
1815 {
1816                             LEXTRACE("BEGINSTR ");
1817                             yylval.string = NULL;
1818                             prev_state = YY_START;
1819                             BEGIN INSTR;
1820                         }
1821         YY_BREAK
1822 case 9:
1823 YY_RULE_SETUP
1824 #line 177 "toke.l"
1825 {
1826                             LEXTRACE("WORD(2) ");
1827                             if (!fill(yytext, yyleng))
1828                                 yyterminate();
1829                             LEXRETURN(WORD);
1830                         }
1831         YY_BREAK
1832
1833
1834 case 10:
1835 YY_RULE_SETUP
1836 #line 186 "toke.l"
1837 {
1838                             /* Line continuation char followed by newline. */
1839                             sudolineno++;
1840                             continued = true;
1841                         }
1842         YY_BREAK
1843 case 11:
1844 YY_RULE_SETUP
1845 #line 192 "toke.l"
1846 {
1847                             LEXTRACE("ENDSTR ");
1848                             BEGIN prev_state;
1849
1850                             if (yylval.string == NULL) {
1851                                 LEXTRACE("ERROR "); /* empty string */
1852                                 LEXRETURN(ERROR);
1853                             }
1854                             if (prev_state == INITIAL) {
1855                                 switch (yylval.string[0]) {
1856                                 case '%':
1857                                     if (yylval.string[1] == '\0' ||
1858                                         (yylval.string[1] == ':' &&
1859                                         yylval.string[2] == '\0')) {
1860                                         LEXTRACE("ERROR "); /* empty group */
1861                                         LEXRETURN(ERROR);
1862                                     }
1863                                     LEXTRACE("USERGROUP ");
1864                                     LEXRETURN(USERGROUP);
1865                                 case '+':
1866                                     if (yylval.string[1] == '\0') {
1867                                         LEXTRACE("ERROR "); /* empty netgroup */
1868                                         LEXRETURN(ERROR);
1869                                     }
1870                                     LEXTRACE("NETGROUP ");
1871                                     LEXRETURN(NETGROUP);
1872                                 }
1873                             }
1874                             LEXTRACE("WORD(4) ");
1875                             LEXRETURN(WORD);
1876                         }
1877         YY_BREAK
1878 case 12:
1879 YY_RULE_SETUP
1880 #line 224 "toke.l"
1881 {
1882                             LEXTRACE("BACKSLASH ");
1883                             if (!append(yytext, yyleng))
1884                                 yyterminate();
1885                         }
1886         YY_BREAK
1887 case 13:
1888 YY_RULE_SETUP
1889 #line 230 "toke.l"
1890 {
1891                             LEXTRACE("STRBODY ");
1892                             if (!append(yytext, yyleng))
1893                                 yyterminate();
1894                         }
1895         YY_BREAK
1896
1897
1898 case 14:
1899 YY_RULE_SETUP
1900 #line 238 "toke.l"
1901 {
1902                             /* quoted fnmatch glob char, pass verbatim */
1903                             LEXTRACE("QUOTEDCHAR ");
1904                             if (!fill_args(yytext, 2, sawspace))
1905                                 yyterminate();
1906                             sawspace = false;
1907                         }
1908         YY_BREAK
1909 case 15:
1910 YY_RULE_SETUP
1911 #line 246 "toke.l"
1912 {
1913                             /* quoted sudoers special char, strip backslash */
1914                             LEXTRACE("QUOTEDCHAR ");
1915                             if (!fill_args(yytext + 1, 1, sawspace))
1916                                 yyterminate();
1917                             sawspace = false;
1918                         }
1919         YY_BREAK
1920 case 16:
1921 YY_RULE_SETUP
1922 #line 254 "toke.l"
1923 {
1924                             BEGIN INITIAL;
1925                             yyless(0);
1926                             LEXRETURN(COMMAND);
1927                         }                       /* end of command line args */
1928         YY_BREAK
1929 case 17:
1930 YY_RULE_SETUP
1931 #line 260 "toke.l"
1932 {
1933                             LEXTRACE("ARG ");
1934                             if (!fill_args(yytext, yyleng, sawspace))
1935                                 yyterminate();
1936                             sawspace = false;
1937                         }                       /* a command line arg */
1938         YY_BREAK
1939
1940 case 18:
1941 YY_RULE_SETUP
1942 #line 268 "toke.l"
1943 {
1944                             char *path;
1945
1946                             if (continued) {
1947                                 LEXTRACE("ERROR ");
1948                                 LEXRETURN(ERROR);
1949                             }
1950
1951                             if ((path = parse_include(yytext)) == NULL)
1952                                 yyterminate();
1953
1954                             LEXTRACE("INCLUDE\n");
1955
1956                             /* Push current buffer and switch to include file */
1957                             if (!push_include(path))
1958                                 yyterminate();
1959                         }
1960         YY_BREAK
1961 case 19:
1962 YY_RULE_SETUP
1963 #line 286 "toke.l"
1964 {
1965                             char *path;
1966
1967                             if (continued) {
1968                                 LEXTRACE("ERROR ");
1969                                 LEXRETURN(ERROR);
1970                             }
1971
1972                             if ((path = parse_include(yytext)) == NULL)
1973                                 yyterminate();
1974
1975                             LEXTRACE("INCLUDEDIR\n");
1976
1977                             /*
1978                              * Push current buffer and switch to include file.
1979                              * We simply ignore empty directories.
1980                              */
1981                             if (!push_includedir(path) && parse_error)
1982                                 yyterminate();
1983                         }
1984         YY_BREAK
1985 case 20:
1986 YY_RULE_SETUP
1987 #line 307 "toke.l"
1988 {
1989                             char deftype;
1990                             int n;
1991
1992                             if (continued) {
1993                                 LEXTRACE("ERROR ");
1994                                 LEXRETURN(ERROR);
1995                             }
1996
1997                             for (n = 0; isblank((unsigned char)yytext[n]); n++)
1998                                 continue;
1999                             n += sizeof("Defaults") - 1;
2000                             if ((deftype = yytext[n++]) != '\0') {
2001                                 while (isblank((unsigned char)yytext[n]))
2002                                     n++;
2003                             }
2004                             BEGIN GOTDEFS;
2005                             switch (deftype) {
2006                                 case ':':
2007                                     yyless(n);
2008                                     LEXTRACE("DEFAULTS_USER ");
2009                                     LEXRETURN(DEFAULTS_USER);
2010                                 case '>':
2011                                     yyless(n);
2012                                     LEXTRACE("DEFAULTS_RUNAS ");
2013                                     LEXRETURN(DEFAULTS_RUNAS);
2014                                 case '@':
2015                                     yyless(n);
2016                                     LEXTRACE("DEFAULTS_HOST ");
2017                                     LEXRETURN(DEFAULTS_HOST);
2018                                 case '!':
2019                                     yyless(n);
2020                                     LEXTRACE("DEFAULTS_CMND ");
2021                                     LEXRETURN(DEFAULTS_CMND);
2022                                 default:
2023                                     LEXTRACE("DEFAULTS ");
2024                                     LEXRETURN(DEFAULTS);
2025                             }
2026                         }
2027         YY_BREAK
2028 case 21:
2029 YY_RULE_SETUP
2030 #line 347 "toke.l"
2031 {
2032                             int n;
2033
2034                             if (continued) {
2035                                 LEXTRACE("ERROR ");
2036                                 LEXRETURN(ERROR);
2037                             }
2038
2039                             for (n = 0; isblank((unsigned char)yytext[n]); n++)
2040                                 continue;
2041                             switch (yytext[n]) {
2042                                 case 'H':
2043                                     LEXTRACE("HOSTALIAS ");
2044                                     LEXRETURN(HOSTALIAS);
2045                                 case 'C':
2046                                     LEXTRACE("CMNDALIAS ");
2047                                     LEXRETURN(CMNDALIAS);
2048                                 case 'U':
2049                                     LEXTRACE("USERALIAS ");
2050                                     LEXRETURN(USERALIAS);
2051                                 case 'R':
2052                                     LEXTRACE("RUNASALIAS ");
2053                                     LEXRETURN(RUNASALIAS);
2054                             }
2055                         }
2056         YY_BREAK
2057 case 22:
2058 YY_RULE_SETUP
2059 #line 373 "toke.l"
2060 {
2061                                 /* cmnd does not require passwd for this user */
2062                                 LEXTRACE("NOPASSWD ");
2063                                 LEXRETURN(NOPASSWD);
2064                         }
2065         YY_BREAK
2066 case 23:
2067 YY_RULE_SETUP
2068 #line 379 "toke.l"
2069 {
2070                                 /* cmnd requires passwd for this user */
2071                                 LEXTRACE("PASSWD ");
2072                                 LEXRETURN(PASSWD);
2073                         }
2074         YY_BREAK
2075 case 24:
2076 YY_RULE_SETUP
2077 #line 385 "toke.l"
2078 {
2079                                 LEXTRACE("NOEXEC ");
2080                                 LEXRETURN(NOEXEC);
2081                         }
2082         YY_BREAK
2083 case 25:
2084 YY_RULE_SETUP
2085 #line 390 "toke.l"
2086 {
2087                                 LEXTRACE("EXEC ");
2088                                 LEXRETURN(EXEC);
2089                         }
2090         YY_BREAK
2091 case 26:
2092 YY_RULE_SETUP
2093 #line 395 "toke.l"
2094 {
2095                                 LEXTRACE("SETENV ");
2096                                 LEXRETURN(SETENV);
2097                         }
2098         YY_BREAK
2099 case 27:
2100 YY_RULE_SETUP
2101 #line 400 "toke.l"
2102 {
2103                                 LEXTRACE("NOSETENV ");
2104                                 LEXRETURN(NOSETENV);
2105                         }
2106         YY_BREAK
2107 case 28:
2108 YY_RULE_SETUP
2109 #line 405 "toke.l"
2110 {
2111                                 LEXTRACE("LOG_OUTPUT ");
2112                                 LEXRETURN(LOG_OUTPUT);
2113                         }
2114         YY_BREAK
2115 case 29:
2116 YY_RULE_SETUP
2117 #line 410 "toke.l"
2118 {
2119                                 LEXTRACE("NOLOG_OUTPUT ");
2120                                 LEXRETURN(NOLOG_OUTPUT);
2121                         }
2122         YY_BREAK
2123 case 30:
2124 YY_RULE_SETUP
2125 #line 415 "toke.l"
2126 {
2127                                 LEXTRACE("LOG_INPUT ");
2128                                 LEXRETURN(LOG_INPUT);
2129                         }
2130         YY_BREAK
2131 case 31:
2132 YY_RULE_SETUP
2133 #line 420 "toke.l"
2134 {
2135                                 LEXTRACE("NOLOG_INPUT ");
2136                                 LEXRETURN(NOLOG_INPUT);
2137                         }
2138         YY_BREAK
2139 case 32:
2140 YY_RULE_SETUP
2141 #line 425 "toke.l"
2142 {
2143                             /* empty group or netgroup */
2144                             LEXTRACE("ERROR ");
2145                             LEXRETURN(ERROR);
2146                         }
2147         YY_BREAK
2148 case 33:
2149 YY_RULE_SETUP
2150 #line 431 "toke.l"
2151 {
2152                             /* netgroup */
2153                             if (!fill(yytext, yyleng))
2154                                 yyterminate();
2155                             LEXTRACE("NETGROUP ");
2156                             LEXRETURN(NETGROUP);
2157                         }
2158         YY_BREAK
2159 case 34:
2160 YY_RULE_SETUP
2161 #line 439 "toke.l"
2162 {
2163                             /* group */
2164                             if (!fill(yytext, yyleng))
2165                                 yyterminate();
2166                             LEXTRACE("USERGROUP ");
2167                             LEXRETURN(USERGROUP);
2168                         }
2169         YY_BREAK
2170 case 35:
2171 YY_RULE_SETUP
2172 #line 447 "toke.l"
2173 {
2174                             if (!fill(yytext, yyleng))
2175                                 yyterminate();
2176                             LEXTRACE("NTWKADDR ");
2177                             LEXRETURN(NTWKADDR);
2178                         }
2179         YY_BREAK
2180 case 36:
2181 YY_RULE_SETUP
2182 #line 454 "toke.l"
2183 {
2184                             if (!fill(yytext, yyleng))
2185                                 yyterminate();
2186                             LEXTRACE("NTWKADDR ");
2187                             LEXRETURN(NTWKADDR);
2188                         }
2189         YY_BREAK
2190 case 37:
2191 YY_RULE_SETUP
2192 #line 461 "toke.l"
2193 {
2194                             if (!ipv6_valid(yytext)) {
2195                                 LEXTRACE("ERROR ");
2196                                 LEXRETURN(ERROR);
2197                             }
2198                             if (!fill(yytext, yyleng))
2199                                 yyterminate();
2200                             LEXTRACE("NTWKADDR ");
2201                             LEXRETURN(NTWKADDR);
2202                         }
2203         YY_BREAK
2204 case 38:
2205 YY_RULE_SETUP
2206 #line 472 "toke.l"
2207 {
2208                             if (!ipv6_valid(yytext)) {
2209                                 LEXTRACE("ERROR ");
2210                                 LEXRETURN(ERROR);
2211                             }
2212                             if (!fill(yytext, yyleng))
2213                                 yyterminate();
2214                             LEXTRACE("NTWKADDR ");
2215                             LEXRETURN(NTWKADDR);
2216                         }
2217         YY_BREAK
2218 case 39:
2219 YY_RULE_SETUP
2220 #line 483 "toke.l"
2221 {
2222                             LEXTRACE("ALL ");
2223                             LEXRETURN(ALL);
2224
2225                         }
2226         YY_BREAK
2227 case 40:
2228 YY_RULE_SETUP
2229 #line 489 "toke.l"
2230 {
2231 #ifdef HAVE_SELINUX
2232                             LEXTRACE("ROLE ");
2233                             LEXRETURN(ROLE);
2234 #else
2235                             goto got_alias;
2236 #endif
2237                         }
2238         YY_BREAK
2239 case 41:
2240 YY_RULE_SETUP
2241 #line 498 "toke.l"
2242 {
2243 #ifdef HAVE_SELINUX
2244                             LEXTRACE("TYPE ");
2245                             LEXRETURN(TYPE);
2246 #else
2247                             goto got_alias;
2248 #endif
2249                         }
2250         YY_BREAK
2251 case 42:
2252 YY_RULE_SETUP
2253 #line 506 "toke.l"
2254 {
2255 #ifdef HAVE_PRIV_SET
2256                             LEXTRACE("PRIVS ");
2257                             LEXRETURN(PRIVS);
2258 #else
2259                             goto got_alias;
2260 #endif
2261                         }
2262         YY_BREAK
2263 case 43:
2264 YY_RULE_SETUP
2265 #line 515 "toke.l"
2266 {
2267 #ifdef HAVE_PRIV_SET
2268                             LEXTRACE("LIMITPRIVS ");
2269                             LEXRETURN(LIMITPRIVS);
2270 #else
2271                             goto got_alias;
2272 #endif
2273                         }
2274         YY_BREAK
2275 case 44:
2276 YY_RULE_SETUP
2277 #line 524 "toke.l"
2278 {
2279                         got_alias:
2280                             if (!fill(yytext, yyleng))
2281                                 yyterminate();
2282                             LEXTRACE("ALIAS ");
2283                             LEXRETURN(ALIAS);
2284                         }
2285         YY_BREAK
2286 case 45:
2287 YY_RULE_SETUP
2288 #line 532 "toke.l"
2289 {
2290                             /* no command args allowed for Defaults!/path */
2291                             if (!fill_cmnd(yytext, yyleng))
2292                                 yyterminate();
2293                             LEXTRACE("COMMAND ");
2294                             LEXRETURN(COMMAND);
2295                         }
2296         YY_BREAK
2297 case 46:
2298 YY_RULE_SETUP
2299 #line 540 "toke.l"
2300 {
2301                             BEGIN GOTCMND;
2302                             LEXTRACE("COMMAND ");
2303                             if (!fill_cmnd(yytext, yyleng))
2304                                 yyterminate();
2305                         }                       /* sudo -e */
2306         YY_BREAK
2307 case 47:
2308 YY_RULE_SETUP
2309 #line 547 "toke.l"
2310 {
2311                             /* directories can't have args... */
2312                             if (yytext[yyleng - 1] == '/') {
2313                                 LEXTRACE("COMMAND ");
2314                                 if (!fill_cmnd(yytext, yyleng))
2315                                     yyterminate();
2316                                 LEXRETURN(COMMAND);
2317                             } else {
2318                                 BEGIN GOTCMND;
2319                                 LEXTRACE("COMMAND ");
2320                                 if (!fill_cmnd(yytext, yyleng))
2321                                     yyterminate();
2322                             }
2323                         }                       /* a pathname */
2324         YY_BREAK
2325 case 48:
2326 YY_RULE_SETUP
2327 #line 562 "toke.l"
2328 {
2329                             LEXTRACE("BEGINSTR ");
2330                             yylval.string = NULL;
2331                             prev_state = YY_START;
2332                             BEGIN INSTR;
2333                         }
2334         YY_BREAK
2335 case 49:
2336 YY_RULE_SETUP
2337 #line 569 "toke.l"
2338 {
2339                             /* a word */
2340                             if (!fill(yytext, yyleng))
2341                                 yyterminate();
2342                             LEXTRACE("WORD(5) ");
2343                             LEXRETURN(WORD);
2344                         }
2345         YY_BREAK
2346 case 50:
2347 YY_RULE_SETUP
2348 #line 577 "toke.l"
2349 {
2350                             LEXTRACE("( ");
2351                             LEXRETURN('(');
2352                         }
2353         YY_BREAK
2354 case 51:
2355 YY_RULE_SETUP
2356 #line 582 "toke.l"
2357 {
2358                             LEXTRACE(") ");
2359                             LEXRETURN(')');
2360                         }
2361         YY_BREAK
2362 case 52:
2363 YY_RULE_SETUP
2364 #line 587 "toke.l"
2365 {
2366                             LEXTRACE(", ");
2367                             LEXRETURN(',');
2368                         }                       /* return ',' */
2369         YY_BREAK
2370 case 53:
2371 YY_RULE_SETUP
2372 #line 592 "toke.l"
2373 {
2374                             LEXTRACE("= ");
2375                             LEXRETURN('=');
2376                         }                       /* return '=' */
2377         YY_BREAK
2378 case 54:
2379 YY_RULE_SETUP
2380 #line 597 "toke.l"
2381 {
2382                             LEXTRACE(": ");
2383                             LEXRETURN(':');
2384                         }                       /* return ':' */
2385         YY_BREAK
2386 case 55:
2387 YY_RULE_SETUP
2388 #line 602 "toke.l"
2389 {
2390                             if (yyleng & 1) {
2391                                 LEXTRACE("!");
2392                                 LEXRETURN('!'); /* return '!' */
2393                             }
2394                         }
2395         YY_BREAK
2396 case 56:
2397 YY_RULE_SETUP
2398 #line 609 "toke.l"
2399 {
2400                             if (YY_START == INSTR) {
2401                                 LEXTRACE("ERROR ");
2402                                 LEXRETURN(ERROR);       /* line break in string */
2403                             }
2404                             BEGIN INITIAL;
2405                             sudolineno++;
2406                             continued = false;
2407                             LEXTRACE("\n");
2408                             LEXRETURN(COMMENT);
2409                         }                       /* return newline */
2410         YY_BREAK
2411 case 57:
2412 YY_RULE_SETUP
2413 #line 621 "toke.l"
2414 {                       /* throw away space/tabs */
2415                             sawspace = true;    /* but remember for fill_args */
2416                         }
2417         YY_BREAK
2418 case 58:
2419 YY_RULE_SETUP
2420 #line 625 "toke.l"
2421 {
2422                             sawspace = true;    /* remember for fill_args */
2423                             sudolineno++;
2424                             continued = true;
2425                         }                       /* throw away EOL after \ */
2426         YY_BREAK
2427 case 59:
2428 YY_RULE_SETUP
2429 #line 631 "toke.l"
2430 {
2431                             BEGIN INITIAL;
2432                             sudolineno++;
2433                             continued = false;
2434                             LEXTRACE("#\n");
2435                             LEXRETURN(COMMENT);
2436                         }                       /* comment, not uid/gid */
2437         YY_BREAK
2438 case 60:
2439 YY_RULE_SETUP
2440 #line 639 "toke.l"
2441 {
2442                             LEXTRACE("ERROR ");
2443                             LEXRETURN(ERROR);
2444                         }       /* parse error */
2445         YY_BREAK
2446 case YY_STATE_EOF(INITIAL):
2447 case YY_STATE_EOF(GOTDEFS):
2448 case YY_STATE_EOF(GOTCMND):
2449 case YY_STATE_EOF(STARTDEFS):
2450 case YY_STATE_EOF(INDEFS):
2451 case YY_STATE_EOF(INSTR):
2452 #line 644 "toke.l"
2453 {
2454                             if (YY_START != INITIAL) {
2455                                 BEGIN INITIAL;
2456                                 LEXTRACE("ERROR ");
2457                                 LEXRETURN(ERROR);
2458                             }
2459                             if (!pop_include())
2460                                 yyterminate();
2461                         }
2462         YY_BREAK
2463 case 61:
2464 YY_RULE_SETUP
2465 #line 654 "toke.l"
2466 ECHO;
2467         YY_BREAK
2468 #line 2468 "lex.yy.c"
2469
2470         case YY_END_OF_BUFFER:
2471                 {
2472                 /* Amount of text matched not including the EOB char. */
2473                 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
2474
2475                 /* Undo the effects of YY_DO_BEFORE_ACTION. */
2476                 *yy_cp = yy_hold_char;
2477                 YY_RESTORE_YY_MORE_OFFSET
2478
2479                 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
2480                         {
2481                         /* We're scanning a new file or input source.  It's
2482                          * possible that this happened because the user
2483                          * just pointed yyin at a new source and called
2484                          * yylex().  If so, then we have to assure
2485                          * consistency between yy_current_buffer and our
2486                          * globals.  Here is the right place to do so, because
2487                          * this is the first action (other than possibly a
2488                          * back-up) that will match for the new input source.
2489                          */
2490                         yy_n_chars = yy_current_buffer->yy_n_chars;
2491                         yy_current_buffer->yy_input_file = yyin;
2492                         yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
2493                         }
2494
2495                 /* Note that here we test for yy_c_buf_p "<=" to the position
2496                  * of the first EOB in the buffer, since yy_c_buf_p will
2497                  * already have been incremented past the NUL character
2498                  * (since all states make transitions on EOB to the
2499                  * end-of-buffer state).  Contrast this with the test
2500                  * in input().
2501                  */
2502                 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
2503                         { /* This was really a NUL. */
2504                         yy_state_type yy_next_state;
2505
2506                         yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
2507
2508                         yy_current_state = yy_get_previous_state();
2509
2510                         /* Okay, we're now positioned to make the NUL
2511                          * transition.  We couldn't have
2512                          * yy_get_previous_state() go ahead and do it
2513                          * for us because it doesn't know how to deal
2514                          * with the possibility of jamming (and we don't
2515                          * want to build jamming into it because then it
2516                          * will run more slowly).
2517                          */
2518
2519                         yy_next_state = yy_try_NUL_trans( yy_current_state );
2520
2521                         yy_bp = yytext_ptr + YY_MORE_ADJ;
2522
2523                         if ( yy_next_state )
2524                                 {
2525                                 /* Consume the NUL. */
2526                                 yy_cp = ++yy_c_buf_p;
2527                                 yy_current_state = yy_next_state;
2528                                 goto yy_match;
2529                                 }
2530
2531                         else
2532                                 {
2533                                 yy_cp = yy_c_buf_p;
2534                                 goto yy_find_action;
2535                                 }
2536                         }
2537
2538                 else switch ( yy_get_next_buffer() )
2539                         {
2540                         case EOB_ACT_END_OF_FILE:
2541                                 {
2542                                 yy_did_buffer_switch_on_eof = 0;
2543
2544                                 if ( yywrap() )
2545                                         {
2546                                         /* Note: because we've taken care in
2547                                          * yy_get_next_buffer() to have set up
2548                                          * yytext, we can now set up
2549                                          * yy_c_buf_p so that if some total
2550                                          * hoser (like flex itself) wants to
2551                                          * call the scanner after we return the
2552                                          * YY_NULL, it'll still work - another
2553                                          * YY_NULL will get returned.
2554                                          */
2555                                         yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
2556
2557                                         yy_act = YY_STATE_EOF(YY_START);
2558                                         goto do_action;
2559                                         }
2560
2561                                 else
2562                                         {
2563                                         if ( ! yy_did_buffer_switch_on_eof )
2564                                                 YY_NEW_FILE;
2565                                         }
2566                                 break;
2567                                 }
2568
2569                         case EOB_ACT_CONTINUE_SCAN:
2570                                 yy_c_buf_p =
2571                                         yytext_ptr + yy_amount_of_matched_text;
2572
2573                                 yy_current_state = yy_get_previous_state();
2574
2575                                 yy_cp = yy_c_buf_p;
2576                                 yy_bp = yytext_ptr + YY_MORE_ADJ;
2577                                 goto yy_match;
2578
2579                         case EOB_ACT_LAST_MATCH:
2580                                 yy_c_buf_p =
2581                                 &yy_current_buffer->yy_ch_buf[yy_n_chars];
2582
2583                                 yy_current_state = yy_get_previous_state();
2584
2585                                 yy_cp = yy_c_buf_p;
2586                                 yy_bp = yytext_ptr + YY_MORE_ADJ;
2587                                 goto yy_find_action;
2588                         }
2589                 break;
2590                 }
2591
2592         default:
2593                 YY_FATAL_ERROR(
2594                         "fatal flex scanner internal error--no action found" );
2595         } /* end of action switch */
2596                 } /* end of scanning one token */
2597         } /* end of yylex */
2598
2599
2600 /* yy_get_next_buffer - try to read in a new buffer
2601  *
2602  * Returns a code representing an action:
2603  *      EOB_ACT_LAST_MATCH -
2604  *      EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2605  *      EOB_ACT_END_OF_FILE - end of file
2606  */
2607
2608 static int yy_get_next_buffer()
2609         {
2610         register char *dest = yy_current_buffer->yy_ch_buf;
2611         register char *source = yytext_ptr;
2612         register int number_to_move, i;
2613         int ret_val;
2614
2615         if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
2616                 YY_FATAL_ERROR(
2617                 "fatal flex scanner internal error--end of buffer missed" );
2618
2619         if ( yy_current_buffer->yy_fill_buffer == 0 )
2620                 { /* Don't try to fill the buffer, so this is an EOF. */
2621                 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
2622                         {
2623                         /* We matched a single character, the EOB, so
2624                          * treat this as a final EOF.
2625                          */
2626                         return EOB_ACT_END_OF_FILE;
2627                         }
2628
2629                 else
2630                         {
2631                         /* We matched some text prior to the EOB, first
2632                          * process it.
2633                          */
2634                         return EOB_ACT_LAST_MATCH;
2635                         }
2636                 }
2637
2638         /* Try to read more data. */
2639
2640         /* First move last chars to start of buffer. */
2641         number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
2642
2643         for ( i = 0; i < number_to_move; ++i )
2644                 *(dest++) = *(source++);
2645
2646         if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2647                 /* don't do the read, it's not guaranteed to return an EOF,
2648                  * just force an EOF
2649                  */
2650                 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
2651
2652         else
2653                 {
2654                 int num_to_read =
2655                         yy_current_buffer->yy_buf_size - number_to_move - 1;
2656
2657                 while ( num_to_read <= 0 )
2658                         { /* Not enough room in the buffer - grow it. */
2659 #ifdef YY_USES_REJECT
2660                         YY_FATAL_ERROR(
2661 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
2662 #else
2663
2664                         /* just a shorter name for the current buffer */
2665                         YY_BUFFER_STATE b = yy_current_buffer;
2666
2667                         int yy_c_buf_p_offset =
2668                                 (int) (yy_c_buf_p - b->yy_ch_buf);
2669
2670                         if ( b->yy_is_our_buffer )
2671                                 {
2672                                 int new_size = b->yy_buf_size * 2;
2673
2674                                 if ( new_size <= 0 )
2675                                         b->yy_buf_size += b->yy_buf_size / 8;
2676                                 else
2677                                         b->yy_buf_size *= 2;
2678
2679                                 b->yy_ch_buf = (char *)
2680                                         /* Include room in for 2 EOB chars. */
2681                                         yy_flex_realloc( (void *) b->yy_ch_buf,
2682                                                          b->yy_buf_size + 2 );
2683                                 }
2684                         else
2685                                 /* Can't grow it, we don't own it. */
2686                                 b->yy_ch_buf = 0;
2687
2688                         if ( ! b->yy_ch_buf )
2689                                 YY_FATAL_ERROR(
2690                                 "fatal error - scanner input buffer overflow" );
2691
2692                         yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
2693
2694                         num_to_read = yy_current_buffer->yy_buf_size -
2695                                                 number_to_move - 1;
2696 #endif
2697                         }
2698
2699                 if ( num_to_read > YY_READ_BUF_SIZE )
2700                         num_to_read = YY_READ_BUF_SIZE;
2701
2702                 /* Read in more data. */
2703                 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
2704                         yy_n_chars, num_to_read );
2705
2706                 yy_current_buffer->yy_n_chars = yy_n_chars;
2707                 }
2708
2709         if ( yy_n_chars == 0 )
2710                 {
2711                 if ( number_to_move == YY_MORE_ADJ )
2712                         {
2713                         ret_val = EOB_ACT_END_OF_FILE;
2714                         yyrestart( yyin );
2715                         }
2716
2717                 else
2718                         {
2719                         ret_val = EOB_ACT_LAST_MATCH;
2720                         yy_current_buffer->yy_buffer_status =
2721                                 YY_BUFFER_EOF_PENDING;
2722                         }
2723                 }
2724
2725         else
2726                 ret_val = EOB_ACT_CONTINUE_SCAN;
2727
2728         yy_n_chars += number_to_move;
2729         yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
2730         yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
2731
2732         yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
2733
2734         return ret_val;
2735         }
2736
2737
2738 /* yy_get_previous_state - get the state just before the EOB char was reached */
2739
2740 static yy_state_type yy_get_previous_state()
2741         {
2742         register yy_state_type yy_current_state;
2743         register char *yy_cp;
2744
2745         yy_current_state = yy_start;
2746         yy_current_state += YY_AT_BOL();
2747
2748         for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
2749                 {
2750                 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2751                 if ( yy_accept[yy_current_state] )
2752                         {
2753                         yy_last_accepting_state = yy_current_state;
2754                         yy_last_accepting_cpos = yy_cp;
2755                         }
2756                 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2757                         {
2758                         yy_current_state = (int) yy_def[yy_current_state];
2759                         if ( yy_current_state >= 622 )
2760                                 yy_c = yy_meta[(unsigned int) yy_c];
2761                         }
2762                 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2763                 }
2764
2765         return yy_current_state;
2766         }
2767
2768
2769 /* yy_try_NUL_trans - try to make a transition on the NUL character
2770  *
2771  * synopsis
2772  *      next_state = yy_try_NUL_trans( current_state );
2773  */
2774
2775 #ifdef YY_USE_PROTOS
2776 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
2777 #else
2778 static yy_state_type yy_try_NUL_trans( yy_current_state )
2779 yy_state_type yy_current_state;
2780 #endif
2781         {
2782         register int yy_is_jam;
2783         register char *yy_cp = yy_c_buf_p;
2784
2785         register YY_CHAR yy_c = 1;
2786         if ( yy_accept[yy_current_state] )
2787                 {
2788                 yy_last_accepting_state = yy_current_state;
2789                 yy_last_accepting_cpos = yy_cp;
2790                 }
2791         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2792                 {
2793                 yy_current_state = (int) yy_def[yy_current_state];
2794                 if ( yy_current_state >= 622 )
2795                         yy_c = yy_meta[(unsigned int) yy_c];
2796                 }
2797         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2798         yy_is_jam = (yy_current_state == 621);
2799
2800         return yy_is_jam ? 0 : yy_current_state;
2801         }
2802
2803
2804 #ifndef YY_NO_UNPUT
2805 #ifdef YY_USE_PROTOS
2806 static void yyunput( int c, register char *yy_bp )
2807 #else
2808 static void yyunput( c, yy_bp )
2809 int c;
2810 register char *yy_bp;
2811 #endif
2812         {
2813         register char *yy_cp = yy_c_buf_p;
2814
2815         /* undo effects of setting up yytext */
2816         *yy_cp = yy_hold_char;
2817
2818         if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2819                 { /* need to shift things up to make room */
2820                 /* +2 for EOB chars. */
2821                 register int number_to_move = yy_n_chars + 2;
2822                 register char *dest = &yy_current_buffer->yy_ch_buf[
2823                                         yy_current_buffer->yy_buf_size + 2];
2824                 register char *source =
2825                                 &yy_current_buffer->yy_ch_buf[number_to_move];
2826
2827                 while ( source > yy_current_buffer->yy_ch_buf )
2828                         *--dest = *--source;
2829
2830                 yy_cp += (int) (dest - source);
2831                 yy_bp += (int) (dest - source);
2832                 yy_current_buffer->yy_n_chars =
2833                         yy_n_chars = yy_current_buffer->yy_buf_size;
2834
2835                 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2836                         YY_FATAL_ERROR( "flex scanner push-back overflow" );
2837                 }
2838
2839         *--yy_cp = (char) c;
2840
2841
2842         yytext_ptr = yy_bp;
2843         yy_hold_char = *yy_cp;
2844         yy_c_buf_p = yy_cp;
2845         }
2846 #endif  /* ifndef YY_NO_UNPUT */
2847
2848
2849 #ifndef YY_NO_INPUT
2850 #ifdef __cplusplus
2851 static int yyinput()
2852 #else
2853 static int input()
2854 #endif
2855         {
2856         int c;
2857
2858         *yy_c_buf_p = yy_hold_char;
2859
2860         if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
2861                 {
2862                 /* yy_c_buf_p now points to the character we want to return.
2863                  * If this occurs *before* the EOB characters, then it's a
2864                  * valid NUL; if not, then we've hit the end of the buffer.
2865                  */
2866                 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
2867                         /* This was really a NUL. */
2868                         *yy_c_buf_p = '\0';
2869
2870                 else
2871                         { /* need more input */
2872                         int offset = yy_c_buf_p - yytext_ptr;
2873                         ++yy_c_buf_p;
2874
2875                         switch ( yy_get_next_buffer() )
2876                                 {
2877                                 case EOB_ACT_LAST_MATCH:
2878                                         /* This happens because yy_g_n_b()
2879                                          * sees that we've accumulated a
2880                                          * token and flags that we need to
2881                                          * try matching the token before
2882                                          * proceeding.  But for input(),
2883                                          * there's no matching to consider.
2884                                          * So convert the EOB_ACT_LAST_MATCH
2885                                          * to EOB_ACT_END_OF_FILE.
2886                                          */
2887
2888                                         /* Reset buffer status. */
2889                                         yyrestart( yyin );
2890
2891                                         /* fall through */
2892
2893                                 case EOB_ACT_END_OF_FILE:
2894                                         {
2895                                         if ( yywrap() )
2896                                                 return EOF;
2897
2898                                         if ( ! yy_did_buffer_switch_on_eof )
2899                                                 YY_NEW_FILE;
2900 #ifdef __cplusplus
2901                                         return yyinput();
2902 #else
2903                                         return input();
2904 #endif
2905                                         }
2906
2907                                 case EOB_ACT_CONTINUE_SCAN:
2908                                         yy_c_buf_p = yytext_ptr + offset;
2909                                         break;
2910                                 }
2911                         }
2912                 }
2913
2914         c = *(unsigned char *) yy_c_buf_p;      /* cast for 8-bit char's */
2915         *yy_c_buf_p = '\0';     /* preserve yytext */
2916         yy_hold_char = *++yy_c_buf_p;
2917
2918         yy_current_buffer->yy_at_bol = (c == '\n');
2919
2920         return c;
2921         }
2922 #endif  /* ifndef YY_NO_INPUT */
2923
2924
2925 #ifdef YY_USE_PROTOS
2926 void yyrestart( FILE *input_file )
2927 #else
2928 void yyrestart( input_file )
2929 FILE *input_file;
2930 #endif
2931         {
2932         if ( ! yy_current_buffer )
2933                 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
2934
2935         yy_init_buffer( yy_current_buffer, input_file );
2936         yy_load_buffer_state();
2937         }
2938
2939
2940 #ifdef YY_USE_PROTOS
2941 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
2942 #else
2943 void yy_switch_to_buffer( new_buffer )
2944 YY_BUFFER_STATE new_buffer;
2945 #endif
2946         {
2947         if ( yy_current_buffer == new_buffer )
2948                 return;
2949
2950         if ( yy_current_buffer )
2951                 {
2952                 /* Flush out information for old buffer. */
2953                 *yy_c_buf_p = yy_hold_char;
2954                 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
2955                 yy_current_buffer->yy_n_chars = yy_n_chars;
2956                 }
2957
2958         yy_current_buffer = new_buffer;
2959         yy_load_buffer_state();
2960
2961         /* We don't actually know whether we did this switch during
2962          * EOF (yywrap()) processing, but the only time this flag
2963          * is looked at is after yywrap() is called, so it's safe
2964          * to go ahead and always set it.
2965          */
2966         yy_did_buffer_switch_on_eof = 1;
2967         }
2968
2969
2970 #ifdef YY_USE_PROTOS
2971 void yy_load_buffer_state( void )
2972 #else
2973 void yy_load_buffer_state()
2974 #endif
2975         {
2976         yy_n_chars = yy_current_buffer->yy_n_chars;
2977         yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
2978         yyin = yy_current_buffer->yy_input_file;
2979         yy_hold_char = *yy_c_buf_p;
2980         }
2981
2982
2983 #ifdef YY_USE_PROTOS
2984 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
2985 #else
2986 YY_BUFFER_STATE yy_create_buffer( file, size )
2987 FILE *file;
2988 int size;
2989 #endif
2990         {
2991         YY_BUFFER_STATE b;
2992
2993         b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2994         if ( ! b )
2995                 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2996
2997         b->yy_buf_size = size;
2998
2999         /* yy_ch_buf has to be 2 characters longer than the size given because
3000          * we need to put in 2 end-of-buffer characters.
3001          */
3002         b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
3003         if ( ! b->yy_ch_buf )
3004                 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
3005
3006         b->yy_is_our_buffer = 1;
3007
3008         yy_init_buffer( b, file );
3009
3010         return b;
3011         }
3012
3013
3014 #ifdef YY_USE_PROTOS
3015 void yy_delete_buffer( YY_BUFFER_STATE b )
3016 #else
3017 void yy_delete_buffer( b )
3018 YY_BUFFER_STATE b;
3019 #endif
3020         {
3021         if ( ! b )
3022                 return;
3023
3024         if ( b == yy_current_buffer )
3025                 yy_current_buffer = (YY_BUFFER_STATE) 0;
3026
3027         if ( b->yy_is_our_buffer )
3028                 yy_flex_free( (void *) b->yy_ch_buf );
3029
3030         yy_flex_free( (void *) b );
3031         }
3032
3033
3034 #ifndef YY_ALWAYS_INTERACTIVE
3035 #ifndef YY_NEVER_INTERACTIVE
3036 #include <unistd.h>
3037 #endif
3038 #endif
3039
3040 #ifdef YY_USE_PROTOS
3041 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
3042 #else
3043 void yy_init_buffer( b, file )
3044 YY_BUFFER_STATE b;
3045 FILE *file;
3046 #endif
3047
3048
3049         {
3050         int oerrno = errno;
3051
3052         yy_flush_buffer( b );
3053
3054         b->yy_input_file = file;
3055         b->yy_fill_buffer = 1;
3056
3057 #if defined(YY_ALWAYS_INTERACTIVE) && YY_ALWAYS_INTERACTIVE
3058         b->yy_is_interactive = 1;
3059 #else
3060 #if defined(YY_NEVER_INTERACTIVE) && YY_NEVER_INTERACTIVE
3061         b->yy_is_interactive = 0;
3062 #else
3063         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
3064 #endif
3065 #endif
3066         errno = oerrno;
3067         }
3068
3069
3070 #ifdef YY_USE_PROTOS
3071 void yy_flush_buffer( YY_BUFFER_STATE b )
3072 #else
3073 void yy_flush_buffer( b )
3074 YY_BUFFER_STATE b;
3075 #endif
3076
3077         {
3078         if ( ! b )
3079                 return;
3080
3081         b->yy_n_chars = 0;
3082
3083         /* We always need two end-of-buffer characters.  The first causes
3084          * a transition to the end-of-buffer state.  The second causes
3085          * a jam in that state.
3086          */
3087         b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
3088         b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
3089
3090         b->yy_buf_pos = &b->yy_ch_buf[0];
3091
3092         b->yy_at_bol = 1;
3093         b->yy_buffer_status = YY_BUFFER_NEW;
3094
3095         if ( b == yy_current_buffer )
3096                 yy_load_buffer_state();
3097         }
3098
3099
3100 #ifndef YY_NO_SCAN_BUFFER
3101 #ifdef YY_USE_PROTOS
3102 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
3103 #else
3104 YY_BUFFER_STATE yy_scan_buffer( base, size )
3105 char *base;
3106 yy_size_t size;
3107 #endif
3108         {
3109         YY_BUFFER_STATE b;
3110
3111         if ( size < 2 ||
3112              base[size-2] != YY_END_OF_BUFFER_CHAR ||
3113              base[size-1] != YY_END_OF_BUFFER_CHAR )
3114                 /* They forgot to leave room for the EOB's. */
3115                 return 0;
3116
3117         b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
3118         if ( ! b )
3119                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
3120
3121         b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
3122         b->yy_buf_pos = b->yy_ch_buf = base;
3123         b->yy_is_our_buffer = 0;
3124         b->yy_input_file = 0;
3125         b->yy_n_chars = b->yy_buf_size;
3126         b->yy_is_interactive = 0;
3127         b->yy_at_bol = 1;
3128         b->yy_fill_buffer = 0;
3129         b->yy_buffer_status = YY_BUFFER_NEW;
3130
3131         yy_switch_to_buffer( b );
3132
3133         return b;
3134         }
3135 #endif
3136
3137
3138 #ifndef YY_NO_SCAN_STRING
3139 #ifdef YY_USE_PROTOS
3140 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
3141 #else
3142 YY_BUFFER_STATE yy_scan_string( yy_str )
3143 yyconst char *yy_str;
3144 #endif
3145         {
3146         int len;
3147         for ( len = 0; yy_str[len]; ++len )
3148                 ;
3149
3150         return yy_scan_bytes( yy_str, len );
3151         }
3152 #endif
3153
3154
3155 #ifndef YY_NO_SCAN_BYTES
3156 #ifdef YY_USE_PROTOS
3157 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
3158 #else
3159 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
3160 yyconst char *bytes;
3161 int len;
3162 #endif
3163         {
3164         YY_BUFFER_STATE b;
3165         char *buf;
3166         yy_size_t n;
3167         int i;
3168
3169         /* Get memory for full buffer, including space for trailing EOB's. */
3170         n = len + 2;
3171         buf = (char *) yy_flex_alloc( n );
3172         if ( ! buf )
3173                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
3174
3175         for ( i = 0; i < len; ++i )
3176                 buf[i] = bytes[i];
3177
3178         buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
3179
3180         b = yy_scan_buffer( buf, n );
3181         if ( ! b )
3182                 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
3183
3184         /* It's okay to grow etc. this buffer, and we should throw it
3185          * away when we're done.
3186          */
3187         b->yy_is_our_buffer = 1;
3188
3189         return b;
3190         }
3191 #endif
3192
3193
3194 #ifndef YY_NO_PUSH_STATE
3195 #ifdef YY_USE_PROTOS
3196 static void yy_push_state( int new_state )
3197 #else
3198 static void yy_push_state( new_state )
3199 int new_state;
3200 #endif
3201         {
3202         if ( yy_start_stack_ptr >= yy_start_stack_depth )
3203                 {
3204                 yy_size_t new_size;
3205
3206                 yy_start_stack_depth += YY_START_STACK_INCR;
3207                 new_size = yy_start_stack_depth * sizeof( int );
3208
3209                 if ( ! yy_start_stack )
3210                         yy_start_stack = (int *) yy_flex_alloc( new_size );
3211
3212                 else
3213                         yy_start_stack = (int *) yy_flex_realloc(
3214                                         (void *) yy_start_stack, new_size );
3215
3216                 if ( ! yy_start_stack )
3217                         YY_FATAL_ERROR(
3218                         "out of memory expanding start-condition stack" );
3219                 }
3220
3221         yy_start_stack[yy_start_stack_ptr++] = YY_START;
3222
3223         BEGIN(new_state);
3224         }
3225 #endif
3226
3227
3228 #ifndef YY_NO_POP_STATE
3229 static void yy_pop_state()
3230         {
3231         if ( --yy_start_stack_ptr < 0 )
3232                 YY_FATAL_ERROR( "start-condition stack underflow" );
3233
3234         BEGIN(yy_start_stack[yy_start_stack_ptr]);
3235         }
3236 #endif
3237
3238
3239 #ifndef YY_NO_TOP_STATE
3240 static int yy_top_state()
3241         {
3242         return yy_start_stack[yy_start_stack_ptr - 1];
3243         }
3244 #endif
3245
3246 #ifndef YY_EXIT_FAILURE
3247 #define YY_EXIT_FAILURE 2
3248 #endif
3249
3250 #ifdef YY_USE_PROTOS
3251 static void yy_fatal_error( yyconst char msg[] )
3252 #else
3253 static void yy_fatal_error( msg )
3254 char msg[];
3255 #endif
3256         {
3257         (void) fprintf( stderr, "%s\n", msg );
3258         exit( YY_EXIT_FAILURE );
3259         }
3260
3261
3262
3263 /* Redefine yyless() so it works in section 3 code. */
3264
3265 #undef yyless
3266 #define yyless(n) \
3267         do \
3268                 { \
3269                 /* Undo effects of setting up yytext. */ \
3270                 yytext[yyleng] = yy_hold_char; \
3271                 yy_c_buf_p = yytext + n; \
3272                 yy_hold_char = *yy_c_buf_p; \
3273                 *yy_c_buf_p = '\0'; \
3274                 yyleng = n; \
3275                 } \
3276         while ( 0 )
3277
3278
3279 /* Internal utility routines. */
3280
3281 #ifndef yytext_ptr
3282 #ifdef YY_USE_PROTOS
3283 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
3284 #else
3285 static void yy_flex_strncpy( s1, s2, n )
3286 char *s1;
3287 yyconst char *s2;
3288 int n;
3289 #endif
3290         {
3291         register int i;
3292         for ( i = 0; i < n; ++i )
3293                 s1[i] = s2[i];
3294         }
3295 #endif
3296
3297 #ifdef YY_NEED_STRLEN
3298 #ifdef YY_USE_PROTOS
3299 static int yy_flex_strlen( yyconst char *s )
3300 #else
3301 static int yy_flex_strlen( s )
3302 yyconst char *s;
3303 #endif
3304         {
3305         register int n;
3306         for ( n = 0; s[n]; ++n )
3307                 ;
3308
3309         return n;
3310         }
3311 #endif
3312
3313
3314 #ifdef YY_USE_PROTOS
3315 static void *yy_flex_alloc( yy_size_t size )
3316 #else
3317 static void *yy_flex_alloc( size )
3318 yy_size_t size;
3319 #endif
3320         {
3321         return (void *) malloc( size );
3322         }
3323
3324 #ifdef YY_USE_PROTOS
3325 static void *yy_flex_realloc( void *ptr, yy_size_t size )
3326 #else
3327 static void *yy_flex_realloc( ptr, size )
3328 void *ptr;
3329 yy_size_t size;
3330 #endif
3331         {
3332         /* The cast to (char *) in the following accommodates both
3333          * implementations that use char* generic pointers, and those
3334          * that use void* generic pointers.  It works with the latter
3335          * because both ANSI C and C++ allow castless assignment from
3336          * any pointer type to void*, and deal with argument conversions
3337          * as though doing an assignment.
3338          */
3339         return (void *) realloc( (char *) ptr, size );
3340         }
3341
3342 #ifdef YY_USE_PROTOS
3343 static void yy_flex_free( void *ptr )
3344 #else
3345 static void yy_flex_free( ptr )
3346 void *ptr;
3347 #endif
3348         {
3349         free( ptr );
3350         }
3351
3352 #if defined(YY_MAIN) && YY_MAIN
3353 int main()
3354         {
3355         yylex();
3356         return 0;
3357         }
3358 #endif
3359 #line 654 "toke.l"
3360
3361 struct path_list {
3362     char *path;
3363     struct path_list *next;
3364 };
3365
3366 struct include_stack {
3367     YY_BUFFER_STATE bs;
3368     char *path;
3369     struct path_list *more; /* more files in case of includedir */
3370     int lineno;
3371     bool keepopen;
3372 };
3373
3374 static int
3375 pl_compare(const void *v1, const void *v2)
3376 {
3377     const struct path_list * const *p1 = v1;
3378     const struct path_list * const *p2 = v2;
3379
3380     return strcmp((*p1)->path, (*p2)->path);
3381 }
3382
3383 static char *
3384 switch_dir(struct include_stack *stack, char *dirpath)
3385 {
3386     DIR *dir;
3387     int i, count = 0;
3388     char *path = NULL;
3389     struct dirent *dent;
3390     struct stat sb;
3391     struct path_list *pl, *first = NULL;
3392     struct path_list **sorted = NULL;
3393     debug_decl(switch_dir, SUDO_DEBUG_PARSER)
3394
3395     if (!(dir = opendir(dirpath))) {
3396         if (errno != ENOENT) {
3397             char *errbuf;
3398             if (asprintf(&errbuf, _("%s: %s"), dirpath, strerror(errno)) != -1) {
3399                 yyerror(errbuf);
3400                 free(errbuf);
3401             } else {
3402                 yyerror(_("unable to allocate memory"));
3403             }
3404         }
3405         goto done;
3406     }
3407     while ((dent = readdir(dir))) {
3408         /* Ignore files that end in '~' or have a '.' in them. */
3409         if (dent->d_name[0] == '\0' || dent->d_name[NAMLEN(dent) - 1] == '~'
3410             || strchr(dent->d_name, '.') != NULL) {
3411             continue;
3412         }
3413         if (asprintf(&path, "%s/%s", dirpath, dent->d_name) == -1) {
3414             closedir(dir);
3415             goto bad;
3416         }
3417         if (stat(path, &sb) != 0 || !S_ISREG(sb.st_mode)) {
3418             efree(path);
3419             path = NULL;
3420             continue;
3421         }
3422         pl = malloc(sizeof(*pl));
3423         if (pl == NULL)
3424             goto bad;
3425         pl->path = path;
3426         pl->next = first;
3427         first = pl;
3428         count++;
3429     }
3430     closedir(dir);
3431
3432     if (count == 0)
3433         goto done;
3434
3435     /* Sort the list as an array. */
3436     sorted = malloc(sizeof(*sorted) * count);
3437     if (sorted == NULL)
3438         goto bad;
3439     pl = first;
3440     for (i = 0; i < count; i++) {
3441         sorted[i] = pl;
3442         pl = pl->next;
3443     }
3444     qsort(sorted, count, sizeof(*sorted), pl_compare);
3445
3446     /* Apply sorting to the list. */
3447     first = sorted[0];
3448     sorted[count - 1]->next = NULL;
3449     for (i = 1; i < count; i++)
3450         sorted[i - 1]->next = sorted[i];
3451     efree(sorted);
3452
3453     /* Pull out the first element for parsing, leave the rest for later. */
3454     if (count) {
3455         path = first->path;
3456         pl = first->next;
3457         efree(first);
3458         stack->more = pl;
3459     } else {
3460         path = NULL;
3461     }
3462 done:
3463     efree(dirpath);
3464     debug_return_str(path);
3465 bad:
3466     while (first != NULL) {
3467         pl = first;
3468         first = pl->next;
3469         free(pl->path);
3470         free(pl);
3471     }
3472     efree(sorted);
3473     efree(dirpath);
3474     efree(path);
3475     debug_return_str(NULL);
3476 }
3477
3478 #define MAX_SUDOERS_DEPTH       128
3479 #define SUDOERS_STACK_INCREMENT 16
3480
3481 static size_t istacksize, idepth;
3482 static struct include_stack *istack;
3483 static bool keepopen;
3484
3485 void
3486 init_lexer(void)
3487 {
3488     struct path_list *pl;
3489     debug_decl(init_lexer, SUDO_DEBUG_PARSER)
3490
3491     while (idepth) {
3492         idepth--;
3493         while ((pl = istack[idepth].more) != NULL) {
3494             istack[idepth].more = pl->next;
3495             efree(pl->path);
3496             efree(pl);
3497         }
3498         efree(istack[idepth].path);
3499         if (idepth && !istack[idepth].keepopen)
3500             fclose(istack[idepth].bs->yy_input_file);
3501         yy_delete_buffer(istack[idepth].bs);
3502     }
3503     efree(istack);
3504     istack = NULL;
3505     istacksize = idepth = 0;
3506     sudolineno = 1;
3507     keepopen = false;
3508     sawspace = false;
3509     continued = false;
3510     prev_state = INITIAL;
3511
3512     debug_return;
3513 }
3514
3515 static bool
3516 _push_include(char *path, bool isdir)
3517 {
3518     struct path_list *pl;
3519     FILE *fp;
3520     debug_decl(_push_include, SUDO_DEBUG_PARSER)
3521
3522     /* push current state onto stack */
3523     if (idepth >= istacksize) {
3524         if (idepth > MAX_SUDOERS_DEPTH) {
3525             yyerror(_("too many levels of includes"));
3526             debug_return_bool(false);
3527         }
3528         istacksize += SUDOERS_STACK_INCREMENT;
3529         istack = (struct include_stack *) realloc(istack,
3530             sizeof(*istack) * istacksize);
3531         if (istack == NULL) {
3532             yyerror(_("unable to allocate memory"));
3533             debug_return_bool(false);
3534         }
3535     }
3536     if (isdir) {
3537         struct stat sb;
3538         switch (sudo_secure_dir(path, sudoers_uid, sudoers_gid, &sb)) {
3539             case SUDO_PATH_SECURE:
3540                 break;
3541             case SUDO_PATH_MISSING:
3542                 debug_return_bool(false);
3543             case SUDO_PATH_BAD_TYPE:
3544                 errno = ENOTDIR;
3545                 if (sudoers_warnings) {
3546                     warning("%s", path);
3547                 }
3548                 debug_return_bool(false);
3549             case SUDO_PATH_WRONG_OWNER:
3550                 if (sudoers_warnings) {
3551                     warningx(_("%s is owned by uid %u, should be %u"),   
3552                         path, (unsigned int) sb.st_uid,
3553                         (unsigned int) sudoers_uid);
3554                 }
3555                 debug_return_bool(false);
3556             case SUDO_PATH_WORLD_WRITABLE:
3557                 if (sudoers_warnings) {
3558                     warningx(_("%s is world writable"), path);
3559                 }
3560                 debug_return_bool(false);
3561             case SUDO_PATH_GROUP_WRITABLE:
3562                 if (sudoers_warnings) {
3563                     warningx(_("%s is owned by gid %u, should be %u"),
3564                         path, (unsigned int) sb.st_gid,
3565                         (unsigned int) sudoers_gid);
3566                 }
3567                 debug_return_bool(false);
3568             default:
3569                 /* NOTREACHED */
3570                 debug_return_bool(false);
3571         }
3572         if (!(path = switch_dir(&istack[idepth], path))) {
3573             /* switch_dir() called yyerror() for us */
3574             debug_return_bool(false);
3575         }
3576         while ((fp = open_sudoers(path, false, &keepopen)) == NULL) {
3577             /* Unable to open path in includedir, go to next one, if any. */
3578             efree(path);
3579             if ((pl = istack[idepth].more) == NULL)
3580                 debug_return_bool(false);
3581             path = pl->path;
3582             istack[idepth].more = pl->next;
3583             efree(pl);
3584         }
3585     } else {
3586         if ((fp = open_sudoers(path, true, &keepopen)) == NULL) {
3587             /* The error was already printed by open_sudoers() */
3588             yyerror(NULL);
3589             debug_return_bool(false);
3590         }
3591         istack[idepth].more = NULL;
3592     }
3593     /* Push the old (current) file and open the new one. */
3594     istack[idepth].path = sudoers; /* push old path */
3595     istack[idepth].bs = YY_CURRENT_BUFFER;
3596     istack[idepth].lineno = sudolineno;
3597     istack[idepth].keepopen = keepopen;
3598     idepth++;
3599     sudolineno = 1;
3600     sudoers = path;
3601     yy_switch_to_buffer(yy_create_buffer(fp, YY_BUF_SIZE));
3602
3603     debug_return_bool(true);
3604 }
3605
3606 static bool
3607 pop_include(void)
3608 {
3609     struct path_list *pl;
3610     FILE *fp;
3611     debug_decl(pop_include, SUDO_DEBUG_PARSER)
3612
3613     if (idepth == 0)
3614         debug_return_bool(false);
3615
3616     if (!keepopen)
3617         fclose(YY_CURRENT_BUFFER->yy_input_file);
3618     yy_delete_buffer(YY_CURRENT_BUFFER);
3619     /* If we are in an include dir, move to the next file. */
3620     while ((pl = istack[idepth - 1].more) != NULL) {
3621         fp = open_sudoers(pl->path, false, &keepopen);
3622         if (fp != NULL) {
3623             istack[idepth - 1].more = pl->next;
3624             efree(sudoers);
3625             sudoers = pl->path;
3626             sudolineno = 1;
3627             yy_switch_to_buffer(yy_create_buffer(fp, YY_BUF_SIZE));
3628             efree(pl);
3629             break;
3630         }
3631         /* Unable to open path in include dir, go to next one. */
3632         istack[idepth - 1].more = pl->next;
3633         efree(pl->path);
3634         efree(pl);
3635     }
3636     /* If no path list, just pop the last dir on the stack. */
3637     if (pl == NULL) {
3638         idepth--;
3639         yy_switch_to_buffer(istack[idepth].bs);
3640         efree(sudoers);
3641         sudoers = istack[idepth].path;
3642         sudolineno = istack[idepth].lineno;
3643         keepopen = istack[idepth].keepopen;
3644     }
3645     debug_return_bool(true);
3646 }
3647
3648 static char *
3649 parse_include(char *base)
3650 {
3651     char *cp, *ep, *path, *pp;
3652     int dirlen = 0, len = 0, subst = 0;
3653     size_t shost_len = 0;
3654     debug_decl(parse_include, SUDO_DEBUG_PARSER)
3655
3656     /* Pull out path from #include line. */
3657     cp = base + sizeof("#include");
3658     if (*cp == 'i')
3659         cp += 3; /* includedir */
3660     while (isblank((unsigned char) *cp))
3661         cp++;
3662     ep = cp;
3663     while (*ep != '\0' && !isspace((unsigned char) *ep)) {
3664         if (ep[0] == '%' && ep[1] == 'h') {
3665             shost_len = strlen(user_shost);
3666             len += shost_len - 2;
3667             subst = 1;
3668         }
3669         ep++;
3670     }
3671
3672     /* Relative paths are located in the same dir as the sudoers file. */
3673     if (*cp != '/') {
3674         char *dirend = strrchr(sudoers, '/');
3675         if (dirend != NULL)
3676             dirlen = (int)(dirend - sudoers) + 1;
3677     }
3678
3679     /* Make a copy of the fully-qualified path and return it. */
3680     len += (int)(ep - cp);
3681     path = pp = malloc(len + dirlen + 1);
3682     if (path == NULL) {
3683         yyerror(_("unable to allocate memory"));
3684         debug_return_str(NULL);
3685     }
3686     if (dirlen) {
3687         memcpy(path, sudoers, dirlen);
3688         pp += dirlen;
3689     }
3690     if (subst) {
3691         /* substitute for %h */
3692         while (cp < ep) {
3693             if (cp[0] == '%' && cp[1] == 'h') {
3694                 memcpy(pp, user_shost, shost_len);
3695                 pp += shost_len;
3696                 cp += 2;
3697                 continue;
3698             }
3699             *pp++ = *cp++;
3700         }
3701         *pp = '\0';
3702     } else {
3703         memcpy(pp, cp, len);
3704         pp[len] = '\0';
3705     }
3706
3707     /* Push any excess characters (e.g. comment, newline) back to the lexer */
3708     if (*ep != '\0')
3709         yyless((int)(ep - base));
3710
3711     debug_return_str(path);
3712 }
3713
3714 #ifdef TRACELEXER
3715 int
3716 sudoers_trace_print(const char *msg)
3717 {
3718     return fputs(msg, stderr);
3719 }
3720 #else
3721 int
3722 sudoers_trace_print(const char *msg)
3723 {
3724     static bool initialized;
3725     static struct lbuf lbuf;
3726
3727     if (!initialized) {
3728         initialized = true;
3729         lbuf_init(&lbuf, NULL, 0, NULL, 0);
3730     }
3731
3732     lbuf_append(&lbuf, "%s", msg);
3733     /* XXX - assumes a final newline */
3734     if (strchr(msg, '\n') != NULL)
3735     {
3736         sudo_debug_printf2(NULL, NULL, 0, SUDO_DEBUG_PARSER|SUDO_DEBUG_DEBUG,
3737             "%s:%d %s", sudoers, sudolineno, lbuf.buf);
3738         lbuf.len = 0;
3739     }
3740     return 0;
3741 }
3742 #endif /* TRACELEXER */