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