Fixed newline characters throughout the code
[com/gs-lite.git] / src / ftacmp / schemalexer.cc
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
18
19 #line 20 "schemalexer.cc"
20 /* A lexical scanner generated by flex */
21
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 $
24  */
25
26 #define FLEX_SCANNER
27 #define YY_FLEX_MAJOR_VERSION 2
28 #define YY_FLEX_MINOR_VERSION 5
29
30 #include <stdio.h>
31
32
33 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
34 #ifdef c_plusplus
35 #ifndef __cplusplus
36 #define __cplusplus
37 #endif
38 #endif
39
40
41 #ifdef __cplusplus
42
43 #include <stdlib.h>
44 #include <unistd.h>
45
46 /* Use prototypes in function declarations. */
47 #define YY_USE_PROTOS
48
49 /* The "const" storage-class-modifier is valid. */
50 #define YY_USE_CONST
51
52 #else   /* ! __cplusplus */
53
54 #if __STDC__
55
56 #define YY_USE_PROTOS
57 #define YY_USE_CONST
58
59 #endif  /* __STDC__ */
60 #endif  /* ! __cplusplus */
61
62 #ifdef __TURBOC__
63  #pragma warn -rch
64  #pragma warn -use
65 #include <io.h>
66 #include <stdlib.h>
67 #define YY_USE_CONST
68 #define YY_USE_PROTOS
69 #endif
70
71 #ifdef YY_USE_CONST
72 #define yyconst const
73 #else
74 #define yyconst
75 #endif
76
77
78 #ifdef YY_USE_PROTOS
79 #define YY_PROTO(proto) proto
80 #else
81 #define YY_PROTO(proto) ()
82 #endif
83
84 /* Returned upon end-of-file. */
85 #define YY_NULL 0
86
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
90  * double cast.
91  */
92 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
93
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.
97  */
98 #define BEGIN yy_start = 1 + 2 *
99
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
102  * compatibility.
103  */
104 #define YY_START ((yy_start - 1) / 2)
105 #define YYSTATE YY_START
106
107 /* Action number for EOF rule of a given start state. */
108 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
109
110 /* Special action meaning "start processing a new file". */
111 #define YY_NEW_FILE yyrestart( yyin )
112
113 #define YY_END_OF_BUFFER_CHAR 0
114
115 /* Size of default input buffer. */
116 #define YY_BUF_SIZE 16384
117
118 typedef struct yy_buffer_state *YY_BUFFER_STATE;
119
120 extern int yyleng;
121 extern FILE *yyin, *yyout;
122
123 #define EOB_ACT_CONTINUE_SCAN 0
124 #define EOB_ACT_END_OF_FILE 1
125 #define EOB_ACT_LAST_MATCH 2
126
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:
130  *
131  *      if ( condition_holds )
132  *              yyless( 5 );
133  *      else
134  *              do_something_else();
135  *
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.
139  */
140
141 /* Return all but the first 'n' matched characters back to the input stream. */
142
143 #define yyless(n) \
144         do \
145                 { \
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 */ \
151                 } \
152         while ( 0 )
153
154 #define unput(c) yyunput( c, yytext_ptr )
155
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).
159  */
160 typedef unsigned int yy_size_t;
161
162
163 struct yy_buffer_state
164         {
165         FILE *yy_input_file;
166
167         char *yy_ch_buf;                /* input buffer */
168         char *yy_buf_pos;               /* current position in input buffer */
169
170         /* Size of input buffer in bytes, not including room for EOB
171          * characters.
172          */
173         yy_size_t yy_buf_size;
174
175         /* Number of characters read into yy_ch_buf, not including EOB
176          * characters.
177          */
178         int yy_n_chars;
179
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
182          * delete it.
183          */
184         int yy_is_our_buffer;
185
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
189          * each newline.
190          */
191         int yy_is_interactive;
192
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
195          * not.
196          */
197         int yy_at_bol;
198
199         /* Whether to try to fill the input buffer when we reach the
200          * end of it.
201          */
202         int yy_fill_buffer;
203
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.
212          *
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.
216          */
217 #define YY_BUFFER_EOF_PENDING 2
218         };
219
220 static YY_BUFFER_STATE yy_current_buffer = 0;
221
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
224  * "scanner state".
225  */
226 #define YY_CURRENT_BUFFER yy_current_buffer
227
228
229 /* yy_hold_char holds the character lost when yytext is formed. */
230 static char yy_hold_char;
231
232 static int yy_n_chars;          /* number of characters read into yy_ch_buf */
233
234
235 int yyleng;
236
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 */
241
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 ...
244  */
245 static int yy_did_buffer_switch_on_eof;
246
247 void yyrestart YY_PROTO(( FILE *input_file ));
248
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 )
256
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 ));
260
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 * ));
264
265 #define yy_new_buffer yy_create_buffer
266
267 #define yy_set_interactive(is_interactive) \
268         { \
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; \
272         }
273
274 #define yy_set_bol(at_bol) \
275         { \
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; \
279         }
280
281 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
282
283 typedef unsigned char YY_CHAR;
284 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
285 typedef int yy_state_type;
286 extern char *yytext;
287 #define yytext_ptr yytext
288
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[] ));
293
294 /* Done after the current pattern has been matched and before the
295  * corresponding action - sets up yytext.
296  */
297 #define YY_DO_BEFORE_ACTION \
298         yytext_ptr = yy_bp; \
299         yyleng = (int) (yy_cp - yy_bp); \
300         yy_hold_char = *yy_cp; \
301         *yy_cp = '\0'; \
302         yy_c_buf_p = yy_cp;
303
304 #define YY_NUM_RULES 12
305 #define YY_END_OF_BUFFER 13
306 static yyconst short int yy_accept[31] =
307     {   0,
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
311     } ;
312
313 static yyconst int yy_ec[256] =
314     {   0,
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,
325
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,
336
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,
342         1,    1,    1,    1,    1
343     } ;
344
345 static yyconst int yy_meta[19] =
346     {   0,
347         1,    1,    2,    1,    1,    3,    1,    3,    3,    3,
348         3,    3,    3,    3,    3,    3,    1,    1
349     } ;
350
351 static yyconst short int yy_base[34] =
352     {   0,
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,
356        18,   17,   21
357     } ;
358
359 static yyconst short int yy_def[34] =
360     {   0,
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,
364        30,   30,   30
365     } ;
366
367 static yyconst short int yy_nxt[59] =
368     {   0,
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
375     } ;
376
377 static yyconst short int yy_chk[59] =
378     {   0,
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
385     } ;
386
387 static yy_state_type yy_last_accepting_state;
388 static char *yy_last_accepting_cpos;
389
390 /* The intent behind this definition is that it'll catch
391  * any uses of REJECT which flex missed.
392  */
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
397 char *yytext;
398 #line 1 "schema.l"
399 #define INITIAL 0
400 /*
401         MUST COMPILE WITH
402                 flex -PSchemaParser -oschemalexer.cc schema.l
403         (or equivalent).
404 */
405 #line 9 "schema.l"
406 /*
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.
409  */
410
411  #include "parse_schema.h"
412  #include <string.h>
413
414
415
416 #include "schema.tab.cc.h"
417
418 /*
419         Some includes that flex doesn't include as standard,
420         but which are needed.
421 */
422
423 #include <stdlib.h>
424 #include <string.h>
425
426
427 //              Prevent flex from defining yywrap as extern "C"
428
429 #define YY_SKIP_YYWRAP
430
431 /*              No lex lib, supply the yywrap fcn. that normally resides there
432 */
433
434 int SchemaParserwrap(){return(1);}
435
436 extern int SchemaParserdebug;
437
438
439 /*
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.
444
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
448                                   for now.
449 */
450
451 int flex_schema_lineno = 1;
452 int flex_schema_ch = 0;
453 char flex_schema_linebuf[1000];
454
455 //void SchemaParsererror(char *s);
456
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,"^");
461 }
462
463
464 /* MKS needs the next line to increase the NFA table */
465 #line 466 "schemalexer.cc"
466
467 /* Macros after this point can all be overridden by user definitions in
468  * section 1.
469  */
470
471 #ifndef YY_SKIP_YYWRAP
472 #ifdef __cplusplus
473 extern "C" int yywrap YY_PROTO(( void ));
474 #else
475 extern int yywrap YY_PROTO(( void ));
476 #endif
477 #endif
478
479 #ifndef YY_NO_UNPUT
480 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
481 #endif
482
483 #ifndef yytext_ptr
484 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
485 #endif
486
487 #ifdef YY_NEED_STRLEN
488 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
489 #endif
490
491 #ifndef YY_NO_INPUT
492 #ifdef __cplusplus
493 static int yyinput YY_PROTO(( void ));
494 #else
495 static int input YY_PROTO(( void ));
496 #endif
497 #endif
498
499 #if YY_STACK_USED
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 ));
505 #endif
506 #ifndef YY_NO_POP_STATE
507 static void yy_pop_state YY_PROTO(( void ));
508 #endif
509 #ifndef YY_NO_TOP_STATE
510 static int yy_top_state YY_PROTO(( void ));
511 #endif
512
513 #else
514 #define YY_NO_PUSH_STATE 1
515 #define YY_NO_POP_STATE 1
516 #define YY_NO_TOP_STATE 1
517 #endif
518
519 #ifdef YY_MALLOC_DECL
520 YY_MALLOC_DECL
521 #else
522 #if __STDC__
523 #ifndef __cplusplus
524 #include <stdlib.h>
525 #endif
526 #else
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).
530  */
531 #endif
532 #endif
533
534 /* Amount of stuff to slurp up with each read. */
535 #ifndef YY_READ_BUF_SIZE
536 #define YY_READ_BUF_SIZE 8192
537 #endif
538
539 /* Copy whatever the last rule matched to the standard output. */
540
541 #ifndef ECHO
542 /* This used to be an fputs(), but since the string might contain NUL's,
543  * we now use fwrite().
544  */
545 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
546 #endif
547
548 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
549  * is returned in "result".
550  */
551 #ifndef YY_INPUT
552 #define YY_INPUT(buf,result,max_size) \
553         if ( yy_current_buffer->yy_is_interactive ) \
554                 { \
555                 int c = '*', n; \
556                 for ( n = 0; n < max_size && \
557                              (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
558                         buf[n] = (char) c; \
559                 if ( c == '\n' ) \
560                         buf[n++] = (char) c; \
561                 if ( c == EOF && ferror( yyin ) ) \
562                         YY_FATAL_ERROR( "input in flex scanner failed" ); \
563                 result = n; \
564                 } \
565         else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
566                   && ferror( yyin ) ) \
567                 YY_FATAL_ERROR( "input in flex scanner failed" );
568 #endif
569
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.
573  */
574 #ifndef yyterminate
575 #define yyterminate() return YY_NULL
576 #endif
577
578 /* Number of entries by which start-condition stack grows. */
579 #ifndef YY_START_STACK_INCR
580 #define YY_START_STACK_INCR 25
581 #endif
582
583 /* Report a fatal error. */
584 #ifndef YY_FATAL_ERROR
585 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
586 #endif
587
588 /* Default declaration of generated scanner - a define so the user can
589  * easily add parameters.
590  */
591 #ifndef YY_DECL
592 #define YY_DECL int yylex YY_PROTO(( void ))
593 #endif
594
595 /* Code executed at the beginning of each rule, after yytext and yyleng
596  * have been set up.
597  */
598 #ifndef YY_USER_ACTION
599 #define YY_USER_ACTION
600 #endif
601
602 /* Code executed at the end of each rule. */
603 #ifndef YY_BREAK
604 #define YY_BREAK break;
605 #endif
606
607 #define YY_RULE_SETUP \
608         YY_USER_ACTION
609
610 YY_DECL
611         {
612         register yy_state_type yy_current_state;
613         register char *yy_cp, *yy_bp;
614         register int yy_act;
615
616 #line 71 "schema.l"
617
618
619         /* literal keyword tokens */
620
621  /*
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
625
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
629                          in emf.y)
630                         This parser is somewhat of a work in progress.
631  */
632
633 #line 634 "schemalexer.cc"
634
635         if ( yy_init )
636                 {
637                 yy_init = 0;
638
639 #ifdef YY_USER_INIT
640                 YY_USER_INIT;
641 #endif
642
643                 if ( ! yy_start )
644                         yy_start = 1;   /* first start state */
645
646                 if ( ! yyin )
647                         yyin = stdin;
648
649                 if ( ! yyout )
650                         yyout = stdout;
651
652                 if ( ! yy_current_buffer )
653                         yy_current_buffer =
654                                 yy_create_buffer( yyin, YY_BUF_SIZE );
655
656                 yy_load_buffer_state();
657                 }
658
659         while ( 1 )             /* loops until end-of-file is reached */
660                 {
661                 yy_cp = yy_c_buf_p;
662
663                 /* Support of yytext. */
664                 *yy_cp = yy_hold_char;
665
666                 /* yy_bp points to the position in yy_ch_buf of the start of
667                  * the current run.
668                  */
669                 yy_bp = yy_cp;
670
671                 yy_current_state = yy_start;
672 yy_match:
673                 do
674                         {
675                         register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
676                         if ( yy_accept[yy_current_state] )
677                                 {
678                                 yy_last_accepting_state = yy_current_state;
679                                 yy_last_accepting_cpos = yy_cp;
680                                 }
681                         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
682                                 {
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];
686                                 }
687                         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
688                         ++yy_cp;
689                         }
690                 while ( yy_base[yy_current_state] != 40 );
691
692 yy_find_action:
693                 yy_act = yy_accept[yy_current_state];
694                 if ( yy_act == 0 )
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];
699                         }
700
701                 YY_DO_BEFORE_ACTION;
702
703
704 do_action:      /* This label is used only to access EOF actions. */
705
706
707                 switch ( yy_act )
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;
714                         goto yy_find_action;
715
716 case 1:
717 YY_RULE_SETUP
718 #line 87 "schema.l"
719 { flex_schema_ch+=SchemaParserleng; return TABLE; }
720         YY_BREAK
721 case 2:
722 YY_RULE_SETUP
723 #line 88 "schema.l"
724 { flex_schema_ch+=SchemaParserleng; return STREAM; }
725         YY_BREAK
726 case 3:
727 YY_RULE_SETUP
728 #line 90 "schema.l"
729 {flex_schema_ch+=SchemaParserleng; return SEMICOLON;}
730         YY_BREAK
731 case 4:
732 YY_RULE_SETUP
733 #line 91 "schema.l"
734 {flex_schema_ch+=SchemaParserleng; return LEFTBRACE;}
735         YY_BREAK
736 case 5:
737 YY_RULE_SETUP
738 #line 92 "schema.l"
739 {flex_schema_ch+=SchemaParserleng; return RIGHTBRACE;}
740         YY_BREAK
741 case 6:
742 YY_RULE_SETUP
743 #line 94 "schema.l"
744 { flex_schema_ch+=SchemaParserleng; return yytext[0]; }
745         YY_BREAK
746 /* names */
747 case 7:
748 YY_RULE_SETUP
749 #line 99 "schema.l"
750 { flex_schema_ch+=SchemaParserleng; SchemaParserlval.strval = strdup(yytext); return NAME; }
751         YY_BREAK
752 /*                                                                                                                      */
753 /*              Newline : advance the error reporting line number       */
754 /*              and grab the next line into flex_linebuf                        */
755 /*                                                                                                                      */
756 case 8:
757 YY_RULE_SETUP
758 #line 107 "schema.l"
759 {flex_schema_ch=0; flex_schema_lineno++;
760                            strcpy(flex_schema_linebuf,SchemaParsertext+1);
761                            yyless(1);
762                            }
763         YY_BREAK
764 case 9:
765 YY_RULE_SETUP
766 #line 112 "schema.l"
767 {flex_schema_ch+=SchemaParserleng; }    /* white space */
768         YY_BREAK
769 case 10:
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 */
773 YY_RULE_SETUP
774 #line 114 "schema.l"
775 {flex_schema_ch+=SchemaParserleng; };   /* comment */
776         YY_BREAK
777 /*              Parse error on anything else.           */
778 case 11:
779 YY_RULE_SETUP
780 #line 117 "schema.l"
781 {fprintf(stderr,"Warning: unknown token (ignored)\n");  SchemaParsererror(yytext);}
782         YY_BREAK
783 case 12:
784 YY_RULE_SETUP
785 #line 120 "schema.l"
786 ECHO;
787         YY_BREAK
788 #line 789 "schemalexer.cc"
789 case YY_STATE_EOF(INITIAL):
790         yyterminate();
791
792         case YY_END_OF_BUFFER:
793                 {
794                 /* Amount of text matched not including the EOB char. */
795                 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
796
797                 /* Undo the effects of YY_DO_BEFORE_ACTION. */
798                 *yy_cp = yy_hold_char;
799                 YY_RESTORE_YY_MORE_OFFSET
800
801                 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
802                         {
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.
811                          */
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;
815                         }
816
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
822                  * in input().
823                  */
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;
827
828                         yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
829
830                         yy_current_state = yy_get_previous_state();
831
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).
839                          */
840
841                         yy_next_state = yy_try_NUL_trans( yy_current_state );
842
843                         yy_bp = yytext_ptr + YY_MORE_ADJ;
844
845                         if ( yy_next_state )
846                                 {
847                                 /* Consume the NUL. */
848                                 yy_cp = ++yy_c_buf_p;
849                                 yy_current_state = yy_next_state;
850                                 goto yy_match;
851                                 }
852
853                         else
854                                 {
855                                 yy_cp = yy_c_buf_p;
856                                 goto yy_find_action;
857                                 }
858                         }
859
860                 else switch ( yy_get_next_buffer() )
861                         {
862                         case EOB_ACT_END_OF_FILE:
863                                 {
864                                 yy_did_buffer_switch_on_eof = 0;
865
866                                 if ( yywrap() )
867                                         {
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.
876                                          */
877                                         yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
878
879                                         yy_act = YY_STATE_EOF(YY_START);
880                                         goto do_action;
881                                         }
882
883                                 else
884                                         {
885                                         if ( ! yy_did_buffer_switch_on_eof )
886                                                 YY_NEW_FILE;
887                                         }
888                                 break;
889                                 }
890
891                         case EOB_ACT_CONTINUE_SCAN:
892                                 yy_c_buf_p =
893                                         yytext_ptr + yy_amount_of_matched_text;
894
895                                 yy_current_state = yy_get_previous_state();
896
897                                 yy_cp = yy_c_buf_p;
898                                 yy_bp = yytext_ptr + YY_MORE_ADJ;
899                                 goto yy_match;
900
901                         case EOB_ACT_LAST_MATCH:
902                                 yy_c_buf_p =
903                                 &yy_current_buffer->yy_ch_buf[yy_n_chars];
904
905                                 yy_current_state = yy_get_previous_state();
906
907                                 yy_cp = yy_c_buf_p;
908                                 yy_bp = yytext_ptr + YY_MORE_ADJ;
909                                 goto yy_find_action;
910                         }
911                 break;
912                 }
913
914         default:
915                 YY_FATAL_ERROR(
916                         "fatal flex scanner internal error--no action found" );
917         } /* end of action switch */
918                 } /* end of scanning one token */
919         } /* end of yylex */
920
921
922 /* yy_get_next_buffer - try to read in a new buffer
923  *
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
928  */
929
930 static int yy_get_next_buffer()
931         {
932         register char *dest = yy_current_buffer->yy_ch_buf;
933         register char *source = yytext_ptr;
934         register int number_to_move, i;
935         int ret_val;
936
937         if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
938                 YY_FATAL_ERROR(
939                 "fatal flex scanner internal error--end of buffer missed" );
940
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 )
944                         {
945                         /* We matched a single character, the EOB, so
946                          * treat this as a final EOF.
947                          */
948                         return EOB_ACT_END_OF_FILE;
949                         }
950
951                 else
952                         {
953                         /* We matched some text prior to the EOB, first
954                          * process it.
955                          */
956                         return EOB_ACT_LAST_MATCH;
957                         }
958                 }
959
960         /* Try to read more data. */
961
962         /* First move last chars to start of buffer. */
963         number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
964
965         for ( i = 0; i < number_to_move; ++i )
966                 *(dest++) = *(source++);
967
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,
970                  * just force an EOF
971                  */
972                 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
973
974         else
975                 {
976                 int num_to_read =
977                         yy_current_buffer->yy_buf_size - number_to_move - 1;
978
979                 while ( num_to_read <= 0 )
980                         { /* Not enough room in the buffer - grow it. */
981 #ifdef YY_USES_REJECT
982                         YY_FATAL_ERROR(
983 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
984 #else
985
986                         /* just a shorter name for the current buffer */
987                         YY_BUFFER_STATE b = yy_current_buffer;
988
989                         int yy_c_buf_p_offset =
990                                 (int) (yy_c_buf_p - b->yy_ch_buf);
991
992                         if ( b->yy_is_our_buffer )
993                                 {
994                                 int new_size = b->yy_buf_size * 2;
995
996                                 if ( new_size <= 0 )
997                                         b->yy_buf_size += b->yy_buf_size / 8;
998                                 else
999                                         b->yy_buf_size *= 2;
1000
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 );
1005                                 }
1006                         else
1007                                 /* Can't grow it, we don't own it. */
1008                                 b->yy_ch_buf = 0;
1009
1010                         if ( ! b->yy_ch_buf )
1011                                 YY_FATAL_ERROR(
1012                                 "fatal error - scanner input buffer overflow" );
1013
1014                         yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1015
1016                         num_to_read = yy_current_buffer->yy_buf_size -
1017                                                 number_to_move - 1;
1018 #endif
1019                         }
1020
1021                 if ( num_to_read > YY_READ_BUF_SIZE )
1022                         num_to_read = YY_READ_BUF_SIZE;
1023
1024                 /* Read in more data. */
1025                 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1026                         yy_n_chars, num_to_read );
1027
1028                 yy_current_buffer->yy_n_chars = yy_n_chars;
1029                 }
1030
1031         if ( yy_n_chars == 0 )
1032                 {
1033                 if ( number_to_move == YY_MORE_ADJ )
1034                         {
1035                         ret_val = EOB_ACT_END_OF_FILE;
1036                         yyrestart( yyin );
1037                         }
1038
1039                 else
1040                         {
1041                         ret_val = EOB_ACT_LAST_MATCH;
1042                         yy_current_buffer->yy_buffer_status =
1043                                 YY_BUFFER_EOF_PENDING;
1044                         }
1045                 }
1046
1047         else
1048                 ret_val = EOB_ACT_CONTINUE_SCAN;
1049
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;
1053
1054         yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1055
1056         return ret_val;
1057         }
1058
1059
1060 /* yy_get_previous_state - get the state just before the EOB char was reached */
1061
1062 static yy_state_type yy_get_previous_state()
1063         {
1064         register yy_state_type yy_current_state;
1065         register char *yy_cp;
1066
1067         yy_current_state = yy_start;
1068
1069         for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1070                 {
1071                 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1072                 if ( yy_accept[yy_current_state] )
1073                         {
1074                         yy_last_accepting_state = yy_current_state;
1075                         yy_last_accepting_cpos = yy_cp;
1076                         }
1077                 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1078                         {
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];
1082                         }
1083                 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1084                 }
1085
1086         return yy_current_state;
1087         }
1088
1089
1090 /* yy_try_NUL_trans - try to make a transition on the NUL character
1091  *
1092  * synopsis
1093  *      next_state = yy_try_NUL_trans( current_state );
1094  */
1095
1096 #ifdef YY_USE_PROTOS
1097 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
1098 #else
1099 static yy_state_type yy_try_NUL_trans( yy_current_state )
1100 yy_state_type yy_current_state;
1101 #endif
1102         {
1103         register int yy_is_jam;
1104         register char *yy_cp = yy_c_buf_p;
1105
1106         register YY_CHAR yy_c = 1;
1107         if ( yy_accept[yy_current_state] )
1108                 {
1109                 yy_last_accepting_state = yy_current_state;
1110                 yy_last_accepting_cpos = yy_cp;
1111                 }
1112         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1113                 {
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];
1117                 }
1118         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1119         yy_is_jam = (yy_current_state == 30);
1120
1121         return yy_is_jam ? 0 : yy_current_state;
1122         }
1123
1124
1125 #ifndef YY_NO_UNPUT
1126 #ifdef YY_USE_PROTOS
1127 static void yyunput( int c, register char *yy_bp )
1128 #else
1129 static void yyunput( c, yy_bp )
1130 int c;
1131 register char *yy_bp;
1132 #endif
1133         {
1134         register char *yy_cp = yy_c_buf_p;
1135
1136         /* undo effects of setting up yytext */
1137         *yy_cp = yy_hold_char;
1138
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];
1147
1148                 while ( source > yy_current_buffer->yy_ch_buf )
1149                         *--dest = *--source;
1150
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;
1155
1156                 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1157                         YY_FATAL_ERROR( "flex scanner push-back overflow" );
1158                 }
1159
1160         *--yy_cp = (char) c;
1161
1162
1163         yytext_ptr = yy_bp;
1164         yy_hold_char = *yy_cp;
1165         yy_c_buf_p = yy_cp;
1166         }
1167 #endif  /* ifndef YY_NO_UNPUT */
1168
1169
1170 #ifdef __cplusplus
1171 static int yyinput()
1172 #else
1173 static int input()
1174 #endif
1175         {
1176         int c;
1177         static int _xpg = -1;
1178
1179         if (_xpg == -1)
1180                 {
1181                         char *_xpgenv = getenv("_XPG");
1182                         if (_xpgenv == NULL)
1183                                 _xpg = 0;
1184                         else
1185                                 {
1186                                 _xpg = atoi(_xpgenv);
1187                                 if (_xpg < 0)
1188                                         _xpg = 0;
1189                                 }
1190                 }
1191
1192         *yy_c_buf_p = yy_hold_char;
1193
1194         if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1195                 {
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.
1199                  */
1200                 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1201                         /* This was really a NUL. */
1202                         *yy_c_buf_p = '\0';
1203
1204                 else
1205                         { /* need more input */
1206                         int offset = yy_c_buf_p - yytext_ptr;
1207                         ++yy_c_buf_p;
1208
1209                         switch ( yy_get_next_buffer() )
1210                                 {
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.
1220                                          */
1221
1222                                         /* Reset buffer status. */
1223                                         yyrestart( yyin );
1224
1225                                         /* fall through */
1226
1227                                 case EOB_ACT_END_OF_FILE:
1228                                         if (_xpg)
1229                                                 return 0;
1230                                         else
1231                                                 {
1232                                                 if ( yywrap() )
1233                                                         return 0;
1234
1235                                                 if ( ! yy_did_buffer_switch_on_eof )
1236                                                         YY_NEW_FILE;
1237 #ifdef __cplusplus
1238                                                 return yyinput();
1239 #else
1240                                                 return input();
1241 #endif
1242                                                 }
1243
1244                                 case EOB_ACT_CONTINUE_SCAN:
1245                                         yy_c_buf_p = yytext_ptr + offset;
1246                                         break;
1247                                 }
1248                         }
1249                 }
1250
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;
1254
1255
1256         return c;
1257         }
1258
1259
1260 #ifdef YY_USE_PROTOS
1261 void yyrestart( FILE *input_file )
1262 #else
1263 void yyrestart( input_file )
1264 FILE *input_file;
1265 #endif
1266         {
1267         if ( ! yy_current_buffer )
1268                 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1269
1270         yy_init_buffer( yy_current_buffer, input_file );
1271         yy_load_buffer_state();
1272         }
1273
1274
1275 #ifdef YY_USE_PROTOS
1276 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1277 #else
1278 void yy_switch_to_buffer( new_buffer )
1279 YY_BUFFER_STATE new_buffer;
1280 #endif
1281         {
1282         if ( yy_current_buffer == new_buffer )
1283                 return;
1284
1285         if ( yy_current_buffer )
1286                 {
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;
1291                 }
1292
1293         yy_current_buffer = new_buffer;
1294         yy_load_buffer_state();
1295
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.
1300          */
1301         yy_did_buffer_switch_on_eof = 1;
1302         }
1303
1304
1305 #ifdef YY_USE_PROTOS
1306 void yy_load_buffer_state( void )
1307 #else
1308 void yy_load_buffer_state()
1309 #endif
1310         {
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;
1315         }
1316
1317
1318 #ifdef YY_USE_PROTOS
1319 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
1320 #else
1321 YY_BUFFER_STATE yy_create_buffer( file, size )
1322 FILE *file;
1323 int size;
1324 #endif
1325         {
1326         YY_BUFFER_STATE b;
1327
1328         b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1329         if ( ! b )
1330                 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1331
1332         b->yy_buf_size = size;
1333
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.
1336          */
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()" );
1340
1341         b->yy_is_our_buffer = 1;
1342
1343         yy_init_buffer( b, file );
1344
1345         return b;
1346         }
1347
1348
1349 #ifdef YY_USE_PROTOS
1350 void yy_delete_buffer( YY_BUFFER_STATE b )
1351 #else
1352 void yy_delete_buffer( b )
1353 YY_BUFFER_STATE b;
1354 #endif
1355         {
1356         if ( ! b )
1357                 return;
1358
1359         if ( b == yy_current_buffer )
1360                 yy_current_buffer = (YY_BUFFER_STATE) 0;
1361
1362         if ( b->yy_is_our_buffer )
1363                 yy_flex_free( (void *) b->yy_ch_buf );
1364
1365         yy_flex_free( (void *) b );
1366         }
1367
1368
1369 #ifndef YY_ALWAYS_INTERACTIVE
1370 #ifndef YY_NEVER_INTERACTIVE
1371 extern int isatty YY_PROTO(( int ));
1372 #endif
1373 #endif
1374
1375 #ifdef YY_USE_PROTOS
1376 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
1377 #else
1378 void yy_init_buffer( b, file )
1379 YY_BUFFER_STATE b;
1380 FILE *file;
1381 #endif
1382
1383
1384         {
1385         yy_flush_buffer( b );
1386
1387         b->yy_input_file = file;
1388         b->yy_fill_buffer = 1;
1389
1390 #if YY_ALWAYS_INTERACTIVE
1391         b->yy_is_interactive = 1;
1392 #else
1393 #if YY_NEVER_INTERACTIVE
1394         b->yy_is_interactive = 0;
1395 #else
1396         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1397 #endif
1398 #endif
1399         }
1400
1401
1402 #ifdef YY_USE_PROTOS
1403 void yy_flush_buffer( YY_BUFFER_STATE b )
1404 #else
1405 void yy_flush_buffer( b )
1406 YY_BUFFER_STATE b;
1407 #endif
1408
1409         {
1410         if ( ! b )
1411                 return;
1412
1413         b->yy_n_chars = 0;
1414
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.
1418          */
1419         b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1420         b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1421
1422         b->yy_buf_pos = &b->yy_ch_buf[0];
1423
1424         b->yy_at_bol = 1;
1425         b->yy_buffer_status = YY_BUFFER_NEW;
1426
1427         if ( b == yy_current_buffer )
1428                 yy_load_buffer_state();
1429         }
1430
1431
1432 #ifndef YY_NO_SCAN_BUFFER
1433 #ifdef YY_USE_PROTOS
1434 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
1435 #else
1436 YY_BUFFER_STATE yy_scan_buffer( base, size )
1437 char *base;
1438 yy_size_t size;
1439 #endif
1440         {
1441         YY_BUFFER_STATE b;
1442
1443         if ( size < 2 ||
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. */
1447                 return 0;
1448
1449         b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1450         if ( ! b )
1451                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1452
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;
1459         b->yy_at_bol = 1;
1460         b->yy_fill_buffer = 0;
1461         b->yy_buffer_status = YY_BUFFER_NEW;
1462
1463         yy_switch_to_buffer( b );
1464
1465         return b;
1466         }
1467 #endif
1468
1469
1470 #ifndef YY_NO_SCAN_STRING
1471 #ifdef YY_USE_PROTOS
1472 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
1473 #else
1474 YY_BUFFER_STATE yy_scan_string( yy_str )
1475 yyconst char *yy_str;
1476 #endif
1477         {
1478         int len;
1479         for ( len = 0; yy_str[len]; ++len )
1480                 ;
1481
1482         return yy_scan_bytes( yy_str, len );
1483         }
1484 #endif
1485
1486
1487 #ifndef YY_NO_SCAN_BYTES
1488 #ifdef YY_USE_PROTOS
1489 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
1490 #else
1491 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
1492 yyconst char *bytes;
1493 int len;
1494 #endif
1495         {
1496         YY_BUFFER_STATE b;
1497         char *buf;
1498         yy_size_t n;
1499         int i;
1500
1501         /* Get memory for full buffer, including space for trailing EOB's. */
1502         n = len + 2;
1503         buf = (char *) yy_flex_alloc( n );
1504         if ( ! buf )
1505                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1506
1507         for ( i = 0; i < len; ++i )
1508                 buf[i] = bytes[i];
1509
1510         buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
1511
1512         b = yy_scan_buffer( buf, n );
1513         if ( ! b )
1514                 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1515
1516         /* It's okay to grow etc. this buffer, and we should throw it
1517          * away when we're done.
1518          */
1519         b->yy_is_our_buffer = 1;
1520
1521         return b;
1522         }
1523 #endif
1524
1525
1526 #ifndef YY_NO_PUSH_STATE
1527 #ifdef YY_USE_PROTOS
1528 static void yy_push_state( int new_state )
1529 #else
1530 static void yy_push_state( new_state )
1531 int new_state;
1532 #endif
1533         {
1534         if ( yy_start_stack_ptr >= yy_start_stack_depth )
1535                 {
1536                 yy_size_t new_size;
1537
1538                 yy_start_stack_depth += YY_START_STACK_INCR;
1539                 new_size = yy_start_stack_depth * sizeof( int );
1540
1541                 if ( ! yy_start_stack )
1542                         yy_start_stack = (int *) yy_flex_alloc( new_size );
1543
1544                 else
1545                         yy_start_stack = (int *) yy_flex_realloc(
1546                                         (void *) yy_start_stack, new_size );
1547
1548                 if ( ! yy_start_stack )
1549                         YY_FATAL_ERROR(
1550                         "out of memory expanding start-condition stack" );
1551                 }
1552
1553         yy_start_stack[yy_start_stack_ptr++] = YY_START;
1554
1555         BEGIN(new_state);
1556         }
1557 #endif
1558
1559
1560 #ifndef YY_NO_POP_STATE
1561 static void yy_pop_state()
1562         {
1563         if ( --yy_start_stack_ptr < 0 )
1564                 YY_FATAL_ERROR( "start-condition stack underflow" );
1565
1566         BEGIN(yy_start_stack[yy_start_stack_ptr]);
1567         }
1568 #endif
1569
1570
1571 #ifndef YY_NO_TOP_STATE
1572 static int yy_top_state()
1573         {
1574         return yy_start_stack[yy_start_stack_ptr - 1];
1575         }
1576 #endif
1577
1578 #ifndef YY_EXIT_FAILURE
1579 #define YY_EXIT_FAILURE 2
1580 #endif
1581
1582 #ifdef YY_USE_PROTOS
1583 static void yy_fatal_error( yyconst char msg[] )
1584 #else
1585 static void yy_fatal_error( msg )
1586 char msg[];
1587 #endif
1588         {
1589         (void) fprintf( stderr, "%s\n", msg );
1590         exit( YY_EXIT_FAILURE );
1591         }
1592
1593
1594
1595 /* Redefine yyless() so it works in section 3 code. */
1596
1597 #undef yyless
1598 #define yyless(n) \
1599         do \
1600                 { \
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'; \
1606                 yyleng = n; \
1607                 } \
1608         while ( 0 )
1609
1610
1611 /* Internal utility routines. */
1612
1613 #ifndef yytext_ptr
1614 #ifdef YY_USE_PROTOS
1615 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
1616 #else
1617 static void yy_flex_strncpy( s1, s2, n )
1618 char *s1;
1619 yyconst char *s2;
1620 int n;
1621 #endif
1622         {
1623         register int i;
1624         for ( i = 0; i < n; ++i )
1625                 s1[i] = s2[i];
1626         }
1627 #endif
1628
1629 #ifdef YY_NEED_STRLEN
1630 #ifdef YY_USE_PROTOS
1631 static int yy_flex_strlen( yyconst char *s )
1632 #else
1633 static int yy_flex_strlen( s )
1634 yyconst char *s;
1635 #endif
1636         {
1637         register int n;
1638         for ( n = 0; s[n]; ++n )
1639                 ;
1640
1641         return n;
1642         }
1643 #endif
1644
1645
1646 #ifdef YY_USE_PROTOS
1647 static void *yy_flex_alloc( yy_size_t size )
1648 #else
1649 static void *yy_flex_alloc( size )
1650 yy_size_t size;
1651 #endif
1652         {
1653         return (void *) malloc( size );
1654         }
1655
1656 #ifdef YY_USE_PROTOS
1657 static void *yy_flex_realloc( void *ptr, yy_size_t size )
1658 #else
1659 static void *yy_flex_realloc( ptr, size )
1660 void *ptr;
1661 yy_size_t size;
1662 #endif
1663         {
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.
1670          */
1671         return (void *) realloc( (char *) ptr, size );
1672         }
1673
1674 #ifdef YY_USE_PROTOS
1675 static void yy_flex_free( void *ptr )
1676 #else
1677 static void yy_flex_free( ptr )
1678 void *ptr;
1679 #endif
1680         {
1681         free( ptr );
1682         }
1683
1684 #if YY_MAIN
1685 int main()
1686         {
1687         yylex();
1688         return 0;
1689         }
1690 #endif
1691 #line 120 "schema.l"
1692
1693
1694