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>
808 typedef int directive_fnt(int dtoken);
809 static directive_fnt df_reject, df_execute, df_executefrompath;
810 static directive_fnt df_executefromdirectory, df_executebuiltin;
811 static directive_fnt df_errorstostderr, df_errorstosyslog, df_errorstofile;
812 static directive_fnt dfg_fdwant, dfg_setflag;
813 static directive_fnt df_reset, df_cd, df_userrcfile, df_include;
814 static directive_fnt df_includelookup, df_includedirectory;
815 static directive_fnt df_message, df_error, df_quit, df_eof;
816 static directive_fnt df_if, df_catchquit, df_errorspush;
817 static directive_fnt dfi_includeuserrcfile, dfi_includeclientconfig;
818 /* directive functions return:
819 * 0 for success having scanned up to and including end of line but not beyond,
820 * or tokv_error or tokv_quit.
821 * They expect to parse the whitespace before their parameters (if any).
824 typedef int parmcondition_fnt(int ctoken, char *const *parmvalues, int *rtrue);
825 static parmcondition_fnt pcf_glob, pcf_range, pcf_grep;
826 /* all conditional functions return tokv_error for failure or 0 for success
827 * at parsing and testing, in which case *rtrue is set to 0 or 1.
828 * On success they have scanned up to and including the condition's
829 * terminating newline; the pcf_... functions expect to parse the whitespace
830 * between the parameter name and the condition's arguments.
831 * Otherwise they return tokv_error.
832 * The parameter-based conditionals take a list of parameter values
833 * as obtained from the parameter functions and pa_parameter,
834 * and do _not_ free it.
837 typedef int parameter_fnt(int ptoken, char ***rvalues);
838 static parameter_fnt pf_service;
839 static parameter_fnt pf_callinguser, pf_serviceuser;
840 static parameter_fnt pf_callinggroup, pf_servicegroup;
841 static parameter_fnt pf_callingusershell, pf_serviceusershell;
842 /* Parameter functions return tokv_error or 0 for success at parsing
843 * and determining the value, in which case *rvalues is made to be
844 * a mallocd null-terminated array of pointers to mallocd strings.
845 * freeparm can be used to free such an array.
848 typedef int builtinserviceparse_fnt(char ***rnewargs);
849 static builtinserviceparse_fnt bispa_none, bispa_parameter;
850 /* These parse the arguments to a builtin service, including the
851 * newline at the end of the line. *rnewargs will initially be
852 * null, indicating that no arguments are to be set; the function
853 * may store a mallocd array of mallocd strings in it,
854 * containing the arguments it wishes to have set (null-pointer
858 static int yylex(void);
859 /* Returns a token (which may be an eof or error exception) */
861 static directive_fnt *lr_dir;
862 static parmcondition_fnt *lr_parmcond;
863 static builtinserviceparse_fnt *lr_bispa;
864 static builtinserviceexec_fnt *lr_bisexec;
865 static parameter_fnt *lr_parameter;
866 static int lr_loglevel, lr_logfacility, lr_min, lr_max, *lr_flag;
867 static int lr_flagval, lr_controlend;
868 static int lr_fdwant_readwrite; /* -1=never, 0=opt, 1=always */
870 /* Forward declarations of things used in lexer and parser */
872 struct parser_state {
873 int lineno, reportlineno, notedreferer, isinternal;
874 const char *filename;
875 struct stat filestab;
876 YY_BUFFER_STATE ybuf;
877 struct parser_state *upstate;
880 static struct parser_state *cstate;
882 struct error_handling {
883 int handling; /* One of the error handling modes tokt_ehandlemode */
884 int logfacility, loglevel;
885 int filekeep; /* File is in use by higher-level errors-push, leave it open */
890 static struct error_handling eh = { tokv_word_errorstostderr, 0,0,0,0,0 };
892 static int dequote(char *inplace);
897 /* Macros after this point can all be overridden by user definitions in
901 #ifndef YY_SKIP_YYWRAP
903 extern "C" int yywrap YY_PROTO(( void ));
905 extern int yywrap YY_PROTO(( void ));
910 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
914 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
917 #ifdef YY_NEED_STRLEN
918 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
923 static int yyinput YY_PROTO(( void ));
925 static int input YY_PROTO(( void ));
930 static int yy_start_stack_ptr = 0;
931 static int yy_start_stack_depth = 0;
932 static int *yy_start_stack = 0;
933 #ifndef YY_NO_PUSH_STATE
934 static void yy_push_state YY_PROTO(( int new_state ));
936 #ifndef YY_NO_POP_STATE
937 static void yy_pop_state YY_PROTO(( void ));
939 #ifndef YY_NO_TOP_STATE
940 static int yy_top_state YY_PROTO(( void ));
944 #define YY_NO_PUSH_STATE 1
945 #define YY_NO_POP_STATE 1
946 #define YY_NO_TOP_STATE 1
949 #ifdef YY_MALLOC_DECL
957 /* Just try to get by without declaring the routines. This will fail
958 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
959 * or sizeof(void*) != sizeof(int).
964 /* Amount of stuff to slurp up with each read. */
965 #ifndef YY_READ_BUF_SIZE
966 #define YY_READ_BUF_SIZE 8192
969 /* Copy whatever the last rule matched to the standard output. */
972 /* This used to be an fputs(), but since the string might contain NUL's,
973 * we now use fwrite().
975 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
978 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
979 * is returned in "result".
982 #define YY_INPUT(buf,result,max_size) \
983 if ( yy_current_buffer->yy_is_interactive ) \
986 for ( n = 0; n < max_size && \
987 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
990 buf[n++] = (char) c; \
991 if ( c == EOF && ferror( yyin ) ) \
992 YY_FATAL_ERROR( "input in flex scanner failed" ); \
995 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
996 && ferror( yyin ) ) \
997 YY_FATAL_ERROR( "input in flex scanner failed" );
1000 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1001 * we don't want an extra ';' after the "return" because that will cause
1002 * some compilers to complain about unreachable statements.
1005 #define yyterminate() return YY_NULL
1008 /* Number of entries by which start-condition stack grows. */
1009 #ifndef YY_START_STACK_INCR
1010 #define YY_START_STACK_INCR 25
1013 /* Report a fatal error. */
1014 #ifndef YY_FATAL_ERROR
1015 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1018 /* Default declaration of generated scanner - a define so the user can
1019 * easily add parameters.
1022 #define YY_DECL int yylex YY_PROTO(( void ))
1025 /* Code executed at the beginning of each rule, after yytext and yyleng
1028 #ifndef YY_USER_ACTION
1029 #define YY_USER_ACTION
1032 /* Code executed at the end of each rule. */
1034 #define YY_BREAK break;
1037 #define YY_RULE_SETUP \
1042 register yy_state_type yy_current_state;
1043 register char *yy_cp, *yy_bp;
1044 register int yy_act;
1059 yy_start = 1; /* first start state */
1067 if ( ! yy_current_buffer )
1069 yy_create_buffer( yyin, YY_BUF_SIZE );
1071 yy_load_buffer_state();
1074 while ( 1 ) /* loops until end-of-file is reached */
1078 /* Support of yytext. */
1079 *yy_cp = yy_hold_char;
1081 /* yy_bp points to the position in yy_ch_buf of the start of
1086 yy_current_state = yy_start;
1090 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1091 if ( yy_accept[yy_current_state] )
1093 yy_last_accepting_state = yy_current_state;
1094 yy_last_accepting_cpos = yy_cp;
1096 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1098 yy_current_state = (int) yy_def[yy_current_state];
1099 if ( yy_current_state >= 578 )
1100 yy_c = yy_meta[(unsigned int) yy_c];
1102 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1105 while ( yy_base[yy_current_state] != 870 );
1108 yy_act = yy_accept[yy_current_state];
1110 { /* have to back up */
1111 yy_cp = yy_last_accepting_cpos;
1112 yy_current_state = yy_last_accepting_state;
1113 yy_act = yy_accept[yy_current_state];
1116 YY_DO_BEFORE_ACTION;
1119 do_action: /* This label is used only to access EOF actions. */
1123 { /* beginning of action switch */
1124 case 0: /* must back up */
1125 /* undo the effects of YY_DO_BEFORE_ACTION */
1126 *yy_cp = yy_hold_char;
1127 yy_cp = yy_last_accepting_cpos;
1128 yy_current_state = yy_last_accepting_state;
1129 goto yy_find_action;
1134 { lr_dir= df_reject; return tokv_word_reject; }
1139 { lr_dir= df_executefromdirectory; return tokv_word_executefromdirectory; }
1144 { lr_dir= df_executefrompath; return tokv_word_executefrompath; }
1149 { lr_dir= df_executebuiltin; return tokv_word_executebuiltin; }
1154 { lr_dir= df_errorstostderr; return tokv_word_errorstostderr; }
1159 { lr_dir= df_errorstosyslog; return tokv_word_errorstosyslog; }
1164 { lr_dir= df_errorstofile; return tokv_word_errorstofile; }
1169 { lr_dir= dfg_fdwant; lr_fdwant_readwrite=1; return tokv_word_requirefd; }
1174 { lr_dir= dfg_fdwant; lr_fdwant_readwrite=0; return tokv_word_allowfd; }
1179 { lr_dir= dfg_fdwant; lr_fdwant_readwrite=0; return tokv_word_nullfd; }
1184 { lr_dir= dfg_fdwant; lr_fdwant_readwrite=-1; return tokv_word_rejectfd; }
1189 { lr_dir= dfg_fdwant; lr_fdwant_readwrite=-1; return tokv_word_ignorefd; }
1194 { lr_dir= dfg_setflag; lr_flag= &setenvironment; lr_flagval= 1; return tokv_word_setenvironment; }
1199 { lr_dir= dfg_setflag; lr_flag= &setenvironment; lr_flagval= 0; return tokv_word_nosetenvironment; }
1204 { lr_dir= dfg_setflag; lr_flag= &suppressargs; lr_flagval= 1; return tokv_word_suppressargs; }
1209 { lr_dir= dfg_setflag; lr_flag= &suppressargs; lr_flagval= 0; return tokv_word_nosuppressargs; }
1214 { lr_dir= dfg_setflag; lr_flag= &disconnecthup; lr_flagval= 1; return tokv_word_disconnecthup; }
1219 { lr_dir= dfg_setflag; lr_flag= &disconnecthup; lr_flagval= 0; return tokv_word_nodisconnecthup; }
1224 { lr_dir= df_cd; return tokv_word_cd; }
1229 { lr_dir= df_userrcfile; return tokv_word_userrcfile; }
1234 { lr_dir= df_include; return tokv_word_include; }
1239 { lr_dir= df_include; return tokv_word_includeifexist; }
1244 { lr_dir= df_includelookup; return tokv_word_includelookup; }
1249 { lr_dir= df_includelookup; return tokv_word_includelookupall; }
1254 { lr_dir= df_includedirectory; return tokv_word_includedirectory; }
1259 { lr_dir= df_message; return tokv_word_message; }
1264 { lr_dir= df_include; return tokv_word_includesysconfig; }
1269 { lr_dir= dfi_includeuserrcfile; return tokv_word_includeuserrcfile; }
1274 { lr_dir= dfi_includeclientconfig; return tokv_word_includeclientconfig; }
1279 { lr_dir= df_quit; return tokv_word_quit; }
1284 { lr_dir= df_eof; return tokv_word_eof; }
1289 { lr_dir= df_if; return tokv_word_if; }
1294 { lr_dir= df_catchquit; return tokv_word_catchquit; }
1299 { lr_dir= df_errorspush; return tokv_word_errorspush; }
1304 { lr_controlend= tokv_word_if; return tokv_word_elif; }
1309 { lr_controlend= tokv_word_if; return tokv_word_else; }
1314 { lr_controlend= tokv_word_if; return tokv_word_fi; }
1319 { lr_controlend= tokv_word_catchquit; return tokv_word_hctac; }
1324 { lr_controlend= tokv_word_errorspush; return tokv_word_srorre; }
1329 { lr_parmcond= pcf_glob; return tokv_word_glob; }
1334 { lr_parmcond= pcf_range; return tokv_word_range; }
1339 { lr_parmcond= pcf_grep; return tokv_word_grep; }
1344 { lr_bispa= bispa_none; lr_bisexec= bisexec_environment; return tokv_word_environment; }
1349 { lr_bispa= bispa_parameter; lr_bisexec= bisexec_parameter; return tokv_word_parameter; }
1354 { lr_bispa= bispa_none; lr_bisexec= bisexec_version; return tokv_word_version; }
1359 { lr_bispa= bispa_none; lr_bisexec= bisexec_toplevel; return tokv_word_toplevel; }
1364 { lr_bispa= bispa_none; lr_bisexec= bisexec_override; return tokv_word_override; }
1369 { lr_bispa= bispa_none; lr_bisexec= bisexec_shutdown; return tokv_word_shutdown; }
1374 { lr_bispa= bispa_none; lr_bisexec= bisexec_reset; lr_dir= df_reset; return tokv_word_reset; }
1379 { lr_bispa= bispa_none; lr_bisexec= bisexec_execute; lr_dir= df_execute; return tokv_word_execute; }
1384 { lr_bispa= bispa_none; lr_bisexec= bisexec_help; return tokv_word_help; }
1389 { lr_parameter= pf_service; return tokv_word_service; }
1394 { lr_parameter= pf_callinguser; return tokv_word_callinguser; }
1399 { lr_parameter= pf_callinggroup; return tokv_word_callinggroup; }
1404 { lr_parameter= pf_callingusershell; return tokv_word_callingusershell; }
1409 { lr_parameter= pf_serviceuser; return tokv_word_serviceuser; }
1414 { lr_parameter= pf_servicegroup; return tokv_word_servicegroup; }
1419 { lr_parameter= pf_serviceusershell; return tokv_word_serviceusershell; }
1424 { lr_loglevel= LOG_DEBUG; return tokv_syslog_debug; }
1429 { lr_loglevel= LOG_INFO; return tokv_syslog_info; }
1434 { lr_loglevel= LOG_NOTICE; return tokv_syslog_notice; }
1439 { lr_loglevel= LOG_WARNING; return tokv_syslog_warning; }
1444 { lr_loglevel= LOG_ERR; return tokv_syslog_err; }
1449 { lr_loglevel= LOG_CRIT; return tokv_syslog_crit; }
1454 { lr_loglevel= LOG_ALERT; return tokv_syslog_alert; }
1459 { lr_loglevel= LOG_EMERG; return tokv_syslog_emerg; }
1464 { lr_logfacility= LOG_AUTHPRIV; return tokv_syslog_authpriv; }
1469 { lr_logfacility= LOG_CRON; return tokv_syslog_cron; }
1474 { lr_logfacility= LOG_DAEMON; return tokv_syslog_daemon; }
1479 { lr_logfacility= LOG_KERN; return tokv_syslog_kern; }
1484 { lr_logfacility= LOG_LPR; return tokv_syslog_lpr; }
1489 { lr_logfacility= LOG_MAIL; return tokv_syslog_mail; }
1494 { lr_logfacility= LOG_NEWS; return tokv_syslog_news; }
1499 { lr_logfacility= LOG_SYSLOG; return tokv_syslog_syslog; }
1504 { lr_logfacility= LOG_USER; return tokv_syslog_user; }
1509 { lr_logfacility= LOG_UUCP; return tokv_syslog_uucp; }
1514 { lr_logfacility= LOG_LOCAL0; return tokv_syslog_local0; }
1519 { lr_logfacility= LOG_LOCAL1; return tokv_syslog_local1; }
1524 { lr_logfacility= LOG_LOCAL2; return tokv_syslog_local2; }
1529 { lr_logfacility= LOG_LOCAL3; return tokv_syslog_local3; }
1534 { lr_logfacility= LOG_LOCAL4; return tokv_syslog_local4; }
1539 { lr_logfacility= LOG_LOCAL5; return tokv_syslog_local5; }
1544 { lr_logfacility= LOG_LOCAL6; return tokv_syslog_local6; }
1549 { lr_logfacility= LOG_LOCAL7; return tokv_syslog_local7; }
1554 { return tokv_word_read; }
1559 { return tokv_word_write; }
1564 { return tokv_dollar; }
1569 { return tokv_openparen; }
1574 { return tokv_closeparen; }
1579 { return tokv_not; }
1584 { return tokv_and; }
1594 { lr_dir= df_error; lr_loglevel= LOG_ERR; return tokv_word_error; }
1601 lr_min=lr_max= (int)strtoul(yytext,&ep,10);
1603 return tokv_ordinal;
1611 lr_min= (int)strtoul(yytext,&ep,10);
1612 assert(*ep == HYPHEN);
1614 lr_max= (int)strtoul(ep,&ep,10);
1616 if (lr_max < lr_min) {
1617 parseerrprint("fd range has min > max");
1620 return tokv_fdrange;
1628 lr_min= (int)strtoul(yytext,&ep,10);
1629 assert(*ep == HYPHEN);
1632 return tokv_fdstoend;
1648 cstate->lineno++; return tokv_newline;
1653 cstate->lineno++; return tokv_newline;
1659 parseerrprint("missing newline at eof after comment");
1667 return dequote(yytext);
1674 parseerrprint("misquoted or unterminated string");
1681 return tokv_barestring;
1683 case YY_STATE_EOF(INITIAL):
1693 case YY_END_OF_BUFFER:
1695 /* Amount of text matched not including the EOB char. */
1696 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
1698 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1699 *yy_cp = yy_hold_char;
1700 YY_RESTORE_YY_MORE_OFFSET
1702 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
1704 /* We're scanning a new file or input source. It's
1705 * possible that this happened because the user
1706 * just pointed yyin at a new source and called
1707 * yylex(). If so, then we have to assure
1708 * consistency between yy_current_buffer and our
1709 * globals. Here is the right place to do so, because
1710 * this is the first action (other than possibly a
1711 * back-up) that will match for the new input source.
1713 yy_n_chars = yy_current_buffer->yy_n_chars;
1714 yy_current_buffer->yy_input_file = yyin;
1715 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
1718 /* Note that here we test for yy_c_buf_p "<=" to the position
1719 * of the first EOB in the buffer, since yy_c_buf_p will
1720 * already have been incremented past the NUL character
1721 * (since all states make transitions on EOB to the
1722 * end-of-buffer state). Contrast this with the test
1725 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1726 { /* This was really a NUL. */
1727 yy_state_type yy_next_state;
1729 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
1731 yy_current_state = yy_get_previous_state();
1733 /* Okay, we're now positioned to make the NUL
1734 * transition. We couldn't have
1735 * yy_get_previous_state() go ahead and do it
1736 * for us because it doesn't know how to deal
1737 * with the possibility of jamming (and we don't
1738 * want to build jamming into it because then it
1739 * will run more slowly).
1742 yy_next_state = yy_try_NUL_trans( yy_current_state );
1744 yy_bp = yytext_ptr + YY_MORE_ADJ;
1746 if ( yy_next_state )
1748 /* Consume the NUL. */
1749 yy_cp = ++yy_c_buf_p;
1750 yy_current_state = yy_next_state;
1757 goto yy_find_action;
1761 else switch ( yy_get_next_buffer() )
1763 case EOB_ACT_END_OF_FILE:
1765 yy_did_buffer_switch_on_eof = 0;
1769 /* Note: because we've taken care in
1770 * yy_get_next_buffer() to have set up
1771 * yytext, we can now set up
1772 * yy_c_buf_p so that if some total
1773 * hoser (like flex itself) wants to
1774 * call the scanner after we return the
1775 * YY_NULL, it'll still work - another
1776 * YY_NULL will get returned.
1778 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1780 yy_act = YY_STATE_EOF(YY_START);
1786 if ( ! yy_did_buffer_switch_on_eof )
1792 case EOB_ACT_CONTINUE_SCAN:
1794 yytext_ptr + yy_amount_of_matched_text;
1796 yy_current_state = yy_get_previous_state();
1799 yy_bp = yytext_ptr + YY_MORE_ADJ;
1802 case EOB_ACT_LAST_MATCH:
1804 &yy_current_buffer->yy_ch_buf[yy_n_chars];
1806 yy_current_state = yy_get_previous_state();
1809 yy_bp = yytext_ptr + YY_MORE_ADJ;
1810 goto yy_find_action;
1817 "fatal flex scanner internal error--no action found" );
1818 } /* end of action switch */
1819 } /* end of scanning one token */
1820 } /* end of yylex */
1823 /* yy_get_next_buffer - try to read in a new buffer
1825 * Returns a code representing an action:
1826 * EOB_ACT_LAST_MATCH -
1827 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1828 * EOB_ACT_END_OF_FILE - end of file
1831 static int yy_get_next_buffer()
1833 register char *dest = yy_current_buffer->yy_ch_buf;
1834 register char *source = yytext_ptr;
1835 register int number_to_move, i;
1838 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
1840 "fatal flex scanner internal error--end of buffer missed" );
1842 if ( yy_current_buffer->yy_fill_buffer == 0 )
1843 { /* Don't try to fill the buffer, so this is an EOF. */
1844 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
1846 /* We matched a single character, the EOB, so
1847 * treat this as a final EOF.
1849 return EOB_ACT_END_OF_FILE;
1854 /* We matched some text prior to the EOB, first
1857 return EOB_ACT_LAST_MATCH;
1861 /* Try to read more data. */
1863 /* First move last chars to start of buffer. */
1864 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
1866 for ( i = 0; i < number_to_move; ++i )
1867 *(dest++) = *(source++);
1869 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1870 /* don't do the read, it's not guaranteed to return an EOF,
1873 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
1878 yy_current_buffer->yy_buf_size - number_to_move - 1;
1880 while ( num_to_read <= 0 )
1881 { /* Not enough room in the buffer - grow it. */
1882 #ifdef YY_USES_REJECT
1884 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1887 /* just a shorter name for the current buffer */
1888 YY_BUFFER_STATE b = yy_current_buffer;
1890 int yy_c_buf_p_offset =
1891 (int) (yy_c_buf_p - b->yy_ch_buf);
1893 if ( b->yy_is_our_buffer )
1895 int new_size = b->yy_buf_size * 2;
1897 if ( new_size <= 0 )
1898 b->yy_buf_size += b->yy_buf_size / 8;
1900 b->yy_buf_size *= 2;
1902 b->yy_ch_buf = (char *)
1903 /* Include room in for 2 EOB chars. */
1904 yy_flex_realloc( (void *) b->yy_ch_buf,
1905 b->yy_buf_size + 2 );
1908 /* Can't grow it, we don't own it. */
1911 if ( ! b->yy_ch_buf )
1913 "fatal error - scanner input buffer overflow" );
1915 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1917 num_to_read = yy_current_buffer->yy_buf_size -
1922 if ( num_to_read > YY_READ_BUF_SIZE )
1923 num_to_read = YY_READ_BUF_SIZE;
1925 /* Read in more data. */
1926 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1927 yy_n_chars, num_to_read );
1929 yy_current_buffer->yy_n_chars = yy_n_chars;
1932 if ( yy_n_chars == 0 )
1934 if ( number_to_move == YY_MORE_ADJ )
1936 ret_val = EOB_ACT_END_OF_FILE;
1942 ret_val = EOB_ACT_LAST_MATCH;
1943 yy_current_buffer->yy_buffer_status =
1944 YY_BUFFER_EOF_PENDING;
1949 ret_val = EOB_ACT_CONTINUE_SCAN;
1951 yy_n_chars += number_to_move;
1952 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1953 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1955 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1961 /* yy_get_previous_state - get the state just before the EOB char was reached */
1963 static yy_state_type yy_get_previous_state()
1965 register yy_state_type yy_current_state;
1966 register char *yy_cp;
1968 yy_current_state = yy_start;
1970 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1972 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1973 if ( yy_accept[yy_current_state] )
1975 yy_last_accepting_state = yy_current_state;
1976 yy_last_accepting_cpos = yy_cp;
1978 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1980 yy_current_state = (int) yy_def[yy_current_state];
1981 if ( yy_current_state >= 578 )
1982 yy_c = yy_meta[(unsigned int) yy_c];
1984 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1987 return yy_current_state;
1991 /* yy_try_NUL_trans - try to make a transition on the NUL character
1994 * next_state = yy_try_NUL_trans( current_state );
1997 #ifdef YY_USE_PROTOS
1998 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
2000 static yy_state_type yy_try_NUL_trans( yy_current_state )
2001 yy_state_type yy_current_state;
2004 register int yy_is_jam;
2005 register char *yy_cp = yy_c_buf_p;
2007 register YY_CHAR yy_c = 1;
2008 if ( yy_accept[yy_current_state] )
2010 yy_last_accepting_state = yy_current_state;
2011 yy_last_accepting_cpos = yy_cp;
2013 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2015 yy_current_state = (int) yy_def[yy_current_state];
2016 if ( yy_current_state >= 578 )
2017 yy_c = yy_meta[(unsigned int) yy_c];
2019 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2020 yy_is_jam = (yy_current_state == 577);
2022 return yy_is_jam ? 0 : yy_current_state;
2027 #ifdef YY_USE_PROTOS
2028 static void yyunput( int c, register char *yy_bp )
2030 static void yyunput( c, yy_bp )
2032 register char *yy_bp;
2035 register char *yy_cp = yy_c_buf_p;
2037 /* undo effects of setting up yytext */
2038 *yy_cp = yy_hold_char;
2040 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2041 { /* need to shift things up to make room */
2042 /* +2 for EOB chars. */
2043 register int number_to_move = yy_n_chars + 2;
2044 register char *dest = &yy_current_buffer->yy_ch_buf[
2045 yy_current_buffer->yy_buf_size + 2];
2046 register char *source =
2047 &yy_current_buffer->yy_ch_buf[number_to_move];
2049 while ( source > yy_current_buffer->yy_ch_buf )
2050 *--dest = *--source;
2052 yy_cp += (int) (dest - source);
2053 yy_bp += (int) (dest - source);
2054 yy_current_buffer->yy_n_chars =
2055 yy_n_chars = yy_current_buffer->yy_buf_size;
2057 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2058 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2061 *--yy_cp = (char) c;
2065 yy_hold_char = *yy_cp;
2068 #endif /* ifndef YY_NO_UNPUT */
2072 static int yyinput()
2079 *yy_c_buf_p = yy_hold_char;
2081 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
2083 /* yy_c_buf_p now points to the character we want to return.
2084 * If this occurs *before* the EOB characters, then it's a
2085 * valid NUL; if not, then we've hit the end of the buffer.
2087 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
2088 /* This was really a NUL. */
2092 { /* need more input */
2093 int offset = yy_c_buf_p - yytext_ptr;
2096 switch ( yy_get_next_buffer() )
2098 case EOB_ACT_LAST_MATCH:
2099 /* This happens because yy_g_n_b()
2100 * sees that we've accumulated a
2101 * token and flags that we need to
2102 * try matching the token before
2103 * proceeding. But for input(),
2104 * there's no matching to consider.
2105 * So convert the EOB_ACT_LAST_MATCH
2106 * to EOB_ACT_END_OF_FILE.
2109 /* Reset buffer status. */
2114 case EOB_ACT_END_OF_FILE:
2119 if ( ! yy_did_buffer_switch_on_eof )
2128 case EOB_ACT_CONTINUE_SCAN:
2129 yy_c_buf_p = yytext_ptr + offset;
2135 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
2136 *yy_c_buf_p = '\0'; /* preserve yytext */
2137 yy_hold_char = *++yy_c_buf_p;
2144 #ifdef YY_USE_PROTOS
2145 void yyrestart( FILE *input_file )
2147 void yyrestart( input_file )
2151 if ( ! yy_current_buffer )
2152 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
2154 yy_init_buffer( yy_current_buffer, input_file );
2155 yy_load_buffer_state();
2159 #ifdef YY_USE_PROTOS
2160 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
2162 void yy_switch_to_buffer( new_buffer )
2163 YY_BUFFER_STATE new_buffer;
2166 if ( yy_current_buffer == new_buffer )
2169 if ( yy_current_buffer )
2171 /* Flush out information for old buffer. */
2172 *yy_c_buf_p = yy_hold_char;
2173 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
2174 yy_current_buffer->yy_n_chars = yy_n_chars;
2177 yy_current_buffer = new_buffer;
2178 yy_load_buffer_state();
2180 /* We don't actually know whether we did this switch during
2181 * EOF (yywrap()) processing, but the only time this flag
2182 * is looked at is after yywrap() is called, so it's safe
2183 * to go ahead and always set it.
2185 yy_did_buffer_switch_on_eof = 1;
2189 #ifdef YY_USE_PROTOS
2190 void yy_load_buffer_state( void )
2192 void yy_load_buffer_state()
2195 yy_n_chars = yy_current_buffer->yy_n_chars;
2196 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
2197 yyin = yy_current_buffer->yy_input_file;
2198 yy_hold_char = *yy_c_buf_p;
2202 #ifdef YY_USE_PROTOS
2203 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
2205 YY_BUFFER_STATE yy_create_buffer( file, size )
2212 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2214 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2216 b->yy_buf_size = size;
2218 /* yy_ch_buf has to be 2 characters longer than the size given because
2219 * we need to put in 2 end-of-buffer characters.
2221 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
2222 if ( ! b->yy_ch_buf )
2223 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2225 b->yy_is_our_buffer = 1;
2227 yy_init_buffer( b, file );
2233 #ifdef YY_USE_PROTOS
2234 void yy_delete_buffer( YY_BUFFER_STATE b )
2236 void yy_delete_buffer( b )
2243 if ( b == yy_current_buffer )
2244 yy_current_buffer = (YY_BUFFER_STATE) 0;
2246 if ( b->yy_is_our_buffer )
2247 yy_flex_free( (void *) b->yy_ch_buf );
2249 yy_flex_free( (void *) b );
2253 #ifndef YY_ALWAYS_INTERACTIVE
2254 #ifndef YY_NEVER_INTERACTIVE
2255 extern int isatty YY_PROTO(( int ));
2259 #ifdef YY_USE_PROTOS
2260 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
2262 void yy_init_buffer( b, file )
2269 yy_flush_buffer( b );
2271 b->yy_input_file = file;
2272 b->yy_fill_buffer = 1;
2274 #if YY_ALWAYS_INTERACTIVE
2275 b->yy_is_interactive = 1;
2277 #if YY_NEVER_INTERACTIVE
2278 b->yy_is_interactive = 0;
2280 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2286 #ifdef YY_USE_PROTOS
2287 void yy_flush_buffer( YY_BUFFER_STATE b )
2289 void yy_flush_buffer( b )
2299 /* We always need two end-of-buffer characters. The first causes
2300 * a transition to the end-of-buffer state. The second causes
2301 * a jam in that state.
2303 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2304 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2306 b->yy_buf_pos = &b->yy_ch_buf[0];
2309 b->yy_buffer_status = YY_BUFFER_NEW;
2311 if ( b == yy_current_buffer )
2312 yy_load_buffer_state();
2316 #ifndef YY_NO_SCAN_BUFFER
2317 #ifdef YY_USE_PROTOS
2318 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
2320 YY_BUFFER_STATE yy_scan_buffer( base, size )
2328 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2329 base[size-1] != YY_END_OF_BUFFER_CHAR )
2330 /* They forgot to leave room for the EOB's. */
2333 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2335 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2337 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2338 b->yy_buf_pos = b->yy_ch_buf = base;
2339 b->yy_is_our_buffer = 0;
2340 b->yy_input_file = 0;
2341 b->yy_n_chars = b->yy_buf_size;
2342 b->yy_is_interactive = 0;
2344 b->yy_fill_buffer = 0;
2345 b->yy_buffer_status = YY_BUFFER_NEW;
2347 yy_switch_to_buffer( b );
2354 #ifndef YY_NO_SCAN_STRING
2355 #ifdef YY_USE_PROTOS
2356 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
2358 YY_BUFFER_STATE yy_scan_string( yy_str )
2359 yyconst char *yy_str;
2363 for ( len = 0; yy_str[len]; ++len )
2366 return yy_scan_bytes( yy_str, len );
2371 #ifndef YY_NO_SCAN_BYTES
2372 #ifdef YY_USE_PROTOS
2373 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
2375 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
2376 yyconst char *bytes;
2385 /* Get memory for full buffer, including space for trailing EOB's. */
2387 buf = (char *) yy_flex_alloc( n );
2389 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2391 for ( i = 0; i < len; ++i )
2394 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
2396 b = yy_scan_buffer( buf, n );
2398 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2400 /* It's okay to grow etc. this buffer, and we should throw it
2401 * away when we're done.
2403 b->yy_is_our_buffer = 1;
2410 #ifndef YY_NO_PUSH_STATE
2411 #ifdef YY_USE_PROTOS
2412 static void yy_push_state( int new_state )
2414 static void yy_push_state( new_state )
2418 if ( yy_start_stack_ptr >= yy_start_stack_depth )
2422 yy_start_stack_depth += YY_START_STACK_INCR;
2423 new_size = yy_start_stack_depth * sizeof( int );
2425 if ( ! yy_start_stack )
2426 yy_start_stack = (int *) yy_flex_alloc( new_size );
2429 yy_start_stack = (int *) yy_flex_realloc(
2430 (void *) yy_start_stack, new_size );
2432 if ( ! yy_start_stack )
2434 "out of memory expanding start-condition stack" );
2437 yy_start_stack[yy_start_stack_ptr++] = YY_START;
2444 #ifndef YY_NO_POP_STATE
2445 static void yy_pop_state()
2447 if ( --yy_start_stack_ptr < 0 )
2448 YY_FATAL_ERROR( "start-condition stack underflow" );
2450 BEGIN(yy_start_stack[yy_start_stack_ptr]);
2455 #ifndef YY_NO_TOP_STATE
2456 static int yy_top_state()
2458 return yy_start_stack[yy_start_stack_ptr - 1];
2462 #ifndef YY_EXIT_FAILURE
2463 #define YY_EXIT_FAILURE 2
2466 #ifdef YY_USE_PROTOS
2467 static void yy_fatal_error( yyconst char msg[] )
2469 static void yy_fatal_error( msg )
2473 (void) fprintf( stderr, "%s\n", msg );
2474 exit( YY_EXIT_FAILURE );
2479 /* Redefine yyless() so it works in section 3 code. */
2485 /* Undo effects of setting up yytext. */ \
2486 yytext[yyleng] = yy_hold_char; \
2487 yy_c_buf_p = yytext + n; \
2488 yy_hold_char = *yy_c_buf_p; \
2489 *yy_c_buf_p = '\0'; \
2495 /* Internal utility routines. */
2498 #ifdef YY_USE_PROTOS
2499 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
2501 static void yy_flex_strncpy( s1, s2, n )
2508 for ( i = 0; i < n; ++i )
2513 #ifdef YY_NEED_STRLEN
2514 #ifdef YY_USE_PROTOS
2515 static int yy_flex_strlen( yyconst char *s )
2517 static int yy_flex_strlen( s )
2522 for ( n = 0; s[n]; ++n )
2530 #ifdef YY_USE_PROTOS
2531 static void *yy_flex_alloc( yy_size_t size )
2533 static void *yy_flex_alloc( size )
2537 return (void *) malloc( size );
2540 #ifdef YY_USE_PROTOS
2541 static void *yy_flex_realloc( void *ptr, yy_size_t size )
2543 static void *yy_flex_realloc( ptr, size )
2548 /* The cast to (char *) in the following accommodates both
2549 * implementations that use char* generic pointers, and those
2550 * that use void* generic pointers. It works with the latter
2551 * because both ANSI C and C++ allow castless assignment from
2552 * any pointer type to void*, and deal with argument conversions
2553 * as though doing an assignment.
2555 return (void *) realloc( (char *) ptr, size );
2558 #ifdef YY_USE_PROTOS
2559 static void yy_flex_free( void *ptr )
2561 static void yy_flex_free( ptr )
2578 const char *const builtinservicehelpstrings[]= {
2580 "parameter <parameter>",