1 #define yy_create_buffer SchemaParser_create_buffer
2 #define yy_delete_buffer SchemaParser_delete_buffer
3 #define yy_scan_buffer SchemaParser_scan_buffer
4 #define yy_scan_string SchemaParser_scan_string
5 #define yy_scan_bytes SchemaParser_scan_bytes
6 #define yy_flex_debug SchemaParser_flex_debug
7 #define yy_init_buffer SchemaParser_init_buffer
8 #define yy_flush_buffer SchemaParser_flush_buffer
9 #define yy_load_buffer_state SchemaParser_load_buffer_state
10 #define yy_switch_to_buffer SchemaParser_switch_to_buffer
11 #define yyin SchemaParserin
12 #define yyleng SchemaParserleng
13 #define yylex SchemaParserlex
14 #define yyout SchemaParserout
15 #define yyrestart SchemaParserrestart
16 #define yytext SchemaParsertext
17 #define yywrap SchemaParserwrap
19 #line 20 "schemalexer.cc"
20 /* A lexical scanner generated by flex */
22 /* Scanner skeleton version:
23 * $Header: /cvsroot/gscpv4/src/ftacmp/schemalexer.cc,v 1.1.1.1 2013/12/02 17:44:57 spatsch Exp $
27 #define YY_FLEX_MAJOR_VERSION 2
28 #define YY_FLEX_MINOR_VERSION 5
33 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
46 /* Use prototypes in function declarations. */
49 /* The "const" storage-class-modifier is valid. */
52 #else /* ! __cplusplus */
60 #endif /* ! __cplusplus */
79 #define YY_PROTO(proto) proto
81 #define YY_PROTO(proto) ()
84 /* Returned upon end-of-file. */
87 /* Promotes a possibly negative, possibly signed char to an unsigned
88 * integer for use as an array index. If the signed char is negative,
89 * we want to instead treat it as an 8-bit unsigned char, hence the
92 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
94 /* Enter a start condition. This macro really ought to take a parameter,
95 * but we do it the disgusting crufty way forced on us by the ()-less
96 * definition of BEGIN.
98 #define BEGIN yy_start = 1 + 2 *
100 /* Translate the current start state into a value that can be later handed
101 * to BEGIN to return to the state. The YYSTATE alias is for lex
104 #define YY_START ((yy_start - 1) / 2)
105 #define YYSTATE YY_START
107 /* Action number for EOF rule of a given start state. */
108 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
110 /* Special action meaning "start processing a new file". */
111 #define YY_NEW_FILE yyrestart( yyin )
113 #define YY_END_OF_BUFFER_CHAR 0
115 /* Size of default input buffer. */
116 #define YY_BUF_SIZE 16384
118 typedef struct yy_buffer_state *YY_BUFFER_STATE;
121 extern FILE *yyin, *yyout;
123 #define EOB_ACT_CONTINUE_SCAN 0
124 #define EOB_ACT_END_OF_FILE 1
125 #define EOB_ACT_LAST_MATCH 2
127 /* The funky do-while in the following #define is used to turn the definition
128 * int a single C statement (which needs a semi-colon terminator). This
129 * avoids problems with code like:
131 * if ( condition_holds )
134 * do_something_else();
136 * Prior to using the do-while the compiler would get upset at the
137 * "else" because it interpreted the "if" statement as being all
138 * done when it reached the ';' after the yyless() call.
141 /* Return all but the first 'n' matched characters back to the input stream. */
146 /* Undo effects of setting up yytext. */ \
147 *yy_cp = yy_hold_char; \
148 YY_RESTORE_YY_MORE_OFFSET \
149 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
150 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
154 #define unput(c) yyunput( c, yytext_ptr )
156 /* The following is because we cannot portably get our hands on size_t
157 * (without autoconf's help, which isn't available because we want
158 * flex-generated scanners to compile on their own).
160 typedef unsigned int yy_size_t;
163 struct yy_buffer_state
167 char *yy_ch_buf; /* input buffer */
168 char *yy_buf_pos; /* current position in input buffer */
170 /* Size of input buffer in bytes, not including room for EOB
173 yy_size_t yy_buf_size;
175 /* Number of characters read into yy_ch_buf, not including EOB
180 /* Whether we "own" the buffer - i.e., we know we created it,
181 * and can realloc() it to grow it, and should free() it to
184 int yy_is_our_buffer;
186 /* Whether this is an "interactive" input source; if so, and
187 * if we're using stdio for input, then we want to use getc()
188 * instead of fread(), to make sure we stop fetching input after
191 int yy_is_interactive;
193 /* Whether we're considered to be at the beginning of a line.
194 * If so, '^' rules will be active on the next match, otherwise
199 /* Whether to try to fill the input buffer when we reach the
204 int yy_buffer_status;
205 #define YY_BUFFER_NEW 0
206 #define YY_BUFFER_NORMAL 1
207 /* When an EOF's been seen but there's still some text to process
208 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
209 * shouldn't try reading from the input source any more. We might
210 * still have a bunch of tokens to match, though, because of
211 * possible backing-up.
213 * When we actually see the EOF, we change the status to "new"
214 * (via yyrestart()), so that the user can continue scanning by
215 * just pointing yyin at a new input file.
217 #define YY_BUFFER_EOF_PENDING 2
220 static YY_BUFFER_STATE yy_current_buffer = 0;
222 /* We provide macros for accessing buffer states in case in the
223 * future we want to put the buffer states in a more general
226 #define YY_CURRENT_BUFFER yy_current_buffer
229 /* yy_hold_char holds the character lost when yytext is formed. */
230 static char yy_hold_char;
232 static int yy_n_chars; /* number of characters read into yy_ch_buf */
237 /* Points to current character in buffer. */
238 static char *yy_c_buf_p = (char *) 0;
239 static int yy_init = 1; /* whether we need to initialize */
240 static int yy_start = 0; /* start state number */
242 /* Flag which is used to allow yywrap()'s to do buffer switches
243 * instead of setting up a fresh yyin. A bit of a hack ...
245 static int yy_did_buffer_switch_on_eof;
247 void yyrestart YY_PROTO(( FILE *input_file ));
249 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
250 void yy_load_buffer_state YY_PROTO(( void ));
251 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
252 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
253 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
254 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
255 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
257 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
258 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
259 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
261 static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
262 static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
263 static void yy_flex_free YY_PROTO(( void * ));
265 #define yy_new_buffer yy_create_buffer
267 #define yy_set_interactive(is_interactive) \
269 if ( ! yy_current_buffer ) \
270 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
271 yy_current_buffer->yy_is_interactive = is_interactive; \
274 #define yy_set_bol(at_bol) \
276 if ( ! yy_current_buffer ) \
277 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
278 yy_current_buffer->yy_at_bol = at_bol; \
281 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
283 typedef unsigned char YY_CHAR;
284 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
285 typedef int yy_state_type;
287 #define yytext_ptr yytext
289 static yy_state_type yy_get_previous_state YY_PROTO(( void ));
290 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
291 static int yy_get_next_buffer YY_PROTO(( void ));
292 static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
294 /* Done after the current pattern has been matched and before the
295 * corresponding action - sets up yytext.
297 #define YY_DO_BEFORE_ACTION \
298 yytext_ptr = yy_bp; \
299 yyleng = (int) (yy_cp - yy_bp); \
300 yy_hold_char = *yy_cp; \
304 #define YY_NUM_RULES 12
305 #define YY_END_OF_BUFFER 13
306 static yyconst short int yy_accept[31] =
308 0, 0, 13, 11, 9, 8, 6, 11, 3, 7,
309 7, 7, 4, 5, 9, 8, 0, 7, 7, 7,
310 0, 10, 7, 7, 7, 7, 7, 1, 2, 0
313 static yyconst int yy_ec[256] =
315 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
316 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
317 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
318 1, 2, 1, 1, 1, 1, 1, 1, 1, 4,
319 4, 1, 1, 4, 5, 1, 1, 6, 6, 6,
320 6, 6, 6, 6, 6, 6, 6, 1, 7, 1,
321 1, 1, 1, 1, 8, 9, 10, 10, 11, 10,
322 10, 10, 10, 10, 10, 12, 13, 10, 10, 10,
323 10, 14, 15, 16, 10, 10, 10, 10, 10, 10,
324 1, 1, 1, 1, 6, 1, 10, 10, 10, 10,
326 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
327 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
328 10, 10, 17, 1, 18, 1, 1, 1, 1, 1,
329 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
330 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
331 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
332 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
333 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
334 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
335 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
337 1, 1, 1, 1, 1, 1, 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,
345 static yyconst int yy_meta[19] =
347 1, 1, 2, 1, 1, 3, 1, 3, 3, 3,
348 3, 3, 3, 3, 3, 3, 1, 1
351 static yyconst short int yy_base[34] =
353 0, 0, 39, 40, 36, 0, 40, 32, 40, 0,
354 20, 27, 40, 40, 32, 0, 30, 0, 18, 22,
355 27, 40, 18, 16, 19, 15, 12, 0, 0, 40,
359 static yyconst short int yy_def[34] =
361 30, 1, 30, 30, 30, 31, 30, 30, 30, 32,
362 32, 32, 30, 30, 30, 31, 33, 32, 32, 32,
363 33, 30, 32, 32, 32, 32, 32, 32, 32, 0,
367 static yyconst short int yy_nxt[59] =
369 4, 5, 6, 7, 8, 4, 9, 10, 10, 10,
370 10, 10, 10, 10, 11, 12, 13, 14, 16, 18,
371 16, 21, 21, 21, 29, 28, 27, 26, 25, 22,
372 24, 23, 22, 15, 20, 19, 17, 15, 30, 3,
373 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
374 30, 30, 30, 30, 30, 30, 30, 30
377 static yyconst short int yy_chk[59] =
379 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
380 1, 1, 1, 1, 1, 1, 1, 1, 31, 32,
381 31, 33, 33, 33, 27, 26, 25, 24, 23, 21,
382 20, 19, 17, 15, 12, 11, 8, 5, 3, 30,
383 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
384 30, 30, 30, 30, 30, 30, 30, 30
387 static yy_state_type yy_last_accepting_state;
388 static char *yy_last_accepting_cpos;
390 /* The intent behind this definition is that it'll catch
391 * any uses of REJECT which flex missed.
393 #define REJECT reject_used_but_not_detected
394 #define yymore() yymore_used_but_not_detected
395 #define YY_MORE_ADJ 0
396 #define YY_RESTORE_YY_MORE_OFFSET
402 flex -PSchemaParser -oschemalexer.cc schema.l
407 * AT&T lex can't handle this lexer due to lex bugs. It works with flex
408 * 2.3.7, pclex 2.0.5, and MKS lex 3.1a.
411 #include "parse_schema.h"
416 #include "schema.tab.cc.h"
419 Some includes that flex doesn't include as standard,
420 but which are needed.
427 // Prevent flex from defining yywrap as extern "C"
429 #define YY_SKIP_YYWRAP
431 /* No lex lib, supply the yywrap fcn. that normally resides there
434 int SchemaParserwrap(){return(1);}
436 extern int SchemaParserdebug;
440 These variables are used for error reporting:
441 flex_lineno : the line currently being parsed when the error occurs.
442 flexch : the character on the line where the error occurs
443 flex_linebuf : store the line for reporting.
445 NOTE : 1) the fixed size flex_linebuf buffer is dangerous.
446 2) You might get pointed to a place shortly after
447 where the syntax error occurs. It is close enough
451 int flex_schema_lineno = 1;
452 int flex_schema_ch = 0;
453 char flex_schema_linebuf[1000];
455 //void SchemaParsererror(char *s);
457 void SchemaParsererror(char *s){
458 printf("On line %d, char %d: %s (token %s):\n%s\n",
459 flex_schema_lineno, flex_schema_ch, s, SchemaParsertext, flex_schema_linebuf );
460 printf("%*s\n",1+flex_schema_ch,"^");
464 /* MKS needs the next line to increase the NFA table */
465 #line 466 "schemalexer.cc"
467 /* Macros after this point can all be overridden by user definitions in
471 #ifndef YY_SKIP_YYWRAP
473 extern "C" int yywrap YY_PROTO(( void ));
475 extern int yywrap YY_PROTO(( void ));
480 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
484 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
487 #ifdef YY_NEED_STRLEN
488 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
493 static int yyinput YY_PROTO(( void ));
495 static int input YY_PROTO(( void ));
500 static int yy_start_stack_ptr = 0;
501 static int yy_start_stack_depth = 0;
502 static int *yy_start_stack = 0;
503 #ifndef YY_NO_PUSH_STATE
504 static void yy_push_state YY_PROTO(( int new_state ));
506 #ifndef YY_NO_POP_STATE
507 static void yy_pop_state YY_PROTO(( void ));
509 #ifndef YY_NO_TOP_STATE
510 static int yy_top_state YY_PROTO(( void ));
514 #define YY_NO_PUSH_STATE 1
515 #define YY_NO_POP_STATE 1
516 #define YY_NO_TOP_STATE 1
519 #ifdef YY_MALLOC_DECL
527 /* Just try to get by without declaring the routines. This will fail
528 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
529 * or sizeof(void*) != sizeof(int).
534 /* Amount of stuff to slurp up with each read. */
535 #ifndef YY_READ_BUF_SIZE
536 #define YY_READ_BUF_SIZE 8192
539 /* Copy whatever the last rule matched to the standard output. */
542 /* This used to be an fputs(), but since the string might contain NUL's,
543 * we now use fwrite().
545 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
548 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
549 * is returned in "result".
552 #define YY_INPUT(buf,result,max_size) \
553 if ( yy_current_buffer->yy_is_interactive ) \
556 for ( n = 0; n < max_size && \
557 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
560 buf[n++] = (char) c; \
561 if ( c == EOF && ferror( yyin ) ) \
562 YY_FATAL_ERROR( "input in flex scanner failed" ); \
565 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
566 && ferror( yyin ) ) \
567 YY_FATAL_ERROR( "input in flex scanner failed" );
570 /* No semi-colon after return; correct usage is to write "yyterminate();" -
571 * we don't want an extra ';' after the "return" because that will cause
572 * some compilers to complain about unreachable statements.
575 #define yyterminate() return YY_NULL
578 /* Number of entries by which start-condition stack grows. */
579 #ifndef YY_START_STACK_INCR
580 #define YY_START_STACK_INCR 25
583 /* Report a fatal error. */
584 #ifndef YY_FATAL_ERROR
585 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
588 /* Default declaration of generated scanner - a define so the user can
589 * easily add parameters.
592 #define YY_DECL int yylex YY_PROTO(( void ))
595 /* Code executed at the beginning of each rule, after yytext and yyleng
598 #ifndef YY_USER_ACTION
599 #define YY_USER_ACTION
602 /* Code executed at the end of each rule. */
604 #define YY_BREAK break;
607 #define YY_RULE_SETUP \
612 register yy_state_type yy_current_state;
613 register char *yy_cp, *yy_bp;
619 /* literal keyword tokens */
622 The actions associated with each text token are to
623 keep track of the current location (for syntax error reporting)
624 and to report any necessary info to the emf.y parse tree builder
626 Its likely that there are a number of omissions, inconsistencies
627 (some keywords do not need to be in caps), and relics
628 (keywords such as BETWEEN, INDICATOR, etc., are not used
630 This parser is somewhat of a work in progress.
633 #line 634 "schemalexer.cc"
644 yy_start = 1; /* first start state */
652 if ( ! yy_current_buffer )
654 yy_create_buffer( yyin, YY_BUF_SIZE );
656 yy_load_buffer_state();
659 while ( 1 ) /* loops until end-of-file is reached */
663 /* Support of yytext. */
664 *yy_cp = yy_hold_char;
666 /* yy_bp points to the position in yy_ch_buf of the start of
671 yy_current_state = yy_start;
675 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
676 if ( yy_accept[yy_current_state] )
678 yy_last_accepting_state = yy_current_state;
679 yy_last_accepting_cpos = yy_cp;
681 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
683 yy_current_state = (int) yy_def[yy_current_state];
684 if ( yy_current_state >= 31 )
685 yy_c = yy_meta[(unsigned int) yy_c];
687 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
690 while ( yy_base[yy_current_state] != 40 );
693 yy_act = yy_accept[yy_current_state];
695 { /* have to back up */
696 yy_cp = yy_last_accepting_cpos;
697 yy_current_state = yy_last_accepting_state;
698 yy_act = yy_accept[yy_current_state];
704 do_action: /* This label is used only to access EOF actions. */
708 { /* beginning of action switch */
709 case 0: /* must back up */
710 /* undo the effects of YY_DO_BEFORE_ACTION */
711 *yy_cp = yy_hold_char;
712 yy_cp = yy_last_accepting_cpos;
713 yy_current_state = yy_last_accepting_state;
719 { flex_schema_ch+=SchemaParserleng; return TABLE; }
724 { flex_schema_ch+=SchemaParserleng; return STREAM; }
729 {flex_schema_ch+=SchemaParserleng; return SEMICOLON;}
734 {flex_schema_ch+=SchemaParserleng; return LEFTBRACE;}
739 {flex_schema_ch+=SchemaParserleng; return RIGHTBRACE;}
744 { flex_schema_ch+=SchemaParserleng; return yytext[0]; }
750 { flex_schema_ch+=SchemaParserleng; SchemaParserlval.strval = strdup(yytext); return NAME; }
753 /* Newline : advance the error reporting line number */
754 /* and grab the next line into flex_linebuf */
759 {flex_schema_ch=0; flex_schema_lineno++;
760 strcpy(flex_schema_linebuf,SchemaParsertext+1);
767 {flex_schema_ch+=SchemaParserleng; } /* white space */
770 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
771 yy_c_buf_p = yy_cp -= 1;
772 YY_DO_BEFORE_ACTION; /* set up yytext again */
775 {flex_schema_ch+=SchemaParserleng; }; /* comment */
777 /* Parse error on anything else. */
781 {fprintf(stderr,"Warning: unknown token (ignored)\n"); SchemaParsererror(yytext);}
788 #line 789 "schemalexer.cc"
789 case YY_STATE_EOF(INITIAL):
792 case YY_END_OF_BUFFER:
794 /* Amount of text matched not including the EOB char. */
795 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
797 /* Undo the effects of YY_DO_BEFORE_ACTION. */
798 *yy_cp = yy_hold_char;
799 YY_RESTORE_YY_MORE_OFFSET
801 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
803 /* We're scanning a new file or input source. It's
804 * possible that this happened because the user
805 * just pointed yyin at a new source and called
806 * yylex(). If so, then we have to assure
807 * consistency between yy_current_buffer and our
808 * globals. Here is the right place to do so, because
809 * this is the first action (other than possibly a
810 * back-up) that will match for the new input source.
812 yy_n_chars = yy_current_buffer->yy_n_chars;
813 yy_current_buffer->yy_input_file = yyin;
814 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
817 /* Note that here we test for yy_c_buf_p "<=" to the position
818 * of the first EOB in the buffer, since yy_c_buf_p will
819 * already have been incremented past the NUL character
820 * (since all states make transitions on EOB to the
821 * end-of-buffer state). Contrast this with the test
824 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
825 { /* This was really a NUL. */
826 yy_state_type yy_next_state;
828 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
830 yy_current_state = yy_get_previous_state();
832 /* Okay, we're now positioned to make the NUL
833 * transition. We couldn't have
834 * yy_get_previous_state() go ahead and do it
835 * for us because it doesn't know how to deal
836 * with the possibility of jamming (and we don't
837 * want to build jamming into it because then it
838 * will run more slowly).
841 yy_next_state = yy_try_NUL_trans( yy_current_state );
843 yy_bp = yytext_ptr + YY_MORE_ADJ;
847 /* Consume the NUL. */
848 yy_cp = ++yy_c_buf_p;
849 yy_current_state = yy_next_state;
860 else switch ( yy_get_next_buffer() )
862 case EOB_ACT_END_OF_FILE:
864 yy_did_buffer_switch_on_eof = 0;
868 /* Note: because we've taken care in
869 * yy_get_next_buffer() to have set up
870 * yytext, we can now set up
871 * yy_c_buf_p so that if some total
872 * hoser (like flex itself) wants to
873 * call the scanner after we return the
874 * YY_NULL, it'll still work - another
875 * YY_NULL will get returned.
877 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
879 yy_act = YY_STATE_EOF(YY_START);
885 if ( ! yy_did_buffer_switch_on_eof )
891 case EOB_ACT_CONTINUE_SCAN:
893 yytext_ptr + yy_amount_of_matched_text;
895 yy_current_state = yy_get_previous_state();
898 yy_bp = yytext_ptr + YY_MORE_ADJ;
901 case EOB_ACT_LAST_MATCH:
903 &yy_current_buffer->yy_ch_buf[yy_n_chars];
905 yy_current_state = yy_get_previous_state();
908 yy_bp = yytext_ptr + YY_MORE_ADJ;
916 "fatal flex scanner internal error--no action found" );
917 } /* end of action switch */
918 } /* end of scanning one token */
922 /* yy_get_next_buffer - try to read in a new buffer
924 * Returns a code representing an action:
925 * EOB_ACT_LAST_MATCH -
926 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
927 * EOB_ACT_END_OF_FILE - end of file
930 static int yy_get_next_buffer()
932 register char *dest = yy_current_buffer->yy_ch_buf;
933 register char *source = yytext_ptr;
934 register int number_to_move, i;
937 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
939 "fatal flex scanner internal error--end of buffer missed" );
941 if ( yy_current_buffer->yy_fill_buffer == 0 )
942 { /* Don't try to fill the buffer, so this is an EOF. */
943 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
945 /* We matched a single character, the EOB, so
946 * treat this as a final EOF.
948 return EOB_ACT_END_OF_FILE;
953 /* We matched some text prior to the EOB, first
956 return EOB_ACT_LAST_MATCH;
960 /* Try to read more data. */
962 /* First move last chars to start of buffer. */
963 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
965 for ( i = 0; i < number_to_move; ++i )
966 *(dest++) = *(source++);
968 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
969 /* don't do the read, it's not guaranteed to return an EOF,
972 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
977 yy_current_buffer->yy_buf_size - number_to_move - 1;
979 while ( num_to_read <= 0 )
980 { /* Not enough room in the buffer - grow it. */
981 #ifdef YY_USES_REJECT
983 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
986 /* just a shorter name for the current buffer */
987 YY_BUFFER_STATE b = yy_current_buffer;
989 int yy_c_buf_p_offset =
990 (int) (yy_c_buf_p - b->yy_ch_buf);
992 if ( b->yy_is_our_buffer )
994 int new_size = b->yy_buf_size * 2;
997 b->yy_buf_size += b->yy_buf_size / 8;
1001 b->yy_ch_buf = (char *)
1002 /* Include room in for 2 EOB chars. */
1003 yy_flex_realloc( (void *) b->yy_ch_buf,
1004 b->yy_buf_size + 2 );
1007 /* Can't grow it, we don't own it. */
1010 if ( ! b->yy_ch_buf )
1012 "fatal error - scanner input buffer overflow" );
1014 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1016 num_to_read = yy_current_buffer->yy_buf_size -
1021 if ( num_to_read > YY_READ_BUF_SIZE )
1022 num_to_read = YY_READ_BUF_SIZE;
1024 /* Read in more data. */
1025 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1026 yy_n_chars, num_to_read );
1028 yy_current_buffer->yy_n_chars = yy_n_chars;
1031 if ( yy_n_chars == 0 )
1033 if ( number_to_move == YY_MORE_ADJ )
1035 ret_val = EOB_ACT_END_OF_FILE;
1041 ret_val = EOB_ACT_LAST_MATCH;
1042 yy_current_buffer->yy_buffer_status =
1043 YY_BUFFER_EOF_PENDING;
1048 ret_val = EOB_ACT_CONTINUE_SCAN;
1050 yy_n_chars += number_to_move;
1051 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1052 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1054 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1060 /* yy_get_previous_state - get the state just before the EOB char was reached */
1062 static yy_state_type yy_get_previous_state()
1064 register yy_state_type yy_current_state;
1065 register char *yy_cp;
1067 yy_current_state = yy_start;
1069 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1071 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1072 if ( yy_accept[yy_current_state] )
1074 yy_last_accepting_state = yy_current_state;
1075 yy_last_accepting_cpos = yy_cp;
1077 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1079 yy_current_state = (int) yy_def[yy_current_state];
1080 if ( yy_current_state >= 31 )
1081 yy_c = yy_meta[(unsigned int) yy_c];
1083 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1086 return yy_current_state;
1090 /* yy_try_NUL_trans - try to make a transition on the NUL character
1093 * next_state = yy_try_NUL_trans( current_state );
1096 #ifdef YY_USE_PROTOS
1097 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
1099 static yy_state_type yy_try_NUL_trans( yy_current_state )
1100 yy_state_type yy_current_state;
1103 register int yy_is_jam;
1104 register char *yy_cp = yy_c_buf_p;
1106 register YY_CHAR yy_c = 1;
1107 if ( yy_accept[yy_current_state] )
1109 yy_last_accepting_state = yy_current_state;
1110 yy_last_accepting_cpos = yy_cp;
1112 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1114 yy_current_state = (int) yy_def[yy_current_state];
1115 if ( yy_current_state >= 31 )
1116 yy_c = yy_meta[(unsigned int) yy_c];
1118 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1119 yy_is_jam = (yy_current_state == 30);
1121 return yy_is_jam ? 0 : yy_current_state;
1126 #ifdef YY_USE_PROTOS
1127 static void yyunput( int c, register char *yy_bp )
1129 static void yyunput( c, yy_bp )
1131 register char *yy_bp;
1134 register char *yy_cp = yy_c_buf_p;
1136 /* undo effects of setting up yytext */
1137 *yy_cp = yy_hold_char;
1139 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1140 { /* need to shift things up to make room */
1141 /* +2 for EOB chars. */
1142 register int number_to_move = yy_n_chars + 2;
1143 register char *dest = &yy_current_buffer->yy_ch_buf[
1144 yy_current_buffer->yy_buf_size + 2];
1145 register char *source =
1146 &yy_current_buffer->yy_ch_buf[number_to_move];
1148 while ( source > yy_current_buffer->yy_ch_buf )
1149 *--dest = *--source;
1151 yy_cp += (int) (dest - source);
1152 yy_bp += (int) (dest - source);
1153 yy_current_buffer->yy_n_chars =
1154 yy_n_chars = yy_current_buffer->yy_buf_size;
1156 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1157 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1160 *--yy_cp = (char) c;
1164 yy_hold_char = *yy_cp;
1167 #endif /* ifndef YY_NO_UNPUT */
1171 static int yyinput()
1177 static int _xpg = -1;
1181 char *_xpgenv = getenv("_XPG");
1182 if (_xpgenv == NULL)
1186 _xpg = atoi(_xpgenv);
1192 *yy_c_buf_p = yy_hold_char;
1194 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1196 /* yy_c_buf_p now points to the character we want to return.
1197 * If this occurs *before* the EOB characters, then it's a
1198 * valid NUL; if not, then we've hit the end of the buffer.
1200 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1201 /* This was really a NUL. */
1205 { /* need more input */
1206 int offset = yy_c_buf_p - yytext_ptr;
1209 switch ( yy_get_next_buffer() )
1211 case EOB_ACT_LAST_MATCH:
1212 /* This happens because yy_g_n_b()
1213 * sees that we've accumulated a
1214 * token and flags that we need to
1215 * try matching the token before
1216 * proceeding. But for input(),
1217 * there's no matching to consider.
1218 * So convert the EOB_ACT_LAST_MATCH
1219 * to EOB_ACT_END_OF_FILE.
1222 /* Reset buffer status. */
1227 case EOB_ACT_END_OF_FILE:
1235 if ( ! yy_did_buffer_switch_on_eof )
1244 case EOB_ACT_CONTINUE_SCAN:
1245 yy_c_buf_p = yytext_ptr + offset;
1251 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
1252 *yy_c_buf_p = '\0'; /* preserve yytext */
1253 yy_hold_char = *++yy_c_buf_p;
1260 #ifdef YY_USE_PROTOS
1261 void yyrestart( FILE *input_file )
1263 void yyrestart( input_file )
1267 if ( ! yy_current_buffer )
1268 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1270 yy_init_buffer( yy_current_buffer, input_file );
1271 yy_load_buffer_state();
1275 #ifdef YY_USE_PROTOS
1276 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1278 void yy_switch_to_buffer( new_buffer )
1279 YY_BUFFER_STATE new_buffer;
1282 if ( yy_current_buffer == new_buffer )
1285 if ( yy_current_buffer )
1287 /* Flush out information for old buffer. */
1288 *yy_c_buf_p = yy_hold_char;
1289 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
1290 yy_current_buffer->yy_n_chars = yy_n_chars;
1293 yy_current_buffer = new_buffer;
1294 yy_load_buffer_state();
1296 /* We don't actually know whether we did this switch during
1297 * EOF (yywrap()) processing, but the only time this flag
1298 * is looked at is after yywrap() is called, so it's safe
1299 * to go ahead and always set it.
1301 yy_did_buffer_switch_on_eof = 1;
1305 #ifdef YY_USE_PROTOS
1306 void yy_load_buffer_state( void )
1308 void yy_load_buffer_state()
1311 yy_n_chars = yy_current_buffer->yy_n_chars;
1312 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
1313 yyin = yy_current_buffer->yy_input_file;
1314 yy_hold_char = *yy_c_buf_p;
1318 #ifdef YY_USE_PROTOS
1319 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
1321 YY_BUFFER_STATE yy_create_buffer( file, size )
1328 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1330 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1332 b->yy_buf_size = size;
1334 /* yy_ch_buf has to be 2 characters longer than the size given because
1335 * we need to put in 2 end-of-buffer characters.
1337 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
1338 if ( ! b->yy_ch_buf )
1339 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1341 b->yy_is_our_buffer = 1;
1343 yy_init_buffer( b, file );
1349 #ifdef YY_USE_PROTOS
1350 void yy_delete_buffer( YY_BUFFER_STATE b )
1352 void yy_delete_buffer( b )
1359 if ( b == yy_current_buffer )
1360 yy_current_buffer = (YY_BUFFER_STATE) 0;
1362 if ( b->yy_is_our_buffer )
1363 yy_flex_free( (void *) b->yy_ch_buf );
1365 yy_flex_free( (void *) b );
1369 #ifndef YY_ALWAYS_INTERACTIVE
1370 #ifndef YY_NEVER_INTERACTIVE
1371 extern int isatty YY_PROTO(( int ));
1375 #ifdef YY_USE_PROTOS
1376 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
1378 void yy_init_buffer( b, file )
1385 yy_flush_buffer( b );
1387 b->yy_input_file = file;
1388 b->yy_fill_buffer = 1;
1390 #if YY_ALWAYS_INTERACTIVE
1391 b->yy_is_interactive = 1;
1393 #if YY_NEVER_INTERACTIVE
1394 b->yy_is_interactive = 0;
1396 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1402 #ifdef YY_USE_PROTOS
1403 void yy_flush_buffer( YY_BUFFER_STATE b )
1405 void yy_flush_buffer( b )
1415 /* We always need two end-of-buffer characters. The first causes
1416 * a transition to the end-of-buffer state. The second causes
1417 * a jam in that state.
1419 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1420 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1422 b->yy_buf_pos = &b->yy_ch_buf[0];
1425 b->yy_buffer_status = YY_BUFFER_NEW;
1427 if ( b == yy_current_buffer )
1428 yy_load_buffer_state();
1432 #ifndef YY_NO_SCAN_BUFFER
1433 #ifdef YY_USE_PROTOS
1434 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
1436 YY_BUFFER_STATE yy_scan_buffer( base, size )
1444 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1445 base[size-1] != YY_END_OF_BUFFER_CHAR )
1446 /* They forgot to leave room for the EOB's. */
1449 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1451 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1453 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1454 b->yy_buf_pos = b->yy_ch_buf = base;
1455 b->yy_is_our_buffer = 0;
1456 b->yy_input_file = 0;
1457 b->yy_n_chars = b->yy_buf_size;
1458 b->yy_is_interactive = 0;
1460 b->yy_fill_buffer = 0;
1461 b->yy_buffer_status = YY_BUFFER_NEW;
1463 yy_switch_to_buffer( b );
1470 #ifndef YY_NO_SCAN_STRING
1471 #ifdef YY_USE_PROTOS
1472 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
1474 YY_BUFFER_STATE yy_scan_string( yy_str )
1475 yyconst char *yy_str;
1479 for ( len = 0; yy_str[len]; ++len )
1482 return yy_scan_bytes( yy_str, len );
1487 #ifndef YY_NO_SCAN_BYTES
1488 #ifdef YY_USE_PROTOS
1489 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
1491 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
1492 yyconst char *bytes;
1501 /* Get memory for full buffer, including space for trailing EOB's. */
1503 buf = (char *) yy_flex_alloc( n );
1505 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1507 for ( i = 0; i < len; ++i )
1510 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
1512 b = yy_scan_buffer( buf, n );
1514 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1516 /* It's okay to grow etc. this buffer, and we should throw it
1517 * away when we're done.
1519 b->yy_is_our_buffer = 1;
1526 #ifndef YY_NO_PUSH_STATE
1527 #ifdef YY_USE_PROTOS
1528 static void yy_push_state( int new_state )
1530 static void yy_push_state( new_state )
1534 if ( yy_start_stack_ptr >= yy_start_stack_depth )
1538 yy_start_stack_depth += YY_START_STACK_INCR;
1539 new_size = yy_start_stack_depth * sizeof( int );
1541 if ( ! yy_start_stack )
1542 yy_start_stack = (int *) yy_flex_alloc( new_size );
1545 yy_start_stack = (int *) yy_flex_realloc(
1546 (void *) yy_start_stack, new_size );
1548 if ( ! yy_start_stack )
1550 "out of memory expanding start-condition stack" );
1553 yy_start_stack[yy_start_stack_ptr++] = YY_START;
1560 #ifndef YY_NO_POP_STATE
1561 static void yy_pop_state()
1563 if ( --yy_start_stack_ptr < 0 )
1564 YY_FATAL_ERROR( "start-condition stack underflow" );
1566 BEGIN(yy_start_stack[yy_start_stack_ptr]);
1571 #ifndef YY_NO_TOP_STATE
1572 static int yy_top_state()
1574 return yy_start_stack[yy_start_stack_ptr - 1];
1578 #ifndef YY_EXIT_FAILURE
1579 #define YY_EXIT_FAILURE 2
1582 #ifdef YY_USE_PROTOS
1583 static void yy_fatal_error( yyconst char msg[] )
1585 static void yy_fatal_error( msg )
1589 (void) fprintf( stderr, "%s\n", msg );
1590 exit( YY_EXIT_FAILURE );
1595 /* Redefine yyless() so it works in section 3 code. */
1601 /* Undo effects of setting up yytext. */ \
1602 yytext[yyleng] = yy_hold_char; \
1603 yy_c_buf_p = yytext + n; \
1604 yy_hold_char = *yy_c_buf_p; \
1605 *yy_c_buf_p = '\0'; \
1611 /* Internal utility routines. */
1614 #ifdef YY_USE_PROTOS
1615 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
1617 static void yy_flex_strncpy( s1, s2, n )
1624 for ( i = 0; i < n; ++i )
1629 #ifdef YY_NEED_STRLEN
1630 #ifdef YY_USE_PROTOS
1631 static int yy_flex_strlen( yyconst char *s )
1633 static int yy_flex_strlen( s )
1638 for ( n = 0; s[n]; ++n )
1646 #ifdef YY_USE_PROTOS
1647 static void *yy_flex_alloc( yy_size_t size )
1649 static void *yy_flex_alloc( size )
1653 return (void *) malloc( size );
1656 #ifdef YY_USE_PROTOS
1657 static void *yy_flex_realloc( void *ptr, yy_size_t size )
1659 static void *yy_flex_realloc( ptr, size )
1664 /* The cast to (char *) in the following accommodates both
1665 * implementations that use char* generic pointers, and those
1666 * that use void* generic pointers. It works with the latter
1667 * because both ANSI C and C++ allow castless assignment from
1668 * any pointer type to void*, and deal with argument conversions
1669 * as though doing an assignment.
1671 return (void *) realloc( (char *) ptr, size );
1674 #ifdef YY_USE_PROTOS
1675 static void yy_flex_free( void *ptr )
1677 static void yy_flex_free( ptr )
1691 #line 120 "schema.l"