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 6
11 #define YY_FLEX_SUBMINOR_VERSION 1
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 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
36 * if you want the limit (max/min) macros for int types.
38 #ifndef __STDC_LIMIT_MACROS
39 #define __STDC_LIMIT_MACROS 1
43 typedef int8_t flex_int8_t;
44 typedef uint8_t flex_uint8_t;
45 typedef int16_t flex_int16_t;
46 typedef uint16_t flex_uint16_t;
47 typedef int32_t flex_int32_t;
48 typedef uint32_t flex_uint32_t;
50 typedef signed char flex_int8_t;
51 typedef short int flex_int16_t;
52 typedef int flex_int32_t;
53 typedef unsigned char flex_uint8_t;
54 typedef unsigned short int flex_uint16_t;
55 typedef unsigned int flex_uint32_t;
57 /* Limits of integral types. */
59 #define INT8_MIN (-128)
62 #define INT16_MIN (-32767-1)
65 #define INT32_MIN (-2147483647-1)
68 #define INT8_MAX (127)
71 #define INT16_MAX (32767)
74 #define INT32_MAX (2147483647)
77 #define UINT8_MAX (255U)
80 #define UINT16_MAX (65535U)
83 #define UINT32_MAX (4294967295U)
88 #endif /* ! FLEXINT_H */
90 /* TODO: this is always defined, so inline it */
93 #if defined(__GNUC__) && __GNUC__ >= 3
94 #define yynoreturn __attribute__((__noreturn__))
99 /* Returned upon end-of-file. */
102 /* Promotes a possibly negative, possibly signed char to an unsigned
103 * integer for use as an array index. If the signed char is negative,
104 * we want to instead treat it as an 8-bit unsigned char, hence the
107 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
109 /* Enter a start condition. This macro really ought to take a parameter,
110 * but we do it the disgusting crufty way forced on us by the ()-less
111 * definition of BEGIN.
113 #define BEGIN (yy_start) = 1 + 2 *
115 /* Translate the current start state into a value that can be later handed
116 * to BEGIN to return to the state. The YYSTATE alias is for lex
119 #define YY_START (((yy_start) - 1) / 2)
120 #define YYSTATE YY_START
122 /* Action number for EOF rule of a given start state. */
123 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
125 /* Special action meaning "start processing a new file". */
126 #define YY_NEW_FILE yyrestart(yyin )
128 #define YY_END_OF_BUFFER_CHAR 0
130 /* Size of default input buffer. */
133 /* On IA-64, the buffer size is 16k, not 8k.
134 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
135 * Ditto for the __ia64__ case accordingly.
137 #define YY_BUF_SIZE 32768
139 #define YY_BUF_SIZE 16384
140 #endif /* __ia64__ */
143 /* The state buf must be large enough to hold one state per character in the main buffer.
145 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
147 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
148 #define YY_TYPEDEF_YY_BUFFER_STATE
149 typedef struct yy_buffer_state *YY_BUFFER_STATE;
152 #ifndef YY_TYPEDEF_YY_SIZE_T
153 #define YY_TYPEDEF_YY_SIZE_T
154 typedef size_t yy_size_t;
159 extern FILE *yyin, *yyout;
161 #define EOB_ACT_CONTINUE_SCAN 0
162 #define EOB_ACT_END_OF_FILE 1
163 #define EOB_ACT_LAST_MATCH 2
165 #define YY_LESS_LINENO(n)
166 #define YY_LINENO_REWIND_TO(ptr)
168 /* Return all but the first "n" matched characters back to the input stream. */
172 /* Undo effects of setting up yytext. */ \
173 int yyless_macro_arg = (n); \
174 YY_LESS_LINENO(yyless_macro_arg);\
175 *yy_cp = (yy_hold_char); \
176 YY_RESTORE_YY_MORE_OFFSET \
177 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
178 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
182 #define unput(c) yyunput( c, (yytext_ptr) )
184 #ifndef YY_STRUCT_YY_BUFFER_STATE
185 #define YY_STRUCT_YY_BUFFER_STATE
186 struct yy_buffer_state
190 char *yy_ch_buf; /* input buffer */
191 char *yy_buf_pos; /* current position in input buffer */
193 /* Size of input buffer in bytes, not including room for EOB
198 /* Number of characters read into yy_ch_buf, not including EOB
203 /* Whether we "own" the buffer - i.e., we know we created it,
204 * and can realloc() it to grow it, and should free() it to
207 int yy_is_our_buffer;
209 /* Whether this is an "interactive" input source; if so, and
210 * if we're using stdio for input, then we want to use getc()
211 * instead of fread(), to make sure we stop fetching input after
214 int yy_is_interactive;
216 /* Whether we're considered to be at the beginning of a line.
217 * If so, '^' rules will be active on the next match, otherwise
222 int yy_bs_lineno; /**< The line count. */
223 int yy_bs_column; /**< The column count. */
225 /* Whether to try to fill the input buffer when we reach the
230 int yy_buffer_status;
232 #define YY_BUFFER_NEW 0
233 #define YY_BUFFER_NORMAL 1
234 /* When an EOF's been seen but there's still some text to process
235 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
236 * shouldn't try reading from the input source any more. We might
237 * still have a bunch of tokens to match, though, because of
238 * possible backing-up.
240 * When we actually see the EOF, we change the status to "new"
241 * (via yyrestart()), so that the user can continue scanning by
242 * just pointing yyin at a new input file.
244 #define YY_BUFFER_EOF_PENDING 2
247 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
249 /* Stack of input buffers. */
250 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
251 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
252 static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
254 /* We provide macros for accessing buffer states in case in the
255 * future we want to put the buffer states in a more general
258 * Returns the top of the stack, or NULL.
260 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
261 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
264 /* Same as previous macro, but useful when we know that the buffer stack is not
265 * NULL or when we need an lvalue. For internal use only.
267 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
269 /* yy_hold_char holds the character lost when yytext is formed. */
270 static char yy_hold_char;
271 static int yy_n_chars; /* number of characters read into yy_ch_buf */
274 /* Points to current character in buffer. */
275 static char *yy_c_buf_p = NULL;
276 static int yy_init = 0; /* whether we need to initialize */
277 static int yy_start = 0; /* start state number */
279 /* Flag which is used to allow yywrap()'s to do buffer switches
280 * instead of setting up a fresh yyin. A bit of a hack ...
282 static int yy_did_buffer_switch_on_eof;
284 void yyrestart (FILE *input_file );
285 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
286 YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
287 void yy_delete_buffer (YY_BUFFER_STATE b );
288 void yy_flush_buffer (YY_BUFFER_STATE b );
289 void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
290 void yypop_buffer_state (void );
292 static void yyensure_buffer_stack (void );
293 static void yy_load_buffer_state (void );
294 static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
296 #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
298 YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
299 YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
300 YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len );
302 void *yyalloc (yy_size_t );
303 void *yyrealloc (void *,yy_size_t );
304 void yyfree (void * );
306 #define yy_new_buffer yy_create_buffer
308 #define yy_set_interactive(is_interactive) \
310 if ( ! YY_CURRENT_BUFFER ){ \
311 yyensure_buffer_stack (); \
312 YY_CURRENT_BUFFER_LVALUE = \
313 yy_create_buffer(yyin,YY_BUF_SIZE ); \
315 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
318 #define yy_set_bol(at_bol) \
320 if ( ! YY_CURRENT_BUFFER ){\
321 yyensure_buffer_stack (); \
322 YY_CURRENT_BUFFER_LVALUE = \
323 yy_create_buffer(yyin,YY_BUF_SIZE ); \
325 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
328 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
330 /* Begin user sect3 */
332 #define yywrap() (/*CONSTCOND*/1)
333 #define YY_SKIP_YYWRAP
335 typedef unsigned char YY_CHAR;
337 FILE *yyin = NULL, *yyout = NULL;
339 typedef int yy_state_type;
349 #define yytext_ptr yytext
351 static yy_state_type yy_get_previous_state (void );
352 static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
353 static int yy_get_next_buffer (void );
354 static void yynoreturn yy_fatal_error (yyconst char* msg );
356 /* Done after the current pattern has been matched and before the
357 * corresponding action - sets up yytext.
359 #define YY_DO_BEFORE_ACTION \
360 (yytext_ptr) = yy_bp; \
361 yyleng = (int) (yy_cp - yy_bp); \
362 (yy_hold_char) = *yy_cp; \
364 (yy_c_buf_p) = yy_cp;
366 #define YY_NUM_RULES 112
367 #define YY_END_OF_BUFFER 113
368 /* This struct is not used in this scanner,
369 but its presence is necessary. */
372 flex_int32_t yy_verify;
375 static yyconst flex_int16_t yy_accept[587] =
377 0, 0, 113, 108, 103, 104, 95, 109, 106, 89,
378 96, 93, 94, 99, 110, 108, 108, 108, 108, 108,
379 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
380 108, 108, 108, 108, 108, 108, 108, 97, 108, 103,
381 104, 106, 0, 0, 107, 0, 106, 106, 105, 101,
382 99, 0, 102, 108, 108, 108, 108, 21, 108, 108,
383 108, 108, 108, 108, 108, 108, 108, 108, 39, 108,
384 108, 108, 108, 34, 108, 108, 108, 108, 108, 108,
385 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
386 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
388 108, 0, 0, 0, 100, 99, 102, 108, 108, 108,
389 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
390 108, 108, 33, 65, 108, 108, 108, 108, 108, 108,
391 108, 108, 108, 108, 73, 108, 108, 108, 108, 108,
392 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
393 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
394 108, 108, 108, 108, 0, 0, 100, 99, 108, 108,
395 108, 69, 108, 108, 66, 70, 108, 108, 108, 37,
396 38, 108, 108, 108, 108, 42, 44, 108, 53, 108,
397 108, 62, 72, 108, 74, 108, 75, 108, 108, 108,
399 108, 108, 108, 108, 32, 108, 87, 108, 108, 108,
400 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
401 108, 77, 78, 108, 64, 108, 0, 100, 99, 108,
402 67, 108, 108, 108, 108, 108, 61, 108, 68, 108,
403 98, 108, 40, 108, 108, 108, 108, 108, 108, 108,
404 108, 108, 108, 108, 108, 43, 108, 108, 51, 108,
405 108, 108, 108, 108, 108, 90, 108, 108, 108, 108,
406 108, 108, 108, 88, 100, 99, 108, 108, 108, 108,
407 108, 71, 108, 108, 108, 108, 108, 108, 72, 79,
408 80, 81, 82, 83, 84, 85, 86, 108, 108, 108,
410 108, 63, 108, 108, 108, 1, 108, 108, 108, 108,
411 108, 41, 92, 91, 108, 76, 108, 108, 108, 108,
412 100, 99, 108, 108, 108, 108, 108, 108, 108, 108,
413 52, 108, 23, 28, 108, 108, 108, 12, 108, 108,
414 108, 108, 108, 54, 108, 108, 108, 108, 108, 47,
415 64, 100, 99, 108, 11, 69, 108, 108, 108, 108,
416 108, 108, 108, 108, 108, 108, 108, 108, 49, 108,
417 108, 108, 108, 108, 50, 108, 48, 108, 100, 108,
418 108, 108, 108, 108, 108, 108, 108, 108, 108, 14,
419 108, 108, 108, 108, 108, 108, 46, 13, 108, 108,
421 108, 108, 108, 108, 100, 108, 108, 108, 108, 108,
422 35, 108, 108, 108, 108, 108, 108, 108, 108, 108,
423 108, 108, 108, 10, 108, 108, 108, 108, 108, 108,
424 108, 108, 108, 108, 108, 45, 36, 108, 108, 108,
425 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
426 108, 22, 108, 108, 108, 108, 55, 108, 108, 108,
427 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
428 58, 108, 108, 108, 108, 108, 56, 108, 108, 108,
429 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
430 59, 108, 108, 17, 108, 108, 108, 108, 19, 7,
432 108, 108, 108, 108, 108, 108, 108, 25, 108, 108,
433 108, 108, 108, 108, 108, 108, 108, 108, 108, 4,
434 108, 108, 108, 24, 108, 108, 108, 108, 108, 15,
435 108, 108, 108, 108, 5, 6, 108, 108, 108, 108,
436 108, 108, 108, 18, 108, 108, 108, 108, 108, 108,
437 3, 27, 108, 108, 20, 108, 108, 108, 29, 108,
438 57, 108, 26, 108, 16, 60, 108, 108, 108, 108,
439 108, 30, 108, 108, 108, 108, 108, 31, 2, 108,
440 108, 108, 108, 9, 8, 0
443 static yyconst YY_CHAR yy_ec[256] =
445 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
446 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
447 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
448 1, 2, 4, 5, 6, 7, 8, 9, 8, 10,
449 11, 8, 8, 8, 12, 8, 8, 13, 14, 15,
450 16, 17, 18, 19, 20, 21, 21, 8, 8, 8,
451 8, 8, 8, 8, 22, 22, 22, 22, 22, 22,
452 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
453 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
454 8, 23, 8, 8, 24, 8, 25, 26, 27, 28,
456 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
457 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
458 49, 50, 8, 51, 8, 8, 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,
461 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
462 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
463 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
464 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
465 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
467 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
468 1, 1, 1, 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,
471 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
475 static yyconst YY_CHAR yy_meta[52] =
477 1, 2, 3, 1, 2, 1, 1, 1, 1, 1,
478 1, 1, 4, 4, 4, 4, 4, 4, 4, 4,
479 4, 1, 2, 1, 1, 1, 1, 1, 1, 1,
480 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
481 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
485 static yyconst flex_uint16_t yy_base[593] =
487 0, 0, 801, 0, 50, 802, 0, 49, 55, 0,
488 0, 0, 0, 67, 59, 767, 19, 49, 34, 56,
489 766, 29, 39, 59, 769, 30, 71, 70, 751, 771,
490 750, 76, 74, 755, 65, 764, 82, 0, 0, 111,
491 802, 789, 73, 97, 802, 134, 123, 788, 802, 170,
492 179, 109, 119, 752, 93, 745, 94, 0, 94, 759,
493 761, 743, 98, 756, 738, 753, 740, 752, 0, 741,
494 750, 734, 741, 0, 738, 113, 733, 747, 731, 739,
495 728, 723, 120, 733, 739, 119, 734, 728, 133, 118,
496 720, 725, 735, 722, 718, 720, 730, 731, 715, 714,
498 722, 163, 0, 196, 214, 223, 157, 727, 711, 713,
499 719, 714, 722, 704, 709, 709, 700, 717, 713, 713,
500 699, 707, 0, 700, 711, 711, 696, 710, 694, 694,
501 696, 692, 692, 704, 0, 692, 684, 683, 135, 692,
502 688, 681, 689, 696, 676, 688, 690, 688, 671, 686,
503 669, 667, 700, 667, 668, 140, 669, 672, 671, 664,
504 665, 661, 665, 658, 0, 232, 250, 259, 665, 656,
505 652, 658, 664, 664, 0, 0, 656, 663, 654, 0,
506 0, 661, 649, 648, 644, 0, 0, 661, 0, 645,
507 641, 0, 656, 648, 0, 658, 0, 649, 175, 654,
509 668, 637, 651, 640, 0, 647, 0, 648, 641, 629,
510 630, 638, 641, 641, 626, 625, 628, 620, 622, 624,
511 633, 649, 0, 627, 626, 629, 276, 287, 296, 612,
512 0, 644, 613, 616, 641, 614, 0, 613, 0, 611,
513 606, 604, 0, 618, 618, 609, 305, 613, 600, 598,
514 601, 611, 609, 605, 608, 0, 592, 593, 0, 601,
515 606, 594, 592, 601, 587, 0, 584, 598, 595, 579,
516 582, 584, 584, 0, 313, 322, 593, 590, 586, 587,
517 576, 0, 578, 577, 602, 584, 600, 582, 0, 0,
518 0, 0, 0, 0, 0, 0, 0, 581, 582, 596,
520 567, 0, 578, 577, 560, 591, 573, 557, 571, 553,
521 551, 0, 0, 0, 554, 0, 567, 568, 556, 562,
522 331, 340, 563, 563, 544, 577, 543, 558, 549, 128,
523 573, 554, 571, 0, 543, 552, 538, 0, 550, 549,
524 547, 564, 526, 562, 540, 534, 528, 534, 539, 0,
525 0, 349, 556, 555, 0, 0, 251, 533, 538, 535,
526 518, 523, 145, 533, 255, 522, 521, 529, 0, 515,
527 528, 525, 253, 512, 0, 541, 0, 519, 358, 353,
528 509, 507, 505, 504, 509, 503, 533, 499, 501, 0,
529 509, 511, 501, 501, 492, 494, 0, 0, 508, 493,
531 491, 494, 507, 495, 0, 494, 480, 485, 488, 497,
532 0, 513, 480, 491, 351, 489, 482, 478, 490, 479,
533 488, 483, 472, 0, 475, 484, 474, 469, 481, 476,
534 465, 478, 461, 463, 472, 0, 0, 470, 95, 466,
535 464, 471, 451, 463, 470, 454, 483, 449, 451, 455,
536 460, 0, 461, 462, 446, 447, 474, 440, 448, 455,
537 439, 437, 468, 452, 445, 432, 432, 436, 449, 433,
538 460, 442, 427, 431, 429, 455, 0, 423, 425, 435,
539 434, 426, 428, 257, 416, 416, 418, 445, 418, 413,
540 0, 411, 415, 0, 408, 413, 408, 417, 0, 0,
542 406, 408, 408, 412, 419, 404, 398, 429, 408, 402,
543 407, 405, 392, 423, 404, 406, 403, 389, 399, 0,
544 387, 384, 385, 0, 358, 381, 396, 381, 394, 0,
545 395, 388, 390, 383, 0, 0, 389, 385, 367, 370,
546 357, 361, 359, 0, 359, 354, 361, 358, 354, 362,
547 0, 0, 352, 348, 0, 342, 349, 346, 0, 346,
548 0, 251, 0, 250, 0, 0, 263, 263, 251, 260,
549 254, 0, 244, 244, 224, 159, 164, 0, 0, 178,
550 170, 158, 153, 0, 0, 802, 399, 403, 407, 411,
555 static yyconst flex_int16_t yy_def[593] =
557 586, 1, 586, 587, 586, 586, 587, 588, 589, 587,
558 587, 587, 587, 587, 586, 587, 587, 587, 587, 587,
559 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
560 587, 587, 587, 587, 587, 587, 587, 587, 587, 586,
561 586, 590, 586, 588, 586, 588, 589, 590, 586, 587,
562 14, 586, 586, 587, 587, 587, 587, 587, 587, 587,
563 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
564 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
565 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
566 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
568 587, 586, 591, 588, 587, 14, 586, 587, 587, 587,
569 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
570 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
571 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
572 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
573 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
574 587, 587, 587, 587, 592, 104, 587, 14, 587, 587,
575 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
576 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
577 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
579 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
580 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
581 587, 587, 587, 587, 587, 587, 588, 587, 14, 587,
582 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
583 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
584 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
585 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
586 587, 587, 587, 587, 587, 14, 587, 587, 587, 587,
587 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
588 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
590 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
591 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
592 587, 14, 587, 587, 587, 587, 587, 587, 587, 587,
593 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
594 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
595 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
596 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
597 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
598 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
599 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
601 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
602 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
603 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
604 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
605 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
606 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
607 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
608 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
609 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
610 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
612 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
613 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
614 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
615 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
616 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
617 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
618 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
619 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
620 587, 587, 587, 587, 587, 0, 586, 586, 586, 586,
625 static yyconst flex_uint16_t yy_nxt[854] =
627 4, 5, 6, 7, 8, 9, 10, 4, 11, 12,
628 13, 4, 14, 14, 14, 14, 14, 14, 14, 14,
629 14, 4, 15, 16, 17, 4, 18, 19, 20, 21,
630 22, 23, 24, 4, 25, 26, 27, 28, 29, 30,
631 31, 32, 33, 34, 35, 36, 37, 4, 4, 4,
632 38, 40, 41, 45, 55, 42, 48, 49, 60, 48,
633 52, 53, 61, 56, 70, 72, 62, 73, 78, 79,
634 71, 46, 43, 57, 52, 53, 58, 48, 50, 51,
635 51, 51, 51, 51, 51, 51, 51, 51, 74, 75,
636 59, 63, 64, 65, 66, 80, 76, 67, 82, 81,
638 88, 45, 90, 68, 89, 91, 100, 97, 83, 98,
639 52, 53, 40, 41, 84, 92, 42, 93, 94, 46,
640 107, 109, 95, 101, 48, 49, 114, 48, 110, 112,
641 119, 139, 115, 43, 586, 102, 44, 113, 460, 131,
642 120, 43, 132, 461, 151, 48, 103, 103, 103, 103,
643 103, 103, 103, 103, 103, 586, 143, 147, 107, 152,
644 144, 153, 198, 140, 102, 44, 148, 361, 216, 44,
645 388, 362, 217, 149, 389, 150, 165, 199, 218, 43,
646 585, 104, 105, 105, 105, 105, 105, 105, 105, 105,
647 105, 106, 106, 106, 106, 106, 106, 106, 106, 106,
649 45, 580, 581, 250, 584, 583, 582, 579, 166, 166,
650 166, 166, 166, 166, 166, 166, 166, 166, 46, 251,
651 166, 166, 166, 166, 166, 166, 167, 167, 167, 167,
652 167, 167, 167, 167, 167, 168, 168, 168, 168, 168,
653 168, 168, 168, 168, 227, 227, 227, 227, 227, 227,
654 227, 227, 227, 227, 578, 577, 227, 227, 227, 227,
655 227, 227, 228, 228, 228, 228, 228, 228, 228, 228,
656 228, 229, 229, 229, 229, 229, 229, 229, 229, 229,
657 45, 381, 391, 400, 504, 576, 575, 392, 574, 573,
658 393, 572, 571, 570, 569, 382, 505, 401, 46, 275,
660 275, 275, 275, 275, 275, 275, 275, 275, 276, 276,
661 276, 276, 276, 276, 276, 276, 276, 290, 291, 292,
662 293, 294, 295, 296, 297, 321, 321, 321, 321, 321,
663 321, 321, 321, 321, 322, 322, 322, 322, 322, 322,
664 322, 322, 322, 352, 352, 352, 352, 352, 352, 352,
665 352, 352, 353, 353, 353, 353, 353, 353, 353, 353,
666 353, 379, 379, 379, 379, 379, 379, 379, 379, 379,
667 405, 405, 405, 405, 405, 405, 405, 405, 405, 406,
668 438, 568, 540, 567, 566, 565, 564, 563, 562, 561,
669 560, 559, 558, 439, 557, 407, 556, 408, 541, 39,
671 555, 554, 39, 44, 44, 553, 44, 47, 47, 47,
672 47, 48, 48, 48, 48, 552, 551, 550, 549, 548,
673 547, 546, 545, 544, 543, 542, 539, 538, 537, 536,
674 535, 534, 533, 532, 531, 530, 529, 528, 527, 526,
675 525, 524, 523, 522, 521, 520, 519, 518, 517, 516,
676 515, 514, 513, 512, 511, 510, 509, 508, 507, 506,
677 503, 502, 501, 500, 499, 498, 497, 496, 495, 494,
678 493, 492, 491, 490, 489, 488, 487, 486, 485, 484,
679 483, 482, 481, 480, 479, 478, 477, 476, 475, 474,
680 473, 472, 471, 470, 469, 468, 467, 466, 465, 464,
682 463, 462, 459, 458, 457, 456, 455, 454, 453, 452,
683 451, 450, 449, 448, 447, 446, 445, 444, 443, 442,
684 441, 440, 437, 436, 435, 434, 433, 432, 431, 430,
685 429, 428, 427, 426, 425, 424, 423, 422, 421, 420,
686 419, 418, 417, 416, 415, 414, 413, 412, 411, 410,
687 409, 404, 403, 402, 399, 398, 397, 396, 395, 394,
688 390, 387, 386, 385, 384, 383, 380, 50, 378, 377,
689 376, 375, 374, 373, 356, 372, 371, 370, 369, 368,
690 367, 366, 365, 364, 363, 360, 359, 358, 357, 356,
691 355, 354, 351, 350, 349, 348, 347, 346, 345, 344,
693 343, 342, 341, 340, 339, 338, 337, 336, 335, 334,
694 333, 332, 331, 330, 329, 328, 327, 326, 325, 324,
695 323, 320, 319, 318, 317, 316, 315, 314, 313, 312,
696 311, 310, 309, 308, 307, 306, 305, 304, 303, 302,
697 301, 300, 299, 298, 289, 288, 287, 286, 285, 284,
698 283, 282, 281, 280, 279, 278, 277, 274, 273, 272,
699 271, 270, 269, 268, 267, 266, 265, 264, 263, 262,
700 261, 260, 259, 258, 257, 256, 255, 239, 254, 253,
701 252, 249, 248, 247, 246, 245, 244, 243, 242, 241,
702 240, 239, 238, 237, 236, 235, 234, 233, 232, 231,
704 230, 226, 225, 224, 223, 222, 221, 220, 219, 215,
705 214, 213, 212, 211, 210, 209, 208, 207, 206, 205,
706 204, 203, 202, 201, 200, 197, 196, 195, 194, 193,
707 192, 191, 190, 189, 188, 187, 186, 185, 184, 183,
708 182, 181, 180, 179, 178, 177, 176, 175, 174, 173,
709 172, 171, 170, 169, 164, 163, 162, 161, 160, 159,
710 158, 157, 156, 155, 154, 146, 145, 142, 141, 138,
711 137, 136, 135, 134, 133, 130, 129, 128, 127, 126,
712 125, 124, 123, 122, 121, 118, 117, 116, 111, 108,
713 49, 49, 99, 96, 87, 86, 85, 77, 69, 54,
715 586, 3, 586, 586, 586, 586, 586, 586, 586, 586,
716 586, 586, 586, 586, 586, 586, 586, 586, 586, 586,
717 586, 586, 586, 586, 586, 586, 586, 586, 586, 586,
718 586, 586, 586, 586, 586, 586, 586, 586, 586, 586,
719 586, 586, 586, 586, 586, 586, 586, 586, 586, 586,
723 static yyconst flex_int16_t yy_chk[854] =
725 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
726 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
727 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
728 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
729 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
730 1, 5, 5, 8, 17, 5, 9, 9, 19, 9,
731 15, 15, 19, 17, 22, 23, 19, 23, 26, 26,
732 22, 8, 5, 18, 43, 43, 18, 9, 14, 14,
733 14, 14, 14, 14, 14, 14, 14, 14, 24, 24,
734 18, 20, 20, 20, 20, 27, 24, 20, 28, 27,
736 32, 44, 33, 20, 32, 33, 37, 35, 28, 35,
737 52, 52, 40, 40, 28, 33, 40, 33, 33, 44,
738 53, 55, 33, 37, 47, 47, 59, 47, 55, 57,
739 63, 83, 59, 40, 46, 46, 46, 57, 439, 76,
740 63, 53, 76, 439, 90, 47, 46, 46, 46, 46,
741 46, 46, 46, 46, 46, 46, 86, 89, 107, 90,
742 86, 90, 139, 83, 102, 102, 89, 330, 156, 592,
743 363, 330, 156, 89, 363, 89, 591, 139, 156, 107,
744 583, 46, 50, 50, 50, 50, 50, 50, 50, 50,
745 50, 51, 51, 51, 51, 51, 51, 51, 51, 51,
747 104, 577, 577, 199, 582, 581, 580, 576, 104, 104,
748 104, 104, 104, 104, 104, 104, 104, 104, 104, 199,
749 104, 104, 104, 104, 104, 104, 105, 105, 105, 105,
750 105, 105, 105, 105, 105, 106, 106, 106, 106, 106,
751 106, 106, 106, 106, 166, 166, 166, 166, 166, 166,
752 166, 166, 166, 166, 575, 574, 166, 166, 166, 166,
753 166, 166, 167, 167, 167, 167, 167, 167, 167, 167,
754 167, 168, 168, 168, 168, 168, 168, 168, 168, 168,
755 227, 357, 365, 373, 484, 573, 571, 365, 570, 569,
756 365, 568, 567, 564, 562, 357, 484, 373, 227, 228,
758 228, 228, 228, 228, 228, 228, 228, 228, 229, 229,
759 229, 229, 229, 229, 229, 229, 229, 247, 247, 247,
760 247, 247, 247, 247, 247, 275, 275, 275, 275, 275,
761 275, 275, 275, 275, 276, 276, 276, 276, 276, 276,
762 276, 276, 276, 321, 321, 321, 321, 321, 321, 321,
763 321, 321, 322, 322, 322, 322, 322, 322, 322, 322,
764 322, 352, 352, 352, 352, 352, 352, 352, 352, 352,
765 379, 379, 379, 379, 379, 379, 379, 379, 379, 380,
766 415, 560, 525, 558, 557, 556, 554, 553, 550, 549,
767 548, 547, 546, 415, 545, 380, 543, 380, 525, 587,
769 542, 541, 587, 588, 588, 540, 588, 589, 589, 589,
770 589, 590, 590, 590, 590, 539, 538, 537, 534, 533,
771 532, 531, 529, 528, 527, 526, 523, 522, 521, 519,
772 518, 517, 516, 515, 514, 513, 512, 511, 510, 509,
773 508, 507, 506, 505, 504, 503, 502, 501, 498, 497,
774 496, 495, 493, 492, 490, 489, 488, 487, 486, 485,
775 483, 482, 481, 480, 479, 478, 476, 475, 474, 473,
776 472, 471, 470, 469, 468, 467, 466, 465, 464, 463,
777 462, 461, 460, 459, 458, 457, 456, 455, 454, 453,
778 451, 450, 449, 448, 447, 446, 445, 444, 443, 442,
780 441, 440, 438, 435, 434, 433, 432, 431, 430, 429,
781 428, 427, 426, 425, 423, 422, 421, 420, 419, 418,
782 417, 416, 414, 413, 412, 410, 409, 408, 407, 406,
783 404, 403, 402, 401, 400, 399, 396, 395, 394, 393,
784 392, 391, 389, 388, 387, 386, 385, 384, 383, 382,
785 381, 378, 376, 374, 372, 371, 370, 368, 367, 366,
786 364, 362, 361, 360, 359, 358, 354, 353, 349, 348,
787 347, 346, 345, 344, 343, 342, 341, 340, 339, 337,
788 336, 335, 333, 332, 331, 329, 328, 327, 326, 325,
789 324, 323, 320, 319, 318, 317, 315, 311, 310, 309,
791 308, 307, 306, 305, 304, 303, 301, 300, 299, 298,
792 288, 287, 286, 285, 284, 283, 281, 280, 279, 278,
793 277, 273, 272, 271, 270, 269, 268, 267, 265, 264,
794 263, 262, 261, 260, 258, 257, 255, 254, 253, 252,
795 251, 250, 249, 248, 246, 245, 244, 242, 241, 240,
796 238, 236, 235, 234, 233, 232, 230, 226, 225, 224,
797 222, 221, 220, 219, 218, 217, 216, 215, 214, 213,
798 212, 211, 210, 209, 208, 206, 204, 203, 202, 201,
799 200, 198, 196, 194, 193, 191, 190, 188, 185, 184,
800 183, 182, 179, 178, 177, 174, 173, 172, 171, 170,
802 169, 164, 163, 162, 161, 160, 159, 158, 157, 155,
803 154, 153, 152, 151, 150, 149, 148, 147, 146, 145,
804 144, 143, 142, 141, 140, 138, 137, 136, 134, 133,
805 132, 131, 130, 129, 128, 127, 126, 125, 124, 122,
806 121, 120, 119, 118, 117, 116, 115, 114, 113, 112,
807 111, 110, 109, 108, 101, 100, 99, 98, 97, 96,
808 95, 94, 93, 92, 91, 88, 87, 85, 84, 82,
809 81, 80, 79, 78, 77, 75, 73, 72, 71, 70,
810 68, 67, 66, 65, 64, 62, 61, 60, 56, 54,
811 48, 42, 36, 34, 31, 30, 29, 25, 21, 16,
813 3, 586, 586, 586, 586, 586, 586, 586, 586, 586,
814 586, 586, 586, 586, 586, 586, 586, 586, 586, 586,
815 586, 586, 586, 586, 586, 586, 586, 586, 586, 586,
816 586, 586, 586, 586, 586, 586, 586, 586, 586, 586,
817 586, 586, 586, 586, 586, 586, 586, 586, 586, 586,
821 static yy_state_type yy_last_accepting_state;
822 static char *yy_last_accepting_cpos;
824 extern int yy_flex_debug;
825 int yy_flex_debug = 0;
827 /* The intent behind this definition is that it'll catch
828 * any uses of REJECT which flex missed.
830 #define REJECT reject_used_but_not_detected
831 #define yymore() yymore_used_but_not_detected
832 #define YY_MORE_ADJ 0
833 #define YY_RESTORE_YY_MORE_OFFSET
837 * Copyright 1996-2017 Ian Jackson <ian@davenant.greenend.org.uk>.
838 * Copyright 2000 Ben Harris <bjh21@cam.ac.uk>
839 * Copyright 2016-2017 Peter Benie <pjb1008@cam.ac.uk>
841 * This is free software; you can redistribute it and/or modify it
842 * under the terms of the GNU General Public License as published by
843 * the Free Software Foundation; either version 3 of the License, or
844 * (at your option) any later version.
846 * This program is distributed in the hope that it will be useful, but
847 * WITHOUT ANY WARRANTY; without even the implied warranty of
848 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
849 * General Public License for more details.
851 * You should have received a copy of the GNU General Public License
852 * along with userv; if not, see <http://www.gnu.org/licenses/>.
872 #include <sys/types.h>
873 #include <sys/stat.h>
886 typedef int directive_fnt(int dtoken);
887 static directive_fnt df_reject, df_execute, df_executefrompath;
888 static directive_fnt df_executefromdirectory, df_executebuiltin;
889 static directive_fnt df_errorstostderr, df_errorstosyslog, df_errorstofile;
890 static directive_fnt dfg_fdwant, dfg_setflag, dfg_lookupquotemode;
891 static directive_fnt df_reset, df_cd, df_userrcfile, df_include;
892 static directive_fnt df_includelookup, df_includedirectory;
893 static directive_fnt df_message, df_error, df_quit, df_eof;
894 static directive_fnt df_if, df_catchquit, df_errorspush;
895 static directive_fnt dfi_includeuserrcfile, dfi_includeclientconfig;
896 /* directive functions return:
897 * 0 for success having scanned up to and including end of line but not beyond,
898 * or tokv_error or tokv_quit.
899 * They expect to parse the whitespace before their parameters (if any).
902 typedef int parmcondition_fnt(int ctoken, char *const *parmvalues, int *rtrue);
903 static parmcondition_fnt pcf_glob, pcf_range, pcf_grep;
904 /* all conditional functions return tokv_error for failure or 0 for success
905 * at parsing and testing, in which case *rtrue is set to 0 or 1.
906 * On success they have scanned up to and including the condition's
907 * terminating newline; the pcf_... functions expect to parse the whitespace
908 * between the parameter name and the condition's arguments.
909 * Otherwise they return tokv_error.
910 * The parameter-based conditionals take a list of parameter values
911 * as obtained from the parameter functions and pa_parameter,
912 * and do _not_ free it.
915 typedef int parameter_fnt(int ptoken, char ***rvalues);
916 static parameter_fnt pf_service;
917 static parameter_fnt pf_callinguser, pf_serviceuser;
918 static parameter_fnt pf_callinggroup, pf_servicegroup;
919 static parameter_fnt pf_callingusershell, pf_serviceusershell;
920 /* Parameter functions return tokv_error or 0 for success at parsing
921 * and determining the value, in which case *rvalues is made to be
922 * a mallocd null-terminated array of pointers to mallocd strings.
923 * freeparm can be used to free such an array.
926 typedef int builtinserviceparse_fnt(char ***rnewargs);
927 static builtinserviceparse_fnt bispa_none, bispa_parameter;
928 /* These parse the arguments to a builtin service, including the
929 * newline at the end of the line. *rnewargs will initially be
930 * null, indicating that no arguments are to be set; the function
931 * may store a mallocd array of mallocd strings in it,
932 * containing the arguments it wishes to have set (null-pointer
936 static int yylex(void);
937 /* Returns a token (which may be an eof or error exception) */
939 static directive_fnt *lr_dir;
940 static parmcondition_fnt *lr_parmcond;
941 static builtinserviceparse_fnt *lr_bispa;
942 static builtinserviceexec_fnt *lr_bisexec;
943 static parameter_fnt *lr_parameter;
944 static int lr_loglevel, lr_logfacility, lr_min, lr_max, *lr_flag;
945 static int lr_flagval, lr_controlend;
946 static int lr_fdwant_readwrite; /* -1=never, 0=opt, 1=always */
948 /* Forward declarations of things used in lexer and parser */
950 struct parser_state {
951 int lineno, reportlineno, notedreferer, isinternal;
952 const char *filename;
953 struct stat filestab;
954 YY_BUFFER_STATE ybuf;
955 struct parser_state *upstate;
958 static struct parser_state *cstate;
960 struct error_handling {
961 int handling; /* One of the error handling modes tokt_ehandlemode */
962 int logfacility, loglevel;
963 int filekeep; /* File is in use by higher-level errors-push, leave it open */
968 static struct error_handling eh = { tokv_word_errorstostderr, 0,0,0,0,0 };
970 static int dequote(char *inplace);
971 static void countnewlines(void);
979 #ifndef YY_NO_UNISTD_H
980 /* Special case for "unistd.h", since it is non-ANSI. We include it way
981 * down here because we want the user's section 1 to have been scanned first.
982 * The user has a chance to override it with an option.
987 #ifndef YY_EXTRA_TYPE
988 #define YY_EXTRA_TYPE void *
991 static int yy_init_globals (void );
993 /* Accessor methods to globals.
994 These are made visible to non-reentrant scanners for convenience. */
996 int yylex_destroy (void );
998 int yyget_debug (void );
1000 void yyset_debug (int debug_flag );
1002 YY_EXTRA_TYPE yyget_extra (void );
1004 void yyset_extra (YY_EXTRA_TYPE user_defined );
1006 FILE *yyget_in (void );
1008 void yyset_in (FILE * _in_str );
1010 FILE *yyget_out (void );
1012 void yyset_out (FILE * _out_str );
1014 int yyget_leng (void );
1016 char *yyget_text (void );
1018 int yyget_lineno (void );
1020 void yyset_lineno (int _line_number );
1022 /* Macros after this point can all be overridden by user definitions in
1026 #ifndef YY_SKIP_YYWRAP
1028 extern "C" int yywrap (void );
1030 extern int yywrap (void );
1039 static void yy_flex_strncpy (char *,yyconst char *,int );
1042 #ifdef YY_NEED_STRLEN
1043 static int yy_flex_strlen (yyconst char * );
1049 static int yyinput (void );
1051 static int input (void );
1056 /* Amount of stuff to slurp up with each read. */
1057 #ifndef YY_READ_BUF_SIZE
1059 /* On IA-64, the buffer size is 16k, not 8k */
1060 #define YY_READ_BUF_SIZE 16384
1062 #define YY_READ_BUF_SIZE 8192
1063 #endif /* __ia64__ */
1066 /* Copy whatever the last rule matched to the standard output. */
1068 /* This used to be an fputs(), but since the string might contain NUL's,
1069 * we now use fwrite().
1071 #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
1074 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1075 * is returned in "result".
1078 #define YY_INPUT(buf,result,max_size) \
1079 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1083 for ( n = 0; n < max_size && \
1084 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1085 buf[n] = (char) c; \
1087 buf[n++] = (char) c; \
1088 if ( c == EOF && ferror( yyin ) ) \
1089 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1095 while ( (result = (int) fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
1097 if( errno != EINTR) \
1099 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1110 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1111 * we don't want an extra ';' after the "return" because that will cause
1112 * some compilers to complain about unreachable statements.
1115 #define yyterminate() return YY_NULL
1118 /* Number of entries by which start-condition stack grows. */
1119 #ifndef YY_START_STACK_INCR
1120 #define YY_START_STACK_INCR 25
1123 /* Report a fatal error. */
1124 #ifndef YY_FATAL_ERROR
1125 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1128 /* end tables serialization structures and prototypes */
1130 /* Default declaration of generated scanner - a define so the user can
1131 * easily add parameters.
1134 #define YY_DECL_IS_OURS 1
1136 extern int yylex (void);
1138 #define YY_DECL int yylex (void)
1139 #endif /* !YY_DECL */
1141 /* Code executed at the beginning of each rule, after yytext and yyleng
1144 #ifndef YY_USER_ACTION
1145 #define YY_USER_ACTION
1148 /* Code executed at the end of each rule. */
1150 #define YY_BREAK /*LINTED*/break;
1153 #define YY_RULE_SETUP \
1156 /** The main scanner function which does all the work.
1160 yy_state_type yy_current_state;
1161 char *yy_cp, *yy_bp;
1173 (yy_start) = 1; /* first start state */
1181 if ( ! YY_CURRENT_BUFFER ) {
1182 yyensure_buffer_stack ();
1183 YY_CURRENT_BUFFER_LVALUE =
1184 yy_create_buffer(yyin,YY_BUF_SIZE );
1187 yy_load_buffer_state( );
1194 #line 1195 "<stdout>"
1196 while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
1198 yy_cp = (yy_c_buf_p);
1200 /* Support of yytext. */
1201 *yy_cp = (yy_hold_char);
1203 /* yy_bp points to the position in yy_ch_buf of the start of
1208 yy_current_state = (yy_start);
1212 YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
1213 if ( yy_accept[yy_current_state] )
1215 (yy_last_accepting_state) = yy_current_state;
1216 (yy_last_accepting_cpos) = yy_cp;
1218 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1220 yy_current_state = (int) yy_def[yy_current_state];
1221 if ( yy_current_state >= 587 )
1222 yy_c = yy_meta[(unsigned int) yy_c];
1224 yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
1227 while ( yy_base[yy_current_state] != 802 );
1230 yy_act = yy_accept[yy_current_state];
1232 { /* have to back up */
1233 yy_cp = (yy_last_accepting_cpos);
1234 yy_current_state = (yy_last_accepting_state);
1235 yy_act = yy_accept[yy_current_state];
1238 YY_DO_BEFORE_ACTION;
1240 do_action: /* This label is used only to access EOF actions. */
1243 { /* beginning of action switch */
1244 case 0: /* must back up */
1245 /* undo the effects of YY_DO_BEFORE_ACTION */
1246 *yy_cp = (yy_hold_char);
1247 yy_cp = (yy_last_accepting_cpos);
1248 yy_current_state = (yy_last_accepting_state);
1249 goto yy_find_action;
1254 { lr_dir= df_reject; return tokv_word_reject; }
1259 { lr_dir= df_executefromdirectory; return tokv_word_executefromdirectory; }
1264 { lr_dir= df_executefrompath; return tokv_word_executefrompath; }
1269 { lr_dir= df_executebuiltin; return tokv_word_executebuiltin; }
1274 { lr_dir= df_errorstostderr; return tokv_word_errorstostderr; }
1279 { lr_dir= df_errorstosyslog; return tokv_word_errorstosyslog; }
1284 { lr_dir= df_errorstofile; return tokv_word_errorstofile; }
1289 { lr_dir= dfg_lookupquotemode; return tokv_word_includelookupquoteold; }
1294 { lr_dir= dfg_lookupquotemode; return tokv_word_includelookupquotenew; }
1299 { lr_dir= dfg_fdwant; lr_fdwant_readwrite=1; return tokv_word_requirefd; }
1304 { lr_dir= dfg_fdwant; lr_fdwant_readwrite=0; return tokv_word_allowfd; }
1309 { lr_dir= dfg_fdwant; lr_fdwant_readwrite=0; return tokv_word_nullfd; }
1314 { lr_dir= dfg_fdwant; lr_fdwant_readwrite=-1; return tokv_word_rejectfd; }
1319 { lr_dir= dfg_fdwant; lr_fdwant_readwrite=-1; return tokv_word_ignorefd; }
1324 { lr_dir= dfg_setflag; lr_flag= &setenvironment; lr_flagval= 1; return tokv_word_setenvironment; }
1329 { lr_dir= dfg_setflag; lr_flag= &setenvironment; lr_flagval= 0; return tokv_word_nosetenvironment; }
1334 { lr_dir= dfg_setflag; lr_flag= &suppressargs; lr_flagval= 1; return tokv_word_suppressargs; }
1339 { lr_dir= dfg_setflag; lr_flag= &suppressargs; lr_flagval= 0; return tokv_word_nosuppressargs; }
1344 { lr_dir= dfg_setflag; lr_flag= &disconnecthup; lr_flagval= 1; return tokv_word_disconnecthup; }
1349 { lr_dir= dfg_setflag; lr_flag= &disconnecthup; lr_flagval= 0; return tokv_word_nodisconnecthup; }
1354 { lr_dir= df_cd; return tokv_word_cd; }
1359 { lr_dir= df_userrcfile; return tokv_word_userrcfile; }
1364 { lr_dir= df_include; return tokv_word_include; }
1369 { lr_dir= df_include; return tokv_word_includeifexist; }
1374 { lr_dir= df_includelookup; return tokv_word_includelookup; }
1379 { lr_dir= df_includelookup; return tokv_word_includelookupall; }
1384 { lr_dir= df_includedirectory; return tokv_word_includedirectory; }
1389 { lr_dir= df_message; return tokv_word_message; }
1394 { lr_dir= df_include; return tokv_word_includesysconfig; }
1399 { lr_dir= dfi_includeuserrcfile; return tokv_word_includeuserrcfile; }
1404 { lr_dir= dfi_includeclientconfig; return tokv_word_includeclientconfig; }
1409 { lr_dir= df_quit; return tokv_word_quit; }
1414 { lr_dir= df_eof; return tokv_word_eof; }
1419 { lr_dir= df_if; return tokv_word_if; }
1424 { lr_dir= df_catchquit; return tokv_word_catchquit; }
1429 { lr_dir= df_errorspush; return tokv_word_errorspush; }
1434 { lr_controlend= tokv_word_if; return tokv_word_elif; }
1439 { lr_controlend= tokv_word_if; return tokv_word_else; }
1444 { lr_controlend= tokv_word_if; return tokv_word_fi; }
1449 { lr_controlend= tokv_word_catchquit; return tokv_word_hctac; }
1454 { lr_controlend= tokv_word_errorspush; return tokv_word_srorre; }
1459 { lr_parmcond= pcf_glob; return tokv_word_glob; }
1464 { lr_parmcond= pcf_range; return tokv_word_range; }
1469 { lr_parmcond= pcf_grep; return tokv_word_grep; }
1474 { lr_bispa= bispa_none; lr_bisexec= bisexec_environment; return tokv_word_environment; }
1479 { lr_bispa= bispa_parameter; lr_bisexec= bisexec_parameter; return tokv_word_parameter; }
1484 { lr_bispa= bispa_none; lr_bisexec= bisexec_version; return tokv_word_version; }
1489 { lr_bispa= bispa_none; lr_bisexec= bisexec_toplevel; return tokv_word_toplevel; }
1494 { lr_bispa= bispa_none; lr_bisexec= bisexec_override; return tokv_word_override; }
1499 { lr_bispa= bispa_none; lr_bisexec= bisexec_shutdown; return tokv_word_shutdown; }
1504 { lr_bispa= bispa_none; lr_bisexec= bisexec_reset; lr_dir= df_reset; return tokv_word_reset; }
1509 { lr_bispa= bispa_none; lr_bisexec= bisexec_execute; lr_dir= df_execute; return tokv_word_execute; }
1514 { lr_bispa= bispa_none; lr_bisexec= bisexec_help; return tokv_word_help; }
1519 { lr_parameter= pf_service; return tokv_word_service; }
1524 { lr_parameter= pf_callinguser; return tokv_word_callinguser; }
1529 { lr_parameter= pf_callinggroup; return tokv_word_callinggroup; }
1534 { lr_parameter= pf_callingusershell; return tokv_word_callingusershell; }
1539 { lr_parameter= pf_serviceuser; return tokv_word_serviceuser; }
1544 { lr_parameter= pf_servicegroup; return tokv_word_servicegroup; }
1549 { lr_parameter= pf_serviceusershell; return tokv_word_serviceusershell; }
1554 { lr_loglevel= LOG_DEBUG; return tokv_syslog_debug; }
1559 { lr_loglevel= LOG_INFO; return tokv_syslog_info; }
1564 { lr_loglevel= LOG_NOTICE; return tokv_syslog_notice; }
1569 { lr_loglevel= LOG_WARNING; return tokv_syslog_warning; }
1574 { lr_loglevel= LOG_ERR; return tokv_syslog_err; }
1579 { lr_loglevel= LOG_CRIT; return tokv_syslog_crit; }
1584 { lr_loglevel= LOG_ALERT; return tokv_syslog_alert; }
1589 { lr_loglevel= LOG_EMERG; return tokv_syslog_emerg; }
1594 { lr_logfacility= LOG_AUTHPRIV; return tokv_syslog_authpriv; }
1599 { lr_logfacility= LOG_CRON; return tokv_syslog_cron; }
1604 { lr_logfacility= LOG_DAEMON; return tokv_syslog_daemon; }
1609 { lr_logfacility= LOG_KERN; return tokv_syslog_kern; }
1614 { lr_logfacility= LOG_LPR; return tokv_syslog_lpr; }
1619 { lr_logfacility= LOG_MAIL; return tokv_syslog_mail; }
1624 { lr_logfacility= LOG_NEWS; return tokv_syslog_news; }
1629 { lr_logfacility= LOG_SYSLOG; return tokv_syslog_syslog; }
1634 { lr_logfacility= LOG_USER; return tokv_syslog_user; }
1639 { lr_logfacility= LOG_UUCP; return tokv_syslog_uucp; }
1644 { lr_logfacility= LOG_LOCAL0; return tokv_syslog_local0; }
1649 { lr_logfacility= LOG_LOCAL1; return tokv_syslog_local1; }
1654 { lr_logfacility= LOG_LOCAL2; return tokv_syslog_local2; }
1659 { lr_logfacility= LOG_LOCAL3; return tokv_syslog_local3; }
1664 { lr_logfacility= LOG_LOCAL4; return tokv_syslog_local4; }
1669 { lr_logfacility= LOG_LOCAL5; return tokv_syslog_local5; }
1674 { lr_logfacility= LOG_LOCAL6; return tokv_syslog_local6; }
1679 { lr_logfacility= LOG_LOCAL7; return tokv_syslog_local7; }
1684 { return tokv_word_read; }
1689 { return tokv_word_write; }
1694 { return tokv_dollar; }
1699 { lr_max= lr_min= 0; return tokv_word_stdin; }
1704 { lr_max= lr_min= 1; return tokv_word_stdout; }
1709 { lr_max= lr_min= 2; return tokv_word_stderr; }
1714 { return tokv_openparen; }
1719 { return tokv_closeparen; }
1724 { return tokv_not; }
1729 { return tokv_and; }
1739 { lr_dir= df_error; lr_loglevel= LOG_ERR; return tokv_word_error; }
1746 lr_min=lr_max= (int)strtoul(yytext,&ep,10);
1748 return tokv_ordinal;
1756 lr_min= (int)strtoul(yytext,&ep,10);
1757 assert(*ep == HYPHEN);
1759 lr_max= (int)strtoul(ep,&ep,10);
1761 if (lr_max < lr_min)
1762 return parseerrprint("fd range has min > max");
1763 return tokv_fdrange;
1771 lr_min= (int)strtoul(yytext,&ep,10);
1772 assert(*ep == HYPHEN);
1775 return tokv_fdstoend;
1779 /* rule 102 can match eol */
1782 countnewlines(); return tokv_lwsp;
1790 /* rule 104 can match eol */
1793 cstate->lineno++; return tokv_newline;
1796 /* rule 105 can match eol */
1799 cstate->lineno++; return tokv_newline;
1804 return parseerrprint("missing newline at eof after comment");
1807 /* rule 107 can match eol */
1812 return dequote(yytext);
1818 return tokv_barestring;
1820 case YY_STATE_EOF(INITIAL):
1827 return parseerrprint("misquoted or unterminated string");
1832 return parseerrprint("unexpected backslash");
1837 abort(); /* expect lex warning "rule cannot be matched" */
1844 #line 1845 "<stdout>"
1846 case YY_END_OF_BUFFER:
1848 /* Amount of text matched not including the EOB char. */
1849 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1851 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1852 *yy_cp = (yy_hold_char);
1853 YY_RESTORE_YY_MORE_OFFSET
1855 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1857 /* We're scanning a new file or input source. It's
1858 * possible that this happened because the user
1859 * just pointed yyin at a new source and called
1860 * yylex(). If so, then we have to assure
1861 * consistency between YY_CURRENT_BUFFER and our
1862 * globals. Here is the right place to do so, because
1863 * this is the first action (other than possibly a
1864 * back-up) that will match for the new input source.
1866 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1867 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1868 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1871 /* Note that here we test for yy_c_buf_p "<=" to the position
1872 * of the first EOB in the buffer, since yy_c_buf_p will
1873 * already have been incremented past the NUL character
1874 * (since all states make transitions on EOB to the
1875 * end-of-buffer state). Contrast this with the test
1878 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1879 { /* This was really a NUL. */
1880 yy_state_type yy_next_state;
1882 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1884 yy_current_state = yy_get_previous_state( );
1886 /* Okay, we're now positioned to make the NUL
1887 * transition. We couldn't have
1888 * yy_get_previous_state() go ahead and do it
1889 * for us because it doesn't know how to deal
1890 * with the possibility of jamming (and we don't
1891 * want to build jamming into it because then it
1892 * will run more slowly).
1895 yy_next_state = yy_try_NUL_trans( yy_current_state );
1897 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1899 if ( yy_next_state )
1901 /* Consume the NUL. */
1902 yy_cp = ++(yy_c_buf_p);
1903 yy_current_state = yy_next_state;
1909 yy_cp = (yy_c_buf_p);
1910 goto yy_find_action;
1914 else switch ( yy_get_next_buffer( ) )
1916 case EOB_ACT_END_OF_FILE:
1918 (yy_did_buffer_switch_on_eof) = 0;
1922 /* Note: because we've taken care in
1923 * yy_get_next_buffer() to have set up
1924 * yytext, we can now set up
1925 * yy_c_buf_p so that if some total
1926 * hoser (like flex itself) wants to
1927 * call the scanner after we return the
1928 * YY_NULL, it'll still work - another
1929 * YY_NULL will get returned.
1931 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1933 yy_act = YY_STATE_EOF(YY_START);
1939 if ( ! (yy_did_buffer_switch_on_eof) )
1945 case EOB_ACT_CONTINUE_SCAN:
1947 (yytext_ptr) + yy_amount_of_matched_text;
1949 yy_current_state = yy_get_previous_state( );
1951 yy_cp = (yy_c_buf_p);
1952 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1955 case EOB_ACT_LAST_MATCH:
1957 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1959 yy_current_state = yy_get_previous_state( );
1961 yy_cp = (yy_c_buf_p);
1962 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1963 goto yy_find_action;
1970 "fatal flex scanner internal error--no action found" );
1971 } /* end of action switch */
1972 } /* end of scanning one token */
1973 } /* end of user's declarations */
1974 } /* end of yylex */
1976 /* yy_get_next_buffer - try to read in a new buffer
1978 * Returns a code representing an action:
1979 * EOB_ACT_LAST_MATCH -
1980 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1981 * EOB_ACT_END_OF_FILE - end of file
1983 static int yy_get_next_buffer (void)
1985 char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1986 char *source = (yytext_ptr);
1987 int number_to_move, i;
1990 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1992 "fatal flex scanner internal error--end of buffer missed" );
1994 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1995 { /* Don't try to fill the buffer, so this is an EOF. */
1996 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1998 /* We matched a single character, the EOB, so
1999 * treat this as a final EOF.
2001 return EOB_ACT_END_OF_FILE;
2006 /* We matched some text prior to the EOB, first
2009 return EOB_ACT_LAST_MATCH;
2013 /* Try to read more data. */
2015 /* First move last chars to start of buffer. */
2016 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
2018 for ( i = 0; i < number_to_move; ++i )
2019 *(dest++) = *(source++);
2021 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2022 /* don't do the read, it's not guaranteed to return an EOF,
2025 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
2030 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
2032 while ( num_to_read <= 0 )
2033 { /* Not enough room in the buffer - grow it. */
2035 /* just a shorter name for the current buffer */
2036 YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
2038 int yy_c_buf_p_offset =
2039 (int) ((yy_c_buf_p) - b->yy_ch_buf);
2041 if ( b->yy_is_our_buffer )
2043 int new_size = b->yy_buf_size * 2;
2045 if ( new_size <= 0 )
2046 b->yy_buf_size += b->yy_buf_size / 8;
2048 b->yy_buf_size *= 2;
2050 b->yy_ch_buf = (char *)
2051 /* Include room in for 2 EOB chars. */
2052 yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
2055 /* Can't grow it, we don't own it. */
2056 b->yy_ch_buf = NULL;
2058 if ( ! b->yy_ch_buf )
2060 "fatal error - scanner input buffer overflow" );
2062 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
2064 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
2069 if ( num_to_read > YY_READ_BUF_SIZE )
2070 num_to_read = YY_READ_BUF_SIZE;
2072 /* Read in more data. */
2073 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2074 (yy_n_chars), num_to_read );
2076 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2079 if ( (yy_n_chars) == 0 )
2081 if ( number_to_move == YY_MORE_ADJ )
2083 ret_val = EOB_ACT_END_OF_FILE;
2089 ret_val = EOB_ACT_LAST_MATCH;
2090 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
2091 YY_BUFFER_EOF_PENDING;
2096 ret_val = EOB_ACT_CONTINUE_SCAN;
2098 if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
2099 /* Extend the array by 50%, plus the number we really need. */
2100 int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
2101 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
2102 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2103 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
2106 (yy_n_chars) += number_to_move;
2107 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
2108 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
2110 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
2115 /* yy_get_previous_state - get the state just before the EOB char was reached */
2117 static yy_state_type yy_get_previous_state (void)
2119 yy_state_type yy_current_state;
2122 yy_current_state = (yy_start);
2124 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
2126 YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2127 if ( yy_accept[yy_current_state] )
2129 (yy_last_accepting_state) = yy_current_state;
2130 (yy_last_accepting_cpos) = yy_cp;
2132 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2134 yy_current_state = (int) yy_def[yy_current_state];
2135 if ( yy_current_state >= 587 )
2136 yy_c = yy_meta[(unsigned int) yy_c];
2138 yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
2141 return yy_current_state;
2144 /* yy_try_NUL_trans - try to make a transition on the NUL character
2147 * next_state = yy_try_NUL_trans( current_state );
2149 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
2152 char *yy_cp = (yy_c_buf_p);
2155 if ( yy_accept[yy_current_state] )
2157 (yy_last_accepting_state) = yy_current_state;
2158 (yy_last_accepting_cpos) = yy_cp;
2160 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2162 yy_current_state = (int) yy_def[yy_current_state];
2163 if ( yy_current_state >= 587 )
2164 yy_c = yy_meta[(unsigned int) yy_c];
2166 yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
2167 yy_is_jam = (yy_current_state == 586);
2169 return yy_is_jam ? 0 : yy_current_state;
2178 static int yyinput (void)
2180 static int input (void)
2186 *(yy_c_buf_p) = (yy_hold_char);
2188 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
2190 /* yy_c_buf_p now points to the character we want to return.
2191 * If this occurs *before* the EOB characters, then it's a
2192 * valid NUL; if not, then we've hit the end of the buffer.
2194 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2195 /* This was really a NUL. */
2196 *(yy_c_buf_p) = '\0';
2199 { /* need more input */
2200 int offset = (yy_c_buf_p) - (yytext_ptr);
2203 switch ( yy_get_next_buffer( ) )
2205 case EOB_ACT_LAST_MATCH:
2206 /* This happens because yy_g_n_b()
2207 * sees that we've accumulated a
2208 * token and flags that we need to
2209 * try matching the token before
2210 * proceeding. But for input(),
2211 * there's no matching to consider.
2212 * So convert the EOB_ACT_LAST_MATCH
2213 * to EOB_ACT_END_OF_FILE.
2216 /* Reset buffer status. */
2221 case EOB_ACT_END_OF_FILE:
2226 if ( ! (yy_did_buffer_switch_on_eof) )
2235 case EOB_ACT_CONTINUE_SCAN:
2236 (yy_c_buf_p) = (yytext_ptr) + offset;
2242 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
2243 *(yy_c_buf_p) = '\0'; /* preserve yytext */
2244 (yy_hold_char) = *++(yy_c_buf_p);
2248 #endif /* ifndef YY_NO_INPUT */
2250 /** Immediately switch to a different input stream.
2251 * @param input_file A readable stream.
2253 * @note This function does not reset the start condition to @c INITIAL .
2255 void yyrestart (FILE * input_file )
2258 if ( ! YY_CURRENT_BUFFER ){
2259 yyensure_buffer_stack ();
2260 YY_CURRENT_BUFFER_LVALUE =
2261 yy_create_buffer(yyin,YY_BUF_SIZE );
2264 yy_init_buffer(YY_CURRENT_BUFFER,input_file );
2265 yy_load_buffer_state( );
2268 /** Switch to a different input buffer.
2269 * @param new_buffer The new input buffer.
2272 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
2275 /* TODO. We should be able to replace this entire function body
2277 * yypop_buffer_state();
2278 * yypush_buffer_state(new_buffer);
2280 yyensure_buffer_stack ();
2281 if ( YY_CURRENT_BUFFER == new_buffer )
2284 if ( YY_CURRENT_BUFFER )
2286 /* Flush out information for old buffer. */
2287 *(yy_c_buf_p) = (yy_hold_char);
2288 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2289 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2292 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2293 yy_load_buffer_state( );
2295 /* We don't actually know whether we did this switch during
2296 * EOF (yywrap()) processing, but the only time this flag
2297 * is looked at is after yywrap() is called, so it's safe
2298 * to go ahead and always set it.
2300 (yy_did_buffer_switch_on_eof) = 1;
2303 static void yy_load_buffer_state (void)
2305 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2306 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2307 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2308 (yy_hold_char) = *(yy_c_buf_p);
2311 /** Allocate and initialize an input buffer state.
2312 * @param file A readable stream.
2313 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2315 * @return the allocated buffer state.
2317 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
2321 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
2323 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2325 b->yy_buf_size = (yy_size_t)size;
2327 /* yy_ch_buf has to be 2 characters longer than the size given because
2328 * we need to put in 2 end-of-buffer characters.
2330 b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );
2331 if ( ! b->yy_ch_buf )
2332 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2334 b->yy_is_our_buffer = 1;
2336 yy_init_buffer(b,file );
2341 /** Destroy the buffer.
2342 * @param b a buffer created with yy_create_buffer()
2345 void yy_delete_buffer (YY_BUFFER_STATE b )
2351 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2352 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
2354 if ( b->yy_is_our_buffer )
2355 yyfree((void *) b->yy_ch_buf );
2357 yyfree((void *) b );
2360 /* Initializes or reinitializes a buffer.
2361 * This function is sometimes called more than once on the same buffer,
2362 * such as during a yyrestart() or at EOF.
2364 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
2369 yy_flush_buffer(b );
2371 b->yy_input_file = file;
2372 b->yy_fill_buffer = 1;
2374 /* If b is the current buffer, then yy_init_buffer was _probably_
2375 * called from yyrestart() or through yy_get_next_buffer.
2376 * In that case, we don't want to reset the lineno or column.
2378 if (b != YY_CURRENT_BUFFER){
2379 b->yy_bs_lineno = 1;
2380 b->yy_bs_column = 0;
2383 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2388 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2389 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2392 void yy_flush_buffer (YY_BUFFER_STATE b )
2399 /* We always need two end-of-buffer characters. The first causes
2400 * a transition to the end-of-buffer state. The second causes
2401 * a jam in that state.
2403 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2404 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2406 b->yy_buf_pos = &b->yy_ch_buf[0];
2409 b->yy_buffer_status = YY_BUFFER_NEW;
2411 if ( b == YY_CURRENT_BUFFER )
2412 yy_load_buffer_state( );
2415 /** Pushes the new state onto the stack. The new state becomes
2416 * the current state. This function will allocate the stack
2418 * @param new_buffer The new state.
2421 void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
2423 if (new_buffer == NULL)
2426 yyensure_buffer_stack();
2428 /* This block is copied from yy_switch_to_buffer. */
2429 if ( YY_CURRENT_BUFFER )
2431 /* Flush out information for old buffer. */
2432 *(yy_c_buf_p) = (yy_hold_char);
2433 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2434 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2437 /* Only push if top exists. Otherwise, replace top. */
2438 if (YY_CURRENT_BUFFER)
2439 (yy_buffer_stack_top)++;
2440 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2442 /* copied from yy_switch_to_buffer. */
2443 yy_load_buffer_state( );
2444 (yy_did_buffer_switch_on_eof) = 1;
2447 /** Removes and deletes the top of the stack, if present.
2448 * The next element becomes the new top.
2451 void yypop_buffer_state (void)
2453 if (!YY_CURRENT_BUFFER)
2456 yy_delete_buffer(YY_CURRENT_BUFFER );
2457 YY_CURRENT_BUFFER_LVALUE = NULL;
2458 if ((yy_buffer_stack_top) > 0)
2459 --(yy_buffer_stack_top);
2461 if (YY_CURRENT_BUFFER) {
2462 yy_load_buffer_state( );
2463 (yy_did_buffer_switch_on_eof) = 1;
2467 /* Allocates the stack if it does not exist.
2468 * Guarantees space for at least one push.
2470 static void yyensure_buffer_stack (void)
2474 if (!(yy_buffer_stack)) {
2476 /* First allocation is just for 2 elements, since we don't know if this
2477 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2478 * immediate realloc on the next call.
2480 num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
2481 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
2482 (num_to_alloc * sizeof(struct yy_buffer_state*)
2484 if ( ! (yy_buffer_stack) )
2485 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2487 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2489 (yy_buffer_stack_max) = num_to_alloc;
2490 (yy_buffer_stack_top) = 0;
2494 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
2496 /* Increase the buffer to prepare for a possible push. */
2497 yy_size_t grow_size = 8 /* arbitrary grow size */;
2499 num_to_alloc = (yy_buffer_stack_max) + grow_size;
2500 (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
2502 num_to_alloc * sizeof(struct yy_buffer_state*)
2504 if ( ! (yy_buffer_stack) )
2505 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2507 /* zero only the new slots.*/
2508 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
2509 (yy_buffer_stack_max) = num_to_alloc;
2513 /** Setup the input buffer state to scan directly from a user-specified character buffer.
2514 * @param base the character buffer
2515 * @param size the size in bytes of the character buffer
2517 * @return the newly allocated buffer state object.
2519 YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
2524 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2525 base[size-1] != YY_END_OF_BUFFER_CHAR )
2526 /* They forgot to leave room for the EOB's. */
2529 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
2531 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2533 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2534 b->yy_buf_pos = b->yy_ch_buf = base;
2535 b->yy_is_our_buffer = 0;
2536 b->yy_input_file = NULL;
2537 b->yy_n_chars = b->yy_buf_size;
2538 b->yy_is_interactive = 0;
2540 b->yy_fill_buffer = 0;
2541 b->yy_buffer_status = YY_BUFFER_NEW;
2543 yy_switch_to_buffer(b );
2548 /** Setup the input buffer state to scan a string. The next call to yylex() will
2549 * scan from a @e copy of @a str.
2550 * @param yystr a NUL-terminated string to scan
2552 * @return the newly allocated buffer state object.
2553 * @note If you want to scan bytes that may contain NUL values, then use
2554 * yy_scan_bytes() instead.
2556 YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
2559 return yy_scan_bytes(yystr,(int) strlen(yystr) );
2562 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
2563 * scan from a @e copy of @a bytes.
2564 * @param yybytes the byte buffer to scan
2565 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
2567 * @return the newly allocated buffer state object.
2569 YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len )
2576 /* Get memory for full buffer, including space for trailing EOB's. */
2577 n = (yy_size_t) (_yybytes_len + 2);
2578 buf = (char *) yyalloc(n );
2580 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2582 for ( i = 0; i < _yybytes_len; ++i )
2583 buf[i] = yybytes[i];
2585 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2587 b = yy_scan_buffer(buf,n );
2589 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2591 /* It's okay to grow etc. this buffer, and we should throw it
2592 * away when we're done.
2594 b->yy_is_our_buffer = 1;
2599 #ifndef YY_EXIT_FAILURE
2600 #define YY_EXIT_FAILURE 2
2603 static void yynoreturn yy_fatal_error (yyconst char* msg )
2605 (void) fprintf( stderr, "%s\n", msg );
2606 exit( YY_EXIT_FAILURE );
2609 /* Redefine yyless() so it works in section 3 code. */
2615 /* Undo effects of setting up yytext. */ \
2616 int yyless_macro_arg = (n); \
2617 YY_LESS_LINENO(yyless_macro_arg);\
2618 yytext[yyleng] = (yy_hold_char); \
2619 (yy_c_buf_p) = yytext + yyless_macro_arg; \
2620 (yy_hold_char) = *(yy_c_buf_p); \
2621 *(yy_c_buf_p) = '\0'; \
2622 yyleng = yyless_macro_arg; \
2626 /* Accessor methods (get/set functions) to struct members. */
2628 /** Get the current line number.
2631 int yyget_lineno (void)
2637 /** Get the input stream.
2640 FILE *yyget_in (void)
2645 /** Get the output stream.
2648 FILE *yyget_out (void)
2653 /** Get the length of the current token.
2656 int yyget_leng (void)
2661 /** Get the current token.
2665 char *yyget_text (void)
2670 /** Set the current line number.
2671 * @param _line_number line number
2674 void yyset_lineno (int _line_number )
2677 yylineno = _line_number;
2680 /** Set the input stream. This does not discard the current
2682 * @param _in_str A readable stream.
2684 * @see yy_switch_to_buffer
2686 void yyset_in (FILE * _in_str )
2691 void yyset_out (FILE * _out_str )
2696 int yyget_debug (void)
2698 return yy_flex_debug;
2701 void yyset_debug (int _bdebug )
2703 yy_flex_debug = _bdebug ;
2706 static int yy_init_globals (void)
2708 /* Initialization is the same as for the non-reentrant scanner.
2709 * This function is called from yylex_destroy(), so don't allocate here.
2712 (yy_buffer_stack) = NULL;
2713 (yy_buffer_stack_top) = 0;
2714 (yy_buffer_stack_max) = 0;
2715 (yy_c_buf_p) = NULL;
2719 /* Defined in main.c */
2728 /* For future reference: Set errno on error, since we are called by
2734 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
2735 int yylex_destroy (void)
2738 /* Pop the buffer stack, destroying each element. */
2739 while(YY_CURRENT_BUFFER){
2740 yy_delete_buffer(YY_CURRENT_BUFFER );
2741 YY_CURRENT_BUFFER_LVALUE = NULL;
2742 yypop_buffer_state();
2745 /* Destroy the stack itself. */
2746 yyfree((yy_buffer_stack) );
2747 (yy_buffer_stack) = NULL;
2749 /* Reset the globals. This is important in a non-reentrant scanner so the next time
2750 * yylex() is called, initialization will occur. */
2757 * Internal utility routines.
2761 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
2765 for ( i = 0; i < n; ++i )
2770 #ifdef YY_NEED_STRLEN
2771 static int yy_flex_strlen (yyconst char * s )
2774 for ( n = 0; s[n]; ++n )
2781 void *yyalloc (yy_size_t size )
2783 return malloc(size);
2786 void *yyrealloc (void * ptr, yy_size_t size )
2789 /* The cast to (char *) in the following accommodates both
2790 * implementations that use char* generic pointers, and those
2791 * that use void* generic pointers. It works with the latter
2792 * because both ANSI C and C++ allow castless assignment from
2793 * any pointer type to void*, and deal with argument conversions
2794 * as though doing an assignment.
2796 return realloc(ptr, size);
2799 void yyfree (void * ptr )
2801 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
2804 #define YYTABLES_NAME "yytables"
2810 const char *const builtinservicehelpstrings[]= {
2812 "parameter <parameter>",