PIPS
lexer.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 splitc__create_buffer
9 #define yy_delete_buffer splitc__delete_buffer
10 #define yy_scan_buffer splitc__scan_buffer
11 #define yy_scan_string splitc__scan_string
12 #define yy_scan_bytes splitc__scan_bytes
13 #define yy_init_buffer splitc__init_buffer
14 #define yy_flush_buffer splitc__flush_buffer
15 #define yy_load_buffer_state splitc__load_buffer_state
16 #define yy_switch_to_buffer splitc__switch_to_buffer
17 #define yypush_buffer_state splitc_push_buffer_state
18 #define yypop_buffer_state splitc_pop_buffer_state
19 #define yyensure_buffer_stack splitc_ensure_buffer_stack
20 #define yy_flex_debug splitc__flex_debug
21 #define yyin splitc_in
22 #define yyleng splitc_leng
23 #define yylex splitc_lex
24 #define yylineno splitc_lineno
25 #define yyout splitc_out
26 #define yyrestart splitc_restart
27 #define yytext splitc_text
28 #define yywrap splitc_wrap
29 #define yyalloc splitc_alloc
30 #define yyrealloc splitc_realloc
31 #define yyfree splitc_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 splitc__create_buffer_ALREADY_DEFINED
43 #else
44 #define yy_create_buffer splitc__create_buffer
45 #endif
46 
47 #ifdef yy_delete_buffer
48 #define splitc__delete_buffer_ALREADY_DEFINED
49 #else
50 #define yy_delete_buffer splitc__delete_buffer
51 #endif
52 
53 #ifdef yy_scan_buffer
54 #define splitc__scan_buffer_ALREADY_DEFINED
55 #else
56 #define yy_scan_buffer splitc__scan_buffer
57 #endif
58 
59 #ifdef yy_scan_string
60 #define splitc__scan_string_ALREADY_DEFINED
61 #else
62 #define yy_scan_string splitc__scan_string
63 #endif
64 
65 #ifdef yy_scan_bytes
66 #define splitc__scan_bytes_ALREADY_DEFINED
67 #else
68 #define yy_scan_bytes splitc__scan_bytes
69 #endif
70 
71 #ifdef yy_init_buffer
72 #define splitc__init_buffer_ALREADY_DEFINED
73 #else
74 #define yy_init_buffer splitc__init_buffer
75 #endif
76 
77 #ifdef yy_flush_buffer
78 #define splitc__flush_buffer_ALREADY_DEFINED
79 #else
80 #define yy_flush_buffer splitc__flush_buffer
81 #endif
82 
83 #ifdef yy_load_buffer_state
84 #define splitc__load_buffer_state_ALREADY_DEFINED
85 #else
86 #define yy_load_buffer_state splitc__load_buffer_state
87 #endif
88 
89 #ifdef yy_switch_to_buffer
90 #define splitc__switch_to_buffer_ALREADY_DEFINED
91 #else
92 #define yy_switch_to_buffer splitc__switch_to_buffer
93 #endif
94 
95 #ifdef yypush_buffer_state
96 #define splitc_push_buffer_state_ALREADY_DEFINED
97 #else
98 #define yypush_buffer_state splitc_push_buffer_state
99 #endif
100 
101 #ifdef yypop_buffer_state
102 #define splitc_pop_buffer_state_ALREADY_DEFINED
103 #else
104 #define yypop_buffer_state splitc_pop_buffer_state
105 #endif
106 
107 #ifdef yyensure_buffer_stack
108 #define splitc_ensure_buffer_stack_ALREADY_DEFINED
109 #else
110 #define yyensure_buffer_stack splitc_ensure_buffer_stack
111 #endif
112 
113 #ifdef yylex
114 #define splitc_lex_ALREADY_DEFINED
115 #else
116 #define yylex splitc_lex
117 #endif
118 
119 #ifdef yyrestart
120 #define splitc_restart_ALREADY_DEFINED
121 #else
122 #define yyrestart splitc_restart
123 #endif
124 
125 #ifdef yylex_init
126 #define splitc_lex_init_ALREADY_DEFINED
127 #else
128 #define yylex_init splitc_lex_init
129 #endif
130 
131 #ifdef yylex_init_extra
132 #define splitc_lex_init_extra_ALREADY_DEFINED
133 #else
134 #define yylex_init_extra splitc_lex_init_extra
135 #endif
136 
137 #ifdef yylex_destroy
138 #define splitc_lex_destroy_ALREADY_DEFINED
139 #else
140 #define yylex_destroy splitc_lex_destroy
141 #endif
142 
143 #ifdef yyget_debug
144 #define splitc_get_debug_ALREADY_DEFINED
145 #else
146 #define yyget_debug splitc_get_debug
147 #endif
148 
149 #ifdef yyset_debug
150 #define splitc_set_debug_ALREADY_DEFINED
151 #else
152 #define yyset_debug splitc_set_debug
153 #endif
154 
155 #ifdef yyget_extra
156 #define splitc_get_extra_ALREADY_DEFINED
157 #else
158 #define yyget_extra splitc_get_extra
159 #endif
160 
161 #ifdef yyset_extra
162 #define splitc_set_extra_ALREADY_DEFINED
163 #else
164 #define yyset_extra splitc_set_extra
165 #endif
166 
167 #ifdef yyget_in
168 #define splitc_get_in_ALREADY_DEFINED
169 #else
170 #define yyget_in splitc_get_in
171 #endif
172 
173 #ifdef yyset_in
174 #define splitc_set_in_ALREADY_DEFINED
175 #else
176 #define yyset_in splitc_set_in
177 #endif
178 
179 #ifdef yyget_out
180 #define splitc_get_out_ALREADY_DEFINED
181 #else
182 #define yyget_out splitc_get_out
183 #endif
184 
185 #ifdef yyset_out
186 #define splitc_set_out_ALREADY_DEFINED
187 #else
188 #define yyset_out splitc_set_out
189 #endif
190 
191 #ifdef yyget_leng
192 #define splitc_get_leng_ALREADY_DEFINED
193 #else
194 #define yyget_leng splitc_get_leng
195 #endif
196 
197 #ifdef yyget_text
198 #define splitc_get_text_ALREADY_DEFINED
199 #else
200 #define yyget_text splitc_get_text
201 #endif
202 
203 #ifdef yyget_lineno
204 #define splitc_get_lineno_ALREADY_DEFINED
205 #else
206 #define yyget_lineno splitc_get_lineno
207 #endif
208 
209 #ifdef yyset_lineno
210 #define splitc_set_lineno_ALREADY_DEFINED
211 #else
212 #define yyset_lineno splitc_set_lineno
213 #endif
214 
215 #ifdef yywrap
216 #define splitc_wrap_ALREADY_DEFINED
217 #else
218 #define yywrap splitc_wrap
219 #endif
220 
221 #ifdef yyalloc
222 #define splitc_alloc_ALREADY_DEFINED
223 #else
224 #define yyalloc splitc_alloc
225 #endif
226 
227 #ifdef yyrealloc
228 #define splitc_realloc_ALREADY_DEFINED
229 #else
230 #define yyrealloc splitc_realloc
231 #endif
232 
233 #ifdef yyfree
234 #define splitc_free_ALREADY_DEFINED
235 #else
236 #define yyfree splitc_free
237 #endif
238 
239 #ifdef yytext
240 #define splitc_text_ALREADY_DEFINED
241 #else
242 #define yytext splitc_text
243 #endif
244 
245 #ifdef yyleng
246 #define splitc_leng_ALREADY_DEFINED
247 #else
248 #define yyleng splitc_leng
249 #endif
250 
251 #ifdef yyin
252 #define splitc_in_ALREADY_DEFINED
253 #else
254 #define yyin splitc_in
255 #endif
256 
257 #ifdef yyout
258 #define splitc_out_ALREADY_DEFINED
259 #else
260 #define yyout splitc_out
261 #endif
262 
263 #ifdef yy_flex_debug
264 #define splitc__flex_debug_ALREADY_DEFINED
265 #else
266 #define yy_flex_debug splitc__flex_debug
267 #endif
268 
269 #ifdef yylineno
270 #define splitc_lineno_ALREADY_DEFINED
271 #else
272 #define yylineno splitc_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 72
633 #define YY_END_OF_BUFFER 73
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[271] =
642  { 0,
643  0, 0, 73, 71, 4, 3, 44, 71, 43, 47,
644  71, 57, 58, 41, 39, 60, 40, 61, 42, 14,
645  14, 51, 59, 34, 33, 35, 50, 70, 70, 55,
646  56, 49, 70, 70, 53, 48, 54, 52, 2, 30,
647  0, 0, 8, 0, 21, 45, 23, 0, 0, 19,
648  36, 17, 37, 18, 38, 0, 10, 0, 1, 20,
649  10, 13, 14, 0, 14, 14, 0, 14, 27, 31,
650  29, 32, 28, 70, 0, 0, 24, 70, 70, 70,
651  22, 46, 2, 2, 0, 6, 0, 0, 0, 0,
652  16, 0, 10, 11, 0, 0, 1, 1, 1, 0,
653 
654  13, 13, 13, 0, 10, 14, 14, 14, 14, 0,
655  12, 25, 26, 0, 9, 0, 0, 0, 70, 70,
656  70, 70, 70, 70, 70, 0, 0, 0, 0, 0,
657  0, 10, 11, 0, 10, 13, 13, 13, 13, 14,
658  0, 12, 12, 0, 12, 12, 7, 0, 0, 0,
659  0, 70, 70, 70, 70, 70, 70, 70, 70, 0,
660  0, 0, 0, 0, 13, 0, 0, 12, 12, 0,
661  0, 10, 12, 12, 0, 0, 0, 0, 70, 63,
662  70, 70, 70, 70, 70, 70, 15, 0, 0, 0,
663  10, 0, 10, 10, 10, 0, 10, 0, 10, 12,
664 
665  0, 0, 0, 0, 70, 70, 70, 70, 70, 70,
666  62, 0, 0, 0, 10, 0, 0, 10, 0, 0,
667  0, 0, 0, 0, 0, 5, 70, 70, 70, 70,
668  70, 0, 0, 10, 0, 10, 0, 0, 0, 0,
669  70, 70, 67, 70, 70, 0, 0, 0, 70, 70,
670  70, 70, 64, 0, 0, 0, 70, 70, 68, 69,
671  0, 0, 70, 70, 0, 70, 70, 65, 66, 0
672  } ;
673 
674 static const YY_CHAR yy_ec[256] =
675  { 0,
676  1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
677  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
678  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
679  1, 2, 4, 5, 6, 1, 7, 8, 9, 10,
680  11, 12, 13, 14, 15, 16, 17, 18, 19, 19,
681  19, 19, 19, 19, 19, 20, 20, 21, 22, 23,
682  24, 25, 26, 1, 27, 27, 27, 27, 28, 29,
683  30, 30, 30, 30, 30, 31, 30, 30, 30, 32,
684  30, 30, 30, 30, 33, 30, 30, 34, 30, 30,
685  35, 36, 37, 38, 39, 1, 40, 41, 27, 42,
686 
687  43, 44, 45, 30, 46, 47, 30, 48, 49, 50,
688  51, 52, 53, 54, 55, 56, 57, 58, 30, 59,
689  30, 60, 61, 62, 63, 64, 1, 1, 1, 1,
690  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
691  1, 1, 1, 1, 1, 1, 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 
698  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
699  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
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
704  } ;
705 
706 static const YY_CHAR yy_meta[65] =
707  { 0,
708  1, 1, 2, 1, 3, 1, 1, 1, 4, 1,
709  1, 1, 1, 1, 1, 5, 1, 6, 6, 7,
710  1, 1, 1, 1, 1, 3, 7, 7, 7, 8,
711  9, 9, 10, 8, 1, 3, 1, 1, 8, 6,
712  6, 7, 7, 6, 8, 8, 8, 9, 8, 11,
713  8, 9, 8, 11, 8, 11, 10, 11, 11, 8,
714  1, 1, 1, 1
715  } ;
716 
717 static const flex_int16_t yy_base[316] =
718  { 0,
719  0, 571, 575, 795, 795, 795, 41, 61, 547, 59,
720  534, 795, 795, 541, 55, 795, 56, 54, 65, 82,
721  69, 795, 795, 52, 540, 60, 795, 0, 81, 795,
722  795, 539, 60, 512, 795, 45, 795, 795, 520, 795,
723  498, 73, 795, 0, 795, 795, 795, 544, 86, 795,
724  795, 795, 795, 795, 795, 530, 128, 533, 88, 795,
725  65, 161, 0, 114, 107, 135, 527, 154, 516, 795,
726  795, 795, 500, 0, 90, 486, 795, 466, 145, 455,
727  795, 795, 476, 108, 462, 795, 103, 0, 0, 0,
728  795, 195, 71, 176, 493, 119, 117, 795, 466, 208,
729 
730  201, 209, 203, 142, 230, 237, 126, 238, 219, 0,
731  240, 795, 795, 101, 795, 0, 492, 265, 449, 112,
732  426, 434, 431, 436, 431, 409, 177, 0, 0, 449,
733  223, 271, 795, 267, 285, 280, 283, 311, 293, 312,
734  141, 314, 317, 345, 153, 277, 795, 334, 0, 0,
735  0, 407, 402, 393, 384, 387, 389, 385, 370, 416,
736  407, 0, 0, 402, 340, 357, 366, 165, 795, 371,
737  374, 379, 378, 356, 387, 0, 0, 394, 339, 0,
738  328, 337, 332, 323, 321, 323, 795, 0, 0, 382,
739  399, 395, 413, 444, 202, 435, 450, 451, 470, 795,
740 
741  350, 0, 0, 348, 311, 303, 294, 288, 292, 274,
742  0, 0, 303, 491, 490, 510, 419, 513, 519, 413,
743  523, 452, 0, 0, 298, 0, 265, 246, 252, 251,
744  227, 0, 451, 549, 530, 554, 498, 0, 270, 266,
745  211, 218, 224, 216, 183, 0, 0, 229, 177, 165,
746  173, 167, 0, 0, 0, 190, 147, 115, 0, 0,
747  0, 149, 116, 113, 140, 75, 57, 0, 0, 795,
748  602, 613, 619, 630, 639, 650, 661, 668, 675, 686,
749  692, 694, 696, 698, 701, 709, 715, 717, 721, 723,
750  725, 727, 729, 731, 733, 735, 739, 741, 743, 745,
751 
752  747, 751, 753, 755, 757, 761, 763, 765, 769, 771,
753  773, 777, 779, 783, 787
754  } ;
755 
756 static const flex_int16_t yy_def[316] =
757  { 0,
758  270, 1, 270, 270, 270, 270, 270, 271, 270, 270,
759  272, 270, 270, 270, 270, 270, 270, 270, 270, 270,
760  20, 270, 270, 270, 270, 270, 270, 273, 273, 270,
761  270, 270, 273, 273, 270, 270, 270, 270, 274, 270,
762  270, 271, 270, 271, 270, 270, 270, 270, 275, 270,
763  270, 270, 270, 270, 270, 270, 270, 276, 277, 270,
764  57, 270, 21, 270, 270, 270, 278, 270, 270, 270,
765  270, 270, 270, 273, 279, 280, 270, 273, 273, 273,
766  270, 270, 274, 274, 270, 270, 270, 281, 282, 283,
767  270, 270, 270, 270, 276, 276, 277, 270, 277, 270,
768 
769  270, 270, 270, 270, 270, 270, 270, 270, 270, 284,
770  285, 270, 270, 279, 270, 279, 270, 286, 273, 273,
771  273, 273, 273, 273, 273, 270, 270, 287, 288, 289,
772  270, 270, 270, 270, 270, 270, 270, 270, 270, 270,
773  284, 285, 270, 270, 270, 270, 270, 270, 290, 291,
774  292, 273, 273, 273, 273, 273, 273, 273, 273, 270,
775  270, 293, 294, 270, 270, 270, 270, 270, 270, 270,
776  270, 270, 270, 270, 270, 295, 296, 297, 273, 273,
777  273, 273, 273, 273, 273, 273, 270, 298, 299, 270,
778  270, 270, 270, 270, 194, 270, 270, 270, 270, 270,
779 
780  270, 300, 301, 302, 273, 273, 273, 273, 273, 273,
781  273, 303, 270, 270, 270, 270, 270, 270, 270, 270,
782  270, 270, 304, 305, 306, 273, 273, 273, 273, 273,
783  273, 307, 270, 270, 270, 270, 270, 308, 270, 309,
784  273, 273, 273, 273, 273, 310, 311, 312, 273, 273,
785  273, 273, 273, 299, 313, 314, 273, 273, 273, 273,
786  305, 315, 273, 273, 270, 273, 273, 273, 273, 0,
787  270, 270, 270, 270, 270, 270, 270, 270, 270, 270,
788  270, 270, 270, 270, 270, 270, 270, 270, 270, 270,
789  270, 270, 270, 270, 270, 270, 270, 270, 270, 270,
790 
791  270, 270, 270, 270, 270, 270, 270, 270, 270, 270,
792  270, 270, 270, 270, 270
793  } ;
794 
795 static const flex_int16_t yy_nxt[860] =
796  { 0,
797  4, 5, 6, 7, 8, 4, 9, 10, 11, 12,
798  13, 14, 15, 16, 17, 18, 19, 20, 21, 21,
799  22, 23, 24, 25, 26, 27, 28, 28, 28, 28,
800  29, 28, 28, 28, 30, 4, 31, 32, 33, 28,
801  28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
802  28, 28, 28, 28, 34, 28, 28, 28, 28, 28,
803  35, 36, 37, 38, 40, 43, 46, 51, 81, 56,
804  53, 57, 57, 57, 69, 70, 58, 43, 52, 54,
805  55, 59, 47, 72, 73, 75, 63, 63, 60, 76,
806  98, 78, 100, 41, 115, 269, 44, 61, 79, 62,
807 
808  62, 63, 270, 87, 87, 115, 82, 100, 44, 64,
809  83, 86, 65, 268, 66, 67, 133, 133, 88, 98,
810  127, 127, 61, 99, 64, 116, 104, 270, 104, 68,
811  96, 105, 105, 105, 64, 98, 116, 106, 66, 107,
812  67, 61, 89, 84, 90, 57, 57, 57, 147, 64,
813  61, 267, 99, 64, 266, 92, 93, 147, 93, 105,
814  105, 105, 64, 107, 264, 108, 153, 154, 64, 61,
815  92, 93, 166, 94, 94, 93, 61, 64, 62, 62,
816  63, 64, 109, 173, 120, 86, 107, 121, 64, 263,
817  122, 101, 166, 102, 161, 161, 64, 169, 147, 123,
818 
819  174, 106, 124, 64, 133, 260, 133, 131, 103, 131,
820  107, 259, 132, 132, 132, 258, 61, 102, 61, 133,
821  134, 169, 134, 133, 61, 135, 135, 135, 64, 216,
822  64, 136, 257, 137, 61, 137, 64, 147, 253, 138,
823  132, 132, 132, 64, 216, 64, 64, 105, 105, 105,
824  136, 64, 61, 61, 252, 110, 139, 137, 93, 137,
825  93, 64, 251, 250, 64, 64, 140, 249, 140, 107,
826  143, 144, 145, 93, 147, 94, 94, 93, 147, 64,
827  64, 245, 148, 148, 135, 135, 135, 146, 132, 132,
828  132, 144, 244, 107, 243, 61, 145, 149, 61, 93,
829 
830  242, 93, 135, 135, 135, 241, 147, 64, 61, 169,
831  64, 86, 137, 93, 93, 93, 94, 94, 93, 231,
832  64, 150, 64, 151, 168, 64, 61, 61, 93, 110,
833  94, 94, 93, 169, 230, 64, 137, 229, 64, 64,
834  165, 165, 147, 228, 143, 167, 145, 168, 227, 169,
835  226, 175, 175, 64, 64, 61, 147, 170, 147, 170,
836  171, 146, 172, 172, 172, 167, 211, 64, 210, 190,
837  145, 190, 209, 169, 191, 191, 191, 208, 192, 207,
838  192, 206, 64, 193, 193, 193, 171, 205, 172, 172,
839  172, 194, 194, 194, 195, 147, 172, 172, 172, 191,
840 
841  191, 191, 147, 200, 201, 201, 196, 93, 200, 197,
842  86, 198, 193, 193, 193, 86, 191, 191, 191, 187,
843  186, 196, 93, 185, 94, 94, 199, 93, 195, 93,
844  193, 193, 193, 184, 183, 198, 218, 218, 218, 182,
845  196, 93, 93, 93, 94, 94, 93, 217, 181, 217,
846  180, 179, 218, 218, 218, 196, 93, 86, 94, 94,
847  93, 194, 194, 194, 160, 195, 195, 195, 234, 234,
848  234, 214, 215, 159, 215, 158, 157, 196, 196, 196,
849  219, 221, 220, 156, 155, 195, 214, 215, 152, 94,
850  94, 215, 196, 196, 196, 133, 133, 196, 222, 237,
851 
852  147, 99, 220, 233, 96, 233, 220, 126, 234, 234,
853  234, 84, 196, 195, 125, 133, 133, 219, 93, 119,
854  93, 118, 235, 113, 235, 196, 220, 236, 236, 236,
855  218, 218, 218, 93, 195, 94, 94, 93, 195, 112,
856  196, 215, 110, 215, 96, 91, 196, 236, 236, 236,
857  196, 220, 86, 237, 85, 84, 215, 80, 94, 94,
858  215, 196, 77, 71, 50, 196, 234, 234, 234, 49,
859  45, 236, 236, 236, 270, 220, 39, 215, 270, 215,
860  270, 270, 215, 270, 215, 270, 270, 270, 270, 270,
861  270, 270, 215, 270, 94, 94, 215, 215, 270, 94,
862 
863  94, 215, 42, 42, 42, 42, 42, 42, 42, 42,
864  42, 42, 42, 48, 48, 48, 48, 48, 48, 48,
865  48, 48, 48, 48, 74, 74, 74, 74, 74, 74,
866  83, 270, 83, 83, 83, 83, 83, 83, 83, 83,
867  83, 48, 48, 270, 48, 270, 270, 270, 48, 48,
868  95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
869  95, 97, 97, 97, 97, 97, 97, 97, 97, 97,
870  97, 97, 111, 111, 111, 114, 114, 114, 114, 114,
871  114, 114, 114, 114, 114, 114, 117, 117, 117, 117,
872  117, 117, 117, 117, 117, 117, 117, 128, 128, 129,
873 
874  129, 130, 130, 141, 141, 142, 142, 142, 270, 142,
875  142, 117, 117, 270, 117, 270, 270, 270, 117, 117,
876  162, 162, 163, 163, 164, 270, 164, 164, 176, 176,
877  177, 177, 178, 178, 188, 188, 189, 189, 202, 202,
878  203, 203, 204, 270, 204, 204, 212, 212, 213, 213,
879  223, 223, 224, 224, 225, 270, 225, 225, 232, 232,
880  238, 238, 239, 239, 240, 270, 240, 240, 246, 246,
881  247, 247, 248, 270, 248, 248, 254, 254, 255, 255,
882  256, 270, 256, 256, 261, 261, 262, 270, 262, 262,
883  265, 270, 265, 265, 3, 270, 270, 270, 270, 270,
884 
885  270, 270, 270, 270, 270, 270, 270, 270, 270, 270,
886  270, 270, 270, 270, 270, 270, 270, 270, 270, 270,
887  270, 270, 270, 270, 270, 270, 270, 270, 270, 270,
888  270, 270, 270, 270, 270, 270, 270, 270, 270, 270,
889  270, 270, 270, 270, 270, 270, 270, 270, 270, 270,
890  270, 270, 270, 270, 270, 270, 270, 270, 270
891  } ;
892 
893 static const flex_int16_t yy_chk[860] =
894  { 0,
895  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
896  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
897  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
898  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
899  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
900  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
901  1, 1, 1, 1, 7, 8, 10, 15, 36, 18,
902  17, 18, 18, 18, 24, 24, 19, 42, 15, 17,
903  17, 19, 10, 26, 26, 29, 21, 21, 19, 29,
904  59, 33, 61, 7, 75, 267, 8, 20, 33, 20,
905 
906  20, 20, 21, 49, 49, 114, 36, 61, 42, 20,
907  84, 87, 20, 266, 20, 20, 93, 93, 49, 97,
908  87, 87, 65, 59, 20, 75, 64, 21, 64, 20,
909  96, 64, 64, 64, 65, 96, 114, 65, 20, 65,
910  20, 107, 49, 84, 49, 57, 57, 57, 265, 65,
911  66, 264, 97, 107, 263, 57, 57, 262, 57, 104,
912  104, 104, 66, 65, 258, 66, 120, 120, 107, 68,
913  57, 57, 141, 57, 57, 57, 62, 66, 62, 62,
914  62, 68, 66, 145, 79, 127, 68, 79, 62, 257,
915  79, 62, 141, 62, 127, 127, 68, 168, 256, 79,
916 
917  145, 68, 79, 62, 94, 252, 94, 92, 62, 92,
918  68, 251, 92, 92, 92, 250, 101, 62, 103, 94,
919  100, 168, 100, 94, 102, 100, 100, 100, 101, 195,
920  103, 101, 249, 101, 109, 103, 102, 248, 245, 102,
921  131, 131, 131, 101, 195, 103, 109, 105, 105, 105,
922  103, 102, 106, 108, 244, 111, 102, 101, 105, 103,
923  105, 109, 243, 242, 106, 108, 109, 241, 108, 106,
924  111, 111, 111, 105, 240, 105, 105, 105, 239, 106,
925  108, 231, 118, 118, 134, 134, 134, 111, 132, 132,
926  132, 111, 230, 106, 229, 136, 111, 118, 137, 132,
927 
928  228, 132, 135, 135, 135, 227, 225, 136, 139, 146,
929  137, 213, 136, 135, 132, 135, 132, 132, 132, 210,
930  139, 118, 136, 118, 146, 137, 138, 140, 135, 142,
931  135, 135, 135, 146, 209, 139, 136, 208, 138, 140,
932  139, 138, 148, 207, 142, 142, 142, 143, 206, 143,
933  205, 148, 148, 138, 140, 165, 204, 144, 201, 144,
934  144, 142, 144, 144, 144, 142, 186, 165, 185, 166,
935  142, 166, 184, 143, 166, 166, 166, 183, 167, 182,
936  167, 181, 165, 167, 167, 167, 170, 179, 170, 170,
937  170, 171, 171, 171, 172, 175, 172, 172, 172, 190,
938 
939  190, 190, 178, 174, 175, 175, 172, 172, 173, 172,
940  164, 172, 192, 192, 192, 161, 191, 191, 191, 160,
941  159, 172, 172, 158, 172, 172, 172, 191, 220, 191,
942  193, 193, 193, 157, 156, 172, 217, 217, 217, 155,
943  220, 193, 191, 193, 191, 191, 191, 196, 154, 196,
944  153, 152, 196, 196, 196, 220, 193, 130, 193, 193,
945  193, 194, 194, 194, 126, 197, 198, 222, 233, 233,
946  233, 194, 194, 125, 194, 124, 123, 197, 198, 222,
947  197, 198, 197, 122, 121, 199, 194, 194, 119, 194,
948  194, 194, 197, 198, 222, 197, 197, 199, 198, 222,
949 
950  117, 99, 199, 214, 95, 214, 197, 85, 214, 214,
951  214, 83, 199, 237, 80, 199, 199, 199, 215, 78,
952  215, 76, 216, 73, 216, 237, 199, 216, 216, 216,
953  218, 218, 218, 215, 219, 215, 215, 215, 221, 69,
954  237, 218, 67, 218, 58, 56, 219, 235, 235, 235,
955  221, 219, 48, 221, 41, 39, 218, 34, 218, 218,
956  218, 219, 32, 25, 14, 221, 234, 234, 234, 11,
957  9, 236, 236, 236, 3, 219, 2, 234, 0, 234,
958  0, 0, 236, 0, 236, 0, 0, 0, 0, 0,
959  0, 0, 234, 0, 234, 234, 234, 236, 0, 236,
960 
961  236, 236, 271, 271, 271, 271, 271, 271, 271, 271,
962  271, 271, 271, 272, 272, 272, 272, 272, 272, 272,
963  272, 272, 272, 272, 273, 273, 273, 273, 273, 273,
964  274, 0, 274, 274, 274, 274, 274, 274, 274, 274,
965  274, 275, 275, 0, 275, 0, 0, 0, 275, 275,
966  276, 276, 276, 276, 276, 276, 276, 276, 276, 276,
967  276, 277, 277, 277, 277, 277, 277, 277, 277, 277,
968  277, 277, 278, 278, 278, 279, 279, 279, 279, 279,
969  279, 279, 279, 279, 279, 279, 280, 280, 280, 280,
970  280, 280, 280, 280, 280, 280, 280, 281, 281, 282,
971 
972  282, 283, 283, 284, 284, 285, 285, 285, 0, 285,
973  285, 286, 286, 0, 286, 0, 0, 0, 286, 286,
974  287, 287, 288, 288, 289, 0, 289, 289, 290, 290,
975  291, 291, 292, 292, 293, 293, 294, 294, 295, 295,
976  296, 296, 297, 0, 297, 297, 298, 298, 299, 299,
977  300, 300, 301, 301, 302, 0, 302, 302, 303, 303,
978  304, 304, 305, 305, 306, 0, 306, 306, 307, 307,
979  308, 308, 309, 0, 309, 309, 310, 310, 311, 311,
980  312, 0, 312, 312, 313, 313, 314, 0, 314, 314,
981  315, 0, 315, 315, 270, 270, 270, 270, 270, 270,
982 
983  270, 270, 270, 270, 270, 270, 270, 270, 270, 270,
984  270, 270, 270, 270, 270, 270, 270, 270, 270, 270,
985  270, 270, 270, 270, 270, 270, 270, 270, 270, 270,
986  270, 270, 270, 270, 270, 270, 270, 270, 270, 270,
987  270, 270, 270, 270, 270, 270, 270, 270, 270, 270,
988  270, 270, 270, 270, 270, 270, 270, 270, 270
989  } ;
990 
991 /* Table of booleans, true if rule could match eol. */
993  { 0,
994 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
995  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
996  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
997  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, };
998 
1001 
1002 extern int yy_flex_debug;
1004 
1005 /* The intent behind this definition is that it'll catch
1006  * any uses of REJECT which flex missed.
1007  */
1008 #define REJECT reject_used_but_not_detected
1009 #define yymore() yymore_used_but_not_detected
1010 #define YY_MORE_ADJ 0
1011 #define YY_RESTORE_YY_MORE_OFFSET
1012 char *yytext;
1013 #line 1 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
1014 /* $Id: lexer.l 23366 2017-02-03 16:21:23Z coelho $ */
1015 /******************** LEXICAL ANALYZER **************************
1016 
1017  Here are the lexical rules, based on the work of people from
1018  Open Source Quality projects (http://osq.cs.berkeley.edu/), used
1019  by the CCured source-to-source translator for C
1020 
1021 
1022 *****************************************************************/
1023 /*(*
1024  *
1025  * Copyright (c) 2001-2003,
1026  * George C. Necula <necula@cs.berkeley.edu>
1027  * Scott McPeak <smcpeak@cs.berkeley.edu>
1028  * Wes Weimer <weimer@cs.berkeley.edu>
1029  * Ben Liblit <liblit@cs.berkeley.edu>
1030  * All rights reserved.
1031  *
1032  * Redistribution and use in source and binary forms, with or without
1033  * modification, are permitted provided that the following conditions are
1034  * met:
1035  *
1036  * 1. Redistributions of source code must retain the above copyright
1037  * notice, this list of conditions and the following disclaimer.
1038  *
1039  * 2. Redistributions in binary form must reproduce the above copyright
1040  * notice, this list of conditions and the following disclaimer in the
1041  * documentation and/or other materials provided with the distribution.
1042  *
1043  * 3. The names of the contributors may not be used to endorse or promote
1044  * products derived from this software without specific prior written
1045  * permission.
1046  *
1047  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
1048  * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
1049  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
1050  * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
1051  * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
1052  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
1053  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
1054  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
1055  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
1056  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
1057  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1058  *
1059  *)
1060 (* FrontC -- lexical analyzer
1061 **
1062 ** 1.0 3.22.99 Hugues Cassé First version.
1063 ** 2.0 George Necula 12/12/00: Many extensions
1064 *)*/
1065 #define YY_NO_INPUT 1
1066 #line 58 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
1067 #ifdef HAVE_CONFIG_H
1068  #include "pips_config.h"
1069 #endif
1070 #include <stdlib.h>
1071 #include <stdio.h>
1072 #include <string.h>
1073 #include <ctype.h>
1074 
1075 #include "genC.h"
1076 #include "linear.h"
1077 #include "ri.h"
1078 #include "ri-util.h"
1079 #include "misc.h"
1080 
1081 #include "splitc.h"
1082 #include "preprocessor.h"
1083 
1084 
1085 int csplit_line_number = 1; /**< To be exported to the parser for
1086  splitting the preprocessed file */
1087 int user_line_number = 1; /**< To be exported to the parser for error
1088  messages related to the user file */
1089 
1090 /* To track current file position: */
1091 #define YY_USER_ACTION update_csplit_file_offset_information();
1094 
1095 /* To track nesting in brackets */
1096 static int bracket_depth = 0;
1097 
1098 /* A state-machine to gather the trailing comments of a statement with an
1099  heuristic to decide if some comments and spaces will go into the
1100  previous or next top-level construct: */
1102  PUT_IN_NEXT_TOP_LEVEL_CONSTRUCT, /**< Normal mode: comments and spaces
1103  are associated to the top-level
1104  construct to encounter: */
1105  GATHER_SPACES, /**< We gather only spaces in the previous top-level
1106  construct */
1107  GATHER_COMMENT, /**< We gather comments in the previous top-level construct */
1108 };
1109 /* Indeed it does not work since csplit_copy() is called from splitc.y
1110  when a function definition is found and thus we cannot gather the
1111  comment in it... :-( */
1114 
1115 
1116 static void gdb_marker()
1117 {
1118 /* Just to be able to set an easy breakpoint */
1119 ;
1120 }
1121 
1122 
1123 /* Reinitialise global position numbers for a new file. */
1125 {
1126  csplit_line_number = 1;
1127  user_line_number = 1;
1131  bracket_depth = 0;
1132 }
1133 
1134 static int csplit_current_beginning = 1000000;
1135 static int user_current_beginning = 1000000;
1136 
1137 
1138 /* If we encounter a possible function begin, just snapshot the position
1139  of the function beginning: */
1145  /* From now, the comments and spaces are associated to the current
1146  top-level construct: */
1148 }
1149 
1150 
1151 /* This function is called at the end of any top-level C construct: */
1153 {
1154  int leaked = 0;
1155 
1156  csplit_current_beginning = 1000000;
1157  user_current_beginning = 1000000;
1158  csplit_is_static_p = false;
1159 
1160  /* Snapshot the current file position as a potential function begin: */
1162 
1163  /* Aggregate following spaces and comments on the sameline to the
1164  previous top-level construct: */
1166 
1167 
1171 
1175 
1179 
1183 
1184  if((leaked=check_signature_balance())!=0) {
1185  /* FI: I'm not ready to abort() here... */
1186  pips_debug(5, "Likely memory leaks: %d\n", leaked);
1187  }
1188 }
1189 
1191 {
1192  return csplit_current_beginning;
1193 }
1194 
1195 
1196 /* Get the current line number in the file to split from the user point of
1197  view (before preprocessor expansion): */
1199  return user_current_beginning;
1200 }
1201 
1202 
1203 /* Get the file position in the file to split where the current function
1204  begins: */
1207 }
1208 
1209 
1210 /* Get the current file position in the file to split: */
1213 }
1214 
1215 
1216 /* Function called each time a token is read to trac file position
1217  information: */
1220 }
1221 
1222 
1223 static int lf_count(string s)
1224 {
1225  string cs = s;
1226  int count = 0;
1227 
1228  while(*cs) {
1229  if(*cs=='\n') count++;
1230  cs++;
1231  }
1232  return count;
1233 }
1234 ␌
1235 /* The lexer cannot handle the ambiguity between named types and
1236  *variables without extra-help.
1237  */
1238 
1239 #define TOKEN_UNDEFINED (-1)
1241 
1242 /* This is going to be the previous token because LEXER_RETURN is not
1243 used in case the lexer handles either a named type or a variable. */
1244 #define LEXER_RETURN(t) return(previous_keyword_token=t)
1245 
1246 /* See if id is a keyword, a typedef or an identifier.
1247  * Returns the token number for keywords and typedefs.
1248  * Returns 0 for variable identifiers.
1249  */
1251 {
1252  /* No need to bother for scopes when dealing with C keywords,
1253  * but do not take into account top-level typedefs which may be masked.
1254  */
1255  int t = is_c_keyword_typedef(id);
1256  if(t==0 || t==TK_NAMED_TYPE) {
1257  // id may be a keyword, but scopes must be used
1258  string sn = get_preprocessor_current_scope();
1259  string scoped_id = strdup(concatenate(id, "%", sn, NULL));
1260  t = is_c_keyword_typedef(scoped_id);
1261  free(scoped_id);
1262  if(t == 0) {
1263  int i, n = preprocessor_scope_number();
1264  for(i=2; i<=n && t==0; i++) {
1266  scoped_id = strdup(concatenate(id, "%", sn, NULL));
1267  t = is_c_keyword_typedef(scoped_id);
1268  ifdebug(1) {
1269  if(t==TK_NAMED_TYPE)
1270  fprintf(stderr, "Token \"%s\" identified as TK_NAMED_TYPE.\n",
1271  scoped_id);
1272  }
1273  free(scoped_id);
1274  }
1275  /* Check again for a global typedef */
1276  t = is_c_keyword_typedef(id);
1277  }
1278  }
1279  /* FI: we *bet* here that "extern foo(t1, t2, t3);"
1280  * with t1, t2 and t3 named type is not possible:-(
1281  */
1282 #define TK_TYPE_P(tk) \
1283  ((tk)==TK_CHAR || (tk)==TK_INT || \
1284  (tk)==TK_DOUBLE || (tk)==TK_FLOAT || (tk)==TK_COMPLEX || \
1285  (tk)==TK_ENUM || (tk)==TK_STRUCT || (tk)==TK_UNION || \
1286  (tk)==TK_SIGNED|| (tk)==TK_UNSIGNED|| (tk)==TK_LONG|| (tk)==TK_SHORT ||\
1287  (tk)==TK_RETURN)
1288  if(t==TK_NAMED_TYPE
1291  // Identifier
1292  t = 0;
1293  pips_debug(1, "Token \"%s\" is in fact assumed to be an identifier.\n",
1294  id);
1295  }
1297  if(t==TK_STATIC && bracket_depth>0)
1298  t = TK_STATIC_DIMENSION;
1299  return t;
1300 }
1301 
1302 #line 1303 "<stdout>"
1303 /* To track file line number automatically: */
1304 #line 325 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
1305  /* From C norm A.1: */
1306 /* " */
1307 #line 1308 "<stdout>"
1308 
1309 #define INITIAL 0
1310 
1311 #ifndef YY_NO_UNISTD_H
1312 /* Special case for "unistd.h", since it is non-ANSI. We include it way
1313  * down here because we want the user's section 1 to have been scanned first.
1314  * The user has a chance to override it with an option.
1315  */
1316 #include <unistd.h>
1317 #endif
1318 
1319 #ifndef YY_EXTRA_TYPE
1320 #define YY_EXTRA_TYPE void *
1321 #endif
1322 
1323 static int yy_init_globals ( void );
1324 
1325 /* Accessor methods to globals.
1326  These are made visible to non-reentrant scanners for convenience. */
1327 
1328 int yylex_destroy ( void );
1329 
1330 int yyget_debug ( void );
1331 
1332 void yyset_debug ( int debug_flag );
1333 
1334 YY_EXTRA_TYPE yyget_extra ( void );
1335 
1336 void yyset_extra ( YY_EXTRA_TYPE user_defined );
1337 
1338 FILE *yyget_in ( void );
1339 
1340 void yyset_in ( FILE * _in_str );
1341 
1342 FILE *yyget_out ( void );
1343 
1344 void yyset_out ( FILE * _out_str );
1345 
1346  int yyget_leng ( void );
1347 
1348 char *yyget_text ( void );
1349 
1350 int yyget_lineno ( void );
1351 
1352 void yyset_lineno ( int _line_number );
1353 
1354 /* Macros after this point can all be overridden by user definitions in
1355  * section 1.
1356  */
1357 
1358 #ifndef YY_SKIP_YYWRAP
1359 #ifdef __cplusplus
1360 extern "C" int yywrap ( void );
1361 #else
1362 extern int yywrap ( void );
1363 #endif
1364 #endif
1365 
1366 #ifndef YY_NO_UNPUT
1367 
1368 #endif
1369 
1370 #ifndef yytext_ptr
1371 static void yy_flex_strncpy ( char *, const char *, int );
1372 #endif
1373 
1374 #ifdef YY_NEED_STRLEN
1375 static int yy_flex_strlen ( const char * );
1376 #endif
1377 
1378 #ifndef YY_NO_INPUT
1379 #ifdef __cplusplus
1380 static int yyinput ( void );
1381 #else
1382 static int input ( void );
1383 #endif
1384 
1385 #endif
1386 
1387 /* Amount of stuff to slurp up with each read. */
1388 #ifndef YY_READ_BUF_SIZE
1389 #ifdef __ia64__
1390 /* On IA-64, the buffer size is 16k, not 8k */
1391 #define YY_READ_BUF_SIZE 16384
1392 #else
1393 #define YY_READ_BUF_SIZE 8192
1394 #endif /* __ia64__ */
1395 #endif
1396 
1397 /* Copy whatever the last rule matched to the standard output. */
1398 #ifndef ECHO
1399 /* This used to be an fputs(), but since the string might contain NUL's,
1400  * we now use fwrite().
1401  */
1402 #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
1403 #endif
1404 
1405 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1406  * is returned in "result".
1407  */
1408 #ifndef YY_INPUT
1409 #define YY_INPUT(buf,result,max_size) \
1410  if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1411  { \
1412  int c = '*'; \
1413  int n; \
1414  for ( n = 0; n < max_size && \
1415  (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1416  buf[n] = (char) c; \
1417  if ( c == '\n' ) \
1418  buf[n++] = (char) c; \
1419  if ( c == EOF && ferror( yyin ) ) \
1420  YY_FATAL_ERROR( "input in flex scanner failed" ); \
1421  result = n; \
1422  } \
1423  else \
1424  { \
1425  errno=0; \
1426  while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
1427  { \
1428  if( errno != EINTR) \
1429  { \
1430  YY_FATAL_ERROR( "input in flex scanner failed" ); \
1431  break; \
1432  } \
1433  errno=0; \
1434  clearerr(yyin); \
1435  } \
1436  }\
1437 \
1438 
1439 #endif
1440 
1441 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1442  * we don't want an extra ';' after the "return" because that will cause
1443  * some compilers to complain about unreachable statements.
1444  */
1445 #ifndef yyterminate
1446 #define yyterminate() return YY_NULL
1447 #endif
1448 
1449 /* Number of entries by which start-condition stack grows. */
1450 #ifndef YY_START_STACK_INCR
1451 #define YY_START_STACK_INCR 25
1452 #endif
1453 
1454 /* Report a fatal error. */
1455 #ifndef YY_FATAL_ERROR
1456 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1457 #endif
1458 
1459 /* end tables serialization structures and prototypes */
1460 
1461 /* Default declaration of generated scanner - a define so the user can
1462  * easily add parameters.
1463  */
1464 #ifndef YY_DECL
1465 #define YY_DECL_IS_OURS 1
1466 
1467 extern int yylex (void);
1468 
1469 #define YY_DECL int yylex (void)
1470 #endif /* !YY_DECL */
1471 
1472 /* Code executed at the beginning of each rule, after yytext and yyleng
1473  * have been set up.
1474  */
1475 #ifndef YY_USER_ACTION
1476 #define YY_USER_ACTION
1477 #endif
1478 
1479 /* Code executed at the end of each rule. */
1480 #ifndef YY_BREAK
1481 #define YY_BREAK /*LINTED*/break;
1482 #endif
1483 
1484 #define YY_RULE_SETUP \
1485  if ( yyleng > 0 ) \
1486  YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
1487  (yytext[yyleng - 1] == '\n'); \
1488  YY_USER_ACTION
1489 
1490 /** The main scanner function which does all the work.
1491  */
1493 {
1494  yy_state_type yy_current_state;
1495  char *yy_cp, *yy_bp;
1496  int yy_act;
1497 
1498  if ( !(yy_init) )
1499  {
1500  (yy_init) = 1;
1501 
1502 #ifdef YY_USER_INIT
1503  YY_USER_INIT;
1504 #endif
1505 
1506  if ( ! (yy_start) )
1507  (yy_start) = 1; /* first start state */
1508 
1509  if ( ! yyin )
1510  yyin = stdin;
1511 
1512  if ( ! yyout )
1513  yyout = stdout;
1514 
1515  if ( ! YY_CURRENT_BUFFER ) {
1519  }
1520 
1522  }
1523 
1524  {
1525 #line 334 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
1526 
1527 
1528 #line 1529 "<stdout>"
1529 
1530  while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
1531  {
1532  yy_cp = (yy_c_buf_p);
1533 
1534  /* Support of yytext. */
1535  *yy_cp = (yy_hold_char);
1536 
1537  /* yy_bp points to the position in yy_ch_buf of the start of
1538  * the current run.
1539  */
1540  yy_bp = yy_cp;
1541 
1542  yy_current_state = (yy_start);
1543  yy_current_state += YY_AT_BOL();
1544 yy_match:
1545  do
1546  {
1547  YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
1548  if ( yy_accept[yy_current_state] )
1549  {
1550  (yy_last_accepting_state) = yy_current_state;
1552  }
1553  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1554  {
1555  yy_current_state = (int) yy_def[yy_current_state];
1556  if ( yy_current_state >= 271 )
1557  yy_c = yy_meta[yy_c];
1558  }
1559  yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1560  ++yy_cp;
1561  }
1562  while ( yy_base[yy_current_state] != 795 );
1563 
1564 yy_find_action:
1565  yy_act = yy_accept[yy_current_state];
1566  if ( yy_act == 0 )
1567  { /* have to back up */
1569  yy_current_state = (yy_last_accepting_state);
1570  yy_act = yy_accept[yy_current_state];
1571  }
1572 
1574 
1576  {
1577  int yyl;
1578  for ( yyl = 0; yyl < yyleng; ++yyl )
1579  if ( yytext[yyl] == '\n' )
1580 
1581  yylineno++;
1582 ;
1583  }
1584 
1585 do_action: /* This label is used only to access EOF actions. */
1586 
1587  switch ( yy_act )
1588  { /* beginning of action switch */
1589  case 0: /* must back up */
1590  /* undo the effects of YY_DO_BEFORE_ACTION */
1591  *yy_cp = (yy_hold_char);
1593  yy_current_state = (yy_last_accepting_state);
1594  goto yy_find_action;
1595 
1596 case 1:
1597 /* rule 1 can match eol */
1599 #line 336 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
1600 { // help emacs: */
1601  // Bug in the Flex 2.5.35 manual A.4.3, "/***/" fails. :-(
1604 
1605 
1606  pips_debug(5,"Comment \"%s\"\n",yytext);
1607 
1609  /* This comment is associated to previous
1610  top-level construct: */
1613  /* We encounter a comment whereas we were
1614  gathering spaces into the previous
1615  top-level construct. So now this comment
1616  will go in the next top-level construct: */
1618  }
1619  YY_BREAK
1620 case 2:
1621 /* rule 2 can match eol */
1623 #line 356 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
1624 {
1625  /* Look for a # up to the end of line,
1626  dealing with any backslashed new lines: */
1627  /* csplit_line_number++; */
1628  pips_debug(5,"Pragma comment %s\n",yytext);
1629  /* Must be a line pragma left by the preprocessor:
1630  # 1 blablabla.c
1631  #pragma blablabla
1632  #line nnn
1633  */
1634  gdb_marker();
1635  size_t n;
1636  if(strstr(yytext, "#pragma")==yytext) {
1637  // FC 2016-06-18: Why not count pragma lines? This just breaks line numbering...
1638  // commented out: user_line_number--;
1639  }
1640  /* the preprocessor seems to provide line information in pragmas
1641  which are not #line pragmas. */
1642  else if(/* strstr(yytext, "#line")==yytext && */ (n=strlen(yytext))>=4) {
1643  int initial_C_line_number = -1;
1644  char include_file[n] ;
1645  int items = sscanf(yytext+1, "%d \"%[^\"]\"", &initial_C_line_number,include_file);
1646  if(items>=1) {
1647  /* Get rid of the pragma LF itslef */
1648  user_line_number = initial_C_line_number-1;
1649  if(items==2) {
1650  if(!current_file_path) current_file_path = strdup(include_file);
1652  else if(strcmp(include_file,current_file_path)==0) { free(current_include_file_path) ; current_include_file_path=NULL; }
1653  }
1654  }
1655  else {
1656  pips_user_warning("No line number in # pragma: \"%s\".\n", yytext);
1657  splitc_error("Ill. formated # pragma\n");
1658  }
1659  }
1660  }
1661  YY_BREAK
1662 case 3:
1663 /* rule 3 can match eol */
1665 #line 394 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
1666 {
1668  user_line_number++;
1669  pips_debug(5, "New line %d, ext=%d, func=%d\n", csplit_line_number, csplit_is_external, csplit_is_function);
1670 
1672  /* We encounter a newline, stop gathering
1673  comments and gather spaces from now: */
1674  //gather_comment_state_machine = GATHER_SPACES;
1675  /* Well, ideed, we want to be compatible with
1676  old behaviour: associate newlines and other
1677  from now to next top-level construct: */
1679  /* Associate the current \n to the previous
1680  top-level construct: */
1682  }
1684  /* Add this newline to the previous top-level
1685  construct: */
1687  }
1688  }
1689  YY_BREAK
1690 case 4:
1692 #line 418 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
1693 {
1694  /* Eat up whitespaces. After the previous '\n'
1695  since it includes '\n' and we want
1696  lower priority */
1699  /* Add this space to the previous top-level
1700  construct: */
1702  }
1703  }
1704  YY_BREAK
1705 case 5:
1707 #line 430 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
1708 {
1710  }
1711  YY_BREAK
1712 case 6:
1713 /* rule 6 can match eol */
1715 #line 434 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
1716 {
1717  /* Have a look to Flex A.4.3 too... */
1718  /* Escaped character constants. Their
1719  syntax is understood in PIPS character
1720  constant construtors. */
1721  pips_debug(9,"TK_CHARCON: %s\n",yytext);
1724  }
1725  YY_BREAK
1726 case 7:
1727 /* rule 7 can match eol */
1729 #line 444 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
1730 {
1731  /* Escaped wide character constants. Their
1732  syntax is understood in PIPS character
1733  constant construtors. */
1734  pips_debug(9,"TK_CHARCON wide character constant: %s\n",yytext);
1737  }
1738  YY_BREAK
1739 case 8:
1740 /* rule 8 can match eol */
1742 #line 453 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
1743 {
1744  pips_debug(5,"TK_STRINGCON regular or wide string: %s\n",yytext);
1745  /* the "world" in L"Hello, " "world" should be treated as
1746  wide even though there's no L immediately preceding it */
1749  }
1750  YY_BREAK
1751 case 9:
1752 /* rule 9 can match eol */
1754 #line 461 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
1755 {
1756  pips_debug(5,"TK_WSTRINGCON wide string: %s\n",yytext);
1759  }
1760  YY_BREAK
1761 case 10:
1763 #line 466 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
1764 {
1765  pips_debug(5,"TK_FLOATCON %s\n",yytext);
1768  }
1769  YY_BREAK
1770 case 11:
1772 #line 471 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
1773 {
1774  pips_debug(5,"TK_COMPLEXCON %s\n",yytext);
1777  }
1778  YY_BREAK
1779 case 12:
1781 #line 476 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
1782 {
1783  pips_debug(5,"Hexnum TK_INTCON %s\n",yytext);
1786  }
1787  YY_BREAK
1788 case 13:
1790 #line 481 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
1791 {
1792  pips_debug(5,"Octnum TK_INTCON %s\n",yytext);
1795  }
1796  YY_BREAK
1797 case 14:
1799 #line 486 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
1800 {
1801  pips_debug(5,"TK_INTCON %s\n",yytext);
1804  }
1805  YY_BREAK
1806 case 15:
1808 #line 491 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
1809 {
1810  pips_debug(5,"TK_EOF %s\n",yytext);
1811  yyterminate();
1812  }
1813  YY_BREAK
1814 case 16:
1816 #line 495 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
1817 {
1818  pips_debug(5,"TK_ELLIPSIS %s\n",yytext);
1820  }
1821  YY_BREAK
1822 case 17:
1824 #line 499 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
1825 {
1826  pips_debug(5,"TK_PLUS_EQ %s\n",yytext);
1828  }
1829  YY_BREAK
1830 case 18:
1832 #line 503 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
1833 {
1834  pips_debug(5,"TK_MINUS_EQ %s\n",yytext);
1836  }
1837  YY_BREAK
1838 case 19:
1840 #line 507 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
1841 {
1842  pips_debug(5,"TK_STAR_EQ %s\n",yytext);
1844  }
1845  YY_BREAK
1846 case 20:
1848 #line 511 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
1849 {
1850  pips_debug(5,"TK_SLASH_EQ %s\n",yytext);
1852  }
1853  YY_BREAK
1854 case 21:
1856 #line 515 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
1857 {
1858  pips_debug(5,"TK_PERCENT_EQ %s\n",yytext);
1860  }
1861  YY_BREAK
1862 case 22:
1864 #line 519 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
1865 {
1866  pips_debug(5,"TK_PIPE_EQ %s\n",yytext);
1868  }
1869  YY_BREAK
1870 case 23:
1872 #line 523 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
1873 {
1874  pips_debug(5,"TK_AND_EQ %s\n",yytext);
1876  }
1877  YY_BREAK
1878 case 24:
1880 #line 527 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
1881 {
1882  pips_debug(5,"TK_CIRC_EQ %s\n",yytext);
1884  }
1885  YY_BREAK
1886 case 25:
1888 #line 531 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
1889 {
1890  pips_debug(5,"TK_INF_INF_EQ %s\n",yytext);
1892  }
1893  YY_BREAK
1894 case 26:
1896 #line 535 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
1897 {
1898  pips_debug(5,"TK_SUP_SUP_EQ %s\n",yytext);
1900  }
1901  YY_BREAK
1902 case 27:
1904 #line 539 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
1905 {
1906  pips_debug(5,"TK_INF_INF %s\n",yytext);
1908  }
1909  YY_BREAK
1910 case 28:
1912 #line 543 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
1913 {
1914  pips_debug(5,"TK_SUP_SUP %s\n",yytext);
1916  }
1917  YY_BREAK
1918 case 29:
1920 #line 547 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
1921 {
1922  pips_debug(5,"TK_EQ_EQ %s\n",yytext);
1924  }
1925  YY_BREAK
1926 case 30:
1928 #line 551 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
1929 {
1930  pips_debug(5,"TK_EXCLAM_EQ %s\n",yytext);
1932  }
1933  YY_BREAK
1934 case 31:
1936 #line 555 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
1937 {
1938  pips_debug(5,"TK_INF_EQ %s\n",yytext);
1940  }
1941  YY_BREAK
1942 case 32:
1944 #line 559 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
1945 {
1946  pips_debug(5,"TK_SUP_EQ %s\n",yytext);
1948  }
1949  YY_BREAK
1950 case 33:
1952 #line 563 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
1953 {
1954  pips_debug(5,"TK_EQ %s\n",yytext);
1956  }
1957  YY_BREAK
1958 case 34:
1960 #line 567 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
1961 {
1962  pips_debug(5,"TK_INF %s\n",yytext);
1964  }
1965  YY_BREAK
1966 case 35:
1968 #line 571 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
1969 {
1970  pips_debug(5,"TK_SUP %s\n",yytext);
1972  }
1973  YY_BREAK
1974 case 36:
1976 #line 575 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
1977 {
1978  pips_debug(5,"TK_PLUS_PLUS %s\n",yytext);
1980  }
1981  YY_BREAK
1982 case 37:
1984 #line 579 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
1985 {
1986  pips_debug(5,"TK_MINUS_MINUS %s\n",yytext);
1988  }
1989  YY_BREAK
1990 case 38:
1992 #line 583 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
1993 {
1994  pips_debug(5,"TK_ARROW %s\n",yytext);
1996  }
1997  YY_BREAK
1998 case 39:
2000 #line 587 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
2001 {
2002  pips_debug(5,"TK_PLUS %s\n",yytext);
2004  }
2005  YY_BREAK
2006 case 40:
2008 #line 591 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
2009 {
2010  pips_debug(5,"TK_MINUS %s\n",yytext);
2012  }
2013  YY_BREAK
2014 case 41:
2016 #line 595 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
2017 {
2018  pips_debug(5,"TK_STAR %s\n",yytext);
2020  }
2021  YY_BREAK
2022 case 42:
2024 #line 599 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
2025 {
2026  pips_debug(5,"TK_SLASH %s\n",yytext);
2028  }
2029  YY_BREAK
2030 case 43:
2032 #line 603 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
2033 {
2034  pips_debug(5,"TK_PERCENT %s\n",yytext);
2036  }
2037  YY_BREAK
2038 case 44:
2040 #line 607 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
2041 {
2042  pips_debug(5,"TK_EXCLAM %s\n",yytext);
2044  }
2045  YY_BREAK
2046 case 45:
2048 #line 611 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
2049 {
2050  pips_debug(5,"TK_AND_AND %s\n",yytext);
2052  }
2053  YY_BREAK
2054 case 46:
2056 #line 615 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
2057 {
2058  pips_debug(5,"TK_PIPE_PIPE %s\n",yytext);
2060  }
2061  YY_BREAK
2062 case 47:
2064 #line 619 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
2065 {
2066  pips_debug(5,"TK_AND %s\n",yytext);
2068  }
2069  YY_BREAK
2070 case 48:
2072 #line 623 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
2073 {
2074  pips_debug(5,"TK_PIPE %s\n",yytext);
2076  }
2077  YY_BREAK
2078 case 49:
2080 #line 627 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
2081 {
2082  pips_debug(5,"TK_CIRC %s\n",yytext);
2084  }
2085  YY_BREAK
2086 case 50:
2088 #line 631 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
2089 {
2090  pips_debug(5,"TK_QUEST %s\n",yytext);
2092  }
2093  YY_BREAK
2094 case 51:
2096 #line 635 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
2097 {
2098  pips_debug(5,"TK_COLON %s\n",yytext);
2100  }
2101  YY_BREAK
2102 case 52:
2104 #line 639 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
2105 {
2106  pips_debug(5,"TK_TILDE %s\n",yytext);
2108  }
2109  YY_BREAK
2110 case 53:
2112 #line 643 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
2113 {
2114  pips_debug(5,"TK_LBRACE %s\n",yytext);
2116  }
2117  YY_BREAK
2118 case 54:
2120 #line 647 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
2121 {
2122  pips_debug(5,"TK_RBRACE %s\n",yytext);
2124  }
2125  YY_BREAK
2126 case 55:
2128 #line 651 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
2129 {
2130  pips_debug(5,"TK_LBRACKET %s\n",yytext);
2131  bracket_depth++;
2133  }
2134  YY_BREAK
2135 case 56:
2137 #line 656 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
2138 {
2139  pips_debug(5,"TK_RBRACKET %s\n",yytext);
2140  bracket_depth--;
2142  }
2143  YY_BREAK
2144 case 57:
2146 #line 661 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
2147 {
2148  pips_debug(5,"TK_LPAREN %s\n",yytext);
2150  }
2151  YY_BREAK
2152 case 58:
2154 #line 665 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
2155 {
2156  pips_debug(5,"TK_RPAREN %s\n",yytext);
2158  }
2159  YY_BREAK
2160 case 59:
2162 #line 669 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
2163 {
2164  pips_debug(5,"TK_SEMICOLON %s\n",yytext);
2166  }
2167  YY_BREAK
2168 case 60:
2170 #line 673 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
2171 {
2172  pips_debug(5,"TK_COMMA %s\n",yytext);
2174  }
2175  YY_BREAK
2176 case 61:
2178 #line 677 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
2179 {
2180  pips_debug(5,"TK_DOT %s\n",yytext);
2182  }
2183  YY_BREAK
2184 case 62:
2186 #line 681 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
2187 {
2188  pips_debug(5,"TK_SIZEOF %s\n",yytext);
2190  }
2191  YY_BREAK
2192 case 63:
2194 #line 685 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
2195 {
2196  pips_debug(5,"TK_ASM %s\n",yytext);
2198  }
2199  YY_BREAK
2200 case 64:
2202 #line 689 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
2203 {
2204  /* convert __va_list from bsd into __builtin_va_list */
2205  pips_debug(5,"TK_VA_LIST %s\n",yytext);
2206  yytext = strdup("__builtin_va_list");
2209  pips_assert("builtin valist found\n",t>0);
2210  pips_debug(5,"Keyword or typedef name: %s\n",yytext);
2212  return (t);
2213 }
2214  YY_BREAK
2215 case 65:
2217 #line 700 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
2218 {
2219 
2220 /* FI: when we change our minds and want to make these tokens, we must
2221  * insert them in keyword_typedef_table.
2222  */
2223 
2224  pips_debug(5,"TK_ATTRIBUTE %s\n",yytext);
2226  }
2227  YY_BREAK
2228 case 66:
2230 #line 709 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
2231 {
2232  pips_user_warning("gcc extension keyword \"__extension__\" is ignored\n");
2233  }
2234  YY_BREAK
2235 case 67:
2237 #line 712 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
2238 {
2239  pips_user_warning("gcc extension keyword \"__inline\" is ignored\n");
2240  }
2241  YY_BREAK
2242 case 68:
2244 #line 715 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
2245 {
2246  pips_user_warning("gcc extension keyword \"__inline__\" is ignored\n");
2247  }
2248  YY_BREAK
2249 case 69:
2251 #line 718 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
2252 {
2253  pips_user_warning("gcc extension keyword \"__signed__\" is ignored\n");
2254  }
2255  YY_BREAK
2256 case 70:
2258 #line 721 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
2259 {
2260  /* C keywords or identifiers */
2263  if (t>0)
2264  {
2265  pips_debug(5,"Keyword or typedef name: %s\n",yytext);
2267  return (t);
2268  }
2269  else
2270  {
2271  pips_debug(5,"TK_IDENT: %s\n",yytext);
2272  /* Might not work if a function returns a struct declared locally in the function declaration, or a pointer to such a structure */
2275  pips_debug(5, "Temptative function name found: \"%s\"\n",
2277  }
2279  pips_debug(5, "Identifier \"%s\" ignored because of two previous identifiers \"%s\"\n",
2282  }
2283  else {
2285  pips_debug(5, "Identifier \"%s\" not ignored in spite of two previous identifiers \"%s\"\n",
2288  }
2289 
2292  }
2293  }
2294  YY_BREAK
2295 case YY_STATE_EOF(INITIAL):
2296 #line 756 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
2297 {
2298  pips_debug(5,"TK_EOF %s\n",yytext);
2300  }
2301  YY_BREAK
2302 case 71:
2304 #line 760 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
2305 {
2306  if (*yytext=='#') {
2307  csplit_parser_warning("Unrecognized character '%s'\n", yytext);
2308  pips_user_warning("Preprocessor directives must have disappeared thanks to the C preprocessor.\n"
2309 "Check the input code and/or modify the preprocessor options using environment variables PIPS_CPP.\n");
2310  }
2311  else
2312  csplit_parser_warning("Unrecognized character '%s'\n", yytext);
2313  }
2314  YY_BREAK
2315 case 72:
2317 #line 769 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
2318 ECHO;
2319  YY_BREAK
2320 #line 2321 "<stdout>"
2321 
2322  case YY_END_OF_BUFFER:
2323  {
2324  /* Amount of text matched not including the EOB char. */
2325  int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
2326 
2327  /* Undo the effects of YY_DO_BEFORE_ACTION. */
2328  *yy_cp = (yy_hold_char);
2330 
2331  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
2332  {
2333  /* We're scanning a new file or input source. It's
2334  * possible that this happened because the user
2335  * just pointed yyin at a new source and called
2336  * yylex(). If so, then we have to assure
2337  * consistency between YY_CURRENT_BUFFER and our
2338  * globals. Here is the right place to do so, because
2339  * this is the first action (other than possibly a
2340  * back-up) that will match for the new input source.
2341  */
2342  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2343  YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
2344  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
2345  }
2346 
2347  /* Note that here we test for yy_c_buf_p "<=" to the position
2348  * of the first EOB in the buffer, since yy_c_buf_p will
2349  * already have been incremented past the NUL character
2350  * (since all states make transitions on EOB to the
2351  * end-of-buffer state). Contrast this with the test
2352  * in input().
2353  */
2354  if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2355  { /* This was really a NUL. */
2356  yy_state_type yy_next_state;
2357 
2358  (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
2359 
2360  yy_current_state = yy_get_previous_state( );
2361 
2362  /* Okay, we're now positioned to make the NUL
2363  * transition. We couldn't have
2364  * yy_get_previous_state() go ahead and do it
2365  * for us because it doesn't know how to deal
2366  * with the possibility of jamming (and we don't
2367  * want to build jamming into it because then it
2368  * will run more slowly).
2369  */
2370 
2371  yy_next_state = yy_try_NUL_trans( yy_current_state );
2372 
2374 
2375  if ( yy_next_state )
2376  {
2377  /* Consume the NUL. */
2378  yy_cp = ++(yy_c_buf_p);
2379  yy_current_state = yy_next_state;
2380  goto yy_match;
2381  }
2382 
2383  else
2384  {
2385  yy_cp = (yy_c_buf_p);
2386  goto yy_find_action;
2387  }
2388  }
2389 
2390  else switch ( yy_get_next_buffer( ) )
2391  {
2392  case EOB_ACT_END_OF_FILE:
2393  {
2395 
2396  if ( yywrap( ) )
2397  {
2398  /* Note: because we've taken care in
2399  * yy_get_next_buffer() to have set up
2400  * yytext, we can now set up
2401  * yy_c_buf_p so that if some total
2402  * hoser (like flex itself) wants to
2403  * call the scanner after we return the
2404  * YY_NULL, it'll still work - another
2405  * YY_NULL will get returned.
2406  */
2408 
2410  goto do_action;
2411  }
2412 
2413  else
2414  {
2415  if ( ! (yy_did_buffer_switch_on_eof) )
2416  YY_NEW_FILE;
2417  }
2418  break;
2419  }
2420 
2421  case EOB_ACT_CONTINUE_SCAN:
2422  (yy_c_buf_p) =
2423  (yytext_ptr) + yy_amount_of_matched_text;
2424 
2425  yy_current_state = yy_get_previous_state( );
2426 
2427  yy_cp = (yy_c_buf_p);
2429  goto yy_match;
2430 
2431  case EOB_ACT_LAST_MATCH:
2432  (yy_c_buf_p) =
2433  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
2434 
2435  yy_current_state = yy_get_previous_state( );
2436 
2437  yy_cp = (yy_c_buf_p);
2439  goto yy_find_action;
2440  }
2441  break;
2442  }
2443 
2444  default:
2446  "fatal flex scanner internal error--no action found" );
2447  } /* end of action switch */
2448  } /* end of scanning one token */
2449  } /* end of user's declarations */
2450 } /* end of yylex */
2451 
2452 /* yy_get_next_buffer - try to read in a new buffer
2453  *
2454  * Returns a code representing an action:
2455  * EOB_ACT_LAST_MATCH -
2456  * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2457  * EOB_ACT_END_OF_FILE - end of file
2458  */
2459 static int yy_get_next_buffer (void)
2460 {
2461  char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
2462  char *source = (yytext_ptr);
2463  int number_to_move, i;
2464  int ret_val;
2465 
2466  if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
2468  "fatal flex scanner internal error--end of buffer missed" );
2469 
2470  if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
2471  { /* Don't try to fill the buffer, so this is an EOF. */
2472  if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
2473  {
2474  /* We matched a single character, the EOB, so
2475  * treat this as a final EOF.
2476  */
2477  return EOB_ACT_END_OF_FILE;
2478  }
2479 
2480  else
2481  {
2482  /* We matched some text prior to the EOB, first
2483  * process it.
2484  */
2485  return EOB_ACT_LAST_MATCH;
2486  }
2487  }
2488 
2489  /* Try to read more data. */
2490 
2491  /* First move last chars to start of buffer. */
2492  number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
2493 
2494  for ( i = 0; i < number_to_move; ++i )
2495  *(dest++) = *(source++);
2496 
2497  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2498  /* don't do the read, it's not guaranteed to return an EOF,
2499  * just force an EOF
2500  */
2501  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
2502 
2503  else
2504  {
2505  int num_to_read =
2506  YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
2507 
2508  while ( num_to_read <= 0 )
2509  { /* Not enough room in the buffer - grow it. */
2510 
2511  /* just a shorter name for the current buffer */
2513 
2514  int yy_c_buf_p_offset =
2515  (int) ((yy_c_buf_p) - b->yy_ch_buf);
2516 
2517  if ( b->yy_is_our_buffer )
2518  {
2519  int new_size = b->yy_buf_size * 2;
2520 
2521  if ( new_size <= 0 )
2522  b->yy_buf_size += b->yy_buf_size / 8;
2523  else
2524  b->yy_buf_size *= 2;
2525 
2526  b->yy_ch_buf = (char *)
2527  /* Include room in for 2 EOB chars. */
2528  yyrealloc( (void *) b->yy_ch_buf,
2529  (yy_size_t) (b->yy_buf_size + 2) );
2530  }
2531  else
2532  /* Can't grow it, we don't own it. */
2533  b->yy_ch_buf = NULL;
2534 
2535  if ( ! b->yy_ch_buf )
2537  "fatal error - scanner input buffer overflow" );
2538 
2539  (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
2540 
2541  num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
2542  number_to_move - 1;
2543 
2544  }
2545 
2546  if ( num_to_read > YY_READ_BUF_SIZE )
2547  num_to_read = YY_READ_BUF_SIZE;
2548 
2549  /* Read in more data. */
2550  YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2551  (yy_n_chars), num_to_read );
2552 
2553  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2554  }
2555 
2556  if ( (yy_n_chars) == 0 )
2557  {
2558  if ( number_to_move == YY_MORE_ADJ )
2559  {
2560  ret_val = EOB_ACT_END_OF_FILE;
2561  yyrestart( yyin );
2562  }
2563 
2564  else
2565  {
2566  ret_val = EOB_ACT_LAST_MATCH;
2567  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
2569  }
2570  }
2571 
2572  else
2573  ret_val = EOB_ACT_CONTINUE_SCAN;
2574 
2575  if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
2576  /* Extend the array by 50%, plus the number we really need. */
2577  int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
2578  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
2579  (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
2580  if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2581  YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
2582  /* "- 2" to take care of EOB's */
2583  YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
2584  }
2585 
2586  (yy_n_chars) += number_to_move;
2589 
2590  (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
2591 
2592  return ret_val;
2593 }
2594 
2595 /* yy_get_previous_state - get the state just before the EOB char was reached */
2596 
2597  static yy_state_type yy_get_previous_state (void)
2598 {
2599  yy_state_type yy_current_state;
2600  char *yy_cp;
2601 
2602  yy_current_state = (yy_start);
2603  yy_current_state += YY_AT_BOL();
2604 
2605  for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
2606  {
2607  YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2608  if ( yy_accept[yy_current_state] )
2609  {
2610  (yy_last_accepting_state) = yy_current_state;
2612  }
2613  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2614  {
2615  yy_current_state = (int) yy_def[yy_current_state];
2616  if ( yy_current_state >= 271 )
2617  yy_c = yy_meta[yy_c];
2618  }
2619  yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
2620  }
2621 
2622  return yy_current_state;
2623 }
2624 
2625 /* yy_try_NUL_trans - try to make a transition on the NUL character
2626  *
2627  * synopsis
2628  * next_state = yy_try_NUL_trans( current_state );
2629  */
2630  static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
2631 {
2632  int yy_is_jam;
2633  char *yy_cp = (yy_c_buf_p);
2634 
2635  YY_CHAR yy_c = 1;
2636  if ( yy_accept[yy_current_state] )
2637  {
2638  (yy_last_accepting_state) = yy_current_state;
2640  }
2641  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2642  {
2643  yy_current_state = (int) yy_def[yy_current_state];
2644  if ( yy_current_state >= 271 )
2645  yy_c = yy_meta[yy_c];
2646  }
2647  yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
2648  yy_is_jam = (yy_current_state == 270);
2649 
2650  return yy_is_jam ? 0 : yy_current_state;
2651 }
2652 
2653 #ifndef YY_NO_UNPUT
2654 
2655 #endif
2656 
2657 #ifndef YY_NO_INPUT
2658 #ifdef __cplusplus
2659  static int yyinput (void)
2660 #else
2661  static int input (void)
2662 #endif
2663 
2664 {
2665  int c;
2666 
2667  *(yy_c_buf_p) = (yy_hold_char);
2668 
2669  if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
2670  {
2671  /* yy_c_buf_p now points to the character we want to return.
2672  * If this occurs *before* the EOB characters, then it's a
2673  * valid NUL; if not, then we've hit the end of the buffer.
2674  */
2675  if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2676  /* This was really a NUL. */
2677  *(yy_c_buf_p) = '\0';
2678 
2679  else
2680  { /* need more input */
2681  int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
2682  ++(yy_c_buf_p);
2683 
2684  switch ( yy_get_next_buffer( ) )
2685  {
2686  case EOB_ACT_LAST_MATCH:
2687  /* This happens because yy_g_n_b()
2688  * sees that we've accumulated a
2689  * token and flags that we need to
2690  * try matching the token before
2691  * proceeding. But for input(),
2692  * there's no matching to consider.
2693  * So convert the EOB_ACT_LAST_MATCH
2694  * to EOB_ACT_END_OF_FILE.
2695  */
2696 
2697  /* Reset buffer status. */
2698  yyrestart( yyin );
2699 
2700  /*FALLTHROUGH*/
2701 
2702  case EOB_ACT_END_OF_FILE:
2703  {
2704  if ( yywrap( ) )
2705  return 0;
2706 
2707  if ( ! (yy_did_buffer_switch_on_eof) )
2708  YY_NEW_FILE;
2709 #ifdef __cplusplus
2710  return yyinput();
2711 #else
2712  return input();
2713 #endif
2714  }
2715 
2716  case EOB_ACT_CONTINUE_SCAN:
2717  (yy_c_buf_p) = (yytext_ptr) + offset;
2718  break;
2719  }
2720  }
2721  }
2722 
2723  c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
2724  *(yy_c_buf_p) = '\0'; /* preserve yytext */
2725  (yy_hold_char) = *++(yy_c_buf_p);
2726 
2727  YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
2728  if ( YY_CURRENT_BUFFER_LVALUE->yy_at_bol )
2729 
2730  yylineno++;
2731 ;
2732 
2733  return c;
2734 }
2735 #endif /* ifndef YY_NO_INPUT */
2736 
2737 /** Immediately switch to a different input stream.
2738  * @param input_file A readable stream.
2739  *
2740  * @note This function does not reset the start condition to @c INITIAL .
2741  */
2742  void yyrestart (FILE * input_file )
2743 {
2744 
2745  if ( ! YY_CURRENT_BUFFER ){
2749  }
2750 
2751  yy_init_buffer( YY_CURRENT_BUFFER, input_file );
2753 }
2754 
2755 /** Switch to a different input buffer.
2756  * @param new_buffer The new input buffer.
2757  *
2758  */
2759  void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
2760 {
2761 
2762  /* TODO. We should be able to replace this entire function body
2763  * with
2764  * yypop_buffer_state();
2765  * yypush_buffer_state(new_buffer);
2766  */
2768  if ( YY_CURRENT_BUFFER == new_buffer )
2769  return;
2770 
2771  if ( YY_CURRENT_BUFFER )
2772  {
2773  /* Flush out information for old buffer. */
2774  *(yy_c_buf_p) = (yy_hold_char);
2775  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2776  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2777  }
2778 
2779  YY_CURRENT_BUFFER_LVALUE = new_buffer;
2781 
2782  /* We don't actually know whether we did this switch during
2783  * EOF (yywrap()) processing, but the only time this flag
2784  * is looked at is after yywrap() is called, so it's safe
2785  * to go ahead and always set it.
2786  */
2788 }
2789 
2790 static void yy_load_buffer_state (void)
2791 {
2792  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2793  (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2794  yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2795  (yy_hold_char) = *(yy_c_buf_p);
2796 }
2797 
2798 /** Allocate and initialize an input buffer state.
2799  * @param file A readable stream.
2800  * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2801  *
2802  * @return the allocated buffer state.
2803  */
2804  YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
2805 {
2806  YY_BUFFER_STATE b;
2807 
2808  b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
2809  if ( ! b )
2810  YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2811 
2812  b->yy_buf_size = size;
2813 
2814  /* yy_ch_buf has to be 2 characters longer than the size given because
2815  * we need to put in 2 end-of-buffer characters.
2816  */
2817  b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
2818  if ( ! b->yy_ch_buf )
2819  YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2820 
2821  b->yy_is_our_buffer = 1;
2822 
2823  yy_init_buffer( b, file );
2824 
2825  return b;
2826 }
2827 
2828 /** Destroy the buffer.
2829  * @param b a buffer created with yy_create_buffer()
2830  *
2831  */
2833 {
2834 
2835  if ( ! b )
2836  return;
2837 
2838  if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2840 
2841  if ( b->yy_is_our_buffer )
2842  yyfree( (void *) b->yy_ch_buf );
2843 
2844  yyfree( (void *) b );
2845 }
2846 
2847 /* Initializes or reinitializes a buffer.
2848  * This function is sometimes called more than once on the same buffer,
2849  * such as during a yyrestart() or at EOF.
2850  */
2851  static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
2852 
2853 {
2854  int oerrno = errno;
2855 
2856  yy_flush_buffer( b );
2857 
2858  b->yy_input_file = file;
2859  b->yy_fill_buffer = 1;
2860 
2861  /* If b is the current buffer, then yy_init_buffer was _probably_
2862  * called from yyrestart() or through yy_get_next_buffer.
2863  * In that case, we don't want to reset the lineno or column.
2864  */
2865  if (b != YY_CURRENT_BUFFER){
2866  b->yy_bs_lineno = 1;
2867  b->yy_bs_column = 0;
2868  }
2869 
2870  b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2871 
2872  errno = oerrno;
2873 }
2874 
2875 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2876  * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2877  *
2878  */
2880 {
2881  if ( ! b )
2882  return;
2883 
2884  b->yy_n_chars = 0;
2885 
2886  /* We always need two end-of-buffer characters. The first causes
2887  * a transition to the end-of-buffer state. The second causes
2888  * a jam in that state.
2889  */
2892 
2893  b->yy_buf_pos = &b->yy_ch_buf[0];
2894 
2895  b->yy_at_bol = 1;
2897 
2898  if ( b == YY_CURRENT_BUFFER )
2900 }
2901 
2902 /** Pushes the new state onto the stack. The new state becomes
2903  * the current state. This function will allocate the stack
2904  * if necessary.
2905  * @param new_buffer The new state.
2906  *
2907  */
2908 void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
2909 {
2910  if (new_buffer == NULL)
2911  return;
2912 
2914 
2915  /* This block is copied from yy_switch_to_buffer. */
2916  if ( YY_CURRENT_BUFFER )
2917  {
2918  /* Flush out information for old buffer. */
2919  *(yy_c_buf_p) = (yy_hold_char);
2920  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2921  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2922  }
2923 
2924  /* Only push if top exists. Otherwise, replace top. */
2925  if (YY_CURRENT_BUFFER)
2926  (yy_buffer_stack_top)++;
2927  YY_CURRENT_BUFFER_LVALUE = new_buffer;
2928 
2929  /* copied from yy_switch_to_buffer. */
2932 }
2933 
2934 /** Removes and deletes the top of the stack, if present.
2935  * The next element becomes the new top.
2936  *
2937  */
2938 void yypop_buffer_state (void)
2939 {
2940  if (!YY_CURRENT_BUFFER)
2941  return;
2942 
2944  YY_CURRENT_BUFFER_LVALUE = NULL;
2945  if ((yy_buffer_stack_top) > 0)
2946  --(yy_buffer_stack_top);
2947 
2948  if (YY_CURRENT_BUFFER) {
2951  }
2952 }
2953 
2954 /* Allocates the stack if it does not exist.
2955  * Guarantees space for at least one push.
2956  */
2957 static void yyensure_buffer_stack (void)
2958 {
2959  yy_size_t num_to_alloc;
2960 
2961  if (!(yy_buffer_stack)) {
2962 
2963  /* First allocation is just for 2 elements, since we don't know if this
2964  * scanner will even need a stack. We use 2 instead of 1 to avoid an
2965  * immediate realloc on the next call.
2966  */
2967  num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
2969  (num_to_alloc * sizeof(struct yy_buffer_state*)
2970  );
2971  if ( ! (yy_buffer_stack) )
2972  YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2973 
2974  memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2975 
2976  (yy_buffer_stack_max) = num_to_alloc;
2977  (yy_buffer_stack_top) = 0;
2978  return;
2979  }
2980 
2981  if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
2982 
2983  /* Increase the buffer to prepare for a possible push. */
2984  yy_size_t grow_size = 8 /* arbitrary grow size */;
2985 
2986  num_to_alloc = (yy_buffer_stack_max) + grow_size;
2988  ((yy_buffer_stack),
2989  num_to_alloc * sizeof(struct yy_buffer_state*)
2990  );
2991  if ( ! (yy_buffer_stack) )
2992  YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2993 
2994  /* zero only the new slots.*/
2995  memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
2996  (yy_buffer_stack_max) = num_to_alloc;
2997  }
2998 }
2999 
3000 /** Setup the input buffer state to scan directly from a user-specified character buffer.
3001  * @param base the character buffer
3002  * @param size the size in bytes of the character buffer
3003  *
3004  * @return the newly allocated buffer state object.
3005  */
3007 {
3008  YY_BUFFER_STATE b;
3009 
3010  if ( size < 2 ||
3011  base[size-2] != YY_END_OF_BUFFER_CHAR ||
3012  base[size-1] != YY_END_OF_BUFFER_CHAR )
3013  /* They forgot to leave room for the EOB's. */
3014  return NULL;
3015 
3016  b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
3017  if ( ! b )
3018  YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
3019 
3020  b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
3021  b->yy_buf_pos = b->yy_ch_buf = base;
3022  b->yy_is_our_buffer = 0;
3023  b->yy_input_file = NULL;
3024  b->yy_n_chars = b->yy_buf_size;
3025  b->yy_is_interactive = 0;
3026  b->yy_at_bol = 1;
3027  b->yy_fill_buffer = 0;
3029 
3030  yy_switch_to_buffer( b );
3031 
3032  return b;
3033 }
3034 
3035 /** Setup the input buffer state to scan a string. The next call to yylex() will
3036  * scan from a @e copy of @a str.
3037  * @param yystr a NUL-terminated string to scan
3038  *
3039  * @return the newly allocated buffer state object.
3040  * @note If you want to scan bytes that may contain NUL values, then use
3041  * yy_scan_bytes() instead.
3042  */
3043 YY_BUFFER_STATE yy_scan_string (const char * yystr )
3044 {
3045 
3046  return yy_scan_bytes( yystr, (int) strlen(yystr) );
3047 }
3048 
3049 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
3050  * scan from a @e copy of @a bytes.
3051  * @param yybytes the byte buffer to scan
3052  * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
3053  *
3054  * @return the newly allocated buffer state object.
3055  */
3056 YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
3057 {
3058  YY_BUFFER_STATE b;
3059  char *buf;
3060  yy_size_t n;
3061  int i;
3062 
3063  /* Get memory for full buffer, including space for trailing EOB's. */
3064  n = (yy_size_t) (_yybytes_len + 2);
3065  buf = (char *) yyalloc( n );
3066  if ( ! buf )
3067  YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
3068 
3069  for ( i = 0; i < _yybytes_len; ++i )
3070  buf[i] = yybytes[i];
3071 
3072  buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
3073 
3074  b = yy_scan_buffer( buf, n );
3075  if ( ! b )
3076  YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
3077 
3078  /* It's okay to grow etc. this buffer, and we should throw it
3079  * away when we're done.
3080  */
3081  b->yy_is_our_buffer = 1;
3082 
3083  return b;
3084 }
3085 
3086 #ifndef YY_EXIT_FAILURE
3087 #define YY_EXIT_FAILURE 2
3088 #endif
3089 
3090 static void yynoreturn yy_fatal_error (const char* msg )
3091 {
3092  fprintf( stderr, "%s\n", msg );
3093  exit( YY_EXIT_FAILURE );
3094 }
3095 
3096 /* Redefine yyless() so it works in section 3 code. */
3097 
3098 #undef yyless
3099 #define yyless(n) \
3100  do \
3101  { \
3102  /* Undo effects of setting up yytext. */ \
3103  int yyless_macro_arg = (n); \
3104  YY_LESS_LINENO(yyless_macro_arg);\
3105  yytext[yyleng] = (yy_hold_char); \
3106  (yy_c_buf_p) = yytext + yyless_macro_arg; \
3107  (yy_hold_char) = *(yy_c_buf_p); \
3108  *(yy_c_buf_p) = '\0'; \
3109  yyleng = yyless_macro_arg; \
3110  } \
3111  while ( 0 )
3112 
3113 /* Accessor methods (get/set functions) to struct members. */
3114 
3115 /** Get the current line number.
3116  *
3117  */
3118 int yyget_lineno (void)
3119 {
3120 
3121  return yylineno;
3122 }
3123 
3124 /** Get the input stream.
3125  *
3126  */
3127 FILE *yyget_in (void)
3128 {
3129  return yyin;
3130 }
3131 
3132 /** Get the output stream.
3133  *
3134  */
3135 FILE *yyget_out (void)
3136 {
3137  return yyout;
3138 }
3139 
3140 /** Get the length of the current token.
3141  *
3142  */
3143 int yyget_leng (void)
3144 {
3145  return yyleng;
3146 }
3147 
3148 /** Get the current token.
3149  *
3150  */
3151 
3152 char *yyget_text (void)
3153 {
3154  return yytext;
3155 }
3156 
3157 /** Set the current line number.
3158  * @param _line_number line number
3159  *
3160  */
3161 void yyset_lineno (int _line_number )
3162 {
3163 
3164  yylineno = _line_number;
3165 }
3166 
3167 /** Set the input stream. This does not discard the current
3168  * input buffer.
3169  * @param _in_str A readable stream.
3170  *
3171  * @see yy_switch_to_buffer
3172  */
3173 void yyset_in (FILE * _in_str )
3174 {
3175  yyin = _in_str ;
3176 }
3177 
3178 void yyset_out (FILE * _out_str )
3179 {
3180  yyout = _out_str ;
3181 }
3182 
3183 int yyget_debug (void)
3184 {
3185  return yy_flex_debug;
3186 }
3187 
3188 void yyset_debug (int _bdebug )
3189 {
3190  yy_flex_debug = _bdebug ;
3191 }
3192 
3193 static int yy_init_globals (void)
3194 {
3195  /* Initialization is the same as for the non-reentrant scanner.
3196  * This function is called from yylex_destroy(), so don't allocate here.
3197  */
3198 
3199  /* We do not touch yylineno unless the option is enabled. */
3200  yylineno = 1;
3201 
3202  (yy_buffer_stack) = NULL;
3203  (yy_buffer_stack_top) = 0;
3204  (yy_buffer_stack_max) = 0;
3205  (yy_c_buf_p) = NULL;
3206  (yy_init) = 0;
3207  (yy_start) = 0;
3208 
3209 /* Defined in main.c */
3210 #ifdef YY_STDINIT
3211  yyin = stdin;
3212  yyout = stdout;
3213 #else
3214  yyin = NULL;
3215  yyout = NULL;
3216 #endif
3217 
3218  /* For future reference: Set errno on error, since we are called by
3219  * yylex_init()
3220  */
3221  return 0;
3222 }
3223 
3224 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
3225 int yylex_destroy (void)
3226 {
3227 
3228  /* Pop the buffer stack, destroying each element. */
3229  while(YY_CURRENT_BUFFER){
3231  YY_CURRENT_BUFFER_LVALUE = NULL;
3233  }
3234 
3235  /* Destroy the stack itself. */
3236  yyfree((yy_buffer_stack) );
3237  (yy_buffer_stack) = NULL;
3238 
3239  /* Reset the globals. This is important in a non-reentrant scanner so the next time
3240  * yylex() is called, initialization will occur. */
3241  yy_init_globals( );
3242 
3243  return 0;
3244 }
3245 
3246 /*
3247  * Internal utility routines.
3248  */
3249 
3250 #ifndef yytext_ptr
3251 static void yy_flex_strncpy (char* s1, const char * s2, int n )
3252 {
3253 
3254  int i;
3255  for ( i = 0; i < n; ++i )
3256  s1[i] = s2[i];
3257 }
3258 #endif
3259 
3260 #ifdef YY_NEED_STRLEN
3261 static int yy_flex_strlen (const char * s )
3262 {
3263  int n;
3264  for ( n = 0; s[n]; ++n )
3265  ;
3266 
3267  return n;
3268 }
3269 #endif
3270 
3271 void *yyalloc (yy_size_t size )
3272 {
3273  return malloc(size);
3274 }
3275 
3276 void *yyrealloc (void * ptr, yy_size_t size )
3277 {
3278 
3279  /* The cast to (char *) in the following accommodates both
3280  * implementations that use char* generic pointers, and those
3281  * that use void* generic pointers. It works with the latter
3282  * because both ANSI C and C++ allow castless assignment from
3283  * any pointer type to void*, and deal with argument conversions
3284  * as though doing an assignment.
3285  */
3286  return realloc(ptr, size);
3287 }
3288 
3289 void yyfree (void * ptr )
3290 {
3291  free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
3292 }
3293 
3294 #define YYTABLES_NAME "yytables"
3295 
3296 #line 769 "/home/fabien/NIGHT/prod/pips/src/Libs/preprocessor/lexer.l"
3297 
3298 
3299 /* This function is renamed splitc_error(). It should probably reset more variables */
3300 void splitc_error(const char * msg)
3301 {
3302  /* I should call csplit_parser_error() or the equivalent module */
3303  string ifn = get_splitc_input_file_name();
3305  /* pips_user_warning(
3306  "C %s near \"%s\" at preprocessed line %d (user line %d):\n%s\n\n",
3307  msg, yytext, csplit_line_number, user_line_number,
3308  current_line); */
3310  "C %s near \"%s\" at line %d in file \"%s\":\n%s\n\n",
3311  msg, yytext, user_line_number,
3313  current_line);
3314  free(current_line);
3315  pips_user_error("Syntax error detected by PIPS C preprocessor.\n"
3316  "Suggestions:\n"
3317  " 1. check the legality of the source code with a production C compiler\n"
3318  " 2. see if the issue is linked to a non-standard C feature\n"
3319  " 3. see if the issue is a C feature unsupported by PIPS C parser\n"
3320  " 4. see if the source code can be rewritten differently.\n");
3321 }
3322 
3323 int yywrap() { return 1;}
3324 
static int count
Definition: SDG.c:519
void const char const char const int
bdt base
Current expression.
Definition: bdt_read_paf.c:100
char * current_file_path
Definition: csplit_file.c:52
string get_splitc_input_file_name(void)
Definition: csplit_file.c:84
char * current_include_file_path
used to keep track of include level
Definition: csplit_file.c:51
static Value offset
Definition: translation.c:283
string safe_read_nth_line(string fn, int n)
Assumes "fn" is the name of a text file, opens it, and returns its nth line (starting with 1) in a ne...
Definition: file.c:523
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 *)
static int current_line
Poor attempt at associating physical line numbers to statement.
Definition: statement.c:2405
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 exit(code)
Definition: misc-local.h:54
#define pips_user_error
Definition: misc-local.h:147
string concatenate(const char *,...)
Return the concatenation of the given strings.
Definition: string.c:183
#define string_undefined
Definition: newgen_types.h:40
#define string_undefined_p(s)
Definition: newgen_types.h:41
unsigned char flex_uint8_t
Definition: lexer.c:312
short int flex_int16_t
Definition: lexer.c:310
unsigned int flex_uint32_t
Definition: lexer.c:314
int yy_act
Definition: lexer.c:977
struct yy_buffer_state * YY_BUFFER_STATE
Definition: lexer.c:408
char * yy_cp
Definition: lexer.c:976
signed char flex_int8_t
C99 systems have <inttypes.h>.
Definition: lexer.c:309
int flex_int32_t
Definition: lexer.c:311
int yy_state_type
Definition: lexer.c:588
char * yy_bp
Definition: lexer.c:976
unsigned short int flex_uint16_t
Definition: lexer.c:313
flex_uint8_t YY_CHAR
Begin user sect3.
Definition: lexer.c:584
size_t yy_size_t
Definition: lexer.c:413
void splitc_error(const char *)
#define csplit_parser_warning(...)
static void gdb_marker()
Definition: lexer.c:1116
#define yy_load_buffer_state
Definition: lexer.c:15
#define YY_NEW_FILE
Special action meaning "start processing a new file".
Definition: lexer.c:386
#define yyset_extra
Definition: lexer.c:164
size_t csplit_file_offset_beginning
Definition: lexer.c:1093
#define yytext
Definition: lexer.c:27
#define yyset_lineno
Definition: lexer.c:212
static const flex_int16_t yy_accept[271]
Definition: lexer.c:641
static char yy_hold_char
yy_hold_char holds the character lost when yytext is formed.
Definition: lexer.c:546
size_t get_csplit_file_offset_beginning()
Get the file position in the file to split where the current function begins:
Definition: lexer.c:1205
static yy_state_type yy_last_accepting_state
Definition: lexer.c:999
#define yyrestart
Definition: lexer.c:26
#define yyset_debug
Definition: lexer.c:152
static void yynoreturn yy_fatal_error(const char *msg)
void update_csplit_file_offset_information()
Function called each time a token is read to trac file position information:
Definition: lexer.c:1218
static const YY_CHAR yy_meta[65]
Definition: lexer.c:706
#define YY_EXTRA_TYPE
Special case for "unistd.h", since it is non-ANSI.
Definition: lexer.c:1320
static int yy_start
whether we need to initialize
Definition: lexer.c:553
#define yy_flex_debug
Definition: lexer.c:20
static const flex_int16_t yy_def[316]
Definition: lexer.c:756
#define yyget_out
Definition: lexer.c:182
static YY_BUFFER_STATE * yy_buffer_stack
Stack as an array.
Definition: lexer.c:529
static int lf_count(string s)
Definition: lexer.c:1223
int get_user_current_beginning()
Get the current line number in the file to split from the user point of view (before preprocessor exp...
Definition: lexer.c:1198
static int yy_get_next_buffer(void)
#define yy_scan_bytes
Definition: lexer.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: lexer.c:1244
#define YY_BREAK
!YY_DECL
Definition: lexer.c:1481
static const flex_int16_t yy_chk[860]
Definition: lexer.c:893
static size_t yy_buffer_stack_max
capacity of stack.
Definition: lexer.c:528
#define yynoreturn
Definition: lexer.c:361
static yy_state_type yy_try_NUL_trans(yy_state_type current_state)
#define yyget_debug
Definition: lexer.c:146
#define yypush_buffer_state
Definition: lexer.c:17
static int bracket_depth
To track nesting in brackets.
Definition: lexer.c:1096
static int previous_keyword_token
Definition: lexer.c:1240
#define yyfree
Definition: lexer.c:31
#define yyout
Definition: lexer.c:25
#define YY_BUFFER_NEW
Definition: lexer.c:509
#define yyget_lineno
Definition: lexer.c:206
#define yylex
Definition: lexer.c:23
#define YY_RESTORE_YY_MORE_OFFSET
Definition: lexer.c:1011
static int yy_did_buffer_switch_on_eof
start state number
Definition: lexer.c:558
static int yy_init_globals(void)
#define yyget_text
Definition: lexer.c:200
#define YY_BUFFER_NORMAL
Definition: lexer.c:510
#define yyensure_buffer_stack
Definition: lexer.c:19
#define yy_scan_buffer
Definition: lexer.c:10
#define YY_MORE_ADJ
Definition: lexer.c:1010
#define YY_RULE_SETUP
Definition: lexer.c:1484
#define yy_scan_string
Definition: lexer.c:11
static int user_current_beginning
Definition: lexer.c:1135
#define YY_AT_BOL()
Definition: lexer.c:600
int get_csplit_current_beginning()
Definition: lexer.c:1190
#define yytext_ptr
Definition: lexer.c:616
#define yyget_leng
Definition: lexer.c:194
#define EOB_ACT_END_OF_FILE
Definition: lexer.c:421
#define yyalloc
Definition: lexer.c:29
#define yypop_buffer_state
Definition: lexer.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: lexer.c:543
#define YY_START
Translate the current start state into a value that can be later handed to BEGIN to return to the sta...
Definition: lexer.c:381
static const flex_int16_t yy_nxt[860]
Definition: lexer.c:795
#define yy_switch_to_buffer
Definition: lexer.c:16
size_t current_csplit_file_offset
Definition: lexer.c:1092
#define TK_TYPE_P(tk)
static const flex_int32_t yy_rule_can_match_eol[73]
Table of booleans, true if rule could match eol.
Definition: lexer.c:992
#define YY_CURRENT_BUFFER
We provide macros for accessing buffer states in case in the future we want to put the buffer states ...
Definition: lexer.c:537
#define yy_init_buffer
Definition: lexer.c:13
#define INITIAL
To track file line number automatically:
Definition: lexer.c:1309
#define yyget_extra
Definition: lexer.c:158
#define yyin
Definition: lexer.c:21
static int yy_n_chars
Definition: lexer.c:547
#define YY_READ_BUF_SIZE
Amount of stuff to slurp up with each read.
Definition: lexer.c:1393
int csplit_line_number
To be exported to the parser for splitting the preprocessed file.
Definition: lexer.c:1085
#define YY_INPUT(buf, result, max_size)
Gets input and stuffs it into "buf".
Definition: lexer.c:1409
#define ECHO
ia64
Definition: lexer.c:1402
static int is_c_preprocessor_keyword_typedef(char *id)
See if id is a keyword, a typedef or an identifier.
Definition: lexer.c:1250
#define yy_flush_buffer
Definition: lexer.c:14
#define yyrealloc
Definition: lexer.c:30
#define YY_END_OF_BUFFER
Definition: lexer.c:633
#define YY_STATE_EOF(state)
Action number for EOF rule of a given start state.
Definition: lexer.c:384
#define YY_END_OF_BUFFER_CHAR
Definition: lexer.c:387
void reset_csplit_current_beginning()
This function is called at the end of any top-level C construct:
Definition: lexer.c:1152
#define YY_FATAL_ERROR(msg)
Report a fatal error.
Definition: lexer.c:1456
#define yyterminate()
No semi-colon after return; correct usage is to write "yyterminate();" - we don't want an extra ';' a...
Definition: lexer.c:1446
static void update_csplit_current_beginning()
If we encounter a possible function begin, just snapshot the position of the function beginning:
Definition: lexer.c:1140
#define yywrap
Macros after this point can all be overridden by user definitions in section 1.
Definition: lexer.c:28
#define yy_create_buffer
A lexical scanner generated by flex.
Definition: lexer.c:8
#define YY_DO_BEFORE_ACTION
Done after the current pattern has been matched and before the corresponding action - sets up yytext.
Definition: lexer.c:626
int user_line_number
To be exported to the parser for error messages related to the user file.
Definition: lexer.c:1087
#define yy_delete_buffer
Definition: lexer.c:9
#define EOB_ACT_LAST_MATCH
Definition: lexer.c:422
size_t get_current_csplit_file_offset()
Get the current file position in the file to split:
Definition: lexer.c:1211
#define yyget_in
Definition: lexer.c:170
#define TOKEN_UNDEFINED
The lexer cannot handle the ambiguity between named types and variables without extra-help.
Definition: lexer.c:1239
#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: lexer.c:521
#define yylineno
Definition: lexer.c:24
static yy_state_type yy_get_previous_state(void)
static const YY_CHAR yy_ec[256]
Definition: lexer.c:674
#define yylex_destroy
Accessor methods to globals.
Definition: lexer.c:140
#define yyset_out
Definition: lexer.c:188
static char * yy_c_buf_p
Points to current character in buffer.
Definition: lexer.c:551
#define EOB_ACT_CONTINUE_SCAN
Definition: lexer.c:420
static const flex_int16_t yy_base[316]
Definition: lexer.c:717
static size_t yy_buffer_stack_top
!YY_STRUCT_YY_BUFFER_STATE
Definition: lexer.c:527
#define YY_DECL
Definition: lexer.c:1469
#define YY_BUF_SIZE
Size of default input buffer.
Definition: lexer.c:398
enum gather_comment_state_t gather_comment_state_machine
Indeed it does not work since csplit_copy() is called from splitc.y when a function definition is fou...
Definition: lexer.c:1113
#define YY_EXIT_FAILURE
static int yy_init
Definition: lexer.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: lexer.c:370
static int csplit_current_beginning
Definition: lexer.c:1134
#define yyleng
Definition: lexer.c:22
static char * yy_last_accepting_cpos
Definition: lexer.c:1000
#define yyset_in
Definition: lexer.c:176
gather_comment_state_t
A state-machine to gather the trailing comments of a statement with an heuristic to decide if some co...
Definition: lexer.c:1101
@ GATHER_COMMENT
We gather comments in the previous top-level construct.
Definition: lexer.c:1107
@ GATHER_SPACES
We gather only spaces in the previous top-level construct.
Definition: lexer.c:1105
@ PUT_IN_NEXT_TOP_LEVEL_CONSTRUCT
Normal mode: comments and spaces are associated to the top-level construct to encounter:
Definition: lexer.c:1102
void reset_csplit_line_number()
Reinitialise global position numbers for a new file.
Definition: lexer.c:1124
string get_preprocessor_nth_scope(int)
Definition: splitc.c:339
string csplit_current_function_name
to know if this is the declaration of a function or not, to distinguish between a static variable and...
Definition: splitc.c:123
int preprocessor_scope_number(void)
Definition: splitc.c:345
bool csplit_is_static_p
static int enum_counter = 0;
Definition: splitc.c:143
int csplit_is_function
to know if the variable is declared inside or outside a function
Definition: splitc.c:120
int csplit_is_external
splitc.c
Definition: splitc.c:119
string csplit_definite_function_signature
Definition: splitc.c:126
string preprocessor_current_initial_file_name
The digestion of a user file by PIPS begins here.
Definition: source_file.c:1088
string get_preprocessor_current_scope(void)
Definition: splitc.c:327
string csplit_definite_function_name
Definition: splitc.c:125
int check_signature_balance(void)
Definition: splitc.c:524
string csplit_current_function_name2
Definition: splitc.c:124
_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
YYSTYPE splitc_lval
#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_ATTRIBUTE
Definition: splitc.c:849
#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_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
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