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