1 /* A lexical scanner generated by flex */
3 /* Scanner skeleton version:
8 #define YY_FLEX_MAJOR_VERSION 2
9 #define YY_FLEX_MINOR_VERSION 5
14 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
27 /* Use prototypes in function declarations. */
30 /* The "const" storage-class-modifier is valid. */
33 #else /* ! __cplusplus */
41 #endif /* ! __cplusplus */
60 #define YY_PROTO(proto) proto
62 #define YY_PROTO(proto) ()
65 /* Returned upon end-of-file. */
68 /* Promotes a possibly negative, possibly signed char to an unsigned
69 * integer for use as an array index. If the signed char is negative,
70 * we want to instead treat it as an 8-bit unsigned char, hence the
73 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
75 /* Enter a start condition. This macro really ought to take a parameter,
76 * but we do it the disgusting crufty way forced on us by the ()-less
77 * definition of BEGIN.
79 #define BEGIN yy_start = 1 + 2 *
81 /* Translate the current start state into a value that can be later handed
82 * to BEGIN to return to the state. The YYSTATE alias is for lex
85 #define YY_START ((yy_start - 1) / 2)
86 #define YYSTATE YY_START
88 /* Action number for EOF rule of a given start state. */
89 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
91 /* Special action meaning "start processing a new file". */
92 #define YY_NEW_FILE yyrestart( yyin )
94 #define YY_END_OF_BUFFER_CHAR 0
96 /* Size of default input buffer. */
97 #define YY_BUF_SIZE 16384
99 typedef struct yy_buffer_state *YY_BUFFER_STATE;
102 extern FILE *yyin, *yyout;
104 #define EOB_ACT_CONTINUE_SCAN 0
105 #define EOB_ACT_END_OF_FILE 1
106 #define EOB_ACT_LAST_MATCH 2
108 /* The funky do-while in the following #define is used to turn the definition
109 * int a single C statement (which needs a semi-colon terminator). This
110 * avoids problems with code like:
112 * if ( condition_holds )
115 * do_something_else();
117 * Prior to using the do-while the compiler would get upset at the
118 * "else" because it interpreted the "if" statement as being all
119 * done when it reached the ';' after the yyless() call.
122 /* Return all but the first 'n' matched characters back to the input stream. */
127 /* Undo effects of setting up yytext. */ \
128 *yy_cp = yy_hold_char; \
129 YY_RESTORE_YY_MORE_OFFSET \
130 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
131 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
135 #define unput(c) yyunput( c, yytext_ptr )
137 /* The following is because we cannot portably get our hands on size_t
138 * (without autoconf's help, which isn't available because we want
139 * flex-generated scanners to compile on their own).
141 typedef unsigned int yy_size_t;
144 struct yy_buffer_state
148 char *yy_ch_buf; /* input buffer */
149 char *yy_buf_pos; /* current position in input buffer */
151 /* Size of input buffer in bytes, not including room for EOB
154 yy_size_t yy_buf_size;
156 /* Number of characters read into yy_ch_buf, not including EOB
161 /* Whether we "own" the buffer - i.e., we know we created it,
162 * and can realloc() it to grow it, and should free() it to
165 int yy_is_our_buffer;
167 /* Whether this is an "interactive" input source; if so, and
168 * if we're using stdio for input, then we want to use getc()
169 * instead of fread(), to make sure we stop fetching input after
172 int yy_is_interactive;
174 /* Whether we're considered to be at the beginning of a line.
175 * If so, '^' rules will be active on the next match, otherwise
180 /* Whether to try to fill the input buffer when we reach the
185 int yy_buffer_status;
186 #define YY_BUFFER_NEW 0
187 #define YY_BUFFER_NORMAL 1
188 /* When an EOF's been seen but there's still some text to process
189 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
190 * shouldn't try reading from the input source any more. We might
191 * still have a bunch of tokens to match, though, because of
192 * possible backing-up.
194 * When we actually see the EOF, we change the status to "new"
195 * (via yyrestart()), so that the user can continue scanning by
196 * just pointing yyin at a new input file.
198 #define YY_BUFFER_EOF_PENDING 2
201 static YY_BUFFER_STATE yy_current_buffer = 0;
203 /* We provide macros for accessing buffer states in case in the
204 * future we want to put the buffer states in a more general
207 #define YY_CURRENT_BUFFER yy_current_buffer
210 /* yy_hold_char holds the character lost when yytext is formed. */
211 static char yy_hold_char;
213 static int yy_n_chars; /* number of characters read into yy_ch_buf */
218 /* Points to current character in buffer. */
219 static char *yy_c_buf_p = (char *) 0;
220 static int yy_init = 1; /* whether we need to initialize */
221 static int yy_start = 0; /* start state number */
223 /* Flag which is used to allow yywrap()'s to do buffer switches
224 * instead of setting up a fresh yyin. A bit of a hack ...
226 static int yy_did_buffer_switch_on_eof;
228 void yyrestart YY_PROTO(( FILE *input_file ));
230 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
231 void yy_load_buffer_state YY_PROTO(( void ));
232 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
233 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
234 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
235 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
236 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
238 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
239 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
240 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
242 static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
243 static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
244 static void yy_flex_free YY_PROTO(( void * ));
246 #define yy_new_buffer yy_create_buffer
248 #define yy_set_interactive(is_interactive) \
250 if ( ! yy_current_buffer ) \
251 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
252 yy_current_buffer->yy_is_interactive = is_interactive; \
255 #define yy_set_bol(at_bol) \
257 if ( ! yy_current_buffer ) \
258 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
259 yy_current_buffer->yy_at_bol = at_bol; \
262 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
266 #define YY_SKIP_YYWRAP
267 typedef unsigned char YY_CHAR;
268 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
269 typedef int yy_state_type;
271 #define yytext_ptr yytext
273 static yy_state_type yy_get_previous_state YY_PROTO(( void ));
274 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
275 static int yy_get_next_buffer YY_PROTO(( void ));
276 static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
278 /* Done after the current pattern has been matched and before the
279 * corresponding action - sets up yytext.
281 #define YY_DO_BEFORE_ACTION \
282 yytext_ptr = yy_bp; \
283 yyleng = (int) (yy_cp - yy_bp); \
284 yy_hold_char = *yy_cp; \
288 #define YY_NUM_RULES 104
289 #define YY_END_OF_BUFFER 105
290 static yyconst short int yy_accept[579] =
292 0, 0, 105, 103, 97, 98, 90, 102, 100, 87,
293 91, 88, 89, 94, 103, 103, 103, 103, 103, 103,
294 103, 103, 103, 103, 103, 103, 103, 103, 103, 103,
295 103, 103, 103, 103, 103, 103, 92, 103, 97, 98,
296 100, 102, 102, 101, 102, 100, 100, 99, 96, 94,
297 103, 103, 103, 103, 19, 103, 103, 103, 103, 103,
298 103, 103, 103, 103, 103, 37, 103, 103, 103, 103,
299 32, 103, 103, 103, 103, 103, 103, 103, 103, 103,
300 103, 103, 103, 103, 103, 103, 103, 103, 103, 103,
301 103, 103, 103, 103, 103, 103, 103, 101, 102, 102,
303 102, 102, 0, 102, 102, 95, 94, 103, 103, 103,
304 103, 103, 103, 103, 103, 103, 103, 103, 103, 103,
305 103, 103, 31, 63, 103, 103, 103, 103, 103, 103,
306 103, 103, 103, 103, 71, 103, 103, 103, 103, 103,
307 103, 103, 103, 103, 103, 103, 103, 103, 103, 103,
308 103, 103, 103, 103, 103, 103, 103, 103, 103, 103,
309 103, 103, 103, 102, 102, 101, 0, 102, 102, 95,
310 94, 103, 103, 103, 67, 103, 103, 64, 68, 103,
311 103, 103, 35, 36, 103, 103, 103, 103, 40, 42,
312 103, 51, 103, 103, 60, 70, 103, 72, 103, 73,
314 103, 103, 103, 103, 103, 103, 103, 30, 103, 85,
315 103, 103, 103, 103, 103, 103, 103, 103, 103, 103,
316 103, 75, 76, 103, 62, 103, 102, 102, 0, 0,
317 0, 102, 95, 94, 103, 65, 103, 103, 103, 103,
318 103, 59, 103, 66, 103, 93, 103, 38, 103, 103,
319 103, 103, 103, 103, 103, 103, 103, 103, 103, 103,
320 41, 103, 103, 49, 103, 103, 103, 103, 103, 103,
321 103, 103, 103, 103, 103, 86, 102, 0, 0, 95,
322 94, 103, 103, 103, 103, 103, 69, 103, 103, 103,
323 103, 103, 103, 70, 77, 78, 79, 80, 81, 82,
325 83, 84, 103, 103, 103, 103, 61, 103, 103, 103,
326 1, 103, 103, 103, 103, 103, 39, 103, 74, 103,
327 103, 103, 103, 0, 95, 94, 103, 103, 103, 103,
328 103, 103, 103, 103, 50, 103, 21, 26, 103, 103,
329 103, 10, 103, 103, 103, 103, 103, 52, 103, 103,
330 103, 103, 103, 45, 62, 95, 94, 103, 9, 67,
331 103, 103, 103, 103, 103, 103, 103, 103, 103, 103,
332 103, 103, 47, 103, 103, 103, 103, 103, 48, 103,
333 46, 103, 95, 103, 103, 103, 103, 103, 103, 103,
334 103, 103, 103, 12, 103, 103, 103, 103, 103, 103,
336 44, 11, 103, 103, 103, 103, 103, 103, 95, 103,
337 103, 103, 103, 103, 33, 103, 103, 103, 103, 103,
338 103, 103, 103, 103, 103, 103, 103, 8, 103, 103,
339 103, 103, 103, 103, 103, 103, 103, 103, 103, 43,
340 34, 103, 103, 103, 103, 103, 103, 103, 103, 103,
341 103, 103, 103, 103, 103, 20, 103, 103, 103, 103,
342 53, 103, 103, 103, 103, 103, 103, 103, 103, 103,
343 103, 103, 103, 103, 56, 103, 103, 103, 103, 103,
344 54, 103, 103, 103, 103, 103, 103, 103, 103, 103,
345 103, 103, 103, 103, 57, 103, 103, 15, 103, 103,
347 103, 103, 17, 7, 103, 103, 103, 103, 103, 103,
348 103, 23, 103, 103, 103, 103, 103, 103, 103, 103,
349 103, 103, 103, 4, 103, 103, 103, 22, 103, 103,
350 103, 103, 103, 13, 103, 103, 103, 103, 5, 6,
351 103, 103, 103, 103, 103, 103, 16, 103, 103, 103,
352 103, 103, 103, 3, 25, 103, 18, 103, 103, 103,
353 27, 103, 55, 103, 24, 14, 58, 103, 103, 103,
354 103, 28, 103, 103, 103, 29, 2, 0
357 static yyconst int yy_ec[256] =
359 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
360 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
361 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
362 1, 2, 4, 5, 6, 7, 8, 9, 8, 10,
363 11, 8, 8, 8, 12, 8, 8, 13, 14, 15,
364 16, 17, 18, 19, 20, 21, 21, 8, 8, 8,
365 8, 8, 8, 8, 22, 22, 22, 22, 22, 22,
366 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
367 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
368 8, 23, 8, 8, 24, 8, 25, 26, 27, 28,
370 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
371 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
372 49, 50, 8, 51, 8, 8, 1, 1, 1, 1,
373 1, 1, 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,
381 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
382 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
383 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
384 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
385 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
389 static yyconst int yy_meta[52] =
391 1, 2, 3, 1, 1, 1, 1, 1, 1, 1,
392 1, 1, 4, 4, 4, 4, 4, 4, 4, 4,
393 4, 1, 1, 1, 1, 1, 1, 1, 1, 1,
394 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
395 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
399 static yyconst short int yy_base[589] =
401 0, 0, 924, 0, 50, 925, 0, 52, 56, 0,
402 0, 0, 0, 64, 890, 19, 44, 37, 51, 889,
403 25, 36, 64, 892, 34, 67, 62, 874, 894, 873,
404 75, 74, 878, 65, 887, 72, 0, 0, 109, 925,
405 912, 115, 104, 912, 138, 119, 910, 925, 174, 183,
406 874, 69, 867, 24, 0, 85, 881, 883, 865, 92,
407 878, 860, 875, 862, 874, 0, 863, 872, 856, 863,
408 0, 860, 99, 855, 869, 853, 861, 850, 845, 101,
409 855, 861, 90, 856, 850, 136, 104, 842, 847, 845,
410 841, 843, 853, 854, 838, 837, 845, 0, 204, 875,
412 0, 131, 139, 251, 271, 289, 298, 849, 833, 835,
413 841, 836, 844, 826, 831, 831, 822, 839, 835, 835,
414 821, 829, 0, 822, 833, 833, 818, 832, 816, 816,
415 818, 814, 814, 826, 0, 814, 806, 805, 121, 814,
416 810, 803, 811, 818, 798, 810, 812, 810, 793, 808,
417 791, 789, 822, 789, 790, 791, 794, 793, 786, 787,
418 783, 787, 780, 307, 324, 925, 354, 390, 399, 417,
419 426, 787, 778, 774, 780, 786, 786, 0, 0, 778,
420 785, 776, 0, 0, 783, 771, 770, 766, 0, 0,
421 783, 0, 767, 763, 0, 778, 770, 0, 780, 0,
423 771, 118, 776, 790, 759, 773, 762, 0, 769, 0,
424 770, 763, 751, 752, 760, 763, 763, 748, 747, 749,
425 758, 774, 0, 752, 751, 754, 435, 444, 134, 0,
426 470, 206, 488, 497, 737, 0, 769, 738, 741, 766,
427 739, 0, 738, 0, 736, 731, 729, 0, 743, 743,
428 734, 506, 738, 725, 723, 726, 736, 734, 730, 733,
429 0, 717, 718, 0, 726, 731, 719, 717, 726, 725,
430 722, 706, 709, 711, 711, 0, 145, 0, 514, 532,
431 541, 720, 717, 713, 714, 703, 0, 705, 704, 729,
432 711, 727, 709, 0, 0, 0, 0, 0, 0, 0,
434 0, 0, 708, 709, 723, 694, 0, 705, 704, 687,
435 718, 700, 684, 698, 680, 678, 0, 681, 0, 694,
436 695, 683, 689, 160, 550, 559, 690, 690, 671, 704,
437 670, 685, 676, 127, 700, 681, 698, 0, 670, 679,
438 665, 0, 677, 676, 674, 691, 653, 689, 667, 661,
439 655, 661, 666, 0, 0, 568, 683, 682, 0, 0,
440 135, 660, 665, 662, 645, 650, 143, 660, 148, 649,
441 648, 656, 0, 642, 655, 652, 182, 639, 0, 668,
442 0, 646, 577, 185, 636, 634, 632, 631, 636, 630,
443 660, 626, 628, 0, 636, 638, 628, 628, 619, 621,
445 0, 0, 635, 620, 618, 621, 634, 622, 0, 621,
446 607, 612, 615, 624, 0, 640, 607, 618, 100, 616,
447 609, 605, 617, 606, 615, 610, 599, 0, 602, 611,
448 601, 596, 608, 603, 592, 605, 588, 590, 599, 0,
449 0, 596, 165, 589, 584, 588, 557, 566, 573, 496,
450 525, 449, 440, 444, 449, 0, 450, 451, 435, 436,
451 456, 422, 387, 394, 358, 356, 387, 371, 364, 351,
452 351, 355, 368, 352, 379, 361, 346, 350, 348, 374,
453 0, 342, 344, 354, 353, 345, 347, 203, 335, 335,
454 337, 354, 327, 322, 0, 320, 324, 0, 317, 322,
456 317, 326, 0, 0, 306, 297, 297, 301, 308, 293,
457 287, 318, 263, 246, 251, 249, 236, 267, 248, 250,
458 246, 232, 232, 0, 220, 217, 218, 0, 234, 213,
459 228, 213, 226, 0, 227, 218, 220, 213, 0, 0,
460 219, 215, 197, 209, 204, 204, 0, 205, 201, 208,
461 205, 201, 209, 0, 0, 199, 0, 190, 197, 194,
462 0, 180, 0, 171, 0, 0, 0, 180, 156, 143,
463 145, 0, 133, 143, 123, 0, 0, 925, 598, 602,
464 606, 610, 614, 618, 622, 626, 138, 67
467 static yyconst short int yy_def[589] =
469 578, 1, 578, 579, 578, 578, 579, 580, 581, 579,
470 579, 579, 579, 579, 579, 579, 579, 579, 579, 579,
471 579, 579, 579, 579, 579, 579, 579, 579, 579, 579,
472 579, 579, 579, 579, 579, 579, 579, 579, 578, 578,
473 582, 580, 583, 584, 580, 581, 582, 578, 579, 14,
474 579, 579, 579, 579, 579, 579, 579, 579, 579, 579,
475 579, 579, 579, 579, 579, 579, 579, 579, 579, 579,
476 579, 579, 579, 579, 579, 579, 579, 579, 579, 579,
477 579, 579, 579, 579, 579, 579, 579, 579, 579, 579,
478 579, 579, 579, 579, 579, 579, 579, 585, 583, 584,
480 585, 585, 586, 584, 580, 579, 14, 579, 579, 579,
481 579, 579, 579, 579, 579, 579, 579, 579, 579, 579,
482 579, 579, 579, 579, 579, 579, 579, 579, 579, 579,
483 579, 579, 579, 579, 579, 579, 579, 579, 579, 579,
484 579, 579, 579, 579, 579, 579, 579, 579, 579, 579,
485 579, 579, 579, 579, 579, 579, 579, 579, 579, 579,
486 579, 579, 579, 585, 583, 578, 586, 104, 105, 579,
487 14, 579, 579, 579, 579, 579, 579, 579, 579, 579,
488 579, 579, 579, 579, 579, 579, 579, 579, 579, 579,
489 579, 579, 579, 579, 579, 579, 579, 579, 579, 579,
491 579, 579, 579, 579, 579, 579, 579, 579, 579, 579,
492 579, 579, 579, 579, 579, 579, 579, 579, 579, 579,
493 579, 579, 579, 579, 579, 579, 585, 165, 578, 587,
494 586, 580, 579, 14, 579, 579, 579, 579, 579, 579,
495 579, 579, 579, 579, 579, 579, 579, 579, 579, 579,
496 579, 579, 579, 579, 579, 579, 579, 579, 579, 579,
497 579, 579, 579, 579, 579, 579, 579, 579, 579, 579,
498 579, 579, 579, 579, 579, 579, 583, 588, 231, 579,
499 14, 579, 579, 579, 579, 579, 579, 579, 579, 579,
500 579, 579, 579, 579, 579, 579, 579, 579, 579, 579,
502 579, 579, 579, 579, 579, 579, 579, 579, 579, 579,
503 579, 579, 579, 579, 579, 579, 579, 579, 579, 579,
504 579, 579, 579, 586, 579, 14, 579, 579, 579, 579,
505 579, 579, 579, 579, 579, 579, 579, 579, 579, 579,
506 579, 579, 579, 579, 579, 579, 579, 579, 579, 579,
507 579, 579, 579, 579, 579, 579, 579, 579, 579, 579,
508 579, 579, 579, 579, 579, 579, 579, 579, 579, 579,
509 579, 579, 579, 579, 579, 579, 579, 579, 579, 579,
510 579, 579, 579, 579, 579, 579, 579, 579, 579, 579,
511 579, 579, 579, 579, 579, 579, 579, 579, 579, 579,
513 579, 579, 579, 579, 579, 579, 579, 579, 579, 579,
514 579, 579, 579, 579, 579, 579, 579, 579, 579, 579,
515 579, 579, 579, 579, 579, 579, 579, 579, 579, 579,
516 579, 579, 579, 579, 579, 579, 579, 579, 579, 579,
517 579, 579, 579, 579, 579, 579, 579, 579, 579, 579,
518 579, 579, 579, 579, 579, 579, 579, 579, 579, 579,
519 579, 579, 579, 579, 579, 579, 579, 579, 579, 579,
520 579, 579, 579, 579, 579, 579, 579, 579, 579, 579,
521 579, 579, 579, 579, 579, 579, 579, 579, 579, 579,
522 579, 579, 579, 579, 579, 579, 579, 579, 579, 579,
524 579, 579, 579, 579, 579, 579, 579, 579, 579, 579,
525 579, 579, 579, 579, 579, 579, 579, 579, 579, 579,
526 579, 579, 579, 579, 579, 579, 579, 579, 579, 579,
527 579, 579, 579, 579, 579, 579, 579, 579, 579, 579,
528 579, 579, 579, 579, 579, 579, 579, 579, 579, 579,
529 579, 579, 579, 579, 579, 579, 579, 579, 579, 579,
530 579, 579, 579, 579, 579, 579, 579, 579, 579, 579,
531 579, 579, 579, 579, 579, 579, 579, 0, 578, 578,
532 578, 578, 578, 578, 578, 578, 578, 578
535 static yyconst short int yy_nxt[977] =
537 4, 5, 6, 7, 8, 9, 10, 4, 11, 12,
538 13, 4, 14, 14, 14, 14, 14, 14, 14, 14,
539 14, 4, 4, 15, 16, 4, 17, 18, 19, 20,
540 21, 22, 23, 4, 24, 25, 26, 27, 28, 29,
541 30, 31, 32, 33, 34, 35, 36, 4, 4, 4,
542 37, 39, 40, 43, 52, 41, 44, 47, 48, 112,
543 67, 57, 69, 53, 70, 58, 68, 113, 54, 59,
544 103, 55, 75, 76, 45, 49, 50, 50, 50, 50,
545 50, 50, 50, 50, 50, 56, 60, 61, 62, 63,
546 79, 77, 64, 71, 72, 78, 96, 109, 65, 85,
548 80, 73, 87, 86, 110, 88, 81, 93, 98, 94,
549 39, 40, 139, 97, 41, 89, 43, 114, 90, 44,
550 47, 48, 91, 115, 119, 131, 99, 143, 132, 442,
551 151, 144, 102, 103, 120, 229, 103, 45, 100, 102,
552 103, 278, 443, 166, 140, 152, 255, 153, 201, 98,
553 104, 104, 104, 104, 104, 104, 104, 104, 104, 100,
554 147, 167, 256, 202, 166, 385, 365, 99, 392, 148,
555 366, 577, 393, 576, 575, 395, 149, 574, 150, 386,
556 396, 573, 167, 397, 572, 105, 106, 106, 106, 106,
557 106, 106, 106, 106, 106, 107, 107, 107, 107, 107,
559 107, 107, 107, 107, 101, 102, 103, 43, 464, 571,
560 44, 410, 404, 465, 570, 569, 164, 164, 164, 164,
561 164, 164, 164, 164, 164, 101, 405, 411, 45, 412,
562 508, 568, 567, 566, 565, 564, 563, 562, 561, 560,
563 559, 558, 509, 557, 556, 555, 554, 553, 552, 551,
564 550, 165, 101, 549, 548, 547, 546, 545, 544, 543,
565 542, 541, 540, 168, 168, 168, 168, 168, 168, 168,
566 168, 168, 43, 539, 538, 44, 537, 536, 535, 534,
567 533, 532, 531, 169, 169, 169, 169, 169, 169, 169,
568 169, 169, 169, 45, 530, 169, 169, 169, 169, 169,
570 169, 170, 170, 170, 170, 170, 170, 170, 170, 170,
571 171, 171, 171, 171, 171, 171, 171, 171, 171, 227,
572 227, 227, 227, 227, 227, 227, 227, 227, 98, 529,
573 528, 527, 526, 525, 524, 523, 228, 228, 228, 228,
574 228, 228, 228, 228, 228, 228, 99, 522, 228, 228,
575 228, 228, 228, 228, 578, 229, 103, 521, 520, 519,
576 518, 517, 516, 515, 514, 513, 230, 230, 230, 230,
577 230, 230, 230, 230, 230, 578, 512, 511, 510, 507,
578 506, 505, 504, 503, 502, 501, 500, 499, 498, 497,
579 496, 495, 494, 493, 492, 491, 490, 489, 488, 487,
581 486, 231, 42, 42, 42, 42, 42, 42, 42, 42,
582 42, 232, 232, 232, 232, 232, 232, 232, 232, 232,
583 232, 485, 484, 232, 232, 232, 232, 232, 232, 233,
584 233, 233, 233, 233, 233, 233, 233, 233, 234, 234,
585 234, 234, 234, 234, 234, 234, 234, 43, 43, 43,
586 43, 43, 43, 43, 43, 43, 277, 277, 277, 277,
587 277, 277, 277, 277, 277, 277, 483, 482, 277, 277,
588 277, 277, 277, 277, 166, 481, 480, 479, 478, 477,
589 476, 475, 279, 279, 279, 279, 279, 279, 279, 279,
590 279, 279, 167, 474, 279, 279, 279, 279, 279, 279,
592 280, 280, 280, 280, 280, 280, 280, 280, 280, 281,
593 281, 281, 281, 281, 281, 281, 281, 281, 295, 296,
594 297, 298, 299, 300, 301, 302, 324, 324, 324, 324,
595 324, 324, 324, 324, 324, 324, 473, 472, 324, 324,
596 324, 324, 324, 324, 325, 325, 325, 325, 325, 325,
597 325, 325, 325, 326, 326, 326, 326, 326, 326, 326,
598 326, 326, 356, 356, 356, 356, 356, 356, 356, 356,
599 356, 357, 357, 357, 357, 357, 357, 357, 357, 357,
600 383, 383, 383, 383, 383, 383, 383, 383, 383, 409,
601 409, 409, 409, 409, 409, 409, 409, 409, 38, 471,
603 470, 38, 42, 42, 469, 42, 46, 46, 46, 46,
604 47, 47, 47, 47, 43, 43, 468, 43, 100, 100,
605 467, 100, 101, 101, 466, 101, 103, 103, 463, 103,
606 462, 461, 460, 459, 458, 457, 456, 455, 454, 453,
607 452, 451, 450, 449, 448, 447, 446, 445, 444, 441,
608 440, 439, 438, 437, 436, 435, 434, 433, 432, 431,
609 430, 429, 428, 427, 426, 425, 424, 423, 422, 421,
610 420, 419, 418, 417, 416, 415, 414, 413, 408, 407,
611 406, 403, 402, 401, 400, 399, 398, 394, 391, 390,
612 389, 388, 387, 384, 49, 382, 381, 380, 379, 378,
614 377, 360, 376, 375, 374, 373, 372, 371, 370, 369,
615 368, 367, 364, 363, 362, 361, 360, 359, 358, 355,
616 354, 353, 352, 351, 350, 349, 348, 347, 346, 345,
617 344, 343, 342, 341, 340, 339, 338, 337, 336, 335,
618 334, 333, 332, 331, 330, 329, 328, 327, 323, 322,
619 321, 320, 319, 318, 317, 316, 315, 314, 313, 312,
620 311, 310, 309, 308, 307, 306, 305, 304, 303, 294,
621 293, 292, 291, 290, 289, 288, 287, 286, 285, 284,
622 283, 282, 276, 275, 274, 273, 272, 271, 270, 269,
623 268, 267, 266, 265, 264, 263, 262, 261, 260, 244,
625 259, 258, 257, 254, 253, 252, 251, 250, 249, 248,
626 247, 246, 245, 244, 243, 242, 241, 240, 239, 238,
627 237, 236, 235, 226, 225, 224, 223, 222, 221, 220,
628 219, 218, 217, 216, 215, 214, 213, 212, 211, 210,
629 209, 208, 207, 206, 205, 204, 203, 200, 199, 198,
630 197, 196, 195, 194, 193, 192, 191, 190, 189, 188,
631 187, 186, 185, 184, 183, 182, 181, 180, 179, 178,
632 177, 176, 175, 174, 173, 172, 101, 163, 162, 161,
633 160, 159, 158, 157, 156, 155, 154, 146, 145, 142,
634 141, 138, 137, 136, 135, 134, 133, 130, 129, 128,
636 127, 126, 125, 124, 123, 122, 121, 118, 117, 116,
637 111, 108, 48, 101, 48, 95, 92, 84, 83, 82,
638 74, 66, 51, 578, 3, 578, 578, 578, 578, 578,
639 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
640 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
641 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
642 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
643 578, 578, 578, 578, 578, 578
646 static yyconst short int yy_chk[977] =
648 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
649 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
650 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
651 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
652 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
653 1, 5, 5, 8, 16, 5, 8, 9, 9, 54,
654 21, 18, 22, 16, 22, 18, 21, 54, 17, 18,
655 588, 17, 25, 25, 8, 14, 14, 14, 14, 14,
656 14, 14, 14, 14, 14, 17, 19, 19, 19, 19,
657 27, 26, 19, 23, 23, 26, 36, 52, 19, 31,
659 27, 23, 32, 31, 52, 32, 27, 34, 43, 34,
660 39, 39, 80, 36, 39, 32, 42, 56, 32, 42,
661 46, 46, 32, 56, 60, 73, 43, 83, 73, 419,
662 87, 83, 102, 102, 60, 229, 229, 42, 45, 45,
663 45, 587, 419, 103, 80, 87, 202, 87, 139, 277,
664 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
665 86, 103, 202, 139, 324, 361, 334, 277, 367, 86,
666 334, 575, 367, 574, 573, 369, 86, 571, 86, 361,
667 369, 570, 324, 369, 569, 45, 49, 49, 49, 49,
668 49, 49, 49, 49, 49, 50, 50, 50, 50, 50,
670 50, 50, 50, 50, 99, 99, 99, 232, 443, 568,
671 232, 384, 377, 443, 564, 562, 99, 99, 99, 99,
672 99, 99, 99, 99, 99, 99, 377, 384, 232, 384,
673 488, 560, 559, 558, 556, 553, 552, 551, 550, 549,
674 548, 546, 488, 545, 544, 543, 542, 541, 538, 537,
675 536, 99, 104, 535, 533, 532, 531, 530, 529, 527,
676 526, 525, 523, 104, 104, 104, 104, 104, 104, 104,
677 104, 104, 105, 522, 521, 105, 520, 519, 518, 517,
678 516, 515, 514, 105, 105, 105, 105, 105, 105, 105,
679 105, 105, 105, 105, 513, 105, 105, 105, 105, 105,
681 105, 106, 106, 106, 106, 106, 106, 106, 106, 106,
682 107, 107, 107, 107, 107, 107, 107, 107, 107, 164,
683 164, 164, 164, 164, 164, 164, 164, 164, 165, 512,
684 511, 510, 509, 508, 507, 506, 165, 165, 165, 165,
685 165, 165, 165, 165, 165, 165, 165, 505, 165, 165,
686 165, 165, 165, 165, 167, 167, 167, 502, 501, 500,
687 499, 497, 496, 494, 493, 492, 167, 167, 167, 167,
688 167, 167, 167, 167, 167, 167, 491, 490, 489, 487,
689 486, 485, 484, 483, 482, 480, 479, 478, 477, 476,
690 475, 474, 473, 472, 471, 470, 469, 468, 467, 466,
692 465, 167, 168, 168, 168, 168, 168, 168, 168, 168,
693 168, 169, 169, 169, 169, 169, 169, 169, 169, 169,
694 169, 464, 463, 169, 169, 169, 169, 169, 169, 170,
695 170, 170, 170, 170, 170, 170, 170, 170, 171, 171,
696 171, 171, 171, 171, 171, 171, 171, 227, 227, 227,
697 227, 227, 227, 227, 227, 227, 228, 228, 228, 228,
698 228, 228, 228, 228, 228, 228, 462, 461, 228, 228,
699 228, 228, 228, 228, 231, 460, 459, 458, 457, 455,
700 454, 453, 231, 231, 231, 231, 231, 231, 231, 231,
701 231, 231, 231, 452, 231, 231, 231, 231, 231, 231,
703 233, 233, 233, 233, 233, 233, 233, 233, 233, 234,
704 234, 234, 234, 234, 234, 234, 234, 234, 252, 252,
705 252, 252, 252, 252, 252, 252, 279, 279, 279, 279,
706 279, 279, 279, 279, 279, 279, 451, 450, 279, 279,
707 279, 279, 279, 279, 280, 280, 280, 280, 280, 280,
708 280, 280, 280, 281, 281, 281, 281, 281, 281, 281,
709 281, 281, 325, 325, 325, 325, 325, 325, 325, 325,
710 325, 326, 326, 326, 326, 326, 326, 326, 326, 326,
711 356, 356, 356, 356, 356, 356, 356, 356, 356, 383,
712 383, 383, 383, 383, 383, 383, 383, 383, 579, 449,
714 448, 579, 580, 580, 447, 580, 581, 581, 581, 581,
715 582, 582, 582, 582, 583, 583, 446, 583, 584, 584,
716 445, 584, 585, 585, 444, 585, 586, 586, 442, 586,
717 439, 438, 437, 436, 435, 434, 433, 432, 431, 430,
718 429, 427, 426, 425, 424, 423, 422, 421, 420, 418,
719 417, 416, 414, 413, 412, 411, 410, 408, 407, 406,
720 405, 404, 403, 400, 399, 398, 397, 396, 395, 393,
721 392, 391, 390, 389, 388, 387, 386, 385, 382, 380,
722 378, 376, 375, 374, 372, 371, 370, 368, 366, 365,
723 364, 363, 362, 358, 357, 353, 352, 351, 350, 349,
725 348, 347, 346, 345, 344, 343, 341, 340, 339, 337,
726 336, 335, 333, 332, 331, 330, 329, 328, 327, 323,
727 322, 321, 320, 318, 316, 315, 314, 313, 312, 311,
728 310, 309, 308, 306, 305, 304, 303, 293, 292, 291,
729 290, 289, 288, 286, 285, 284, 283, 282, 275, 274,
730 273, 272, 271, 270, 269, 268, 267, 266, 265, 263,
731 262, 260, 259, 258, 257, 256, 255, 254, 253, 251,
732 250, 249, 247, 246, 245, 243, 241, 240, 239, 238,
733 237, 235, 226, 225, 224, 222, 221, 220, 219, 218,
734 217, 216, 215, 214, 213, 212, 211, 209, 207, 206,
736 205, 204, 203, 201, 199, 197, 196, 194, 193, 191,
737 188, 187, 186, 185, 182, 181, 180, 177, 176, 175,
738 174, 173, 172, 163, 162, 161, 160, 159, 158, 157,
739 156, 155, 154, 153, 152, 151, 150, 149, 148, 147,
740 146, 145, 144, 143, 142, 141, 140, 138, 137, 136,
741 134, 133, 132, 131, 130, 129, 128, 127, 126, 125,
742 124, 122, 121, 120, 119, 118, 117, 116, 115, 114,
743 113, 112, 111, 110, 109, 108, 100, 97, 96, 95,
744 94, 93, 92, 91, 90, 89, 88, 85, 84, 82,
745 81, 79, 78, 77, 76, 75, 74, 72, 70, 69,
747 68, 67, 65, 64, 63, 62, 61, 59, 58, 57,
748 53, 51, 47, 44, 41, 35, 33, 30, 29, 28,
749 24, 20, 15, 3, 578, 578, 578, 578, 578, 578,
750 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
751 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
752 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
753 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
754 578, 578, 578, 578, 578, 578
757 static yy_state_type yy_last_accepting_state;
758 static char *yy_last_accepting_cpos;
760 /* The intent behind this definition is that it'll catch
761 * any uses of REJECT which flex missed.
763 #define REJECT reject_used_but_not_detected
764 #define yymore() yymore_used_but_not_detected
765 #define YY_MORE_ADJ 0
766 #define YY_RESTORE_YY_MORE_OFFSET
771 * Copyright (C)1996-1997,1999 Ian Jackson
773 * This is free software; you can redistribute it and/or modify it
774 * under the terms of the GNU General Public License as published by
775 * the Free Software Foundation; either version 2 of the License, or
776 * (at your option) any later version.
778 * This program is distributed in the hope that it will be useful, but
779 * WITHOUT ANY WARRANTY; without even the implied warranty of
780 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
781 * General Public License for more details.
783 * You should have received a copy of the GNU General Public License
784 * along with userv; if not, write to the Free Software
785 * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
805 #include <sys/types.h>
806 #include <sys/stat.h>
818 typedef int directive_fnt(int dtoken);
819 static directive_fnt df_reject, df_execute, df_executefrompath;
820 static directive_fnt df_executefromdirectory, df_executebuiltin;
821 static directive_fnt df_errorstostderr, df_errorstosyslog, df_errorstofile;
822 static directive_fnt dfg_fdwant, dfg_setflag;
823 static directive_fnt df_reset, df_cd, df_userrcfile, df_include;
824 static directive_fnt df_includelookup, df_includedirectory;
825 static directive_fnt df_message, df_error, df_quit, df_eof;
826 static directive_fnt df_if, df_catchquit, df_errorspush;
827 static directive_fnt dfi_includeuserrcfile, dfi_includeclientconfig;
828 /* directive functions return:
829 * 0 for success having scanned up to and including end of line but not beyond,
830 * or tokv_error or tokv_quit.
831 * They expect to parse the whitespace before their parameters (if any).
834 typedef int parmcondition_fnt(int ctoken, char *const *parmvalues, int *rtrue);
835 static parmcondition_fnt pcf_glob, pcf_range, pcf_grep;
836 /* all conditional functions return tokv_error for failure or 0 for success
837 * at parsing and testing, in which case *rtrue is set to 0 or 1.
838 * On success they have scanned up to and including the condition's
839 * terminating newline; the pcf_... functions expect to parse the whitespace
840 * between the parameter name and the condition's arguments.
841 * Otherwise they return tokv_error.
842 * The parameter-based conditionals take a list of parameter values
843 * as obtained from the parameter functions and pa_parameter,
844 * and do _not_ free it.
847 typedef int parameter_fnt(int ptoken, char ***rvalues);
848 static parameter_fnt pf_service;
849 static parameter_fnt pf_callinguser, pf_serviceuser;
850 static parameter_fnt pf_callinggroup, pf_servicegroup;
851 static parameter_fnt pf_callingusershell, pf_serviceusershell;
852 /* Parameter functions return tokv_error or 0 for success at parsing
853 * and determining the value, in which case *rvalues is made to be
854 * a mallocd null-terminated array of pointers to mallocd strings.
855 * freeparm can be used to free such an array.
858 typedef int builtinserviceparse_fnt(char ***rnewargs);
859 static builtinserviceparse_fnt bispa_none, bispa_parameter;
860 /* These parse the arguments to a builtin service, including the
861 * newline at the end of the line. *rnewargs will initially be
862 * null, indicating that no arguments are to be set; the function
863 * may store a mallocd array of mallocd strings in it,
864 * containing the arguments it wishes to have set (null-pointer
868 static int yylex(void);
869 /* Returns a token (which may be an eof or error exception) */
871 static directive_fnt *lr_dir;
872 static parmcondition_fnt *lr_parmcond;
873 static builtinserviceparse_fnt *lr_bispa;
874 static builtinserviceexec_fnt *lr_bisexec;
875 static parameter_fnt *lr_parameter;
876 static int lr_loglevel, lr_logfacility, lr_min, lr_max, *lr_flag;
877 static int lr_flagval, lr_controlend;
878 static int lr_fdwant_readwrite; /* -1=never, 0=opt, 1=always */
880 /* Forward declarations of things used in lexer and parser */
882 struct parser_state {
883 int lineno, reportlineno, notedreferer, isinternal;
884 const char *filename;
885 struct stat filestab;
886 YY_BUFFER_STATE ybuf;
887 struct parser_state *upstate;
890 static struct parser_state *cstate;
892 struct error_handling {
893 int handling; /* One of the error handling modes tokt_ehandlemode */
894 int logfacility, loglevel;
895 int filekeep; /* File is in use by higher-level errors-push, leave it open */
900 static struct error_handling eh = { tokv_word_errorstostderr, 0,0,0,0,0 };
902 static int dequote(char *inplace);
907 /* Macros after this point can all be overridden by user definitions in
911 #ifndef YY_SKIP_YYWRAP
913 extern "C" int yywrap YY_PROTO(( void ));
915 extern int yywrap YY_PROTO(( void ));
920 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
924 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
927 #ifdef YY_NEED_STRLEN
928 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
933 static int yyinput YY_PROTO(( void ));
935 static int input YY_PROTO(( void ));
940 static int yy_start_stack_ptr = 0;
941 static int yy_start_stack_depth = 0;
942 static int *yy_start_stack = 0;
943 #ifndef YY_NO_PUSH_STATE
944 static void yy_push_state YY_PROTO(( int new_state ));
946 #ifndef YY_NO_POP_STATE
947 static void yy_pop_state YY_PROTO(( void ));
949 #ifndef YY_NO_TOP_STATE
950 static int yy_top_state YY_PROTO(( void ));
954 #define YY_NO_PUSH_STATE 1
955 #define YY_NO_POP_STATE 1
956 #define YY_NO_TOP_STATE 1
959 #ifdef YY_MALLOC_DECL
967 /* Just try to get by without declaring the routines. This will fail
968 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
969 * or sizeof(void*) != sizeof(int).
974 /* Amount of stuff to slurp up with each read. */
975 #ifndef YY_READ_BUF_SIZE
976 #define YY_READ_BUF_SIZE 8192
979 /* Copy whatever the last rule matched to the standard output. */
982 /* This used to be an fputs(), but since the string might contain NUL's,
983 * we now use fwrite().
985 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
988 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
989 * is returned in "result".
992 #define YY_INPUT(buf,result,max_size) \
993 if ( yy_current_buffer->yy_is_interactive ) \
996 for ( n = 0; n < max_size && \
997 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1000 buf[n++] = (char) c; \
1001 if ( c == EOF && ferror( yyin ) ) \
1002 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1005 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
1006 && ferror( yyin ) ) \
1007 YY_FATAL_ERROR( "input in flex scanner failed" );
1010 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1011 * we don't want an extra ';' after the "return" because that will cause
1012 * some compilers to complain about unreachable statements.
1015 #define yyterminate() return YY_NULL
1018 /* Number of entries by which start-condition stack grows. */
1019 #ifndef YY_START_STACK_INCR
1020 #define YY_START_STACK_INCR 25
1023 /* Report a fatal error. */
1024 #ifndef YY_FATAL_ERROR
1025 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1028 /* Default declaration of generated scanner - a define so the user can
1029 * easily add parameters.
1032 #define YY_DECL int yylex YY_PROTO(( void ))
1035 /* Code executed at the beginning of each rule, after yytext and yyleng
1038 #ifndef YY_USER_ACTION
1039 #define YY_USER_ACTION
1042 /* Code executed at the end of each rule. */
1044 #define YY_BREAK break;
1047 #define YY_RULE_SETUP \
1052 register yy_state_type yy_current_state;
1053 register char *yy_cp, *yy_bp;
1054 register int yy_act;
1069 yy_start = 1; /* first start state */
1077 if ( ! yy_current_buffer )
1079 yy_create_buffer( yyin, YY_BUF_SIZE );
1081 yy_load_buffer_state();
1084 while ( 1 ) /* loops until end-of-file is reached */
1088 /* Support of yytext. */
1089 *yy_cp = yy_hold_char;
1091 /* yy_bp points to the position in yy_ch_buf of the start of
1096 yy_current_state = yy_start;
1100 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1101 if ( yy_accept[yy_current_state] )
1103 yy_last_accepting_state = yy_current_state;
1104 yy_last_accepting_cpos = yy_cp;
1106 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1108 yy_current_state = (int) yy_def[yy_current_state];
1109 if ( yy_current_state >= 579 )
1110 yy_c = yy_meta[(unsigned int) yy_c];
1112 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1115 while ( yy_base[yy_current_state] != 925 );
1118 yy_act = yy_accept[yy_current_state];
1120 { /* have to back up */
1121 yy_cp = yy_last_accepting_cpos;
1122 yy_current_state = yy_last_accepting_state;
1123 yy_act = yy_accept[yy_current_state];
1126 YY_DO_BEFORE_ACTION;
1129 do_action: /* This label is used only to access EOF actions. */
1133 { /* beginning of action switch */
1134 case 0: /* must back up */
1135 /* undo the effects of YY_DO_BEFORE_ACTION */
1136 *yy_cp = yy_hold_char;
1137 yy_cp = yy_last_accepting_cpos;
1138 yy_current_state = yy_last_accepting_state;
1139 goto yy_find_action;
1144 { lr_dir= df_reject; return tokv_word_reject; }
1149 { lr_dir= df_executefromdirectory; return tokv_word_executefromdirectory; }
1154 { lr_dir= df_executefrompath; return tokv_word_executefrompath; }
1159 { lr_dir= df_executebuiltin; return tokv_word_executebuiltin; }
1164 { lr_dir= df_errorstostderr; return tokv_word_errorstostderr; }
1169 { lr_dir= df_errorstosyslog; return tokv_word_errorstosyslog; }
1174 { lr_dir= df_errorstofile; return tokv_word_errorstofile; }
1179 { lr_dir= dfg_fdwant; lr_fdwant_readwrite=1; return tokv_word_requirefd; }
1184 { lr_dir= dfg_fdwant; lr_fdwant_readwrite=0; return tokv_word_allowfd; }
1189 { lr_dir= dfg_fdwant; lr_fdwant_readwrite=0; return tokv_word_nullfd; }
1194 { lr_dir= dfg_fdwant; lr_fdwant_readwrite=-1; return tokv_word_rejectfd; }
1199 { lr_dir= dfg_fdwant; lr_fdwant_readwrite=-1; return tokv_word_ignorefd; }
1204 { lr_dir= dfg_setflag; lr_flag= &setenvironment; lr_flagval= 1; return tokv_word_setenvironment; }
1209 { lr_dir= dfg_setflag; lr_flag= &setenvironment; lr_flagval= 0; return tokv_word_nosetenvironment; }
1214 { lr_dir= dfg_setflag; lr_flag= &suppressargs; lr_flagval= 1; return tokv_word_suppressargs; }
1219 { lr_dir= dfg_setflag; lr_flag= &suppressargs; lr_flagval= 0; return tokv_word_nosuppressargs; }
1224 { lr_dir= dfg_setflag; lr_flag= &disconnecthup; lr_flagval= 1; return tokv_word_disconnecthup; }
1229 { lr_dir= dfg_setflag; lr_flag= &disconnecthup; lr_flagval= 0; return tokv_word_nodisconnecthup; }
1234 { lr_dir= df_cd; return tokv_word_cd; }
1239 { lr_dir= df_userrcfile; return tokv_word_userrcfile; }
1244 { lr_dir= df_include; return tokv_word_include; }
1249 { lr_dir= df_include; return tokv_word_includeifexist; }
1254 { lr_dir= df_includelookup; return tokv_word_includelookup; }
1259 { lr_dir= df_includelookup; return tokv_word_includelookupall; }
1264 { lr_dir= df_includedirectory; return tokv_word_includedirectory; }
1269 { lr_dir= df_message; return tokv_word_message; }
1274 { lr_dir= df_include; return tokv_word_includesysconfig; }
1279 { lr_dir= dfi_includeuserrcfile; return tokv_word_includeuserrcfile; }
1284 { lr_dir= dfi_includeclientconfig; return tokv_word_includeclientconfig; }
1289 { lr_dir= df_quit; return tokv_word_quit; }
1294 { lr_dir= df_eof; return tokv_word_eof; }
1299 { lr_dir= df_if; return tokv_word_if; }
1304 { lr_dir= df_catchquit; return tokv_word_catchquit; }
1309 { lr_dir= df_errorspush; return tokv_word_errorspush; }
1314 { lr_controlend= tokv_word_if; return tokv_word_elif; }
1319 { lr_controlend= tokv_word_if; return tokv_word_else; }
1324 { lr_controlend= tokv_word_if; return tokv_word_fi; }
1329 { lr_controlend= tokv_word_catchquit; return tokv_word_hctac; }
1334 { lr_controlend= tokv_word_errorspush; return tokv_word_srorre; }
1339 { lr_parmcond= pcf_glob; return tokv_word_glob; }
1344 { lr_parmcond= pcf_range; return tokv_word_range; }
1349 { lr_parmcond= pcf_grep; return tokv_word_grep; }
1354 { lr_bispa= bispa_none; lr_bisexec= bisexec_environment; return tokv_word_environment; }
1359 { lr_bispa= bispa_parameter; lr_bisexec= bisexec_parameter; return tokv_word_parameter; }
1364 { lr_bispa= bispa_none; lr_bisexec= bisexec_version; return tokv_word_version; }
1369 { lr_bispa= bispa_none; lr_bisexec= bisexec_toplevel; return tokv_word_toplevel; }
1374 { lr_bispa= bispa_none; lr_bisexec= bisexec_override; return tokv_word_override; }
1379 { lr_bispa= bispa_none; lr_bisexec= bisexec_shutdown; return tokv_word_shutdown; }
1384 { lr_bispa= bispa_none; lr_bisexec= bisexec_reset; lr_dir= df_reset; return tokv_word_reset; }
1389 { lr_bispa= bispa_none; lr_bisexec= bisexec_execute; lr_dir= df_execute; return tokv_word_execute; }
1394 { lr_bispa= bispa_none; lr_bisexec= bisexec_help; return tokv_word_help; }
1399 { lr_parameter= pf_service; return tokv_word_service; }
1404 { lr_parameter= pf_callinguser; return tokv_word_callinguser; }
1409 { lr_parameter= pf_callinggroup; return tokv_word_callinggroup; }
1414 { lr_parameter= pf_callingusershell; return tokv_word_callingusershell; }
1419 { lr_parameter= pf_serviceuser; return tokv_word_serviceuser; }
1424 { lr_parameter= pf_servicegroup; return tokv_word_servicegroup; }
1429 { lr_parameter= pf_serviceusershell; return tokv_word_serviceusershell; }
1434 { lr_loglevel= LOG_DEBUG; return tokv_syslog_debug; }
1439 { lr_loglevel= LOG_INFO; return tokv_syslog_info; }
1444 { lr_loglevel= LOG_NOTICE; return tokv_syslog_notice; }
1449 { lr_loglevel= LOG_WARNING; return tokv_syslog_warning; }
1454 { lr_loglevel= LOG_ERR; return tokv_syslog_err; }
1459 { lr_loglevel= LOG_CRIT; return tokv_syslog_crit; }
1464 { lr_loglevel= LOG_ALERT; return tokv_syslog_alert; }
1469 { lr_loglevel= LOG_EMERG; return tokv_syslog_emerg; }
1474 { lr_logfacility= LOG_AUTHPRIV; return tokv_syslog_authpriv; }
1479 { lr_logfacility= LOG_CRON; return tokv_syslog_cron; }
1484 { lr_logfacility= LOG_DAEMON; return tokv_syslog_daemon; }
1489 { lr_logfacility= LOG_KERN; return tokv_syslog_kern; }
1494 { lr_logfacility= LOG_LPR; return tokv_syslog_lpr; }
1499 { lr_logfacility= LOG_MAIL; return tokv_syslog_mail; }
1504 { lr_logfacility= LOG_NEWS; return tokv_syslog_news; }
1509 { lr_logfacility= LOG_SYSLOG; return tokv_syslog_syslog; }
1514 { lr_logfacility= LOG_USER; return tokv_syslog_user; }
1519 { lr_logfacility= LOG_UUCP; return tokv_syslog_uucp; }
1524 { lr_logfacility= LOG_LOCAL0; return tokv_syslog_local0; }
1529 { lr_logfacility= LOG_LOCAL1; return tokv_syslog_local1; }
1534 { lr_logfacility= LOG_LOCAL2; return tokv_syslog_local2; }
1539 { lr_logfacility= LOG_LOCAL3; return tokv_syslog_local3; }
1544 { lr_logfacility= LOG_LOCAL4; return tokv_syslog_local4; }
1549 { lr_logfacility= LOG_LOCAL5; return tokv_syslog_local5; }
1554 { lr_logfacility= LOG_LOCAL6; return tokv_syslog_local6; }
1559 { lr_logfacility= LOG_LOCAL7; return tokv_syslog_local7; }
1564 { return tokv_word_read; }
1569 { return tokv_word_write; }
1574 { return tokv_dollar; }
1579 { return tokv_openparen; }
1584 { return tokv_closeparen; }
1589 { return tokv_not; }
1594 { return tokv_and; }
1604 { lr_dir= df_error; lr_loglevel= LOG_ERR; return tokv_word_error; }
1611 lr_min=lr_max= (int)strtoul(yytext,&ep,10);
1613 return tokv_ordinal;
1621 lr_min= (int)strtoul(yytext,&ep,10);
1622 assert(*ep == HYPHEN);
1624 lr_max= (int)strtoul(ep,&ep,10);
1626 if (lr_max < lr_min) {
1627 parseerrprint("fd range has min > max");
1630 return tokv_fdrange;
1638 lr_min= (int)strtoul(yytext,&ep,10);
1639 assert(*ep == HYPHEN);
1642 return tokv_fdstoend;
1653 cstate->lineno++; return tokv_newline;
1658 cstate->lineno++; return tokv_newline;
1664 parseerrprint("missing newline at eof after comment");
1672 return dequote(yytext);
1679 parseerrprint("misquoted or unterminated string");
1686 return tokv_barestring;
1688 case YY_STATE_EOF(INITIAL):
1698 case YY_END_OF_BUFFER:
1700 /* Amount of text matched not including the EOB char. */
1701 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
1703 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1704 *yy_cp = yy_hold_char;
1705 YY_RESTORE_YY_MORE_OFFSET
1707 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
1709 /* We're scanning a new file or input source. It's
1710 * possible that this happened because the user
1711 * just pointed yyin at a new source and called
1712 * yylex(). If so, then we have to assure
1713 * consistency between yy_current_buffer and our
1714 * globals. Here is the right place to do so, because
1715 * this is the first action (other than possibly a
1716 * back-up) that will match for the new input source.
1718 yy_n_chars = yy_current_buffer->yy_n_chars;
1719 yy_current_buffer->yy_input_file = yyin;
1720 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
1723 /* Note that here we test for yy_c_buf_p "<=" to the position
1724 * of the first EOB in the buffer, since yy_c_buf_p will
1725 * already have been incremented past the NUL character
1726 * (since all states make transitions on EOB to the
1727 * end-of-buffer state). Contrast this with the test
1730 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1731 { /* This was really a NUL. */
1732 yy_state_type yy_next_state;
1734 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
1736 yy_current_state = yy_get_previous_state();
1738 /* Okay, we're now positioned to make the NUL
1739 * transition. We couldn't have
1740 * yy_get_previous_state() go ahead and do it
1741 * for us because it doesn't know how to deal
1742 * with the possibility of jamming (and we don't
1743 * want to build jamming into it because then it
1744 * will run more slowly).
1747 yy_next_state = yy_try_NUL_trans( yy_current_state );
1749 yy_bp = yytext_ptr + YY_MORE_ADJ;
1751 if ( yy_next_state )
1753 /* Consume the NUL. */
1754 yy_cp = ++yy_c_buf_p;
1755 yy_current_state = yy_next_state;
1762 goto yy_find_action;
1766 else switch ( yy_get_next_buffer() )
1768 case EOB_ACT_END_OF_FILE:
1770 yy_did_buffer_switch_on_eof = 0;
1774 /* Note: because we've taken care in
1775 * yy_get_next_buffer() to have set up
1776 * yytext, we can now set up
1777 * yy_c_buf_p so that if some total
1778 * hoser (like flex itself) wants to
1779 * call the scanner after we return the
1780 * YY_NULL, it'll still work - another
1781 * YY_NULL will get returned.
1783 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1785 yy_act = YY_STATE_EOF(YY_START);
1791 if ( ! yy_did_buffer_switch_on_eof )
1797 case EOB_ACT_CONTINUE_SCAN:
1799 yytext_ptr + yy_amount_of_matched_text;
1801 yy_current_state = yy_get_previous_state();
1804 yy_bp = yytext_ptr + YY_MORE_ADJ;
1807 case EOB_ACT_LAST_MATCH:
1809 &yy_current_buffer->yy_ch_buf[yy_n_chars];
1811 yy_current_state = yy_get_previous_state();
1814 yy_bp = yytext_ptr + YY_MORE_ADJ;
1815 goto yy_find_action;
1822 "fatal flex scanner internal error--no action found" );
1823 } /* end of action switch */
1824 } /* end of scanning one token */
1825 } /* end of yylex */
1828 /* yy_get_next_buffer - try to read in a new buffer
1830 * Returns a code representing an action:
1831 * EOB_ACT_LAST_MATCH -
1832 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1833 * EOB_ACT_END_OF_FILE - end of file
1836 static int yy_get_next_buffer()
1838 register char *dest = yy_current_buffer->yy_ch_buf;
1839 register char *source = yytext_ptr;
1840 register int number_to_move, i;
1843 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
1845 "fatal flex scanner internal error--end of buffer missed" );
1847 if ( yy_current_buffer->yy_fill_buffer == 0 )
1848 { /* Don't try to fill the buffer, so this is an EOF. */
1849 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
1851 /* We matched a single character, the EOB, so
1852 * treat this as a final EOF.
1854 return EOB_ACT_END_OF_FILE;
1859 /* We matched some text prior to the EOB, first
1862 return EOB_ACT_LAST_MATCH;
1866 /* Try to read more data. */
1868 /* First move last chars to start of buffer. */
1869 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
1871 for ( i = 0; i < number_to_move; ++i )
1872 *(dest++) = *(source++);
1874 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1875 /* don't do the read, it's not guaranteed to return an EOF,
1878 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
1883 yy_current_buffer->yy_buf_size - number_to_move - 1;
1885 while ( num_to_read <= 0 )
1886 { /* Not enough room in the buffer - grow it. */
1887 #ifdef YY_USES_REJECT
1889 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1892 /* just a shorter name for the current buffer */
1893 YY_BUFFER_STATE b = yy_current_buffer;
1895 int yy_c_buf_p_offset =
1896 (int) (yy_c_buf_p - b->yy_ch_buf);
1898 if ( b->yy_is_our_buffer )
1900 int new_size = b->yy_buf_size * 2;
1902 if ( new_size <= 0 )
1903 b->yy_buf_size += b->yy_buf_size / 8;
1905 b->yy_buf_size *= 2;
1907 b->yy_ch_buf = (char *)
1908 /* Include room in for 2 EOB chars. */
1909 yy_flex_realloc( (void *) b->yy_ch_buf,
1910 b->yy_buf_size + 2 );
1913 /* Can't grow it, we don't own it. */
1916 if ( ! b->yy_ch_buf )
1918 "fatal error - scanner input buffer overflow" );
1920 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1922 num_to_read = yy_current_buffer->yy_buf_size -
1927 if ( num_to_read > YY_READ_BUF_SIZE )
1928 num_to_read = YY_READ_BUF_SIZE;
1930 /* Read in more data. */
1931 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1932 yy_n_chars, num_to_read );
1934 yy_current_buffer->yy_n_chars = yy_n_chars;
1937 if ( yy_n_chars == 0 )
1939 if ( number_to_move == YY_MORE_ADJ )
1941 ret_val = EOB_ACT_END_OF_FILE;
1947 ret_val = EOB_ACT_LAST_MATCH;
1948 yy_current_buffer->yy_buffer_status =
1949 YY_BUFFER_EOF_PENDING;
1954 ret_val = EOB_ACT_CONTINUE_SCAN;
1956 yy_n_chars += number_to_move;
1957 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1958 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1960 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1966 /* yy_get_previous_state - get the state just before the EOB char was reached */
1968 static yy_state_type yy_get_previous_state()
1970 register yy_state_type yy_current_state;
1971 register char *yy_cp;
1973 yy_current_state = yy_start;
1975 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1977 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1978 if ( yy_accept[yy_current_state] )
1980 yy_last_accepting_state = yy_current_state;
1981 yy_last_accepting_cpos = yy_cp;
1983 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1985 yy_current_state = (int) yy_def[yy_current_state];
1986 if ( yy_current_state >= 579 )
1987 yy_c = yy_meta[(unsigned int) yy_c];
1989 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1992 return yy_current_state;
1996 /* yy_try_NUL_trans - try to make a transition on the NUL character
1999 * next_state = yy_try_NUL_trans( current_state );
2002 #ifdef YY_USE_PROTOS
2003 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
2005 static yy_state_type yy_try_NUL_trans( yy_current_state )
2006 yy_state_type yy_current_state;
2009 register int yy_is_jam;
2010 register char *yy_cp = yy_c_buf_p;
2012 register YY_CHAR yy_c = 1;
2013 if ( yy_accept[yy_current_state] )
2015 yy_last_accepting_state = yy_current_state;
2016 yy_last_accepting_cpos = yy_cp;
2018 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2020 yy_current_state = (int) yy_def[yy_current_state];
2021 if ( yy_current_state >= 579 )
2022 yy_c = yy_meta[(unsigned int) yy_c];
2024 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2025 yy_is_jam = (yy_current_state == 578);
2027 return yy_is_jam ? 0 : yy_current_state;
2032 #ifdef YY_USE_PROTOS
2033 static void yyunput( int c, register char *yy_bp )
2035 static void yyunput( c, yy_bp )
2037 register char *yy_bp;
2040 register char *yy_cp = yy_c_buf_p;
2042 /* undo effects of setting up yytext */
2043 *yy_cp = yy_hold_char;
2045 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2046 { /* need to shift things up to make room */
2047 /* +2 for EOB chars. */
2048 register int number_to_move = yy_n_chars + 2;
2049 register char *dest = &yy_current_buffer->yy_ch_buf[
2050 yy_current_buffer->yy_buf_size + 2];
2051 register char *source =
2052 &yy_current_buffer->yy_ch_buf[number_to_move];
2054 while ( source > yy_current_buffer->yy_ch_buf )
2055 *--dest = *--source;
2057 yy_cp += (int) (dest - source);
2058 yy_bp += (int) (dest - source);
2059 yy_current_buffer->yy_n_chars =
2060 yy_n_chars = yy_current_buffer->yy_buf_size;
2062 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2063 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2066 *--yy_cp = (char) c;
2070 yy_hold_char = *yy_cp;
2073 #endif /* ifndef YY_NO_UNPUT */
2077 static int yyinput()
2084 *yy_c_buf_p = yy_hold_char;
2086 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
2088 /* yy_c_buf_p now points to the character we want to return.
2089 * If this occurs *before* the EOB characters, then it's a
2090 * valid NUL; if not, then we've hit the end of the buffer.
2092 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
2093 /* This was really a NUL. */
2097 { /* need more input */
2098 int offset = yy_c_buf_p - yytext_ptr;
2101 switch ( yy_get_next_buffer() )
2103 case EOB_ACT_LAST_MATCH:
2104 /* This happens because yy_g_n_b()
2105 * sees that we've accumulated a
2106 * token and flags that we need to
2107 * try matching the token before
2108 * proceeding. But for input(),
2109 * there's no matching to consider.
2110 * So convert the EOB_ACT_LAST_MATCH
2111 * to EOB_ACT_END_OF_FILE.
2114 /* Reset buffer status. */
2119 case EOB_ACT_END_OF_FILE:
2124 if ( ! yy_did_buffer_switch_on_eof )
2133 case EOB_ACT_CONTINUE_SCAN:
2134 yy_c_buf_p = yytext_ptr + offset;
2140 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
2141 *yy_c_buf_p = '\0'; /* preserve yytext */
2142 yy_hold_char = *++yy_c_buf_p;
2149 #ifdef YY_USE_PROTOS
2150 void yyrestart( FILE *input_file )
2152 void yyrestart( input_file )
2156 if ( ! yy_current_buffer )
2157 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
2159 yy_init_buffer( yy_current_buffer, input_file );
2160 yy_load_buffer_state();
2164 #ifdef YY_USE_PROTOS
2165 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
2167 void yy_switch_to_buffer( new_buffer )
2168 YY_BUFFER_STATE new_buffer;
2171 if ( yy_current_buffer == new_buffer )
2174 if ( yy_current_buffer )
2176 /* Flush out information for old buffer. */
2177 *yy_c_buf_p = yy_hold_char;
2178 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
2179 yy_current_buffer->yy_n_chars = yy_n_chars;
2182 yy_current_buffer = new_buffer;
2183 yy_load_buffer_state();
2185 /* We don't actually know whether we did this switch during
2186 * EOF (yywrap()) processing, but the only time this flag
2187 * is looked at is after yywrap() is called, so it's safe
2188 * to go ahead and always set it.
2190 yy_did_buffer_switch_on_eof = 1;
2194 #ifdef YY_USE_PROTOS
2195 void yy_load_buffer_state( void )
2197 void yy_load_buffer_state()
2200 yy_n_chars = yy_current_buffer->yy_n_chars;
2201 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
2202 yyin = yy_current_buffer->yy_input_file;
2203 yy_hold_char = *yy_c_buf_p;
2207 #ifdef YY_USE_PROTOS
2208 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
2210 YY_BUFFER_STATE yy_create_buffer( file, size )
2217 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2219 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2221 b->yy_buf_size = size;
2223 /* yy_ch_buf has to be 2 characters longer than the size given because
2224 * we need to put in 2 end-of-buffer characters.
2226 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
2227 if ( ! b->yy_ch_buf )
2228 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2230 b->yy_is_our_buffer = 1;
2232 yy_init_buffer( b, file );
2238 #ifdef YY_USE_PROTOS
2239 void yy_delete_buffer( YY_BUFFER_STATE b )
2241 void yy_delete_buffer( b )
2248 if ( b == yy_current_buffer )
2249 yy_current_buffer = (YY_BUFFER_STATE) 0;
2251 if ( b->yy_is_our_buffer )
2252 yy_flex_free( (void *) b->yy_ch_buf );
2254 yy_flex_free( (void *) b );
2258 #ifndef YY_ALWAYS_INTERACTIVE
2259 #ifndef YY_NEVER_INTERACTIVE
2260 extern int isatty YY_PROTO(( int ));
2264 #ifdef YY_USE_PROTOS
2265 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
2267 void yy_init_buffer( b, file )
2274 yy_flush_buffer( b );
2276 b->yy_input_file = file;
2277 b->yy_fill_buffer = 1;
2279 #if YY_ALWAYS_INTERACTIVE
2280 b->yy_is_interactive = 1;
2282 #if YY_NEVER_INTERACTIVE
2283 b->yy_is_interactive = 0;
2285 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2291 #ifdef YY_USE_PROTOS
2292 void yy_flush_buffer( YY_BUFFER_STATE b )
2294 void yy_flush_buffer( b )
2304 /* We always need two end-of-buffer characters. The first causes
2305 * a transition to the end-of-buffer state. The second causes
2306 * a jam in that state.
2308 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2309 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2311 b->yy_buf_pos = &b->yy_ch_buf[0];
2314 b->yy_buffer_status = YY_BUFFER_NEW;
2316 if ( b == yy_current_buffer )
2317 yy_load_buffer_state();
2321 #ifndef YY_NO_SCAN_BUFFER
2322 #ifdef YY_USE_PROTOS
2323 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
2325 YY_BUFFER_STATE yy_scan_buffer( base, size )
2333 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2334 base[size-1] != YY_END_OF_BUFFER_CHAR )
2335 /* They forgot to leave room for the EOB's. */
2338 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2340 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2342 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2343 b->yy_buf_pos = b->yy_ch_buf = base;
2344 b->yy_is_our_buffer = 0;
2345 b->yy_input_file = 0;
2346 b->yy_n_chars = b->yy_buf_size;
2347 b->yy_is_interactive = 0;
2349 b->yy_fill_buffer = 0;
2350 b->yy_buffer_status = YY_BUFFER_NEW;
2352 yy_switch_to_buffer( b );
2359 #ifndef YY_NO_SCAN_STRING
2360 #ifdef YY_USE_PROTOS
2361 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
2363 YY_BUFFER_STATE yy_scan_string( yy_str )
2364 yyconst char *yy_str;
2368 for ( len = 0; yy_str[len]; ++len )
2371 return yy_scan_bytes( yy_str, len );
2376 #ifndef YY_NO_SCAN_BYTES
2377 #ifdef YY_USE_PROTOS
2378 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
2380 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
2381 yyconst char *bytes;
2390 /* Get memory for full buffer, including space for trailing EOB's. */
2392 buf = (char *) yy_flex_alloc( n );
2394 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2396 for ( i = 0; i < len; ++i )
2399 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
2401 b = yy_scan_buffer( buf, n );
2403 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2405 /* It's okay to grow etc. this buffer, and we should throw it
2406 * away when we're done.
2408 b->yy_is_our_buffer = 1;
2415 #ifndef YY_NO_PUSH_STATE
2416 #ifdef YY_USE_PROTOS
2417 static void yy_push_state( int new_state )
2419 static void yy_push_state( new_state )
2423 if ( yy_start_stack_ptr >= yy_start_stack_depth )
2427 yy_start_stack_depth += YY_START_STACK_INCR;
2428 new_size = yy_start_stack_depth * sizeof( int );
2430 if ( ! yy_start_stack )
2431 yy_start_stack = (int *) yy_flex_alloc( new_size );
2434 yy_start_stack = (int *) yy_flex_realloc(
2435 (void *) yy_start_stack, new_size );
2437 if ( ! yy_start_stack )
2439 "out of memory expanding start-condition stack" );
2442 yy_start_stack[yy_start_stack_ptr++] = YY_START;
2449 #ifndef YY_NO_POP_STATE
2450 static void yy_pop_state()
2452 if ( --yy_start_stack_ptr < 0 )
2453 YY_FATAL_ERROR( "start-condition stack underflow" );
2455 BEGIN(yy_start_stack[yy_start_stack_ptr]);
2460 #ifndef YY_NO_TOP_STATE
2461 static int yy_top_state()
2463 return yy_start_stack[yy_start_stack_ptr - 1];
2467 #ifndef YY_EXIT_FAILURE
2468 #define YY_EXIT_FAILURE 2
2471 #ifdef YY_USE_PROTOS
2472 static void yy_fatal_error( yyconst char msg[] )
2474 static void yy_fatal_error( msg )
2478 (void) fprintf( stderr, "%s\n", msg );
2479 exit( YY_EXIT_FAILURE );
2484 /* Redefine yyless() so it works in section 3 code. */
2490 /* Undo effects of setting up yytext. */ \
2491 yytext[yyleng] = yy_hold_char; \
2492 yy_c_buf_p = yytext + n; \
2493 yy_hold_char = *yy_c_buf_p; \
2494 *yy_c_buf_p = '\0'; \
2500 /* Internal utility routines. */
2503 #ifdef YY_USE_PROTOS
2504 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
2506 static void yy_flex_strncpy( s1, s2, n )
2513 for ( i = 0; i < n; ++i )
2518 #ifdef YY_NEED_STRLEN
2519 #ifdef YY_USE_PROTOS
2520 static int yy_flex_strlen( yyconst char *s )
2522 static int yy_flex_strlen( s )
2527 for ( n = 0; s[n]; ++n )
2535 #ifdef YY_USE_PROTOS
2536 static void *yy_flex_alloc( yy_size_t size )
2538 static void *yy_flex_alloc( size )
2542 return (void *) malloc( size );
2545 #ifdef YY_USE_PROTOS
2546 static void *yy_flex_realloc( void *ptr, yy_size_t size )
2548 static void *yy_flex_realloc( ptr, size )
2553 /* The cast to (char *) in the following accommodates both
2554 * implementations that use char* generic pointers, and those
2555 * that use void* generic pointers. It works with the latter
2556 * because both ANSI C and C++ allow castless assignment from
2557 * any pointer type to void*, and deal with argument conversions
2558 * as though doing an assignment.
2560 return (void *) realloc( (char *) ptr, size );
2563 #ifdef YY_USE_PROTOS
2564 static void yy_flex_free( void *ptr )
2566 static void yy_flex_free( ptr )
2583 const char *const builtinservicehelpstrings[]= {
2585 "parameter <parameter>",