1 #define yy_create_buffer IfqParser_create_buffer
2 #define yy_delete_buffer IfqParser_delete_buffer
3 #define yy_scan_buffer IfqParser_scan_buffer
4 #define yy_scan_string IfqParser_scan_string
5 #define yy_scan_bytes IfqParser_scan_bytes
6 #define yy_flex_debug IfqParser_flex_debug
7 #define yy_init_buffer IfqParser_init_buffer
8 #define yy_flush_buffer IfqParser_flush_buffer
9 #define yy_load_buffer_state IfqParser_load_buffer_state
10 #define yy_switch_to_buffer IfqParser_switch_to_buffer
11 #define yyin IfqParserin
12 #define yyleng IfqParserleng
13 #define yylex IfqParserlex
14 #define yyout IfqParserout
15 #define yyrestart IfqParserrestart
16 #define yytext IfqParsertext
18 #line 19 "ifqlexer.cc"
19 /* A lexical scanner generated by flex */
21 /* Scanner skeleton version:
22 * $Header: /cvsroot/gscpv4/src/ftacmp/ifqlexer.cc,v 1.1.1.1 2013/12/02 17:44:57 spatsch Exp $
26 #define YY_FLEX_MAJOR_VERSION 2
27 #define YY_FLEX_MINOR_VERSION 5
33 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
45 /* Use prototypes in function declarations. */
48 /* The "const" storage-class-modifier is valid. */
51 #else /* ! __cplusplus */
59 #endif /* ! __cplusplus */
78 #define YY_PROTO(proto) proto
80 #define YY_PROTO(proto) ()
83 /* Returned upon end-of-file. */
86 /* Promotes a possibly negative, possibly signed char to an unsigned
87 * integer for use as an array index. If the signed char is negative,
88 * we want to instead treat it as an 8-bit unsigned char, hence the
91 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
93 /* Enter a start condition. This macro really ought to take a parameter,
94 * but we do it the disgusting crufty way forced on us by the ()-less
95 * definition of BEGIN.
97 #define BEGIN yy_start = 1 + 2 *
99 /* Translate the current start state into a value that can be later handed
100 * to BEGIN to return to the state. The YYSTATE alias is for lex
103 #define YY_START ((yy_start - 1) / 2)
104 #define YYSTATE YY_START
106 /* Action number for EOF rule of a given start state. */
107 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
109 /* Special action meaning "start processing a new file". */
110 #define YY_NEW_FILE yyrestart( yyin )
112 #define YY_END_OF_BUFFER_CHAR 0
114 /* Size of default input buffer. */
115 #define YY_BUF_SIZE 16384
117 typedef struct yy_buffer_state *YY_BUFFER_STATE;
120 extern FILE *yyin, *yyout;
122 #define EOB_ACT_CONTINUE_SCAN 0
123 #define EOB_ACT_END_OF_FILE 1
124 #define EOB_ACT_LAST_MATCH 2
126 /* The funky do-while in the following #define is used to turn the definition
127 * int a single C statement (which needs a semi-colon terminator). This
128 * avoids problems with code like:
130 * if ( condition_holds )
133 * do_something_else();
135 * Prior to using the do-while the compiler would get upset at the
136 * "else" because it interpreted the "if" statement as being all
137 * done when it reached the ';' after the yyless() call.
140 /* Return all but the first 'n' matched characters back to the input stream. */
145 /* Undo effects of setting up yytext. */ \
146 *yy_cp = yy_hold_char; \
147 YY_RESTORE_YY_MORE_OFFSET \
148 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
149 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
153 #define unput(c) yyunput( c, yytext_ptr )
155 /* The following is because we cannot portably get our hands on size_t
156 * (without autoconf's help, which isn't available because we want
157 * flex-generated scanners to compile on their own).
159 typedef unsigned int yy_size_t;
162 struct yy_buffer_state
166 char *yy_ch_buf; /* input buffer */
167 char *yy_buf_pos; /* current position in input buffer */
169 /* Size of input buffer in bytes, not including room for EOB
172 yy_size_t yy_buf_size;
174 /* Number of characters read into yy_ch_buf, not including EOB
179 /* Whether we "own" the buffer - i.e., we know we created it,
180 * and can realloc() it to grow it, and should free() it to
183 int yy_is_our_buffer;
185 /* Whether this is an "interactive" input source; if so, and
186 * if we're using stdio for input, then we want to use getc()
187 * instead of fread(), to make sure we stop fetching input after
190 int yy_is_interactive;
192 /* Whether we're considered to be at the beginning of a line.
193 * If so, '^' rules will be active on the next match, otherwise
198 /* Whether to try to fill the input buffer when we reach the
203 int yy_buffer_status;
204 #define YY_BUFFER_NEW 0
205 #define YY_BUFFER_NORMAL 1
206 /* When an EOF's been seen but there's still some text to process
207 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
208 * shouldn't try reading from the input source any more. We might
209 * still have a bunch of tokens to match, though, because of
210 * possible backing-up.
212 * When we actually see the EOF, we change the status to "new"
213 * (via yyrestart()), so that the user can continue scanning by
214 * just pointing yyin at a new input file.
216 #define YY_BUFFER_EOF_PENDING 2
219 static YY_BUFFER_STATE yy_current_buffer = 0;
221 /* We provide macros for accessing buffer states in case in the
222 * future we want to put the buffer states in a more general
225 #define YY_CURRENT_BUFFER yy_current_buffer
228 /* yy_hold_char holds the character lost when yytext is formed. */
229 static char yy_hold_char;
231 static int yy_n_chars; /* number of characters read into yy_ch_buf */
236 /* Points to current character in buffer. */
237 static char *yy_c_buf_p = (char *) 0;
238 static int yy_init = 1; /* whether we need to initialize */
239 static int yy_start = 0; /* start state number */
241 /* Flag which is used to allow yywrap()'s to do buffer switches
242 * instead of setting up a fresh yyin. A bit of a hack ...
244 static int yy_did_buffer_switch_on_eof;
246 void yyrestart YY_PROTO(( FILE *input_file ));
248 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
249 void yy_load_buffer_state YY_PROTO(( void ));
250 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
251 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
252 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
253 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
254 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
256 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
257 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
258 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
260 static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
261 static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
262 static void yy_flex_free YY_PROTO(( void * ));
264 #define yy_new_buffer yy_create_buffer
266 #define yy_set_interactive(is_interactive) \
268 if ( ! yy_current_buffer ) \
269 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
270 yy_current_buffer->yy_is_interactive = is_interactive; \
273 #define yy_set_bol(at_bol) \
275 if ( ! yy_current_buffer ) \
276 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
277 yy_current_buffer->yy_at_bol = at_bol; \
280 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
284 #define YY_SKIP_YYWRAP
285 typedef unsigned char YY_CHAR;
286 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
287 typedef int yy_state_type;
289 #define yytext_ptr yytext
291 static yy_state_type yy_get_previous_state YY_PROTO(( void ));
292 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
293 static int yy_get_next_buffer YY_PROTO(( void ));
294 static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
296 /* Done after the current pattern has been matched and before the
297 * corresponding action - sets up yytext.
299 #define YY_DO_BEFORE_ACTION \
300 yytext_ptr = yy_bp; \
301 yytext_ptr -= yy_more_len; \
302 yyleng = (int) (yy_cp - yytext_ptr); \
303 yy_hold_char = *yy_cp; \
307 #define YY_NUM_RULES 27
308 #define YY_END_OF_BUFFER 28
309 static yyconst short int yy_accept[86] =
311 0, 0, 28, 26, 23, 22, 8, 26, 9, 8,
312 8, 12, 7, 11, 11, 11, 11, 11, 11, 11,
313 11, 11, 11, 11, 10, 23, 22, 0, 21, 20,
314 0, 16, 0, 0, 15, 12, 0, 0, 11, 11,
315 11, 11, 11, 11, 11, 11, 11, 3, 11, 11,
316 11, 0, 24, 0, 19, 0, 25, 15, 0, 0,
317 17, 13, 1, 11, 11, 11, 11, 2, 11, 0,
318 18, 14, 11, 11, 11, 11, 4, 11, 11, 11,
322 static yyconst int yy_ec[256] =
324 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
325 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
326 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
327 1, 2, 4, 1, 1, 4, 1, 4, 5, 4,
328 4, 4, 6, 4, 7, 8, 9, 10, 10, 10,
329 10, 10, 10, 10, 10, 10, 10, 4, 11, 1,
330 1, 1, 1, 1, 12, 13, 14, 15, 16, 17,
331 13, 13, 13, 13, 13, 18, 13, 19, 20, 13,
332 13, 21, 22, 23, 24, 13, 13, 13, 13, 13,
333 4, 1, 4, 1, 13, 1, 25, 13, 13, 26,
335 27, 13, 13, 13, 28, 13, 13, 29, 13, 30,
336 31, 13, 32, 33, 34, 35, 36, 13, 13, 37,
337 13, 13, 1, 4, 1, 38, 1, 1, 1, 1,
338 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
339 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
340 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
341 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
342 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
343 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
344 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
346 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
347 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
348 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
349 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
350 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
354 static yyconst int yy_meta[39] =
356 1, 1, 2, 1, 1, 1, 1, 1, 1, 3,
357 1, 3, 3, 3, 3, 3, 3, 3, 3, 3,
358 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
359 3, 3, 3, 3, 3, 3, 3, 1
362 static yyconst short int yy_base[91] =
364 0, 0, 141, 142, 138, 0, 142, 36, 132, 30,
365 129, 34, 142, 24, 0, 106, 15, 124, 25, 27,
366 114, 104, 102, 99, 142, 129, 0, 46, 142, 142,
367 127, 43, 56, 126, 55, 59, 66, 110, 0, 112,
368 100, 95, 88, 95, 104, 98, 85, 0, 95, 92,
369 82, 113, 142, 105, 104, 110, 142, 58, 71, 102,
370 101, 92, 0, 74, 83, 73, 84, 0, 89, 94,
371 93, 142, 77, 72, 65, 83, 0, 60, 50, 46,
372 0, 49, 0, 30, 142, 86, 89, 52, 92, 95
375 static yyconst short int yy_def[91] =
377 85, 1, 85, 85, 85, 86, 85, 87, 85, 85,
378 85, 85, 85, 88, 88, 88, 88, 88, 88, 88,
379 88, 88, 88, 88, 85, 85, 86, 87, 85, 85,
380 89, 85, 85, 90, 85, 85, 85, 85, 88, 88,
381 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
382 88, 89, 85, 85, 85, 90, 85, 85, 85, 85,
383 85, 85, 88, 88, 88, 88, 88, 88, 88, 85,
384 85, 85, 88, 88, 88, 88, 88, 88, 88, 88,
385 88, 88, 88, 88, 0, 85, 85, 85, 85, 85
388 static yyconst short int yy_nxt[181] =
390 4, 5, 6, 7, 8, 7, 9, 10, 11, 12,
391 13, 14, 15, 16, 15, 17, 18, 15, 19, 20,
392 15, 15, 21, 15, 22, 15, 15, 15, 15, 23,
393 24, 15, 15, 15, 15, 15, 15, 25, 29, 32,
394 30, 35, 40, 36, 46, 33, 43, 48, 29, 37,
395 30, 44, 32, 41, 39, 47, 33, 38, 33, 48,
396 37, 54, 54, 83, 58, 55, 35, 58, 36, 33,
397 59, 60, 60, 59, 37, 61, 70, 70, 84, 83,
398 71, 59, 38, 83, 59, 37, 27, 82, 27, 28,
399 28, 28, 52, 52, 52, 56, 56, 56, 81, 80,
401 79, 78, 71, 71, 77, 76, 75, 74, 73, 72,
402 61, 61, 57, 55, 55, 53, 68, 63, 69, 68,
403 68, 67, 66, 65, 64, 63, 63, 62, 57, 53,
404 26, 48, 51, 50, 49, 45, 42, 34, 31, 26,
405 85, 3, 85, 85, 85, 85, 85, 85, 85, 85,
406 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
407 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
408 85, 85, 85, 85, 85, 85, 85, 85, 85, 85
411 static yyconst short int yy_chk[181] =
413 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
414 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
415 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
416 1, 1, 1, 1, 1, 1, 1, 1, 8, 10,
417 8, 12, 14, 12, 19, 10, 17, 20, 28, 12,
418 28, 17, 32, 14, 88, 19, 10, 12, 32, 20,
419 12, 33, 33, 84, 35, 33, 36, 58, 36, 32,
420 35, 37, 37, 58, 36, 37, 59, 59, 82, 80,
421 59, 35, 36, 79, 58, 36, 86, 78, 86, 87,
422 87, 87, 89, 89, 89, 90, 90, 90, 76, 75,
424 74, 73, 71, 70, 69, 67, 66, 65, 64, 62,
425 61, 60, 56, 55, 54, 52, 51, 50, 49, 47,
426 46, 45, 44, 43, 42, 41, 40, 38, 34, 31,
427 26, 24, 23, 22, 21, 18, 16, 11, 9, 5,
428 3, 85, 85, 85, 85, 85, 85, 85, 85, 85,
429 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
430 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
431 85, 85, 85, 85, 85, 85, 85, 85, 85, 85
434 static yy_state_type yy_last_accepting_state;
435 static char *yy_last_accepting_cpos;
437 /* The intent behind this definition is that it'll catch
438 * any uses of REJECT which flex missed.
440 #define REJECT reject_used_but_not_detected
441 static int yy_more_flag = 0;
442 static int yy_more_len = 0;
443 #define yymore() (yy_more_flag = 1)
444 #define YY_MORE_ADJ yy_more_len
445 #define YY_RESTORE_YY_MORE_OFFSET
451 flex -PIfqParser -oifqlexer.cc ifq.l
456 * AT&T lex can't handle this lexer due to lex bugs. It works with flex
457 * 2.3.7, pclex 2.0.5, and MKS lex 3.1a.
460 #include "parse_fta.h"
465 #include "ifq.tab.cc.h"
468 Some includes that flex doesn't include as standard,
469 but which are needed.
476 // Prevent flex from defining yywrap as extern "C"
478 #define YY_SKIP_YYWRAP
480 /* No lex lib, supply the yywrap fcn. that normally resides there
483 int IfqParserwrap(){return(1);}
485 extern int IfqParserdebug;
489 These variables are used for error reporting:
490 flex_ifq_lineno : the line currently being parsed when the error occurs.
491 flex_ifq_ch : the character on the line where the error occurs
492 flex_ifq_linebuf : store the line for reporting.
494 NOTE : 1) the fixed size flex_ifq_linebuf buffer is dangerous.
495 2) You might get pointed to a place shortly after
496 where the syntax error occurs. It is close enough
500 int flex_ifq_lineno = 1;
502 char flex_ifq_linebuf[20000];
504 char *flex_ifq_stringinput = NULL;
505 int flex_ifq_stringinput_ptr = 0;
506 FILE *flex_ifq_fileinput = NULL;
507 int my_IfqParser_yyinput(char *buf, int max_size);
511 void IfqParsererror(char *s){
513 fprintf(stderr,"On line %d, char %d: %s (token %s):\n%s\n",
514 flex_ifq_lineno, flex_ifq_ch, s, IfqParsertext, flex_ifq_linebuf );
515 for(i=0;i<flex_ifq_ch;i++){
516 if(flex_ifq_linebuf[i] == '\t'){
517 fprintf(stderr,"\t");
522 fprintf(stderr,"^\n");
523 // fprintf(stderr,"%*s\n",1+flex_ifq_ch,"^");
527 #define YY_INPUT(b, r, ms) (r = my_IfqParser_yyinput(b,ms))
529 /* MKS needs the next line to increase the NFA table */
530 #line 531 "ifqlexer.cc"
532 /* Macros after this point can all be overridden by user definitions in
536 #ifndef YY_SKIP_YYWRAP
538 extern "C" int yywrap YY_PROTO(( void ));
540 extern int yywrap YY_PROTO(( void ));
545 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
549 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
552 #ifdef YY_NEED_STRLEN
553 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
558 static int yyinput YY_PROTO(( void ));
560 static int input YY_PROTO(( void ));
565 static int yy_start_stack_ptr = 0;
566 static int yy_start_stack_depth = 0;
567 static int *yy_start_stack = 0;
568 #ifndef YY_NO_PUSH_STATE
569 static void yy_push_state YY_PROTO(( int new_state ));
571 #ifndef YY_NO_POP_STATE
572 static void yy_pop_state YY_PROTO(( void ));
574 #ifndef YY_NO_TOP_STATE
575 static int yy_top_state YY_PROTO(( void ));
579 #define YY_NO_PUSH_STATE 1
580 #define YY_NO_POP_STATE 1
581 #define YY_NO_TOP_STATE 1
584 #ifdef YY_MALLOC_DECL
592 /* Just try to get by without declaring the routines. This will fail
593 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
594 * or sizeof(void*) != sizeof(int).
599 /* Amount of stuff to slurp up with each read. */
600 #ifndef YY_READ_BUF_SIZE
601 #define YY_READ_BUF_SIZE 8192
604 /* Copy whatever the last rule matched to the standard output. */
607 /* This used to be an fputs(), but since the string might contain NUL's,
608 * we now use fwrite().
610 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
613 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
614 * is returned in "result".
617 #define YY_INPUT(buf,result,max_size) \
618 if ( yy_current_buffer->yy_is_interactive ) \
621 for ( n = 0; n < max_size && \
622 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
625 buf[n++] = (char) c; \
626 if ( c == EOF && ferror( yyin ) ) \
627 YY_FATAL_ERROR( "input in flex scanner failed" ); \
630 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
631 && ferror( yyin ) ) \
632 YY_FATAL_ERROR( "input in flex scanner failed" );
635 /* No semi-colon after return; correct usage is to write "yyterminate();" -
636 * we don't want an extra ';' after the "return" because that will cause
637 * some compilers to complain about unreachable statements.
640 #define yyterminate() return YY_NULL
643 /* Number of entries by which start-condition stack grows. */
644 #ifndef YY_START_STACK_INCR
645 #define YY_START_STACK_INCR 25
648 /* Report a fatal error. */
649 #ifndef YY_FATAL_ERROR
650 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
653 /* Default declaration of generated scanner - a define so the user can
654 * easily add parameters.
657 #define YY_DECL int yylex YY_PROTO(( void ))
660 /* Code executed at the beginning of each rule, after yytext and yyleng
663 #ifndef YY_USER_ACTION
664 #define YY_USER_ACTION
667 /* Code executed at the end of each rule. */
669 #define YY_BREAK break;
672 #define YY_RULE_SETUP \
677 register yy_state_type yy_current_state;
678 register char *yy_cp = NULL, *yy_bp = NULL;
684 /* literal keyword tokens */
687 The actions associated with each text token are to
688 keep track of the current location (for syntax error reporting)
689 and to report any necessary info to the emf.y parse tree builder
691 Its likely that there are a number of omissions, inconsistencies
692 (some keywords do not need to be in caps), and relics
693 (keywords such as BETWEEN, INDICATOR, etc., are not used
695 This parser is somewhat of a work in progress.
700 #line 701 "ifqlexer.cc"
711 yy_start = 1; /* first start state */
719 if ( ! yy_current_buffer )
721 yy_create_buffer( yyin, YY_BUF_SIZE );
723 yy_load_buffer_state();
726 while ( 1 ) /* loops until end-of-file is reached */
731 yy_more_len = yy_c_buf_p - yytext_ptr;
736 /* Support of yytext. */
737 *yy_cp = yy_hold_char;
739 /* yy_bp points to the position in yy_ch_buf of the start of
744 yy_current_state = yy_start;
748 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
749 if ( yy_accept[yy_current_state] )
751 yy_last_accepting_state = yy_current_state;
752 yy_last_accepting_cpos = yy_cp;
754 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
756 yy_current_state = (int) yy_def[yy_current_state];
757 if ( yy_current_state >= 86 )
758 yy_c = yy_meta[(unsigned int) yy_c];
760 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
763 while ( yy_base[yy_current_state] != 142 );
766 yy_act = yy_accept[yy_current_state];
768 { /* have to back up */
769 yy_cp = yy_last_accepting_cpos;
770 yy_current_state = yy_last_accepting_state;
771 yy_act = yy_accept[yy_current_state];
777 do_action: /* This label is used only to access EOF actions. */
781 { /* beginning of action switch */
782 case 0: /* must back up */
783 /* undo the effects of YY_DO_BEFORE_ACTION */
784 *yy_cp = yy_hold_char;
785 yy_cp = yy_last_accepting_cpos;
786 yy_current_state = yy_last_accepting_state;
792 { flex_ifq_ch+=IfqParserleng; return AND; }
797 { flex_ifq_ch+=IfqParserleng; return NOT; }
802 { flex_ifq_ch+=IfqParserleng; return OR; }
807 { flex_ifq_ch+=IfqParserleng; return TRUE_V;}
812 { flex_ifq_ch+=IfqParserleng; return FALSE_V;}
817 {flex_ifq_ch+=IfqParserleng; IfqParserlval.strval = strdup(yytext); return PRED; }
822 {flex_ifq_ch+=IfqParserleng; return SEMICOLON;}
827 { flex_ifq_ch+=IfqParserleng; return yytext[0]; }
832 { flex_ifq_ch+=IfqParserleng; return yytext[0]; }
837 { flex_ifq_ch+=IfqParserleng; return yytext[0]; }
843 { flex_ifq_ch+=IfqParserleng; IfqParserlval.strval = strdup(yytext); return NAME; }
851 { flex_ifq_ch+=IfqParserleng; IfqParserlval.strval = strdup(yytext); return INTNUM; }
856 { flex_ifq_ch+=IfqParserleng; IfqParserlval.strval = strdup(yytext); return LONGINTNUM; }
869 { flex_ifq_ch+=IfqParserleng; IfqParserlval.strval = strdup(yytext); return APPROXNUM; }
879 IfqParserlval.strval = strdup(IfqParsertext+1);
883 unput(c); /* just peeking */
885 flex_ifq_ch+=IfqParserleng;
886 IfqParserlval.strval[IfqParserleng-2] = '\0';
893 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
894 yy_c_buf_p = yy_cp -= 1;
895 YY_DO_BEFORE_ACTION; /* set up yytext again */
898 { flex_ifq_ch+=IfqParserleng; IfqParsererror("Unterminated string"); }
901 /* Newline : advance the error reporting line number */
902 /* and grab the next line into flex_ifq_linebuf */
907 {flex_ifq_ch=0; flex_ifq_lineno++;
908 strcpy(flex_ifq_linebuf,IfqParsertext+1);
915 {flex_ifq_ch+=IfqParserleng; } /* white space */
918 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
919 yy_c_buf_p = yy_cp -= 1;
920 YY_DO_BEFORE_ACTION; /* set up yytext again */
923 {flex_ifq_ch+=IfqParserleng; }; /* comment */
926 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
927 yy_c_buf_p = yy_cp -= 1;
928 YY_DO_BEFORE_ACTION; /* set up yytext again */
931 {flex_ifq_ch+=IfqParserleng; }; /* comment */
936 {flex_ifq_ch+=IfqParserleng; fprintf(stderr,"Warning: unknown token (ignored)\n"); IfqParsererror(yytext);}
943 #line 944 "ifqlexer.cc"
944 case YY_STATE_EOF(INITIAL):
947 case YY_END_OF_BUFFER:
949 /* Amount of text matched not including the EOB char. */
950 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
952 /* Undo the effects of YY_DO_BEFORE_ACTION. */
953 *yy_cp = yy_hold_char;
954 YY_RESTORE_YY_MORE_OFFSET
956 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
958 /* We're scanning a new file or input source. It's
959 * possible that this happened because the user
960 * just pointed yyin at a new source and called
961 * yylex(). If so, then we have to assure
962 * consistency between yy_current_buffer and our
963 * globals. Here is the right place to do so, because
964 * this is the first action (other than possibly a
965 * back-up) that will match for the new input source.
967 yy_n_chars = yy_current_buffer->yy_n_chars;
968 yy_current_buffer->yy_input_file = yyin;
969 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
972 /* Note that here we test for yy_c_buf_p "<=" to the position
973 * of the first EOB in the buffer, since yy_c_buf_p will
974 * already have been incremented past the NUL character
975 * (since all states make transitions on EOB to the
976 * end-of-buffer state). Contrast this with the test
979 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
980 { /* This was really a NUL. */
981 yy_state_type yy_next_state;
983 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
985 yy_current_state = yy_get_previous_state();
987 /* Okay, we're now positioned to make the NUL
988 * transition. We couldn't have
989 * yy_get_previous_state() go ahead and do it
990 * for us because it doesn't know how to deal
991 * with the possibility of jamming (and we don't
992 * want to build jamming into it because then it
993 * will run more slowly).
996 yy_next_state = yy_try_NUL_trans( yy_current_state );
998 yy_bp = yytext_ptr + YY_MORE_ADJ;
1000 if ( yy_next_state )
1002 /* Consume the NUL. */
1003 yy_cp = ++yy_c_buf_p;
1004 yy_current_state = yy_next_state;
1011 goto yy_find_action;
1015 else switch ( yy_get_next_buffer() )
1017 case EOB_ACT_END_OF_FILE:
1019 yy_did_buffer_switch_on_eof = 0;
1023 /* Note: because we've taken care in
1024 * yy_get_next_buffer() to have set up
1025 * yytext, we can now set up
1026 * yy_c_buf_p so that if some total
1027 * hoser (like flex itself) wants to
1028 * call the scanner after we return the
1029 * YY_NULL, it'll still work - another
1030 * YY_NULL will get returned.
1032 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1034 yy_act = YY_STATE_EOF(YY_START);
1040 if ( ! yy_did_buffer_switch_on_eof )
1046 case EOB_ACT_CONTINUE_SCAN:
1048 yytext_ptr + yy_amount_of_matched_text;
1050 yy_current_state = yy_get_previous_state();
1053 yy_bp = yytext_ptr + YY_MORE_ADJ;
1056 case EOB_ACT_LAST_MATCH:
1058 &yy_current_buffer->yy_ch_buf[yy_n_chars];
1060 yy_current_state = yy_get_previous_state();
1063 yy_bp = yytext_ptr + YY_MORE_ADJ;
1064 goto yy_find_action;
1071 "fatal flex scanner internal error--no action found" );
1072 } /* end of action switch */
1073 } /* end of scanning one token */
1074 } /* end of yylex */
1077 /* yy_get_next_buffer - try to read in a new buffer
1079 * Returns a code representing an action:
1080 * EOB_ACT_LAST_MATCH -
1081 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1082 * EOB_ACT_END_OF_FILE - end of file
1085 static int yy_get_next_buffer()
1087 register char *dest = yy_current_buffer->yy_ch_buf;
1088 register char *source = yytext_ptr;
1089 register int number_to_move, i;
1092 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
1094 "fatal flex scanner internal error--end of buffer missed" );
1096 if ( yy_current_buffer->yy_fill_buffer == 0 )
1097 { /* Don't try to fill the buffer, so this is an EOF. */
1098 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
1100 /* We matched a single character, the EOB, so
1101 * treat this as a final EOF.
1103 return EOB_ACT_END_OF_FILE;
1108 /* We matched some text prior to the EOB, first
1111 return EOB_ACT_LAST_MATCH;
1115 /* Try to read more data. */
1117 /* First move last chars to start of buffer. */
1118 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
1120 for ( i = 0; i < number_to_move; ++i )
1121 *(dest++) = *(source++);
1123 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1124 /* don't do the read, it's not guaranteed to return an EOF,
1127 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
1132 yy_current_buffer->yy_buf_size - number_to_move - 1;
1134 while ( num_to_read <= 0 )
1135 { /* Not enough room in the buffer - grow it. */
1136 #ifdef YY_USES_REJECT
1138 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1141 /* just a shorter name for the current buffer */
1142 YY_BUFFER_STATE b = yy_current_buffer;
1144 int yy_c_buf_p_offset =
1145 (int) (yy_c_buf_p - b->yy_ch_buf);
1147 if ( b->yy_is_our_buffer )
1149 int new_size = b->yy_buf_size * 2;
1151 if ( new_size <= 0 )
1152 b->yy_buf_size += b->yy_buf_size / 8;
1154 b->yy_buf_size *= 2;
1156 b->yy_ch_buf = (char *)
1157 /* Include room in for 2 EOB chars. */
1158 yy_flex_realloc( (void *) b->yy_ch_buf,
1159 b->yy_buf_size + 2 );
1162 /* Can't grow it, we don't own it. */
1165 if ( ! b->yy_ch_buf )
1167 "fatal error - scanner input buffer overflow" );
1169 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1171 num_to_read = yy_current_buffer->yy_buf_size -
1176 if ( num_to_read > YY_READ_BUF_SIZE )
1177 num_to_read = YY_READ_BUF_SIZE;
1179 /* Read in more data. */
1180 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1181 yy_n_chars, num_to_read );
1183 yy_current_buffer->yy_n_chars = yy_n_chars;
1186 if ( yy_n_chars == 0 )
1188 if ( number_to_move == YY_MORE_ADJ )
1190 ret_val = EOB_ACT_END_OF_FILE;
1196 ret_val = EOB_ACT_LAST_MATCH;
1197 yy_current_buffer->yy_buffer_status =
1198 YY_BUFFER_EOF_PENDING;
1203 ret_val = EOB_ACT_CONTINUE_SCAN;
1205 yy_n_chars += number_to_move;
1206 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1207 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1209 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1215 /* yy_get_previous_state - get the state just before the EOB char was reached */
1217 static yy_state_type yy_get_previous_state()
1219 register yy_state_type yy_current_state;
1220 register char *yy_cp;
1222 yy_current_state = yy_start;
1224 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1226 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1227 if ( yy_accept[yy_current_state] )
1229 yy_last_accepting_state = yy_current_state;
1230 yy_last_accepting_cpos = yy_cp;
1232 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1234 yy_current_state = (int) yy_def[yy_current_state];
1235 if ( yy_current_state >= 86 )
1236 yy_c = yy_meta[(unsigned int) yy_c];
1238 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1241 return yy_current_state;
1245 /* yy_try_NUL_trans - try to make a transition on the NUL character
1248 * next_state = yy_try_NUL_trans( current_state );
1251 #ifdef YY_USE_PROTOS
1252 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
1254 static yy_state_type yy_try_NUL_trans( yy_current_state )
1255 yy_state_type yy_current_state;
1258 register int yy_is_jam;
1259 register char *yy_cp = yy_c_buf_p;
1261 register YY_CHAR yy_c = 1;
1262 if ( yy_accept[yy_current_state] )
1264 yy_last_accepting_state = yy_current_state;
1265 yy_last_accepting_cpos = yy_cp;
1267 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1269 yy_current_state = (int) yy_def[yy_current_state];
1270 if ( yy_current_state >= 86 )
1271 yy_c = yy_meta[(unsigned int) yy_c];
1273 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1274 yy_is_jam = (yy_current_state == 85);
1276 return yy_is_jam ? 0 : yy_current_state;
1281 #ifdef YY_USE_PROTOS
1282 static void yyunput( int c, register char *yy_bp )
1284 static void yyunput( c, yy_bp )
1286 register char *yy_bp;
1289 register char *yy_cp = yy_c_buf_p;
1291 /* undo effects of setting up yytext */
1292 *yy_cp = yy_hold_char;
1294 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1295 { /* need to shift things up to make room */
1296 /* +2 for EOB chars. */
1297 register int number_to_move = yy_n_chars + 2;
1298 register char *dest = &yy_current_buffer->yy_ch_buf[
1299 yy_current_buffer->yy_buf_size + 2];
1300 register char *source =
1301 &yy_current_buffer->yy_ch_buf[number_to_move];
1303 while ( source > yy_current_buffer->yy_ch_buf )
1304 *--dest = *--source;
1306 yy_cp += (int) (dest - source);
1307 yy_bp += (int) (dest - source);
1308 yy_current_buffer->yy_n_chars =
1309 yy_n_chars = yy_current_buffer->yy_buf_size;
1311 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1312 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1315 *--yy_cp = (char) c;
1319 yy_hold_char = *yy_cp;
1322 #endif /* ifndef YY_NO_UNPUT */
1327 static int yyinput()
1334 *yy_c_buf_p = yy_hold_char;
1336 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1338 /* yy_c_buf_p now points to the character we want to return.
1339 * If this occurs *before* the EOB characters, then it's a
1340 * valid NUL; if not, then we've hit the end of the buffer.
1342 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1343 /* This was really a NUL. */
1347 { /* need more input */
1348 int offset = yy_c_buf_p - yytext_ptr;
1351 switch ( yy_get_next_buffer() )
1353 case EOB_ACT_LAST_MATCH:
1354 /* This happens because yy_g_n_b()
1355 * sees that we've accumulated a
1356 * token and flags that we need to
1357 * try matching the token before
1358 * proceeding. But for input(),
1359 * there's no matching to consider.
1360 * So convert the EOB_ACT_LAST_MATCH
1361 * to EOB_ACT_END_OF_FILE.
1364 /* Reset buffer status. */
1369 case EOB_ACT_END_OF_FILE:
1374 if ( ! yy_did_buffer_switch_on_eof )
1383 case EOB_ACT_CONTINUE_SCAN:
1384 yy_c_buf_p = yytext_ptr + offset;
1390 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
1391 *yy_c_buf_p = '\0'; /* preserve yytext */
1392 yy_hold_char = *++yy_c_buf_p;
1397 #endif /* YY_NO_INPUT */
1399 #ifdef YY_USE_PROTOS
1400 void yyrestart( FILE *input_file )
1402 void yyrestart( input_file )
1406 if ( ! yy_current_buffer )
1407 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1409 yy_init_buffer( yy_current_buffer, input_file );
1410 yy_load_buffer_state();
1414 #ifdef YY_USE_PROTOS
1415 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1417 void yy_switch_to_buffer( new_buffer )
1418 YY_BUFFER_STATE new_buffer;
1421 if ( yy_current_buffer == new_buffer )
1424 if ( yy_current_buffer )
1426 /* Flush out information for old buffer. */
1427 *yy_c_buf_p = yy_hold_char;
1428 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
1429 yy_current_buffer->yy_n_chars = yy_n_chars;
1432 yy_current_buffer = new_buffer;
1433 yy_load_buffer_state();
1435 /* We don't actually know whether we did this switch during
1436 * EOF (yywrap()) processing, but the only time this flag
1437 * is looked at is after yywrap() is called, so it's safe
1438 * to go ahead and always set it.
1440 yy_did_buffer_switch_on_eof = 1;
1444 #ifdef YY_USE_PROTOS
1445 void yy_load_buffer_state( void )
1447 void yy_load_buffer_state()
1450 yy_n_chars = yy_current_buffer->yy_n_chars;
1451 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
1452 yyin = yy_current_buffer->yy_input_file;
1453 yy_hold_char = *yy_c_buf_p;
1457 #ifdef YY_USE_PROTOS
1458 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
1460 YY_BUFFER_STATE yy_create_buffer( file, size )
1467 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1469 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1471 b->yy_buf_size = size;
1473 /* yy_ch_buf has to be 2 characters longer than the size given because
1474 * we need to put in 2 end-of-buffer characters.
1476 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
1477 if ( ! b->yy_ch_buf )
1478 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1480 b->yy_is_our_buffer = 1;
1482 yy_init_buffer( b, file );
1488 #ifdef YY_USE_PROTOS
1489 void yy_delete_buffer( YY_BUFFER_STATE b )
1491 void yy_delete_buffer( b )
1498 if ( b == yy_current_buffer )
1499 yy_current_buffer = (YY_BUFFER_STATE) 0;
1501 if ( b->yy_is_our_buffer )
1502 yy_flex_free( (void *) b->yy_ch_buf );
1504 yy_flex_free( (void *) b );
1509 #ifdef YY_USE_PROTOS
1510 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
1512 void yy_init_buffer( b, file )
1519 yy_flush_buffer( b );
1521 b->yy_input_file = file;
1522 b->yy_fill_buffer = 1;
1524 #if YY_ALWAYS_INTERACTIVE
1525 b->yy_is_interactive = 1;
1527 #if YY_NEVER_INTERACTIVE
1528 b->yy_is_interactive = 0;
1530 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1536 #ifdef YY_USE_PROTOS
1537 void yy_flush_buffer( YY_BUFFER_STATE b )
1539 void yy_flush_buffer( b )
1549 /* We always need two end-of-buffer characters. The first causes
1550 * a transition to the end-of-buffer state. The second causes
1551 * a jam in that state.
1553 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1554 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1556 b->yy_buf_pos = &b->yy_ch_buf[0];
1559 b->yy_buffer_status = YY_BUFFER_NEW;
1561 if ( b == yy_current_buffer )
1562 yy_load_buffer_state();
1566 #ifndef YY_NO_SCAN_BUFFER
1567 #ifdef YY_USE_PROTOS
1568 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
1570 YY_BUFFER_STATE yy_scan_buffer( base, size )
1578 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1579 base[size-1] != YY_END_OF_BUFFER_CHAR )
1580 /* They forgot to leave room for the EOB's. */
1583 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1585 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1587 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1588 b->yy_buf_pos = b->yy_ch_buf = base;
1589 b->yy_is_our_buffer = 0;
1590 b->yy_input_file = 0;
1591 b->yy_n_chars = b->yy_buf_size;
1592 b->yy_is_interactive = 0;
1594 b->yy_fill_buffer = 0;
1595 b->yy_buffer_status = YY_BUFFER_NEW;
1597 yy_switch_to_buffer( b );
1604 #ifndef YY_NO_SCAN_STRING
1605 #ifdef YY_USE_PROTOS
1606 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
1608 YY_BUFFER_STATE yy_scan_string( yy_str )
1609 yyconst char *yy_str;
1613 for ( len = 0; yy_str[len]; ++len )
1616 return yy_scan_bytes( yy_str, len );
1621 #ifndef YY_NO_SCAN_BYTES
1622 #ifdef YY_USE_PROTOS
1623 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
1625 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
1626 yyconst char *bytes;
1635 /* Get memory for full buffer, including space for trailing EOB's. */
1637 buf = (char *) yy_flex_alloc( n );
1639 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1641 for ( i = 0; i < len; ++i )
1644 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
1646 b = yy_scan_buffer( buf, n );
1648 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1650 /* It's okay to grow etc. this buffer, and we should throw it
1651 * away when we're done.
1653 b->yy_is_our_buffer = 1;
1660 #ifndef YY_NO_PUSH_STATE
1661 #ifdef YY_USE_PROTOS
1662 static void yy_push_state( int new_state )
1664 static void yy_push_state( new_state )
1668 if ( yy_start_stack_ptr >= yy_start_stack_depth )
1672 yy_start_stack_depth += YY_START_STACK_INCR;
1673 new_size = yy_start_stack_depth * sizeof( int );
1675 if ( ! yy_start_stack )
1676 yy_start_stack = (int *) yy_flex_alloc( new_size );
1679 yy_start_stack = (int *) yy_flex_realloc(
1680 (void *) yy_start_stack, new_size );
1682 if ( ! yy_start_stack )
1684 "out of memory expanding start-condition stack" );
1687 yy_start_stack[yy_start_stack_ptr++] = YY_START;
1694 #ifndef YY_NO_POP_STATE
1695 static void yy_pop_state()
1697 if ( --yy_start_stack_ptr < 0 )
1698 YY_FATAL_ERROR( "start-condition stack underflow" );
1700 BEGIN(yy_start_stack[yy_start_stack_ptr]);
1705 #ifndef YY_NO_TOP_STATE
1706 static int yy_top_state()
1708 return yy_start_stack[yy_start_stack_ptr - 1];
1712 #ifndef YY_EXIT_FAILURE
1713 #define YY_EXIT_FAILURE 2
1716 #ifdef YY_USE_PROTOS
1717 static void yy_fatal_error( yyconst char msg[] )
1719 static void yy_fatal_error( msg )
1723 (void) fprintf( stderr, "%s\n", msg );
1724 exit( YY_EXIT_FAILURE );
1729 /* Redefine yyless() so it works in section 3 code. */
1735 /* Undo effects of setting up yytext. */ \
1736 yytext[yyleng] = yy_hold_char; \
1737 yy_c_buf_p = yytext + n; \
1738 yy_hold_char = *yy_c_buf_p; \
1739 *yy_c_buf_p = '\0'; \
1745 /* Internal utility routines. */
1748 #ifdef YY_USE_PROTOS
1749 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
1751 static void yy_flex_strncpy( s1, s2, n )
1758 for ( i = 0; i < n; ++i )
1763 #ifdef YY_NEED_STRLEN
1764 #ifdef YY_USE_PROTOS
1765 static int yy_flex_strlen( yyconst char *s )
1767 static int yy_flex_strlen( s )
1772 for ( n = 0; s[n]; ++n )
1780 #ifdef YY_USE_PROTOS
1781 static void *yy_flex_alloc( yy_size_t size )
1783 static void *yy_flex_alloc( size )
1787 return (void *) malloc( size );
1790 #ifdef YY_USE_PROTOS
1791 static void *yy_flex_realloc( void *ptr, yy_size_t size )
1793 static void *yy_flex_realloc( ptr, size )
1798 /* The cast to (char *) in the following accommodates both
1799 * implementations that use char* generic pointers, and those
1800 * that use void* generic pointers. It works with the latter
1801 * because both ANSI C and C++ allow castless assignment from
1802 * any pointer type to void*, and deal with argument conversions
1803 * as though doing an assignment.
1805 return (void *) realloc( (char *) ptr, size );
1808 #ifdef YY_USE_PROTOS
1809 static void yy_flex_free( void *ptr )
1811 static void yy_flex_free( ptr )
1828 int my_IfqParser_yyinput(char *buf, int max_size){
1832 if(flex_ifq_stringinput != NULL){
1834 if(flex_ifq_stringinput[flex_ifq_stringinput_ptr] != '\0'){
1835 buf[c++] = flex_ifq_stringinput[flex_ifq_stringinput_ptr++];
1843 if(flex_ifq_fileinput != NULL){
1844 while(c < max_size){
1845 inchar = getc(flex_ifq_fileinput);
1858 void IfqParser_setfileinput(FILE *f){
1859 IfqParserrestart(NULL);
1861 flex_ifq_fileinput = f;
1862 flex_ifq_stringinput = NULL;
1863 flex_ifq_lineno = 1;
1867 void IfqParser_setstringinput(char *s){
1868 IfqParserrestart(NULL);
1870 flex_ifq_fileinput = NULL;
1871 flex_ifq_stringinput = s;
1872 flex_ifq_stringinput_ptr = 0;
1873 flex_ifq_lineno = 1;