PIPS
comment2pragma.c
Go to the documentation of this file.
1 
2 #line 3 "<stdout>"
3 
4 #define YY_NO_INPUT 1
5 #define IN_PIPS 1
6 #define YY_INT_ALIGNED short int
7 
8 /* A lexical scanner generated by flex */
9 
10 #define yy_create_buffer comment2pragma_create_buffer
11 #define yy_delete_buffer comment2pragma_delete_buffer
12 #define yy_scan_buffer comment2pragma_scan_buffer
13 #define yy_scan_string comment2pragma_scan_string
14 #define yy_scan_bytes comment2pragma_scan_bytes
15 #define yy_init_buffer comment2pragma_init_buffer
16 #define yy_flush_buffer comment2pragma_flush_buffer
17 #define yy_load_buffer_state comment2pragma_load_buffer_state
18 #define yy_switch_to_buffer comment2pragma_switch_to_buffer
19 #define yypush_buffer_state comment2pragmapush_buffer_state
20 #define yypop_buffer_state comment2pragmapop_buffer_state
21 #define yyensure_buffer_stack comment2pragmaensure_buffer_stack
22 #define yy_flex_debug comment2pragma_flex_debug
23 #define yyin comment2pragmain
24 #define yyleng comment2pragmaleng
25 #define yylex comment2pragmalex
26 #define yylineno comment2pragmalineno
27 #define yyout comment2pragmaout
28 #define yyrestart comment2pragmarestart
29 #define yytext comment2pragmatext
30 #define yywrap comment2pragmawrap
31 #define yyalloc comment2pragmaalloc
32 #define yyrealloc comment2pragmarealloc
33 #define yyfree comment2pragmafree
34 
35 #define FLEX_SCANNER
36 #define YY_FLEX_MAJOR_VERSION 2
37 #define YY_FLEX_MINOR_VERSION 6
38 #define YY_FLEX_SUBMINOR_VERSION 4
39 #if YY_FLEX_SUBMINOR_VERSION > 0
40 #define FLEX_BETA
41 #endif
42 
43 #ifdef yy_create_buffer
44 #define comment2pragma_create_buffer_ALREADY_DEFINED
45 #else
46 #define yy_create_buffer comment2pragma_create_buffer
47 #endif
48 
49 #ifdef yy_delete_buffer
50 #define comment2pragma_delete_buffer_ALREADY_DEFINED
51 #else
52 #define yy_delete_buffer comment2pragma_delete_buffer
53 #endif
54 
55 #ifdef yy_scan_buffer
56 #define comment2pragma_scan_buffer_ALREADY_DEFINED
57 #else
58 #define yy_scan_buffer comment2pragma_scan_buffer
59 #endif
60 
61 #ifdef yy_scan_string
62 #define comment2pragma_scan_string_ALREADY_DEFINED
63 #else
64 #define yy_scan_string comment2pragma_scan_string
65 #endif
66 
67 #ifdef yy_scan_bytes
68 #define comment2pragma_scan_bytes_ALREADY_DEFINED
69 #else
70 #define yy_scan_bytes comment2pragma_scan_bytes
71 #endif
72 
73 #ifdef yy_init_buffer
74 #define comment2pragma_init_buffer_ALREADY_DEFINED
75 #else
76 #define yy_init_buffer comment2pragma_init_buffer
77 #endif
78 
79 #ifdef yy_flush_buffer
80 #define comment2pragma_flush_buffer_ALREADY_DEFINED
81 #else
82 #define yy_flush_buffer comment2pragma_flush_buffer
83 #endif
84 
85 #ifdef yy_load_buffer_state
86 #define comment2pragma_load_buffer_state_ALREADY_DEFINED
87 #else
88 #define yy_load_buffer_state comment2pragma_load_buffer_state
89 #endif
90 
91 #ifdef yy_switch_to_buffer
92 #define comment2pragma_switch_to_buffer_ALREADY_DEFINED
93 #else
94 #define yy_switch_to_buffer comment2pragma_switch_to_buffer
95 #endif
96 
97 #ifdef yypush_buffer_state
98 #define comment2pragmapush_buffer_state_ALREADY_DEFINED
99 #else
100 #define yypush_buffer_state comment2pragmapush_buffer_state
101 #endif
102 
103 #ifdef yypop_buffer_state
104 #define comment2pragmapop_buffer_state_ALREADY_DEFINED
105 #else
106 #define yypop_buffer_state comment2pragmapop_buffer_state
107 #endif
108 
109 #ifdef yyensure_buffer_stack
110 #define comment2pragmaensure_buffer_stack_ALREADY_DEFINED
111 #else
112 #define yyensure_buffer_stack comment2pragmaensure_buffer_stack
113 #endif
114 
115 #ifdef yylex
116 #define comment2pragmalex_ALREADY_DEFINED
117 #else
118 #define yylex comment2pragmalex
119 #endif
120 
121 #ifdef yyrestart
122 #define comment2pragmarestart_ALREADY_DEFINED
123 #else
124 #define yyrestart comment2pragmarestart
125 #endif
126 
127 #ifdef yylex_init
128 #define comment2pragmalex_init_ALREADY_DEFINED
129 #else
130 #define yylex_init comment2pragmalex_init
131 #endif
132 
133 #ifdef yylex_init_extra
134 #define comment2pragmalex_init_extra_ALREADY_DEFINED
135 #else
136 #define yylex_init_extra comment2pragmalex_init_extra
137 #endif
138 
139 #ifdef yylex_destroy
140 #define comment2pragmalex_destroy_ALREADY_DEFINED
141 #else
142 #define yylex_destroy comment2pragmalex_destroy
143 #endif
144 
145 #ifdef yyget_debug
146 #define comment2pragmaget_debug_ALREADY_DEFINED
147 #else
148 #define yyget_debug comment2pragmaget_debug
149 #endif
150 
151 #ifdef yyset_debug
152 #define comment2pragmaset_debug_ALREADY_DEFINED
153 #else
154 #define yyset_debug comment2pragmaset_debug
155 #endif
156 
157 #ifdef yyget_extra
158 #define comment2pragmaget_extra_ALREADY_DEFINED
159 #else
160 #define yyget_extra comment2pragmaget_extra
161 #endif
162 
163 #ifdef yyset_extra
164 #define comment2pragmaset_extra_ALREADY_DEFINED
165 #else
166 #define yyset_extra comment2pragmaset_extra
167 #endif
168 
169 #ifdef yyget_in
170 #define comment2pragmaget_in_ALREADY_DEFINED
171 #else
172 #define yyget_in comment2pragmaget_in
173 #endif
174 
175 #ifdef yyset_in
176 #define comment2pragmaset_in_ALREADY_DEFINED
177 #else
178 #define yyset_in comment2pragmaset_in
179 #endif
180 
181 #ifdef yyget_out
182 #define comment2pragmaget_out_ALREADY_DEFINED
183 #else
184 #define yyget_out comment2pragmaget_out
185 #endif
186 
187 #ifdef yyset_out
188 #define comment2pragmaset_out_ALREADY_DEFINED
189 #else
190 #define yyset_out comment2pragmaset_out
191 #endif
192 
193 #ifdef yyget_leng
194 #define comment2pragmaget_leng_ALREADY_DEFINED
195 #else
196 #define yyget_leng comment2pragmaget_leng
197 #endif
198 
199 #ifdef yyget_text
200 #define comment2pragmaget_text_ALREADY_DEFINED
201 #else
202 #define yyget_text comment2pragmaget_text
203 #endif
204 
205 #ifdef yyget_lineno
206 #define comment2pragmaget_lineno_ALREADY_DEFINED
207 #else
208 #define yyget_lineno comment2pragmaget_lineno
209 #endif
210 
211 #ifdef yyset_lineno
212 #define comment2pragmaset_lineno_ALREADY_DEFINED
213 #else
214 #define yyset_lineno comment2pragmaset_lineno
215 #endif
216 
217 #ifdef yywrap
218 #define comment2pragmawrap_ALREADY_DEFINED
219 #else
220 #define yywrap comment2pragmawrap
221 #endif
222 
223 #ifdef yyalloc
224 #define comment2pragmaalloc_ALREADY_DEFINED
225 #else
226 #define yyalloc comment2pragmaalloc
227 #endif
228 
229 #ifdef yyrealloc
230 #define comment2pragmarealloc_ALREADY_DEFINED
231 #else
232 #define yyrealloc comment2pragmarealloc
233 #endif
234 
235 #ifdef yyfree
236 #define comment2pragmafree_ALREADY_DEFINED
237 #else
238 #define yyfree comment2pragmafree
239 #endif
240 
241 #ifdef yytext
242 #define comment2pragmatext_ALREADY_DEFINED
243 #else
244 #define yytext comment2pragmatext
245 #endif
246 
247 #ifdef yyleng
248 #define comment2pragmaleng_ALREADY_DEFINED
249 #else
250 #define yyleng comment2pragmaleng
251 #endif
252 
253 #ifdef yyin
254 #define comment2pragmain_ALREADY_DEFINED
255 #else
256 #define yyin comment2pragmain
257 #endif
258 
259 #ifdef yyout
260 #define comment2pragmaout_ALREADY_DEFINED
261 #else
262 #define yyout comment2pragmaout
263 #endif
264 
265 #ifdef yy_flex_debug
266 #define comment2pragma_flex_debug_ALREADY_DEFINED
267 #else
268 #define yy_flex_debug comment2pragma_flex_debug
269 #endif
270 
271 #ifdef yylineno
272 #define comment2pragmalineno_ALREADY_DEFINED
273 #else
274 #define yylineno comment2pragmalineno
275 #endif
276 
277 /* First, we deal with platform-specific or compiler-specific issues. */
278 
279 /* begin standard C headers. */
280 #include <stdio.h>
281 #include <string.h>
282 #include <errno.h>
283 #include <stdlib.h>
284 
285 /* end standard C headers. */
286 
287 /* flex integer type definitions */
288 
289 #ifndef FLEXINT_H
290 #define FLEXINT_H
291 
292 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
293 
294 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
295 
296 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
297  * if you want the limit (max/min) macros for int types.
298  */
299 #ifndef __STDC_LIMIT_MACROS
300 #define __STDC_LIMIT_MACROS 1
301 #endif
302 
303 #include <inttypes.h>
304 typedef int8_t flex_int8_t;
305 typedef uint8_t flex_uint8_t;
306 typedef int16_t flex_int16_t;
307 typedef uint16_t flex_uint16_t;
308 typedef int32_t flex_int32_t;
309 typedef uint32_t flex_uint32_t;
310 #else
311 typedef signed char flex_int8_t;
312 typedef short int flex_int16_t;
313 typedef int flex_int32_t;
314 typedef unsigned char flex_uint8_t;
315 typedef unsigned short int flex_uint16_t;
316 typedef unsigned int flex_uint32_t;
317 
318 /* Limits of integral types. */
319 #ifndef INT8_MIN
320 #define INT8_MIN (-128)
321 #endif
322 #ifndef INT16_MIN
323 #define INT16_MIN (-32767-1)
324 #endif
325 #ifndef INT32_MIN
326 #define INT32_MIN (-2147483647-1)
327 #endif
328 #ifndef INT8_MAX
329 #define INT8_MAX (127)
330 #endif
331 #ifndef INT16_MAX
332 #define INT16_MAX (32767)
333 #endif
334 #ifndef INT32_MAX
335 #define INT32_MAX (2147483647)
336 #endif
337 #ifndef UINT8_MAX
338 #define UINT8_MAX (255U)
339 #endif
340 #ifndef UINT16_MAX
341 #define UINT16_MAX (65535U)
342 #endif
343 #ifndef UINT32_MAX
344 #define UINT32_MAX (4294967295U)
345 #endif
346 
347 #ifndef SIZE_MAX
348 #define SIZE_MAX (~(size_t)0)
349 #endif
350 
351 #endif /* ! C99 */
352 
353 #endif /* ! FLEXINT_H */
354 
355 /* begin standard C++ headers. */
356 
357 /* TODO: this is always defined, so inline it */
358 #define yyconst const
359 
360 #if defined(__GNUC__) && __GNUC__ >= 3
361 #define yynoreturn __attribute__((__noreturn__))
362 #else
363 #define yynoreturn
364 #endif
365 
366 /* Returned upon end-of-file. */
367 #define YY_NULL 0
368 
369 /* Promotes a possibly negative, possibly signed char to an
370  * integer in range [0..255] for use as an array index.
371  */
372 #define YY_SC_TO_UI(c) ((YY_CHAR) (c))
373 
374 /* Enter a start condition. This macro really ought to take a parameter,
375  * but we do it the disgusting crufty way forced on us by the ()-less
376  * definition of BEGIN.
377  */
378 #define BEGIN (yy_start) = 1 + 2 *
379 /* Translate the current start state into a value that can be later handed
380  * to BEGIN to return to the state. The YYSTATE alias is for lex
381  * compatibility.
382  */
383 #define YY_START (((yy_start) - 1) / 2)
384 #define YYSTATE YY_START
385 /* Action number for EOF rule of a given start state. */
386 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
387 /* Special action meaning "start processing a new file". */
388 #define YY_NEW_FILE yyrestart( yyin )
389 #define YY_END_OF_BUFFER_CHAR 0
390 
391 /* Size of default input buffer. */
392 #ifndef YY_BUF_SIZE
393 #ifdef __ia64__
394 /* On IA-64, the buffer size is 16k, not 8k.
395  * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
396  * Ditto for the __ia64__ case accordingly.
397  */
398 #define YY_BUF_SIZE 32768
399 #else
400 #define YY_BUF_SIZE 16384
401 #endif /* __ia64__ */
402 #endif
403 
404 /* The state buf must be large enough to hold one state per character in the main buffer.
405  */
406 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
407 
408 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
409 #define YY_TYPEDEF_YY_BUFFER_STATE
411 #endif
412 
413 #ifndef YY_TYPEDEF_YY_SIZE_T
414 #define YY_TYPEDEF_YY_SIZE_T
415 typedef size_t yy_size_t;
416 #endif
417 
418 extern int yyleng;
419 
420 extern FILE *yyin, *yyout;
421 
422 #define EOB_ACT_CONTINUE_SCAN 0
423 #define EOB_ACT_END_OF_FILE 1
424 #define EOB_ACT_LAST_MATCH 2
425 
426  #define YY_LESS_LINENO(n)
427  #define YY_LINENO_REWIND_TO(ptr)
428 
429 /* Return all but the first "n" matched characters back to the input stream. */
430 #define yyless(n) \
431  do \
432  { \
433  /* Undo effects of setting up yytext. */ \
434  int yyless_macro_arg = (n); \
435  YY_LESS_LINENO(yyless_macro_arg);\
436  *yy_cp = (yy_hold_char); \
437  YY_RESTORE_YY_MORE_OFFSET \
438  (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
439  YY_DO_BEFORE_ACTION; /* set up yytext again */ \
440  } \
441  while ( 0 )
442 #define unput(c) yyunput( c, (yytext_ptr) )
443 
444 #ifndef YY_STRUCT_YY_BUFFER_STATE
445 #define YY_STRUCT_YY_BUFFER_STATE
446 struct yy_buffer_state
447  {
448  FILE *yy_input_file;
449 
450  char *yy_ch_buf; /* input buffer */
451  char *yy_buf_pos; /* current position in input buffer */
452 
453  /* Size of input buffer in bytes, not including room for EOB
454  * characters.
455  */
456  int yy_buf_size;
457 
458  /* Number of characters read into yy_ch_buf, not including EOB
459  * characters.
460  */
461  int yy_n_chars;
462 
463  /* Whether we "own" the buffer - i.e., we know we created it,
464  * and can realloc() it to grow it, and should free() it to
465  * delete it.
466  */
467  int yy_is_our_buffer;
468 
469  /* Whether this is an "interactive" input source; if so, and
470  * if we're using stdio for input, then we want to use getc()
471  * instead of fread(), to make sure we stop fetching input after
472  * each newline.
473  */
474  int yy_is_interactive;
475 
476  /* Whether we're considered to be at the beginning of a line.
477  * If so, '^' rules will be active on the next match, otherwise
478  * not.
479  */
480  int yy_at_bol;
481 
482  int yy_bs_lineno; /**< The line count. */
483  int yy_bs_column; /**< The column count. */
484 
485  /* Whether to try to fill the input buffer when we reach the
486  * end of it.
487  */
488  int yy_fill_buffer;
489 
490  int yy_buffer_status;
491 
492 #define YY_BUFFER_NEW 0
493 #define YY_BUFFER_NORMAL 1
494  /* When an EOF's been seen but there's still some text to process
495  * then we mark the buffer as YY_EOF_PENDING, to indicate that we
496  * shouldn't try reading from the input source any more. We might
497  * still have a bunch of tokens to match, though, because of
498  * possible backing-up.
499  *
500  * When we actually see the EOF, we change the status to "new"
501  * (via yyrestart()), so that the user can continue scanning by
502  * just pointing yyin at a new input file.
503  */
504 #define YY_BUFFER_EOF_PENDING 2
505 
506  };
507 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
508 
509 /* Stack of input buffers. */
510 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
511 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
512 static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
513 
514 /* We provide macros for accessing buffer states in case in the
515  * future we want to put the buffer states in a more general
516  * "scanner state".
517  *
518  * Returns the top of the stack, or NULL.
519  */
520 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
521  ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
522  : NULL)
523 /* Same as previous macro, but useful when we know that the buffer stack is not
524  * NULL or when we need an lvalue. For internal use only.
525  */
526 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
527 
528 /* yy_hold_char holds the character lost when yytext is formed. */
529 static char yy_hold_char;
530 static int yy_n_chars; /* number of characters read into yy_ch_buf */
531 int yyleng;
532 
533 /* Points to current character in buffer. */
534 static char *yy_c_buf_p = NULL;
535 static int yy_init = 0; /* whether we need to initialize */
536 static int yy_start = 0; /* start state number */
537 
538 /* Flag which is used to allow yywrap()'s to do buffer switches
539  * instead of setting up a fresh yyin. A bit of a hack ...
540  */
542 
543 void yyrestart ( FILE *input_file );
545 YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size );
549 void yypop_buffer_state ( void );
550 
551 static void yyensure_buffer_stack ( void );
552 static void yy_load_buffer_state ( void );
553 static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file );
554 #define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
555 
557 YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
558 YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );
559 
560 void *yyalloc ( yy_size_t );
561 void *yyrealloc ( void *, yy_size_t );
562 void yyfree ( void * );
563 
564 #define yy_new_buffer yy_create_buffer
565 #define yy_set_interactive(is_interactive) \
566  { \
567  if ( ! YY_CURRENT_BUFFER ){ \
568  yyensure_buffer_stack (); \
569  YY_CURRENT_BUFFER_LVALUE = \
570  yy_create_buffer( yyin, YY_BUF_SIZE ); \
571  } \
572  YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
573  }
574 #define yy_set_bol(at_bol) \
575  { \
576  if ( ! YY_CURRENT_BUFFER ){\
577  yyensure_buffer_stack (); \
578  YY_CURRENT_BUFFER_LVALUE = \
579  yy_create_buffer( yyin, YY_BUF_SIZE ); \
580  } \
581  YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
582  }
583 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
584 
585 /* Begin user sect3 */
586 
587 #define comment2pragmawrap() (/*CONSTCOND*/1)
588 #define YY_SKIP_YYWRAP
590 
591 FILE *yyin , *yyout ;
592 
593 typedef int yy_state_type;
594 
595 extern int yylineno;
596 int yylineno = 1;
597 
598 extern char *yytext;
599 #ifdef yytext_ptr
600 #undef yytext_ptr
601 #endif
602 #define yytext_ptr yytext
603 
606 static int yy_get_next_buffer ( void );
607 static void yynoreturn yy_fatal_error ( const char* msg );
608 
609 /* Done after the current pattern has been matched and before the
610  * corresponding action - sets up yytext.
611  */
612 #define YY_DO_BEFORE_ACTION \
613  (yytext_ptr) = yy_bp; \
614  (yytext_ptr) -= (yy_more_len); \
615  yyleng = (int) (yy_cp - (yytext_ptr)); \
616  (yy_hold_char) = *yy_cp; \
617  *yy_cp = '\0'; \
618  (yy_c_buf_p) = yy_cp;
619 #define YY_NUM_RULES 19
620 #define YY_END_OF_BUFFER 20
621 /* This struct is not used in this scanner,
622  but its presence is necessary. */
623 struct yy_trans_info
624  {
627  };
628 static const flex_int16_t yy_accept[95] =
629  { 0,
630  0, 0, 0, 0, 5, 5, 0, 0, 0, 0,
631  0, 0, 1, 1, 0, 0, 0, 0, 0, 0,
632  20, 19, 18, 17, 15, 18, 19, 13, 19, 5,
633  10, 9, 19, 1, 10, 2, 19, 19, 14, 16,
634  0, 0, 13, 0, 0, 5, 0, 9, 0, 0,
635  1, 2, 0, 0, 14, 0, 0, 0, 0, 0,
636  0, 0, 0, 0, 0, 0, 0, 0, 11, 0,
637  0, 0, 7, 0, 0, 0, 12, 0, 0, 8,
638  0, 0, 6, 0, 3, 0, 3, 0, 4, 3,
639  4, 0, 4, 0
640 
641  } ;
642 
643 static const YY_CHAR yy_ec[256] =
644  { 0,
645  1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
646  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
647  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
648  1, 2, 4, 1, 1, 5, 1, 6, 1, 1,
649  1, 7, 1, 1, 1, 1, 1, 2, 1, 1,
650  1, 1, 1, 1, 1, 1, 1, 8, 1, 1,
651  1, 1, 1, 1, 1, 1, 7, 1, 9, 1,
652  1, 1, 1, 1, 1, 1, 10, 1, 11, 12,
653  1, 1, 13, 14, 1, 1, 1, 1, 1, 1,
654  1, 1, 1, 1, 1, 1, 8, 8, 7, 1,
655 
656  15, 1, 1, 1, 1, 1, 8, 8, 16, 8,
657  17, 18, 1, 1, 19, 20, 1, 1, 1, 1,
658  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
659  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
660  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
661  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
662  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
663  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
664  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
665  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
666 
667  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
668  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
669  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
670  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
671  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
672  1, 1, 1, 1, 1
673  } ;
674 
675 static const YY_CHAR yy_meta[21] =
676  { 0,
677  1, 2, 3, 4, 1, 5, 1, 1, 1, 1,
678  1, 1, 1, 1, 1, 1, 1, 1, 1, 1
679  } ;
680 
681 static const flex_int16_t yy_base[110] =
682  { 0,
683  0, 0, 6, 7, 2, 10, 12, 14, 187, 186,
684  16, 17, 20, 24, 28, 32, 36, 38, 187, 186,
685  188, 193, 193, 193, 193, 21, 184, 193, 32, 0,
686  40, 0, 41, 0, 193, 0, 178, 182, 193, 193,
687  29, 178, 193, 40, 39, 0, 171, 0, 45, 43,
688  0, 0, 58, 168, 193, 52, 56, 61, 55, 60,
689  158, 160, 64, 67, 65, 0, 69, 77, 193, 153,
690  74, 80, 193, 0, 81, 79, 193, 0, 86, 193,
691  88, 92, 193, 0, 40, 90, 143, 97, 103, 142,
692  76, 104, 60, 193, 112, 117, 122, 127, 132, 137,
693 
694  142, 147, 152, 157, 159, 164, 169, 174, 179
695  } ;
696 
697 static const flex_int16_t yy_def[110] =
698  { 0,
699  95, 96, 97, 97, 98, 98, 95, 95, 95, 95,
700  97, 97, 99, 99, 95, 95, 95, 95, 100, 100,
701  94, 94, 94, 94, 94, 94, 101, 94, 94, 102,
702  94, 103, 94, 104, 94, 105, 94, 106, 94, 94,
703  94, 101, 94, 94, 94, 102, 94, 103, 94, 94,
704  104, 105, 94, 106, 94, 94, 94, 94, 94, 94,
705  94, 94, 94, 94, 94, 107, 94, 94, 94, 94,
706  94, 94, 94, 108, 94, 94, 94, 109, 94, 94,
707  94, 94, 94, 109, 94, 94, 94, 94, 94, 94,
708  94, 94, 94, 0, 94, 94, 94, 94, 94, 94,
709 
710  94, 94, 94, 94, 94, 94, 94, 94, 94
711  } ;
712 
713 static const flex_int16_t yy_nxt[214] =
714  { 0,
715  94, 94, 24, 25, 22, 22, 25, 26, 28, 28,
716  29, 29, 22, 22, 31, 32, 31, 32, 28, 28,
717  29, 29, 22, 22, 40, 22, 22, 22, 41, 22,
718  35, 32, 40, 36, 35, 32, 41, 36, 37, 32,
719  37, 32, 44, 47, 45, 87, 47, 88, 44, 56,
720  45, 49, 57, 50, 59, 56, 60, 49, 57, 50,
721  59, 61, 60, 62, 63, 53, 66, 93, 67, 62,
722  63, 64, 66, 65, 67, 70, 71, 64, 72, 65,
723  74, 70, 71, 93, 72, 78, 74, 75, 79, 76,
724  81, 78, 82, 75, 79, 76, 81, 84, 82, 85,
725 
726  86, 89, 87, 84, 88, 85, 86, 89, 91, 91,
727  92, 92, 22, 22, 22, 22, 22, 23, 23, 23,
728  23, 23, 27, 27, 27, 27, 27, 30, 30, 30,
729  30, 30, 34, 34, 34, 34, 34, 38, 38, 38,
730  38, 38, 42, 42, 42, 42, 42, 46, 46, 90,
731  90, 46, 48, 48, 77, 48, 48, 51, 51, 52,
732  52, 69, 68, 52, 54, 54, 54, 54, 54, 73,
733  55, 73, 73, 73, 80, 58, 80, 80, 80, 83,
734  43, 83, 83, 83, 55, 53, 43, 94, 39, 39,
735  33, 33, 21, 94, 94, 94, 94, 94, 94, 94,
736 
737  94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
738  94, 94, 94
739  } ;
740 
741 static const flex_int16_t yy_chk[214] =
742  { 0,
743  0, 0, 2, 2, 5, 5, 2, 2, 3, 4,
744  3, 4, 6, 6, 7, 7, 8, 8, 11, 12,
745  11, 12, 13, 13, 26, 13, 14, 14, 26, 14,
746  15, 15, 41, 15, 16, 16, 41, 16, 17, 17,
747  18, 18, 29, 31, 29, 85, 31, 85, 29, 44,
748  29, 33, 45, 33, 49, 44, 50, 33, 45, 33,
749  49, 53, 50, 56, 57, 53, 59, 93, 60, 56,
750  57, 58, 59, 58, 60, 63, 64, 58, 65, 58,
751  67, 63, 64, 91, 65, 71, 67, 68, 72, 68,
752  75, 71, 76, 68, 72, 68, 75, 79, 76, 81,
753 
754  82, 86, 88, 79, 88, 81, 82, 86, 89, 92,
755  89, 92, 95, 95, 95, 95, 95, 96, 96, 96,
756  96, 96, 97, 97, 97, 97, 97, 98, 98, 98,
757  98, 98, 99, 99, 99, 99, 99, 100, 100, 100,
758  100, 100, 101, 101, 101, 101, 101, 102, 102, 90,
759  87, 102, 103, 103, 70, 103, 103, 104, 104, 105,
760  105, 62, 61, 105, 106, 106, 106, 106, 106, 107,
761  54, 107, 107, 107, 108, 47, 108, 108, 108, 109,
762  42, 109, 109, 109, 38, 37, 27, 21, 20, 19,
763  10, 9, 94, 94, 94, 94, 94, 94, 94, 94,
764 
765  94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
766  94, 94, 94
767  } ;
768 
771 
772 extern int yy_flex_debug;
774 
775 /* The intent behind this definition is that it'll catch
776  * any uses of REJECT which flex missed.
777  */
778 #define REJECT reject_used_but_not_detected
779 static int yy_more_flag = 0;
780 static int yy_more_len = 0;
781 #define yymore() ((yy_more_flag) = 1)
782 #define YY_MORE_ADJ (yy_more_len)
783 #define YY_RESTORE_YY_MORE_OFFSET
784 char *yytext;
785 #line 1 "comment2pragma.l"
786 #line 2 "comment2pragma.l"
787 #include "defines-local.h"
788 
790 
791 static char *directive_txt = NULL;
792 static char *comment_txt = NULL;
793 
794 static void directive_start(int type);
795 static void directive_reset(void);
796 static void append(char **buffer);
797 static void clean_buffer(char **buffer);
798 static void end_directive(void);
799 static void end_comment(void);
800 
801 static int directive_syntaxe = -1;
802 static int directive_type = -1;
803 
804 #define DIRECTIVE_STEP 0
805 #define DIRECTIVE_OMP 1
806 
807 #line 808 "<stdout>"
808 #define YY_NO_INPUT 1
809 #line 29 "comment2pragma.l"
810  /*
811  Attention PIPS supprime les blancs en début de commentaire en syntaxe libre, et insÚre un saut de ligne supplémentaire :
812  | !txt1
813  | !txt2
814  devient :
815  |!txt1
816  |
817  |!txt2
818  |
819  */
820 
821 
822 
823 #line 824 "<stdout>"
824 
825 #define INITIAL 0
826 #define comment_fixe 1
827 #define directive_fixe 2
828 #define directive_fixe_comment 3
829 #define directive_fixe_continuation 4
830 #define comment_libre 5
831 #define directive_libre 6
832 #define directive_libre_comment 7
833 #define directive_libre_continuation 8
834 #define other_line 9
835 
836 #ifndef YY_NO_UNISTD_H
837 /* Special case for "unistd.h", since it is non-ANSI. We include it way
838  * down here because we want the user's section 1 to have been scanned first.
839  * The user has a chance to override it with an option.
840  */
841 #include <unistd.h>
842 #endif
843 
844 #ifndef YY_EXTRA_TYPE
845 #define YY_EXTRA_TYPE void *
846 #endif
847 
848 static int yy_init_globals ( void );
849 
850 /* Accessor methods to globals.
851  These are made visible to non-reentrant scanners for convenience. */
852 
853 int yylex_destroy ( void );
854 
855 int yyget_debug ( void );
856 
857 void yyset_debug ( int debug_flag );
858 
859 YY_EXTRA_TYPE yyget_extra ( void );
860 
861 void yyset_extra ( YY_EXTRA_TYPE user_defined );
862 
863 FILE *yyget_in ( void );
864 
865 void yyset_in ( FILE * _in_str );
866 
867 FILE *yyget_out ( void );
868 
869 void yyset_out ( FILE * _out_str );
870 
871  int yyget_leng ( void );
872 
873 char *yyget_text ( void );
874 
875 int yyget_lineno ( void );
876 
877 void yyset_lineno ( int _line_number );
878 
879 /* Macros after this point can all be overridden by user definitions in
880  * section 1.
881  */
882 
883 #ifndef YY_SKIP_YYWRAP
884 #ifdef __cplusplus
885 extern "C" int yywrap ( void );
886 #else
887 extern int yywrap ( void );
888 #endif
889 #endif
890 
891 #ifndef YY_NO_UNPUT
892 
893 #endif
894 
895 #ifndef yytext_ptr
896 static void yy_flex_strncpy ( char *, const char *, int );
897 #endif
898 
899 #ifdef YY_NEED_STRLEN
900 static int yy_flex_strlen ( const char * );
901 #endif
902 
903 #ifndef YY_NO_INPUT
904 #ifdef __cplusplus
905 static int yyinput ( void );
906 #else
907 static int input ( void );
908 #endif
909 
910 #endif
911 
912 /* Amount of stuff to slurp up with each read. */
913 #ifndef YY_READ_BUF_SIZE
914 #ifdef __ia64__
915 /* On IA-64, the buffer size is 16k, not 8k */
916 #define YY_READ_BUF_SIZE 16384
917 #else
918 #define YY_READ_BUF_SIZE 8192
919 #endif /* __ia64__ */
920 #endif
921 
922 /* Copy whatever the last rule matched to the standard output. */
923 #ifndef ECHO
924 /* This used to be an fputs(), but since the string might contain NUL's,
925  * we now use fwrite().
926  */
927 #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
928 #endif
929 
930 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
931  * is returned in "result".
932  */
933 #ifndef YY_INPUT
934 #define YY_INPUT(buf,result,max_size) \
935  if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
936  { \
937  int c = '*'; \
938  int n; \
939  for ( n = 0; n < max_size && \
940  (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
941  buf[n] = (char) c; \
942  if ( c == '\n' ) \
943  buf[n++] = (char) c; \
944  if ( c == EOF && ferror( yyin ) ) \
945  YY_FATAL_ERROR( "input in flex scanner failed" ); \
946  result = n; \
947  } \
948  else \
949  { \
950  errno=0; \
951  while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
952  { \
953  if( errno != EINTR) \
954  { \
955  YY_FATAL_ERROR( "input in flex scanner failed" ); \
956  break; \
957  } \
958  errno=0; \
959  clearerr(yyin); \
960  } \
961  }\
962 \
963 
964 #endif
965 
966 /* No semi-colon after return; correct usage is to write "yyterminate();" -
967  * we don't want an extra ';' after the "return" because that will cause
968  * some compilers to complain about unreachable statements.
969  */
970 #ifndef yyterminate
971 #define yyterminate() return YY_NULL
972 #endif
973 
974 /* Number of entries by which start-condition stack grows. */
975 #ifndef YY_START_STACK_INCR
976 #define YY_START_STACK_INCR 25
977 #endif
978 
979 /* Report a fatal error. */
980 #ifndef YY_FATAL_ERROR
981 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
982 #endif
983 
984 /* end tables serialization structures and prototypes */
985 
986 /* Default declaration of generated scanner - a define so the user can
987  * easily add parameters.
988  */
989 #ifndef YY_DECL
990 #define YY_DECL_IS_OURS 1
991 
992 extern int yylex (void);
993 
994 #define YY_DECL int yylex (void)
995 #endif /* !YY_DECL */
996 
997 /* Code executed at the beginning of each rule, after yytext and yyleng
998  * have been set up.
999  */
1000 #ifndef YY_USER_ACTION
1001 #define YY_USER_ACTION
1002 #endif
1003 
1004 /* Code executed at the end of each rule. */
1005 #ifndef YY_BREAK
1006 #define YY_BREAK /*LINTED*/break;
1007 #endif
1008 
1009 #define YY_RULE_SETUP \
1010  if ( yyleng > 0 ) \
1011  YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
1012  (yytext[yyleng - 1] == '\n'); \
1013  YY_USER_ACTION
1014 
1015 /** The main scanner function which does all the work.
1016  */
1018 {
1019  yy_state_type yy_current_state;
1020  char *yy_cp, *yy_bp;
1021  int yy_act;
1022 
1023  if ( !(yy_init) )
1024  {
1025  (yy_init) = 1;
1026 
1027 #ifdef YY_USER_INIT
1028  YY_USER_INIT;
1029 #endif
1030 
1031  if ( ! (yy_start) )
1032  (yy_start) = 1; /* first start state */
1033 
1034  if ( ! yyin )
1035  yyin = stdin;
1036 
1037  if ( ! yyout )
1038  yyout = stdout;
1039 
1040  if ( ! YY_CURRENT_BUFFER ) {
1044  }
1045 
1047  }
1048 
1049  {
1050 #line 55 "comment2pragma.l"
1051 
1052 
1053  /*
1054  Directive à syntaxe libre
1055  */
1056 #line 1057 "<stdout>"
1057 
1058  while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
1059  {
1060  (yy_more_len) = 0;
1061  if ( (yy_more_flag) )
1062  {
1063  (yy_more_len) = (int) ((yy_c_buf_p) - (yytext_ptr));
1064  (yy_more_flag) = 0;
1065  }
1066  yy_cp = (yy_c_buf_p);
1067 
1068  /* Support of yytext. */
1069  *yy_cp = (yy_hold_char);
1070 
1071  /* yy_bp points to the position in yy_ch_buf of the start of
1072  * the current run.
1073  */
1074  yy_bp = yy_cp;
1075 
1076  yy_current_state = (yy_start);
1077  yy_current_state += YY_AT_BOL();
1078 yy_match:
1079  do
1080  {
1081  YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
1082  if ( yy_accept[yy_current_state] )
1083  {
1084  (yy_last_accepting_state) = yy_current_state;
1086  }
1087  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1088  {
1089  yy_current_state = (int) yy_def[yy_current_state];
1090  if ( yy_current_state >= 95 )
1091  yy_c = yy_meta[yy_c];
1092  }
1093  yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1094  ++yy_cp;
1095  }
1096  while ( yy_base[yy_current_state] != 193 );
1097 
1098 yy_find_action:
1099  yy_act = yy_accept[yy_current_state];
1100  if ( yy_act == 0 )
1101  { /* have to back up */
1103  yy_current_state = (yy_last_accepting_state);
1104  yy_act = yy_accept[yy_current_state];
1105  }
1106 
1108 
1109 do_action: /* This label is used only to access EOF actions. */
1110 
1111  switch ( yy_act )
1112  { /* beginning of action switch */
1113  case 0: /* must back up */
1114  /* undo the effects of YY_DO_BEFORE_ACTION */
1115  *yy_cp = (yy_hold_char);
1117  yy_current_state = (yy_last_accepting_state);
1118  goto yy_find_action;
1119 
1120 case 1:
1122 #line 60 "comment2pragma.l"
1123 {
1124  append(&directive_txt); // ajout du texte de la directive
1126  }
1127  YY_BREAK
1128 case 2:
1130 #line 65 "comment2pragma.l"
1131 { // détection d'une continuation du texte de la directive sur la ligne suivante
1133  }
1134  YY_BREAK
1135 // controle de la continuation
1136 case 3:
1137 /* rule 3 can match eol */
1139 #line 70 "comment2pragma.l"
1140 {
1142  yy_fatal_error("erreur continuation omp libre\n");
1144  }
1145  YY_BREAK
1146 case 4:
1147 /* rule 4 can match eol */
1149 #line 75 "comment2pragma.l"
1150 {
1152  yy_fatal_error("erreur continuation omp libre\n");
1154  }
1155  YY_BREAK
1156 
1157 /*
1158  Directive à syntaxe fixe
1159  */
1160 case 5:
1162 #line 85 "comment2pragma.l"
1163 {
1164  append(&directive_txt); // ajout du texte de la directive
1166  }
1167  YY_BREAK
1168 case 6:
1169 /* rule 6 can match eol */
1170 *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
1172 (yy_c_buf_p) = yy_cp = yy_bp + 2;
1173 YY_DO_BEFORE_ACTION; /* set up yytext again */
1175 #line 90 "comment2pragma.l"
1176 { // détection d'une continuation du texte de la directive sur la ligne suivante
1178  }
1179  YY_BREAK
1180 // controle de la continuation
1181 case 7:
1182 /* rule 7 can match eol */
1184 #line 95 "comment2pragma.l"
1185 {
1187  yy_fatal_error("erreur continuation omp fixe\n");
1189  }
1190  YY_BREAK
1191 case 8:
1192 /* rule 8 can match eol */
1194 #line 100 "comment2pragma.l"
1195 {
1197  yy_fatal_error("erreur continuation step fixe\n");
1199  }
1200  YY_BREAK
1201 
1202 /*
1203  Collecte d'un commentaire porté par une directive
1204  */
1205 case 9:
1207 #line 110 "comment2pragma.l"
1208 {
1209  append(&comment_txt);
1210  }
1211  YY_BREAK
1212 /*
1213  Détection de la fin d'une directive et de son commentaire associé éventuel
1214  */
1215 case 10:
1216 /* rule 10 can match eol */
1218 #line 117 "comment2pragma.l"
1219 {
1220  append(&comment_txt);
1221 
1222  end_directive();
1223 
1224  directive_reset();
1225  BEGIN(INITIAL);
1226  }
1227  YY_BREAK
1228 /*
1229  Identification d'une nouvelle directive
1230  */
1231 
1232 case 11:
1234 #line 130 "comment2pragma.l"
1235 {
1237  }
1238  YY_BREAK
1239 case 12:
1241 #line 133 "comment2pragma.l"
1242 {
1244  }
1245  YY_BREAK
1246 
1247 /*
1248  Identification des commentaires et autres lignes
1249  */
1250 case 13:
1251 /* rule 13 can match eol */
1253 #line 141 "comment2pragma.l"
1254 {
1255  append(&comment_txt);
1256  end_comment();
1258  BEGIN(INITIAL);
1259  }
1260  YY_BREAK
1261 case 14:
1262 /* rule 14 can match eol */
1264 #line 147 "comment2pragma.l"
1265 {
1266  append(&comment_txt);
1267  end_comment();
1269  BEGIN(INITIAL);
1270  }
1271  YY_BREAK
1272 
1273 case 15:
1275 #line 156 "comment2pragma.l"
1276 {
1278  yymore();
1279  }
1280  YY_BREAK
1281 case 16:
1283 #line 160 "comment2pragma.l"
1284 {
1286  yymore();
1287  }
1288  YY_BREAK
1289 case 17:
1290 /* rule 17 can match eol */
1292 #line 164 "comment2pragma.l"
1293 {
1294  append(&comment_txt);
1295  end_comment();
1297  }
1298  YY_BREAK
1299 case 18:
1301 #line 169 "comment2pragma.l"
1302 {
1303  BEGIN(other_line);
1304  yymore();
1305  }
1306  YY_BREAK
1307 
1308 case 19:
1310 #line 175 "comment2pragma.l"
1311 ECHO;
1312  YY_BREAK
1313 #line 1314 "<stdout>"
1314 case YY_STATE_EOF(INITIAL):
1323 case YY_STATE_EOF(other_line):
1324  yyterminate();
1325 
1326  case YY_END_OF_BUFFER:
1327  {
1328  /* Amount of text matched not including the EOB char. */
1329  int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1330 
1331  /* Undo the effects of YY_DO_BEFORE_ACTION. */
1332  *yy_cp = (yy_hold_char);
1334 
1335  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1336  {
1337  /* We're scanning a new file or input source. It's
1338  * possible that this happened because the user
1339  * just pointed yyin at a new source and called
1340  * yylex(). If so, then we have to assure
1341  * consistency between YY_CURRENT_BUFFER and our
1342  * globals. Here is the right place to do so, because
1343  * this is the first action (other than possibly a
1344  * back-up) that will match for the new input source.
1345  */
1346  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1347  YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1348  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1349  }
1350 
1351  /* Note that here we test for yy_c_buf_p "<=" to the position
1352  * of the first EOB in the buffer, since yy_c_buf_p will
1353  * already have been incremented past the NUL character
1354  * (since all states make transitions on EOB to the
1355  * end-of-buffer state). Contrast this with the test
1356  * in input().
1357  */
1358  if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1359  { /* This was really a NUL. */
1360  yy_state_type yy_next_state;
1361 
1362  (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1363 
1364  yy_current_state = yy_get_previous_state( );
1365 
1366  /* Okay, we're now positioned to make the NUL
1367  * transition. We couldn't have
1368  * yy_get_previous_state() go ahead and do it
1369  * for us because it doesn't know how to deal
1370  * with the possibility of jamming (and we don't
1371  * want to build jamming into it because then it
1372  * will run more slowly).
1373  */
1374 
1375  yy_next_state = yy_try_NUL_trans( yy_current_state );
1376 
1378 
1379  if ( yy_next_state )
1380  {
1381  /* Consume the NUL. */
1382  yy_cp = ++(yy_c_buf_p);
1383  yy_current_state = yy_next_state;
1384  goto yy_match;
1385  }
1386 
1387  else
1388  {
1389  yy_cp = (yy_c_buf_p);
1390  goto yy_find_action;
1391  }
1392  }
1393 
1394  else switch ( yy_get_next_buffer( ) )
1395  {
1396  case EOB_ACT_END_OF_FILE:
1397  {
1399 
1400  if ( yywrap( ) )
1401  {
1402  /* Note: because we've taken care in
1403  * yy_get_next_buffer() to have set up
1404  * yytext, we can now set up
1405  * yy_c_buf_p so that if some total
1406  * hoser (like flex itself) wants to
1407  * call the scanner after we return the
1408  * YY_NULL, it'll still work - another
1409  * YY_NULL will get returned.
1410  */
1412 
1414  goto do_action;
1415  }
1416 
1417  else
1418  {
1419  if ( ! (yy_did_buffer_switch_on_eof) )
1420  YY_NEW_FILE;
1421  }
1422  break;
1423  }
1424 
1425  case EOB_ACT_CONTINUE_SCAN:
1426  (yy_c_buf_p) =
1427  (yytext_ptr) + yy_amount_of_matched_text;
1428 
1429  yy_current_state = yy_get_previous_state( );
1430 
1431  yy_cp = (yy_c_buf_p);
1433  goto yy_match;
1434 
1435  case EOB_ACT_LAST_MATCH:
1436  (yy_c_buf_p) =
1437  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1438 
1439  yy_current_state = yy_get_previous_state( );
1440 
1441  yy_cp = (yy_c_buf_p);
1443  goto yy_find_action;
1444  }
1445  break;
1446  }
1447 
1448  default:
1450  "fatal flex scanner internal error--no action found" );
1451  } /* end of action switch */
1452  } /* end of scanning one token */
1453  } /* end of user's declarations */
1454 } /* end of yylex */
1455 
1456 /* yy_get_next_buffer - try to read in a new buffer
1457  *
1458  * Returns a code representing an action:
1459  * EOB_ACT_LAST_MATCH -
1460  * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1461  * EOB_ACT_END_OF_FILE - end of file
1462  */
1463 static int yy_get_next_buffer (void)
1464 {
1465  char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1466  char *source = (yytext_ptr);
1467  int number_to_move, i;
1468  int ret_val;
1469 
1470  if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1472  "fatal flex scanner internal error--end of buffer missed" );
1473 
1474  if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1475  { /* Don't try to fill the buffer, so this is an EOF. */
1476  if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1477  {
1478  /* We matched a single character, the EOB, so
1479  * treat this as a final EOF.
1480  */
1481  return EOB_ACT_END_OF_FILE;
1482  }
1483 
1484  else
1485  {
1486  /* We matched some text prior to the EOB, first
1487  * process it.
1488  */
1489  return EOB_ACT_LAST_MATCH;
1490  }
1491  }
1492 
1493  /* Try to read more data. */
1494 
1495  /* First move last chars to start of buffer. */
1496  number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
1497 
1498  for ( i = 0; i < number_to_move; ++i )
1499  *(dest++) = *(source++);
1500 
1501  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1502  /* don't do the read, it's not guaranteed to return an EOF,
1503  * just force an EOF
1504  */
1505  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1506 
1507  else
1508  {
1509  int num_to_read =
1510  YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1511 
1512  while ( num_to_read <= 0 )
1513  { /* Not enough room in the buffer - grow it. */
1514 
1515  /* just a shorter name for the current buffer */
1517 
1518  int yy_c_buf_p_offset =
1519  (int) ((yy_c_buf_p) - b->yy_ch_buf);
1520 
1521  if ( b->yy_is_our_buffer )
1522  {
1523  int new_size = b->yy_buf_size * 2;
1524 
1525  if ( new_size <= 0 )
1526  b->yy_buf_size += b->yy_buf_size / 8;
1527  else
1528  b->yy_buf_size *= 2;
1529 
1530  b->yy_ch_buf = (char *)
1531  /* Include room in for 2 EOB chars. */
1532  yyrealloc( (void *) b->yy_ch_buf,
1533  (yy_size_t) (b->yy_buf_size + 2) );
1534  }
1535  else
1536  /* Can't grow it, we don't own it. */
1537  b->yy_ch_buf = NULL;
1538 
1539  if ( ! b->yy_ch_buf )
1541  "fatal error - scanner input buffer overflow" );
1542 
1543  (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1544 
1545  num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1546  number_to_move - 1;
1547 
1548  }
1549 
1550  if ( num_to_read > YY_READ_BUF_SIZE )
1551  num_to_read = YY_READ_BUF_SIZE;
1552 
1553  /* Read in more data. */
1554  YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1555  (yy_n_chars), num_to_read );
1556 
1557  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1558  }
1559 
1560  if ( (yy_n_chars) == 0 )
1561  {
1562  if ((int) number_to_move == YY_MORE_ADJ )
1563  {
1564  ret_val = EOB_ACT_END_OF_FILE;
1565  yyrestart( yyin );
1566  }
1567 
1568  else
1569  {
1570  ret_val = EOB_ACT_LAST_MATCH;
1571  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1573  }
1574  }
1575 
1576  else
1577  ret_val = EOB_ACT_CONTINUE_SCAN;
1578 
1579  if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1580  /* Extend the array by 50%, plus the number we really need. */
1581  int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1582  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
1583  (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
1584  if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1585  YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1586  /* "- 2" to take care of EOB's */
1587  YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
1588  }
1589 
1590  (yy_n_chars) += number_to_move;
1593 
1594  (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1595 
1596  return ret_val;
1597 }
1598 
1599 /* yy_get_previous_state - get the state just before the EOB char was reached */
1600 
1601  static yy_state_type yy_get_previous_state (void)
1602 {
1603  yy_state_type yy_current_state;
1604  char *yy_cp;
1605 
1606  yy_current_state = (yy_start);
1607  yy_current_state += YY_AT_BOL();
1608 
1609  for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1610  {
1611  YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1612  if ( yy_accept[yy_current_state] )
1613  {
1614  (yy_last_accepting_state) = yy_current_state;
1616  }
1617  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1618  {
1619  yy_current_state = (int) yy_def[yy_current_state];
1620  if ( yy_current_state >= 95 )
1621  yy_c = yy_meta[yy_c];
1622  }
1623  yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1624  }
1625 
1626  return yy_current_state;
1627 }
1628 
1629 /* yy_try_NUL_trans - try to make a transition on the NUL character
1630  *
1631  * synopsis
1632  * next_state = yy_try_NUL_trans( current_state );
1633  */
1634  static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1635 {
1636  int yy_is_jam;
1637  char *yy_cp = (yy_c_buf_p);
1638 
1639  YY_CHAR yy_c = 1;
1640  if ( yy_accept[yy_current_state] )
1641  {
1642  (yy_last_accepting_state) = yy_current_state;
1644  }
1645  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1646  {
1647  yy_current_state = (int) yy_def[yy_current_state];
1648  if ( yy_current_state >= 95 )
1649  yy_c = yy_meta[yy_c];
1650  }
1651  yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1652  yy_is_jam = (yy_current_state == 94);
1653 
1654  return yy_is_jam ? 0 : yy_current_state;
1655 }
1656 
1657 #ifndef YY_NO_UNPUT
1658 
1659 #endif
1660 
1661 #ifndef YY_NO_INPUT
1662 #ifdef __cplusplus
1663  static int yyinput (void)
1664 #else
1665  static int input (void)
1666 #endif
1667 
1668 {
1669  int c;
1670 
1671  *(yy_c_buf_p) = (yy_hold_char);
1672 
1673  if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1674  {
1675  /* yy_c_buf_p now points to the character we want to return.
1676  * If this occurs *before* the EOB characters, then it's a
1677  * valid NUL; if not, then we've hit the end of the buffer.
1678  */
1679  if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1680  /* This was really a NUL. */
1681  *(yy_c_buf_p) = '\0';
1682 
1683  else
1684  { /* need more input */
1685  int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
1686  ++(yy_c_buf_p);
1687 
1688  switch ( yy_get_next_buffer( ) )
1689  {
1690  case EOB_ACT_LAST_MATCH:
1691  /* This happens because yy_g_n_b()
1692  * sees that we've accumulated a
1693  * token and flags that we need to
1694  * try matching the token before
1695  * proceeding. But for input(),
1696  * there's no matching to consider.
1697  * So convert the EOB_ACT_LAST_MATCH
1698  * to EOB_ACT_END_OF_FILE.
1699  */
1700 
1701  /* Reset buffer status. */
1702  yyrestart( yyin );
1703 
1704  /*FALLTHROUGH*/
1705 
1706  case EOB_ACT_END_OF_FILE:
1707  {
1708  if ( yywrap( ) )
1709  return 0;
1710 
1711  if ( ! (yy_did_buffer_switch_on_eof) )
1712  YY_NEW_FILE;
1713 #ifdef __cplusplus
1714  return yyinput();
1715 #else
1716  return input();
1717 #endif
1718  }
1719 
1720  case EOB_ACT_CONTINUE_SCAN:
1721  (yy_c_buf_p) = (yytext_ptr) + offset;
1722  break;
1723  }
1724  }
1725  }
1726 
1727  c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1728  *(yy_c_buf_p) = '\0'; /* preserve yytext */
1729  (yy_hold_char) = *++(yy_c_buf_p);
1730 
1731  YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
1732 
1733  return c;
1734 }
1735 #endif /* ifndef YY_NO_INPUT */
1736 
1737 /** Immediately switch to a different input stream.
1738  * @param input_file A readable stream.
1739  *
1740  * @note This function does not reset the start condition to @c INITIAL .
1741  */
1742  void yyrestart (FILE * input_file )
1743 {
1744 
1745  if ( ! YY_CURRENT_BUFFER ){
1749  }
1750 
1751  yy_init_buffer( YY_CURRENT_BUFFER, input_file );
1753 }
1754 
1755 /** Switch to a different input buffer.
1756  * @param new_buffer The new input buffer.
1757  *
1758  */
1759  void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
1760 {
1761 
1762  /* TODO. We should be able to replace this entire function body
1763  * with
1764  * yypop_buffer_state();
1765  * yypush_buffer_state(new_buffer);
1766  */
1768  if ( YY_CURRENT_BUFFER == new_buffer )
1769  return;
1770 
1771  if ( YY_CURRENT_BUFFER )
1772  {
1773  /* Flush out information for old buffer. */
1774  *(yy_c_buf_p) = (yy_hold_char);
1775  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1776  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1777  }
1778 
1779  YY_CURRENT_BUFFER_LVALUE = new_buffer;
1781 
1782  /* We don't actually know whether we did this switch during
1783  * EOF (yywrap()) processing, but the only time this flag
1784  * is looked at is after yywrap() is called, so it's safe
1785  * to go ahead and always set it.
1786  */
1788 }
1789 
1790 static void yy_load_buffer_state (void)
1791 {
1792  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1793  (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1794  yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1795  (yy_hold_char) = *(yy_c_buf_p);
1796 }
1797 
1798 /** Allocate and initialize an input buffer state.
1799  * @param file A readable stream.
1800  * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1801  *
1802  * @return the allocated buffer state.
1803  */
1804  YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
1805 {
1806  YY_BUFFER_STATE b;
1807 
1808  b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
1809  if ( ! b )
1810  YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1811 
1812  b->yy_buf_size = size;
1813 
1814  /* yy_ch_buf has to be 2 characters longer than the size given because
1815  * we need to put in 2 end-of-buffer characters.
1816  */
1817  b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
1818  if ( ! b->yy_ch_buf )
1819  YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1820 
1821  b->yy_is_our_buffer = 1;
1822 
1823  yy_init_buffer( b, file );
1824 
1825  return b;
1826 }
1827 
1828 /** Destroy the buffer.
1829  * @param b a buffer created with yy_create_buffer()
1830  *
1831  */
1833 {
1834 
1835  if ( ! b )
1836  return;
1837 
1838  if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1840 
1841  if ( b->yy_is_our_buffer )
1842  yyfree( (void *) b->yy_ch_buf );
1843 
1844  yyfree( (void *) b );
1845 }
1846 
1847 /* Initializes or reinitializes a buffer.
1848  * This function is sometimes called more than once on the same buffer,
1849  * such as during a yyrestart() or at EOF.
1850  */
1851  static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
1852 
1853 {
1854  int oerrno = errno;
1855 
1856  yy_flush_buffer( b );
1857 
1858  b->yy_input_file = file;
1859  b->yy_fill_buffer = 1;
1860 
1861  /* If b is the current buffer, then yy_init_buffer was _probably_
1862  * called from yyrestart() or through yy_get_next_buffer.
1863  * In that case, we don't want to reset the lineno or column.
1864  */
1865  if (b != YY_CURRENT_BUFFER){
1866  b->yy_bs_lineno = 1;
1867  b->yy_bs_column = 0;
1868  }
1869 
1870  b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1871 
1872  errno = oerrno;
1873 }
1874 
1875 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1876  * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1877  *
1878  */
1880 {
1881  if ( ! b )
1882  return;
1883 
1884  b->yy_n_chars = 0;
1885 
1886  /* We always need two end-of-buffer characters. The first causes
1887  * a transition to the end-of-buffer state. The second causes
1888  * a jam in that state.
1889  */
1892 
1893  b->yy_buf_pos = &b->yy_ch_buf[0];
1894 
1895  b->yy_at_bol = 1;
1897 
1898  if ( b == YY_CURRENT_BUFFER )
1900 }
1901 
1902 /** Pushes the new state onto the stack. The new state becomes
1903  * the current state. This function will allocate the stack
1904  * if necessary.
1905  * @param new_buffer The new state.
1906  *
1907  */
1908 void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
1909 {
1910  if (new_buffer == NULL)
1911  return;
1912 
1914 
1915  /* This block is copied from yy_switch_to_buffer. */
1916  if ( YY_CURRENT_BUFFER )
1917  {
1918  /* Flush out information for old buffer. */
1919  *(yy_c_buf_p) = (yy_hold_char);
1920  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1921  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1922  }
1923 
1924  /* Only push if top exists. Otherwise, replace top. */
1925  if (YY_CURRENT_BUFFER)
1926  (yy_buffer_stack_top)++;
1927  YY_CURRENT_BUFFER_LVALUE = new_buffer;
1928 
1929  /* copied from yy_switch_to_buffer. */
1932 }
1933 
1934 /** Removes and deletes the top of the stack, if present.
1935  * The next element becomes the new top.
1936  *
1937  */
1938 void yypop_buffer_state (void)
1939 {
1940  if (!YY_CURRENT_BUFFER)
1941  return;
1942 
1944  YY_CURRENT_BUFFER_LVALUE = NULL;
1945  if ((yy_buffer_stack_top) > 0)
1946  --(yy_buffer_stack_top);
1947 
1948  if (YY_CURRENT_BUFFER) {
1951  }
1952 }
1953 
1954 /* Allocates the stack if it does not exist.
1955  * Guarantees space for at least one push.
1956  */
1957 static void yyensure_buffer_stack (void)
1958 {
1959  yy_size_t num_to_alloc;
1960 
1961  if (!(yy_buffer_stack)) {
1962 
1963  /* First allocation is just for 2 elements, since we don't know if this
1964  * scanner will even need a stack. We use 2 instead of 1 to avoid an
1965  * immediate realloc on the next call.
1966  */
1967  num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
1969  (num_to_alloc * sizeof(struct yy_buffer_state*)
1970  );
1971  if ( ! (yy_buffer_stack) )
1972  YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1973 
1974  memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1975 
1976  (yy_buffer_stack_max) = num_to_alloc;
1977  (yy_buffer_stack_top) = 0;
1978  return;
1979  }
1980 
1981  if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1982 
1983  /* Increase the buffer to prepare for a possible push. */
1984  yy_size_t grow_size = 8 /* arbitrary grow size */;
1985 
1986  num_to_alloc = (yy_buffer_stack_max) + grow_size;
1988  ((yy_buffer_stack),
1989  num_to_alloc * sizeof(struct yy_buffer_state*)
1990  );
1991  if ( ! (yy_buffer_stack) )
1992  YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1993 
1994  /* zero only the new slots.*/
1995  memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
1996  (yy_buffer_stack_max) = num_to_alloc;
1997  }
1998 }
1999 
2000 /** Setup the input buffer state to scan directly from a user-specified character buffer.
2001  * @param base the character buffer
2002  * @param size the size in bytes of the character buffer
2003  *
2004  * @return the newly allocated buffer state object.
2005  */
2007 {
2008  YY_BUFFER_STATE b;
2009 
2010  if ( size < 2 ||
2011  base[size-2] != YY_END_OF_BUFFER_CHAR ||
2012  base[size-1] != YY_END_OF_BUFFER_CHAR )
2013  /* They forgot to leave room for the EOB's. */
2014  return NULL;
2015 
2016  b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
2017  if ( ! b )
2018  YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2019 
2020  b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
2021  b->yy_buf_pos = b->yy_ch_buf = base;
2022  b->yy_is_our_buffer = 0;
2023  b->yy_input_file = NULL;
2024  b->yy_n_chars = b->yy_buf_size;
2025  b->yy_is_interactive = 0;
2026  b->yy_at_bol = 1;
2027  b->yy_fill_buffer = 0;
2029 
2030  yy_switch_to_buffer( b );
2031 
2032  return b;
2033 }
2034 
2035 /** Setup the input buffer state to scan a string. The next call to yylex() will
2036  * scan from a @e copy of @a str.
2037  * @param yystr a NUL-terminated string to scan
2038  *
2039  * @return the newly allocated buffer state object.
2040  * @note If you want to scan bytes that may contain NUL values, then use
2041  * yy_scan_bytes() instead.
2042  */
2043 YY_BUFFER_STATE yy_scan_string (const char * yystr )
2044 {
2045 
2046  return yy_scan_bytes( yystr, (int) strlen(yystr) );
2047 }
2048 
2049 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
2050  * scan from a @e copy of @a bytes.
2051  * @param yybytes the byte buffer to scan
2052  * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
2053  *
2054  * @return the newly allocated buffer state object.
2055  */
2056 YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
2057 {
2058  YY_BUFFER_STATE b;
2059  char *buf;
2060  yy_size_t n;
2061  int i;
2062 
2063  /* Get memory for full buffer, including space for trailing EOB's. */
2064  n = (yy_size_t) (_yybytes_len + 2);
2065  buf = (char *) yyalloc( n );
2066  if ( ! buf )
2067  YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2068 
2069  for ( i = 0; i < _yybytes_len; ++i )
2070  buf[i] = yybytes[i];
2071 
2072  buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2073 
2074  b = yy_scan_buffer( buf, n );
2075  if ( ! b )
2076  YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2077 
2078  /* It's okay to grow etc. this buffer, and we should throw it
2079  * away when we're done.
2080  */
2081  b->yy_is_our_buffer = 1;
2082 
2083  return b;
2084 }
2085 
2086 #ifndef YY_EXIT_FAILURE
2087 #define YY_EXIT_FAILURE 2
2088 #endif
2089 
2090 static void yynoreturn yy_fatal_error (const char* msg )
2091 {
2092  fprintf( stderr, "%s\n", msg );
2093  exit( YY_EXIT_FAILURE );
2094 }
2095 
2096 /* Redefine yyless() so it works in section 3 code. */
2097 
2098 #undef yyless
2099 #define yyless(n) \
2100  do \
2101  { \
2102  /* Undo effects of setting up yytext. */ \
2103  int yyless_macro_arg = (n); \
2104  YY_LESS_LINENO(yyless_macro_arg);\
2105  yytext[yyleng] = (yy_hold_char); \
2106  (yy_c_buf_p) = yytext + yyless_macro_arg; \
2107  (yy_hold_char) = *(yy_c_buf_p); \
2108  *(yy_c_buf_p) = '\0'; \
2109  yyleng = yyless_macro_arg; \
2110  } \
2111  while ( 0 )
2112 
2113 /* Accessor methods (get/set functions) to struct members. */
2114 
2115 /** Get the current line number.
2116  *
2117  */
2118 int yyget_lineno (void)
2119 {
2120 
2121  return yylineno;
2122 }
2123 
2124 /** Get the input stream.
2125  *
2126  */
2127 FILE *yyget_in (void)
2128 {
2129  return yyin;
2130 }
2131 
2132 /** Get the output stream.
2133  *
2134  */
2135 FILE *yyget_out (void)
2136 {
2137  return yyout;
2138 }
2139 
2140 /** Get the length of the current token.
2141  *
2142  */
2143 int yyget_leng (void)
2144 {
2145  return yyleng;
2146 }
2147 
2148 /** Get the current token.
2149  *
2150  */
2151 
2152 char *yyget_text (void)
2153 {
2154  return yytext;
2155 }
2156 
2157 /** Set the current line number.
2158  * @param _line_number line number
2159  *
2160  */
2161 void yyset_lineno (int _line_number )
2162 {
2163 
2164  yylineno = _line_number;
2165 }
2166 
2167 /** Set the input stream. This does not discard the current
2168  * input buffer.
2169  * @param _in_str A readable stream.
2170  *
2171  * @see yy_switch_to_buffer
2172  */
2173 void yyset_in (FILE * _in_str )
2174 {
2175  yyin = _in_str ;
2176 }
2177 
2178 void yyset_out (FILE * _out_str )
2179 {
2180  yyout = _out_str ;
2181 }
2182 
2183 int yyget_debug (void)
2184 {
2185  return yy_flex_debug;
2186 }
2187 
2188 void yyset_debug (int _bdebug )
2189 {
2190  yy_flex_debug = _bdebug ;
2191 }
2192 
2193 static int yy_init_globals (void)
2194 {
2195  /* Initialization is the same as for the non-reentrant scanner.
2196  * This function is called from yylex_destroy(), so don't allocate here.
2197  */
2198 
2199  (yy_buffer_stack) = NULL;
2200  (yy_buffer_stack_top) = 0;
2201  (yy_buffer_stack_max) = 0;
2202  (yy_c_buf_p) = NULL;
2203  (yy_init) = 0;
2204  (yy_start) = 0;
2205 
2206 /* Defined in main.c */
2207 #ifdef YY_STDINIT
2208  yyin = stdin;
2209  yyout = stdout;
2210 #else
2211  yyin = NULL;
2212  yyout = NULL;
2213 #endif
2214 
2215  /* For future reference: Set errno on error, since we are called by
2216  * yylex_init()
2217  */
2218  return 0;
2219 }
2220 
2221 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
2222 int yylex_destroy (void)
2223 {
2224 
2225  /* Pop the buffer stack, destroying each element. */
2226  while(YY_CURRENT_BUFFER){
2228  YY_CURRENT_BUFFER_LVALUE = NULL;
2230  }
2231 
2232  /* Destroy the stack itself. */
2233  yyfree((yy_buffer_stack) );
2234  (yy_buffer_stack) = NULL;
2235 
2236  /* Reset the globals. This is important in a non-reentrant scanner so the next time
2237  * yylex() is called, initialization will occur. */
2238  yy_init_globals( );
2239 
2240  return 0;
2241 }
2242 
2243 /*
2244  * Internal utility routines.
2245  */
2246 
2247 #ifndef yytext_ptr
2248 static void yy_flex_strncpy (char* s1, const char * s2, int n )
2249 {
2250 
2251  int i;
2252  for ( i = 0; i < n; ++i )
2253  s1[i] = s2[i];
2254 }
2255 #endif
2256 
2257 #ifdef YY_NEED_STRLEN
2258 static int yy_flex_strlen (const char * s )
2259 {
2260  int n;
2261  for ( n = 0; s[n]; ++n )
2262  ;
2263 
2264  return n;
2265 }
2266 #endif
2267 
2268 void *yyalloc (yy_size_t size )
2269 {
2270  return malloc(size);
2271 }
2272 
2273 void *yyrealloc (void * ptr, yy_size_t size )
2274 {
2275 
2276  /* The cast to (char *) in the following accommodates both
2277  * implementations that use char* generic pointers, and those
2278  * that use void* generic pointers. It works with the latter
2279  * because both ANSI C and C++ allow castless assignment from
2280  * any pointer type to void*, and deal with argument conversions
2281  * as though doing an assignment.
2282  */
2283  return realloc(ptr, size);
2284 }
2285 
2286 void yyfree (void * ptr )
2287 {
2288  free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
2289 }
2290 
2291 #define YYTABLES_NAME "yytables"
2292 
2293 #line 175 "comment2pragma.l"
2294 
2295 
2296 static void directive_start(int type)
2297 {
2298  directive_type = type;
2299 
2300  switch (YY_START)
2301  {
2302  case comment_fixe:
2305  break;
2306  case comment_libre:
2309  break;
2310  default:
2311  yy_fatal_error("erreur syntaxe\n");
2312  }
2313 }
2314 
2315 static void directive_reset(void)
2316 {
2319  directive_syntaxe = -1;
2320  directive_type = -1;
2321 }
2322 
2323 static void append(char **buffer)
2324 {
2325  if (*buffer == NULL)
2326  *buffer = strdup(yytext);
2327  else
2328  {
2329  *buffer = realloc(*buffer, sizeof(*buffer) * (strlen(*buffer) + yyleng));
2330  *buffer = strncat(*buffer, yytext, yyleng);
2331  }
2332 }
2333 
2334 static void clean_buffer(char **buffer)
2335 {
2336  if(*buffer != NULL)
2337  {
2338  free(*buffer);
2339  *buffer = NULL;
2340  }
2341 }
2342 
2343 static void remove_blank(void)
2344 {
2345  char *dest;
2346  char *src;
2347 
2348  dest = directive_txt;
2349  for(src=directive_txt; *src !='\0'; src++)
2350  if (*src != ' ' && *src != '\t')
2351  {
2352  *dest=*src;
2353  dest++;
2354  }
2355  *dest = '\0';
2356 }
2357 
2358 static char *get_directive_type(void)
2359 {
2360  switch (directive_type)
2361  {
2362  case DIRECTIVE_STEP:
2363  return strdup("step");
2364  break;
2365  case DIRECTIVE_OMP:
2366  return strdup("omp");
2367  break;
2368  default:
2369  return NULL;
2370  break;
2371  }
2372 }
2373 
2374 
2375 static void end_comment(void)
2376 {
2378  {
2379  pips_debug(2,"COMMENTAIRE_TXT-> \"%s\"\n", comment_txt);
2381  }
2382  else
2383  {
2384  ifdebug(1)
2385  {
2386  if (comment_txt !=NULL)
2387  pips_debug(1,"%s :%s",(YY_START==other_line)?"OTHER_LINE":"COMMENT", comment_txt);
2388  else
2389  pips_debug(1,"\n");
2390  }
2391  }
2392 }
2393 
2394 static void end_directive(void)
2395 {
2396  string directive_type = get_directive_type();
2397 
2398  // suppression du saut de ligne
2399  comment_txt[strlen(comment_txt)-1]='\0';
2400 
2402  remove_blank();
2403 
2404  pips_debug(2,"DIRECTIVE-> %s \"%s\"\n", directive_type, directive_txt);
2405  pips_debug(2,"\tCOMMENTAIRE_DIR-> \"%s\"\n", comment_txt);
2406 
2408  {
2412 
2413  if (strlen(comment_txt))
2414  {
2416  {
2419  }
2421  }
2422  }
2423  else
2424  {
2425  pips_debug(1, "DIRECTIVE in decls_txt\n");
2426  }
2427 
2429 }
2430 
2431 /*
2432  * For fortran programs
2433  * converting comments into pragmas
2434  *
2435 */
2436 
2438 {
2439  pips_debug(1,"begin\n");
2441  {
2442  string comment = statement_comments(stmt);
2443 
2444  if (!empty_comments_p(comment))
2445  {
2446  pips_assert("statement undefined", statement_undefined_p(current_statement));
2449 
2450  pips_debug(1,"Comment txt : begin scan\n");
2452  yylex();
2453  pips_debug(1,"Comment txt : end scan\n");
2454 
2455  free(comment);
2457  }
2458  else
2459  {
2460  pips_debug(1,"Comment txt : Empty\n");
2461  }
2462  }
2463  else
2464  {
2465  string decls_txt = code_decls_text(entity_code(get_current_module_entity()));
2466  if (!empty_comments_p(decls_txt))
2467  {
2468  pips_debug(1,"Declaration txt : begin scan\n");
2469  yy_scan_string(decls_txt);
2470  yylex();
2471  pips_debug(1,"Declaration txt : end scan\n");
2472  }
2473  else
2474  {
2475  pips_debug(1,"Declaration txt : Empty\n");
2476  }
2477  }
2478  pips_debug(1,"end\n");
2479 }
2480 
void const char const char const int
bdt base
Current expression.
Definition: bdt_read_paf.c:100
struct _newgen_struct_type_ * type
#define yy_load_buffer_state
#define YY_NEW_FILE
Special action meaning "start processing a new file".
#define comment_libre
#define yyset_extra
#define directive_libre_comment
#define yytext
unsigned char flex_uint8_t
#define yyset_lineno
static char yy_hold_char
yy_hold_char holds the character lost when yytext is formed.
static yy_state_type yy_last_accepting_state
#define yyrestart
static void end_comment(void)
#define yyset_debug
static void yynoreturn yy_fatal_error(const char *msg)
#define YY_EXTRA_TYPE
Special case for "unistd.h", since it is non-ANSI.
static void directive_reset(void)
static int yy_start
whether we need to initialize
short int flex_int16_t
#define yy_flex_debug
#define other_line
static int directive_syntaxe
#define yyget_out
static YY_BUFFER_STATE * yy_buffer_stack
Stack as an array.
unsigned int flex_uint32_t
static int yy_get_next_buffer(void)
#define yy_scan_bytes
#define YY_BREAK
Code executed at the end of each rule.
static size_t yy_buffer_stack_max
capacity of stack.
#define yynoreturn
static yy_state_type yy_try_NUL_trans(yy_state_type current_state)
#define yyget_debug
int yy_act
#define yypush_buffer_state
static int yy_more_len
struct yy_buffer_state * YY_BUFFER_STATE
#define yyfree
#define yyout
#define YY_LINENO_REWIND_TO(ptr)
#define YY_BUFFER_NEW
#define yyget_lineno
#define yylex
#define YY_RESTORE_YY_MORE_OFFSET
#define DIRECTIVE_STEP
static int yy_did_buffer_switch_on_eof
start state number
static int directive_type
static int yy_init_globals(void)
#define yywrap
static const flex_int16_t yy_base[110]
#define yyget_text
#define YY_BUFFER_NORMAL
static int yy_more_flag
char * yy_cp
#define yyensure_buffer_stack
static const flex_int16_t yy_chk[214]
#define yy_scan_buffer
#define YY_MORE_ADJ
#define YY_RULE_SETUP
static void clean_buffer(char **buffer)
#define yy_scan_string
#define directive_fixe_continuation
#define YY_AT_BOL()
#define yymore()
#define yytext_ptr
signed char flex_int8_t
C99 systems have <inttypes.h>.
#define yyget_leng
#define EOB_ACT_END_OF_FILE
#define yyalloc
#define yypop_buffer_state
#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 ...
int flex_int32_t
static char * comment_txt
#define YY_START
Translate the current start state into a value that can be later handed to BEGIN to return to the sta...
static const YY_CHAR yy_meta[21]
#define comment_fixe
#define yy_switch_to_buffer
int yy_state_type
#define YY_CURRENT_BUFFER
We provide macros for accessing buffer states in case in the future we want to put the buffer states ...
#define yy_init_buffer
static void directive_start(int type)
static const flex_int16_t yy_def[110]
#define INITIAL
#define yyget_extra
char * yy_bp
#define yyin
static int yy_n_chars
static void append(char **buffer)
#define YY_READ_BUF_SIZE
Macros after this point can all be overridden by user definitions in section 1.
#define YY_INPUT(buf, result, max_size)
Gets input and stuffs it into "buf".
#define ECHO
ia64
#define yy_flush_buffer
#define yyrealloc
#define YY_END_OF_BUFFER
#define YY_STATE_EOF(state)
Action number for EOF rule of a given start state.
#define BEGIN
Enter a start condition.
#define YY_END_OF_BUFFER_CHAR
#define YY_FATAL_ERROR(msg)
Report a fatal error.
static void end_directive(void)
#define yyterminate()
No semi-colon after return; correct usage is to write "yyterminate();" - we don't want an extra ';' a...
static statement current_statement
unsigned short int flex_uint16_t
#define yy_create_buffer
A lexical scanner generated by flex.
#define directive_libre
flex_uint8_t YY_CHAR
#define YY_DO_BEFORE_ACTION
Done after the current pattern has been matched and before the corresponding action - sets up yytext.
static char * directive_txt
#define yy_delete_buffer
#define EOB_ACT_LAST_MATCH
#define yyget_in
size_t yy_size_t
#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...
#define yylineno
static yy_state_type yy_get_previous_state(void)
#define directive_libre_continuation
static const YY_CHAR yy_ec[256]
#define yylex_destroy
Accessor methods to globals.
#define yyset_out
static char * yy_c_buf_p
Points to current character in buffer.
#define EOB_ACT_CONTINUE_SCAN
#define directive_fixe
#define DIRECTIVE_OMP
static size_t yy_buffer_stack_top
!YY_STRUCT_YY_BUFFER_STATE
#define YY_DECL
static const flex_int16_t yy_nxt[214]
#define YY_BUF_SIZE
Size of default input buffer.
#define directive_fixe_comment
#define YY_EXIT_FAILURE
static int yy_init
#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...
static const flex_int16_t yy_accept[95]
#define yyleng
static char * yy_last_accepting_cpos
#define yyset_in
static Value offset
Definition: translation.c:283
static void comment(string_buffer code, spoc_hardware_type hw, dagvtx v, int stage, int side, bool flip)
Definition: freia_spoc.c:52
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 *)
entity get_current_module_entity(void)
Get the entity of the current module.
Definition: static.c:85
list gen_nreverse(list cp)
reverse a list in place
Definition: list.c:304
void append_comments_to_statement(statement, string)
Append a comment string (if non empty) to the comments of a statement, if the c.
Definition: statement.c:1889
bool empty_comments_p(const char *)
Definition: statement.c:107
#define src(name, suf)
HPFC by Fabien Coelho, May 1993 and later...
Definition: compile.c:41
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_assert(what, predicate)
common macros, two flavors depending on NDEBUG
Definition: misc-local.h:172
#define exit(code)
Definition: misc-local.h:54
string concatenate(const char *,...)
Return the concatenation of the given strings.
Definition: string.c:183
#define string_undefined
Definition: newgen_types.h:40
code entity_code(entity e)
Definition: entity.c:1098
void add_pragma_str_to_statement(statement st, const char *s, bool copy_flag)
Add a string as a pragma to a statement.
Definition: pragma.c:425
#define statement_extensions(x)
Definition: ri.h:2464
#define code_decls_text(x)
Definition: ri.h:786
#define statement_comments(x)
Definition: ri.h:2456
#define extensions_extension(x)
Definition: ri.h:1330
#define statement_undefined_p(x)
Definition: ri.h:2420
#define statement_undefined
Definition: ri.h:2419
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
char * strdup()
s1
Definition: set.c:247
#define ifdebug(n)
Definition: sg.c:47
static char buf[BSZ]
Definition: split_file.c:157
#define uint32_t
Definition: stdint.in.h:156
#define int32_t
Definition: stdint.in.h:155
#define uint16_t
Definition: stdint.in.h:149
#define int8_t
Definition: stdint.in.h:141
#define uint8_t
Definition: stdint.in.h:142
#define int16_t
Definition: stdint.in.h:148
void step_comment2pragma_handle(statement stmt)
static string buffer
Definition: string.c:113
Definition: statement.c:54
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