PIPS
genread_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 genread__create_buffer
9 #define yy_delete_buffer genread__delete_buffer
10 #define yy_scan_buffer genread__scan_buffer
11 #define yy_scan_string genread__scan_string
12 #define yy_scan_bytes genread__scan_bytes
13 #define yy_init_buffer genread__init_buffer
14 #define yy_flush_buffer genread__flush_buffer
15 #define yy_load_buffer_state genread__load_buffer_state
16 #define yy_switch_to_buffer genread__switch_to_buffer
17 #define yypush_buffer_state genread_push_buffer_state
18 #define yypop_buffer_state genread_pop_buffer_state
19 #define yyensure_buffer_stack genread_ensure_buffer_stack
20 #define yy_flex_debug genread__flex_debug
21 #define yyin genread_in
22 #define yyleng genread_leng
23 #define yylex genread_lex
24 #define yylineno genread_lineno
25 #define yyout genread_out
26 #define yyrestart genread_restart
27 #define yytext genread_text
28 #define yywrap genread_wrap
29 #define yyalloc genread_alloc
30 #define yyrealloc genread_realloc
31 #define yyfree genread_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 genread__create_buffer_ALREADY_DEFINED
43 #else
44 #define yy_create_buffer genread__create_buffer
45 #endif
46 
47 #ifdef yy_delete_buffer
48 #define genread__delete_buffer_ALREADY_DEFINED
49 #else
50 #define yy_delete_buffer genread__delete_buffer
51 #endif
52 
53 #ifdef yy_scan_buffer
54 #define genread__scan_buffer_ALREADY_DEFINED
55 #else
56 #define yy_scan_buffer genread__scan_buffer
57 #endif
58 
59 #ifdef yy_scan_string
60 #define genread__scan_string_ALREADY_DEFINED
61 #else
62 #define yy_scan_string genread__scan_string
63 #endif
64 
65 #ifdef yy_scan_bytes
66 #define genread__scan_bytes_ALREADY_DEFINED
67 #else
68 #define yy_scan_bytes genread__scan_bytes
69 #endif
70 
71 #ifdef yy_init_buffer
72 #define genread__init_buffer_ALREADY_DEFINED
73 #else
74 #define yy_init_buffer genread__init_buffer
75 #endif
76 
77 #ifdef yy_flush_buffer
78 #define genread__flush_buffer_ALREADY_DEFINED
79 #else
80 #define yy_flush_buffer genread__flush_buffer
81 #endif
82 
83 #ifdef yy_load_buffer_state
84 #define genread__load_buffer_state_ALREADY_DEFINED
85 #else
86 #define yy_load_buffer_state genread__load_buffer_state
87 #endif
88 
89 #ifdef yy_switch_to_buffer
90 #define genread__switch_to_buffer_ALREADY_DEFINED
91 #else
92 #define yy_switch_to_buffer genread__switch_to_buffer
93 #endif
94 
95 #ifdef yypush_buffer_state
96 #define genread_push_buffer_state_ALREADY_DEFINED
97 #else
98 #define yypush_buffer_state genread_push_buffer_state
99 #endif
100 
101 #ifdef yypop_buffer_state
102 #define genread_pop_buffer_state_ALREADY_DEFINED
103 #else
104 #define yypop_buffer_state genread_pop_buffer_state
105 #endif
106 
107 #ifdef yyensure_buffer_stack
108 #define genread_ensure_buffer_stack_ALREADY_DEFINED
109 #else
110 #define yyensure_buffer_stack genread_ensure_buffer_stack
111 #endif
112 
113 #ifdef yylex
114 #define genread_lex_ALREADY_DEFINED
115 #else
116 #define yylex genread_lex
117 #endif
118 
119 #ifdef yyrestart
120 #define genread_restart_ALREADY_DEFINED
121 #else
122 #define yyrestart genread_restart
123 #endif
124 
125 #ifdef yylex_init
126 #define genread_lex_init_ALREADY_DEFINED
127 #else
128 #define yylex_init genread_lex_init
129 #endif
130 
131 #ifdef yylex_init_extra
132 #define genread_lex_init_extra_ALREADY_DEFINED
133 #else
134 #define yylex_init_extra genread_lex_init_extra
135 #endif
136 
137 #ifdef yylex_destroy
138 #define genread_lex_destroy_ALREADY_DEFINED
139 #else
140 #define yylex_destroy genread_lex_destroy
141 #endif
142 
143 #ifdef yyget_debug
144 #define genread_get_debug_ALREADY_DEFINED
145 #else
146 #define yyget_debug genread_get_debug
147 #endif
148 
149 #ifdef yyset_debug
150 #define genread_set_debug_ALREADY_DEFINED
151 #else
152 #define yyset_debug genread_set_debug
153 #endif
154 
155 #ifdef yyget_extra
156 #define genread_get_extra_ALREADY_DEFINED
157 #else
158 #define yyget_extra genread_get_extra
159 #endif
160 
161 #ifdef yyset_extra
162 #define genread_set_extra_ALREADY_DEFINED
163 #else
164 #define yyset_extra genread_set_extra
165 #endif
166 
167 #ifdef yyget_in
168 #define genread_get_in_ALREADY_DEFINED
169 #else
170 #define yyget_in genread_get_in
171 #endif
172 
173 #ifdef yyset_in
174 #define genread_set_in_ALREADY_DEFINED
175 #else
176 #define yyset_in genread_set_in
177 #endif
178 
179 #ifdef yyget_out
180 #define genread_get_out_ALREADY_DEFINED
181 #else
182 #define yyget_out genread_get_out
183 #endif
184 
185 #ifdef yyset_out
186 #define genread_set_out_ALREADY_DEFINED
187 #else
188 #define yyset_out genread_set_out
189 #endif
190 
191 #ifdef yyget_leng
192 #define genread_get_leng_ALREADY_DEFINED
193 #else
194 #define yyget_leng genread_get_leng
195 #endif
196 
197 #ifdef yyget_text
198 #define genread_get_text_ALREADY_DEFINED
199 #else
200 #define yyget_text genread_get_text
201 #endif
202 
203 #ifdef yyget_lineno
204 #define genread_get_lineno_ALREADY_DEFINED
205 #else
206 #define yyget_lineno genread_get_lineno
207 #endif
208 
209 #ifdef yyset_lineno
210 #define genread_set_lineno_ALREADY_DEFINED
211 #else
212 #define yyset_lineno genread_set_lineno
213 #endif
214 
215 #ifdef yywrap
216 #define genread_wrap_ALREADY_DEFINED
217 #else
218 #define yywrap genread_wrap
219 #endif
220 
221 #ifdef yyalloc
222 #define genread_alloc_ALREADY_DEFINED
223 #else
224 #define yyalloc genread_alloc
225 #endif
226 
227 #ifdef yyrealloc
228 #define genread_realloc_ALREADY_DEFINED
229 #else
230 #define yyrealloc genread_realloc
231 #endif
232 
233 #ifdef yyfree
234 #define genread_free_ALREADY_DEFINED
235 #else
236 #define yyfree genread_free
237 #endif
238 
239 #ifdef yytext
240 #define genread_text_ALREADY_DEFINED
241 #else
242 #define yytext genread_text
243 #endif
244 
245 #ifdef yyleng
246 #define genread_leng_ALREADY_DEFINED
247 #else
248 #define yyleng genread_leng
249 #endif
250 
251 #ifdef yyin
252 #define genread_in_ALREADY_DEFINED
253 #else
254 #define yyin genread_in
255 #endif
256 
257 #ifdef yyout
258 #define genread_out_ALREADY_DEFINED
259 #else
260 #define yyout genread_out
261 #endif
262 
263 #ifdef yy_flex_debug
264 #define genread__flex_debug_ALREADY_DEFINED
265 #else
266 #define yy_flex_debug genread__flex_debug
267 #endif
268 
269 #ifdef yylineno
270 #define genread_lineno_ALREADY_DEFINED
271 #else
272 #define yylineno genread_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
445  {
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  */
455 
456  /* Number of characters read into yy_ch_buf, not including EOB
457  * characters.
458  */
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  */
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  */
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  */
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  */
487 
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 34
614 #define YY_END_OF_BUFFER 35
615 /* This struct is not used in this scanner,
616  but its presence is necessary. */
618  {
621  };
622 static const flex_int16_t yy_accept[80] =
623  { 0,
624  31, 31, 3, 3, 35, 33, 31, 32, 7, 30,
625  33, 10, 11, 13, 14, 12, 33, 28, 26, 19,
626  21, 20, 17, 24, 23, 22, 25, 9, 18, 8,
627  6, 15, 16, 3, 3, 4, 3, 5, 3, 3,
628  3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
629  3, 3, 3, 3, 3, 3, 3, 3, 33, 3,
630  3, 3, 31, 28, 0, 0, 0, 3, 3, 4,
631  3, 3, 3, 2, 1, 27, 29, 3, 0
632  } ;
633 
634 static const YY_CHAR yy_ec[256] =
635  { 0,
636  1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
637  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
638  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
639  1, 2, 4, 5, 6, 7, 8, 1, 1, 9,
640  10, 11, 12, 1, 12, 13, 1, 14, 14, 14,
641  14, 14, 14, 14, 14, 14, 14, 1, 1, 1,
642  1, 1, 1, 1, 15, 16, 1, 17, 18, 1,
643  1, 19, 1, 1, 1, 20, 1, 21, 1, 1,
644  1, 22, 23, 24, 25, 1, 1, 1, 1, 1,
645  26, 27, 1, 1, 28, 1, 1, 1, 1, 1,
646 
647  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
648  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
649  1, 1, 29, 1, 30, 1, 1, 1, 1, 1,
650  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
651  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
652  1, 1, 1, 1, 1, 1, 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 
658  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
659  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
660  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
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
664  } ;
665 
666 static const YY_CHAR yy_meta[31] =
667  { 0,
668  1, 1, 2, 1, 3, 1, 1, 1, 1, 1,
669  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
670  1, 1, 1, 1, 1, 1, 3, 1, 1, 1
671  } ;
672 
673 static const flex_int16_t yy_base[82] =
674  { 0,
675  0, 0, 30, 0, 102, 103, 59, 103, 103, 103,
676  74, 103, 103, 103, 103, 103, 60, 50, 103, 103,
677  103, 103, 103, 103, 103, 103, 103, 103, 103, 103,
678  103, 103, 103, 0, 63, 65, 0, 103, 73, 0,
679  0, 0, 0, 0, 67, 57, 0, 0, 0, 0,
680  0, 0, 0, 0, 0, 0, 0, 0, 67, 0,
681  0, 0, 73, 65, 0, 74, 85, 0, 81, 83,
682  76, 78, 83, 103, 103, 103, 79, 77, 103, 81,
683  95
684  } ;
685 
686 static const flex_int16_t yy_def[82] =
687  { 0,
688  79, 1, 79, 3, 79, 79, 79, 79, 79, 79,
689  79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
690  79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
691  79, 79, 79, 80, 80, 79, 80, 79, 80, 80,
692  80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
693  80, 80, 80, 80, 80, 80, 80, 80, 79, 80,
694  80, 80, 79, 79, 81, 79, 79, 80, 80, 79,
695  80, 80, 80, 79, 79, 79, 79, 80, 0, 79,
696  79
697  } ;
698 
699 static const flex_int16_t yy_nxt[134] =
700  { 0,
701  6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
702  16, 17, 6, 18, 19, 20, 21, 22, 23, 24,
703  25, 26, 27, 28, 29, 30, 6, 31, 32, 33,
704  34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
705  44, 45, 34, 46, 47, 48, 49, 50, 51, 52,
706  53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
707  63, 66, 67, 64, 69, 70, 70, 70, 72, 73,
708  71, 74, 64, 64, 63, 66, 71, 67, 64, 72,
709  71, 68, 69, 70, 70, 70, 64, 64, 73, 71,
710  78, 71, 77, 75, 71, 76, 78, 76, 77, 65,
711 
712  65, 79, 5, 79, 79, 79, 79, 79, 79, 79,
713  79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
714  79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
715  79, 79, 79
716  } ;
717 
718 static const flex_int16_t yy_chk[134] =
719  { 0,
720  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
721  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
722  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
723  3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
724  3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
725  3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
726  7, 17, 18, 18, 35, 35, 36, 36, 45, 46,
727  46, 59, 7, 17, 63, 66, 35, 64, 64, 72,
728  45, 80, 69, 69, 70, 70, 63, 66, 71, 71,
729  78, 72, 77, 59, 69, 81, 73, 81, 67, 39,
730 
731  11, 5, 79, 79, 79, 79, 79, 79, 79, 79,
732  79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
733  79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
734  79, 79, 79
735  } ;
736 
739 
740 extern int yy_flex_debug;
742 
743 /* The intent behind this definition is that it'll catch
744  * any uses of REJECT which flex missed.
745  */
746 #define REJECT reject_used_but_not_detected
747 #define yymore() yymore_used_but_not_detected
748 #define YY_MORE_ADJ 0
749 #define YY_RESTORE_YY_MORE_OFFSET
750 char *yytext;
751 #line 1 "read.l"
752 #line 2 "read.l"
753 /*
754 
755  $Id: read.l 1373 2017-02-03 13:57:22Z guillou $
756 
757  Copyright 1989-2016 MINES ParisTech
758 
759  This file is part of NewGen.
760 
761  NewGen is free software: you can redistribute it and/or modify it under the
762  terms of the GNU General Public License as published by the Free Software
763  Foundation, either version 3 of the License, or any later version.
764 
765  NewGen is distributed in the hope that it will be useful, but WITHOUT ANY
766  WARRANTY; without even the implied warranty of MERCHANTABILITY or
767  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
768  License for more details.
769 
770  You should have received a copy of the GNU General Public License along with
771  NewGen. If not, see <http://www.gnu.org/licenses/>.
772 
773 */
774 
775 /*
776  The syntax of tokens written by GEN_WRITE.
777 */
778 
779 #include <stdio.h>
780 #include <stdint.h>
781 #include <stdlib.h>
782 #include <string.h>
783 #include <math.h>
784 
785 #include "genC.h"
786 #include "newgen_include.h"
787 #include "genread.h"
788 
789 #ifndef yylval
790 #define yylval genread_lval
791 #endif // yylval
792 
793 static string literal = (char*) NULL;
794 static int literal_size = 0;
795 static void append_to_literal(string s)
796 {
797  int total;
798 
799  if (literal_size == 0) {
800  literal_size = 50;
801  literal = (char*) malloc(sizeof(char)*literal_size);
802  message_assert("malloc ok", literal);
803  literal[0]='\0';
804  }
805 
806  total = strlen(literal)+strlen(s)+1;
807  if (total >= literal_size) {
808  literal_size = total+100;
809  literal = (char*) realloc(literal, sizeof(char)*literal_size);
810  message_assert("realloc ok", literal);
811  }
812 
813  strcat(literal, s);
814 }
815 
816 static size_t
821 
822 void newgen_start_lexer(FILE * in)
823 {
824  if (in) { yyin = in; }
825  newgen_char_number = 0;
826  newgen_line_number = 1;
827  newgen_col_number = 0;
828  newgen_lex_number = 0;
829 }
830 
832 {
833  fprintf(out, "newgen lexer token %zd at line %zd (column %zd, char %zd)\n",
836 }
837 
838 #line 839 "<stdout>"
839 
840 #line 841 "<stdout>"
841 
842 #define INITIAL 0
843 #define a_string 1
844 
845 #ifndef YY_NO_UNISTD_H
846 /* Special case for "unistd.h", since it is non-ANSI. We include it way
847  * down here because we want the user's section 1 to have been scanned first.
848  * The user has a chance to override it with an option.
849  */
850 #include <unistd.h>
851 #endif
852 
853 #ifndef YY_EXTRA_TYPE
854 #define YY_EXTRA_TYPE void *
855 #endif
856 
857 static int yy_init_globals ( void );
858 
859 /* Accessor methods to globals.
860  These are made visible to non-reentrant scanners for convenience. */
861 
862 int yylex_destroy ( void );
863 
864 int yyget_debug ( void );
865 
866 void yyset_debug ( int debug_flag );
867 
868 YY_EXTRA_TYPE yyget_extra ( void );
869 
870 void yyset_extra ( YY_EXTRA_TYPE user_defined );
871 
872 FILE *yyget_in ( void );
873 
874 void yyset_in ( FILE * _in_str );
875 
876 FILE *yyget_out ( void );
877 
878 void yyset_out ( FILE * _out_str );
879 
880  int yyget_leng ( void );
881 
882 char *yyget_text ( void );
883 
884 int yyget_lineno ( void );
885 
886 void yyset_lineno ( int _line_number );
887 
888 /* Macros after this point can all be overridden by user definitions in
889  * section 1.
890  */
891 
892 #ifndef YY_SKIP_YYWRAP
893 #ifdef __cplusplus
894 extern "C" int yywrap ( void );
895 #else
896 extern int yywrap ( void );
897 #endif
898 #endif
899 
900 #ifndef YY_NO_UNPUT
901 
902 #endif
903 
904 #ifndef yytext_ptr
905 static void yy_flex_strncpy ( char *, const char *, int );
906 #endif
907 
908 #ifdef YY_NEED_STRLEN
909 static int yy_flex_strlen ( const char * );
910 #endif
911 
912 #ifndef YY_NO_INPUT
913 #ifdef __cplusplus
914 static int yyinput ( void );
915 #else
916 static int input ( void );
917 #endif
918 
919 #endif
920 
921 /* Amount of stuff to slurp up with each read. */
922 #ifndef YY_READ_BUF_SIZE
923 #ifdef __ia64__
924 /* On IA-64, the buffer size is 16k, not 8k */
925 #define YY_READ_BUF_SIZE 16384
926 #else
927 #define YY_READ_BUF_SIZE 8192
928 #endif /* __ia64__ */
929 #endif
930 
931 /* Copy whatever the last rule matched to the standard output. */
932 #ifndef ECHO
933 /* This used to be an fputs(), but since the string might contain NUL's,
934  * we now use fwrite().
935  */
936 #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
937 #endif
938 
939 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
940  * is returned in "result".
941  */
942 #ifndef YY_INPUT
943 #define YY_INPUT(buf,result,max_size) \
944  if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
945  { \
946  int c = '*'; \
947  int n; \
948  for ( n = 0; n < max_size && \
949  (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
950  buf[n] = (char) c; \
951  if ( c == '\n' ) \
952  buf[n++] = (char) c; \
953  if ( c == EOF && ferror( yyin ) ) \
954  YY_FATAL_ERROR( "input in flex scanner failed" ); \
955  result = n; \
956  } \
957  else \
958  { \
959  errno=0; \
960  while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
961  { \
962  if( errno != EINTR) \
963  { \
964  YY_FATAL_ERROR( "input in flex scanner failed" ); \
965  break; \
966  } \
967  errno=0; \
968  clearerr(yyin); \
969  } \
970  }\
971 \
972 
973 #endif
974 
975 /* No semi-colon after return; correct usage is to write "yyterminate();" -
976  * we don't want an extra ';' after the "return" because that will cause
977  * some compilers to complain about unreachable statements.
978  */
979 #ifndef yyterminate
980 #define yyterminate() return YY_NULL
981 #endif
982 
983 /* Number of entries by which start-condition stack grows. */
984 #ifndef YY_START_STACK_INCR
985 #define YY_START_STACK_INCR 25
986 #endif
987 
988 /* Report a fatal error. */
989 #ifndef YY_FATAL_ERROR
990 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
991 #endif
992 
993 /* end tables serialization structures and prototypes */
994 
995 /* Default declaration of generated scanner - a define so the user can
996  * easily add parameters.
997  */
998 #ifndef YY_DECL
999 #define YY_DECL_IS_OURS 1
1000 
1001 extern int yylex (void);
1002 
1003 #define YY_DECL int yylex (void)
1004 #endif /* !YY_DECL */
1005 
1006 /* Code executed at the beginning of each rule, after yytext and yyleng
1007  * have been set up.
1008  */
1009 #ifndef YY_USER_ACTION
1010 #define YY_USER_ACTION
1011 #endif
1012 
1013 /* Code executed at the end of each rule. */
1014 #ifndef YY_BREAK
1015 #define YY_BREAK /*LINTED*/break;
1016 #endif
1017 
1018 #define YY_RULE_SETUP \
1019  YY_USER_ACTION
1020 
1021 /** The main scanner function which does all the work.
1022  */
1024 {
1025  yy_state_type yy_current_state;
1026  char *yy_cp, *yy_bp;
1027  int yy_act;
1028 
1029  if ( !(yy_init) )
1030  {
1031  (yy_init) = 1;
1032 
1033 #ifdef YY_USER_INIT
1034  YY_USER_INIT;
1035 #endif
1036 
1037  if ( ! (yy_start) )
1038  (yy_start) = 1; /* first start state */
1039 
1040  if ( ! yyin )
1041  yyin = stdin;
1042 
1043  if ( ! yyout )
1044  yyout = stdout;
1045 
1046  if ( ! YY_CURRENT_BUFFER ) {
1050  }
1051 
1053  }
1054 
1055  {
1056 #line 92 "read.l"
1057 
1058 #line 1059 "<stdout>"
1059 
1060  while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
1061  {
1062  yy_cp = (yy_c_buf_p);
1063 
1064  /* Support of yytext. */
1065  *yy_cp = (yy_hold_char);
1066 
1067  /* yy_bp points to the position in yy_ch_buf of the start of
1068  * the current run.
1069  */
1070  yy_bp = yy_cp;
1071 
1072  yy_current_state = (yy_start);
1073 yy_match:
1074  do
1075  {
1076  YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
1077  if ( yy_accept[yy_current_state] )
1078  {
1079  (yy_last_accepting_state) = yy_current_state;
1081  }
1082  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1083  {
1084  yy_current_state = (int) yy_def[yy_current_state];
1085  if ( yy_current_state >= 80 )
1086  yy_c = yy_meta[yy_c];
1087  }
1088  yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1089  ++yy_cp;
1090  }
1091  while ( yy_base[yy_current_state] != 103 );
1092 
1093 yy_find_action:
1094  yy_act = yy_accept[yy_current_state];
1095  if ( yy_act == 0 )
1096  { /* have to back up */
1098  yy_current_state = (yy_last_accepting_state);
1099  yy_act = yy_accept[yy_current_state];
1100  }
1101 
1103 
1104 do_action: /* This label is used only to access EOF actions. */
1105 
1106  switch ( yy_act )
1107  { /* beginning of action switch */
1108  case 0: /* must back up */
1109  /* undo the effects of YY_DO_BEFORE_ACTION */
1110  *yy_cp = (yy_hold_char);
1112  yy_current_state = (yy_last_accepting_state);
1113  goto yy_find_action;
1114 
1115 case 1:
1117 #line 93 "read.l"
1118 { append_to_literal("\\"); }
1119  YY_BREAK
1120 case 2:
1122 #line 94 "read.l"
1123 { append_to_literal("\""); }
1124  YY_BREAK
1125 case 3:
1127 #line 95 "read.l"
1128 { append_to_literal(yytext); } /* " */
1129  YY_BREAK
1130 case 4:
1131 /* rule 4 can match eol */
1133 #line 96 "read.l"
1135  YY_BREAK
1136 case 5:
1138 #line 97 "read.l"
1139 {
1140  BEGIN 0 ;
1141  yylval.s = strdup(literal);
1142  free(literal); literal=(char*)NULL; literal_size=0;
1144  return READ_STRING ;
1145  }
1146  YY_BREAK
1147 case 6:
1149 #line 104 "read.l"
1150 {
1151  yylval.s = NULL;
1153  return READ_STRING;
1154  }
1155  YY_BREAK
1156 case 7:
1158 #line 109 "read.l"
1159 {
1162  return READ_STRING;
1163  }
1164  YY_BREAK
1165 case 8:
1167 #line 114 "read.l"
1168 { newgen_lex_number++; return LB; }
1169  YY_BREAK
1170 case 9:
1172 #line 115 "read.l"
1173 { newgen_lex_number++; return CHUNK_BEGIN; }
1174  YY_BREAK
1175 case 10:
1177 #line 116 "read.l"
1178 { newgen_lex_number++; return VECTOR_BEGIN; }
1179  YY_BREAK
1180 case 11:
1182 #line 117 "read.l"
1183 { newgen_lex_number++; return ARROW_BEGIN; }
1184  YY_BREAK
1185 case 12:
1187 #line 118 "read.l"
1188 { newgen_lex_number++; return TABULATED_BEGIN; }
1189  YY_BREAK
1190 case 13:
1192 #line 119 "read.l"
1193 { newgen_lex_number++; return LP; }
1194  YY_BREAK
1195 case 14:
1197 #line 120 "read.l"
1198 { newgen_lex_number++; return RP; }
1199  YY_BREAK
1200 case 15:
1202 #line 121 "read.l"
1203 { newgen_lex_number++; return LC; }
1204  YY_BREAK
1205 case 16:
1207 #line 122 "read.l"
1208 { newgen_lex_number++; return RC; }
1209  YY_BREAK
1210 case 17:
1212 #line 123 "read.l"
1213 { newgen_lex_number++; return SHARED_POINTER; }
1214  YY_BREAK
1215 case 18:
1217 #line 124 "read.l"
1218 { newgen_lex_number++; return READ_UNIT; }
1219  YY_BREAK
1220 case 19:
1222 #line 125 "read.l"
1223 { newgen_lex_number++; return READ_BOOL; }
1224  YY_BREAK
1225 case 20:
1227 #line 126 "read.l"
1228 { newgen_lex_number++; return READ_EXTERNAL; }
1229  YY_BREAK
1230 case 21:
1232 #line 127 "read.l"
1233 { newgen_lex_number++; return READ_DEF; }
1234  YY_BREAK
1235 case 22:
1237 #line 128 "read.l"
1238 { newgen_lex_number++; return READ_REF; }
1239  YY_BREAK
1240 case 23:
1242 #line 129 "read.l"
1243 { newgen_lex_number++; return READ_NULL; }
1244  YY_BREAK
1245 case 24:
1247 #line 130 "read.l"
1249  YY_BREAK
1250 case 25:
1252 #line 131 "read.l"
1254  YY_BREAK
1255 case 26:
1257 #line 132 "read.l"
1259  YY_BREAK
1260 case 27:
1262 #line 133 "read.l"
1263 {
1264  yylval.c=*(yytext+2);
1266  return READ_CHAR;
1267  }
1268  YY_BREAK
1269 case 28:
1271 #line 138 "read.l"
1272 {
1273  yylval.val=atoi(yytext);
1275  return READ_INT;
1276  }
1277  YY_BREAK
1278 case 29:
1280 #line 143 "read.l"
1281 {
1282  yylval.d=atof(yytext);
1284  return READ_FLOAT;
1285  }
1286  YY_BREAK
1287 case 30:
1289 #line 148 "read.l"
1290 { BEGIN a_string ; append_to_literal(""); }
1291  YY_BREAK
1292 case 31:
1294 #line 149 "read.l"
1295 ;
1296  YY_BREAK
1297 case 32:
1298 /* rule 32 can match eol */
1300 #line 150 "read.l"
1302  YY_BREAK
1303 case 33:
1305 #line 151 "read.l"
1306 { fatal("gen_read: Unknown character %x\n",
1307  (int) yytext[0]);}
1308  YY_BREAK
1309 case 34:
1311 #line 153 "read.l"
1312 ECHO;
1313  YY_BREAK
1314 #line 1315 "<stdout>"
1315 case YY_STATE_EOF(INITIAL):
1316 case YY_STATE_EOF(a_string):
1317  yyterminate();
1318 
1319  case YY_END_OF_BUFFER:
1320  {
1321  /* Amount of text matched not including the EOB char. */
1322  int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1323 
1324  /* Undo the effects of YY_DO_BEFORE_ACTION. */
1325  *yy_cp = (yy_hold_char);
1327 
1328  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1329  {
1330  /* We're scanning a new file or input source. It's
1331  * possible that this happened because the user
1332  * just pointed yyin at a new source and called
1333  * yylex(). If so, then we have to assure
1334  * consistency between YY_CURRENT_BUFFER and our
1335  * globals. Here is the right place to do so, because
1336  * this is the first action (other than possibly a
1337  * back-up) that will match for the new input source.
1338  */
1339  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1340  YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1341  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1342  }
1343 
1344  /* Note that here we test for yy_c_buf_p "<=" to the position
1345  * of the first EOB in the buffer, since yy_c_buf_p will
1346  * already have been incremented past the NUL character
1347  * (since all states make transitions on EOB to the
1348  * end-of-buffer state). Contrast this with the test
1349  * in input().
1350  */
1351  if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1352  { /* This was really a NUL. */
1353  yy_state_type yy_next_state;
1354 
1355  (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1356 
1357  yy_current_state = yy_get_previous_state( );
1358 
1359  /* Okay, we're now positioned to make the NUL
1360  * transition. We couldn't have
1361  * yy_get_previous_state() go ahead and do it
1362  * for us because it doesn't know how to deal
1363  * with the possibility of jamming (and we don't
1364  * want to build jamming into it because then it
1365  * will run more slowly).
1366  */
1367 
1368  yy_next_state = yy_try_NUL_trans( yy_current_state );
1369 
1371 
1372  if ( yy_next_state )
1373  {
1374  /* Consume the NUL. */
1375  yy_cp = ++(yy_c_buf_p);
1376  yy_current_state = yy_next_state;
1377  goto yy_match;
1378  }
1379 
1380  else
1381  {
1382  yy_cp = (yy_c_buf_p);
1383  goto yy_find_action;
1384  }
1385  }
1386 
1387  else switch ( yy_get_next_buffer( ) )
1388  {
1389  case EOB_ACT_END_OF_FILE:
1390  {
1392 
1393  if ( yywrap( ) )
1394  {
1395  /* Note: because we've taken care in
1396  * yy_get_next_buffer() to have set up
1397  * yytext, we can now set up
1398  * yy_c_buf_p so that if some total
1399  * hoser (like flex itself) wants to
1400  * call the scanner after we return the
1401  * YY_NULL, it'll still work - another
1402  * YY_NULL will get returned.
1403  */
1405 
1407  goto do_action;
1408  }
1409 
1410  else
1411  {
1412  if ( ! (yy_did_buffer_switch_on_eof) )
1413  YY_NEW_FILE;
1414  }
1415  break;
1416  }
1417 
1418  case EOB_ACT_CONTINUE_SCAN:
1419  (yy_c_buf_p) =
1420  (yytext_ptr) + yy_amount_of_matched_text;
1421 
1422  yy_current_state = yy_get_previous_state( );
1423 
1424  yy_cp = (yy_c_buf_p);
1426  goto yy_match;
1427 
1428  case EOB_ACT_LAST_MATCH:
1429  (yy_c_buf_p) =
1430  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1431 
1432  yy_current_state = yy_get_previous_state( );
1433 
1434  yy_cp = (yy_c_buf_p);
1436  goto yy_find_action;
1437  }
1438  break;
1439  }
1440 
1441  default:
1443  "fatal flex scanner internal error--no action found" );
1444  } /* end of action switch */
1445  } /* end of scanning one token */
1446  } /* end of user's declarations */
1447 } /* end of yylex */
1448 
1449 /* yy_get_next_buffer - try to read in a new buffer
1450  *
1451  * Returns a code representing an action:
1452  * EOB_ACT_LAST_MATCH -
1453  * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1454  * EOB_ACT_END_OF_FILE - end of file
1455  */
1456 static int yy_get_next_buffer (void)
1457 {
1458  char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1459  char *source = (yytext_ptr);
1460  int number_to_move, i;
1461  int ret_val;
1462 
1463  if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1465  "fatal flex scanner internal error--end of buffer missed" );
1466 
1467  if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1468  { /* Don't try to fill the buffer, so this is an EOF. */
1469  if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1470  {
1471  /* We matched a single character, the EOB, so
1472  * treat this as a final EOF.
1473  */
1474  return EOB_ACT_END_OF_FILE;
1475  }
1476 
1477  else
1478  {
1479  /* We matched some text prior to the EOB, first
1480  * process it.
1481  */
1482  return EOB_ACT_LAST_MATCH;
1483  }
1484  }
1485 
1486  /* Try to read more data. */
1487 
1488  /* First move last chars to start of buffer. */
1489  number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
1490 
1491  for ( i = 0; i < number_to_move; ++i )
1492  *(dest++) = *(source++);
1493 
1494  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1495  /* don't do the read, it's not guaranteed to return an EOF,
1496  * just force an EOF
1497  */
1498  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1499 
1500  else
1501  {
1502  int num_to_read =
1503  YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1504 
1505  while ( num_to_read <= 0 )
1506  { /* Not enough room in the buffer - grow it. */
1507 
1508  /* just a shorter name for the current buffer */
1510 
1511  int yy_c_buf_p_offset =
1512  (int) ((yy_c_buf_p) - b->yy_ch_buf);
1513 
1514  if ( b->yy_is_our_buffer )
1515  {
1516  int new_size = b->yy_buf_size * 2;
1517 
1518  if ( new_size <= 0 )
1519  b->yy_buf_size += b->yy_buf_size / 8;
1520  else
1521  b->yy_buf_size *= 2;
1522 
1523  b->yy_ch_buf = (char *)
1524  /* Include room in for 2 EOB chars. */
1525  yyrealloc( (void *) b->yy_ch_buf,
1526  (yy_size_t) (b->yy_buf_size + 2) );
1527  }
1528  else
1529  /* Can't grow it, we don't own it. */
1530  b->yy_ch_buf = NULL;
1531 
1532  if ( ! b->yy_ch_buf )
1534  "fatal error - scanner input buffer overflow" );
1535 
1536  (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1537 
1538  num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1539  number_to_move - 1;
1540 
1541  }
1542 
1543  if ( num_to_read > YY_READ_BUF_SIZE )
1544  num_to_read = YY_READ_BUF_SIZE;
1545 
1546  /* Read in more data. */
1547  YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1548  (yy_n_chars), num_to_read );
1549 
1550  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1551  }
1552 
1553  if ( (yy_n_chars) == 0 )
1554  {
1555  if ( number_to_move == YY_MORE_ADJ )
1556  {
1557  ret_val = EOB_ACT_END_OF_FILE;
1558  yyrestart( yyin );
1559  }
1560 
1561  else
1562  {
1563  ret_val = EOB_ACT_LAST_MATCH;
1564  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1566  }
1567  }
1568 
1569  else
1570  ret_val = EOB_ACT_CONTINUE_SCAN;
1571 
1572  if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1573  /* Extend the array by 50%, plus the number we really need. */
1574  int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1575  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
1576  (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
1577  if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1578  YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1579  /* "- 2" to take care of EOB's */
1580  YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
1581  }
1582 
1583  (yy_n_chars) += number_to_move;
1586 
1587  (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1588 
1589  return ret_val;
1590 }
1591 
1592 /* yy_get_previous_state - get the state just before the EOB char was reached */
1593 
1594  static yy_state_type yy_get_previous_state (void)
1595 {
1596  yy_state_type yy_current_state;
1597  char *yy_cp;
1598 
1599  yy_current_state = (yy_start);
1600 
1601  for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1602  {
1603  YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1604  if ( yy_accept[yy_current_state] )
1605  {
1606  (yy_last_accepting_state) = yy_current_state;
1608  }
1609  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1610  {
1611  yy_current_state = (int) yy_def[yy_current_state];
1612  if ( yy_current_state >= 80 )
1613  yy_c = yy_meta[yy_c];
1614  }
1615  yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1616  }
1617 
1618  return yy_current_state;
1619 }
1620 
1621 /* yy_try_NUL_trans - try to make a transition on the NUL character
1622  *
1623  * synopsis
1624  * next_state = yy_try_NUL_trans( current_state );
1625  */
1626  static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1627 {
1628  int yy_is_jam;
1629  char *yy_cp = (yy_c_buf_p);
1630 
1631  YY_CHAR yy_c = 1;
1632  if ( yy_accept[yy_current_state] )
1633  {
1634  (yy_last_accepting_state) = yy_current_state;
1636  }
1637  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1638  {
1639  yy_current_state = (int) yy_def[yy_current_state];
1640  if ( yy_current_state >= 80 )
1641  yy_c = yy_meta[yy_c];
1642  }
1643  yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1644  yy_is_jam = (yy_current_state == 79);
1645 
1646  return yy_is_jam ? 0 : yy_current_state;
1647 }
1648 
1649 #ifndef YY_NO_UNPUT
1650 
1651 #endif
1652 
1653 #ifndef YY_NO_INPUT
1654 #ifdef __cplusplus
1655  static int yyinput (void)
1656 #else
1657  static int input (void)
1658 #endif
1659 
1660 {
1661  int c;
1662 
1663  *(yy_c_buf_p) = (yy_hold_char);
1664 
1665  if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1666  {
1667  /* yy_c_buf_p now points to the character we want to return.
1668  * If this occurs *before* the EOB characters, then it's a
1669  * valid NUL; if not, then we've hit the end of the buffer.
1670  */
1671  if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1672  /* This was really a NUL. */
1673  *(yy_c_buf_p) = '\0';
1674 
1675  else
1676  { /* need more input */
1677  int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
1678  ++(yy_c_buf_p);
1679 
1680  switch ( yy_get_next_buffer( ) )
1681  {
1682  case EOB_ACT_LAST_MATCH:
1683  /* This happens because yy_g_n_b()
1684  * sees that we've accumulated a
1685  * token and flags that we need to
1686  * try matching the token before
1687  * proceeding. But for input(),
1688  * there's no matching to consider.
1689  * So convert the EOB_ACT_LAST_MATCH
1690  * to EOB_ACT_END_OF_FILE.
1691  */
1692 
1693  /* Reset buffer status. */
1694  yyrestart( yyin );
1695 
1696  /*FALLTHROUGH*/
1697 
1698  case EOB_ACT_END_OF_FILE:
1699  {
1700  if ( yywrap( ) )
1701  return 0;
1702 
1703  if ( ! (yy_did_buffer_switch_on_eof) )
1704  YY_NEW_FILE;
1705 #ifdef __cplusplus
1706  return yyinput();
1707 #else
1708  return input();
1709 #endif
1710  }
1711 
1712  case EOB_ACT_CONTINUE_SCAN:
1713  (yy_c_buf_p) = (yytext_ptr) + offset;
1714  break;
1715  }
1716  }
1717  }
1718 
1719  c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1720  *(yy_c_buf_p) = '\0'; /* preserve yytext */
1721  (yy_hold_char) = *++(yy_c_buf_p);
1722 
1723  return c;
1724 }
1725 #endif /* ifndef YY_NO_INPUT */
1726 
1727 /** Immediately switch to a different input stream.
1728  * @param input_file A readable stream.
1729  *
1730  * @note This function does not reset the start condition to @c INITIAL .
1731  */
1732  void yyrestart (FILE * input_file )
1733 {
1734 
1735  if ( ! YY_CURRENT_BUFFER ){
1739  }
1740 
1741  yy_init_buffer( YY_CURRENT_BUFFER, input_file );
1743 }
1744 
1745 /** Switch to a different input buffer.
1746  * @param new_buffer The new input buffer.
1747  *
1748  */
1749  void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
1750 {
1751 
1752  /* TODO. We should be able to replace this entire function body
1753  * with
1754  * yypop_buffer_state();
1755  * yypush_buffer_state(new_buffer);
1756  */
1758  if ( YY_CURRENT_BUFFER == new_buffer )
1759  return;
1760 
1761  if ( YY_CURRENT_BUFFER )
1762  {
1763  /* Flush out information for old buffer. */
1764  *(yy_c_buf_p) = (yy_hold_char);
1765  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1766  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1767  }
1768 
1769  YY_CURRENT_BUFFER_LVALUE = new_buffer;
1771 
1772  /* We don't actually know whether we did this switch during
1773  * EOF (yywrap()) processing, but the only time this flag
1774  * is looked at is after yywrap() is called, so it's safe
1775  * to go ahead and always set it.
1776  */
1778 }
1779 
1780 static void yy_load_buffer_state (void)
1781 {
1782  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1783  (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1784  yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1785  (yy_hold_char) = *(yy_c_buf_p);
1786 }
1787 
1788 /** Allocate and initialize an input buffer state.
1789  * @param file A readable stream.
1790  * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1791  *
1792  * @return the allocated buffer state.
1793  */
1794  YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
1795 {
1796  YY_BUFFER_STATE b;
1797 
1798  b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
1799  if ( ! b )
1800  YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1801 
1802  b->yy_buf_size = size;
1803 
1804  /* yy_ch_buf has to be 2 characters longer than the size given because
1805  * we need to put in 2 end-of-buffer characters.
1806  */
1807  b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
1808  if ( ! b->yy_ch_buf )
1809  YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1810 
1811  b->yy_is_our_buffer = 1;
1812 
1813  yy_init_buffer( b, file );
1814 
1815  return b;
1816 }
1817 
1818 /** Destroy the buffer.
1819  * @param b a buffer created with yy_create_buffer()
1820  *
1821  */
1823 {
1824 
1825  if ( ! b )
1826  return;
1827 
1828  if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1830 
1831  if ( b->yy_is_our_buffer )
1832  yyfree( (void *) b->yy_ch_buf );
1833 
1834  yyfree( (void *) b );
1835 }
1836 
1837 /* Initializes or reinitializes a buffer.
1838  * This function is sometimes called more than once on the same buffer,
1839  * such as during a yyrestart() or at EOF.
1840  */
1841  static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
1842 
1843 {
1844  int oerrno = errno;
1845 
1846  yy_flush_buffer( b );
1847 
1848  b->yy_input_file = file;
1849  b->yy_fill_buffer = 1;
1850 
1851  /* If b is the current buffer, then yy_init_buffer was _probably_
1852  * called from yyrestart() or through yy_get_next_buffer.
1853  * In that case, we don't want to reset the lineno or column.
1854  */
1855  if (b != YY_CURRENT_BUFFER){
1856  b->yy_bs_lineno = 1;
1857  b->yy_bs_column = 0;
1858  }
1859 
1860  b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1861 
1862  errno = oerrno;
1863 }
1864 
1865 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1866  * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1867  *
1868  */
1870 {
1871  if ( ! b )
1872  return;
1873 
1874  b->yy_n_chars = 0;
1875 
1876  /* We always need two end-of-buffer characters. The first causes
1877  * a transition to the end-of-buffer state. The second causes
1878  * a jam in that state.
1879  */
1882 
1883  b->yy_buf_pos = &b->yy_ch_buf[0];
1884 
1885  b->yy_at_bol = 1;
1887 
1888  if ( b == YY_CURRENT_BUFFER )
1890 }
1891 
1892 /** Pushes the new state onto the stack. The new state becomes
1893  * the current state. This function will allocate the stack
1894  * if necessary.
1895  * @param new_buffer The new state.
1896  *
1897  */
1898 void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
1899 {
1900  if (new_buffer == NULL)
1901  return;
1902 
1904 
1905  /* This block is copied from yy_switch_to_buffer. */
1906  if ( YY_CURRENT_BUFFER )
1907  {
1908  /* Flush out information for old buffer. */
1909  *(yy_c_buf_p) = (yy_hold_char);
1910  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1911  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1912  }
1913 
1914  /* Only push if top exists. Otherwise, replace top. */
1915  if (YY_CURRENT_BUFFER)
1916  (yy_buffer_stack_top)++;
1917  YY_CURRENT_BUFFER_LVALUE = new_buffer;
1918 
1919  /* copied from yy_switch_to_buffer. */
1922 }
1923 
1924 /** Removes and deletes the top of the stack, if present.
1925  * The next element becomes the new top.
1926  *
1927  */
1928 void yypop_buffer_state (void)
1929 {
1930  if (!YY_CURRENT_BUFFER)
1931  return;
1932 
1934  YY_CURRENT_BUFFER_LVALUE = NULL;
1935  if ((yy_buffer_stack_top) > 0)
1936  --(yy_buffer_stack_top);
1937 
1938  if (YY_CURRENT_BUFFER) {
1941  }
1942 }
1943 
1944 /* Allocates the stack if it does not exist.
1945  * Guarantees space for at least one push.
1946  */
1947 static void yyensure_buffer_stack (void)
1948 {
1949  yy_size_t num_to_alloc;
1950 
1951  if (!(yy_buffer_stack)) {
1952 
1953  /* First allocation is just for 2 elements, since we don't know if this
1954  * scanner will even need a stack. We use 2 instead of 1 to avoid an
1955  * immediate realloc on the next call.
1956  */
1957  num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
1959  (num_to_alloc * sizeof(struct yy_buffer_state*)
1960  );
1961  if ( ! (yy_buffer_stack) )
1962  YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1963 
1964  memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1965 
1966  (yy_buffer_stack_max) = num_to_alloc;
1967  (yy_buffer_stack_top) = 0;
1968  return;
1969  }
1970 
1971  if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1972 
1973  /* Increase the buffer to prepare for a possible push. */
1974  yy_size_t grow_size = 8 /* arbitrary grow size */;
1975 
1976  num_to_alloc = (yy_buffer_stack_max) + grow_size;
1978  ((yy_buffer_stack),
1979  num_to_alloc * sizeof(struct yy_buffer_state*)
1980  );
1981  if ( ! (yy_buffer_stack) )
1982  YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1983 
1984  /* zero only the new slots.*/
1985  memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
1986  (yy_buffer_stack_max) = num_to_alloc;
1987  }
1988 }
1989 
1990 /** Setup the input buffer state to scan directly from a user-specified character buffer.
1991  * @param base the character buffer
1992  * @param size the size in bytes of the character buffer
1993  *
1994  * @return the newly allocated buffer state object.
1995  */
1997 {
1998  YY_BUFFER_STATE b;
1999 
2000  if ( size < 2 ||
2001  base[size-2] != YY_END_OF_BUFFER_CHAR ||
2002  base[size-1] != YY_END_OF_BUFFER_CHAR )
2003  /* They forgot to leave room for the EOB's. */
2004  return NULL;
2005 
2006  b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
2007  if ( ! b )
2008  YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2009 
2010  b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
2011  b->yy_buf_pos = b->yy_ch_buf = base;
2012  b->yy_is_our_buffer = 0;
2013  b->yy_input_file = NULL;
2014  b->yy_n_chars = b->yy_buf_size;
2015  b->yy_is_interactive = 0;
2016  b->yy_at_bol = 1;
2017  b->yy_fill_buffer = 0;
2019 
2020  yy_switch_to_buffer( b );
2021 
2022  return b;
2023 }
2024 
2025 /** Setup the input buffer state to scan a string. The next call to yylex() will
2026  * scan from a @e copy of @a str.
2027  * @param yystr a NUL-terminated string to scan
2028  *
2029  * @return the newly allocated buffer state object.
2030  * @note If you want to scan bytes that may contain NUL values, then use
2031  * yy_scan_bytes() instead.
2032  */
2033 YY_BUFFER_STATE yy_scan_string (const char * yystr )
2034 {
2035 
2036  return yy_scan_bytes( yystr, (int) strlen(yystr) );
2037 }
2038 
2039 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
2040  * scan from a @e copy of @a bytes.
2041  * @param yybytes the byte buffer to scan
2042  * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
2043  *
2044  * @return the newly allocated buffer state object.
2045  */
2046 YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
2047 {
2048  YY_BUFFER_STATE b;
2049  char *buf;
2050  yy_size_t n;
2051  int i;
2052 
2053  /* Get memory for full buffer, including space for trailing EOB's. */
2054  n = (yy_size_t) (_yybytes_len + 2);
2055  buf = (char *) yyalloc( n );
2056  if ( ! buf )
2057  YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2058 
2059  for ( i = 0; i < _yybytes_len; ++i )
2060  buf[i] = yybytes[i];
2061 
2062  buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2063 
2064  b = yy_scan_buffer( buf, n );
2065  if ( ! b )
2066  YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2067 
2068  /* It's okay to grow etc. this buffer, and we should throw it
2069  * away when we're done.
2070  */
2071  b->yy_is_our_buffer = 1;
2072 
2073  return b;
2074 }
2075 
2076 #ifndef YY_EXIT_FAILURE
2077 #define YY_EXIT_FAILURE 2
2078 #endif
2079 
2080 static void yynoreturn yy_fatal_error (const char* msg )
2081 {
2082  fprintf( stderr, "%s\n", msg );
2083  exit( YY_EXIT_FAILURE );
2084 }
2085 
2086 /* Redefine yyless() so it works in section 3 code. */
2087 
2088 #undef yyless
2089 #define yyless(n) \
2090  do \
2091  { \
2092  /* Undo effects of setting up yytext. */ \
2093  int yyless_macro_arg = (n); \
2094  YY_LESS_LINENO(yyless_macro_arg);\
2095  yytext[yyleng] = (yy_hold_char); \
2096  (yy_c_buf_p) = yytext + yyless_macro_arg; \
2097  (yy_hold_char) = *(yy_c_buf_p); \
2098  *(yy_c_buf_p) = '\0'; \
2099  yyleng = yyless_macro_arg; \
2100  } \
2101  while ( 0 )
2102 
2103 /* Accessor methods (get/set functions) to struct members. */
2104 
2105 /** Get the current line number.
2106  *
2107  */
2108 int yyget_lineno (void)
2109 {
2110 
2111  return yylineno;
2112 }
2113 
2114 /** Get the input stream.
2115  *
2116  */
2117 FILE *yyget_in (void)
2118 {
2119  return yyin;
2120 }
2121 
2122 /** Get the output stream.
2123  *
2124  */
2125 FILE *yyget_out (void)
2126 {
2127  return yyout;
2128 }
2129 
2130 /** Get the length of the current token.
2131  *
2132  */
2133 int yyget_leng (void)
2134 {
2135  return yyleng;
2136 }
2137 
2138 /** Get the current token.
2139  *
2140  */
2141 
2142 char *yyget_text (void)
2143 {
2144  return yytext;
2145 }
2146 
2147 /** Set the current line number.
2148  * @param _line_number line number
2149  *
2150  */
2151 void yyset_lineno (int _line_number )
2152 {
2153 
2154  yylineno = _line_number;
2155 }
2156 
2157 /** Set the input stream. This does not discard the current
2158  * input buffer.
2159  * @param _in_str A readable stream.
2160  *
2161  * @see yy_switch_to_buffer
2162  */
2163 void yyset_in (FILE * _in_str )
2164 {
2165  yyin = _in_str ;
2166 }
2167 
2168 void yyset_out (FILE * _out_str )
2169 {
2170  yyout = _out_str ;
2171 }
2172 
2173 int yyget_debug (void)
2174 {
2175  return yy_flex_debug;
2176 }
2177 
2178 void yyset_debug (int _bdebug )
2179 {
2180  yy_flex_debug = _bdebug ;
2181 }
2182 
2183 static int yy_init_globals (void)
2184 {
2185  /* Initialization is the same as for the non-reentrant scanner.
2186  * This function is called from yylex_destroy(), so don't allocate here.
2187  */
2188 
2189  (yy_buffer_stack) = NULL;
2190  (yy_buffer_stack_top) = 0;
2191  (yy_buffer_stack_max) = 0;
2192  (yy_c_buf_p) = NULL;
2193  (yy_init) = 0;
2194  (yy_start) = 0;
2195 
2196 /* Defined in main.c */
2197 #ifdef YY_STDINIT
2198  yyin = stdin;
2199  yyout = stdout;
2200 #else
2201  yyin = NULL;
2202  yyout = NULL;
2203 #endif
2204 
2205  /* For future reference: Set errno on error, since we are called by
2206  * yylex_init()
2207  */
2208  return 0;
2209 }
2210 
2211 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
2212 int yylex_destroy (void)
2213 {
2214 
2215  /* Pop the buffer stack, destroying each element. */
2216  while(YY_CURRENT_BUFFER){
2218  YY_CURRENT_BUFFER_LVALUE = NULL;
2220  }
2221 
2222  /* Destroy the stack itself. */
2223  yyfree((yy_buffer_stack) );
2224  (yy_buffer_stack) = NULL;
2225 
2226  /* Reset the globals. This is important in a non-reentrant scanner so the next time
2227  * yylex() is called, initialization will occur. */
2228  yy_init_globals( );
2229 
2230  return 0;
2231 }
2232 
2233 /*
2234  * Internal utility routines.
2235  */
2236 
2237 #ifndef yytext_ptr
2238 static void yy_flex_strncpy (char* s1, const char * s2, int n )
2239 {
2240 
2241  int i;
2242  for ( i = 0; i < n; ++i )
2243  s1[i] = s2[i];
2244 }
2245 #endif
2246 
2247 #ifdef YY_NEED_STRLEN
2248 static int yy_flex_strlen (const char * s )
2249 {
2250  int n;
2251  for ( n = 0; s[n]; ++n )
2252  ;
2253 
2254  return n;
2255 }
2256 #endif
2257 
2258 void *yyalloc (yy_size_t size )
2259 {
2260  return malloc(size);
2261 }
2262 
2263 void *yyrealloc (void * ptr, yy_size_t size )
2264 {
2265 
2266  /* The cast to (char *) in the following accommodates both
2267  * implementations that use char* generic pointers, and those
2268  * that use void* generic pointers. It works with the latter
2269  * because both ANSI C and C++ allow castless assignment from
2270  * any pointer type to void*, and deal with argument conversions
2271  * as though doing an assignment.
2272  */
2273  return realloc(ptr, size);
2274 }
2275 
2276 void yyfree (void * ptr )
2277 {
2278  free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
2279 }
2280 
2281 #define YYTABLES_NAME "yytables"
2282 
2283 #line 153 "read.l"
2284 
2285 
2286 #ifdef FLEX_SCANNER
2287 int genread_input()
2288 {
2291  return input();
2292 }
2293 #endif
2294 
2295 int yywrap(void)
2296 {
2297 #ifdef FLEX_SCANNER
2298  yy_init = 1 ;
2299 #endif
2300  newgen_start_lexer(NULL);
2301  return 1;
2302 }
2303 
static FILE * out
Definition: alias_check.c:128
void const char const char const int
bdt base
Current expression.
Definition: bdt_read_paf.c:100
static Value offset
Definition: translation.c:283
#define RP
Definition: genread.h:94
#define READ_FLOAT
Definition: genread.h:110
#define CHUNK_BEGIN
Definition: genread.h:88
#define VECTOR_BEGIN
Definition: genread.h:89
#define READ_ARRAY_UNDEFINED
Definition: genread.h:105
#define READ_SET_UNDEFINED
Definition: genread.h:104
#define LP
Definition: genread.h:93
#define SHARED_POINTER
Definition: genread.h:98
#define READ_NULL
Definition: genread.h:102
#define READ_DEF
Definition: genread.h:100
#define READ_CHAR
Definition: genread.h:108
#define READ_LIST_UNDEFINED
Definition: genread.h:103
#define READ_REF
Definition: genread.h:101
#define RC
Definition: genread.h:96
#define LC
Definition: genread.h:95
#define READ_INT
Definition: genread.h:109
#define TABULATED_BEGIN
Definition: genread.h:92
#define READ_STRING
Definition: genread.h:106
#define READ_BOOL
Definition: genread.h:91
#define LB
Definition: genread.h:97
#define ARROW_BEGIN
Definition: genread.h:90
#define READ_UNIT
Definition: genread.h:107
#define READ_EXTERNAL
Definition: genread.h:99
static size_t newgen_char_number
Definition: genread_lex.c:818
#define YY_NEW_FILE
Special action meaning "start processing a new file".
Definition: genread_lex.c:386
#define yyget_extra
Definition: genread_lex.c:158
#define yyset_extra
Definition: genread_lex.c:164
#define yyget_leng
Definition: genread_lex.c:194
static const YY_CHAR yy_meta[31]
Definition: genread_lex.c:666
unsigned char flex_uint8_t
Definition: genread_lex.c:312
#define yyset_lineno
Definition: genread_lex.c:212
static const flex_int16_t yy_nxt[134]
Definition: genread_lex.c:699
static char yy_hold_char
yy_hold_char holds the character lost when yytext is formed.
Definition: genread_lex.c:527
static const flex_int16_t yy_def[82]
Definition: genread_lex.c:686
static int input(void)
#define yyleng
number of characters read into yy_ch_buf
Definition: genread_lex.c:22
static yy_state_type yy_last_accepting_state
Definition: genread_lex.c:737
#define yyrestart
Definition: genread_lex.c:26
void newgen_start_lexer(FILE *in)
starting the scanner.
Definition: genread_lex.c:822
#define yyset_debug
Definition: genread_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: genread_lex.c:854
#define yyout
Definition: genread_lex.c:25
static int yy_start
whether we need to initialize
Definition: genread_lex.c:534
short int flex_int16_t
Definition: genread_lex.c:310
void newgen_lexer_position(FILE *out)
First part of user prologue.
Definition: genread_lex.c:831
static YY_BUFFER_STATE * yy_buffer_stack
Stack as an array.
Definition: genread_lex.c:510
#define yytext
Definition: genread_lex.c:27
unsigned int flex_uint32_t
Definition: genread_lex.c:314
static int yy_get_next_buffer(void)
#define yy_scan_bytes
Definition: genread_lex.c:12
#define yylex
Definition: genread_lex.c:23
#define YY_BREAK
Code executed at the end of each rule.
Definition: genread_lex.c:1015
static size_t yy_buffer_stack_max
capacity of stack.
Definition: genread_lex.c:509
#define yynoreturn
Definition: genread_lex.c:361
static void append_to_literal(string s)
Definition: genread_lex.c:795
#define yyget_text
Definition: genread_lex.c:200
static yy_state_type yy_try_NUL_trans(yy_state_type current_state)
int yy_act
Definition: genread_lex.c:1027
#define yypush_buffer_state
Definition: genread_lex.c:17
struct yy_buffer_state * YY_BUFFER_STATE
Definition: genread_lex.c:408
#define yyfree
Definition: genread_lex.c:31
#define YY_BUFFER_NEW
Definition: genread_lex.c:490
static const flex_int16_t yy_base[82]
Definition: genread_lex.c:673
#define YY_RESTORE_YY_MORE_OFFSET
Definition: genread_lex.c:749
static int yy_did_buffer_switch_on_eof
start state number
Definition: genread_lex.c:539
static int yy_init_globals(void)
static size_t newgen_lex_number
Definition: genread_lex.c:820
#define yyget_lineno
Definition: genread_lex.c:206
static string literal
Definition: genread_lex.c:793
#define yylineno
Definition: genread_lex.c:24
#define YY_BUFFER_NORMAL
Definition: genread_lex.c:491
char * yy_cp
Definition: genread_lex.c:1026
#define yy_scan_buffer
Definition: genread_lex.c:10
#define YY_MORE_ADJ
Definition: genread_lex.c:748
#define YY_RULE_SETUP
Definition: genread_lex.c:1018
#define yy_scan_string
Definition: genread_lex.c:11
#define yy_flex_debug
Definition: genread_lex.c:20
static size_t newgen_col_number
Definition: genread_lex.c:819
#define yylval
Definition: genread_lex.c:790
#define yytext_ptr
Definition: genread_lex.c:597
signed char flex_int8_t
C99 systems have <inttypes.h>.
Definition: genread_lex.c:309
#define EOB_ACT_END_OF_FILE
Definition: genread_lex.c:421
#define yyalloc
Definition: genread_lex.c:29
#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: genread_lex.c:524
#define yyget_debug
Definition: genread_lex.c:146
int flex_int32_t
Definition: genread_lex.c:311
#define yyin
Definition: genread_lex.c:21
#define YY_START
Translate the current start state into a value that can be later handed to BEGIN to return to the sta...
Definition: genread_lex.c:381
#define yyensure_buffer_stack
Definition: genread_lex.c:19
#define yy_switch_to_buffer
Definition: genread_lex.c:16
#define yywrap
Macros after this point can all be overridden by user definitions in section 1.
Definition: genread_lex.c:28
int yy_state_type
Definition: genread_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: genread_lex.c:518
#define yy_init_buffer
Definition: genread_lex.c:13
#define INITIAL
Definition: genread_lex.c:842
#define yypop_buffer_state
Definition: genread_lex.c:18
#define yyget_in
Definition: genread_lex.c:170
char * yy_bp
Definition: genread_lex.c:1026
static int yy_n_chars
Definition: genread_lex.c:528
static int literal_size
Definition: genread_lex.c:794
#define YY_READ_BUF_SIZE
Amount of stuff to slurp up with each read.
Definition: genread_lex.c:927
#define YY_INPUT(buf, result, max_size)
Gets input and stuffs it into "buf".
Definition: genread_lex.c:943
#define ECHO
ia64
Definition: genread_lex.c:936
#define yy_flush_buffer
Definition: genread_lex.c:14
#define yyrealloc
Definition: genread_lex.c:30
#define YY_END_OF_BUFFER
Definition: genread_lex.c:614
#define YY_STATE_EOF(state)
Action number for EOF rule of a given start state.
Definition: genread_lex.c:384
#define yylex_destroy
Accessor methods to globals.
Definition: genread_lex.c:140
#define BEGIN
Enter a start condition.
Definition: genread_lex.c:376
#define YY_END_OF_BUFFER_CHAR
Definition: genread_lex.c:387
#define YY_FATAL_ERROR(msg)
Report a fatal error.
Definition: genread_lex.c:990
#define yyget_out
Definition: genread_lex.c:182
#define yyterminate()
No semi-colon after return; correct usage is to write "yyterminate();" - we don't want an extra ';' a...
Definition: genread_lex.c:980
unsigned short int flex_uint16_t
Definition: genread_lex.c:313
#define yy_create_buffer
A lexical scanner generated by flex.
Definition: genread_lex.c:8
flex_uint8_t YY_CHAR
Begin user sect3.
Definition: genread_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: genread_lex.c:607
#define a_string
Definition: genread_lex.c:843
#define yy_delete_buffer
Definition: genread_lex.c:9
#define EOB_ACT_LAST_MATCH
Definition: genread_lex.c:422
size_t yy_size_t
Definition: genread_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: genread_lex.c:502
static yy_state_type yy_get_previous_state(void)
static const YY_CHAR yy_ec[256]
Definition: genread_lex.c:634
#define yyset_out
Definition: genread_lex.c:188
static char * yy_c_buf_p
Points to current character in buffer.
Definition: genread_lex.c:532
#define EOB_ACT_CONTINUE_SCAN
Definition: genread_lex.c:420
static const flex_int16_t yy_chk[134]
Definition: genread_lex.c:718
static size_t yy_buffer_stack_top
!YY_STRUCT_YY_BUFFER_STATE
Definition: genread_lex.c:508
#define YY_DECL
Definition: genread_lex.c:1003
#define YY_BUF_SIZE
Size of default input buffer.
Definition: genread_lex.c:398
#define YY_EXIT_FAILURE
static int yy_init
Definition: genread_lex.c:533
static size_t newgen_line_number
Definition: genread_lex.c:817
#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: genread_lex.c:370
#define yy_load_buffer_state
Definition: genread_lex.c:15
static char * yy_last_accepting_cpos
Definition: genread_lex.c:738
#define yyset_in
Definition: genread_lex.c:176
static const flex_int16_t yy_accept[80]
Definition: genread_lex.c:622
void * malloc(YYSIZE_T)
int genread_input(void)
void free(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 message_assert(msg, ex)
Definition: newgen_assert.h:47
void fatal(char *,...)
#define string_undefined
Definition: newgen_types.h:40
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
char * strdup()
s1
Definition: set.c:247
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