PIPS
clexer.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 c__create_buffer
9 #define yy_delete_buffer c__delete_buffer
10 #define yy_scan_buffer c__scan_buffer
11 #define yy_scan_string c__scan_string
12 #define yy_scan_bytes c__scan_bytes
13 #define yy_init_buffer c__init_buffer
14 #define yy_flush_buffer c__flush_buffer
15 #define yy_load_buffer_state c__load_buffer_state
16 #define yy_switch_to_buffer c__switch_to_buffer
17 #define yypush_buffer_state c_push_buffer_state
18 #define yypop_buffer_state c_pop_buffer_state
19 #define yyensure_buffer_stack c_ensure_buffer_stack
20 #define yy_flex_debug c__flex_debug
21 #define yyin c_in
22 #define yyleng c_leng
23 #define yylex c_lex
24 #define yylineno c_lineno
25 #define yyout c_out
26 #define yyrestart c_restart
27 #define yytext c_text
28 #define yywrap c_wrap
29 #define yyalloc c_alloc
30 #define yyrealloc c_realloc
31 #define yyfree c_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 c__create_buffer_ALREADY_DEFINED
43 #else
44 #define yy_create_buffer c__create_buffer
45 #endif
46 
47 #ifdef yy_delete_buffer
48 #define c__delete_buffer_ALREADY_DEFINED
49 #else
50 #define yy_delete_buffer c__delete_buffer
51 #endif
52 
53 #ifdef yy_scan_buffer
54 #define c__scan_buffer_ALREADY_DEFINED
55 #else
56 #define yy_scan_buffer c__scan_buffer
57 #endif
58 
59 #ifdef yy_scan_string
60 #define c__scan_string_ALREADY_DEFINED
61 #else
62 #define yy_scan_string c__scan_string
63 #endif
64 
65 #ifdef yy_scan_bytes
66 #define c__scan_bytes_ALREADY_DEFINED
67 #else
68 #define yy_scan_bytes c__scan_bytes
69 #endif
70 
71 #ifdef yy_init_buffer
72 #define c__init_buffer_ALREADY_DEFINED
73 #else
74 #define yy_init_buffer c__init_buffer
75 #endif
76 
77 #ifdef yy_flush_buffer
78 #define c__flush_buffer_ALREADY_DEFINED
79 #else
80 #define yy_flush_buffer c__flush_buffer
81 #endif
82 
83 #ifdef yy_load_buffer_state
84 #define c__load_buffer_state_ALREADY_DEFINED
85 #else
86 #define yy_load_buffer_state c__load_buffer_state
87 #endif
88 
89 #ifdef yy_switch_to_buffer
90 #define c__switch_to_buffer_ALREADY_DEFINED
91 #else
92 #define yy_switch_to_buffer c__switch_to_buffer
93 #endif
94 
95 #ifdef yypush_buffer_state
96 #define c_push_buffer_state_ALREADY_DEFINED
97 #else
98 #define yypush_buffer_state c_push_buffer_state
99 #endif
100 
101 #ifdef yypop_buffer_state
102 #define c_pop_buffer_state_ALREADY_DEFINED
103 #else
104 #define yypop_buffer_state c_pop_buffer_state
105 #endif
106 
107 #ifdef yyensure_buffer_stack
108 #define c_ensure_buffer_stack_ALREADY_DEFINED
109 #else
110 #define yyensure_buffer_stack c_ensure_buffer_stack
111 #endif
112 
113 #ifdef yylex
114 #define c_lex_ALREADY_DEFINED
115 #else
116 #define yylex c_lex
117 #endif
118 
119 #ifdef yyrestart
120 #define c_restart_ALREADY_DEFINED
121 #else
122 #define yyrestart c_restart
123 #endif
124 
125 #ifdef yylex_init
126 #define c_lex_init_ALREADY_DEFINED
127 #else
128 #define yylex_init c_lex_init
129 #endif
130 
131 #ifdef yylex_init_extra
132 #define c_lex_init_extra_ALREADY_DEFINED
133 #else
134 #define yylex_init_extra c_lex_init_extra
135 #endif
136 
137 #ifdef yylex_destroy
138 #define c_lex_destroy_ALREADY_DEFINED
139 #else
140 #define yylex_destroy c_lex_destroy
141 #endif
142 
143 #ifdef yyget_debug
144 #define c_get_debug_ALREADY_DEFINED
145 #else
146 #define yyget_debug c_get_debug
147 #endif
148 
149 #ifdef yyset_debug
150 #define c_set_debug_ALREADY_DEFINED
151 #else
152 #define yyset_debug c_set_debug
153 #endif
154 
155 #ifdef yyget_extra
156 #define c_get_extra_ALREADY_DEFINED
157 #else
158 #define yyget_extra c_get_extra
159 #endif
160 
161 #ifdef yyset_extra
162 #define c_set_extra_ALREADY_DEFINED
163 #else
164 #define yyset_extra c_set_extra
165 #endif
166 
167 #ifdef yyget_in
168 #define c_get_in_ALREADY_DEFINED
169 #else
170 #define yyget_in c_get_in
171 #endif
172 
173 #ifdef yyset_in
174 #define c_set_in_ALREADY_DEFINED
175 #else
176 #define yyset_in c_set_in
177 #endif
178 
179 #ifdef yyget_out
180 #define c_get_out_ALREADY_DEFINED
181 #else
182 #define yyget_out c_get_out
183 #endif
184 
185 #ifdef yyset_out
186 #define c_set_out_ALREADY_DEFINED
187 #else
188 #define yyset_out c_set_out
189 #endif
190 
191 #ifdef yyget_leng
192 #define c_get_leng_ALREADY_DEFINED
193 #else
194 #define yyget_leng c_get_leng
195 #endif
196 
197 #ifdef yyget_text
198 #define c_get_text_ALREADY_DEFINED
199 #else
200 #define yyget_text c_get_text
201 #endif
202 
203 #ifdef yyget_lineno
204 #define c_get_lineno_ALREADY_DEFINED
205 #else
206 #define yyget_lineno c_get_lineno
207 #endif
208 
209 #ifdef yyset_lineno
210 #define c_set_lineno_ALREADY_DEFINED
211 #else
212 #define yyset_lineno c_set_lineno
213 #endif
214 
215 #ifdef yywrap
216 #define c_wrap_ALREADY_DEFINED
217 #else
218 #define yywrap c_wrap
219 #endif
220 
221 #ifdef yyalloc
222 #define c_alloc_ALREADY_DEFINED
223 #else
224 #define yyalloc c_alloc
225 #endif
226 
227 #ifdef yyrealloc
228 #define c_realloc_ALREADY_DEFINED
229 #else
230 #define yyrealloc c_realloc
231 #endif
232 
233 #ifdef yyfree
234 #define c_free_ALREADY_DEFINED
235 #else
236 #define yyfree c_free
237 #endif
238 
239 #ifdef yytext
240 #define c_text_ALREADY_DEFINED
241 #else
242 #define yytext c_text
243 #endif
244 
245 #ifdef yyleng
246 #define c_leng_ALREADY_DEFINED
247 #else
248 #define yyleng c_leng
249 #endif
250 
251 #ifdef yyin
252 #define c_in_ALREADY_DEFINED
253 #else
254 #define yyin c_in
255 #endif
256 
257 #ifdef yyout
258 #define c_out_ALREADY_DEFINED
259 #else
260 #define yyout c_out
261 #endif
262 
263 #ifdef yy_flex_debug
264 #define c__flex_debug_ALREADY_DEFINED
265 #else
266 #define yy_flex_debug c__flex_debug
267 #endif
268 
269 #ifdef yylineno
270 #define c_lineno_ALREADY_DEFINED
271 #else
272 #define yylineno c_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  /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
425  * access to the local variable yy_act. Since yyless() is a macro, it would break
426  * existing scanners that call yyless() from OUTSIDE yylex.
427  * One obvious solution it to make yy_act a global. I tried that, and saw
428  * a 5% performance hit in a non-yylineno scanner, because yy_act is
429  * normally declared as a register variable-- so it is not worth it.
430  */
431  #define YY_LESS_LINENO(n) \
432  do { \
433  int yyl;\
434  for ( yyl = n; yyl < yyleng; ++yyl )\
435  if ( yytext[yyl] == '\n' )\
436  --yylineno;\
437  }while(0)
438  #define YY_LINENO_REWIND_TO(dst) \
439  do {\
440  const char *p;\
441  for ( p = yy_cp-1; p >= (dst); --p)\
442  if ( *p == '\n' )\
443  --yylineno;\
444  }while(0)
445 
446 /* Return all but the first "n" matched characters back to the input stream. */
447 #define yyless(n) \
448  do \
449  { \
450  /* Undo effects of setting up yytext. */ \
451  int yyless_macro_arg = (n); \
452  YY_LESS_LINENO(yyless_macro_arg);\
453  *yy_cp = (yy_hold_char); \
454  YY_RESTORE_YY_MORE_OFFSET \
455  (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
456  YY_DO_BEFORE_ACTION; /* set up yytext again */ \
457  } \
458  while ( 0 )
459 #define unput(c) yyunput( c, (yytext_ptr) )
460 
461 #ifndef YY_STRUCT_YY_BUFFER_STATE
462 #define YY_STRUCT_YY_BUFFER_STATE
463 struct yy_buffer_state
464  {
465  FILE *yy_input_file;
466 
467  char *yy_ch_buf; /* input buffer */
468  char *yy_buf_pos; /* current position in input buffer */
469 
470  /* Size of input buffer in bytes, not including room for EOB
471  * characters.
472  */
473  int yy_buf_size;
474 
475  /* Number of characters read into yy_ch_buf, not including EOB
476  * characters.
477  */
478  int yy_n_chars;
479 
480  /* Whether we "own" the buffer - i.e., we know we created it,
481  * and can realloc() it to grow it, and should free() it to
482  * delete it.
483  */
484  int yy_is_our_buffer;
485 
486  /* Whether this is an "interactive" input source; if so, and
487  * if we're using stdio for input, then we want to use getc()
488  * instead of fread(), to make sure we stop fetching input after
489  * each newline.
490  */
491  int yy_is_interactive;
492 
493  /* Whether we're considered to be at the beginning of a line.
494  * If so, '^' rules will be active on the next match, otherwise
495  * not.
496  */
497  int yy_at_bol;
498 
499  int yy_bs_lineno; /**< The line count. */
500  int yy_bs_column; /**< The column count. */
501 
502  /* Whether to try to fill the input buffer when we reach the
503  * end of it.
504  */
505  int yy_fill_buffer;
506 
507  int yy_buffer_status;
508 
509 #define YY_BUFFER_NEW 0
510 #define YY_BUFFER_NORMAL 1
511  /* When an EOF's been seen but there's still some text to process
512  * then we mark the buffer as YY_EOF_PENDING, to indicate that we
513  * shouldn't try reading from the input source any more. We might
514  * still have a bunch of tokens to match, though, because of
515  * possible backing-up.
516  *
517  * When we actually see the EOF, we change the status to "new"
518  * (via yyrestart()), so that the user can continue scanning by
519  * just pointing yyin at a new input file.
520  */
521 #define YY_BUFFER_EOF_PENDING 2
522 
523  };
524 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
525 
526 /* Stack of input buffers. */
527 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
528 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
529 static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
530 
531 /* We provide macros for accessing buffer states in case in the
532  * future we want to put the buffer states in a more general
533  * "scanner state".
534  *
535  * Returns the top of the stack, or NULL.
536  */
537 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
538  ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
539  : NULL)
540 /* Same as previous macro, but useful when we know that the buffer stack is not
541  * NULL or when we need an lvalue. For internal use only.
542  */
543 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
544 
545 /* yy_hold_char holds the character lost when yytext is formed. */
546 static char yy_hold_char;
547 static int yy_n_chars; /* number of characters read into yy_ch_buf */
548 int yyleng;
549 
550 /* Points to current character in buffer. */
551 static char *yy_c_buf_p = NULL;
552 static int yy_init = 0; /* whether we need to initialize */
553 static int yy_start = 0; /* start state number */
554 
555 /* Flag which is used to allow yywrap()'s to do buffer switches
556  * instead of setting up a fresh yyin. A bit of a hack ...
557  */
559 
560 void yyrestart ( FILE *input_file );
562 YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size );
566 void yypop_buffer_state ( void );
567 
568 static void yyensure_buffer_stack ( void );
569 static void yy_load_buffer_state ( void );
570 static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file );
571 #define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
572 
574 YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
575 YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );
576 
577 void *yyalloc ( yy_size_t );
578 void *yyrealloc ( void *, yy_size_t );
579 void yyfree ( void * );
580 
581 #define yy_new_buffer yy_create_buffer
582 #define yy_set_interactive(is_interactive) \
583  { \
584  if ( ! YY_CURRENT_BUFFER ){ \
585  yyensure_buffer_stack (); \
586  YY_CURRENT_BUFFER_LVALUE = \
587  yy_create_buffer( yyin, YY_BUF_SIZE ); \
588  } \
589  YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
590  }
591 #define yy_set_bol(at_bol) \
592  { \
593  if ( ! YY_CURRENT_BUFFER ){\
594  yyensure_buffer_stack (); \
595  YY_CURRENT_BUFFER_LVALUE = \
596  yy_create_buffer( yyin, YY_BUF_SIZE ); \
597  } \
598  YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
599  }
600 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
601 
602 /* Begin user sect3 */
604 
605 FILE *yyin , *yyout ;
606 
607 typedef int yy_state_type;
608 
609 extern int yylineno;
610 int yylineno = 1;
611 
612 extern char *yytext;
613 #ifdef yytext_ptr
614 #undef yytext_ptr
615 #endif
616 #define yytext_ptr yytext
617 
620 static int yy_get_next_buffer ( void );
621 static void yynoreturn yy_fatal_error ( const char* msg );
622 
623 /* Done after the current pattern has been matched and before the
624  * corresponding action - sets up yytext.
625  */
626 #define YY_DO_BEFORE_ACTION \
627  (yytext_ptr) = yy_bp; \
628  yyleng = (int) (yy_cp - yy_bp); \
629  (yy_hold_char) = *yy_cp; \
630  *yy_cp = '\0'; \
631  (yy_c_buf_p) = yy_cp;
632 #define YY_NUM_RULES 73
633 #define YY_END_OF_BUFFER 74
634 /* This struct is not used in this scanner,
635  but its presence is necessary. */
636 struct yy_trans_info
637  {
640  };
641 static const flex_int16_t yy_accept[282] =
642  { 0,
643  0, 0, 0, 0, 74, 72, 6, 5, 46, 72,
644  45, 49, 72, 59, 60, 43, 41, 62, 42, 63,
645  44, 16, 16, 53, 61, 36, 35, 37, 52, 71,
646  71, 57, 58, 51, 71, 71, 55, 50, 56, 54,
647  72, 73, 1, 73, 32, 0, 0, 10, 0, 23,
648  47, 25, 0, 0, 21, 38, 19, 39, 20, 40,
649  0, 12, 0, 2, 22, 12, 15, 16, 0, 16,
650  16, 0, 16, 29, 33, 31, 34, 30, 71, 0,
651  0, 26, 71, 71, 71, 24, 48, 0, 0, 0,
652  0, 0, 1, 0, 1, 0, 8, 0, 0, 0,
653 
654  0, 18, 0, 12, 13, 0, 0, 2, 2, 2,
655  0, 15, 15, 15, 0, 12, 16, 16, 16, 16,
656  0, 14, 27, 28, 0, 11, 0, 0, 0, 71,
657  71, 71, 71, 71, 71, 71, 0, 4, 0, 0,
658  0, 0, 0, 0, 0, 0, 0, 12, 13, 0,
659  12, 15, 15, 15, 15, 16, 0, 14, 14, 0,
660  14, 14, 9, 0, 0, 0, 0, 71, 71, 71,
661  71, 71, 71, 71, 0, 0, 0, 0, 0, 0,
662  15, 0, 0, 14, 14, 0, 0, 12, 14, 14,
663  0, 0, 0, 0, 71, 65, 71, 71, 71, 71,
664 
665  71, 0, 17, 0, 0, 0, 12, 0, 12, 12,
666  12, 0, 12, 0, 12, 14, 0, 0, 0, 0,
667  71, 71, 71, 71, 71, 64, 0, 0, 0, 0,
668  12, 0, 0, 12, 0, 0, 0, 0, 0, 0,
669  0, 7, 71, 71, 71, 71, 3, 0, 0, 12,
670  0, 12, 0, 0, 0, 0, 71, 68, 71, 71,
671  3, 0, 0, 0, 71, 71, 71, 66, 0, 0,
672  0, 71, 69, 70, 0, 0, 71, 0, 71, 67,
673  0
674  } ;
675 
676 static const YY_CHAR yy_ec[256] =
677  { 0,
678  1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
679  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
680  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
681  1, 2, 4, 5, 6, 1, 7, 8, 9, 10,
682  11, 12, 13, 14, 15, 16, 17, 18, 19, 19,
683  19, 19, 19, 19, 19, 20, 20, 21, 22, 23,
684  24, 25, 26, 1, 27, 27, 27, 27, 28, 29,
685  30, 30, 30, 30, 30, 31, 30, 30, 30, 32,
686  30, 30, 30, 30, 33, 30, 30, 34, 30, 30,
687  35, 36, 37, 38, 39, 1, 40, 41, 27, 42,
688 
689  43, 44, 45, 30, 46, 47, 30, 48, 49, 50,
690  51, 52, 53, 54, 55, 56, 57, 58, 30, 59,
691  30, 60, 61, 62, 63, 64, 1, 1, 1, 1,
692  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
693  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
694  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
695  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
696  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
697  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
698  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
699 
700  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
701  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
702  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
703  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
704  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
705  1, 1, 1, 1, 1
706  } ;
707 
708 static const YY_CHAR yy_meta[65] =
709  { 0,
710  1, 1, 1, 1, 2, 1, 1, 1, 3, 1,
711  1, 1, 1, 1, 1, 4, 1, 5, 5, 6,
712  1, 1, 1, 1, 1, 2, 6, 6, 6, 7,
713  8, 8, 9, 7, 1, 2, 1, 1, 7, 5,
714  5, 6, 6, 5, 7, 7, 7, 8, 7, 10,
715  7, 8, 7, 10, 7, 10, 9, 10, 10, 7,
716  1, 1, 1, 1
717  } ;
718 
719 static const flex_int16_t yy_base[329] =
720  { 0,
721  0, 605, 62, 63, 609, 838, 838, 838, 43, 64,
722  583, 60, 569, 838, 838, 577, 57, 838, 58, 56,
723  68, 85, 68, 838, 838, 54, 576, 64, 838, 0,
724  85, 838, 838, 571, 75, 548, 838, 47, 838, 838,
725  104, 76, 838, 90, 838, 536, 103, 838, 0, 838,
726  838, 838, 579, 92, 838, 838, 838, 838, 838, 838,
727  570, 139, 573, 94, 838, 89, 172, 0, 116, 122,
728  132, 567, 156, 552, 838, 838, 838, 551, 0, 110,
729  537, 838, 516, 166, 494, 838, 838, 175, 178, 549,
730  496, 118, 838, 138, 140, 499, 838, 143, 0, 0,
731 
732  0, 838, 213, 155, 194, 530, 152, 142, 838, 502,
733  221, 219, 227, 221, 198, 248, 228, 229, 258, 265,
734  0, 266, 838, 838, 217, 838, 0, 526, 269, 492,
735  476, 460, 465, 468, 467, 463, 501, 838, 287, 281,
736  455, 432, 291, 0, 0, 473, 301, 311, 838, 316,
737  319, 328, 325, 344, 336, 346, 178, 360, 294, 381,
738  89, 321, 838, 364, 0, 0, 0, 436, 430, 414,
739  417, 419, 415, 400, 405, 442, 432, 0, 0, 430,
740  370, 391, 401, 114, 838, 327, 404, 409, 403, 385,
741  417, 0, 0, 409, 366, 0, 364, 359, 353, 354,
742 
743  351, 341, 838, 0, 0, 412, 429, 425, 443, 474,
744  220, 465, 480, 481, 500, 838, 379, 0, 0, 372,
745  340, 327, 320, 306, 286, 0, 284, 0, 313, 521,
746  520, 540, 449, 543, 549, 443, 553, 482, 0, 0,
747  307, 0, 260, 269, 269, 249, 301, 0, 481, 579,
748  560, 584, 528, 0, 282, 275, 234, 234, 226, 204,
749  257, 0, 0, 242, 195, 180, 175, 0, 0, 0,
750  199, 157, 0, 0, 0, 164, 127, 86, 52, 0,
751  838, 632, 642, 652, 658, 668, 677, 687, 697, 704,
752  710, 720, 730, 736, 738, 740, 742, 745, 753, 759,
753 
754  761, 765, 767, 769, 771, 773, 775, 777, 779, 783,
755  785, 787, 789, 791, 795, 797, 799, 801, 805, 807,
756  809, 813, 815, 817, 821, 823, 827, 831
757  } ;
758 
759 static const flex_int16_t yy_def[329] =
760  { 0,
761  281, 1, 282, 282, 281, 281, 281, 281, 281, 283,
762  281, 281, 284, 281, 281, 281, 281, 281, 281, 281,
763  281, 281, 22, 281, 281, 281, 281, 281, 281, 285,
764  285, 281, 281, 281, 285, 285, 281, 281, 281, 281,
765  281, 286, 281, 286, 281, 281, 283, 281, 283, 281,
766  281, 281, 281, 287, 281, 281, 281, 281, 281, 281,
767  281, 281, 288, 289, 281, 62, 281, 23, 281, 281,
768  281, 290, 281, 281, 281, 281, 281, 281, 285, 291,
769  292, 281, 285, 285, 285, 281, 281, 281, 293, 281,
770  281, 286, 281, 286, 286, 281, 281, 281, 294, 295,
771 
772  296, 281, 281, 281, 281, 288, 288, 289, 281, 289,
773  281, 281, 281, 281, 281, 281, 281, 281, 281, 281,
774  297, 298, 281, 281, 291, 281, 291, 281, 299, 285,
775  285, 285, 285, 285, 285, 285, 293, 281, 293, 281,
776  281, 281, 281, 300, 301, 302, 281, 281, 281, 281,
777  281, 281, 281, 281, 281, 281, 297, 298, 281, 281,
778  281, 281, 281, 281, 303, 304, 305, 285, 285, 285,
779  285, 285, 285, 285, 281, 281, 281, 306, 307, 281,
780  281, 281, 281, 281, 281, 281, 281, 281, 281, 281,
781  281, 308, 309, 310, 285, 285, 285, 285, 285, 285,
782 
783  285, 281, 281, 311, 312, 281, 281, 281, 281, 281,
784  210, 281, 281, 281, 281, 281, 281, 313, 314, 315,
785  285, 285, 285, 285, 285, 285, 281, 316, 281, 281,
786  281, 281, 281, 281, 281, 281, 281, 281, 317, 318,
787  319, 285, 285, 285, 285, 285, 281, 320, 281, 281,
788  281, 281, 281, 321, 281, 322, 285, 285, 285, 285,
789  281, 323, 324, 325, 285, 285, 285, 285, 312, 326,
790  327, 285, 285, 285, 318, 328, 285, 281, 285, 285,
791  0, 281, 281, 281, 281, 281, 281, 281, 281, 281,
792  281, 281, 281, 281, 281, 281, 281, 281, 281, 281,
793 
794  281, 281, 281, 281, 281, 281, 281, 281, 281, 281,
795  281, 281, 281, 281, 281, 281, 281, 281, 281, 281,
796  281, 281, 281, 281, 281, 281, 281, 281
797  } ;
798 
799 static const flex_int16_t yy_nxt[903] =
800  { 0,
801  6, 7, 8, 9, 10, 6, 11, 12, 13, 14,
802  15, 16, 17, 18, 19, 20, 21, 22, 23, 23,
803  24, 25, 26, 27, 28, 29, 30, 30, 30, 30,
804  31, 30, 30, 30, 32, 6, 33, 34, 35, 30,
805  30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
806  30, 30, 30, 30, 36, 30, 30, 30, 30, 30,
807  37, 38, 39, 40, 43, 43, 45, 51, 48, 56,
808  86, 61, 58, 62, 62, 62, 74, 75, 93, 63,
809  57, 59, 60, 52, 64, 68, 68, 77, 78, 80,
810  280, 65, 95, 81, 163, 46, 109, 44, 44, 49,
811 
812  66, 281, 67, 67, 68, 88, 83, 48, 87, 98,
813  98, 94, 69, 84, 126, 70, 111, 71, 72, 189,
814  93, 89, 89, 89, 99, 94, 281, 69, 115, 110,
815  115, 111, 73, 116, 116, 116, 190, 66, 49, 90,
816  95, 71, 93, 72, 109, 127, 185, 66, 100, 69,
817  101, 97, 117, 94, 118, 91, 62, 62, 62, 69,
818  143, 143, 119, 107, 69, 279, 103, 104, 109, 104,
819  185, 66, 163, 94, 69, 94, 88, 110, 118, 120,
820  138, 103, 104, 69, 105, 105, 104, 66, 118, 67,
821  67, 68, 89, 89, 89, 139, 139, 139, 69, 69,
822 
823  149, 149, 112, 117, 113, 131, 277, 163, 132, 182,
824  90, 133, 118, 274, 69, 116, 116, 116, 273, 114,
825  134, 126, 149, 135, 149, 147, 91, 147, 113, 182,
826  148, 148, 148, 150, 66, 150, 66, 149, 151, 151,
827  151, 149, 66, 66, 66, 272, 69, 232, 69, 152,
828  163, 153, 127, 153, 69, 69, 69, 154, 261, 268,
829  118, 69, 232, 69, 267, 116, 116, 116, 152, 69,
830  69, 69, 266, 66, 155, 153, 104, 153, 104, 265,
831  66, 121, 140, 163, 118, 69, 164, 164, 156, 138,
832  163, 104, 69, 105, 105, 104, 159, 160, 161, 97,
833 
834  69, 165, 261, 260, 139, 139, 139, 69, 177, 177,
835  259, 258, 156, 162, 257, 163, 90, 160, 148, 148,
836  148, 97, 161, 247, 184, 166, 185, 167, 148, 148,
837  148, 246, 91, 151, 151, 151, 151, 151, 151, 104,
838  66, 104, 187, 66, 188, 188, 188, 104, 245, 104,
839  185, 66, 69, 185, 104, 69, 105, 105, 104, 66,
840  153, 66, 104, 69, 105, 105, 104, 69, 184, 244,
841  69, 69, 163, 69, 181, 121, 243, 185, 69, 242,
842  163, 191, 191, 181, 153, 66, 69, 163, 69, 227,
843  159, 183, 161, 186, 226, 186, 187, 69, 188, 188,
844 
845  188, 225, 224, 206, 223, 206, 222, 162, 207, 207,
846  207, 183, 69, 208, 221, 208, 161, 163, 209, 209,
847  209, 210, 210, 210, 211, 163, 188, 188, 188, 207,
848  207, 207, 216, 216, 217, 217, 212, 104, 97, 213,
849  97, 214, 209, 209, 209, 203, 207, 207, 207, 202,
850  201, 212, 104, 200, 105, 105, 215, 104, 211, 104,
851  209, 209, 209, 199, 198, 214, 234, 234, 234, 197,
852  212, 104, 104, 104, 105, 105, 104, 233, 196, 233,
853  195, 97, 234, 234, 234, 212, 104, 176, 105, 105,
854  104, 210, 210, 210, 175, 211, 211, 211, 250, 250,
855 
856  250, 230, 231, 138, 231, 174, 173, 212, 212, 212,
857  235, 237, 236, 172, 171, 211, 230, 231, 170, 105,
858  105, 231, 212, 212, 212, 149, 149, 212, 238, 253,
859  169, 168, 236, 249, 163, 249, 236, 110, 250, 250,
860  250, 107, 212, 211, 142, 149, 149, 235, 104, 141,
861  104, 140, 251, 136, 251, 212, 236, 252, 252, 252,
862  234, 234, 234, 104, 211, 105, 105, 104, 211, 130,
863  212, 231, 129, 231, 124, 123, 212, 252, 252, 252,
864  212, 236, 121, 253, 107, 102, 231, 97, 105, 105,
865  231, 212, 96, 85, 82, 212, 250, 250, 250, 76,
866 
867  55, 252, 252, 252, 54, 236, 50, 231, 281, 231,
868  41, 281, 231, 281, 231, 281, 281, 281, 281, 281,
869  281, 281, 231, 281, 105, 105, 231, 231, 281, 105,
870  105, 231, 42, 42, 42, 42, 42, 42, 42, 42,
871  42, 42, 47, 47, 47, 47, 47, 47, 47, 47,
872  47, 47, 53, 53, 53, 53, 53, 53, 53, 53,
873  53, 53, 79, 79, 79, 79, 79, 79, 92, 92,
874  92, 92, 92, 92, 92, 92, 92, 92, 53, 53,
875  281, 53, 281, 281, 281, 53, 53, 106, 106, 106,
876  106, 106, 106, 106, 106, 106, 106, 108, 108, 108,
877 
878  108, 108, 108, 108, 108, 108, 108, 122, 122, 122,
879  125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
880  128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
881  137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
882  144, 144, 145, 145, 146, 146, 157, 157, 158, 158,
883  158, 281, 158, 158, 128, 128, 281, 128, 281, 281,
884  281, 128, 128, 178, 178, 179, 179, 180, 281, 180,
885  180, 192, 192, 193, 193, 194, 194, 204, 204, 205,
886  205, 218, 218, 219, 219, 220, 281, 220, 220, 228,
887  228, 229, 229, 239, 239, 240, 240, 241, 281, 241,
888 
889  241, 248, 248, 254, 254, 255, 255, 256, 281, 256,
890  256, 262, 262, 263, 263, 264, 281, 264, 264, 269,
891  269, 270, 270, 271, 281, 271, 271, 275, 275, 276,
892  281, 276, 276, 278, 281, 278, 278, 5, 281, 281,
893  281, 281, 281, 281, 281, 281, 281, 281, 281, 281,
894  281, 281, 281, 281, 281, 281, 281, 281, 281, 281,
895  281, 281, 281, 281, 281, 281, 281, 281, 281, 281,
896  281, 281, 281, 281, 281, 281, 281, 281, 281, 281,
897  281, 281, 281, 281, 281, 281, 281, 281, 281, 281,
898  281, 281, 281, 281, 281, 281, 281, 281, 281, 281,
899 
900  281, 281
901  } ;
902 
903 static const flex_int16_t yy_chk[903] =
904  { 0,
905  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
906  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
907  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
908  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
909  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
910  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
911  1, 1, 1, 1, 3, 4, 9, 12, 10, 17,
912  38, 20, 19, 20, 20, 20, 26, 26, 42, 21,
913  17, 19, 19, 12, 21, 23, 23, 28, 28, 31,
914  279, 21, 44, 31, 278, 9, 64, 3, 4, 10,
915 
916  22, 23, 22, 22, 22, 41, 35, 47, 38, 54,
917  54, 42, 22, 35, 80, 22, 66, 22, 22, 161,
918  92, 41, 41, 41, 54, 44, 23, 22, 69, 64,
919  69, 66, 22, 69, 69, 69, 161, 70, 47, 41,
920  94, 22, 95, 22, 108, 80, 184, 71, 54, 70,
921  54, 98, 70, 92, 70, 41, 62, 62, 62, 71,
922  98, 98, 71, 107, 70, 277, 62, 62, 107, 62,
923  184, 73, 276, 94, 71, 95, 88, 108, 70, 71,
924  89, 62, 62, 73, 62, 62, 62, 67, 73, 67,
925  67, 67, 88, 88, 88, 89, 89, 89, 73, 67,
926 
927  104, 104, 67, 73, 67, 84, 272, 271, 84, 157,
928  88, 84, 73, 267, 67, 115, 115, 115, 266, 67,
929  84, 125, 105, 84, 105, 103, 88, 103, 67, 157,
930  103, 103, 103, 111, 112, 111, 114, 105, 111, 111,
931  111, 105, 113, 117, 118, 265, 112, 211, 114, 112,
932  264, 112, 125, 114, 113, 117, 118, 113, 261, 260,
933  117, 112, 211, 114, 259, 116, 116, 116, 114, 113,
934  117, 118, 258, 119, 113, 112, 116, 114, 116, 257,
935  120, 122, 140, 256, 117, 119, 129, 129, 119, 139,
936  255, 116, 120, 116, 116, 116, 122, 122, 122, 143,
937 
938  119, 129, 247, 246, 139, 139, 139, 120, 143, 143,
939  245, 244, 120, 122, 243, 241, 140, 122, 147, 147,
940  147, 229, 122, 227, 159, 129, 159, 129, 148, 148,
941  148, 225, 140, 150, 150, 150, 151, 151, 151, 148,
942  153, 148, 186, 152, 186, 186, 186, 151, 224, 151,
943  159, 155, 153, 162, 148, 152, 148, 148, 148, 154,
944  152, 156, 151, 155, 151, 151, 151, 153, 162, 223,
945  152, 154, 164, 156, 154, 158, 222, 162, 155, 221,
946  220, 164, 164, 155, 152, 181, 154, 217, 156, 202,
947  158, 158, 158, 160, 201, 160, 160, 181, 160, 160,
948 
949  160, 200, 199, 182, 198, 182, 197, 158, 182, 182,
950  182, 158, 181, 183, 195, 183, 158, 194, 183, 183,
951  183, 187, 187, 187, 188, 191, 188, 188, 188, 206,
952  206, 206, 190, 189, 191, 191, 188, 188, 180, 188,
953  177, 188, 208, 208, 208, 176, 207, 207, 207, 175,
954  174, 188, 188, 173, 188, 188, 188, 207, 236, 207,
955  209, 209, 209, 172, 171, 188, 233, 233, 233, 170,
956  236, 209, 207, 209, 207, 207, 207, 212, 169, 212,
957  168, 146, 212, 212, 212, 236, 209, 142, 209, 209,
958  209, 210, 210, 210, 141, 213, 214, 238, 249, 249,
959 
960  249, 210, 210, 137, 210, 136, 135, 213, 214, 238,
961  213, 214, 213, 134, 133, 215, 210, 210, 132, 210,
962  210, 210, 213, 214, 238, 213, 213, 215, 214, 238,
963  131, 130, 215, 230, 128, 230, 213, 110, 230, 230,
964  230, 106, 215, 253, 96, 215, 215, 215, 231, 91,
965  231, 90, 232, 85, 232, 253, 215, 232, 232, 232,
966  234, 234, 234, 231, 235, 231, 231, 231, 237, 83,
967  253, 234, 81, 234, 78, 74, 235, 251, 251, 251,
968  237, 235, 72, 237, 63, 61, 234, 53, 234, 234,
969  234, 235, 46, 36, 34, 237, 250, 250, 250, 27,
970 
971  16, 252, 252, 252, 13, 235, 11, 250, 5, 250,
972  2, 0, 252, 0, 252, 0, 0, 0, 0, 0,
973  0, 0, 250, 0, 250, 250, 250, 252, 0, 252,
974  252, 252, 282, 282, 282, 282, 282, 282, 282, 282,
975  282, 282, 283, 283, 283, 283, 283, 283, 283, 283,
976  283, 283, 284, 284, 284, 284, 284, 284, 284, 284,
977  284, 284, 285, 285, 285, 285, 285, 285, 286, 286,
978  286, 286, 286, 286, 286, 286, 286, 286, 287, 287,
979  0, 287, 0, 0, 0, 287, 287, 288, 288, 288,
980  288, 288, 288, 288, 288, 288, 288, 289, 289, 289,
981 
982  289, 289, 289, 289, 289, 289, 289, 290, 290, 290,
983  291, 291, 291, 291, 291, 291, 291, 291, 291, 291,
984  292, 292, 292, 292, 292, 292, 292, 292, 292, 292,
985  293, 293, 293, 293, 293, 293, 293, 293, 293, 293,
986  294, 294, 295, 295, 296, 296, 297, 297, 298, 298,
987  298, 0, 298, 298, 299, 299, 0, 299, 0, 0,
988  0, 299, 299, 300, 300, 301, 301, 302, 0, 302,
989  302, 303, 303, 304, 304, 305, 305, 306, 306, 307,
990  307, 308, 308, 309, 309, 310, 0, 310, 310, 311,
991  311, 312, 312, 313, 313, 314, 314, 315, 0, 315,
992 
993  315, 316, 316, 317, 317, 318, 318, 319, 0, 319,
994  319, 320, 320, 321, 321, 322, 0, 322, 322, 323,
995  323, 324, 324, 325, 0, 325, 325, 326, 326, 327,
996  0, 327, 327, 328, 0, 328, 328, 281, 281, 281,
997  281, 281, 281, 281, 281, 281, 281, 281, 281, 281,
998  281, 281, 281, 281, 281, 281, 281, 281, 281, 281,
999  281, 281, 281, 281, 281, 281, 281, 281, 281, 281,
1000  281, 281, 281, 281, 281, 281, 281, 281, 281, 281,
1001  281, 281, 281, 281, 281, 281, 281, 281, 281, 281,
1002  281, 281, 281, 281, 281, 281, 281, 281, 281, 281,
1003 
1004  281, 281
1005  } ;
1006 
1007 /* Table of booleans, true if rule could match eol. */
1009  { 0,
1010 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0,
1011  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1012  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1013  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, };
1014 
1017 
1018 extern int yy_flex_debug;
1020 
1021 /* The intent behind this definition is that it'll catch
1022  * any uses of REJECT which flex missed.
1023  */
1024 #define REJECT reject_used_but_not_detected
1025 #define yymore() yymore_used_but_not_detected
1026 #define YY_MORE_ADJ 0
1027 #define YY_RESTORE_YY_MORE_OFFSET
1028 char *yytext;
1029 #line 1 "clex.l"
1030 /* $Id: clex.l 23412 2017-08-09 15:07:09Z irigoin $ */
1031 /******************** LEXICAL ANALYZER **************************
1032 
1033  Here are the lexical rules, based on the work of people from
1034  Open Source Quality projects (http://osq.cs.berkeley.edu/), used
1035  by the CCured source-to-source translator for C
1036 
1037 
1038 *****************************************************************/
1039 /*(*
1040  *
1041  * Copyright (c) 2001-2003,
1042  * George C. Necula <necula@cs.berkeley.edu>
1043  * Scott McPeak <smcpeak@cs.berkeley.edu>
1044  * Wes Weimer <weimer@cs.berkeley.edu>
1045  * Ben Liblit <liblit@cs.berkeley.edu>
1046  * All rights reserved.
1047  *
1048  * Redistribution and use in source and binary forms, with or without
1049  * modification, are permitted provided that the following conditions are
1050  * met:
1051  *
1052  * 1. Redistributions of source code must retain the above copyright
1053  * notice, this list of conditions and the following disclaimer.
1054  *
1055  * 2. Redistributions in binary form must reproduce the above copyright
1056  * notice, this list of conditions and the following disclaimer in the
1057  * documentation and/or other materials provided with the distribution.
1058  *
1059  * 3. The names of the contributors may not be used to endorse or promote
1060  * products derived from this software without specific prior written
1061  * permission.
1062  *
1063  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
1064  * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
1065  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
1066  * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
1067  * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
1068  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
1069  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
1070  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
1071  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
1072  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
1073  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1074  *
1075  *)
1076 (* FrontC -- lexical analyzer
1077 **
1078 ** 1.0 3.22.99 Hugues Cassé First version.
1079 ** 2.0 George Necula 12/12/00: Many extensions
1080 *)*/
1081 #define YY_NO_INPUT 1
1082 #line 59 "clex.l"
1083 #ifdef HAVE_CONFIG_H
1084  #include "pips_config.h"
1085 #endif
1086 #include <stdlib.h>
1087 #include <stdio.h>
1088 #include <string.h>
1089 #include <ctype.h>
1090 
1091 #include "genC.h"
1092 #include "linear.h"
1093 #include "ri.h"
1094 #include "ri-util.h"
1095 #include "misc.h"
1096 
1097 #include "c_syntax.h"
1098 #include "cyacc.h"
1099 
1100 
1101 /* To track the user line number, that is the one in the original user file */
1103 
1104 /* The line increment is set to zero when header files are parsed. The
1105  * goal is to reconstruct the line number in the user file and not the
1106  * line number in the preprocessed file.
1107  *
1108  * This is performed in analyze_preprocessor_line() (util.c)
1109  */
1111 
1112 /* To keep track of line intervals */
1114 
1116 {
1117  return previous_c_lineno;
1118 }
1119 
1120 /* Use a stack to survive to file inclusions if any.
1121 
1122  I guess that it is currently not used since file inclusion is already
1123  done by the preprocessor... RK
1124 */
1125 DEFINE_LOCAL_STACK(line_number, _int)
1126 
1127 /* To track the absolute line number in the file that is parsed
1128  use the default flex yylineno that is renamed c_lineno here */
1129 /* Use a stack to survive to file inclusions if any */
1130 DEFINE_LOCAL_STACK(absolute_line_number, _int)
1131 
1132 /* Count the number of c in s. */
1133 unsigned int character_occurences_in_string(string s, char c)
1134 {
1135  string p = string_undefined;
1136  unsigned int count = 0;
1137 
1138  for(p=s; *p!='\0'; p++) {
1139  count += (*p==c)? 1 : 0 ;
1140  }
1141  return count;
1142 }
1143 ␌
1145 
1147 {
1148  /* FI: I assume that get_current_C_line_number is called only
1149  * by some kind of make_statement()
1150  *
1151  * The PIPS preprocessed C function files contain a specific first line
1152  * to convert the line number in the workspace unto a line number in the
1153  * user source file.
1154  */
1157  return C_line_number;
1158 }
1159 
1160 /* Should be called just before get_current_C_line_number */
1162 {
1163  return previous_C_line_number;
1164 }
1165 
1167 {
1169  /* Initialize the user line number... */
1171  // Rely on preprocessor pragma lines, which are not always present
1172  // especially for code synthesized by PIPS...
1173  // C_line_number = UNDEFINED_C_LINE_NUMBER;
1175  /* ... and the absolute line number in the current file */
1177  /* The first line is used to indicate the line number in the user
1178  * source file
1179  */
1181  }
1182  else
1183  pips_internal_error("C_line_number not resetted\n");
1184 
1185  C_line_increment = 1;
1186 
1187  /* Some check on it first? It should have been disallocated by reset_current_C_line_number() */
1188  make_line_number_stack();
1189  make_absolute_line_number_stack();
1190 }
1191 
1192 /* The line number stack, designed for structured control structure, is
1193  not used yet. */
1195 {
1196  int ln = get_current_C_line_number();
1197 
1198  line_number_push(ln);
1199  absolute_line_number_push(c_lineno);
1200 }
1201 
1203 {
1204  int ln = line_number_pop();
1205  c_lineno = absolute_line_number_pop();
1206 
1207  return ln;
1208 }
1209 
1211 {
1216 
1217  if(!line_number_empty_p()) {
1218  pips_internal_error("Line number stack is not empty\n");
1219  }
1220  free_line_number_stack();
1221  free_absolute_line_number_stack();
1222 }
1223 
1225 {
1230 
1231  free_line_number_stack();
1232  free_absolute_line_number_stack();
1233 }
1234 ␌
1235 /* Comment management:
1236 
1237  - comments within declarations are misplaced (because there is no
1238  corresponding attachment point)
1239 
1240  - comments for structured control structures such as "for", "switch",
1241  "while",... are stacked so that we can get them back when building
1242  the statement at the end of the statement;
1243 
1244  "do .... while()" is not handled properly; "else" cannot carry a
1245  comment, because the "while" and "else" do not really exist in the
1246  RI;
1247 
1248  - the comments for other statements are the current comments
1249 
1250  - end-of-line comments placed after a statement are stored as comment
1251  for the next statement
1252 
1253  - end-of-line before comments that can be retained by the C parser are
1254  gathered with the comment
1255 
1256  - comments appearing by the end of a block are lost (no NOP statement
1257  is generated to carry them yet)
1258 
1259  - linefeed and comments inside a statement are collected as a comment
1260  before statement (some weird impact on print-out may occur); same as
1261  for declaration statements, but less frequent
1262 
1263  - some comments are still ignored, although available (to be implemented)
1264 */
1265 
1267 /* To see if comments are collected within a statement or outside it is pretty easy to turn it on. It is more difficult to turn it off. */
1268 static bool token_has_been_seen_p = false;
1269 
1271 
1272 DEFINE_LOCAL_STACK(comments, string)
1273 
1274 static int bracket_depth = -1;
1275 
1276 /* Return the current comment as a string to be freed by the caller and
1277  reset the current comment. If the current comment is undefined, returns
1278  a copy of the empty string, "".
1279 
1280  Reset also the current comment.
1281  */
1283 {
1284  string cc = C_current_comment;
1286  if (cc != string_undefined) {
1287  if (cc[0] == '\n') {
1288  /* If the comment begins with a new-line, it is indeed the new-line
1289  that ends the previous statement, so skip it. Quicker than strlen()
1290  + memmove(): */
1291  char * p = &cc[0];
1292  do {
1293  p[0] = p[1];
1294  }
1295  while (*p++ != '\0');
1296  /* Note there won't be a memory leak since the orginal '\0' is in the
1297  malloc() bloc to be free()ed anyway... */
1298  }
1299  /* If the comment is only an empty one, do not retain it: */
1300  if (cc[0] == '\0') {
1301  /* Do retain it to keep the statement data structure easy to use, allowing strdup() on its text fields */
1302  //free(cc);
1303  //cc = string_undefined;
1304  ;
1305  }
1306  else {
1307  /* Remove the trailing new-line if any since the RI is already
1308  line-oriented at the comment level: This is already done above. */
1309  char * last_newline = strrchr(cc, '\n');
1310  if (last_newline != NULL && last_newline[1] == '\0') {
1311  /* It is a trailing new-line: just get rid of it: */
1312  //last_newline[0] = '\0';
1313  ;
1314  }
1315  }
1316  }
1317  else
1318  cc = strdup("");
1319  /* pips_debug(3, "get_current_C_comment comment \"%s\"\n",
1320  cc); */
1321  // Too early
1322  // token_has_been_seen_p = false;
1323  return cc;
1324 }
1325 
1326 /* Push the current C comment so that we can get it back when building the
1327  statement later
1328 
1329  This reset the current comment through get_current_C_comment()
1330 */
1332 {
1333  string cc = get_current_C_comment();
1334 
1335  if (string_undefined_p(cc))
1336  pips_debug(3, "empty comment pushed at line %d\n",
1338  else
1339  pips_debug(3, "comment \"%s\" pushed at line %d\n", cc,
1341  comments_push(cc);
1342 }
1343 
1344 /* Pop the current comment.
1345 
1346  @return the previous current comment.
1347 
1348  This is typically used at the end of a statement to be built.
1349 
1350  Note this do not set the current comment. Strange API...
1351 */
1353 {
1354  string cc = comments_pop();
1355  if (string_undefined_p(cc))
1356  pips_debug(3, "empty comment popped at line %d\n",
1358  else
1359  pips_debug(3, "comment \"%s\" popped at line %d\n", cc,
1361  return cc;
1362 }
1363 
1364 /* Add a comment to the current one */
1365 void update_C_comment(string a_comment)
1366 {
1367  /* Do not add LFs that appear within a statement */
1368  bool is_LF_p = *a_comment=='\n' && *(a_comment+1)=='\000';
1369  if(!(token_has_been_seen_p && a_comment!=NULL
1370  && is_LF_p)) {
1371  string new_comment = string_undefined;
1372  // FI: seems to imply that concatenate accepts string_undefined as an argument...
1374  /* Do not concatenate two comments without a LF */
1375  if(l>0 && *(C_current_comment+l-1)!='\n' && !is_LF_p)
1376  new_comment = strdup(concatenate(C_current_comment, "\n", a_comment, NULL));
1377  else
1378  new_comment = strdup(concatenate(C_current_comment, a_comment, NULL));
1379 
1382  C_current_comment = new_comment;
1383  }
1384  else {
1385  static int c = 0;
1386  c++;
1387  pips_debug(8, "LF ignored: %d\n", c++);
1388  }
1389 
1390  pips_debug(3,"update_C_comment %s\n",
1392  "still undefined" : C_current_comment);
1393 }
1394 
1395 /* Remove "extra_LF" trailing LF from C_current_comment if they can be
1396  * found at the end of the comment string.
1397  */
1398 void remove_LFs_from_C_comment(int extra_LF)
1399 {
1401  int l = strlen(C_current_comment);
1402  int c = 0;
1403  char * p = C_current_comment+l-1;
1404  pips_debug(3,"begin: %s\n", C_current_comment);
1405  // pips_assert("The comment string is longer than the number of LF to remove\n",
1406  // extra_LF<=l);
1407  if(extra_LF<=l) {
1408  while(c<extra_LF && *p=='\n') {
1409  c++;
1410  *p = '\000';
1411  p--;
1412  }
1413  if(c==extra_LF) { // We are fine
1414  ;
1415  }
1416  else {
1417  // Should be a pips_internal_warning()
1418  pips_user_warning("%d extraneous LF left in comment\n", extra_LF-c);
1419  }
1420  }
1421  pips_debug(3,"end: %s\n", C_current_comment);
1422  }
1423 }
1424 
1425 /* Discard a C comment because we don't know how to deal with it */
1427 {
1430  == strlen(C_current_comment)) {
1431  /* The comments are only made of '\n', just silently discarding them */
1432  pips_debug(3,"The \\n are lost, so the code presentation may be wrong...\n");
1433  }
1434  else {
1435  /*
1436  pips_user_warning("Comment \"%s\" is lost at line %d, "
1437  "probably because comments cannot be attached to declarations.\n",
1438  C_current_comment, C_line_number);
1439  */
1440  pips_debug(8, "Comment \"%s\" is lost at line %d, "
1441  "probably because comments cannot be attached to declarations.\n",
1443  }
1446  }
1447 }
1448 
1449 /* reset and reset_error should be handled differently */
1450 void reset_C_comment(bool is_compilation_unit_p)
1451 {
1455  }
1456  /* Comments in the compilation unit are lost because they are related only to
1457  declarations and because comments on declarations are lost. Also, comments
1458  located at the end of a block are lost, as we do not generate an extra NOP to carry them. */
1459  if(!is_compilation_unit_p && !comments_empty_p()) {
1460  int count = 0;
1461  pips_user_warning("Comments stack is not empty (only meaningful comments are shown):\n");
1462  while(!comments_empty_p()) {
1463  string c = comments_pop();
1464  count++;
1465  if(strcmp(c, "\n")!=0)
1466  fprintf(stderr, "Element %d: \"%s\"\n", count, c);
1467  free(c);
1468  }
1469  /* pips_internal_error("Comments stack is not empty\n"); */
1470  }
1471  clear_C_comment();
1472  free_comments_stack();
1473  bracket_depth = -1;
1474  token_has_been_seen_p = false;
1475 }
1476 
1477 void error_reset_C_comment(bool is_compilation_unit_p __attribute__ ((__unused__)))
1478 {
1482  }
1483  clear_C_comment();
1484  free_comments_stack();
1485  bracket_depth = -1;
1486  token_has_been_seen_p = false;
1487 }
1488 
1490 {
1494  }
1495  /* Comments in the compilation unit and outside of function bodies
1496  are lost because they are related only to
1497  declarations and because comments on declarations are lost.*/
1498  if(!comments_empty_p()) {
1499  int count = 0;
1500  pips_debug(3, "Comments stack is not empty:\n");
1501  while(!comments_empty_p()) {
1502  string c = comments_pop();
1503  count++;
1504  pips_debug(3, "Element %d: \"%s\"\n",
1505  count, string_undefined_p(c) ? "string undefined" : c);
1506  if(!string_undefined_p(c))
1507  free(c);
1508  }
1509  }
1510  pips_assert("The comment stack is empty\n", comments_empty_p());
1511 }
1512 
1514 {
1515  bracket_depth = 0;
1517  pips_internal_error("Missing reset for C_current_comment");
1518  }
1519  if(!stack_undefined_p(comments_stack) && !STACK_NULL_P(comments_stack) && !comments_empty_p()) {
1520  pips_internal_error("Comment stack is not empty");
1521  }
1522  make_comments_stack();
1523  token_has_been_seen_p = false;
1524 }
1525 ␌
1526 /* compatibility layer for BSD */
1527 static void bsd_rewrite(char ** pyytext) {
1528  char* aliases [][2] = {
1529  { "__stdinp", "stdin" },
1530  { "__stdoutp", "stdout" },
1531  { "__stderrp", "stderr" },
1532  { "__isnanl", "isnanl" },
1533  { "__isnanf", "isnanf" },
1534  { "__isnan", "isnan" },
1535  { NULL, NULL }
1536  };
1537  for(char *(*iter)[2] = &aliases[0] ; (*iter)[0] ; ++iter) {
1538  if(same_string_p(*pyytext, (*iter)[0] )) {
1539  *pyytext=(*iter)[1];
1540  break;
1541  }
1542  }
1543 }
1544 ␌
1545 /* The lexer cannot handle the ambiguity between named types and
1546  * variables without extra-help.
1547  *
1548  * This piece of code is copied from preprocessor/lexer.l.
1549  */
1550 
1551 #define TOKEN_UNDEFINED (-1)
1553 //static int penultimate_keyword_token = TOKEN_UNDEFINED;
1554 
1555 /* This is going to be the previous token because LEXER_RETURN is not
1556 used in case the lexer handles either a named type or a variable. */
1557 #define LEXER_RETURN(t) \
1558  return(token_has_been_seen_p = true, \
1559  /*penultimate_keyword_token=previous_keyword_token,*/ \
1560  previous_keyword_token=t)
1561 /* Some tokens, such as { and } do not mean that a statement has been entered */
1562 #define SIMPLE_LEXER_RETURN(t) \
1563  return( \
1564  /*penultimate_keyword_token=previous_keyword_token,*/ \
1565  previous_keyword_token=t)
1566 
1567 /* See if id is a keyword, a typedef or an identifier.
1568  * Returns the token number for keywords and typedefs.
1569  * Returns 0 for variable identifiers.
1570  *
1571  * The new typedefs are stored by c_parser_put_new_typedef().
1572  */
1573 static int is_c_parser_keyword_typedef(char * id)
1574 {
1575  token_has_been_seen_p = true;
1576  /* No need to bother for scopes when dealing with C keywords,
1577  * but do not take into account top-level typedefs which may be masked.
1578  */
1579  int t = is_c_keyword_typedef(id);
1580  if(t==0 || t==TK_NAMED_TYPE) {
1581  // id may be a keyword, but scopes must be used
1582  //string sn = get_preprocessor_current_scope();
1583  string sn = get_c_parser_current_scope();
1584  string scoped_id = strdup(concatenate(id, "%", sn, NULL));
1585  t = is_c_keyword_typedef(scoped_id);
1586  free(scoped_id);
1587  if(t == 0) {
1588  // int i, n = preprocessor_scope_number();
1589  int i, n = c_parser_number_of_scopes();
1590  for(i=2; i<=n && t==0; i++) {
1591  // sn = get_preprocessor_nth_scope(i);
1592  sn = get_c_parser_nth_scope(i);
1593  scoped_id = strdup(concatenate(id, "%", sn, NULL));
1594  t = is_c_keyword_typedef(scoped_id);
1595  ifdebug(1) {
1596  if(t==TK_NAMED_TYPE)
1597  fprintf(stderr, "Token \"%s\" identified as TK_NAMED_TYPE.\n",
1598  scoped_id);
1599  }
1600  free(scoped_id);
1601  }
1602  /* Check again for a global typedef */
1603  t = is_c_keyword_typedef(id);
1604  }
1605  }
1606 #define TK_TYPE_P(tk) \
1607  ((tk)==TK_CHAR || (tk)==TK_INT || \
1608  (tk)==TK_DOUBLE || (tk)==TK_FLOAT || (tk)==TK_COMPLEX || \
1609  (tk)==TK_ENUM || (tk)==TK_STRUCT || (tk)==TK_UNION || \
1610  (tk)==TK_SIGNED|| (tk)==TK_UNSIGNED|| (tk)==TK_LONG|| (tk)==TK_SHORT ||\
1611  (tk)==TK_RETURN)
1612  if(t==TK_NAMED_TYPE
1615  //if(penultimate_keyword_token!=TK_TYPEDEF) {
1616  // Identifier
1617  t = 0;
1618  pips_debug(1, "Token \"%s\" is in fact assumed to be an identifier.\n",
1619  id);
1620  //}
1621  }
1622  if(t==TK_STATIC && bracket_depth>0)
1623  t = TK_STATIC_DIMENSION;
1625  pips_debug(5, "Token \"%s\" is assumed to be %d.\n", id, t);
1626  return t;
1627 }
1628 
1629 #line 1630 "<stdout>"
1630 /* This should be used instead of the manual computation of
1631  * C_line_number... but C_line_number is adjusted according to the
1632  * preprocessor line pragmas.
1633  */
1634 #line 615 "clex.l"
1635  /* To deal more cleanly with the comments:
1636  %x COMMENT
1637  */
1638  /* To deal cleanly with complex pragma line escape, use a separate state: */
1639 
1640  /* From C norm A.1: */
1641 /* " */
1642 #line 1643 "<stdout>"
1643 
1644 #define INITIAL 0
1645 #define the_end_of_pragma 1
1646 
1647 #ifndef YY_NO_UNISTD_H
1648 /* Special case for "unistd.h", since it is non-ANSI. We include it way
1649  * down here because we want the user's section 1 to have been scanned first.
1650  * The user has a chance to override it with an option.
1651  */
1652 #include <unistd.h>
1653 #endif
1654 
1655 #ifndef YY_EXTRA_TYPE
1656 #define YY_EXTRA_TYPE void *
1657 #endif
1658 
1659 static int yy_init_globals ( void );
1660 
1661 /* Accessor methods to globals.
1662  These are made visible to non-reentrant scanners for convenience. */
1663 
1664 int yylex_destroy ( void );
1665 
1666 int yyget_debug ( void );
1667 
1668 void yyset_debug ( int debug_flag );
1669 
1670 YY_EXTRA_TYPE yyget_extra ( void );
1671 
1672 void yyset_extra ( YY_EXTRA_TYPE user_defined );
1673 
1674 FILE *yyget_in ( void );
1675 
1676 void yyset_in ( FILE * _in_str );
1677 
1678 FILE *yyget_out ( void );
1679 
1680 void yyset_out ( FILE * _out_str );
1681 
1682  int yyget_leng ( void );
1683 
1684 char *yyget_text ( void );
1685 
1686 int yyget_lineno ( void );
1687 
1688 void yyset_lineno ( int _line_number );
1689 
1690 /* Macros after this point can all be overridden by user definitions in
1691  * section 1.
1692  */
1693 
1694 #ifndef YY_SKIP_YYWRAP
1695 #ifdef __cplusplus
1696 extern "C" int yywrap ( void );
1697 #else
1698 extern int yywrap ( void );
1699 #endif
1700 #endif
1701 
1702 #ifndef YY_NO_UNPUT
1703 
1704 #endif
1705 
1706 #ifndef yytext_ptr
1707 static void yy_flex_strncpy ( char *, const char *, int );
1708 #endif
1709 
1710 #ifdef YY_NEED_STRLEN
1711 static int yy_flex_strlen ( const char * );
1712 #endif
1713 
1714 #ifndef YY_NO_INPUT
1715 #ifdef __cplusplus
1716 static int yyinput ( void );
1717 #else
1718 static int input ( void );
1719 #endif
1720 
1721 #endif
1722 
1723 /* Amount of stuff to slurp up with each read. */
1724 #ifndef YY_READ_BUF_SIZE
1725 #ifdef __ia64__
1726 /* On IA-64, the buffer size is 16k, not 8k */
1727 #define YY_READ_BUF_SIZE 16384
1728 #else
1729 #define YY_READ_BUF_SIZE 8192
1730 #endif /* __ia64__ */
1731 #endif
1732 
1733 /* Copy whatever the last rule matched to the standard output. */
1734 #ifndef ECHO
1735 /* This used to be an fputs(), but since the string might contain NUL's,
1736  * we now use fwrite().
1737  */
1738 #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
1739 #endif
1740 
1741 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1742  * is returned in "result".
1743  */
1744 #ifndef YY_INPUT
1745 #define YY_INPUT(buf,result,max_size) \
1746  if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1747  { \
1748  int c = '*'; \
1749  int n; \
1750  for ( n = 0; n < max_size && \
1751  (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1752  buf[n] = (char) c; \
1753  if ( c == '\n' ) \
1754  buf[n++] = (char) c; \
1755  if ( c == EOF && ferror( yyin ) ) \
1756  YY_FATAL_ERROR( "input in flex scanner failed" ); \
1757  result = n; \
1758  } \
1759  else \
1760  { \
1761  errno=0; \
1762  while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
1763  { \
1764  if( errno != EINTR) \
1765  { \
1766  YY_FATAL_ERROR( "input in flex scanner failed" ); \
1767  break; \
1768  } \
1769  errno=0; \
1770  clearerr(yyin); \
1771  } \
1772  }\
1773 \
1774 
1775 #endif
1776 
1777 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1778  * we don't want an extra ';' after the "return" because that will cause
1779  * some compilers to complain about unreachable statements.
1780  */
1781 #ifndef yyterminate
1782 #define yyterminate() return YY_NULL
1783 #endif
1784 
1785 /* Number of entries by which start-condition stack grows. */
1786 #ifndef YY_START_STACK_INCR
1787 #define YY_START_STACK_INCR 25
1788 #endif
1789 
1790 /* Report a fatal error. */
1791 #ifndef YY_FATAL_ERROR
1792 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1793 #endif
1794 
1795 /* end tables serialization structures and prototypes */
1796 
1797 /* Default declaration of generated scanner - a define so the user can
1798  * easily add parameters.
1799  */
1800 #ifndef YY_DECL
1801 #define YY_DECL_IS_OURS 1
1802 
1803 extern int yylex (void);
1804 
1805 #define YY_DECL int yylex (void)
1806 #endif /* !YY_DECL */
1807 
1808 /* Code executed at the beginning of each rule, after yytext and yyleng
1809  * have been set up.
1810  */
1811 #ifndef YY_USER_ACTION
1812 #define YY_USER_ACTION
1813 #endif
1814 
1815 /* Code executed at the end of each rule. */
1816 #ifndef YY_BREAK
1817 #define YY_BREAK /*LINTED*/break;
1818 #endif
1819 
1820 #define YY_RULE_SETUP \
1821  if ( yyleng > 0 ) \
1822  YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
1823  (yytext[yyleng - 1] == '\n'); \
1824  YY_USER_ACTION
1825 
1826 /** The main scanner function which does all the work.
1827  */
1829 {
1830  yy_state_type yy_current_state;
1831  char *yy_cp, *yy_bp;
1832  int yy_act;
1833 
1834  if ( !(yy_init) )
1835  {
1836  (yy_init) = 1;
1837 
1838 #ifdef YY_USER_INIT
1839  YY_USER_INIT;
1840 #endif
1841 
1842  if ( ! (yy_start) )
1843  (yy_start) = 1; /* first start state */
1844 
1845  if ( ! yyin )
1846  yyin = stdin;
1847 
1848  if ( ! yyout )
1849  yyout = stdout;
1850 
1851  if ( ! YY_CURRENT_BUFFER ) {
1855  }
1856 
1858  }
1859 
1860  {
1861 #line 656 "clex.l"
1862 
1863 
1864 #line 1865 "<stdout>"
1865 
1866  while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
1867  {
1868  yy_cp = (yy_c_buf_p);
1869 
1870  /* Support of yytext. */
1871  *yy_cp = (yy_hold_char);
1872 
1873  /* yy_bp points to the position in yy_ch_buf of the start of
1874  * the current run.
1875  */
1876  yy_bp = yy_cp;
1877 
1878  yy_current_state = (yy_start);
1879  yy_current_state += YY_AT_BOL();
1880 yy_match:
1881  do
1882  {
1883  YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
1884  if ( yy_accept[yy_current_state] )
1885  {
1886  (yy_last_accepting_state) = yy_current_state;
1888  }
1889  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1890  {
1891  yy_current_state = (int) yy_def[yy_current_state];
1892  if ( yy_current_state >= 282 )
1893  yy_c = yy_meta[yy_c];
1894  }
1895  yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1896  ++yy_cp;
1897  }
1898  while ( yy_base[yy_current_state] != 838 );
1899 
1900 yy_find_action:
1901  yy_act = yy_accept[yy_current_state];
1902  if ( yy_act == 0 )
1903  { /* have to back up */
1905  yy_current_state = (yy_last_accepting_state);
1906  yy_act = yy_accept[yy_current_state];
1907  }
1908 
1910 
1912  {
1913  int yyl;
1914  for ( yyl = 0; yyl < yyleng; ++yyl )
1915  if ( yytext[yyl] == '\n' )
1916 
1917  yylineno++;
1918 ;
1919  }
1920 
1921 do_action: /* This label is used only to access EOF actions. */
1922 
1923  switch ( yy_act )
1924  { /* beginning of action switch */
1925  case 0: /* must back up */
1926  /* undo the effects of YY_DO_BEFORE_ACTION */
1927  *yy_cp = (yy_hold_char);
1929  yy_current_state = (yy_last_accepting_state);
1930  goto yy_find_action;
1931 
1932 case 1:
1933 /* rule 1 can match eol */
1935 #line 658 "clex.l"
1936 {
1937  /* Parse some potentially escaped line up to a normal new
1938  line that is the end of a pragma: */
1939  /* Return the pragma value without the final \n: */
1940  c_lval.string = strndup(yytext, strlen(yytext) - 1);
1942  BEGIN(INITIAL);
1944  }
1945  YY_BREAK
1946 case 2:
1947 /* rule 2 can match eol */
1949 #line 669 "clex.l"
1950 { // */
1951 
1952  pips_debug(9,"Comment %s\n",yytext);
1955  }
1956  YY_BREAK
1957 case 3:
1958 /* rule 3 can match eol */
1960 #line 676 "clex.l"
1961 {
1962 
1963  /* Look for a # followed by any whitespace and any
1964  backslashed end-of line, followed by "pragma" up to the
1965  end of line, dealing with any backslashed new lines: */
1966  pips_debug(1, "#pragma found: \"%s\"\n", yytext);
1967  /* To deal with complex line escape, put the end of the
1968  analysis in another rule: */
1970  }
1971  YY_BREAK
1972 case 4:
1973 /* rule 4 can match eol */
1975 #line 687 "clex.l"
1976 {
1977 
1978  // The current comment may be adjusted if required
1980  }
1981  YY_BREAK
1982 case 5:
1983 /* rule 5 can match eol */
1985 #line 693 "clex.l"
1986 {
1987  pips_debug(9,"New line %d, increment=%d, token_seen_p=%d\n", C_line_number, C_line_increment, token_has_been_seen_p);
1988 
1989  /* Gather a free "\n" as a comment to keep
1990  user presentation information. If it is
1991  in a place where we cannot store a
1992  comment in the RI, it will be silenty
1993  lost by update_C_comment(). */
1996  }
1997  YY_BREAK
1998 case 6:
2000 #line 705 "clex.l"
2001 {
2002  /* Eat up whitespaces */
2003  }
2004  YY_BREAK
2005 case 7:
2007 #line 709 "clex.l"
2008 {
2009  pips_debug(9,"_Pragma found in \"%s\"\n",yytext);
2011  }
2012  YY_BREAK
2013 case 8:
2014 /* rule 8 can match eol */
2016 #line 714 "clex.l"
2017 {
2018  /* Escaped character constants. Their
2019  syntax is understood in PIPS character
2020  constant construtors. */
2021  pips_debug(9,"TK_CHARCON: %s\n",yytext);
2024  }
2025  YY_BREAK
2026 case 9:
2027 /* rule 9 can match eol */
2029 #line 723 "clex.l"
2030 {
2031  /* Escaped wide character constants. Their
2032  syntax is understood in PIPS character
2033  constant construtors. */
2034  pips_debug(9,"TK_CHARCON wide character constant: %s\n",yytext);
2037  }
2038  YY_BREAK
2039 case 10:
2040 /* rule 10 can match eol */
2042 #line 732 "clex.l"
2043 {
2044  pips_debug(9,"TK_STRINGCON regular or wide string: %s\n",yytext);
2045  /* the "world" in L"Hello, " "world"
2046  should be treated as wide even though
2047  there's no L immediately preceding
2048  it */
2049  /* Indeed there is no special caracter
2050  handling here since it is done
2051  somewhere else in PIPS in the constant
2052  string constructor. */
2055  }
2056  YY_BREAK
2057 case 11:
2058 /* rule 11 can match eol */
2060 #line 746 "clex.l"
2061 {
2062  pips_debug(9,"TK_WSTRINGCON wide string: %s\n",yytext);
2065  }
2066  YY_BREAK
2067 case 12:
2069 #line 751 "clex.l"
2070 {
2071  pips_debug(9,"TK_FLOATCON %s\n",yytext);
2074  }
2075  YY_BREAK
2076 case 13:
2078 #line 756 "clex.l"
2079 {
2080  pips_debug(5,"TK_COMPLEXCON %s\n",yytext);
2083  }
2084  YY_BREAK
2085 case 14:
2087 #line 761 "clex.l"
2088 {
2089  pips_debug(9,"Hexnum TK_INTCON %s\n",yytext);
2092  }
2093  YY_BREAK
2094 case 15:
2096 #line 766 "clex.l"
2097 {
2098  pips_debug(9,"Octnum TK_INTCON %s\n",yytext);
2101  }
2102  YY_BREAK
2103 case 16:
2105 #line 771 "clex.l"
2106 {
2107  pips_debug(9,"TK_INTCON %s\n",yytext);
2110  }
2111  YY_BREAK
2112 case 17:
2114 #line 776 "clex.l"
2115 {
2116  pips_debug(9,"TK_EOF %s\n",yytext);
2117  yyterminate();
2118  }
2119  YY_BREAK
2120 case 18:
2122 #line 780 "clex.l"
2123 {
2124  pips_debug(9,"TK_ELLIPSIS %s\n",yytext);
2126  }
2127  YY_BREAK
2128 case 19:
2130 #line 784 "clex.l"
2131 {
2132  pips_debug(9,"TK_PLUS_EQ %s\n",yytext);
2134  }
2135  YY_BREAK
2136 case 20:
2138 #line 788 "clex.l"
2139 {
2140  pips_debug(9,"TK_MINUS_EQ %s\n",yytext);
2142  }
2143  YY_BREAK
2144 case 21:
2146 #line 792 "clex.l"
2147 {
2148  pips_debug(9,"TK_STAR_EQ %s\n",yytext);
2150  }
2151  YY_BREAK
2152 case 22:
2154 #line 796 "clex.l"
2155 {
2156  pips_debug(9,"TK_SLASH_EQ %s\n",yytext);
2158  }
2159  YY_BREAK
2160 case 23:
2162 #line 800 "clex.l"
2163 {
2164  pips_debug(9,"TK_PERCENT_EQ %s\n",yytext);
2166  }
2167  YY_BREAK
2168 case 24:
2170 #line 804 "clex.l"
2171 {
2172  pips_debug(9,"TK_PIPE_EQ %s\n",yytext);
2174  }
2175  YY_BREAK
2176 case 25:
2178 #line 808 "clex.l"
2179 {
2180  pips_debug(9,"TK_AND_EQ %s\n",yytext);
2182  }
2183  YY_BREAK
2184 case 26:
2186 #line 812 "clex.l"
2187 {
2188  pips_debug(9,"TK_CIRC_EQ %s\n",yytext);
2190  }
2191  YY_BREAK
2192 case 27:
2194 #line 816 "clex.l"
2195 {
2196  pips_debug(9,"TK_INF_INF_EQ %s\n",yytext);
2198  }
2199  YY_BREAK
2200 case 28:
2202 #line 820 "clex.l"
2203 {
2204  pips_debug(9,"TK_SUP_SUP_EQ %s\n",yytext);
2206  }
2207  YY_BREAK
2208 case 29:
2210 #line 824 "clex.l"
2211 {
2212  pips_debug(9,"TK_INF_INF %s\n",yytext);
2214  }
2215  YY_BREAK
2216 case 30:
2218 #line 828 "clex.l"
2219 {
2220  pips_debug(9,"TK_SUP_SUP %s\n",yytext);
2222  }
2223  YY_BREAK
2224 case 31:
2226 #line 832 "clex.l"
2227 {
2228  pips_debug(9,"TK_EQ_EQ %s\n",yytext);
2230  }
2231  YY_BREAK
2232 case 32:
2234 #line 836 "clex.l"
2235 {
2236  pips_debug(9,"TK_EXCLAM_EQ %s\n",yytext);
2238  }
2239  YY_BREAK
2240 case 33:
2242 #line 840 "clex.l"
2243 {
2244  pips_debug(9,"TK_INF_EQ %s\n",yytext);
2246  }
2247  YY_BREAK
2248 case 34:
2250 #line 844 "clex.l"
2251 {
2252  pips_debug(9,"TK_SUP_EQ %s\n",yytext);
2254  }
2255  YY_BREAK
2256 case 35:
2258 #line 848 "clex.l"
2259 {
2260  pips_debug(9,"TK_EQ %s\n",yytext);
2262  }
2263  YY_BREAK
2264 case 36:
2266 #line 852 "clex.l"
2267 {
2268  pips_debug(9,"TK_INF %s\n",yytext);
2270  }
2271  YY_BREAK
2272 case 37:
2274 #line 856 "clex.l"
2275 {
2276  pips_debug(9,"TK_SUP %s\n",yytext);
2278  }
2279  YY_BREAK
2280 case 38:
2282 #line 860 "clex.l"
2283 {
2284  pips_debug(9,"TK_PLUS_PLUS %s\n",yytext);
2286  }
2287  YY_BREAK
2288 case 39:
2290 #line 864 "clex.l"
2291 {
2292  pips_debug(9,"TK_MINUS_MINUS %s\n",yytext);
2294  }
2295  YY_BREAK
2296 case 40:
2298 #line 868 "clex.l"
2299 {
2300  pips_debug(9,"TK_ARROW %s\n",yytext);
2302  }
2303  YY_BREAK
2304 case 41:
2306 #line 872 "clex.l"
2307 {
2308  pips_debug(9,"TK_PLUS %s\n",yytext);
2310  }
2311  YY_BREAK
2312 case 42:
2314 #line 876 "clex.l"
2315 {
2316  pips_debug(9,"TK_MINUS %s\n",yytext);
2318  }
2319  YY_BREAK
2320 case 43:
2322 #line 880 "clex.l"
2323 {
2324  pips_debug(9,"TK_STAR %s\n",yytext);
2326  }
2327  YY_BREAK
2328 case 44:
2330 #line 884 "clex.l"
2331 {
2332  pips_debug(9,"TK_SLASH %s\n",yytext);
2334  }
2335  YY_BREAK
2336 case 45:
2338 #line 888 "clex.l"
2339 {
2340  pips_debug(9,"TK_PERCENT %s\n",yytext);
2342  }
2343  YY_BREAK
2344 case 46:
2346 #line 892 "clex.l"
2347 {
2348  pips_debug(9,"TK_EXCLAM %s\n",yytext);
2350  }
2351  YY_BREAK
2352 case 47:
2354 #line 896 "clex.l"
2355 {
2356  pips_debug(9,"TK_AND_AND %s\n",yytext);
2358  }
2359  YY_BREAK
2360 case 48:
2362 #line 900 "clex.l"
2363 {
2364  pips_debug(9,"TK_PIPE_PIPE %s\n",yytext);
2366  }
2367  YY_BREAK
2368 case 49:
2370 #line 904 "clex.l"
2371 {
2372  pips_debug(9,"TK_AND %s\n",yytext);
2374  }
2375  YY_BREAK
2376 case 50:
2378 #line 908 "clex.l"
2379 {
2380  pips_debug(9,"TK_PIPE %s\n",yytext);
2382  }
2383  YY_BREAK
2384 case 51:
2386 #line 912 "clex.l"
2387 {
2388  pips_debug(9,"TK_CIRC %s\n",yytext);
2390  }
2391  YY_BREAK
2392 case 52:
2394 #line 916 "clex.l"
2395 {
2396  pips_debug(9,"TK_QUEST %s\n",yytext);
2398  }
2399  YY_BREAK
2400 case 53:
2402 #line 920 "clex.l"
2403 {
2404  pips_debug(9,"TK_COLON %s\n",yytext);
2406  }
2407  YY_BREAK
2408 case 54:
2410 #line 924 "clex.l"
2411 {
2412  pips_debug(9,"TK_TILDE %s\n",yytext);
2414  }
2415  YY_BREAK
2416 case 55:
2418 #line 928 "clex.l"
2419 {
2420  pips_debug(9,"TK_LBRACE %s\n",yytext);
2421  // We do not know what to do for a block,
2422  // but we would like to keep them for struct
2423  // and union declaration
2424  //discard_C_comment();
2426  }
2427  YY_BREAK
2428 case 56:
2430 #line 936 "clex.l"
2431 {
2432  pips_debug(9,"TK_RBRACE %s\n",yytext);
2433  //discard_C_comment();
2435  }
2436  YY_BREAK
2437 case 57:
2439 #line 941 "clex.l"
2440 {
2441  pips_debug(9,"TK_LBRACKET %s\n",yytext);
2442  bracket_depth++;
2444  }
2445  YY_BREAK
2446 case 58:
2448 #line 946 "clex.l"
2449 {
2450  pips_debug(9,"TK_RBRACKET %s\n",yytext);
2451  bracket_depth--;
2453  }
2454  YY_BREAK
2455 case 59:
2457 #line 951 "clex.l"
2458 {
2459  pips_debug(9,"TK_LPAREN %s\n",yytext);
2461  }
2462  YY_BREAK
2463 case 60:
2465 #line 955 "clex.l"
2466 {
2467  pips_debug(9,"TK_RPAREN %s\n",yytext);
2469  }
2470  YY_BREAK
2471 case 61:
2473 #line 959 "clex.l"
2474 {
2475  pips_debug(9,"TK_SEMICOLON %s\n",yytext);
2476  /* discard_C_comment(); */
2478  }
2479  YY_BREAK
2480 case 62:
2482 #line 964 "clex.l"
2483 {
2484  pips_debug(9,"TK_COMMA %s\n",yytext);
2486  }
2487  YY_BREAK
2488 case 63:
2490 #line 968 "clex.l"
2491 {
2492  pips_debug(9,"TK_DOT %s\n",yytext);
2494  }
2495  YY_BREAK
2496 case 64:
2498 #line 972 "clex.l"
2499 {
2500  pips_debug(9,"TK_SIZEOF %s\n",yytext);
2502  }
2503  YY_BREAK
2504 case 65:
2506 #line 976 "clex.l"
2507 {
2508  pips_debug(9,"TK_ASM %s\n",yytext);
2510  }
2511  YY_BREAK
2512 case 66:
2514 #line 980 "clex.l"
2515 {
2516  /* convert __va_list from bsd into __builtin_va_list */
2517  pips_debug(5,"TK_VA_LIST %s\n",yytext);
2518  yytext = strdup("__builtin_va_list");
2519  int t = is_c_keyword_typedef(yytext);
2520  pips_assert("builtin valist found\n",t>0);
2521  pips_debug(9,"Keyword or typedef name: %s\n",yytext);
2523  LEXER_RETURN(t);
2524 }
2525  YY_BREAK
2526 case 67:
2528 #line 991 "clex.l"
2529 {
2530  pips_user_warning("gcc extension keyword \"__extension__\" is ignored\n");
2531  }
2532  YY_BREAK
2533 case 68:
2535 #line 994 "clex.l"
2536 {
2537  pips_user_warning("gcc extension keyword \"__inline\" is ignored\n");
2538  }
2539  YY_BREAK
2540 case 69:
2542 #line 997 "clex.l"
2543 {
2544  pips_user_warning("gcc extension keyword \"__inline__\" is ignored\n");
2545  }
2546  YY_BREAK
2547 case 70:
2549 #line 1000 "clex.l"
2550 {
2551  pips_user_warning("gcc extension keyword \"__signed__\" is ignored\n");
2552  }
2553  YY_BREAK
2554 case 71:
2556 #line 1003 "clex.l"
2557 {
2558  bsd_rewrite(&yytext);
2559  /* C keywords or identifiers */
2561  if (t>0)
2562  {
2563  pips_debug(9,"Keyword or typedef name: %s\n",yytext);
2565  /* Some comments are lost, but not especially in declarations
2566  because type keywords may appear in casts */
2567  if(t==TK_ELSE /*|| (t>=TK_CHAR && t <=TK_REGISTER)*/ )
2569  //No LEXER_RETURN in this case: beware!
2570  return(t);
2571  }
2572  else
2573  {
2574  pips_debug(9,"Identifier: %s\n",yytext);
2576  /* push_current_C_comment(); */
2578  }
2579  }
2580  YY_BREAK
2581 case YY_STATE_EOF(INITIAL):
2583 #line 1026 "clex.l"
2584 {
2585  pips_debug(9,"TK_EOF %s\n",yytext);
2587  }
2588  YY_BREAK
2589 case 72:
2591 #line 1030 "clex.l"
2592 {
2593  pips_user_warning("Unrecognized character %s\n",yytext);
2594  }
2595  YY_BREAK
2596 case 73:
2598 #line 1033 "clex.l"
2599 ECHO;
2600  YY_BREAK
2601 #line 2602 "<stdout>"
2602 
2603  case YY_END_OF_BUFFER:
2604  {
2605  /* Amount of text matched not including the EOB char. */
2606  int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
2607 
2608  /* Undo the effects of YY_DO_BEFORE_ACTION. */
2609  *yy_cp = (yy_hold_char);
2611 
2612  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
2613  {
2614  /* We're scanning a new file or input source. It's
2615  * possible that this happened because the user
2616  * just pointed yyin at a new source and called
2617  * yylex(). If so, then we have to assure
2618  * consistency between YY_CURRENT_BUFFER and our
2619  * globals. Here is the right place to do so, because
2620  * this is the first action (other than possibly a
2621  * back-up) that will match for the new input source.
2622  */
2623  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2624  YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
2625  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
2626  }
2627 
2628  /* Note that here we test for yy_c_buf_p "<=" to the position
2629  * of the first EOB in the buffer, since yy_c_buf_p will
2630  * already have been incremented past the NUL character
2631  * (since all states make transitions on EOB to the
2632  * end-of-buffer state). Contrast this with the test
2633  * in input().
2634  */
2635  if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2636  { /* This was really a NUL. */
2637  yy_state_type yy_next_state;
2638 
2639  (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
2640 
2641  yy_current_state = yy_get_previous_state( );
2642 
2643  /* Okay, we're now positioned to make the NUL
2644  * transition. We couldn't have
2645  * yy_get_previous_state() go ahead and do it
2646  * for us because it doesn't know how to deal
2647  * with the possibility of jamming (and we don't
2648  * want to build jamming into it because then it
2649  * will run more slowly).
2650  */
2651 
2652  yy_next_state = yy_try_NUL_trans( yy_current_state );
2653 
2655 
2656  if ( yy_next_state )
2657  {
2658  /* Consume the NUL. */
2659  yy_cp = ++(yy_c_buf_p);
2660  yy_current_state = yy_next_state;
2661  goto yy_match;
2662  }
2663 
2664  else
2665  {
2666  yy_cp = (yy_c_buf_p);
2667  goto yy_find_action;
2668  }
2669  }
2670 
2671  else switch ( yy_get_next_buffer( ) )
2672  {
2673  case EOB_ACT_END_OF_FILE:
2674  {
2676 
2677  if ( yywrap( ) )
2678  {
2679  /* Note: because we've taken care in
2680  * yy_get_next_buffer() to have set up
2681  * yytext, we can now set up
2682  * yy_c_buf_p so that if some total
2683  * hoser (like flex itself) wants to
2684  * call the scanner after we return the
2685  * YY_NULL, it'll still work - another
2686  * YY_NULL will get returned.
2687  */
2689 
2691  goto do_action;
2692  }
2693 
2694  else
2695  {
2696  if ( ! (yy_did_buffer_switch_on_eof) )
2697  YY_NEW_FILE;
2698  }
2699  break;
2700  }
2701 
2702  case EOB_ACT_CONTINUE_SCAN:
2703  (yy_c_buf_p) =
2704  (yytext_ptr) + yy_amount_of_matched_text;
2705 
2706  yy_current_state = yy_get_previous_state( );
2707 
2708  yy_cp = (yy_c_buf_p);
2710  goto yy_match;
2711 
2712  case EOB_ACT_LAST_MATCH:
2713  (yy_c_buf_p) =
2714  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
2715 
2716  yy_current_state = yy_get_previous_state( );
2717 
2718  yy_cp = (yy_c_buf_p);
2720  goto yy_find_action;
2721  }
2722  break;
2723  }
2724 
2725  default:
2727  "fatal flex scanner internal error--no action found" );
2728  } /* end of action switch */
2729  } /* end of scanning one token */
2730  } /* end of user's declarations */
2731 } /* end of yylex */
2732 
2733 /* yy_get_next_buffer - try to read in a new buffer
2734  *
2735  * Returns a code representing an action:
2736  * EOB_ACT_LAST_MATCH -
2737  * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2738  * EOB_ACT_END_OF_FILE - end of file
2739  */
2740 static int yy_get_next_buffer (void)
2741 {
2742  char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
2743  char *source = (yytext_ptr);
2744  int number_to_move, i;
2745  int ret_val;
2746 
2747  if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
2749  "fatal flex scanner internal error--end of buffer missed" );
2750 
2751  if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
2752  { /* Don't try to fill the buffer, so this is an EOF. */
2753  if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
2754  {
2755  /* We matched a single character, the EOB, so
2756  * treat this as a final EOF.
2757  */
2758  return EOB_ACT_END_OF_FILE;
2759  }
2760 
2761  else
2762  {
2763  /* We matched some text prior to the EOB, first
2764  * process it.
2765  */
2766  return EOB_ACT_LAST_MATCH;
2767  }
2768  }
2769 
2770  /* Try to read more data. */
2771 
2772  /* First move last chars to start of buffer. */
2773  number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
2774 
2775  for ( i = 0; i < number_to_move; ++i )
2776  *(dest++) = *(source++);
2777 
2778  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2779  /* don't do the read, it's not guaranteed to return an EOF,
2780  * just force an EOF
2781  */
2782  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
2783 
2784  else
2785  {
2786  int num_to_read =
2787  YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
2788 
2789  while ( num_to_read <= 0 )
2790  { /* Not enough room in the buffer - grow it. */
2791 
2792  /* just a shorter name for the current buffer */
2794 
2795  int yy_c_buf_p_offset =
2796  (int) ((yy_c_buf_p) - b->yy_ch_buf);
2797 
2798  if ( b->yy_is_our_buffer )
2799  {
2800  int new_size = b->yy_buf_size * 2;
2801 
2802  if ( new_size <= 0 )
2803  b->yy_buf_size += b->yy_buf_size / 8;
2804  else
2805  b->yy_buf_size *= 2;
2806 
2807  b->yy_ch_buf = (char *)
2808  /* Include room in for 2 EOB chars. */
2809  yyrealloc( (void *) b->yy_ch_buf,
2810  (yy_size_t) (b->yy_buf_size + 2) );
2811  }
2812  else
2813  /* Can't grow it, we don't own it. */
2814  b->yy_ch_buf = NULL;
2815 
2816  if ( ! b->yy_ch_buf )
2818  "fatal error - scanner input buffer overflow" );
2819 
2820  (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
2821 
2822  num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
2823  number_to_move - 1;
2824 
2825  }
2826 
2827  if ( num_to_read > YY_READ_BUF_SIZE )
2828  num_to_read = YY_READ_BUF_SIZE;
2829 
2830  /* Read in more data. */
2831  YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2832  (yy_n_chars), num_to_read );
2833 
2834  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2835  }
2836 
2837  if ( (yy_n_chars) == 0 )
2838  {
2839  if ( number_to_move == YY_MORE_ADJ )
2840  {
2841  ret_val = EOB_ACT_END_OF_FILE;
2842  yyrestart( yyin );
2843  }
2844 
2845  else
2846  {
2847  ret_val = EOB_ACT_LAST_MATCH;
2848  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
2850  }
2851  }
2852 
2853  else
2854  ret_val = EOB_ACT_CONTINUE_SCAN;
2855 
2856  if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
2857  /* Extend the array by 50%, plus the number we really need. */
2858  int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
2859  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
2860  (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
2861  if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2862  YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
2863  /* "- 2" to take care of EOB's */
2864  YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
2865  }
2866 
2867  (yy_n_chars) += number_to_move;
2870 
2871  (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
2872 
2873  return ret_val;
2874 }
2875 
2876 /* yy_get_previous_state - get the state just before the EOB char was reached */
2877 
2878  static yy_state_type yy_get_previous_state (void)
2879 {
2880  yy_state_type yy_current_state;
2881  char *yy_cp;
2882 
2883  yy_current_state = (yy_start);
2884  yy_current_state += YY_AT_BOL();
2885 
2886  for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
2887  {
2888  YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2889  if ( yy_accept[yy_current_state] )
2890  {
2891  (yy_last_accepting_state) = yy_current_state;
2893  }
2894  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2895  {
2896  yy_current_state = (int) yy_def[yy_current_state];
2897  if ( yy_current_state >= 282 )
2898  yy_c = yy_meta[yy_c];
2899  }
2900  yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
2901  }
2902 
2903  return yy_current_state;
2904 }
2905 
2906 /* yy_try_NUL_trans - try to make a transition on the NUL character
2907  *
2908  * synopsis
2909  * next_state = yy_try_NUL_trans( current_state );
2910  */
2911  static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
2912 {
2913  int yy_is_jam;
2914  char *yy_cp = (yy_c_buf_p);
2915 
2916  YY_CHAR yy_c = 1;
2917  if ( yy_accept[yy_current_state] )
2918  {
2919  (yy_last_accepting_state) = yy_current_state;
2921  }
2922  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2923  {
2924  yy_current_state = (int) yy_def[yy_current_state];
2925  if ( yy_current_state >= 282 )
2926  yy_c = yy_meta[yy_c];
2927  }
2928  yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
2929  yy_is_jam = (yy_current_state == 281);
2930 
2931  return yy_is_jam ? 0 : yy_current_state;
2932 }
2933 
2934 #ifndef YY_NO_UNPUT
2935 
2936 #endif
2937 
2938 #ifndef YY_NO_INPUT
2939 #ifdef __cplusplus
2940  static int yyinput (void)
2941 #else
2942  static int input (void)
2943 #endif
2944 
2945 {
2946  int c;
2947 
2948  *(yy_c_buf_p) = (yy_hold_char);
2949 
2950  if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
2951  {
2952  /* yy_c_buf_p now points to the character we want to return.
2953  * If this occurs *before* the EOB characters, then it's a
2954  * valid NUL; if not, then we've hit the end of the buffer.
2955  */
2956  if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2957  /* This was really a NUL. */
2958  *(yy_c_buf_p) = '\0';
2959 
2960  else
2961  { /* need more input */
2962  int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
2963  ++(yy_c_buf_p);
2964 
2965  switch ( yy_get_next_buffer( ) )
2966  {
2967  case EOB_ACT_LAST_MATCH:
2968  /* This happens because yy_g_n_b()
2969  * sees that we've accumulated a
2970  * token and flags that we need to
2971  * try matching the token before
2972  * proceeding. But for input(),
2973  * there's no matching to consider.
2974  * So convert the EOB_ACT_LAST_MATCH
2975  * to EOB_ACT_END_OF_FILE.
2976  */
2977 
2978  /* Reset buffer status. */
2979  yyrestart( yyin );
2980 
2981  /*FALLTHROUGH*/
2982 
2983  case EOB_ACT_END_OF_FILE:
2984  {
2985  if ( yywrap( ) )
2986  return 0;
2987 
2988  if ( ! (yy_did_buffer_switch_on_eof) )
2989  YY_NEW_FILE;
2990 #ifdef __cplusplus
2991  return yyinput();
2992 #else
2993  return input();
2994 #endif
2995  }
2996 
2997  case EOB_ACT_CONTINUE_SCAN:
2998  (yy_c_buf_p) = (yytext_ptr) + offset;
2999  break;
3000  }
3001  }
3002  }
3003 
3004  c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
3005  *(yy_c_buf_p) = '\0'; /* preserve yytext */
3006  (yy_hold_char) = *++(yy_c_buf_p);
3007 
3008  YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
3009  if ( YY_CURRENT_BUFFER_LVALUE->yy_at_bol )
3010 
3011  yylineno++;
3012 ;
3013 
3014  return c;
3015 }
3016 #endif /* ifndef YY_NO_INPUT */
3017 
3018 /** Immediately switch to a different input stream.
3019  * @param input_file A readable stream.
3020  *
3021  * @note This function does not reset the start condition to @c INITIAL .
3022  */
3023  void yyrestart (FILE * input_file )
3024 {
3025 
3026  if ( ! YY_CURRENT_BUFFER ){
3030  }
3031 
3032  yy_init_buffer( YY_CURRENT_BUFFER, input_file );
3034 }
3035 
3036 /** Switch to a different input buffer.
3037  * @param new_buffer The new input buffer.
3038  *
3039  */
3040  void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
3041 {
3042 
3043  /* TODO. We should be able to replace this entire function body
3044  * with
3045  * yypop_buffer_state();
3046  * yypush_buffer_state(new_buffer);
3047  */
3049  if ( YY_CURRENT_BUFFER == new_buffer )
3050  return;
3051 
3052  if ( YY_CURRENT_BUFFER )
3053  {
3054  /* Flush out information for old buffer. */
3055  *(yy_c_buf_p) = (yy_hold_char);
3056  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
3057  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
3058  }
3059 
3060  YY_CURRENT_BUFFER_LVALUE = new_buffer;
3062 
3063  /* We don't actually know whether we did this switch during
3064  * EOF (yywrap()) processing, but the only time this flag
3065  * is looked at is after yywrap() is called, so it's safe
3066  * to go ahead and always set it.
3067  */
3069 }
3070 
3071 static void yy_load_buffer_state (void)
3072 {
3073  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
3074  (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
3075  yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
3076  (yy_hold_char) = *(yy_c_buf_p);
3077 }
3078 
3079 /** Allocate and initialize an input buffer state.
3080  * @param file A readable stream.
3081  * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
3082  *
3083  * @return the allocated buffer state.
3084  */
3085  YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
3086 {
3087  YY_BUFFER_STATE b;
3088 
3089  b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
3090  if ( ! b )
3091  YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
3092 
3093  b->yy_buf_size = size;
3094 
3095  /* yy_ch_buf has to be 2 characters longer than the size given because
3096  * we need to put in 2 end-of-buffer characters.
3097  */
3098  b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
3099  if ( ! b->yy_ch_buf )
3100  YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
3101 
3102  b->yy_is_our_buffer = 1;
3103 
3104  yy_init_buffer( b, file );
3105 
3106  return b;
3107 }
3108 
3109 /** Destroy the buffer.
3110  * @param b a buffer created with yy_create_buffer()
3111  *
3112  */
3114 {
3115 
3116  if ( ! b )
3117  return;
3118 
3119  if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
3121 
3122  if ( b->yy_is_our_buffer )
3123  yyfree( (void *) b->yy_ch_buf );
3124 
3125  yyfree( (void *) b );
3126 }
3127 
3128 /* Initializes or reinitializes a buffer.
3129  * This function is sometimes called more than once on the same buffer,
3130  * such as during a yyrestart() or at EOF.
3131  */
3132  static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
3133 
3134 {
3135  int oerrno = errno;
3136 
3137  yy_flush_buffer( b );
3138 
3139  b->yy_input_file = file;
3140  b->yy_fill_buffer = 1;
3141 
3142  /* If b is the current buffer, then yy_init_buffer was _probably_
3143  * called from yyrestart() or through yy_get_next_buffer.
3144  * In that case, we don't want to reset the lineno or column.
3145  */
3146  if (b != YY_CURRENT_BUFFER){
3147  b->yy_bs_lineno = 1;
3148  b->yy_bs_column = 0;
3149  }
3150 
3151  b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
3152 
3153  errno = oerrno;
3154 }
3155 
3156 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
3157  * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
3158  *
3159  */
3161 {
3162  if ( ! b )
3163  return;
3164 
3165  b->yy_n_chars = 0;
3166 
3167  /* We always need two end-of-buffer characters. The first causes
3168  * a transition to the end-of-buffer state. The second causes
3169  * a jam in that state.
3170  */
3173 
3174  b->yy_buf_pos = &b->yy_ch_buf[0];
3175 
3176  b->yy_at_bol = 1;
3178 
3179  if ( b == YY_CURRENT_BUFFER )
3181 }
3182 
3183 /** Pushes the new state onto the stack. The new state becomes
3184  * the current state. This function will allocate the stack
3185  * if necessary.
3186  * @param new_buffer The new state.
3187  *
3188  */
3189 void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
3190 {
3191  if (new_buffer == NULL)
3192  return;
3193 
3195 
3196  /* This block is copied from yy_switch_to_buffer. */
3197  if ( YY_CURRENT_BUFFER )
3198  {
3199  /* Flush out information for old buffer. */
3200  *(yy_c_buf_p) = (yy_hold_char);
3201  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
3202  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
3203  }
3204 
3205  /* Only push if top exists. Otherwise, replace top. */
3206  if (YY_CURRENT_BUFFER)
3207  (yy_buffer_stack_top)++;
3208  YY_CURRENT_BUFFER_LVALUE = new_buffer;
3209 
3210  /* copied from yy_switch_to_buffer. */
3213 }
3214 
3215 /** Removes and deletes the top of the stack, if present.
3216  * The next element becomes the new top.
3217  *
3218  */
3219 void yypop_buffer_state (void)
3220 {
3221  if (!YY_CURRENT_BUFFER)
3222  return;
3223 
3225  YY_CURRENT_BUFFER_LVALUE = NULL;
3226  if ((yy_buffer_stack_top) > 0)
3227  --(yy_buffer_stack_top);
3228 
3229  if (YY_CURRENT_BUFFER) {
3232  }
3233 }
3234 
3235 /* Allocates the stack if it does not exist.
3236  * Guarantees space for at least one push.
3237  */
3238 static void yyensure_buffer_stack (void)
3239 {
3240  yy_size_t num_to_alloc;
3241 
3242  if (!(yy_buffer_stack)) {
3243 
3244  /* First allocation is just for 2 elements, since we don't know if this
3245  * scanner will even need a stack. We use 2 instead of 1 to avoid an
3246  * immediate realloc on the next call.
3247  */
3248  num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
3250  (num_to_alloc * sizeof(struct yy_buffer_state*)
3251  );
3252  if ( ! (yy_buffer_stack) )
3253  YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
3254 
3255  memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
3256 
3257  (yy_buffer_stack_max) = num_to_alloc;
3258  (yy_buffer_stack_top) = 0;
3259  return;
3260  }
3261 
3262  if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
3263 
3264  /* Increase the buffer to prepare for a possible push. */
3265  yy_size_t grow_size = 8 /* arbitrary grow size */;
3266 
3267  num_to_alloc = (yy_buffer_stack_max) + grow_size;
3269  ((yy_buffer_stack),
3270  num_to_alloc * sizeof(struct yy_buffer_state*)
3271  );
3272  if ( ! (yy_buffer_stack) )
3273  YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
3274 
3275  /* zero only the new slots.*/
3276  memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
3277  (yy_buffer_stack_max) = num_to_alloc;
3278  }
3279 }
3280 
3281 /** Setup the input buffer state to scan directly from a user-specified character buffer.
3282  * @param base the character buffer
3283  * @param size the size in bytes of the character buffer
3284  *
3285  * @return the newly allocated buffer state object.
3286  */
3288 {
3289  YY_BUFFER_STATE b;
3290 
3291  if ( size < 2 ||
3292  base[size-2] != YY_END_OF_BUFFER_CHAR ||
3293  base[size-1] != YY_END_OF_BUFFER_CHAR )
3294  /* They forgot to leave room for the EOB's. */
3295  return NULL;
3296 
3297  b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
3298  if ( ! b )
3299  YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
3300 
3301  b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
3302  b->yy_buf_pos = b->yy_ch_buf = base;
3303  b->yy_is_our_buffer = 0;
3304  b->yy_input_file = NULL;
3305  b->yy_n_chars = b->yy_buf_size;
3306  b->yy_is_interactive = 0;
3307  b->yy_at_bol = 1;
3308  b->yy_fill_buffer = 0;
3310 
3311  yy_switch_to_buffer( b );
3312 
3313  return b;
3314 }
3315 
3316 /** Setup the input buffer state to scan a string. The next call to yylex() will
3317  * scan from a @e copy of @a str.
3318  * @param yystr a NUL-terminated string to scan
3319  *
3320  * @return the newly allocated buffer state object.
3321  * @note If you want to scan bytes that may contain NUL values, then use
3322  * yy_scan_bytes() instead.
3323  */
3324 YY_BUFFER_STATE yy_scan_string (const char * yystr )
3325 {
3326 
3327  return yy_scan_bytes( yystr, (int) strlen(yystr) );
3328 }
3329 
3330 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
3331  * scan from a @e copy of @a bytes.
3332  * @param yybytes the byte buffer to scan
3333  * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
3334  *
3335  * @return the newly allocated buffer state object.
3336  */
3337 YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
3338 {
3339  YY_BUFFER_STATE b;
3340  char *buf;
3341  yy_size_t n;
3342  int i;
3343 
3344  /* Get memory for full buffer, including space for trailing EOB's. */
3345  n = (yy_size_t) (_yybytes_len + 2);
3346  buf = (char *) yyalloc( n );
3347  if ( ! buf )
3348  YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
3349 
3350  for ( i = 0; i < _yybytes_len; ++i )
3351  buf[i] = yybytes[i];
3352 
3353  buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
3354 
3355  b = yy_scan_buffer( buf, n );
3356  if ( ! b )
3357  YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
3358 
3359  /* It's okay to grow etc. this buffer, and we should throw it
3360  * away when we're done.
3361  */
3362  b->yy_is_our_buffer = 1;
3363 
3364  return b;
3365 }
3366 
3367 #ifndef YY_EXIT_FAILURE
3368 #define YY_EXIT_FAILURE 2
3369 #endif
3370 
3371 static void yynoreturn yy_fatal_error (const char* msg )
3372 {
3373  fprintf( stderr, "%s\n", msg );
3374  exit( YY_EXIT_FAILURE );
3375 }
3376 
3377 /* Redefine yyless() so it works in section 3 code. */
3378 
3379 #undef yyless
3380 #define yyless(n) \
3381  do \
3382  { \
3383  /* Undo effects of setting up yytext. */ \
3384  int yyless_macro_arg = (n); \
3385  YY_LESS_LINENO(yyless_macro_arg);\
3386  yytext[yyleng] = (yy_hold_char); \
3387  (yy_c_buf_p) = yytext + yyless_macro_arg; \
3388  (yy_hold_char) = *(yy_c_buf_p); \
3389  *(yy_c_buf_p) = '\0'; \
3390  yyleng = yyless_macro_arg; \
3391  } \
3392  while ( 0 )
3393 
3394 /* Accessor methods (get/set functions) to struct members. */
3395 
3396 /** Get the current line number.
3397  *
3398  */
3399 int yyget_lineno (void)
3400 {
3401 
3402  return yylineno;
3403 }
3404 
3405 /** Get the input stream.
3406  *
3407  */
3408 FILE *yyget_in (void)
3409 {
3410  return yyin;
3411 }
3412 
3413 /** Get the output stream.
3414  *
3415  */
3416 FILE *yyget_out (void)
3417 {
3418  return yyout;
3419 }
3420 
3421 /** Get the length of the current token.
3422  *
3423  */
3424 int yyget_leng (void)
3425 {
3426  return yyleng;
3427 }
3428 
3429 /** Get the current token.
3430  *
3431  */
3432 
3433 char *yyget_text (void)
3434 {
3435  return yytext;
3436 }
3437 
3438 /** Set the current line number.
3439  * @param _line_number line number
3440  *
3441  */
3442 void yyset_lineno (int _line_number )
3443 {
3444 
3445  yylineno = _line_number;
3446 }
3447 
3448 /** Set the input stream. This does not discard the current
3449  * input buffer.
3450  * @param _in_str A readable stream.
3451  *
3452  * @see yy_switch_to_buffer
3453  */
3454 void yyset_in (FILE * _in_str )
3455 {
3456  yyin = _in_str ;
3457 }
3458 
3459 void yyset_out (FILE * _out_str )
3460 {
3461  yyout = _out_str ;
3462 }
3463 
3464 int yyget_debug (void)
3465 {
3466  return yy_flex_debug;
3467 }
3468 
3469 void yyset_debug (int _bdebug )
3470 {
3471  yy_flex_debug = _bdebug ;
3472 }
3473 
3474 static int yy_init_globals (void)
3475 {
3476  /* Initialization is the same as for the non-reentrant scanner.
3477  * This function is called from yylex_destroy(), so don't allocate here.
3478  */
3479 
3480  /* We do not touch yylineno unless the option is enabled. */
3481  yylineno = 1;
3482 
3483  (yy_buffer_stack) = NULL;
3484  (yy_buffer_stack_top) = 0;
3485  (yy_buffer_stack_max) = 0;
3486  (yy_c_buf_p) = NULL;
3487  (yy_init) = 0;
3488  (yy_start) = 0;
3489 
3490 /* Defined in main.c */
3491 #ifdef YY_STDINIT
3492  yyin = stdin;
3493  yyout = stdout;
3494 #else
3495  yyin = NULL;
3496  yyout = NULL;
3497 #endif
3498 
3499  /* For future reference: Set errno on error, since we are called by
3500  * yylex_init()
3501  */
3502  return 0;
3503 }
3504 
3505 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
3506 int yylex_destroy (void)
3507 {
3508 
3509  /* Pop the buffer stack, destroying each element. */
3510  while(YY_CURRENT_BUFFER){
3512  YY_CURRENT_BUFFER_LVALUE = NULL;
3514  }
3515 
3516  /* Destroy the stack itself. */
3517  yyfree((yy_buffer_stack) );
3518  (yy_buffer_stack) = NULL;
3519 
3520  /* Reset the globals. This is important in a non-reentrant scanner so the next time
3521  * yylex() is called, initialization will occur. */
3522  yy_init_globals( );
3523 
3524  return 0;
3525 }
3526 
3527 /*
3528  * Internal utility routines.
3529  */
3530 
3531 #ifndef yytext_ptr
3532 static void yy_flex_strncpy (char* s1, const char * s2, int n )
3533 {
3534 
3535  int i;
3536  for ( i = 0; i < n; ++i )
3537  s1[i] = s2[i];
3538 }
3539 #endif
3540 
3541 #ifdef YY_NEED_STRLEN
3542 static int yy_flex_strlen (const char * s )
3543 {
3544  int n;
3545  for ( n = 0; s[n]; ++n )
3546  ;
3547 
3548  return n;
3549 }
3550 #endif
3551 
3552 void *yyalloc (yy_size_t size )
3553 {
3554  return malloc(size);
3555 }
3556 
3557 void *yyrealloc (void * ptr, yy_size_t size )
3558 {
3559 
3560  /* The cast to (char *) in the following accommodates both
3561  * implementations that use char* generic pointers, and those
3562  * that use void* generic pointers. It works with the latter
3563  * because both ANSI C and C++ allow castless assignment from
3564  * any pointer type to void*, and deal with argument conversions
3565  * as though doing an assignment.
3566  */
3567  return realloc(ptr, size);
3568 }
3569 
3570 void yyfree (void * ptr )
3571 {
3572  free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
3573 }
3574 
3575 #define YYTABLES_NAME "yytables"
3576 
3577 #line 1033 "clex.l"
3578 
3579 
3580 /* The default function called when a parsing error happens */
3581 void c_error(char * msg)
3582 {
3583  user_warning("yyerror", "C %s near \"%s\" at user line %d (local line %d in the effective file)\n", msg, yytext, get_current_C_line_number(), c_lineno);
3584  CParserError("Parsing failed\n");
3585 }
3586 
3587 
3588 /* Mainly reset the line number and restart on c_in... */
3589 void c_reset_lex(void)
3590 {
3591  c_lineno = 1;
3592 #ifdef FLEX_SCANNER
3593  c_restart(c_in);
3594 #else
3595  /* reset lex... Might be better to read the whole file?
3596  */
3597  /* Huh... What is this ? RK */
3598  syn_sptr = syn_sbuf;
3599 # define MMNEWLINE 10
3600  syn_previous = MMNEWLINE;
3601 #endif
3602 }
3603 
3604 #ifndef c_wrap
3605 int c_wrap() { return 1;}
3606 #endif
3607 
float a2sf[2] __attribute__((aligned(16)))
USER generates a user error (i.e., non fatal) by printing the given MSG according to the FMT.
Definition: 3dnow.h:3
static int count
Definition: SDG.c:519
void const char const char const int
bdt base
Current expression.
Definition: bdt_read_paf.c:100
#define UNDEFINED_C_LINE_NUMBER
string get_c_parser_current_scope(void)
Definition: cyacc.tab.c:569
FILE * c_in
Definition: c_syntax.h:291
void c_error(char *)
string get_c_parser_nth_scope(int)
Definition: cyacc.tab.c:581
#define FIRST_C_LINE_NUMBER
Error handling.
int c_parser_number_of_scopes(void)
Definition: cyacc.tab.c:587
void c_reset_lex(void)
int c_wrap(void)
int c_lineno
the file read in by the c_lexer
Definition: c_syntax.h:293
int analyze_preprocessor_line(string, int)
Analyze information about user line number provided by the C preprocessor and by PIPS file splitter a...
Definition: util.c:3617
void c_restart(FILE *)
int get_previous_c_lineno()
Definition: clexer.c:1115
string get_current_C_comment(void)
Return the current comment as a string to be freed by the caller and reset the current comment.
Definition: clexer.c:1282
#define yy_load_buffer_state
Definition: clexer.c:15
#define YY_NEW_FILE
Special action meaning "start processing a new file".
Definition: clexer.c:386
#define yyset_extra
Definition: clexer.c:164
#define yytext
Definition: clexer.c:27
unsigned char flex_uint8_t
Definition: clexer.c:312
#define yyset_lineno
Definition: clexer.c:212
static char yy_hold_char
yy_hold_char holds the character lost when yytext is formed.
Definition: clexer.c:546
static yy_state_type yy_last_accepting_state
Definition: clexer.c:1015
#define yyrestart
Definition: clexer.c:26
#define yyset_debug
Definition: clexer.c:152
static void yynoreturn yy_fatal_error(const char *msg)
static const YY_CHAR yy_meta[65]
Definition: clexer.c:708
#define YY_EXTRA_TYPE
Special case for "unistd.h", since it is non-ANSI.
Definition: clexer.c:1656
static int yy_start
whether we need to initialize
Definition: clexer.c:553
short int flex_int16_t
Definition: clexer.c:310
#define yy_flex_debug
Definition: clexer.c:20
#define yyget_out
Definition: clexer.c:182
static YY_BUFFER_STATE * yy_buffer_stack
Stack as an array.
Definition: clexer.c:529
unsigned int flex_uint32_t
Definition: clexer.c:314
static const flex_int16_t yy_base[329]
Definition: clexer.c:719
static int yy_get_next_buffer(void)
static int previous_C_line_number
Definition: clexer.c:1144
#define yy_scan_bytes
Definition: clexer.c:12
#define LEXER_RETURN(t)
This is going to be the previous token because LEXER_RETURN is not used in case the lexer handles eit...
Definition: clexer.c:1557
#define YY_BREAK
Code executed at the end of each rule.
Definition: clexer.c:1817
static int previous_c_lineno
To keep track of line intervals.
Definition: clexer.c:1113
static size_t yy_buffer_stack_max
capacity of stack.
Definition: clexer.c:528
void update_C_comment(string a_comment)
Add a comment to the current one.
Definition: clexer.c:1365
#define yynoreturn
Definition: clexer.c:361
static yy_state_type yy_try_NUL_trans(yy_state_type current_state)
#define yyget_debug
Definition: clexer.c:146
int yy_act
Definition: clexer.c:1832
#define yypush_buffer_state
Definition: clexer.c:17
static int bracket_depth
Definition: clexer.c:1274
static int previous_keyword_token
Definition: clexer.c:1552
void remove_LFs_from_C_comment(int extra_LF)
Remove "extra_LF" trailing LF from C_current_comment if they can be found at the end of the comment s...
Definition: clexer.c:1398
struct yy_buffer_state * YY_BUFFER_STATE
Definition: clexer.c:408
#define yyfree
Definition: clexer.c:31
#define yyout
Definition: clexer.c:25
#define YY_BUFFER_NEW
Definition: clexer.c:509
#define yyget_lineno
Definition: clexer.c:206
#define yylex
Definition: clexer.c:23
#define YY_RESTORE_YY_MORE_OFFSET
Definition: clexer.c:1027
static int yy_did_buffer_switch_on_eof
start state number
Definition: clexer.c:558
static int yy_init_globals(void)
void set_current_C_line_number(void)
Definition: clexer.c:1166
void push_current_C_comment(void)
Push the current C comment so that we can get it back when building the statement later.
Definition: clexer.c:1331
static void bsd_rewrite(char **pyytext)
compatibility layer for BSD
Definition: clexer.c:1527
#define yyget_text
Definition: clexer.c:200
#define YY_BUFFER_NORMAL
Definition: clexer.c:510
char * yy_cp
Definition: clexer.c:1831
#define yyensure_buffer_stack
Definition: clexer.c:19
#define yy_scan_buffer
Definition: clexer.c:10
#define YY_MORE_ADJ
Definition: clexer.c:1026
#define YY_RULE_SETUP
Definition: clexer.c:1820
static string C_current_comment
Comment management:
Definition: clexer.c:1266
#define yy_scan_string
Definition: clexer.c:11
#define SIMPLE_LEXER_RETURN(t)
Some tokens, such as { and } do not mean that a statement has been entered.
Definition: clexer.c:1562
#define YY_AT_BOL()
Definition: clexer.c:600
int get_current_C_line_number(void)
Definition: clexer.c:1146
#define yytext_ptr
Definition: clexer.c:616
signed char flex_int8_t
C99 systems have <inttypes.h>.
Definition: clexer.c:309
#define yyget_leng
Definition: clexer.c:194
#define EOB_ACT_END_OF_FILE
Definition: clexer.c:421
#define yyalloc
Definition: clexer.c:29
#define yypop_buffer_state
Definition: clexer.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: clexer.c:543
int flex_int32_t
Definition: clexer.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: clexer.c:381
string pop_current_C_comment(void)
Pop the current comment.
Definition: clexer.c:1352
int C_line_increment
The line increment is set to zero when header files are parsed.
Definition: clexer.c:1110
static const flex_int16_t yy_nxt[903]
Definition: clexer.c:799
#define yy_switch_to_buffer
Definition: clexer.c:16
int yy_state_type
Definition: clexer.c:607
#define TK_TYPE_P(tk)
void error_reset_C_comment(bool is_compilation_unit_p __attribute__((__unused__)))
Definition: clexer.c:1477
void reset_current_C_line_number(void)
Definition: clexer.c:1210
#define YY_CURRENT_BUFFER
We provide macros for accessing buffer states in case in the future we want to put the buffer states ...
Definition: clexer.c:537
#define yy_init_buffer
Definition: clexer.c:13
#define INITIAL
This should be used instead of the manual computation of C_line_number...
Definition: clexer.c:1644
#define yyget_extra
Definition: clexer.c:158
void push_current_C_line_number(void)
The line number stack, designed for structured control structure, is not used yet.
Definition: clexer.c:1194
char * yy_bp
Definition: clexer.c:1831
#define yyin
Definition: clexer.c:21
static int yy_n_chars
Definition: clexer.c:547
static int is_c_parser_keyword_typedef(char *id)
See if id is a keyword, a typedef or an identifier.
Definition: clexer.c:1573
#define YY_READ_BUF_SIZE
Amount of stuff to slurp up with each read.
Definition: clexer.c:1729
static const flex_int16_t yy_accept[282]
Definition: clexer.c:641
#define YY_INPUT(buf, result, max_size)
Gets input and stuffs it into "buf".
Definition: clexer.c:1745
#define ECHO
ia64
Definition: clexer.c:1738
void clear_C_comment()
Definition: clexer.c:1489
#define yy_flush_buffer
Definition: clexer.c:14
static int C_line_number
To track the user line number, that is the one in the original user file.
Definition: clexer.c:1102
#define yyrealloc
Definition: clexer.c:30
#define YY_END_OF_BUFFER
Definition: clexer.c:633
#define YY_STATE_EOF(state)
Action number for EOF rule of a given start state.
Definition: clexer.c:384
void reset_C_comment(bool is_compilation_unit_p)
reset and reset_error should be handled differently
Definition: clexer.c:1450
static const flex_int16_t yy_def[329]
Definition: clexer.c:759
#define BEGIN
Enter a start condition.
Definition: clexer.c:376
#define YY_END_OF_BUFFER_CHAR
Definition: clexer.c:387
void init_C_comment()
Definition: clexer.c:1513
#define YY_FATAL_ERROR(msg)
Report a fatal error.
Definition: clexer.c:1792
unsigned int character_occurences_in_string(string s, char c)
Use a stack to survive to file inclusions if any.
Definition: clexer.c:1133
#define yyterminate()
No semi-colon after return; correct usage is to write "yyterminate();" - we don't want an extra ';' a...
Definition: clexer.c:1782
unsigned short int flex_uint16_t
Definition: clexer.c:313
#define yywrap
Macros after this point can all be overridden by user definitions in section 1.
Definition: clexer.c:28
#define yy_create_buffer
A lexical scanner generated by flex.
Definition: clexer.c:8
void error_reset_current_C_line_number(void)
Definition: clexer.c:1224
static const flex_int16_t yy_chk[903]
Definition: clexer.c:903
flex_uint8_t YY_CHAR
Begin user sect3.
Definition: clexer.c:603
#define YY_DO_BEFORE_ACTION
Done after the current pattern has been matched and before the corresponding action - sets up yytext.
Definition: clexer.c:626
#define yy_delete_buffer
Definition: clexer.c:9
#define EOB_ACT_LAST_MATCH
Definition: clexer.c:422
void reset_token_has_been_seen_p()
Definition: clexer.c:1270
#define yyget_in
Definition: clexer.c:170
size_t yy_size_t
Definition: clexer.c:413
#define TOKEN_UNDEFINED
The lexer cannot handle the ambiguity between named types and variables without extra-help.
Definition: clexer.c:1551
static const flex_int32_t yy_rule_can_match_eol[74]
Table of booleans, true if rule could match eol.
Definition: clexer.c:1008
int get_previous_C_line_number(void)
Should be called just before get_current_C_line_number.
Definition: clexer.c:1161
#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: clexer.c:521
#define yylineno
Definition: clexer.c:24
static yy_state_type yy_get_previous_state(void)
static const YY_CHAR yy_ec[256]
Definition: clexer.c:676
#define yylex_destroy
Accessor methods to globals.
Definition: clexer.c:140
#define yyset_out
Definition: clexer.c:188
static char * yy_c_buf_p
Points to current character in buffer.
Definition: clexer.c:551
#define EOB_ACT_CONTINUE_SCAN
Definition: clexer.c:420
#define the_end_of_pragma
Definition: clexer.c:1645
static size_t yy_buffer_stack_top
!YY_STRUCT_YY_BUFFER_STATE
Definition: clexer.c:527
#define YY_DECL
Definition: clexer.c:1805
#define YY_BUF_SIZE
Size of default input buffer.
Definition: clexer.c:398
#define YY_EXIT_FAILURE
static int yy_init
Definition: clexer.c:552
#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: clexer.c:370
static bool token_has_been_seen_p
To see if comments are collected within a statement or outside it is pretty easy to turn it on.
Definition: clexer.c:1268
void discard_C_comment()
Discard a C comment because we don't know how to deal with it.
Definition: clexer.c:1426
int pop_current_C_line_number(void)
Definition: clexer.c:1202
#define yyleng
Definition: clexer.c:22
static char * yy_last_accepting_cpos
Definition: clexer.c:1016
#define yyset_in
Definition: clexer.c:176
@ TK__Pragma
TK_PRAGMA
Definition: cyacc.h:164
YYSTYPE c_lval
static Value offset
Definition: translation.c:283
unsigned char flex_uint8_t
Definition: genread_lex.c:312
static int input(void)
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 CParserError(char *msg)
static hash_table aliases
Definition: gtk_props.c:69
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 pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
Definition: misc-local.h:172
#define pips_internal_error
Definition: misc-local.h:149
#define exit(code)
Definition: misc-local.h:54
#define user_warning(fn,...)
Definition: misc-local.h:262
string concatenate(const char *,...)
Return the concatenation of the given strings.
Definition: string.c:183
#define DEFINE_LOCAL_STACK(name, type)
#define same_string_p(s1, s2)
#define STACK_NULL_P(s)
Definition: newgen_stack.h:53
#define stack_undefined_p(s)
Definition: newgen_stack.h:56
#define string_undefined
Definition: newgen_types.h:40
#define string_undefined_p(s)
Definition: newgen_types.h:41
intptr_t _int
_INT
Definition: newgen_types.h:53
_int is_c_keyword_typedef(char *)
This function checks if s is a C keyword or typedef name and returns the token number thanks to the h...
Definition: static.c:297
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
char * strdup()
static int line
FLEX_SCANNER.
Definition: scanner.c:852
s1
Definition: set.c:247
#define ifdebug(n)
Definition: sg.c:47
static char buf[BSZ]
Definition: split_file.c:157
#define TK_STATIC
Definition: splitc.c:782
#define TK_MINUS_EQ
Definition: splitc.c:793
#define TK_SUP_EQ
Definition: splitc.c:809
#define TK_EQ_EQ
Definition: splitc.c:804
#define TK_IDENT
Definition: splitc.c:756
#define TK_SEMICOLON
Definition: splitc.c:833
#define TK_PIPE_EQ
Definition: splitc.c:798
#define TK_STATIC_DIMENSION
Definition: splitc.c:788
#define TK_RBRACKET
Definition: splitc.c:831
#define TK_INF_EQ
Definition: splitc.c:808
#define TK_PIPE
Definition: splitc.c:817
#define TK_STAR
Definition: splitc.c:812
#define TK_INF_INF
Definition: splitc.c:822
#define TK_SLASH
Definition: splitc.c:813
#define TK_FLOATCON
Definition: splitc.c:759
#define TK_DOT
Definition: splitc.c:803
#define TK_PLUS_PLUS
Definition: splitc.c:824
#define TK_SLASH_EQ
Definition: splitc.c:795
#define TK_INF_INF_EQ
Definition: splitc.c:800
#define TK_EXCLAM
Definition: splitc.c:819
#define TK_PLUS
Definition: splitc.c:810
#define TK_PRAGMA
Definition: splitc.c:862
#define TK_EXCLAM_EQ
Definition: splitc.c:805
#define TK_RPAREN
Definition: splitc.c:826
#define TK_EQ
Definition: splitc.c:791
#define TK_SIZEOF
Definition: splitc.c:789
#define TK_ARROW
Definition: splitc.c:802
#define TK_TILDE
Definition: splitc.c:815
#define TK_NAMED_TYPE
Definition: splitc.c:760
#define TK_ELLIPSIS
Definition: splitc.c:835
#define TK_INTCON
Definition: splitc.c:758
#define TK_SUP
Definition: splitc.c:807
#define TK_COMMA
Definition: splitc.c:834
#define TK_AND_EQ
Definition: splitc.c:797
#define TK_STRINGCON
Definition: splitc.c:761
#define TK_STAR_EQ
Definition: splitc.c:794
#define TK_AND_AND
Definition: splitc.c:820
#define TK_QUEST
Definition: splitc.c:836
#define TK_CIRC_EQ
Definition: splitc.c:799
#define TK_ELSE
Definition: splitc.c:848
#define TK_LBRACKET
Definition: splitc.c:830
#define TK_CHARCON
Definition: splitc.c:757
#define TK_COLON
Definition: splitc.c:832
#define TK_INF
Definition: splitc.c:806
#define TK_CIRC
Definition: splitc.c:818
#define TK_PIPE_PIPE
Definition: splitc.c:821
#define TK_SUP_SUP_EQ
Definition: splitc.c:801
#define TK_MINUS
Definition: splitc.c:811
#define TK_LBRACE
Definition: splitc.c:829
#define TK_PERCENT
Definition: splitc.c:814
#define TK_AND
Definition: splitc.c:816
#define TK_EOF
Definition: splitc.c:763
#define TK_LPAREN
Definition: splitc.c:827
#define TK_SUP_SUP
Definition: splitc.c:823
#define TK_WSTRINGCON
Definition: splitc.c:762
#define TK_PLUS_EQ
Definition: splitc.c:792
#define TK_MINUS_MINUS
Definition: splitc.c:825
#define TK_ASM
Definition: splitc.c:851
#define TK_RBRACE
Definition: splitc.c:828
#define TK_COMPLEXCON
Definition: splitc.c:868
#define TK_PERCENT_EQ
Definition: splitc.c:796
#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
char * strndup(char const *s, size_t n)
A replacement function, for systems that lack strndup.
Definition: strndup.c:26
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
string string
Definition: cyacc.h:187