Debian Codegraph @

Preproc/gen/flex-1

raw
1 #line 2 "VPreLex_pretmp.cpp"
2
3 #line 4 "VPreLex_pretmp.cpp"
4
5 #define YY_INT_ALIGNED long int
6
7 /* A lexical scanner generated by flex */
8
9 #define yy_create_buffer VPreLex_create_buffer
10 #define yy_delete_buffer VPreLex_delete_buffer
11 #define yy_scan_buffer VPreLex_scan_buffer
12 #define yy_scan_string VPreLex_scan_string
13 #define yy_scan_bytes VPreLex_scan_bytes
14 #define yy_init_buffer VPreLex_init_buffer
15 #define yy_flush_buffer VPreLex_flush_buffer
16 #define yy_load_buffer_state VPreLex_load_buffer_state
17 #define yy_switch_to_buffer VPreLex_switch_to_buffer
18 #define yypush_buffer_state VPreLexpush_buffer_state
19 #define yypop_buffer_state VPreLexpop_buffer_state
20 #define yyensure_buffer_stack VPreLexensure_buffer_stack
21 #define yy_flex_debug VPreLex_flex_debug
22 #define yyin VPreLexin
23 #define yyleng VPreLexleng
24 #define yylex VPreLexlex
25 #define yylineno VPreLexlineno
26 #define yyout VPreLexout
27 #define yyrestart VPreLexrestart
28 #define yytext VPreLextext
29 #define yywrap VPreLexwrap
30 #define yyalloc VPreLexalloc
31 #define yyrealloc VPreLexrealloc
32 #define yyfree VPreLexfree
33
34 #define FLEX_SCANNER
35 #define YY_FLEX_MAJOR_VERSION 2
36 #define YY_FLEX_MINOR_VERSION 6
37 #define YY_FLEX_SUBMINOR_VERSION 4
38 #if YY_FLEX_SUBMINOR_VERSION > 0
39 #define FLEX_BETA
40 #endif
41
42 #ifdef yy_create_buffer
43 #define VPreLex_create_buffer_ALREADY_DEFINED
44 #else
45 #define yy_create_buffer VPreLex_create_buffer
46 #endif
47
48 #ifdef yy_delete_buffer
49 #define VPreLex_delete_buffer_ALREADY_DEFINED
50 #else
51 #define yy_delete_buffer VPreLex_delete_buffer
52 #endif
53
54 #ifdef yy_scan_buffer
55 #define VPreLex_scan_buffer_ALREADY_DEFINED
56 #else
57 #define yy_scan_buffer VPreLex_scan_buffer
58 #endif
59
60 #ifdef yy_scan_string
61 #define VPreLex_scan_string_ALREADY_DEFINED
62 #else
63 #define yy_scan_string VPreLex_scan_string
64 #endif
65
66 #ifdef yy_scan_bytes
67 #define VPreLex_scan_bytes_ALREADY_DEFINED
68 #else
69 #define yy_scan_bytes VPreLex_scan_bytes
70 #endif
71
72 #ifdef yy_init_buffer
73 #define VPreLex_init_buffer_ALREADY_DEFINED
74 #else
75 #define yy_init_buffer VPreLex_init_buffer
76 #endif
77
78 #ifdef yy_flush_buffer
79 #define VPreLex_flush_buffer_ALREADY_DEFINED
80 #else
81 #define yy_flush_buffer VPreLex_flush_buffer
82 #endif
83
84 #ifdef yy_load_buffer_state
85 #define VPreLex_load_buffer_state_ALREADY_DEFINED
86 #else
87 #define yy_load_buffer_state VPreLex_load_buffer_state
88 #endif
89
90 #ifdef yy_switch_to_buffer
91 #define VPreLex_switch_to_buffer_ALREADY_DEFINED
92 #else
93 #define yy_switch_to_buffer VPreLex_switch_to_buffer
94 #endif
95
96 #ifdef yypush_buffer_state
97 #define VPreLexpush_buffer_state_ALREADY_DEFINED
98 #else
99 #define yypush_buffer_state VPreLexpush_buffer_state
100 #endif
101
102 #ifdef yypop_buffer_state
103 #define VPreLexpop_buffer_state_ALREADY_DEFINED
104 #else
105 #define yypop_buffer_state VPreLexpop_buffer_state
106 #endif
107
108 #ifdef yyensure_buffer_stack
109 #define VPreLexensure_buffer_stack_ALREADY_DEFINED
110 #else
111 #define yyensure_buffer_stack VPreLexensure_buffer_stack
112 #endif
113
114 #ifdef yylex
115 #define VPreLexlex_ALREADY_DEFINED
116 #else
117 #define yylex VPreLexlex
118 #endif
119
120 #ifdef yyrestart
121 #define VPreLexrestart_ALREADY_DEFINED
122 #else
123 #define yyrestart VPreLexrestart
124 #endif
125
126 #ifdef yylex_init
127 #define VPreLexlex_init_ALREADY_DEFINED
128 #else
129 #define yylex_init VPreLexlex_init
130 #endif
131
132 #ifdef yylex_init_extra
133 #define VPreLexlex_init_extra_ALREADY_DEFINED
134 #else
135 #define yylex_init_extra VPreLexlex_init_extra
136 #endif
137
138 #ifdef yylex_destroy
139 #define VPreLexlex_destroy_ALREADY_DEFINED
140 #else
141 #define yylex_destroy VPreLexlex_destroy
142 #endif
143
144 #ifdef yyget_debug
145 #define VPreLexget_debug_ALREADY_DEFINED
146 #else
147 #define yyget_debug VPreLexget_debug
148 #endif
149
150 #ifdef yyset_debug
151 #define VPreLexset_debug_ALREADY_DEFINED
152 #else
153 #define yyset_debug VPreLexset_debug
154 #endif
155
156 #ifdef yyget_extra
157 #define VPreLexget_extra_ALREADY_DEFINED
158 #else
159 #define yyget_extra VPreLexget_extra
160 #endif
161
162 #ifdef yyset_extra
163 #define VPreLexset_extra_ALREADY_DEFINED
164 #else
165 #define yyset_extra VPreLexset_extra
166 #endif
167
168 #ifdef yyget_in
169 #define VPreLexget_in_ALREADY_DEFINED
170 #else
171 #define yyget_in VPreLexget_in
172 #endif
173
174 #ifdef yyset_in
175 #define VPreLexset_in_ALREADY_DEFINED
176 #else
177 #define yyset_in VPreLexset_in
178 #endif
179
180 #ifdef yyget_out
181 #define VPreLexget_out_ALREADY_DEFINED
182 #else
183 #define yyget_out VPreLexget_out
184 #endif
185
186 #ifdef yyset_out
187 #define VPreLexset_out_ALREADY_DEFINED
188 #else
189 #define yyset_out VPreLexset_out
190 #endif
191
192 #ifdef yyget_leng
193 #define VPreLexget_leng_ALREADY_DEFINED
194 #else
195 #define yyget_leng VPreLexget_leng
196 #endif
197
198 #ifdef yyget_text
199 #define VPreLexget_text_ALREADY_DEFINED
200 #else
201 #define yyget_text VPreLexget_text
202 #endif
203
204 #ifdef yyget_lineno
205 #define VPreLexget_lineno_ALREADY_DEFINED
206 #else
207 #define yyget_lineno VPreLexget_lineno
208 #endif
209
210 #ifdef yyset_lineno
211 #define VPreLexset_lineno_ALREADY_DEFINED
212 #else
213 #define yyset_lineno VPreLexset_lineno
214 #endif
215
216 #ifdef yywrap
217 #define VPreLexwrap_ALREADY_DEFINED
218 #else
219 #define yywrap VPreLexwrap
220 #endif
221
222 #ifdef yyalloc
223 #define VPreLexalloc_ALREADY_DEFINED
224 #else
225 #define yyalloc VPreLexalloc
226 #endif
227
228 #ifdef yyrealloc
229 #define VPreLexrealloc_ALREADY_DEFINED
230 #else
231 #define yyrealloc VPreLexrealloc
232 #endif
233
234 #ifdef yyfree
235 #define VPreLexfree_ALREADY_DEFINED
236 #else
237 #define yyfree VPreLexfree
238 #endif
239
240 #ifdef yytext
241 #define VPreLextext_ALREADY_DEFINED
242 #else
243 #define yytext VPreLextext
244 #endif
245
246 #ifdef yyleng
247 #define VPreLexleng_ALREADY_DEFINED
248 #else
249 #define yyleng VPreLexleng
250 #endif
251
252 #ifdef yyin
253 #define VPreLexin_ALREADY_DEFINED
254 #else
255 #define yyin VPreLexin
256 #endif
257
258 #ifdef yyout
259 #define VPreLexout_ALREADY_DEFINED
260 #else
261 #define yyout VPreLexout
262 #endif
263
264 #ifdef yy_flex_debug
265 #define VPreLex_flex_debug_ALREADY_DEFINED
266 #else
267 #define yy_flex_debug VPreLex_flex_debug
268 #endif
269
270 #ifdef yylineno
271 #define VPreLexlineno_ALREADY_DEFINED
272 #else
273 #define yylineno VPreLexlineno
274 #endif
275
276 /* First, we deal with platform-specific or compiler-specific issues. */
277
278 /* begin standard C headers. */
279 #include <stdio.h>
280 #include <string.h>
281 #include <errno.h>
282 #include <stdlib.h>
283
284 /* end standard C headers. */
285
286 /* flex integer type definitions */
287
288 #ifndef FLEXINT_H
289 #define FLEXINT_H
290
291 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
292
293 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
294
295 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
296 * if you want the limit (max/min) macros for int types.
297 */
298 #ifndef __STDC_LIMIT_MACROS
299 #define __STDC_LIMIT_MACROS 1
300 #endif
301
302 #include <inttypes.h>
303 typedef int8_t flex_int8_t;
304 typedef uint8_t flex_uint8_t;
305 typedef int16_t flex_int16_t;
306 typedef uint16_t flex_uint16_t;
307 typedef int32_t flex_int32_t;
308 typedef uint32_t flex_uint32_t;
309 #else
310 typedef signed char flex_int8_t;
311 typedef short int flex_int16_t;
312 typedef int flex_int32_t;
313 typedef unsigned char flex_uint8_t;
314 typedef unsigned short int flex_uint16_t;
315 typedef unsigned int flex_uint32_t;
316
317 /* Limits of integral types. */
318 #ifndef INT8_MIN
319 #define INT8_MIN (-128)
320 #endif
321 #ifndef INT16_MIN
322 #define INT16_MIN (-32767-1)
323 #endif
324 #ifndef INT32_MIN
325 #define INT32_MIN (-2147483647-1)
326 #endif
327 #ifndef INT8_MAX
328 #define INT8_MAX (127)
329 #endif
330 #ifndef INT16_MAX
331 #define INT16_MAX (32767)
332 #endif
333 #ifndef INT32_MAX
334 #define INT32_MAX (2147483647)
335 #endif
336 #ifndef UINT8_MAX
337 #define UINT8_MAX (255U)
338 #endif
339 #ifndef UINT16_MAX
340 #define UINT16_MAX (65535U)
341 #endif
342 #ifndef UINT32_MAX
343 #define UINT32_MAX (4294967295U)
344 #endif
345
346 #ifndef SIZE_MAX
347 #define SIZE_MAX (~(size_t)0)
348 #endif
349
350 #endif /* ! C99 */
351
352 #endif /* ! FLEXINT_H */
353
354 /* begin standard C++ headers. */
355
356 /* TODO: this is always defined, so inline it */
357 #define yyconst const
358
359 #if defined(__GNUC__) && __GNUC__ >= 3
360 #define yynoreturn __attribute__((__noreturn__))
361 #else
362 #define yynoreturn
363 #endif
364
365 /* Returned upon end-of-file. */
366 #define YY_NULL 0
367
368 /* Promotes a possibly negative, possibly signed char to an
369 * integer in range [0..255] for use as an array index.
370 */
371 #define YY_SC_TO_UI(c) ((YY_CHAR) (c))
372
373 /* Enter a start condition. This macro really ought to take a parameter,
374 * but we do it the disgusting crufty way forced on us by the ()-less
375 * definition of BEGIN.
376 */
377 #define BEGIN (yy_start) = 1 + 2 *
378 /* Translate the current start state into a value that can be later handed
379 * to BEGIN to return to the state. The YYSTATE alias is for lex
380 * compatibility.
381 */
382 #define YY_START (((yy_start) - 1) / 2)
383 #define YYSTATE YY_START
384 /* Action number for EOF rule of a given start state. */
385 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
386 /* Special action meaning "start processing a new file". */
387 #define YY_NEW_FILE yyrestart( yyin )
388 #define YY_END_OF_BUFFER_CHAR 0
389
390 /* Size of default input buffer. */
391 #ifndef YY_BUF_SIZE
392 #ifdef __ia64__
393 /* On IA-64, the buffer size is 16k, not 8k.
394 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
395 * Ditto for the __ia64__ case accordingly.
396 */
397 #define YY_BUF_SIZE 32768
398 #else
399 #define YY_BUF_SIZE 16384
400 #endif /* __ia64__ */
401 #endif
402
403 /* The state buf must be large enough to hold one state per character in the main buffer.
404 */
405 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
406
407 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
408 #define YY_TYPEDEF_YY_BUFFER_STATE
409 typedef struct yy_buffer_state *YY_BUFFER_STATE;
410 #endif
411
412 #ifndef YY_TYPEDEF_YY_SIZE_T
413 #define YY_TYPEDEF_YY_SIZE_T
414 typedef size_t yy_size_t;
415 #endif
416
417 extern int yyleng;
418
419 extern FILE *yyin, *yyout;
420
421 #define EOB_ACT_CONTINUE_SCAN 0
422 #define EOB_ACT_END_OF_FILE 1
423 #define EOB_ACT_LAST_MATCH 2
424
425 #define YY_LESS_LINENO(n)
426 #define YY_LINENO_REWIND_TO(ptr)
427
428 /* Return all but the first "n" matched characters back to the input stream. */
429 #define yyless(n) \
430 do \
431 { \
432 /* Undo effects of setting up yytext. */ \
433 int yyless_macro_arg = (n); \
434 YY_LESS_LINENO(yyless_macro_arg);\
435 *yy_cp = (yy_hold_char); \
436 YY_RESTORE_YY_MORE_OFFSET \
437 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
438 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
439 } \
440 while ( 0 )
441 #define unput(c) yyunput( c, (yytext_ptr) )
442
443 #ifndef YY_STRUCT_YY_BUFFER_STATE
444 #define YY_STRUCT_YY_BUFFER_STATE
445 struct yy_buffer_state
446 {
447 FILE *yy_input_file;
448
449 char *yy_ch_buf; /* input buffer */
450 char *yy_buf_pos; /* current position in input buffer */
451
452 /* Size of input buffer in bytes, not including room for EOB
453 * characters.
454 */
455 int yy_buf_size;
456
457 /* Number of characters read into yy_ch_buf, not including EOB
458 * characters.
459 */
460 int yy_n_chars;
461
462 /* Whether we "own" the buffer - i.e., we know we created it,
463 * and can realloc() it to grow it, and should free() it to
464 * delete it.
465 */
466 int yy_is_our_buffer;
467
468 /* Whether this is an "interactive" input source; if so, and
469 * if we're using stdio for input, then we want to use getc()
470 * instead of fread(), to make sure we stop fetching input after
471 * each newline.
472 */
473 int yy_is_interactive;
474
475 /* Whether we're considered to be at the beginning of a line.
476 * If so, '^' rules will be active on the next match, otherwise
477 * not.
478 */
479 int yy_at_bol;
480
481 int yy_bs_lineno; /**< The line count. */
482 int yy_bs_column; /**< The column count. */
483
484 /* Whether to try to fill the input buffer when we reach the
485 * end of it.
486 */
487 int yy_fill_buffer;
488
489 int yy_buffer_status;
490
491 #define YY_BUFFER_NEW 0
492 #define YY_BUFFER_NORMAL 1
493 /* When an EOF's been seen but there's still some text to process
494 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
495 * shouldn't try reading from the input source any more. We might
496 * still have a bunch of tokens to match, though, because of
497 * possible backing-up.
498 *
499 * When we actually see the EOF, we change the status to "new"
500 * (via yyrestart()), so that the user can continue scanning by
501 * just pointing yyin at a new input file.
502 */
503 #define YY_BUFFER_EOF_PENDING 2
504
505 };
506 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
507
508 /* Stack of input buffers. */
509 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
510 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
511 static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
512
513 /* We provide macros for accessing buffer states in case in the
514 * future we want to put the buffer states in a more general
515 * "scanner state".
516 *
517 * Returns the top of the stack, or NULL.
518 */
519 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
520 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
521 : NULL)
522 /* Same as previous macro, but useful when we know that the buffer stack is not
523 * NULL or when we need an lvalue. For internal use only.
524 */
525 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
526
527 /* yy_hold_char holds the character lost when yytext is formed. */
528 static char yy_hold_char;
529 static int yy_n_chars; /* number of characters read into yy_ch_buf */
530 int yyleng;
531
532 /* Points to current character in buffer. */
533 static char *yy_c_buf_p = NULL;
534 static int yy_init = 0; /* whether we need to initialize */
535 static int yy_start = 0; /* start state number */
536
537 /* Flag which is used to allow yywrap()'s to do buffer switches
538 * instead of setting up a fresh yyin. A bit of a hack ...
539 */
540 static int yy_did_buffer_switch_on_eof;
541
542 void yyrestart ( FILE *input_file );
543 void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer );
544 YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size );
545 void yy_delete_buffer ( YY_BUFFER_STATE b );
546 void yy_flush_buffer ( YY_BUFFER_STATE b );
547 void yypush_buffer_state ( YY_BUFFER_STATE new_buffer );
548 void yypop_buffer_state ( void );
549
550 static void yyensure_buffer_stack ( void );
551 static void yy_load_buffer_state ( void );
552 static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file );
553 #define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
554
555 YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size );
556 YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
557 YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );
558
559 void *yyalloc ( yy_size_t );
560 void *yyrealloc ( void *, yy_size_t );
561 void yyfree ( void * );
562
563 #define yy_new_buffer yy_create_buffer
564 #define yy_set_interactive(is_interactive) \
565 { \
566 if ( ! YY_CURRENT_BUFFER ){ \
567 yyensure_buffer_stack (); \
568 YY_CURRENT_BUFFER_LVALUE = \
569 yy_create_buffer( yyin, YY_BUF_SIZE ); \
570 } \
571 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
572 }
573 #define yy_set_bol(at_bol) \
574 { \
575 if ( ! YY_CURRENT_BUFFER ){\
576 yyensure_buffer_stack (); \
577 YY_CURRENT_BUFFER_LVALUE = \
578 yy_create_buffer( yyin, YY_BUF_SIZE ); \
579 } \
580 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
581 }
582 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
583
584 /* Begin user sect3 */
585
586 #define VPreLexwrap() (/*CONSTCOND*/1)
587 #define YY_SKIP_YYWRAP
588 typedef flex_uint8_t YY_CHAR;
589
590 FILE *yyin = NULL, *yyout = NULL;
591
592 typedef int yy_state_type;
593
594 extern int yylineno;
595 int yylineno = 1;
596
597 extern char *yytext;
598 #ifdef yytext_ptr
599 #undef yytext_ptr
600 #endif
601 #define yytext_ptr yytext
602
603 static yy_state_type yy_get_previous_state ( void );
604 static yy_state_type yy_try_NUL_trans ( yy_state_type current_state );
605 static int yy_get_next_buffer ( void );
606 static void yynoreturn yy_fatal_error ( const char* msg );
607
608 /* Done after the current pattern has been matched and before the
609 * corresponding action - sets up yytext.
610 */
611 #define YY_DO_BEFORE_ACTION \
612 (yytext_ptr) = yy_bp; \
613 (yytext_ptr) -= (yy_more_len); \
614 yyleng = (int) (yy_cp - (yytext_ptr)); \
615 (yy_hold_char) = *yy_cp; \
616 *yy_cp = '\0'; \
617 (yy_c_buf_p) = yy_cp;
618 #define YY_NUM_RULES 121
619 #define YY_END_OF_BUFFER 122
620 /* This struct is not used in this scanner,
621 but its presence is necessary. */
622 struct yy_trans_info
623 {
624 flex_int32_t yy_verify;
625 flex_int32_t yy_nxt;
626 };
627 static const flex_int32_t yy_accept[692] =
628 { 0,
629 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
630 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
631 0, 0, 0, 0, 122, 119, 117, 112, 116, 118,
632 15, 119, 113, 119, 119, 1, 117, 116, 119, 108,
633 106, 108, 108, 107, 18, 16, 18, 21, 17, 120,
634 50, 49, 50, 48, 63, 56, 65, 55, 58, 51,
635 52, 65, 65, 61, 65, 62, 63, 73, 70, 75,
636 69, 72, 75, 75, 75, 80, 78, 80, 80, 79,
637 80, 35, 32, 31, 34, 33, 24, 26, 35, 35,
638 32, 34, 35, 96, 84, 97, 83, 85, 90, 91,
639
640 97, 92, 97, 88, 89, 97, 45, 44, 45, 47,
641 120, 40, 39, 40, 40, 40, 102, 100, 102, 102,
642 101, 117, 112, 0, 104, 103, 113, 0, 113, 22,
643 109, 0, 109, 111, 109, 109, 109, 109, 109, 117,
644 0, 0, 0, 109, 106, 0, 105, 107, 16, 0,
645 17, 20, 19, 20, 49, 0, 63, 56, 0, 53,
646 54, 64, 57, 0, 60, 0, 73, 70, 0, 66,
647 68, 74, 71, 0, 78, 0, 76, 79, 77, 0,
648 32, 31, 0, 26, 0, 26, 25, 28, 0, 28,
649 30, 32, 0, 28, 96, 84, 0, 81, 82, 87,
650
651 93, 0, 95, 44, 0, 46, 39, 0, 0, 0,
652 0, 100, 0, 0, 0, 101, 0, 0, 0, 0,
653 103, 103, 0, 103, 103, 103, 103, 114, 113, 109,
654 0, 109, 109, 109, 109, 109, 109, 109, 109, 109,
655 109, 0, 109, 0, 54, 0, 68, 68, 27, 28,
656 0, 28, 0, 28, 28, 82, 93, 0, 93, 0,
657 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
658 0, 0, 0, 0, 0, 0, 0, 0, 0, 103,
659 103, 103, 103, 113, 110, 109, 109, 109, 109, 109,
660 109, 109, 109, 109, 109, 109, 109, 0, 109, 59,
661
662 67, 0, 29, 23, 28, 28, 28, 94, 86, 0,
663 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
664 0, 0, 0, 0, 0, 103, 103, 103, 103, 109,
665 109, 109, 4, 109, 109, 109, 109, 109, 109, 109,
666 109, 109, 0, 109, 28, 28, 28, 0, 0, 0,
667 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
668 0, 0, 0, 0, 103, 103, 103, 103, 103, 109,
669 109, 109, 5, 6, 12, 7, 109, 109, 109, 109,
670 10, 0, 0, 28, 28, 0, 0, 0, 0, 0,
671 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
672
673 0, 0, 0, 0, 0, 103, 103, 103, 103, 103,
674 109, 109, 3, 8, 109, 109, 109, 109, 0, 0,
675 2, 0, 28, 28, 0, 0, 0, 0, 0, 0,
676 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
677 0, 0, 0, 103, 0, 103, 103, 103, 109, 109,
678 9, 0, 109, 109, 0, 28, 28, 0, 0, 0,
679 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
680 0, 0, 103, 0, 103, 103, 103, 0, 13, 14,
681 0, 109, 109, 13, 14, 0, 0, 0, 0, 0,
682 0, 0, 0, 0, 0, 0, 0, 0, 103, 0,
683
684 103, 103, 0, 0, 36, 109, 0, 0, 0, 0,
685 0, 0, 0, 0, 0, 103, 0, 103, 0, 0,
686 109, 0, 0, 0, 0, 0, 0, 103, 0, 103,
687 0, 0, 11, 0, 0, 0, 0, 0, 0, 103,
688 0, 103, 0, 0, 0, 41, 0, 0, 0, 0,
689 103, 0, 103, 0, 0, 0, 0, 0, 0, 0,
690 103, 0, 103, 0, 0, 0, 0, 0, 0, 0,
691 103, 0, 103, 0, 0, 0, 0, 0, 0, 0,
692 103, 0, 103, 0, 0, 0, 0, 0, 0, 0,
693 103, 0, 103, 0, 0, 0, 0, 0, 0, 0,
694
695 103, 0, 103, 0, 0, 0, 0, 0, 0, 0,
696 103, 0, 103, 0, 0, 0, 0, 0, 99, 0,
697 98, 98, 103, 0, 0, 0, 0, 0, 0, 99,
698 99, 99, 0, 0, 98, 98, 98, 98, 98, 103,
699 0, 0, 0, 0, 99, 98, 103, 0, 0, 0,
700 0, 103, 0, 0, 0, 0, 103, 0, 0, 0,
701 0, 103, 0, 0, 0, 0, 103, 0, 0, 0,
702 0, 103, 0, 0, 0, 0, 103, 0, 0, 0,
703 42, 103, 0, 0, 43, 103, 0, 37, 38, 38,
704 0
705
706 } ;
707
708 static const YY_CHAR yy_ec[256] =
709 { 0,
710 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
711 1, 2, 4, 1, 1, 1, 1, 1, 1, 1,
712 1, 1, 1, 1, 1, 5, 1, 1, 1, 1,
713 1, 2, 1, 6, 1, 7, 1, 1, 1, 8,
714 9, 10, 1, 11, 1, 1, 12, 13, 13, 13,
715 13, 13, 13, 13, 13, 13, 13, 1, 1, 1,
716 1, 14, 1, 1, 15, 16, 17, 17, 18, 19,
717 20, 21, 22, 17, 17, 23, 24, 25, 26, 27,
718 17, 28, 29, 30, 17, 17, 17, 17, 31, 17,
719 32, 33, 34, 1, 35, 36, 37, 38, 39, 40,
720
721 41, 42, 43, 21, 44, 17, 17, 45, 46, 47,
722 48, 49, 17, 50, 51, 52, 53, 17, 17, 17,
723 31, 17, 32, 1, 34, 1, 1, 1, 1, 1,
724 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
725 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
726 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
727 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
728 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
729 1, 1, 1, 1, 1, 1, 54, 1, 1, 1,
730 54, 1, 1, 1, 1, 1, 1, 1, 1, 1,
731
732 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
733 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
734 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
735 1, 1, 1, 1, 1, 1, 1, 1, 54, 1,
736 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
737 1, 1, 1, 1, 1
738 } ;
739
740 static const YY_CHAR yy_meta[55] =
741 { 0,
742 1, 2, 3, 4, 1, 5, 6, 7, 7, 8,
743 9, 8, 10, 1, 11, 11, 11, 11, 11, 11,
744 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
745 11, 7, 5, 7, 11, 12, 11, 11, 11, 11,
746 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
747 11, 11, 11, 1
748 } ;
749
750 static const flex_int32_t yy_base[736] =
751 { 0,
752 0, 54, 108, 162, 216, 270, 12, 14, 322, 356,
753 36, 67, 392, 446, 500, 554, 606, 640, 71, 88,
754 40, 91, 676, 730, 1773, 1774, 1770, 1774, 20, 1774,
755 1774, 9, 1735, 0, 779, 1774, 45, 94, 827, 1774,
756 1774, 22, 1758, 0, 1774, 1774, 24, 1774, 0, 26,
757 1774, 1774, 34, 1774, 0, 1774, 47, 0, 1774, 1774,
758 1774, 1774, 68, 1774, 79, 1774, 93, 0, 1774, 102,
759 0, 1774, 1774, 113, 125, 1774, 1774, 128, 1757, 0,
760 130, 1774, 1766, 1774, 132, 1774, 1774, 1731, 0, 118,
761 141, 144, 146, 0, 1774, 134, 0, 1774, 1774, 1774,
762
763 1774, 1774, 145, 1774, 1774, 150, 1774, 1774, 146, 1774,
764 0, 1774, 1774, 155, 1754, 4, 1774, 1774, 157, 175,
765 0, 1763, 1774, 185, 284, 570, 1728, 1727, 1726, 1774,
766 1725, 0, 157, 1774, 48, 154, 161, 57, 164, 203,
767 208, 1715, 211, 193, 1774, 228, 1774, 0, 1774, 230,
768 0, 1774, 1774, 232, 1774, 237, 0, 1774, 239, 1774,
769 0, 1774, 1774, 242, 1774, 1723, 0, 1774, 250, 1774,
770 1725, 1774, 1774, 252, 1774, 254, 1774, 0, 1774, 256,
771 1755, 1774, 258, 1720, 1719, 1718, 1774, 1717, 1716, 228,
772 1774, 264, 287, 249, 0, 1774, 291, 1774, 0, 1774,
773
774 1715, 1714, 1774, 1774, 293, 1774, 1774, 304, 263, 1702,
775 1698, 1774, 306, 576, 741, 0, 744, 160, 255, 1716,
776 1742, 745, 750, 294, 288, 171, 313, 1774, 1709, 1708,
777 1707, 1706, 334, 278, 286, 279, 251, 303, 306, 335,
778 308, 1697, 300, 348, 0, 1734, 1706, 372, 1774, 1702,
779 1701, 1700, 1729, 350, 331, 0, 1698, 1697, 1696, 1725,
780 378, 1680, 1689, 1691, 798, 361, 359, 1696, 802, 367,
781 380, 1695, 394, 396, 387, 390, 387, 1694, 388, 425,
782 427, 414, 455, 1688, 1774, 399, 440, 429, 430, 431,
783 433, 338, 341, 432, 447, 436, 381, 1676, 404, 1774,
784
785 1774, 416, 1774, 1774, 462, 463, 450, 1774, 1774, 1685,
786 1672, 1677, 477, 479, 470, 480, 482, 495, 499, 502,
787 498, 509, 511, 502, 514, 531, 580, 572, 627, 215,
788 505, 534, 1683, 495, 502, 533, 535, 553, 293, 546,
789 560, 537, 1677, 624, 516, 568, 628, 1674, 1666, 1669,
790 611, 586, 611, 612, 615, 641, 623, 645, 665, 1693,
791 672, 675, 671, 678, 698, 751, 702, 519, 765, 618,
792 681, 621, 1677, 1676, 1666, 1654, 669, 625, 407, 664,
793 660, 485, 722, 740, 762, 1632, 1607, 1617, 731, 762,
794 761, 1632, 786, 794, 794, 1627, 664, 807, 795, 785,
795
796 800, 810, 809, 1626, 813, 711, 846, 837, 851, 850,
797 838, 842, 1610, 1600, 686, 755, 812, 834, 881, 887,
798 1774, 891, 861, 863, 1598, 1572, 1621, 803, 842, 853,
799 868, 898, 886, 874, 887, 904, 1591, 878, 908, 896,
800 884, 896, 901, 913, 916, 591, 915, 920, 891, 895,
801 1581, 718, 900, 904, 944, 914, 916, 951, 1575, 930,
802 955, 1584, 910, 956, 1574, 913, 926, 933, 945, 1573,
803 940, 968, 959, 943, 969, 970, 973, 986, 1557, 1556,
804 1532, 942, 944, 1545, 1544, 992, 1536, 1524, 955, 966,
805 975, 971, 972, 980, 989, 977, 981, 989, 1014, 997,
806
807 1011, 703, 1523, 1514, 1512, 991, 1493, 1490, 1493, 1015,
808 1002, 1022, 1010, 1017, 1014, 1041, 1021, 996, 1492, 1487,
809 1011, 1487, 1493, 1481, 1023, 1024, 1021, 1050, 1026, 1053,
810 1479, 1489, 1493, 1472, 1483, 1481, 1029, 1031, 1040, 1063,
811 1046, 1069, 1480, 1481, 1470, 1774, 1471, 1051, 1052, 1061,
812 1074, 1066, 345, 1470, 1452, 1464, 1450, 1069, 1072, 1060,
813 1088, 1063, 1079, 1430, 1477, 1426, 1475, 1064, 1065, 1081,
814 1096, 1084, 1117, 1122, 807, 1125, 137, 1089, 1095, 1423,
815 1100, 1422, 1130, 1137, 1414, 1140, 1407, 1418, 1397, 1097,
816 1124, 1107, 1116, 1390, 1387, 1382, 1388, 1112, 1117, 1127,
817
818 1143, 1129, 1145, 1375, 1373, 1376, 1376, 1126, 1127, 1134,
819 1159, 1135, 1152, 1366, 1362, 1227, 1212, 1157, 1162, 1180,
820 1185, 1189, 1166, 1213, 1224, 1209, 1207, 1190, 1244, 1251,
821 1193, 1200, 1201, 1240, 1247, 1204, 1205, 1246, 1208, 1179,
822 1214, 1199, 1197, 1198, 1774, 1774, 1175, 1196, 1194, 1195,
823 1190, 871, 1191, 1192, 1187, 1197, 1182, 1189, 1184, 1192,
824 1193, 1176, 1179, 1188, 1188, 1174, 1194, 1184, 1184, 1170,
825 1180, 1195, 1181, 1167, 1176, 1118, 1211, 961, 801, 383,
826 1774, 1212, 228, 169, 1774, 1214, 61, 1774, 27, 1774,
827 1774, 1263, 1275, 1287, 1299, 1311, 1323, 1335, 1347, 1359,
828
829 1371, 1383, 1395, 1402, 1414, 1422, 1425, 1427, 1438, 1450,
830 1462, 1474, 1486, 1489, 1495, 1507, 1514, 1526, 1533, 1545,
831 1548, 1559, 1566, 1578, 1589, 1601, 1608, 1620, 1632, 1639,
832 1651, 1663, 1675, 1687, 1699
833 } ;
834
835 static const flex_int32_t yy_def[736] =
836 { 0,
837 692, 692, 693, 693, 694, 694, 695, 695, 696, 696,
838 697, 697, 698, 698, 699, 699, 700, 700, 701, 701,
839 702, 702, 703, 703, 691, 691, 691, 691, 691, 691,
840 691, 691, 704, 705, 706, 691, 691, 691, 706, 691,
841 691, 691, 691, 707, 691, 691, 691, 691, 708, 709,
842 691, 691, 691, 691, 710, 691, 691, 710, 691, 691,
843 691, 691, 691, 691, 711, 691, 710, 712, 691, 691,
844 712, 691, 691, 691, 713, 691, 691, 691, 691, 714,
845 691, 691, 691, 691, 691, 691, 691, 715, 716, 717,
846 691, 691, 717, 718, 691, 691, 718, 691, 691, 691,
847
848 691, 691, 691, 691, 691, 719, 691, 691, 691, 691,
849 720, 691, 691, 691, 691, 691, 691, 691, 691, 691,
850 721, 691, 691, 691, 691, 722, 704, 691, 705, 691,
851 723, 724, 723, 691, 723, 723, 723, 723, 723, 691,
852 691, 691, 691, 723, 691, 691, 691, 707, 691, 691,
853 708, 691, 691, 691, 691, 691, 710, 691, 691, 691,
854 725, 691, 691, 691, 691, 691, 712, 691, 691, 691,
855 726, 691, 691, 691, 691, 691, 691, 714, 691, 691,
856 691, 691, 691, 715, 691, 716, 691, 727, 728, 727,
857 691, 691, 691, 727, 718, 691, 691, 691, 729, 691,
858
859 730, 731, 691, 691, 691, 691, 691, 691, 691, 691,
860 691, 691, 691, 691, 691, 721, 691, 691, 691, 691,
861 722, 722, 691, 722, 722, 722, 722, 691, 705, 723,
862 691, 724, 723, 723, 723, 723, 723, 723, 723, 723,
863 723, 691, 723, 691, 725, 691, 726, 726, 691, 727,
864 691, 728, 691, 727, 727, 729, 730, 691, 731, 691,
865 691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
866 691, 691, 691, 691, 691, 691, 691, 691, 691, 722,
867 722, 722, 722, 705, 691, 723, 723, 723, 723, 723,
868 723, 723, 723, 723, 723, 723, 723, 691, 723, 691,
869
870 691, 691, 691, 691, 727, 727, 727, 691, 691, 691,
871 691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
872 691, 691, 691, 691, 691, 722, 722, 722, 722, 723,
873 723, 723, 723, 723, 723, 723, 723, 723, 723, 723,
874 723, 723, 691, 723, 727, 727, 727, 691, 691, 691,
875 691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
876 691, 691, 691, 691, 722, 722, 722, 722, 722, 723,
877 723, 723, 723, 723, 723, 723, 723, 723, 723, 723,
878 723, 691, 732, 727, 727, 691, 691, 691, 691, 691,
879 691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
880
881 691, 691, 691, 691, 691, 722, 722, 722, 722, 722,
882 723, 723, 723, 723, 723, 723, 723, 723, 732, 732,
883 691, 732, 727, 727, 691, 691, 691, 691, 691, 691,
884 691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
885 691, 691, 691, 722, 691, 722, 722, 722, 723, 723,
886 723, 691, 723, 723, 732, 727, 727, 691, 691, 691,
887 691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
888 691, 691, 722, 691, 722, 722, 722, 691, 723, 723,
889 691, 723, 723, 727, 727, 691, 691, 691, 691, 691,
890 691, 691, 691, 691, 691, 691, 691, 691, 722, 691,
891
892 722, 722, 691, 691, 723, 723, 691, 691, 691, 691,
893 691, 691, 691, 691, 691, 722, 691, 722, 691, 691,
894 723, 691, 691, 691, 691, 691, 691, 722, 691, 722,
895 691, 691, 723, 691, 691, 691, 691, 691, 691, 722,
896 691, 722, 691, 691, 691, 691, 691, 691, 691, 691,
897 722, 691, 722, 691, 691, 691, 691, 691, 691, 691,
898 722, 691, 722, 691, 691, 691, 691, 691, 691, 691,
899 722, 691, 722, 691, 691, 691, 691, 691, 691, 691,
900 722, 691, 722, 691, 691, 691, 691, 691, 691, 691,
901 722, 691, 722, 691, 691, 691, 691, 691, 691, 691,
902
903 722, 691, 722, 691, 691, 691, 691, 691, 691, 691,
904 722, 691, 722, 691, 691, 691, 691, 691, 733, 691,
905 734, 735, 722, 691, 691, 691, 691, 691, 691, 733,
906 733, 733, 691, 691, 734, 734, 735, 735, 735, 722,
907 691, 691, 691, 691, 691, 691, 722, 691, 691, 691,
908 691, 722, 691, 691, 691, 691, 722, 691, 691, 691,
909 691, 722, 691, 691, 691, 691, 722, 691, 691, 691,
910 691, 722, 691, 691, 691, 691, 722, 691, 691, 691,
911 691, 722, 691, 691, 691, 722, 691, 691, 722, 691,
912 0, 691, 691, 691, 691, 691, 691, 691, 691, 691,
913
914 691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
915 691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
916 691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
917 691, 691, 691, 691, 691
918 } ;
919
920 static const flex_int32_t yy_nxt[1829] =
921 { 0,
922 26, 27, 28, 29, 30, 31, 26, 26, 26, 26,
923 26, 32, 26, 26, 52, 53, 52, 53, 125, 54,
924 126, 54, 123, 124, 145, 146, 149, 150, 153, 154,
925 691, 26, 34, 26, 691, 35, 155, 156, 69, 70,
926 71, 72, 113, 114, 210, 73, 140, 74, 141, 158,
927 159, 115, 211, 36, 26, 37, 28, 38, 30, 31,
928 26, 26, 26, 26, 26, 32, 26, 26, 75, 69,
929 70, 71, 72, 108, 109, 116, 73, 160, 74, 161,
930 142, 163, 164, 231, 110, 26, 34, 26, 234, 39,
931 108, 109, 231, 113, 114, 141, 123, 143, 165, 75,
932
933 690, 110, 115, 111, 168, 169, 240, 36, 40, 40,
934 41, 42, 40, 40, 40, 40, 40, 43, 40, 40,
935 111, 40, 170, 187, 171, 166, 116, 173, 174, 142,
936 175, 176, 179, 180, 182, 183, 196, 197, 577, 40,
937 40, 40, 192, 40, 141, 141, 182, 193, 204, 205,
938 189, 187, 190, 191, 198, 200, 199, 207, 208, 212,
939 213, 40, 40, 40, 41, 42, 40, 40, 40, 40,
940 40, 43, 40, 40, 691, 40, 142, 587, 189, 142,
941 190, 191, 202, 273, 214, 203, 215, 123, 124, 231,
942 194, 233, 231, 40, 40, 40, 231, 40, 235, 231,
943
944 236, 282, 238, 237, 140, 273, 141, 239, 688, 141,
945 241, 141, 141, 123, 143, 40, 45, 45, 46, 47,
946 45, 48, 45, 45, 45, 45, 45, 45, 231, 45,
947 145, 146, 149, 150, 153, 244, 243, 370, 142, 155,
948 156, 158, 159, 142, 163, 164, 142, 45, 50, 45,
949 231, 45, 168, 169, 173, 174, 175, 176, 179, 180,
950 182, 183, 254, 251, 261, 192, 261, 141, 687, 45,
951 45, 45, 46, 47, 45, 48, 45, 45, 45, 45,
952 45, 45, 274, 45, 251, 217, 231, 217, 141, 182,
953 193, 691, 255, 196, 197, 204, 205, 691, 218, 142,
954
955 291, 45, 50, 45, 274, 45, 207, 208, 212, 213,
956 219, 262, 220, 231, 231, 281, 691, 280, 290, 288,
957 218, 231, 142, 45, 56, 57, 58, 59, 231, 60,
958 61, 62, 219, 63, 220, 231, 289, 281, 231, 280,
959 281, 231, 292, 231, 294, 378, 299, 297, 691, 293,
960 153, 244, 286, 64, 65, 66, 287, 67, 56, 57,
961 58, 59, 283, 60, 61, 62, 251, 63, 305, 231,
962 231, 295, 306, 231, 301, 302, 231, 307, 337, 261,
963 338, 261, 296, 563, 313, 251, 314, 64, 65, 66,
964 316, 67, 76, 76, 77, 78, 76, 76, 76, 76,
965
966 76, 79, 76, 76, 248, 76, 313, 317, 314, 319,
967 320, 321, 316, 322, 323, 323, 231, 691, 301, 302,
968 330, 342, 685, 76, 81, 76, 262, 76, 691, 317,
969 691, 319, 320, 321, 231, 322, 323, 325, 328, 231,
970 326, 327, 231, 416, 344, 76, 76, 76, 77, 78,
971 76, 76, 76, 76, 76, 79, 76, 76, 691, 76,
972 328, 331, 326, 327, 231, 231, 231, 231, 231, 327,
973 333, 231, 332, 334, 335, 231, 339, 76, 81, 76,
974 336, 76, 231, 345, 346, 251, 383, 341, 383, 340,
975 347, 329, 351, 352, 353, 354, 355, 251, 251, 76,
976
977 82, 83, 84, 85, 86, 87, 82, 82, 82, 82,
978 82, 82, 82, 82, 351, 352, 353, 354, 355, 356,
979 357, 358, 691, 359, 361, 362, 363, 360, 362, 371,
980 231, 82, 89, 82, 691, 90, 373, 231, 384, 409,
981 231, 356, 357, 374, 358, 359, 361, 362, 363, 360,
982 364, 251, 365, 82, 82, 91, 84, 92, 86, 87,
983 82, 82, 82, 82, 82, 82, 82, 82, 231, 231,
984 231, 222, 231, 223, 365, 691, 376, 265, 381, 265,
985 372, 231, 375, 691, 224, 82, 89, 82, 231, 93,
986 266, 379, 385, 377, 691, 231, 225, 367, 226, 366,
987
988 380, 368, 267, 251, 268, 390, 224, 82, 95, 96,
989 97, 98, 266, 99, 100, 101, 102, 103, 227, 367,
990 226, 475, 366, 368, 267, 383, 268, 383, 390, 383,
991 691, 383, 389, 393, 394, 411, 391, 104, 101, 105,
992 392, 106, 95, 96, 97, 98, 366, 99, 100, 101,
993 102, 103, 397, 231, 389, 393, 231, 394, 391, 231,
994 231, 413, 392, 251, 415, 436, 395, 436, 398, 369,
995 396, 104, 101, 105, 397, 106, 117, 117, 118, 119,
996 117, 117, 117, 117, 117, 117, 117, 120, 395, 117,
997 398, 399, 396, 401, 402, 231, 403, 402, 412, 231,
998
999 404, 691, 417, 418, 231, 691, 691, 117, 117, 117,
1000 414, 117, 444, 399, 445, 401, 231, 402, 403, 452,
1001 405, 231, 404, 420, 421, 422, 451, 406, 408, 117,
1002 117, 117, 118, 119, 117, 117, 117, 117, 117, 117,
1003 117, 120, 269, 117, 269, 217, 222, 217, 223, 406,
1004 408, 223, 518, 223, 691, 270, 452, 423, 218, 224,
1005 428, 117, 117, 117, 276, 117, 481, 271, 691, 272,
1006 219, 225, 220, 226, 407, 251, 277, 270, 278, 424,
1007 218, 224, 428, 117, 130, 429, 276, 430, 407, 271,
1008 231, 272, 219, 227, 220, 226, 407, 251, 279, 265,
1009
1010 278, 265, 438, 269, 461, 269, 461, 429, 575, 430,
1011 410, 132, 266, 133, 134, 432, 270, 433, 135, 136,
1012 434, 397, 137, 437, 267, 438, 268, 138, 271, 439,
1013 272, 139, 130, 440, 266, 441, 440, 432, 270, 433,
1014 691, 684, 434, 397, 585, 437, 267, 231, 268, 691,
1015 271, 439, 272, 691, 691, 440, 428, 441, 443, 132,
1016 406, 133, 134, 453, 406, 446, 135, 136, 447, 231,
1017 137, 144, 449, 231, 691, 138, 450, 231, 428, 139,
1018 454, 462, 406, 421, 455, 463, 448, 446, 420, 421,
1019 422, 447, 420, 421, 422, 456, 251, 457, 251, 464,
1020
1021 432, 464, 465, 462, 466, 436, 469, 436, 463, 445,
1022 439, 445, 470, 471, 444, 439, 445, 445, 691, 445,
1023 657, 477, 432, 478, 465, 479, 231, 466, 469, 480,
1024 231, 460, 439, 467, 470, 231, 471, 472, 491, 231,
1025 482, 494, 473, 476, 483, 474, 421, 455, 484, 251,
1026 485, 251, 486, 495, 486, 467, 461, 464, 461, 464,
1027 491, 397, 691, 494, 473, 476, 496, 474, 498, 478,
1028 500, 478, 691, 691, 477, 495, 478, 231, 488, 231,
1029 506, 505, 510, 397, 489, 492, 499, 478, 496, 478,
1030 498, 501, 500, 486, 428, 486, 511, 406, 512, 691,
1031
1032 432, 513, 473, 514, 510, 397, 489, 492, 499, 439,
1033 515, 517, 683, 501, 691, 474, 428, 691, 511, 406,
1034 512, 502, 432, 513, 473, 514, 231, 397, 516, 525,
1035 428, 439, 515, 517, 503, 521, 526, 474, 432, 406,
1036 507, 527, 439, 530, 691, 529, 231, 537, 538, 539,
1037 516, 525, 428, 691, 541, 533, 691, 548, 526, 549,
1038 432, 406, 550, 527, 439, 528, 691, 529, 552, 537,
1039 538, 539, 691, 558, 559, 560, 541, 691, 540, 548,
1040 562, 549, 691, 568, 550, 551, 569, 528, 561, 570,
1041 552, 691, 572, 578, 579, 558, 559, 560, 580, 691,
1042
1043 540, 582, 562, 691, 542, 568, 588, 551, 569, 553,
1044 561, 570, 589, 581, 572, 578, 579, 571, 583, 691,
1045 584, 580, 600, 584, 582, 584, 586, 691, 586, 588,
1046 573, 583, 602, 584, 591, 589, 581, 608, 584, 571,
1047 584, 586, 609, 586, 600, 610, 691, 612, 691, 601,
1048 618, 619, 620, 622, 602, 691, 603, 681, 628, 608,
1049 628, 611, 691, 631, 609, 632, 629, 593, 610, 691,
1050 612, 601, 618, 619, 594, 620, 622, 621, 691, 691,
1051 596, 633, 691, 633, 611, 691, 636, 613, 637, 634,
1052 639, 628, 637, 628, 631, 623, 632, 691, 691, 629,
1053
1054 621, 631, 633, 632, 633, 636, 639, 637, 637, 639,
1055 634, 637, 640, 647, 691, 691, 680, 691, 679, 678,
1056 676, 675, 674, 652, 673, 671, 670, 667, 669, 662,
1057 668, 666, 665, 677, 672, 664, 663, 661, 660, 659,
1058 658, 656, 655, 654, 653, 651, 650, 649, 648, 691,
1059 691, 646, 686, 689, 691, 645, 644, 643, 642, 641,
1060 627, 626, 682, 33, 33, 33, 33, 33, 33, 33,
1061 33, 33, 33, 33, 33, 44, 44, 44, 44, 44,
1062 44, 44, 44, 44, 44, 44, 44, 49, 49, 49,
1063 49, 49, 49, 49, 49, 49, 49, 49, 49, 51,
1064
1065 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
1066 51, 55, 55, 55, 55, 55, 55, 55, 55, 55,
1067 55, 55, 55, 68, 68, 68, 68, 68, 68, 68,
1068 68, 68, 68, 68, 68, 80, 80, 80, 80, 80,
1069 80, 80, 80, 80, 80, 80, 80, 88, 88, 88,
1070 88, 88, 88, 88, 88, 88, 88, 88, 88, 94,
1071 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
1072 94, 107, 107, 107, 107, 107, 107, 107, 107, 107,
1073 107, 107, 107, 112, 112, 112, 112, 112, 112, 112,
1074 112, 112, 112, 112, 112, 121, 121, 121, 121, 121,
1075
1076 121, 121, 121, 121, 121, 121, 121, 127, 625, 624,
1077 617, 127, 127, 127, 129, 616, 615, 614, 129, 129,
1078 129, 129, 129, 129, 129, 129, 131, 607, 606, 605,
1079 604, 599, 131, 131, 148, 148, 151, 151, 152, 152,
1080 152, 152, 152, 152, 152, 152, 152, 152, 152, 152,
1081 157, 157, 598, 597, 595, 157, 592, 590, 157, 157,
1082 157, 157, 162, 162, 162, 162, 162, 162, 162, 162,
1083 162, 162, 162, 162, 167, 167, 577, 576, 575, 167,
1084 167, 574, 167, 167, 167, 167, 172, 172, 172, 172,
1085 172, 172, 172, 172, 172, 172, 172, 172, 178, 178,
1086
1087 184, 567, 566, 565, 184, 184, 184, 186, 564, 557,
1088 556, 186, 186, 186, 186, 186, 186, 186, 188, 555,
1089 554, 547, 546, 545, 188, 188, 195, 195, 231, 544,
1090 543, 195, 536, 535, 534, 195, 195, 201, 532, 531,
1091 524, 523, 522, 201, 201, 206, 206, 231, 206, 206,
1092 206, 206, 206, 206, 206, 206, 206, 216, 216, 221,
1093 221, 520, 221, 221, 221, 221, 221, 221, 221, 221,
1094 221, 230, 519, 509, 508, 230, 230, 230, 232, 251,
1095 251, 504, 232, 232, 232, 232, 232, 232, 232, 245,
1096 245, 231, 231, 245, 245, 245, 245, 245, 245, 245,
1097
1098 245, 247, 247, 497, 493, 247, 247, 247, 247, 247,
1099 247, 247, 247, 250, 490, 487, 231, 250, 250, 250,
1100 252, 468, 460, 459, 252, 252, 252, 252, 252, 252,
1101 252, 252, 256, 256, 458, 231, 256, 256, 256, 256,
1102 256, 256, 256, 256, 257, 231, 442, 435, 257, 257,
1103 257, 259, 431, 427, 426, 259, 259, 259, 259, 259,
1104 259, 259, 259, 419, 419, 419, 419, 419, 419, 419,
1105 419, 419, 419, 419, 419, 630, 630, 425, 630, 630,
1106 630, 630, 630, 630, 630, 630, 630, 635, 635, 231,
1107 635, 635, 635, 635, 635, 635, 635, 635, 635, 638,
1108
1109 638, 231, 638, 638, 638, 638, 638, 638, 638, 638,
1110 638, 231, 231, 400, 388, 387, 386, 382, 231, 350,
1111 349, 348, 343, 284, 324, 318, 315, 312, 311, 310,
1112 309, 258, 308, 258, 304, 251, 303, 251, 248, 300,
1113 298, 231, 285, 231, 284, 691, 275, 264, 263, 260,
1114 258, 253, 251, 185, 249, 185, 181, 248, 246, 242,
1115 231, 229, 228, 128, 122, 209, 185, 181, 177, 147,
1116 128, 122, 691, 25, 691, 691, 691, 691, 691, 691,
1117 691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
1118 691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
1119
1120 691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
1121 691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
1122 691, 691, 691, 691, 691, 691, 691, 691
1123 } ;
1124
1125 static const flex_int32_t yy_chk[1829] =
1126 { 0,
1127 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1128 1, 1, 1, 1, 7, 7, 8, 8, 32, 7,
1129 32, 8, 29, 29, 42, 42, 47, 47, 50, 50,
1130 689, 1, 1, 1, 0, 1, 53, 53, 11, 11,
1131 11, 11, 21, 21, 116, 11, 37, 11, 37, 57,
1132 57, 21, 116, 1, 2, 2, 2, 2, 2, 2,
1133 2, 2, 2, 2, 2, 2, 2, 2, 11, 12,
1134 12, 12, 12, 19, 19, 21, 12, 63, 12, 63,
1135 37, 65, 65, 135, 19, 2, 2, 2, 135, 2,
1136 20, 20, 138, 22, 22, 38, 38, 38, 67, 12,
1137
1138 687, 20, 22, 19, 70, 70, 138, 2, 3, 3,
1139 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1140 20, 3, 74, 90, 74, 67, 22, 75, 75, 38,
1141 78, 78, 81, 81, 85, 85, 96, 96, 577, 3,
1142 3, 3, 91, 3, 91, 92, 92, 92, 109, 109,
1143 90, 93, 90, 90, 103, 106, 103, 114, 114, 119,
1144 119, 3, 4, 4, 4, 4, 4, 4, 4, 4,
1145 4, 4, 4, 4, 226, 4, 91, 577, 93, 92,
1146 93, 93, 106, 218, 120, 106, 120, 124, 124, 136,
1147 93, 133, 133, 4, 4, 4, 137, 4, 136, 139,
1148
1149 136, 226, 137, 136, 140, 218, 140, 137, 684, 141,
1150 139, 141, 143, 143, 143, 4, 5, 5, 5, 5,
1151 5, 5, 5, 5, 5, 5, 5, 5, 144, 5,
1152 146, 146, 150, 150, 154, 154, 144, 330, 140, 156,
1153 156, 159, 159, 141, 164, 164, 143, 5, 5, 5,
1154 330, 5, 169, 169, 174, 174, 176, 176, 180, 180,
1155 183, 183, 190, 190, 209, 192, 209, 192, 683, 5,
1156 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
1157 6, 6, 219, 6, 194, 125, 237, 125, 193, 193,
1158 193, 225, 194, 197, 197, 205, 205, 224, 125, 192,
1159
1160 237, 6, 6, 6, 219, 6, 208, 208, 213, 213,
1161 125, 209, 125, 234, 236, 225, 227, 224, 236, 234,
1162 125, 235, 193, 6, 9, 9, 9, 9, 339, 9,
1163 9, 9, 125, 9, 125, 243, 235, 225, 238, 224,
1164 227, 239, 238, 241, 239, 339, 243, 241, 553, 238,
1165 244, 244, 233, 9, 9, 9, 233, 9, 10, 10,
1166 10, 10, 227, 10, 10, 10, 255, 10, 254, 233,
1167 240, 240, 254, 292, 248, 248, 293, 255, 292, 261,
1168 293, 261, 240, 553, 266, 254, 267, 10, 10, 10,
1169 270, 10, 13, 13, 13, 13, 13, 13, 13, 13,
1170
1171 13, 13, 13, 13, 248, 13, 266, 271, 267, 273,
1172 274, 275, 270, 276, 277, 279, 297, 282, 302, 302,
1173 286, 297, 680, 13, 13, 13, 261, 13, 280, 271,
1174 281, 273, 274, 275, 286, 276, 277, 279, 282, 299,
1175 280, 281, 379, 379, 299, 13, 14, 14, 14, 14,
1176 14, 14, 14, 14, 14, 14, 14, 14, 283, 14,
1177 282, 287, 280, 281, 288, 289, 290, 294, 291, 283,
1178 289, 296, 288, 289, 290, 287, 294, 14, 14, 14,
1179 291, 14, 295, 305, 306, 307, 382, 296, 382, 295,
1180 307, 283, 313, 314, 315, 316, 317, 305, 306, 14,
1181
1182 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
1183 15, 15, 15, 15, 313, 314, 315, 316, 317, 318,
1184 319, 320, 368, 321, 322, 323, 324, 321, 325, 331,
1185 334, 15, 15, 15, 326, 15, 334, 335, 345, 368,
1186 331, 318, 319, 335, 320, 321, 322, 323, 324, 321,
1187 325, 345, 326, 15, 16, 16, 16, 16, 16, 16,
1188 16, 16, 16, 16, 16, 16, 16, 16, 336, 332,
1189 337, 126, 342, 126, 326, 328, 337, 214, 342, 214,
1190 332, 340, 336, 327, 126, 16, 16, 16, 338, 16,
1191 214, 340, 346, 338, 446, 341, 126, 328, 126, 327,
1192
1193 341, 328, 214, 346, 214, 352, 126, 16, 17, 17,
1194 17, 17, 214, 17, 17, 17, 17, 17, 126, 328,
1195 126, 446, 327, 328, 214, 344, 214, 344, 352, 347,
1196 329, 347, 351, 354, 355, 370, 353, 17, 17, 17,
1197 353, 17, 18, 18, 18, 18, 329, 18, 18, 18,
1198 18, 18, 357, 370, 351, 354, 372, 355, 353, 344,
1199 378, 372, 353, 347, 378, 397, 356, 397, 358, 329,
1200 356, 18, 18, 18, 357, 18, 23, 23, 23, 23,
1201 23, 23, 23, 23, 23, 23, 23, 23, 356, 23,
1202 358, 359, 356, 361, 362, 381, 363, 364, 371, 380,
1203
1204 363, 365, 380, 381, 377, 367, 502, 23, 23, 23,
1205 377, 23, 406, 359, 406, 361, 371, 362, 363, 452,
1206 364, 415, 363, 383, 383, 383, 415, 365, 367, 23,
1207 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
1208 24, 24, 215, 24, 215, 217, 222, 217, 222, 365,
1209 367, 223, 502, 223, 366, 215, 416, 384, 217, 222,
1210 389, 24, 24, 24, 223, 24, 452, 215, 369, 215,
1211 217, 222, 217, 222, 366, 384, 223, 215, 223, 385,
1212 217, 222, 389, 24, 35, 390, 223, 391, 369, 215,
1213 416, 215, 217, 222, 217, 222, 366, 385, 223, 265,
1214
1215 223, 265, 400, 269, 428, 269, 428, 390, 575, 391,
1216 369, 35, 265, 35, 35, 393, 269, 394, 35, 35,
1217 395, 398, 35, 399, 265, 400, 265, 35, 269, 401,
1218 269, 35, 39, 402, 265, 403, 405, 393, 269, 394,
1219 408, 679, 395, 398, 575, 399, 265, 417, 265, 407,
1220 269, 401, 269, 410, 409, 402, 429, 403, 405, 39,
1221 407, 39, 39, 417, 410, 408, 39, 39, 409, 418,
1222 39, 39, 411, 411, 652, 39, 412, 412, 429, 39,
1223 418, 430, 407, 419, 419, 431, 410, 408, 420, 420,
1224 420, 409, 422, 422, 422, 423, 423, 424, 424, 432,
1225
1226 433, 432, 434, 430, 435, 436, 438, 436, 431, 439,
1227 440, 439, 441, 442, 444, 443, 444, 445, 447, 445,
1228 652, 448, 433, 448, 434, 449, 449, 435, 438, 450,
1229 450, 460, 440, 436, 441, 453, 442, 443, 463, 454,
1230 453, 466, 444, 447, 454, 445, 455, 455, 456, 456,
1231 457, 457, 458, 467, 458, 436, 461, 464, 461, 464,
1232 463, 468, 473, 466, 444, 447, 469, 445, 471, 472,
1233 474, 472, 475, 476, 477, 467, 477, 482, 460, 483,
1234 483, 482, 489, 468, 461, 464, 473, 478, 469, 478,
1235 471, 476, 474, 486, 490, 486, 491, 475, 492, 518,
1236
1237 493, 494, 477, 495, 489, 496, 461, 464, 473, 497,
1238 498, 500, 678, 476, 501, 478, 490, 499, 491, 475,
1239 492, 477, 493, 494, 477, 495, 506, 496, 499, 510,
1240 511, 497, 498, 500, 478, 506, 512, 478, 513, 501,
1241 486, 514, 515, 518, 516, 517, 521, 525, 526, 527,
1242 499, 510, 511, 528, 529, 521, 530, 537, 512, 538,
1243 513, 501, 539, 514, 515, 516, 540, 517, 541, 525,
1244 526, 527, 542, 548, 549, 550, 529, 551, 528, 537,
1245 552, 538, 563, 558, 539, 540, 559, 516, 551, 560,
1246 541, 561, 562, 568, 569, 548, 549, 550, 570, 571,
1247
1248 528, 572, 552, 581, 530, 558, 578, 540, 559, 542,
1249 551, 560, 579, 571, 562, 568, 569, 561, 573, 593,
1250 573, 570, 590, 574, 572, 574, 576, 591, 576, 578,
1251 563, 583, 592, 583, 581, 579, 571, 598, 584, 561,
1252 584, 586, 599, 586, 590, 600, 601, 602, 603, 591,
1253 608, 609, 610, 612, 592, 613, 593, 676, 618, 598,
1254 618, 601, 611, 619, 599, 619, 618, 583, 600, 623,
1255 602, 591, 608, 609, 584, 610, 612, 611, 647, 662,
1256 586, 620, 640, 620, 601, 657, 621, 603, 621, 620,
1257 622, 628, 622, 628, 631, 613, 631, 667, 672, 628,
1258
1259 611, 632, 633, 632, 633, 636, 637, 636, 637, 639,
1260 633, 639, 623, 640, 677, 682, 675, 686, 674, 673,
1261 671, 670, 669, 647, 668, 666, 665, 662, 664, 657,
1262 663, 661, 660, 672, 667, 659, 658, 656, 655, 654,
1263 653, 651, 650, 649, 648, 644, 643, 642, 641, 638,
1264 635, 634, 682, 686, 630, 629, 627, 626, 625, 624,
1265 617, 616, 677, 692, 692, 692, 692, 692, 692, 692,
1266 692, 692, 692, 692, 692, 693, 693, 693, 693, 693,
1267 693, 693, 693, 693, 693, 693, 693, 694, 694, 694,
1268 694, 694, 694, 694, 694, 694, 694, 694, 694, 695,
1269
1270 695, 695, 695, 695, 695, 695, 695, 695, 695, 695,
1271 695, 696, 696, 696, 696, 696, 696, 696, 696, 696,
1272 696, 696, 696, 697, 697, 697, 697, 697, 697, 697,
1273 697, 697, 697, 697, 697, 698, 698, 698, 698, 698,
1274 698, 698, 698, 698, 698, 698, 698, 699, 699, 699,
1275 699, 699, 699, 699, 699, 699, 699, 699, 699, 700,
1276 700, 700, 700, 700, 700, 700, 700, 700, 700, 700,
1277 700, 701, 701, 701, 701, 701, 701, 701, 701, 701,
1278 701, 701, 701, 702, 702, 702, 702, 702, 702, 702,
1279 702, 702, 702, 702, 702, 703, 703, 703, 703, 703,
1280
1281 703, 703, 703, 703, 703, 703, 703, 704, 615, 614,
1282 607, 704, 704, 704, 705, 606, 605, 604, 705, 705,
1283 705, 705, 705, 705, 705, 705, 706, 597, 596, 595,
1284 594, 589, 706, 706, 707, 707, 708, 708, 709, 709,
1285 709, 709, 709, 709, 709, 709, 709, 709, 709, 709,
1286 710, 710, 588, 587, 585, 710, 582, 580, 710, 710,
1287 710, 710, 711, 711, 711, 711, 711, 711, 711, 711,
1288 711, 711, 711, 711, 712, 712, 567, 566, 565, 712,
1289 712, 564, 712, 712, 712, 712, 713, 713, 713, 713,
1290 713, 713, 713, 713, 713, 713, 713, 713, 714, 714,
1291
1292 715, 557, 556, 555, 715, 715, 715, 716, 554, 547,
1293 545, 716, 716, 716, 716, 716, 716, 716, 717, 544,
1294 543, 536, 535, 534, 717, 717, 718, 718, 533, 532,
1295 531, 718, 524, 523, 522, 718, 718, 719, 520, 519,
1296 509, 508, 507, 719, 719, 720, 720, 505, 720, 720,
1297 720, 720, 720, 720, 720, 720, 720, 721, 721, 722,
1298 722, 504, 722, 722, 722, 722, 722, 722, 722, 722,
1299 722, 723, 503, 488, 487, 723, 723, 723, 724, 485,
1300 484, 481, 724, 724, 724, 724, 724, 724, 724, 725,
1301 725, 480, 479, 725, 725, 725, 725, 725, 725, 725,
1302
1303 725, 726, 726, 470, 465, 726, 726, 726, 726, 726,
1304 726, 726, 726, 727, 462, 459, 451, 727, 727, 727,
1305 728, 437, 427, 426, 728, 728, 728, 728, 728, 728,
1306 728, 728, 729, 729, 425, 414, 729, 729, 729, 729,
1307 729, 729, 729, 729, 730, 413, 404, 396, 730, 730,
1308 730, 731, 392, 388, 387, 731, 731, 731, 731, 731,
1309 731, 731, 731, 732, 732, 732, 732, 732, 732, 732,
1310 732, 732, 732, 732, 732, 733, 733, 386, 733, 733,
1311 733, 733, 733, 733, 733, 733, 733, 734, 734, 376,
1312 734, 734, 734, 734, 734, 734, 734, 734, 734, 735,
1313
1314 735, 375, 735, 735, 735, 735, 735, 735, 735, 735,
1315 735, 374, 373, 360, 350, 349, 348, 343, 333, 312,
1316 311, 310, 298, 284, 278, 272, 268, 264, 263, 262,
1317 260, 259, 258, 257, 253, 252, 251, 250, 247, 246,
1318 242, 232, 231, 230, 229, 221, 220, 211, 210, 202,
1319 201, 189, 188, 186, 185, 184, 181, 171, 166, 142,
1320 131, 129, 128, 127, 122, 115, 88, 83, 79, 43,
1321 33, 27, 25, 691, 691, 691, 691, 691, 691, 691,
1322 691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
1323 691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
1324
1325 691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
1326 691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
1327 691, 691, 691, 691, 691, 691, 691, 691
1328 } ;
1329
1330 static yy_state_type yy_last_accepting_state;
1331 static char *yy_last_accepting_cpos;
1332
1333 extern int yy_flex_debug;
1334 int yy_flex_debug = 0;
1335
1336 /* The intent behind this definition is that it'll catch
1337 * any uses of REJECT which flex missed.
1338 */
1339 #define REJECT reject_used_but_not_detected
1340 static int yy_more_flag = 0;
1341 static int yy_more_len = 0;
1342 #define yymore() ((yy_more_flag) = 1)
1343 #define YY_MORE_ADJ (yy_more_len)
1344 #define YY_RESTORE_YY_MORE_OFFSET
1345 char *yytext;
1346 #line 1 "VPreLex.l"
1347 #line 6 "VPreLex.l"
1348 /******************************************************************************
1349 * DESCRIPTION: Verilog Preprocessor Lexer
1350 *
1351 * This file is part of Verilog-Perl.
1352 *
1353 * Author: Wilson Snyder <[email protected]>
1354 *
1355 * Code available from: https://www.veripool.org/verilog-perl
1356 *
1357 ******************************************************************************
1358 *
1359 * Copyright 2000-2024 by Wilson Snyder. This program is free software;
1360 * you can redistribute it and/or modify it under the terms of either the GNU
1361 * Lesser General Public License Version 3 or the Perl Artistic License Version 2.0.
1362 *
1363 * This program is distributed in the hope that it will be useful,
1364 * but WITHOUT ANY WARRANTY; without even the implied warranty of
1365 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1366 * GNU General Public License for more details.
1367 *
1368 *****************************************************************************
1369 * Do not use Flex in C++ mode. It has bugs with yyunput() which result in
1370 * lost characters.
1371 *****************************************************************************/
1372
1373 #include "VPreProc.h"
1374 #include "VPreLex.h"
1375 #include <cstdio>
1376 #include <cstdarg>
1377 #include <cstring>
1378 #include <iostream>
1379
1380 // Flex 2.5.35 has compile warning in ECHO, so we'll default our own rule
1381 #define ECHO yyerrorf("Missing VPreLex.l rule: ECHO rule invoked in state %d: %s", YY_START, yytext);
1382
1383 VPreLex* VPreLex::s_currentLexp = NULL; // Current lexing point
1384
1385 #define LEXP VPreLex::s_currentLexp
1386
1387 #define linenoInc() { LEXP->linenoInc(); }
1388 static bool pedantic() { return LEXP->m_pedantic; }
1389 static bool keepWhitespace() { return LEXP->m_keepWhitespace; }
1390 static void appendDefValue(const char* t, size_t l) { LEXP->appendDefValue(t,l); }
1391 void yyerror(char* msg) { LEXP->curFilelinep()->error(msg); }
1392
1393 #define YY_INPUT(buf,result,max_size) \
1394 result = LEXP->inputToLex(buf,max_size);
1395
1396 // Accessors, because flex keeps changing the type of yyleng
1397 char* yyourtext() { return yytext; }
1398 size_t yyourleng() { return (size_t)yyleng; }
1399 void yyourtext(const char* textp, size_t size) { yytext=(char*)textp; yyleng=size; }
1400
1401 void yyerrorf(const char* format, ...) {
1402 char msg[1024];
1403
1404 va_list ap;
1405 va_start(ap,format);
1406 vsprintf(msg,format,ap);
1407 va_end(ap);
1408
1409 yyerror(msg);
1410 }
1411
1412 static bool isWhitespace(const std::string& str) {
1413 for (std::string::const_iterator pos = str.begin(); pos != str.end(); ++pos) {
1414 if (!isspace(*pos)) return false;
1415 }
1416 return true;
1417 }
1418
1419 /**********************************************************************/
1420 #line 1421 "VPreLex_pretmp.cpp"
1421
1422 /* drop: Drop Ctrl-Z - can't pass thru or may EOF the output too soon */
1423 /* Where we use symb/symbdef, we must also look for a `` join */
1424 /* Note in the preprocessor \ESCaped is *not* always special; mantis1537/bug441 */
1425 /* Case insensitive; unfortunately ?i: isn't in flex 2.5.4 which is popular */
1426 #line 119 "VPreLex.l"
1427 /**************************************************************/
1428 #line 1429 "VPreLex_pretmp.cpp"
1429
1430 #define INITIAL 0
1431 #define CMTMODE 1
1432 #define STRMODE 2
1433 #define DEFFPAR 3
1434 #define DEFFORM 4
1435 #define DEFVAL 5
1436 #define DEFCMT 6
1437 #define STRIFY 7
1438 #define ARGMODE 8
1439 #define INCMODE 9
1440 #define PRTMODE 10
1441 #define OFFMODE 11
1442
1443 #ifndef YY_NO_UNISTD_H
1444 /* Special case for "unistd.h", since it is non-ANSI. We include it way
1445 * down here because we want the user's section 1 to have been scanned first.
1446 * The user has a chance to override it with an option.
1447 */
1448 #include <unistd.h>
1449 #endif
1450
1451 #ifndef YY_EXTRA_TYPE
1452 #define YY_EXTRA_TYPE void *
1453 #endif
1454
1455 static int yy_init_globals ( void );
1456
1457 /* Accessor methods to globals.
1458 These are made visible to non-reentrant scanners for convenience. */
1459
1460 int yylex_destroy ( void );
1461
1462 int yyget_debug ( void );
1463
1464 void yyset_debug ( int debug_flag );
1465
1466 YY_EXTRA_TYPE yyget_extra ( void );
1467
1468 void yyset_extra ( YY_EXTRA_TYPE user_defined );
1469
1470 FILE *yyget_in ( void );
1471
1472 void yyset_in ( FILE * _in_str );
1473
1474 FILE *yyget_out ( void );
1475
1476 void yyset_out ( FILE * _out_str );
1477
1478 int yyget_leng ( void );
1479
1480 char *yyget_text ( void );
1481
1482 int yyget_lineno ( void );
1483
1484 void yyset_lineno ( int _line_number );
1485
1486 /* Macros after this point can all be overridden by user definitions in
1487 * section 1.
1488 */
1489
1490 #ifndef YY_SKIP_YYWRAP
1491 #ifdef __cplusplus
1492 extern "C" int yywrap ( void );
1493 #else
1494 extern int yywrap ( void );
1495 #endif
1496 #endif
1497
1498 #ifndef YY_NO_UNPUT
1499
1500 static void yyunput ( int c, char *buf_ptr );
1501
1502 #endif
1503
1504 #ifndef yytext_ptr
1505 static void yy_flex_strncpy ( char *, const char *, int );
1506 #endif
1507
1508 #ifdef YY_NEED_STRLEN
1509 static int yy_flex_strlen ( const char * );
1510 #endif
1511
1512 #ifndef YY_NO_INPUT
1513 #ifdef __cplusplus
1514 static int yyinput ( void );
1515 #else
1516 static int input ( void );
1517 #endif
1518
1519 #endif
1520
1521 static int yy_start_stack_ptr = 0;
1522 static int yy_start_stack_depth = 0;
1523 static int *yy_start_stack = NULL;
1524
1525 static void yy_push_state ( int _new_state );
1526
1527 static void yy_pop_state ( void );
1528
1529 static int yy_top_state ( void );
1530
1531 /* Amount of stuff to slurp up with each read. */
1532 #ifndef YY_READ_BUF_SIZE
1533 #ifdef __ia64__
1534 /* On IA-64, the buffer size is 16k, not 8k */
1535 #define YY_READ_BUF_SIZE 16384
1536 #else
1537 #define YY_READ_BUF_SIZE 8192
1538 #endif /* __ia64__ */
1539 #endif
1540
1541 /* Copy whatever the last rule matched to the standard output. */
1542 #ifndef ECHO
1543 /* This used to be an fputs(), but since the string might contain NUL's,
1544 * we now use fwrite().
1545 */
1546 #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
1547 #endif
1548
1549 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1550 * is returned in "result".
1551 */
1552 #ifndef YY_INPUT
1553 #define YY_INPUT(buf,result,max_size) \
1554 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1555 { \
1556 int c = '*'; \
1557 int n; \
1558 for ( n = 0; n < max_size && \
1559 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1560 buf[n] = (char) c; \
1561 if ( c == '\n' ) \
1562 buf[n++] = (char) c; \
1563 if ( c == EOF && ferror( yyin ) ) \
1564 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1565 result = n; \
1566 } \
1567 else \
1568 { \
1569 errno=0; \
1570 while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
1571 { \
1572 if( errno != EINTR) \
1573 { \
1574 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1575 break; \
1576 } \
1577 errno=0; \
1578 clearerr(yyin); \
1579 } \
1580 }\
1581 \
1582
1583 #endif
1584
1585 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1586 * we don't want an extra ';' after the "return" because that will cause
1587 * some compilers to complain about unreachable statements.
1588 */
1589 #ifndef yyterminate
1590 #define yyterminate() return YY_NULL
1591 #endif
1592
1593 /* Number of entries by which start-condition stack grows. */
1594 #ifndef YY_START_STACK_INCR
1595 #define YY_START_STACK_INCR 25
1596 #endif
1597
1598 /* Report a fatal error. */
1599 #ifndef YY_FATAL_ERROR
1600 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1601 #endif
1602
1603 /* end tables serialization structures and prototypes */
1604
1605 /* Default declaration of generated scanner - a define so the user can
1606 * easily add parameters.
1607 */
1608 #ifndef YY_DECL
1609 #define YY_DECL_IS_OURS 1
1610
1611 extern int yylex (void);
1612
1613 #define YY_DECL int yylex (void)
1614 #endif /* !YY_DECL */
1615
1616 /* Code executed at the beginning of each rule, after yytext and yyleng
1617 * have been set up.
1618 */
1619 #ifndef YY_USER_ACTION
1620 #define YY_USER_ACTION
1621 #endif
1622
1623 /* Code executed at the end of each rule. */
1624 #ifndef YY_BREAK
1625 #define YY_BREAK /*LINTED*/break;
1626 #endif
1627
1628 #define YY_RULE_SETUP \
1629 if ( yyleng > 0 ) \
1630 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
1631 (yytext[yyleng - 1] == '\n'); \
1632 YY_USER_ACTION
1633
1634 /** The main scanner function which does all the work.
1635 */
1636 YY_DECL
1637 {
1638 yy_state_type yy_current_state;
1639 char *yy_cp, *yy_bp;
1640 int yy_act;
1641
1642 if ( !(yy_init) )
1643 {
1644 (yy_init) = 1;
1645
1646 #ifdef YY_USER_INIT
1647 YY_USER_INIT;
1648 #endif
1649
1650 if ( ! (yy_start) )
1651 (yy_start) = 1; /* first start state */
1652
1653 if ( ! yyin )
1654 yyin = stdin;
1655
1656 if ( ! yyout )
1657 yyout = stdout;
1658
1659 if ( ! YY_CURRENT_BUFFER ) {
1660 yyensure_buffer_stack ();
1661 YY_CURRENT_BUFFER_LVALUE =
1662 yy_create_buffer( yyin, YY_BUF_SIZE );
1663 }
1664
1665 yy_load_buffer_state( );
1666 }
1667
1668 {
1669 #line 120 "VPreLex.l"
1670
1671
1672 #line 1673 "VPreLex_pretmp.cpp"
1673
1674 while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
1675 {
1676 (yy_more_len) = 0;
1677 if ( (yy_more_flag) )
1678 {
1679 (yy_more_len) = (int) ((yy_c_buf_p) - (yytext_ptr));
1680 (yy_more_flag) = 0;
1681 }
1682 yy_cp = (yy_c_buf_p);
1683
1684 /* Support of yytext. */
1685 *yy_cp = (yy_hold_char);
1686
1687 /* yy_bp points to the position in yy_ch_buf of the start of
1688 * the current run.
1689 */
1690 yy_bp = yy_cp;
1691
1692 yy_current_state = (yy_start);
1693 yy_current_state += YY_AT_BOL();
1694 yy_match:
1695 do
1696 {
1697 YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
1698 if ( yy_accept[yy_current_state] )
1699 {
1700 (yy_last_accepting_state) = yy_current_state;
1701 (yy_last_accepting_cpos) = yy_cp;
1702 }
1703 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1704 {
1705 yy_current_state = (int) yy_def[yy_current_state];
1706 if ( yy_current_state >= 692 )
1707 yy_c = yy_meta[yy_c];
1708 }
1709 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1710 ++yy_cp;
1711 }
1712 while ( yy_base[yy_current_state] != 1774 );
1713
1714 yy_find_action:
1715 yy_act = yy_accept[yy_current_state];
1716 if ( yy_act == 0 )
1717 { /* have to back up */
1718 yy_cp = (yy_last_accepting_cpos);
1719 yy_current_state = (yy_last_accepting_state);
1720 yy_act = yy_accept[yy_current_state];
1721 }
1722
1723 YY_DO_BEFORE_ACTION;
1724
1725 do_action: /* This label is used only to access EOF actions. */
1726
1727 switch ( yy_act )
1728 { /* beginning of action switch */
1729 case 0: /* must back up */
1730 /* undo the effects of YY_DO_BEFORE_ACTION */
1731 *yy_cp = (yy_hold_char);
1732 yy_cp = (yy_last_accepting_cpos);
1733 yy_current_state = (yy_last_accepting_state);
1734 goto yy_find_action;
1735
1736 case 1:
1737 YY_RULE_SETUP
1738 #line 122 "VPreLex.l"
1739 { }
1740 YY_BREAK
1741 case 2:
1742 /* rule 2 can match eol */
1743 YY_RULE_SETUP
1744 #line 123 "VPreLex.l"
1745 { LEXP->lineDirective(yytext);
1746 return(VP_LINE); }
1747 YY_BREAK
1748 /* Special directives we recognize */
1749 case 3:
1750 YY_RULE_SETUP
1751 #line 127 "VPreLex.l"
1752 { return(VP_DEFINE); }
1753 YY_BREAK
1754 case 4:
1755 YY_RULE_SETUP
1756 #line 128 "VPreLex.l"
1757 { return(VP_ELSE); }
1758 YY_BREAK
1759 case 5:
1760 YY_RULE_SETUP
1761 #line 129 "VPreLex.l"
1762 { return(VP_ELSIF); }
1763 YY_BREAK
1764 case 6:
1765 YY_RULE_SETUP
1766 #line 130 "VPreLex.l"
1767 { return(VP_ENDIF); }
1768 YY_BREAK
1769 case 7:
1770 YY_RULE_SETUP
1771 #line 131 "VPreLex.l"
1772 { return(VP_IFDEF); }
1773 YY_BREAK
1774 case 8:
1775 YY_RULE_SETUP
1776 #line 132 "VPreLex.l"
1777 { return(VP_IFNDEF); }
1778 YY_BREAK
1779 case 9:
1780 YY_RULE_SETUP
1781 #line 133 "VPreLex.l"
1782 { return(VP_INCLUDE); }
1783 YY_BREAK
1784 case 10:
1785 YY_RULE_SETUP
1786 #line 134 "VPreLex.l"
1787 { return(VP_UNDEF); }
1788 YY_BREAK
1789 case 11:
1790 YY_RULE_SETUP
1791 #line 135 "VPreLex.l"
1792 { return(VP_UNDEFINEALL); }
1793 YY_BREAK
1794 case 12:
1795 YY_RULE_SETUP
1796 #line 136 "VPreLex.l"
1797 { if (!pedantic()) return (VP_ERROR); else return(VP_DEFREF); }
1798 YY_BREAK
1799 case 13:
1800 YY_RULE_SETUP
1801 #line 137 "VPreLex.l"
1802 { static string rtnfile;
1803 rtnfile = '"'; rtnfile += LEXP->curFilelinep()->filename();
1804 rtnfile += '"'; yytext=(char*)rtnfile.c_str(); yyleng = rtnfile.length();
1805 return (VP_STRING); }
1806 YY_BREAK
1807 case 14:
1808 YY_RULE_SETUP
1809 #line 141 "VPreLex.l"
1810 { static char buf[10];
1811 sprintf(buf, "%d",LEXP->curFilelinep()->lineno());
1812 yytext = buf; yyleng = strlen(yytext);
1813 return (VP_TEXT); }
1814 YY_BREAK
1815 /* Pass-through strings */
1816 case 15:
1817 YY_RULE_SETUP
1818 #line 147 "VPreLex.l"
1819 { yy_push_state(STRMODE); yymore(); }
1820 YY_BREAK
1821 case YY_STATE_EOF(STRMODE):
1822 #line 148 "VPreLex.l"
1823 { linenoInc(); yyerrorf("EOF in unterminated string"); yyleng=0; yyterminate(); }
1824 YY_BREAK
1825 case 16:
1826 /* rule 16 can match eol */
1827 YY_RULE_SETUP
1828 #line 149 "VPreLex.l"
1829 { linenoInc(); yyerrorf("Unterminated string"); BEGIN(INITIAL); }
1830 YY_BREAK
1831 case 17:
1832 YY_RULE_SETUP
1833 #line 150 "VPreLex.l"
1834 { yymore(); }
1835 YY_BREAK
1836 case 18:
1837 /* rule 18 can match eol */
1838 YY_RULE_SETUP
1839 #line 151 "VPreLex.l"
1840 { yymore(); }
1841 YY_BREAK
1842 case 19:
1843 /* rule 19 can match eol */
1844 YY_RULE_SETUP
1845 #line 152 "VPreLex.l"
1846 { linenoInc(); yymore(); }
1847 YY_BREAK
1848 case 20:
1849 YY_RULE_SETUP
1850 #line 153 "VPreLex.l"
1851 { yymore(); }
1852 YY_BREAK
1853 case 21:
1854 YY_RULE_SETUP
1855 #line 154 "VPreLex.l"
1856 { yy_pop_state();
1857 if (LEXP->m_parenLevel || LEXP->m_defQuote) { LEXP->m_defQuote=false; appendDefValue(yytext,yyleng); yyleng=0; }
1858 else return (VP_STRING); }
1859 YY_BREAK
1860 /* Stringification */
1861 case 22:
1862 YY_RULE_SETUP
1863 #line 159 "VPreLex.l"
1864 { yy_push_state(STRIFY); return VP_STRIFY; }
1865 YY_BREAK
1866 case YY_STATE_EOF(STRIFY):
1867 #line 160 "VPreLex.l"
1868 { linenoInc(); yyerrorf("EOF in unterminated '\""); yyleng=0; yyterminate(); }
1869 YY_BREAK
1870 case 23:
1871 YY_RULE_SETUP
1872 #line 161 "VPreLex.l"
1873 { return VP_BACKQUOTE; }
1874 YY_BREAK
1875 case 24:
1876 YY_RULE_SETUP
1877 #line 162 "VPreLex.l"
1878 { yy_push_state(STRMODE); yymore(); }
1879 YY_BREAK
1880 case 25:
1881 YY_RULE_SETUP
1882 #line 163 "VPreLex.l"
1883 { yy_pop_state(); return VP_STRIFY; }
1884 YY_BREAK
1885 case 26:
1886 YY_RULE_SETUP
1887 #line 164 "VPreLex.l"
1888 { return (VP_SYMBOL); }
1889 YY_BREAK
1890 case 27:
1891 YY_RULE_SETUP
1892 #line 165 "VPreLex.l"
1893 { yyleng-=2; return (VP_SYMBOL_JOIN); }
1894 YY_BREAK
1895 case 28:
1896 YY_RULE_SETUP
1897 #line 166 "VPreLex.l"
1898 { return (VP_DEFREF); }
1899 YY_BREAK
1900 case 29:
1901 YY_RULE_SETUP
1902 #line 167 "VPreLex.l"
1903 { yyleng-=2; return (VP_DEFREF_JOIN); }
1904 YY_BREAK
1905 case 30:
1906 YY_RULE_SETUP
1907 #line 168 "VPreLex.l"
1908 { yyleng-=2; return (VP_JOIN); }
1909 YY_BREAK
1910 case 31:
1911 /* rule 31 can match eol */
1912 YY_RULE_SETUP
1913 #line 169 "VPreLex.l"
1914 { linenoInc(); yytext=(char*)"\n"; yyleng=1; return(VP_WHITE); }
1915 YY_BREAK
1916 case 32:
1917 YY_RULE_SETUP
1918 #line 170 "VPreLex.l"
1919 { return (VP_WHITE); }
1920 YY_BREAK
1921 case 33:
1922 YY_RULE_SETUP
1923 #line 171 "VPreLex.l"
1924 { }
1925 YY_BREAK
1926 case 34:
1927 YY_RULE_SETUP
1928 #line 172 "VPreLex.l"
1929 { }
1930 YY_BREAK
1931 case 35:
1932 YY_RULE_SETUP
1933 #line 173 "VPreLex.l"
1934 { return (VP_TEXT); }
1935 YY_BREAK
1936 /* Protected blocks */
1937 case 36:
1938 YY_RULE_SETUP
1939 #line 176 "VPreLex.l"
1940 { yy_push_state(PRTMODE); yymore(); }
1941 YY_BREAK
1942 case 37:
1943 YY_RULE_SETUP
1944 #line 177 "VPreLex.l"
1945 { yy_push_state(PRTMODE); yymore(); }
1946 YY_BREAK
1947 case 38:
1948 YY_RULE_SETUP
1949 #line 178 "VPreLex.l"
1950 { yy_push_state(PRTMODE); yymore(); }
1951 YY_BREAK
1952 case YY_STATE_EOF(PRTMODE):
1953 #line 179 "VPreLex.l"
1954 { linenoInc(); yyerrorf("EOF in `protected"); yyleng=0; yyterminate(); }
1955 YY_BREAK
1956 case 39:
1957 /* rule 39 can match eol */
1958 YY_RULE_SETUP
1959 #line 180 "VPreLex.l"
1960 { linenoInc(); return VP_TEXT; }
1961 YY_BREAK
1962 case 40:
1963 YY_RULE_SETUP
1964 #line 181 "VPreLex.l"
1965 { yymore(); }
1966 YY_BREAK
1967 case 41:
1968 YY_RULE_SETUP
1969 #line 182 "VPreLex.l"
1970 { yy_pop_state(); return VP_TEXT; }
1971 YY_BREAK
1972 case 42:
1973 YY_RULE_SETUP
1974 #line 183 "VPreLex.l"
1975 { yy_pop_state(); return VP_TEXT; }
1976 YY_BREAK
1977 case 43:
1978 YY_RULE_SETUP
1979 #line 184 "VPreLex.l"
1980 { yy_pop_state(); return VP_TEXT; }
1981 YY_BREAK
1982 /* Pass-through include <> filenames */
1983 case YY_STATE_EOF(INCMODE):
1984 #line 187 "VPreLex.l"
1985 { linenoInc(); yyerrorf("EOF in unterminated include filename"); yyleng=0; yyterminate(); }
1986 YY_BREAK
1987 case 44:
1988 /* rule 44 can match eol */
1989 YY_RULE_SETUP
1990 #line 188 "VPreLex.l"
1991 { linenoInc(); yyerrorf("Unterminated include filename"); BEGIN(INITIAL); }
1992 YY_BREAK
1993 case 45:
1994 /* rule 45 can match eol */
1995 YY_RULE_SETUP
1996 #line 189 "VPreLex.l"
1997 { yymore(); }
1998 YY_BREAK
1999 case 46:
2000 YY_RULE_SETUP
2001 #line 190 "VPreLex.l"
2002 { yymore(); }
2003 YY_BREAK
2004 case 47:
2005 YY_RULE_SETUP
2006 #line 191 "VPreLex.l"
2007 { yy_pop_state(); return VP_STRING; }
2008 YY_BREAK
2009 /* Reading definition formal parenthesis (or not) to begin formal arguments */
2010 /* Note '(' must IMMEDIATELY follow definition name */
2011 case 48:
2012 YY_RULE_SETUP
2013 #line 195 "VPreLex.l"
2014 { appendDefValue("(",1); LEXP->m_formalLevel=1; BEGIN(DEFFORM); }
2015 YY_BREAK
2016 case 49:
2017 /* rule 49 can match eol */
2018 YY_RULE_SETUP
2019 #line 196 "VPreLex.l"
2020 { yy_pop_state(); unput('\n'); yyleng=0; return VP_DEFFORM; } /* DEFVAL will later grab the return */
2021 YY_BREAK
2022 case YY_STATE_EOF(DEFFPAR):
2023 #line 197 "VPreLex.l"
2024 { yy_pop_state(); return VP_DEFFORM; } /* empty formals */
2025 YY_BREAK
2026 case 50:
2027 YY_RULE_SETUP
2028 #line 198 "VPreLex.l"
2029 { yy_pop_state(); unput(yytext[yyleng-1]); yyleng=0; return VP_DEFFORM; } /* empty formals */
2030 YY_BREAK
2031 /* Reading definition formals (declaration of a define) */
2032 case 51:
2033 YY_RULE_SETUP
2034 #line 201 "VPreLex.l"
2035 { appendDefValue(yytext,yyleng); yyleng=0; ++LEXP->m_formalLevel; }
2036 YY_BREAK
2037 case 52:
2038 YY_RULE_SETUP
2039 #line 202 "VPreLex.l"
2040 { appendDefValue(yytext,yyleng); yyleng=0; if ((--LEXP->m_formalLevel)==0) { yy_pop_state(); return VP_DEFFORM; } }
2041 YY_BREAK
2042 case 53:
2043 YY_RULE_SETUP
2044 #line 203 "VPreLex.l"
2045 { yy_push_state(CMTMODE); yymore(); }
2046 YY_BREAK
2047 case 54:
2048 YY_RULE_SETUP
2049 #line 204 "VPreLex.l"
2050 { return (VP_COMMENT);}
2051 YY_BREAK
2052 case 55:
2053 YY_RULE_SETUP
2054 #line 205 "VPreLex.l"
2055 { }
2056 YY_BREAK
2057 case YY_STATE_EOF(DEFFORM):
2058 #line 206 "VPreLex.l"
2059 { linenoInc(); yy_pop_state(); yyerrorf("Unterminated ( in define formal arguments."); yyleng=0; return VP_DEFFORM; }
2060 YY_BREAK
2061 case 56:
2062 /* rule 56 can match eol */
2063 YY_RULE_SETUP
2064 #line 207 "VPreLex.l"
2065 { linenoInc(); appendDefValue((char*)"\n",1); } /* Include return so can maintain output line count */
2066 YY_BREAK
2067 case 57:
2068 /* rule 57 can match eol */
2069 YY_RULE_SETUP
2070 #line 208 "VPreLex.l"
2071 { linenoInc(); appendDefValue((char*)"\\\n",2); } /* Include return so can maintain output line count */
2072 YY_BREAK
2073 case 58:
2074 YY_RULE_SETUP
2075 #line 209 "VPreLex.l"
2076 { LEXP->m_defQuote=true; yy_push_state(STRMODE); yymore(); } /* Legal only in default values */
2077 YY_BREAK
2078 case 59:
2079 YY_RULE_SETUP
2080 #line 210 "VPreLex.l"
2081 { appendDefValue(yytext,yyleng); } /* Maybe illegal, otherwise in default value */
2082 YY_BREAK
2083 case 60:
2084 YY_RULE_SETUP
2085 #line 211 "VPreLex.l"
2086 { appendDefValue(yytext,yyleng); } /* Maybe illegal, otherwise in default value */
2087 YY_BREAK
2088 case 61:
2089 YY_RULE_SETUP
2090 #line 212 "VPreLex.l"
2091 { LEXP->m_formalLevel++; appendDefValue(yytext,yyleng); }
2092 YY_BREAK
2093 case 62:
2094 YY_RULE_SETUP
2095 #line 213 "VPreLex.l"
2096 { LEXP->m_formalLevel--; appendDefValue(yytext,yyleng); }
2097 YY_BREAK
2098 case 63:
2099 #line 215 "VPreLex.l"
2100 case 64:
2101 #line 216 "VPreLex.l"
2102 case 65:
2103 YY_RULE_SETUP
2104 #line 216 "VPreLex.l"
2105 { appendDefValue(yytext,yyleng); }
2106 YY_BREAK
2107 /* Reading definition value (declaration of a define's text) */
2108 case 66:
2109 YY_RULE_SETUP
2110 #line 219 "VPreLex.l"
2111 { LEXP->m_defCmtSlash=false; yy_push_state(DEFCMT); yymore(); } /* Special comment parser */
2112 YY_BREAK
2113 case 67:
2114 /* rule 67 can match eol */
2115 YY_RULE_SETUP
2116 #line 220 "VPreLex.l"
2117 { linenoInc(); appendDefValue((char*)"\n",1); } /* Spec says // not part of define value */
2118 YY_BREAK
2119 case 68:
2120 YY_RULE_SETUP
2121 #line 221 "VPreLex.l"
2122 { return (VP_COMMENT);}
2123 YY_BREAK
2124 case 69:
2125 YY_RULE_SETUP
2126 #line 222 "VPreLex.l"
2127 { }
2128 YY_BREAK
2129 case YY_STATE_EOF(DEFVAL):
2130 #line 223 "VPreLex.l"
2131 { linenoInc(); yy_pop_state(); yytext=(char*)"\n"; yyleng=1; return (VP_DEFVALUE); } /* Technically illegal, but people complained */
2132 YY_BREAK
2133 case 70:
2134 /* rule 70 can match eol */
2135 YY_RULE_SETUP
2136 #line 224 "VPreLex.l"
2137 { linenoInc(); yy_pop_state(); yytext=(char*)"\n"; yyleng=1; return (VP_DEFVALUE); }
2138 YY_BREAK
2139 case 71:
2140 /* rule 71 can match eol */
2141 YY_RULE_SETUP
2142 #line 225 "VPreLex.l"
2143 { linenoInc(); appendDefValue((char*)"\\\n",2); } /* Return, AND \ is part of define value */
2144 YY_BREAK
2145 case 72:
2146 YY_RULE_SETUP
2147 #line 226 "VPreLex.l"
2148 { LEXP->m_defQuote=true; yy_push_state(STRMODE); yymore(); }
2149 YY_BREAK
2150 case 73:
2151 #line 228 "VPreLex.l"
2152 case 74:
2153 #line 229 "VPreLex.l"
2154 case 75:
2155 YY_RULE_SETUP
2156 #line 229 "VPreLex.l"
2157 { appendDefValue(yytext,yyleng); }
2158 YY_BREAK
2159 /* Comments inside define values - if embedded get added to define value per spec */
2160 /* - if no \{crnl} ending then the comment belongs to the next line, as a non-embedded comment */
2161 /* - if all but (say) 3rd line is missing \ then it's indeterminate */
2162 case 76:
2163 YY_RULE_SETUP
2164 #line 234 "VPreLex.l"
2165 { yy_pop_state(); appendDefValue(yytext,yyleng); }
2166 YY_BREAK
2167 case 77:
2168 /* rule 77 can match eol */
2169 YY_RULE_SETUP
2170 #line 235 "VPreLex.l"
2171 { linenoInc(); LEXP->m_defCmtSlash=true;
2172 appendDefValue(yytext,yyleng-2); appendDefValue((char*)"\n",1); } /* Return but not \ */
2173 YY_BREAK
2174 case 78:
2175 /* rule 78 can match eol */
2176 YY_RULE_SETUP
2177 #line 237 "VPreLex.l"
2178 { linenoInc(); yymore(); if (LEXP->m_defCmtSlash) yyerrorf("One line of /* ... */ is missing \\ before newline");
2179 BEGIN(CMTMODE); }
2180 YY_BREAK
2181 case 79:
2182 YY_RULE_SETUP
2183 #line 239 "VPreLex.l"
2184 { yymore(); }
2185 YY_BREAK
2186 case 80:
2187 YY_RULE_SETUP
2188 #line 240 "VPreLex.l"
2189 { yymore(); }
2190 YY_BREAK
2191 case YY_STATE_EOF(DEFCMT):
2192 #line 241 "VPreLex.l"
2193 { yyerrorf("EOF in '/* ... */' block comment\n"); yyleng=0; yyterminate(); }
2194 YY_BREAK
2195 /* Define arguments (use of a define) */
2196 case 81:
2197 YY_RULE_SETUP
2198 #line 244 "VPreLex.l"
2199 { yy_push_state(CMTMODE); yymore(); }
2200 YY_BREAK
2201 case 82:
2202 YY_RULE_SETUP
2203 #line 245 "VPreLex.l"
2204 { return (VP_COMMENT);}
2205 YY_BREAK
2206 case 83:
2207 YY_RULE_SETUP
2208 #line 246 "VPreLex.l"
2209 { }
2210 YY_BREAK
2211 case YY_STATE_EOF(ARGMODE):
2212 #line 247 "VPreLex.l"
2213 { yyerrorf("EOF in define argument list\n"); yyleng = 0; yyterminate(); }
2214 YY_BREAK
2215 case 84:
2216 /* rule 84 can match eol */
2217 YY_RULE_SETUP
2218 #line 248 "VPreLex.l"
2219 { linenoInc(); yytext=(char*)"\n"; yyleng=1; return(VP_WHITE); }
2220 YY_BREAK
2221 case 85:
2222 YY_RULE_SETUP
2223 #line 249 "VPreLex.l"
2224 { yy_push_state(STRMODE); yymore(); }
2225 YY_BREAK
2226 case 86:
2227 YY_RULE_SETUP
2228 #line 250 "VPreLex.l"
2229 { appendDefValue(yytext,yyleng); } /* Literal text */
2230 YY_BREAK
2231 case 87:
2232 YY_RULE_SETUP
2233 #line 251 "VPreLex.l"
2234 { yy_push_state(STRIFY); return(VP_STRIFY); }
2235 YY_BREAK
2236 case 88:
2237 YY_RULE_SETUP
2238 #line 252 "VPreLex.l"
2239 { LEXP->m_parenLevel++; appendDefValue(yytext,yyleng); }
2240 YY_BREAK
2241 case 89:
2242 YY_RULE_SETUP
2243 #line 253 "VPreLex.l"
2244 { LEXP->m_parenLevel--; appendDefValue(yytext,yyleng); }
2245 YY_BREAK
2246 case 90:
2247 YY_RULE_SETUP
2248 #line 254 "VPreLex.l"
2249 { LEXP->m_parenLevel++;
2250 // Note paren level 0 means before "(" of starting args
2251 // Level 1 means "," between arguments
2252 // Level 2+ means one argument's internal ()
2253 if (LEXP->m_parenLevel == 1) { // Starting (
2254 if (!isWhitespace(LEXP->m_defValue)) {
2255 yyerrorf("Illegal text before '(' that starts define arguments: '%s'",
2256 LEXP->m_defValue.c_str());
2257 }
2258 }
2259 if (LEXP->m_parenLevel>1) {
2260 appendDefValue(yytext,yyleng);
2261 } else {
2262 return (VP_TEXT);
2263 }}
2264 YY_BREAK
2265 case 91:
2266 YY_RULE_SETUP
2267 #line 269 "VPreLex.l"
2268 { LEXP->m_parenLevel--;
2269 if (LEXP->m_parenLevel>0) {
2270 appendDefValue(yytext,yyleng);
2271 } else {
2272 yy_pop_state(); return (VP_DEFARG);
2273 }}
2274 YY_BREAK
2275 case 92:
2276 YY_RULE_SETUP
2277 #line 275 "VPreLex.l"
2278 { if (LEXP->m_parenLevel>1) {
2279 appendDefValue(yytext,yyleng);
2280 } else {
2281 yy_pop_state(); return (VP_DEFARG);
2282 }}
2283 YY_BREAK
2284 case 93:
2285 YY_RULE_SETUP
2286 #line 280 "VPreLex.l"
2287 { appendDefValue(yytext,yyleng); } /* defref in defref - outer macro expands first */
2288 YY_BREAK
2289 case 94:
2290 YY_RULE_SETUP
2291 #line 281 "VPreLex.l"
2292 { appendDefValue(yytext,yyleng); } /* defref in defref - outer macro expands first */
2293 YY_BREAK
2294 case 95:
2295 YY_RULE_SETUP
2296 #line 282 "VPreLex.l"
2297 { appendDefValue(yytext,yyleng); } /* defref in defref - outer macro expands first */
2298 YY_BREAK
2299 case 96:
2300 #line 284 "VPreLex.l"
2301 case 97:
2302 YY_RULE_SETUP
2303 #line 284 "VPreLex.l"
2304 { appendDefValue(yytext,yyleng); }
2305 YY_BREAK
2306 /* Translate offs. Note final newline not included */
2307 case 98:
2308 YY_RULE_SETUP
2309 #line 287 "VPreLex.l"
2310 {
2311 if (LEXP->m_synthesis) { yy_push_state(OFFMODE); }
2312 return(VP_COMMENT); }
2313 YY_BREAK
2314 case 99:
2315 YY_RULE_SETUP
2316 #line 290 "VPreLex.l"
2317 {
2318 if (LEXP->m_synthesis) { yy_pop_state(); }
2319 return(VP_COMMENT); }
2320 YY_BREAK
2321 case 100:
2322 /* rule 100 can match eol */
2323 YY_RULE_SETUP
2324 #line 293 "VPreLex.l"
2325 { linenoInc(); yymore(); } /* Need to end the / / */
2326 YY_BREAK
2327 case 101:
2328 YY_RULE_SETUP
2329 #line 294 "VPreLex.l"
2330 { }
2331 YY_BREAK
2332 case 102:
2333 YY_RULE_SETUP
2334 #line 295 "VPreLex.l"
2335 { }
2336 YY_BREAK
2337 case YY_STATE_EOF(OFFMODE):
2338 #line 296 "VPreLex.l"
2339 { yyerrorf("EOF in '/*synthesis translate_off*/' region\n"); yyleng=0; yyterminate(); }
2340 YY_BREAK
2341 /* One line comments. Note final newline not included */
2342 case 103:
2343 YY_RULE_SETUP
2344 #line 299 "VPreLex.l"
2345 { return (VP_COMMENT); }
2346 YY_BREAK
2347 /* C-style comments. */
2348 /**** See also DEFCMT */
2349 case 104:
2350 YY_RULE_SETUP
2351 #line 303 "VPreLex.l"
2352 { yy_push_state(CMTMODE); yymore(); }
2353 YY_BREAK
2354 case 105:
2355 YY_RULE_SETUP
2356 #line 304 "VPreLex.l"
2357 { yy_pop_state(); return(VP_COMMENT); }
2358 YY_BREAK
2359 case 106:
2360 /* rule 106 can match eol */
2361 YY_RULE_SETUP
2362 #line 305 "VPreLex.l"
2363 { linenoInc(); yymore(); }
2364 YY_BREAK
2365 case 107:
2366 YY_RULE_SETUP
2367 #line 306 "VPreLex.l"
2368 { yymore(); }
2369 YY_BREAK
2370 case 108:
2371 YY_RULE_SETUP
2372 #line 307 "VPreLex.l"
2373 { yymore(); }
2374 YY_BREAK
2375 case YY_STATE_EOF(CMTMODE):
2376 #line 308 "VPreLex.l"
2377 { yyerrorf("EOF in '/* ... */' block comment\n"); yyleng=0; yyterminate(); }
2378 YY_BREAK
2379 /* Define calls */
2380 /* symbdef prevents normal lex rules from making `\`"foo a symbol {`"foo} instead of a BACKQUOTE */
2381 case 109:
2382 YY_RULE_SETUP
2383 #line 312 "VPreLex.l"
2384 { return (VP_DEFREF); }
2385 YY_BREAK
2386 case 110:
2387 YY_RULE_SETUP
2388 #line 313 "VPreLex.l"
2389 { yyleng-=2; return (VP_DEFREF_JOIN); }
2390 YY_BREAK
2391 case 111:
2392 YY_RULE_SETUP
2393 #line 314 "VPreLex.l"
2394 { yyleng-=2; return (VP_JOIN); }
2395 YY_BREAK
2396 /* Generics */
2397 case YY_STATE_EOF(INITIAL):
2398 #line 317 "VPreLex.l"
2399 { yyterminate(); } /* A "normal" EOF */
2400 YY_BREAK
2401 case 112:
2402 /* rule 112 can match eol */
2403 YY_RULE_SETUP
2404 #line 318 "VPreLex.l"
2405 { linenoInc(); yytext=(char*)"\n"; yyleng=1; return(VP_WHITE); }
2406 YY_BREAK
2407 case 113:
2408 YY_RULE_SETUP
2409 #line 319 "VPreLex.l"
2410 { return (VP_SYMBOL); }
2411 YY_BREAK
2412 case 114:
2413 YY_RULE_SETUP
2414 #line 320 "VPreLex.l"
2415 { yyleng-=2; return (VP_SYMBOL_JOIN); }
2416 YY_BREAK
2417 case 115:
2418 YY_RULE_SETUP
2419 #line 321 "VPreLex.l"
2420 { yyleng-=2; return (VP_JOIN); }
2421 YY_BREAK
2422 case 116:
2423 YY_RULE_SETUP
2424 #line 322 "VPreLex.l"
2425 { }
2426 YY_BREAK
2427 case 117:
2428 YY_RULE_SETUP
2429 #line 323 "VPreLex.l"
2430 { if (!keepWhitespace()) { yytext=(char*)" "; yyleng=1; } return VP_WHITE; }
2431 YY_BREAK
2432 case 118:
2433 YY_RULE_SETUP
2434 #line 324 "VPreLex.l"
2435 { }
2436 YY_BREAK
2437 case 119:
2438 YY_RULE_SETUP
2439 #line 325 "VPreLex.l"
2440 { return (VP_TEXT); }
2441 YY_BREAK
2442 case 120:
2443 /* rule 120 can match eol */
2444 YY_RULE_SETUP
2445 #line 327 "VPreLex.l"
2446 { yymore(); } /* Prevent hitting ECHO; */
2447 YY_BREAK
2448 case 121:
2449 YY_RULE_SETUP
2450 #line 328 "VPreLex.l"
2451 ECHO;
2452 YY_BREAK
2453 #line 2454 "VPreLex_pretmp.cpp"
2454
2455 case YY_END_OF_BUFFER:
2456 {
2457 /* Amount of text matched not including the EOB char. */
2458 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
2459
2460 /* Undo the effects of YY_DO_BEFORE_ACTION. */
2461 *yy_cp = (yy_hold_char);
2462 YY_RESTORE_YY_MORE_OFFSET
2463
2464 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
2465 {
2466 /* We're scanning a new file or input source. It's
2467 * possible that this happened because the user
2468 * just pointed yyin at a new source and called
2469 * yylex(). If so, then we have to assure
2470 * consistency between YY_CURRENT_BUFFER and our
2471 * globals. Here is the right place to do so, because
2472 * this is the first action (other than possibly a
2473 * back-up) that will match for the new input source.
2474 */
2475 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2476 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
2477 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
2478 }
2479
2480 /* Note that here we test for yy_c_buf_p "<=" to the position
2481 * of the first EOB in the buffer, since yy_c_buf_p will
2482 * already have been incremented past the NUL character
2483 * (since all states make transitions on EOB to the
2484 * end-of-buffer state). Contrast this with the test
2485 * in input().
2486 */
2487 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2488 { /* This was really a NUL. */
2489 yy_state_type yy_next_state;
2490
2491 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
2492
2493 yy_current_state = yy_get_previous_state( );
2494
2495 /* Okay, we're now positioned to make the NUL
2496 * transition. We couldn't have
2497 * yy_get_previous_state() go ahead and do it
2498 * for us because it doesn't know how to deal
2499 * with the possibility of jamming (and we don't
2500 * want to build jamming into it because then it
2501 * will run more slowly).
2502 */
2503
2504 yy_next_state = yy_try_NUL_trans( yy_current_state );
2505
2506 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2507
2508 if ( yy_next_state )
2509 {
2510 /* Consume the NUL. */
2511 yy_cp = ++(yy_c_buf_p);
2512 yy_current_state = yy_next_state;
2513 goto yy_match;
2514 }
2515
2516 else
2517 {
2518 yy_cp = (yy_c_buf_p);
2519 goto yy_find_action;
2520 }
2521 }
2522
2523 else switch ( yy_get_next_buffer( ) )
2524 {
2525 case EOB_ACT_END_OF_FILE:
2526 {
2527 (yy_did_buffer_switch_on_eof) = 0;
2528
2529 if ( yywrap( ) )
2530 {
2531 /* Note: because we've taken care in
2532 * yy_get_next_buffer() to have set up
2533 * yytext, we can now set up
2534 * yy_c_buf_p so that if some total
2535 * hoser (like flex itself) wants to
2536 * call the scanner after we return the
2537 * YY_NULL, it'll still work - another
2538 * YY_NULL will get returned.
2539 */
2540 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
2541
2542 yy_act = YY_STATE_EOF(YY_START);
2543 goto do_action;
2544 }
2545
2546 else
2547 {
2548 if ( ! (yy_did_buffer_switch_on_eof) )
2549 YY_NEW_FILE;
2550 }
2551 break;
2552 }
2553
2554 case EOB_ACT_CONTINUE_SCAN:
2555 (yy_c_buf_p) =
2556 (yytext_ptr) + yy_amount_of_matched_text;
2557
2558 yy_current_state = yy_get_previous_state( );
2559
2560 yy_cp = (yy_c_buf_p);
2561 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2562 goto yy_match;
2563
2564 case EOB_ACT_LAST_MATCH:
2565 (yy_c_buf_p) =
2566 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
2567
2568 yy_current_state = yy_get_previous_state( );
2569
2570 yy_cp = (yy_c_buf_p);
2571 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2572 goto yy_find_action;
2573 }
2574 break;
2575 }
2576
2577 default:
2578 YY_FATAL_ERROR(
2579 "fatal flex scanner internal error--no action found" );
2580 } /* end of action switch */
2581 } /* end of scanning one token */
2582 } /* end of user's declarations */
2583 } /* end of yylex */
2584
2585 /* yy_get_next_buffer - try to read in a new buffer
2586 *
2587 * Returns a code representing an action:
2588 * EOB_ACT_LAST_MATCH -
2589 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2590 * EOB_ACT_END_OF_FILE - end of file
2591 */
2592 static int yy_get_next_buffer (void)
2593 {
2594 char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
2595 char *source = (yytext_ptr);
2596 int number_to_move, i;
2597 int ret_val;
2598
2599 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
2600 YY_FATAL_ERROR(
2601 "fatal flex scanner internal error--end of buffer missed" );
2602
2603 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
2604 { /* Don't try to fill the buffer, so this is an EOF. */
2605 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
2606 {
2607 /* We matched a single character, the EOB, so
2608 * treat this as a final EOF.
2609 */
2610 return EOB_ACT_END_OF_FILE;
2611 }
2612
2613 else
2614 {
2615 /* We matched some text prior to the EOB, first
2616 * process it.
2617 */
2618 return EOB_ACT_LAST_MATCH;
2619 }
2620 }
2621
2622 /* Try to read more data. */
2623
2624 /* First move last chars to start of buffer. */
2625 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
2626
2627 for ( i = 0; i < number_to_move; ++i )
2628 *(dest++) = *(source++);
2629
2630 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2631 /* don't do the read, it's not guaranteed to return an EOF,
2632 * just force an EOF
2633 */
2634 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
2635
2636 else
2637 {
2638 int num_to_read =
2639 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
2640
2641 while ( num_to_read <= 0 )
2642 { /* Not enough room in the buffer - grow it. */
2643
2644 /* just a shorter name for the current buffer */
2645 YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
2646
2647 int yy_c_buf_p_offset =
2648 (int) ((yy_c_buf_p) - b->yy_ch_buf);
2649
2650 if ( b->yy_is_our_buffer )
2651 {
2652 int new_size = b->yy_buf_size * 2;
2653
2654 if ( new_size <= 0 )
2655 b->yy_buf_size += b->yy_buf_size / 8;
2656 else
2657 b->yy_buf_size *= 2;
2658
2659 b->yy_ch_buf = (char *)
2660 /* Include room in for 2 EOB chars. */
2661 yyrealloc( (void *) b->yy_ch_buf,
2662 (yy_size_t) (b->yy_buf_size + 2) );
2663 }
2664 else
2665 /* Can't grow it, we don't own it. */
2666 b->yy_ch_buf = NULL;
2667
2668 if ( ! b->yy_ch_buf )
2669 YY_FATAL_ERROR(
2670 "fatal error - scanner input buffer overflow" );
2671
2672 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
2673
2674 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
2675 number_to_move - 1;
2676
2677 }
2678
2679 if ( num_to_read > YY_READ_BUF_SIZE )
2680 num_to_read = YY_READ_BUF_SIZE;
2681
2682 /* Read in more data. */
2683 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2684 (yy_n_chars), num_to_read );
2685
2686 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2687 }
2688
2689 if ( (yy_n_chars) == 0 )
2690 {
2691 if ( number_to_move == YY_MORE_ADJ )
2692 {
2693 ret_val = EOB_ACT_END_OF_FILE;
2694 yyrestart( yyin );
2695 }
2696
2697 else
2698 {
2699 ret_val = EOB_ACT_LAST_MATCH;
2700 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
2701 YY_BUFFER_EOF_PENDING;
2702 }
2703 }
2704
2705 else
2706 ret_val = EOB_ACT_CONTINUE_SCAN;
2707
2708 if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
2709 /* Extend the array by 50%, plus the number we really need. */
2710 int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
2711 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
2712 (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
2713 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2714 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
2715 /* "- 2" to take care of EOB's */
2716 YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
2717 }
2718
2719 (yy_n_chars) += number_to_move;
2720 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
2721 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
2722
2723 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
2724
2725 return ret_val;
2726 }
2727
2728 /* yy_get_previous_state - get the state just before the EOB char was reached */
2729
2730 static yy_state_type yy_get_previous_state (void)
2731 {
2732 yy_state_type yy_current_state;
2733 char *yy_cp;
2734
2735 yy_current_state = (yy_start);
2736 yy_current_state += YY_AT_BOL();
2737
2738 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
2739 {
2740 YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2741 if ( yy_accept[yy_current_state] )
2742 {
2743 (yy_last_accepting_state) = yy_current_state;
2744 (yy_last_accepting_cpos) = yy_cp;
2745 }
2746 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2747 {
2748 yy_current_state = (int) yy_def[yy_current_state];
2749 if ( yy_current_state >= 692 )
2750 yy_c = yy_meta[yy_c];
2751 }
2752 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
2753 }
2754
2755 return yy_current_state;
2756 }
2757
2758 /* yy_try_NUL_trans - try to make a transition on the NUL character
2759 *
2760 * synopsis
2761 * next_state = yy_try_NUL_trans( current_state );
2762 */
2763 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
2764 {
2765 int yy_is_jam;
2766 char *yy_cp = (yy_c_buf_p);
2767
2768 YY_CHAR yy_c = 1;
2769 if ( yy_accept[yy_current_state] )
2770 {
2771 (yy_last_accepting_state) = yy_current_state;
2772 (yy_last_accepting_cpos) = yy_cp;
2773 }
2774 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2775 {
2776 yy_current_state = (int) yy_def[yy_current_state];
2777 if ( yy_current_state >= 692 )
2778 yy_c = yy_meta[yy_c];
2779 }
2780 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
2781 yy_is_jam = (yy_current_state == 691);
2782
2783 return yy_is_jam ? 0 : yy_current_state;
2784 }
2785
2786 #ifndef YY_NO_UNPUT
2787
2788 static void yyunput (int c, char * yy_bp )
2789 {
2790 char *yy_cp;
2791
2792 yy_cp = (yy_c_buf_p);
2793
2794 /* undo effects of setting up yytext */
2795 *yy_cp = (yy_hold_char);
2796
2797 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2798 { /* need to shift things up to make room */
2799 /* +2 for EOB chars. */
2800 int number_to_move = (yy_n_chars) + 2;
2801 char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
2802 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
2803 char *source =
2804 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
2805
2806 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2807 *--dest = *--source;
2808
2809 yy_cp += (int) (dest - source);
2810 yy_bp += (int) (dest - source);
2811 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
2812 (yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
2813
2814 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2815 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2816 }
2817
2818 *--yy_cp = (char) c;
2819
2820 (yytext_ptr) = yy_bp;
2821 (yy_hold_char) = *yy_cp;
2822 (yy_c_buf_p) = yy_cp;
2823 }
2824
2825 #endif
2826
2827 #ifndef YY_NO_INPUT
2828 #ifdef __cplusplus
2829 static int yyinput (void)
2830 #else
2831 static int input (void)
2832 #endif
2833
2834 {
2835 int c;
2836
2837 *(yy_c_buf_p) = (yy_hold_char);
2838
2839 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
2840 {
2841 /* yy_c_buf_p now points to the character we want to return.
2842 * If this occurs *before* the EOB characters, then it's a
2843 * valid NUL; if not, then we've hit the end of the buffer.
2844 */
2845 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2846 /* This was really a NUL. */
2847 *(yy_c_buf_p) = '\0';
2848
2849 else
2850 { /* need more input */
2851 int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
2852 ++(yy_c_buf_p);
2853
2854 switch ( yy_get_next_buffer( ) )
2855 {
2856 case EOB_ACT_LAST_MATCH:
2857 /* This happens because yy_g_n_b()
2858 * sees that we've accumulated a
2859 * token and flags that we need to
2860 * try matching the token before
2861 * proceeding. But for input(),
2862 * there's no matching to consider.
2863 * So convert the EOB_ACT_LAST_MATCH
2864 * to EOB_ACT_END_OF_FILE.
2865 */
2866
2867 /* Reset buffer status. */
2868 yyrestart( yyin );
2869
2870 /*FALLTHROUGH*/
2871
2872 case EOB_ACT_END_OF_FILE:
2873 {
2874 if ( yywrap( ) )
2875 return 0;
2876
2877 if ( ! (yy_did_buffer_switch_on_eof) )
2878 YY_NEW_FILE;
2879 #ifdef __cplusplus
2880 return yyinput();
2881 #else
2882 return input();
2883 #endif
2884 }
2885
2886 case EOB_ACT_CONTINUE_SCAN:
2887 (yy_c_buf_p) = (yytext_ptr) + offset;
2888 break;
2889 }
2890 }
2891 }
2892
2893 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
2894 *(yy_c_buf_p) = '\0'; /* preserve yytext */
2895 (yy_hold_char) = *++(yy_c_buf_p);
2896
2897 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
2898
2899 return c;
2900 }
2901 #endif /* ifndef YY_NO_INPUT */
2902
2903 /** Immediately switch to a different input stream.
2904 * @param input_file A readable stream.
2905 *
2906 * @note This function does not reset the start condition to @c INITIAL .
2907 */
2908 void yyrestart (FILE * input_file )
2909 {
2910
2911 if ( ! YY_CURRENT_BUFFER ){
2912 yyensure_buffer_stack ();
2913 YY_CURRENT_BUFFER_LVALUE =
2914 yy_create_buffer( yyin, YY_BUF_SIZE );
2915 }
2916
2917 yy_init_buffer( YY_CURRENT_BUFFER, input_file );
2918 yy_load_buffer_state( );
2919 }
2920
2921 /** Switch to a different input buffer.
2922 * @param new_buffer The new input buffer.
2923 *
2924 */
2925 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
2926 {
2927
2928 /* TODO. We should be able to replace this entire function body
2929 * with
2930 * yypop_buffer_state();
2931 * yypush_buffer_state(new_buffer);
2932 */
2933 yyensure_buffer_stack ();
2934 if ( YY_CURRENT_BUFFER == new_buffer )
2935 return;
2936
2937 if ( YY_CURRENT_BUFFER )
2938 {
2939 /* Flush out information for old buffer. */
2940 *(yy_c_buf_p) = (yy_hold_char);
2941 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2942 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2943 }
2944
2945 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2946 yy_load_buffer_state( );
2947
2948 /* We don't actually know whether we did this switch during
2949 * EOF (yywrap()) processing, but the only time this flag
2950 * is looked at is after yywrap() is called, so it's safe
2951 * to go ahead and always set it.
2952 */
2953 (yy_did_buffer_switch_on_eof) = 1;
2954 }
2955
2956 static void yy_load_buffer_state (void)
2957 {
2958 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2959 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2960 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2961 (yy_hold_char) = *(yy_c_buf_p);
2962 }
2963
2964 /** Allocate and initialize an input buffer state.
2965 * @param file A readable stream.
2966 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2967 *
2968 * @return the allocated buffer state.
2969 */
2970 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
2971 {
2972 YY_BUFFER_STATE b;
2973
2974 b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
2975 if ( ! b )
2976 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2977
2978 b->yy_buf_size = size;
2979
2980 /* yy_ch_buf has to be 2 characters longer than the size given because
2981 * we need to put in 2 end-of-buffer characters.
2982 */
2983 b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
2984 if ( ! b->yy_ch_buf )
2985 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2986
2987 b->yy_is_our_buffer = 1;
2988
2989 yy_init_buffer( b, file );
2990
2991 return b;
2992 }
2993
2994 /** Destroy the buffer.
2995 * @param b a buffer created with yy_create_buffer()
2996 *
2997 */
2998 void yy_delete_buffer (YY_BUFFER_STATE b )
2999 {
3000
3001 if ( ! b )
3002 return;
3003
3004 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
3005 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
3006
3007 if ( b->yy_is_our_buffer )
3008 yyfree( (void *) b->yy_ch_buf );
3009
3010 yyfree( (void *) b );
3011 }
3012
3013 /* Initializes or reinitializes a buffer.
3014 * This function is sometimes called more than once on the same buffer,
3015 * such as during a yyrestart() or at EOF.
3016 */
3017 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
3018
3019 {
3020 int oerrno = errno;
3021
3022 yy_flush_buffer( b );
3023
3024 b->yy_input_file = file;
3025 b->yy_fill_buffer = 1;
3026
3027 /* If b is the current buffer, then yy_init_buffer was _probably_
3028 * called from yyrestart() or through yy_get_next_buffer.
3029 * In that case, we don't want to reset the lineno or column.
3030 */
3031 if (b != YY_CURRENT_BUFFER){
3032 b->yy_bs_lineno = 1;
3033 b->yy_bs_column = 0;
3034 }
3035
3036 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
3037
3038 errno = oerrno;
3039 }
3040
3041 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
3042 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
3043 *
3044 */
3045 void yy_flush_buffer (YY_BUFFER_STATE b )
3046 {
3047 if ( ! b )
3048 return;
3049
3050 b->yy_n_chars = 0;
3051
3052 /* We always need two end-of-buffer characters. The first causes
3053 * a transition to the end-of-buffer state. The second causes
3054 * a jam in that state.
3055 */
3056 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
3057 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
3058
3059 b->yy_buf_pos = &b->yy_ch_buf[0];
3060
3061 b->yy_at_bol = 1;
3062 b->yy_buffer_status = YY_BUFFER_NEW;
3063
3064 if ( b == YY_CURRENT_BUFFER )
3065 yy_load_buffer_state( );
3066 }
3067
3068 /** Pushes the new state onto the stack. The new state becomes
3069 * the current state. This function will allocate the stack
3070 * if necessary.
3071 * @param new_buffer The new state.
3072 *
3073 */
3074 void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
3075 {
3076 if (new_buffer == NULL)
3077 return;
3078
3079 yyensure_buffer_stack();
3080
3081 /* This block is copied from yy_switch_to_buffer. */
3082 if ( YY_CURRENT_BUFFER )
3083 {
3084 /* Flush out information for old buffer. */
3085 *(yy_c_buf_p) = (yy_hold_char);
3086 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
3087 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
3088 }
3089
3090 /* Only push if top exists. Otherwise, replace top. */
3091 if (YY_CURRENT_BUFFER)
3092 (yy_buffer_stack_top)++;
3093 YY_CURRENT_BUFFER_LVALUE = new_buffer;
3094
3095 /* copied from yy_switch_to_buffer. */
3096 yy_load_buffer_state( );
3097 (yy_did_buffer_switch_on_eof) = 1;
3098 }
3099
3100 /** Removes and deletes the top of the stack, if present.
3101 * The next element becomes the new top.
3102 *
3103 */
3104 void yypop_buffer_state (void)
3105 {
3106 if (!YY_CURRENT_BUFFER)
3107 return;
3108
3109 yy_delete_buffer(YY_CURRENT_BUFFER );
3110 YY_CURRENT_BUFFER_LVALUE = NULL;
3111 if ((yy_buffer_stack_top) > 0)
3112 --(yy_buffer_stack_top);
3113
3114 if (YY_CURRENT_BUFFER) {
3115 yy_load_buffer_state( );
3116 (yy_did_buffer_switch_on_eof) = 1;
3117 }
3118 }
3119
3120 /* Allocates the stack if it does not exist.
3121 * Guarantees space for at least one push.
3122 */
3123 static void yyensure_buffer_stack (void)
3124 {
3125 yy_size_t num_to_alloc;
3126
3127 if (!(yy_buffer_stack)) {
3128
3129 /* First allocation is just for 2 elements, since we don't know if this
3130 * scanner will even need a stack. We use 2 instead of 1 to avoid an
3131 * immediate realloc on the next call.
3132 */
3133 num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
3134 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
3135 (num_to_alloc * sizeof(struct yy_buffer_state*)
3136 );
3137 if ( ! (yy_buffer_stack) )
3138 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
3139
3140 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
3141
3142 (yy_buffer_stack_max) = num_to_alloc;
3143 (yy_buffer_stack_top) = 0;
3144 return;
3145 }
3146
3147 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
3148
3149 /* Increase the buffer to prepare for a possible push. */
3150 yy_size_t grow_size = 8 /* arbitrary grow size */;
3151
3152 num_to_alloc = (yy_buffer_stack_max) + grow_size;
3153 (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
3154 ((yy_buffer_stack),
3155 num_to_alloc * sizeof(struct yy_buffer_state*)
3156 );
3157 if ( ! (yy_buffer_stack) )
3158 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
3159
3160 /* zero only the new slots.*/
3161 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
3162 (yy_buffer_stack_max) = num_to_alloc;
3163 }
3164 }
3165
3166 /** Setup the input buffer state to scan directly from a user-specified character buffer.
3167 * @param base the character buffer
3168 * @param size the size in bytes of the character buffer
3169 *
3170 * @return the newly allocated buffer state object.
3171 */
3172 YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
3173 {
3174 YY_BUFFER_STATE b;
3175
3176 if ( size < 2 ||
3177 base[size-2] != YY_END_OF_BUFFER_CHAR ||
3178 base[size-1] != YY_END_OF_BUFFER_CHAR )
3179 /* They forgot to leave room for the EOB's. */
3180 return NULL;
3181
3182 b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
3183 if ( ! b )
3184 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
3185
3186 b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
3187 b->yy_buf_pos = b->yy_ch_buf = base;
3188 b->yy_is_our_buffer = 0;
3189 b->yy_input_file = NULL;
3190 b->yy_n_chars = b->yy_buf_size;
3191 b->yy_is_interactive = 0;
3192 b->yy_at_bol = 1;
3193 b->yy_fill_buffer = 0;
3194 b->yy_buffer_status = YY_BUFFER_NEW;
3195
3196 yy_switch_to_buffer( b );
3197
3198 return b;
3199 }
3200
3201 /** Setup the input buffer state to scan a string. The next call to yylex() will
3202 * scan from a @e copy of @a str.
3203 * @param yystr a NUL-terminated string to scan
3204 *
3205 * @return the newly allocated buffer state object.
3206 * @note If you want to scan bytes that may contain NUL values, then use
3207 * yy_scan_bytes() instead.
3208 */
3209 YY_BUFFER_STATE yy_scan_string (const char * yystr )
3210 {
3211
3212 return yy_scan_bytes( yystr, (int) strlen(yystr) );
3213 }
3214
3215 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
3216 * scan from a @e copy of @a bytes.
3217 * @param yybytes the byte buffer to scan
3218 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
3219 *
3220 * @return the newly allocated buffer state object.
3221 */
3222 YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
3223 {
3224 YY_BUFFER_STATE b;
3225 char *buf;
3226 yy_size_t n;
3227 int i;
3228
3229 /* Get memory for full buffer, including space for trailing EOB's. */
3230 n = (yy_size_t) (_yybytes_len + 2);
3231 buf = (char *) yyalloc( n );
3232 if ( ! buf )
3233 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
3234
3235 for ( i = 0; i < _yybytes_len; ++i )
3236 buf[i] = yybytes[i];
3237
3238 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
3239
3240 b = yy_scan_buffer( buf, n );
3241 if ( ! b )
3242 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
3243
3244 /* It's okay to grow etc. this buffer, and we should throw it
3245 * away when we're done.
3246 */
3247 b->yy_is_our_buffer = 1;
3248
3249 return b;
3250 }
3251
3252 static void yy_push_state (int _new_state )
3253 {
3254 if ( (yy_start_stack_ptr) >= (yy_start_stack_depth) )
3255 {
3256 yy_size_t new_size;
3257
3258 (yy_start_stack_depth) += YY_START_STACK_INCR;
3259 new_size = (yy_size_t) (yy_start_stack_depth) * sizeof( int );
3260
3261 if ( ! (yy_start_stack) )
3262 (yy_start_stack) = (int *) yyalloc( new_size );
3263
3264 else
3265 (yy_start_stack) = (int *) yyrealloc(
3266 (void *) (yy_start_stack), new_size );
3267
3268 if ( ! (yy_start_stack) )
3269 YY_FATAL_ERROR( "out of memory expanding start-condition stack" );
3270 }
3271
3272 (yy_start_stack)[(yy_start_stack_ptr)++] = YY_START;
3273
3274 BEGIN(_new_state);
3275 }
3276
3277 static void yy_pop_state (void)
3278 {
3279 if ( --(yy_start_stack_ptr) < 0 )
3280 YY_FATAL_ERROR( "start-condition stack underflow" );
3281
3282 BEGIN((yy_start_stack)[(yy_start_stack_ptr)]);
3283 }
3284
3285 static int yy_top_state (void)
3286 {
3287 return (yy_start_stack)[(yy_start_stack_ptr) - 1];
3288 }
3289
3290 #ifndef YY_EXIT_FAILURE
3291 #define YY_EXIT_FAILURE 2
3292 #endif
3293
3294 static void yynoreturn yy_fatal_error (const char* msg )
3295 {
3296 fprintf( stderr, "%s\n", msg );
3297 exit( YY_EXIT_FAILURE );
3298 }
3299
3300 /* Redefine yyless() so it works in section 3 code. */
3301
3302 #undef yyless
3303 #define yyless(n) \
3304 do \
3305 { \
3306 /* Undo effects of setting up yytext. */ \
3307 int yyless_macro_arg = (n); \
3308 YY_LESS_LINENO(yyless_macro_arg);\
3309 yytext[yyleng] = (yy_hold_char); \
3310 (yy_c_buf_p) = yytext + yyless_macro_arg; \
3311 (yy_hold_char) = *(yy_c_buf_p); \
3312 *(yy_c_buf_p) = '\0'; \
3313 yyleng = yyless_macro_arg; \
3314 } \
3315 while ( 0 )
3316
3317 /* Accessor methods (get/set functions) to struct members. */
3318
3319 /** Get the current line number.
3320 *
3321 */
3322 int yyget_lineno (void)
3323 {
3324
3325 return yylineno;
3326 }
3327
3328 /** Get the input stream.
3329 *
3330 */
3331 FILE *yyget_in (void)
3332 {
3333 return yyin;
3334 }
3335
3336 /** Get the output stream.
3337 *
3338 */
3339 FILE *yyget_out (void)
3340 {
3341 return yyout;
3342 }
3343
3344 /** Get the length of the current token.
3345 *
3346 */
3347 int yyget_leng (void)
3348 {
3349 return yyleng;
3350 }
3351
3352 /** Get the current token.
3353 *
3354 */
3355
3356 char *yyget_text (void)
3357 {
3358 return yytext;
3359 }
3360
3361 /** Set the current line number.
3362 * @param _line_number line number
3363 *
3364 */
3365 void yyset_lineno (int _line_number )
3366 {
3367
3368 yylineno = _line_number;
3369 }
3370
3371 /** Set the input stream. This does not discard the current
3372 * input buffer.
3373 * @param _in_str A readable stream.
3374 *
3375 * @see yy_switch_to_buffer
3376 */
3377 void yyset_in (FILE * _in_str )
3378 {
3379 yyin = _in_str ;
3380 }
3381
3382 void yyset_out (FILE * _out_str )
3383 {
3384 yyout = _out_str ;
3385 }
3386
3387 int yyget_debug (void)
3388 {
3389 return yy_flex_debug;
3390 }
3391
3392 void yyset_debug (int _bdebug )
3393 {
3394 yy_flex_debug = _bdebug ;
3395 }
3396
3397 static int yy_init_globals (void)
3398 {
3399 /* Initialization is the same as for the non-reentrant scanner.
3400 * This function is called from yylex_destroy(), so don't allocate here.
3401 */
3402
3403 (yy_buffer_stack) = NULL;
3404 (yy_buffer_stack_top) = 0;
3405 (yy_buffer_stack_max) = 0;
3406 (yy_c_buf_p) = NULL;
3407 (yy_init) = 0;
3408 (yy_start) = 0;
3409
3410 (yy_start_stack_ptr) = 0;
3411 (yy_start_stack_depth) = 0;
3412 (yy_start_stack) = NULL;
3413
3414 /* Defined in main.c */
3415 #ifdef YY_STDINIT
3416 yyin = stdin;
3417 yyout = stdout;
3418 #else
3419 yyin = NULL;
3420 yyout = NULL;
3421 #endif
3422
3423 /* For future reference: Set errno on error, since we are called by
3424 * yylex_init()
3425 */
3426 return 0;
3427 }
3428
3429 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
3430 int yylex_destroy (void)
3431 {
3432
3433 /* Pop the buffer stack, destroying each element. */
3434 while(YY_CURRENT_BUFFER){
3435 yy_delete_buffer( YY_CURRENT_BUFFER );
3436 YY_CURRENT_BUFFER_LVALUE = NULL;
3437 yypop_buffer_state();
3438 }
3439
3440 /* Destroy the stack itself. */
3441 yyfree((yy_buffer_stack) );
3442 (yy_buffer_stack) = NULL;
3443
3444 /* Destroy the start condition stack. */
3445 yyfree( (yy_start_stack) );
3446 (yy_start_stack) = NULL;
3447
3448 /* Reset the globals. This is important in a non-reentrant scanner so the next time
3449 * yylex() is called, initialization will occur. */
3450 yy_init_globals( );
3451
3452 return 0;
3453 }
3454
3455 /*
3456 * Internal utility routines.
3457 */
3458
3459 #ifndef yytext_ptr
3460 static void yy_flex_strncpy (char* s1, const char * s2, int n )
3461 {
3462
3463 int i;
3464 for ( i = 0; i < n; ++i )
3465 s1[i] = s2[i];
3466 }
3467 #endif
3468
3469 #ifdef YY_NEED_STRLEN
3470 static int yy_flex_strlen (const char * s )
3471 {
3472 int n;
3473 for ( n = 0; s[n]; ++n )
3474 ;
3475
3476 return n;
3477 }
3478 #endif
3479
3480 void *yyalloc (yy_size_t size )
3481 {
3482 return malloc(size);
3483 }
3484
3485 void *yyrealloc (void * ptr, yy_size_t size )
3486 {
3487
3488 /* The cast to (char *) in the following accommodates both
3489 * implementations that use char* generic pointers, and those
3490 * that use void* generic pointers. It works with the latter
3491 * because both ANSI C and C++ allow castless assignment from
3492 * any pointer type to void*, and deal with argument conversions
3493 * as though doing an assignment.
3494 */
3495 return realloc(ptr, size);
3496 }
3497
3498 void yyfree (void * ptr )
3499 {
3500 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
3501 }
3502
3503 #define YYTABLES_NAME "yytables"
3504
3505 #line 328 "VPreLex.l"
3506
3507
3508 void VPreLex::pushStateDefArg(int level) {
3509 // Enter define substitution argument state
3510 yy_push_state(ARGMODE);
3511 m_parenLevel = level;
3512 m_defValue = "";
3513 }
3514
3515 void VPreLex::pushStateDefForm() {
3516 // Enter define formal arguments state
3517 yy_push_state(DEFFPAR); // First is an optional ( to begin args
3518 m_parenLevel = 0;
3519 m_defValue = "";
3520 }
3521
3522 void VPreLex::pushStateDefValue() {
3523 // Enter define value state
3524 yy_push_state(DEFVAL);
3525 m_parenLevel = 0;
3526 m_defValue = "";
3527 }
3528
3529 void VPreLex::pushStateIncFilename() {
3530 // Enter include <> filename state
3531 yy_push_state(INCMODE);
3532 yymore();
3533 }
3534
3535 void VPreLex::debug(int level) {
3536 #ifdef FLEX_DEBUG
3537 yy_flex_debug=level;
3538 #endif
3539 }
3540 int VPreLex::debug() {
3541 #ifdef FLEX_DEBUG
3542 return yy_flex_debug;
3543 #else
3544 return 0;
3545 #endif
3546 }
3547
3548 int VPreLex::lex() {
3549 VPreLex::s_currentLexp = this; // Tell parser where to get/put data
3550 m_tokFilelinep = curFilelinep(); // Remember token start location, may be updated by the lexer later
3551 return yylex();
3552 }
3553
3554 size_t VPreLex::inputToLex(char* buf, size_t max_size) {
3555 // We need a custom YY_INPUT because we can't use flex buffers.
3556 // Flex buffers are limited to 2GB, and we can't chop into 2G pieces
3557 // because buffers can't end in the middle of tokens.
3558 // Note if we switched streams here (which we don't) "buf" would be
3559 // become a stale invalid pointer.
3560 //
3561 VPreStream* streamp = curStreamp();
3562 if (debug()>=10) { cout<<"- pp:inputToLex ITL s="<<max_size<<" bs="<<streamp->m_buffers.size()<<endl; dumpStack(); }
3563 // For testing, use really small chunks
3564 //if (max_size > 13) max_size=13;
3565 again:
3566 size_t got = 0;
3567 // Get from this stream
3568 while (got < max_size // Haven't got enough
3569 && !streamp->m_buffers.empty()) { // And something buffered
3570 string front = curStreamp()->m_buffers.front(); streamp->m_buffers.pop_front();
3571 size_t len = front.length();
3572 if (len > (max_size-got)) { // Front string too big
3573 len = (max_size-got);
3574 string remainder = front.substr(len);
3575 front = front.substr(0, len);
3576 streamp->m_buffers.push_front(remainder); // Put back remainder for next time
3577 }
3578 strncpy(buf+got, front.c_str(), len);
3579 got += len;
3580 }
3581 if (!got) { // end of stream; try "above" file
3582 bool again=false;
3583 string forceOut = endOfStream(again/*ref*/);
3584 streamp = curStreamp(); // May have been updated
3585 if (forceOut != "") {
3586 if (forceOut.length() > max_size) {
3587 yyerrorf("Output buffer too small for a `line");
3588 } else {
3589 got = forceOut.length();
3590 strncpy(buf, forceOut.c_str(), got);
3591 }
3592 } else {
3593 if (streamp->m_eof) {
3594 if (debug()) cout<<"- EOF\n";
3595 }
3596 got = 0; // 0=EOF/EOS - although got was already 0.
3597 if (again) goto again;
3598 }
3599 }
3600 if (debug()>=10) { cout<<"- pp::inputToLex got="<<got<<" '"<<string(buf,got)<<"'"<<endl; }
3601 return got;
3602 }
3603
3604 string VPreLex::endOfStream(bool& againr) {
3605 // Switch to file or next unputString
3606 againr = false;
3607 if (debug()) cout<<"-EOS state="<<curStreamp()->m_termState<<" at "<<curFilelinep()<<endl;
3608 if (curStreamp()->m_eof) return ""; // Don't delete the final "EOF" stream
3609 bool exited_file = curStreamp()->m_file;
3610 if (!exited_file) {
3611 // Midpoint of stream, just change buffers
3612 delete curStreamp();
3613 m_streampStack.pop(); // Must work as size>1; EOF is entry 0
3614 againr = true;
3615 return "";
3616 }
3617 // Multiple steps because we need FLEX to see ending \n and EOS to end
3618 // any illegal states, like an unterminated `protected region
3619 else if (!curStreamp()->m_termState) {
3620 // First shutdown phase for a file
3621 // Terminate all files with a newline. This prevents problems if
3622 // the user had a define without a terminating newline,
3623 // otherwise the resumed file's next line would get tacked on.
3624 // Also makes it likely the `line that changes files comes out
3625 // immediately.
3626 curStreamp()->m_termState = 1;
3627 return "\n"; // Exit old file
3628 }
3629 else if (curStreamp()->m_termState == 1) {
3630 // Now the EOF - can't be sent with other characters
3631 curStreamp()->m_termState = 2;
3632 return ""; // End of file
3633 }
3634 else if (curStreamp()->m_termState == 2) {
3635 // Now ending `line
3636 curStreamp()->m_termState = 3;
3637 return curFilelinep()->lineDirectiveStrg(2); // Exit old file
3638 }
3639 else {
3640 // Final shutdown phase for a stream, we can finally change the
3641 // current fileline to the new stream
3642 curStreamp()->m_termState = 0;
3643 VFileLine* filelinep = curFilelinep();
3644 delete curStreamp();
3645 m_streampStack.pop(); // Must work as size>1; EOF is entry 0
3646 if (curStreamp()->m_eof) {
3647 // EOF doesn't have a "real" fileline, but a linenumber of 0 from init time
3648 // Inherit whatever we last parsed so it's more obvious.
3649 curFilelinep(filelinep);
3650 }
3651 // The caller parser remembered the start location for the text we are parsing,
3652 // but we've discovered there was a file switch along the way, so update it.
3653 m_tokFilelinep = curFilelinep();
3654 //
3655 if (curStreamp()->m_eof) {
3656 return "";
3657 } else {
3658 return curFilelinep()->lineDirectiveStrg(0); // Reenter resumed file
3659 }
3660 }
3661 }
3662
3663 void VPreLex::initFirstBuffer(VFileLine* filelinep) {
3664 // Called from constructor to make first buffer
3665 // yy_create_buffer also sets yy_fill_buffer=1 so reads from YY_INPUT
3666 VPreStream* streamp = new VPreStream(filelinep, this);
3667 streamp->m_eof = true;
3668 m_streampStack.push(streamp);
3669 //
3670 m_bufferState = yy_create_buffer(NULL, YY_BUF_SIZE);
3671 yy_switch_to_buffer(m_bufferState);
3672 yyrestart(NULL);
3673 }
3674
3675 void VPreLex::scanNewFile(VFileLine* filelinep) {
3676 // Called on new open file. scanBytesBack will be called next.
3677 if (streamDepth() > VPreProc::DEFINE_RECURSION_LEVEL_MAX) {
3678 // The recursive `include in VPreProcImp should trigger first
3679 yyerrorf("Recursive `define or other nested inclusion");
3680 curStreamp()->m_eof = true; // Fake it to stop recursion
3681 } else {
3682 VPreStream* streamp = new VPreStream(filelinep, this);
3683 m_tokFilelinep = curFilelinep();
3684 streamp->m_file = true;
3685 scanSwitchStream(streamp);
3686 }
3687 }
3688
3689 void VPreLex::scanBytes(const string& str) {
3690 // Note buffers also appended in ::scanBytesBack
3691 // Not "m_buffers.push_front(string(strp,len))" as we need a `define
3692 // to take effect immediately, in the middle of the current buffer
3693 // Also we don't use scan_bytes that would set yy_fill_buffer
3694 // which would force Flex to bypass our YY_INPUT routine.
3695 if (streamDepth() > VPreProc::DEFINE_RECURSION_LEVEL_MAX) {
3696 // More streams if recursive `define with complex insertion
3697 // More buffers mostly if something internal goes funky
3698 yyerrorf("Recursive `define or other nested inclusion");
3699 curStreamp()->m_eof = true; // Fake it to stop recursion
3700 } else {
3701 VPreStream* streamp = new VPreStream(curFilelinep(), this);
3702 streamp->m_buffers.push_front(str);
3703 scanSwitchStream(streamp);
3704 }
3705 }
3706
3707 void VPreLex::scanSwitchStream(VPreStream* streamp) {
3708 curStreamp()->m_buffers.push_front(currentUnreadChars());
3709 m_streampStack.push(streamp);
3710 yyrestart(NULL);
3711 }
3712
3713 void VPreLex::scanBytesBack(const string& str) {
3714 // Initial creation, that will pull from YY_INPUT==inputToLex
3715 // Note buffers also appended in ::scanBytes
3716 if (curStreamp()->m_eof) yyerrorf("scanBytesBack without being under scanNewFile");
3717 curStreamp()->m_buffers.push_back(str);
3718 }
3719
3720 string VPreLex::currentUnreadChars() {
3721 // WARNING - Peeking at internals
3722 if (!currentBuffer()) return "";
3723 ssize_t left = (yy_n_chars - (yy_c_buf_p - currentBuffer()->yy_ch_buf));
3724 if (left > 0) { // left may be -1 at EOS
3725 *(yy_c_buf_p) = (yy_hold_char);
3726 return string(yy_c_buf_p, left);
3727 } else {
3728 return "";
3729 }
3730 }
3731
3732 YY_BUFFER_STATE VPreLex::currentBuffer() {
3733 return YY_CURRENT_BUFFER;
3734 }
3735
3736 int VPreLex::currentStartState() {
3737 return YY_START;
3738 }
3739
3740 void VPreLex::dumpSummary() {
3741 cout<<"- pp::dumpSummary curBuf="<<(void*)(currentBuffer());
3742 #ifdef FLEX_DEBUG // Else peeking at internals may cause portability issues
3743 ssize_t left = (yy_n_chars
3744 - (yy_c_buf_p
3745 -currentBuffer()->yy_ch_buf));
3746 cout<<" left="<<dec<<left;
3747 #endif
3748 cout<<endl;
3749 }
3750
3751 void VPreLex::dumpStack() {
3752 // For debug use
3753 dumpSummary();
3754 stack<VPreStream*> tmpstack = LEXP->m_streampStack;
3755 while (!tmpstack.empty()) {
3756 VPreStream* streamp = tmpstack.top();
3757 cout<<"- bufferStack["<<(void*)(streamp)<<"]: "
3758 <<" at="<<streamp->m_curFilelinep
3759 <<" nBuf="<<streamp->m_buffers.size()
3760 <<" size0="<<(streamp->m_buffers.empty() ? 0 : streamp->m_buffers.front().length())
3761 <<(streamp->m_eof?" [EOF]":"")
3762 <<(streamp->m_file?" [FILE]":"");
3763 cout<<endl;
3764 tmpstack.pop();
3765 }
3766 }
3767
3768 string VPreLex::cleanDbgStrg(const string& in) {
3769 string out = in;
3770 string::size_type pos;
3771 while ((pos=out.find("\n")) != string::npos) { out.replace(pos, 1, "\\n"); }
3772 while ((pos=out.find("\r")) != string::npos) { out.replace(pos, 1, "\\r"); }
3773 return out;
3774 }
3775
3776 void VPreLex::unused() {
3777 if (0) {
3778 // Prevent unused warnings
3779 yy_top_state();
3780 }
3781 }
3782
3783 /*###################################################################
3784 * Local Variables:
3785 * mode: C++
3786 * End:
3787 */
3788