1 /* $OpenBSD: flex.skl,v 1.10 2007/01/26 14:38:19 tsi Exp $ */
3 /* A lexical scanner generated by flex */
5 /* Scanner skeleton version:
6 * $Header: /home/cvs/courtesan/sudo/toke.c,v 1.37 2009/07/18 13:55:37 millert Exp $
10 #define YY_FLEX_MAJOR_VERSION 2
11 #define YY_FLEX_MINOR_VERSION 5
17 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
30 /* Use prototypes in function declarations. */
33 /* The "const" storage-class-modifier is valid. */
36 #else /* ! __cplusplus */
44 #endif /* ! __cplusplus */
63 #define YY_PROTO(proto) proto
65 #define YY_PROTO(proto) ()
68 /* Returned upon end-of-file. */
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
76 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
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.
82 #define BEGIN yy_start = 1 + 2 *
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
88 #define YY_START ((yy_start - 1) / 2)
89 #define YYSTATE YY_START
91 /* Action number for EOF rule of a given start state. */
92 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
94 /* Special action meaning "start processing a new file". */
95 #define YY_NEW_FILE yyrestart( yyin )
97 #define YY_END_OF_BUFFER_CHAR 0
99 /* Size of default input buffer. */
100 #define YY_BUF_SIZE 16384
102 typedef struct yy_buffer_state *YY_BUFFER_STATE;
105 extern FILE *yyin, *yyout;
107 #define EOB_ACT_CONTINUE_SCAN 0
108 #define EOB_ACT_END_OF_FILE 1
109 #define EOB_ACT_LAST_MATCH 2
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:
115 * if ( condition_holds )
118 * do_something_else();
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.
125 /* Return all but the first 'n' matched characters back to the input stream. */
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 */ \
138 #define unput(c) yyunput( c, yytext_ptr )
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).
144 typedef unsigned int yy_size_t;
147 struct yy_buffer_state
151 char *yy_ch_buf; /* input buffer */
152 char *yy_buf_pos; /* current position in input buffer */
154 /* Size of input buffer in bytes, not including room for EOB
157 yy_size_t yy_buf_size;
159 /* Number of characters read into yy_ch_buf, not including EOB
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
168 int yy_is_our_buffer;
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
175 int yy_is_interactive;
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
183 /* Whether to try to fill the input buffer when we reach the
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.
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.
201 #define YY_BUFFER_EOF_PENDING 2
204 static YY_BUFFER_STATE yy_current_buffer = 0;
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
210 #define YY_CURRENT_BUFFER yy_current_buffer
213 /* yy_hold_char holds the character lost when yytext is formed. */
214 static char yy_hold_char;
216 static int yy_n_chars; /* number of characters read into yy_ch_buf */
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 */
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 ...
229 static int yy_did_buffer_switch_on_eof;
231 void yyrestart YY_PROTO(( FILE *input_file ));
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 )
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 ));
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 * ));
249 #define yy_new_buffer yy_create_buffer
251 #define yy_set_interactive(is_interactive) \
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; \
258 #define yy_set_bol(at_bol) \
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; \
265 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
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;
274 #define yytext_ptr yytext
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[] ));
281 /* Done after the current pattern has been matched and before the
282 * corresponding action - sets up yytext.
284 #define YY_DO_BEFORE_ACTION \
285 yytext_ptr = yy_bp; \
286 yyleng = (int) (yy_cp - yy_bp); \
287 yy_hold_char = *yy_cp; \
291 #define YY_NUM_RULES 50
292 #define YY_END_OF_BUFFER 51
293 static yyconst short int yy_accept[554] =
295 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
296 0, 0, 51, 38, 46, 45, 44, 38, 49, 38,
297 39, 40, 38, 41, 38, 38, 38, 38, 43, 42,
298 49, 33, 33, 33, 33, 33, 33, 49, 38, 38,
299 46, 49, 33, 33, 33, 33, 33, 1, 49, 38,
300 38, 16, 15, 16, 15, 15, 49, 49, 49, 2,
301 8, 7, 8, 3, 8, 4, 49, 12, 12, 12,
302 10, 11, 38, 0, 46, 44, 38, 0, 0, 0,
303 48, 0, 38, 28, 0, 0, 27, 0, 36, 36,
304 0, 38, 38, 0, 38, 38, 38, 38, 0, 31,
306 33, 33, 33, 33, 33, 33, 38, 47, 38, 46,
307 0, 0, 0, 0, 0, 0, 38, 38, 38, 38,
308 38, 1, 0, 34, 34, 0, 38, 16, 16, 14,
309 13, 14, 0, 0, 2, 8, 0, 5, 6, 8,
310 8, 12, 0, 12, 12, 0, 9, 37, 37, 0,
311 0, 28, 0, 0, 38, 38, 38, 38, 38, 0,
312 0, 31, 31, 33, 33, 33, 33, 33, 33, 33,
313 38, 0, 0, 0, 0, 0, 0, 38, 38, 38,
314 38, 38, 0, 38, 9, 0, 38, 38, 38, 38,
315 38, 38, 0, 32, 32, 32, 0, 0, 31, 31,
317 31, 31, 31, 31, 31, 33, 33, 33, 33, 33,
318 33, 33, 38, 0, 0, 0, 0, 0, 0, 38,
319 38, 38, 38, 38, 38, 38, 0, 0, 32, 32,
320 32, 0, 31, 31, 0, 31, 31, 31, 31, 31,
321 31, 31, 31, 31, 31, 31, 0, 24, 33, 33,
322 33, 33, 33, 38, 0, 0, 0, 0, 38, 38,
323 38, 38, 38, 38, 38, 38, 0, 32, 0, 31,
324 31, 31, 0, 0, 0, 31, 31, 31, 31, 31,
325 31, 31, 31, 31, 31, 31, 31, 31, 33, 33,
326 33, 33, 33, 38, 0, 0, 0, 38, 38, 38,
328 29, 29, 29, 0, 0, 31, 31, 31, 31, 31,
329 31, 31, 0, 0, 0, 0, 0, 31, 31, 31,
330 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
331 31, 0, 23, 33, 33, 0, 22, 0, 25, 38,
332 0, 0, 0, 38, 38, 38, 38, 29, 29, 29,
333 29, 0, 31, 0, 31, 31, 31, 31, 31, 31,
334 31, 31, 31, 31, 31, 0, 0, 0, 31, 31,
335 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
336 31, 33, 33, 35, 0, 0, 0, 38, 19, 34,
337 38, 30, 30, 30, 31, 0, 0, 0, 31, 31,
339 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
340 31, 0, 0, 0, 0, 0, 31, 31, 31, 31,
341 31, 31, 31, 31, 0, 21, 0, 26, 0, 19,
342 0, 0, 38, 0, 38, 38, 38, 30, 30, 30,
343 30, 30, 0, 0, 0, 0, 0, 31, 31, 31,
344 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
345 31, 31, 31, 31, 31, 31, 31, 0, 0, 0,
346 20, 19, 0, 19, 0, 38, 38, 38, 30, 30,
347 0, 0, 0, 31, 31, 31, 31, 31, 31, 31,
348 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
350 31, 20, 0, 17, 0, 38, 38, 38, 38, 38,
351 0, 0, 0, 0, 0, 31, 31, 31, 31, 31,
352 31, 31, 31, 0, 38, 38, 38, 31, 31, 31,
353 31, 31, 31, 0, 38, 38, 38, 38, 38, 31,
354 31, 31, 31, 31, 0, 18, 29, 29, 29, 29,
358 static yyconst int yy_ec[256] =
360 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
361 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
362 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
363 1, 2, 4, 5, 6, 1, 7, 1, 1, 8,
364 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
365 19, 20, 21, 22, 22, 22, 23, 24, 1, 1,
366 25, 26, 10, 27, 28, 29, 30, 31, 32, 29,
367 33, 34, 33, 33, 33, 33, 33, 35, 36, 37,
368 33, 38, 39, 40, 41, 42, 43, 44, 33, 33,
369 10, 45, 10, 1, 46, 1, 47, 48, 49, 50,
371 51, 52, 53, 53, 54, 53, 53, 55, 56, 57,
372 58, 53, 53, 59, 60, 61, 62, 53, 53, 53,
373 53, 53, 1, 1, 1, 1, 1, 1, 1, 1,
374 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
375 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
376 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
377 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
378 1, 1, 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,
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 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
390 static yyconst int yy_meta[63] =
392 1, 2, 3, 4, 5, 6, 1, 4, 4, 1,
393 1, 2, 1, 7, 8, 9, 9, 9, 9, 9,
394 9, 9, 9, 10, 6, 4, 1, 9, 9, 9,
395 9, 9, 1, 1, 1, 1, 1, 1, 1, 1,
396 1, 1, 1, 1, 11, 12, 13, 13, 13, 13,
397 13, 13, 12, 12, 12, 12, 12, 12, 12, 12,
401 static yyconst short int yy_base[620] =
403 0, 61, 62, 63, 69, 84, 128, 189, 250, 294,
404 80, 101, 2349, 2303, 2345, 3488, 2316, 338, 381, 52,
405 3488, 3488, 2272, 3488, 107, 391, 119, 137, 2292, 3488,
406 3488, 443, 2271, 490, 2270, 2260, 2253, 541, 145, 55,
407 167, 565, 2228, 2232, 2224, 2219, 2206, 2254, 193, 256,
408 56, 0, 3488, 2249, 0, 3488, 264, 617, 77, 0,
409 2199, 3488, 82, 3488, 99, 3488, 110, 2189, 126, 106,
410 3488, 145, 2179, 306, 2185, 2182, 639, 2145, 2144, 2135,
411 3488, 201, 209, 74, 2082, 347, 2079, 550, 276, 2078,
412 587, 410, 669, 2098, 2104, 306, 358, 317, 2092, 179,
414 706, 0, 2083, 240, 2075, 2071, 389, 3488, 76, 355,
415 2039, 2041, 2033, 2021, 2000, 63, 115, 219, 29, 212,
416 98, 2056, 507, 361, 1986, 598, 154, 0, 2024, 256,
417 3488, 3488, 636, 284, 0, 1982, 567, 3488, 3488, 1981,
418 532, 1979, 1994, 271, 300, 288, 1975, 1905, 3488, 1944,
419 1916, 1873, 669, 603, 745, 777, 809, 841, 1902, 1876,
420 878, 268, 916, 953, 1869, 1854, 1854, 1849, 1841, 1831,
421 236, 1805, 1788, 1746, 1748, 1719, 317, 157, 1722, 307,
422 266, 258, 777, 296, 1766, 1764, 686, 402, 992, 1024,
423 725, 337, 1727, 1726, 787, 499, 1708, 1707, 343, 755,
425 1056, 796, 694, 1094, 819, 1705, 393, 1681, 1673, 1671,
426 1639, 1646, 373, 1629, 1616, 1601, 1614, 1586, 543, 400,
427 556, 233, 506, 1133, 1165, 1197, 1620, 1619, 827, 1619,
428 1602, 1601, 1590, 540, 858, 546, 895, 602, 1229, 0,
429 935, 1240, 970, 731, 1278, 1002, 601, 3488, 1581, 1571,
430 1577, 1577, 1537, 486, 1532, 1515, 1470, 387, 343, 380,
431 616, 1010, 423, 1317, 1349, 1044, 1470, 1469, 1451, 1450,
432 1379, 645, 1076, 1113, 1143, 652, 983, 1035, 1151, 1042,
433 1418, 0, 1175, 1429, 1184, 866, 1467, 1207, 644, 1430,
434 1436, 648, 672, 625, 1428, 1400, 680, 576, 487, 715,
436 1505, 1536, 1567, 1430, 1382, 1381, 1215, 1599, 1257, 903,
437 1636, 1297, 1325, 1347, 1335, 1359, 1369, 841, 1024, 1067,
438 1124, 1396, 1308, 1675, 0, 1448, 1686, 1484, 1265, 1724,
439 1515, 955, 3488, 1329, 1282, 956, 3488, 975, 3488, 807,
440 1266, 1244, 591, 1074, 569, 917, 1523, 155, 1762, 1793,
441 1546, 1280, 1243, 1553, 768, 1576, 810, 1825, 0, 429,
442 1836, 1584, 1404, 1873, 1618, 1655, 1705, 1743, 1288, 1335,
443 1734, 1772, 1772, 1803, 1912, 0, 1805, 1923, 1781, 1492,
444 1814, 993, 1156, 1221, 1211, 1181, 730, 635, 1952, 1194,
445 1984, 2016, 2048, 2080, 1153, 1855, 1892, 1943, 1152, 1184,
447 1198, 1964, 1350, 2112, 0, 762, 2123, 1972, 1992, 2160,
448 2000, 2024, 1126, 2034, 2058, 2068, 1369, 1609, 1934, 772,
449 806, 2199, 0, 844, 1173, 3488, 1468, 3488, 1090, 2086,
450 1389, 142, 991, 1076, 1075, 2140, 1038, 2209, 2241, 2273,
451 2305, 2103, 2177, 1088, 2219, 2229, 2251, 1077, 1076, 1656,
452 1706, 2257, 1837, 2337, 0, 881, 2348, 2281, 2088, 2385,
453 2291, 2314, 2323, 2366, 1855, 981, 927, 934, 957, 902,
454 898, 808, 2416, 743, 2441, 2454, 2486, 2518, 2438, 1951,
455 2468, 2496, 2506, 757, 716, 1893, 2001, 2526, 2035, 2550,
456 0, 1012, 2561, 2534, 2148, 2580, 647, 2599, 2608, 2477,
458 634, 3488, 629, 3488, 1051, 2616, 1195, 2648, 2680, 2627,
459 2633, 594, 2659, 2669, 2690, 573, 566, 2049, 557, 549,
460 2698, 0, 1045, 1545, 2712, 2744, 2776, 2720, 2728, 2752,
461 509, 0, 455, 357, 2760, 1535, 2808, 2840, 2790, 3488,
462 2796, 2820, 2185, 3488, 345, 3488, 2828, 2848, 2858, 25,
463 2878, 2870, 3488, 2923, 2936, 2949, 2962, 2975, 2988, 3001,
464 3014, 3027, 3040, 3045, 3058, 3071, 3073, 3086, 3099, 3112,
465 3125, 3138, 3151, 3164, 3177, 3182, 3188, 3201, 3214, 3219,
466 3225, 3230, 3235, 3240, 3246, 3251, 3256, 3261, 3267, 3274,
467 3279, 3284, 3289, 3295, 3302, 3307, 3312, 3318, 3325, 3330,
469 3337, 3343, 3350, 3355, 3362, 3368, 3375, 3388, 3401, 3406,
470 3413, 3419, 3432, 3437, 3444, 3449, 3456, 3461, 3474
473 static yyconst short int yy_def[620] =
475 553, 1, 1, 1, 554, 554, 555, 555, 556, 556,
476 557, 557, 553, 558, 553, 553, 553, 559, 560, 561,
477 553, 553, 562, 553, 563, 558, 26, 26, 564, 553,
478 553, 553, 32, 32, 34, 34, 34, 558, 26, 558,
479 553, 560, 32, 32, 34, 34, 34, 553, 553, 565,
480 558, 566, 553, 566, 566, 553, 553, 560, 553, 567,
481 568, 553, 568, 553, 568, 553, 569, 570, 570, 570,
482 553, 553, 558, 558, 553, 553, 559, 571, 559, 572,
483 553, 573, 553, 561, 574, 561, 562, 562, 563, 575,
484 558, 558, 26, 564, 93, 93, 93, 93, 576, 577,
486 32, 34, 34, 34, 34, 34, 558, 553, 558, 553,
487 553, 553, 553, 553, 553, 572, 558, 93, 558, 558,
488 558, 553, 553, 565, 578, 558, 558, 566, 566, 553,
489 553, 553, 573, 553, 567, 568, 568, 553, 553, 568,
490 568, 570, 553, 570, 570, 553, 553, 558, 553, 572,
491 579, 574, 574, 553, 558, 558, 558, 93, 158, 580,
492 553, 581, 553, 32, 34, 34, 34, 34, 34, 34,
493 558, 553, 553, 553, 553, 553, 572, 558, 158, 558,
494 558, 558, 553, 558, 553, 579, 558, 558, 558, 558,
495 558, 558, 582, 583, 583, 195, 584, 583, 585, 163,
497 553, 201, 201, 553, 201, 34, 34, 34, 34, 34,
498 34, 34, 558, 553, 553, 553, 553, 553, 572, 558,
499 558, 558, 558, 558, 558, 558, 553, 586, 586, 229,
500 586, 587, 588, 589, 553, 590, 204, 590, 590, 239,
501 590, 553, 242, 242, 553, 242, 553, 553, 34, 34,
502 34, 34, 34, 558, 553, 553, 553, 572, 558, 558,
503 558, 558, 558, 558, 558, 558, 591, 591, 592, 593,
504 553, 553, 553, 553, 553, 594, 594, 595, 245, 595,
505 595, 281, 595, 553, 284, 284, 553, 284, 34, 34,
506 34, 34, 34, 558, 553, 553, 572, 558, 558, 558,
508 558, 558, 558, 553, 596, 597, 271, 553, 308, 308,
509 553, 308, 553, 553, 553, 553, 553, 553, 598, 598,
510 599, 287, 599, 599, 324, 599, 553, 327, 327, 553,
511 327, 553, 553, 34, 34, 553, 553, 553, 553, 558,
512 553, 553, 572, 558, 558, 558, 558, 558, 558, 558,
513 558, 553, 600, 553, 601, 311, 601, 601, 358, 358,
514 553, 361, 361, 553, 361, 553, 553, 553, 553, 602,
515 602, 603, 330, 603, 603, 375, 603, 553, 378, 378,
516 378, 34, 34, 558, 553, 553, 572, 558, 558, 558,
517 558, 558, 558, 558, 553, 553, 553, 553, 604, 604,
519 605, 364, 605, 605, 404, 404, 553, 407, 407, 553,
520 407, 553, 553, 553, 553, 553, 553, 606, 606, 607,
521 607, 607, 422, 422, 553, 553, 553, 553, 553, 553,
522 572, 572, 558, 608, 609, 558, 558, 558, 558, 558,
523 558, 558, 553, 553, 553, 553, 553, 553, 610, 610,
524 611, 410, 611, 611, 454, 454, 553, 457, 457, 553,
525 457, 553, 553, 553, 553, 612, 612, 553, 613, 572,
526 558, 608, 608, 609, 609, 558, 558, 558, 558, 558,
527 553, 553, 553, 553, 614, 614, 615, 460, 615, 615,
528 490, 490, 553, 493, 493, 493, 553, 553, 553, 553,
530 553, 553, 613, 553, 572, 558, 558, 558, 558, 558,
531 553, 553, 553, 553, 553, 553, 616, 616, 617, 617,
532 617, 521, 521, 572, 558, 558, 558, 553, 553, 553,
533 553, 618, 618, 619, 558, 558, 558, 558, 558, 553,
534 553, 553, 553, 553, 619, 553, 558, 558, 558, 558,
535 558, 558, 0, 553, 553, 553, 553, 553, 553, 553,
536 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
537 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
538 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
539 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
541 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
542 553, 553, 553, 553, 553, 553, 553, 553, 553
545 static yyconst short int yy_nxt[3551] =
547 14, 15, 16, 17, 18, 19, 20, 21, 22, 14,
548 23, 24, 14, 14, 25, 26, 27, 28, 26, 26,
549 26, 26, 26, 29, 30, 31, 14, 32, 32, 32,
550 32, 33, 34, 34, 35, 34, 36, 34, 37, 34,
551 34, 34, 34, 34, 38, 14, 39, 39, 39, 39,
552 39, 39, 14, 14, 14, 14, 14, 14, 14, 40,
553 14, 14, 41, 48, 48, 81, 42, 49, 49, 74,
554 15, 53, 54, 74, 55, 85, 50, 50, 134, 108,
555 56, 69, 16, 70, 71, 15, 53, 54, 180, 55,
556 43, 44, 56, 55, 45, 56, 86, 553, 46, 74,
558 74, 47, 69, 16, 70, 71, 138, 56, 55, 145,
559 90, 141, 108, 57, 90, 90, 109, 127, 86, 177,
560 74, 51, 51, 139, 72, 171, 137, 144, 57, 15,
561 16, 17, 90, 58, 96, 96, 96, 96, 96, 96,
562 96, 96, 74, 137, 81, 72, 146, 147, 182, 142,
563 143, 91, 97, 97, 97, 97, 97, 98, 73, 74,
564 95, 95, 95, 95, 95, 95, 95, 95, 110, 347,
565 143, 178, 59, 60, 60, 60, 60, 60, 60, 60,
566 60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
567 15, 16, 17, 161, 58, 470, 111, 112, 74, 74,
569 113, 74, 163, 184, 114, 123, 220, 115, 83, 83,
570 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
571 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
572 83, 83, 73, 59, 60, 60, 60, 60, 60, 60,
573 60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
574 60, 15, 16, 17, 62, 58, 74, 134, 108, 125,
575 63, 64, 65, 125, 125, 130, 108, 131, 181, 132,
576 179, 166, 144, 131, 66, 132, 167, 74, 168, 90,
577 74, 125, 161, 90, 90, 134, 108, 132, 132, 146,
578 147, 200, 220, 213, 67, 15, 16, 17, 62, 58,
580 126, 90, 74, 145, 63, 64, 65, 73, 132, 73,
581 74, 73, 222, 73, 73, 143, 220, 73, 66, 81,
582 91, 159, 159, 159, 159, 159, 159, 159, 159, 73,
583 73, 73, 159, 159, 159, 159, 159, 159, 67, 78,
584 74, 78, 73, 78, 143, 78, 78, 546, 84, 78,
585 84, 74, 84, 223, 84, 84, 110, 161, 84, 546,
586 94, 78, 78, 78, 125, 219, 200, 220, 125, 125,
587 298, 84, 84, 159, 159, 159, 159, 159, 159, 159,
588 159, 74, 79, 81, 111, 112, 125, 74, 113, 81,
589 134, 108, 114, 82, 247, 115, 83, 83, 83, 83,
591 83, 83, 83, 83, 92, 126, 93, 93, 93, 93,
592 93, 93, 93, 93, 94, 187, 248, 74, 95, 95,
593 95, 95, 95, 254, 74, 155, 156, 157, 155, 155,
594 155, 155, 155, 74, 299, 74, 262, 95, 95, 95,
595 95, 95, 95, 73, 74, 259, 74, 73, 297, 73,
596 399, 399, 73, 73, 74, 73, 73, 73, 101, 101,
597 101, 101, 101, 101, 101, 101, 94, 74, 354, 73,
598 101, 101, 101, 101, 101, 102, 102, 102, 102, 102,
599 102, 102, 102, 102, 102, 102, 102, 74, 102, 95,
600 95, 95, 95, 95, 95, 73, 73, 73, 73, 73,
602 73, 73, 73, 73, 73, 102, 102, 102, 102, 102,
603 102, 102, 102, 553, 231, 231, 231, 102, 102, 102,
604 102, 102, 83, 83, 83, 83, 83, 83, 83, 83,
605 74, 74, 488, 134, 108, 294, 73, 73, 73, 73,
606 73, 73, 107, 108, 73, 81, 73, 345, 73, 73,
607 74, 87, 73, 87, 161, 87, 261, 87, 87, 235,
608 161, 87, 553, 200, 73, 73, 73, 81, 136, 237,
609 354, 136, 136, 87, 87, 87, 137, 82, 136, 94,
610 83, 83, 83, 83, 83, 83, 83, 83, 89, 488,
611 73, 136, 89, 81, 73, 73, 452, 258, 89, 124,
613 74, 73, 247, 124, 90, 73, 73, 511, 90, 124,
614 89, 89, 73, 74, 90, 553, 161, 260, 116, 81,
615 74, 124, 124, 73, 248, 237, 90, 90, 389, 133,
616 344, 504, 553, 553, 553, 553, 553, 553, 553, 553,
617 78, 387, 78, 148, 78, 332, 78, 78, 161, 336,
618 78, 553, 553, 553, 553, 553, 553, 553, 553, 161,
619 74, 161, 78, 78, 78, 300, 161, 333, 200, 74,
620 152, 337, 152, 338, 152, 237, 152, 152, 340, 74,
621 152, 433, 81, 79, 158, 158, 158, 158, 158, 158,
622 158, 158, 152, 152, 152, 339, 158, 158, 158, 158,
624 158, 224, 225, 226, 224, 224, 224, 224, 224, 240,
625 240, 240, 240, 240, 241, 158, 158, 158, 158, 158,
626 158, 164, 164, 164, 164, 164, 164, 164, 164, 343,
627 74, 431, 81, 164, 164, 164, 164, 164, 187, 452,
628 188, 188, 188, 188, 188, 188, 282, 282, 282, 282,
629 282, 283, 158, 158, 158, 158, 158, 158, 187, 74,
630 188, 188, 188, 188, 188, 188, 188, 188, 346, 74,
631 205, 205, 205, 205, 205, 205, 205, 205, 125, 432,
632 402, 354, 125, 449, 449, 235, 161, 475, 125, 74,
633 187, 356, 189, 189, 189, 189, 189, 189, 189, 189,
635 125, 125, 229, 229, 230, 231, 231, 231, 231, 231,
636 197, 239, 239, 239, 239, 239, 239, 239, 239, 553,
637 161, 74, 187, 553, 190, 190, 190, 190, 190, 191,
638 188, 188, 553, 356, 238, 238, 238, 238, 238, 238,
639 238, 238, 268, 268, 268, 268, 268, 268, 268, 268,
640 197, 74, 473, 74, 73, 161, 192, 192, 192, 192,
641 192, 192, 192, 192, 237, 466, 466, 384, 192, 192,
642 192, 192, 192, 273, 274, 275, 273, 273, 273, 273,
643 273, 325, 325, 325, 325, 325, 326, 192, 192, 192,
644 192, 192, 192, 194, 195, 196, 196, 196, 196, 196,
646 196, 197, 485, 485, 81, 198, 198, 198, 198, 198,
647 246, 246, 246, 246, 246, 246, 246, 246, 359, 359,
648 359, 359, 359, 360, 198, 198, 198, 198, 198, 198,
649 161, 201, 202, 203, 201, 201, 201, 201, 201, 204,
650 235, 161, 74, 205, 205, 205, 205, 205, 235, 161,
651 277, 277, 277, 277, 277, 277, 332, 336, 237, 504,
652 505, 74, 205, 205, 205, 205, 205, 205, 206, 206,
653 206, 206, 206, 206, 206, 206, 338, 390, 333, 337,
654 206, 206, 206, 206, 206, 281, 281, 281, 281, 281,
655 281, 281, 281, 502, 425, 161, 235, 161, 339, 192,
657 192, 192, 192, 192, 192, 187, 237, 188, 188, 188,
658 188, 188, 188, 188, 188, 553, 426, 280, 280, 280,
659 280, 280, 280, 280, 280, 301, 302, 303, 301, 301,
660 301, 301, 301, 517, 517, 74, 74, 187, 161, 188,
661 188, 188, 188, 188, 188, 188, 188, 279, 235, 161,
662 471, 436, 524, 81, 74, 553, 161, 262, 279, 263,
663 263, 263, 263, 263, 263, 279, 532, 532, 74, 235,
664 161, 236, 236, 236, 236, 236, 236, 236, 236, 237,
665 235, 161, 74, 238, 238, 238, 238, 238, 74, 313,
666 279, 314, 314, 314, 314, 314, 314, 314, 314, 402,
668 356, 443, 238, 238, 238, 238, 238, 238, 161, 242,
669 243, 244, 242, 242, 242, 242, 242, 245, 74, 475,
670 473, 246, 246, 246, 246, 246, 313, 388, 315, 315,
671 315, 315, 315, 315, 315, 315, 468, 235, 161, 412,
672 246, 246, 246, 246, 246, 246, 262, 322, 263, 263,
673 263, 263, 263, 263, 263, 263, 313, 427, 316, 316,
674 316, 316, 316, 317, 314, 314, 288, 288, 288, 288,
675 288, 288, 288, 288, 425, 356, 307, 74, 262, 428,
676 264, 264, 264, 264, 264, 264, 264, 264, 235, 161,
677 320, 320, 320, 320, 320, 320, 426, 354, 279, 324,
679 324, 324, 324, 324, 324, 324, 324, 356, 506, 74,
680 262, 354, 265, 265, 265, 265, 265, 266, 263, 263,
681 553, 402, 323, 323, 323, 323, 323, 323, 323, 323,
682 312, 312, 312, 312, 312, 312, 312, 312, 74, 74,
683 430, 74, 235, 161, 277, 277, 277, 277, 277, 277,
684 277, 277, 237, 235, 161, 278, 278, 278, 278, 278,
685 278, 278, 278, 279, 429, 74, 307, 280, 280, 280,
686 280, 280, 358, 358, 358, 358, 358, 358, 358, 358,
687 376, 376, 376, 376, 376, 377, 280, 280, 280, 280,
688 280, 280, 161, 284, 285, 286, 284, 284, 284, 284,
690 284, 287, 161, 233, 386, 288, 288, 288, 288, 288,
691 553, 279, 357, 357, 357, 357, 357, 357, 357, 357,
692 385, 553, 161, 383, 288, 288, 288, 288, 288, 288,
693 262, 322, 263, 263, 263, 263, 263, 263, 263, 263,
694 366, 367, 368, 366, 366, 366, 366, 366, 313, 161,
695 314, 314, 314, 314, 314, 314, 314, 314, 322, 382,
696 313, 74, 262, 553, 263, 263, 263, 263, 263, 263,
697 263, 263, 313, 402, 314, 314, 314, 314, 314, 314,
698 314, 314, 313, 161, 314, 314, 314, 314, 314, 314,
699 431, 81, 322, 74, 308, 309, 310, 308, 308, 308,
701 308, 308, 311, 469, 307, 233, 312, 312, 312, 312,
702 312, 331, 331, 331, 331, 331, 331, 331, 331, 405,
703 405, 405, 405, 405, 406, 312, 312, 312, 312, 312,
704 312, 235, 161, 320, 320, 320, 320, 320, 320, 320,
705 320, 279, 235, 161, 321, 321, 321, 321, 321, 321,
706 321, 321, 322, 197, 342, 341, 323, 323, 323, 323,
707 323, 235, 161, 371, 371, 371, 371, 371, 371, 427,
708 335, 322, 334, 307, 233, 323, 323, 323, 323, 323,
709 323, 161, 327, 328, 329, 327, 327, 327, 327, 327,
710 330, 428, 197, 197, 331, 331, 331, 331, 331, 375,
712 375, 375, 375, 375, 375, 375, 375, 423, 423, 423,
713 423, 423, 424, 331, 331, 331, 331, 331, 331, 347,
714 348, 348, 348, 348, 348, 348, 348, 348, 553, 255,
715 374, 374, 374, 374, 374, 374, 374, 374, 391, 392,
716 393, 394, 391, 391, 391, 391, 524, 81, 535, 74,
717 347, 349, 349, 349, 349, 349, 349, 349, 349, 534,
718 347, 348, 348, 348, 348, 348, 348, 74, 396, 397,
719 398, 396, 396, 396, 396, 396, 296, 295, 293, 74,
720 74, 347, 350, 350, 350, 350, 350, 351, 348, 348,
721 74, 365, 365, 365, 365, 365, 365, 365, 365, 404,
723 404, 404, 404, 404, 404, 404, 404, 292, 291, 290,
724 289, 74, 354, 271, 355, 355, 355, 355, 355, 355,
725 355, 355, 356, 161, 233, 197, 357, 357, 357, 357,
726 357, 553, 373, 403, 403, 403, 403, 403, 403, 403,
727 403, 267, 197, 100, 255, 357, 357, 357, 357, 357,
728 357, 361, 362, 363, 361, 361, 361, 361, 361, 364,
729 257, 255, 256, 365, 365, 365, 365, 365, 412, 354,
730 413, 413, 413, 413, 413, 413, 413, 413, 255, 402,
731 253, 252, 365, 365, 365, 365, 365, 365, 235, 161,
732 371, 371, 371, 371, 371, 371, 371, 371, 322, 235,
734 161, 372, 372, 372, 372, 372, 372, 372, 372, 373,
735 251, 250, 249, 374, 374, 374, 374, 374, 412, 354,
736 414, 414, 414, 414, 414, 414, 414, 414, 94, 452,
737 197, 233, 374, 374, 374, 374, 374, 374, 161, 378,
738 379, 380, 378, 378, 378, 378, 378, 235, 161, 197,
739 100, 381, 381, 381, 381, 381, 412, 322, 415, 415,
740 415, 415, 415, 416, 413, 413, 81, 185, 221, 218,
741 381, 381, 381, 381, 381, 381, 347, 348, 348, 348,
742 348, 348, 348, 348, 348, 235, 161, 381, 381, 381,
743 381, 381, 381, 381, 381, 373, 422, 422, 422, 422,
745 422, 422, 422, 422, 217, 216, 74, 347, 348, 348,
746 348, 348, 348, 348, 348, 348, 553, 161, 235, 161,
747 419, 419, 419, 419, 419, 419, 373, 553, 373, 421,
748 421, 421, 421, 421, 421, 421, 421, 74, 354, 215,
749 400, 400, 400, 400, 400, 400, 400, 400, 356, 354,
750 553, 401, 401, 401, 401, 401, 401, 401, 401, 402,
751 452, 214, 212, 403, 403, 403, 403, 403, 443, 161,
752 444, 444, 444, 444, 444, 444, 444, 444, 373, 211,
753 210, 209, 403, 403, 403, 403, 403, 403, 407, 408,
754 409, 407, 407, 407, 407, 407, 410, 208, 207, 100,
756 411, 411, 411, 411, 411, 443, 354, 445, 445, 445,
757 445, 445, 445, 445, 445, 92, 452, 153, 81, 411,
758 411, 411, 411, 411, 411, 235, 161, 419, 419, 419,
759 419, 419, 419, 419, 419, 373, 235, 161, 420, 420,
760 420, 420, 420, 420, 420, 420, 81, 235, 161, 74,
761 421, 421, 421, 421, 421, 434, 443, 373, 446, 446,
762 446, 446, 446, 447, 444, 444, 480, 480, 480, 421,
763 421, 421, 421, 421, 421, 434, 185, 434, 435, 411,
764 411, 411, 411, 411, 411, 411, 411, 454, 454, 454,
765 454, 454, 454, 454, 454, 74, 74, 436, 142, 437,
767 437, 437, 437, 437, 437, 437, 437, 455, 455, 455,
768 455, 455, 456, 553, 354, 453, 453, 453, 453, 453,
769 453, 453, 453, 143, 488, 137, 137, 129, 74, 436,
770 183, 438, 438, 438, 438, 438, 438, 438, 438, 462,
771 463, 464, 462, 462, 462, 462, 462, 412, 553, 413,
772 413, 413, 413, 413, 413, 413, 413, 122, 488, 176,
773 74, 436, 354, 439, 439, 439, 439, 439, 440, 441,
774 441, 412, 488, 413, 413, 413, 413, 413, 413, 413,
775 413, 412, 175, 413, 413, 413, 413, 413, 413, 434,
776 174, 173, 74, 436, 172, 442, 442, 442, 437, 437,
778 437, 437, 437, 491, 491, 491, 491, 491, 492, 434,
779 170, 434, 434, 169, 165, 100, 436, 73, 480, 480,
780 480, 100, 154, 88, 74, 354, 153, 450, 450, 450,
781 450, 450, 450, 450, 450, 402, 354, 81, 451, 451,
782 451, 451, 451, 451, 451, 451, 452, 74, 148, 149,
783 453, 453, 453, 453, 453, 476, 477, 478, 476, 476,
784 476, 476, 476, 522, 522, 522, 522, 522, 523, 453,
785 453, 453, 453, 453, 453, 457, 458, 459, 457, 457,
786 457, 457, 457, 460, 74, 76, 75, 461, 461, 461,
787 461, 461, 481, 482, 483, 481, 481, 481, 481, 481,
789 540, 540, 540, 540, 540, 540, 461, 461, 461, 461,
790 461, 461, 235, 161, 467, 467, 467, 467, 467, 467,
791 467, 467, 436, 74, 441, 441, 441, 441, 441, 441,
792 441, 441, 443, 143, 444, 444, 444, 444, 444, 444,
793 444, 444, 443, 137, 444, 444, 444, 444, 444, 444,
794 444, 444, 129, 74, 436, 122, 441, 441, 441, 441,
795 441, 441, 441, 441, 443, 121, 444, 444, 444, 444,
796 444, 444, 461, 461, 461, 461, 461, 461, 461, 461,
797 120, 119, 118, 117, 106, 74, 436, 105, 441, 441,
798 441, 441, 441, 441, 479, 479, 490, 490, 490, 490,
800 490, 490, 490, 490, 553, 104, 489, 489, 489, 489,
801 489, 489, 489, 489, 103, 100, 88, 74, 436, 76,
802 479, 479, 479, 479, 479, 479, 479, 479, 161, 497,
803 497, 497, 497, 497, 497, 497, 497, 161, 498, 498,
804 498, 498, 498, 498, 498, 498, 75, 74, 553, 74,
805 354, 553, 486, 486, 486, 486, 486, 486, 486, 486,
806 452, 354, 553, 487, 487, 487, 487, 487, 487, 487,
807 487, 488, 553, 553, 553, 489, 489, 489, 489, 489,
808 161, 499, 499, 499, 499, 499, 500, 497, 497, 553,
809 553, 553, 553, 553, 489, 489, 489, 489, 489, 489,
811 493, 494, 495, 493, 493, 493, 493, 493, 553, 553,
812 553, 553, 496, 496, 496, 496, 496, 472, 553, 472,
813 553, 472, 553, 472, 472, 553, 553, 472, 553, 553,
814 553, 496, 496, 496, 496, 496, 496, 553, 553, 472,
815 472, 472, 474, 553, 474, 553, 474, 553, 474, 474,
816 553, 553, 474, 479, 479, 479, 479, 479, 479, 479,
817 479, 553, 553, 553, 474, 474, 474, 506, 553, 507,
818 507, 507, 507, 507, 507, 507, 507, 553, 553, 553,
819 553, 511, 74, 512, 512, 512, 512, 512, 512, 512,
820 512, 161, 497, 497, 497, 497, 497, 497, 74, 506,
822 553, 508, 508, 508, 508, 508, 508, 508, 508, 511,
823 553, 513, 513, 513, 513, 513, 513, 513, 513, 511,
824 553, 514, 514, 514, 514, 514, 515, 512, 512, 553,
825 74, 506, 553, 509, 509, 509, 509, 509, 510, 507,
826 507, 496, 496, 496, 496, 496, 496, 496, 496, 521,
827 521, 521, 521, 521, 521, 521, 521, 553, 553, 553,
828 553, 553, 74, 354, 553, 518, 518, 518, 518, 518,
829 518, 518, 518, 488, 354, 553, 519, 519, 519, 519,
830 519, 519, 519, 519, 553, 553, 553, 553, 520, 520,
831 520, 520, 520, 553, 553, 520, 520, 520, 520, 520,
833 520, 520, 520, 553, 553, 553, 553, 520, 520, 520,
834 520, 520, 520, 161, 497, 497, 497, 497, 497, 497,
835 497, 497, 161, 497, 497, 497, 497, 497, 497, 497,
836 497, 525, 526, 527, 525, 525, 525, 525, 525, 553,
837 506, 553, 507, 507, 507, 507, 507, 507, 528, 529,
838 530, 528, 528, 528, 528, 528, 553, 553, 553, 553,
839 74, 506, 553, 507, 507, 507, 507, 507, 507, 507,
840 507, 74, 511, 553, 512, 512, 512, 512, 512, 512,
841 512, 512, 511, 553, 512, 512, 512, 512, 512, 512,
842 512, 512, 74, 506, 553, 507, 507, 507, 507, 507,
844 507, 507, 507, 511, 553, 512, 512, 512, 512, 512,
845 512, 354, 553, 533, 533, 533, 533, 533, 533, 533,
846 533, 553, 553, 553, 74, 535, 553, 536, 536, 536,
847 536, 536, 536, 536, 536, 540, 540, 540, 540, 540,
848 540, 540, 540, 541, 541, 541, 541, 541, 541, 541,
849 541, 553, 553, 553, 553, 553, 74, 535, 553, 537,
850 537, 537, 537, 537, 537, 537, 537, 542, 542, 542,
851 542, 542, 543, 540, 540, 547, 548, 549, 547, 547,
852 547, 547, 547, 553, 553, 553, 553, 553, 74, 535,
853 553, 538, 538, 538, 538, 538, 539, 536, 536, 553,
855 553, 553, 553, 535, 74, 536, 536, 536, 536, 536,
856 536, 540, 540, 540, 540, 540, 540, 540, 540, 553,
857 74, 535, 553, 536, 536, 536, 536, 536, 536, 536,
858 536, 553, 553, 553, 74, 540, 540, 540, 540, 540,
859 540, 540, 540, 550, 550, 550, 550, 550, 550, 550,
860 550, 553, 74, 535, 553, 536, 536, 536, 536, 536,
861 536, 536, 536, 547, 547, 547, 547, 547, 547, 547,
862 547, 553, 74, 551, 551, 551, 551, 551, 552, 550,
863 550, 553, 553, 553, 74, 550, 550, 550, 550, 550,
864 550, 553, 74, 550, 550, 550, 550, 550, 550, 550,
866 550, 553, 74, 553, 553, 553, 553, 553, 553, 553,
867 553, 553, 553, 553, 74, 553, 553, 553, 553, 553,
868 553, 553, 74, 52, 52, 52, 52, 52, 52, 52,
869 52, 52, 52, 52, 52, 52, 31, 31, 31, 31,
870 31, 31, 31, 31, 31, 31, 31, 31, 31, 61,
871 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
872 61, 61, 68, 68, 68, 68, 68, 68, 68, 68,
873 68, 68, 68, 68, 68, 73, 553, 553, 553, 73,
874 553, 73, 73, 73, 553, 73, 73, 73, 77, 77,
875 553, 77, 77, 77, 77, 77, 77, 77, 77, 77,
877 77, 80, 80, 80, 80, 80, 80, 80, 80, 80,
878 80, 80, 80, 80, 84, 553, 553, 553, 84, 553,
879 84, 84, 84, 84, 84, 84, 84, 87, 553, 553,
880 553, 87, 553, 87, 87, 87, 553, 87, 87, 87,
881 89, 553, 553, 89, 89, 553, 89, 89, 89, 553,
882 89, 89, 89, 99, 99, 553, 553, 99, 124, 553,
883 553, 124, 124, 553, 124, 124, 124, 553, 124, 124,
884 124, 128, 553, 553, 128, 128, 128, 128, 128, 128,
885 553, 553, 128, 128, 135, 135, 136, 553, 553, 136,
886 553, 553, 136, 136, 136, 136, 136, 136, 136, 140,
888 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
889 140, 140, 142, 142, 553, 142, 553, 142, 142, 142,
890 142, 142, 142, 142, 142, 78, 78, 553, 78, 78,
891 78, 78, 78, 78, 78, 78, 78, 78, 150, 150,
892 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
893 150, 151, 151, 553, 151, 151, 151, 151, 151, 151,
894 151, 151, 151, 151, 152, 553, 553, 553, 152, 553,
895 152, 152, 152, 553, 152, 152, 152, 90, 553, 553,
896 90, 90, 553, 90, 90, 90, 553, 90, 90, 90,
897 160, 160, 553, 553, 160, 162, 162, 162, 553, 553,
899 162, 125, 553, 553, 125, 125, 553, 125, 125, 125,
900 553, 125, 125, 125, 186, 186, 186, 186, 186, 186,
901 186, 186, 186, 186, 186, 186, 186, 193, 193, 553,
902 553, 193, 199, 199, 199, 553, 553, 199, 227, 227,
903 553, 553, 227, 228, 228, 553, 553, 228, 232, 232,
904 553, 553, 232, 234, 234, 234, 553, 553, 234, 267,
905 267, 553, 553, 267, 269, 269, 553, 553, 269, 270,
906 270, 553, 553, 270, 272, 272, 272, 553, 553, 272,
907 276, 276, 276, 276, 553, 553, 276, 304, 304, 553,
908 553, 304, 305, 305, 553, 553, 305, 306, 306, 553,
910 553, 306, 318, 318, 318, 553, 553, 318, 319, 319,
911 319, 319, 553, 553, 319, 352, 352, 553, 553, 352,
912 353, 353, 553, 553, 353, 369, 369, 369, 553, 553,
913 369, 370, 370, 370, 370, 553, 553, 370, 395, 395,
914 553, 553, 395, 399, 553, 399, 399, 553, 553, 399,
915 417, 417, 417, 553, 553, 417, 418, 418, 418, 418,
916 553, 553, 418, 448, 448, 553, 553, 448, 449, 553,
917 449, 449, 553, 553, 449, 465, 465, 465, 553, 553,
918 465, 466, 466, 466, 553, 553, 553, 466, 472, 553,
919 553, 553, 472, 553, 472, 472, 472, 553, 472, 472,
921 472, 474, 553, 553, 553, 474, 553, 474, 474, 474,
922 553, 474, 474, 474, 484, 484, 553, 553, 484, 485,
923 553, 485, 485, 553, 553, 485, 501, 501, 553, 553,
924 553, 501, 503, 503, 503, 503, 503, 503, 503, 503,
925 503, 503, 503, 503, 503, 516, 516, 553, 553, 516,
926 517, 553, 517, 517, 553, 553, 517, 531, 531, 553,
927 553, 531, 532, 553, 532, 553, 553, 553, 532, 544,
928 553, 553, 553, 544, 545, 545, 545, 545, 545, 545,
929 545, 545, 545, 545, 545, 545, 545, 13, 553, 553,
930 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
932 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
933 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
934 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
935 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
936 553, 553, 553, 553, 553, 553, 553, 553, 553, 553
939 static yyconst short int yy_chk[3551] =
941 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
942 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
943 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
944 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
945 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
946 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
947 1, 1, 2, 3, 4, 116, 2, 3, 4, 550,
948 5, 5, 5, 119, 5, 20, 3, 4, 59, 59,
949 5, 11, 11, 11, 11, 6, 6, 6, 119, 6,
950 2, 2, 5, 5, 2, 6, 20, 84, 2, 40,
952 51, 2, 12, 12, 12, 12, 63, 6, 6, 70,
953 25, 67, 67, 5, 25, 25, 40, 51, 84, 116,
954 109, 3, 4, 65, 11, 109, 63, 69, 6, 7,
955 7, 7, 25, 7, 27, 27, 27, 27, 27, 27,
956 27, 27, 121, 65, 432, 12, 72, 72, 121, 72,
957 70, 25, 28, 28, 28, 28, 28, 28, 39, 117,
958 39, 39, 39, 39, 39, 39, 39, 39, 41, 348,
959 69, 117, 7, 7, 7, 7, 7, 7, 7, 7,
960 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
961 8, 8, 8, 100, 8, 432, 41, 41, 127, 348,
963 41, 178, 100, 127, 41, 49, 178, 41, 49, 49,
964 49, 49, 49, 49, 49, 49, 82, 82, 82, 82,
965 82, 82, 82, 82, 83, 83, 83, 83, 83, 83,
966 83, 83, 118, 8, 8, 8, 8, 8, 8, 8,
967 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
968 8, 9, 9, 9, 9, 9, 120, 130, 130, 50,
969 9, 9, 9, 50, 50, 57, 57, 57, 120, 57,
970 118, 104, 144, 57, 9, 57, 104, 222, 104, 89,
971 171, 50, 162, 89, 89, 134, 134, 57, 57, 146,
972 146, 162, 222, 171, 9, 10, 10, 10, 10, 10,
974 50, 89, 182, 145, 10, 10, 10, 74, 57, 74,
975 181, 74, 181, 74, 74, 144, 182, 74, 10, 177,
976 89, 96, 96, 96, 96, 96, 96, 96, 96, 74,
977 74, 74, 98, 98, 98, 98, 98, 98, 10, 18,
978 184, 18, 18, 18, 145, 18, 18, 545, 86, 18,
979 86, 180, 86, 184, 86, 86, 110, 199, 86, 534,
980 192, 18, 18, 18, 124, 177, 199, 180, 124, 124,
981 259, 86, 86, 97, 97, 97, 97, 97, 97, 97,
982 97, 192, 18, 19, 110, 110, 124, 259, 110, 258,
983 107, 107, 110, 19, 207, 110, 19, 19, 19, 19,
985 19, 19, 19, 19, 26, 124, 26, 26, 26, 26,
986 26, 26, 26, 26, 26, 188, 207, 213, 26, 26,
987 26, 26, 26, 213, 260, 92, 92, 92, 92, 92,
988 92, 92, 92, 107, 260, 26, 263, 26, 26, 26,
989 26, 26, 26, 32, 220, 220, 188, 32, 258, 32,
990 360, 360, 32, 32, 92, 32, 32, 32, 32, 32,
991 32, 32, 32, 32, 32, 32, 32, 263, 533, 32,
992 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
993 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
994 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
996 32, 32, 32, 32, 32, 34, 34, 34, 34, 34,
997 34, 34, 34, 34, 196, 196, 196, 34, 34, 34,
998 34, 34, 123, 123, 123, 123, 123, 123, 123, 123,
999 254, 299, 531, 141, 141, 254, 34, 34, 34, 34,
1000 34, 34, 38, 38, 38, 219, 38, 299, 38, 38,
1001 223, 88, 38, 88, 234, 88, 223, 88, 88, 236,
1002 236, 88, 520, 234, 38, 38, 38, 42, 137, 236,
1003 519, 137, 137, 88, 88, 88, 141, 42, 137, 221,
1004 42, 42, 42, 42, 42, 42, 42, 42, 91, 517,
1005 91, 137, 91, 343, 91, 91, 516, 219, 91, 126,
1007 221, 126, 247, 126, 154, 126, 126, 512, 154, 126,
1008 91, 91, 91, 345, 154, 238, 238, 221, 42, 58,
1009 298, 126, 126, 126, 247, 238, 154, 154, 345, 58,
1010 298, 503, 58, 58, 58, 58, 58, 58, 58, 58,
1011 77, 343, 77, 77, 77, 289, 77, 77, 501, 292,
1012 77, 133, 133, 133, 133, 133, 133, 133, 133, 272,
1013 261, 497, 77, 77, 77, 261, 276, 289, 272, 294,
1014 153, 292, 153, 293, 153, 276, 153, 153, 294, 388,
1015 153, 388, 297, 77, 93, 93, 93, 93, 93, 93,
1016 93, 93, 153, 153, 153, 293, 93, 93, 93, 93,
1018 93, 187, 187, 187, 187, 187, 187, 187, 187, 203,
1019 203, 203, 203, 203, 203, 93, 93, 93, 93, 93,
1020 93, 101, 101, 101, 101, 101, 101, 101, 101, 297,
1021 187, 387, 387, 101, 101, 101, 101, 101, 191, 485,
1022 191, 191, 191, 191, 191, 191, 244, 244, 244, 244,
1023 244, 244, 101, 101, 101, 101, 101, 101, 155, 300,
1024 155, 155, 155, 155, 155, 155, 155, 155, 300, 191,
1025 200, 200, 200, 200, 200, 200, 200, 200, 183, 387,
1026 484, 355, 183, 406, 406, 420, 420, 474, 183, 155,
1027 156, 355, 156, 156, 156, 156, 156, 156, 156, 156,
1029 183, 183, 195, 195, 195, 195, 195, 195, 195, 195,
1030 195, 202, 202, 202, 202, 202, 202, 202, 202, 421,
1031 421, 156, 157, 357, 157, 157, 157, 157, 157, 157,
1032 157, 157, 205, 357, 205, 205, 205, 205, 205, 205,
1033 205, 205, 229, 229, 229, 229, 229, 229, 229, 229,
1034 229, 340, 472, 157, 158, 318, 158, 158, 158, 158,
1035 158, 158, 158, 158, 318, 424, 424, 340, 158, 158,
1036 158, 158, 158, 235, 235, 235, 235, 235, 235, 235,
1037 235, 286, 286, 286, 286, 286, 286, 158, 158, 158,
1038 158, 158, 158, 161, 161, 161, 161, 161, 161, 161,
1040 161, 161, 456, 456, 470, 161, 161, 161, 161, 161,
1041 237, 237, 237, 237, 237, 237, 237, 237, 310, 310,
1042 310, 310, 310, 310, 161, 161, 161, 161, 161, 161,
1043 163, 163, 163, 163, 163, 163, 163, 163, 163, 163,
1044 467, 467, 471, 163, 163, 163, 163, 163, 241, 241,
1045 241, 241, 241, 241, 241, 241, 332, 336, 241, 469,
1046 470, 346, 163, 163, 163, 163, 163, 163, 164, 164,
1047 164, 164, 164, 164, 164, 164, 338, 346, 332, 336,
1048 164, 164, 164, 164, 164, 243, 243, 243, 243, 243,
1049 243, 243, 243, 468, 382, 466, 277, 277, 338, 164,
1051 164, 164, 164, 164, 164, 189, 277, 189, 189, 189,
1052 189, 189, 189, 189, 189, 246, 382, 246, 246, 246,
1053 246, 246, 246, 246, 246, 262, 262, 262, 262, 262,
1054 262, 262, 262, 492, 492, 433, 189, 190, 319, 190,
1055 190, 190, 190, 190, 190, 190, 190, 319, 278, 278,
1056 433, 437, 505, 505, 262, 280, 280, 266, 278, 266,
1057 266, 266, 266, 266, 266, 280, 523, 523, 190, 201,
1058 201, 201, 201, 201, 201, 201, 201, 201, 201, 201,
1059 320, 320, 437, 201, 201, 201, 201, 201, 266, 273,
1060 320, 273, 273, 273, 273, 273, 273, 273, 273, 449,
1062 448, 444, 201, 201, 201, 201, 201, 201, 204, 204,
1063 204, 204, 204, 204, 204, 204, 204, 204, 344, 435,
1064 434, 204, 204, 204, 204, 204, 274, 344, 274, 274,
1065 274, 274, 274, 274, 274, 274, 429, 321, 321, 413,
1066 204, 204, 204, 204, 204, 204, 224, 321, 224, 224,
1067 224, 224, 224, 224, 224, 224, 275, 383, 275, 275,
1068 275, 275, 275, 275, 275, 275, 279, 279, 279, 279,
1069 279, 279, 279, 279, 425, 399, 395, 224, 225, 383,
1070 225, 225, 225, 225, 225, 225, 225, 225, 283, 283,
1071 283, 283, 283, 283, 283, 283, 425, 400, 283, 285,
1073 285, 285, 285, 285, 285, 285, 285, 400, 507, 225,
1074 226, 401, 226, 226, 226, 226, 226, 226, 226, 226,
1075 288, 401, 288, 288, 288, 288, 288, 288, 288, 288,
1076 307, 307, 307, 307, 307, 307, 307, 307, 390, 507,
1077 386, 226, 239, 239, 239, 239, 239, 239, 239, 239,
1078 239, 239, 239, 242, 242, 242, 242, 242, 242, 242,
1079 242, 242, 242, 242, 385, 384, 353, 242, 242, 242,
1080 242, 242, 309, 309, 309, 309, 309, 309, 309, 309,
1081 329, 329, 329, 329, 329, 329, 242, 242, 242, 242,
1082 242, 242, 245, 245, 245, 245, 245, 245, 245, 245,
1084 245, 245, 369, 352, 342, 245, 245, 245, 245, 245,
1085 312, 369, 312, 312, 312, 312, 312, 312, 312, 312,
1086 341, 323, 323, 335, 245, 245, 245, 245, 245, 245,
1087 264, 323, 264, 264, 264, 264, 264, 264, 264, 264,
1088 313, 313, 313, 313, 313, 313, 313, 313, 315, 370,
1089 315, 315, 315, 315, 315, 315, 315, 315, 370, 334,
1090 314, 264, 265, 403, 265, 265, 265, 265, 265, 265,
1091 265, 265, 316, 403, 316, 316, 316, 316, 316, 316,
1092 316, 316, 317, 417, 317, 317, 317, 317, 317, 317,
1093 431, 431, 417, 265, 271, 271, 271, 271, 271, 271,
1095 271, 271, 271, 431, 306, 305, 271, 271, 271, 271,
1096 271, 322, 322, 322, 322, 322, 322, 322, 322, 363,
1097 363, 363, 363, 363, 363, 271, 271, 271, 271, 271,
1098 271, 281, 281, 281, 281, 281, 281, 281, 281, 281,
1099 281, 281, 284, 284, 284, 284, 284, 284, 284, 284,
1100 284, 284, 284, 304, 296, 295, 284, 284, 284, 284,
1101 284, 326, 326, 326, 326, 326, 326, 326, 326, 427,
1102 291, 326, 290, 270, 269, 284, 284, 284, 284, 284,
1103 284, 287, 287, 287, 287, 287, 287, 287, 287, 287,
1104 287, 427, 268, 267, 287, 287, 287, 287, 287, 328,
1106 328, 328, 328, 328, 328, 328, 328, 380, 380, 380,
1107 380, 380, 380, 287, 287, 287, 287, 287, 287, 301,
1108 301, 301, 301, 301, 301, 301, 301, 301, 331, 257,
1109 331, 331, 331, 331, 331, 331, 331, 331, 347, 347,
1110 347, 347, 347, 347, 347, 347, 524, 524, 536, 301,
1111 302, 302, 302, 302, 302, 302, 302, 302, 302, 524,
1112 351, 351, 351, 351, 351, 351, 351, 347, 354, 354,
1113 354, 354, 354, 354, 354, 354, 256, 255, 253, 536,
1114 302, 303, 303, 303, 303, 303, 303, 303, 303, 303,
1115 351, 356, 356, 356, 356, 356, 356, 356, 356, 362,
1117 362, 362, 362, 362, 362, 362, 362, 252, 251, 250,
1118 249, 303, 308, 233, 308, 308, 308, 308, 308, 308,
1119 308, 308, 308, 418, 232, 231, 308, 308, 308, 308,
1120 308, 365, 418, 365, 365, 365, 365, 365, 365, 365,
1121 365, 230, 228, 227, 218, 308, 308, 308, 308, 308,
1122 308, 311, 311, 311, 311, 311, 311, 311, 311, 311,
1123 217, 216, 215, 311, 311, 311, 311, 311, 366, 450,
1124 366, 366, 366, 366, 366, 366, 366, 366, 214, 450,
1125 212, 211, 311, 311, 311, 311, 311, 311, 324, 324,
1126 324, 324, 324, 324, 324, 324, 324, 324, 324, 327,
1128 327, 327, 327, 327, 327, 327, 327, 327, 327, 327,
1129 210, 209, 208, 327, 327, 327, 327, 327, 367, 451,
1130 367, 367, 367, 367, 367, 367, 367, 367, 206, 451,
1131 198, 197, 327, 327, 327, 327, 327, 327, 330, 330,
1132 330, 330, 330, 330, 330, 330, 330, 371, 371, 194,
1133 193, 330, 330, 330, 330, 330, 368, 371, 368, 368,
1134 368, 368, 368, 368, 368, 368, 186, 185, 179, 176,
1135 330, 330, 330, 330, 330, 330, 349, 349, 349, 349,
1136 349, 349, 349, 349, 349, 372, 372, 373, 373, 373,
1137 373, 373, 373, 373, 373, 372, 379, 379, 379, 379,
1139 379, 379, 379, 379, 175, 174, 349, 350, 350, 350,
1140 350, 350, 350, 350, 350, 350, 374, 374, 377, 377,
1141 377, 377, 377, 377, 377, 377, 374, 381, 377, 381,
1142 381, 381, 381, 381, 381, 381, 381, 350, 358, 173,
1143 358, 358, 358, 358, 358, 358, 358, 358, 358, 361,
1144 453, 361, 361, 361, 361, 361, 361, 361, 361, 361,
1145 453, 172, 170, 361, 361, 361, 361, 361, 396, 465,
1146 396, 396, 396, 396, 396, 396, 396, 396, 465, 169,
1147 168, 167, 361, 361, 361, 361, 361, 361, 364, 364,
1148 364, 364, 364, 364, 364, 364, 364, 166, 165, 160,
1150 364, 364, 364, 364, 364, 397, 486, 397, 397, 397,
1151 397, 397, 397, 397, 397, 159, 486, 152, 151, 364,
1152 364, 364, 364, 364, 364, 375, 375, 375, 375, 375,
1153 375, 375, 375, 375, 375, 375, 378, 378, 378, 378,
1154 378, 378, 378, 378, 378, 378, 150, 419, 419, 148,
1155 378, 378, 378, 378, 378, 389, 398, 419, 398, 398,
1156 398, 398, 398, 398, 398, 398, 480, 480, 480, 378,
1157 378, 378, 378, 378, 378, 389, 147, 389, 389, 402,
1158 402, 402, 402, 402, 402, 402, 402, 408, 408, 408,
1159 408, 408, 408, 408, 408, 480, 389, 391, 143, 391,
1161 391, 391, 391, 391, 391, 391, 391, 409, 409, 409,
1162 409, 409, 409, 411, 487, 411, 411, 411, 411, 411,
1163 411, 411, 411, 142, 487, 140, 136, 129, 391, 392,
1164 125, 392, 392, 392, 392, 392, 392, 392, 392, 412,
1165 412, 412, 412, 412, 412, 412, 412, 414, 489, 414,
1166 414, 414, 414, 414, 414, 414, 414, 122, 489, 115,
1167 392, 393, 518, 393, 393, 393, 393, 393, 393, 393,
1168 393, 415, 518, 415, 415, 415, 415, 415, 415, 415,
1169 415, 416, 114, 416, 416, 416, 416, 416, 416, 430,
1170 113, 112, 393, 394, 111, 394, 394, 394, 394, 394,
1172 394, 394, 394, 459, 459, 459, 459, 459, 459, 430,
1173 106, 430, 430, 105, 103, 99, 442, 95, 442, 442,
1174 442, 94, 90, 87, 394, 404, 85, 404, 404, 404,
1175 404, 404, 404, 404, 404, 404, 407, 80, 407, 407,
1176 407, 407, 407, 407, 407, 407, 407, 442, 79, 78,
1177 407, 407, 407, 407, 407, 436, 436, 436, 436, 436,
1178 436, 436, 436, 495, 495, 495, 495, 495, 495, 407,
1179 407, 407, 407, 407, 407, 410, 410, 410, 410, 410,
1180 410, 410, 410, 410, 436, 76, 75, 410, 410, 410,
1181 410, 410, 443, 443, 443, 443, 443, 443, 443, 443,
1183 543, 543, 543, 543, 543, 543, 410, 410, 410, 410,
1184 410, 410, 422, 422, 422, 422, 422, 422, 422, 422,
1185 422, 422, 438, 73, 438, 438, 438, 438, 438, 438,
1186 438, 438, 445, 68, 445, 445, 445, 445, 445, 445,
1187 445, 445, 446, 61, 446, 446, 446, 446, 446, 446,
1188 446, 446, 54, 438, 439, 48, 439, 439, 439, 439,
1189 439, 439, 439, 439, 447, 47, 447, 447, 447, 447,
1190 447, 447, 452, 452, 452, 452, 452, 452, 452, 452,
1191 46, 45, 44, 43, 37, 439, 440, 36, 440, 440,
1192 440, 440, 440, 440, 440, 440, 458, 458, 458, 458,
1194 458, 458, 458, 458, 461, 35, 461, 461, 461, 461,
1195 461, 461, 461, 461, 33, 29, 23, 440, 441, 17,
1196 441, 441, 441, 441, 441, 441, 441, 441, 462, 462,
1197 462, 462, 462, 462, 462, 462, 462, 463, 463, 463,
1198 463, 463, 463, 463, 463, 463, 15, 14, 13, 441,
1199 454, 0, 454, 454, 454, 454, 454, 454, 454, 454,
1200 454, 457, 0, 457, 457, 457, 457, 457, 457, 457,
1201 457, 457, 0, 0, 0, 457, 457, 457, 457, 457,
1202 464, 464, 464, 464, 464, 464, 464, 464, 464, 0,
1203 0, 0, 0, 0, 457, 457, 457, 457, 457, 457,
1205 460, 460, 460, 460, 460, 460, 460, 460, 0, 0,
1206 0, 0, 460, 460, 460, 460, 460, 473, 0, 473,
1207 0, 473, 0, 473, 473, 0, 0, 473, 0, 0,
1208 0, 460, 460, 460, 460, 460, 460, 0, 0, 473,
1209 473, 473, 475, 0, 475, 0, 475, 0, 475, 475,
1210 0, 0, 475, 479, 479, 479, 479, 479, 479, 479,
1211 479, 0, 0, 0, 475, 475, 475, 476, 0, 476,
1212 476, 476, 476, 476, 476, 476, 476, 0, 0, 0,
1213 0, 481, 479, 481, 481, 481, 481, 481, 481, 481,
1214 481, 500, 500, 500, 500, 500, 500, 500, 476, 477,
1216 0, 477, 477, 477, 477, 477, 477, 477, 477, 482,
1217 0, 482, 482, 482, 482, 482, 482, 482, 482, 483,
1218 0, 483, 483, 483, 483, 483, 483, 483, 483, 0,
1219 477, 478, 0, 478, 478, 478, 478, 478, 478, 478,
1220 478, 488, 488, 488, 488, 488, 488, 488, 488, 494,
1221 494, 494, 494, 494, 494, 494, 494, 0, 0, 0,
1222 0, 0, 478, 490, 0, 490, 490, 490, 490, 490,
1223 490, 490, 490, 490, 493, 0, 493, 493, 493, 493,
1224 493, 493, 493, 493, 0, 0, 0, 0, 493, 493,
1225 493, 493, 493, 496, 0, 496, 496, 496, 496, 496,
1227 496, 496, 496, 0, 0, 0, 0, 493, 493, 493,
1228 493, 493, 493, 498, 498, 498, 498, 498, 498, 498,
1229 498, 498, 499, 499, 499, 499, 499, 499, 499, 499,
1230 499, 506, 506, 506, 506, 506, 506, 506, 506, 0,
1231 510, 0, 510, 510, 510, 510, 510, 510, 511, 511,
1232 511, 511, 511, 511, 511, 511, 0, 0, 0, 0,
1233 506, 508, 0, 508, 508, 508, 508, 508, 508, 508,
1234 508, 510, 513, 0, 513, 513, 513, 513, 513, 513,
1235 513, 513, 514, 0, 514, 514, 514, 514, 514, 514,
1236 514, 514, 508, 509, 0, 509, 509, 509, 509, 509,
1238 509, 509, 509, 515, 0, 515, 515, 515, 515, 515,
1239 515, 521, 0, 521, 521, 521, 521, 521, 521, 521,
1240 521, 0, 0, 0, 509, 525, 0, 525, 525, 525,
1241 525, 525, 525, 525, 525, 528, 528, 528, 528, 528,
1242 528, 528, 528, 529, 529, 529, 529, 529, 529, 529,
1243 529, 0, 0, 0, 0, 0, 525, 526, 0, 526,
1244 526, 526, 526, 526, 526, 526, 526, 530, 530, 530,
1245 530, 530, 530, 530, 530, 535, 535, 535, 535, 535,
1246 535, 535, 535, 0, 0, 0, 0, 0, 526, 527,
1247 0, 527, 527, 527, 527, 527, 527, 527, 527, 0,
1249 0, 0, 0, 539, 535, 539, 539, 539, 539, 539,
1250 539, 541, 541, 541, 541, 541, 541, 541, 541, 0,
1251 527, 537, 0, 537, 537, 537, 537, 537, 537, 537,
1252 537, 0, 0, 0, 539, 542, 542, 542, 542, 542,
1253 542, 542, 542, 547, 547, 547, 547, 547, 547, 547,
1254 547, 0, 537, 538, 0, 538, 538, 538, 538, 538,
1255 538, 538, 538, 548, 548, 548, 548, 548, 548, 548,
1256 548, 0, 547, 549, 549, 549, 549, 549, 549, 549,
1257 549, 0, 0, 0, 538, 552, 552, 552, 552, 552,
1258 552, 0, 548, 551, 551, 551, 551, 551, 551, 551,
1260 551, 0, 549, 0, 0, 0, 0, 0, 0, 0,
1261 0, 0, 0, 0, 552, 0, 0, 0, 0, 0,
1262 0, 0, 551, 554, 554, 554, 554, 554, 554, 554,
1263 554, 554, 554, 554, 554, 554, 555, 555, 555, 555,
1264 555, 555, 555, 555, 555, 555, 555, 555, 555, 556,
1265 556, 556, 556, 556, 556, 556, 556, 556, 556, 556,
1266 556, 556, 557, 557, 557, 557, 557, 557, 557, 557,
1267 557, 557, 557, 557, 557, 558, 0, 0, 0, 558,
1268 0, 558, 558, 558, 0, 558, 558, 558, 559, 559,
1269 0, 559, 559, 559, 559, 559, 559, 559, 559, 559,
1271 559, 560, 560, 560, 560, 560, 560, 560, 560, 560,
1272 560, 560, 560, 560, 561, 0, 0, 0, 561, 0,
1273 561, 561, 561, 561, 561, 561, 561, 562, 0, 0,
1274 0, 562, 0, 562, 562, 562, 0, 562, 562, 562,
1275 563, 0, 0, 563, 563, 0, 563, 563, 563, 0,
1276 563, 563, 563, 564, 564, 0, 0, 564, 565, 0,
1277 0, 565, 565, 0, 565, 565, 565, 0, 565, 565,
1278 565, 566, 0, 0, 566, 566, 566, 566, 566, 566,
1279 0, 0, 566, 566, 567, 567, 568, 0, 0, 568,
1280 0, 0, 568, 568, 568, 568, 568, 568, 568, 569,
1282 569, 569, 569, 569, 569, 569, 569, 569, 569, 569,
1283 569, 569, 570, 570, 0, 570, 0, 570, 570, 570,
1284 570, 570, 570, 570, 570, 571, 571, 0, 571, 571,
1285 571, 571, 571, 571, 571, 571, 571, 571, 572, 572,
1286 572, 572, 572, 572, 572, 572, 572, 572, 572, 572,
1287 572, 573, 573, 0, 573, 573, 573, 573, 573, 573,
1288 573, 573, 573, 573, 574, 0, 0, 0, 574, 0,
1289 574, 574, 574, 0, 574, 574, 574, 575, 0, 0,
1290 575, 575, 0, 575, 575, 575, 0, 575, 575, 575,
1291 576, 576, 0, 0, 576, 577, 577, 577, 0, 0,
1293 577, 578, 0, 0, 578, 578, 0, 578, 578, 578,
1294 0, 578, 578, 578, 579, 579, 579, 579, 579, 579,
1295 579, 579, 579, 579, 579, 579, 579, 580, 580, 0,
1296 0, 580, 581, 581, 581, 0, 0, 581, 582, 582,
1297 0, 0, 582, 583, 583, 0, 0, 583, 584, 584,
1298 0, 0, 584, 585, 585, 585, 0, 0, 585, 586,
1299 586, 0, 0, 586, 587, 587, 0, 0, 587, 588,
1300 588, 0, 0, 588, 589, 589, 589, 0, 0, 589,
1301 590, 590, 590, 590, 0, 0, 590, 591, 591, 0,
1302 0, 591, 592, 592, 0, 0, 592, 593, 593, 0,
1304 0, 593, 594, 594, 594, 0, 0, 594, 595, 595,
1305 595, 595, 0, 0, 595, 596, 596, 0, 0, 596,
1306 597, 597, 0, 0, 597, 598, 598, 598, 0, 0,
1307 598, 599, 599, 599, 599, 0, 0, 599, 600, 600,
1308 0, 0, 600, 601, 0, 601, 601, 0, 0, 601,
1309 602, 602, 602, 0, 0, 602, 603, 603, 603, 603,
1310 0, 0, 603, 604, 604, 0, 0, 604, 605, 0,
1311 605, 605, 0, 0, 605, 606, 606, 606, 0, 0,
1312 606, 607, 607, 607, 0, 0, 0, 607, 608, 0,
1313 0, 0, 608, 0, 608, 608, 608, 0, 608, 608,
1315 608, 609, 0, 0, 0, 609, 0, 609, 609, 609,
1316 0, 609, 609, 609, 610, 610, 0, 0, 610, 611,
1317 0, 611, 611, 0, 0, 611, 612, 612, 0, 0,
1318 0, 612, 613, 613, 613, 613, 613, 613, 613, 613,
1319 613, 613, 613, 613, 613, 614, 614, 0, 0, 614,
1320 615, 0, 615, 615, 0, 0, 615, 616, 616, 0,
1321 0, 616, 617, 0, 617, 0, 0, 0, 617, 618,
1322 0, 0, 0, 618, 619, 619, 619, 619, 619, 619,
1323 619, 619, 619, 619, 619, 619, 619, 553, 553, 553,
1324 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
1326 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
1327 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
1328 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
1329 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
1330 553, 553, 553, 553, 553, 553, 553, 553, 553, 553
1333 static yy_state_type yy_last_accepting_state;
1334 static char *yy_last_accepting_cpos;
1336 /* The intent behind this definition is that it'll catch
1337 * any uses of REJECT which flex missed.
1339 #define REJECT reject_used_but_not_detected
1340 #define yymore() yymore_used_but_not_detected
1341 #define YY_MORE_ADJ 0
1342 #define YY_RESTORE_YY_MORE_OFFSET
1348 * Copyright (c) 1996, 1998-2005, 2007-2009
1349 * Todd C. Miller <Todd.Miller@courtesan.com>
1351 * Permission to use, copy, modify, and distribute this software for any
1352 * purpose with or without fee is hereby granted, provided that the above
1353 * copyright notice and this permission notice appear in all copies.
1355 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
1356 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
1357 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
1358 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1359 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
1360 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1361 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1362 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
1363 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
1364 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1366 * Sponsored in part by the Defense Advanced Research Projects
1367 * Agency (DARPA) and Air Force Research Laboratory, Air Force
1368 * Materiel Command, USAF, under agreement number F39502-99-1-0512.
1373 #include <sys/types.h>
1374 #include <sys/param.h>
1375 #include <sys/stat.h>
1378 # include <stdlib.h>
1379 # include <stddef.h>
1381 # ifdef HAVE_STDLIB_H
1382 # include <stdlib.h>
1384 #endif /* STDC_HEADERS */
1385 #ifdef HAVE_STRING_H
1386 # include <string.h>
1388 # ifdef HAVE_STRINGS_H
1389 # include <strings.h>
1391 #endif /* HAVE_STRING_H */
1392 #ifdef HAVE_UNISTD_H
1393 # include <unistd.h>
1394 #endif /* HAVE_UNISTD_H */
1395 #if defined(HAVE_MALLOC_H) && !defined(STDC_HEADERS)
1396 # include <malloc.h>
1397 #endif /* HAVE_MALLOC_H && !STDC_HEADERS */
1398 #ifdef HAVE_DIRENT_H
1399 # include <dirent.h>
1400 # define NAMLEN(dirent) strlen((dirent)->d_name)
1402 # define dirent direct
1403 # define NAMLEN(dirent) (dirent)->d_namlen
1404 # ifdef HAVE_SYS_NDIR_H
1405 # include <sys/ndir.h>
1407 # ifdef HAVE_SYS_DIR_H
1408 # include <sys/dir.h>
1420 __unused static const char rcsid[] = "$Sudo: toke.c,v 1.37 2009/07/18 13:55:37 millert Exp $";
1423 extern YYSTYPE yylval;
1426 static int sawspace = 0;
1427 static int arg_len = 0;
1428 static int arg_size = 0;
1430 static int append __P((char *, int));
1431 static int _fill __P((char *, int, int));
1432 static int fill_cmnd __P((char *, int));
1433 static int fill_args __P((char *, int, int));
1434 static int _push_include __P((char *, int));
1435 static int pop_include __P((void));
1436 static int ipv6_valid __P((const char *s));
1437 static char *parse_include __P((char *));
1438 extern void yyerror __P((const char *));
1440 #define fill(a, b) _fill(a, b, 0)
1442 #define push_include(_p) (_push_include((_p), FALSE))
1443 #define push_includedir(_p) (_push_include((_p), TRUE))
1445 /* realloc() to size + COMMANDARGINC to make room for command args */
1446 #define COMMANDARGINC 64
1449 #define LEXTRACE(msg) fputs(msg, stderr)
1451 #define LEXTRACE(msg)
1453 #define YY_NO_UNPUT 1
1464 #line 1465 "lex.yy.c"
1466 /* Macros after this point can all be overridden by user definitions in
1470 #ifndef YY_SKIP_YYWRAP
1472 extern "C" int yywrap YY_PROTO(( void ));
1474 extern int yywrap YY_PROTO(( void ));
1479 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
1483 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
1486 #ifdef YY_NEED_STRLEN
1487 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
1492 static int yyinput YY_PROTO(( void ));
1494 static int input YY_PROTO(( void ));
1498 #if defined(YY_STACK_USED) && YY_STACK_USED
1499 static int yy_start_stack_ptr = 0;
1500 static int yy_start_stack_depth = 0;
1501 static int *yy_start_stack = 0;
1502 #ifndef YY_NO_PUSH_STATE
1503 static void yy_push_state YY_PROTO(( int new_state ));
1505 #ifndef YY_NO_POP_STATE
1506 static void yy_pop_state YY_PROTO(( void ));
1508 #ifndef YY_NO_TOP_STATE
1509 static int yy_top_state YY_PROTO(( void ));
1513 #define YY_NO_PUSH_STATE 1
1514 #define YY_NO_POP_STATE 1
1515 #define YY_NO_TOP_STATE 1
1518 #ifdef YY_MALLOC_DECL
1526 /* Just try to get by without declaring the routines. This will fail
1527 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
1528 * or sizeof(void*) != sizeof(int).
1533 /* Amount of stuff to slurp up with each read. */
1534 #ifndef YY_READ_BUF_SIZE
1535 #define YY_READ_BUF_SIZE 8192
1538 /* Copy whatever the last rule matched to the standard output. */
1541 /* This used to be an fputs(), but since the string might contain NUL's,
1542 * we now use fwrite().
1544 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
1547 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1548 * is returned in "result".
1551 #define YY_INPUT(buf,result,max_size) \
1552 if ( yy_current_buffer->yy_is_interactive ) \
1555 for ( n = 0; n < max_size && \
1556 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1557 buf[n] = (char) c; \
1559 buf[n++] = (char) c; \
1560 if ( c == EOF && ferror( yyin ) ) \
1561 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1564 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
1565 && ferror( yyin ) ) \
1566 YY_FATAL_ERROR( "input in flex scanner failed" );
1569 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1570 * we don't want an extra ';' after the "return" because that will cause
1571 * some compilers to complain about unreachable statements.
1574 #define yyterminate() return YY_NULL
1577 /* Number of entries by which start-condition stack grows. */
1578 #ifndef YY_START_STACK_INCR
1579 #define YY_START_STACK_INCR 25
1582 /* Report a fatal error. */
1583 #ifndef YY_FATAL_ERROR
1584 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1587 /* Default declaration of generated scanner - a define so the user can
1588 * easily add parameters.
1591 #define YY_DECL int yylex YY_PROTO(( void ))
1594 /* Code executed at the beginning of each rule, after yytext and yyleng
1597 #ifndef YY_USER_ACTION
1598 #define YY_USER_ACTION
1601 /* Code executed at the end of each rule. */
1603 #define YY_BREAK break;
1606 #define YY_RULE_SETUP \
1608 yy_current_buffer->yy_at_bol = \
1609 (yytext[yyleng - 1] == '\n'); \
1614 register yy_state_type yy_current_state;
1615 register char *yy_cp, *yy_bp;
1616 register int yy_act;
1620 #line 1621 "lex.yy.c"
1631 yy_start = 1; /* first start state */
1639 if ( ! yy_current_buffer )
1641 yy_create_buffer( yyin, YY_BUF_SIZE );
1643 yy_load_buffer_state();
1646 while ( 1 ) /* loops until end-of-file is reached */
1650 /* Support of yytext. */
1651 *yy_cp = yy_hold_char;
1653 /* yy_bp points to the position in yy_ch_buf of the start of
1658 yy_current_state = yy_start;
1659 yy_current_state += YY_AT_BOL();
1663 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1664 if ( yy_accept[yy_current_state] )
1666 yy_last_accepting_state = yy_current_state;
1667 yy_last_accepting_cpos = yy_cp;
1669 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1671 yy_current_state = (int) yy_def[yy_current_state];
1672 if ( yy_current_state >= 554 )
1673 yy_c = yy_meta[(unsigned int) yy_c];
1675 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1678 while ( yy_base[yy_current_state] != 3488 );
1681 yy_act = yy_accept[yy_current_state];
1683 { /* have to back up */
1684 yy_cp = yy_last_accepting_cpos;
1685 yy_current_state = yy_last_accepting_state;
1686 yy_act = yy_accept[yy_current_state];
1689 YY_DO_BEFORE_ACTION;
1692 do_action: /* This label is used only to access EOF actions. */
1696 { /* beginning of action switch */
1697 case 0: /* must back up */
1698 /* undo the effects of YY_DO_BEFORE_ACTION */
1699 *yy_cp = yy_hold_char;
1700 yy_cp = yy_last_accepting_cpos;
1701 yy_current_state = yy_last_accepting_state;
1702 goto yy_find_action;
1714 LEXTRACE("DEFVAR ");
1715 if (!fill(yytext, yyleng))
1758 LEXTRACE("BEGINSTR ");
1759 yylval.string = NULL;
1767 LEXTRACE("WORD(2) ");
1768 if (!fill(yytext, yyleng))
1779 /* Line continuation char followed by newline. */
1788 LEXTRACE("ENDSTR ");
1797 LEXTRACE("BACKSLASH ");
1798 if (!append(yytext, yyleng))
1806 LEXTRACE("STRBODY ");
1807 if (!append(yytext, yyleng))
1817 /* quoted fnmatch glob char, pass verbatim */
1818 LEXTRACE("QUOTEDCHAR ");
1819 if (!fill_args(yytext, 2, sawspace))
1828 /* quoted sudoers special char, strip backslash */
1829 LEXTRACE("QUOTEDCHAR ");
1830 if (!fill_args(yytext + 1, 1, sawspace))
1842 } /* end of command line args */
1849 if (!fill_args(yytext, yyleng, sawspace))
1852 } /* a command line arg */
1861 if ((path = parse_include(yytext)) == NULL)
1864 LEXTRACE("INCLUDE\n");
1866 /* Push current buffer and switch to include file */
1867 if (!push_include(path))
1877 if ((path = parse_include(yytext)) == NULL)
1880 LEXTRACE("INCLUDEDIR\n");
1882 /* Push current buffer and switch to include file */
1883 if (!push_includedir(path))
1892 for (n = 0; isblank((unsigned char)yytext[n]); n++)
1896 switch (yytext[n++]) {
1899 LEXTRACE("DEFAULTS_USER ");
1900 return(DEFAULTS_USER);
1903 LEXTRACE("DEFAULTS_RUNAS ");
1904 return(DEFAULTS_RUNAS);
1907 LEXTRACE("DEFAULTS_HOST ");
1908 return(DEFAULTS_HOST);
1911 LEXTRACE("DEFAULTS_CMND ");
1912 return(DEFAULTS_CMND);
1914 LEXTRACE("DEFAULTS ");
1924 for (n = 0; isblank((unsigned char)yytext[n]); n++)
1926 switch (yytext[n]) {
1928 LEXTRACE("HOSTALIAS ");
1931 LEXTRACE("CMNDALIAS ");
1934 LEXTRACE("USERALIAS ");
1937 LEXTRACE("RUNASALIAS ");
1946 /* cmnd does not require passwd for this user */
1947 LEXTRACE("NOPASSWD ");
1955 /* cmnd requires passwd for this user */
1956 LEXTRACE("PASSWD ");
1964 LEXTRACE("NOEXEC ");
1980 LEXTRACE("SETENV ");
1988 LEXTRACE("NOSETENV ");
1997 if (!fill(yytext, yyleng))
1999 LEXTRACE("NETGROUP ");
2008 if (!fill(yytext, yyleng))
2010 LEXTRACE("USERGROUP ");
2018 if (!fill(yytext, yyleng))
2020 LEXTRACE("NTWKADDR ");
2028 if (!fill(yytext, yyleng))
2030 LEXTRACE("NTWKADDR ");
2038 if (!ipv6_valid(yytext)) {
2042 if (!fill(yytext, yyleng))
2044 LEXTRACE("NTWKADDR ");
2052 if (!ipv6_valid(yytext)) {
2056 if (!fill(yytext, yyleng))
2058 LEXTRACE("NTWKADDR ");
2066 if (strcmp(yytext, "ALL") == 0) {
2071 /* XXX - restrict type/role to initial state */
2072 if (strcmp(yytext, "TYPE") == 0) {
2076 if (strcmp(yytext, "ROLE") == 0) {
2080 #endif /* HAVE_SELINUX */
2081 if (!fill(yytext, yyleng))
2091 /* no command args allowed for Defaults!/path */
2092 if (!fill_cmnd(yytext, yyleng))
2094 LEXTRACE("COMMAND ");
2103 LEXTRACE("COMMAND ");
2104 if (!fill_cmnd(yytext, yyleng))
2112 /* directories can't have args... */
2113 if (yytext[yyleng - 1] == '/') {
2114 LEXTRACE("COMMAND ");
2115 if (!fill_cmnd(yytext, yyleng))
2120 LEXTRACE("COMMAND ");
2121 if (!fill_cmnd(yytext, yyleng))
2130 /* a quoted user/group name */
2131 if (!fill(yytext + 1, yyleng - 2))
2133 switch (yytext[1]) {
2135 LEXTRACE("USERGROUP ");
2138 LEXTRACE("NETGROUP ");
2141 LEXTRACE("WORD(4) ");
2151 if (!fill(yytext, yyleng))
2153 LEXTRACE("WORD(5) ");
2201 if (yyleng % 2 == 1)
2202 return('!'); /* return '!' */
2213 } /* return newline */
2218 { /* throw away space/tabs */
2219 sawspace = TRUE; /* but remember for fill_args */
2226 sawspace = TRUE; /* remember for fill_args */
2229 } /* throw away EOL after \ */
2239 } /* comment, not uid/gid */
2249 case YY_STATE_EOF(INITIAL):
2250 case YY_STATE_EOF(GOTDEFS):
2251 case YY_STATE_EOF(GOTCMND):
2252 case YY_STATE_EOF(STARTDEFS):
2253 case YY_STATE_EOF(INDEFS):
2254 case YY_STATE_EOF(INSTR):
2257 if (YY_START != INITIAL) {
2271 #line 2272 "lex.yy.c"
2273 case YY_END_OF_BUFFER:
2275 /* Amount of text matched not including the EOB char. */
2276 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
2278 /* Undo the effects of YY_DO_BEFORE_ACTION. */
2279 *yy_cp = yy_hold_char;
2280 YY_RESTORE_YY_MORE_OFFSET
2282 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
2284 /* We're scanning a new file or input source. It's
2285 * possible that this happened because the user
2286 * just pointed yyin at a new source and called
2287 * yylex(). If so, then we have to assure
2288 * consistency between yy_current_buffer and our
2289 * globals. Here is the right place to do so, because
2290 * this is the first action (other than possibly a
2291 * back-up) that will match for the new input source.
2293 yy_n_chars = yy_current_buffer->yy_n_chars;
2294 yy_current_buffer->yy_input_file = yyin;
2295 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
2298 /* Note that here we test for yy_c_buf_p "<=" to the position
2299 * of the first EOB in the buffer, since yy_c_buf_p will
2300 * already have been incremented past the NUL character
2301 * (since all states make transitions on EOB to the
2302 * end-of-buffer state). Contrast this with the test
2305 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
2306 { /* This was really a NUL. */
2307 yy_state_type yy_next_state;
2309 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
2311 yy_current_state = yy_get_previous_state();
2313 /* Okay, we're now positioned to make the NUL
2314 * transition. We couldn't have
2315 * yy_get_previous_state() go ahead and do it
2316 * for us because it doesn't know how to deal
2317 * with the possibility of jamming (and we don't
2318 * want to build jamming into it because then it
2319 * will run more slowly).
2322 yy_next_state = yy_try_NUL_trans( yy_current_state );
2324 yy_bp = yytext_ptr + YY_MORE_ADJ;
2326 if ( yy_next_state )
2328 /* Consume the NUL. */
2329 yy_cp = ++yy_c_buf_p;
2330 yy_current_state = yy_next_state;
2337 goto yy_find_action;
2341 else switch ( yy_get_next_buffer() )
2343 case EOB_ACT_END_OF_FILE:
2345 yy_did_buffer_switch_on_eof = 0;
2349 /* Note: because we've taken care in
2350 * yy_get_next_buffer() to have set up
2351 * yytext, we can now set up
2352 * yy_c_buf_p so that if some total
2353 * hoser (like flex itself) wants to
2354 * call the scanner after we return the
2355 * YY_NULL, it'll still work - another
2356 * YY_NULL will get returned.
2358 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
2360 yy_act = YY_STATE_EOF(YY_START);
2366 if ( ! yy_did_buffer_switch_on_eof )
2372 case EOB_ACT_CONTINUE_SCAN:
2374 yytext_ptr + yy_amount_of_matched_text;
2376 yy_current_state = yy_get_previous_state();
2379 yy_bp = yytext_ptr + YY_MORE_ADJ;
2382 case EOB_ACT_LAST_MATCH:
2384 &yy_current_buffer->yy_ch_buf[yy_n_chars];
2386 yy_current_state = yy_get_previous_state();
2389 yy_bp = yytext_ptr + YY_MORE_ADJ;
2390 goto yy_find_action;
2397 "fatal flex scanner internal error--no action found" );
2398 } /* end of action switch */
2399 } /* end of scanning one token */
2400 } /* end of yylex */
2403 /* yy_get_next_buffer - try to read in a new buffer
2405 * Returns a code representing an action:
2406 * EOB_ACT_LAST_MATCH -
2407 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2408 * EOB_ACT_END_OF_FILE - end of file
2411 static int yy_get_next_buffer()
2413 register char *dest = yy_current_buffer->yy_ch_buf;
2414 register char *source = yytext_ptr;
2415 register int number_to_move, i;
2418 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
2420 "fatal flex scanner internal error--end of buffer missed" );
2422 if ( yy_current_buffer->yy_fill_buffer == 0 )
2423 { /* Don't try to fill the buffer, so this is an EOF. */
2424 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
2426 /* We matched a single character, the EOB, so
2427 * treat this as a final EOF.
2429 return EOB_ACT_END_OF_FILE;
2434 /* We matched some text prior to the EOB, first
2437 return EOB_ACT_LAST_MATCH;
2441 /* Try to read more data. */
2443 /* First move last chars to start of buffer. */
2444 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
2446 for ( i = 0; i < number_to_move; ++i )
2447 *(dest++) = *(source++);
2449 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2450 /* don't do the read, it's not guaranteed to return an EOF,
2453 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
2458 yy_current_buffer->yy_buf_size - number_to_move - 1;
2460 while ( num_to_read <= 0 )
2461 { /* Not enough room in the buffer - grow it. */
2462 #ifdef YY_USES_REJECT
2464 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
2467 /* just a shorter name for the current buffer */
2468 YY_BUFFER_STATE b = yy_current_buffer;
2470 int yy_c_buf_p_offset =
2471 (int) (yy_c_buf_p - b->yy_ch_buf);
2473 if ( b->yy_is_our_buffer )
2475 int new_size = b->yy_buf_size * 2;
2477 if ( new_size <= 0 )
2478 b->yy_buf_size += b->yy_buf_size / 8;
2480 b->yy_buf_size *= 2;
2482 b->yy_ch_buf = (char *)
2483 /* Include room in for 2 EOB chars. */
2484 yy_flex_realloc( (void *) b->yy_ch_buf,
2485 b->yy_buf_size + 2 );
2488 /* Can't grow it, we don't own it. */
2491 if ( ! b->yy_ch_buf )
2493 "fatal error - scanner input buffer overflow" );
2495 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
2497 num_to_read = yy_current_buffer->yy_buf_size -
2502 if ( num_to_read > YY_READ_BUF_SIZE )
2503 num_to_read = YY_READ_BUF_SIZE;
2505 /* Read in more data. */
2506 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
2507 yy_n_chars, num_to_read );
2509 yy_current_buffer->yy_n_chars = yy_n_chars;
2512 if ( yy_n_chars == 0 )
2514 if ( number_to_move == YY_MORE_ADJ )
2516 ret_val = EOB_ACT_END_OF_FILE;
2522 ret_val = EOB_ACT_LAST_MATCH;
2523 yy_current_buffer->yy_buffer_status =
2524 YY_BUFFER_EOF_PENDING;
2529 ret_val = EOB_ACT_CONTINUE_SCAN;
2531 yy_n_chars += number_to_move;
2532 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
2533 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
2535 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
2541 /* yy_get_previous_state - get the state just before the EOB char was reached */
2543 static yy_state_type yy_get_previous_state()
2545 register yy_state_type yy_current_state;
2546 register char *yy_cp;
2548 yy_current_state = yy_start;
2549 yy_current_state += YY_AT_BOL();
2551 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
2553 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2554 if ( yy_accept[yy_current_state] )
2556 yy_last_accepting_state = yy_current_state;
2557 yy_last_accepting_cpos = yy_cp;
2559 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2561 yy_current_state = (int) yy_def[yy_current_state];
2562 if ( yy_current_state >= 554 )
2563 yy_c = yy_meta[(unsigned int) yy_c];
2565 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2568 return yy_current_state;
2572 /* yy_try_NUL_trans - try to make a transition on the NUL character
2575 * next_state = yy_try_NUL_trans( current_state );
2578 #ifdef YY_USE_PROTOS
2579 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
2581 static yy_state_type yy_try_NUL_trans( yy_current_state )
2582 yy_state_type yy_current_state;
2585 register int yy_is_jam;
2586 register char *yy_cp = yy_c_buf_p;
2588 register YY_CHAR yy_c = 1;
2589 if ( yy_accept[yy_current_state] )
2591 yy_last_accepting_state = yy_current_state;
2592 yy_last_accepting_cpos = yy_cp;
2594 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2596 yy_current_state = (int) yy_def[yy_current_state];
2597 if ( yy_current_state >= 554 )
2598 yy_c = yy_meta[(unsigned int) yy_c];
2600 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2601 yy_is_jam = (yy_current_state == 553);
2603 return yy_is_jam ? 0 : yy_current_state;
2608 #ifdef YY_USE_PROTOS
2609 static void yyunput( int c, register char *yy_bp )
2611 static void yyunput( c, yy_bp )
2613 register char *yy_bp;
2616 register char *yy_cp = yy_c_buf_p;
2618 /* undo effects of setting up yytext */
2619 *yy_cp = yy_hold_char;
2621 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2622 { /* need to shift things up to make room */
2623 /* +2 for EOB chars. */
2624 register int number_to_move = yy_n_chars + 2;
2625 register char *dest = &yy_current_buffer->yy_ch_buf[
2626 yy_current_buffer->yy_buf_size + 2];
2627 register char *source =
2628 &yy_current_buffer->yy_ch_buf[number_to_move];
2630 while ( source > yy_current_buffer->yy_ch_buf )
2631 *--dest = *--source;
2633 yy_cp += (int) (dest - source);
2634 yy_bp += (int) (dest - source);
2635 yy_current_buffer->yy_n_chars =
2636 yy_n_chars = yy_current_buffer->yy_buf_size;
2638 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2639 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2642 *--yy_cp = (char) c;
2646 yy_hold_char = *yy_cp;
2649 #endif /* ifndef YY_NO_UNPUT */
2653 static int yyinput()
2660 *yy_c_buf_p = yy_hold_char;
2662 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
2664 /* yy_c_buf_p now points to the character we want to return.
2665 * If this occurs *before* the EOB characters, then it's a
2666 * valid NUL; if not, then we've hit the end of the buffer.
2668 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
2669 /* This was really a NUL. */
2673 { /* need more input */
2674 int offset = yy_c_buf_p - yytext_ptr;
2677 switch ( yy_get_next_buffer() )
2679 case EOB_ACT_LAST_MATCH:
2680 /* This happens because yy_g_n_b()
2681 * sees that we've accumulated a
2682 * token and flags that we need to
2683 * try matching the token before
2684 * proceeding. But for input(),
2685 * there's no matching to consider.
2686 * So convert the EOB_ACT_LAST_MATCH
2687 * to EOB_ACT_END_OF_FILE.
2690 /* Reset buffer status. */
2695 case EOB_ACT_END_OF_FILE:
2700 if ( ! yy_did_buffer_switch_on_eof )
2709 case EOB_ACT_CONTINUE_SCAN:
2710 yy_c_buf_p = yytext_ptr + offset;
2716 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
2717 *yy_c_buf_p = '\0'; /* preserve yytext */
2718 yy_hold_char = *++yy_c_buf_p;
2720 yy_current_buffer->yy_at_bol = (c == '\n');
2726 #ifdef YY_USE_PROTOS
2727 void yyrestart( FILE *input_file )
2729 void yyrestart( input_file )
2733 if ( ! yy_current_buffer )
2734 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
2736 yy_init_buffer( yy_current_buffer, input_file );
2737 yy_load_buffer_state();
2741 #ifdef YY_USE_PROTOS
2742 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
2744 void yy_switch_to_buffer( new_buffer )
2745 YY_BUFFER_STATE new_buffer;
2748 if ( yy_current_buffer == new_buffer )
2751 if ( yy_current_buffer )
2753 /* Flush out information for old buffer. */
2754 *yy_c_buf_p = yy_hold_char;
2755 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
2756 yy_current_buffer->yy_n_chars = yy_n_chars;
2759 yy_current_buffer = new_buffer;
2760 yy_load_buffer_state();
2762 /* We don't actually know whether we did this switch during
2763 * EOF (yywrap()) processing, but the only time this flag
2764 * is looked at is after yywrap() is called, so it's safe
2765 * to go ahead and always set it.
2767 yy_did_buffer_switch_on_eof = 1;
2771 #ifdef YY_USE_PROTOS
2772 void yy_load_buffer_state( void )
2774 void yy_load_buffer_state()
2777 yy_n_chars = yy_current_buffer->yy_n_chars;
2778 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
2779 yyin = yy_current_buffer->yy_input_file;
2780 yy_hold_char = *yy_c_buf_p;
2784 #ifdef YY_USE_PROTOS
2785 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
2787 YY_BUFFER_STATE yy_create_buffer( file, size )
2794 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2796 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2798 b->yy_buf_size = size;
2800 /* yy_ch_buf has to be 2 characters longer than the size given because
2801 * we need to put in 2 end-of-buffer characters.
2803 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
2804 if ( ! b->yy_ch_buf )
2805 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2807 b->yy_is_our_buffer = 1;
2809 yy_init_buffer( b, file );
2815 #ifdef YY_USE_PROTOS
2816 void yy_delete_buffer( YY_BUFFER_STATE b )
2818 void yy_delete_buffer( b )
2825 if ( b == yy_current_buffer )
2826 yy_current_buffer = (YY_BUFFER_STATE) 0;
2828 if ( b->yy_is_our_buffer )
2829 yy_flex_free( (void *) b->yy_ch_buf );
2831 yy_flex_free( (void *) b );
2835 #ifndef YY_ALWAYS_INTERACTIVE
2836 #ifndef YY_NEVER_INTERACTIVE
2841 #ifdef YY_USE_PROTOS
2842 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
2844 void yy_init_buffer( b, file )
2853 yy_flush_buffer( b );
2855 b->yy_input_file = file;
2856 b->yy_fill_buffer = 1;
2858 #if defined(YY_ALWAYS_INTERACTIVE) && YY_ALWAYS_INTERACTIVE
2859 b->yy_is_interactive = 1;
2861 #if defined(YY_NEVER_INTERACTIVE) && YY_NEVER_INTERACTIVE
2862 b->yy_is_interactive = 0;
2864 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2871 #ifdef YY_USE_PROTOS
2872 void yy_flush_buffer( YY_BUFFER_STATE b )
2874 void yy_flush_buffer( b )
2884 /* We always need two end-of-buffer characters. The first causes
2885 * a transition to the end-of-buffer state. The second causes
2886 * a jam in that state.
2888 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2889 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2891 b->yy_buf_pos = &b->yy_ch_buf[0];
2894 b->yy_buffer_status = YY_BUFFER_NEW;
2896 if ( b == yy_current_buffer )
2897 yy_load_buffer_state();
2901 #ifndef YY_NO_SCAN_BUFFER
2902 #ifdef YY_USE_PROTOS
2903 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
2905 YY_BUFFER_STATE yy_scan_buffer( base, size )
2913 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2914 base[size-1] != YY_END_OF_BUFFER_CHAR )
2915 /* They forgot to leave room for the EOB's. */
2918 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2920 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2922 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2923 b->yy_buf_pos = b->yy_ch_buf = base;
2924 b->yy_is_our_buffer = 0;
2925 b->yy_input_file = 0;
2926 b->yy_n_chars = b->yy_buf_size;
2927 b->yy_is_interactive = 0;
2929 b->yy_fill_buffer = 0;
2930 b->yy_buffer_status = YY_BUFFER_NEW;
2932 yy_switch_to_buffer( b );
2939 #ifndef YY_NO_SCAN_STRING
2940 #ifdef YY_USE_PROTOS
2941 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
2943 YY_BUFFER_STATE yy_scan_string( yy_str )
2944 yyconst char *yy_str;
2948 for ( len = 0; yy_str[len]; ++len )
2951 return yy_scan_bytes( yy_str, len );
2956 #ifndef YY_NO_SCAN_BYTES
2957 #ifdef YY_USE_PROTOS
2958 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
2960 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
2961 yyconst char *bytes;
2970 /* Get memory for full buffer, including space for trailing EOB's. */
2972 buf = (char *) yy_flex_alloc( n );
2974 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2976 for ( i = 0; i < len; ++i )
2979 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
2981 b = yy_scan_buffer( buf, n );
2983 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2985 /* It's okay to grow etc. this buffer, and we should throw it
2986 * away when we're done.
2988 b->yy_is_our_buffer = 1;
2995 #ifndef YY_NO_PUSH_STATE
2996 #ifdef YY_USE_PROTOS
2997 static void yy_push_state( int new_state )
2999 static void yy_push_state( new_state )
3003 if ( yy_start_stack_ptr >= yy_start_stack_depth )
3007 yy_start_stack_depth += YY_START_STACK_INCR;
3008 new_size = yy_start_stack_depth * sizeof( int );
3010 if ( ! yy_start_stack )
3011 yy_start_stack = (int *) yy_flex_alloc( new_size );
3014 yy_start_stack = (int *) yy_flex_realloc(
3015 (void *) yy_start_stack, new_size );
3017 if ( ! yy_start_stack )
3019 "out of memory expanding start-condition stack" );
3022 yy_start_stack[yy_start_stack_ptr++] = YY_START;
3029 #ifndef YY_NO_POP_STATE
3030 static void yy_pop_state()
3032 if ( --yy_start_stack_ptr < 0 )
3033 YY_FATAL_ERROR( "start-condition stack underflow" );
3035 BEGIN(yy_start_stack[yy_start_stack_ptr]);
3040 #ifndef YY_NO_TOP_STATE
3041 static int yy_top_state()
3043 return yy_start_stack[yy_start_stack_ptr - 1];
3047 #ifndef YY_EXIT_FAILURE
3048 #define YY_EXIT_FAILURE 2
3051 #ifdef YY_USE_PROTOS
3052 static void yy_fatal_error( yyconst char msg[] )
3054 static void yy_fatal_error( msg )
3058 (void) fprintf( stderr, "%s\n", msg );
3059 exit( YY_EXIT_FAILURE );
3064 /* Redefine yyless() so it works in section 3 code. */
3070 /* Undo effects of setting up yytext. */ \
3071 yytext[yyleng] = yy_hold_char; \
3072 yy_c_buf_p = yytext + n; \
3073 yy_hold_char = *yy_c_buf_p; \
3074 *yy_c_buf_p = '\0'; \
3080 /* Internal utility routines. */
3083 #ifdef YY_USE_PROTOS
3084 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
3086 static void yy_flex_strncpy( s1, s2, n )
3093 for ( i = 0; i < n; ++i )
3098 #ifdef YY_NEED_STRLEN
3099 #ifdef YY_USE_PROTOS
3100 static int yy_flex_strlen( yyconst char *s )
3102 static int yy_flex_strlen( s )
3107 for ( n = 0; s[n]; ++n )
3115 #ifdef YY_USE_PROTOS
3116 static void *yy_flex_alloc( yy_size_t size )
3118 static void *yy_flex_alloc( size )
3122 return (void *) malloc( size );
3125 #ifdef YY_USE_PROTOS
3126 static void *yy_flex_realloc( void *ptr, yy_size_t size )
3128 static void *yy_flex_realloc( ptr, size )
3133 /* The cast to (char *) in the following accommodates both
3134 * implementations that use char* generic pointers, and those
3135 * that use void* generic pointers. It works with the latter
3136 * because both ANSI C and C++ allow castless assignment from
3137 * any pointer type to void*, and deal with argument conversions
3138 * as though doing an assignment.
3140 return (void *) realloc( (char *) ptr, size );
3143 #ifdef YY_USE_PROTOS
3144 static void yy_flex_free( void *ptr )
3146 static void yy_flex_free( ptr )
3153 #if defined(YY_MAIN) && YY_MAIN
3162 static unsigned char
3169 s += 2; /* skip \\x */
3170 for (i = 0; i < 2; i++) {
3205 return((unsigned char)result);
3209 _fill(src, len, olen)
3215 dst = olen ? realloc(yylval.string, olen + len + 1) : malloc(len + 1);
3217 yyerror("unable to allocate memory");
3220 yylval.string = dst;
3222 /* Copy the string and collapse any escaped characters. */
3225 if (*src == '\\' && len) {
3226 if (src[1] == 'x' && len >= 3 &&
3227 isxdigit((unsigned char) src[2]) &&
3228 isxdigit((unsigned char) src[3])) {
3229 *dst++ = hexchar(src);
3252 if (yylval.string != NULL)
3253 olen = strlen(yylval.string);
3255 return(_fill(src, len, olen));
3258 #define SPECIAL(c) \
3259 ((c) == ',' || (c) == ':' || (c) == '=' || (c) == ' ' || (c) == '\t' || (c) == '#')
3269 arg_len = arg_size = 0;
3271 dst = yylval.command.cmnd = (char *) malloc(len + 1);
3272 if (yylval.command.cmnd == NULL) {
3273 yyerror("unable to allocate memory");
3277 /* Copy the string and collapse any escaped sudo-specific characters. */
3278 for (i = 0; i < len; i++) {
3279 if (src[i] == '\\' && i != len - 1 && SPECIAL(src[i + 1]))
3286 yylval.command.args = NULL;
3291 fill_args(s, len, addspace)
3299 if (yylval.command.args == NULL) {
3303 new_len = arg_len + len + addspace;
3305 if (new_len >= arg_size) {
3306 /* Allocate more space than we need for subsequent args */
3307 while (new_len >= (arg_size += COMMANDARGINC))
3310 p = yylval.command.args ?
3311 (char *) realloc(yylval.command.args, arg_size) :
3312 (char *) malloc(arg_size);
3314 efree(yylval.command.args);
3315 yyerror("unable to allocate memory");
3318 yylval.command.args = p;
3321 /* Efficiently append the arg (with a leading space if needed). */
3322 p = yylval.command.args + arg_len;
3325 if (strlcpy(p, s, arg_size - (p - yylval.command.args)) != len) {
3326 yyerror("fill_args: buffer overflow"); /* paranoia */
3335 struct path_list *next;
3338 struct include_stack {
3341 struct path_list *more; /* more files in case of includedir */
3351 const struct path_list * const *p1 = v1;
3352 const struct path_list * const *p2 = v2;
3354 return(strcmp((*p1)->path, (*p2)->path));
3358 switch_dir(stack, dirpath)
3359 struct include_stack *stack;
3365 struct dirent *dent;
3367 struct path_list *pl, *first = NULL;
3368 struct path_list **sorted = NULL;
3370 if (!(dir = opendir(dirpath))) {
3374 while ((dent = readdir(dir))) {
3375 /* Ignore files that end in '~' or have a '.' in them. */
3376 if (dent->d_name[0] == '\0' || dent->d_name[NAMLEN(dent) - 1] == '~'
3377 || strchr(dent->d_name, '.') != NULL) {
3380 if (asprintf(&path, "%s/%s", dirpath, dent->d_name) == -1) {
3384 if (stat(path, &sb) != 0 || !S_ISREG(sb.st_mode)) {
3388 pl = malloc(sizeof(*pl));
3401 /* Sort the list as an array. */
3402 sorted = malloc(sizeof(*sorted) * count);
3406 for (i = 0; i < count; i++) {
3410 qsort(sorted, count, sizeof(*sorted), pl_compare);
3412 /* Apply sorting to the list. */
3414 sorted[count - 1]->next = NULL;
3415 for (i = 1; i < count; i++)
3416 sorted[i - 1]->next = sorted[i];
3419 /* Pull out the first element for parsing, leave the rest for later. */
3432 while (first != NULL) {
3444 #define MAX_SUDOERS_DEPTH 128
3445 #define SUDOERS_STACK_INCREMENT 16
3447 static size_t istacksize, idepth;
3448 static struct include_stack *istack;
3449 static int keepopen;
3454 struct path_list *pl;
3458 while ((pl = istack[idepth].more) != NULL) {
3459 istack[idepth].more = pl->next;
3463 efree(istack[idepth].path);
3464 if (!istack[idepth].keepopen)
3465 fclose(istack[idepth].bs->yy_input_file);
3466 yy_delete_buffer(istack[idepth].bs);
3470 istacksize = idepth = 0;
3475 _push_include(path, isdir)
3481 /* push current state onto stack */
3482 if (idepth >= istacksize) {
3483 if (idepth > MAX_SUDOERS_DEPTH) {
3484 yyerror("too many levels of includes");
3487 istacksize += SUDOERS_STACK_INCREMENT;
3488 istack = (struct include_stack *) realloc(istack,
3489 sizeof(istack) * istacksize);
3490 if (istack == NULL) {
3491 yyerror("unable to allocate memory");
3496 if (!(path = switch_dir(&istack[idepth], path))) {
3500 if ((fp = open_sudoers(path, FALSE, &keepopen)) == NULL) {
3502 return(FALSE); /* XXX - just to go next one? */
3505 if ((fp = open_sudoers(path, TRUE, &keepopen)) == NULL) {
3509 istack[idepth].more = NULL;
3511 /* Push the old (current) file and open the new one. */
3512 istack[idepth].path = sudoers; /* push old path */
3513 istack[idepth].bs = YY_CURRENT_BUFFER;
3514 istack[idepth].lineno = sudolineno;
3515 istack[idepth].keepopen = keepopen;
3519 yy_switch_to_buffer(yy_create_buffer(fp, YY_BUF_SIZE));
3527 struct path_list *pl;
3534 fclose(YY_CURRENT_BUFFER->yy_input_file);
3535 yy_delete_buffer(YY_CURRENT_BUFFER);
3537 if ((pl = istack[idepth - 1].more) != NULL) {
3538 /* Move to next file in the dir. */
3539 istack[idepth - 1].more = pl->next;
3540 if ((fp = open_sudoers(pl->path, FALSE, &keepopen)) == NULL) {
3542 return(FALSE); /* XXX - just to go next one? */
3547 yy_switch_to_buffer(yy_create_buffer(fp, YY_BUF_SIZE));
3551 yy_switch_to_buffer(istack[idepth].bs);
3553 sudoers = istack[idepth].path;
3554 sudolineno = istack[idepth].lineno;
3563 char *cp, *ep, *path;
3564 int len = 0, subst = 0;
3565 size_t shost_len = 0;
3567 /* Pull out path from #include line. */
3568 cp = base + sizeof("#include");
3570 cp += 3; /* includedir */
3571 while (isblank((unsigned char) *cp))
3574 while (*ep != '\0' && !isspace((unsigned char) *ep)) {
3575 if (ep[0] == '%' && ep[1] == 'h') {
3576 shost_len = strlen(user_shost);
3577 len += shost_len - 2;
3583 /* Make a copy of path and return it. */
3584 len += (int)(ep - cp);
3585 if ((path = malloc(len + 1)) == NULL)
3586 yyerror("unable to allocate memory");
3588 /* substitute for %h */
3591 if (cp[0] == '%' && cp[1] == 'h') {
3592 memcpy(pp, user_shost, shost_len);
3601 memcpy(path, cp, len);
3605 /* Push any excess characters (e.g. comment, newline) back to the lexer */
3607 yyless((int)(ep - base));
3613 * Check to make sure an IPv6 address does not contain multiple instances
3614 * of the string "::". Assumes strlen(s) >= 1.
3615 * Returns TRUE if address is valid else FALSE.
3623 for (; *s != '\0'; s++) {
3624 if (s[0] == ':' && s[1] == ':') {
3629 nmatch = 0; /* reset if we hit netmask */
3632 return (nmatch <= 1);