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" */
29 /* Use prototypes in function declarations. */
32 /* The "const" storage-class-modifier is valid. */
35 #else /* ! __cplusplus */
43 #endif /* ! __cplusplus */
62 #define YY_PROTO(proto) proto
64 #define YY_PROTO(proto) ()
67 /* Returned upon end-of-file. */
70 /* Promotes a possibly negative, possibly signed char to an unsigned
71 * integer for use as an array index. If the signed char is negative,
72 * we want to instead treat it as an 8-bit unsigned char, hence the
75 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
77 /* Enter a start condition. This macro really ought to take a parameter,
78 * but we do it the disgusting crufty way forced on us by the ()-less
79 * definition of BEGIN.
81 #define BEGIN yy_start = 1 + 2 *
83 /* Translate the current start state into a value that can be later handed
84 * to BEGIN to return to the state. The YYSTATE alias is for lex
87 #define YY_START ((yy_start - 1) / 2)
88 #define YYSTATE YY_START
90 /* Action number for EOF rule of a given start state. */
91 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
93 /* Special action meaning "start processing a new file". */
94 #define YY_NEW_FILE yyrestart( yyin )
96 #define YY_END_OF_BUFFER_CHAR 0
98 /* Size of default input buffer. */
99 #define YY_BUF_SIZE 16384
101 typedef struct yy_buffer_state *YY_BUFFER_STATE;
104 extern FILE *yyin, *yyout;
106 #define EOB_ACT_CONTINUE_SCAN 0
107 #define EOB_ACT_END_OF_FILE 1
108 #define EOB_ACT_LAST_MATCH 2
110 /* The funky do-while in the following #define is used to turn the definition
111 * int a single C statement (which needs a semi-colon terminator). This
112 * avoids problems with code like:
114 * if ( condition_holds )
117 * do_something_else();
119 * Prior to using the do-while the compiler would get upset at the
120 * "else" because it interpreted the "if" statement as being all
121 * done when it reached the ';' after the yyless() call.
124 /* Return all but the first 'n' matched characters back to the input stream. */
129 /* Undo effects of setting up yytext. */ \
130 *yy_cp = yy_hold_char; \
131 YY_RESTORE_YY_MORE_OFFSET \
132 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
133 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
137 #define unput(c) yyunput( c, yytext_ptr )
139 /* The following is because we cannot portably get our hands on size_t
140 * (without autoconf's help, which isn't available because we want
141 * flex-generated scanners to compile on their own).
143 typedef unsigned int yy_size_t;
146 struct yy_buffer_state
150 char *yy_ch_buf; /* input buffer */
151 char *yy_buf_pos; /* current position in input buffer */
153 /* Size of input buffer in bytes, not including room for EOB
156 yy_size_t yy_buf_size;
158 /* Number of characters read into yy_ch_buf, not including EOB
163 /* Whether we "own" the buffer - i.e., we know we created it,
164 * and can realloc() it to grow it, and should free() it to
167 int yy_is_our_buffer;
169 /* Whether this is an "interactive" input source; if so, and
170 * if we're using stdio for input, then we want to use getc()
171 * instead of fread(), to make sure we stop fetching input after
174 int yy_is_interactive;
176 /* Whether we're considered to be at the beginning of a line.
177 * If so, '^' rules will be active on the next match, otherwise
182 /* Whether to try to fill the input buffer when we reach the
187 int yy_buffer_status;
188 #define YY_BUFFER_NEW 0
189 #define YY_BUFFER_NORMAL 1
190 /* When an EOF's been seen but there's still some text to process
191 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
192 * shouldn't try reading from the input source any more. We might
193 * still have a bunch of tokens to match, though, because of
194 * possible backing-up.
196 * When we actually see the EOF, we change the status to "new"
197 * (via yyrestart()), so that the user can continue scanning by
198 * just pointing yyin at a new input file.
200 #define YY_BUFFER_EOF_PENDING 2
203 static YY_BUFFER_STATE yy_current_buffer = 0;
205 /* We provide macros for accessing buffer states in case in the
206 * future we want to put the buffer states in a more general
209 #define YY_CURRENT_BUFFER yy_current_buffer
212 /* yy_hold_char holds the character lost when yytext is formed. */
213 static char yy_hold_char;
215 static int yy_n_chars; /* number of characters read into yy_ch_buf */
220 /* Points to current character in buffer. */
221 static char *yy_c_buf_p = (char *) 0;
222 static int yy_init = 1; /* whether we need to initialize */
223 static int yy_start = 0; /* start state number */
225 /* Flag which is used to allow yywrap()'s to do buffer switches
226 * instead of setting up a fresh yyin. A bit of a hack ...
228 static int yy_did_buffer_switch_on_eof;
230 void yyrestart YY_PROTO(( FILE *input_file ));
232 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
233 void yy_load_buffer_state YY_PROTO(( void ));
234 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
235 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
236 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
237 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
238 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
240 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
241 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
242 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
244 static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
245 static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
246 static void yy_flex_free YY_PROTO(( void * ));
248 #define yy_new_buffer yy_create_buffer
250 #define yy_set_interactive(is_interactive) \
252 if ( ! yy_current_buffer ) \
253 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
254 yy_current_buffer->yy_is_interactive = is_interactive; \
257 #define yy_set_bol(at_bol) \
259 if ( ! yy_current_buffer ) \
260 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
261 yy_current_buffer->yy_at_bol = at_bol; \
264 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
266 typedef unsigned char YY_CHAR;
267 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
268 typedef int yy_state_type;
270 #define yytext_ptr yytext
272 static yy_state_type yy_get_previous_state YY_PROTO(( void ));
273 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
274 static int yy_get_next_buffer YY_PROTO(( void ));
275 static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
277 /* Done after the current pattern has been matched and before the
278 * corresponding action - sets up yytext.
280 #define YY_DO_BEFORE_ACTION \
281 yytext_ptr = yy_bp; \
282 yyleng = (int) (yy_cp - yy_bp); \
283 yy_hold_char = *yy_cp; \
287 #define YY_NUM_RULES 19
288 #define YY_END_OF_BUFFER 20
289 static yyconst short int yy_accept[55] =
291 0, 0, 7, 7, 20, 18, 11, 1, 15, 10,
292 19, 16, 2, 18, 18, 3, 4, 18, 8, 7,
293 19, 18, 11, 15, 10, 0, 0, 17, 16, 18,
294 18, 18, 8, 7, 13, 0, 0, 17, 18, 18,
295 18, 0, 12, 18, 5, 18, 0, 9, 18, 14,
299 static yyconst int yy_ec[256] =
301 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
302 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
303 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
304 1, 2, 1, 4, 5, 6, 1, 1, 7, 1,
305 1, 1, 1, 1, 8, 9, 1, 10, 10, 10,
306 10, 10, 10, 10, 10, 10, 10, 11, 1, 1,
307 1, 1, 1, 1, 1, 1, 12, 13, 14, 1,
308 15, 1, 16, 1, 1, 17, 1, 18, 19, 20,
309 1, 21, 1, 1, 22, 1, 1, 1, 1, 1,
310 1, 23, 1, 1, 1, 1, 24, 24, 1, 1,
312 25, 24, 15, 1, 1, 1, 1, 1, 1, 24,
313 19, 20, 1, 26, 1, 24, 27, 24, 1, 1,
314 1, 1, 28, 1, 29, 1, 1, 1, 1, 1,
315 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
316 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
317 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
318 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
319 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
320 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
321 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
323 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
324 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
325 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
326 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
327 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
331 static yyconst int yy_meta[30] =
333 1, 2, 3, 4, 5, 1, 6, 1, 1, 7,
334 5, 1, 1, 1, 1, 1, 1, 1, 1, 1,
335 1, 1, 7, 7, 1, 7, 1, 1, 1
338 static yyconst short int yy_base[62] =
340 0, 100, 28, 30, 105, 0, 102, 107, 0, 0,
341 80, 25, 107, 15, 23, 0, 0, 86, 0, 99,
342 107, 0, 98, 0, 0, 92, 32, 88, 34, 78,
343 24, 78, 0, 87, 107, 78, 75, 65, 18, 25,
344 57, 54, 107, 43, 0, 45, 54, 0, 38, 107,
345 37, 33, 0, 107, 51, 58, 65, 72, 79, 86,
349 static yyconst short int yy_def[62] =
351 54, 1, 55, 55, 54, 56, 54, 54, 57, 58,
352 59, 56, 54, 56, 56, 56, 56, 56, 60, 54,
353 54, 56, 54, 57, 58, 54, 61, 56, 56, 56,
354 56, 56, 60, 54, 54, 54, 54, 56, 56, 56,
355 56, 54, 54, 56, 56, 56, 54, 56, 56, 54,
356 56, 56, 56, 0, 54, 54, 54, 54, 54, 54,
360 static yyconst short int yy_nxt[137] =
362 6, 7, 8, 9, 10, 6, 11, 12, 6, 12,
363 13, 6, 6, 6, 14, 6, 6, 6, 6, 15,
364 6, 6, 6, 6, 6, 6, 6, 16, 17, 20,
365 21, 20, 21, 28, 29, 30, 31, 40, 35, 44,
366 30, 36, 28, 29, 44, 45, 53, 31, 40, 52,
367 45, 19, 19, 19, 19, 19, 19, 19, 22, 51,
368 50, 49, 48, 47, 22, 24, 24, 24, 46, 24,
369 24, 24, 25, 25, 38, 25, 25, 25, 25, 26,
370 26, 43, 26, 26, 26, 26, 33, 42, 34, 33,
371 33, 33, 33, 37, 37, 41, 39, 38, 35, 23,
373 34, 32, 27, 23, 54, 18, 5, 54, 54, 54,
374 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
375 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
376 54, 54, 54, 54, 54, 54
379 static yyconst short int yy_chk[137] =
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, 3,
384 3, 4, 4, 12, 12, 14, 15, 31, 27, 39,
385 14, 27, 29, 29, 39, 40, 52, 15, 31, 51,
386 40, 55, 55, 55, 55, 55, 55, 55, 56, 49,
387 47, 46, 44, 42, 56, 57, 57, 57, 41, 57,
388 57, 57, 58, 58, 38, 58, 58, 58, 58, 59,
389 59, 37, 59, 59, 59, 59, 60, 36, 34, 60,
390 60, 60, 60, 61, 61, 32, 30, 28, 26, 23,
392 20, 18, 11, 7, 5, 2, 54, 54, 54, 54,
393 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
394 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
395 54, 54, 54, 54, 54, 54
398 static yy_state_type yy_last_accepting_state;
399 static char *yy_last_accepting_cpos;
401 /* The intent behind this definition is that it'll catch
402 * any uses of REJECT which flex missed.
404 #define REJECT reject_used_but_not_detected
405 #define yymore() yymore_used_but_not_detected
406 #define YY_MORE_ADJ 0
407 #define YY_RESTORE_YY_MORE_OFFSET
409 #line 1 "configfile.l"
411 #line 2 "configfile.l"
412 /* $Id: config_l.c 6145 2003-01-19 19:42:22Z rra $
414 ** A flex input file for the innfeed config file.
416 ** Written by James Brister <brister@vix.com>
428 #include "configfile.h"
429 #include "config_y.h"
432 #if ! defined (FLEX_SCANNER)
433 #error "You must use FLEX to process the lex input file."
436 #if defined (FLEX_DEBUG)
437 #define YY_USER_INIT yy_flex_debug = (getenv ("YYDEBUG") == NULL ? 0 : 1)
440 /* We never use this function but flex always defines it, so silence the
441 warnings about it. */
442 static void yyunput(int, char *) UNUSED;
451 static void strAppend (int ch);
452 static void strAppend (int ch)
454 if (strIdx == strPtrLen)
457 strPtr = xmalloc (strPtrLen = 50) ;
459 strPtr = xrealloc (strPtr,strPtrLen += 10) ;
461 strPtr [strIdx++] = ch ;
464 #define MAX_INCLUDE_DEPTH 11
466 YY_BUFFER_STATE state;
468 } include_stack[MAX_INCLUDE_DEPTH];
469 int include_stack_ptr = 0;
475 /* Macros after this point can all be overridden by user definitions in
479 #ifndef YY_SKIP_YYWRAP
481 extern "C" int yywrap YY_PROTO(( void ));
483 extern int yywrap YY_PROTO(( void ));
488 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
492 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
495 #ifdef YY_NEED_STRLEN
496 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
501 static int yyinput YY_PROTO(( void ));
503 static int input YY_PROTO(( void ));
508 static int yy_start_stack_ptr = 0;
509 static int yy_start_stack_depth = 0;
510 static int *yy_start_stack = 0;
511 #ifndef YY_NO_PUSH_STATE
512 static void yy_push_state YY_PROTO(( int new_state ));
514 #ifndef YY_NO_POP_STATE
515 static void yy_pop_state YY_PROTO(( void ));
517 #ifndef YY_NO_TOP_STATE
518 static int yy_top_state YY_PROTO(( void ));
522 #define YY_NO_PUSH_STATE 1
523 #define YY_NO_POP_STATE 1
524 #define YY_NO_TOP_STATE 1
527 #ifdef YY_MALLOC_DECL
535 /* Just try to get by without declaring the routines. This will fail
536 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
537 * or sizeof(void*) != sizeof(int).
542 /* Amount of stuff to slurp up with each read. */
543 #ifndef YY_READ_BUF_SIZE
544 #define YY_READ_BUF_SIZE 8192
547 /* Copy whatever the last rule matched to the standard output. */
550 /* This used to be an fputs(), but since the string might contain NUL's,
551 * we now use fwrite().
553 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
556 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
557 * is returned in "result".
560 #define YY_INPUT(buf,result,max_size) \
561 if ( yy_current_buffer->yy_is_interactive ) \
564 for ( n = 0; n < max_size && \
565 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
568 buf[n++] = (char) c; \
569 if ( c == EOF && ferror( yyin ) ) \
570 YY_FATAL_ERROR( "input in flex scanner failed" ); \
576 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
578 if( errno != EINTR) \
580 YY_FATAL_ERROR( "input in flex scanner failed" ); \
589 /* No semi-colon after return; correct usage is to write "yyterminate();" -
590 * we don't want an extra ';' after the "return" because that will cause
591 * some compilers to complain about unreachable statements.
594 #define yyterminate() return YY_NULL
597 /* Number of entries by which start-condition stack grows. */
598 #ifndef YY_START_STACK_INCR
599 #define YY_START_STACK_INCR 25
602 /* Report a fatal error. */
603 #ifndef YY_FATAL_ERROR
604 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
607 /* Default declaration of generated scanner - a define so the user can
608 * easily add parameters.
611 #define YY_DECL int yylex YY_PROTO(( void ))
614 /* Code executed at the beginning of each rule, after yytext and yyleng
617 #ifndef YY_USER_ACTION
618 #define YY_USER_ACTION
621 /* Code executed at the end of each rule. */
623 #define YY_BREAK break;
626 #define YY_RULE_SETUP \
628 yy_current_buffer->yy_at_bol = \
629 (yytext[yyleng - 1] == '\n'); \
634 register yy_state_type yy_current_state;
635 register char *yy_cp, *yy_bp;
638 #line 67 "configfile.l"
652 yy_start = 1; /* first start state */
660 if ( ! yy_current_buffer )
662 yy_create_buffer( yyin, YY_BUF_SIZE );
664 yy_load_buffer_state();
667 while ( 1 ) /* loops until end-of-file is reached */
671 /* Support of yytext. */
672 *yy_cp = yy_hold_char;
674 /* yy_bp points to the position in yy_ch_buf of the start of
679 yy_current_state = yy_start;
680 yy_current_state += YY_AT_BOL();
684 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
685 if ( yy_accept[yy_current_state] )
687 yy_last_accepting_state = yy_current_state;
688 yy_last_accepting_cpos = yy_cp;
690 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
692 yy_current_state = (int) yy_def[yy_current_state];
693 if ( yy_current_state >= 55 )
694 yy_c = yy_meta[(unsigned int) yy_c];
696 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
699 while ( yy_base[yy_current_state] != 107 );
702 yy_act = yy_accept[yy_current_state];
704 { /* have to back up */
705 yy_cp = yy_last_accepting_cpos;
706 yy_current_state = yy_last_accepting_state;
707 yy_act = yy_accept[yy_current_state];
713 do_action: /* This label is used only to access EOF actions. */
717 { /* beginning of action switch */
718 case 0: /* must back up */
719 /* undo the effects of YY_DO_BEFORE_ACTION */
720 *yy_cp = yy_hold_char;
721 yy_cp = yy_last_accepting_cpos;
722 yy_current_state = yy_last_accepting_state;
727 #line 69 "configfile.l"
732 #line 71 "configfile.l"
737 #line 73 "configfile.l"
738 { return (LBRACE) ; }
742 #line 75 "configfile.l"
743 { return (RBRACE) ; }
747 #line 77 "configfile.l"
752 #line 79 "configfile.l"
757 #line 81 "configfile.l"
758 /* eat the whitespace before include filename */
762 #line 83 "configfile.l"
764 if (include_stack_ptr == MAX_INCLUDE_DEPTH - 1)
767 fprintf( stderr, "Includes nested too deeply:\n" );
768 for (i = 1 ; i <= include_stack_ptr ; i++)
769 fprintf (stderr,"\t%s\n",include_stack[i].name) ;
771 syslog (LOG_ERR, "includes nested to deeply") ;
775 if ((yyin = fopen(yytext,"r")) == NULL)
777 syslog (LOG_CRIT,"include file fopen failed: %s %s",
778 yytext,strerror(errno));
779 fprintf (stderr,"include file fopen failed: %s %s\n",
780 yytext,strerror(errno));
785 d_printf (1,"Including (%d) from %s\n",
786 include_stack_ptr + 1,yytext) ;
787 include_stack[include_stack_ptr].state = YY_CURRENT_BUFFER;
788 include_stack[++include_stack_ptr].name = xstrdup (yytext) ;
789 yy_switch_to_buffer(yy_create_buffer(yyin, YY_BUF_SIZE));
795 case YY_STATE_EOF(INITIAL):
796 case YY_STATE_EOF(incl):
797 #line 115 "configfile.l"
799 if ( include_stack_ptr <= 0 )
803 free (include_stack[include_stack_ptr].name) ;
804 yy_delete_buffer(YY_CURRENT_BUFFER);
805 yy_switch_to_buffer(include_stack[--include_stack_ptr].state);
811 #line 126 "configfile.l"
816 #line 128 "configfile.l"
821 #line 130 "configfile.l"
826 #line 132 "configfile.l"
829 case '\\': yylval.chr = '\\' ; break ;
830 case 'a': yylval.chr = 007 ; break ;
831 case 'b': yylval.chr = 010 ; break ;
832 case 'f': yylval.chr = 014 ; break ;
833 case 'n': yylval.chr = 012 ; break ;
834 case 'r': yylval.chr = 015 ; break ;
835 case 't': yylval.chr = 011 ; break ;
836 case 'v': yylval.chr = 013 ; break ;
842 #line 145 "configfile.l"
843 { yylval.chr = yytext[1] ; return (CHAR) ; }
847 #line 147 "configfile.l"
848 { yylval.chr = (char)strtol(&yytext[2], (char **)NULL, 8);
853 #line 150 "configfile.l"
857 for (i = 1, strIdx = 0, sawBsl = 0 ; ; i++)
860 current = yytext [i] ;
871 strAppend (current) ;
888 strAppend (current) ;
894 yylval.string = strPtr ;
896 strPtrLen = strIdx = 0 ;
912 case 'a': strAppend (007) ; break ;
913 case 'b': strAppend (010) ; break ;
914 case 'f': strAppend (014) ; break ;
915 case 'n': strAppend (012) ; break ;
916 case 'r': strAppend (015) ; break ;
917 case 't': strAppend (011) ; break ;
918 case 'v': strAppend (013) ; break ;
923 strAppend (current) ;
927 strAppend (current) ;
941 #line 235 "configfile.l"
942 { yylval.integer = atoi (yytext) ; return (IVAL) ; }
946 #line 237 "configfile.l"
947 { yylval.real = atof (yytext) ; return (RVAL) ; }
951 #line 239 "configfile.l"
953 yylval.name = xstrdup (yytext) ;
954 if (strcasecmp (yylval.name,"false") == 0)
956 else if (strcasecmp (yylval.name,"true") == 0)
964 #line 249 "configfile.l"
969 case YY_END_OF_BUFFER:
971 /* Amount of text matched not including the EOB char. */
972 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
974 /* Undo the effects of YY_DO_BEFORE_ACTION. */
975 *yy_cp = yy_hold_char;
976 YY_RESTORE_YY_MORE_OFFSET
978 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
980 /* We're scanning a new file or input source. It's
981 * possible that this happened because the user
982 * just pointed yyin at a new source and called
983 * yylex(). If so, then we have to assure
984 * consistency between yy_current_buffer and our
985 * globals. Here is the right place to do so, because
986 * this is the first action (other than possibly a
987 * back-up) that will match for the new input source.
989 yy_n_chars = yy_current_buffer->yy_n_chars;
990 yy_current_buffer->yy_input_file = yyin;
991 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
994 /* Note that here we test for yy_c_buf_p "<=" to the position
995 * of the first EOB in the buffer, since yy_c_buf_p will
996 * already have been incremented past the NUL character
997 * (since all states make transitions on EOB to the
998 * end-of-buffer state). Contrast this with the test
1001 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1002 { /* This was really a NUL. */
1003 yy_state_type yy_next_state;
1005 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
1007 yy_current_state = yy_get_previous_state();
1009 /* Okay, we're now positioned to make the NUL
1010 * transition. We couldn't have
1011 * yy_get_previous_state() go ahead and do it
1012 * for us because it doesn't know how to deal
1013 * with the possibility of jamming (and we don't
1014 * want to build jamming into it because then it
1015 * will run more slowly).
1018 yy_next_state = yy_try_NUL_trans( yy_current_state );
1020 yy_bp = yytext_ptr + YY_MORE_ADJ;
1022 if ( yy_next_state )
1024 /* Consume the NUL. */
1025 yy_cp = ++yy_c_buf_p;
1026 yy_current_state = yy_next_state;
1033 goto yy_find_action;
1037 else switch ( yy_get_next_buffer() )
1039 case EOB_ACT_END_OF_FILE:
1041 yy_did_buffer_switch_on_eof = 0;
1045 /* Note: because we've taken care in
1046 * yy_get_next_buffer() to have set up
1047 * yytext, we can now set up
1048 * yy_c_buf_p so that if some total
1049 * hoser (like flex itself) wants to
1050 * call the scanner after we return the
1051 * YY_NULL, it'll still work - another
1052 * YY_NULL will get returned.
1054 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1056 yy_act = YY_STATE_EOF(YY_START);
1062 if ( ! yy_did_buffer_switch_on_eof )
1068 case EOB_ACT_CONTINUE_SCAN:
1070 yytext_ptr + yy_amount_of_matched_text;
1072 yy_current_state = yy_get_previous_state();
1075 yy_bp = yytext_ptr + YY_MORE_ADJ;
1078 case EOB_ACT_LAST_MATCH:
1080 &yy_current_buffer->yy_ch_buf[yy_n_chars];
1082 yy_current_state = yy_get_previous_state();
1085 yy_bp = yytext_ptr + YY_MORE_ADJ;
1086 goto yy_find_action;
1093 "fatal flex scanner internal error--no action found" );
1094 } /* end of action switch */
1095 } /* end of scanning one token */
1096 } /* end of yylex */
1099 /* yy_get_next_buffer - try to read in a new buffer
1101 * Returns a code representing an action:
1102 * EOB_ACT_LAST_MATCH -
1103 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1104 * EOB_ACT_END_OF_FILE - end of file
1107 static int yy_get_next_buffer()
1109 register char *dest = yy_current_buffer->yy_ch_buf;
1110 register char *source = yytext_ptr;
1111 register int number_to_move, i;
1114 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
1116 "fatal flex scanner internal error--end of buffer missed" );
1118 if ( yy_current_buffer->yy_fill_buffer == 0 )
1119 { /* Don't try to fill the buffer, so this is an EOF. */
1120 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
1122 /* We matched a single character, the EOB, so
1123 * treat this as a final EOF.
1125 return EOB_ACT_END_OF_FILE;
1130 /* We matched some text prior to the EOB, first
1133 return EOB_ACT_LAST_MATCH;
1137 /* Try to read more data. */
1139 /* First move last chars to start of buffer. */
1140 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
1142 for ( i = 0; i < number_to_move; ++i )
1143 *(dest++) = *(source++);
1145 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1146 /* don't do the read, it's not guaranteed to return an EOF,
1149 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
1154 yy_current_buffer->yy_buf_size - number_to_move - 1;
1156 while ( num_to_read <= 0 )
1157 { /* Not enough room in the buffer - grow it. */
1158 #ifdef YY_USES_REJECT
1160 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1163 /* just a shorter name for the current buffer */
1164 YY_BUFFER_STATE b = yy_current_buffer;
1166 int yy_c_buf_p_offset =
1167 (int) (yy_c_buf_p - b->yy_ch_buf);
1169 if ( b->yy_is_our_buffer )
1171 int new_size = b->yy_buf_size * 2;
1173 if ( new_size <= 0 )
1174 b->yy_buf_size += b->yy_buf_size / 8;
1176 b->yy_buf_size *= 2;
1178 b->yy_ch_buf = (char *)
1179 /* Include room in for 2 EOB chars. */
1180 yy_flex_realloc( (void *) b->yy_ch_buf,
1181 b->yy_buf_size + 2 );
1184 /* Can't grow it, we don't own it. */
1187 if ( ! b->yy_ch_buf )
1189 "fatal error - scanner input buffer overflow" );
1191 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1193 num_to_read = yy_current_buffer->yy_buf_size -
1198 if ( num_to_read > YY_READ_BUF_SIZE )
1199 num_to_read = YY_READ_BUF_SIZE;
1201 /* Read in more data. */
1202 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1203 yy_n_chars, num_to_read );
1205 yy_current_buffer->yy_n_chars = yy_n_chars;
1208 if ( yy_n_chars == 0 )
1210 if ( number_to_move == YY_MORE_ADJ )
1212 ret_val = EOB_ACT_END_OF_FILE;
1218 ret_val = EOB_ACT_LAST_MATCH;
1219 yy_current_buffer->yy_buffer_status =
1220 YY_BUFFER_EOF_PENDING;
1225 ret_val = EOB_ACT_CONTINUE_SCAN;
1227 yy_n_chars += number_to_move;
1228 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1229 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1231 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1237 /* yy_get_previous_state - get the state just before the EOB char was reached */
1239 static yy_state_type yy_get_previous_state()
1241 register yy_state_type yy_current_state;
1242 register char *yy_cp;
1244 yy_current_state = yy_start;
1245 yy_current_state += YY_AT_BOL();
1247 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1249 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1250 if ( yy_accept[yy_current_state] )
1252 yy_last_accepting_state = yy_current_state;
1253 yy_last_accepting_cpos = yy_cp;
1255 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1257 yy_current_state = (int) yy_def[yy_current_state];
1258 if ( yy_current_state >= 55 )
1259 yy_c = yy_meta[(unsigned int) yy_c];
1261 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1264 return yy_current_state;
1268 /* yy_try_NUL_trans - try to make a transition on the NUL character
1271 * next_state = yy_try_NUL_trans( current_state );
1274 #ifdef YY_USE_PROTOS
1275 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
1277 static yy_state_type yy_try_NUL_trans( yy_current_state )
1278 yy_state_type yy_current_state;
1281 register int yy_is_jam;
1282 register char *yy_cp = yy_c_buf_p;
1284 register YY_CHAR yy_c = 1;
1285 if ( yy_accept[yy_current_state] )
1287 yy_last_accepting_state = yy_current_state;
1288 yy_last_accepting_cpos = yy_cp;
1290 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1292 yy_current_state = (int) yy_def[yy_current_state];
1293 if ( yy_current_state >= 55 )
1294 yy_c = yy_meta[(unsigned int) yy_c];
1296 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1297 yy_is_jam = (yy_current_state == 54);
1299 return yy_is_jam ? 0 : yy_current_state;
1304 #ifdef YY_USE_PROTOS
1305 static void yyunput( int c, register char *yy_bp )
1307 static void yyunput( c, yy_bp )
1309 register char *yy_bp;
1312 register char *yy_cp = yy_c_buf_p;
1314 /* undo effects of setting up yytext */
1315 *yy_cp = yy_hold_char;
1317 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1318 { /* need to shift things up to make room */
1319 /* +2 for EOB chars. */
1320 register int number_to_move = yy_n_chars + 2;
1321 register char *dest = &yy_current_buffer->yy_ch_buf[
1322 yy_current_buffer->yy_buf_size + 2];
1323 register char *source =
1324 &yy_current_buffer->yy_ch_buf[number_to_move];
1326 while ( source > yy_current_buffer->yy_ch_buf )
1327 *--dest = *--source;
1329 yy_cp += (int) (dest - source);
1330 yy_bp += (int) (dest - source);
1331 yy_current_buffer->yy_n_chars =
1332 yy_n_chars = yy_current_buffer->yy_buf_size;
1334 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1335 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1338 *--yy_cp = (char) c;
1342 yy_hold_char = *yy_cp;
1345 #endif /* ifndef YY_NO_UNPUT */
1349 static int yyinput()
1356 *yy_c_buf_p = yy_hold_char;
1358 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1360 /* yy_c_buf_p now points to the character we want to return.
1361 * If this occurs *before* the EOB characters, then it's a
1362 * valid NUL; if not, then we've hit the end of the buffer.
1364 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1365 /* This was really a NUL. */
1369 { /* need more input */
1370 int offset = yy_c_buf_p - yytext_ptr;
1373 switch ( yy_get_next_buffer() )
1375 case EOB_ACT_LAST_MATCH:
1376 /* This happens because yy_g_n_b()
1377 * sees that we've accumulated a
1378 * token and flags that we need to
1379 * try matching the token before
1380 * proceeding. But for input(),
1381 * there's no matching to consider.
1382 * So convert the EOB_ACT_LAST_MATCH
1383 * to EOB_ACT_END_OF_FILE.
1386 /* Reset buffer status. */
1391 case EOB_ACT_END_OF_FILE:
1396 if ( ! yy_did_buffer_switch_on_eof )
1405 case EOB_ACT_CONTINUE_SCAN:
1406 yy_c_buf_p = yytext_ptr + offset;
1412 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
1413 *yy_c_buf_p = '\0'; /* preserve yytext */
1414 yy_hold_char = *++yy_c_buf_p;
1416 yy_current_buffer->yy_at_bol = (c == '\n');
1422 #ifdef YY_USE_PROTOS
1423 void yyrestart( FILE *input_file )
1425 void yyrestart( input_file )
1429 if ( ! yy_current_buffer )
1430 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1432 yy_init_buffer( yy_current_buffer, input_file );
1433 yy_load_buffer_state();
1437 #ifdef YY_USE_PROTOS
1438 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1440 void yy_switch_to_buffer( new_buffer )
1441 YY_BUFFER_STATE new_buffer;
1444 if ( yy_current_buffer == new_buffer )
1447 if ( yy_current_buffer )
1449 /* Flush out information for old buffer. */
1450 *yy_c_buf_p = yy_hold_char;
1451 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
1452 yy_current_buffer->yy_n_chars = yy_n_chars;
1455 yy_current_buffer = new_buffer;
1456 yy_load_buffer_state();
1458 /* We don't actually know whether we did this switch during
1459 * EOF (yywrap()) processing, but the only time this flag
1460 * is looked at is after yywrap() is called, so it's safe
1461 * to go ahead and always set it.
1463 yy_did_buffer_switch_on_eof = 1;
1467 #ifdef YY_USE_PROTOS
1468 void yy_load_buffer_state( void )
1470 void yy_load_buffer_state()
1473 yy_n_chars = yy_current_buffer->yy_n_chars;
1474 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
1475 yyin = yy_current_buffer->yy_input_file;
1476 yy_hold_char = *yy_c_buf_p;
1480 #ifdef YY_USE_PROTOS
1481 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
1483 YY_BUFFER_STATE yy_create_buffer( file, size )
1490 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1492 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1494 b->yy_buf_size = size;
1496 /* yy_ch_buf has to be 2 characters longer than the size given because
1497 * we need to put in 2 end-of-buffer characters.
1499 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
1500 if ( ! b->yy_ch_buf )
1501 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1503 b->yy_is_our_buffer = 1;
1505 yy_init_buffer( b, file );
1511 #ifdef YY_USE_PROTOS
1512 void yy_delete_buffer( YY_BUFFER_STATE b )
1514 void yy_delete_buffer( b )
1521 if ( b == yy_current_buffer )
1522 yy_current_buffer = (YY_BUFFER_STATE) 0;
1524 if ( b->yy_is_our_buffer )
1525 yy_flex_free( (void *) b->yy_ch_buf );
1527 yy_flex_free( (void *) b );
1534 #ifndef YY_ALWAYS_INTERACTIVE
1535 #ifndef YY_NEVER_INTERACTIVE
1536 extern int isatty YY_PROTO(( int ));
1541 #ifdef YY_USE_PROTOS
1542 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
1544 void yy_init_buffer( b, file )
1551 yy_flush_buffer( b );
1553 b->yy_input_file = file;
1554 b->yy_fill_buffer = 1;
1556 #if YY_ALWAYS_INTERACTIVE
1557 b->yy_is_interactive = 1;
1559 #if YY_NEVER_INTERACTIVE
1560 b->yy_is_interactive = 0;
1562 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1568 #ifdef YY_USE_PROTOS
1569 void yy_flush_buffer( YY_BUFFER_STATE b )
1571 void yy_flush_buffer( b )
1581 /* We always need two end-of-buffer characters. The first causes
1582 * a transition to the end-of-buffer state. The second causes
1583 * a jam in that state.
1585 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1586 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1588 b->yy_buf_pos = &b->yy_ch_buf[0];
1591 b->yy_buffer_status = YY_BUFFER_NEW;
1593 if ( b == yy_current_buffer )
1594 yy_load_buffer_state();
1598 #ifndef YY_NO_SCAN_BUFFER
1599 #ifdef YY_USE_PROTOS
1600 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
1602 YY_BUFFER_STATE yy_scan_buffer( base, size )
1610 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1611 base[size-1] != YY_END_OF_BUFFER_CHAR )
1612 /* They forgot to leave room for the EOB's. */
1615 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1617 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1619 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1620 b->yy_buf_pos = b->yy_ch_buf = base;
1621 b->yy_is_our_buffer = 0;
1622 b->yy_input_file = 0;
1623 b->yy_n_chars = b->yy_buf_size;
1624 b->yy_is_interactive = 0;
1626 b->yy_fill_buffer = 0;
1627 b->yy_buffer_status = YY_BUFFER_NEW;
1629 yy_switch_to_buffer( b );
1636 #ifndef YY_NO_SCAN_STRING
1637 #ifdef YY_USE_PROTOS
1638 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
1640 YY_BUFFER_STATE yy_scan_string( yy_str )
1641 yyconst char *yy_str;
1645 for ( len = 0; yy_str[len]; ++len )
1648 return yy_scan_bytes( yy_str, len );
1653 #ifndef YY_NO_SCAN_BYTES
1654 #ifdef YY_USE_PROTOS
1655 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
1657 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
1658 yyconst char *bytes;
1667 /* Get memory for full buffer, including space for trailing EOB's. */
1669 buf = (char *) yy_flex_alloc( n );
1671 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1673 for ( i = 0; i < len; ++i )
1676 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
1678 b = yy_scan_buffer( buf, n );
1680 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1682 /* It's okay to grow etc. this buffer, and we should throw it
1683 * away when we're done.
1685 b->yy_is_our_buffer = 1;
1692 #ifndef YY_NO_PUSH_STATE
1693 #ifdef YY_USE_PROTOS
1694 static void yy_push_state( int new_state )
1696 static void yy_push_state( new_state )
1700 if ( yy_start_stack_ptr >= yy_start_stack_depth )
1704 yy_start_stack_depth += YY_START_STACK_INCR;
1705 new_size = yy_start_stack_depth * sizeof( int );
1707 if ( ! yy_start_stack )
1708 yy_start_stack = (int *) yy_flex_alloc( new_size );
1711 yy_start_stack = (int *) yy_flex_realloc(
1712 (void *) yy_start_stack, new_size );
1714 if ( ! yy_start_stack )
1716 "out of memory expanding start-condition stack" );
1719 yy_start_stack[yy_start_stack_ptr++] = YY_START;
1726 #ifndef YY_NO_POP_STATE
1727 static void yy_pop_state()
1729 if ( --yy_start_stack_ptr < 0 )
1730 YY_FATAL_ERROR( "start-condition stack underflow" );
1732 BEGIN(yy_start_stack[yy_start_stack_ptr]);
1737 #ifndef YY_NO_TOP_STATE
1738 static int yy_top_state()
1740 return yy_start_stack[yy_start_stack_ptr - 1];
1744 #ifndef YY_EXIT_FAILURE
1745 #define YY_EXIT_FAILURE 2
1748 #ifdef YY_USE_PROTOS
1749 static void yy_fatal_error( yyconst char msg[] )
1751 static void yy_fatal_error( msg )
1755 (void) fprintf( stderr, "%s\n", msg );
1756 exit( YY_EXIT_FAILURE );
1761 /* Redefine yyless() so it works in section 3 code. */
1767 /* Undo effects of setting up yytext. */ \
1768 yytext[yyleng] = yy_hold_char; \
1769 yy_c_buf_p = yytext + n; \
1770 yy_hold_char = *yy_c_buf_p; \
1771 *yy_c_buf_p = '\0'; \
1777 /* Internal utility routines. */
1780 #ifdef YY_USE_PROTOS
1781 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
1783 static void yy_flex_strncpy( s1, s2, n )
1790 for ( i = 0; i < n; ++i )
1795 #ifdef YY_NEED_STRLEN
1796 #ifdef YY_USE_PROTOS
1797 static int yy_flex_strlen( yyconst char *s )
1799 static int yy_flex_strlen( s )
1804 for ( n = 0; s[n]; ++n )
1812 #ifdef YY_USE_PROTOS
1813 static void *yy_flex_alloc( yy_size_t size )
1815 static void *yy_flex_alloc( size )
1819 return (void *) malloc( size );
1822 #ifdef YY_USE_PROTOS
1823 static void *yy_flex_realloc( void *ptr, yy_size_t size )
1825 static void *yy_flex_realloc( ptr, size )
1830 /* The cast to (char *) in the following accommodates both
1831 * implementations that use char* generic pointers, and those
1832 * that use void* generic pointers. It works with the latter
1833 * because both ANSI C and C++ allow castless assignment from
1834 * any pointer type to void*, and deal with argument conversions
1835 * as though doing an assignment.
1837 return (void *) realloc( (char *) ptr, size );
1840 #ifdef YY_USE_PROTOS
1841 static void yy_flex_free( void *ptr )
1843 static void yy_flex_free( ptr )
1857 #line 249 "configfile.l"