1
2 #line 3 "parse_l.c"
3
4 #define YY_INT_ALIGNED short int
5
6 /* A lexical scanner generated by flex */
7
8 #define FLEX_SCANNER
9 #define YY_FLEX_MAJOR_VERSION 2
10 #define YY_FLEX_MINOR_VERSION 6
11 #define YY_FLEX_SUBMINOR_VERSION 4
12 #if YY_FLEX_SUBMINOR_VERSION > 0
13 #define FLEX_BETA
14 #endif
15
16 /* First, we deal with platform-specific or compiler-specific issues. */
17
18 /* begin standard C headers. */
19 /* Feature test macros. Flex uses functions that require a minimum set of
20 * macros defined. As defining some macros may hide function declarations that
21 * user code might use, be conservative and respect user's definitions as much
22 * as possible. In glibc, feature test macros may not be all set up until one
23 * of the libc header (that includes <features.h>) is included. This creates
24 * a circular dependency when we check the macros. <assert.h> is the safest
25 * header we can include and does not declare too many functions we don't need.
26 */
27 #if !defined(__GNU_LIBRARY__) && defined(__STDC__)
28 #include <assert.h>
29 #endif
30 #if !(defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
31 defined(_POSIX_SOURCE))
32 # define _POSIX_C_SOURCE 1 /* Required for fileno() */
33 # define _POSIX_SOURCE 1
34 #endif
35 #include <stdio.h>
36 #include <string.h>
37 #include <errno.h>
38 #include <stdlib.h>
39
40 /* end standard C headers. */
41
42 /* begin standard C++ headers. */
43
44 /* flex integer type definitions */
45
46 #ifndef YYFLEX_INTTYPES_DEFINED
47 #define YYFLEX_INTTYPES_DEFINED
48
49 /* Prefer C99 integer types if available. */
50 # if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
51 /* Include <inttypes.h> and not <stdint.h> because Solaris 2.6 has the former
52 * and not the latter.
53 */
54 #include <inttypes.h>
55 # define YYFLEX_USE_STDINT
56 # else
57 # if defined(_MSC_VER) && _MSC_VER >= 1600
58 /* Visual C++ 2010 does not define __STDC_VERSION__ and has <stdint.h> but not
59 * <inttypes.h>.
60 */
61 #include <stdint.h>
62 # define YYFLEX_USE_STDINT
63 # endif
64 # endif
65 # ifdef YYFLEX_USE_STDINT
66 typedef int8_t flex_int8_t;
67 typedef uint8_t flex_uint8_t;
68 typedef int16_t flex_int16_t;
69 typedef uint16_t flex_uint16_t;
70 typedef int32_t flex_int32_t;
71 typedef uint32_t flex_uint32_t;
72 # else
73 typedef unsigned char flex_uint8_t;
74 typedef short int flex_int16_t;
75 typedef unsigned short int flex_uint16_t;
76 # ifdef __STDC__
77 typedef signed char flex_int8_t;
78 /* ISO C only requires at least 16 bits for int. */
79 #include <limits.h>
80 # if UINT_MAX >= 4294967295
81 # define YYFLEX_INT32_DEFINED
82 typedef int flex_int32_t;
83 typedef unsigned int flex_uint32_t;
84 # endif
85 # else
86 typedef char flex_int8_t;
87 # endif
88 # ifndef YYFLEX_INT32_DEFINED
89 typedef long int flex_int32_t;
90 typedef unsigned long int flex_uint32_t;
91 # endif
92 # endif
93 #endif /* YYFLEX_INTTYPES_DEFINED */
94
95 /* TODO: this is always defined, so inline it */
96 #define yyconst const
97
98 #if defined(__GNUC__) && __GNUC__ >= 3
99 #define yynoreturn __attribute__((__noreturn__))
100 #define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
101 #else
102 #define yynoreturn
103 #define YY_ATTRIBUTE_UNUSED /* __attribute__ ((__unused__)) */
104 #endif
105
106 /* Returned upon end-of-file. */
107 #define YY_NULL 0
108
109 /* Promotes a possibly negative, possibly signed char to an
110 * integer in range [0..255] for use as an array index.
111 */
112 #define YY_SC_TO_UI(c) ((YY_CHAR) (c))
113
114 /* Enter a start condition. This macro really ought to take a parameter,
115 * but we do it the disgusting crufty way forced on us by the ()-less
116 * definition of BEGIN.
117 */
118 #define BEGIN (yy_start) = 1 + 2 *
119 /* Translate the current start state into a value that can be later handed
120 * to BEGIN to return to the state. The YYSTATE alias is for lex
121 * compatibility.
122 */
123 #define YY_START (((yy_start) - 1) / 2)
124 #define YYSTATE YY_START
125 /* Action number for EOF rule of a given start state. */
126 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
127 /* Special action meaning "start processing a new file". */
128 #define YY_NEW_FILE yyrestart( yyin )
129 #define YY_END_OF_BUFFER_CHAR 0
130
131 /* Size of default input buffer. */
132 #ifndef YY_BUF_SIZE
133 #ifdef __ia64__
134 /* On IA-64, the buffer size is 16k, not 8k.
135 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
136 * Ditto for the __ia64__ case accordingly.
137 */
138 #define YY_BUF_SIZE 32768
139 #else
140 #define YY_BUF_SIZE 16384
141 #endif /* __ia64__ */
142 #endif
143
144 /* The state buf must be large enough to hold one state per character in the main buffer.
145 */
146 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
147
148 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
149 #define YY_TYPEDEF_YY_BUFFER_STATE
150 typedef struct yy_buffer_state *YY_BUFFER_STATE;
151 #endif
152
153 #ifndef YY_TYPEDEF_YY_SIZE_T
154 #define YY_TYPEDEF_YY_SIZE_T
155 typedef size_t yy_size_t;
156 #endif
157
158 extern int yyleng;
159
160 extern FILE *yyin, *yyout;
161
162 #define EOB_ACT_CONTINUE_SCAN 0
163 #define EOB_ACT_END_OF_FILE 1
164 #define EOB_ACT_LAST_MATCH 2
165
166 #define YY_LESS_LINENO(n)
167 #define YY_LINENO_REWIND_TO(ptr)
168
169 /* Return all but the first "n" matched characters back to the input stream. */
170 #define yyless(n) \
171 do \
172 { \
173 /* Undo effects of setting up yytext. */ \
174 int yyless_macro_arg = (n); \
175 YY_LESS_LINENO(yyless_macro_arg);\
176 *yy_cp = (yy_hold_char); \
177 YY_RESTORE_YY_MORE_OFFSET \
178 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
179 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
180 } \
181 while ( 0 )
182 #define unput(c) yyunput( c, (yytext_ptr) )
183
184 #ifndef YY_STRUCT_YY_BUFFER_STATE
185 #define YY_STRUCT_YY_BUFFER_STATE
186 struct yy_buffer_state
187 {
188 FILE *yy_input_file;
189
190 char *yy_ch_buf; /* input buffer */
191 char *yy_buf_pos; /* current position in input buffer */
192
193 /* Size of input buffer in bytes, not including room for EOB
194 * characters.
195 */
196 int yy_buf_size;
197
198 /* Number of characters read into yy_ch_buf, not including EOB
199 * characters.
200 */
201 int yy_n_chars;
202
203 /* Whether we "own" the buffer - i.e., we know we created it,
204 * and can realloc() it to grow it, and should free() it to
205 * delete it.
206 */
207 int yy_is_our_buffer;
208
209 /* Whether this is an "interactive" input source; if so, and
210 * if we're using stdio for input, then we want to use getc()
211 * instead of fread(), to make sure we stop fetching input after
212 * each newline.
213 */
214 int yy_is_interactive;
215
216 /* Whether we're considered to be at the beginning of a line.
217 * If so, '^' rules will be active on the next match, otherwise
218 * not.
219 */
220 int yy_at_bol;
221
222 int yy_bs_lineno; /**< The line count. */
223 int yy_bs_column; /**< The column count. */
224
225 /* Whether to try to fill the input buffer when we reach the
226 * end of it.
227 */
228 int yy_fill_buffer;
229
230 int yy_buffer_status;
231
232 #define YY_BUFFER_NEW 0
233 #define YY_BUFFER_NORMAL 1
234 /* When an EOF's been seen but there's still some text to process
235 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
236 * shouldn't try reading from the input source any more. We might
237 * still have a bunch of tokens to match, though, because of
238 * possible backing-up.
239 *
240 * When we actually see the EOF, we change the status to "new"
241 * (via yyrestart()), so that the user can continue scanning by
242 * just pointing yyin at a new input file.
243 */
244 #define YY_BUFFER_EOF_PENDING 2
245
246 };
247 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
248
249 /* Stack of input buffers. */
250 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
251 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
252 static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
253
254 /* We provide macros for accessing buffer states in case in the
255 * future we want to put the buffer states in a more general
256 * "scanner state".
257 *
258 * Returns the top of the stack, or NULL.
259 */
260 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
261 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
262 : NULL)
263 /* Same as previous macro, but useful when we know that the buffer stack is not
264 * NULL or when we need an lvalue. For internal use only.
265 */
266 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
267
268 /* yy_hold_char holds the character lost when yytext is formed. */
269 static char yy_hold_char;
270 static int yy_n_chars; /* number of characters read into yy_ch_buf */
271 int yyleng;
272
273 /* Points to current character in buffer. */
274 static char *yy_c_buf_p = NULL;
275 static int yy_init = 0; /* whether we need to initialize */
276 static int yy_start = 0; /* start state number */
277
278 /* Flag which is used to allow yywrap()'s to do buffer switches
279 * instead of setting up a fresh yyin. A bit of a hack ...
280 */
281 static int yy_did_buffer_switch_on_eof;
282
283 void yyrestart ( FILE *input_file );
284 void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer );
285 YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size );
286 void yy_delete_buffer ( YY_BUFFER_STATE b );
287 void yy_flush_buffer ( YY_BUFFER_STATE b );
288 void yypush_buffer_state ( YY_BUFFER_STATE new_buffer );
289 void yypop_buffer_state ( void );
290
291 static void yyensure_buffer_stack ( void );
292 static void yy_load_buffer_state ( void );
293 static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file );
294 #define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
295
296 YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size );
297 YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
298 YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );
299
300 void *yyalloc ( yy_size_t );
301 void *yyrealloc ( void *, yy_size_t );
302 void yyfree ( void * );
303
304 #define yy_new_buffer yy_create_buffer
305 #define yy_set_interactive(is_interactive) \
306 { \
307 if ( ! YY_CURRENT_BUFFER ){ \
308 yyensure_buffer_stack (); \
309 YY_CURRENT_BUFFER_LVALUE = \
310 yy_create_buffer( yyin, YY_BUF_SIZE ); \
311 } \
312 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
313 }
314 #define yy_set_bol(at_bol) \
315 { \
316 if ( ! YY_CURRENT_BUFFER ){\
317 yyensure_buffer_stack (); \
318 YY_CURRENT_BUFFER_LVALUE = \
319 yy_create_buffer( yyin, YY_BUF_SIZE ); \
320 } \
321 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
322 }
323 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
324
325 /* Begin user sect3 */
326
327 #define yywrap() (/*CONSTCOND*/1)
328 #define YY_SKIP_YYWRAP
329 typedef flex_uint8_t YY_CHAR;
330
331 FILE *yyin = NULL, *yyout = NULL;
332
333 typedef int yy_state_type;
334
335 extern int yylineno;
336 int yylineno = 1;
337
338 extern char *yytext;
339 #ifdef yytext_ptr
340 #undef yytext_ptr
341 #endif
342 #define yytext_ptr yytext
343
344 static yy_state_type yy_get_previous_state ( void );
345 static yy_state_type yy_try_NUL_trans ( yy_state_type current_state );
346 static int yy_get_next_buffer ( void );
347 static void yynoreturn yy_fatal_error ( const char* msg );
348
349 /* Done after the current pattern has been matched and before the
350 * corresponding action - sets up yytext.
351 */
352 #define YY_DO_BEFORE_ACTION \
353 (yytext_ptr) = yy_bp; \
354 yyleng = (int) (yy_cp - yy_bp); \
355 (yy_hold_char) = *yy_cp; \
356 *yy_cp = '\0'; \
357 (yy_c_buf_p) = yy_cp;
358 #define YY_NUM_RULES 8
359 #define YY_END_OF_BUFFER 9
360 /* This struct is not used in this scanner,
361 but its presence is necessary. */
362 struct yy_trans_info
363 {
364 flex_int32_t yy_verify;
365 flex_int32_t yy_nxt;
366 };
367 static const flex_int16_t yy_accept[19] =
368 { 0,
369 0, 0, 9, 6, 7, 3, 6, 4, 1, 0,
370 5, 0, 1, 0, 1, 0, 2, 0
371 } ;
372
373 static const YY_CHAR yy_ec[256] =
374 { 0,
375 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
376 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
377 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
378 1, 1, 1, 1, 3, 4, 1, 1, 1, 1,
379 1, 1, 1, 1, 1, 1, 1, 5, 5, 5,
380 5, 5, 5, 5, 5, 5, 5, 1, 1, 1,
381 6, 1, 1, 1, 7, 7, 7, 7, 7, 7,
382 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
383 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
384 1, 8, 1, 1, 9, 1, 7, 7, 7, 7,
385
386 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
387 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
388 7, 7, 10, 1, 11, 1, 1, 1, 1, 1,
389 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
390 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
391 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
392 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
393 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
394 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
395 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
396
397 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
398 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
399 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
400 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
401 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
402 1, 1, 1, 1, 1
403 } ;
404
405 static const YY_CHAR yy_meta[12] =
406 { 0,
407 1, 1, 1, 1, 2, 1, 2, 1, 2, 1,
408 2
409 } ;
410
411 static const flex_int16_t yy_base[21] =
412 { 0,
413 0, 7, 21, 30, 30, 13, 17, 30, 20, 12,
414 30, 13, 10, 2, 7, 0, 30, 30, 27, 2
415 } ;
416
417 static const flex_int16_t yy_def[21] =
418 { 0,
419 19, 19, 18, 18, 18, 18, 18, 18, 18, 18,
420 18, 18, 9, 20, 18, 20, 18, 0, 18, 18
421 } ;
422
423 static const flex_int16_t yy_nxt[42] =
424 { 0,
425 18, 5, 6, 16, 18, 18, 18, 7, 5, 6,
426 17, 15, 17, 18, 7, 8, 9, 15, 14, 11,
427 18, 18, 10, 9, 18, 12, 13, 4, 4, 3,
428 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
429 18
430 } ;
431
432 static const flex_int16_t yy_chk[42] =
433 { 0,
434 0, 1, 1, 20, 0, 0, 0, 1, 2, 2,
435 16, 15, 14, 13, 2, 6, 6, 12, 10, 7,
436 3, 0, 6, 9, 0, 9, 9, 19, 19, 18,
437 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
438 18
439 } ;
440
441 static yy_state_type yy_last_accepting_state;
442 static char *yy_last_accepting_cpos;
443
444 extern int yy_flex_debug;
445 int yy_flex_debug = 0;
446
447 /* The intent behind this definition is that it'll catch
448 * any uses of REJECT which flex missed.
449 */
450 #define REJECT reject_used_but_not_detected
451 #define yymore() yymore_used_but_not_detected
452 #define YY_MORE_ADJ 0
453 #define YY_RESTORE_YY_MORE_OFFSET
454 char *yytext;
455 #line 1 "parse_l.l"
456 #line 2 "parse_l.l"
457 #ifdef HAVE_CONFIG_H
458 # include <config.h>
459 #endif
460
461 #include <stdio.h>
462
463 #include "parse_y.h"
464 #line 465 "parse_l.c"
465 #line 466 "parse_l.c"
466
467 #define INITIAL 0
468
469 #ifndef YY_NO_UNISTD_H
470 /* Special case for "unistd.h", since it is non-ANSI. We include it way
471 * down here because we want the user's section 1 to have been scanned first.
472 * The user has a chance to override it with an option.
473 */
474 #include <unistd.h>
475 #endif
476
477 #ifndef YY_EXTRA_TYPE
478 #define YY_EXTRA_TYPE void *
479 #endif
480
481 static int yy_init_globals ( void );
482
483 /* Accessor methods to globals.
484 These are made visible to non-reentrant scanners for convenience. */
485
486 int yylex_destroy ( void );
487
488 int yyget_debug ( void );
489
490 void yyset_debug ( int debug_flag );
491
492 YY_EXTRA_TYPE yyget_extra ( void );
493
494 void yyset_extra ( YY_EXTRA_TYPE user_defined );
495
496 FILE *yyget_in ( void );
497
498 void yyset_in ( FILE * _in_str );
499
500 FILE *yyget_out ( void );
501
502 void yyset_out ( FILE * _out_str );
503
504 int yyget_leng ( void );
505
506 char *yyget_text ( void );
507
508 int yyget_lineno ( void );
509
510 void yyset_lineno ( int _line_number );
511
512 /* Macros after this point can all be overridden by user definitions in
513 * section 1.
514 */
515
516 #ifndef YY_SKIP_YYWRAP
517 #ifdef __cplusplus
518 extern "C" int yywrap ( void );
519 #else
520 extern int yywrap ( void );
521 #endif
522 #endif
523
524 #ifndef YY_NO_UNPUT
525
526 static void yyunput ( int c, char *buf_ptr );
527
528 #endif
529
530 #ifndef yytext_ptr
531 static void yy_flex_strncpy ( char *, const char *, int );
532 #endif
533
534 #ifdef YY_NEED_STRLEN
535 static int yy_flex_strlen ( const char * );
536 #endif
537
538 #ifndef YY_NO_INPUT
539 #ifdef __cplusplus
540 static int yyinput ( void );
541 #else
542 static int input ( void );
543 #endif
544
545 #endif
546
547 /* Amount of stuff to slurp up with each read. */
548 #ifndef YY_READ_BUF_SIZE
549 #ifdef __ia64__
550 /* On IA-64, the buffer size is 16k, not 8k */
551 #define YY_READ_BUF_SIZE 16384
552 #else
553 #define YY_READ_BUF_SIZE 8192
554 #endif /* __ia64__ */
555 #endif
556
557 /* Copy whatever the last rule matched to the standard output. */
558 #ifndef ECHO
559 /* This used to be an fputs(), but since the string might contain NUL's,
560 * we now use fwrite().
561 */
562 #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
563 #endif
564
565 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
566 * is returned in "result".
567 */
568 #ifndef YY_INPUT
569 #define YY_INPUT(buf,result,max_size) \
570 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
571 { \
572 int c = '*'; \
573 int n; \
574 for ( n = 0; n < max_size && \
575 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
576 buf[n] = (char) c; \
577 if ( c == '\n' ) \
578 buf[n++] = (char) c; \
579 if ( c == EOF && ferror( yyin ) ) \
580 YY_FATAL_ERROR( "input in flex scanner failed" ); \
581 result = n; \
582 } \
583 else \
584 { \
585 errno=0; \
586 while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
587 { \
588 if( errno != EINTR) \
589 { \
590 YY_FATAL_ERROR( "input in flex scanner failed" ); \
591 break; \
592 } \
593 errno=0; \
594 clearerr(yyin); \
595 } \
596 }\
597 \
598
599 #endif
600
601 /* No semi-colon after return; correct usage is to write "yyterminate();" -
602 * we don't want an extra ';' after the "return" because that will cause
603 * some compilers to complain about unreachable statements.
604 */
605 #ifndef yyterminate
606 #define yyterminate() return YY_NULL
607 #endif
608
609 /* Number of entries by which start-condition stack grows. */
610 #ifndef YY_START_STACK_INCR
611 #define YY_START_STACK_INCR 25
612 #endif
613
614 /* Report a fatal error. */
615 #ifndef YY_FATAL_ERROR
616 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
617 #endif
618
619 /* end tables serialization structures and prototypes */
620
621 /* Default declaration of generated scanner - a define so the user can
622 * easily add parameters.
623 */
624 #ifndef YY_DECL
625 #define YY_DECL_IS_OURS 1
626
627 extern int yylex (void);
628
629 #define YY_DECL int yylex (void)
630 #endif /* !YY_DECL */
631
632 /* Code executed at the beginning of each rule, after yytext and yyleng
633 * have been set up.
634 */
635 #ifndef YY_USER_ACTION
636 #define YY_USER_ACTION
637 #endif
638
639 /* Code executed at the end of each rule. */
640 #ifndef YY_BREAK
641 #define YY_BREAK /*LINTED*/break;
642 #endif
643
644 #define YY_RULE_SETUP \
645 YY_USER_ACTION
646
647 /** The main scanner function which does all the work.
648 */
649 YY_DECL
650 {
651 yy_state_type yy_current_state;
652 char *yy_cp, *yy_bp;
653 int yy_act;
654
655 if ( !(yy_init) )
656 {
657 (yy_init) = 1;
658
659 #ifdef YY_USER_INIT
660 YY_USER_INIT;
661 #endif
662
663 if ( ! (yy_start) )
664 (yy_start) = 1; /* first start state */
665
666 if ( ! yyin )
667 yyin = stdin;
668
669 if ( ! yyout )
670 yyout = stdout;
671
672 if ( ! YY_CURRENT_BUFFER ) {
673 yyensure_buffer_stack ();
674 YY_CURRENT_BUFFER_LVALUE =
675 yy_create_buffer( yyin, YY_BUF_SIZE );
676 }
677
678 yy_load_buffer_state( );
679 }
680
681 {
682 #line 12 "parse_l.l"
683
684
685 #line 686 "parse_l.c"
686
687 while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
688 {
689 yy_cp = (yy_c_buf_p);
690
691 /* Support of yytext. */
692 *yy_cp = (yy_hold_char);
693
694 /* yy_bp points to the position in yy_ch_buf of the start of
695 * the current run.
696 */
697 yy_bp = yy_cp;
698
699 yy_current_state = (yy_start);
700 yy_match:
701 do
702 {
703 YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
704 if ( yy_accept[yy_current_state] )
705 {
706 (yy_last_accepting_state) = yy_current_state;
707 (yy_last_accepting_cpos) = yy_cp;
708 }
709 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
710 {
711 yy_current_state = (int) yy_def[yy_current_state];
712 if ( yy_current_state >= 19 )
713 yy_c = yy_meta[yy_c];
714 }
715 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
716 ++yy_cp;
717 }
718 while ( yy_base[yy_current_state] != 30 );
719
720 yy_find_action:
721 yy_act = yy_accept[yy_current_state];
722 if ( yy_act == 0 )
723 { /* have to back up */
724 yy_cp = (yy_last_accepting_cpos);
725 yy_current_state = (yy_last_accepting_state);
726 yy_act = yy_accept[yy_current_state];
727 }
728
729 YY_DO_BEFORE_ACTION;
730
731 do_action: /* This label is used only to access EOF actions. */
732
733 switch ( yy_act )
734 { /* beginning of action switch */
735 case 0: /* must back up */
736 /* undo the effects of YY_DO_BEFORE_ACTION */
737 *yy_cp = (yy_hold_char);
738 yy_cp = (yy_last_accepting_cpos);
739 yy_current_state = (yy_last_accepting_state);
740 goto yy_find_action;
741
742 case 1:
743 YY_RULE_SETUP
744 #line 14 "parse_l.l"
745 return NEW_COUNTER;
746 YY_BREAK
747 case 2:
748 YY_RULE_SETUP
749 #line 15 "parse_l.l"
750 return LABEL;
751 YY_BREAK
752 case 3:
753 YY_RULE_SETUP
754 #line 16 "parse_l.l"
755 return NO_INDENT;
756 YY_BREAK
757 case 4:
758 YY_RULE_SETUP
759 #line 17 "parse_l.l"
760 return RIGHT;
761 YY_BREAK
762 case 5:
763 YY_RULE_SETUP
764 #line 18 "parse_l.l"
765 return HASH;
766 YY_BREAK
767 case 6:
768 YY_RULE_SETUP
769 #line 19 "parse_l.l"
770 return CHAR;
771 YY_BREAK
772 case 7:
773 /* rule 7 can match eol */
774 YY_RULE_SETUP
775 #line 20 "parse_l.l"
776 return NEWLINE;
777 YY_BREAK
778 case 8:
779 YY_RULE_SETUP
780 #line 22 "parse_l.l"
781 ECHO;
782 YY_BREAK
783 #line 784 "parse_l.c"
784 case YY_STATE_EOF(INITIAL):
785 yyterminate();
786
787 case YY_END_OF_BUFFER:
788 {
789 /* Amount of text matched not including the EOB char. */
790 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
791
792 /* Undo the effects of YY_DO_BEFORE_ACTION. */
793 *yy_cp = (yy_hold_char);
794 YY_RESTORE_YY_MORE_OFFSET
795
796 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
797 {
798 /* We're scanning a new file or input source. It's
799 * possible that this happened because the user
800 * just pointed yyin at a new source and called
801 * yylex(). If so, then we have to assure
802 * consistency between YY_CURRENT_BUFFER and our
803 * globals. Here is the right place to do so, because
804 * this is the first action (other than possibly a
805 * back-up) that will match for the new input source.
806 */
807 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
808 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
809 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
810 }
811
812 /* Note that here we test for yy_c_buf_p "<=" to the position
813 * of the first EOB in the buffer, since yy_c_buf_p will
814 * already have been incremented past the NUL character
815 * (since all states make transitions on EOB to the
816 * end-of-buffer state). Contrast this with the test
817 * in input().
818 */
819 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
820 { /* This was really a NUL. */
821 yy_state_type yy_next_state;
822
823 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
824
825 yy_current_state = yy_get_previous_state( );
826
827 /* Okay, we're now positioned to make the NUL
828 * transition. We couldn't have
829 * yy_get_previous_state() go ahead and do it
830 * for us because it doesn't know how to deal
831 * with the possibility of jamming (and we don't
832 * want to build jamming into it because then it
833 * will run more slowly).
834 */
835
836 yy_next_state = yy_try_NUL_trans( yy_current_state );
837
838 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
839
840 if ( yy_next_state )
841 {
842 /* Consume the NUL. */
843 yy_cp = ++(yy_c_buf_p);
844 yy_current_state = yy_next_state;
845 goto yy_match;
846 }
847
848 else
849 {
850 yy_cp = (yy_c_buf_p);
851 goto yy_find_action;
852 }
853 }
854
855 else switch ( yy_get_next_buffer( ) )
856 {
857 case EOB_ACT_END_OF_FILE:
858 {
859 (yy_did_buffer_switch_on_eof) = 0;
860
861 if ( yywrap( ) )
862 {
863 /* Note: because we've taken care in
864 * yy_get_next_buffer() to have set up
865 * yytext, we can now set up
866 * yy_c_buf_p so that if some total
867 * hoser (like flex itself) wants to
868 * call the scanner after we return the
869 * YY_NULL, it'll still work - another
870 * YY_NULL will get returned.
871 */
872 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
873
874 yy_act = YY_STATE_EOF(YY_START);
875 goto do_action;
876 }
877
878 else
879 {
880 if ( ! (yy_did_buffer_switch_on_eof) )
881 YY_NEW_FILE;
882 }
883 break;
884 }
885
886 case EOB_ACT_CONTINUE_SCAN:
887 (yy_c_buf_p) =
888 (yytext_ptr) + yy_amount_of_matched_text;
889
890 yy_current_state = yy_get_previous_state( );
891
892 yy_cp = (yy_c_buf_p);
893 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
894 goto yy_match;
895
896 case EOB_ACT_LAST_MATCH:
897 (yy_c_buf_p) =
898 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
899
900 yy_current_state = yy_get_previous_state( );
901
902 yy_cp = (yy_c_buf_p);
903 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
904 goto yy_find_action;
905 }
906 break;
907 }
908
909 default:
910 YY_FATAL_ERROR(
911 "fatal flex scanner internal error--no action found" );
912 } /* end of action switch */
913 } /* end of scanning one token */
914 } /* end of user's declarations */
915 } /* end of yylex */
916
917 /* yy_get_next_buffer - try to read in a new buffer
918 *
919 * Returns a code representing an action:
920 * EOB_ACT_LAST_MATCH -
921 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
922 * EOB_ACT_END_OF_FILE - end of file
923 */
924 static int yy_get_next_buffer (void)
925 {
926 char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
927 char *source = (yytext_ptr);
928 int number_to_move, i;
929 int ret_val;
930
931 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
932 YY_FATAL_ERROR(
933 "fatal flex scanner internal error--end of buffer missed" );
934
935 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
936 { /* Don't try to fill the buffer, so this is an EOF. */
937 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
938 {
939 /* We matched a single character, the EOB, so
940 * treat this as a final EOF.
941 */
942 return EOB_ACT_END_OF_FILE;
943 }
944
945 else
946 {
947 /* We matched some text prior to the EOB, first
948 * process it.
949 */
950 return EOB_ACT_LAST_MATCH;
951 }
952 }
953
954 /* Try to read more data. */
955
956 /* First move last chars to start of buffer. */
957 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
958
959 for ( i = 0; i < number_to_move; ++i )
960 *(dest++) = *(source++);
961
962 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
963 /* don't do the read, it's not guaranteed to return an EOF,
964 * just force an EOF
965 */
966 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
967
968 else
969 {
970 int num_to_read =
971 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
972
973 while ( num_to_read <= 0 )
974 { /* Not enough room in the buffer - grow it. */
975
976 /* just a shorter name for the current buffer */
977 YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
978
979 int yy_c_buf_p_offset =
980 (int) ((yy_c_buf_p) - b->yy_ch_buf);
981
982 if ( b->yy_is_our_buffer )
983 {
984 int new_size = b->yy_buf_size * 2;
985
986 if ( new_size <= 0 )
987 b->yy_buf_size += b->yy_buf_size / 8;
988 else
989 b->yy_buf_size *= 2;
990
991 b->yy_ch_buf = (char *)
992 /* Include room in for 2 EOB chars. */
993 yyrealloc( (void *) b->yy_ch_buf,
994 (yy_size_t) (b->yy_buf_size + 2) );
995 }
996 else
997 /* Can't grow it, we don't own it. */
998 b->yy_ch_buf = NULL;
999
1000 if ( ! b->yy_ch_buf )
1001 YY_FATAL_ERROR(
1002 "fatal error - scanner input buffer overflow" );
1003
1004 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1005
1006 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1007 number_to_move - 1;
1008
1009 }
1010
1011 if ( num_to_read > YY_READ_BUF_SIZE )
1012 num_to_read = YY_READ_BUF_SIZE;
1013
1014 /* Read in more data. */
1015 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1016 (yy_n_chars), num_to_read );
1017
1018 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1019 }
1020
1021 if ( (yy_n_chars) == 0 )
1022 {
1023 if ( number_to_move == YY_MORE_ADJ )
1024 {
1025 ret_val = EOB_ACT_END_OF_FILE;
1026 yyrestart( yyin );
1027 }
1028
1029 else
1030 {
1031 ret_val = EOB_ACT_LAST_MATCH;
1032 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1033 YY_BUFFER_EOF_PENDING;
1034 }
1035 }
1036
1037 else
1038 ret_val = EOB_ACT_CONTINUE_SCAN;
1039
1040 if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1041 /* Extend the array by 50%, plus the number we really need. */
1042 int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1043 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
1044 (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
1045 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1046 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1047 /* "- 2" to take care of EOB's */
1048 YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
1049 }
1050
1051 (yy_n_chars) += number_to_move;
1052 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1053 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1054
1055 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1056
1057 return ret_val;
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 (void)
1063 {
1064 yy_state_type yy_current_state;
1065 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 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 >= 19 )
1081 yy_c = yy_meta[yy_c];
1082 }
1083 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1084 }
1085
1086 return yy_current_state;
1087 }
1088
1089 /* yy_try_NUL_trans - try to make a transition on the NUL character
1090 *
1091 * synopsis
1092 * next_state = yy_try_NUL_trans( current_state );
1093 */
1094 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1095 {
1096 int yy_is_jam;
1097 char *yy_cp = (yy_c_buf_p);
1098
1099 YY_CHAR yy_c = 1;
1100 if ( yy_accept[yy_current_state] )
1101 {
1102 (yy_last_accepting_state) = yy_current_state;
1103 (yy_last_accepting_cpos) = yy_cp;
1104 }
1105 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1106 {
1107 yy_current_state = (int) yy_def[yy_current_state];
1108 if ( yy_current_state >= 19 )
1109 yy_c = yy_meta[yy_c];
1110 }
1111 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1112 yy_is_jam = (yy_current_state == 18);
1113
1114 return yy_is_jam ? 0 : yy_current_state;
1115 }
1116
1117 #ifndef YY_NO_UNPUT
1118
1119 static void yyunput (int c, char * yy_bp )
1120 {
1121 char *yy_cp;
1122
1123 yy_cp = (yy_c_buf_p);
1124
1125 /* undo effects of setting up yytext */
1126 *yy_cp = (yy_hold_char);
1127
1128 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1129 { /* need to shift things up to make room */
1130 /* +2 for EOB chars. */
1131 int number_to_move = (yy_n_chars) + 2;
1132 char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1133 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1134 char *source =
1135 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1136
1137 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1138 *--dest = *--source;
1139
1140 yy_cp += (int) (dest - source);
1141 yy_bp += (int) (dest - source);
1142 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1143 (yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1144
1145 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1146 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1147 }
1148
1149 *--yy_cp = (char) c;
1150
1151 (yytext_ptr) = yy_bp;
1152 (yy_hold_char) = *yy_cp;
1153 (yy_c_buf_p) = yy_cp;
1154 }
1155
1156 #endif
1157
1158 #ifndef YY_NO_INPUT
1159 #ifdef __cplusplus
1160 static int yyinput (void)
1161 #else
1162 static int input (void)
1163 #endif
1164
1165 {
1166 int c;
1167
1168 *(yy_c_buf_p) = (yy_hold_char);
1169
1170 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1171 {
1172 /* yy_c_buf_p now points to the character we want to return.
1173 * If this occurs *before* the EOB characters, then it's a
1174 * valid NUL; if not, then we've hit the end of the buffer.
1175 */
1176 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1177 /* This was really a NUL. */
1178 *(yy_c_buf_p) = '\0';
1179
1180 else
1181 { /* need more input */
1182 int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
1183 ++(yy_c_buf_p);
1184
1185 switch ( yy_get_next_buffer( ) )
1186 {
1187 case EOB_ACT_LAST_MATCH:
1188 /* This happens because yy_g_n_b()
1189 * sees that we've accumulated a
1190 * token and flags that we need to
1191 * try matching the token before
1192 * proceeding. But for input(),
1193 * there's no matching to consider.
1194 * So convert the EOB_ACT_LAST_MATCH
1195 * to EOB_ACT_END_OF_FILE.
1196 */
1197
1198 /* Reset buffer status. */
1199 yyrestart( yyin );
1200
1201 /*FALLTHROUGH*/
1202
1203 case EOB_ACT_END_OF_FILE:
1204 {
1205 if ( yywrap( ) )
1206 return 0;
1207
1208 if ( ! (yy_did_buffer_switch_on_eof) )
1209 YY_NEW_FILE;
1210 #ifdef __cplusplus
1211 return yyinput();
1212 #else
1213 return input();
1214 #endif
1215 }
1216
1217 case EOB_ACT_CONTINUE_SCAN:
1218 (yy_c_buf_p) = (yytext_ptr) + offset;
1219 break;
1220 }
1221 }
1222 }
1223
1224 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1225 *(yy_c_buf_p) = '\0'; /* preserve yytext */
1226 (yy_hold_char) = *++(yy_c_buf_p);
1227
1228 return c;
1229 }
1230 #endif /* ifndef YY_NO_INPUT */
1231
1232 /** Immediately switch to a different input stream.
1233 * @param input_file A readable stream.
1234 *
1235 * @note This function does not reset the start condition to @c INITIAL .
1236 */
1237 void yyrestart (FILE * input_file )
1238 {
1239
1240 if ( ! YY_CURRENT_BUFFER ){
1241 yyensure_buffer_stack ();
1242 YY_CURRENT_BUFFER_LVALUE =
1243 yy_create_buffer( yyin, YY_BUF_SIZE );
1244 }
1245
1246 yy_init_buffer( YY_CURRENT_BUFFER, input_file );
1247 yy_load_buffer_state( );
1248 }
1249
1250 /** Switch to a different input buffer.
1251 * @param new_buffer The new input buffer.
1252 *
1253 */
1254 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
1255 {
1256
1257 /* TODO. We should be able to replace this entire function body
1258 * with
1259 * yypop_buffer_state();
1260 * yypush_buffer_state(new_buffer);
1261 */
1262 yyensure_buffer_stack ();
1263 if ( YY_CURRENT_BUFFER == new_buffer )
1264 return;
1265
1266 if ( YY_CURRENT_BUFFER )
1267 {
1268 /* Flush out information for old buffer. */
1269 *(yy_c_buf_p) = (yy_hold_char);
1270 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1271 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1272 }
1273
1274 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1275 yy_load_buffer_state( );
1276
1277 /* We don't actually know whether we did this switch during
1278 * EOF (yywrap()) processing, but the only time this flag
1279 * is looked at is after yywrap() is called, so it's safe
1280 * to go ahead and always set it.
1281 */
1282 (yy_did_buffer_switch_on_eof) = 1;
1283 }
1284
1285 static void yy_load_buffer_state (void)
1286 {
1287 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1288 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1289 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1290 (yy_hold_char) = *(yy_c_buf_p);
1291 }
1292
1293 /** Allocate and initialize an input buffer state.
1294 * @param file A readable stream.
1295 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1296 *
1297 * @return the allocated buffer state.
1298 */
1299 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
1300 {
1301 YY_BUFFER_STATE b;
1302
1303 b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
1304 if ( ! b )
1305 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1306
1307 b->yy_buf_size = size;
1308
1309 /* yy_ch_buf has to be 2 characters longer than the size given because
1310 * we need to put in 2 end-of-buffer characters.
1311 */
1312 b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
1313 if ( ! b->yy_ch_buf )
1314 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1315
1316 b->yy_is_our_buffer = 1;
1317
1318 yy_init_buffer( b, file );
1319
1320 return b;
1321 }
1322
1323 /** Destroy the buffer.
1324 * @param b a buffer created with yy_create_buffer()
1325 *
1326 */
1327 void yy_delete_buffer (YY_BUFFER_STATE b )
1328 {
1329
1330 if ( ! b )
1331 return;
1332
1333 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1334 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1335
1336 if ( b->yy_is_our_buffer )
1337 yyfree( (void *) b->yy_ch_buf );
1338
1339 yyfree( (void *) b );
1340 }
1341
1342 /* Initializes or reinitializes a buffer.
1343 * This function is sometimes called more than once on the same buffer,
1344 * such as during a yyrestart() or at EOF.
1345 */
1346 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
1347
1348 {
1349 int oerrno = errno;
1350
1351 yy_flush_buffer( b );
1352
1353 b->yy_input_file = file;
1354 b->yy_fill_buffer = 1;
1355
1356 /* If b is the current buffer, then yy_init_buffer was _probably_
1357 * called from yyrestart() or through yy_get_next_buffer.
1358 * In that case, we don't want to reset the lineno or column.
1359 */
1360 if (b != YY_CURRENT_BUFFER){
1361 b->yy_bs_lineno = 1;
1362 b->yy_bs_column = 0;
1363 }
1364
1365 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1366
1367 errno = oerrno;
1368 }
1369
1370 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1371 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1372 *
1373 */
1374 void yy_flush_buffer (YY_BUFFER_STATE b )
1375 {
1376 if ( ! b )
1377 return;
1378
1379 b->yy_n_chars = 0;
1380
1381 /* We always need two end-of-buffer characters. The first causes
1382 * a transition to the end-of-buffer state. The second causes
1383 * a jam in that state.
1384 */
1385 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1386 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1387
1388 b->yy_buf_pos = &b->yy_ch_buf[0];
1389
1390 b->yy_at_bol = 1;
1391 b->yy_buffer_status = YY_BUFFER_NEW;
1392
1393 if ( b == YY_CURRENT_BUFFER )
1394 yy_load_buffer_state( );
1395 }
1396
1397 /** Pushes the new state onto the stack. The new state becomes
1398 * the current state. This function will allocate the stack
1399 * if necessary.
1400 * @param new_buffer The new state.
1401 *
1402 */
1403 void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
1404 {
1405 if (new_buffer == NULL)
1406 return;
1407
1408 yyensure_buffer_stack();
1409
1410 /* This block is copied from yy_switch_to_buffer. */
1411 if ( YY_CURRENT_BUFFER )
1412 {
1413 /* Flush out information for old buffer. */
1414 *(yy_c_buf_p) = (yy_hold_char);
1415 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1416 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1417 }
1418
1419 /* Only push if top exists. Otherwise, replace top. */
1420 if (YY_CURRENT_BUFFER)
1421 (yy_buffer_stack_top)++;
1422 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1423
1424 /* copied from yy_switch_to_buffer. */
1425 yy_load_buffer_state( );
1426 (yy_did_buffer_switch_on_eof) = 1;
1427 }
1428
1429 /** Removes and deletes the top of the stack, if present.
1430 * The next element becomes the new top.
1431 *
1432 */
1433 void yypop_buffer_state (void)
1434 {
1435 if (!YY_CURRENT_BUFFER)
1436 return;
1437
1438 yy_delete_buffer(YY_CURRENT_BUFFER );
1439 YY_CURRENT_BUFFER_LVALUE = NULL;
1440 if ((yy_buffer_stack_top) > 0)
1441 --(yy_buffer_stack_top);
1442
1443 if (YY_CURRENT_BUFFER) {
1444 yy_load_buffer_state( );
1445 (yy_did_buffer_switch_on_eof) = 1;
1446 }
1447 }
1448
1449 /* Allocates the stack if it does not exist.
1450 * Guarantees space for at least one push.
1451 */
1452 static void yyensure_buffer_stack (void)
1453 {
1454 yy_size_t num_to_alloc;
1455
1456 if (!(yy_buffer_stack)) {
1457
1458 /* First allocation is just for 2 elements, since we don't know if this
1459 * scanner will even need a stack. We use 2 instead of 1 to avoid an
1460 * immediate realloc on the next call.
1461 */
1462 num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
1463 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
1464 (num_to_alloc * sizeof(struct yy_buffer_state*)
1465 );
1466 if ( ! (yy_buffer_stack) )
1467 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1468
1469 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1470
1471 (yy_buffer_stack_max) = num_to_alloc;
1472 (yy_buffer_stack_top) = 0;
1473 return;
1474 }
1475
1476 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1477
1478 /* Increase the buffer to prepare for a possible push. */
1479 yy_size_t grow_size = 8 /* arbitrary grow size */;
1480
1481 num_to_alloc = (yy_buffer_stack_max) + grow_size;
1482 (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
1483 ((yy_buffer_stack),
1484 num_to_alloc * sizeof(struct yy_buffer_state*)
1485 );
1486 if ( ! (yy_buffer_stack) )
1487 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1488
1489 /* zero only the new slots.*/
1490 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
1491 (yy_buffer_stack_max) = num_to_alloc;
1492 }
1493 }
1494
1495 /** Setup the input buffer state to scan directly from a user-specified character buffer.
1496 * @param base the character buffer
1497 * @param size the size in bytes of the character buffer
1498 *
1499 * @return the newly allocated buffer state object.
1500 */
1501 YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
1502 {
1503 YY_BUFFER_STATE b;
1504
1505 if ( size < 2 ||
1506 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1507 base[size-1] != YY_END_OF_BUFFER_CHAR )
1508 /* They forgot to leave room for the EOB's. */
1509 return NULL;
1510
1511 b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
1512 if ( ! b )
1513 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1514
1515 b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
1516 b->yy_buf_pos = b->yy_ch_buf = base;
1517 b->yy_is_our_buffer = 0;
1518 b->yy_input_file = NULL;
1519 b->yy_n_chars = b->yy_buf_size;
1520 b->yy_is_interactive = 0;
1521 b->yy_at_bol = 1;
1522 b->yy_fill_buffer = 0;
1523 b->yy_buffer_status = YY_BUFFER_NEW;
1524
1525 yy_switch_to_buffer( b );
1526
1527 return b;
1528 }
1529
1530 /** Setup the input buffer state to scan a string. The next call to yylex() will
1531 * scan from a @e copy of @a str.
1532 * @param yystr a NUL-terminated string to scan
1533 *
1534 * @return the newly allocated buffer state object.
1535 * @note If you want to scan bytes that may contain NUL values, then use
1536 * yy_scan_bytes() instead.
1537 */
1538 YY_BUFFER_STATE yy_scan_string (const char * yystr )
1539 {
1540
1541 return yy_scan_bytes( yystr, (int) strlen(yystr) );
1542 }
1543
1544 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
1545 * scan from a @e copy of @a bytes.
1546 * @param yybytes the byte buffer to scan
1547 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
1548 *
1549 * @return the newly allocated buffer state object.
1550 */
1551 YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
1552 {
1553 YY_BUFFER_STATE b;
1554 char *buf;
1555 yy_size_t n;
1556 int i;
1557
1558 /* Get memory for full buffer, including space for trailing EOB's. */
1559 n = (yy_size_t) (_yybytes_len + 2);
1560 buf = (char *) yyalloc( n );
1561 if ( ! buf )
1562 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1563
1564 for ( i = 0; i < _yybytes_len; ++i )
1565 buf[i] = yybytes[i];
1566
1567 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1568
1569 b = yy_scan_buffer( buf, n );
1570 if ( ! b )
1571 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1572
1573 /* It's okay to grow etc. this buffer, and we should throw it
1574 * away when we're done.
1575 */
1576 b->yy_is_our_buffer = 1;
1577
1578 return b;
1579 }
1580
1581 #ifndef YY_EXIT_FAILURE
1582 #define YY_EXIT_FAILURE 2
1583 #endif
1584
1585 static void yynoreturn yy_fatal_error (const char* msg YY_ATTRIBUTE_UNUSED)
1586 {
1587 fprintf( stderr, "%s\n", msg );
1588 exit( YY_EXIT_FAILURE );
1589 }
1590
1591 /* Redefine yyless() so it works in section 3 code. */
1592
1593 #undef yyless
1594 #define yyless(n) \
1595 do \
1596 { \
1597 /* Undo effects of setting up yytext. */ \
1598 int yyless_macro_arg = (n); \
1599 YY_LESS_LINENO(yyless_macro_arg);\
1600 yytext[yyleng] = (yy_hold_char); \
1601 (yy_c_buf_p) = yytext + yyless_macro_arg; \
1602 (yy_hold_char) = *(yy_c_buf_p); \
1603 *(yy_c_buf_p) = '\0'; \
1604 yyleng = yyless_macro_arg; \
1605 } \
1606 while ( 0 )
1607
1608 /* Accessor methods (get/set functions) to struct members. */
1609
1610 /** Get the current line number.
1611 *
1612 */
1613 int yyget_lineno (void)
1614 {
1615
1616 return yylineno;
1617 }
1618
1619 /** Get the input stream.
1620 *
1621 */
1622 FILE *yyget_in (void)
1623 {
1624 return yyin;
1625 }
1626
1627 /** Get the output stream.
1628 *
1629 */
1630 FILE *yyget_out (void)
1631 {
1632 return yyout;
1633 }
1634
1635 /** Get the length of the current token.
1636 *
1637 */
1638 int yyget_leng (void)
1639 {
1640 return yyleng;
1641 }
1642
1643 /** Get the current token.
1644 *
1645 */
1646
1647 char *yyget_text (void)
1648 {
1649 return yytext;
1650 }
1651
1652 /** Set the current line number.
1653 * @param _line_number line number
1654 *
1655 */
1656 void yyset_lineno (int _line_number )
1657 {
1658
1659 yylineno = _line_number;
1660 }
1661
1662 /** Set the input stream. This does not discard the current
1663 * input buffer.
1664 * @param _in_str A readable stream.
1665 *
1666 * @see yy_switch_to_buffer
1667 */
1668 void yyset_in (FILE * _in_str )
1669 {
1670 yyin = _in_str ;
1671 }
1672
1673 void yyset_out (FILE * _out_str )
1674 {
1675 yyout = _out_str ;
1676 }
1677
1678 int yyget_debug (void)
1679 {
1680 return yy_flex_debug;
1681 }
1682
1683 void yyset_debug (int _bdebug )
1684 {
1685 yy_flex_debug = _bdebug ;
1686 }
1687
1688 static int yy_init_globals (void)
1689 {
1690 /* Initialization is the same as for the non-reentrant scanner.
1691 * This function is called from yylex_destroy(), so don't allocate here.
1692 */
1693
1694 (yy_buffer_stack) = NULL;
1695 (yy_buffer_stack_top) = 0;
1696 (yy_buffer_stack_max) = 0;
1697 (yy_c_buf_p) = NULL;
1698 (yy_init) = 0;
1699 (yy_start) = 0;
1700
1701 /* Defined in main.c */
1702 #ifdef YY_STDINIT
1703 yyin = stdin;
1704 yyout = stdout;
1705 #else
1706 yyin = NULL;
1707 yyout = NULL;
1708 #endif
1709
1710 /* For future reference: Set errno on error, since we are called by
1711 * yylex_init()
1712 */
1713 return 0;
1714 }
1715
1716 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
1717 int yylex_destroy (void)
1718 {
1719
1720 /* Pop the buffer stack, destroying each element. */
1721 while(YY_CURRENT_BUFFER){
1722 yy_delete_buffer( YY_CURRENT_BUFFER );
1723 YY_CURRENT_BUFFER_LVALUE = NULL;
1724 yypop_buffer_state();
1725 }
1726
1727 /* Destroy the stack itself. */
1728 yyfree((yy_buffer_stack) );
1729 (yy_buffer_stack) = NULL;
1730
1731 /* Reset the globals. This is important in a non-reentrant scanner so the next time
1732 * yylex() is called, initialization will occur. */
1733 yy_init_globals( );
1734
1735 return 0;
1736 }
1737
1738 /*
1739 * Internal utility routines.
1740 */
1741
1742 #ifndef yytext_ptr
1743 static void yy_flex_strncpy (char* s1, const char * s2, int n YY_ATTRIBUTE_UNUSED)
1744 {
1745 int i;
1746 for ( i = 0; i < n; ++i )
1747 s1[i] = s2[i];
1748 }
1749 #endif
1750
1751 #ifdef YY_NEED_STRLEN
1752 static int yy_flex_strlen (const char * s YY_ATTRIBUTE_UNUSED)
1753 {
1754 int n;
1755 for ( n = 0; s[n]; ++n )
1756 ;
1757
1758 return n;
1759 }
1760 #endif
1761
1762 void *yyalloc (yy_size_t size YY_ATTRIBUTE_UNUSED)
1763 {
1764 return malloc(size);
1765 }
1766
1767 void *yyrealloc (void * ptr, yy_size_t size YY_ATTRIBUTE_UNUSED)
1768 {
1769 /* The cast to (char *) in the following accommodates both
1770 * implementations that use char* generic pointers, and those
1771 * that use void* generic pointers. It works with the latter
1772 * because both ANSI C and C++ allow castless assignment from
1773 * any pointer type to void*, and deal with argument conversions
1774 * as though doing an assignment.
1775 */
1776 return realloc(ptr, size);
1777 }
1778
1779 void yyfree (void * ptr YY_ATTRIBUTE_UNUSED)
1780 {
1781 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
1782 }
1783
1784 #line 22 "parse_l.l"
1785
1786