4 #define YY_INT_ALIGNED short int
6 /* A lexical scanner generated by flex */
9 #define YY_FLEX_MAJOR_VERSION 2
10 #define YY_FLEX_MINOR_VERSION 5
11 #define YY_FLEX_SUBMINOR_VERSION 31
12 #if YY_FLEX_SUBMINOR_VERSION > 0
16 /* First, we deal with platform-specific or compiler-specific issues. */
18 /* begin standard C headers. */
24 /* end standard C headers. */
26 /* flex integer type definitions */
31 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
33 #if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
35 typedef int8_t flex_int8_t;
36 typedef uint8_t flex_uint8_t;
37 typedef int16_t flex_int16_t;
38 typedef uint16_t flex_uint16_t;
39 typedef int32_t flex_int32_t;
40 typedef uint32_t flex_uint32_t;
42 typedef signed char flex_int8_t;
43 typedef short int flex_int16_t;
44 typedef int flex_int32_t;
45 typedef unsigned char flex_uint8_t;
46 typedef unsigned short int flex_uint16_t;
47 typedef unsigned int flex_uint32_t;
50 /* Limits of integral types. */
52 #define INT8_MIN (-128)
55 #define INT16_MIN (-32767-1)
58 #define INT32_MIN (-2147483647-1)
61 #define INT8_MAX (127)
64 #define INT16_MAX (32767)
67 #define INT32_MAX (2147483647)
70 #define UINT8_MAX (255U)
73 #define UINT16_MAX (65535U)
76 #define UINT32_MAX (4294967295U)
79 #endif /* ! FLEXINT_H */
83 /* The "const" storage-class-modifier is valid. */
86 #else /* ! __cplusplus */
93 #endif /* ! __cplusplus */
101 /* Returned upon end-of-file. */
104 /* Promotes a possibly negative, possibly signed char to an unsigned
105 * integer for use as an array index. If the signed char is negative,
106 * we want to instead treat it as an 8-bit unsigned char, hence the
109 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
111 /* Enter a start condition. This macro really ought to take a parameter,
112 * but we do it the disgusting crufty way forced on us by the ()-less
113 * definition of BEGIN.
115 #define BEGIN (yy_start) = 1 + 2 *
117 /* Translate the current start state into a value that can be later handed
118 * to BEGIN to return to the state. The YYSTATE alias is for lex
121 #define YY_START (((yy_start) - 1) / 2)
122 #define YYSTATE YY_START
124 /* Action number for EOF rule of a given start state. */
125 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
127 /* Special action meaning "start processing a new file". */
128 #define YY_NEW_FILE yyrestart(yyin )
130 #define YY_END_OF_BUFFER_CHAR 0
132 /* Size of default input buffer. */
134 #define YY_BUF_SIZE 16384
137 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
138 #define YY_TYPEDEF_YY_BUFFER_STATE
139 typedef struct yy_buffer_state *YY_BUFFER_STATE;
144 extern FILE *yyin, *yyout;
146 #define EOB_ACT_CONTINUE_SCAN 0
147 #define EOB_ACT_END_OF_FILE 1
148 #define EOB_ACT_LAST_MATCH 2
150 #define YY_LESS_LINENO(n)
152 /* Return all but the first "n" matched characters back to the input stream. */
156 /* Undo effects of setting up yytext. */ \
157 int yyless_macro_arg = (n); \
158 YY_LESS_LINENO(yyless_macro_arg);\
159 *yy_cp = (yy_hold_char); \
160 YY_RESTORE_YY_MORE_OFFSET \
161 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
162 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
166 #define unput(c) yyunput( c, (yytext_ptr) )
168 /* The following is because we cannot portably get our hands on size_t
169 * (without autoconf's help, which isn't available because we want
170 * flex-generated scanners to compile on their own).
173 #ifndef YY_TYPEDEF_YY_SIZE_T
174 #define YY_TYPEDEF_YY_SIZE_T
175 typedef unsigned int yy_size_t;
178 #ifndef YY_STRUCT_YY_BUFFER_STATE
179 #define YY_STRUCT_YY_BUFFER_STATE
180 struct yy_buffer_state
184 char *yy_ch_buf; /* input buffer */
185 char *yy_buf_pos; /* current position in input buffer */
187 /* Size of input buffer in bytes, not including room for EOB
190 yy_size_t yy_buf_size;
192 /* Number of characters read into yy_ch_buf, not including EOB
197 /* Whether we "own" the buffer - i.e., we know we created it,
198 * and can realloc() it to grow it, and should free() it to
201 int yy_is_our_buffer;
203 /* Whether this is an "interactive" input source; if so, and
204 * if we're using stdio for input, then we want to use getc()
205 * instead of fread(), to make sure we stop fetching input after
208 int yy_is_interactive;
210 /* Whether we're considered to be at the beginning of a line.
211 * If so, '^' rules will be active on the next match, otherwise
216 int yy_bs_lineno; /**< The line count. */
217 int yy_bs_column; /**< The column count. */
219 /* Whether to try to fill the input buffer when we reach the
224 int yy_buffer_status;
226 #define YY_BUFFER_NEW 0
227 #define YY_BUFFER_NORMAL 1
228 /* When an EOF's been seen but there's still some text to process
229 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
230 * shouldn't try reading from the input source any more. We might
231 * still have a bunch of tokens to match, though, because of
232 * possible backing-up.
234 * When we actually see the EOF, we change the status to "new"
235 * (via yyrestart()), so that the user can continue scanning by
236 * just pointing yyin at a new input file.
238 #define YY_BUFFER_EOF_PENDING 2
241 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
243 /* Stack of input buffers. */
244 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
245 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
246 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
248 /* We provide macros for accessing buffer states in case in the
249 * future we want to put the buffer states in a more general
252 * Returns the top of the stack, or NULL.
254 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
255 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
258 /* Same as previous macro, but useful when we know that the buffer stack is not
259 * NULL or when we need an lvalue. For internal use only.
261 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
263 /* yy_hold_char holds the character lost when yytext is formed. */
264 static char yy_hold_char;
265 static int yy_n_chars; /* number of characters read into yy_ch_buf */
268 /* Points to current character in buffer. */
269 static char *yy_c_buf_p = (char *) 0;
270 static int yy_init = 1; /* whether we need to initialize */
271 static int yy_start = 0; /* start state number */
273 /* Flag which is used to allow yywrap()'s to do buffer switches
274 * instead of setting up a fresh yyin. A bit of a hack ...
276 static int yy_did_buffer_switch_on_eof;
278 void yyrestart (FILE *input_file );
279 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
280 YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
281 void yy_delete_buffer (YY_BUFFER_STATE b );
282 void yy_flush_buffer (YY_BUFFER_STATE b );
283 void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
284 void yypop_buffer_state (void );
286 static void yyensure_buffer_stack (void );
287 static void yy_load_buffer_state (void );
288 static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
290 #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
292 YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
293 YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
294 YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len );
296 void *yyalloc (yy_size_t );
297 void *yyrealloc (void *,yy_size_t );
298 void yyfree (void * );
300 #define yy_new_buffer yy_create_buffer
302 #define yy_set_interactive(is_interactive) \
304 if ( ! YY_CURRENT_BUFFER ){ \
305 yyensure_buffer_stack (); \
306 YY_CURRENT_BUFFER_LVALUE = \
307 yy_create_buffer(yyin,YY_BUF_SIZE ); \
309 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
312 #define yy_set_bol(at_bol) \
314 if ( ! YY_CURRENT_BUFFER ){\
315 yyensure_buffer_stack (); \
316 YY_CURRENT_BUFFER_LVALUE = \
317 yy_create_buffer(yyin,YY_BUF_SIZE ); \
319 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
322 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
324 /* Begin user sect3 */
327 #define YY_SKIP_YYWRAP
329 typedef unsigned char YY_CHAR;
331 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
333 typedef int yy_state_type;
340 #define yytext_ptr yytext
342 static yy_state_type yy_get_previous_state (void );
343 static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
344 static int yy_get_next_buffer (void );
345 static void yy_fatal_error (yyconst char msg[] );
347 /* Done after the current pattern has been matched and before the
348 * corresponding action - sets up yytext.
350 #define YY_DO_BEFORE_ACTION \
351 (yytext_ptr) = yy_bp; \
352 yyleng = (size_t) (yy_cp - yy_bp); \
353 (yy_hold_char) = *yy_cp; \
355 (yy_c_buf_p) = yy_cp;
357 #define YY_NUM_RULES 107
358 #define YY_END_OF_BUFFER 108
359 /* This struct is not used in this scanner,
360 but its presence is necessary. */
363 flex_int32_t yy_verify;
366 static yyconst flex_int16_t yy_accept[565] =
368 0, 0, 108, 103, 98, 99, 90, 104, 101, 87,
369 91, 88, 89, 94, 105, 103, 103, 103, 103, 103,
370 103, 103, 103, 103, 103, 103, 103, 103, 103, 103,
371 103, 103, 103, 103, 103, 103, 103, 92, 103, 98,
372 99, 101, 0, 0, 102, 0, 101, 101, 100, 96,
373 94, 0, 97, 103, 103, 103, 103, 19, 103, 103,
374 103, 103, 103, 103, 103, 103, 103, 103, 37, 103,
375 103, 103, 103, 32, 103, 103, 103, 103, 103, 103,
376 103, 103, 103, 103, 103, 103, 103, 103, 103, 103,
377 103, 103, 103, 103, 103, 103, 103, 103, 103, 103,
379 0, 0, 0, 95, 94, 97, 103, 103, 103, 103,
380 103, 103, 103, 103, 103, 103, 103, 103, 103, 103,
381 103, 31, 63, 103, 103, 103, 103, 103, 103, 103,
382 103, 103, 103, 71, 103, 103, 103, 103, 103, 103,
383 103, 103, 103, 103, 103, 103, 103, 103, 103, 103,
384 103, 103, 103, 103, 103, 103, 103, 103, 103, 103,
385 103, 103, 0, 0, 95, 94, 103, 103, 103, 67,
386 103, 103, 64, 68, 103, 103, 103, 35, 36, 103,
387 103, 103, 103, 40, 42, 103, 51, 103, 103, 60,
388 70, 103, 72, 103, 73, 103, 103, 103, 103, 103,
390 103, 103, 30, 103, 85, 103, 103, 103, 103, 103,
391 103, 103, 103, 103, 103, 103, 75, 76, 103, 62,
392 103, 0, 95, 94, 103, 65, 103, 103, 103, 103,
393 103, 59, 103, 66, 103, 93, 103, 38, 103, 103,
394 103, 103, 103, 103, 103, 103, 103, 103, 103, 103,
395 41, 103, 103, 49, 103, 103, 103, 103, 103, 103,
396 103, 103, 103, 103, 103, 86, 95, 94, 103, 103,
397 103, 103, 103, 69, 103, 103, 103, 103, 103, 103,
398 70, 77, 78, 79, 80, 81, 82, 83, 84, 103,
399 103, 103, 103, 61, 103, 103, 103, 1, 103, 103,
401 103, 103, 103, 39, 103, 74, 103, 103, 103, 103,
402 95, 94, 103, 103, 103, 103, 103, 103, 103, 103,
403 50, 103, 21, 26, 103, 103, 103, 10, 103, 103,
404 103, 103, 103, 52, 103, 103, 103, 103, 103, 45,
405 62, 95, 94, 103, 9, 67, 103, 103, 103, 103,
406 103, 103, 103, 103, 103, 103, 103, 103, 47, 103,
407 103, 103, 103, 103, 48, 103, 46, 103, 95, 103,
408 103, 103, 103, 103, 103, 103, 103, 103, 103, 12,
409 103, 103, 103, 103, 103, 103, 44, 11, 103, 103,
410 103, 103, 103, 103, 95, 103, 103, 103, 103, 103,
412 33, 103, 103, 103, 103, 103, 103, 103, 103, 103,
413 103, 103, 103, 8, 103, 103, 103, 103, 103, 103,
414 103, 103, 103, 103, 103, 43, 34, 103, 103, 103,
415 103, 103, 103, 103, 103, 103, 103, 103, 103, 103,
416 103, 20, 103, 103, 103, 103, 53, 103, 103, 103,
417 103, 103, 103, 103, 103, 103, 103, 103, 103, 103,
418 56, 103, 103, 103, 103, 103, 54, 103, 103, 103,
419 103, 103, 103, 103, 103, 103, 103, 103, 103, 103,
420 57, 103, 103, 15, 103, 103, 103, 103, 17, 7,
421 103, 103, 103, 103, 103, 103, 103, 23, 103, 103,
423 103, 103, 103, 103, 103, 103, 103, 103, 103, 4,
424 103, 103, 103, 22, 103, 103, 103, 103, 103, 13,
425 103, 103, 103, 103, 5, 6, 103, 103, 103, 103,
426 103, 103, 16, 103, 103, 103, 103, 103, 103, 3,
427 25, 103, 18, 103, 103, 103, 27, 103, 55, 103,
428 24, 14, 58, 103, 103, 103, 103, 28, 103, 103,
432 static yyconst flex_int32_t yy_ec[256] =
434 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
435 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
436 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
437 1, 2, 4, 5, 6, 7, 8, 9, 8, 10,
438 11, 8, 8, 8, 12, 8, 8, 13, 14, 15,
439 16, 17, 18, 19, 20, 21, 21, 8, 8, 8,
440 8, 8, 8, 8, 22, 22, 22, 22, 22, 22,
441 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
442 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
443 8, 23, 8, 8, 24, 8, 25, 26, 27, 28,
445 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
446 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
447 49, 50, 8, 51, 8, 8, 1, 1, 1, 1,
448 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
449 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
450 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
451 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
452 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
453 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
454 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
456 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
457 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
458 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
459 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
460 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
464 static yyconst flex_int32_t yy_meta[52] =
466 1, 2, 3, 1, 2, 1, 1, 1, 1, 1,
467 1, 1, 4, 4, 4, 4, 4, 4, 4, 4,
468 4, 1, 2, 1, 1, 1, 1, 1, 1, 1,
469 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
470 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
474 static yyconst flex_int16_t yy_base[571] =
476 0, 0, 779, 0, 50, 780, 0, 49, 55, 0,
477 0, 0, 0, 67, 59, 745, 19, 49, 34, 56,
478 744, 29, 39, 59, 747, 30, 71, 70, 729, 749,
479 728, 76, 74, 733, 65, 742, 82, 0, 0, 111,
480 780, 767, 73, 97, 780, 134, 123, 766, 780, 170,
481 179, 109, 116, 730, 93, 723, 94, 0, 88, 737,
482 739, 721, 98, 734, 716, 731, 718, 730, 0, 719,
483 728, 712, 719, 0, 716, 113, 711, 725, 709, 717,
484 706, 701, 120, 711, 717, 119, 712, 706, 133, 118,
485 698, 703, 701, 697, 699, 709, 710, 694, 693, 701,
487 163, 0, 196, 214, 223, 140, 706, 690, 692, 698,
488 693, 701, 683, 688, 688, 679, 696, 692, 692, 678,
489 686, 0, 679, 690, 690, 675, 689, 673, 673, 675,
490 671, 671, 683, 0, 671, 663, 662, 116, 671, 667,
491 660, 668, 675, 655, 667, 669, 667, 650, 665, 648,
492 646, 679, 646, 647, 648, 651, 650, 643, 644, 640,
493 644, 637, 0, 232, 250, 259, 644, 635, 631, 637,
494 643, 643, 0, 0, 635, 642, 633, 0, 0, 640,
495 628, 627, 623, 0, 0, 640, 0, 624, 620, 0,
496 635, 627, 0, 637, 0, 628, 175, 633, 647, 616,
498 630, 619, 0, 626, 0, 627, 620, 608, 609, 617,
499 620, 620, 605, 604, 606, 615, 631, 0, 609, 608,
500 611, 276, 287, 296, 594, 0, 626, 595, 598, 623,
501 596, 0, 595, 0, 593, 588, 586, 0, 600, 600,
502 591, 305, 595, 582, 580, 583, 593, 591, 587, 590,
503 0, 574, 575, 0, 583, 588, 576, 574, 583, 582,
504 579, 563, 566, 568, 568, 0, 313, 322, 577, 574,
505 570, 571, 560, 0, 562, 561, 586, 568, 584, 566,
506 0, 0, 0, 0, 0, 0, 0, 0, 0, 565,
507 566, 580, 551, 0, 562, 561, 544, 575, 557, 541,
509 555, 537, 535, 0, 538, 0, 551, 552, 540, 546,
510 331, 340, 547, 547, 528, 561, 527, 542, 533, 128,
511 557, 538, 555, 0, 527, 536, 522, 0, 534, 533,
512 531, 548, 510, 546, 524, 518, 512, 518, 523, 0,
513 0, 349, 540, 539, 0, 0, 251, 517, 522, 519,
514 502, 507, 143, 517, 142, 506, 505, 513, 0, 499,
515 512, 509, 252, 496, 0, 525, 0, 503, 358, 353,
516 493, 491, 489, 488, 493, 487, 517, 483, 485, 0,
517 493, 495, 485, 485, 476, 478, 0, 0, 492, 477,
518 475, 478, 491, 479, 0, 478, 464, 469, 472, 481,
520 0, 497, 464, 475, 255, 473, 466, 462, 474, 463,
521 472, 467, 456, 0, 459, 468, 458, 453, 465, 460,
522 449, 462, 445, 447, 456, 0, 0, 454, 158, 450,
523 448, 455, 435, 447, 454, 438, 467, 433, 435, 439,
524 444, 0, 445, 446, 430, 431, 458, 424, 432, 439,
525 423, 421, 452, 436, 429, 416, 416, 420, 433, 417,
526 444, 426, 411, 415, 413, 439, 0, 407, 409, 419,
527 418, 410, 412, 353, 400, 400, 402, 429, 402, 397,
528 0, 395, 399, 0, 392, 397, 392, 401, 0, 0,
529 390, 392, 392, 396, 403, 388, 382, 413, 392, 386,
531 391, 389, 376, 407, 388, 390, 387, 373, 374, 0,
532 359, 356, 355, 0, 370, 349, 363, 348, 361, 0,
533 362, 355, 357, 350, 0, 0, 356, 352, 334, 346,
534 255, 256, 0, 257, 253, 260, 257, 253, 261, 0,
535 0, 251, 0, 242, 248, 218, 0, 219, 0, 164,
536 0, 0, 0, 176, 176, 164, 148, 0, 138, 148,
537 128, 0, 0, 780, 398, 402, 406, 410, 167, 129
540 static yyconst flex_int16_t yy_def[571] =
542 564, 1, 564, 565, 564, 564, 565, 566, 567, 565,
543 565, 565, 565, 565, 564, 565, 565, 565, 565, 565,
544 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
545 565, 565, 565, 565, 565, 565, 565, 565, 565, 564,
546 564, 568, 564, 566, 564, 566, 567, 568, 564, 565,
547 14, 564, 564, 565, 565, 565, 565, 565, 565, 565,
548 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
549 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
550 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
551 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
553 564, 569, 566, 565, 14, 564, 565, 565, 565, 565,
554 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
555 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
556 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
557 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
558 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
559 565, 565, 570, 103, 565, 14, 565, 565, 565, 565,
560 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
561 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
562 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
564 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
565 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
566 565, 566, 565, 14, 565, 565, 565, 565, 565, 565,
567 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
568 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
569 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
570 565, 565, 565, 565, 565, 565, 565, 14, 565, 565,
571 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
572 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
573 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
575 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
576 565, 14, 565, 565, 565, 565, 565, 565, 565, 565,
577 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
578 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
579 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
580 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
581 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
582 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
583 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
584 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
586 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
587 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
588 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
589 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
590 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
591 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
592 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
593 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
594 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
595 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
597 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
598 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
599 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
600 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
601 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
602 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
603 565, 565, 565, 0, 564, 564, 564, 564, 564, 564
606 static yyconst flex_int16_t yy_nxt[832] =
608 4, 5, 6, 7, 8, 9, 10, 4, 11, 12,
609 13, 4, 14, 14, 14, 14, 14, 14, 14, 14,
610 14, 4, 15, 16, 17, 4, 18, 19, 20, 21,
611 22, 23, 24, 4, 25, 26, 27, 28, 29, 30,
612 31, 32, 33, 34, 35, 36, 37, 4, 4, 4,
613 38, 40, 41, 45, 55, 42, 48, 49, 60, 48,
614 52, 53, 61, 56, 70, 72, 62, 73, 78, 79,
615 71, 46, 43, 57, 52, 53, 58, 48, 50, 51,
616 51, 51, 51, 51, 51, 51, 51, 51, 74, 75,
617 59, 63, 64, 65, 66, 80, 76, 67, 82, 81,
619 88, 45, 90, 68, 89, 91, 99, 96, 83, 97,
620 52, 53, 40, 41, 84, 92, 42, 106, 93, 46,
621 113, 108, 94, 100, 48, 49, 114, 48, 109, 111,
622 118, 138, 44, 43, 564, 101, 44, 112, 43, 130,
623 119, 106, 131, 196, 150, 48, 102, 102, 102, 102,
624 102, 102, 102, 102, 102, 564, 142, 146, 197, 151,
625 143, 152, 43, 139, 101, 44, 147, 351, 378, 381,
626 163, 352, 379, 148, 382, 149, 563, 383, 562, 561,
627 560, 103, 104, 104, 104, 104, 104, 104, 104, 104,
628 104, 105, 105, 105, 105, 105, 105, 105, 105, 105,
630 45, 450, 559, 245, 558, 557, 451, 556, 164, 164,
631 164, 164, 164, 164, 164, 164, 164, 164, 46, 246,
632 164, 164, 164, 164, 164, 164, 165, 165, 165, 165,
633 165, 165, 165, 165, 165, 166, 166, 166, 166, 166,
634 166, 166, 166, 166, 222, 222, 222, 222, 222, 222,
635 222, 222, 222, 222, 555, 554, 222, 222, 222, 222,
636 222, 222, 223, 223, 223, 223, 223, 223, 223, 223,
637 223, 224, 224, 224, 224, 224, 224, 224, 224, 224,
638 45, 371, 390, 553, 428, 552, 551, 550, 549, 548,
639 547, 546, 545, 544, 543, 372, 391, 429, 46, 267,
641 267, 267, 267, 267, 267, 267, 267, 267, 268, 268,
642 268, 268, 268, 268, 268, 268, 268, 282, 283, 284,
643 285, 286, 287, 288, 289, 311, 311, 311, 311, 311,
644 311, 311, 311, 311, 312, 312, 312, 312, 312, 312,
645 312, 312, 312, 342, 342, 342, 342, 342, 342, 342,
646 342, 342, 343, 343, 343, 343, 343, 343, 343, 343,
647 343, 369, 369, 369, 369, 369, 369, 369, 369, 369,
648 395, 395, 395, 395, 395, 395, 395, 395, 395, 396,
649 494, 542, 541, 540, 539, 538, 537, 536, 535, 534,
650 533, 532, 495, 531, 530, 397, 529, 398, 39, 528,
652 527, 39, 44, 44, 526, 44, 47, 47, 47, 47,
653 48, 48, 48, 48, 525, 524, 523, 522, 521, 520,
654 519, 518, 517, 516, 515, 514, 513, 512, 511, 510,
655 509, 508, 507, 506, 505, 504, 503, 502, 501, 500,
656 499, 498, 497, 496, 493, 492, 491, 490, 489, 488,
657 487, 486, 485, 484, 483, 482, 481, 480, 479, 478,
658 477, 476, 475, 474, 473, 472, 471, 470, 469, 468,
659 467, 466, 465, 464, 463, 462, 461, 460, 459, 458,
660 457, 456, 455, 454, 453, 452, 449, 448, 447, 446,
661 445, 444, 443, 442, 441, 440, 439, 438, 437, 436,
663 435, 434, 433, 432, 431, 430, 427, 426, 425, 424,
664 423, 422, 421, 420, 419, 418, 417, 416, 415, 414,
665 413, 412, 411, 410, 409, 408, 407, 406, 405, 404,
666 403, 402, 401, 400, 399, 394, 393, 392, 389, 388,
667 387, 386, 385, 384, 380, 377, 376, 375, 374, 373,
668 370, 50, 368, 367, 366, 365, 364, 363, 346, 362,
669 361, 360, 359, 358, 357, 356, 355, 354, 353, 350,
670 349, 348, 347, 346, 345, 344, 341, 340, 339, 338,
671 337, 336, 335, 334, 333, 332, 331, 330, 329, 328,
672 327, 326, 325, 324, 323, 322, 321, 320, 319, 318,
674 317, 316, 315, 314, 313, 310, 309, 308, 307, 306,
675 305, 304, 303, 302, 301, 300, 299, 298, 297, 296,
676 295, 294, 293, 292, 291, 290, 281, 280, 279, 278,
677 277, 276, 275, 274, 273, 272, 271, 270, 269, 266,
678 265, 264, 263, 262, 261, 260, 259, 258, 257, 256,
679 255, 254, 253, 252, 251, 250, 234, 249, 248, 247,
680 244, 243, 242, 241, 240, 239, 238, 237, 236, 235,
681 234, 233, 232, 231, 230, 229, 228, 227, 226, 225,
682 221, 220, 219, 218, 217, 216, 215, 214, 213, 212,
683 211, 210, 209, 208, 207, 206, 205, 204, 203, 202,
685 201, 200, 199, 198, 195, 194, 193, 192, 191, 190,
686 189, 188, 187, 186, 185, 184, 183, 182, 181, 180,
687 179, 178, 177, 176, 175, 174, 173, 172, 171, 170,
688 169, 168, 167, 162, 161, 160, 159, 158, 157, 156,
689 155, 154, 153, 145, 144, 141, 140, 137, 136, 135,
690 134, 133, 132, 129, 128, 127, 126, 125, 124, 123,
691 122, 121, 120, 117, 116, 115, 110, 107, 49, 49,
692 98, 95, 87, 86, 85, 77, 69, 54, 564, 3,
693 564, 564, 564, 564, 564, 564, 564, 564, 564, 564,
694 564, 564, 564, 564, 564, 564, 564, 564, 564, 564,
696 564, 564, 564, 564, 564, 564, 564, 564, 564, 564,
697 564, 564, 564, 564, 564, 564, 564, 564, 564, 564,
698 564, 564, 564, 564, 564, 564, 564, 564, 564, 564,
702 static yyconst flex_int16_t yy_chk[832] =
704 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
705 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
706 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
707 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
708 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
709 1, 5, 5, 8, 17, 5, 9, 9, 19, 9,
710 15, 15, 19, 17, 22, 23, 19, 23, 26, 26,
711 22, 8, 5, 18, 43, 43, 18, 9, 14, 14,
712 14, 14, 14, 14, 14, 14, 14, 14, 24, 24,
713 18, 20, 20, 20, 20, 27, 24, 20, 28, 27,
715 32, 44, 33, 20, 32, 33, 37, 35, 28, 35,
716 52, 52, 40, 40, 28, 33, 40, 53, 33, 44,
717 59, 55, 33, 37, 47, 47, 59, 47, 55, 57,
718 63, 83, 570, 40, 46, 46, 46, 57, 53, 76,
719 63, 106, 76, 138, 90, 47, 46, 46, 46, 46,
720 46, 46, 46, 46, 46, 46, 86, 89, 138, 90,
721 86, 90, 106, 83, 101, 101, 89, 320, 353, 355,
722 569, 320, 353, 89, 355, 89, 561, 355, 560, 559,
723 557, 46, 50, 50, 50, 50, 50, 50, 50, 50,
724 50, 51, 51, 51, 51, 51, 51, 51, 51, 51,
726 103, 429, 556, 197, 555, 554, 429, 550, 103, 103,
727 103, 103, 103, 103, 103, 103, 103, 103, 103, 197,
728 103, 103, 103, 103, 103, 103, 104, 104, 104, 104,
729 104, 104, 104, 104, 104, 105, 105, 105, 105, 105,
730 105, 105, 105, 105, 164, 164, 164, 164, 164, 164,
731 164, 164, 164, 164, 548, 546, 164, 164, 164, 164,
732 164, 164, 165, 165, 165, 165, 165, 165, 165, 165,
733 165, 166, 166, 166, 166, 166, 166, 166, 166, 166,
734 222, 347, 363, 545, 405, 544, 542, 539, 538, 537,
735 536, 535, 534, 532, 531, 347, 363, 405, 222, 223,
737 223, 223, 223, 223, 223, 223, 223, 223, 224, 224,
738 224, 224, 224, 224, 224, 224, 224, 242, 242, 242,
739 242, 242, 242, 242, 242, 267, 267, 267, 267, 267,
740 267, 267, 267, 267, 268, 268, 268, 268, 268, 268,
741 268, 268, 268, 311, 311, 311, 311, 311, 311, 311,
742 311, 311, 312, 312, 312, 312, 312, 312, 312, 312,
743 312, 342, 342, 342, 342, 342, 342, 342, 342, 342,
744 369, 369, 369, 369, 369, 369, 369, 369, 369, 370,
745 474, 530, 529, 528, 527, 524, 523, 522, 521, 519,
746 518, 517, 474, 516, 515, 370, 513, 370, 565, 512,
748 511, 565, 566, 566, 509, 566, 567, 567, 567, 567,
749 568, 568, 568, 568, 508, 507, 506, 505, 504, 503,
750 502, 501, 500, 499, 498, 497, 496, 495, 494, 493,
751 492, 491, 488, 487, 486, 485, 483, 482, 480, 479,
752 478, 477, 476, 475, 473, 472, 471, 470, 469, 468,
753 466, 465, 464, 463, 462, 461, 460, 459, 458, 457,
754 456, 455, 454, 453, 452, 451, 450, 449, 448, 447,
755 446, 445, 444, 443, 441, 440, 439, 438, 437, 436,
756 435, 434, 433, 432, 431, 430, 428, 425, 424, 423,
757 422, 421, 420, 419, 418, 417, 416, 415, 413, 412,
759 411, 410, 409, 408, 407, 406, 404, 403, 402, 400,
760 399, 398, 397, 396, 394, 393, 392, 391, 390, 389,
761 386, 385, 384, 383, 382, 381, 379, 378, 377, 376,
762 375, 374, 373, 372, 371, 368, 366, 364, 362, 361,
763 360, 358, 357, 356, 354, 352, 351, 350, 349, 348,
764 344, 343, 339, 338, 337, 336, 335, 334, 333, 332,
765 331, 330, 329, 327, 326, 325, 323, 322, 321, 319,
766 318, 317, 316, 315, 314, 313, 310, 309, 308, 307,
767 305, 303, 302, 301, 300, 299, 298, 297, 296, 295,
768 293, 292, 291, 290, 280, 279, 278, 277, 276, 275,
770 273, 272, 271, 270, 269, 265, 264, 263, 262, 261,
771 260, 259, 258, 257, 256, 255, 253, 252, 250, 249,
772 248, 247, 246, 245, 244, 243, 241, 240, 239, 237,
773 236, 235, 233, 231, 230, 229, 228, 227, 225, 221,
774 220, 219, 217, 216, 215, 214, 213, 212, 211, 210,
775 209, 208, 207, 206, 204, 202, 201, 200, 199, 198,
776 196, 194, 192, 191, 189, 188, 186, 183, 182, 181,
777 180, 177, 176, 175, 172, 171, 170, 169, 168, 167,
778 162, 161, 160, 159, 158, 157, 156, 155, 154, 153,
779 152, 151, 150, 149, 148, 147, 146, 145, 144, 143,
781 142, 141, 140, 139, 137, 136, 135, 133, 132, 131,
782 130, 129, 128, 127, 126, 125, 124, 123, 121, 120,
783 119, 118, 117, 116, 115, 114, 113, 112, 111, 110,
784 109, 108, 107, 100, 99, 98, 97, 96, 95, 94,
785 93, 92, 91, 88, 87, 85, 84, 82, 81, 80,
786 79, 78, 77, 75, 73, 72, 71, 70, 68, 67,
787 66, 65, 64, 62, 61, 60, 56, 54, 48, 42,
788 36, 34, 31, 30, 29, 25, 21, 16, 3, 564,
789 564, 564, 564, 564, 564, 564, 564, 564, 564, 564,
790 564, 564, 564, 564, 564, 564, 564, 564, 564, 564,
792 564, 564, 564, 564, 564, 564, 564, 564, 564, 564,
793 564, 564, 564, 564, 564, 564, 564, 564, 564, 564,
794 564, 564, 564, 564, 564, 564, 564, 564, 564, 564,
798 static yy_state_type yy_last_accepting_state;
799 static char *yy_last_accepting_cpos;
801 extern int yy_flex_debug;
802 int yy_flex_debug = 0;
804 /* The intent behind this definition is that it'll catch
805 * any uses of REJECT which flex missed.
807 #define REJECT reject_used_but_not_detected
808 #define yymore() yymore_used_but_not_detected
809 #define YY_MORE_ADJ 0
810 #define YY_RESTORE_YY_MORE_OFFSET
814 * Copyright (C)1996-1997,1999 Ian Jackson
816 * This is free software; you can redistribute it and/or modify it
817 * under the terms of the GNU General Public License as published by
818 * the Free Software Foundation; either version 2 of the License, or
819 * (at your option) any later version.
821 * This program is distributed in the hope that it will be useful, but
822 * WITHOUT ANY WARRANTY; without even the implied warranty of
823 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
824 * General Public License for more details.
826 * You should have received a copy of the GNU General Public License
827 * along with userv; if not, write to the Free Software
828 * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
848 #include <sys/types.h>
849 #include <sys/stat.h>
862 typedef int directive_fnt(int dtoken);
863 static directive_fnt df_reject, df_execute, df_executefrompath;
864 static directive_fnt df_executefromdirectory, df_executebuiltin;
865 static directive_fnt df_errorstostderr, df_errorstosyslog, df_errorstofile;
866 static directive_fnt dfg_fdwant, dfg_setflag;
867 static directive_fnt df_reset, df_cd, df_userrcfile, df_include;
868 static directive_fnt df_includelookup, df_includedirectory;
869 static directive_fnt df_message, df_error, df_quit, df_eof;
870 static directive_fnt df_if, df_catchquit, df_errorspush;
871 static directive_fnt dfi_includeuserrcfile, dfi_includeclientconfig;
872 /* directive functions return:
873 * 0 for success having scanned up to and including end of line but not beyond,
874 * or tokv_error or tokv_quit.
875 * They expect to parse the whitespace before their parameters (if any).
878 typedef int parmcondition_fnt(int ctoken, char *const *parmvalues, int *rtrue);
879 static parmcondition_fnt pcf_glob, pcf_range, pcf_grep;
880 /* all conditional functions return tokv_error for failure or 0 for success
881 * at parsing and testing, in which case *rtrue is set to 0 or 1.
882 * On success they have scanned up to and including the condition's
883 * terminating newline; the pcf_... functions expect to parse the whitespace
884 * between the parameter name and the condition's arguments.
885 * Otherwise they return tokv_error.
886 * The parameter-based conditionals take a list of parameter values
887 * as obtained from the parameter functions and pa_parameter,
888 * and do _not_ free it.
891 typedef int parameter_fnt(int ptoken, char ***rvalues);
892 static parameter_fnt pf_service;
893 static parameter_fnt pf_callinguser, pf_serviceuser;
894 static parameter_fnt pf_callinggroup, pf_servicegroup;
895 static parameter_fnt pf_callingusershell, pf_serviceusershell;
896 /* Parameter functions return tokv_error or 0 for success at parsing
897 * and determining the value, in which case *rvalues is made to be
898 * a mallocd null-terminated array of pointers to mallocd strings.
899 * freeparm can be used to free such an array.
902 typedef int builtinserviceparse_fnt(char ***rnewargs);
903 static builtinserviceparse_fnt bispa_none, bispa_parameter;
904 /* These parse the arguments to a builtin service, including the
905 * newline at the end of the line. *rnewargs will initially be
906 * null, indicating that no arguments are to be set; the function
907 * may store a mallocd array of mallocd strings in it,
908 * containing the arguments it wishes to have set (null-pointer
912 static int yylex(void);
913 /* Returns a token (which may be an eof or error exception) */
915 static directive_fnt *lr_dir;
916 static parmcondition_fnt *lr_parmcond;
917 static builtinserviceparse_fnt *lr_bispa;
918 static builtinserviceexec_fnt *lr_bisexec;
919 static parameter_fnt *lr_parameter;
920 static int lr_loglevel, lr_logfacility, lr_min, lr_max, *lr_flag;
921 static int lr_flagval, lr_controlend;
922 static int lr_fdwant_readwrite; /* -1=never, 0=opt, 1=always */
924 /* Forward declarations of things used in lexer and parser */
926 struct parser_state {
927 int lineno, reportlineno, notedreferer, isinternal;
928 const char *filename;
929 struct stat filestab;
930 YY_BUFFER_STATE ybuf;
931 struct parser_state *upstate;
934 static struct parser_state *cstate;
936 struct error_handling {
937 int handling; /* One of the error handling modes tokt_ehandlemode */
938 int logfacility, loglevel;
939 int filekeep; /* File is in use by higher-level errors-push, leave it open */
944 static struct error_handling eh = { tokv_word_errorstostderr, 0,0,0,0,0 };
946 static int dequote(char *inplace);
947 static void countnewlines(void);
955 #ifndef YY_NO_UNISTD_H
956 /* Special case for "unistd.h", since it is non-ANSI. We include it way
957 * down here because we want the user's section 1 to have been scanned first.
958 * The user has a chance to override it with an option.
963 #ifndef YY_EXTRA_TYPE
964 #define YY_EXTRA_TYPE void *
967 /* Macros after this point can all be overridden by user definitions in
971 #ifndef YY_SKIP_YYWRAP
973 extern "C" int yywrap (void );
975 extern int yywrap (void );
979 static void yyunput (int c,char *buf_ptr );
982 static void yy_flex_strncpy (char *,yyconst char *,int );
985 #ifdef YY_NEED_STRLEN
986 static int yy_flex_strlen (yyconst char * );
992 static int yyinput (void );
994 static int input (void );
999 /* Amount of stuff to slurp up with each read. */
1000 #ifndef YY_READ_BUF_SIZE
1001 #define YY_READ_BUF_SIZE 8192
1004 /* Copy whatever the last rule matched to the standard output. */
1006 /* This used to be an fputs(), but since the string might contain NUL's,
1007 * we now use fwrite().
1009 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
1012 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1013 * is returned in "result".
1016 #define YY_INPUT(buf,result,max_size) \
1017 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1021 for ( n = 0; n < max_size && \
1022 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1023 buf[n] = (char) c; \
1025 buf[n++] = (char) c; \
1026 if ( c == EOF && ferror( yyin ) ) \
1027 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1033 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
1035 if( errno != EINTR) \
1037 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1048 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1049 * we don't want an extra ';' after the "return" because that will cause
1050 * some compilers to complain about unreachable statements.
1053 #define yyterminate() return YY_NULL
1056 /* Number of entries by which start-condition stack grows. */
1057 #ifndef YY_START_STACK_INCR
1058 #define YY_START_STACK_INCR 25
1061 /* Report a fatal error. */
1062 #ifndef YY_FATAL_ERROR
1063 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1066 /* end tables serialization structures and prototypes */
1068 /* Default declaration of generated scanner - a define so the user can
1069 * easily add parameters.
1072 #define YY_DECL_IS_OURS 1
1074 extern int yylex (void);
1076 #define YY_DECL int yylex (void)
1077 #endif /* !YY_DECL */
1079 /* Code executed at the beginning of each rule, after yytext and yyleng
1082 #ifndef YY_USER_ACTION
1083 #define YY_USER_ACTION
1086 /* Code executed at the end of each rule. */
1088 #define YY_BREAK break;
1091 #define YY_RULE_SETUP \
1094 /** The main scanner function which does all the work.
1098 register yy_state_type yy_current_state;
1099 register char *yy_cp, *yy_bp;
1100 register int yy_act;
1105 #line 1106 "<stdout>"
1116 (yy_start) = 1; /* first start state */
1124 if ( ! YY_CURRENT_BUFFER ) {
1125 yyensure_buffer_stack ();
1126 YY_CURRENT_BUFFER_LVALUE =
1127 yy_create_buffer(yyin,YY_BUF_SIZE );
1130 yy_load_buffer_state( );
1133 while ( 1 ) /* loops until end-of-file is reached */
1135 yy_cp = (yy_c_buf_p);
1137 /* Support of yytext. */
1138 *yy_cp = (yy_hold_char);
1140 /* yy_bp points to the position in yy_ch_buf of the start of
1145 yy_current_state = (yy_start);
1149 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1150 if ( yy_accept[yy_current_state] )
1152 (yy_last_accepting_state) = yy_current_state;
1153 (yy_last_accepting_cpos) = yy_cp;
1155 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1157 yy_current_state = (int) yy_def[yy_current_state];
1158 if ( yy_current_state >= 565 )
1159 yy_c = yy_meta[(unsigned int) yy_c];
1161 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1164 while ( yy_base[yy_current_state] != 780 );
1167 yy_act = yy_accept[yy_current_state];
1169 { /* have to back up */
1170 yy_cp = (yy_last_accepting_cpos);
1171 yy_current_state = (yy_last_accepting_state);
1172 yy_act = yy_accept[yy_current_state];
1175 YY_DO_BEFORE_ACTION;
1177 do_action: /* This label is used only to access EOF actions. */
1180 { /* beginning of action switch */
1181 case 0: /* must back up */
1182 /* undo the effects of YY_DO_BEFORE_ACTION */
1183 *yy_cp = (yy_hold_char);
1184 yy_cp = (yy_last_accepting_cpos);
1185 yy_current_state = (yy_last_accepting_state);
1186 goto yy_find_action;
1191 { lr_dir= df_reject; return tokv_word_reject; }
1196 { lr_dir= df_executefromdirectory; return tokv_word_executefromdirectory; }
1201 { lr_dir= df_executefrompath; return tokv_word_executefrompath; }
1206 { lr_dir= df_executebuiltin; return tokv_word_executebuiltin; }
1211 { lr_dir= df_errorstostderr; return tokv_word_errorstostderr; }
1216 { lr_dir= df_errorstosyslog; return tokv_word_errorstosyslog; }
1221 { lr_dir= df_errorstofile; return tokv_word_errorstofile; }
1226 { lr_dir= dfg_fdwant; lr_fdwant_readwrite=1; return tokv_word_requirefd; }
1231 { lr_dir= dfg_fdwant; lr_fdwant_readwrite=0; return tokv_word_allowfd; }
1236 { lr_dir= dfg_fdwant; lr_fdwant_readwrite=0; return tokv_word_nullfd; }
1241 { lr_dir= dfg_fdwant; lr_fdwant_readwrite=-1; return tokv_word_rejectfd; }
1246 { lr_dir= dfg_fdwant; lr_fdwant_readwrite=-1; return tokv_word_ignorefd; }
1251 { lr_dir= dfg_setflag; lr_flag= &setenvironment; lr_flagval= 1; return tokv_word_setenvironment; }
1256 { lr_dir= dfg_setflag; lr_flag= &setenvironment; lr_flagval= 0; return tokv_word_nosetenvironment; }
1261 { lr_dir= dfg_setflag; lr_flag= &suppressargs; lr_flagval= 1; return tokv_word_suppressargs; }
1266 { lr_dir= dfg_setflag; lr_flag= &suppressargs; lr_flagval= 0; return tokv_word_nosuppressargs; }
1271 { lr_dir= dfg_setflag; lr_flag= &disconnecthup; lr_flagval= 1; return tokv_word_disconnecthup; }
1276 { lr_dir= dfg_setflag; lr_flag= &disconnecthup; lr_flagval= 0; return tokv_word_nodisconnecthup; }
1281 { lr_dir= df_cd; return tokv_word_cd; }
1286 { lr_dir= df_userrcfile; return tokv_word_userrcfile; }
1291 { lr_dir= df_include; return tokv_word_include; }
1296 { lr_dir= df_include; return tokv_word_includeifexist; }
1301 { lr_dir= df_includelookup; return tokv_word_includelookup; }
1306 { lr_dir= df_includelookup; return tokv_word_includelookupall; }
1311 { lr_dir= df_includedirectory; return tokv_word_includedirectory; }
1316 { lr_dir= df_message; return tokv_word_message; }
1321 { lr_dir= df_include; return tokv_word_includesysconfig; }
1326 { lr_dir= dfi_includeuserrcfile; return tokv_word_includeuserrcfile; }
1331 { lr_dir= dfi_includeclientconfig; return tokv_word_includeclientconfig; }
1336 { lr_dir= df_quit; return tokv_word_quit; }
1341 { lr_dir= df_eof; return tokv_word_eof; }
1346 { lr_dir= df_if; return tokv_word_if; }
1351 { lr_dir= df_catchquit; return tokv_word_catchquit; }
1356 { lr_dir= df_errorspush; return tokv_word_errorspush; }
1361 { lr_controlend= tokv_word_if; return tokv_word_elif; }
1366 { lr_controlend= tokv_word_if; return tokv_word_else; }
1371 { lr_controlend= tokv_word_if; return tokv_word_fi; }
1376 { lr_controlend= tokv_word_catchquit; return tokv_word_hctac; }
1381 { lr_controlend= tokv_word_errorspush; return tokv_word_srorre; }
1386 { lr_parmcond= pcf_glob; return tokv_word_glob; }
1391 { lr_parmcond= pcf_range; return tokv_word_range; }
1396 { lr_parmcond= pcf_grep; return tokv_word_grep; }
1401 { lr_bispa= bispa_none; lr_bisexec= bisexec_environment; return tokv_word_environment; }
1406 { lr_bispa= bispa_parameter; lr_bisexec= bisexec_parameter; return tokv_word_parameter; }
1411 { lr_bispa= bispa_none; lr_bisexec= bisexec_version; return tokv_word_version; }
1416 { lr_bispa= bispa_none; lr_bisexec= bisexec_toplevel; return tokv_word_toplevel; }
1421 { lr_bispa= bispa_none; lr_bisexec= bisexec_override; return tokv_word_override; }
1426 { lr_bispa= bispa_none; lr_bisexec= bisexec_shutdown; return tokv_word_shutdown; }
1431 { lr_bispa= bispa_none; lr_bisexec= bisexec_reset; lr_dir= df_reset; return tokv_word_reset; }
1436 { lr_bispa= bispa_none; lr_bisexec= bisexec_execute; lr_dir= df_execute; return tokv_word_execute; }
1441 { lr_bispa= bispa_none; lr_bisexec= bisexec_help; return tokv_word_help; }
1446 { lr_parameter= pf_service; return tokv_word_service; }
1451 { lr_parameter= pf_callinguser; return tokv_word_callinguser; }
1456 { lr_parameter= pf_callinggroup; return tokv_word_callinggroup; }
1461 { lr_parameter= pf_callingusershell; return tokv_word_callingusershell; }
1466 { lr_parameter= pf_serviceuser; return tokv_word_serviceuser; }
1471 { lr_parameter= pf_servicegroup; return tokv_word_servicegroup; }
1476 { lr_parameter= pf_serviceusershell; return tokv_word_serviceusershell; }
1481 { lr_loglevel= LOG_DEBUG; return tokv_syslog_debug; }
1486 { lr_loglevel= LOG_INFO; return tokv_syslog_info; }
1491 { lr_loglevel= LOG_NOTICE; return tokv_syslog_notice; }
1496 { lr_loglevel= LOG_WARNING; return tokv_syslog_warning; }
1501 { lr_loglevel= LOG_ERR; return tokv_syslog_err; }
1506 { lr_loglevel= LOG_CRIT; return tokv_syslog_crit; }
1511 { lr_loglevel= LOG_ALERT; return tokv_syslog_alert; }
1516 { lr_loglevel= LOG_EMERG; return tokv_syslog_emerg; }
1521 { lr_logfacility= LOG_AUTHPRIV; return tokv_syslog_authpriv; }
1526 { lr_logfacility= LOG_CRON; return tokv_syslog_cron; }
1531 { lr_logfacility= LOG_DAEMON; return tokv_syslog_daemon; }
1536 { lr_logfacility= LOG_KERN; return tokv_syslog_kern; }
1541 { lr_logfacility= LOG_LPR; return tokv_syslog_lpr; }
1546 { lr_logfacility= LOG_MAIL; return tokv_syslog_mail; }
1551 { lr_logfacility= LOG_NEWS; return tokv_syslog_news; }
1556 { lr_logfacility= LOG_SYSLOG; return tokv_syslog_syslog; }
1561 { lr_logfacility= LOG_USER; return tokv_syslog_user; }
1566 { lr_logfacility= LOG_UUCP; return tokv_syslog_uucp; }
1571 { lr_logfacility= LOG_LOCAL0; return tokv_syslog_local0; }
1576 { lr_logfacility= LOG_LOCAL1; return tokv_syslog_local1; }
1581 { lr_logfacility= LOG_LOCAL2; return tokv_syslog_local2; }
1586 { lr_logfacility= LOG_LOCAL3; return tokv_syslog_local3; }
1591 { lr_logfacility= LOG_LOCAL4; return tokv_syslog_local4; }
1596 { lr_logfacility= LOG_LOCAL5; return tokv_syslog_local5; }
1601 { lr_logfacility= LOG_LOCAL6; return tokv_syslog_local6; }
1606 { lr_logfacility= LOG_LOCAL7; return tokv_syslog_local7; }
1611 { return tokv_word_read; }
1616 { return tokv_word_write; }
1621 { return tokv_dollar; }
1626 { return tokv_openparen; }
1631 { return tokv_closeparen; }
1636 { return tokv_not; }
1641 { return tokv_and; }
1651 { lr_dir= df_error; lr_loglevel= LOG_ERR; return tokv_word_error; }
1658 lr_min=lr_max= (int)strtoul(yytext,&ep,10);
1660 return tokv_ordinal;
1668 lr_min= (int)strtoul(yytext,&ep,10);
1669 assert(*ep == HYPHEN);
1671 lr_max= (int)strtoul(ep,&ep,10);
1673 if (lr_max < lr_min)
1674 return parseerrprint("fd range has min > max");
1675 return tokv_fdrange;
1683 lr_min= (int)strtoul(yytext,&ep,10);
1684 assert(*ep == HYPHEN);
1687 return tokv_fdstoend;
1691 /* rule 97 can match eol */
1694 countnewlines(); return tokv_lwsp;
1702 /* rule 99 can match eol */
1705 cstate->lineno++; return tokv_newline;
1708 /* rule 100 can match eol */
1711 cstate->lineno++; return tokv_newline;
1716 return parseerrprint("missing newline at eof after comment");
1719 /* rule 102 can match eol */
1724 return dequote(yytext);
1730 return tokv_barestring;
1732 case YY_STATE_EOF(INITIAL):
1739 return parseerrprint("misquoted or unterminated string");
1744 return parseerrprint("unexpected backslash");
1749 abort(); /* expect lex warning "rule cannot be matched" */
1756 #line 1757 "<stdout>"
1758 case YY_END_OF_BUFFER:
1760 /* Amount of text matched not including the EOB char. */
1761 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1763 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1764 *yy_cp = (yy_hold_char);
1765 YY_RESTORE_YY_MORE_OFFSET
1767 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1769 /* We're scanning a new file or input source. It's
1770 * possible that this happened because the user
1771 * just pointed yyin at a new source and called
1772 * yylex(). If so, then we have to assure
1773 * consistency between YY_CURRENT_BUFFER and our
1774 * globals. Here is the right place to do so, because
1775 * this is the first action (other than possibly a
1776 * back-up) that will match for the new input source.
1778 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1779 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1780 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1783 /* Note that here we test for yy_c_buf_p "<=" to the position
1784 * of the first EOB in the buffer, since yy_c_buf_p will
1785 * already have been incremented past the NUL character
1786 * (since all states make transitions on EOB to the
1787 * end-of-buffer state). Contrast this with the test
1790 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1791 { /* This was really a NUL. */
1792 yy_state_type yy_next_state;
1794 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1796 yy_current_state = yy_get_previous_state( );
1798 /* Okay, we're now positioned to make the NUL
1799 * transition. We couldn't have
1800 * yy_get_previous_state() go ahead and do it
1801 * for us because it doesn't know how to deal
1802 * with the possibility of jamming (and we don't
1803 * want to build jamming into it because then it
1804 * will run more slowly).
1807 yy_next_state = yy_try_NUL_trans( yy_current_state );
1809 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1811 if ( yy_next_state )
1813 /* Consume the NUL. */
1814 yy_cp = ++(yy_c_buf_p);
1815 yy_current_state = yy_next_state;
1821 yy_cp = (yy_c_buf_p);
1822 goto yy_find_action;
1826 else switch ( yy_get_next_buffer( ) )
1828 case EOB_ACT_END_OF_FILE:
1830 (yy_did_buffer_switch_on_eof) = 0;
1834 /* Note: because we've taken care in
1835 * yy_get_next_buffer() to have set up
1836 * yytext, we can now set up
1837 * yy_c_buf_p so that if some total
1838 * hoser (like flex itself) wants to
1839 * call the scanner after we return the
1840 * YY_NULL, it'll still work - another
1841 * YY_NULL will get returned.
1843 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1845 yy_act = YY_STATE_EOF(YY_START);
1851 if ( ! (yy_did_buffer_switch_on_eof) )
1857 case EOB_ACT_CONTINUE_SCAN:
1859 (yytext_ptr) + yy_amount_of_matched_text;
1861 yy_current_state = yy_get_previous_state( );
1863 yy_cp = (yy_c_buf_p);
1864 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1867 case EOB_ACT_LAST_MATCH:
1869 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1871 yy_current_state = yy_get_previous_state( );
1873 yy_cp = (yy_c_buf_p);
1874 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1875 goto yy_find_action;
1882 "fatal flex scanner internal error--no action found" );
1883 } /* end of action switch */
1884 } /* end of scanning one token */
1885 } /* end of yylex */
1887 /* yy_get_next_buffer - try to read in a new buffer
1889 * Returns a code representing an action:
1890 * EOB_ACT_LAST_MATCH -
1891 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1892 * EOB_ACT_END_OF_FILE - end of file
1894 static int yy_get_next_buffer (void)
1896 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1897 register char *source = (yytext_ptr);
1898 register int number_to_move, i;
1901 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1903 "fatal flex scanner internal error--end of buffer missed" );
1905 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1906 { /* Don't try to fill the buffer, so this is an EOF. */
1907 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1909 /* We matched a single character, the EOB, so
1910 * treat this as a final EOF.
1912 return EOB_ACT_END_OF_FILE;
1917 /* We matched some text prior to the EOB, first
1920 return EOB_ACT_LAST_MATCH;
1924 /* Try to read more data. */
1926 /* First move last chars to start of buffer. */
1927 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
1929 for ( i = 0; i < number_to_move; ++i )
1930 *(dest++) = *(source++);
1932 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1933 /* don't do the read, it's not guaranteed to return an EOF,
1936 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1940 size_t num_to_read =
1941 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1943 while ( num_to_read <= 0 )
1944 { /* Not enough room in the buffer - grow it. */
1946 /* just a shorter name for the current buffer */
1947 YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
1949 int yy_c_buf_p_offset =
1950 (int) ((yy_c_buf_p) - b->yy_ch_buf);
1952 if ( b->yy_is_our_buffer )
1954 int new_size = b->yy_buf_size * 2;
1956 if ( new_size <= 0 )
1957 b->yy_buf_size += b->yy_buf_size / 8;
1959 b->yy_buf_size *= 2;
1961 b->yy_ch_buf = (char *)
1962 /* Include room in for 2 EOB chars. */
1963 yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
1966 /* Can't grow it, we don't own it. */
1969 if ( ! b->yy_ch_buf )
1971 "fatal error - scanner input buffer overflow" );
1973 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1975 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1980 if ( num_to_read > YY_READ_BUF_SIZE )
1981 num_to_read = YY_READ_BUF_SIZE;
1983 /* Read in more data. */
1984 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1985 (yy_n_chars), num_to_read );
1987 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1990 if ( (yy_n_chars) == 0 )
1992 if ( number_to_move == YY_MORE_ADJ )
1994 ret_val = EOB_ACT_END_OF_FILE;
2000 ret_val = EOB_ACT_LAST_MATCH;
2001 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
2002 YY_BUFFER_EOF_PENDING;
2007 ret_val = EOB_ACT_CONTINUE_SCAN;
2009 (yy_n_chars) += number_to_move;
2010 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
2011 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
2013 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
2018 /* yy_get_previous_state - get the state just before the EOB char was reached */
2020 static yy_state_type yy_get_previous_state (void)
2022 register yy_state_type yy_current_state;
2023 register char *yy_cp;
2025 yy_current_state = (yy_start);
2027 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
2029 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2030 if ( yy_accept[yy_current_state] )
2032 (yy_last_accepting_state) = yy_current_state;
2033 (yy_last_accepting_cpos) = yy_cp;
2035 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2037 yy_current_state = (int) yy_def[yy_current_state];
2038 if ( yy_current_state >= 565 )
2039 yy_c = yy_meta[(unsigned int) yy_c];
2041 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2044 return yy_current_state;
2047 /* yy_try_NUL_trans - try to make a transition on the NUL character
2050 * next_state = yy_try_NUL_trans( current_state );
2052 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
2054 register int yy_is_jam;
2055 register char *yy_cp = (yy_c_buf_p);
2057 register YY_CHAR yy_c = 1;
2058 if ( yy_accept[yy_current_state] )
2060 (yy_last_accepting_state) = yy_current_state;
2061 (yy_last_accepting_cpos) = yy_cp;
2063 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2065 yy_current_state = (int) yy_def[yy_current_state];
2066 if ( yy_current_state >= 565 )
2067 yy_c = yy_meta[(unsigned int) yy_c];
2069 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2070 yy_is_jam = (yy_current_state == 564);
2072 return yy_is_jam ? 0 : yy_current_state;
2075 static void yyunput (int c, register char * yy_bp )
2077 register char *yy_cp;
2079 yy_cp = (yy_c_buf_p);
2081 /* undo effects of setting up yytext */
2082 *yy_cp = (yy_hold_char);
2084 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2085 { /* need to shift things up to make room */
2086 /* +2 for EOB chars. */
2087 register int number_to_move = (yy_n_chars) + 2;
2088 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
2089 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
2090 register char *source =
2091 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
2093 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2094 *--dest = *--source;
2096 yy_cp += (int) (dest - source);
2097 yy_bp += (int) (dest - source);
2098 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
2099 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
2101 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2102 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2105 *--yy_cp = (char) c;
2107 (yytext_ptr) = yy_bp;
2108 (yy_hold_char) = *yy_cp;
2109 (yy_c_buf_p) = yy_cp;
2114 static int yyinput (void)
2116 static int input (void)
2122 *(yy_c_buf_p) = (yy_hold_char);
2124 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
2126 /* yy_c_buf_p now points to the character we want to return.
2127 * If this occurs *before* the EOB characters, then it's a
2128 * valid NUL; if not, then we've hit the end of the buffer.
2130 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2131 /* This was really a NUL. */
2132 *(yy_c_buf_p) = '\0';
2135 { /* need more input */
2136 int offset = (yy_c_buf_p) - (yytext_ptr);
2139 switch ( yy_get_next_buffer( ) )
2141 case EOB_ACT_LAST_MATCH:
2142 /* This happens because yy_g_n_b()
2143 * sees that we've accumulated a
2144 * token and flags that we need to
2145 * try matching the token before
2146 * proceeding. But for input(),
2147 * there's no matching to consider.
2148 * So convert the EOB_ACT_LAST_MATCH
2149 * to EOB_ACT_END_OF_FILE.
2152 /* Reset buffer status. */
2157 case EOB_ACT_END_OF_FILE:
2162 if ( ! (yy_did_buffer_switch_on_eof) )
2171 case EOB_ACT_CONTINUE_SCAN:
2172 (yy_c_buf_p) = (yytext_ptr) + offset;
2178 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
2179 *(yy_c_buf_p) = '\0'; /* preserve yytext */
2180 (yy_hold_char) = *++(yy_c_buf_p);
2184 #endif /* ifndef YY_NO_INPUT */
2186 /** Immediately switch to a different input stream.
2187 * @param input_file A readable stream.
2189 * @note This function does not reset the start condition to @c INITIAL .
2191 void yyrestart (FILE * input_file )
2194 if ( ! YY_CURRENT_BUFFER ){
2195 yyensure_buffer_stack ();
2196 YY_CURRENT_BUFFER_LVALUE =
2197 yy_create_buffer(yyin,YY_BUF_SIZE );
2200 yy_init_buffer(YY_CURRENT_BUFFER,input_file );
2201 yy_load_buffer_state( );
2204 /** Switch to a different input buffer.
2205 * @param new_buffer The new input buffer.
2208 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
2211 /* TODO. We should be able to replace this entire function body
2213 * yypop_buffer_state();
2214 * yypush_buffer_state(new_buffer);
2216 yyensure_buffer_stack ();
2217 if ( YY_CURRENT_BUFFER == new_buffer )
2220 if ( YY_CURRENT_BUFFER )
2222 /* Flush out information for old buffer. */
2223 *(yy_c_buf_p) = (yy_hold_char);
2224 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2225 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2228 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2229 yy_load_buffer_state( );
2231 /* We don't actually know whether we did this switch during
2232 * EOF (yywrap()) processing, but the only time this flag
2233 * is looked at is after yywrap() is called, so it's safe
2234 * to go ahead and always set it.
2236 (yy_did_buffer_switch_on_eof) = 1;
2239 static void yy_load_buffer_state (void)
2241 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2242 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2243 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2244 (yy_hold_char) = *(yy_c_buf_p);
2247 /** Allocate and initialize an input buffer state.
2248 * @param file A readable stream.
2249 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2251 * @return the allocated buffer state.
2253 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
2257 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
2259 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2261 b->yy_buf_size = size;
2263 /* yy_ch_buf has to be 2 characters longer than the size given because
2264 * we need to put in 2 end-of-buffer characters.
2266 b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );
2267 if ( ! b->yy_ch_buf )
2268 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2270 b->yy_is_our_buffer = 1;
2272 yy_init_buffer(b,file );
2277 /** Destroy the buffer.
2278 * @param b a buffer created with yy_create_buffer()
2281 void yy_delete_buffer (YY_BUFFER_STATE b )
2287 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2288 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
2290 if ( b->yy_is_our_buffer )
2291 yyfree((void *) b->yy_ch_buf );
2293 yyfree((void *) b );
2297 extern int isatty (int );
2298 #endif /* __cplusplus */
2300 /* Initializes or reinitializes a buffer.
2301 * This function is sometimes called more than once on the same buffer,
2302 * such as during a yyrestart() or at EOF.
2304 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
2309 yy_flush_buffer(b );
2311 b->yy_input_file = file;
2312 b->yy_fill_buffer = 1;
2314 /* If b is the current buffer, then yy_init_buffer was _probably_
2315 * called from yyrestart() or through yy_get_next_buffer.
2316 * In that case, we don't want to reset the lineno or column.
2318 if (b != YY_CURRENT_BUFFER){
2319 b->yy_bs_lineno = 1;
2320 b->yy_bs_column = 0;
2323 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2328 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2329 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2332 void yy_flush_buffer (YY_BUFFER_STATE b )
2339 /* We always need two end-of-buffer characters. The first causes
2340 * a transition to the end-of-buffer state. The second causes
2341 * a jam in that state.
2343 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2344 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2346 b->yy_buf_pos = &b->yy_ch_buf[0];
2349 b->yy_buffer_status = YY_BUFFER_NEW;
2351 if ( b == YY_CURRENT_BUFFER )
2352 yy_load_buffer_state( );
2355 /** Pushes the new state onto the stack. The new state becomes
2356 * the current state. This function will allocate the stack
2358 * @param new_buffer The new state.
2361 void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
2363 if (new_buffer == NULL)
2366 yyensure_buffer_stack();
2368 /* This block is copied from yy_switch_to_buffer. */
2369 if ( YY_CURRENT_BUFFER )
2371 /* Flush out information for old buffer. */
2372 *(yy_c_buf_p) = (yy_hold_char);
2373 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2374 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2377 /* Only push if top exists. Otherwise, replace top. */
2378 if (YY_CURRENT_BUFFER)
2379 (yy_buffer_stack_top)++;
2380 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2382 /* copied from yy_switch_to_buffer. */
2383 yy_load_buffer_state( );
2384 (yy_did_buffer_switch_on_eof) = 1;
2387 /** Removes and deletes the top of the stack, if present.
2388 * The next element becomes the new top.
2391 void yypop_buffer_state (void)
2393 if (!YY_CURRENT_BUFFER)
2396 yy_delete_buffer(YY_CURRENT_BUFFER );
2397 YY_CURRENT_BUFFER_LVALUE = NULL;
2398 if ((yy_buffer_stack_top) > 0)
2399 --(yy_buffer_stack_top);
2401 if (YY_CURRENT_BUFFER) {
2402 yy_load_buffer_state( );
2403 (yy_did_buffer_switch_on_eof) = 1;
2407 /* Allocates the stack if it does not exist.
2408 * Guarantees space for at least one push.
2410 static void yyensure_buffer_stack (void)
2414 if (!(yy_buffer_stack)) {
2416 /* First allocation is just for 2 elements, since we don't know if this
2417 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2418 * immediate realloc on the next call.
2421 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
2422 (num_to_alloc * sizeof(struct yy_buffer_state*)
2425 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2427 (yy_buffer_stack_max) = num_to_alloc;
2428 (yy_buffer_stack_top) = 0;
2432 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
2434 /* Increase the buffer to prepare for a possible push. */
2435 int grow_size = 8 /* arbitrary grow size */;
2437 num_to_alloc = (yy_buffer_stack_max) + grow_size;
2438 (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
2440 num_to_alloc * sizeof(struct yy_buffer_state*)
2443 /* zero only the new slots.*/
2444 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
2445 (yy_buffer_stack_max) = num_to_alloc;
2449 /** Setup the input buffer state to scan directly from a user-specified character buffer.
2450 * @param base the character buffer
2451 * @param size the size in bytes of the character buffer
2453 * @return the newly allocated buffer state object.
2455 YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
2460 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2461 base[size-1] != YY_END_OF_BUFFER_CHAR )
2462 /* They forgot to leave room for the EOB's. */
2465 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
2467 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2469 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2470 b->yy_buf_pos = b->yy_ch_buf = base;
2471 b->yy_is_our_buffer = 0;
2472 b->yy_input_file = 0;
2473 b->yy_n_chars = b->yy_buf_size;
2474 b->yy_is_interactive = 0;
2476 b->yy_fill_buffer = 0;
2477 b->yy_buffer_status = YY_BUFFER_NEW;
2479 yy_switch_to_buffer(b );
2484 /** Setup the input buffer state to scan a string. The next call to yylex() will
2485 * scan from a @e copy of @a str.
2486 * @param str a NUL-terminated string to scan
2488 * @return the newly allocated buffer state object.
2489 * @note If you want to scan bytes that may contain NUL values, then use
2490 * yy_scan_bytes() instead.
2492 YY_BUFFER_STATE yy_scan_string (yyconst char * yy_str )
2495 return yy_scan_bytes(yy_str,strlen(yy_str) );
2498 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
2499 * scan from a @e copy of @a bytes.
2500 * @param bytes the byte buffer to scan
2501 * @param len the number of bytes in the buffer pointed to by @a bytes.
2503 * @return the newly allocated buffer state object.
2505 YY_BUFFER_STATE yy_scan_bytes (yyconst char * bytes, int len )
2512 /* Get memory for full buffer, including space for trailing EOB's. */
2514 buf = (char *) yyalloc(n );
2516 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2518 for ( i = 0; i < len; ++i )
2521 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
2523 b = yy_scan_buffer(buf,n );
2525 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2527 /* It's okay to grow etc. this buffer, and we should throw it
2528 * away when we're done.
2530 b->yy_is_our_buffer = 1;
2535 #ifndef YY_EXIT_FAILURE
2536 #define YY_EXIT_FAILURE 2
2539 static void yy_fatal_error (yyconst char* msg )
2541 (void) fprintf( stderr, "%s\n", msg );
2542 exit( YY_EXIT_FAILURE );
2545 /* Redefine yyless() so it works in section 3 code. */
2551 /* Undo effects of setting up yytext. */ \
2552 int yyless_macro_arg = (n); \
2553 YY_LESS_LINENO(yyless_macro_arg);\
2554 yytext[yyleng] = (yy_hold_char); \
2555 (yy_c_buf_p) = yytext + yyless_macro_arg; \
2556 (yy_hold_char) = *(yy_c_buf_p); \
2557 *(yy_c_buf_p) = '\0'; \
2558 yyleng = yyless_macro_arg; \
2562 /* Accessor methods (get/set functions) to struct members. */
2564 /** Get the current line number.
2567 int yyget_lineno (void)
2573 /** Get the input stream.
2576 FILE *yyget_in (void)
2581 /** Get the output stream.
2584 FILE *yyget_out (void)
2589 /** Get the length of the current token.
2592 int yyget_leng (void)
2597 /** Get the current token.
2601 char *yyget_text (void)
2606 /** Set the current line number.
2607 * @param line_number
2610 void yyset_lineno (int line_number )
2613 yylineno = line_number;
2616 /** Set the input stream. This does not discard the current
2618 * @param in_str A readable stream.
2620 * @see yy_switch_to_buffer
2622 void yyset_in (FILE * in_str )
2627 void yyset_out (FILE * out_str )
2632 int yyget_debug (void)
2634 return yy_flex_debug;
2637 void yyset_debug (int bdebug )
2639 yy_flex_debug = bdebug ;
2642 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
2643 int yylex_destroy (void)
2646 /* Pop the buffer stack, destroying each element. */
2647 while(YY_CURRENT_BUFFER){
2648 yy_delete_buffer(YY_CURRENT_BUFFER );
2649 YY_CURRENT_BUFFER_LVALUE = NULL;
2650 yypop_buffer_state();
2653 /* Destroy the stack itself. */
2654 yyfree((yy_buffer_stack) );
2655 (yy_buffer_stack) = NULL;
2661 * Internal utility routines.
2665 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
2668 for ( i = 0; i < n; ++i )
2673 #ifdef YY_NEED_STRLEN
2674 static int yy_flex_strlen (yyconst char * s )
2677 for ( n = 0; s[n]; ++n )
2684 void *yyalloc (yy_size_t size )
2686 return (void *) malloc( size );
2689 void *yyrealloc (void * ptr, yy_size_t size )
2691 /* The cast to (char *) in the following accommodates both
2692 * implementations that use char* generic pointers, and those
2693 * that use void* generic pointers. It works with the latter
2694 * because both ANSI C and C++ allow castless assignment from
2695 * any pointer type to void*, and deal with argument conversions
2696 * as though doing an assignment.
2698 return (void *) realloc( (char *) ptr, size );
2701 void yyfree (void * ptr )
2703 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
2706 #define YYTABLES_NAME "yytables"
2709 #undef YY_FLUSH_BUFFER
2711 #undef yy_new_buffer
2712 #undef yy_set_interactive
2714 #undef YY_DO_BEFORE_ACTION
2716 #ifdef YY_DECL_IS_OURS
2717 #undef YY_DECL_IS_OURS
2724 const char *const builtinservicehelpstrings[]= {
2726 "parameter <parameter>",