1 /* A lexical scanner generated by flex */
3 /* Scanner skeleton version:
8 #define YY_FLEX_MAJOR_VERSION 2
9 #define YY_FLEX_MINOR_VERSION 5
14 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
27 /* Use prototypes in function declarations. */
30 /* The "const" storage-class-modifier is valid. */
33 #else /* ! __cplusplus */
41 #endif /* ! __cplusplus */
60 #define YY_PROTO(proto) proto
62 #define YY_PROTO(proto) ()
65 /* Returned upon end-of-file. */
68 /* Promotes a possibly negative, possibly signed char to an unsigned
69 * integer for use as an array index. If the signed char is negative,
70 * we want to instead treat it as an 8-bit unsigned char, hence the
73 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
75 /* Enter a start condition. This macro really ought to take a parameter,
76 * but we do it the disgusting crufty way forced on us by the ()-less
77 * definition of BEGIN.
79 #define BEGIN yy_start = 1 + 2 *
81 /* Translate the current start state into a value that can be later handed
82 * to BEGIN to return to the state. The YYSTATE alias is for lex
85 #define YY_START ((yy_start - 1) / 2)
86 #define YYSTATE YY_START
88 /* Action number for EOF rule of a given start state. */
89 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
91 /* Special action meaning "start processing a new file". */
92 #define YY_NEW_FILE yyrestart( yyin )
94 #define YY_END_OF_BUFFER_CHAR 0
96 /* Size of default input buffer. */
97 #define YY_BUF_SIZE 16384
99 typedef struct yy_buffer_state *YY_BUFFER_STATE;
102 extern FILE *yyin, *yyout;
104 #define EOB_ACT_CONTINUE_SCAN 0
105 #define EOB_ACT_END_OF_FILE 1
106 #define EOB_ACT_LAST_MATCH 2
108 /* The funky do-while in the following #define is used to turn the definition
109 * int a single C statement (which needs a semi-colon terminator). This
110 * avoids problems with code like:
112 * if ( condition_holds )
115 * do_something_else();
117 * Prior to using the do-while the compiler would get upset at the
118 * "else" because it interpreted the "if" statement as being all
119 * done when it reached the ';' after the yyless() call.
122 /* Return all but the first 'n' matched characters back to the input stream. */
127 /* Undo effects of setting up yytext. */ \
128 *yy_cp = yy_hold_char; \
129 YY_RESTORE_YY_MORE_OFFSET \
130 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
131 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
135 #define unput(c) yyunput( c, yytext_ptr )
137 /* The following is because we cannot portably get our hands on size_t
138 * (without autoconf's help, which isn't available because we want
139 * flex-generated scanners to compile on their own).
141 typedef unsigned int yy_size_t;
144 struct yy_buffer_state
148 char *yy_ch_buf; /* input buffer */
149 char *yy_buf_pos; /* current position in input buffer */
151 /* Size of input buffer in bytes, not including room for EOB
154 yy_size_t yy_buf_size;
156 /* Number of characters read into yy_ch_buf, not including EOB
161 /* Whether we "own" the buffer - i.e., we know we created it,
162 * and can realloc() it to grow it, and should free() it to
165 int yy_is_our_buffer;
167 /* Whether this is an "interactive" input source; if so, and
168 * if we're using stdio for input, then we want to use getc()
169 * instead of fread(), to make sure we stop fetching input after
172 int yy_is_interactive;
174 /* Whether we're considered to be at the beginning of a line.
175 * If so, '^' rules will be active on the next match, otherwise
180 /* Whether to try to fill the input buffer when we reach the
185 int yy_buffer_status;
186 #define YY_BUFFER_NEW 0
187 #define YY_BUFFER_NORMAL 1
188 /* When an EOF's been seen but there's still some text to process
189 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
190 * shouldn't try reading from the input source any more. We might
191 * still have a bunch of tokens to match, though, because of
192 * possible backing-up.
194 * When we actually see the EOF, we change the status to "new"
195 * (via yyrestart()), so that the user can continue scanning by
196 * just pointing yyin at a new input file.
198 #define YY_BUFFER_EOF_PENDING 2
201 static YY_BUFFER_STATE yy_current_buffer = 0;
203 /* We provide macros for accessing buffer states in case in the
204 * future we want to put the buffer states in a more general
207 #define YY_CURRENT_BUFFER yy_current_buffer
210 /* yy_hold_char holds the character lost when yytext is formed. */
211 static char yy_hold_char;
213 static int yy_n_chars; /* number of characters read into yy_ch_buf */
218 /* Points to current character in buffer. */
219 static char *yy_c_buf_p = (char *) 0;
220 static int yy_init = 1; /* whether we need to initialize */
221 static int yy_start = 0; /* start state number */
223 /* Flag which is used to allow yywrap()'s to do buffer switches
224 * instead of setting up a fresh yyin. A bit of a hack ...
226 static int yy_did_buffer_switch_on_eof;
228 void yyrestart YY_PROTO(( FILE *input_file ));
230 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
231 void yy_load_buffer_state YY_PROTO(( void ));
232 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
233 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
234 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
235 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
236 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
238 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
239 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
240 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
242 static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
243 static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
244 static void yy_flex_free YY_PROTO(( void * ));
246 #define yy_new_buffer yy_create_buffer
248 #define yy_set_interactive(is_interactive) \
250 if ( ! yy_current_buffer ) \
251 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
252 yy_current_buffer->yy_is_interactive = is_interactive; \
255 #define yy_set_bol(at_bol) \
257 if ( ! yy_current_buffer ) \
258 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
259 yy_current_buffer->yy_at_bol = at_bol; \
262 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
266 #define YY_SKIP_YYWRAP
267 typedef unsigned char YY_CHAR;
268 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
269 typedef int yy_state_type;
271 #define yytext_ptr yytext
273 static yy_state_type yy_get_previous_state YY_PROTO(( void ));
274 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
275 static int yy_get_next_buffer YY_PROTO(( void ));
276 static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
278 /* Done after the current pattern has been matched and before the
279 * corresponding action - sets up yytext.
281 #define YY_DO_BEFORE_ACTION \
282 yytext_ptr = yy_bp; \
283 yyleng = (int) (yy_cp - yy_bp); \
284 yy_hold_char = *yy_cp; \
288 #define YY_NUM_RULES 105
289 #define YY_END_OF_BUFFER 106
290 static yyconst short int yy_accept[578] =
292 0, 0, 106, 104, 98, 99, 90, 103, 101, 87,
293 91, 88, 89, 94, 105, 104, 104, 104, 104, 104,
294 104, 104, 104, 104, 104, 104, 104, 104, 104, 104,
295 104, 104, 104, 104, 104, 104, 104, 92, 104, 98,
296 99, 101, 0, 103, 103, 102, 103, 101, 101, 100,
297 96, 94, 0, 97, 104, 104, 104, 104, 19, 104,
298 104, 104, 104, 104, 104, 104, 104, 104, 104, 37,
299 104, 104, 104, 104, 32, 104, 104, 104, 104, 104,
300 104, 104, 104, 104, 104, 104, 104, 104, 104, 104,
301 104, 104, 104, 104, 104, 104, 104, 104, 104, 104,
303 104, 102, 103, 103, 103, 0, 103, 103, 95, 94,
304 97, 104, 104, 104, 104, 104, 104, 104, 104, 104,
305 104, 104, 104, 104, 104, 104, 31, 63, 104, 104,
306 104, 104, 104, 104, 104, 104, 104, 104, 71, 104,
307 104, 104, 104, 104, 104, 104, 104, 104, 104, 104,
308 104, 104, 104, 104, 104, 104, 104, 104, 104, 104,
309 104, 104, 104, 104, 104, 104, 104, 102, 0, 103,
310 103, 95, 94, 104, 104, 104, 67, 104, 104, 64,
311 68, 104, 104, 104, 35, 36, 104, 104, 104, 104,
312 40, 42, 104, 51, 104, 104, 60, 70, 104, 72,
314 104, 73, 104, 104, 104, 104, 104, 104, 104, 30,
315 104, 85, 104, 104, 104, 104, 104, 104, 104, 104,
316 104, 104, 104, 75, 76, 104, 62, 104, 0, 0,
317 0, 103, 95, 94, 104, 65, 104, 104, 104, 104,
318 104, 59, 104, 66, 104, 93, 104, 38, 104, 104,
319 104, 104, 104, 104, 104, 104, 104, 104, 104, 104,
320 41, 104, 104, 49, 104, 104, 104, 104, 104, 104,
321 104, 104, 104, 104, 104, 86, 0, 0, 95, 94,
322 104, 104, 104, 104, 104, 69, 104, 104, 104, 104,
323 104, 104, 70, 77, 78, 79, 80, 81, 82, 83,
325 84, 104, 104, 104, 104, 61, 104, 104, 104, 1,
326 104, 104, 104, 104, 104, 39, 104, 74, 104, 104,
327 104, 104, 0, 95, 94, 104, 104, 104, 104, 104,
328 104, 104, 104, 50, 104, 21, 26, 104, 104, 104,
329 10, 104, 104, 104, 104, 104, 52, 104, 104, 104,
330 104, 104, 45, 62, 95, 94, 104, 9, 67, 104,
331 104, 104, 104, 104, 104, 104, 104, 104, 104, 104,
332 104, 47, 104, 104, 104, 104, 104, 48, 104, 46,
333 104, 95, 104, 104, 104, 104, 104, 104, 104, 104,
334 104, 104, 12, 104, 104, 104, 104, 104, 104, 44,
336 11, 104, 104, 104, 104, 104, 104, 95, 104, 104,
337 104, 104, 104, 33, 104, 104, 104, 104, 104, 104,
338 104, 104, 104, 104, 104, 104, 8, 104, 104, 104,
339 104, 104, 104, 104, 104, 104, 104, 104, 43, 34,
340 104, 104, 104, 104, 104, 104, 104, 104, 104, 104,
341 104, 104, 104, 104, 20, 104, 104, 104, 104, 53,
342 104, 104, 104, 104, 104, 104, 104, 104, 104, 104,
343 104, 104, 104, 56, 104, 104, 104, 104, 104, 54,
344 104, 104, 104, 104, 104, 104, 104, 104, 104, 104,
345 104, 104, 104, 57, 104, 104, 15, 104, 104, 104,
347 104, 17, 7, 104, 104, 104, 104, 104, 104, 104,
348 23, 104, 104, 104, 104, 104, 104, 104, 104, 104,
349 104, 104, 4, 104, 104, 104, 22, 104, 104, 104,
350 104, 104, 13, 104, 104, 104, 104, 5, 6, 104,
351 104, 104, 104, 104, 104, 16, 104, 104, 104, 104,
352 104, 104, 3, 25, 104, 18, 104, 104, 104, 27,
353 104, 55, 104, 24, 14, 58, 104, 104, 104, 104,
354 28, 104, 104, 104, 29, 2, 0
357 static yyconst int yy_ec[256] =
359 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
360 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
361 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
362 1, 2, 4, 5, 6, 7, 8, 9, 8, 10,
363 11, 8, 8, 8, 12, 8, 8, 13, 14, 15,
364 16, 17, 18, 19, 20, 21, 21, 8, 8, 8,
365 8, 8, 8, 8, 22, 22, 22, 22, 22, 22,
366 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
367 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
368 8, 23, 8, 8, 24, 8, 25, 26, 27, 28,
370 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
371 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
372 49, 50, 8, 51, 8, 8, 1, 1, 1, 1,
373 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
374 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
375 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
376 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
377 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
378 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
379 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
381 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
382 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
383 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
384 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
385 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
389 static yyconst int yy_meta[52] =
391 1, 2, 3, 1, 1, 1, 1, 1, 1, 1,
392 1, 1, 4, 4, 4, 4, 4, 4, 4, 4,
393 4, 1, 2, 1, 1, 1, 1, 1, 1, 1,
394 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
395 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
399 static yyconst short int yy_base[588] =
401 0, 0, 869, 0, 50, 870, 0, 52, 56, 0,
402 0, 0, 0, 68, 58, 835, 19, 49, 37, 56,
403 834, 27, 38, 69, 837, 32, 72, 67, 819, 839,
404 818, 80, 79, 823, 33, 832, 77, 0, 0, 111,
405 870, 857, 113, 118, 113, 108, 141, 123, 856, 870,
406 177, 186, 127, 125, 820, 103, 813, 101, 0, 114,
407 827, 829, 811, 107, 824, 806, 821, 808, 820, 0,
408 809, 818, 802, 809, 0, 806, 108, 801, 815, 799,
409 807, 796, 791, 78, 801, 807, 126, 802, 796, 140,
410 125, 788, 793, 791, 787, 789, 799, 800, 784, 783,
412 791, 0, 147, 0, 169, 128, 195, 212, 230, 239,
413 164, 796, 780, 782, 788, 783, 791, 773, 778, 778,
414 769, 786, 782, 782, 768, 776, 0, 769, 780, 780,
415 765, 779, 763, 763, 765, 761, 761, 773, 0, 761,
416 753, 752, 145, 761, 757, 750, 758, 765, 745, 757,
417 759, 757, 740, 755, 738, 736, 769, 736, 737, 738,
418 741, 740, 733, 734, 730, 734, 727, 870, 260, 296,
419 305, 323, 332, 734, 725, 721, 727, 733, 733, 0,
420 0, 725, 732, 723, 0, 0, 730, 718, 717, 713,
421 0, 0, 730, 0, 714, 710, 0, 725, 717, 0,
423 727, 0, 718, 191, 723, 737, 706, 720, 709, 0,
424 716, 0, 717, 710, 698, 699, 707, 710, 710, 695,
425 694, 696, 705, 721, 0, 699, 698, 701, 173, 0,
426 349, 260, 367, 376, 684, 0, 716, 685, 688, 713,
427 686, 0, 685, 0, 683, 678, 676, 0, 690, 690,
428 681, 385, 685, 672, 670, 673, 683, 681, 677, 680,
429 0, 664, 665, 0, 673, 678, 666, 664, 673, 672,
430 669, 653, 656, 658, 658, 0, 0, 393, 411, 420,
431 667, 664, 660, 661, 650, 0, 652, 651, 676, 658,
432 674, 656, 0, 0, 0, 0, 0, 0, 0, 0,
434 0, 655, 656, 670, 641, 0, 652, 651, 634, 665,
435 647, 631, 645, 627, 625, 0, 628, 0, 641, 642,
436 630, 636, 261, 429, 438, 637, 637, 618, 651, 617,
437 632, 623, 138, 647, 628, 645, 0, 617, 626, 612,
438 0, 624, 623, 621, 638, 600, 636, 614, 608, 602,
439 608, 613, 0, 0, 447, 630, 629, 0, 0, 240,
440 607, 612, 609, 592, 597, 154, 607, 236, 596, 595,
441 603, 0, 589, 602, 599, 255, 586, 0, 615, 0,
442 593, 456, 260, 583, 581, 579, 578, 583, 577, 607,
443 573, 575, 0, 583, 585, 575, 575, 566, 568, 0,
445 0, 582, 567, 565, 568, 581, 569, 0, 568, 554,
446 559, 562, 571, 0, 587, 554, 565, 258, 563, 556,
447 552, 564, 553, 562, 557, 546, 0, 549, 558, 548,
448 543, 555, 550, 539, 552, 535, 537, 546, 0, 0,
449 544, 174, 540, 538, 545, 525, 537, 544, 528, 557,
450 523, 525, 529, 534, 0, 535, 536, 520, 521, 548,
451 514, 522, 529, 513, 511, 542, 526, 519, 506, 506,
452 510, 523, 507, 534, 516, 501, 505, 503, 529, 0,
453 497, 499, 509, 508, 500, 502, 262, 490, 490, 492,
454 519, 492, 487, 0, 485, 489, 0, 482, 487, 482,
456 491, 0, 0, 480, 482, 482, 486, 493, 478, 472,
457 503, 482, 476, 481, 479, 466, 496, 474, 473, 467,
458 442, 449, 0, 437, 373, 374, 0, 348, 316, 331,
459 316, 329, 0, 330, 323, 325, 293, 0, 0, 299,
460 275, 257, 268, 259, 260, 0, 261, 257, 264, 261,
461 257, 265, 0, 0, 255, 0, 245, 234, 230, 0,
462 231, 0, 180, 0, 0, 0, 192, 192, 180, 153,
463 0, 143, 148, 128, 0, 0, 870, 477, 481, 485,
464 489, 493, 497, 501, 505, 99, 64
467 static yyconst short int yy_def[588] =
469 577, 1, 577, 578, 577, 577, 578, 579, 580, 578,
470 578, 578, 578, 578, 577, 578, 578, 578, 578, 578,
471 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
472 578, 578, 578, 578, 578, 578, 578, 578, 578, 577,
473 577, 581, 577, 579, 582, 583, 582, 580, 581, 577,
474 578, 14, 577, 577, 578, 578, 578, 578, 578, 578,
475 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
476 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
477 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
478 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
480 578, 584, 583, 584, 584, 585, 584, 582, 578, 14,
481 577, 578, 578, 578, 578, 578, 578, 578, 578, 578,
482 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
483 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
484 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
485 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
486 578, 578, 578, 578, 578, 578, 578, 577, 585, 584,
487 108, 578, 14, 578, 578, 578, 578, 578, 578, 578,
488 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
489 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
491 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
492 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
493 578, 578, 578, 578, 578, 578, 578, 578, 577, 586,
494 585, 582, 578, 14, 578, 578, 578, 578, 578, 578,
495 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
496 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
497 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
498 578, 578, 578, 578, 578, 578, 587, 231, 578, 14,
499 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
500 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
502 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
503 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
504 578, 578, 585, 578, 14, 578, 578, 578, 578, 578,
505 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
506 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
507 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
508 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
509 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
510 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
511 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
513 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
514 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
515 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
516 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
517 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
518 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
519 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
520 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
521 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
522 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
524 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
525 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
526 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
527 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
528 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
529 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
530 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
531 578, 578, 578, 578, 578, 578, 0, 577, 577, 577,
532 577, 577, 577, 577, 577, 577, 577
535 static yyconst short int yy_nxt[922] =
537 4, 5, 6, 7, 8, 9, 10, 4, 11, 12,
538 13, 4, 14, 14, 14, 14, 14, 14, 14, 14,
539 14, 4, 15, 16, 17, 4, 18, 19, 20, 21,
540 22, 23, 24, 4, 25, 26, 27, 28, 29, 30,
541 31, 32, 33, 34, 35, 36, 37, 4, 4, 4,
542 38, 40, 41, 45, 56, 42, 46, 49, 50, 53,
543 54, 61, 71, 57, 73, 62, 74, 106, 72, 63,
544 79, 80, 43, 58, 47, 97, 59, 98, 49, 51,
545 52, 52, 52, 52, 52, 52, 52, 52, 52, 143,
546 60, 64, 65, 66, 67, 83, 81, 68, 75, 76,
548 82, 100, 277, 69, 89, 84, 77, 91, 90, 104,
549 92, 85, 40, 41, 53, 54, 42, 102, 101, 45,
550 93, 144, 46, 94, 49, 50, 111, 95, 53, 54,
551 104, 113, 168, 43, 135, 47, 116, 136, 114, 123,
552 47, 104, 105, 106, 117, 49, 118, 43, 104, 124,
553 169, 155, 119, 107, 107, 107, 107, 107, 107, 107,
554 107, 107, 104, 147, 151, 111, 156, 148, 157, 104,
555 105, 106, 203, 152, 229, 106, 576, 364, 575, 391,
556 153, 365, 154, 392, 574, 573, 43, 204, 108, 109,
557 109, 109, 109, 109, 109, 109, 109, 109, 110, 110,
559 110, 110, 110, 110, 110, 110, 110, 170, 170, 170,
560 170, 170, 170, 170, 170, 170, 102, 463, 572, 255,
561 571, 570, 464, 569, 171, 171, 171, 171, 171, 171,
562 171, 171, 171, 171, 47, 256, 171, 171, 171, 171,
563 171, 171, 172, 172, 172, 172, 172, 172, 172, 172,
564 172, 173, 173, 173, 173, 173, 173, 173, 173, 173,
565 577, 229, 106, 394, 102, 168, 568, 567, 395, 566,
566 384, 396, 230, 230, 230, 230, 230, 230, 230, 230,
567 230, 577, 47, 169, 385, 403, 409, 441, 565, 507,
568 564, 563, 562, 561, 560, 559, 558, 557, 556, 404,
570 442, 508, 410, 555, 411, 554, 553, 231, 45, 45,
571 45, 45, 45, 45, 45, 45, 45, 232, 232, 232,
572 232, 232, 232, 232, 232, 232, 232, 552, 551, 232,
573 232, 232, 232, 232, 232, 233, 233, 233, 233, 233,
574 233, 233, 233, 233, 234, 234, 234, 234, 234, 234,
575 234, 234, 234, 168, 550, 549, 548, 547, 546, 545,
576 544, 278, 278, 278, 278, 278, 278, 278, 278, 278,
577 278, 169, 543, 278, 278, 278, 278, 278, 278, 279,
578 279, 279, 279, 279, 279, 279, 279, 279, 280, 280,
579 280, 280, 280, 280, 280, 280, 280, 294, 295, 296,
581 297, 298, 299, 300, 301, 323, 323, 323, 323, 323,
582 323, 323, 323, 323, 323, 542, 541, 323, 323, 323,
583 323, 323, 323, 324, 324, 324, 324, 324, 324, 324,
584 324, 324, 325, 325, 325, 325, 325, 325, 325, 325,
585 325, 355, 355, 355, 355, 355, 355, 355, 355, 355,
586 356, 356, 356, 356, 356, 356, 356, 356, 356, 382,
587 382, 382, 382, 382, 382, 382, 382, 382, 408, 408,
588 408, 408, 408, 408, 408, 408, 408, 39, 540, 539,
589 39, 44, 44, 538, 44, 48, 48, 48, 48, 49,
590 49, 49, 49, 45, 45, 537, 45, 103, 103, 536,
592 103, 104, 104, 535, 104, 106, 106, 534, 106, 533,
593 532, 531, 530, 529, 528, 527, 526, 525, 524, 523,
594 522, 521, 520, 519, 518, 517, 516, 515, 514, 513,
595 512, 511, 510, 509, 506, 505, 504, 503, 502, 501,
596 500, 499, 498, 497, 496, 495, 494, 493, 492, 491,
597 490, 489, 488, 487, 486, 485, 484, 483, 482, 481,
598 480, 479, 478, 477, 476, 475, 474, 473, 472, 471,
599 470, 469, 468, 467, 466, 465, 462, 461, 460, 459,
600 458, 457, 456, 455, 454, 453, 452, 451, 450, 449,
601 448, 447, 446, 445, 444, 443, 440, 439, 438, 437,
603 436, 435, 434, 433, 432, 431, 430, 429, 428, 427,
604 426, 425, 424, 423, 422, 421, 420, 419, 418, 417,
605 416, 415, 414, 413, 412, 407, 406, 405, 402, 401,
606 400, 399, 398, 397, 393, 390, 389, 388, 387, 386,
607 383, 51, 381, 380, 379, 378, 377, 376, 359, 375,
608 374, 373, 372, 371, 370, 369, 368, 367, 366, 363,
609 362, 361, 360, 359, 358, 357, 354, 353, 352, 351,
610 350, 349, 348, 347, 346, 345, 344, 343, 342, 341,
611 340, 339, 338, 337, 336, 335, 334, 333, 332, 331,
612 330, 329, 328, 327, 326, 322, 321, 320, 319, 318,
614 317, 316, 315, 314, 313, 312, 311, 310, 309, 308,
615 307, 306, 305, 304, 303, 302, 293, 292, 291, 290,
616 289, 288, 287, 286, 285, 284, 283, 282, 281, 276,
617 275, 274, 273, 272, 271, 270, 269, 268, 267, 266,
618 265, 264, 263, 262, 261, 260, 244, 259, 258, 257,
619 254, 253, 252, 251, 250, 249, 248, 247, 246, 245,
620 244, 243, 242, 241, 240, 239, 238, 237, 236, 235,
621 228, 227, 226, 225, 224, 223, 222, 221, 220, 219,
622 218, 217, 216, 215, 214, 213, 212, 211, 210, 209,
623 208, 207, 206, 205, 202, 201, 200, 199, 198, 197,
625 196, 195, 194, 193, 192, 191, 190, 189, 188, 187,
626 186, 185, 184, 183, 182, 181, 180, 179, 178, 177,
627 176, 175, 174, 167, 166, 165, 164, 163, 162, 161,
628 160, 159, 158, 150, 149, 146, 145, 142, 141, 140,
629 139, 138, 137, 134, 133, 132, 131, 130, 129, 128,
630 127, 126, 125, 122, 121, 120, 115, 112, 50, 50,
631 99, 96, 88, 87, 86, 78, 70, 55, 577, 3,
632 577, 577, 577, 577, 577, 577, 577, 577, 577, 577,
633 577, 577, 577, 577, 577, 577, 577, 577, 577, 577,
634 577, 577, 577, 577, 577, 577, 577, 577, 577, 577,
636 577, 577, 577, 577, 577, 577, 577, 577, 577, 577,
637 577, 577, 577, 577, 577, 577, 577, 577, 577, 577,
641 static yyconst short int yy_chk[922] =
643 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
644 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
645 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
646 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
647 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
648 1, 5, 5, 8, 17, 5, 8, 9, 9, 15,
649 15, 19, 22, 17, 23, 19, 23, 587, 22, 19,
650 26, 26, 5, 18, 8, 35, 18, 35, 9, 14,
651 14, 14, 14, 14, 14, 14, 14, 14, 14, 84,
652 18, 20, 20, 20, 20, 28, 27, 20, 24, 24,
654 27, 37, 586, 20, 32, 28, 24, 33, 32, 46,
655 33, 28, 40, 40, 43, 43, 40, 45, 37, 44,
656 33, 84, 44, 33, 48, 48, 54, 33, 53, 53,
657 46, 56, 106, 40, 77, 45, 58, 77, 56, 64,
658 44, 47, 47, 47, 58, 48, 60, 54, 103, 64,
659 106, 91, 60, 47, 47, 47, 47, 47, 47, 47,
660 47, 47, 47, 87, 90, 111, 91, 87, 91, 103,
661 105, 105, 143, 90, 229, 229, 574, 333, 573, 366,
662 90, 333, 90, 366, 572, 570, 111, 143, 47, 51,
663 51, 51, 51, 51, 51, 51, 51, 51, 52, 52,
665 52, 52, 52, 52, 52, 52, 52, 107, 107, 107,
666 107, 107, 107, 107, 107, 107, 108, 442, 569, 204,
667 568, 567, 442, 563, 108, 108, 108, 108, 108, 108,
668 108, 108, 108, 108, 108, 204, 108, 108, 108, 108,
669 108, 108, 109, 109, 109, 109, 109, 109, 109, 109,
670 109, 110, 110, 110, 110, 110, 110, 110, 110, 110,
671 169, 169, 169, 368, 232, 323, 561, 559, 368, 558,
672 360, 368, 169, 169, 169, 169, 169, 169, 169, 169,
673 169, 169, 232, 323, 360, 376, 383, 418, 557, 487,
674 555, 552, 551, 550, 549, 548, 547, 545, 544, 376,
676 418, 487, 383, 543, 383, 542, 541, 169, 170, 170,
677 170, 170, 170, 170, 170, 170, 170, 171, 171, 171,
678 171, 171, 171, 171, 171, 171, 171, 540, 537, 171,
679 171, 171, 171, 171, 171, 172, 172, 172, 172, 172,
680 172, 172, 172, 172, 173, 173, 173, 173, 173, 173,
681 173, 173, 173, 231, 536, 535, 534, 532, 531, 530,
682 529, 231, 231, 231, 231, 231, 231, 231, 231, 231,
683 231, 231, 528, 231, 231, 231, 231, 231, 231, 233,
684 233, 233, 233, 233, 233, 233, 233, 233, 234, 234,
685 234, 234, 234, 234, 234, 234, 234, 252, 252, 252,
687 252, 252, 252, 252, 252, 278, 278, 278, 278, 278,
688 278, 278, 278, 278, 278, 526, 525, 278, 278, 278,
689 278, 278, 278, 279, 279, 279, 279, 279, 279, 279,
690 279, 279, 280, 280, 280, 280, 280, 280, 280, 280,
691 280, 324, 324, 324, 324, 324, 324, 324, 324, 324,
692 325, 325, 325, 325, 325, 325, 325, 325, 325, 355,
693 355, 355, 355, 355, 355, 355, 355, 355, 382, 382,
694 382, 382, 382, 382, 382, 382, 382, 578, 524, 522,
695 578, 579, 579, 521, 579, 580, 580, 580, 580, 581,
696 581, 581, 581, 582, 582, 520, 582, 583, 583, 519,
698 583, 584, 584, 518, 584, 585, 585, 517, 585, 516,
699 515, 514, 513, 512, 511, 510, 509, 508, 507, 506,
700 505, 504, 501, 500, 499, 498, 496, 495, 493, 492,
701 491, 490, 489, 488, 486, 485, 484, 483, 482, 481,
702 479, 478, 477, 476, 475, 474, 473, 472, 471, 470,
703 469, 468, 467, 466, 465, 464, 463, 462, 461, 460,
704 459, 458, 457, 456, 454, 453, 452, 451, 450, 449,
705 448, 447, 446, 445, 444, 443, 441, 438, 437, 436,
706 435, 434, 433, 432, 431, 430, 429, 428, 426, 425,
707 424, 423, 422, 421, 420, 419, 417, 416, 415, 413,
709 412, 411, 410, 409, 407, 406, 405, 404, 403, 402,
710 399, 398, 397, 396, 395, 394, 392, 391, 390, 389,
711 388, 387, 386, 385, 384, 381, 379, 377, 375, 374,
712 373, 371, 370, 369, 367, 365, 364, 363, 362, 361,
713 357, 356, 352, 351, 350, 349, 348, 347, 346, 345,
714 344, 343, 342, 340, 339, 338, 336, 335, 334, 332,
715 331, 330, 329, 328, 327, 326, 322, 321, 320, 319,
716 317, 315, 314, 313, 312, 311, 310, 309, 308, 307,
717 305, 304, 303, 302, 292, 291, 290, 289, 288, 287,
718 285, 284, 283, 282, 281, 275, 274, 273, 272, 271,
720 270, 269, 268, 267, 266, 265, 263, 262, 260, 259,
721 258, 257, 256, 255, 254, 253, 251, 250, 249, 247,
722 246, 245, 243, 241, 240, 239, 238, 237, 235, 228,
723 227, 226, 224, 223, 222, 221, 220, 219, 218, 217,
724 216, 215, 214, 213, 211, 209, 208, 207, 206, 205,
725 203, 201, 199, 198, 196, 195, 193, 190, 189, 188,
726 187, 184, 183, 182, 179, 178, 177, 176, 175, 174,
727 167, 166, 165, 164, 163, 162, 161, 160, 159, 158,
728 157, 156, 155, 154, 153, 152, 151, 150, 149, 148,
729 147, 146, 145, 144, 142, 141, 140, 138, 137, 136,
731 135, 134, 133, 132, 131, 130, 129, 128, 126, 125,
732 124, 123, 122, 121, 120, 119, 118, 117, 116, 115,
733 114, 113, 112, 101, 100, 99, 98, 97, 96, 95,
734 94, 93, 92, 89, 88, 86, 85, 83, 82, 81,
735 80, 79, 78, 76, 74, 73, 72, 71, 69, 68,
736 67, 66, 65, 63, 62, 61, 57, 55, 49, 42,
737 36, 34, 31, 30, 29, 25, 21, 16, 3, 577,
738 577, 577, 577, 577, 577, 577, 577, 577, 577, 577,
739 577, 577, 577, 577, 577, 577, 577, 577, 577, 577,
740 577, 577, 577, 577, 577, 577, 577, 577, 577, 577,
742 577, 577, 577, 577, 577, 577, 577, 577, 577, 577,
743 577, 577, 577, 577, 577, 577, 577, 577, 577, 577,
747 static yy_state_type yy_last_accepting_state;
748 static char *yy_last_accepting_cpos;
750 /* The intent behind this definition is that it'll catch
751 * any uses of REJECT which flex missed.
753 #define REJECT reject_used_but_not_detected
754 #define yymore() yymore_used_but_not_detected
755 #define YY_MORE_ADJ 0
756 #define YY_RESTORE_YY_MORE_OFFSET
761 * Copyright (C)1996-1997,1999 Ian Jackson
763 * This is free software; you can redistribute it and/or modify it
764 * under the terms of the GNU General Public License as published by
765 * the Free Software Foundation; either version 2 of the License, or
766 * (at your option) any later version.
768 * This program is distributed in the hope that it will be useful, but
769 * WITHOUT ANY WARRANTY; without even the implied warranty of
770 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
771 * General Public License for more details.
773 * You should have received a copy of the GNU General Public License
774 * along with userv; if not, write to the Free Software
775 * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
795 #include <sys/types.h>
796 #include <sys/stat.h>
809 typedef int directive_fnt(int dtoken);
810 static directive_fnt df_reject, df_execute, df_executefrompath;
811 static directive_fnt df_executefromdirectory, df_executebuiltin;
812 static directive_fnt df_errorstostderr, df_errorstosyslog, df_errorstofile;
813 static directive_fnt dfg_fdwant, dfg_setflag;
814 static directive_fnt df_reset, df_cd, df_userrcfile, df_include;
815 static directive_fnt df_includelookup, df_includedirectory;
816 static directive_fnt df_message, df_error, df_quit, df_eof;
817 static directive_fnt df_if, df_catchquit, df_errorspush;
818 static directive_fnt dfi_includeuserrcfile, dfi_includeclientconfig;
819 /* directive functions return:
820 * 0 for success having scanned up to and including end of line but not beyond,
821 * or tokv_error or tokv_quit.
822 * They expect to parse the whitespace before their parameters (if any).
825 typedef int parmcondition_fnt(int ctoken, char *const *parmvalues, int *rtrue);
826 static parmcondition_fnt pcf_glob, pcf_range, pcf_grep;
827 /* all conditional functions return tokv_error for failure or 0 for success
828 * at parsing and testing, in which case *rtrue is set to 0 or 1.
829 * On success they have scanned up to and including the condition's
830 * terminating newline; the pcf_... functions expect to parse the whitespace
831 * between the parameter name and the condition's arguments.
832 * Otherwise they return tokv_error.
833 * The parameter-based conditionals take a list of parameter values
834 * as obtained from the parameter functions and pa_parameter,
835 * and do _not_ free it.
838 typedef int parameter_fnt(int ptoken, char ***rvalues);
839 static parameter_fnt pf_service;
840 static parameter_fnt pf_callinguser, pf_serviceuser;
841 static parameter_fnt pf_callinggroup, pf_servicegroup;
842 static parameter_fnt pf_callingusershell, pf_serviceusershell;
843 /* Parameter functions return tokv_error or 0 for success at parsing
844 * and determining the value, in which case *rvalues is made to be
845 * a mallocd null-terminated array of pointers to mallocd strings.
846 * freeparm can be used to free such an array.
849 typedef int builtinserviceparse_fnt(char ***rnewargs);
850 static builtinserviceparse_fnt bispa_none, bispa_parameter;
851 /* These parse the arguments to a builtin service, including the
852 * newline at the end of the line. *rnewargs will initially be
853 * null, indicating that no arguments are to be set; the function
854 * may store a mallocd array of mallocd strings in it,
855 * containing the arguments it wishes to have set (null-pointer
859 static int yylex(void);
860 /* Returns a token (which may be an eof or error exception) */
862 static directive_fnt *lr_dir;
863 static parmcondition_fnt *lr_parmcond;
864 static builtinserviceparse_fnt *lr_bispa;
865 static builtinserviceexec_fnt *lr_bisexec;
866 static parameter_fnt *lr_parameter;
867 static int lr_loglevel, lr_logfacility, lr_min, lr_max, *lr_flag;
868 static int lr_flagval, lr_controlend;
869 static int lr_fdwant_readwrite; /* -1=never, 0=opt, 1=always */
871 /* Forward declarations of things used in lexer and parser */
873 struct parser_state {
874 int lineno, reportlineno, notedreferer, isinternal;
875 const char *filename;
876 struct stat filestab;
877 YY_BUFFER_STATE ybuf;
878 struct parser_state *upstate;
881 static struct parser_state *cstate;
883 struct error_handling {
884 int handling; /* One of the error handling modes tokt_ehandlemode */
885 int logfacility, loglevel;
886 int filekeep; /* File is in use by higher-level errors-push, leave it open */
891 static struct error_handling eh = { tokv_word_errorstostderr, 0,0,0,0,0 };
893 static int dequote(char *inplace);
898 /* Macros after this point can all be overridden by user definitions in
902 #ifndef YY_SKIP_YYWRAP
904 extern "C" int yywrap YY_PROTO(( void ));
906 extern int yywrap YY_PROTO(( void ));
911 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
915 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
918 #ifdef YY_NEED_STRLEN
919 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
924 static int yyinput YY_PROTO(( void ));
926 static int input YY_PROTO(( void ));
931 static int yy_start_stack_ptr = 0;
932 static int yy_start_stack_depth = 0;
933 static int *yy_start_stack = 0;
934 #ifndef YY_NO_PUSH_STATE
935 static void yy_push_state YY_PROTO(( int new_state ));
937 #ifndef YY_NO_POP_STATE
938 static void yy_pop_state YY_PROTO(( void ));
940 #ifndef YY_NO_TOP_STATE
941 static int yy_top_state YY_PROTO(( void ));
945 #define YY_NO_PUSH_STATE 1
946 #define YY_NO_POP_STATE 1
947 #define YY_NO_TOP_STATE 1
950 #ifdef YY_MALLOC_DECL
958 /* Just try to get by without declaring the routines. This will fail
959 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
960 * or sizeof(void*) != sizeof(int).
965 /* Amount of stuff to slurp up with each read. */
966 #ifndef YY_READ_BUF_SIZE
967 #define YY_READ_BUF_SIZE 8192
970 /* Copy whatever the last rule matched to the standard output. */
973 /* This used to be an fputs(), but since the string might contain NUL's,
974 * we now use fwrite().
976 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
979 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
980 * is returned in "result".
983 #define YY_INPUT(buf,result,max_size) \
984 if ( yy_current_buffer->yy_is_interactive ) \
987 for ( n = 0; n < max_size && \
988 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
991 buf[n++] = (char) c; \
992 if ( c == EOF && ferror( yyin ) ) \
993 YY_FATAL_ERROR( "input in flex scanner failed" ); \
996 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
997 && ferror( yyin ) ) \
998 YY_FATAL_ERROR( "input in flex scanner failed" );
1001 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1002 * we don't want an extra ';' after the "return" because that will cause
1003 * some compilers to complain about unreachable statements.
1006 #define yyterminate() return YY_NULL
1009 /* Number of entries by which start-condition stack grows. */
1010 #ifndef YY_START_STACK_INCR
1011 #define YY_START_STACK_INCR 25
1014 /* Report a fatal error. */
1015 #ifndef YY_FATAL_ERROR
1016 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1019 /* Default declaration of generated scanner - a define so the user can
1020 * easily add parameters.
1023 #define YY_DECL int yylex YY_PROTO(( void ))
1026 /* Code executed at the beginning of each rule, after yytext and yyleng
1029 #ifndef YY_USER_ACTION
1030 #define YY_USER_ACTION
1033 /* Code executed at the end of each rule. */
1035 #define YY_BREAK break;
1038 #define YY_RULE_SETUP \
1043 register yy_state_type yy_current_state;
1044 register char *yy_cp, *yy_bp;
1045 register int yy_act;
1060 yy_start = 1; /* first start state */
1068 if ( ! yy_current_buffer )
1070 yy_create_buffer( yyin, YY_BUF_SIZE );
1072 yy_load_buffer_state();
1075 while ( 1 ) /* loops until end-of-file is reached */
1079 /* Support of yytext. */
1080 *yy_cp = yy_hold_char;
1082 /* yy_bp points to the position in yy_ch_buf of the start of
1087 yy_current_state = yy_start;
1091 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1092 if ( yy_accept[yy_current_state] )
1094 yy_last_accepting_state = yy_current_state;
1095 yy_last_accepting_cpos = yy_cp;
1097 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1099 yy_current_state = (int) yy_def[yy_current_state];
1100 if ( yy_current_state >= 578 )
1101 yy_c = yy_meta[(unsigned int) yy_c];
1103 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1106 while ( yy_base[yy_current_state] != 870 );
1109 yy_act = yy_accept[yy_current_state];
1111 { /* have to back up */
1112 yy_cp = yy_last_accepting_cpos;
1113 yy_current_state = yy_last_accepting_state;
1114 yy_act = yy_accept[yy_current_state];
1117 YY_DO_BEFORE_ACTION;
1120 do_action: /* This label is used only to access EOF actions. */
1124 { /* beginning of action switch */
1125 case 0: /* must back up */
1126 /* undo the effects of YY_DO_BEFORE_ACTION */
1127 *yy_cp = yy_hold_char;
1128 yy_cp = yy_last_accepting_cpos;
1129 yy_current_state = yy_last_accepting_state;
1130 goto yy_find_action;
1135 { lr_dir= df_reject; return tokv_word_reject; }
1140 { lr_dir= df_executefromdirectory; return tokv_word_executefromdirectory; }
1145 { lr_dir= df_executefrompath; return tokv_word_executefrompath; }
1150 { lr_dir= df_executebuiltin; return tokv_word_executebuiltin; }
1155 { lr_dir= df_errorstostderr; return tokv_word_errorstostderr; }
1160 { lr_dir= df_errorstosyslog; return tokv_word_errorstosyslog; }
1165 { lr_dir= df_errorstofile; return tokv_word_errorstofile; }
1170 { lr_dir= dfg_fdwant; lr_fdwant_readwrite=1; return tokv_word_requirefd; }
1175 { lr_dir= dfg_fdwant; lr_fdwant_readwrite=0; return tokv_word_allowfd; }
1180 { lr_dir= dfg_fdwant; lr_fdwant_readwrite=0; return tokv_word_nullfd; }
1185 { lr_dir= dfg_fdwant; lr_fdwant_readwrite=-1; return tokv_word_rejectfd; }
1190 { lr_dir= dfg_fdwant; lr_fdwant_readwrite=-1; return tokv_word_ignorefd; }
1195 { lr_dir= dfg_setflag; lr_flag= &setenvironment; lr_flagval= 1; return tokv_word_setenvironment; }
1200 { lr_dir= dfg_setflag; lr_flag= &setenvironment; lr_flagval= 0; return tokv_word_nosetenvironment; }
1205 { lr_dir= dfg_setflag; lr_flag= &suppressargs; lr_flagval= 1; return tokv_word_suppressargs; }
1210 { lr_dir= dfg_setflag; lr_flag= &suppressargs; lr_flagval= 0; return tokv_word_nosuppressargs; }
1215 { lr_dir= dfg_setflag; lr_flag= &disconnecthup; lr_flagval= 1; return tokv_word_disconnecthup; }
1220 { lr_dir= dfg_setflag; lr_flag= &disconnecthup; lr_flagval= 0; return tokv_word_nodisconnecthup; }
1225 { lr_dir= df_cd; return tokv_word_cd; }
1230 { lr_dir= df_userrcfile; return tokv_word_userrcfile; }
1235 { lr_dir= df_include; return tokv_word_include; }
1240 { lr_dir= df_include; return tokv_word_includeifexist; }
1245 { lr_dir= df_includelookup; return tokv_word_includelookup; }
1250 { lr_dir= df_includelookup; return tokv_word_includelookupall; }
1255 { lr_dir= df_includedirectory; return tokv_word_includedirectory; }
1260 { lr_dir= df_message; return tokv_word_message; }
1265 { lr_dir= df_include; return tokv_word_includesysconfig; }
1270 { lr_dir= dfi_includeuserrcfile; return tokv_word_includeuserrcfile; }
1275 { lr_dir= dfi_includeclientconfig; return tokv_word_includeclientconfig; }
1280 { lr_dir= df_quit; return tokv_word_quit; }
1285 { lr_dir= df_eof; return tokv_word_eof; }
1290 { lr_dir= df_if; return tokv_word_if; }
1295 { lr_dir= df_catchquit; return tokv_word_catchquit; }
1300 { lr_dir= df_errorspush; return tokv_word_errorspush; }
1305 { lr_controlend= tokv_word_if; return tokv_word_elif; }
1310 { lr_controlend= tokv_word_if; return tokv_word_else; }
1315 { lr_controlend= tokv_word_if; return tokv_word_fi; }
1320 { lr_controlend= tokv_word_catchquit; return tokv_word_hctac; }
1325 { lr_controlend= tokv_word_errorspush; return tokv_word_srorre; }
1330 { lr_parmcond= pcf_glob; return tokv_word_glob; }
1335 { lr_parmcond= pcf_range; return tokv_word_range; }
1340 { lr_parmcond= pcf_grep; return tokv_word_grep; }
1345 { lr_bispa= bispa_none; lr_bisexec= bisexec_environment; return tokv_word_environment; }
1350 { lr_bispa= bispa_parameter; lr_bisexec= bisexec_parameter; return tokv_word_parameter; }
1355 { lr_bispa= bispa_none; lr_bisexec= bisexec_version; return tokv_word_version; }
1360 { lr_bispa= bispa_none; lr_bisexec= bisexec_toplevel; return tokv_word_toplevel; }
1365 { lr_bispa= bispa_none; lr_bisexec= bisexec_override; return tokv_word_override; }
1370 { lr_bispa= bispa_none; lr_bisexec= bisexec_shutdown; return tokv_word_shutdown; }
1375 { lr_bispa= bispa_none; lr_bisexec= bisexec_reset; lr_dir= df_reset; return tokv_word_reset; }
1380 { lr_bispa= bispa_none; lr_bisexec= bisexec_execute; lr_dir= df_execute; return tokv_word_execute; }
1385 { lr_bispa= bispa_none; lr_bisexec= bisexec_help; return tokv_word_help; }
1390 { lr_parameter= pf_service; return tokv_word_service; }
1395 { lr_parameter= pf_callinguser; return tokv_word_callinguser; }
1400 { lr_parameter= pf_callinggroup; return tokv_word_callinggroup; }
1405 { lr_parameter= pf_callingusershell; return tokv_word_callingusershell; }
1410 { lr_parameter= pf_serviceuser; return tokv_word_serviceuser; }
1415 { lr_parameter= pf_servicegroup; return tokv_word_servicegroup; }
1420 { lr_parameter= pf_serviceusershell; return tokv_word_serviceusershell; }
1425 { lr_loglevel= LOG_DEBUG; return tokv_syslog_debug; }
1430 { lr_loglevel= LOG_INFO; return tokv_syslog_info; }
1435 { lr_loglevel= LOG_NOTICE; return tokv_syslog_notice; }
1440 { lr_loglevel= LOG_WARNING; return tokv_syslog_warning; }
1445 { lr_loglevel= LOG_ERR; return tokv_syslog_err; }
1450 { lr_loglevel= LOG_CRIT; return tokv_syslog_crit; }
1455 { lr_loglevel= LOG_ALERT; return tokv_syslog_alert; }
1460 { lr_loglevel= LOG_EMERG; return tokv_syslog_emerg; }
1465 { lr_logfacility= LOG_AUTHPRIV; return tokv_syslog_authpriv; }
1470 { lr_logfacility= LOG_CRON; return tokv_syslog_cron; }
1475 { lr_logfacility= LOG_DAEMON; return tokv_syslog_daemon; }
1480 { lr_logfacility= LOG_KERN; return tokv_syslog_kern; }
1485 { lr_logfacility= LOG_LPR; return tokv_syslog_lpr; }
1490 { lr_logfacility= LOG_MAIL; return tokv_syslog_mail; }
1495 { lr_logfacility= LOG_NEWS; return tokv_syslog_news; }
1500 { lr_logfacility= LOG_SYSLOG; return tokv_syslog_syslog; }
1505 { lr_logfacility= LOG_USER; return tokv_syslog_user; }
1510 { lr_logfacility= LOG_UUCP; return tokv_syslog_uucp; }
1515 { lr_logfacility= LOG_LOCAL0; return tokv_syslog_local0; }
1520 { lr_logfacility= LOG_LOCAL1; return tokv_syslog_local1; }
1525 { lr_logfacility= LOG_LOCAL2; return tokv_syslog_local2; }
1530 { lr_logfacility= LOG_LOCAL3; return tokv_syslog_local3; }
1535 { lr_logfacility= LOG_LOCAL4; return tokv_syslog_local4; }
1540 { lr_logfacility= LOG_LOCAL5; return tokv_syslog_local5; }
1545 { lr_logfacility= LOG_LOCAL6; return tokv_syslog_local6; }
1550 { lr_logfacility= LOG_LOCAL7; return tokv_syslog_local7; }
1555 { return tokv_word_read; }
1560 { return tokv_word_write; }
1565 { return tokv_dollar; }
1570 { return tokv_openparen; }
1575 { return tokv_closeparen; }
1580 { return tokv_not; }
1585 { return tokv_and; }
1595 { lr_dir= df_error; lr_loglevel= LOG_ERR; return tokv_word_error; }
1602 lr_min=lr_max= (int)strtoul(yytext,&ep,10);
1604 return tokv_ordinal;
1612 lr_min= (int)strtoul(yytext,&ep,10);
1613 assert(*ep == HYPHEN);
1615 lr_max= (int)strtoul(ep,&ep,10);
1617 if (lr_max < lr_min) {
1618 parseerrprint("fd range has min > max");
1621 return tokv_fdrange;
1629 lr_min= (int)strtoul(yytext,&ep,10);
1630 assert(*ep == HYPHEN);
1633 return tokv_fdstoend;
1649 cstate->lineno++; return tokv_newline;
1654 cstate->lineno++; return tokv_newline;
1660 parseerrprint("missing newline at eof after comment");
1668 return dequote(yytext);
1675 parseerrprint("misquoted or unterminated string");
1682 return tokv_barestring;
1684 case YY_STATE_EOF(INITIAL):
1694 case YY_END_OF_BUFFER:
1696 /* Amount of text matched not including the EOB char. */
1697 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
1699 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1700 *yy_cp = yy_hold_char;
1701 YY_RESTORE_YY_MORE_OFFSET
1703 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
1705 /* We're scanning a new file or input source. It's
1706 * possible that this happened because the user
1707 * just pointed yyin at a new source and called
1708 * yylex(). If so, then we have to assure
1709 * consistency between yy_current_buffer and our
1710 * globals. Here is the right place to do so, because
1711 * this is the first action (other than possibly a
1712 * back-up) that will match for the new input source.
1714 yy_n_chars = yy_current_buffer->yy_n_chars;
1715 yy_current_buffer->yy_input_file = yyin;
1716 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
1719 /* Note that here we test for yy_c_buf_p "<=" to the position
1720 * of the first EOB in the buffer, since yy_c_buf_p will
1721 * already have been incremented past the NUL character
1722 * (since all states make transitions on EOB to the
1723 * end-of-buffer state). Contrast this with the test
1726 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1727 { /* This was really a NUL. */
1728 yy_state_type yy_next_state;
1730 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
1732 yy_current_state = yy_get_previous_state();
1734 /* Okay, we're now positioned to make the NUL
1735 * transition. We couldn't have
1736 * yy_get_previous_state() go ahead and do it
1737 * for us because it doesn't know how to deal
1738 * with the possibility of jamming (and we don't
1739 * want to build jamming into it because then it
1740 * will run more slowly).
1743 yy_next_state = yy_try_NUL_trans( yy_current_state );
1745 yy_bp = yytext_ptr + YY_MORE_ADJ;
1747 if ( yy_next_state )
1749 /* Consume the NUL. */
1750 yy_cp = ++yy_c_buf_p;
1751 yy_current_state = yy_next_state;
1758 goto yy_find_action;
1762 else switch ( yy_get_next_buffer() )
1764 case EOB_ACT_END_OF_FILE:
1766 yy_did_buffer_switch_on_eof = 0;
1770 /* Note: because we've taken care in
1771 * yy_get_next_buffer() to have set up
1772 * yytext, we can now set up
1773 * yy_c_buf_p so that if some total
1774 * hoser (like flex itself) wants to
1775 * call the scanner after we return the
1776 * YY_NULL, it'll still work - another
1777 * YY_NULL will get returned.
1779 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1781 yy_act = YY_STATE_EOF(YY_START);
1787 if ( ! yy_did_buffer_switch_on_eof )
1793 case EOB_ACT_CONTINUE_SCAN:
1795 yytext_ptr + yy_amount_of_matched_text;
1797 yy_current_state = yy_get_previous_state();
1800 yy_bp = yytext_ptr + YY_MORE_ADJ;
1803 case EOB_ACT_LAST_MATCH:
1805 &yy_current_buffer->yy_ch_buf[yy_n_chars];
1807 yy_current_state = yy_get_previous_state();
1810 yy_bp = yytext_ptr + YY_MORE_ADJ;
1811 goto yy_find_action;
1818 "fatal flex scanner internal error--no action found" );
1819 } /* end of action switch */
1820 } /* end of scanning one token */
1821 } /* end of yylex */
1824 /* yy_get_next_buffer - try to read in a new buffer
1826 * Returns a code representing an action:
1827 * EOB_ACT_LAST_MATCH -
1828 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1829 * EOB_ACT_END_OF_FILE - end of file
1832 static int yy_get_next_buffer()
1834 register char *dest = yy_current_buffer->yy_ch_buf;
1835 register char *source = yytext_ptr;
1836 register int number_to_move, i;
1839 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
1841 "fatal flex scanner internal error--end of buffer missed" );
1843 if ( yy_current_buffer->yy_fill_buffer == 0 )
1844 { /* Don't try to fill the buffer, so this is an EOF. */
1845 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
1847 /* We matched a single character, the EOB, so
1848 * treat this as a final EOF.
1850 return EOB_ACT_END_OF_FILE;
1855 /* We matched some text prior to the EOB, first
1858 return EOB_ACT_LAST_MATCH;
1862 /* Try to read more data. */
1864 /* First move last chars to start of buffer. */
1865 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
1867 for ( i = 0; i < number_to_move; ++i )
1868 *(dest++) = *(source++);
1870 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1871 /* don't do the read, it's not guaranteed to return an EOF,
1874 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
1879 yy_current_buffer->yy_buf_size - number_to_move - 1;
1881 while ( num_to_read <= 0 )
1882 { /* Not enough room in the buffer - grow it. */
1883 #ifdef YY_USES_REJECT
1885 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1888 /* just a shorter name for the current buffer */
1889 YY_BUFFER_STATE b = yy_current_buffer;
1891 int yy_c_buf_p_offset =
1892 (int) (yy_c_buf_p - b->yy_ch_buf);
1894 if ( b->yy_is_our_buffer )
1896 int new_size = b->yy_buf_size * 2;
1898 if ( new_size <= 0 )
1899 b->yy_buf_size += b->yy_buf_size / 8;
1901 b->yy_buf_size *= 2;
1903 b->yy_ch_buf = (char *)
1904 /* Include room in for 2 EOB chars. */
1905 yy_flex_realloc( (void *) b->yy_ch_buf,
1906 b->yy_buf_size + 2 );
1909 /* Can't grow it, we don't own it. */
1912 if ( ! b->yy_ch_buf )
1914 "fatal error - scanner input buffer overflow" );
1916 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1918 num_to_read = yy_current_buffer->yy_buf_size -
1923 if ( num_to_read > YY_READ_BUF_SIZE )
1924 num_to_read = YY_READ_BUF_SIZE;
1926 /* Read in more data. */
1927 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1928 yy_n_chars, num_to_read );
1930 yy_current_buffer->yy_n_chars = yy_n_chars;
1933 if ( yy_n_chars == 0 )
1935 if ( number_to_move == YY_MORE_ADJ )
1937 ret_val = EOB_ACT_END_OF_FILE;
1943 ret_val = EOB_ACT_LAST_MATCH;
1944 yy_current_buffer->yy_buffer_status =
1945 YY_BUFFER_EOF_PENDING;
1950 ret_val = EOB_ACT_CONTINUE_SCAN;
1952 yy_n_chars += number_to_move;
1953 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1954 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1956 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1962 /* yy_get_previous_state - get the state just before the EOB char was reached */
1964 static yy_state_type yy_get_previous_state()
1966 register yy_state_type yy_current_state;
1967 register char *yy_cp;
1969 yy_current_state = yy_start;
1971 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1973 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1974 if ( yy_accept[yy_current_state] )
1976 yy_last_accepting_state = yy_current_state;
1977 yy_last_accepting_cpos = yy_cp;
1979 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1981 yy_current_state = (int) yy_def[yy_current_state];
1982 if ( yy_current_state >= 578 )
1983 yy_c = yy_meta[(unsigned int) yy_c];
1985 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1988 return yy_current_state;
1992 /* yy_try_NUL_trans - try to make a transition on the NUL character
1995 * next_state = yy_try_NUL_trans( current_state );
1998 #ifdef YY_USE_PROTOS
1999 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
2001 static yy_state_type yy_try_NUL_trans( yy_current_state )
2002 yy_state_type yy_current_state;
2005 register int yy_is_jam;
2006 register char *yy_cp = yy_c_buf_p;
2008 register YY_CHAR yy_c = 1;
2009 if ( yy_accept[yy_current_state] )
2011 yy_last_accepting_state = yy_current_state;
2012 yy_last_accepting_cpos = yy_cp;
2014 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2016 yy_current_state = (int) yy_def[yy_current_state];
2017 if ( yy_current_state >= 578 )
2018 yy_c = yy_meta[(unsigned int) yy_c];
2020 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2021 yy_is_jam = (yy_current_state == 577);
2023 return yy_is_jam ? 0 : yy_current_state;
2028 #ifdef YY_USE_PROTOS
2029 static void yyunput( int c, register char *yy_bp )
2031 static void yyunput( c, yy_bp )
2033 register char *yy_bp;
2036 register char *yy_cp = yy_c_buf_p;
2038 /* undo effects of setting up yytext */
2039 *yy_cp = yy_hold_char;
2041 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2042 { /* need to shift things up to make room */
2043 /* +2 for EOB chars. */
2044 register int number_to_move = yy_n_chars + 2;
2045 register char *dest = &yy_current_buffer->yy_ch_buf[
2046 yy_current_buffer->yy_buf_size + 2];
2047 register char *source =
2048 &yy_current_buffer->yy_ch_buf[number_to_move];
2050 while ( source > yy_current_buffer->yy_ch_buf )
2051 *--dest = *--source;
2053 yy_cp += (int) (dest - source);
2054 yy_bp += (int) (dest - source);
2055 yy_current_buffer->yy_n_chars =
2056 yy_n_chars = yy_current_buffer->yy_buf_size;
2058 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2059 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2062 *--yy_cp = (char) c;
2066 yy_hold_char = *yy_cp;
2069 #endif /* ifndef YY_NO_UNPUT */
2073 static int yyinput()
2080 *yy_c_buf_p = yy_hold_char;
2082 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
2084 /* yy_c_buf_p now points to the character we want to return.
2085 * If this occurs *before* the EOB characters, then it's a
2086 * valid NUL; if not, then we've hit the end of the buffer.
2088 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
2089 /* This was really a NUL. */
2093 { /* need more input */
2094 int offset = yy_c_buf_p - yytext_ptr;
2097 switch ( yy_get_next_buffer() )
2099 case EOB_ACT_LAST_MATCH:
2100 /* This happens because yy_g_n_b()
2101 * sees that we've accumulated a
2102 * token and flags that we need to
2103 * try matching the token before
2104 * proceeding. But for input(),
2105 * there's no matching to consider.
2106 * So convert the EOB_ACT_LAST_MATCH
2107 * to EOB_ACT_END_OF_FILE.
2110 /* Reset buffer status. */
2115 case EOB_ACT_END_OF_FILE:
2120 if ( ! yy_did_buffer_switch_on_eof )
2129 case EOB_ACT_CONTINUE_SCAN:
2130 yy_c_buf_p = yytext_ptr + offset;
2136 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
2137 *yy_c_buf_p = '\0'; /* preserve yytext */
2138 yy_hold_char = *++yy_c_buf_p;
2145 #ifdef YY_USE_PROTOS
2146 void yyrestart( FILE *input_file )
2148 void yyrestart( input_file )
2152 if ( ! yy_current_buffer )
2153 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
2155 yy_init_buffer( yy_current_buffer, input_file );
2156 yy_load_buffer_state();
2160 #ifdef YY_USE_PROTOS
2161 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
2163 void yy_switch_to_buffer( new_buffer )
2164 YY_BUFFER_STATE new_buffer;
2167 if ( yy_current_buffer == new_buffer )
2170 if ( yy_current_buffer )
2172 /* Flush out information for old buffer. */
2173 *yy_c_buf_p = yy_hold_char;
2174 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
2175 yy_current_buffer->yy_n_chars = yy_n_chars;
2178 yy_current_buffer = new_buffer;
2179 yy_load_buffer_state();
2181 /* We don't actually know whether we did this switch during
2182 * EOF (yywrap()) processing, but the only time this flag
2183 * is looked at is after yywrap() is called, so it's safe
2184 * to go ahead and always set it.
2186 yy_did_buffer_switch_on_eof = 1;
2190 #ifdef YY_USE_PROTOS
2191 void yy_load_buffer_state( void )
2193 void yy_load_buffer_state()
2196 yy_n_chars = yy_current_buffer->yy_n_chars;
2197 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
2198 yyin = yy_current_buffer->yy_input_file;
2199 yy_hold_char = *yy_c_buf_p;
2203 #ifdef YY_USE_PROTOS
2204 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
2206 YY_BUFFER_STATE yy_create_buffer( file, size )
2213 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2215 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2217 b->yy_buf_size = size;
2219 /* yy_ch_buf has to be 2 characters longer than the size given because
2220 * we need to put in 2 end-of-buffer characters.
2222 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
2223 if ( ! b->yy_ch_buf )
2224 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2226 b->yy_is_our_buffer = 1;
2228 yy_init_buffer( b, file );
2234 #ifdef YY_USE_PROTOS
2235 void yy_delete_buffer( YY_BUFFER_STATE b )
2237 void yy_delete_buffer( b )
2244 if ( b == yy_current_buffer )
2245 yy_current_buffer = (YY_BUFFER_STATE) 0;
2247 if ( b->yy_is_our_buffer )
2248 yy_flex_free( (void *) b->yy_ch_buf );
2250 yy_flex_free( (void *) b );
2254 #ifndef YY_ALWAYS_INTERACTIVE
2255 #ifndef YY_NEVER_INTERACTIVE
2256 extern int isatty YY_PROTO(( int ));
2260 #ifdef YY_USE_PROTOS
2261 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
2263 void yy_init_buffer( b, file )
2270 yy_flush_buffer( b );
2272 b->yy_input_file = file;
2273 b->yy_fill_buffer = 1;
2275 #if YY_ALWAYS_INTERACTIVE
2276 b->yy_is_interactive = 1;
2278 #if YY_NEVER_INTERACTIVE
2279 b->yy_is_interactive = 0;
2281 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2287 #ifdef YY_USE_PROTOS
2288 void yy_flush_buffer( YY_BUFFER_STATE b )
2290 void yy_flush_buffer( b )
2300 /* We always need two end-of-buffer characters. The first causes
2301 * a transition to the end-of-buffer state. The second causes
2302 * a jam in that state.
2304 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2305 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2307 b->yy_buf_pos = &b->yy_ch_buf[0];
2310 b->yy_buffer_status = YY_BUFFER_NEW;
2312 if ( b == yy_current_buffer )
2313 yy_load_buffer_state();
2317 #ifndef YY_NO_SCAN_BUFFER
2318 #ifdef YY_USE_PROTOS
2319 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
2321 YY_BUFFER_STATE yy_scan_buffer( base, size )
2329 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2330 base[size-1] != YY_END_OF_BUFFER_CHAR )
2331 /* They forgot to leave room for the EOB's. */
2334 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2336 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2338 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2339 b->yy_buf_pos = b->yy_ch_buf = base;
2340 b->yy_is_our_buffer = 0;
2341 b->yy_input_file = 0;
2342 b->yy_n_chars = b->yy_buf_size;
2343 b->yy_is_interactive = 0;
2345 b->yy_fill_buffer = 0;
2346 b->yy_buffer_status = YY_BUFFER_NEW;
2348 yy_switch_to_buffer( b );
2355 #ifndef YY_NO_SCAN_STRING
2356 #ifdef YY_USE_PROTOS
2357 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
2359 YY_BUFFER_STATE yy_scan_string( yy_str )
2360 yyconst char *yy_str;
2364 for ( len = 0; yy_str[len]; ++len )
2367 return yy_scan_bytes( yy_str, len );
2372 #ifndef YY_NO_SCAN_BYTES
2373 #ifdef YY_USE_PROTOS
2374 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
2376 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
2377 yyconst char *bytes;
2386 /* Get memory for full buffer, including space for trailing EOB's. */
2388 buf = (char *) yy_flex_alloc( n );
2390 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2392 for ( i = 0; i < len; ++i )
2395 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
2397 b = yy_scan_buffer( buf, n );
2399 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2401 /* It's okay to grow etc. this buffer, and we should throw it
2402 * away when we're done.
2404 b->yy_is_our_buffer = 1;
2411 #ifndef YY_NO_PUSH_STATE
2412 #ifdef YY_USE_PROTOS
2413 static void yy_push_state( int new_state )
2415 static void yy_push_state( new_state )
2419 if ( yy_start_stack_ptr >= yy_start_stack_depth )
2423 yy_start_stack_depth += YY_START_STACK_INCR;
2424 new_size = yy_start_stack_depth * sizeof( int );
2426 if ( ! yy_start_stack )
2427 yy_start_stack = (int *) yy_flex_alloc( new_size );
2430 yy_start_stack = (int *) yy_flex_realloc(
2431 (void *) yy_start_stack, new_size );
2433 if ( ! yy_start_stack )
2435 "out of memory expanding start-condition stack" );
2438 yy_start_stack[yy_start_stack_ptr++] = YY_START;
2445 #ifndef YY_NO_POP_STATE
2446 static void yy_pop_state()
2448 if ( --yy_start_stack_ptr < 0 )
2449 YY_FATAL_ERROR( "start-condition stack underflow" );
2451 BEGIN(yy_start_stack[yy_start_stack_ptr]);
2456 #ifndef YY_NO_TOP_STATE
2457 static int yy_top_state()
2459 return yy_start_stack[yy_start_stack_ptr - 1];
2463 #ifndef YY_EXIT_FAILURE
2464 #define YY_EXIT_FAILURE 2
2467 #ifdef YY_USE_PROTOS
2468 static void yy_fatal_error( yyconst char msg[] )
2470 static void yy_fatal_error( msg )
2474 (void) fprintf( stderr, "%s\n", msg );
2475 exit( YY_EXIT_FAILURE );
2480 /* Redefine yyless() so it works in section 3 code. */
2486 /* Undo effects of setting up yytext. */ \
2487 yytext[yyleng] = yy_hold_char; \
2488 yy_c_buf_p = yytext + n; \
2489 yy_hold_char = *yy_c_buf_p; \
2490 *yy_c_buf_p = '\0'; \
2496 /* Internal utility routines. */
2499 #ifdef YY_USE_PROTOS
2500 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
2502 static void yy_flex_strncpy( s1, s2, n )
2509 for ( i = 0; i < n; ++i )
2514 #ifdef YY_NEED_STRLEN
2515 #ifdef YY_USE_PROTOS
2516 static int yy_flex_strlen( yyconst char *s )
2518 static int yy_flex_strlen( s )
2523 for ( n = 0; s[n]; ++n )
2531 #ifdef YY_USE_PROTOS
2532 static void *yy_flex_alloc( yy_size_t size )
2534 static void *yy_flex_alloc( size )
2538 return (void *) malloc( size );
2541 #ifdef YY_USE_PROTOS
2542 static void *yy_flex_realloc( void *ptr, yy_size_t size )
2544 static void *yy_flex_realloc( ptr, size )
2549 /* The cast to (char *) in the following accommodates both
2550 * implementations that use char* generic pointers, and those
2551 * that use void* generic pointers. It works with the latter
2552 * because both ANSI C and C++ allow castless assignment from
2553 * any pointer type to void*, and deal with argument conversions
2554 * as though doing an assignment.
2556 return (void *) realloc( (char *) ptr, size );
2559 #ifdef YY_USE_PROTOS
2560 static void yy_flex_free( void *ptr )
2562 static void yy_flex_free( ptr )
2579 const char *const builtinservicehelpstrings[]= {
2581 "parameter <parameter>",