PIPS
genspec_lex.c
Go to the documentation of this file.
1 
2 #line 3 "<stdout>"
3 
4 #define YY_INT_ALIGNED short int
5 
6 /* A lexical scanner generated by flex */
7 
8 #define yy_create_buffer genspec__create_buffer
9 #define yy_delete_buffer genspec__delete_buffer
10 #define yy_scan_buffer genspec__scan_buffer
11 #define yy_scan_string genspec__scan_string
12 #define yy_scan_bytes genspec__scan_bytes
13 #define yy_init_buffer genspec__init_buffer
14 #define yy_flush_buffer genspec__flush_buffer
15 #define yy_load_buffer_state genspec__load_buffer_state
16 #define yy_switch_to_buffer genspec__switch_to_buffer
17 #define yypush_buffer_state genspec_push_buffer_state
18 #define yypop_buffer_state genspec_pop_buffer_state
19 #define yyensure_buffer_stack genspec_ensure_buffer_stack
20 #define yy_flex_debug genspec__flex_debug
21 #define yyin genspec_in
22 #define yyleng genspec_leng
23 #define yylex genspec_lex
24 #define yylineno genspec_lineno
25 #define yyout genspec_out
26 #define yyrestart genspec_restart
27 #define yytext genspec_text
28 #define yywrap genspec_wrap
29 #define yyalloc genspec_alloc
30 #define yyrealloc genspec_realloc
31 #define yyfree genspec_free
32 
33 #define FLEX_SCANNER
34 #define YY_FLEX_MAJOR_VERSION 2
35 #define YY_FLEX_MINOR_VERSION 6
36 #define YY_FLEX_SUBMINOR_VERSION 4
37 #if YY_FLEX_SUBMINOR_VERSION > 0
38 #define FLEX_BETA
39 #endif
40 
41 #ifdef yy_create_buffer
42 #define genspec__create_buffer_ALREADY_DEFINED
43 #else
44 #define yy_create_buffer genspec__create_buffer
45 #endif
46 
47 #ifdef yy_delete_buffer
48 #define genspec__delete_buffer_ALREADY_DEFINED
49 #else
50 #define yy_delete_buffer genspec__delete_buffer
51 #endif
52 
53 #ifdef yy_scan_buffer
54 #define genspec__scan_buffer_ALREADY_DEFINED
55 #else
56 #define yy_scan_buffer genspec__scan_buffer
57 #endif
58 
59 #ifdef yy_scan_string
60 #define genspec__scan_string_ALREADY_DEFINED
61 #else
62 #define yy_scan_string genspec__scan_string
63 #endif
64 
65 #ifdef yy_scan_bytes
66 #define genspec__scan_bytes_ALREADY_DEFINED
67 #else
68 #define yy_scan_bytes genspec__scan_bytes
69 #endif
70 
71 #ifdef yy_init_buffer
72 #define genspec__init_buffer_ALREADY_DEFINED
73 #else
74 #define yy_init_buffer genspec__init_buffer
75 #endif
76 
77 #ifdef yy_flush_buffer
78 #define genspec__flush_buffer_ALREADY_DEFINED
79 #else
80 #define yy_flush_buffer genspec__flush_buffer
81 #endif
82 
83 #ifdef yy_load_buffer_state
84 #define genspec__load_buffer_state_ALREADY_DEFINED
85 #else
86 #define yy_load_buffer_state genspec__load_buffer_state
87 #endif
88 
89 #ifdef yy_switch_to_buffer
90 #define genspec__switch_to_buffer_ALREADY_DEFINED
91 #else
92 #define yy_switch_to_buffer genspec__switch_to_buffer
93 #endif
94 
95 #ifdef yypush_buffer_state
96 #define genspec_push_buffer_state_ALREADY_DEFINED
97 #else
98 #define yypush_buffer_state genspec_push_buffer_state
99 #endif
100 
101 #ifdef yypop_buffer_state
102 #define genspec_pop_buffer_state_ALREADY_DEFINED
103 #else
104 #define yypop_buffer_state genspec_pop_buffer_state
105 #endif
106 
107 #ifdef yyensure_buffer_stack
108 #define genspec_ensure_buffer_stack_ALREADY_DEFINED
109 #else
110 #define yyensure_buffer_stack genspec_ensure_buffer_stack
111 #endif
112 
113 #ifdef yylex
114 #define genspec_lex_ALREADY_DEFINED
115 #else
116 #define yylex genspec_lex
117 #endif
118 
119 #ifdef yyrestart
120 #define genspec_restart_ALREADY_DEFINED
121 #else
122 #define yyrestart genspec_restart
123 #endif
124 
125 #ifdef yylex_init
126 #define genspec_lex_init_ALREADY_DEFINED
127 #else
128 #define yylex_init genspec_lex_init
129 #endif
130 
131 #ifdef yylex_init_extra
132 #define genspec_lex_init_extra_ALREADY_DEFINED
133 #else
134 #define yylex_init_extra genspec_lex_init_extra
135 #endif
136 
137 #ifdef yylex_destroy
138 #define genspec_lex_destroy_ALREADY_DEFINED
139 #else
140 #define yylex_destroy genspec_lex_destroy
141 #endif
142 
143 #ifdef yyget_debug
144 #define genspec_get_debug_ALREADY_DEFINED
145 #else
146 #define yyget_debug genspec_get_debug
147 #endif
148 
149 #ifdef yyset_debug
150 #define genspec_set_debug_ALREADY_DEFINED
151 #else
152 #define yyset_debug genspec_set_debug
153 #endif
154 
155 #ifdef yyget_extra
156 #define genspec_get_extra_ALREADY_DEFINED
157 #else
158 #define yyget_extra genspec_get_extra
159 #endif
160 
161 #ifdef yyset_extra
162 #define genspec_set_extra_ALREADY_DEFINED
163 #else
164 #define yyset_extra genspec_set_extra
165 #endif
166 
167 #ifdef yyget_in
168 #define genspec_get_in_ALREADY_DEFINED
169 #else
170 #define yyget_in genspec_get_in
171 #endif
172 
173 #ifdef yyset_in
174 #define genspec_set_in_ALREADY_DEFINED
175 #else
176 #define yyset_in genspec_set_in
177 #endif
178 
179 #ifdef yyget_out
180 #define genspec_get_out_ALREADY_DEFINED
181 #else
182 #define yyget_out genspec_get_out
183 #endif
184 
185 #ifdef yyset_out
186 #define genspec_set_out_ALREADY_DEFINED
187 #else
188 #define yyset_out genspec_set_out
189 #endif
190 
191 #ifdef yyget_leng
192 #define genspec_get_leng_ALREADY_DEFINED
193 #else
194 #define yyget_leng genspec_get_leng
195 #endif
196 
197 #ifdef yyget_text
198 #define genspec_get_text_ALREADY_DEFINED
199 #else
200 #define yyget_text genspec_get_text
201 #endif
202 
203 #ifdef yyget_lineno
204 #define genspec_get_lineno_ALREADY_DEFINED
205 #else
206 #define yyget_lineno genspec_get_lineno
207 #endif
208 
209 #ifdef yyset_lineno
210 #define genspec_set_lineno_ALREADY_DEFINED
211 #else
212 #define yyset_lineno genspec_set_lineno
213 #endif
214 
215 #ifdef yywrap
216 #define genspec_wrap_ALREADY_DEFINED
217 #else
218 #define yywrap genspec_wrap
219 #endif
220 
221 #ifdef yyalloc
222 #define genspec_alloc_ALREADY_DEFINED
223 #else
224 #define yyalloc genspec_alloc
225 #endif
226 
227 #ifdef yyrealloc
228 #define genspec_realloc_ALREADY_DEFINED
229 #else
230 #define yyrealloc genspec_realloc
231 #endif
232 
233 #ifdef yyfree
234 #define genspec_free_ALREADY_DEFINED
235 #else
236 #define yyfree genspec_free
237 #endif
238 
239 #ifdef yytext
240 #define genspec_text_ALREADY_DEFINED
241 #else
242 #define yytext genspec_text
243 #endif
244 
245 #ifdef yyleng
246 #define genspec_leng_ALREADY_DEFINED
247 #else
248 #define yyleng genspec_leng
249 #endif
250 
251 #ifdef yyin
252 #define genspec_in_ALREADY_DEFINED
253 #else
254 #define yyin genspec_in
255 #endif
256 
257 #ifdef yyout
258 #define genspec_out_ALREADY_DEFINED
259 #else
260 #define yyout genspec_out
261 #endif
262 
263 #ifdef yy_flex_debug
264 #define genspec__flex_debug_ALREADY_DEFINED
265 #else
266 #define yy_flex_debug genspec__flex_debug
267 #endif
268 
269 #ifdef yylineno
270 #define genspec_lineno_ALREADY_DEFINED
271 #else
272 #define yylineno genspec_lineno
273 #endif
274 
275 /* First, we deal with platform-specific or compiler-specific issues. */
276 
277 /* begin standard C headers. */
278 #include <stdio.h>
279 #include <string.h>
280 #include <errno.h>
281 #include <stdlib.h>
282 
283 /* end standard C headers. */
284 
285 /* flex integer type definitions */
286 
287 #ifndef FLEXINT_H
288 #define FLEXINT_H
289 
290 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
291 
292 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
293 
294 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
295  * if you want the limit (max/min) macros for int types.
296  */
297 #ifndef __STDC_LIMIT_MACROS
298 #define __STDC_LIMIT_MACROS 1
299 #endif
300 
301 #include <inttypes.h>
302 typedef int8_t flex_int8_t;
303 typedef uint8_t flex_uint8_t;
304 typedef int16_t flex_int16_t;
305 typedef uint16_t flex_uint16_t;
306 typedef int32_t flex_int32_t;
307 typedef uint32_t flex_uint32_t;
308 #else
309 typedef signed char flex_int8_t;
310 typedef short int flex_int16_t;
311 typedef int flex_int32_t;
312 typedef unsigned char flex_uint8_t;
313 typedef unsigned short int flex_uint16_t;
314 typedef unsigned int flex_uint32_t;
315 
316 /* Limits of integral types. */
317 #ifndef INT8_MIN
318 #define INT8_MIN (-128)
319 #endif
320 #ifndef INT16_MIN
321 #define INT16_MIN (-32767-1)
322 #endif
323 #ifndef INT32_MIN
324 #define INT32_MIN (-2147483647-1)
325 #endif
326 #ifndef INT8_MAX
327 #define INT8_MAX (127)
328 #endif
329 #ifndef INT16_MAX
330 #define INT16_MAX (32767)
331 #endif
332 #ifndef INT32_MAX
333 #define INT32_MAX (2147483647)
334 #endif
335 #ifndef UINT8_MAX
336 #define UINT8_MAX (255U)
337 #endif
338 #ifndef UINT16_MAX
339 #define UINT16_MAX (65535U)
340 #endif
341 #ifndef UINT32_MAX
342 #define UINT32_MAX (4294967295U)
343 #endif
344 
345 #ifndef SIZE_MAX
346 #define SIZE_MAX (~(size_t)0)
347 #endif
348 
349 #endif /* ! C99 */
350 
351 #endif /* ! FLEXINT_H */
352 
353 /* begin standard C++ headers. */
354 
355 /* TODO: this is always defined, so inline it */
356 #define yyconst const
357 
358 #if defined(__GNUC__) && __GNUC__ >= 3
359 #define yynoreturn __attribute__((__noreturn__))
360 #else
361 #define yynoreturn
362 #endif
363 
364 /* Returned upon end-of-file. */
365 #define YY_NULL 0
366 
367 /* Promotes a possibly negative, possibly signed char to an
368  * integer in range [0..255] for use as an array index.
369  */
370 #define YY_SC_TO_UI(c) ((YY_CHAR) (c))
371 
372 /* Enter a start condition. This macro really ought to take a parameter,
373  * but we do it the disgusting crufty way forced on us by the ()-less
374  * definition of BEGIN.
375  */
376 #define BEGIN (yy_start) = 1 + 2 *
377 /* Translate the current start state into a value that can be later handed
378  * to BEGIN to return to the state. The YYSTATE alias is for lex
379  * compatibility.
380  */
381 #define YY_START (((yy_start) - 1) / 2)
382 #define YYSTATE YY_START
383 /* Action number for EOF rule of a given start state. */
384 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
385 /* Special action meaning "start processing a new file". */
386 #define YY_NEW_FILE yyrestart( yyin )
387 #define YY_END_OF_BUFFER_CHAR 0
388 
389 /* Size of default input buffer. */
390 #ifndef YY_BUF_SIZE
391 #ifdef __ia64__
392 /* On IA-64, the buffer size is 16k, not 8k.
393  * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
394  * Ditto for the __ia64__ case accordingly.
395  */
396 #define YY_BUF_SIZE 32768
397 #else
398 #define YY_BUF_SIZE 16384
399 #endif /* __ia64__ */
400 #endif
401 
402 /* The state buf must be large enough to hold one state per character in the main buffer.
403  */
404 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
405 
406 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
407 #define YY_TYPEDEF_YY_BUFFER_STATE
409 #endif
410 
411 #ifndef YY_TYPEDEF_YY_SIZE_T
412 #define YY_TYPEDEF_YY_SIZE_T
413 typedef size_t yy_size_t;
414 #endif
415 
416 extern int yyleng;
417 
418 extern FILE *yyin, *yyout;
419 
420 #define EOB_ACT_CONTINUE_SCAN 0
421 #define EOB_ACT_END_OF_FILE 1
422 #define EOB_ACT_LAST_MATCH 2
423 
424  #define YY_LESS_LINENO(n)
425  #define YY_LINENO_REWIND_TO(ptr)
426 
427 /* Return all but the first "n" matched characters back to the input stream. */
428 #define yyless(n) \
429  do \
430  { \
431  /* Undo effects of setting up yytext. */ \
432  int yyless_macro_arg = (n); \
433  YY_LESS_LINENO(yyless_macro_arg);\
434  *yy_cp = (yy_hold_char); \
435  YY_RESTORE_YY_MORE_OFFSET \
436  (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
437  YY_DO_BEFORE_ACTION; /* set up yytext again */ \
438  } \
439  while ( 0 )
440 #define unput(c) yyunput( c, (yytext_ptr) )
441 
442 #ifndef YY_STRUCT_YY_BUFFER_STATE
443 #define YY_STRUCT_YY_BUFFER_STATE
444 struct yy_buffer_state
445  {
446  FILE *yy_input_file;
447 
448  char *yy_ch_buf; /* input buffer */
449  char *yy_buf_pos; /* current position in input buffer */
450 
451  /* Size of input buffer in bytes, not including room for EOB
452  * characters.
453  */
454  int yy_buf_size;
455 
456  /* Number of characters read into yy_ch_buf, not including EOB
457  * characters.
458  */
459  int yy_n_chars;
460 
461  /* Whether we "own" the buffer - i.e., we know we created it,
462  * and can realloc() it to grow it, and should free() it to
463  * delete it.
464  */
465  int yy_is_our_buffer;
466 
467  /* Whether this is an "interactive" input source; if so, and
468  * if we're using stdio for input, then we want to use getc()
469  * instead of fread(), to make sure we stop fetching input after
470  * each newline.
471  */
472  int yy_is_interactive;
473 
474  /* Whether we're considered to be at the beginning of a line.
475  * If so, '^' rules will be active on the next match, otherwise
476  * not.
477  */
478  int yy_at_bol;
479 
480  int yy_bs_lineno; /**< The line count. */
481  int yy_bs_column; /**< The column count. */
482 
483  /* Whether to try to fill the input buffer when we reach the
484  * end of it.
485  */
486  int yy_fill_buffer;
487 
488  int yy_buffer_status;
489 
490 #define YY_BUFFER_NEW 0
491 #define YY_BUFFER_NORMAL 1
492  /* When an EOF's been seen but there's still some text to process
493  * then we mark the buffer as YY_EOF_PENDING, to indicate that we
494  * shouldn't try reading from the input source any more. We might
495  * still have a bunch of tokens to match, though, because of
496  * possible backing-up.
497  *
498  * When we actually see the EOF, we change the status to "new"
499  * (via yyrestart()), so that the user can continue scanning by
500  * just pointing yyin at a new input file.
501  */
502 #define YY_BUFFER_EOF_PENDING 2
503 
504  };
505 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
506 
507 /* Stack of input buffers. */
508 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
509 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
510 static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
511 
512 /* We provide macros for accessing buffer states in case in the
513  * future we want to put the buffer states in a more general
514  * "scanner state".
515  *
516  * Returns the top of the stack, or NULL.
517  */
518 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
519  ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
520  : NULL)
521 /* Same as previous macro, but useful when we know that the buffer stack is not
522  * NULL or when we need an lvalue. For internal use only.
523  */
524 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
525 
526 /* yy_hold_char holds the character lost when yytext is formed. */
527 static char yy_hold_char;
528 static int yy_n_chars; /* number of characters read into yy_ch_buf */
529 int yyleng;
530 
531 /* Points to current character in buffer. */
532 static char *yy_c_buf_p = NULL;
533 static int yy_init = 0; /* whether we need to initialize */
534 static int yy_start = 0; /* start state number */
535 
536 /* Flag which is used to allow yywrap()'s to do buffer switches
537  * instead of setting up a fresh yyin. A bit of a hack ...
538  */
540 
541 void yyrestart ( FILE *input_file );
543 YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size );
547 void yypop_buffer_state ( void );
548 
549 static void yyensure_buffer_stack ( void );
550 static void yy_load_buffer_state ( void );
551 static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file );
552 #define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
553 
555 YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
556 YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );
557 
558 void *yyalloc ( yy_size_t );
559 void *yyrealloc ( void *, yy_size_t );
560 void yyfree ( void * );
561 
562 #define yy_new_buffer yy_create_buffer
563 #define yy_set_interactive(is_interactive) \
564  { \
565  if ( ! YY_CURRENT_BUFFER ){ \
566  yyensure_buffer_stack (); \
567  YY_CURRENT_BUFFER_LVALUE = \
568  yy_create_buffer( yyin, YY_BUF_SIZE ); \
569  } \
570  YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
571  }
572 #define yy_set_bol(at_bol) \
573  { \
574  if ( ! YY_CURRENT_BUFFER ){\
575  yyensure_buffer_stack (); \
576  YY_CURRENT_BUFFER_LVALUE = \
577  yy_create_buffer( yyin, YY_BUF_SIZE ); \
578  } \
579  YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
580  }
581 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
582 
583 /* Begin user sect3 */
585 
586 FILE *yyin , *yyout ;
587 
588 typedef int yy_state_type;
589 
590 extern int yylineno;
591 int yylineno = 1;
592 
593 extern char *yytext;
594 #ifdef yytext_ptr
595 #undef yytext_ptr
596 #endif
597 #define yytext_ptr yytext
598 
601 static int yy_get_next_buffer ( void );
602 static void yynoreturn yy_fatal_error ( const char* msg );
603 
604 /* Done after the current pattern has been matched and before the
605  * corresponding action - sets up yytext.
606  */
607 #define YY_DO_BEFORE_ACTION \
608  (yytext_ptr) = yy_bp; \
609  yyleng = (int) (yy_cp - yy_bp); \
610  (yy_hold_char) = *yy_cp; \
611  *yy_cp = '\0'; \
612  (yy_c_buf_p) = yy_cp;
613 #define YY_NUM_RULES 26
614 #define YY_END_OF_BUFFER 27
615 /* This struct is not used in this scanner,
616  but its presence is necessary. */
617 struct yy_trans_info
618  {
621  };
622 static const flex_int16_t yy_accept[96] =
623  { 0,
624  25, 25, 27, 26, 25, 26, 13, 11, 7, 26,
625  24, 8, 9, 19, 23, 14, 15, 23, 23, 23,
626  23, 23, 10, 16, 17, 26, 25, 0, 0, 12,
627  24, 23, 23, 23, 23, 23, 23, 0, 18, 0,
628  22, 23, 23, 23, 23, 23, 0, 23, 4, 23,
629  23, 23, 0, 23, 23, 23, 23, 0, 23, 2,
630  23, 23, 0, 23, 23, 23, 0, 1, 23, 23,
631  23, 0, 23, 23, 3, 0, 5, 6, 0, 0,
632  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
633  21, 0, 20, 0, 0
634 
635  } ;
636 
637 static const YY_CHAR yy_ec[256] =
638  { 0,
639  1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
640  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
641  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
642  1, 4, 1, 5, 1, 1, 1, 1, 1, 1,
643  1, 6, 7, 8, 9, 10, 10, 11, 11, 11,
644  11, 11, 11, 11, 11, 11, 11, 12, 13, 1,
645  14, 15, 1, 1, 16, 17, 17, 18, 19, 17,
646  20, 17, 21, 17, 17, 17, 17, 22, 17, 17,
647  17, 23, 24, 25, 17, 17, 26, 27, 17, 17,
648  28, 1, 29, 1, 17, 1, 30, 31, 17, 32,
649 
650  33, 34, 17, 17, 35, 17, 17, 36, 37, 38,
651  39, 40, 17, 41, 42, 43, 44, 17, 17, 45,
652  17, 17, 46, 1, 47, 10, 1, 1, 1, 1,
653  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
654  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
655  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
656  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
657  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
658  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
659  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
660 
661  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
662  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
663  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
664  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
665  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
666  1, 1, 1, 1, 1
667  } ;
668 
669 static const YY_CHAR yy_meta[48] =
670  { 0,
671  1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
672  3, 1, 1, 1, 1, 3, 3, 3, 3, 3,
673  3, 3, 3, 3, 3, 3, 3, 1, 1, 3,
674  3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
675  3, 3, 3, 3, 3, 1, 1
676  } ;
677 
678 static const flex_int16_t yy_base[99] =
679  { 0,
680  0, 141, 149, 151, 46, 0, 151, 151, 151, 42,
681  137, 151, 151, 151, 0, 151, 151, 102, 105, 108,
682  111, 113, 0, 151, 151, 43, 51, 137, 138, 151,
683  129, 0, 96, 99, 97, 95, 104, 53, 151, 131,
684  151, 100, 95, 92, 88, 85, 57, 87, 0, 86,
685  91, 89, 56, 86, 80, 80, 91, 58, 90, 0,
686  76, 75, 60, 81, 32, 83, 61, 0, 71, 68,
687  73, 63, 60, 41, 0, 64, 0, 0, 65, 66,
688  68, 74, 70, 71, 77, 67, 92, 94, 90, 96,
689  151, 97, 151, 99, 151, 109, 78, 112
690 
691  } ;
692 
693 static const flex_int16_t yy_def[99] =
694  { 0,
695  95, 1, 95, 95, 95, 96, 95, 95, 95, 95,
696  95, 95, 95, 95, 97, 95, 95, 97, 97, 97,
697  97, 97, 97, 95, 95, 95, 95, 96, 98, 95,
698  95, 97, 97, 97, 97, 97, 97, 98, 95, 98,
699  95, 97, 97, 97, 97, 97, 98, 97, 97, 97,
700  97, 97, 98, 97, 97, 97, 97, 98, 97, 97,
701  97, 97, 98, 97, 97, 97, 98, 97, 97, 97,
702  97, 98, 97, 97, 97, 98, 97, 97, 98, 98,
703  98, 98, 98, 98, 98, 98, 98, 98, 98, 98,
704  95, 98, 95, 98, 0, 95, 95, 95
705 
706  } ;
707 
708 static const flex_int16_t yy_nxt[199] =
709  { 0,
710  4, 5, 5, 5, 6, 7, 8, 9, 10, 4,
711  11, 12, 13, 14, 4, 15, 15, 15, 15, 15,
712  15, 15, 15, 15, 15, 15, 15, 16, 17, 15,
713  15, 15, 18, 19, 20, 15, 15, 15, 15, 21,
714  15, 15, 22, 15, 23, 24, 25, 27, 27, 27,
715  29, 38, 27, 27, 27, 41, 30, 30, 41, 41,
716  41, 69, 41, 41, 70, 41, 41, 41, 41, 41,
717  41, 76, 41, 41, 47, 53, 41, 63, 67, 41,
718  32, 58, 72, 78, 79, 83, 81, 80, 85, 84,
719  82, 88, 91, 86, 41, 89, 41, 90, 93, 91,
720 
721  92, 93, 77, 87, 75, 74, 94, 92, 73, 94,
722  28, 28, 40, 40, 40, 71, 68, 66, 65, 64,
723  62, 61, 60, 59, 57, 56, 55, 54, 52, 51,
724  50, 49, 48, 41, 46, 45, 44, 43, 42, 31,
725  41, 39, 37, 36, 35, 34, 33, 31, 95, 26,
726  3, 95, 95, 95, 95, 95, 95, 95, 95, 95,
727  95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
728  95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
729  95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
730  95, 95, 95, 95, 95, 95, 95, 95
731 
732  } ;
733 
734 static const flex_int16_t yy_chk[199] =
735  { 0,
736  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
737  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
738  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
739  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
740  1, 1, 1, 1, 1, 1, 1, 5, 5, 5,
741  10, 26, 27, 27, 27, 38, 10, 26, 53, 47,
742  58, 65, 63, 67, 65, 72, 76, 79, 80, 86,
743  81, 72, 83, 84, 38, 47, 82, 58, 63, 85,
744  97, 53, 67, 74, 76, 81, 79, 76, 83, 82,
745  80, 86, 89, 84, 87, 87, 88, 88, 90, 92,
746 
747  89, 94, 73, 85, 71, 70, 90, 92, 69, 94,
748  96, 96, 98, 98, 98, 66, 64, 62, 61, 59,
749  57, 56, 55, 54, 52, 51, 50, 48, 46, 45,
750  44, 43, 42, 40, 37, 36, 35, 34, 33, 31,
751  29, 28, 22, 21, 20, 19, 18, 11, 3, 2,
752  95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
753  95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
754  95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
755  95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
756  95, 95, 95, 95, 95, 95, 95, 95
757 
758  } ;
759 
762 
763 extern int yy_flex_debug;
765 
766 /* The intent behind this definition is that it'll catch
767  * any uses of REJECT which flex missed.
768  */
769 #define REJECT reject_used_but_not_detected
770 #define yymore() yymore_used_but_not_detected
771 #define YY_MORE_ADJ 0
772 #define YY_RESTORE_YY_MORE_OFFSET
773 char *yytext;
774 #line 1 "spec.l"
775 #line 2 "spec.l"
776 /*
777 
778  $Id: spec.l 1381 2018-07-04 04:41:34Z coelho $
779 
780  Copyright 1989-2016 MINES ParisTech
781 
782  This file is part of NewGen.
783 
784  NewGen is free software: you can redistribute it and/or modify it under the
785  terms of the GNU General Public License as published by the Free Software
786  Foundation, either version 3 of the License, or any later version.
787 
788  NewGen is distributed in the hope that it will be useful, but WITHOUT ANY
789  WARRANTY; without even the implied warranty of MERCHANTABILITY or
790  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
791  License for more details.
792 
793  You should have received a copy of the GNU General Public License along with
794  NewGen. If not, see <http://www.gnu.org/licenses/>.
795 
796 */
797 /*
798  When a new keyword is added, update the KEYWORDS array in build.c
799 */
800 
801 #include <stdio.h>
802 #include <stdlib.h>
803 #include <string.h>
804 #include <math.h>
805 
806 #include "genC.h"
807 #include "genspec.h"
808 
809 #ifndef yylval
810 #define yylval genspec_lval
811 #endif // yylval
812 
813 extern int Current_start;
814 
815 #ifdef FLEX_SCANNER
816 
817 /* We may parse strings or files...
818  */
819 static char * string_to_parse = (char*) 0; /* shared pointer! */
820 
821 #define YY_INPUT(buffer, result, max_size) \
822  { \
823  int i = 0; \
824  if (string_to_parse) /* we're parsing a string */ \
825  { \
826  while(i < (int) max_size && *string_to_parse) \
827  buffer[i++]=*string_to_parse++; \
828  } \
829  else /* it's a file */ \
830  { \
831  int c; \
832  while (i < (int) max_size && (c=getc(yyin))!=EOF) \
833  buffer[i++]=(char) c; \
834  } \
835  result = i==0? YY_NULL: i; \
836 }
837 
840 
841 #else /* ATT/POSIX just seem to like parsing yyin... */
842 // I guess this code won't be use again anyway... RK
843 void genspec_set_string_to_parse(char *s)
844 {
845  if ((genspec_in = tmpfile()) == NULL) {
846  user( "Cannot create temp spec file in read/write mode\n" ) ;
847  return ;
848  }
849  fprintf( genspec_in , "%s", s ) ;
850 }
851 
853 {
854  // The file created by tmpfile() is automatically deleted on close:
855  fclose(genspec_in);
856 }
857 #endif // FLEX_SCANNER
858 
859 /* cache parsed string instead of strduplicating them
860  * valid because those strign are never released
861  * SG, feb. 2009
862  */
863 #ifndef DISABLE_NEWGEN_PARSER_CACHE
864 
865  #include <search.h>
866  char* strcache(char *s)
867  {
868  static void* rootp = NULL;
869  char ** res = NULL;
870  if( !(res = tfind(s,&rootp,(int(*)(const void*,const void*))strcmp)) )
871  {
872  char * dup = strdup(s);
873  res = tsearch(dup,&rootp,(int(*)(const void*,const void*))strcmp);
874  assert(*res == dup);
875  }
876  return *res;
877  }
878 
879 #else
880 
881  #define strcache strdup
882 
883 #endif
884 
885 #line 886 "<stdout>"
886 #line 887 "<stdout>"
887 
888 #define INITIAL 0
889 
890 #ifndef YY_NO_UNISTD_H
891 /* Special case for "unistd.h", since it is non-ANSI. We include it way
892  * down here because we want the user's section 1 to have been scanned first.
893  * The user has a chance to override it with an option.
894  */
895 #include <unistd.h>
896 #endif
897 
898 #ifndef YY_EXTRA_TYPE
899 #define YY_EXTRA_TYPE void *
900 #endif
901 
902 static int yy_init_globals ( void );
903 
904 /* Accessor methods to globals.
905  These are made visible to non-reentrant scanners for convenience. */
906 
907 int yylex_destroy ( void );
908 
909 int yyget_debug ( void );
910 
911 void yyset_debug ( int debug_flag );
912 
913 YY_EXTRA_TYPE yyget_extra ( void );
914 
915 void yyset_extra ( YY_EXTRA_TYPE user_defined );
916 
917 FILE *yyget_in ( void );
918 
919 void yyset_in ( FILE * _in_str );
920 
921 FILE *yyget_out ( void );
922 
923 void yyset_out ( FILE * _out_str );
924 
925  int yyget_leng ( void );
926 
927 char *yyget_text ( void );
928 
929 int yyget_lineno ( void );
930 
931 void yyset_lineno ( int _line_number );
932 
933 /* Macros after this point can all be overridden by user definitions in
934  * section 1.
935  */
936 
937 #ifndef YY_SKIP_YYWRAP
938 #ifdef __cplusplus
939 extern "C" int yywrap ( void );
940 #else
941 extern int yywrap ( void );
942 #endif
943 #endif
944 
945 #ifndef YY_NO_UNPUT
946 
947 #endif
948 
949 #ifndef yytext_ptr
950 static void yy_flex_strncpy ( char *, const char *, int );
951 #endif
952 
953 #ifdef YY_NEED_STRLEN
954 static int yy_flex_strlen ( const char * );
955 #endif
956 
957 #ifndef YY_NO_INPUT
958 #ifdef __cplusplus
959 static int yyinput ( void );
960 #else
961 static int input ( void );
962 #endif
963 
964 #endif
965 
966 /* Amount of stuff to slurp up with each read. */
967 #ifndef YY_READ_BUF_SIZE
968 #ifdef __ia64__
969 /* On IA-64, the buffer size is 16k, not 8k */
970 #define YY_READ_BUF_SIZE 16384
971 #else
972 #define YY_READ_BUF_SIZE 8192
973 #endif /* __ia64__ */
974 #endif
975 
976 /* Copy whatever the last rule matched to the standard output. */
977 #ifndef ECHO
978 /* This used to be an fputs(), but since the string might contain NUL's,
979  * we now use fwrite().
980  */
981 #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
982 #endif
983 
984 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
985  * is returned in "result".
986  */
987 #ifndef YY_INPUT
988 #define YY_INPUT(buf,result,max_size) \
989  if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
990  { \
991  int c = '*'; \
992  int n; \
993  for ( n = 0; n < max_size && \
994  (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
995  buf[n] = (char) c; \
996  if ( c == '\n' ) \
997  buf[n++] = (char) c; \
998  if ( c == EOF && ferror( yyin ) ) \
999  YY_FATAL_ERROR( "input in flex scanner failed" ); \
1000  result = n; \
1001  } \
1002  else \
1003  { \
1004  errno=0; \
1005  while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
1006  { \
1007  if( errno != EINTR) \
1008  { \
1009  YY_FATAL_ERROR( "input in flex scanner failed" ); \
1010  break; \
1011  } \
1012  errno=0; \
1013  clearerr(yyin); \
1014  } \
1015  }\
1016 \
1017 
1018 #endif
1019 
1020 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1021  * we don't want an extra ';' after the "return" because that will cause
1022  * some compilers to complain about unreachable statements.
1023  */
1024 #ifndef yyterminate
1025 #define yyterminate() return YY_NULL
1026 #endif
1027 
1028 /* Number of entries by which start-condition stack grows. */
1029 #ifndef YY_START_STACK_INCR
1030 #define YY_START_STACK_INCR 25
1031 #endif
1032 
1033 /* Report a fatal error. */
1034 #ifndef YY_FATAL_ERROR
1035 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1036 #endif
1037 
1038 /* end tables serialization structures and prototypes */
1039 
1040 /* Default declaration of generated scanner - a define so the user can
1041  * easily add parameters.
1042  */
1043 #ifndef YY_DECL
1044 #define YY_DECL_IS_OURS 1
1045 
1046 extern int yylex (void);
1047 
1048 #define YY_DECL int yylex (void)
1049 #endif /* !YY_DECL */
1050 
1051 /* Code executed at the beginning of each rule, after yytext and yyleng
1052  * have been set up.
1053  */
1054 #ifndef YY_USER_ACTION
1055 #define YY_USER_ACTION
1056 #endif
1057 
1058 /* Code executed at the end of each rule. */
1059 #ifndef YY_BREAK
1060 #define YY_BREAK /*LINTED*/break;
1061 #endif
1062 
1063 #define YY_RULE_SETUP \
1064  if ( yyleng > 0 ) \
1065  YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
1066  (yytext[yyleng - 1] == '\n'); \
1067  YY_USER_ACTION
1068 
1069 /** The main scanner function which does all the work.
1070  */
1072 {
1073  yy_state_type yy_current_state;
1074  char *yy_cp, *yy_bp;
1075  int yy_act;
1076 
1077  if ( !(yy_init) )
1078  {
1079  (yy_init) = 1;
1080 
1081 #ifdef YY_USER_INIT
1082  YY_USER_INIT;
1083 #endif
1084 
1085  if ( ! (yy_start) )
1086  (yy_start) = 1; /* first start state */
1087 
1088  if ( ! yyin )
1089  yyin = stdin;
1090 
1091  if ( ! yyout )
1092  yyout = stdout;
1093 
1094  if ( ! YY_CURRENT_BUFFER ) {
1098  }
1099 
1101  }
1102 
1103  {
1104 #line 114 "spec.l"
1105 
1106 #line 1107 "<stdout>"
1107 
1108  while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
1109  {
1110  yy_cp = (yy_c_buf_p);
1111 
1112  /* Support of yytext. */
1113  *yy_cp = (yy_hold_char);
1114 
1115  /* yy_bp points to the position in yy_ch_buf of the start of
1116  * the current run.
1117  */
1118  yy_bp = yy_cp;
1119 
1120  yy_current_state = (yy_start);
1121  yy_current_state += YY_AT_BOL();
1122 yy_match:
1123  do
1124  {
1125  YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
1126  if ( yy_accept[yy_current_state] )
1127  {
1128  (yy_last_accepting_state) = yy_current_state;
1130  }
1131  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1132  {
1133  yy_current_state = (int) yy_def[yy_current_state];
1134  if ( yy_current_state >= 96 )
1135  yy_c = yy_meta[yy_c];
1136  }
1137  yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1138  ++yy_cp;
1139  }
1140  while ( yy_base[yy_current_state] != 151 );
1141 
1142 yy_find_action:
1143  yy_act = yy_accept[yy_current_state];
1144  if ( yy_act == 0 )
1145  { /* have to back up */
1147  yy_current_state = (yy_last_accepting_state);
1148  yy_act = yy_accept[yy_current_state];
1149  }
1150 
1152 
1153 do_action: /* This label is used only to access EOF actions. */
1154 
1155  switch ( yy_act )
1156  { /* beginning of action switch */
1157  case 0: /* must back up */
1158  /* undo the effects of YY_DO_BEFORE_ACTION */
1159  *yy_cp = (yy_hold_char);
1161  yy_current_state = (yy_last_accepting_state);
1162  goto yy_find_action;
1163 
1164 case 1:
1166 #line 115 "spec.l"
1167 {return GRAM_EXTERNAL ;}
1168  YY_BREAK
1169 case 2:
1171 #line 116 "spec.l"
1172 {return GRAM_IMPORT ;}
1173  YY_BREAK
1174 case 3:
1176 #line 117 "spec.l"
1177 {return TABULATED ;}
1178  YY_BREAK
1179 case 4:
1181 #line 118 "spec.l"
1182 {return FROM ;}
1183  YY_BREAK
1184 case 5:
1186 #line 119 "spec.l"
1187 {return PERSISTANT ;}
1188  YY_BREAK
1189 case 6:
1191 #line 120 "spec.l"
1192 {return PERSISTANT ;}
1193  YY_BREAK
1194 case 7:
1196 #line 121 "spec.l"
1197 {return COMMA ;}
1198  YY_BREAK
1199 case 8:
1201 #line 122 "spec.l"
1202 {return COLUMN ;}
1203  YY_BREAK
1204 case 9:
1206 #line 123 "spec.l"
1207 {return SEMI_COLUMN ;}
1208  YY_BREAK
1209 case 10:
1211 #line 124 "spec.l"
1212 {return AND ;}
1213  YY_BREAK
1214 case 11:
1216 #line 125 "spec.l"
1217 {return OR ;}
1218  YY_BREAK
1219 case 12:
1221 #line 126 "spec.l"
1222 {return ARROW ;}
1223  YY_BREAK
1224 case 13:
1226 #line 127 "spec.l"
1227 {return STAR ;}
1228  YY_BREAK
1229 case 14:
1231 #line 128 "spec.l"
1232 {return LB ;}
1233  YY_BREAK
1234 case 15:
1236 #line 129 "spec.l"
1237 {return RB ;}
1238  YY_BREAK
1239 case 16:
1241 #line 130 "spec.l"
1242 {return LR ;}
1243  YY_BREAK
1244 case 17:
1246 #line 131 "spec.l"
1247 {return RR ;}
1248  YY_BREAK
1249 case 18:
1251 #line 132 "spec.l"
1252 { ++yytext; yytext[+strlen(yytext)-1] = '\0';
1253  yylval.name = strcache(yytext);
1254  return GRAM_FILE ;}
1255  YY_BREAK
1256 case 19:
1258 #line 135 "spec.l"
1259 {return EQUAL ;}
1260  YY_BREAK
1261 case 20:
1262 /* rule 20 can match eol */
1264 #line 136 "spec.l"
1265 {
1266  Current_start =
1267  atoi( yytext+strlen( "--NEWGEN-START " )) ;
1268  }
1269  YY_BREAK
1270 case 21:
1271 /* rule 21 can match eol */
1273 #line 140 "spec.l"
1274 ;
1275  YY_BREAK
1276 case 22:
1277 /* rule 22 can match eol */
1279 #line 141 "spec.l"
1280 {}
1281  YY_BREAK
1282 case 23:
1284 #line 142 "spec.l"
1285 { yylval.name = strcache(yytext); return IDENT ;}
1286  YY_BREAK
1287 case 24:
1289 #line 143 "spec.l"
1290 { yylval.val = atoi(yytext); return GRAM_INT ;}
1291  YY_BREAK
1292 case 25:
1293 /* rule 25 can match eol */
1295 #line 144 "spec.l"
1296 ;
1297  YY_BREAK
1298 case 26:
1300 #line 145 "spec.l"
1301 ECHO;
1302  YY_BREAK
1303 #line 1304 "<stdout>"
1304 case YY_STATE_EOF(INITIAL):
1305  yyterminate();
1306 
1307  case YY_END_OF_BUFFER:
1308  {
1309  /* Amount of text matched not including the EOB char. */
1310  int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1311 
1312  /* Undo the effects of YY_DO_BEFORE_ACTION. */
1313  *yy_cp = (yy_hold_char);
1315 
1316  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1317  {
1318  /* We're scanning a new file or input source. It's
1319  * possible that this happened because the user
1320  * just pointed yyin at a new source and called
1321  * yylex(). If so, then we have to assure
1322  * consistency between YY_CURRENT_BUFFER and our
1323  * globals. Here is the right place to do so, because
1324  * this is the first action (other than possibly a
1325  * back-up) that will match for the new input source.
1326  */
1327  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1328  YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1329  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1330  }
1331 
1332  /* Note that here we test for yy_c_buf_p "<=" to the position
1333  * of the first EOB in the buffer, since yy_c_buf_p will
1334  * already have been incremented past the NUL character
1335  * (since all states make transitions on EOB to the
1336  * end-of-buffer state). Contrast this with the test
1337  * in input().
1338  */
1339  if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1340  { /* This was really a NUL. */
1341  yy_state_type yy_next_state;
1342 
1343  (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1344 
1345  yy_current_state = yy_get_previous_state( );
1346 
1347  /* Okay, we're now positioned to make the NUL
1348  * transition. We couldn't have
1349  * yy_get_previous_state() go ahead and do it
1350  * for us because it doesn't know how to deal
1351  * with the possibility of jamming (and we don't
1352  * want to build jamming into it because then it
1353  * will run more slowly).
1354  */
1355 
1356  yy_next_state = yy_try_NUL_trans( yy_current_state );
1357 
1359 
1360  if ( yy_next_state )
1361  {
1362  /* Consume the NUL. */
1363  yy_cp = ++(yy_c_buf_p);
1364  yy_current_state = yy_next_state;
1365  goto yy_match;
1366  }
1367 
1368  else
1369  {
1370  yy_cp = (yy_c_buf_p);
1371  goto yy_find_action;
1372  }
1373  }
1374 
1375  else switch ( yy_get_next_buffer( ) )
1376  {
1377  case EOB_ACT_END_OF_FILE:
1378  {
1380 
1381  if ( yywrap( ) )
1382  {
1383  /* Note: because we've taken care in
1384  * yy_get_next_buffer() to have set up
1385  * yytext, we can now set up
1386  * yy_c_buf_p so that if some total
1387  * hoser (like flex itself) wants to
1388  * call the scanner after we return the
1389  * YY_NULL, it'll still work - another
1390  * YY_NULL will get returned.
1391  */
1393 
1395  goto do_action;
1396  }
1397 
1398  else
1399  {
1400  if ( ! (yy_did_buffer_switch_on_eof) )
1401  YY_NEW_FILE;
1402  }
1403  break;
1404  }
1405 
1406  case EOB_ACT_CONTINUE_SCAN:
1407  (yy_c_buf_p) =
1408  (yytext_ptr) + yy_amount_of_matched_text;
1409 
1410  yy_current_state = yy_get_previous_state( );
1411 
1412  yy_cp = (yy_c_buf_p);
1414  goto yy_match;
1415 
1416  case EOB_ACT_LAST_MATCH:
1417  (yy_c_buf_p) =
1418  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1419 
1420  yy_current_state = yy_get_previous_state( );
1421 
1422  yy_cp = (yy_c_buf_p);
1424  goto yy_find_action;
1425  }
1426  break;
1427  }
1428 
1429  default:
1431  "fatal flex scanner internal error--no action found" );
1432  } /* end of action switch */
1433  } /* end of scanning one token */
1434  } /* end of user's declarations */
1435 } /* end of yylex */
1436 
1437 /* yy_get_next_buffer - try to read in a new buffer
1438  *
1439  * Returns a code representing an action:
1440  * EOB_ACT_LAST_MATCH -
1441  * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1442  * EOB_ACT_END_OF_FILE - end of file
1443  */
1444 static int yy_get_next_buffer (void)
1445 {
1446  char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1447  char *source = (yytext_ptr);
1448  int number_to_move, i;
1449  int ret_val;
1450 
1451  if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1453  "fatal flex scanner internal error--end of buffer missed" );
1454 
1455  if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1456  { /* Don't try to fill the buffer, so this is an EOF. */
1457  if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1458  {
1459  /* We matched a single character, the EOB, so
1460  * treat this as a final EOF.
1461  */
1462  return EOB_ACT_END_OF_FILE;
1463  }
1464 
1465  else
1466  {
1467  /* We matched some text prior to the EOB, first
1468  * process it.
1469  */
1470  return EOB_ACT_LAST_MATCH;
1471  }
1472  }
1473 
1474  /* Try to read more data. */
1475 
1476  /* First move last chars to start of buffer. */
1477  number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
1478 
1479  for ( i = 0; i < number_to_move; ++i )
1480  *(dest++) = *(source++);
1481 
1482  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1483  /* don't do the read, it's not guaranteed to return an EOF,
1484  * just force an EOF
1485  */
1486  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1487 
1488  else
1489  {
1490  int num_to_read =
1491  YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1492 
1493  while ( num_to_read <= 0 )
1494  { /* Not enough room in the buffer - grow it. */
1495 
1496  /* just a shorter name for the current buffer */
1498 
1499  int yy_c_buf_p_offset =
1500  (int) ((yy_c_buf_p) - b->yy_ch_buf);
1501 
1502  if ( b->yy_is_our_buffer )
1503  {
1504  int new_size = b->yy_buf_size * 2;
1505 
1506  if ( new_size <= 0 )
1507  b->yy_buf_size += b->yy_buf_size / 8;
1508  else
1509  b->yy_buf_size *= 2;
1510 
1511  b->yy_ch_buf = (char *)
1512  /* Include room in for 2 EOB chars. */
1513  yyrealloc( (void *) b->yy_ch_buf,
1514  (yy_size_t) (b->yy_buf_size + 2) );
1515  }
1516  else
1517  /* Can't grow it, we don't own it. */
1518  b->yy_ch_buf = NULL;
1519 
1520  if ( ! b->yy_ch_buf )
1522  "fatal error - scanner input buffer overflow" );
1523 
1524  (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1525 
1526  num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1527  number_to_move - 1;
1528 
1529  }
1530 
1531  if ( num_to_read > YY_READ_BUF_SIZE )
1532  num_to_read = YY_READ_BUF_SIZE;
1533 
1534  /* Read in more data. */
1535  YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1536  (yy_n_chars), num_to_read );
1537 
1538  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1539  }
1540 
1541  if ( (yy_n_chars) == 0 )
1542  {
1543  if ( number_to_move == YY_MORE_ADJ )
1544  {
1545  ret_val = EOB_ACT_END_OF_FILE;
1546  yyrestart( yyin );
1547  }
1548 
1549  else
1550  {
1551  ret_val = EOB_ACT_LAST_MATCH;
1552  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1554  }
1555  }
1556 
1557  else
1558  ret_val = EOB_ACT_CONTINUE_SCAN;
1559 
1560  if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1561  /* Extend the array by 50%, plus the number we really need. */
1562  int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1563  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
1564  (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
1565  if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1566  YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1567  /* "- 2" to take care of EOB's */
1568  YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
1569  }
1570 
1571  (yy_n_chars) += number_to_move;
1574 
1575  (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1576 
1577  return ret_val;
1578 }
1579 
1580 /* yy_get_previous_state - get the state just before the EOB char was reached */
1581 
1582  static yy_state_type yy_get_previous_state (void)
1583 {
1584  yy_state_type yy_current_state;
1585  char *yy_cp;
1586 
1587  yy_current_state = (yy_start);
1588  yy_current_state += YY_AT_BOL();
1589 
1590  for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1591  {
1592  YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1593  if ( yy_accept[yy_current_state] )
1594  {
1595  (yy_last_accepting_state) = yy_current_state;
1597  }
1598  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1599  {
1600  yy_current_state = (int) yy_def[yy_current_state];
1601  if ( yy_current_state >= 96 )
1602  yy_c = yy_meta[yy_c];
1603  }
1604  yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1605  }
1606 
1607  return yy_current_state;
1608 }
1609 
1610 /* yy_try_NUL_trans - try to make a transition on the NUL character
1611  *
1612  * synopsis
1613  * next_state = yy_try_NUL_trans( current_state );
1614  */
1615  static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1616 {
1617  int yy_is_jam;
1618  char *yy_cp = (yy_c_buf_p);
1619 
1620  YY_CHAR yy_c = 1;
1621  if ( yy_accept[yy_current_state] )
1622  {
1623  (yy_last_accepting_state) = yy_current_state;
1625  }
1626  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1627  {
1628  yy_current_state = (int) yy_def[yy_current_state];
1629  if ( yy_current_state >= 96 )
1630  yy_c = yy_meta[yy_c];
1631  }
1632  yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1633  yy_is_jam = (yy_current_state == 95);
1634 
1635  return yy_is_jam ? 0 : yy_current_state;
1636 }
1637 
1638 #ifndef YY_NO_UNPUT
1639 
1640 #endif
1641 
1642 #ifndef YY_NO_INPUT
1643 #ifdef __cplusplus
1644  static int yyinput (void)
1645 #else
1646  static int input (void)
1647 #endif
1648 
1649 {
1650  int c;
1651 
1652  *(yy_c_buf_p) = (yy_hold_char);
1653 
1654  if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1655  {
1656  /* yy_c_buf_p now points to the character we want to return.
1657  * If this occurs *before* the EOB characters, then it's a
1658  * valid NUL; if not, then we've hit the end of the buffer.
1659  */
1660  if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1661  /* This was really a NUL. */
1662  *(yy_c_buf_p) = '\0';
1663 
1664  else
1665  { /* need more input */
1666  int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
1667  ++(yy_c_buf_p);
1668 
1669  switch ( yy_get_next_buffer( ) )
1670  {
1671  case EOB_ACT_LAST_MATCH:
1672  /* This happens because yy_g_n_b()
1673  * sees that we've accumulated a
1674  * token and flags that we need to
1675  * try matching the token before
1676  * proceeding. But for input(),
1677  * there's no matching to consider.
1678  * So convert the EOB_ACT_LAST_MATCH
1679  * to EOB_ACT_END_OF_FILE.
1680  */
1681 
1682  /* Reset buffer status. */
1683  yyrestart( yyin );
1684 
1685  /*FALLTHROUGH*/
1686 
1687  case EOB_ACT_END_OF_FILE:
1688  {
1689  if ( yywrap( ) )
1690  return 0;
1691 
1692  if ( ! (yy_did_buffer_switch_on_eof) )
1693  YY_NEW_FILE;
1694 #ifdef __cplusplus
1695  return yyinput();
1696 #else
1697  return input();
1698 #endif
1699  }
1700 
1701  case EOB_ACT_CONTINUE_SCAN:
1702  (yy_c_buf_p) = (yytext_ptr) + offset;
1703  break;
1704  }
1705  }
1706  }
1707 
1708  c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1709  *(yy_c_buf_p) = '\0'; /* preserve yytext */
1710  (yy_hold_char) = *++(yy_c_buf_p);
1711 
1712  YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
1713 
1714  return c;
1715 }
1716 #endif /* ifndef YY_NO_INPUT */
1717 
1718 /** Immediately switch to a different input stream.
1719  * @param input_file A readable stream.
1720  *
1721  * @note This function does not reset the start condition to @c INITIAL .
1722  */
1723  void yyrestart (FILE * input_file )
1724 {
1725 
1726  if ( ! YY_CURRENT_BUFFER ){
1730  }
1731 
1732  yy_init_buffer( YY_CURRENT_BUFFER, input_file );
1734 }
1735 
1736 /** Switch to a different input buffer.
1737  * @param new_buffer The new input buffer.
1738  *
1739  */
1740  void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
1741 {
1742 
1743  /* TODO. We should be able to replace this entire function body
1744  * with
1745  * yypop_buffer_state();
1746  * yypush_buffer_state(new_buffer);
1747  */
1749  if ( YY_CURRENT_BUFFER == new_buffer )
1750  return;
1751 
1752  if ( YY_CURRENT_BUFFER )
1753  {
1754  /* Flush out information for old buffer. */
1755  *(yy_c_buf_p) = (yy_hold_char);
1756  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1757  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1758  }
1759 
1760  YY_CURRENT_BUFFER_LVALUE = new_buffer;
1762 
1763  /* We don't actually know whether we did this switch during
1764  * EOF (yywrap()) processing, but the only time this flag
1765  * is looked at is after yywrap() is called, so it's safe
1766  * to go ahead and always set it.
1767  */
1769 }
1770 
1771 static void yy_load_buffer_state (void)
1772 {
1773  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1774  (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1775  yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1776  (yy_hold_char) = *(yy_c_buf_p);
1777 }
1778 
1779 /** Allocate and initialize an input buffer state.
1780  * @param file A readable stream.
1781  * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1782  *
1783  * @return the allocated buffer state.
1784  */
1785  YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
1786 {
1787  YY_BUFFER_STATE b;
1788 
1789  b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
1790  if ( ! b )
1791  YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1792 
1793  b->yy_buf_size = size;
1794 
1795  /* yy_ch_buf has to be 2 characters longer than the size given because
1796  * we need to put in 2 end-of-buffer characters.
1797  */
1798  b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
1799  if ( ! b->yy_ch_buf )
1800  YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1801 
1802  b->yy_is_our_buffer = 1;
1803 
1804  yy_init_buffer( b, file );
1805 
1806  return b;
1807 }
1808 
1809 /** Destroy the buffer.
1810  * @param b a buffer created with yy_create_buffer()
1811  *
1812  */
1814 {
1815 
1816  if ( ! b )
1817  return;
1818 
1819  if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1821 
1822  if ( b->yy_is_our_buffer )
1823  yyfree( (void *) b->yy_ch_buf );
1824 
1825  yyfree( (void *) b );
1826 }
1827 
1828 /* Initializes or reinitializes a buffer.
1829  * This function is sometimes called more than once on the same buffer,
1830  * such as during a yyrestart() or at EOF.
1831  */
1832  static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
1833 
1834 {
1835  int oerrno = errno;
1836 
1837  yy_flush_buffer( b );
1838 
1839  b->yy_input_file = file;
1840  b->yy_fill_buffer = 1;
1841 
1842  /* If b is the current buffer, then yy_init_buffer was _probably_
1843  * called from yyrestart() or through yy_get_next_buffer.
1844  * In that case, we don't want to reset the lineno or column.
1845  */
1846  if (b != YY_CURRENT_BUFFER){
1847  b->yy_bs_lineno = 1;
1848  b->yy_bs_column = 0;
1849  }
1850 
1851  b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1852 
1853  errno = oerrno;
1854 }
1855 
1856 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1857  * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1858  *
1859  */
1861 {
1862  if ( ! b )
1863  return;
1864 
1865  b->yy_n_chars = 0;
1866 
1867  /* We always need two end-of-buffer characters. The first causes
1868  * a transition to the end-of-buffer state. The second causes
1869  * a jam in that state.
1870  */
1873 
1874  b->yy_buf_pos = &b->yy_ch_buf[0];
1875 
1876  b->yy_at_bol = 1;
1878 
1879  if ( b == YY_CURRENT_BUFFER )
1881 }
1882 
1883 /** Pushes the new state onto the stack. The new state becomes
1884  * the current state. This function will allocate the stack
1885  * if necessary.
1886  * @param new_buffer The new state.
1887  *
1888  */
1889 void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
1890 {
1891  if (new_buffer == NULL)
1892  return;
1893 
1895 
1896  /* This block is copied from yy_switch_to_buffer. */
1897  if ( YY_CURRENT_BUFFER )
1898  {
1899  /* Flush out information for old buffer. */
1900  *(yy_c_buf_p) = (yy_hold_char);
1901  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1902  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1903  }
1904 
1905  /* Only push if top exists. Otherwise, replace top. */
1906  if (YY_CURRENT_BUFFER)
1907  (yy_buffer_stack_top)++;
1908  YY_CURRENT_BUFFER_LVALUE = new_buffer;
1909 
1910  /* copied from yy_switch_to_buffer. */
1913 }
1914 
1915 /** Removes and deletes the top of the stack, if present.
1916  * The next element becomes the new top.
1917  *
1918  */
1919 void yypop_buffer_state (void)
1920 {
1921  if (!YY_CURRENT_BUFFER)
1922  return;
1923 
1925  YY_CURRENT_BUFFER_LVALUE = NULL;
1926  if ((yy_buffer_stack_top) > 0)
1927  --(yy_buffer_stack_top);
1928 
1929  if (YY_CURRENT_BUFFER) {
1932  }
1933 }
1934 
1935 /* Allocates the stack if it does not exist.
1936  * Guarantees space for at least one push.
1937  */
1938 static void yyensure_buffer_stack (void)
1939 {
1940  yy_size_t num_to_alloc;
1941 
1942  if (!(yy_buffer_stack)) {
1943 
1944  /* First allocation is just for 2 elements, since we don't know if this
1945  * scanner will even need a stack. We use 2 instead of 1 to avoid an
1946  * immediate realloc on the next call.
1947  */
1948  num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
1950  (num_to_alloc * sizeof(struct yy_buffer_state*)
1951  );
1952  if ( ! (yy_buffer_stack) )
1953  YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1954 
1955  memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1956 
1957  (yy_buffer_stack_max) = num_to_alloc;
1958  (yy_buffer_stack_top) = 0;
1959  return;
1960  }
1961 
1962  if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1963 
1964  /* Increase the buffer to prepare for a possible push. */
1965  yy_size_t grow_size = 8 /* arbitrary grow size */;
1966 
1967  num_to_alloc = (yy_buffer_stack_max) + grow_size;
1969  ((yy_buffer_stack),
1970  num_to_alloc * sizeof(struct yy_buffer_state*)
1971  );
1972  if ( ! (yy_buffer_stack) )
1973  YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1974 
1975  /* zero only the new slots.*/
1976  memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
1977  (yy_buffer_stack_max) = num_to_alloc;
1978  }
1979 }
1980 
1981 /** Setup the input buffer state to scan directly from a user-specified character buffer.
1982  * @param base the character buffer
1983  * @param size the size in bytes of the character buffer
1984  *
1985  * @return the newly allocated buffer state object.
1986  */
1988 {
1989  YY_BUFFER_STATE b;
1990 
1991  if ( size < 2 ||
1992  base[size-2] != YY_END_OF_BUFFER_CHAR ||
1993  base[size-1] != YY_END_OF_BUFFER_CHAR )
1994  /* They forgot to leave room for the EOB's. */
1995  return NULL;
1996 
1997  b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
1998  if ( ! b )
1999  YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2000 
2001  b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
2002  b->yy_buf_pos = b->yy_ch_buf = base;
2003  b->yy_is_our_buffer = 0;
2004  b->yy_input_file = NULL;
2005  b->yy_n_chars = b->yy_buf_size;
2006  b->yy_is_interactive = 0;
2007  b->yy_at_bol = 1;
2008  b->yy_fill_buffer = 0;
2010 
2011  yy_switch_to_buffer( b );
2012 
2013  return b;
2014 }
2015 
2016 /** Setup the input buffer state to scan a string. The next call to yylex() will
2017  * scan from a @e copy of @a str.
2018  * @param yystr a NUL-terminated string to scan
2019  *
2020  * @return the newly allocated buffer state object.
2021  * @note If you want to scan bytes that may contain NUL values, then use
2022  * yy_scan_bytes() instead.
2023  */
2024 YY_BUFFER_STATE yy_scan_string (const char * yystr )
2025 {
2026 
2027  return yy_scan_bytes( yystr, (int) strlen(yystr) );
2028 }
2029 
2030 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
2031  * scan from a @e copy of @a bytes.
2032  * @param yybytes the byte buffer to scan
2033  * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
2034  *
2035  * @return the newly allocated buffer state object.
2036  */
2037 YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
2038 {
2039  YY_BUFFER_STATE b;
2040  char *buf;
2041  yy_size_t n;
2042  int i;
2043 
2044  /* Get memory for full buffer, including space for trailing EOB's. */
2045  n = (yy_size_t) (_yybytes_len + 2);
2046  buf = (char *) yyalloc( n );
2047  if ( ! buf )
2048  YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2049 
2050  for ( i = 0; i < _yybytes_len; ++i )
2051  buf[i] = yybytes[i];
2052 
2053  buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2054 
2055  b = yy_scan_buffer( buf, n );
2056  if ( ! b )
2057  YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2058 
2059  /* It's okay to grow etc. this buffer, and we should throw it
2060  * away when we're done.
2061  */
2062  b->yy_is_our_buffer = 1;
2063 
2064  return b;
2065 }
2066 
2067 #ifndef YY_EXIT_FAILURE
2068 #define YY_EXIT_FAILURE 2
2069 #endif
2070 
2071 static void yynoreturn yy_fatal_error (const char* msg )
2072 {
2073  fprintf( stderr, "%s\n", msg );
2074  exit( YY_EXIT_FAILURE );
2075 }
2076 
2077 /* Redefine yyless() so it works in section 3 code. */
2078 
2079 #undef yyless
2080 #define yyless(n) \
2081  do \
2082  { \
2083  /* Undo effects of setting up yytext. */ \
2084  int yyless_macro_arg = (n); \
2085  YY_LESS_LINENO(yyless_macro_arg);\
2086  yytext[yyleng] = (yy_hold_char); \
2087  (yy_c_buf_p) = yytext + yyless_macro_arg; \
2088  (yy_hold_char) = *(yy_c_buf_p); \
2089  *(yy_c_buf_p) = '\0'; \
2090  yyleng = yyless_macro_arg; \
2091  } \
2092  while ( 0 )
2093 
2094 /* Accessor methods (get/set functions) to struct members. */
2095 
2096 /** Get the current line number.
2097  *
2098  */
2099 int yyget_lineno (void)
2100 {
2101 
2102  return yylineno;
2103 }
2104 
2105 /** Get the input stream.
2106  *
2107  */
2108 FILE *yyget_in (void)
2109 {
2110  return yyin;
2111 }
2112 
2113 /** Get the output stream.
2114  *
2115  */
2116 FILE *yyget_out (void)
2117 {
2118  return yyout;
2119 }
2120 
2121 /** Get the length of the current token.
2122  *
2123  */
2124 int yyget_leng (void)
2125 {
2126  return yyleng;
2127 }
2128 
2129 /** Get the current token.
2130  *
2131  */
2132 
2133 char *yyget_text (void)
2134 {
2135  return yytext;
2136 }
2137 
2138 /** Set the current line number.
2139  * @param _line_number line number
2140  *
2141  */
2142 void yyset_lineno (int _line_number )
2143 {
2144 
2145  yylineno = _line_number;
2146 }
2147 
2148 /** Set the input stream. This does not discard the current
2149  * input buffer.
2150  * @param _in_str A readable stream.
2151  *
2152  * @see yy_switch_to_buffer
2153  */
2154 void yyset_in (FILE * _in_str )
2155 {
2156  yyin = _in_str ;
2157 }
2158 
2159 void yyset_out (FILE * _out_str )
2160 {
2161  yyout = _out_str ;
2162 }
2163 
2164 int yyget_debug (void)
2165 {
2166  return yy_flex_debug;
2167 }
2168 
2169 void yyset_debug (int _bdebug )
2170 {
2171  yy_flex_debug = _bdebug ;
2172 }
2173 
2174 static int yy_init_globals (void)
2175 {
2176  /* Initialization is the same as for the non-reentrant scanner.
2177  * This function is called from yylex_destroy(), so don't allocate here.
2178  */
2179 
2180  (yy_buffer_stack) = NULL;
2181  (yy_buffer_stack_top) = 0;
2182  (yy_buffer_stack_max) = 0;
2183  (yy_c_buf_p) = NULL;
2184  (yy_init) = 0;
2185  (yy_start) = 0;
2186 
2187 /* Defined in main.c */
2188 #ifdef YY_STDINIT
2189  yyin = stdin;
2190  yyout = stdout;
2191 #else
2192  yyin = NULL;
2193  yyout = NULL;
2194 #endif
2195 
2196  /* For future reference: Set errno on error, since we are called by
2197  * yylex_init()
2198  */
2199  return 0;
2200 }
2201 
2202 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
2203 int yylex_destroy (void)
2204 {
2205 
2206  /* Pop the buffer stack, destroying each element. */
2207  while(YY_CURRENT_BUFFER){
2209  YY_CURRENT_BUFFER_LVALUE = NULL;
2211  }
2212 
2213  /* Destroy the stack itself. */
2214  yyfree((yy_buffer_stack) );
2215  (yy_buffer_stack) = NULL;
2216 
2217  /* Reset the globals. This is important in a non-reentrant scanner so the next time
2218  * yylex() is called, initialization will occur. */
2219  yy_init_globals( );
2220 
2221  return 0;
2222 }
2223 
2224 /*
2225  * Internal utility routines.
2226  */
2227 
2228 #ifndef yytext_ptr
2229 static void yy_flex_strncpy (char* s1, const char * s2, int n )
2230 {
2231 
2232  int i;
2233  for ( i = 0; i < n; ++i )
2234  s1[i] = s2[i];
2235 }
2236 #endif
2237 
2238 #ifdef YY_NEED_STRLEN
2239 static int yy_flex_strlen (const char * s )
2240 {
2241  int n;
2242  for ( n = 0; s[n]; ++n )
2243  ;
2244 
2245  return n;
2246 }
2247 #endif
2248 
2249 void *yyalloc (yy_size_t size )
2250 {
2251  return malloc(size);
2252 }
2253 
2254 void *yyrealloc (void * ptr, yy_size_t size )
2255 {
2256 
2257  /* The cast to (char *) in the following accommodates both
2258  * implementations that use char* generic pointers, and those
2259  * that use void* generic pointers. It works with the latter
2260  * because both ANSI C and C++ allow castless assignment from
2261  * any pointer type to void*, and deal with argument conversions
2262  * as though doing an assignment.
2263  */
2264  return realloc(ptr, size);
2265 }
2266 
2267 void yyfree (void * ptr )
2268 {
2269  free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
2270 }
2271 
2272 #define YYTABLES_NAME "yytables"
2273 
2274 #line 145 "spec.l"
2275 
2276 
2277 int yywrap()
2278 {
2279 #ifdef FLEX_SCANNER
2280  yy_init = 1;
2281 #endif
2282  return 1;
2283 }
2284 
2285 #ifdef FLEX_SCANNER
2286 int genspec_input()
2287 {
2288  return input();
2289 }
2290 #endif
2291 
void const char const char const int
bdt base
Current expression.
Definition: bdt_read_paf.c:100
static Value offset
Definition: translation.c:283
FILE * genspec_in
lex files
#define LB
Definition: genread.h:97
unsigned char flex_uint8_t
Definition: genread_lex.c:312
short int flex_int16_t
Definition: genread_lex.c:310
int flex_int32_t
Definition: genread_lex.c:311
int yy_state_type
Definition: genread_lex.c:588
flex_uint8_t YY_CHAR
Begin user sect3.
Definition: genread_lex.c:584
size_t yy_size_t
Definition: genread_lex.c:413
void * malloc(YYSIZE_T)
void free(void *)
#define IDENT
Definition: genspec.h:102
#define RB
Definition: genspec.h:93
#define COLUMN
Definition: genspec.h:86
#define EQUAL
Definition: genspec.h:96
#define OR
Definition: genspec.h:89
#define LR
Definition: genspec.h:94
#define GRAM_FILE
Definition: genspec.h:103
#define ARROW
Definition: genspec.h:90
#define RR
Definition: genspec.h:95
#define GRAM_EXTERNAL
Definition: genspec.h:98
#define STAR
Definition: genspec.h:91
#define GRAM_INT
Definition: genspec.h:104
#define SEMI_COLUMN
Definition: genspec.h:87
#define FROM
Definition: genspec.h:97
#define COMMA
Definition: genspec.h:85
#define GRAM_IMPORT
Definition: genspec.h:99
#define AND
Definition: genspec.h:88
#define PERSISTANT
Definition: genspec.h:101
#define TABULATED
Definition: genspec.h:100
#define YY_INPUT(buffer, result, max_size)
shared pointer!
Definition: genspec_lex.c:821
#define yy_load_buffer_state
Definition: genspec_lex.c:15
#define YY_NEW_FILE
Special action meaning "start processing a new file".
Definition: genspec_lex.c:386
#define yyset_extra
Definition: genspec_lex.c:164
#define yytext
Definition: genspec_lex.c:27
unsigned char flex_uint8_t
Definition: genspec_lex.c:312
#define yyset_lineno
Definition: genspec_lex.c:212
static char yy_hold_char
yy_hold_char holds the character lost when yytext is formed.
Definition: genspec_lex.c:527
static int input(void)
static yy_state_type yy_last_accepting_state
Definition: genspec_lex.c:760
#define yyrestart
Definition: genspec_lex.c:26
#define yyset_debug
Definition: genspec_lex.c:152
static void yynoreturn yy_fatal_error(const char *msg)
#define YY_EXTRA_TYPE
Special case for "unistd.h", since it is non-ANSI.
Definition: genspec_lex.c:899
static int yy_start
whether we need to initialize
Definition: genspec_lex.c:534
short int flex_int16_t
Definition: genspec_lex.c:310
#define yy_flex_debug
Definition: genspec_lex.c:20
#define yyget_out
Definition: genspec_lex.c:182
static YY_BUFFER_STATE * yy_buffer_stack
Stack as an array.
Definition: genspec_lex.c:510
unsigned int flex_uint32_t
Definition: genspec_lex.c:314
static int yy_get_next_buffer(void)
#define yy_scan_bytes
Definition: genspec_lex.c:12
#define YY_BREAK
Code executed at the end of each rule.
Definition: genspec_lex.c:1060
static char * string_to_parse
We may parse strings or files...
Definition: genspec_lex.c:819
static size_t yy_buffer_stack_max
capacity of stack.
Definition: genspec_lex.c:509
#define yynoreturn
Definition: genspec_lex.c:361
static yy_state_type yy_try_NUL_trans(yy_state_type current_state)
#define yyget_debug
Definition: genspec_lex.c:146
int yy_act
Definition: genspec_lex.c:1075
#define yypush_buffer_state
Definition: genspec_lex.c:17
struct yy_buffer_state * YY_BUFFER_STATE
Definition: genspec_lex.c:408
#define yyfree
Definition: genspec_lex.c:31
#define yyout
Definition: genspec_lex.c:25
#define YY_BUFFER_NEW
Definition: genspec_lex.c:490
#define yyget_lineno
Definition: genspec_lex.c:206
#define yylex
Definition: genspec_lex.c:23
#define YY_RESTORE_YY_MORE_OFFSET
Definition: genspec_lex.c:772
static int yy_did_buffer_switch_on_eof
start state number
Definition: genspec_lex.c:539
static const flex_int16_t yy_def[99]
Definition: genspec_lex.c:693
static int yy_init_globals(void)
#define yyget_text
Definition: genspec_lex.c:200
#define YY_BUFFER_NORMAL
Definition: genspec_lex.c:491
static const flex_int16_t yy_chk[199]
Definition: genspec_lex.c:734
char * yy_cp
Definition: genspec_lex.c:1074
#define yyensure_buffer_stack
Definition: genspec_lex.c:19
#define yy_scan_buffer
Definition: genspec_lex.c:10
#define YY_MORE_ADJ
Definition: genspec_lex.c:771
#define YY_RULE_SETUP
Definition: genspec_lex.c:1063
#define yy_scan_string
Definition: genspec_lex.c:11
#define YY_AT_BOL()
Definition: genspec_lex.c:581
#define yylval
Definition: genspec_lex.c:810
#define yytext_ptr
Definition: genspec_lex.c:597
signed char flex_int8_t
C99 systems have <inttypes.h>.
Definition: genspec_lex.c:309
#define yyget_leng
Definition: genspec_lex.c:194
#define EOB_ACT_END_OF_FILE
Definition: genspec_lex.c:421
#define yyalloc
Definition: genspec_lex.c:29
#define yypop_buffer_state
Definition: genspec_lex.c:18
#define YY_CURRENT_BUFFER_LVALUE
Same as previous macro, but useful when we know that the buffer stack is not NULL or when we need an ...
Definition: genspec_lex.c:524
int flex_int32_t
Definition: genspec_lex.c:311
#define YY_START
Translate the current start state into a value that can be later handed to BEGIN to return to the sta...
Definition: genspec_lex.c:381
#define yy_switch_to_buffer
Definition: genspec_lex.c:16
static const flex_int16_t yy_nxt[199]
Definition: genspec_lex.c:708
int yy_state_type
Definition: genspec_lex.c:588
#define YY_CURRENT_BUFFER
We provide macros for accessing buffer states in case in the future we want to put the buffer states ...
Definition: genspec_lex.c:518
#define yy_init_buffer
Definition: genspec_lex.c:13
#define INITIAL
Definition: genspec_lex.c:888
#define yyget_extra
Definition: genspec_lex.c:158
char * yy_bp
Definition: genspec_lex.c:1074
#define yyin
Definition: genspec_lex.c:21
static int yy_n_chars
Definition: genspec_lex.c:528
#define YY_READ_BUF_SIZE
Amount of stuff to slurp up with each read.
Definition: genspec_lex.c:972
#define ECHO
ia64
Definition: genspec_lex.c:981
int Current_start
Definition: build.c:62
#define yy_flush_buffer
Definition: genspec_lex.c:14
#define yyrealloc
Definition: genspec_lex.c:30
#define YY_END_OF_BUFFER
Definition: genspec_lex.c:614
#define YY_STATE_EOF(state)
Action number for EOF rule of a given start state.
Definition: genspec_lex.c:384
#define YY_END_OF_BUFFER_CHAR
Definition: genspec_lex.c:387
char * strcache(char *s)
cache parsed string instead of strduplicating them valid because those strign are never released SG,...
Definition: genspec_lex.c:866
#define YY_FATAL_ERROR(msg)
Report a fatal error.
Definition: genspec_lex.c:1035
#define yyterminate()
Gets input and stuffs it into "buf".
Definition: genspec_lex.c:1025
unsigned short int flex_uint16_t
Definition: genspec_lex.c:313
#define yywrap
Macros after this point can all be overridden by user definitions in section 1.
Definition: genspec_lex.c:28
#define yy_create_buffer
A lexical scanner generated by flex.
Definition: genspec_lex.c:8
flex_uint8_t YY_CHAR
Begin user sect3.
Definition: genspec_lex.c:584
#define YY_DO_BEFORE_ACTION
Done after the current pattern has been matched and before the corresponding action - sets up yytext.
Definition: genspec_lex.c:607
#define yy_delete_buffer
Definition: genspec_lex.c:9
#define EOB_ACT_LAST_MATCH
Definition: genspec_lex.c:422
#define yyget_in
Definition: genspec_lex.c:170
size_t yy_size_t
Definition: genspec_lex.c:413
#define YY_BUFFER_EOF_PENDING
When an EOF's been seen but there's still some text to process then we mark the buffer as YY_EOF_PEND...
Definition: genspec_lex.c:502
#define yylineno
Definition: genspec_lex.c:24
static yy_state_type yy_get_previous_state(void)
static const YY_CHAR yy_ec[256]
Definition: genspec_lex.c:637
#define yylex_destroy
Accessor methods to globals.
Definition: genspec_lex.c:140
static const flex_int16_t yy_accept[96]
Definition: genspec_lex.c:622
#define yyset_out
Definition: genspec_lex.c:188
static char * yy_c_buf_p
Points to current character in buffer.
Definition: genspec_lex.c:532
#define EOB_ACT_CONTINUE_SCAN
Definition: genspec_lex.c:420
static size_t yy_buffer_stack_top
!YY_STRUCT_YY_BUFFER_STATE
Definition: genspec_lex.c:508
#define YY_DECL
Definition: genspec_lex.c:1048
void genspec_reset_string_to_parse()
Definition: genspec_lex.c:839
static const flex_int16_t yy_base[99]
Definition: genspec_lex.c:678
#define YY_BUF_SIZE
Size of default input buffer.
Definition: genspec_lex.c:398
static const YY_CHAR yy_meta[48]
Definition: genspec_lex.c:669
#define YY_EXIT_FAILURE
static int yy_init
Definition: genspec_lex.c:533
void genspec_set_string_to_parse(char *s)
Definition: genspec_lex.c:838
#define YY_SC_TO_UI(c)
Promotes a possibly negative, possibly signed char to an integer in range [0..255] for use as an arra...
Definition: genspec_lex.c:370
#define yyleng
Definition: genspec_lex.c:22
static char * yy_last_accepting_cpos
Definition: genspec_lex.c:761
#define yyset_in
Definition: genspec_lex.c:176
int genspec_input(void)
void * memset(void *str, int c, size_t len)
memset.c – set an area of memory to a given value Copyright (C) 1991, 2003, 2009-2011 Free Software F...
Definition: memset.c:23
#define exit(code)
Definition: misc-local.h:54
#define assert(ex)
Definition: newgen_assert.h:41
void user(char *,...)
External routines.
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
char * strdup()
s1
Definition: set.c:247
return(s1)
static char buf[BSZ]
Definition: split_file.c:157
#define uint32_t
Definition: stdint.in.h:156
#define int32_t
Definition: stdint.in.h:155
#define uint16_t
Definition: stdint.in.h:149
#define int8_t
Definition: stdint.in.h:141
#define uint8_t
Definition: stdint.in.h:142
#define int16_t
Definition: stdint.in.h:148
int yy_n_chars
Number of characters read into yy_ch_buf, not including EOB characters.
Definition: genread_lex.c:459
int yy_bs_column
The column count.
Definition: genread_lex.c:481
FILE * yy_input_file
Definition: genread_lex.c:446
int yy_buf_size
current position in input buffer
Definition: genread_lex.c:454
int yy_fill_buffer
Whether to try to fill the input buffer when we reach the end of it.
Definition: genread_lex.c:486
int yy_is_our_buffer
Whether we "own" the buffer - i.e., we know we created it, and can realloc() it to grow it,...
Definition: genread_lex.c:465
int yy_bs_lineno
The line count.
Definition: genread_lex.c:480
char * yy_buf_pos
input buffer
Definition: genread_lex.c:449
int yy_at_bol
Whether we're considered to be at the beginning of a line.
Definition: genread_lex.c:478
int yy_is_interactive
Whether this is an "interactive" input source; if so, and if we're using stdio for input,...
Definition: genread_lex.c:472
This struct is not used in this scanner, but its presence is necessary.
Definition: genread_lex.c:618
flex_int32_t yy_verify
Definition: genread_lex.c:619
flex_int32_t yy_nxt
Definition: genread_lex.c:620