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/openbsd/src/usr.bin/lex/flex.skl,v 1.10 2007/01/26 14:38:19 tsi 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[555] =
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, 0, 19, 0, 38, 38, 38, 30,
347 30, 0, 0, 0, 31, 31, 31, 31, 31, 31,
348 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
350 31, 31, 20, 0, 17, 0, 38, 38, 38, 38,
351 38, 0, 0, 0, 0, 0, 31, 31, 31, 31,
352 31, 31, 31, 31, 0, 38, 38, 38, 31, 31,
353 31, 31, 31, 31, 0, 38, 38, 38, 38, 38,
354 31, 31, 31, 31, 31, 0, 18, 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, 2, 1, 6, 6, 1,
393 1, 2, 1, 7, 8, 9, 9, 9, 9, 9,
394 9, 9, 9, 10, 11, 6, 1, 9, 9, 9,
395 9, 9, 1, 1, 1, 1, 1, 1, 1, 1,
396 1, 1, 1, 1, 12, 13, 14, 14, 14, 14,
397 14, 14, 13, 13, 13, 13, 13, 13, 13, 13,
401 static yyconst short int yy_base[621] =
403 0, 61, 62, 63, 69, 84, 128, 189, 250, 294,
404 80, 101, 2394, 2348, 2390, 3541, 2387, 338, 381, 52,
405 3541, 3541, 2345, 3541, 107, 391, 119, 137, 2351, 3541,
406 3541, 443, 2330, 490, 2337, 2335, 2320, 541, 145, 55,
407 167, 565, 2293, 2297, 2289, 2258, 2257, 2314, 193, 256,
408 56, 0, 3541, 2311, 3541, 0, 264, 617, 77, 0,
409 2261, 3541, 82, 3541, 99, 3541, 110, 2243, 126, 106,
410 3541, 145, 2240, 306, 2282, 2279, 639, 2277, 2276, 2263,
411 3541, 201, 209, 74, 2211, 347, 2208, 550, 276, 2199,
412 587, 410, 669, 2210, 2210, 306, 358, 317, 2163, 179,
414 706, 0, 2154, 240, 2111, 2109, 389, 3541, 76, 355,
415 2082, 2076, 2066, 2061, 2062, 63, 115, 219, 29, 212,
416 98, 2116, 507, 361, 2071, 598, 154, 0, 2111, 256,
417 3541, 3541, 636, 284, 0, 2069, 567, 3541, 3541, 2066,
418 532, 2050, 2087, 271, 300, 288, 2089, 2038, 3541, 2057,
419 2055, 1986, 669, 603, 745, 777, 809, 841, 2014, 2003,
420 878, 268, 916, 953, 1996, 1980, 1971, 1945, 1911, 1915,
421 236, 1862, 1866, 1856, 1843, 1848, 317, 157, 1851, 307,
422 266, 258, 777, 296, 1880, 1877, 686, 402, 992, 1024,
423 725, 337, 1839, 1838, 787, 499, 1782, 1781, 343, 755,
425 1056, 796, 694, 1094, 819, 1745, 393, 1736, 1728, 1711,
426 1707, 1697, 373, 1681, 1666, 1651, 1664, 1623, 543, 400,
427 556, 233, 506, 1133, 1165, 1197, 1657, 1655, 827, 1640,
428 1638, 1637, 1621, 540, 858, 546, 895, 602, 1229, 0,
429 935, 1240, 970, 731, 1278, 1002, 601, 3541, 1614, 1604,
430 1610, 1595, 1583, 486, 1565, 1548, 1548, 387, 343, 380,
431 616, 1010, 423, 1317, 1349, 1044, 1555, 1554, 1553, 1506,
432 1379, 645, 1076, 1113, 1143, 652, 983, 1035, 1151, 1042,
433 1418, 0, 1175, 1429, 1184, 866, 1467, 1207, 644, 1451,
434 1458, 648, 672, 625, 1447, 1419, 680, 576, 487, 715,
436 1505, 1536, 1567, 1449, 1447, 1432, 1215, 1599, 1257, 903,
437 1636, 1297, 1325, 1441, 1335, 1359, 1369, 841, 1024, 1067,
438 1124, 1396, 1308, 1675, 0, 1448, 1686, 1484, 1265, 1724,
439 1515, 955, 3541, 1423, 1364, 956, 3541, 975, 3541, 807,
440 1350, 1300, 591, 1074, 569, 917, 1523, 155, 1762, 1793,
441 1546, 1336, 1300, 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, 1276, 1251, 1244, 730, 635, 1952, 1222,
445 1984, 2016, 2048, 2080, 1242, 1855, 1892, 1943, 1241, 1184,
447 1198, 1964, 1350, 2112, 0, 762, 2123, 1972, 1992, 2160,
448 2000, 2024, 1227, 2034, 2058, 2068, 1369, 1609, 1934, 772,
449 806, 2199, 0, 844, 1173, 3541, 1468, 3541, 1192, 2086,
450 1389, 142, 991, 604, 736, 2140, 1038, 2209, 2241, 2273,
451 2305, 2103, 2177, 1163, 2219, 2229, 2251, 1152, 1116, 1656,
452 1706, 2257, 1837, 2337, 0, 881, 2348, 2281, 2088, 2385,
453 2291, 2314, 2323, 2366, 1855, 1122, 927, 1042, 1031, 902,
454 951, 990, 1725, 2416, 1836, 2437, 2450, 2482, 2514, 2434,
455 1951, 2464, 2492, 2502, 936, 919, 1893, 2001, 2522, 2035,
456 2546, 0, 1031, 2557, 2530, 2148, 2576, 838, 2595, 2604,
458 2473, 773, 3541, 659, 3541, 1065, 2612, 1195, 2644, 2676,
459 2623, 2629, 618, 2655, 2665, 2686, 573, 566, 2049, 557,
460 549, 2694, 0, 1078, 1545, 2708, 2740, 2772, 2716, 2724,
461 2748, 509, 0, 455, 357, 2756, 1535, 2804, 2836, 2786,
462 3541, 2792, 2816, 2185, 3541, 345, 3541, 2824, 2844, 2854,
463 25, 2874, 2866, 3541, 2919, 2933, 2947, 2961, 2975, 2989,
464 3003, 3017, 3031, 3045, 3051, 3065, 3079, 1107, 3093, 3107,
465 3121, 3135, 3149, 3163, 3177, 3191, 3197, 3204, 3218, 3232,
466 3238, 3245, 3251, 3257, 3263, 3270, 3276, 3282, 3288, 3295,
467 3303, 3309, 3315, 3321, 3328, 3336, 3342, 3348, 3355, 3363,
469 3369, 3377, 3384, 3392, 3398, 3406, 3413, 3421, 3435, 3449,
470 3455, 3463, 3470, 3484, 3490, 3498, 3504, 3512, 1600, 3526
473 static yyconst short int yy_def[621] =
475 554, 1, 1, 1, 555, 555, 556, 556, 557, 557,
476 558, 558, 554, 559, 554, 554, 554, 560, 561, 562,
477 554, 554, 563, 554, 564, 559, 26, 26, 565, 554,
478 554, 554, 32, 32, 34, 34, 34, 559, 26, 559,
479 554, 561, 32, 32, 34, 34, 34, 554, 554, 566,
480 559, 567, 554, 567, 554, 567, 554, 561, 554, 568,
481 569, 554, 569, 554, 569, 554, 570, 571, 571, 571,
482 554, 554, 559, 559, 554, 554, 560, 572, 560, 573,
483 554, 574, 554, 562, 575, 562, 563, 563, 564, 576,
484 559, 559, 26, 565, 93, 93, 93, 93, 577, 578,
486 32, 34, 34, 34, 34, 34, 559, 554, 559, 554,
487 554, 554, 554, 554, 554, 573, 559, 93, 559, 559,
488 559, 554, 554, 566, 579, 559, 559, 567, 567, 554,
489 554, 554, 574, 554, 568, 569, 569, 554, 554, 569,
490 569, 571, 554, 571, 571, 554, 554, 559, 554, 573,
491 580, 575, 575, 554, 559, 559, 559, 93, 158, 581,
492 554, 582, 554, 32, 34, 34, 34, 34, 34, 34,
493 559, 554, 554, 554, 554, 554, 573, 559, 158, 559,
494 559, 559, 554, 559, 554, 580, 559, 559, 559, 559,
495 559, 559, 583, 584, 584, 195, 585, 584, 586, 163,
497 554, 201, 201, 554, 201, 34, 34, 34, 34, 34,
498 34, 34, 559, 554, 554, 554, 554, 554, 573, 559,
499 559, 559, 559, 559, 559, 559, 554, 587, 587, 229,
500 587, 588, 589, 590, 554, 591, 204, 591, 591, 239,
501 591, 554, 242, 242, 554, 242, 554, 554, 34, 34,
502 34, 34, 34, 559, 554, 554, 554, 573, 559, 559,
503 559, 559, 559, 559, 559, 559, 592, 592, 593, 594,
504 554, 554, 554, 554, 554, 595, 595, 596, 245, 596,
505 596, 281, 596, 554, 284, 284, 554, 284, 34, 34,
506 34, 34, 34, 559, 554, 554, 573, 559, 559, 559,
508 559, 559, 559, 554, 597, 598, 271, 554, 308, 308,
509 554, 308, 554, 554, 554, 554, 554, 554, 599, 599,
510 600, 287, 600, 600, 324, 600, 554, 327, 327, 554,
511 327, 554, 554, 34, 34, 554, 554, 554, 554, 559,
512 554, 554, 573, 559, 559, 559, 559, 559, 559, 559,
513 559, 554, 601, 554, 602, 311, 602, 602, 358, 358,
514 554, 361, 361, 554, 361, 554, 554, 554, 554, 603,
515 603, 604, 330, 604, 604, 375, 604, 554, 378, 378,
516 378, 34, 34, 559, 554, 554, 573, 559, 559, 559,
517 559, 559, 559, 559, 554, 554, 554, 554, 605, 605,
519 606, 364, 606, 606, 404, 404, 554, 407, 407, 554,
520 407, 554, 554, 554, 554, 554, 554, 607, 607, 608,
521 608, 608, 422, 422, 554, 554, 554, 554, 554, 554,
522 573, 573, 559, 609, 610, 559, 559, 559, 559, 559,
523 559, 559, 554, 554, 554, 554, 554, 554, 611, 611,
524 612, 410, 612, 612, 454, 454, 554, 457, 457, 554,
525 457, 554, 554, 554, 554, 613, 613, 554, 614, 573,
526 559, 609, 609, 609, 610, 610, 559, 559, 559, 559,
527 559, 554, 554, 554, 554, 615, 615, 616, 460, 616,
528 616, 491, 491, 554, 494, 494, 494, 554, 554, 554,
530 554, 554, 554, 614, 554, 573, 559, 559, 559, 559,
531 559, 554, 554, 554, 554, 554, 554, 617, 617, 618,
532 618, 618, 522, 522, 573, 559, 559, 559, 554, 554,
533 554, 554, 619, 619, 620, 559, 559, 559, 559, 559,
534 554, 554, 554, 554, 554, 620, 554, 559, 559, 559,
535 559, 559, 559, 0, 554, 554, 554, 554, 554, 554,
536 554, 554, 554, 554, 554, 554, 554, 554, 554, 554,
537 554, 554, 554, 554, 554, 554, 554, 554, 554, 554,
538 554, 554, 554, 554, 554, 554, 554, 554, 554, 554,
539 554, 554, 554, 554, 554, 554, 554, 554, 554, 554,
541 554, 554, 554, 554, 554, 554, 554, 554, 554, 554,
542 554, 554, 554, 554, 554, 554, 554, 554, 554, 554
545 static yyconst short int yy_nxt[3604] =
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 55, 69, 16, 70, 71, 15, 53, 54, 180, 55,
556 43, 44, 55, 56, 45, 55, 86, 554, 46, 74,
558 74, 47, 69, 16, 70, 71, 138, 55, 56, 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, 547, 84, 78,
585 84, 74, 84, 223, 84, 84, 110, 161, 84, 547,
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, 554, 231, 231, 231, 102, 102, 102,
604 102, 102, 83, 83, 83, 83, 83, 83, 83, 83,
605 74, 74, 489, 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, 554, 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, 489,
611 73, 136, 89, 81, 73, 73, 452, 258, 89, 124,
613 74, 73, 247, 124, 90, 73, 73, 473, 90, 124,
614 89, 89, 73, 74, 90, 554, 161, 260, 116, 81,
615 74, 124, 124, 73, 248, 237, 90, 90, 389, 133,
616 344, 512, 554, 554, 554, 554, 554, 554, 554, 554,
617 78, 387, 78, 148, 78, 332, 78, 78, 474, 336,
618 78, 554, 554, 554, 554, 554, 554, 554, 554, 161,
619 74, 505, 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, 473,
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 476, 354, 125, 449, 449, 235, 161, 161, 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, 554,
637 161, 74, 187, 554, 190, 190, 190, 190, 190, 191,
638 188, 188, 554, 356, 238, 238, 238, 238, 238, 238,
639 238, 238, 268, 268, 268, 268, 268, 268, 268, 268,
640 197, 74, 161, 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, 486, 486, 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, 452, 205, 205, 205, 205, 205, 235, 161,
651 277, 277, 277, 277, 277, 277, 332, 336, 237, 402,
652 506, 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, 554, 425, 74, 235, 161, 339, 192,
657 192, 192, 192, 192, 192, 187, 237, 188, 188, 188,
658 188, 188, 188, 188, 188, 554, 426, 280, 280, 280,
659 280, 280, 280, 280, 280, 301, 302, 303, 301, 301,
660 301, 301, 301, 505, 474, 74, 74, 187, 161, 188,
661 188, 188, 188, 188, 188, 188, 188, 279, 235, 161,
662 471, 436, 518, 518, 74, 554, 161, 262, 279, 263,
663 263, 263, 263, 263, 263, 279, 525, 81, 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, 533,
668 533, 503, 238, 238, 238, 238, 238, 238, 161, 242,
669 243, 244, 242, 242, 242, 242, 242, 245, 74, 135,
670 135, 246, 246, 246, 246, 246, 313, 388, 315, 315,
671 315, 315, 315, 315, 315, 315, 161, 235, 161, 402,
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, 443, 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, 507, 74,
680 262, 354, 265, 265, 265, 265, 265, 266, 263, 263,
681 554, 402, 323, 323, 323, 323, 323, 323, 323, 323,
682 312, 312, 312, 312, 312, 312, 312, 312, 468, 74,
683 412, 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, 356, 307, 74, 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, 430, 429, 288, 288, 288, 288, 288,
691 554, 279, 357, 357, 357, 357, 357, 357, 357, 357,
692 74, 554, 161, 307, 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, 233,
696 386, 74, 262, 554, 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, 385, 383, 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, 382, 313, 307, 323, 323, 323, 323,
707 323, 235, 161, 371, 371, 371, 371, 371, 371, 427,
708 233, 322, 197, 342, 341, 323, 323, 323, 323, 323,
709 323, 161, 327, 328, 329, 327, 327, 327, 327, 327,
710 330, 428, 335, 334, 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, 554, 307,
715 374, 374, 374, 374, 374, 374, 374, 374, 391, 392,
716 393, 394, 391, 391, 391, 391, 525, 81, 536, 74,
717 347, 349, 349, 349, 349, 349, 349, 349, 349, 535,
718 347, 348, 348, 348, 348, 348, 348, 74, 396, 397,
719 398, 396, 396, 396, 396, 396, 233, 197, 197, 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, 255, 545, 296,
724 295, 74, 354, 545, 355, 355, 355, 355, 355, 355,
725 355, 355, 356, 161, 293, 292, 357, 357, 357, 357,
726 357, 554, 373, 403, 403, 403, 403, 403, 403, 403,
727 403, 291, 290, 289, 271, 357, 357, 357, 357, 357,
728 357, 361, 362, 363, 361, 361, 361, 361, 361, 364,
729 233, 197, 267, 365, 365, 365, 365, 365, 412, 354,
730 413, 413, 413, 413, 413, 413, 413, 413, 197, 402,
731 100, 255, 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 257, 255, 256, 374, 374, 374, 374, 374, 412, 354,
736 414, 414, 414, 414, 414, 414, 414, 414, 554, 452,
737 255, 253, 374, 374, 374, 374, 374, 374, 161, 378,
738 379, 380, 378, 378, 378, 378, 378, 235, 161, 252,
739 251, 381, 381, 381, 381, 381, 412, 322, 415, 415,
740 415, 415, 415, 416, 413, 413, 250, 249, 94, 474,
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, 197, 233, 74, 347, 348, 348,
746 348, 348, 348, 348, 348, 348, 554, 161, 235, 161,
747 419, 419, 419, 419, 419, 419, 373, 554, 373, 421,
748 421, 421, 421, 421, 421, 421, 421, 74, 354, 554,
749 400, 400, 400, 400, 400, 400, 400, 400, 356, 354,
750 554, 401, 401, 401, 401, 401, 401, 401, 401, 402,
751 452, 197, 100, 403, 403, 403, 403, 403, 443, 161,
752 444, 444, 444, 444, 444, 444, 444, 444, 373, 81,
753 476, 185, 403, 403, 403, 403, 403, 403, 407, 408,
754 409, 407, 407, 407, 407, 407, 410, 221, 218, 217,
756 411, 411, 411, 411, 411, 443, 354, 445, 445, 445,
757 445, 445, 445, 445, 445, 216, 452, 215, 214, 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, 212, 235, 161, 211,
761 421, 421, 421, 421, 421, 434, 443, 373, 446, 446,
762 446, 446, 446, 447, 444, 444, 481, 481, 481, 421,
763 421, 421, 421, 421, 421, 434, 210, 434, 435, 411,
764 411, 411, 411, 411, 411, 411, 411, 454, 454, 454,
765 454, 454, 454, 454, 454, 74, 74, 436, 209, 437,
767 437, 437, 437, 437, 437, 437, 437, 455, 455, 455,
768 455, 455, 456, 554, 354, 453, 453, 453, 453, 453,
769 453, 453, 453, 208, 489, 207, 100, 92, 74, 436,
770 153, 438, 438, 438, 438, 438, 438, 438, 438, 462,
771 463, 464, 462, 462, 462, 462, 462, 412, 554, 413,
772 413, 413, 413, 413, 413, 413, 413, 81, 489, 81,
773 74, 436, 354, 439, 439, 439, 439, 439, 440, 441,
774 441, 412, 489, 413, 413, 413, 413, 413, 413, 413,
775 413, 412, 74, 413, 413, 413, 413, 413, 413, 434,
776 185, 142, 74, 436, 143, 442, 442, 442, 437, 437,
778 437, 437, 437, 492, 492, 492, 492, 492, 493, 434,
779 137, 434, 434, 137, 129, 183, 436, 122, 481, 481,
780 481, 176, 175, 174, 74, 354, 173, 450, 450, 450,
781 450, 450, 450, 450, 450, 402, 354, 172, 451, 451,
782 451, 451, 451, 451, 451, 451, 452, 74, 170, 169,
783 453, 453, 453, 453, 453, 477, 478, 479, 477, 477,
784 477, 477, 477, 523, 523, 523, 523, 523, 524, 453,
785 453, 453, 453, 453, 453, 457, 458, 459, 457, 457,
786 457, 457, 457, 460, 74, 165, 100, 461, 461, 461,
787 461, 461, 482, 483, 484, 482, 482, 482, 482, 482,
789 541, 541, 541, 541, 541, 541, 461, 461, 461, 461,
790 461, 461, 235, 161, 467, 467, 467, 467, 467, 467,
791 467, 467, 436, 73, 441, 441, 441, 441, 441, 441,
792 441, 441, 443, 100, 444, 444, 444, 444, 444, 444,
793 444, 444, 443, 154, 444, 444, 444, 444, 444, 444,
794 444, 444, 88, 74, 436, 153, 441, 441, 441, 441,
795 441, 441, 441, 441, 443, 81, 444, 444, 444, 444,
796 444, 444, 461, 461, 461, 461, 461, 461, 461, 461,
797 148, 149, 76, 75, 74, 74, 436, 143, 441, 441,
798 441, 441, 441, 441, 480, 480, 491, 491, 491, 491,
800 491, 491, 491, 491, 554, 137, 490, 490, 490, 490,
801 490, 490, 490, 490, 129, 122, 121, 74, 436, 120,
802 480, 480, 480, 480, 480, 480, 480, 480, 161, 498,
803 498, 498, 498, 498, 498, 498, 498, 161, 499, 499,
804 499, 499, 499, 499, 499, 499, 119, 118, 117, 74,
805 354, 106, 487, 487, 487, 487, 487, 487, 487, 487,
806 452, 354, 105, 488, 488, 488, 488, 488, 488, 488,
807 488, 489, 104, 103, 100, 490, 490, 490, 490, 490,
808 161, 500, 500, 500, 500, 500, 501, 498, 498, 88,
809 76, 75, 74, 554, 490, 490, 490, 490, 490, 490,
811 494, 495, 496, 494, 494, 494, 494, 494, 554, 554,
812 554, 554, 497, 497, 497, 497, 497, 472, 554, 554,
813 554, 472, 554, 472, 472, 554, 554, 472, 554, 554,
814 554, 497, 497, 497, 497, 497, 497, 554, 475, 472,
815 472, 472, 475, 554, 475, 475, 554, 554, 475, 480,
816 480, 480, 480, 480, 480, 480, 480, 554, 554, 554,
817 475, 475, 475, 507, 554, 508, 508, 508, 508, 508,
818 508, 508, 508, 554, 554, 554, 554, 512, 74, 513,
819 513, 513, 513, 513, 513, 513, 513, 161, 498, 498,
820 498, 498, 498, 498, 74, 507, 554, 509, 509, 509,
822 509, 509, 509, 509, 509, 512, 554, 514, 514, 514,
823 514, 514, 514, 514, 514, 512, 554, 515, 515, 515,
824 515, 515, 516, 513, 513, 554, 74, 507, 554, 510,
825 510, 510, 510, 510, 511, 508, 508, 497, 497, 497,
826 497, 497, 497, 497, 497, 522, 522, 522, 522, 522,
827 522, 522, 522, 554, 554, 554, 554, 554, 74, 354,
828 554, 519, 519, 519, 519, 519, 519, 519, 519, 489,
829 354, 554, 520, 520, 520, 520, 520, 520, 520, 520,
830 554, 554, 554, 554, 521, 521, 521, 521, 521, 554,
831 554, 521, 521, 521, 521, 521, 521, 521, 521, 554,
833 554, 554, 554, 521, 521, 521, 521, 521, 521, 161,
834 498, 498, 498, 498, 498, 498, 498, 498, 161, 498,
835 498, 498, 498, 498, 498, 498, 498, 526, 527, 528,
836 526, 526, 526, 526, 526, 554, 507, 554, 508, 508,
837 508, 508, 508, 508, 529, 530, 531, 529, 529, 529,
838 529, 529, 554, 554, 554, 554, 74, 507, 554, 508,
839 508, 508, 508, 508, 508, 508, 508, 74, 512, 554,
840 513, 513, 513, 513, 513, 513, 513, 513, 512, 554,
841 513, 513, 513, 513, 513, 513, 513, 513, 74, 507,
842 554, 508, 508, 508, 508, 508, 508, 508, 508, 512,
844 554, 513, 513, 513, 513, 513, 513, 354, 554, 534,
845 534, 534, 534, 534, 534, 534, 534, 554, 554, 554,
846 74, 536, 554, 537, 537, 537, 537, 537, 537, 537,
847 537, 541, 541, 541, 541, 541, 541, 541, 541, 542,
848 542, 542, 542, 542, 542, 542, 542, 554, 554, 554,
849 554, 554, 74, 536, 554, 538, 538, 538, 538, 538,
850 538, 538, 538, 543, 543, 543, 543, 543, 544, 541,
851 541, 548, 549, 550, 548, 548, 548, 548, 548, 554,
852 554, 554, 554, 554, 74, 536, 554, 539, 539, 539,
853 539, 539, 540, 537, 537, 554, 554, 554, 554, 536,
855 74, 537, 537, 537, 537, 537, 537, 541, 541, 541,
856 541, 541, 541, 541, 541, 554, 74, 536, 554, 537,
857 537, 537, 537, 537, 537, 537, 537, 554, 554, 554,
858 74, 541, 541, 541, 541, 541, 541, 541, 541, 551,
859 551, 551, 551, 551, 551, 551, 551, 554, 74, 536,
860 554, 537, 537, 537, 537, 537, 537, 537, 537, 548,
861 548, 548, 548, 548, 548, 548, 548, 554, 74, 552,
862 552, 552, 552, 552, 553, 551, 551, 554, 554, 554,
863 74, 551, 551, 551, 551, 551, 551, 554, 74, 551,
864 551, 551, 551, 551, 551, 551, 551, 554, 74, 554,
866 554, 554, 554, 554, 554, 554, 554, 554, 554, 554,
867 74, 554, 554, 554, 554, 554, 554, 554, 74, 52,
868 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
869 52, 52, 52, 31, 31, 31, 31, 31, 31, 31,
870 31, 31, 31, 31, 31, 31, 31, 61, 61, 61,
871 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
872 61, 68, 68, 68, 68, 68, 68, 68, 68, 68,
873 68, 68, 68, 68, 68, 73, 554, 554, 554, 73,
874 554, 73, 73, 73, 554, 554, 73, 73, 73, 77,
875 77, 554, 77, 77, 77, 77, 77, 77, 77, 77,
877 77, 77, 77, 80, 80, 80, 80, 80, 80, 80,
878 80, 80, 80, 80, 80, 80, 80, 84, 554, 554,
879 554, 84, 554, 84, 84, 84, 84, 554, 84, 84,
880 84, 87, 554, 554, 554, 87, 554, 87, 87, 87,
881 554, 554, 87, 87, 87, 89, 554, 554, 89, 89,
882 89, 89, 89, 89, 554, 554, 89, 89, 89, 99,
883 99, 554, 554, 554, 99, 124, 554, 554, 124, 124,
884 124, 124, 124, 124, 554, 554, 124, 124, 124, 128,
885 554, 554, 128, 128, 128, 128, 128, 128, 554, 128,
886 554, 128, 128, 136, 554, 554, 136, 554, 136, 136,
888 136, 136, 136, 554, 136, 136, 136, 140, 140, 140,
889 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
890 140, 142, 142, 554, 142, 554, 142, 142, 142, 142,
891 142, 142, 142, 142, 142, 78, 78, 554, 78, 78,
892 78, 78, 78, 78, 78, 78, 78, 78, 78, 150,
893 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
894 150, 150, 150, 151, 151, 554, 151, 151, 151, 151,
895 151, 151, 151, 151, 151, 151, 151, 152, 554, 554,
896 554, 152, 554, 152, 152, 152, 554, 554, 152, 152,
897 152, 90, 554, 554, 90, 90, 90, 90, 90, 90,
899 554, 554, 90, 90, 90, 160, 160, 554, 554, 554,
900 160, 162, 162, 162, 554, 554, 554, 162, 125, 554,
901 554, 125, 125, 125, 125, 125, 125, 554, 554, 125,
902 125, 125, 186, 186, 186, 186, 186, 186, 186, 186,
903 186, 186, 186, 186, 186, 186, 193, 193, 554, 554,
904 554, 193, 199, 199, 199, 554, 554, 554, 199, 227,
905 227, 554, 554, 554, 227, 228, 228, 554, 554, 554,
906 228, 232, 232, 554, 554, 554, 232, 234, 234, 234,
907 554, 554, 554, 234, 267, 267, 554, 554, 554, 267,
908 269, 269, 554, 554, 554, 269, 270, 270, 554, 554,
910 554, 270, 272, 272, 272, 554, 554, 554, 272, 276,
911 276, 276, 276, 554, 554, 554, 276, 304, 304, 554,
912 554, 554, 304, 305, 305, 554, 554, 554, 305, 306,
913 306, 554, 554, 554, 306, 318, 318, 318, 554, 554,
914 554, 318, 319, 319, 319, 319, 554, 554, 554, 319,
915 352, 352, 554, 554, 554, 352, 353, 353, 554, 554,
916 554, 353, 369, 369, 369, 554, 554, 554, 369, 370,
917 370, 370, 370, 554, 554, 554, 370, 395, 395, 554,
918 554, 554, 395, 399, 554, 399, 399, 554, 554, 554,
919 399, 417, 417, 417, 554, 554, 554, 417, 418, 418,
921 418, 418, 554, 554, 554, 418, 448, 448, 554, 554,
922 554, 448, 449, 554, 449, 449, 554, 554, 554, 449,
923 465, 465, 465, 554, 554, 554, 465, 466, 466, 466,
924 554, 554, 554, 554, 466, 472, 554, 554, 472, 472,
925 554, 472, 472, 472, 554, 554, 472, 472, 472, 475,
926 554, 554, 475, 475, 554, 475, 475, 475, 554, 554,
927 475, 475, 475, 485, 485, 554, 554, 554, 485, 486,
928 554, 486, 486, 554, 554, 554, 486, 502, 502, 554,
929 554, 554, 554, 502, 504, 504, 504, 504, 504, 504,
930 504, 504, 504, 504, 504, 504, 504, 504, 517, 517,
932 554, 554, 554, 517, 518, 554, 518, 518, 554, 554,
933 554, 518, 532, 532, 554, 554, 554, 532, 533, 554,
934 533, 554, 554, 554, 554, 533, 546, 546, 546, 546,
935 546, 546, 546, 546, 546, 546, 546, 546, 546, 546,
936 13, 554, 554, 554, 554, 554, 554, 554, 554, 554,
937 554, 554, 554, 554, 554, 554, 554, 554, 554, 554,
938 554, 554, 554, 554, 554, 554, 554, 554, 554, 554,
939 554, 554, 554, 554, 554, 554, 554, 554, 554, 554,
940 554, 554, 554, 554, 554, 554, 554, 554, 554, 554,
941 554, 554, 554, 554, 554, 554, 554, 554, 554, 554,
946 static yyconst short int yy_chk[3604] =
948 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
949 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
950 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
951 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
952 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
953 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
954 1, 1, 2, 3, 4, 116, 2, 3, 4, 551,
955 5, 5, 5, 119, 5, 20, 3, 4, 59, 59,
956 5, 11, 11, 11, 11, 6, 6, 6, 119, 6,
957 2, 2, 5, 5, 2, 6, 20, 84, 2, 40,
959 51, 2, 12, 12, 12, 12, 63, 6, 6, 70,
960 25, 67, 67, 5, 25, 25, 40, 51, 84, 116,
961 109, 3, 4, 65, 11, 109, 63, 69, 6, 7,
962 7, 7, 25, 7, 27, 27, 27, 27, 27, 27,
963 27, 27, 121, 65, 432, 12, 72, 72, 121, 72,
964 70, 25, 28, 28, 28, 28, 28, 28, 39, 117,
965 39, 39, 39, 39, 39, 39, 39, 39, 41, 348,
966 69, 117, 7, 7, 7, 7, 7, 7, 7, 7,
967 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
968 8, 8, 8, 100, 8, 432, 41, 41, 127, 348,
970 41, 178, 100, 127, 41, 49, 178, 41, 49, 49,
971 49, 49, 49, 49, 49, 49, 82, 82, 82, 82,
972 82, 82, 82, 82, 83, 83, 83, 83, 83, 83,
973 83, 83, 118, 8, 8, 8, 8, 8, 8, 8,
974 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
975 8, 9, 9, 9, 9, 9, 120, 130, 130, 50,
976 9, 9, 9, 50, 50, 57, 57, 57, 120, 57,
977 118, 104, 144, 57, 9, 57, 104, 222, 104, 89,
978 171, 50, 162, 89, 89, 134, 134, 57, 57, 146,
979 146, 162, 222, 171, 9, 10, 10, 10, 10, 10,
981 50, 89, 182, 145, 10, 10, 10, 74, 57, 74,
982 181, 74, 181, 74, 74, 144, 182, 74, 10, 177,
983 89, 96, 96, 96, 96, 96, 96, 96, 96, 74,
984 74, 74, 98, 98, 98, 98, 98, 98, 10, 18,
985 184, 18, 18, 18, 145, 18, 18, 546, 86, 18,
986 86, 180, 86, 184, 86, 86, 110, 199, 86, 535,
987 192, 18, 18, 18, 124, 177, 199, 180, 124, 124,
988 259, 86, 86, 97, 97, 97, 97, 97, 97, 97,
989 97, 192, 18, 19, 110, 110, 124, 259, 110, 258,
990 107, 107, 110, 19, 207, 110, 19, 19, 19, 19,
992 19, 19, 19, 19, 26, 124, 26, 26, 26, 26,
993 26, 26, 26, 26, 26, 188, 207, 213, 26, 26,
994 26, 26, 26, 213, 260, 92, 92, 92, 92, 92,
995 92, 92, 92, 107, 260, 26, 263, 26, 26, 26,
996 26, 26, 26, 32, 220, 220, 188, 32, 258, 32,
997 360, 360, 32, 32, 92, 32, 32, 32, 32, 32,
998 32, 32, 32, 32, 32, 32, 32, 263, 534, 32,
999 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
1000 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
1001 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
1003 32, 32, 32, 32, 32, 34, 34, 34, 34, 34,
1004 34, 34, 34, 34, 196, 196, 196, 34, 34, 34,
1005 34, 34, 123, 123, 123, 123, 123, 123, 123, 123,
1006 254, 299, 532, 141, 141, 254, 34, 34, 34, 34,
1007 34, 34, 38, 38, 38, 219, 38, 299, 38, 38,
1008 223, 88, 38, 88, 234, 88, 223, 88, 88, 236,
1009 236, 88, 521, 234, 38, 38, 38, 42, 137, 236,
1010 520, 137, 137, 88, 88, 88, 141, 42, 137, 221,
1011 42, 42, 42, 42, 42, 42, 42, 42, 91, 518,
1012 91, 137, 91, 343, 91, 91, 517, 219, 91, 126,
1014 221, 126, 247, 126, 154, 126, 126, 434, 154, 126,
1015 91, 91, 91, 345, 154, 238, 238, 221, 42, 58,
1016 298, 126, 126, 126, 247, 238, 154, 154, 345, 58,
1017 298, 513, 58, 58, 58, 58, 58, 58, 58, 58,
1018 77, 343, 77, 77, 77, 289, 77, 77, 434, 292,
1019 77, 133, 133, 133, 133, 133, 133, 133, 133, 272,
1020 261, 504, 77, 77, 77, 261, 276, 289, 272, 294,
1021 153, 292, 153, 293, 153, 276, 153, 153, 294, 388,
1022 153, 388, 297, 77, 93, 93, 93, 93, 93, 93,
1023 93, 93, 153, 153, 153, 293, 93, 93, 93, 93,
1025 93, 187, 187, 187, 187, 187, 187, 187, 187, 203,
1026 203, 203, 203, 203, 203, 93, 93, 93, 93, 93,
1027 93, 101, 101, 101, 101, 101, 101, 101, 101, 297,
1028 187, 387, 387, 101, 101, 101, 101, 101, 191, 435,
1029 191, 191, 191, 191, 191, 191, 244, 244, 244, 244,
1030 244, 244, 101, 101, 101, 101, 101, 101, 155, 300,
1031 155, 155, 155, 155, 155, 155, 155, 155, 300, 191,
1032 200, 200, 200, 200, 200, 200, 200, 200, 183, 387,
1033 435, 355, 183, 406, 406, 420, 420, 502, 183, 155,
1034 156, 355, 156, 156, 156, 156, 156, 156, 156, 156,
1036 183, 183, 195, 195, 195, 195, 195, 195, 195, 195,
1037 195, 202, 202, 202, 202, 202, 202, 202, 202, 421,
1038 421, 156, 157, 357, 157, 157, 157, 157, 157, 157,
1039 157, 157, 205, 357, 205, 205, 205, 205, 205, 205,
1040 205, 205, 229, 229, 229, 229, 229, 229, 229, 229,
1041 229, 340, 498, 157, 158, 318, 158, 158, 158, 158,
1042 158, 158, 158, 158, 318, 424, 424, 340, 158, 158,
1043 158, 158, 158, 235, 235, 235, 235, 235, 235, 235,
1044 235, 286, 286, 286, 286, 286, 286, 158, 158, 158,
1045 158, 158, 158, 161, 161, 161, 161, 161, 161, 161,
1047 161, 161, 456, 456, 470, 161, 161, 161, 161, 161,
1048 237, 237, 237, 237, 237, 237, 237, 237, 310, 310,
1049 310, 310, 310, 310, 161, 161, 161, 161, 161, 161,
1050 163, 163, 163, 163, 163, 163, 163, 163, 163, 163,
1051 467, 467, 486, 163, 163, 163, 163, 163, 241, 241,
1052 241, 241, 241, 241, 241, 241, 332, 336, 241, 485,
1053 470, 346, 163, 163, 163, 163, 163, 163, 164, 164,
1054 164, 164, 164, 164, 164, 164, 338, 346, 332, 336,
1055 164, 164, 164, 164, 164, 243, 243, 243, 243, 243,
1056 243, 243, 243, 472, 382, 471, 277, 277, 338, 164,
1058 164, 164, 164, 164, 164, 189, 277, 189, 189, 189,
1059 189, 189, 189, 189, 189, 246, 382, 246, 246, 246,
1060 246, 246, 246, 246, 246, 262, 262, 262, 262, 262,
1061 262, 262, 262, 469, 472, 433, 189, 190, 319, 190,
1062 190, 190, 190, 190, 190, 190, 190, 319, 278, 278,
1063 433, 437, 493, 493, 262, 280, 280, 266, 278, 266,
1064 266, 266, 266, 266, 266, 280, 506, 506, 190, 201,
1065 201, 201, 201, 201, 201, 201, 201, 201, 201, 201,
1066 320, 320, 437, 201, 201, 201, 201, 201, 266, 273,
1067 320, 273, 273, 273, 273, 273, 273, 273, 273, 524,
1069 524, 468, 201, 201, 201, 201, 201, 201, 204, 204,
1070 204, 204, 204, 204, 204, 204, 204, 204, 344, 568,
1071 568, 204, 204, 204, 204, 204, 274, 344, 274, 274,
1072 274, 274, 274, 274, 274, 274, 466, 321, 321, 449,
1073 204, 204, 204, 204, 204, 204, 224, 321, 224, 224,
1074 224, 224, 224, 224, 224, 224, 275, 383, 275, 275,
1075 275, 275, 275, 275, 275, 275, 279, 279, 279, 279,
1076 279, 279, 279, 279, 425, 448, 444, 224, 225, 383,
1077 225, 225, 225, 225, 225, 225, 225, 225, 283, 283,
1078 283, 283, 283, 283, 283, 283, 425, 400, 283, 285,
1080 285, 285, 285, 285, 285, 285, 285, 400, 508, 225,
1081 226, 401, 226, 226, 226, 226, 226, 226, 226, 226,
1082 288, 401, 288, 288, 288, 288, 288, 288, 288, 288,
1083 307, 307, 307, 307, 307, 307, 307, 307, 429, 508,
1084 413, 226, 239, 239, 239, 239, 239, 239, 239, 239,
1085 239, 239, 239, 242, 242, 242, 242, 242, 242, 242,
1086 242, 242, 242, 242, 399, 395, 390, 242, 242, 242,
1087 242, 242, 309, 309, 309, 309, 309, 309, 309, 309,
1088 329, 329, 329, 329, 329, 329, 242, 242, 242, 242,
1089 242, 242, 245, 245, 245, 245, 245, 245, 245, 245,
1091 245, 245, 369, 386, 385, 245, 245, 245, 245, 245,
1092 312, 369, 312, 312, 312, 312, 312, 312, 312, 312,
1093 384, 323, 323, 353, 245, 245, 245, 245, 245, 245,
1094 264, 323, 264, 264, 264, 264, 264, 264, 264, 264,
1095 313, 313, 313, 313, 313, 313, 313, 313, 315, 370,
1096 315, 315, 315, 315, 315, 315, 315, 315, 370, 352,
1097 342, 264, 265, 403, 265, 265, 265, 265, 265, 265,
1098 265, 265, 316, 403, 316, 316, 316, 316, 316, 316,
1099 316, 316, 317, 417, 317, 317, 317, 317, 317, 317,
1100 431, 431, 417, 265, 271, 271, 271, 271, 271, 271,
1102 271, 271, 271, 431, 341, 335, 271, 271, 271, 271,
1103 271, 322, 322, 322, 322, 322, 322, 322, 322, 363,
1104 363, 363, 363, 363, 363, 271, 271, 271, 271, 271,
1105 271, 281, 281, 281, 281, 281, 281, 281, 281, 281,
1106 281, 281, 284, 284, 284, 284, 284, 284, 284, 284,
1107 284, 284, 284, 334, 314, 306, 284, 284, 284, 284,
1108 284, 326, 326, 326, 326, 326, 326, 326, 326, 427,
1109 305, 326, 304, 296, 295, 284, 284, 284, 284, 284,
1110 284, 287, 287, 287, 287, 287, 287, 287, 287, 287,
1111 287, 427, 291, 290, 287, 287, 287, 287, 287, 328,
1113 328, 328, 328, 328, 328, 328, 328, 380, 380, 380,
1114 380, 380, 380, 287, 287, 287, 287, 287, 287, 301,
1115 301, 301, 301, 301, 301, 301, 301, 301, 331, 270,
1116 331, 331, 331, 331, 331, 331, 331, 331, 347, 347,
1117 347, 347, 347, 347, 347, 347, 525, 525, 537, 301,
1118 302, 302, 302, 302, 302, 302, 302, 302, 302, 525,
1119 351, 351, 351, 351, 351, 351, 351, 347, 354, 354,
1120 354, 354, 354, 354, 354, 354, 269, 268, 267, 537,
1121 302, 303, 303, 303, 303, 303, 303, 303, 303, 303,
1122 351, 356, 356, 356, 356, 356, 356, 356, 356, 362,
1124 362, 362, 362, 362, 362, 362, 362, 257, 619, 256,
1125 255, 303, 308, 619, 308, 308, 308, 308, 308, 308,
1126 308, 308, 308, 418, 253, 252, 308, 308, 308, 308,
1127 308, 365, 418, 365, 365, 365, 365, 365, 365, 365,
1128 365, 251, 250, 249, 233, 308, 308, 308, 308, 308,
1129 308, 311, 311, 311, 311, 311, 311, 311, 311, 311,
1130 232, 231, 230, 311, 311, 311, 311, 311, 366, 450,
1131 366, 366, 366, 366, 366, 366, 366, 366, 228, 450,
1132 227, 218, 311, 311, 311, 311, 311, 311, 324, 324,
1133 324, 324, 324, 324, 324, 324, 324, 324, 324, 327,
1135 327, 327, 327, 327, 327, 327, 327, 327, 327, 327,
1136 217, 216, 215, 327, 327, 327, 327, 327, 367, 451,
1137 367, 367, 367, 367, 367, 367, 367, 367, 473, 451,
1138 214, 212, 327, 327, 327, 327, 327, 327, 330, 330,
1139 330, 330, 330, 330, 330, 330, 330, 371, 371, 211,
1140 210, 330, 330, 330, 330, 330, 368, 371, 368, 368,
1141 368, 368, 368, 368, 368, 368, 209, 208, 206, 473,
1142 330, 330, 330, 330, 330, 330, 349, 349, 349, 349,
1143 349, 349, 349, 349, 349, 372, 372, 373, 373, 373,
1144 373, 373, 373, 373, 373, 372, 379, 379, 379, 379,
1146 379, 379, 379, 379, 198, 197, 349, 350, 350, 350,
1147 350, 350, 350, 350, 350, 350, 374, 374, 377, 377,
1148 377, 377, 377, 377, 377, 377, 374, 381, 377, 381,
1149 381, 381, 381, 381, 381, 381, 381, 350, 358, 475,
1150 358, 358, 358, 358, 358, 358, 358, 358, 358, 361,
1151 453, 361, 361, 361, 361, 361, 361, 361, 361, 361,
1152 453, 194, 193, 361, 361, 361, 361, 361, 396, 465,
1153 396, 396, 396, 396, 396, 396, 396, 396, 465, 186,
1154 475, 185, 361, 361, 361, 361, 361, 361, 364, 364,
1155 364, 364, 364, 364, 364, 364, 364, 179, 176, 175,
1157 364, 364, 364, 364, 364, 397, 487, 397, 397, 397,
1158 397, 397, 397, 397, 397, 174, 487, 173, 172, 364,
1159 364, 364, 364, 364, 364, 375, 375, 375, 375, 375,
1160 375, 375, 375, 375, 375, 375, 378, 378, 378, 378,
1161 378, 378, 378, 378, 378, 378, 170, 419, 419, 169,
1162 378, 378, 378, 378, 378, 389, 398, 419, 398, 398,
1163 398, 398, 398, 398, 398, 398, 481, 481, 481, 378,
1164 378, 378, 378, 378, 378, 389, 168, 389, 389, 402,
1165 402, 402, 402, 402, 402, 402, 402, 408, 408, 408,
1166 408, 408, 408, 408, 408, 481, 389, 391, 167, 391,
1168 391, 391, 391, 391, 391, 391, 391, 409, 409, 409,
1169 409, 409, 409, 411, 488, 411, 411, 411, 411, 411,
1170 411, 411, 411, 166, 488, 165, 160, 159, 391, 392,
1171 152, 392, 392, 392, 392, 392, 392, 392, 392, 412,
1172 412, 412, 412, 412, 412, 412, 412, 414, 490, 414,
1173 414, 414, 414, 414, 414, 414, 414, 151, 490, 150,
1174 392, 393, 519, 393, 393, 393, 393, 393, 393, 393,
1175 393, 415, 519, 415, 415, 415, 415, 415, 415, 415,
1176 415, 416, 148, 416, 416, 416, 416, 416, 416, 430,
1177 147, 143, 393, 394, 142, 394, 394, 394, 394, 394,
1179 394, 394, 394, 459, 459, 459, 459, 459, 459, 430,
1180 140, 430, 430, 136, 129, 125, 442, 122, 442, 442,
1181 442, 115, 114, 113, 394, 404, 112, 404, 404, 404,
1182 404, 404, 404, 404, 404, 404, 407, 111, 407, 407,
1183 407, 407, 407, 407, 407, 407, 407, 442, 106, 105,
1184 407, 407, 407, 407, 407, 436, 436, 436, 436, 436,
1185 436, 436, 436, 496, 496, 496, 496, 496, 496, 407,
1186 407, 407, 407, 407, 407, 410, 410, 410, 410, 410,
1187 410, 410, 410, 410, 436, 103, 99, 410, 410, 410,
1188 410, 410, 443, 443, 443, 443, 443, 443, 443, 443,
1190 544, 544, 544, 544, 544, 544, 410, 410, 410, 410,
1191 410, 410, 422, 422, 422, 422, 422, 422, 422, 422,
1192 422, 422, 438, 95, 438, 438, 438, 438, 438, 438,
1193 438, 438, 445, 94, 445, 445, 445, 445, 445, 445,
1194 445, 445, 446, 90, 446, 446, 446, 446, 446, 446,
1195 446, 446, 87, 438, 439, 85, 439, 439, 439, 439,
1196 439, 439, 439, 439, 447, 80, 447, 447, 447, 447,
1197 447, 447, 452, 452, 452, 452, 452, 452, 452, 452,
1198 79, 78, 76, 75, 73, 439, 440, 68, 440, 440,
1199 440, 440, 440, 440, 440, 440, 458, 458, 458, 458,
1201 458, 458, 458, 458, 461, 61, 461, 461, 461, 461,
1202 461, 461, 461, 461, 54, 48, 47, 440, 441, 46,
1203 441, 441, 441, 441, 441, 441, 441, 441, 462, 462,
1204 462, 462, 462, 462, 462, 462, 462, 463, 463, 463,
1205 463, 463, 463, 463, 463, 463, 45, 44, 43, 441,
1206 454, 37, 454, 454, 454, 454, 454, 454, 454, 454,
1207 454, 457, 36, 457, 457, 457, 457, 457, 457, 457,
1208 457, 457, 35, 33, 29, 457, 457, 457, 457, 457,
1209 464, 464, 464, 464, 464, 464, 464, 464, 464, 23,
1210 17, 15, 14, 13, 457, 457, 457, 457, 457, 457,
1212 460, 460, 460, 460, 460, 460, 460, 460, 0, 0,
1213 0, 0, 460, 460, 460, 460, 460, 474, 0, 0,
1214 0, 474, 0, 474, 474, 0, 0, 474, 0, 0,
1215 0, 460, 460, 460, 460, 460, 460, 0, 476, 474,
1216 474, 474, 476, 0, 476, 476, 0, 0, 476, 480,
1217 480, 480, 480, 480, 480, 480, 480, 0, 0, 0,
1218 476, 476, 476, 477, 0, 477, 477, 477, 477, 477,
1219 477, 477, 477, 0, 0, 0, 0, 482, 480, 482,
1220 482, 482, 482, 482, 482, 482, 482, 501, 501, 501,
1221 501, 501, 501, 501, 477, 478, 0, 478, 478, 478,
1223 478, 478, 478, 478, 478, 483, 0, 483, 483, 483,
1224 483, 483, 483, 483, 483, 484, 0, 484, 484, 484,
1225 484, 484, 484, 484, 484, 0, 478, 479, 0, 479,
1226 479, 479, 479, 479, 479, 479, 479, 489, 489, 489,
1227 489, 489, 489, 489, 489, 495, 495, 495, 495, 495,
1228 495, 495, 495, 0, 0, 0, 0, 0, 479, 491,
1229 0, 491, 491, 491, 491, 491, 491, 491, 491, 491,
1230 494, 0, 494, 494, 494, 494, 494, 494, 494, 494,
1231 0, 0, 0, 0, 494, 494, 494, 494, 494, 497,
1232 0, 497, 497, 497, 497, 497, 497, 497, 497, 0,
1234 0, 0, 0, 494, 494, 494, 494, 494, 494, 499,
1235 499, 499, 499, 499, 499, 499, 499, 499, 500, 500,
1236 500, 500, 500, 500, 500, 500, 500, 507, 507, 507,
1237 507, 507, 507, 507, 507, 0, 511, 0, 511, 511,
1238 511, 511, 511, 511, 512, 512, 512, 512, 512, 512,
1239 512, 512, 0, 0, 0, 0, 507, 509, 0, 509,
1240 509, 509, 509, 509, 509, 509, 509, 511, 514, 0,
1241 514, 514, 514, 514, 514, 514, 514, 514, 515, 0,
1242 515, 515, 515, 515, 515, 515, 515, 515, 509, 510,
1243 0, 510, 510, 510, 510, 510, 510, 510, 510, 516,
1245 0, 516, 516, 516, 516, 516, 516, 522, 0, 522,
1246 522, 522, 522, 522, 522, 522, 522, 0, 0, 0,
1247 510, 526, 0, 526, 526, 526, 526, 526, 526, 526,
1248 526, 529, 529, 529, 529, 529, 529, 529, 529, 530,
1249 530, 530, 530, 530, 530, 530, 530, 0, 0, 0,
1250 0, 0, 526, 527, 0, 527, 527, 527, 527, 527,
1251 527, 527, 527, 531, 531, 531, 531, 531, 531, 531,
1252 531, 536, 536, 536, 536, 536, 536, 536, 536, 0,
1253 0, 0, 0, 0, 527, 528, 0, 528, 528, 528,
1254 528, 528, 528, 528, 528, 0, 0, 0, 0, 540,
1256 536, 540, 540, 540, 540, 540, 540, 542, 542, 542,
1257 542, 542, 542, 542, 542, 0, 528, 538, 0, 538,
1258 538, 538, 538, 538, 538, 538, 538, 0, 0, 0,
1259 540, 543, 543, 543, 543, 543, 543, 543, 543, 548,
1260 548, 548, 548, 548, 548, 548, 548, 0, 538, 539,
1261 0, 539, 539, 539, 539, 539, 539, 539, 539, 549,
1262 549, 549, 549, 549, 549, 549, 549, 0, 548, 550,
1263 550, 550, 550, 550, 550, 550, 550, 0, 0, 0,
1264 539, 553, 553, 553, 553, 553, 553, 0, 549, 552,
1265 552, 552, 552, 552, 552, 552, 552, 0, 550, 0,
1267 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1268 553, 0, 0, 0, 0, 0, 0, 0, 552, 555,
1269 555, 555, 555, 555, 555, 555, 555, 555, 555, 555,
1270 555, 555, 555, 556, 556, 556, 556, 556, 556, 556,
1271 556, 556, 556, 556, 556, 556, 556, 557, 557, 557,
1272 557, 557, 557, 557, 557, 557, 557, 557, 557, 557,
1273 557, 558, 558, 558, 558, 558, 558, 558, 558, 558,
1274 558, 558, 558, 558, 558, 559, 0, 0, 0, 559,
1275 0, 559, 559, 559, 0, 0, 559, 559, 559, 560,
1276 560, 0, 560, 560, 560, 560, 560, 560, 560, 560,
1278 560, 560, 560, 561, 561, 561, 561, 561, 561, 561,
1279 561, 561, 561, 561, 561, 561, 561, 562, 0, 0,
1280 0, 562, 0, 562, 562, 562, 562, 0, 562, 562,
1281 562, 563, 0, 0, 0, 563, 0, 563, 563, 563,
1282 0, 0, 563, 563, 563, 564, 0, 0, 564, 564,
1283 564, 564, 564, 564, 0, 0, 564, 564, 564, 565,
1284 565, 0, 0, 0, 565, 566, 0, 0, 566, 566,
1285 566, 566, 566, 566, 0, 0, 566, 566, 566, 567,
1286 0, 0, 567, 567, 567, 567, 567, 567, 0, 567,
1287 0, 567, 567, 569, 0, 0, 569, 0, 569, 569,
1289 569, 569, 569, 0, 569, 569, 569, 570, 570, 570,
1290 570, 570, 570, 570, 570, 570, 570, 570, 570, 570,
1291 570, 571, 571, 0, 571, 0, 571, 571, 571, 571,
1292 571, 571, 571, 571, 571, 572, 572, 0, 572, 572,
1293 572, 572, 572, 572, 572, 572, 572, 572, 572, 573,
1294 573, 573, 573, 573, 573, 573, 573, 573, 573, 573,
1295 573, 573, 573, 574, 574, 0, 574, 574, 574, 574,
1296 574, 574, 574, 574, 574, 574, 574, 575, 0, 0,
1297 0, 575, 0, 575, 575, 575, 0, 0, 575, 575,
1298 575, 576, 0, 0, 576, 576, 576, 576, 576, 576,
1300 0, 0, 576, 576, 576, 577, 577, 0, 0, 0,
1301 577, 578, 578, 578, 0, 0, 0, 578, 579, 0,
1302 0, 579, 579, 579, 579, 579, 579, 0, 0, 579,
1303 579, 579, 580, 580, 580, 580, 580, 580, 580, 580,
1304 580, 580, 580, 580, 580, 580, 581, 581, 0, 0,
1305 0, 581, 582, 582, 582, 0, 0, 0, 582, 583,
1306 583, 0, 0, 0, 583, 584, 584, 0, 0, 0,
1307 584, 585, 585, 0, 0, 0, 585, 586, 586, 586,
1308 0, 0, 0, 586, 587, 587, 0, 0, 0, 587,
1309 588, 588, 0, 0, 0, 588, 589, 589, 0, 0,
1311 0, 589, 590, 590, 590, 0, 0, 0, 590, 591,
1312 591, 591, 591, 0, 0, 0, 591, 592, 592, 0,
1313 0, 0, 592, 593, 593, 0, 0, 0, 593, 594,
1314 594, 0, 0, 0, 594, 595, 595, 595, 0, 0,
1315 0, 595, 596, 596, 596, 596, 0, 0, 0, 596,
1316 597, 597, 0, 0, 0, 597, 598, 598, 0, 0,
1317 0, 598, 599, 599, 599, 0, 0, 0, 599, 600,
1318 600, 600, 600, 0, 0, 0, 600, 601, 601, 0,
1319 0, 0, 601, 602, 0, 602, 602, 0, 0, 0,
1320 602, 603, 603, 603, 0, 0, 0, 603, 604, 604,
1322 604, 604, 0, 0, 0, 604, 605, 605, 0, 0,
1323 0, 605, 606, 0, 606, 606, 0, 0, 0, 606,
1324 607, 607, 607, 0, 0, 0, 607, 608, 608, 608,
1325 0, 0, 0, 0, 608, 609, 0, 0, 609, 609,
1326 0, 609, 609, 609, 0, 0, 609, 609, 609, 610,
1327 0, 0, 610, 610, 0, 610, 610, 610, 0, 0,
1328 610, 610, 610, 611, 611, 0, 0, 0, 611, 612,
1329 0, 612, 612, 0, 0, 0, 612, 613, 613, 0,
1330 0, 0, 0, 613, 614, 614, 614, 614, 614, 614,
1331 614, 614, 614, 614, 614, 614, 614, 614, 615, 615,
1333 0, 0, 0, 615, 616, 0, 616, 616, 0, 0,
1334 0, 616, 617, 617, 0, 0, 0, 617, 618, 0,
1335 618, 0, 0, 0, 0, 618, 620, 620, 620, 620,
1336 620, 620, 620, 620, 620, 620, 620, 620, 620, 620,
1337 554, 554, 554, 554, 554, 554, 554, 554, 554, 554,
1338 554, 554, 554, 554, 554, 554, 554, 554, 554, 554,
1339 554, 554, 554, 554, 554, 554, 554, 554, 554, 554,
1340 554, 554, 554, 554, 554, 554, 554, 554, 554, 554,
1341 554, 554, 554, 554, 554, 554, 554, 554, 554, 554,
1342 554, 554, 554, 554, 554, 554, 554, 554, 554, 554,
1347 static yy_state_type yy_last_accepting_state;
1348 static char *yy_last_accepting_cpos;
1350 /* The intent behind this definition is that it'll catch
1351 * any uses of REJECT which flex missed.
1353 #define REJECT reject_used_but_not_detected
1354 #define yymore() yymore_used_but_not_detected
1355 #define YY_MORE_ADJ 0
1356 #define YY_RESTORE_YY_MORE_OFFSET
1362 * Copyright (c) 1996, 1998-2005, 2007-2010
1363 * Todd C. Miller <Todd.Miller@courtesan.com>
1365 * Permission to use, copy, modify, and distribute this software for any
1366 * purpose with or without fee is hereby granted, provided that the above
1367 * copyright notice and this permission notice appear in all copies.
1369 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
1370 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
1371 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
1372 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1373 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
1374 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1375 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1376 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
1377 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
1378 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1380 * Sponsored in part by the Defense Advanced Research Projects
1381 * Agency (DARPA) and Air Force Research Laboratory, Air Force
1382 * Materiel Command, USAF, under agreement number F39502-99-1-0512.
1387 #include <sys/types.h>
1388 #include <sys/param.h>
1389 #include <sys/stat.h>
1392 # include <stdlib.h>
1393 # include <stddef.h>
1395 # ifdef HAVE_STDLIB_H
1396 # include <stdlib.h>
1398 #endif /* STDC_HEADERS */
1399 #ifdef HAVE_STRING_H
1400 # include <string.h>
1401 #endif /* HAVE_STRING_H */
1402 #ifdef HAVE_STRINGS_H
1403 # include <strings.h>
1404 #endif /* HAVE_STRINGS_H */
1405 #ifdef HAVE_UNISTD_H
1406 # include <unistd.h>
1407 #endif /* HAVE_UNISTD_H */
1408 #if defined(HAVE_MALLOC_H) && !defined(STDC_HEADERS)
1409 # include <malloc.h>
1410 #endif /* HAVE_MALLOC_H && !STDC_HEADERS */
1411 #ifdef HAVE_DIRENT_H
1412 # include <dirent.h>
1413 # define NAMLEN(dirent) strlen((dirent)->d_name)
1415 # define dirent direct
1416 # define NAMLEN(dirent) (dirent)->d_namlen
1417 # ifdef HAVE_SYS_NDIR_H
1418 # include <sys/ndir.h>
1420 # ifdef HAVE_SYS_DIR_H
1421 # include <sys/dir.h>
1432 extern YYSTYPE yylval;
1433 extern int parse_error;
1436 static int sawspace = 0;
1437 static int arg_len = 0;
1438 static int arg_size = 0;
1440 static int append __P((char *, int));
1441 static int _fill __P((char *, int, int));
1442 static int fill_cmnd __P((char *, int));
1443 static int fill_args __P((char *, int, int));
1444 static int _push_include __P((char *, int));
1445 static int pop_include __P((void));
1446 static int ipv6_valid __P((const char *s));
1447 static char *parse_include __P((char *));
1448 extern void yyerror __P((const char *));
1450 #define fill(a, b) _fill(a, b, 0)
1452 #define push_include(_p) (_push_include((_p), FALSE))
1453 #define push_includedir(_p) (_push_include((_p), TRUE))
1455 /* realloc() to size + COMMANDARGINC to make room for command args */
1456 #define COMMANDARGINC 64
1459 #define LEXTRACE(msg) fputs(msg, stderr)
1461 #define LEXTRACE(msg)
1463 #define YY_NO_UNPUT 1
1474 #line 1475 "lex.yy.c"
1476 /* Macros after this point can all be overridden by user definitions in
1480 #ifndef YY_SKIP_YYWRAP
1482 extern "C" int yywrap YY_PROTO(( void ));
1484 extern int yywrap YY_PROTO(( void ));
1489 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
1493 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
1496 #ifdef YY_NEED_STRLEN
1497 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
1502 static int yyinput YY_PROTO(( void ));
1504 static int input YY_PROTO(( void ));
1508 #if defined(YY_STACK_USED) && YY_STACK_USED
1509 static int yy_start_stack_ptr = 0;
1510 static int yy_start_stack_depth = 0;
1511 static int *yy_start_stack = 0;
1512 #ifndef YY_NO_PUSH_STATE
1513 static void yy_push_state YY_PROTO(( int new_state ));
1515 #ifndef YY_NO_POP_STATE
1516 static void yy_pop_state YY_PROTO(( void ));
1518 #ifndef YY_NO_TOP_STATE
1519 static int yy_top_state YY_PROTO(( void ));
1523 #define YY_NO_PUSH_STATE 1
1524 #define YY_NO_POP_STATE 1
1525 #define YY_NO_TOP_STATE 1
1528 #ifdef YY_MALLOC_DECL
1536 /* Just try to get by without declaring the routines. This will fail
1537 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
1538 * or sizeof(void*) != sizeof(int).
1543 /* Amount of stuff to slurp up with each read. */
1544 #ifndef YY_READ_BUF_SIZE
1545 #define YY_READ_BUF_SIZE 8192
1548 /* Copy whatever the last rule matched to the standard output. */
1551 /* This used to be an fputs(), but since the string might contain NUL's,
1552 * we now use fwrite().
1554 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
1557 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1558 * is returned in "result".
1561 #define YY_INPUT(buf,result,max_size) \
1562 if ( yy_current_buffer->yy_is_interactive ) \
1565 for ( n = 0; n < max_size && \
1566 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1567 buf[n] = (char) c; \
1569 buf[n++] = (char) c; \
1570 if ( c == EOF && ferror( yyin ) ) \
1571 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1574 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
1575 && ferror( yyin ) ) \
1576 YY_FATAL_ERROR( "input in flex scanner failed" );
1579 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1580 * we don't want an extra ';' after the "return" because that will cause
1581 * some compilers to complain about unreachable statements.
1584 #define yyterminate() return YY_NULL
1587 /* Number of entries by which start-condition stack grows. */
1588 #ifndef YY_START_STACK_INCR
1589 #define YY_START_STACK_INCR 25
1592 /* Report a fatal error. */
1593 #ifndef YY_FATAL_ERROR
1594 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1597 /* Default declaration of generated scanner - a define so the user can
1598 * easily add parameters.
1601 #define YY_DECL int yylex YY_PROTO(( void ))
1604 /* Code executed at the beginning of each rule, after yytext and yyleng
1607 #ifndef YY_USER_ACTION
1608 #define YY_USER_ACTION
1611 /* Code executed at the end of each rule. */
1613 #define YY_BREAK break;
1616 #define YY_RULE_SETUP \
1618 yy_current_buffer->yy_at_bol = \
1619 (yytext[yyleng - 1] == '\n'); \
1624 register yy_state_type yy_current_state;
1625 register char *yy_cp, *yy_bp;
1626 register int yy_act;
1630 #line 1631 "lex.yy.c"
1641 yy_start = 1; /* first start state */
1649 if ( ! yy_current_buffer )
1651 yy_create_buffer( yyin, YY_BUF_SIZE );
1653 yy_load_buffer_state();
1656 while ( 1 ) /* loops until end-of-file is reached */
1660 /* Support of yytext. */
1661 *yy_cp = yy_hold_char;
1663 /* yy_bp points to the position in yy_ch_buf of the start of
1668 yy_current_state = yy_start;
1669 yy_current_state += YY_AT_BOL();
1673 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1674 if ( yy_accept[yy_current_state] )
1676 yy_last_accepting_state = yy_current_state;
1677 yy_last_accepting_cpos = yy_cp;
1679 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1681 yy_current_state = (int) yy_def[yy_current_state];
1682 if ( yy_current_state >= 555 )
1683 yy_c = yy_meta[(unsigned int) yy_c];
1685 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1688 while ( yy_base[yy_current_state] != 3541 );
1691 yy_act = yy_accept[yy_current_state];
1693 { /* have to back up */
1694 yy_cp = yy_last_accepting_cpos;
1695 yy_current_state = yy_last_accepting_state;
1696 yy_act = yy_accept[yy_current_state];
1699 YY_DO_BEFORE_ACTION;
1702 do_action: /* This label is used only to access EOF actions. */
1706 { /* beginning of action switch */
1707 case 0: /* must back up */
1708 /* undo the effects of YY_DO_BEFORE_ACTION */
1709 *yy_cp = yy_hold_char;
1710 yy_cp = yy_last_accepting_cpos;
1711 yy_current_state = yy_last_accepting_state;
1712 goto yy_find_action;
1724 LEXTRACE("DEFVAR ");
1725 if (!fill(yytext, yyleng))
1768 LEXTRACE("BEGINSTR ");
1769 yylval.string = NULL;
1777 LEXTRACE("WORD(2) ");
1778 if (!fill(yytext, yyleng))
1789 /* Line continuation char followed by newline. */
1798 LEXTRACE("ENDSTR ");
1807 LEXTRACE("BACKSLASH ");
1808 if (!append(yytext, yyleng))
1816 LEXTRACE("STRBODY ");
1817 if (!append(yytext, yyleng))
1827 /* quoted fnmatch glob char, pass verbatim */
1828 LEXTRACE("QUOTEDCHAR ");
1829 if (!fill_args(yytext, 2, sawspace))
1838 /* quoted sudoers special char, strip backslash */
1839 LEXTRACE("QUOTEDCHAR ");
1840 if (!fill_args(yytext + 1, 1, sawspace))
1852 } /* end of command line args */
1859 if (!fill_args(yytext, yyleng, sawspace))
1862 } /* a command line arg */
1871 if ((path = parse_include(yytext)) == NULL)
1874 LEXTRACE("INCLUDE\n");
1876 /* Push current buffer and switch to include file */
1877 if (!push_include(path))
1887 if ((path = parse_include(yytext)) == NULL)
1890 LEXTRACE("INCLUDEDIR\n");
1893 * Push current buffer and switch to include file.
1894 * We simply ignore empty directories.
1896 if (!push_includedir(path) && parse_error)
1905 for (n = 0; isblank((unsigned char)yytext[n]); n++)
1909 switch (yytext[n++]) {
1912 LEXTRACE("DEFAULTS_USER ");
1913 return(DEFAULTS_USER);
1916 LEXTRACE("DEFAULTS_RUNAS ");
1917 return(DEFAULTS_RUNAS);
1920 LEXTRACE("DEFAULTS_HOST ");
1921 return(DEFAULTS_HOST);
1924 LEXTRACE("DEFAULTS_CMND ");
1925 return(DEFAULTS_CMND);
1927 LEXTRACE("DEFAULTS ");
1937 for (n = 0; isblank((unsigned char)yytext[n]); n++)
1939 switch (yytext[n]) {
1941 LEXTRACE("HOSTALIAS ");
1944 LEXTRACE("CMNDALIAS ");
1947 LEXTRACE("USERALIAS ");
1950 LEXTRACE("RUNASALIAS ");
1959 /* cmnd does not require passwd for this user */
1960 LEXTRACE("NOPASSWD ");
1968 /* cmnd requires passwd for this user */
1969 LEXTRACE("PASSWD ");
1977 LEXTRACE("NOEXEC ");
1993 LEXTRACE("SETENV ");
2001 LEXTRACE("NOSETENV ");
2010 if (!fill(yytext, yyleng))
2012 LEXTRACE("NETGROUP ");
2021 if (!fill(yytext, yyleng))
2023 LEXTRACE("USERGROUP ");
2031 if (!fill(yytext, yyleng))
2033 LEXTRACE("NTWKADDR ");
2041 if (!fill(yytext, yyleng))
2043 LEXTRACE("NTWKADDR ");
2051 if (!ipv6_valid(yytext)) {
2055 if (!fill(yytext, yyleng))
2057 LEXTRACE("NTWKADDR ");
2065 if (!ipv6_valid(yytext)) {
2069 if (!fill(yytext, yyleng))
2071 LEXTRACE("NTWKADDR ");
2079 if (strcmp(yytext, "ALL") == 0) {
2084 /* XXX - restrict type/role to initial state */
2085 if (strcmp(yytext, "TYPE") == 0) {
2089 if (strcmp(yytext, "ROLE") == 0) {
2093 #endif /* HAVE_SELINUX */
2094 if (!fill(yytext, yyleng))
2104 /* no command args allowed for Defaults!/path */
2105 if (!fill_cmnd(yytext, yyleng))
2107 LEXTRACE("COMMAND ");
2116 LEXTRACE("COMMAND ");
2117 if (!fill_cmnd(yytext, yyleng))
2125 /* directories can't have args... */
2126 if (yytext[yyleng - 1] == '/') {
2127 LEXTRACE("COMMAND ");
2128 if (!fill_cmnd(yytext, yyleng))
2133 LEXTRACE("COMMAND ");
2134 if (!fill_cmnd(yytext, yyleng))
2143 /* a quoted user/group name */
2144 if (!fill(yytext + 1, yyleng - 2))
2146 switch (yytext[1]) {
2148 LEXTRACE("USERGROUP ");
2151 LEXTRACE("NETGROUP ");
2154 LEXTRACE("WORD(4) ");
2164 if (!fill(yytext, yyleng))
2166 LEXTRACE("WORD(5) ");
2214 if (yyleng % 2 == 1)
2215 return('!'); /* return '!' */
2226 } /* return newline */
2231 { /* throw away space/tabs */
2232 sawspace = TRUE; /* but remember for fill_args */
2239 sawspace = TRUE; /* remember for fill_args */
2242 } /* throw away EOL after \ */
2252 } /* comment, not uid/gid */
2262 case YY_STATE_EOF(INITIAL):
2263 case YY_STATE_EOF(GOTDEFS):
2264 case YY_STATE_EOF(GOTCMND):
2265 case YY_STATE_EOF(STARTDEFS):
2266 case YY_STATE_EOF(INDEFS):
2267 case YY_STATE_EOF(INSTR):
2270 if (YY_START != INITIAL) {
2284 #line 2285 "lex.yy.c"
2286 case YY_END_OF_BUFFER:
2288 /* Amount of text matched not including the EOB char. */
2289 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
2291 /* Undo the effects of YY_DO_BEFORE_ACTION. */
2292 *yy_cp = yy_hold_char;
2293 YY_RESTORE_YY_MORE_OFFSET
2295 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
2297 /* We're scanning a new file or input source. It's
2298 * possible that this happened because the user
2299 * just pointed yyin at a new source and called
2300 * yylex(). If so, then we have to assure
2301 * consistency between yy_current_buffer and our
2302 * globals. Here is the right place to do so, because
2303 * this is the first action (other than possibly a
2304 * back-up) that will match for the new input source.
2306 yy_n_chars = yy_current_buffer->yy_n_chars;
2307 yy_current_buffer->yy_input_file = yyin;
2308 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
2311 /* Note that here we test for yy_c_buf_p "<=" to the position
2312 * of the first EOB in the buffer, since yy_c_buf_p will
2313 * already have been incremented past the NUL character
2314 * (since all states make transitions on EOB to the
2315 * end-of-buffer state). Contrast this with the test
2318 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
2319 { /* This was really a NUL. */
2320 yy_state_type yy_next_state;
2322 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
2324 yy_current_state = yy_get_previous_state();
2326 /* Okay, we're now positioned to make the NUL
2327 * transition. We couldn't have
2328 * yy_get_previous_state() go ahead and do it
2329 * for us because it doesn't know how to deal
2330 * with the possibility of jamming (and we don't
2331 * want to build jamming into it because then it
2332 * will run more slowly).
2335 yy_next_state = yy_try_NUL_trans( yy_current_state );
2337 yy_bp = yytext_ptr + YY_MORE_ADJ;
2339 if ( yy_next_state )
2341 /* Consume the NUL. */
2342 yy_cp = ++yy_c_buf_p;
2343 yy_current_state = yy_next_state;
2350 goto yy_find_action;
2354 else switch ( yy_get_next_buffer() )
2356 case EOB_ACT_END_OF_FILE:
2358 yy_did_buffer_switch_on_eof = 0;
2362 /* Note: because we've taken care in
2363 * yy_get_next_buffer() to have set up
2364 * yytext, we can now set up
2365 * yy_c_buf_p so that if some total
2366 * hoser (like flex itself) wants to
2367 * call the scanner after we return the
2368 * YY_NULL, it'll still work - another
2369 * YY_NULL will get returned.
2371 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
2373 yy_act = YY_STATE_EOF(YY_START);
2379 if ( ! yy_did_buffer_switch_on_eof )
2385 case EOB_ACT_CONTINUE_SCAN:
2387 yytext_ptr + yy_amount_of_matched_text;
2389 yy_current_state = yy_get_previous_state();
2392 yy_bp = yytext_ptr + YY_MORE_ADJ;
2395 case EOB_ACT_LAST_MATCH:
2397 &yy_current_buffer->yy_ch_buf[yy_n_chars];
2399 yy_current_state = yy_get_previous_state();
2402 yy_bp = yytext_ptr + YY_MORE_ADJ;
2403 goto yy_find_action;
2410 "fatal flex scanner internal error--no action found" );
2411 } /* end of action switch */
2412 } /* end of scanning one token */
2413 } /* end of yylex */
2416 /* yy_get_next_buffer - try to read in a new buffer
2418 * Returns a code representing an action:
2419 * EOB_ACT_LAST_MATCH -
2420 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2421 * EOB_ACT_END_OF_FILE - end of file
2424 static int yy_get_next_buffer()
2426 register char *dest = yy_current_buffer->yy_ch_buf;
2427 register char *source = yytext_ptr;
2428 register int number_to_move, i;
2431 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
2433 "fatal flex scanner internal error--end of buffer missed" );
2435 if ( yy_current_buffer->yy_fill_buffer == 0 )
2436 { /* Don't try to fill the buffer, so this is an EOF. */
2437 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
2439 /* We matched a single character, the EOB, so
2440 * treat this as a final EOF.
2442 return EOB_ACT_END_OF_FILE;
2447 /* We matched some text prior to the EOB, first
2450 return EOB_ACT_LAST_MATCH;
2454 /* Try to read more data. */
2456 /* First move last chars to start of buffer. */
2457 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
2459 for ( i = 0; i < number_to_move; ++i )
2460 *(dest++) = *(source++);
2462 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2463 /* don't do the read, it's not guaranteed to return an EOF,
2466 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
2471 yy_current_buffer->yy_buf_size - number_to_move - 1;
2473 while ( num_to_read <= 0 )
2474 { /* Not enough room in the buffer - grow it. */
2475 #ifdef YY_USES_REJECT
2477 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
2480 /* just a shorter name for the current buffer */
2481 YY_BUFFER_STATE b = yy_current_buffer;
2483 int yy_c_buf_p_offset =
2484 (int) (yy_c_buf_p - b->yy_ch_buf);
2486 if ( b->yy_is_our_buffer )
2488 int new_size = b->yy_buf_size * 2;
2490 if ( new_size <= 0 )
2491 b->yy_buf_size += b->yy_buf_size / 8;
2493 b->yy_buf_size *= 2;
2495 b->yy_ch_buf = (char *)
2496 /* Include room in for 2 EOB chars. */
2497 yy_flex_realloc( (void *) b->yy_ch_buf,
2498 b->yy_buf_size + 2 );
2501 /* Can't grow it, we don't own it. */
2504 if ( ! b->yy_ch_buf )
2506 "fatal error - scanner input buffer overflow" );
2508 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
2510 num_to_read = yy_current_buffer->yy_buf_size -
2515 if ( num_to_read > YY_READ_BUF_SIZE )
2516 num_to_read = YY_READ_BUF_SIZE;
2518 /* Read in more data. */
2519 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
2520 yy_n_chars, num_to_read );
2522 yy_current_buffer->yy_n_chars = yy_n_chars;
2525 if ( yy_n_chars == 0 )
2527 if ( number_to_move == YY_MORE_ADJ )
2529 ret_val = EOB_ACT_END_OF_FILE;
2535 ret_val = EOB_ACT_LAST_MATCH;
2536 yy_current_buffer->yy_buffer_status =
2537 YY_BUFFER_EOF_PENDING;
2542 ret_val = EOB_ACT_CONTINUE_SCAN;
2544 yy_n_chars += number_to_move;
2545 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
2546 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
2548 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
2554 /* yy_get_previous_state - get the state just before the EOB char was reached */
2556 static yy_state_type yy_get_previous_state()
2558 register yy_state_type yy_current_state;
2559 register char *yy_cp;
2561 yy_current_state = yy_start;
2562 yy_current_state += YY_AT_BOL();
2564 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
2566 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2567 if ( yy_accept[yy_current_state] )
2569 yy_last_accepting_state = yy_current_state;
2570 yy_last_accepting_cpos = yy_cp;
2572 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2574 yy_current_state = (int) yy_def[yy_current_state];
2575 if ( yy_current_state >= 555 )
2576 yy_c = yy_meta[(unsigned int) yy_c];
2578 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2581 return yy_current_state;
2585 /* yy_try_NUL_trans - try to make a transition on the NUL character
2588 * next_state = yy_try_NUL_trans( current_state );
2591 #ifdef YY_USE_PROTOS
2592 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
2594 static yy_state_type yy_try_NUL_trans( yy_current_state )
2595 yy_state_type yy_current_state;
2598 register int yy_is_jam;
2599 register char *yy_cp = yy_c_buf_p;
2601 register YY_CHAR yy_c = 1;
2602 if ( yy_accept[yy_current_state] )
2604 yy_last_accepting_state = yy_current_state;
2605 yy_last_accepting_cpos = yy_cp;
2607 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2609 yy_current_state = (int) yy_def[yy_current_state];
2610 if ( yy_current_state >= 555 )
2611 yy_c = yy_meta[(unsigned int) yy_c];
2613 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2614 yy_is_jam = (yy_current_state == 554);
2616 return yy_is_jam ? 0 : yy_current_state;
2621 #ifdef YY_USE_PROTOS
2622 static void yyunput( int c, register char *yy_bp )
2624 static void yyunput( c, yy_bp )
2626 register char *yy_bp;
2629 register char *yy_cp = yy_c_buf_p;
2631 /* undo effects of setting up yytext */
2632 *yy_cp = yy_hold_char;
2634 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2635 { /* need to shift things up to make room */
2636 /* +2 for EOB chars. */
2637 register int number_to_move = yy_n_chars + 2;
2638 register char *dest = &yy_current_buffer->yy_ch_buf[
2639 yy_current_buffer->yy_buf_size + 2];
2640 register char *source =
2641 &yy_current_buffer->yy_ch_buf[number_to_move];
2643 while ( source > yy_current_buffer->yy_ch_buf )
2644 *--dest = *--source;
2646 yy_cp += (int) (dest - source);
2647 yy_bp += (int) (dest - source);
2648 yy_current_buffer->yy_n_chars =
2649 yy_n_chars = yy_current_buffer->yy_buf_size;
2651 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2652 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2655 *--yy_cp = (char) c;
2659 yy_hold_char = *yy_cp;
2662 #endif /* ifndef YY_NO_UNPUT */
2666 static int yyinput()
2673 *yy_c_buf_p = yy_hold_char;
2675 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
2677 /* yy_c_buf_p now points to the character we want to return.
2678 * If this occurs *before* the EOB characters, then it's a
2679 * valid NUL; if not, then we've hit the end of the buffer.
2681 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
2682 /* This was really a NUL. */
2686 { /* need more input */
2687 int offset = yy_c_buf_p - yytext_ptr;
2690 switch ( yy_get_next_buffer() )
2692 case EOB_ACT_LAST_MATCH:
2693 /* This happens because yy_g_n_b()
2694 * sees that we've accumulated a
2695 * token and flags that we need to
2696 * try matching the token before
2697 * proceeding. But for input(),
2698 * there's no matching to consider.
2699 * So convert the EOB_ACT_LAST_MATCH
2700 * to EOB_ACT_END_OF_FILE.
2703 /* Reset buffer status. */
2708 case EOB_ACT_END_OF_FILE:
2713 if ( ! yy_did_buffer_switch_on_eof )
2722 case EOB_ACT_CONTINUE_SCAN:
2723 yy_c_buf_p = yytext_ptr + offset;
2729 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
2730 *yy_c_buf_p = '\0'; /* preserve yytext */
2731 yy_hold_char = *++yy_c_buf_p;
2733 yy_current_buffer->yy_at_bol = (c == '\n');
2739 #ifdef YY_USE_PROTOS
2740 void yyrestart( FILE *input_file )
2742 void yyrestart( input_file )
2746 if ( ! yy_current_buffer )
2747 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
2749 yy_init_buffer( yy_current_buffer, input_file );
2750 yy_load_buffer_state();
2754 #ifdef YY_USE_PROTOS
2755 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
2757 void yy_switch_to_buffer( new_buffer )
2758 YY_BUFFER_STATE new_buffer;
2761 if ( yy_current_buffer == new_buffer )
2764 if ( yy_current_buffer )
2766 /* Flush out information for old buffer. */
2767 *yy_c_buf_p = yy_hold_char;
2768 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
2769 yy_current_buffer->yy_n_chars = yy_n_chars;
2772 yy_current_buffer = new_buffer;
2773 yy_load_buffer_state();
2775 /* We don't actually know whether we did this switch during
2776 * EOF (yywrap()) processing, but the only time this flag
2777 * is looked at is after yywrap() is called, so it's safe
2778 * to go ahead and always set it.
2780 yy_did_buffer_switch_on_eof = 1;
2784 #ifdef YY_USE_PROTOS
2785 void yy_load_buffer_state( void )
2787 void yy_load_buffer_state()
2790 yy_n_chars = yy_current_buffer->yy_n_chars;
2791 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
2792 yyin = yy_current_buffer->yy_input_file;
2793 yy_hold_char = *yy_c_buf_p;
2797 #ifdef YY_USE_PROTOS
2798 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
2800 YY_BUFFER_STATE yy_create_buffer( file, size )
2807 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2809 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2811 b->yy_buf_size = size;
2813 /* yy_ch_buf has to be 2 characters longer than the size given because
2814 * we need to put in 2 end-of-buffer characters.
2816 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
2817 if ( ! b->yy_ch_buf )
2818 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2820 b->yy_is_our_buffer = 1;
2822 yy_init_buffer( b, file );
2828 #ifdef YY_USE_PROTOS
2829 void yy_delete_buffer( YY_BUFFER_STATE b )
2831 void yy_delete_buffer( b )
2838 if ( b == yy_current_buffer )
2839 yy_current_buffer = (YY_BUFFER_STATE) 0;
2841 if ( b->yy_is_our_buffer )
2842 yy_flex_free( (void *) b->yy_ch_buf );
2844 yy_flex_free( (void *) b );
2848 #ifndef YY_ALWAYS_INTERACTIVE
2849 #ifndef YY_NEVER_INTERACTIVE
2854 #ifdef YY_USE_PROTOS
2855 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
2857 void yy_init_buffer( b, file )
2866 yy_flush_buffer( b );
2868 b->yy_input_file = file;
2869 b->yy_fill_buffer = 1;
2871 #if defined(YY_ALWAYS_INTERACTIVE) && YY_ALWAYS_INTERACTIVE
2872 b->yy_is_interactive = 1;
2874 #if defined(YY_NEVER_INTERACTIVE) && YY_NEVER_INTERACTIVE
2875 b->yy_is_interactive = 0;
2877 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2884 #ifdef YY_USE_PROTOS
2885 void yy_flush_buffer( YY_BUFFER_STATE b )
2887 void yy_flush_buffer( b )
2897 /* We always need two end-of-buffer characters. The first causes
2898 * a transition to the end-of-buffer state. The second causes
2899 * a jam in that state.
2901 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2902 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2904 b->yy_buf_pos = &b->yy_ch_buf[0];
2907 b->yy_buffer_status = YY_BUFFER_NEW;
2909 if ( b == yy_current_buffer )
2910 yy_load_buffer_state();
2914 #ifndef YY_NO_SCAN_BUFFER
2915 #ifdef YY_USE_PROTOS
2916 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
2918 YY_BUFFER_STATE yy_scan_buffer( base, size )
2926 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2927 base[size-1] != YY_END_OF_BUFFER_CHAR )
2928 /* They forgot to leave room for the EOB's. */
2931 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2933 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2935 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2936 b->yy_buf_pos = b->yy_ch_buf = base;
2937 b->yy_is_our_buffer = 0;
2938 b->yy_input_file = 0;
2939 b->yy_n_chars = b->yy_buf_size;
2940 b->yy_is_interactive = 0;
2942 b->yy_fill_buffer = 0;
2943 b->yy_buffer_status = YY_BUFFER_NEW;
2945 yy_switch_to_buffer( b );
2952 #ifndef YY_NO_SCAN_STRING
2953 #ifdef YY_USE_PROTOS
2954 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
2956 YY_BUFFER_STATE yy_scan_string( yy_str )
2957 yyconst char *yy_str;
2961 for ( len = 0; yy_str[len]; ++len )
2964 return yy_scan_bytes( yy_str, len );
2969 #ifndef YY_NO_SCAN_BYTES
2970 #ifdef YY_USE_PROTOS
2971 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
2973 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
2974 yyconst char *bytes;
2983 /* Get memory for full buffer, including space for trailing EOB's. */
2985 buf = (char *) yy_flex_alloc( n );
2987 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2989 for ( i = 0; i < len; ++i )
2992 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
2994 b = yy_scan_buffer( buf, n );
2996 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2998 /* It's okay to grow etc. this buffer, and we should throw it
2999 * away when we're done.
3001 b->yy_is_our_buffer = 1;
3008 #ifndef YY_NO_PUSH_STATE
3009 #ifdef YY_USE_PROTOS
3010 static void yy_push_state( int new_state )
3012 static void yy_push_state( new_state )
3016 if ( yy_start_stack_ptr >= yy_start_stack_depth )
3020 yy_start_stack_depth += YY_START_STACK_INCR;
3021 new_size = yy_start_stack_depth * sizeof( int );
3023 if ( ! yy_start_stack )
3024 yy_start_stack = (int *) yy_flex_alloc( new_size );
3027 yy_start_stack = (int *) yy_flex_realloc(
3028 (void *) yy_start_stack, new_size );
3030 if ( ! yy_start_stack )
3032 "out of memory expanding start-condition stack" );
3035 yy_start_stack[yy_start_stack_ptr++] = YY_START;
3042 #ifndef YY_NO_POP_STATE
3043 static void yy_pop_state()
3045 if ( --yy_start_stack_ptr < 0 )
3046 YY_FATAL_ERROR( "start-condition stack underflow" );
3048 BEGIN(yy_start_stack[yy_start_stack_ptr]);
3053 #ifndef YY_NO_TOP_STATE
3054 static int yy_top_state()
3056 return yy_start_stack[yy_start_stack_ptr - 1];
3060 #ifndef YY_EXIT_FAILURE
3061 #define YY_EXIT_FAILURE 2
3064 #ifdef YY_USE_PROTOS
3065 static void yy_fatal_error( yyconst char msg[] )
3067 static void yy_fatal_error( msg )
3071 (void) fprintf( stderr, "%s\n", msg );
3072 exit( YY_EXIT_FAILURE );
3077 /* Redefine yyless() so it works in section 3 code. */
3083 /* Undo effects of setting up yytext. */ \
3084 yytext[yyleng] = yy_hold_char; \
3085 yy_c_buf_p = yytext + n; \
3086 yy_hold_char = *yy_c_buf_p; \
3087 *yy_c_buf_p = '\0'; \
3093 /* Internal utility routines. */
3096 #ifdef YY_USE_PROTOS
3097 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
3099 static void yy_flex_strncpy( s1, s2, n )
3106 for ( i = 0; i < n; ++i )
3111 #ifdef YY_NEED_STRLEN
3112 #ifdef YY_USE_PROTOS
3113 static int yy_flex_strlen( yyconst char *s )
3115 static int yy_flex_strlen( s )
3120 for ( n = 0; s[n]; ++n )
3128 #ifdef YY_USE_PROTOS
3129 static void *yy_flex_alloc( yy_size_t size )
3131 static void *yy_flex_alloc( size )
3135 return (void *) malloc( size );
3138 #ifdef YY_USE_PROTOS
3139 static void *yy_flex_realloc( void *ptr, yy_size_t size )
3141 static void *yy_flex_realloc( ptr, size )
3146 /* The cast to (char *) in the following accommodates both
3147 * implementations that use char* generic pointers, and those
3148 * that use void* generic pointers. It works with the latter
3149 * because both ANSI C and C++ allow castless assignment from
3150 * any pointer type to void*, and deal with argument conversions
3151 * as though doing an assignment.
3153 return (void *) realloc( (char *) ptr, size );
3156 #ifdef YY_USE_PROTOS
3157 static void yy_flex_free( void *ptr )
3159 static void yy_flex_free( ptr )
3166 #if defined(YY_MAIN) && YY_MAIN
3175 static unsigned char
3182 s += 2; /* skip \\x */
3183 for (i = 0; i < 2; i++) {
3218 return((unsigned char)result);
3222 _fill(src, len, olen)
3228 dst = olen ? realloc(yylval.string, olen + len + 1) : malloc(len + 1);
3230 yyerror("unable to allocate memory");
3233 yylval.string = dst;
3235 /* Copy the string and collapse any escaped characters. */
3238 if (*src == '\\' && len) {
3239 if (src[1] == 'x' && len >= 3 &&
3240 isxdigit((unsigned char) src[2]) &&
3241 isxdigit((unsigned char) src[3])) {
3242 *dst++ = hexchar(src);
3265 if (yylval.string != NULL)
3266 olen = strlen(yylval.string);
3268 return(_fill(src, len, olen));
3271 #define SPECIAL(c) \
3272 ((c) == ',' || (c) == ':' || (c) == '=' || (c) == ' ' || (c) == '\t' || (c) == '#')
3282 arg_len = arg_size = 0;
3284 dst = yylval.command.cmnd = (char *) malloc(len + 1);
3285 if (yylval.command.cmnd == NULL) {
3286 yyerror("unable to allocate memory");
3290 /* Copy the string and collapse any escaped sudo-specific characters. */
3291 for (i = 0; i < len; i++) {
3292 if (src[i] == '\\' && i != len - 1 && SPECIAL(src[i + 1]))
3299 yylval.command.args = NULL;
3304 fill_args(s, len, addspace)
3312 if (yylval.command.args == NULL) {
3316 new_len = arg_len + len + addspace;
3318 if (new_len >= arg_size) {
3319 /* Allocate more space than we need for subsequent args */
3320 while (new_len >= (arg_size += COMMANDARGINC))
3323 p = yylval.command.args ?
3324 (char *) realloc(yylval.command.args, arg_size) :
3325 (char *) malloc(arg_size);
3327 efree(yylval.command.args);
3328 yyerror("unable to allocate memory");
3331 yylval.command.args = p;
3334 /* Efficiently append the arg (with a leading space if needed). */
3335 p = yylval.command.args + arg_len;
3338 if (strlcpy(p, s, arg_size - (p - yylval.command.args)) != len) {
3339 yyerror("fill_args: buffer overflow"); /* paranoia */
3348 struct path_list *next;
3351 struct include_stack {
3354 struct path_list *more; /* more files in case of includedir */
3364 const struct path_list * const *p1 = v1;
3365 const struct path_list * const *p2 = v2;
3367 return(strcmp((*p1)->path, (*p2)->path));
3371 switch_dir(stack, dirpath)
3372 struct include_stack *stack;
3378 struct dirent *dent;
3380 struct path_list *pl, *first = NULL;
3381 struct path_list **sorted = NULL;
3383 if (!(dir = opendir(dirpath))) {
3387 while ((dent = readdir(dir))) {
3388 /* Ignore files that end in '~' or have a '.' in them. */
3389 if (dent->d_name[0] == '\0' || dent->d_name[NAMLEN(dent) - 1] == '~'
3390 || strchr(dent->d_name, '.') != NULL) {
3393 if (asprintf(&path, "%s/%s", dirpath, dent->d_name) == -1) {
3397 if (stat(path, &sb) != 0 || !S_ISREG(sb.st_mode)) {
3401 pl = malloc(sizeof(*pl));
3414 /* Sort the list as an array. */
3415 sorted = malloc(sizeof(*sorted) * count);
3419 for (i = 0; i < count; i++) {
3423 qsort(sorted, count, sizeof(*sorted), pl_compare);
3425 /* Apply sorting to the list. */
3427 sorted[count - 1]->next = NULL;
3428 for (i = 1; i < count; i++)
3429 sorted[i - 1]->next = sorted[i];
3432 /* Pull out the first element for parsing, leave the rest for later. */
3445 while (first != NULL) {
3457 #define MAX_SUDOERS_DEPTH 128
3458 #define SUDOERS_STACK_INCREMENT 16
3460 static size_t istacksize, idepth;
3461 static struct include_stack *istack;
3462 static int keepopen;
3467 struct path_list *pl;
3471 while ((pl = istack[idepth].more) != NULL) {
3472 istack[idepth].more = pl->next;
3476 efree(istack[idepth].path);
3477 if (idepth && !istack[idepth].keepopen)
3478 fclose(istack[idepth].bs->yy_input_file);
3479 yy_delete_buffer(istack[idepth].bs);
3483 istacksize = idepth = 0;
3488 _push_include(path, isdir)
3492 struct path_list *pl;
3495 /* push current state onto stack */
3496 if (idepth >= istacksize) {
3497 if (idepth > MAX_SUDOERS_DEPTH) {
3498 yyerror("too many levels of includes");
3501 istacksize += SUDOERS_STACK_INCREMENT;
3502 istack = (struct include_stack *) realloc(istack,
3503 sizeof(*istack) * istacksize);
3504 if (istack == NULL) {
3505 yyerror("unable to allocate memory");
3510 if (!(path = switch_dir(&istack[idepth], path))) {
3511 /* switch_dir() called yyerror() for us */
3514 while ((fp = open_sudoers(path, FALSE, &keepopen)) == NULL) {
3515 /* Unable to open path in includedir, go to next one, if any. */
3517 if ((pl = istack[idepth].more) == NULL)
3520 istack[idepth].more = pl->next;
3524 if ((fp = open_sudoers(path, TRUE, &keepopen)) == NULL) {
3528 istack[idepth].more = NULL;
3530 /* Push the old (current) file and open the new one. */
3531 istack[idepth].path = sudoers; /* push old path */
3532 istack[idepth].bs = YY_CURRENT_BUFFER;
3533 istack[idepth].lineno = sudolineno;
3534 istack[idepth].keepopen = keepopen;
3538 yy_switch_to_buffer(yy_create_buffer(fp, YY_BUF_SIZE));
3546 struct path_list *pl;
3553 fclose(YY_CURRENT_BUFFER->yy_input_file);
3554 yy_delete_buffer(YY_CURRENT_BUFFER);
3555 /* If we are in an include dir, move to the next file. */
3556 while ((pl = istack[idepth - 1].more) != NULL) {
3557 fp = open_sudoers(pl->path, FALSE, &keepopen);
3559 istack[idepth - 1].more = pl->next;
3563 yy_switch_to_buffer(yy_create_buffer(fp, YY_BUF_SIZE));
3567 /* Unable to open path in include dir, go to next one. */
3568 istack[idepth - 1].more = pl->next;
3572 /* If no path list, just pop the last dir on the stack. */
3575 yy_switch_to_buffer(istack[idepth].bs);
3577 sudoers = istack[idepth].path;
3578 sudolineno = istack[idepth].lineno;
3579 keepopen = istack[idepth].keepopen;
3588 char *cp, *ep, *path;
3589 int len = 0, subst = 0;
3590 size_t shost_len = 0;
3592 /* Pull out path from #include line. */
3593 cp = base + sizeof("#include");
3595 cp += 3; /* includedir */
3596 while (isblank((unsigned char) *cp))
3599 while (*ep != '\0' && !isspace((unsigned char) *ep)) {
3600 if (ep[0] == '%' && ep[1] == 'h') {
3601 shost_len = strlen(user_shost);
3602 len += shost_len - 2;
3608 /* Make a copy of path and return it. */
3609 len += (int)(ep - cp);
3610 if ((path = malloc(len + 1)) == NULL)
3611 yyerror("unable to allocate memory");
3613 /* substitute for %h */
3616 if (cp[0] == '%' && cp[1] == 'h') {
3617 memcpy(pp, user_shost, shost_len);
3626 memcpy(path, cp, len);
3630 /* Push any excess characters (e.g. comment, newline) back to the lexer */
3632 yyless((int)(ep - base));
3638 * Check to make sure an IPv6 address does not contain multiple instances
3639 * of the string "::". Assumes strlen(s) >= 1.
3640 * Returns TRUE if address is valid else FALSE.
3648 for (; *s != '\0'; s++) {
3649 if (s[0] == ':' && s[1] == ':') {
3654 nmatch = 0; /* reset if we hit netmask */
3657 return (nmatch <= 1);