PIPS
scanner.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 syn__create_buffer
9 #define yy_delete_buffer syn__delete_buffer
10 #define yy_scan_buffer syn__scan_buffer
11 #define yy_scan_string syn__scan_string
12 #define yy_scan_bytes syn__scan_bytes
13 #define yy_init_buffer syn__init_buffer
14 #define yy_flush_buffer syn__flush_buffer
15 #define yy_load_buffer_state syn__load_buffer_state
16 #define yy_switch_to_buffer syn__switch_to_buffer
17 #define yypush_buffer_state syn_push_buffer_state
18 #define yypop_buffer_state syn_pop_buffer_state
19 #define yyensure_buffer_stack syn_ensure_buffer_stack
20 #define yy_flex_debug syn__flex_debug
21 #define yyin syn_in
22 #define yyleng syn_leng
23 #define yylex syn_lex
24 #define yylineno syn_lineno
25 #define yyout syn_out
26 #define yyrestart syn_restart
27 #define yytext syn_text
28 #define yywrap syn_wrap
29 #define yyalloc syn_alloc
30 #define yyrealloc syn_realloc
31 #define yyfree syn_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 syn__create_buffer_ALREADY_DEFINED
43 #else
44 #define yy_create_buffer syn__create_buffer
45 #endif
46 
47 #ifdef yy_delete_buffer
48 #define syn__delete_buffer_ALREADY_DEFINED
49 #else
50 #define yy_delete_buffer syn__delete_buffer
51 #endif
52 
53 #ifdef yy_scan_buffer
54 #define syn__scan_buffer_ALREADY_DEFINED
55 #else
56 #define yy_scan_buffer syn__scan_buffer
57 #endif
58 
59 #ifdef yy_scan_string
60 #define syn__scan_string_ALREADY_DEFINED
61 #else
62 #define yy_scan_string syn__scan_string
63 #endif
64 
65 #ifdef yy_scan_bytes
66 #define syn__scan_bytes_ALREADY_DEFINED
67 #else
68 #define yy_scan_bytes syn__scan_bytes
69 #endif
70 
71 #ifdef yy_init_buffer
72 #define syn__init_buffer_ALREADY_DEFINED
73 #else
74 #define yy_init_buffer syn__init_buffer
75 #endif
76 
77 #ifdef yy_flush_buffer
78 #define syn__flush_buffer_ALREADY_DEFINED
79 #else
80 #define yy_flush_buffer syn__flush_buffer
81 #endif
82 
83 #ifdef yy_load_buffer_state
84 #define syn__load_buffer_state_ALREADY_DEFINED
85 #else
86 #define yy_load_buffer_state syn__load_buffer_state
87 #endif
88 
89 #ifdef yy_switch_to_buffer
90 #define syn__switch_to_buffer_ALREADY_DEFINED
91 #else
92 #define yy_switch_to_buffer syn__switch_to_buffer
93 #endif
94 
95 #ifdef yypush_buffer_state
96 #define syn_push_buffer_state_ALREADY_DEFINED
97 #else
98 #define yypush_buffer_state syn_push_buffer_state
99 #endif
100 
101 #ifdef yypop_buffer_state
102 #define syn_pop_buffer_state_ALREADY_DEFINED
103 #else
104 #define yypop_buffer_state syn_pop_buffer_state
105 #endif
106 
107 #ifdef yyensure_buffer_stack
108 #define syn_ensure_buffer_stack_ALREADY_DEFINED
109 #else
110 #define yyensure_buffer_stack syn_ensure_buffer_stack
111 #endif
112 
113 #ifdef yylex
114 #define syn_lex_ALREADY_DEFINED
115 #else
116 #define yylex syn_lex
117 #endif
118 
119 #ifdef yyrestart
120 #define syn_restart_ALREADY_DEFINED
121 #else
122 #define yyrestart syn_restart
123 #endif
124 
125 #ifdef yylex_init
126 #define syn_lex_init_ALREADY_DEFINED
127 #else
128 #define yylex_init syn_lex_init
129 #endif
130 
131 #ifdef yylex_init_extra
132 #define syn_lex_init_extra_ALREADY_DEFINED
133 #else
134 #define yylex_init_extra syn_lex_init_extra
135 #endif
136 
137 #ifdef yylex_destroy
138 #define syn_lex_destroy_ALREADY_DEFINED
139 #else
140 #define yylex_destroy syn_lex_destroy
141 #endif
142 
143 #ifdef yyget_debug
144 #define syn_get_debug_ALREADY_DEFINED
145 #else
146 #define yyget_debug syn_get_debug
147 #endif
148 
149 #ifdef yyset_debug
150 #define syn_set_debug_ALREADY_DEFINED
151 #else
152 #define yyset_debug syn_set_debug
153 #endif
154 
155 #ifdef yyget_extra
156 #define syn_get_extra_ALREADY_DEFINED
157 #else
158 #define yyget_extra syn_get_extra
159 #endif
160 
161 #ifdef yyset_extra
162 #define syn_set_extra_ALREADY_DEFINED
163 #else
164 #define yyset_extra syn_set_extra
165 #endif
166 
167 #ifdef yyget_in
168 #define syn_get_in_ALREADY_DEFINED
169 #else
170 #define yyget_in syn_get_in
171 #endif
172 
173 #ifdef yyset_in
174 #define syn_set_in_ALREADY_DEFINED
175 #else
176 #define yyset_in syn_set_in
177 #endif
178 
179 #ifdef yyget_out
180 #define syn_get_out_ALREADY_DEFINED
181 #else
182 #define yyget_out syn_get_out
183 #endif
184 
185 #ifdef yyset_out
186 #define syn_set_out_ALREADY_DEFINED
187 #else
188 #define yyset_out syn_set_out
189 #endif
190 
191 #ifdef yyget_leng
192 #define syn_get_leng_ALREADY_DEFINED
193 #else
194 #define yyget_leng syn_get_leng
195 #endif
196 
197 #ifdef yyget_text
198 #define syn_get_text_ALREADY_DEFINED
199 #else
200 #define yyget_text syn_get_text
201 #endif
202 
203 #ifdef yyget_lineno
204 #define syn_get_lineno_ALREADY_DEFINED
205 #else
206 #define yyget_lineno syn_get_lineno
207 #endif
208 
209 #ifdef yyset_lineno
210 #define syn_set_lineno_ALREADY_DEFINED
211 #else
212 #define yyset_lineno syn_set_lineno
213 #endif
214 
215 #ifdef yywrap
216 #define syn_wrap_ALREADY_DEFINED
217 #else
218 #define yywrap syn_wrap
219 #endif
220 
221 #ifdef yyalloc
222 #define syn_alloc_ALREADY_DEFINED
223 #else
224 #define yyalloc syn_alloc
225 #endif
226 
227 #ifdef yyrealloc
228 #define syn_realloc_ALREADY_DEFINED
229 #else
230 #define yyrealloc syn_realloc
231 #endif
232 
233 #ifdef yyfree
234 #define syn_free_ALREADY_DEFINED
235 #else
236 #define yyfree syn_free
237 #endif
238 
239 #ifdef yytext
240 #define syn_text_ALREADY_DEFINED
241 #else
242 #define yytext syn_text
243 #endif
244 
245 #ifdef yyleng
246 #define syn_leng_ALREADY_DEFINED
247 #else
248 #define yyleng syn_leng
249 #endif
250 
251 #ifdef yyin
252 #define syn_in_ALREADY_DEFINED
253 #else
254 #define yyin syn_in
255 #endif
256 
257 #ifdef yyout
258 #define syn_out_ALREADY_DEFINED
259 #else
260 #define yyout syn_out
261 #endif
262 
263 #ifdef yy_flex_debug
264 #define syn__flex_debug_ALREADY_DEFINED
265 #else
266 #define yy_flex_debug syn__flex_debug
267 #endif
268 
269 #ifdef yylineno
270 #define syn_lineno_ALREADY_DEFINED
271 #else
272 #define yylineno syn_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 38
614 #define YY_END_OF_BUFFER 39
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[103] =
623  { 0,
624  0, 0, 0, 0, 39, 37, 36, 37, 34, 37,
625  37, 29, 30, 28, 25, 31, 24, 37, 26, 19,
626  32, 33, 18, 19, 0, 23, 0, 0, 0, 0,
627  0, 0, 0, 0, 0, 0, 0, 22, 0, 27,
628  20, 35, 20, 19, 0, 0, 18, 18, 17, 17,
629  19, 23, 0, 0, 0, 0, 0, 0, 0, 0,
630  0, 0, 0, 0, 0, 22, 20, 0, 21, 0,
631  20, 0, 5, 0, 0, 7, 8, 3, 0, 9,
632  10, 11, 0, 0, 14, 0, 0, 1, 6, 0,
633  0, 0, 13, 4, 0, 0, 0, 12, 15, 16,
634 
635  2, 0
636  } ;
637 
638 static const YY_CHAR yy_ec[256] =
639  { 0,
640  1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
641  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
642  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
643  1, 1, 1, 3, 1, 4, 5, 1, 6, 7,
644  8, 9, 10, 11, 12, 13, 14, 15, 15, 15,
645  15, 15, 15, 15, 15, 15, 15, 16, 1, 1,
646  17, 1, 1, 1, 18, 19, 19, 20, 21, 22,
647  23, 19, 24, 19, 19, 25, 19, 26, 27, 19,
648  28, 29, 30, 31, 32, 33, 19, 19, 19, 19,
649  1, 34, 1, 1, 35, 1, 36, 36, 36, 36,
650 
651  36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
652  36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
653  36, 36, 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  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
661 
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, 1, 1, 1, 1, 1,
667  1, 1, 1, 1, 1
668  } ;
669 
670 static const YY_CHAR yy_meta[37] =
671  { 0,
672  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
673  1, 1, 1, 1, 2, 1, 1, 2, 2, 2,
674  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
675  2, 2, 2, 1, 2, 3
676  } ;
677 
678 static const flex_int16_t yy_base[107] =
679  { 0,
680  0, 0, 24, 25, 162, 163, 163, 38, 163, 55,
681  36, 163, 163, 152, 163, 163, 163, 145, 145, 30,
682  163, 163, 29, 143, 49, 154, 50, 130, 127, 136,
683  25, 127, 26, 27, 26, 123, 53, 145, 54, 163,
684  46, 163, 48, 76, 80, 88, 0, 70, 78, 39,
685  135, 68, 129, 89, 123, 142, 141, 94, 140, 139,
686  96, 112, 137, 110, 99, 98, 90, 115, 114, 113,
687  112, 121, 163, 120, 93, 163, 163, 163, 88, 163,
688  163, 163, 86, 113, 163, 112, 95, 163, 163, 94,
689  81, 104, 163, 163, 103, 102, 57, 163, 163, 163,
690 
691  163, 163, 132, 135, 137, 47
692  } ;
693 
694 static const flex_int16_t yy_def[107] =
695  { 0,
696  102, 1, 1, 1, 102, 102, 102, 103, 102, 102,
697  104, 102, 102, 102, 102, 102, 102, 102, 102, 102,
698  102, 102, 105, 102, 103, 102, 103, 102, 102, 102,
699  102, 102, 102, 102, 102, 102, 104, 102, 104, 102,
700  102, 102, 102, 102, 102, 102, 106, 105, 105, 102,
701  102, 103, 102, 102, 102, 102, 102, 102, 102, 102,
702  102, 102, 102, 102, 102, 104, 102, 102, 102, 102,
703  102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
704  102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
705  102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
706 
707  102, 0, 102, 102, 102, 102
708  } ;
709 
710 static const flex_int16_t yy_nxt[200] =
711  { 0,
712  6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
713  16, 17, 18, 19, 20, 21, 22, 23, 23, 23,
714  23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
715  23, 23, 23, 6, 23, 6, 6, 6, 24, 24,
716  26, 38, 43, 47, 44, 56, 59, 61, 47, 45,
717  46, 26, 52, 62, 63, 57, 60, 64, 38, 66,
718  41, 101, 67, 49, 50, 45, 46, 45, 46, 39,
719  52, 27, 28, 50, 50, 29, 30, 31, 32, 33,
720  34, 35, 27, 27, 47, 36, 39, 39, 43, 68,
721  44, 68, 47, 73, 69, 45, 46, 70, 78, 70,
722 
723  82, 27, 71, 66, 67, 102, 100, 99, 98, 45,
724  46, 97, 49, 50, 96, 95, 94, 93, 92, 91,
725  79, 74, 90, 83, 89, 88, 71, 71, 69, 69,
726  87, 39, 25, 25, 25, 37, 37, 37, 48, 48,
727  86, 85, 84, 81, 80, 77, 76, 75, 72, 51,
728  37, 65, 58, 55, 54, 53, 25, 51, 42, 41,
729  40, 102, 5, 102, 102, 102, 102, 102, 102, 102,
730  102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
731  102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
732  102, 102, 102, 102, 102, 102, 102, 102, 102
733 
734  } ;
735 
736 static const flex_int16_t yy_chk[200] =
737  { 0,
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, 1, 1, 1,
741  1, 1, 1, 1, 1, 1, 3, 4, 3, 4,
742  8, 11, 20, 23, 20, 31, 33, 34, 106, 20,
743  20, 25, 27, 34, 35, 31, 33, 35, 37, 39,
744  41, 97, 43, 23, 23, 41, 41, 43, 43, 11,
745  52, 8, 10, 50, 50, 10, 10, 10, 10, 10,
746  10, 10, 25, 27, 48, 10, 37, 39, 44, 45,
747  44, 45, 49, 54, 45, 44, 44, 46, 58, 46,
748 
749  61, 52, 46, 66, 67, 48, 96, 95, 92, 67,
750  67, 91, 49, 49, 90, 87, 86, 84, 83, 79,
751  58, 54, 75, 61, 74, 72, 71, 70, 69, 68,
752  65, 66, 103, 103, 103, 104, 104, 104, 105, 105,
753  64, 63, 62, 60, 59, 57, 56, 55, 53, 51,
754  38, 36, 32, 30, 29, 28, 26, 24, 19, 18,
755  14, 5, 102, 102, 102, 102, 102, 102, 102, 102,
756  102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
757  102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
758  102, 102, 102, 102, 102, 102, 102, 102, 102
759 
760  } ;
761 
764 
765 extern int yy_flex_debug;
767 
768 /* The intent behind this definition is that it'll catch
769  * any uses of REJECT which flex missed.
770  */
771 #define REJECT reject_used_but_not_detected
772 #define yymore() yymore_used_but_not_detected
773 #define YY_MORE_ADJ 0
774 #define YY_RESTORE_YY_MORE_OFFSET
775 char *yytext;
776 #line 1 "scanner.l"
777 /*
778 
779  $Id: scanner.l 23128 2016-07-01 11:58:21Z coelho $
780 
781  Copyright 1989-2016 MINES ParisTech
782 
783  This file is part of PIPS.
784 
785  PIPS is free software: you can redistribute it and/or modify it
786  under the terms of the GNU General Public License as published by
787  the Free Software Foundation, either version 3 of the License, or
788  any later version.
789 
790  PIPS is distributed in the hope that it will be useful, but WITHOUT ANY
791  WARRANTY; without even the implied warranty of MERCHANTABILITY or
792  FITNESS FOR A PARTICULAR PURPOSE.
793 
794  See the GNU General Public License for more details.
795 
796  You should have received a copy of the GNU General Public License
797  along with PIPS. If not, see <http://www.gnu.org/licenses/>.
798 
799 */
800 #line 26 "scanner.l"
801 #ifdef HAVE_CONFIG_H
802  #include "pips_config.h"
803 #endif
804 
805 /* UICON and ICON must be distinguished from RCON and DCON:
806  REAL*8 D1
807  REAL*8 E2
808  Should not be parsed as real constants!
809 */
810 
811 #ifdef FLEX_SCANNER
812 
813 /* flex incompatible way of playing with input characters:-)
814  */
815 
816 #define YY_INPUT(buf,result,max_size) \
817 { int c = PipsGetc(yyin); result = (c == EOF)? YY_NULL: (buf[0] = c, 1);}
818 
819 #else /* we're not using flex... let us assume some very peculiar lex... */
820 
821 /* the portability of the following macro makes many (:-) assumptions
822  * about lex internals hence should not be very portable...
823  * POSIX states that input cannot be redefined.
824  * the only possible posix implementation would be to refilter the
825  * file through PipsGetc and then to use a standard lex/yacc.
826  */
827 #undef input()
828 #define input() (((yytchar=yysptr>yysbuf?U(*--yysptr):PipsGetc(yyin))==10?(yylineno++,yytchar):yytchar)==EOF?0:yytchar)
829 
830 #endif /* FLEX_SCANNER */
831 
832 #include <stdlib.h>
833 #include <stdio.h>
834 
835 #include "genC.h"
836 #include "parser_private.h"
837 #include "linear.h"
838 #include "ri.h"
839 
840 #include "misc.h"
841 #include "syntax.h"
842 
843 /* yacc generated header file
844  */
845 #include "syn_yacc.h"
846 
847 /* stdlib defines abs on solaris 2 */
848 #ifdef abs
849 #undef abs
850 #endif
851 
852 static int line = 1; /* position in pseudo-file... */
853 
854 #line 855 "<stdout>"
855 
856 #line 857 "<stdout>"
857 
858 #define INITIAL 0
859 #define TYPEDECLARATION 1
860 
861 #ifndef YY_NO_UNISTD_H
862 /* Special case for "unistd.h", since it is non-ANSI. We include it way
863  * down here because we want the user's section 1 to have been scanned first.
864  * The user has a chance to override it with an option.
865  */
866 #include <unistd.h>
867 #endif
868 
869 #ifndef YY_EXTRA_TYPE
870 #define YY_EXTRA_TYPE void *
871 #endif
872 
873 static int yy_init_globals ( void );
874 
875 /* Accessor methods to globals.
876  These are made visible to non-reentrant scanners for convenience. */
877 
878 int yylex_destroy ( void );
879 
880 int yyget_debug ( void );
881 
882 void yyset_debug ( int debug_flag );
883 
884 YY_EXTRA_TYPE yyget_extra ( void );
885 
886 void yyset_extra ( YY_EXTRA_TYPE user_defined );
887 
888 FILE *yyget_in ( void );
889 
890 void yyset_in ( FILE * _in_str );
891 
892 FILE *yyget_out ( void );
893 
894 void yyset_out ( FILE * _out_str );
895 
896  int yyget_leng ( void );
897 
898 char *yyget_text ( void );
899 
900 int yyget_lineno ( void );
901 
902 void yyset_lineno ( int _line_number );
903 
904 /* Macros after this point can all be overridden by user definitions in
905  * section 1.
906  */
907 
908 #ifndef YY_SKIP_YYWRAP
909 #ifdef __cplusplus
910 extern "C" int yywrap ( void );
911 #else
912 extern int yywrap ( void );
913 #endif
914 #endif
915 
916 #ifndef YY_NO_UNPUT
917 
918  static void yyunput ( int c, char *buf_ptr );
919 
920 #endif
921 
922 #ifndef yytext_ptr
923 static void yy_flex_strncpy ( char *, const char *, int );
924 #endif
925 
926 #ifdef YY_NEED_STRLEN
927 static int yy_flex_strlen ( const char * );
928 #endif
929 
930 #ifndef YY_NO_INPUT
931 #ifdef __cplusplus
932 static int yyinput ( void );
933 #else
934 static int input ( void );
935 #endif
936 
937 #endif
938 
939 /* Amount of stuff to slurp up with each read. */
940 #ifndef YY_READ_BUF_SIZE
941 #ifdef __ia64__
942 /* On IA-64, the buffer size is 16k, not 8k */
943 #define YY_READ_BUF_SIZE 16384
944 #else
945 #define YY_READ_BUF_SIZE 8192
946 #endif /* __ia64__ */
947 #endif
948 
949 /* Copy whatever the last rule matched to the standard output. */
950 #ifndef ECHO
951 /* This used to be an fputs(), but since the string might contain NUL's,
952  * we now use fwrite().
953  */
954 #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
955 #endif
956 
957 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
958  * is returned in "result".
959  */
960 #ifndef YY_INPUT
961 #define YY_INPUT(buf,result,max_size) \
962  if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
963  { \
964  int c = '*'; \
965  int n; \
966  for ( n = 0; n < max_size && \
967  (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
968  buf[n] = (char) c; \
969  if ( c == '\n' ) \
970  buf[n++] = (char) c; \
971  if ( c == EOF && ferror( yyin ) ) \
972  YY_FATAL_ERROR( "input in flex scanner failed" ); \
973  result = n; \
974  } \
975  else \
976  { \
977  errno=0; \
978  while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
979  { \
980  if( errno != EINTR) \
981  { \
982  YY_FATAL_ERROR( "input in flex scanner failed" ); \
983  break; \
984  } \
985  errno=0; \
986  clearerr(yyin); \
987  } \
988  }\
989 \
990 
991 #endif
992 
993 /* No semi-colon after return; correct usage is to write "yyterminate();" -
994  * we don't want an extra ';' after the "return" because that will cause
995  * some compilers to complain about unreachable statements.
996  */
997 #ifndef yyterminate
998 #define yyterminate() return YY_NULL
999 #endif
1000 
1001 /* Number of entries by which start-condition stack grows. */
1002 #ifndef YY_START_STACK_INCR
1003 #define YY_START_STACK_INCR 25
1004 #endif
1005 
1006 /* Report a fatal error. */
1007 #ifndef YY_FATAL_ERROR
1008 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1009 #endif
1010 
1011 /* end tables serialization structures and prototypes */
1012 
1013 /* Default declaration of generated scanner - a define so the user can
1014  * easily add parameters.
1015  */
1016 #ifndef YY_DECL
1017 #define YY_DECL_IS_OURS 1
1018 
1019 extern int yylex (void);
1020 
1021 #define YY_DECL int yylex (void)
1022 #endif /* !YY_DECL */
1023 
1024 /* Code executed at the beginning of each rule, after yytext and yyleng
1025  * have been set up.
1026  */
1027 #ifndef YY_USER_ACTION
1028 #define YY_USER_ACTION
1029 #endif
1030 
1031 /* Code executed at the end of each rule. */
1032 #ifndef YY_BREAK
1033 #define YY_BREAK /*LINTED*/break;
1034 #endif
1035 
1036 #define YY_RULE_SETUP \
1037  YY_USER_ACTION
1038 
1039 /** The main scanner function which does all the work.
1040  */
1042 {
1043  yy_state_type yy_current_state;
1044  char *yy_cp, *yy_bp;
1045  int yy_act;
1046 
1047  if ( !(yy_init) )
1048  {
1049  (yy_init) = 1;
1050 
1051 #ifdef YY_USER_INIT
1052  YY_USER_INIT;
1053 #endif
1054 
1055  if ( ! (yy_start) )
1056  (yy_start) = 1; /* first start state */
1057 
1058  if ( ! yyin )
1059  yyin = stdin;
1060 
1061  if ( ! yyout )
1062  yyout = stdout;
1063 
1064  if ( ! YY_CURRENT_BUFFER ) {
1068  }
1069 
1071  }
1072 
1073  {
1074 #line 95 "scanner.l"
1075 
1076 #line 1077 "<stdout>"
1077 
1078  while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
1079  {
1080  yy_cp = (yy_c_buf_p);
1081 
1082  /* Support of yytext. */
1083  *yy_cp = (yy_hold_char);
1084 
1085  /* yy_bp points to the position in yy_ch_buf of the start of
1086  * the current run.
1087  */
1088  yy_bp = yy_cp;
1089 
1090  yy_current_state = (yy_start);
1091 yy_match:
1092  do
1093  {
1094  YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
1095  if ( yy_accept[yy_current_state] )
1096  {
1097  (yy_last_accepting_state) = yy_current_state;
1099  }
1100  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1101  {
1102  yy_current_state = (int) yy_def[yy_current_state];
1103  if ( yy_current_state >= 103 )
1104  yy_c = yy_meta[yy_c];
1105  }
1106  yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1107  ++yy_cp;
1108  }
1109  while ( yy_base[yy_current_state] != 163 );
1110 
1111 yy_find_action:
1112  yy_act = yy_accept[yy_current_state];
1113  if ( yy_act == 0 )
1114  { /* have to back up */
1116  yy_current_state = (yy_last_accepting_state);
1117  yy_act = yy_accept[yy_current_state];
1118  }
1119 
1121 
1122 do_action: /* This label is used only to access EOF actions. */
1123 
1124  switch ( yy_act )
1125  { /* beginning of action switch */
1126  case 0: /* must back up */
1127  /* undo the effects of YY_DO_BEFORE_ACTION */
1128  *yy_cp = (yy_hold_char);
1130  yy_current_state = (yy_last_accepting_state);
1131  goto yy_find_action;
1132 
1133 case 1:
1135 #line 96 "scanner.l"
1136 {
1137  pips_debug(9, "TK_AND\n");
1138  return(TK_AND);
1139  }
1140  YY_BREAK
1141 case 2:
1143 #line 100 "scanner.l"
1144 {
1145  pips_debug(9, "TK_INOUT\n");
1146  return(TK_INOUT);
1147  }
1148  YY_BREAK
1149 case 3:
1151 #line 104 "scanner.l"
1152 {
1153  pips_debug(9, "TK_IN\n");
1154  return(TK_IN);
1155  }
1156  YY_BREAK
1157 case 4:
1159 #line 108 "scanner.l"
1160 {
1161  pips_debug(9, "TK_OUT\n");
1162  return(TK_OUT);
1163  }
1164  YY_BREAK
1165 case 5:
1167 #line 112 "scanner.l"
1168 {
1169  pips_debug(9, "TK_EQ\n");
1170  return(TK_EQ);
1171  }
1172  YY_BREAK
1173 case 6:
1175 #line 116 "scanner.l"
1176 {
1177  pips_debug(9, "TK_EQV\n");
1178  return(TK_EQV);
1179  }
1180  YY_BREAK
1181 case 7:
1183 #line 120 "scanner.l"
1184 {
1185  pips_debug(9, "TK_GE\n");
1186  return(TK_GE);
1187  }
1188  YY_BREAK
1189 case 8:
1191 #line 124 "scanner.l"
1192 {
1193  pips_debug(9, "TK_GT\n");
1194  return(TK_GT);
1195  }
1196  YY_BREAK
1197 case 9:
1199 #line 128 "scanner.l"
1200 {
1201  pips_debug(9, "TK_LE\n");
1202  return(TK_LE);
1203  }
1204  YY_BREAK
1205 case 10:
1207 #line 132 "scanner.l"
1208 {
1209  pips_debug(9, "TK_LT\n");
1210  return(TK_LT);
1211  }
1212  YY_BREAK
1213 case 11:
1215 #line 136 "scanner.l"
1216 {
1217  pips_debug(9, "TK_NE\n");
1218  return(TK_NE);
1219  }
1220  YY_BREAK
1221 case 12:
1223 #line 140 "scanner.l"
1224 {
1225  pips_debug(9, "TK_NEQV\n");
1226  return(TK_NEQV);
1227  }
1228  YY_BREAK
1229 case 13:
1231 #line 144 "scanner.l"
1232 {
1233  pips_debug(9, "TK_NOT\n");
1234  return(TK_NOT);
1235  }
1236  YY_BREAK
1237 case 14:
1239 #line 148 "scanner.l"
1240 {
1241  pips_debug(9, "TK_OR\n");
1242  return(TK_OR);
1243  }
1244  YY_BREAK
1245 case 15:
1247 #line 152 "scanner.l"
1248 {
1249  pips_debug(9, "TK_TRUE\n");
1250  return(TK_TRUE);
1251  }
1252  YY_BREAK
1253 case 16:
1255 #line 156 "scanner.l"
1256 {
1257  pips_debug(9, "TK_FALSE\n");
1258  return(TK_FALSE);
1259  }
1260  YY_BREAK
1261 case 17:
1263 #line 161 "scanner.l"
1264 {
1265  int tv = IsCapKeyword(yytext);
1266  if (tv == TK_FORMAT) {
1267  char * s = FormatValue;
1268  while ((*s++ = input()) != '\n') ;
1269  unput('\n');
1270  *(s-1) = '\0';
1271  }
1272 
1273  switch(tv) {
1274  case TK_CHARACTER:
1275  case TK_COMPLEX:
1276  case TK_INTEGER:
1277  case TK_LOGICAL:
1278  case TK_REAL:
1280  }
1281 
1282  pips_debug(9, "TK_KEYWORD %s %u %d\n",
1283  yytext, (unsigned int) yyleng, tv);
1284  return(tv);
1285  }
1286  YY_BREAK
1287 case 18:
1289 #line 184 "scanner.l"
1290 {
1291  pips_debug(9, "TK_NAME %s %u\n", yytext, (unsigned int) yyleng);
1293  BEGIN INITIAL;
1294  return(TK_NAME);
1295  }
1296  YY_BREAK
1297 case 19:
1299 #line 191 "scanner.l"
1300 {
1301  pips_debug(9, "TK_ICON %s %u\n", yytext, (unsigned int) yyleng);
1303  return(TK_ICON);
1304 }
1305  YY_BREAK
1306 case 20:
1308 #line 197 "scanner.l"
1309 {
1310  pips_debug(9, "TK_RCON %s %u\n", yytext, (unsigned int) yyleng);
1312  return(TK_RCON);
1313 }
1314  YY_BREAK
1315 case 21:
1317 #line 203 "scanner.l"
1318 {
1319  pips_debug(9, "TK_DCON %s %u\n", yytext, (unsigned int) yyleng);
1321  return(TK_DCON);
1322 }
1323  YY_BREAK
1324 case 22:
1325 /* rule 22 can match eol */
1327 #line 209 "scanner.l"
1328 {
1329  pips_debug(9, "TK_SCON %s %u\n", yytext, (unsigned int) yyleng);
1331  return(TK_SCON);
1332 }
1333  YY_BREAK
1334 case 23:
1335 /* rule 23 can match eol */
1337 #line 215 "scanner.l"
1338 {
1339  pips_debug(9, "TK_SCON %s %u\n", yytext, (unsigned int) yyleng);
1341  return(TK_SCON);
1342 }
1343  YY_BREAK
1344 case 24:
1346 #line 221 "scanner.l"
1347 {
1348  pips_debug(9, "TK_MINUS\n");
1349  return(TK_MINUS);
1350  }
1351  YY_BREAK
1352 case 25:
1354 #line 225 "scanner.l"
1355 {
1356  pips_debug(9, "TK_PLUS\n");
1357  return(TK_PLUS);
1358  }
1359  YY_BREAK
1360 case 26:
1362 #line 229 "scanner.l"
1363 {
1364  pips_debug(9, "TK_SLASH\n");
1365  return(TK_SLASH);
1366  }
1367  YY_BREAK
1368 case 27:
1370 #line 233 "scanner.l"
1371 {
1372  pips_debug(9, "TK_POWER\n");
1373  return(TK_POWER);
1374  }
1375  YY_BREAK
1376 case 28:
1378 #line 237 "scanner.l"
1379 {
1380  pips_debug(9, "TK_STAR\n");
1381  return(TK_STAR);
1382  }
1383  YY_BREAK
1384 case 29:
1386 #line 241 "scanner.l"
1387 {
1388  pips_debug(9, "TK_LPAR\n");
1389  return(TK_LPAR);
1390  }
1391  YY_BREAK
1392 case 30:
1394 #line 245 "scanner.l"
1395 {
1396  pips_debug(9, "TK_RPAR\n");
1397  return(TK_RPAR);
1398  }
1399  YY_BREAK
1400 case 31:
1402 #line 249 "scanner.l"
1403 {
1404  pips_debug(9, "TK_COMMA\n");
1405  return(TK_COMMA);
1406  }
1407  YY_BREAK
1408 case 32:
1410 #line 253 "scanner.l"
1411 {
1412  pips_debug(9, "TK_COLON\n");
1413  return(TK_COLON);
1414  }
1415  YY_BREAK
1416 case 33:
1418 #line 257 "scanner.l"
1419 {
1420  pips_debug(9, "TK_EQUALS\n");
1421  return(TK_EQUALS);
1422  }
1423  YY_BREAK
1424 case 34:
1426 #line 261 "scanner.l"
1427 {
1428  pips_debug(9, "TK_CURRENCY\n");
1429  return(TK_CURRENCY);
1430  }
1431  YY_BREAK
1432 case 35:
1434 #line 265 "scanner.l"
1435 {
1436  pips_debug(9, "TK_CONCAT\n");
1437  return(TK_CONCAT);
1438  }
1439  YY_BREAK
1440 case 36:
1441 /* rule 36 can match eol */
1443 #line 269 "scanner.l"
1444 { line++;
1445  BEGIN INITIAL;
1446  pips_debug(9, "TK_EOS\n");
1447  return(TK_EOS);
1448  }
1449  YY_BREAK
1450 case 37:
1452 #line 274 "scanner.l"
1453 {
1454  /* Ignore carriage return from VMS and Microsoft and Apple?
1455  * Not here! It must have been done earlier in the processing.
1456  */
1457  pips_user_warning("illegal character \"%c\" (hexadecimal %#04x)\n",
1458  yytext[0], yytext[0]);
1459  ParserError("Lexical Analysis",
1460  "Check standard Fortran character set.\n");
1461  }
1462  YY_BREAK
1463 case 38:
1465 #line 283 "scanner.l"
1466 ECHO;
1467  YY_BREAK
1468 #line 1469 "<stdout>"
1469 case YY_STATE_EOF(INITIAL):
1471  yyterminate();
1472 
1473  case YY_END_OF_BUFFER:
1474  {
1475  /* Amount of text matched not including the EOB char. */
1476  int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1477 
1478  /* Undo the effects of YY_DO_BEFORE_ACTION. */
1479  *yy_cp = (yy_hold_char);
1481 
1482  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1483  {
1484  /* We're scanning a new file or input source. It's
1485  * possible that this happened because the user
1486  * just pointed yyin at a new source and called
1487  * yylex(). If so, then we have to assure
1488  * consistency between YY_CURRENT_BUFFER and our
1489  * globals. Here is the right place to do so, because
1490  * this is the first action (other than possibly a
1491  * back-up) that will match for the new input source.
1492  */
1493  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1494  YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1495  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1496  }
1497 
1498  /* Note that here we test for yy_c_buf_p "<=" to the position
1499  * of the first EOB in the buffer, since yy_c_buf_p will
1500  * already have been incremented past the NUL character
1501  * (since all states make transitions on EOB to the
1502  * end-of-buffer state). Contrast this with the test
1503  * in input().
1504  */
1505  if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1506  { /* This was really a NUL. */
1507  yy_state_type yy_next_state;
1508 
1509  (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1510 
1511  yy_current_state = yy_get_previous_state( );
1512 
1513  /* Okay, we're now positioned to make the NUL
1514  * transition. We couldn't have
1515  * yy_get_previous_state() go ahead and do it
1516  * for us because it doesn't know how to deal
1517  * with the possibility of jamming (and we don't
1518  * want to build jamming into it because then it
1519  * will run more slowly).
1520  */
1521 
1522  yy_next_state = yy_try_NUL_trans( yy_current_state );
1523 
1525 
1526  if ( yy_next_state )
1527  {
1528  /* Consume the NUL. */
1529  yy_cp = ++(yy_c_buf_p);
1530  yy_current_state = yy_next_state;
1531  goto yy_match;
1532  }
1533 
1534  else
1535  {
1536  yy_cp = (yy_c_buf_p);
1537  goto yy_find_action;
1538  }
1539  }
1540 
1541  else switch ( yy_get_next_buffer( ) )
1542  {
1543  case EOB_ACT_END_OF_FILE:
1544  {
1546 
1547  if ( yywrap( ) )
1548  {
1549  /* Note: because we've taken care in
1550  * yy_get_next_buffer() to have set up
1551  * yytext, we can now set up
1552  * yy_c_buf_p so that if some total
1553  * hoser (like flex itself) wants to
1554  * call the scanner after we return the
1555  * YY_NULL, it'll still work - another
1556  * YY_NULL will get returned.
1557  */
1559 
1561  goto do_action;
1562  }
1563 
1564  else
1565  {
1566  if ( ! (yy_did_buffer_switch_on_eof) )
1567  YY_NEW_FILE;
1568  }
1569  break;
1570  }
1571 
1572  case EOB_ACT_CONTINUE_SCAN:
1573  (yy_c_buf_p) =
1574  (yytext_ptr) + yy_amount_of_matched_text;
1575 
1576  yy_current_state = yy_get_previous_state( );
1577 
1578  yy_cp = (yy_c_buf_p);
1580  goto yy_match;
1581 
1582  case EOB_ACT_LAST_MATCH:
1583  (yy_c_buf_p) =
1584  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1585 
1586  yy_current_state = yy_get_previous_state( );
1587 
1588  yy_cp = (yy_c_buf_p);
1590  goto yy_find_action;
1591  }
1592  break;
1593  }
1594 
1595  default:
1597  "fatal flex scanner internal error--no action found" );
1598  } /* end of action switch */
1599  } /* end of scanning one token */
1600  } /* end of user's declarations */
1601 } /* end of yylex */
1602 
1603 /* yy_get_next_buffer - try to read in a new buffer
1604  *
1605  * Returns a code representing an action:
1606  * EOB_ACT_LAST_MATCH -
1607  * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1608  * EOB_ACT_END_OF_FILE - end of file
1609  */
1610 static int yy_get_next_buffer (void)
1611 {
1612  char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1613  char *source = (yytext_ptr);
1614  int number_to_move, i;
1615  int ret_val;
1616 
1617  if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1619  "fatal flex scanner internal error--end of buffer missed" );
1620 
1621  if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1622  { /* Don't try to fill the buffer, so this is an EOF. */
1623  if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1624  {
1625  /* We matched a single character, the EOB, so
1626  * treat this as a final EOF.
1627  */
1628  return EOB_ACT_END_OF_FILE;
1629  }
1630 
1631  else
1632  {
1633  /* We matched some text prior to the EOB, first
1634  * process it.
1635  */
1636  return EOB_ACT_LAST_MATCH;
1637  }
1638  }
1639 
1640  /* Try to read more data. */
1641 
1642  /* First move last chars to start of buffer. */
1643  number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
1644 
1645  for ( i = 0; i < number_to_move; ++i )
1646  *(dest++) = *(source++);
1647 
1648  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1649  /* don't do the read, it's not guaranteed to return an EOF,
1650  * just force an EOF
1651  */
1652  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1653 
1654  else
1655  {
1656  int num_to_read =
1657  YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1658 
1659  while ( num_to_read <= 0 )
1660  { /* Not enough room in the buffer - grow it. */
1661 
1662  /* just a shorter name for the current buffer */
1664 
1665  int yy_c_buf_p_offset =
1666  (int) ((yy_c_buf_p) - b->yy_ch_buf);
1667 
1668  if ( b->yy_is_our_buffer )
1669  {
1670  int new_size = b->yy_buf_size * 2;
1671 
1672  if ( new_size <= 0 )
1673  b->yy_buf_size += b->yy_buf_size / 8;
1674  else
1675  b->yy_buf_size *= 2;
1676 
1677  b->yy_ch_buf = (char *)
1678  /* Include room in for 2 EOB chars. */
1679  yyrealloc( (void *) b->yy_ch_buf,
1680  (yy_size_t) (b->yy_buf_size + 2) );
1681  }
1682  else
1683  /* Can't grow it, we don't own it. */
1684  b->yy_ch_buf = NULL;
1685 
1686  if ( ! b->yy_ch_buf )
1688  "fatal error - scanner input buffer overflow" );
1689 
1690  (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1691 
1692  num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1693  number_to_move - 1;
1694 
1695  }
1696 
1697  if ( num_to_read > YY_READ_BUF_SIZE )
1698  num_to_read = YY_READ_BUF_SIZE;
1699 
1700  /* Read in more data. */
1701  YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1702  (yy_n_chars), num_to_read );
1703 
1704  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1705  }
1706 
1707  if ( (yy_n_chars) == 0 )
1708  {
1709  if ( number_to_move == YY_MORE_ADJ )
1710  {
1711  ret_val = EOB_ACT_END_OF_FILE;
1712  yyrestart( yyin );
1713  }
1714 
1715  else
1716  {
1717  ret_val = EOB_ACT_LAST_MATCH;
1718  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1720  }
1721  }
1722 
1723  else
1724  ret_val = EOB_ACT_CONTINUE_SCAN;
1725 
1726  if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1727  /* Extend the array by 50%, plus the number we really need. */
1728  int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1729  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
1730  (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
1731  if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1732  YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1733  /* "- 2" to take care of EOB's */
1734  YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
1735  }
1736 
1737  (yy_n_chars) += number_to_move;
1740 
1741  (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1742 
1743  return ret_val;
1744 }
1745 
1746 /* yy_get_previous_state - get the state just before the EOB char was reached */
1747 
1748  static yy_state_type yy_get_previous_state (void)
1749 {
1750  yy_state_type yy_current_state;
1751  char *yy_cp;
1752 
1753  yy_current_state = (yy_start);
1754 
1755  for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1756  {
1757  YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1758  if ( yy_accept[yy_current_state] )
1759  {
1760  (yy_last_accepting_state) = yy_current_state;
1762  }
1763  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1764  {
1765  yy_current_state = (int) yy_def[yy_current_state];
1766  if ( yy_current_state >= 103 )
1767  yy_c = yy_meta[yy_c];
1768  }
1769  yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1770  }
1771 
1772  return yy_current_state;
1773 }
1774 
1775 /* yy_try_NUL_trans - try to make a transition on the NUL character
1776  *
1777  * synopsis
1778  * next_state = yy_try_NUL_trans( current_state );
1779  */
1780  static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1781 {
1782  int yy_is_jam;
1783  char *yy_cp = (yy_c_buf_p);
1784 
1785  YY_CHAR yy_c = 1;
1786  if ( yy_accept[yy_current_state] )
1787  {
1788  (yy_last_accepting_state) = yy_current_state;
1790  }
1791  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1792  {
1793  yy_current_state = (int) yy_def[yy_current_state];
1794  if ( yy_current_state >= 103 )
1795  yy_c = yy_meta[yy_c];
1796  }
1797  yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1798  yy_is_jam = (yy_current_state == 102);
1799 
1800  return yy_is_jam ? 0 : yy_current_state;
1801 }
1802 
1803 #ifndef YY_NO_UNPUT
1804 
1805  static void yyunput (int c, char * yy_bp )
1806 {
1807  char *yy_cp;
1808 
1809  yy_cp = (yy_c_buf_p);
1810 
1811  /* undo effects of setting up yytext */
1812  *yy_cp = (yy_hold_char);
1813 
1814  if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1815  { /* need to shift things up to make room */
1816  /* +2 for EOB chars. */
1817  int number_to_move = (yy_n_chars) + 2;
1818  char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1819  YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1820  char *source =
1821  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1822 
1823  while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1824  *--dest = *--source;
1825 
1826  yy_cp += (int) (dest - source);
1827  yy_bp += (int) (dest - source);
1828  YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1829  (yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1830 
1831  if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1832  YY_FATAL_ERROR( "flex scanner push-back overflow" );
1833  }
1834 
1835  *--yy_cp = (char) c;
1836 
1837  (yytext_ptr) = yy_bp;
1838  (yy_hold_char) = *yy_cp;
1839  (yy_c_buf_p) = yy_cp;
1840 }
1841 
1842 #endif
1843 
1844 #ifndef YY_NO_INPUT
1845 #ifdef __cplusplus
1846  static int yyinput (void)
1847 #else
1848  static int input (void)
1849 #endif
1850 
1851 {
1852  int c;
1853 
1854  *(yy_c_buf_p) = (yy_hold_char);
1855 
1856  if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1857  {
1858  /* yy_c_buf_p now points to the character we want to return.
1859  * If this occurs *before* the EOB characters, then it's a
1860  * valid NUL; if not, then we've hit the end of the buffer.
1861  */
1862  if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1863  /* This was really a NUL. */
1864  *(yy_c_buf_p) = '\0';
1865 
1866  else
1867  { /* need more input */
1868  int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
1869  ++(yy_c_buf_p);
1870 
1871  switch ( yy_get_next_buffer( ) )
1872  {
1873  case EOB_ACT_LAST_MATCH:
1874  /* This happens because yy_g_n_b()
1875  * sees that we've accumulated a
1876  * token and flags that we need to
1877  * try matching the token before
1878  * proceeding. But for input(),
1879  * there's no matching to consider.
1880  * So convert the EOB_ACT_LAST_MATCH
1881  * to EOB_ACT_END_OF_FILE.
1882  */
1883 
1884  /* Reset buffer status. */
1885  yyrestart( yyin );
1886 
1887  /*FALLTHROUGH*/
1888 
1889  case EOB_ACT_END_OF_FILE:
1890  {
1891  if ( yywrap( ) )
1892  return 0;
1893 
1894  if ( ! (yy_did_buffer_switch_on_eof) )
1895  YY_NEW_FILE;
1896 #ifdef __cplusplus
1897  return yyinput();
1898 #else
1899  return input();
1900 #endif
1901  }
1902 
1903  case EOB_ACT_CONTINUE_SCAN:
1904  (yy_c_buf_p) = (yytext_ptr) + offset;
1905  break;
1906  }
1907  }
1908  }
1909 
1910  c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1911  *(yy_c_buf_p) = '\0'; /* preserve yytext */
1912  (yy_hold_char) = *++(yy_c_buf_p);
1913 
1914  return c;
1915 }
1916 #endif /* ifndef YY_NO_INPUT */
1917 
1918 /** Immediately switch to a different input stream.
1919  * @param input_file A readable stream.
1920  *
1921  * @note This function does not reset the start condition to @c INITIAL .
1922  */
1923  void yyrestart (FILE * input_file )
1924 {
1925 
1926  if ( ! YY_CURRENT_BUFFER ){
1930  }
1931 
1932  yy_init_buffer( YY_CURRENT_BUFFER, input_file );
1934 }
1935 
1936 /** Switch to a different input buffer.
1937  * @param new_buffer The new input buffer.
1938  *
1939  */
1940  void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
1941 {
1942 
1943  /* TODO. We should be able to replace this entire function body
1944  * with
1945  * yypop_buffer_state();
1946  * yypush_buffer_state(new_buffer);
1947  */
1949  if ( YY_CURRENT_BUFFER == new_buffer )
1950  return;
1951 
1952  if ( YY_CURRENT_BUFFER )
1953  {
1954  /* Flush out information for old buffer. */
1955  *(yy_c_buf_p) = (yy_hold_char);
1956  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1957  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1958  }
1959 
1960  YY_CURRENT_BUFFER_LVALUE = new_buffer;
1962 
1963  /* We don't actually know whether we did this switch during
1964  * EOF (yywrap()) processing, but the only time this flag
1965  * is looked at is after yywrap() is called, so it's safe
1966  * to go ahead and always set it.
1967  */
1969 }
1970 
1971 static void yy_load_buffer_state (void)
1972 {
1973  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1974  (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1975  yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1976  (yy_hold_char) = *(yy_c_buf_p);
1977 }
1978 
1979 /** Allocate and initialize an input buffer state.
1980  * @param file A readable stream.
1981  * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1982  *
1983  * @return the allocated buffer state.
1984  */
1985  YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
1986 {
1987  YY_BUFFER_STATE b;
1988 
1989  b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
1990  if ( ! b )
1991  YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1992 
1993  b->yy_buf_size = size;
1994 
1995  /* yy_ch_buf has to be 2 characters longer than the size given because
1996  * we need to put in 2 end-of-buffer characters.
1997  */
1998  b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
1999  if ( ! b->yy_ch_buf )
2000  YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2001 
2002  b->yy_is_our_buffer = 1;
2003 
2004  yy_init_buffer( b, file );
2005 
2006  return b;
2007 }
2008 
2009 /** Destroy the buffer.
2010  * @param b a buffer created with yy_create_buffer()
2011  *
2012  */
2014 {
2015 
2016  if ( ! b )
2017  return;
2018 
2019  if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2021 
2022  if ( b->yy_is_our_buffer )
2023  yyfree( (void *) b->yy_ch_buf );
2024 
2025  yyfree( (void *) b );
2026 }
2027 
2028 /* Initializes or reinitializes a buffer.
2029  * This function is sometimes called more than once on the same buffer,
2030  * such as during a yyrestart() or at EOF.
2031  */
2032  static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
2033 
2034 {
2035  int oerrno = errno;
2036 
2037  yy_flush_buffer( b );
2038 
2039  b->yy_input_file = file;
2040  b->yy_fill_buffer = 1;
2041 
2042  /* If b is the current buffer, then yy_init_buffer was _probably_
2043  * called from yyrestart() or through yy_get_next_buffer.
2044  * In that case, we don't want to reset the lineno or column.
2045  */
2046  if (b != YY_CURRENT_BUFFER){
2047  b->yy_bs_lineno = 1;
2048  b->yy_bs_column = 0;
2049  }
2050 
2051  b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2052 
2053  errno = oerrno;
2054 }
2055 
2056 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2057  * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2058  *
2059  */
2061 {
2062  if ( ! b )
2063  return;
2064 
2065  b->yy_n_chars = 0;
2066 
2067  /* We always need two end-of-buffer characters. The first causes
2068  * a transition to the end-of-buffer state. The second causes
2069  * a jam in that state.
2070  */
2073 
2074  b->yy_buf_pos = &b->yy_ch_buf[0];
2075 
2076  b->yy_at_bol = 1;
2078 
2079  if ( b == YY_CURRENT_BUFFER )
2081 }
2082 
2083 /** Pushes the new state onto the stack. The new state becomes
2084  * the current state. This function will allocate the stack
2085  * if necessary.
2086  * @param new_buffer The new state.
2087  *
2088  */
2089 void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
2090 {
2091  if (new_buffer == NULL)
2092  return;
2093 
2095 
2096  /* This block is copied from yy_switch_to_buffer. */
2097  if ( YY_CURRENT_BUFFER )
2098  {
2099  /* Flush out information for old buffer. */
2100  *(yy_c_buf_p) = (yy_hold_char);
2101  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2102  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2103  }
2104 
2105  /* Only push if top exists. Otherwise, replace top. */
2106  if (YY_CURRENT_BUFFER)
2107  (yy_buffer_stack_top)++;
2108  YY_CURRENT_BUFFER_LVALUE = new_buffer;
2109 
2110  /* copied from yy_switch_to_buffer. */
2113 }
2114 
2115 /** Removes and deletes the top of the stack, if present.
2116  * The next element becomes the new top.
2117  *
2118  */
2119 void yypop_buffer_state (void)
2120 {
2121  if (!YY_CURRENT_BUFFER)
2122  return;
2123 
2125  YY_CURRENT_BUFFER_LVALUE = NULL;
2126  if ((yy_buffer_stack_top) > 0)
2127  --(yy_buffer_stack_top);
2128 
2129  if (YY_CURRENT_BUFFER) {
2132  }
2133 }
2134 
2135 /* Allocates the stack if it does not exist.
2136  * Guarantees space for at least one push.
2137  */
2138 static void yyensure_buffer_stack (void)
2139 {
2140  yy_size_t num_to_alloc;
2141 
2142  if (!(yy_buffer_stack)) {
2143 
2144  /* First allocation is just for 2 elements, since we don't know if this
2145  * scanner will even need a stack. We use 2 instead of 1 to avoid an
2146  * immediate realloc on the next call.
2147  */
2148  num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
2150  (num_to_alloc * sizeof(struct yy_buffer_state*)
2151  );
2152  if ( ! (yy_buffer_stack) )
2153  YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2154 
2155  memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2156 
2157  (yy_buffer_stack_max) = num_to_alloc;
2158  (yy_buffer_stack_top) = 0;
2159  return;
2160  }
2161 
2162  if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
2163 
2164  /* Increase the buffer to prepare for a possible push. */
2165  yy_size_t grow_size = 8 /* arbitrary grow size */;
2166 
2167  num_to_alloc = (yy_buffer_stack_max) + grow_size;
2169  ((yy_buffer_stack),
2170  num_to_alloc * sizeof(struct yy_buffer_state*)
2171  );
2172  if ( ! (yy_buffer_stack) )
2173  YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2174 
2175  /* zero only the new slots.*/
2176  memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
2177  (yy_buffer_stack_max) = num_to_alloc;
2178  }
2179 }
2180 
2181 /** Setup the input buffer state to scan directly from a user-specified character buffer.
2182  * @param base the character buffer
2183  * @param size the size in bytes of the character buffer
2184  *
2185  * @return the newly allocated buffer state object.
2186  */
2188 {
2189  YY_BUFFER_STATE b;
2190 
2191  if ( size < 2 ||
2192  base[size-2] != YY_END_OF_BUFFER_CHAR ||
2193  base[size-1] != YY_END_OF_BUFFER_CHAR )
2194  /* They forgot to leave room for the EOB's. */
2195  return NULL;
2196 
2197  b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
2198  if ( ! b )
2199  YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2200 
2201  b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
2202  b->yy_buf_pos = b->yy_ch_buf = base;
2203  b->yy_is_our_buffer = 0;
2204  b->yy_input_file = NULL;
2205  b->yy_n_chars = b->yy_buf_size;
2206  b->yy_is_interactive = 0;
2207  b->yy_at_bol = 1;
2208  b->yy_fill_buffer = 0;
2210 
2211  yy_switch_to_buffer( b );
2212 
2213  return b;
2214 }
2215 
2216 /** Setup the input buffer state to scan a string. The next call to yylex() will
2217  * scan from a @e copy of @a str.
2218  * @param yystr a NUL-terminated string to scan
2219  *
2220  * @return the newly allocated buffer state object.
2221  * @note If you want to scan bytes that may contain NUL values, then use
2222  * yy_scan_bytes() instead.
2223  */
2224 YY_BUFFER_STATE yy_scan_string (const char * yystr )
2225 {
2226 
2227  return yy_scan_bytes( yystr, (int) strlen(yystr) );
2228 }
2229 
2230 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
2231  * scan from a @e copy of @a bytes.
2232  * @param yybytes the byte buffer to scan
2233  * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
2234  *
2235  * @return the newly allocated buffer state object.
2236  */
2237 YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
2238 {
2239  YY_BUFFER_STATE b;
2240  char *buf;
2241  yy_size_t n;
2242  int i;
2243 
2244  /* Get memory for full buffer, including space for trailing EOB's. */
2245  n = (yy_size_t) (_yybytes_len + 2);
2246  buf = (char *) yyalloc( n );
2247  if ( ! buf )
2248  YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2249 
2250  for ( i = 0; i < _yybytes_len; ++i )
2251  buf[i] = yybytes[i];
2252 
2253  buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2254 
2255  b = yy_scan_buffer( buf, n );
2256  if ( ! b )
2257  YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2258 
2259  /* It's okay to grow etc. this buffer, and we should throw it
2260  * away when we're done.
2261  */
2262  b->yy_is_our_buffer = 1;
2263 
2264  return b;
2265 }
2266 
2267 #ifndef YY_EXIT_FAILURE
2268 #define YY_EXIT_FAILURE 2
2269 #endif
2270 
2271 static void yynoreturn yy_fatal_error (const char* msg )
2272 {
2273  fprintf( stderr, "%s\n", msg );
2274  exit( YY_EXIT_FAILURE );
2275 }
2276 
2277 /* Redefine yyless() so it works in section 3 code. */
2278 
2279 #undef yyless
2280 #define yyless(n) \
2281  do \
2282  { \
2283  /* Undo effects of setting up yytext. */ \
2284  int yyless_macro_arg = (n); \
2285  YY_LESS_LINENO(yyless_macro_arg);\
2286  yytext[yyleng] = (yy_hold_char); \
2287  (yy_c_buf_p) = yytext + yyless_macro_arg; \
2288  (yy_hold_char) = *(yy_c_buf_p); \
2289  *(yy_c_buf_p) = '\0'; \
2290  yyleng = yyless_macro_arg; \
2291  } \
2292  while ( 0 )
2293 
2294 /* Accessor methods (get/set functions) to struct members. */
2295 
2296 /** Get the current line number.
2297  *
2298  */
2299 int yyget_lineno (void)
2300 {
2301 
2302  return yylineno;
2303 }
2304 
2305 /** Get the input stream.
2306  *
2307  */
2308 FILE *yyget_in (void)
2309 {
2310  return yyin;
2311 }
2312 
2313 /** Get the output stream.
2314  *
2315  */
2316 FILE *yyget_out (void)
2317 {
2318  return yyout;
2319 }
2320 
2321 /** Get the length of the current token.
2322  *
2323  */
2324 int yyget_leng (void)
2325 {
2326  return yyleng;
2327 }
2328 
2329 /** Get the current token.
2330  *
2331  */
2332 
2333 char *yyget_text (void)
2334 {
2335  return yytext;
2336 }
2337 
2338 /** Set the current line number.
2339  * @param _line_number line number
2340  *
2341  */
2342 void yyset_lineno (int _line_number )
2343 {
2344 
2345  yylineno = _line_number;
2346 }
2347 
2348 /** Set the input stream. This does not discard the current
2349  * input buffer.
2350  * @param _in_str A readable stream.
2351  *
2352  * @see yy_switch_to_buffer
2353  */
2354 void yyset_in (FILE * _in_str )
2355 {
2356  yyin = _in_str ;
2357 }
2358 
2359 void yyset_out (FILE * _out_str )
2360 {
2361  yyout = _out_str ;
2362 }
2363 
2364 int yyget_debug (void)
2365 {
2366  return yy_flex_debug;
2367 }
2368 
2369 void yyset_debug (int _bdebug )
2370 {
2371  yy_flex_debug = _bdebug ;
2372 }
2373 
2374 static int yy_init_globals (void)
2375 {
2376  /* Initialization is the same as for the non-reentrant scanner.
2377  * This function is called from yylex_destroy(), so don't allocate here.
2378  */
2379 
2380  (yy_buffer_stack) = NULL;
2381  (yy_buffer_stack_top) = 0;
2382  (yy_buffer_stack_max) = 0;
2383  (yy_c_buf_p) = NULL;
2384  (yy_init) = 0;
2385  (yy_start) = 0;
2386 
2387 /* Defined in main.c */
2388 #ifdef YY_STDINIT
2389  yyin = stdin;
2390  yyout = stdout;
2391 #else
2392  yyin = NULL;
2393  yyout = NULL;
2394 #endif
2395 
2396  /* For future reference: Set errno on error, since we are called by
2397  * yylex_init()
2398  */
2399  return 0;
2400 }
2401 
2402 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
2403 int yylex_destroy (void)
2404 {
2405 
2406  /* Pop the buffer stack, destroying each element. */
2407  while(YY_CURRENT_BUFFER){
2409  YY_CURRENT_BUFFER_LVALUE = NULL;
2411  }
2412 
2413  /* Destroy the stack itself. */
2414  yyfree((yy_buffer_stack) );
2415  (yy_buffer_stack) = NULL;
2416 
2417  /* Reset the globals. This is important in a non-reentrant scanner so the next time
2418  * yylex() is called, initialization will occur. */
2419  yy_init_globals( );
2420 
2421  return 0;
2422 }
2423 
2424 /*
2425  * Internal utility routines.
2426  */
2427 
2428 #ifndef yytext_ptr
2429 static void yy_flex_strncpy (char* s1, const char * s2, int n )
2430 {
2431 
2432  int i;
2433  for ( i = 0; i < n; ++i )
2434  s1[i] = s2[i];
2435 }
2436 #endif
2437 
2438 #ifdef YY_NEED_STRLEN
2439 static int yy_flex_strlen (const char * s )
2440 {
2441  int n;
2442  for ( n = 0; s[n]; ++n )
2443  ;
2444 
2445  return n;
2446 }
2447 #endif
2448 
2449 void *yyalloc (yy_size_t size )
2450 {
2451  return malloc(size);
2452 }
2453 
2454 void *yyrealloc (void * ptr, yy_size_t size )
2455 {
2456 
2457  /* The cast to (char *) in the following accommodates both
2458  * implementations that use char* generic pointers, and those
2459  * that use void* generic pointers. It works with the latter
2460  * because both ANSI C and C++ allow castless assignment from
2461  * any pointer type to void*, and deal with argument conversions
2462  * as though doing an assignment.
2463  */
2464  return realloc(ptr, size);
2465 }
2466 
2467 void yyfree (void * ptr )
2468 {
2469  free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
2470 }
2471 
2472 #define YYTABLES_NAME "yytables"
2473 
2474 #line 283 "scanner.l"
2475 
2476 
2477 void syn_error(const char * msg)
2478 {
2479  int c;
2480 
2481  /* Do not use pips_user_warning() to avoid portability issues */
2482 
2483  user_warning("syn_error", "Syntax error - %s line %d near \"%s\"\n",
2484  msg, line, yytext);
2485 
2486  /* what does it mean? */
2487  user_warning("syn_error", "Non analyzed source text stored in logfile\n");
2488 
2489  while ((c = getc(yyin)) != EOF)
2490  putc(c, stderr);
2491 
2492  /* pas de recouvrement d'erreurs */
2493  ParserError("syn_error", "Syntax error\n");
2494 }
2495 
2496 void syn_reset_lex(void)
2497 {
2498  line = 0;
2499 #ifdef FLEX_SCANNER
2500  syn_restart(yyin);
2501 #else
2502  /* reset lex... Might be better to read the whole file?
2503  */
2504  syn_sptr = syn_sbuf;
2505 # define MMNEWLINE 10
2506  syn_previous = MMNEWLINE;
2507 #endif
2508 }
2509 
2510 /* end of it */
2511 
void const char const char const int
bdt base
Current expression.
Definition: bdt_read_paf.c:100
static Value offset
Definition: translation.c:283
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 *)
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 pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
Definition: misc-local.h:145
#define pips_user_warning
Definition: misc-local.h:146
#define exit(code)
Definition: misc-local.h:54
#define user_warning(fn,...)
Definition: misc-local.h:262
int IsCapKeyword(char *s)
Fonction appelee par sslex sur la reduction de la regle de reconnaissance des mot clefs.
Definition: reader.c:515
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
char * strdup()
#define yy_load_buffer_state
Definition: scanner.c:15
#define YY_NEW_FILE
Special action meaning "start processing a new file".
Definition: scanner.c:386
#define yyset_extra
Definition: scanner.c:164
static const flex_int16_t yy_base[107]
Definition: scanner.c:678
#define yytext
Definition: scanner.c:27
unsigned char flex_uint8_t
Definition: scanner.c:312
#define yyset_lineno
Definition: scanner.c:212
static char yy_hold_char
yy_hold_char holds the character lost when yytext is formed.
Definition: scanner.c:527
static int input(void)
static yy_state_type yy_last_accepting_state
Definition: scanner.c:762
#define yyrestart
Definition: scanner.c:26
#define yyset_debug
Definition: scanner.c:152
static void yyunput(int c, char *buf_ptr)
static void yynoreturn yy_fatal_error(const char *msg)
#define YY_EXTRA_TYPE
Special case for "unistd.h", since it is non-ANSI.
Definition: scanner.c:870
static const YY_CHAR yy_meta[37]
Definition: scanner.c:670
static int yy_start
whether we need to initialize
Definition: scanner.c:534
short int flex_int16_t
Definition: scanner.c:310
#define yy_flex_debug
Definition: scanner.c:20
#define yyget_out
Definition: scanner.c:182
static YY_BUFFER_STATE * yy_buffer_stack
Stack as an array.
Definition: scanner.c:510
unsigned int flex_uint32_t
Definition: scanner.c:314
static int yy_get_next_buffer(void)
#define yy_scan_bytes
Definition: scanner.c:12
#define YY_BREAK
Code executed at the end of each rule.
Definition: scanner.c:1033
static int line
FLEX_SCANNER.
Definition: scanner.c:852
static size_t yy_buffer_stack_max
capacity of stack.
Definition: scanner.c:509
#define unput(c)
Definition: scanner.c:440
#define yynoreturn
Definition: scanner.c:361
static yy_state_type yy_try_NUL_trans(yy_state_type current_state)
#define yyget_debug
Definition: scanner.c:146
int yy_act
Definition: scanner.c:1045
#define yypush_buffer_state
Definition: scanner.c:17
#define TYPEDECLARATION
Definition: scanner.c:859
struct yy_buffer_state * YY_BUFFER_STATE
Definition: scanner.c:408
#define yyfree
Definition: scanner.c:31
#define yyout
Definition: scanner.c:25
#define YY_BUFFER_NEW
Definition: scanner.c:490
#define yyget_lineno
Definition: scanner.c:206
#define yylex
Definition: scanner.c:23
#define YY_RESTORE_YY_MORE_OFFSET
Definition: scanner.c:774
static int yy_did_buffer_switch_on_eof
start state number
Definition: scanner.c:539
static int yy_init_globals(void)
#define yyget_text
Definition: scanner.c:200
#define YY_BUFFER_NORMAL
Definition: scanner.c:491
char * yy_cp
Definition: scanner.c:1044
#define yyensure_buffer_stack
Definition: scanner.c:19
static const flex_int16_t yy_accept[103]
Definition: scanner.c:622
#define yy_scan_buffer
Definition: scanner.c:10
#define YY_MORE_ADJ
Definition: scanner.c:773
#define YY_RULE_SETUP
Definition: scanner.c:1036
#define yy_scan_string
Definition: scanner.c:11
static const flex_int16_t yy_def[107]
Definition: scanner.c:694
#define yytext_ptr
Definition: scanner.c:597
signed char flex_int8_t
C99 systems have <inttypes.h>.
Definition: scanner.c:309
#define yyget_leng
Definition: scanner.c:194
#define EOB_ACT_END_OF_FILE
Definition: scanner.c:421
#define yyalloc
Definition: scanner.c:29
#define yypop_buffer_state
Definition: scanner.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: scanner.c:524
int flex_int32_t
Definition: scanner.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: scanner.c:381
#define yy_switch_to_buffer
Definition: scanner.c:16
int yy_state_type
Definition: scanner.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: scanner.c:518
#define yy_init_buffer
Definition: scanner.c:13
#define INITIAL
position in pseudo-file...
Definition: scanner.c:858
#define yyget_extra
Definition: scanner.c:158
char * yy_bp
Definition: scanner.c:1044
#define yyin
Definition: scanner.c:21
static int yy_n_chars
Definition: scanner.c:528
#define YY_READ_BUF_SIZE
Amount of stuff to slurp up with each read.
Definition: scanner.c:945
#define YY_INPUT(buf, result, max_size)
UICON and ICON must be distinguished from RCON and DCON: REAL*8 D1 REAL*8 E2 Should not be parsed as ...
Definition: scanner.c:816
#define ECHO
ia64
Definition: scanner.c:954
#define yy_flush_buffer
Definition: scanner.c:14
#define yyrealloc
Definition: scanner.c:30
#define YY_END_OF_BUFFER
Definition: scanner.c:614
#define YY_STATE_EOF(state)
Action number for EOF rule of a given start state.
Definition: scanner.c:384
#define BEGIN
Enter a start condition.
Definition: scanner.c:376
#define YY_END_OF_BUFFER_CHAR
Definition: scanner.c:387
#define YY_FATAL_ERROR(msg)
Report a fatal error.
Definition: scanner.c:1008
#define yyterminate()
Gets input and stuffs it into "buf".
Definition: scanner.c:998
unsigned short int flex_uint16_t
Definition: scanner.c:313
#define yywrap
Macros after this point can all be overridden by user definitions in section 1.
Definition: scanner.c:28
#define yy_create_buffer
A lexical scanner generated by flex.
Definition: scanner.c:8
flex_uint8_t YY_CHAR
Begin user sect3.
Definition: scanner.c:584
#define YY_DO_BEFORE_ACTION
Done after the current pattern has been matched and before the corresponding action - sets up yytext.
Definition: scanner.c:607
#define yy_delete_buffer
Definition: scanner.c:9
#define EOB_ACT_LAST_MATCH
Definition: scanner.c:422
#define yyget_in
Definition: scanner.c:170
size_t yy_size_t
Definition: scanner.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: scanner.c:502
#define yylineno
Definition: scanner.c:24
static yy_state_type yy_get_previous_state(void)
static const flex_int16_t yy_chk[200]
Definition: scanner.c:736
static const YY_CHAR yy_ec[256]
Definition: scanner.c:638
#define yylex_destroy
Accessor methods to globals.
Definition: scanner.c:140
#define yyset_out
Definition: scanner.c:188
static char * yy_c_buf_p
Points to current character in buffer.
Definition: scanner.c:532
#define EOB_ACT_CONTINUE_SCAN
Definition: scanner.c:420
static size_t yy_buffer_stack_top
!YY_STRUCT_YY_BUFFER_STATE
Definition: scanner.c:508
#define YY_DECL
Definition: scanner.c:1021
#define YY_BUF_SIZE
Size of default input buffer.
Definition: scanner.c:398
#define YY_EXIT_FAILURE
static int yy_init
Definition: scanner.c:533
#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: scanner.c:370
static const flex_int16_t yy_nxt[200]
Definition: scanner.c:710
#define yyleng
Definition: scanner.c:22
static char * yy_last_accepting_cpos
Definition: scanner.c:763
#define yyset_in
Definition: scanner.c:176
s1
Definition: set.c:247
static char buf[BSZ]
Definition: split_file.c:157
#define TK_STAR
Definition: splitc.c:812
#define TK_SLASH
Definition: splitc.c:813
#define TK_COMPLEX
Definition: splitc.c:771
#define TK_PLUS
Definition: splitc.c:810
#define TK_EQ
Definition: splitc.c:791
#define TK_COMMA
Definition: splitc.c:834
#define TK_COLON
Definition: splitc.c:832
#define TK_MINUS
Definition: splitc.c:811
#define TK_AND
Definition: splitc.c:816
#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
#define TK_EQUALS
Definition: syn_yacc.c:368
#define TK_GT
Definition: syn_yacc.c:345
#define TK_LPAR
Definition: syn_yacc.c:364
YYSTYPE syn_lval
#define TK_NOT
Definition: syn_yacc.c:350
#define TK_EOS
Definition: syn_yacc.c:371
#define TK_FALSE
Definition: syn_yacc.c:353
#define TK_POWER
Definition: syn_yacc.c:363
#define TK_CURRENCY
Definition: syn_yacc.c:369
#define TK_CHARACTER
Definition: syn_yacc.c:288
#define TK_ICON
Definition: syn_yacc.c:355
#define TK_EQV
Definition: syn_yacc.c:343
#define TK_RCON
Definition: syn_yacc.c:357
#define TK_IN
Definition: syn_yacc.c:339
#define TK_RPAR
Definition: syn_yacc.c:365
#define TK_NEQV
Definition: syn_yacc.c:349
#define TK_DCON
Definition: syn_yacc.c:358
#define TK_REAL
Definition: syn_yacc.c:327
#define TK_GE
Definition: syn_yacc.c:344
#define TK_NAME
Definition: syn_yacc.c:354
#define TK_INOUT
Definition: syn_yacc.c:338
#define TK_LT
Definition: syn_yacc.c:347
#define TK_OUT
Definition: syn_yacc.c:340
#define TK_INTEGER
Definition: syn_yacc.c:316
#define TK_LOGICAL
Definition: syn_yacc.c:319
#define TK_LE
Definition: syn_yacc.c:346
#define TK_CONCAT
Definition: syn_yacc.c:370
#define TK_SCON
Definition: syn_yacc.c:356
#define TK_NE
Definition: syn_yacc.c:348
#define TK_OR
Definition: syn_yacc.c:351
#define TK_TRUE
Definition: syn_yacc.c:352
#define TK_FORMAT
Definition: syn_yacc.c:309
void syn_error(const char *)
void syn_reset_lex()
char FormatValue[FORMATLENGTH]
a string that will contain the value of the format in case of format statement
Definition: parser.c:95
bool ParserError(const char *f, const char *m)
Definition: parser.c:116
void syn_restart(FILE *)
string string
Definition: cyacc.h:187