1 #line 2 "scanaut.cc"
2 #include "config.h"
3
4 #line 5 "scanaut.cc"
5
6 #define YY_INT_ALIGNED short int
7
8 /* A lexical scanner generated by flex */
9
10 #define FLEX_SCANNER
11 #define YY_FLEX_MAJOR_VERSION 2
12 #define YY_FLEX_MINOR_VERSION 6
13 #define YY_FLEX_SUBMINOR_VERSION 4
14 #if YY_FLEX_SUBMINOR_VERSION > 0
15 #define FLEX_BETA
16 #endif
17
18 #ifdef yy_create_buffer
19 #define hoayy_create_buffer_ALREADY_DEFINED
20 #else
21 #define yy_create_buffer hoayy_create_buffer
22 #endif
23
24 #ifdef yy_delete_buffer
25 #define hoayy_delete_buffer_ALREADY_DEFINED
26 #else
27 #define yy_delete_buffer hoayy_delete_buffer
28 #endif
29
30 #ifdef yy_scan_buffer
31 #define hoayy_scan_buffer_ALREADY_DEFINED
32 #else
33 #define yy_scan_buffer hoayy_scan_buffer
34 #endif
35
36 #ifdef yy_scan_string
37 #define hoayy_scan_string_ALREADY_DEFINED
38 #else
39 #define yy_scan_string hoayy_scan_string
40 #endif
41
42 #ifdef yy_scan_bytes
43 #define hoayy_scan_bytes_ALREADY_DEFINED
44 #else
45 #define yy_scan_bytes hoayy_scan_bytes
46 #endif
47
48 #ifdef yy_init_buffer
49 #define hoayy_init_buffer_ALREADY_DEFINED
50 #else
51 #define yy_init_buffer hoayy_init_buffer
52 #endif
53
54 #ifdef yy_flush_buffer
55 #define hoayy_flush_buffer_ALREADY_DEFINED
56 #else
57 #define yy_flush_buffer hoayy_flush_buffer
58 #endif
59
60 #ifdef yy_load_buffer_state
61 #define hoayy_load_buffer_state_ALREADY_DEFINED
62 #else
63 #define yy_load_buffer_state hoayy_load_buffer_state
64 #endif
65
66 #ifdef yy_switch_to_buffer
67 #define hoayy_switch_to_buffer_ALREADY_DEFINED
68 #else
69 #define yy_switch_to_buffer hoayy_switch_to_buffer
70 #endif
71
72 #ifdef yypush_buffer_state
73 #define hoayypush_buffer_state_ALREADY_DEFINED
74 #else
75 #define yypush_buffer_state hoayypush_buffer_state
76 #endif
77
78 #ifdef yypop_buffer_state
79 #define hoayypop_buffer_state_ALREADY_DEFINED
80 #else
81 #define yypop_buffer_state hoayypop_buffer_state
82 #endif
83
84 #ifdef yyensure_buffer_stack
85 #define hoayyensure_buffer_stack_ALREADY_DEFINED
86 #else
87 #define yyensure_buffer_stack hoayyensure_buffer_stack
88 #endif
89
90 #ifdef yylex
91 #define hoayylex_ALREADY_DEFINED
92 #else
93 #define yylex hoayylex
94 #endif
95
96 #ifdef yyrestart
97 #define hoayyrestart_ALREADY_DEFINED
98 #else
99 #define yyrestart hoayyrestart
100 #endif
101
102 #ifdef yylex_init
103 #define hoayylex_init_ALREADY_DEFINED
104 #else
105 #define yylex_init hoayylex_init
106 #endif
107
108 #ifdef yylex_init_extra
109 #define hoayylex_init_extra_ALREADY_DEFINED
110 #else
111 #define yylex_init_extra hoayylex_init_extra
112 #endif
113
114 #ifdef yylex_destroy
115 #define hoayylex_destroy_ALREADY_DEFINED
116 #else
117 #define yylex_destroy hoayylex_destroy
118 #endif
119
120 #ifdef yyget_debug
121 #define hoayyget_debug_ALREADY_DEFINED
122 #else
123 #define yyget_debug hoayyget_debug
124 #endif
125
126 #ifdef yyset_debug
127 #define hoayyset_debug_ALREADY_DEFINED
128 #else
129 #define yyset_debug hoayyset_debug
130 #endif
131
132 #ifdef yyget_extra
133 #define hoayyget_extra_ALREADY_DEFINED
134 #else
135 #define yyget_extra hoayyget_extra
136 #endif
137
138 #ifdef yyset_extra
139 #define hoayyset_extra_ALREADY_DEFINED
140 #else
141 #define yyset_extra hoayyset_extra
142 #endif
143
144 #ifdef yyget_in
145 #define hoayyget_in_ALREADY_DEFINED
146 #else
147 #define yyget_in hoayyget_in
148 #endif
149
150 #ifdef yyset_in
151 #define hoayyset_in_ALREADY_DEFINED
152 #else
153 #define yyset_in hoayyset_in
154 #endif
155
156 #ifdef yyget_out
157 #define hoayyget_out_ALREADY_DEFINED
158 #else
159 #define yyget_out hoayyget_out
160 #endif
161
162 #ifdef yyset_out
163 #define hoayyset_out_ALREADY_DEFINED
164 #else
165 #define yyset_out hoayyset_out
166 #endif
167
168 #ifdef yyget_leng
169 #define hoayyget_leng_ALREADY_DEFINED
170 #else
171 #define yyget_leng hoayyget_leng
172 #endif
173
174 #ifdef yyget_text
175 #define hoayyget_text_ALREADY_DEFINED
176 #else
177 #define yyget_text hoayyget_text
178 #endif
179
180 #ifdef yyget_lineno
181 #define hoayyget_lineno_ALREADY_DEFINED
182 #else
183 #define yyget_lineno hoayyget_lineno
184 #endif
185
186 #ifdef yyset_lineno
187 #define hoayyset_lineno_ALREADY_DEFINED
188 #else
189 #define yyset_lineno hoayyset_lineno
190 #endif
191
192 #ifdef yyget_column
193 #define hoayyget_column_ALREADY_DEFINED
194 #else
195 #define yyget_column hoayyget_column
196 #endif
197
198 #ifdef yyset_column
199 #define hoayyset_column_ALREADY_DEFINED
200 #else
201 #define yyset_column hoayyset_column
202 #endif
203
204 #ifdef yywrap
205 #define hoayywrap_ALREADY_DEFINED
206 #else
207 #define yywrap hoayywrap
208 #endif
209
210 #ifdef yyalloc
211 #define hoayyalloc_ALREADY_DEFINED
212 #else
213 #define yyalloc hoayyalloc
214 #endif
215
216 #ifdef yyrealloc
217 #define hoayyrealloc_ALREADY_DEFINED
218 #else
219 #define yyrealloc hoayyrealloc
220 #endif
221
222 #ifdef yyfree
223 #define hoayyfree_ALREADY_DEFINED
224 #else
225 #define yyfree hoayyfree
226 #endif
227
228 /* First, we deal with platform-specific or compiler-specific issues. */
229
230 /* begin standard C headers. */
231 #include <stdio.h>
232 #include <string.h>
233 #include <errno.h>
234 #include <stdlib.h>
235
236 /* end standard C headers. */
237
238 /* flex integer type definitions */
239
240 #ifndef FLEXINT_H
241 #define FLEXINT_H
242
243 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
244
245 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
246
247 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
248 * if you want the limit (max/min) macros for int types.
249 */
250 #ifndef __STDC_LIMIT_MACROS
251 #define __STDC_LIMIT_MACROS 1
252 #endif
253
254 #include <inttypes.h>
255 typedef int8_t flex_int8_t;
256 typedef uint8_t flex_uint8_t;
257 typedef int16_t flex_int16_t;
258 typedef uint16_t flex_uint16_t;
259 typedef int32_t flex_int32_t;
260 typedef uint32_t flex_uint32_t;
261 #else
262 typedef signed char flex_int8_t;
263 typedef short int flex_int16_t;
264 typedef int flex_int32_t;
265 typedef unsigned char flex_uint8_t;
266 typedef unsigned short int flex_uint16_t;
267 typedef unsigned int flex_uint32_t;
268
269 /* Limits of integral types. */
270 #ifndef INT8_MIN
271 #define INT8_MIN (-128)
272 #endif
273 #ifndef INT16_MIN
274 #define INT16_MIN (-32767-1)
275 #endif
276 #ifndef INT32_MIN
277 #define INT32_MIN (-2147483647-1)
278 #endif
279 #ifndef INT8_MAX
280 #define INT8_MAX (127)
281 #endif
282 #ifndef INT16_MAX
283 #define INT16_MAX (32767)
284 #endif
285 #ifndef INT32_MAX
286 #define INT32_MAX (2147483647)
287 #endif
288 #ifndef UINT8_MAX
289 #define UINT8_MAX (255U)
290 #endif
291 #ifndef UINT16_MAX
292 #define UINT16_MAX (65535U)
293 #endif
294 #ifndef UINT32_MAX
295 #define UINT32_MAX (4294967295U)
296 #endif
297
298 #ifndef SIZE_MAX
299 #define SIZE_MAX (~(size_t)0)
300 #endif
301
302 #endif /* ! C99 */
303
304 #endif /* ! FLEXINT_H */
305
306 /* begin standard C++ headers. */
307
308 /* TODO: this is always defined, so inline it */
309 #define yyconst const
310
311 #if defined(__GNUC__) && __GNUC__ >= 3
312 #define yynoreturn __attribute__((__noreturn__))
313 #else
314 #define yynoreturn
315 #endif
316
317 /* Returned upon end-of-file. */
318 #define YY_NULL 0
319
320 /* Promotes a possibly negative, possibly signed char to an
321 * integer in range [0..255] for use as an array index.
322 */
323 #define YY_SC_TO_UI(c) ((YY_CHAR) (c))
324
325 /* An opaque pointer. */
326 #ifndef YY_TYPEDEF_YY_SCANNER_T
327 #define YY_TYPEDEF_YY_SCANNER_T
328 typedef void* yyscan_t;
329 #endif
330
331 /* For convenience, these vars (plus the bison vars far below)
332 are macros in the reentrant scanner. */
333 #define yyin yyg->yyin_r
334 #define yyout yyg->yyout_r
335 #define yyextra yyg->yyextra_r
336 #define yyleng yyg->yyleng_r
337 #define yytext yyg->yytext_r
338 #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
339 #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
340 #define yy_flex_debug yyg->yy_flex_debug_r
341
342 /* Enter a start condition. This macro really ought to take a parameter,
343 * but we do it the disgusting crufty way forced on us by the ()-less
344 * definition of BEGIN.
345 */
346 #define BEGIN yyg->yy_start = 1 + 2 *
347 /* Translate the current start state into a value that can be later handed
348 * to BEGIN to return to the state. The YYSTATE alias is for lex
349 * compatibility.
350 */
351 #define YY_START ((yyg->yy_start - 1) / 2)
352 #define YYSTATE YY_START
353 /* Action number for EOF rule of a given start state. */
354 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
355 /* Special action meaning "start processing a new file". */
356 #define YY_NEW_FILE yyrestart( yyin , yyscanner )
357 #define YY_END_OF_BUFFER_CHAR 0
358
359 /* Size of default input buffer. */
360 #ifndef YY_BUF_SIZE
361 #ifdef __ia64__
362 /* On IA-64, the buffer size is 16k, not 8k.
363 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
364 * Ditto for the __ia64__ case accordingly.
365 */
366 #define YY_BUF_SIZE 32768
367 #else
368 #define YY_BUF_SIZE 16384
369 #endif /* __ia64__ */
370 #endif
371
372 /* The state buf must be large enough to hold one state per character in the main buffer.
373 */
374 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
375
376 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
377 #define YY_TYPEDEF_YY_BUFFER_STATE
378 typedef struct yy_buffer_state *YY_BUFFER_STATE;
379 #endif
380
381 #ifndef YY_TYPEDEF_YY_SIZE_T
382 #define YY_TYPEDEF_YY_SIZE_T
383 typedef size_t yy_size_t;
384 #endif
385
386 #define EOB_ACT_CONTINUE_SCAN 0
387 #define EOB_ACT_END_OF_FILE 1
388 #define EOB_ACT_LAST_MATCH 2
389
390 #define YY_LESS_LINENO(n)
391 #define YY_LINENO_REWIND_TO(ptr)
392
393 /* Return all but the first "n" matched characters back to the input stream. */
394 #define yyless(n) \
395 do \
396 { \
397 /* Undo effects of setting up yytext. */ \
398 int yyless_macro_arg = (n); \
399 YY_LESS_LINENO(yyless_macro_arg);\
400 *yy_cp = yyg->yy_hold_char; \
401 YY_RESTORE_YY_MORE_OFFSET \
402 yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
403 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
404 } \
405 while ( 0 )
406 #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
407
408 #ifndef YY_STRUCT_YY_BUFFER_STATE
409 #define YY_STRUCT_YY_BUFFER_STATE
410 struct yy_buffer_state
411 {
412 FILE *yy_input_file;
413
414 char *yy_ch_buf; /* input buffer */
415 char *yy_buf_pos; /* current position in input buffer */
416
417 /* Size of input buffer in bytes, not including room for EOB
418 * characters.
419 */
420 int yy_buf_size;
421
422 /* Number of characters read into yy_ch_buf, not including EOB
423 * characters.
424 */
425 int yy_n_chars;
426
427 /* Whether we "own" the buffer - i.e., we know we created it,
428 * and can realloc() it to grow it, and should free() it to
429 * delete it.
430 */
431 int yy_is_our_buffer;
432
433 /* Whether this is an "interactive" input source; if so, and
434 * if we're using stdio for input, then we want to use getc()
435 * instead of fread(), to make sure we stop fetching input after
436 * each newline.
437 */
438 int yy_is_interactive;
439
440 /* Whether we're considered to be at the beginning of a line.
441 * If so, '^' rules will be active on the next match, otherwise
442 * not.
443 */
444 int yy_at_bol;
445
446 int yy_bs_lineno; /**< The line count. */
447 int yy_bs_column; /**< The column count. */
448
449 /* Whether to try to fill the input buffer when we reach the
450 * end of it.
451 */
452 int yy_fill_buffer;
453
454 int yy_buffer_status;
455
456 #define YY_BUFFER_NEW 0
457 #define YY_BUFFER_NORMAL 1
458 /* When an EOF's been seen but there's still some text to process
459 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
460 * shouldn't try reading from the input source any more. We might
461 * still have a bunch of tokens to match, though, because of
462 * possible backing-up.
463 *
464 * When we actually see the EOF, we change the status to "new"
465 * (via yyrestart()), so that the user can continue scanning by
466 * just pointing yyin at a new input file.
467 */
468 #define YY_BUFFER_EOF_PENDING 2
469
470 };
471 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
472
473 /* We provide macros for accessing buffer states in case in the
474 * future we want to put the buffer states in a more general
475 * "scanner state".
476 *
477 * Returns the top of the stack, or NULL.
478 */
479 #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
480 ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
481 : NULL)
482 /* Same as previous macro, but useful when we know that the buffer stack is not
483 * NULL or when we need an lvalue. For internal use only.
484 */
485 #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
486
487 void yyrestart ( FILE *input_file , yyscan_t yyscanner );
488 void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
489 YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner );
490 void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
491 void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
492 void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
493 void yypop_buffer_state ( yyscan_t yyscanner );
494
495 static void yyensure_buffer_stack ( yyscan_t yyscanner );
496 static void yy_load_buffer_state ( yyscan_t yyscanner );
497 static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner );
498 #define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner)
499
500 YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner );
501 YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner );
502 YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner );
503
504 void *yyalloc ( yy_size_t , yyscan_t yyscanner );
505 void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner );
506 void yyfree ( void * , yyscan_t yyscanner );
507
508 #define yy_new_buffer yy_create_buffer
509 #define yy_set_interactive(is_interactive) \
510 { \
511 if ( ! YY_CURRENT_BUFFER ){ \
512 yyensure_buffer_stack (yyscanner); \
513 YY_CURRENT_BUFFER_LVALUE = \
514 yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \
515 } \
516 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
517 }
518 #define yy_set_bol(at_bol) \
519 { \
520 if ( ! YY_CURRENT_BUFFER ){\
521 yyensure_buffer_stack (yyscanner); \
522 YY_CURRENT_BUFFER_LVALUE = \
523 yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \
524 } \
525 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
526 }
527 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
528
529 /* Begin user sect3 */
530
531 #define hoayywrap(yyscanner) (/*CONSTCOND*/1)
532 #define YY_SKIP_YYWRAP
533 typedef flex_uint8_t YY_CHAR;
534
535 typedef int yy_state_type;
536
537 #define yytext_ptr yytext_r
538
539 static yy_state_type yy_get_previous_state ( yyscan_t yyscanner );
540 static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner);
541 static int yy_get_next_buffer ( yyscan_t yyscanner );
542 static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner );
543
544 /* Done after the current pattern has been matched and before the
545 * corresponding action - sets up yytext.
546 */
547 #define YY_DO_BEFORE_ACTION \
548 yyg->yytext_ptr = yy_bp; \
549 yyleng = (int) (yy_cp - yy_bp); \
550 yyg->yy_hold_char = *yy_cp; \
551 *yy_cp = '\0'; \
552 yyg->yy_c_buf_p = yy_cp;
553 #define YY_NUM_RULES 94
554 #define YY_END_OF_BUFFER 95
555 /* This struct is not used in this scanner,
556 but its presence is necessary. */
557 struct yy_trans_info
558 {
559 flex_int32_t yy_verify;
560 flex_int32_t yy_nxt;
561 };
562 static const flex_int16_t yy_accept[416] =
563 { 0,
564 0, 0, 75, 75, 0, 0, 0, 0, 0, 0,
565 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
566 0, 0, 0, 0, 73, 73, 0, 0, 95, 93,
567 3, 1, 1, 81, 93, 93, 93, 93, 93, 93,
568 93, 75, 78, 78, 77, 76, 86, 83, 83, 82,
569 94, 92, 90, 90, 87, 89, 29, 93, 33, 93,
570 30, 30, 30, 28, 30, 29, 30, 30, 30, 29,
571 93, 61, 93, 58, 62, 63, 63, 63, 63, 63,
572 63, 63, 63, 63, 64, 65, 66, 93, 69, 93,
573 71, 93, 67, 73, 3, 73, 73, 1, 1, 93,
574
575 93, 47, 93, 93, 93, 93, 93, 93, 93, 93,
576 3, 1, 2, 2, 1, 0, 0, 4, 0, 0,
577 0, 0, 0, 0, 75, 78, 79, 79, 78, 80,
578 76, 74, 86, 83, 84, 84, 83, 85, 92, 90,
579 91, 91, 90, 0, 0, 0, 0, 34, 32, 30,
580 31, 30, 30, 30, 30, 0, 30, 30, 30, 30,
581 30, 0, 61, 56, 63, 63, 63, 54, 63, 53,
582 63, 52, 55, 63, 63, 64, 64, 65, 70, 69,
583 72, 71, 68, 67, 73, 3, 4, 1, 2, 0,
584 0, 0, 2, 1, 0, 43, 48, 0, 0, 0,
585
586 0, 0, 0, 0, 0, 0, 40, 0, 0, 0,
587 0, 11, 10, 9, 0, 0, 0, 0, 0, 0,
588 0, 0, 0, 0, 0, 35, 14, 30, 30, 30,
589 27, 30, 30, 30, 30, 30, 63, 63, 63, 63,
590 63, 63, 0, 0, 0, 0, 0, 0, 46, 43,
591 49, 39, 0, 0, 50, 0, 0, 0, 0, 0,
592 0, 11, 6, 0, 0, 88, 0, 0, 30, 30,
593 30, 30, 30, 30, 30, 30, 30, 63, 63, 63,
594 57, 51, 62, 0, 0, 0, 0, 0, 0, 0,
595 0, 0, 8, 0, 0, 30, 30, 30, 30, 30,
596
597 19, 30, 30, 30, 18, 63, 63, 58, 0, 0,
598 0, 0, 0, 0, 0, 0, 0, 0, 30, 15,
599 13, 26, 30, 30, 30, 30, 30, 60, 59, 0,
600 0, 0, 38, 37, 0, 0, 0, 0, 0, 25,
601 30, 12, 30, 30, 30, 30, 0, 0, 0, 36,
602 0, 0, 0, 24, 30, 30, 30, 30, 30, 45,
603 0, 42, 41, 0, 7, 30, 17, 30, 30, 30,
604 0, 42, 0, 5, 30, 30, 30, 30, 0, 16,
605 20, 30, 30, 0, 30, 30, 0, 30, 30, 0,
606 30, 30, 0, 30, 30, 0, 30, 30, 30, 0,
607
608 30, 30, 30, 44, 23, 30, 30, 30, 30, 30,
609 30, 22, 30, 21, 0
610 } ;
611
612 static const YY_CHAR yy_ec[256] =
613 { 0,
614 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
615 4, 4, 5, 1, 1, 1, 1, 1, 1, 1,
616 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
617 1, 2, 6, 7, 8, 1, 1, 9, 1, 10,
618 11, 12, 1, 1, 13, 14, 15, 16, 17, 18,
619 19, 19, 19, 19, 19, 19, 19, 20, 1, 1,
620 1, 21, 1, 22, 23, 24, 25, 26, 27, 28,
621 28, 29, 28, 28, 28, 28, 28, 30, 31, 32,
622 28, 33, 34, 35, 28, 28, 28, 28, 36, 28,
623 37, 38, 39, 1, 40, 1, 41, 28, 42, 43,
624
625 44, 45, 46, 47, 48, 28, 49, 50, 51, 52,
626 53, 54, 28, 55, 56, 57, 58, 59, 28, 60,
627 61, 28, 62, 63, 62, 1, 1, 1, 1, 1,
628 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
629 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
630 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
631 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
632 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
633 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
634 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
635
636 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
637 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
638 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
639 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
640 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
641 1, 1, 1, 1, 1
642 } ;
643
644 static const YY_CHAR yy_meta[64] =
645 { 0,
646 1, 1, 2, 1, 3, 1, 4, 1, 1, 5,
647 5, 6, 7, 7, 6, 8, 8, 8, 8, 9,
648 1, 1, 8, 8, 8, 8, 8, 8, 8, 8,
649 8, 8, 8, 8, 8, 8, 10, 4, 10, 8,
650 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
651 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
652 8, 1, 1
653 } ;
654
655 static const flex_int16_t yy_base[434] =
656 { 0,
657 0, 51, 9, 20, 33, 34, 17, 39, 103, 0,
658 166, 0, 222, 236, 250, 264, 58, 79, 278, 292,
659 306, 320, 334, 348, 85, 366, 398, 0, 998, 999,
660 7, 28, 40, 999, 947, 983, 983, 373, 13, 963,
661 949, 0, 73, 88, 977, 979, 0, 94, 228, 999,
662 0, 0, 229, 240, 999, 325, 999, 977, 366, 0,
663 376, 969, 28, 0, 37, 968, 10, 216, 230, 217,
664 254, 999, 966, 999, 999, 0, 45, 933, 237, 932,
665 939, 940, 933, 926, 412, 417, 999, 963, 421, 962,
666 427, 961, 435, 0, 255, 0, 965, 373, 444, 963,
667
668 277, 442, 271, 922, 213, 943, 916, 912, 927, 952,
669 271, 966, 965, 962, 961, 917, 941, 999, 446, 464,
670 940, 939, 938, 901, 0, 956, 955, 952, 951, 999,
671 943, 999, 0, 951, 950, 947, 946, 999, 0, 947,
672 946, 943, 942, 346, 937, 882, 370, 458, 0, 924,
673 999, 923, 278, 267, 321, 903, 337, 292, 306, 334,
674 402, 402, 999, 999, 0, 885, 887, 0, 889, 0,
675 881, 0, 0, 889, 878, 468, 204, 472, 999, 476,
676 999, 481, 999, 485, 0, 297, 0, 502, 503, 386,
677 904, 890, 507, 508, 920, 0, 498, 912, 889, 879,
678
679 906, 905, 904, 885, 871, 865, 999, 918, 919, 869,
680 896, 522, 999, 999, 899, 874, 912, 913, 910, 911,
681 908, 909, 516, 880, 880, 526, 999, 428, 489, 501,
682 999, 385, 503, 286, 421, 360, 865, 857, 851, 853,
683 851, 860, 543, 547, 548, 558, 559, 563, 999, 0,
684 564, 999, 552, 852, 999, 882, 274, 851, 856, 855,
685 867, 999, 999, 842, 565, 999, 870, 869, 537, 550,
686 529, 570, 573, 874, 574, 584, 873, 837, 843, 846,
687 0, 0, 0, 855, 834, 843, 829, 841, 836, 828,
688 880, 848, 999, 844, 866, 581, 850, 840, 583, 582,
689
690 999, 585, 587, 588, 999, 793, 799, 0, 792, 775,
691 779, 799, 589, 775, 610, 781, 793, 785, 593, 999,
692 999, 999, 777, 596, 597, 599, 297, 0, 0, 750,
693 746, 729, 999, 999, 760, 729, 634, 763, 708, 999,
694 610, 999, 602, 600, 601, 611, 700, 667, 698, 999,
695 660, 630, 703, 999, 613, 694, 621, 604, 629, 999,
696 667, 0, 999, 698, 999, 638, 999, 639, 640, 643,
697 660, 0, 696, 999, 681, 670, 507, 644, 676, 999,
698 999, 646, 648, 503, 647, 649, 478, 650, 651, 423,
699 652, 659, 412, 654, 655, 351, 657, 436, 658, 375,
700
701 222, 660, 661, 999, 999, 663, 665, 667, 666, 78,
702 668, 999, 14, 999, 999, 724, 734, 744, 754, 764,
703 774, 784, 794, 804, 814, 818, 820, 829, 2, 838,
704 848, 858, 868
705 } ;
706
707 static const flex_int16_t yy_def[434] =
708 { 0,
709 416, 416, 417, 417, 418, 418, 419, 419, 415, 9,
710 415, 11, 2, 2, 2, 2, 416, 416, 2, 2,
711 2, 2, 2, 2, 420, 420, 2, 27, 415, 415,
712 415, 415, 415, 415, 415, 415, 415, 415, 415, 415,
713 415, 421, 415, 415, 415, 422, 423, 415, 415, 415,
714 424, 425, 415, 415, 415, 415, 415, 415, 415, 426,
715 427, 427, 427, 428, 427, 427, 427, 427, 427, 427,
716 415, 415, 415, 415, 415, 429, 429, 429, 429, 429,
717 429, 429, 429, 429, 415, 415, 415, 415, 415, 415,
718 415, 415, 415, 430, 430, 430, 430, 415, 415, 415,
719
720 415, 415, 415, 415, 415, 415, 415, 415, 415, 415,
721 415, 415, 415, 415, 415, 415, 415, 415, 415, 415,
722 415, 415, 415, 415, 421, 415, 415, 415, 415, 415,
723 422, 415, 423, 415, 415, 415, 415, 415, 425, 415,
724 415, 415, 415, 415, 415, 415, 415, 415, 426, 427,
725 415, 427, 427, 427, 427, 428, 427, 427, 427, 427,
726 427, 415, 415, 415, 429, 429, 429, 429, 429, 429,
727 429, 429, 429, 429, 429, 415, 415, 415, 415, 415,
728 415, 415, 415, 415, 430, 430, 430, 415, 415, 415,
729 415, 415, 415, 415, 415, 431, 415, 415, 415, 415,
730
731 415, 415, 415, 415, 415, 415, 415, 415, 415, 415,
732 415, 415, 415, 415, 415, 415, 415, 415, 415, 415,
733 415, 415, 415, 415, 415, 415, 415, 427, 427, 427,
734 415, 427, 427, 427, 427, 427, 429, 429, 429, 429,
735 429, 429, 415, 415, 415, 415, 415, 415, 415, 431,
736 415, 415, 415, 415, 415, 415, 415, 415, 415, 415,
737 415, 415, 415, 415, 415, 415, 415, 415, 427, 427,
738 427, 427, 427, 427, 427, 427, 427, 429, 429, 429,
739 429, 429, 429, 415, 415, 415, 415, 415, 415, 415,
740 415, 415, 415, 415, 415, 427, 427, 427, 427, 427,
741
742 415, 427, 427, 427, 415, 429, 429, 429, 415, 415,
743 415, 415, 415, 415, 415, 415, 415, 415, 427, 415,
744 415, 415, 427, 427, 427, 427, 427, 429, 429, 415,
745 415, 415, 415, 415, 415, 415, 415, 415, 415, 415,
746 427, 415, 427, 427, 427, 427, 415, 415, 415, 415,
747 415, 415, 415, 415, 427, 427, 427, 427, 427, 415,
748 415, 432, 415, 433, 415, 427, 415, 427, 427, 427,
749 415, 432, 433, 415, 427, 427, 427, 427, 415, 415,
750 415, 427, 427, 415, 427, 427, 415, 427, 427, 415,
751 427, 427, 415, 427, 427, 415, 427, 427, 427, 415,
752
753 427, 427, 427, 415, 415, 427, 427, 427, 427, 427,
754 427, 415, 427, 415, 0, 415, 415, 415, 415, 415,
755 415, 415, 415, 415, 415, 415, 415, 415, 415, 415,
756 415, 415, 415
757 } ;
758
759 static const flex_int16_t yy_nxt[1063] =
760 { 0,
761 415, 31, 32, 31, 33, 415, 34, 35, 111, 165,
762 111, 43, 36, 44, 37, 38, 38, 38, 38, 53,
763 45, 54, 43, 46, 44, 39, 55, 56, 40, 151,
764 112, 45, 113, 414, 46, 48, 48, 49, 49, 50,
765 50, 53, 114, 54, 115, 121, 122, 151, 55, 56,
766 158, 41, 31, 32, 31, 33, 151, 34, 35, 31,
767 32, 31, 33, 36, 34, 37, 38, 38, 38, 38,
768 51, 51, 37, 87, 87, 126, 39, 127, 157, 40,
769 31, 32, 31, 33, 155, 34, 95, 32, 95, 33,
770 128, 96, 129, 37, 87, 87, 134, 412, 135, 97,
771
772 166, 167, 41, 30, 31, 32, 31, 33, 57, 34,
773 30, 57, 57, 57, 30, 58, 30, 37, 59, 59,
774 59, 59, 30, 30, 60, 61, 62, 62, 62, 62,
775 62, 62, 62, 62, 62, 62, 63, 62, 62, 64,
776 30, 57, 62, 65, 62, 62, 62, 66, 62, 62,
777 62, 62, 62, 62, 67, 62, 68, 62, 69, 70,
778 62, 62, 62, 62, 57, 57, 30, 31, 32, 31,
779 33, 71, 34, 30, 30, 72, 30, 30, 73, 30,
780 37, 74, 75, 30, 30, 30, 30, 30, 76, 76,
781 76, 76, 76, 76, 76, 76, 76, 76, 76, 76,
782
783 76, 76, 30, 30, 30, 30, 77, 76, 78, 76,
784 79, 80, 76, 81, 76, 76, 76, 76, 82, 76,
785 76, 83, 84, 76, 76, 76, 76, 30, 30, 30,
786 136, 140, 137, 141, 30, 151, 151, 85, 85, 85,
787 85, 405, 142, 30, 143, 201, 202, 30, 30, 151,
788 30, 85, 85, 85, 85, 162, 186, 30, 186, 177,
789 177, 30, 30, 163, 30, 86, 86, 86, 86, 161,
790 159, 30, 111, 30, 111, 30, 30, 169, 30, 86,
791 86, 86, 86, 160, 170, 30, 151, 30, 118, 30,
792 88, 196, 30, 89, 89, 89, 89, 151, 186, 30,
793
794 186, 30, 198, 30, 88, 151, 30, 89, 89, 89,
795 89, 151, 199, 30, 229, 30, 151, 30, 90, 228,
796 30, 91, 91, 91, 91, 151, 144, 30, 287, 30,
797 288, 30, 90, 145, 30, 91, 91, 91, 91, 275,
798 151, 30, 233, 30, 346, 30, 92, 144, 30, 93,
799 93, 93, 93, 151, 145, 30, 151, 30, 234, 30,
800 92, 230, 30, 93, 93, 93, 93, 95, 32, 95,
801 33, 30, 96, 30, 119, 188, 30, 189, 232, 151,
802 97, 148, 148, 148, 148, 30, 235, 146, 120, 120,
803 120, 120, 211, 224, 404, 151, 225, 273, 190, 30,
804
805 98, 191, 99, 162, 151, 30, 400, 152, 146, 277,
806 100, 163, 101, 102, 102, 102, 102, 153, 201, 202,
807 103, 151, 104, 105, 192, 154, 106, 176, 176, 176,
808 176, 107, 178, 178, 178, 178, 180, 180, 180, 180,
809 151, 108, 182, 182, 182, 182, 193, 151, 194, 109,
810 184, 184, 184, 184, 236, 151, 110, 197, 197, 197,
811 197, 212, 212, 212, 212, 119, 396, 177, 177, 190,
812 393, 269, 191, 226, 226, 226, 226, 276, 402, 120,
813 120, 120, 120, 176, 176, 176, 176, 178, 178, 178,
814 178, 180, 180, 180, 180, 192, 182, 182, 182, 182,
815
816 184, 184, 184, 184, 188, 244, 243, 245, 151, 246,
817 248, 247, 194, 251, 251, 251, 251, 265, 390, 382,
818 151, 265, 151, 177, 177, 266, 151, 190, 190, 270,
819 191, 191, 190, 190, 387, 191, 191, 212, 212, 212,
820 212, 226, 226, 226, 226, 248, 274, 245, 151, 246,
821 248, 189, 245, 192, 192, 271, 151, 272, 192, 192,
822 246, 193, 243, 245, 284, 246, 265, 243, 190, 151,
823 265, 191, 190, 190, 266, 191, 191, 262, 262, 251,
824 251, 251, 251, 190, 190, 298, 191, 191, 190, 151,
825 296, 191, 151, 151, 192, 285, 303, 304, 192, 192,
826
827 151, 151, 322, 151, 151, 297, 151, 151, 334, 192,
828 192, 315, 151, 299, 192, 151, 151, 302, 151, 151,
829 151, 151, 324, 151, 300, 337, 337, 337, 337, 151,
830 151, 352, 151, 341, 327, 352, 364, 319, 323, 325,
831 151, 358, 326, 326, 335, 356, 343, 357, 151, 337,
832 337, 337, 337, 344, 366, 345, 359, 151, 151, 151,
833 369, 355, 151, 151, 368, 151, 151, 151, 151, 151,
834 151, 151, 395, 151, 151, 370, 151, 151, 151, 151,
835 151, 375, 151, 377, 151, 151, 151, 151, 384, 381,
836 391, 383, 378, 386, 376, 389, 388, 397, 398, 385,
837
838 380, 407, 374, 379, 374, 406, 408, 392, 371, 411,
839 399, 401, 394, 367, 403, 365, 363, 362, 361, 360,
840 354, 409, 410, 413, 30, 30, 30, 30, 30, 30,
841 30, 30, 30, 30, 42, 42, 42, 42, 42, 42,
842 42, 42, 42, 42, 47, 47, 47, 47, 47, 47,
843 47, 47, 47, 47, 52, 52, 52, 52, 52, 52,
844 52, 52, 52, 52, 94, 94, 94, 94, 94, 94,
845 94, 94, 94, 94, 125, 353, 351, 125, 125, 350,
846 125, 125, 125, 125, 131, 349, 348, 131, 131, 131,
847 131, 131, 131, 131, 133, 347, 342, 340, 133, 133,
848
849 133, 133, 133, 133, 138, 339, 138, 138, 138, 138,
850 138, 138, 138, 138, 139, 338, 336, 139, 333, 139,
851 139, 139, 139, 139, 149, 149, 150, 150, 150, 156,
852 332, 331, 156, 156, 156, 156, 156, 156, 185, 330,
853 329, 185, 185, 185, 185, 185, 185, 185, 250, 328,
854 250, 250, 250, 250, 250, 250, 250, 250, 372, 321,
855 372, 372, 372, 372, 372, 372, 372, 372, 373, 320,
856 373, 373, 373, 373, 373, 373, 373, 373, 318, 317,
857 316, 315, 255, 314, 313, 312, 311, 310, 309, 308,
858 307, 306, 305, 301, 295, 294, 293, 292, 291, 290,
859
860 289, 255, 286, 283, 282, 281, 280, 279, 278, 268,
861 267, 142, 141, 136, 135, 128, 127, 264, 263, 261,
862 260, 114, 113, 259, 258, 257, 256, 255, 255, 254,
863 253, 252, 249, 206, 203, 242, 241, 240, 239, 238,
864 237, 231, 227, 151, 223, 223, 143, 222, 221, 140,
865 137, 220, 219, 134, 415, 129, 218, 217, 126, 216,
866 215, 214, 213, 211, 210, 115, 209, 208, 112, 207,
867 206, 205, 204, 203, 200, 195, 187, 183, 181, 179,
868 175, 174, 173, 172, 171, 168, 164, 151, 151, 147,
869 132, 130, 124, 123, 118, 117, 116, 415, 29, 415,
870
871 415, 415, 415, 415, 415, 415, 415, 415, 415, 415,
872 415, 415, 415, 415, 415, 415, 415, 415, 415, 415,
873 415, 415, 415, 415, 415, 415, 415, 415, 415, 415,
874 415, 415, 415, 415, 415, 415, 415, 415, 415, 415,
875 415, 415, 415, 415, 415, 415, 415, 415, 415, 415,
876 415, 415, 415, 415, 415, 415, 415, 415, 415, 415,
877 415, 415
878 } ;
879
880 static const flex_int16_t yy_chk[1063] =
881 { 0,
882 0, 1, 1, 1, 1, 0, 1, 1, 31, 429,
883 31, 3, 1, 3, 1, 1, 1, 1, 1, 7,
884 3, 7, 4, 3, 4, 1, 7, 7, 1, 67,
885 32, 4, 32, 413, 4, 5, 6, 5, 6, 5,
886 6, 8, 33, 8, 33, 39, 39, 63, 8, 8,
887 67, 1, 2, 2, 2, 2, 65, 2, 2, 17,
888 17, 17, 17, 2, 17, 2, 2, 2, 2, 2,
889 5, 6, 17, 17, 17, 43, 2, 43, 65, 2,
890 18, 18, 18, 18, 63, 18, 25, 25, 25, 25,
891 44, 25, 44, 18, 18, 18, 48, 410, 48, 25,
892
893 77, 77, 2, 9, 9, 9, 9, 9, 9, 9,
894 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
895 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
896 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
897 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
898 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
899 9, 9, 9, 9, 9, 9, 11, 11, 11, 11,
900 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
901 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
902 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
903
904 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
905 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
906 11, 11, 11, 11, 11, 11, 11, 11, 11, 13,
907 49, 53, 49, 53, 13, 68, 70, 13, 13, 13,
908 13, 401, 54, 14, 54, 105, 105, 13, 14, 69,
909 13, 14, 14, 14, 14, 71, 95, 15, 95, 177,
910 177, 14, 15, 71, 14, 15, 15, 15, 15, 70,
911 68, 16, 111, 13, 111, 15, 16, 79, 15, 16,
912 16, 16, 16, 69, 79, 19, 154, 14, 101, 16,
913 19, 101, 16, 19, 19, 19, 19, 153, 186, 20,
914
915 186, 15, 103, 19, 20, 234, 19, 20, 20, 20,
916 20, 158, 103, 21, 154, 16, 327, 20, 21, 153,
917 20, 21, 21, 21, 21, 159, 56, 22, 257, 19,
918 257, 21, 22, 56, 21, 22, 22, 22, 22, 234,
919 155, 23, 158, 20, 327, 22, 23, 144, 22, 23,
920 23, 23, 23, 160, 144, 24, 157, 21, 159, 23,
921 24, 155, 23, 24, 24, 24, 24, 26, 26, 26,
922 26, 22, 26, 24, 38, 98, 24, 98, 157, 236,
923 26, 59, 59, 59, 59, 23, 160, 56, 38, 38,
924 38, 38, 147, 147, 400, 61, 147, 232, 98, 24,
925
926 27, 98, 27, 162, 232, 27, 396, 61, 144, 236,
927 27, 162, 27, 27, 27, 27, 27, 61, 190, 190,
928 27, 161, 27, 27, 98, 61, 27, 85, 85, 85,
929 85, 27, 86, 86, 86, 86, 89, 89, 89, 89,
930 235, 27, 91, 91, 91, 91, 99, 228, 99, 27,
931 93, 93, 93, 93, 161, 398, 27, 102, 102, 102,
932 102, 119, 119, 119, 119, 120, 393, 85, 85, 99,
933 390, 228, 99, 148, 148, 148, 148, 235, 398, 120,
934 120, 120, 120, 176, 176, 176, 176, 178, 178, 178,
935 178, 180, 180, 180, 180, 99, 182, 182, 182, 182,
936
937 184, 184, 184, 184, 188, 189, 188, 189, 229, 193,
938 194, 193, 194, 197, 197, 197, 197, 223, 387, 377,
939 230, 223, 233, 176, 176, 223, 377, 188, 189, 229,
940 188, 189, 193, 194, 384, 193, 194, 212, 212, 212,
941 212, 226, 226, 226, 226, 243, 233, 243, 271, 244,
942 245, 244, 245, 188, 189, 230, 269, 230, 193, 194,
943 246, 247, 246, 247, 253, 248, 265, 248, 243, 270,
944 265, 243, 244, 245, 265, 244, 245, 212, 212, 251,
945 251, 251, 251, 246, 247, 271, 246, 247, 248, 272,
946 269, 248, 273, 275, 243, 253, 276, 276, 244, 245,
947
948 296, 300, 299, 276, 302, 270, 303, 304, 313, 246,
949 247, 315, 319, 272, 248, 324, 325, 275, 326, 344,
950 345, 343, 300, 358, 273, 315, 315, 315, 315, 341,
951 346, 352, 355, 319, 304, 337, 352, 296, 299, 302,
952 357, 345, 303, 304, 313, 343, 324, 344, 359, 337,
953 337, 337, 337, 325, 355, 326, 346, 366, 368, 369,
954 358, 341, 370, 378, 357, 382, 385, 383, 386, 388,
955 389, 391, 392, 394, 395, 359, 397, 399, 392, 402,
956 403, 366, 406, 369, 407, 409, 408, 411, 379, 376,
957 388, 378, 370, 383, 368, 386, 385, 394, 395, 382,
958
959 375, 403, 373, 371, 364, 402, 406, 389, 361, 409,
960 395, 397, 391, 356, 399, 353, 351, 349, 348, 347,
961 339, 407, 408, 411, 416, 416, 416, 416, 416, 416,
962 416, 416, 416, 416, 417, 417, 417, 417, 417, 417,
963 417, 417, 417, 417, 418, 418, 418, 418, 418, 418,
964 418, 418, 418, 418, 419, 419, 419, 419, 419, 419,
965 419, 419, 419, 419, 420, 420, 420, 420, 420, 420,
966 420, 420, 420, 420, 421, 338, 336, 421, 421, 335,
967 421, 421, 421, 421, 422, 332, 331, 422, 422, 422,
968 422, 422, 422, 422, 423, 330, 323, 318, 423, 423,
969
970 423, 423, 423, 423, 424, 317, 424, 424, 424, 424,
971 424, 424, 424, 424, 425, 316, 314, 425, 312, 425,
972 425, 425, 425, 425, 426, 426, 427, 427, 427, 428,
973 311, 310, 428, 428, 428, 428, 428, 428, 430, 309,
974 307, 430, 430, 430, 430, 430, 430, 430, 431, 306,
975 431, 431, 431, 431, 431, 431, 431, 431, 432, 298,
976 432, 432, 432, 432, 432, 432, 432, 432, 433, 297,
977 433, 433, 433, 433, 433, 433, 433, 433, 295, 294,
978 292, 291, 290, 289, 288, 287, 286, 285, 284, 280,
979 279, 278, 277, 274, 268, 267, 264, 261, 260, 259,
980
981 258, 256, 254, 242, 241, 240, 239, 238, 237, 225,
982 224, 222, 221, 220, 219, 218, 217, 216, 215, 211,
983 210, 209, 208, 206, 205, 204, 203, 202, 201, 200,
984 199, 198, 195, 192, 191, 175, 174, 171, 169, 167,
985 166, 156, 152, 150, 146, 145, 143, 142, 141, 140,
986 137, 136, 135, 134, 131, 129, 128, 127, 126, 124,
987 123, 122, 121, 117, 116, 115, 114, 113, 112, 110,
988 109, 108, 107, 106, 104, 100, 97, 92, 90, 88,
989 84, 83, 82, 81, 80, 78, 73, 66, 62, 58,
990 46, 45, 41, 40, 37, 36, 35, 29, 415, 415,
991
992 415, 415, 415, 415, 415, 415, 415, 415, 415, 415,
993 415, 415, 415, 415, 415, 415, 415, 415, 415, 415,
994 415, 415, 415, 415, 415, 415, 415, 415, 415, 415,
995 415, 415, 415, 415, 415, 415, 415, 415, 415, 415,
996 415, 415, 415, 415, 415, 415, 415, 415, 415, 415,
997 415, 415, 415, 415, 415, 415, 415, 415, 415, 415,
998 415, 415
999 } ;
1000
1001 /* The intent behind this definition is that it'll catch
1002 * any uses of REJECT which flex missed.
1003 */
1004 #define REJECT reject_used_but_not_detected
1005 #define yymore() yymore_used_but_not_detected
1006 #define YY_MORE_ADJ 0
1007 #define YY_RESTORE_YY_MORE_OFFSET
1008 #line 1 "scanaut.ll"
1009 /* -*- coding: utf-8 -*-
1010 ** Copyright (C) 2014-2018, 2020, 2021 Laboratoire de Recherche et Développement
1011 ** de l'Epita (LRDE).
1012 **
1013 ** This file is part of Spot, a model checking library.
1014 **
1015 ** Spot is free software; you can redistribute it and/or modify it
1016 ** under the terms of the GNU General Public License as published by
1017 ** the Free Software Foundation; either version 3 of the License, or
1018 ** (at your option) any later version.
1019 **
1020 ** Spot is distributed in the hope that it will be useful, but WITHOUT
1021 ** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
1022 ** or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
1023 ** License for more details.
1024 **
1025 ** You should have received a copy of the GNU General Public License
1026 ** along with this program. If not, see <http://www.gnu.org/licenses/>.
1027 */
1028 /* %option debug */
1029
1030 #line 31 "scanaut.ll"
1031 #include <string>
1032 #include <sys/stat.h>
1033 #include <spot/parseaut/parsedecl.hh>
1034 #include "spot/priv/trim.hh"
1035
1036 #define YY_USER_ACTION yylloc->columns(yyleng);
1037
1038 typedef hoayy::parser::token token;
1039
1040 struct extra_data
1041 {
1042 unsigned comment_level = 0;
1043 unsigned parent_level = 0;
1044 int orig_cond = 0;
1045 bool lbtt_s = false;
1046 bool lbtt_t = false;
1047 unsigned lbtt_states = 0;
1048 bool yyin_close = true;
1049 };
1050
1051 #line 1052 "scanaut.cc"
1052
1053 #line 1054 "scanaut.cc"
1054
1055 #define INITIAL 0
1056 #define in_COMMENT 1
1057 #define in_STRING 2
1058 #define in_NEVER_PAR 3
1059 #define in_HOA 4
1060 #define in_NEVER 5
1061 #define in_LBTT_HEADER 6
1062 #define in_LBTT_STATE 7
1063 #define in_LBTT_INIT 8
1064 #define in_LBTT_TRANS 9
1065 #define in_LBTT_T_ACC 10
1066 #define in_LBTT_S_ACC 11
1067 #define in_LBTT_GUARD 12
1068 #define in_DSTAR 13
1069
1070 #ifndef YY_NO_UNISTD_H
1071 /* Special case for "unistd.h", since it is non-ANSI. We include it way
1072 * down here because we want the user's section 1 to have been scanned first.
1073 * The user has a chance to override it with an option.
1074 */
1075 #include <unistd.h>
1076 #endif
1077
1078 #define YY_EXTRA_TYPE struct extra_data*
1079
1080 /* Holds the entire state of the reentrant scanner. */
1081 struct yyguts_t
1082 {
1083
1084 /* User-defined. Not touched by flex. */
1085 YY_EXTRA_TYPE yyextra_r;
1086
1087 /* The rest are the same as the globals declared in the non-reentrant scanner. */
1088 FILE *yyin_r, *yyout_r;
1089 size_t yy_buffer_stack_top; /**< index of top of stack. */
1090 size_t yy_buffer_stack_max; /**< capacity of stack. */
1091 YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
1092 char yy_hold_char;
1093 int yy_n_chars;
1094 int yyleng_r;
1095 char *yy_c_buf_p;
1096 int yy_init;
1097 int yy_start;
1098 int yy_did_buffer_switch_on_eof;
1099 int yy_start_stack_ptr;
1100 int yy_start_stack_depth;
1101 int *yy_start_stack;
1102 yy_state_type yy_last_accepting_state;
1103 char* yy_last_accepting_cpos;
1104
1105 int yylineno_r;
1106 int yy_flex_debug_r;
1107
1108 char *yytext_r;
1109 int yy_more_flag;
1110 int yy_more_len;
1111
1112 }; /* end struct yyguts_t */
1113
1114 static int yy_init_globals ( yyscan_t yyscanner );
1115
1116 int yylex_init (yyscan_t* scanner);
1117
1118 int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner);
1119
1120 /* Accessor methods to globals.
1121 These are made visible to non-reentrant scanners for convenience. */
1122
1123 int yylex_destroy ( yyscan_t yyscanner );
1124
1125 int yyget_debug ( yyscan_t yyscanner );
1126
1127 void yyset_debug ( int debug_flag , yyscan_t yyscanner );
1128
1129 YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner );
1130
1131 void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner );
1132
1133 FILE *yyget_in ( yyscan_t yyscanner );
1134
1135 void yyset_in ( FILE * _in_str , yyscan_t yyscanner );
1136
1137 FILE *yyget_out ( yyscan_t yyscanner );
1138
1139 void yyset_out ( FILE * _out_str , yyscan_t yyscanner );
1140
1141 int yyget_leng ( yyscan_t yyscanner );
1142
1143 char *yyget_text ( yyscan_t yyscanner );
1144
1145 int yyget_lineno ( yyscan_t yyscanner );
1146
1147 void yyset_lineno ( int _line_number , yyscan_t yyscanner );
1148
1149 int yyget_column ( yyscan_t yyscanner );
1150
1151 void yyset_column ( int _column_no , yyscan_t yyscanner );
1152
1153 /* Macros after this point can all be overridden by user definitions in
1154 * section 1.
1155 */
1156
1157 #ifndef YY_SKIP_YYWRAP
1158 #ifdef __cplusplus
1159 extern "C" int yywrap ( yyscan_t yyscanner );
1160 #else
1161 extern int yywrap ( yyscan_t yyscanner );
1162 #endif
1163 #endif
1164
1165 #ifndef YY_NO_UNPUT
1166
1167 static void yyunput ( int c, char *buf_ptr , yyscan_t yyscanner);
1168
1169 #endif
1170
1171 #ifndef yytext_ptr
1172 static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner);
1173 #endif
1174
1175 #ifdef YY_NEED_STRLEN
1176 static int yy_flex_strlen ( const char * , yyscan_t yyscanner);
1177 #endif
1178
1179 #ifndef YY_NO_INPUT
1180 #ifdef __cplusplus
1181 static int yyinput ( yyscan_t yyscanner );
1182 #else
1183 static int input ( yyscan_t yyscanner );
1184 #endif
1185
1186 #endif
1187
1188 /* Amount of stuff to slurp up with each read. */
1189 #ifndef YY_READ_BUF_SIZE
1190 #ifdef __ia64__
1191 /* On IA-64, the buffer size is 16k, not 8k */
1192 #define YY_READ_BUF_SIZE 16384
1193 #else
1194 #define YY_READ_BUF_SIZE 8192
1195 #endif /* __ia64__ */
1196 #endif
1197
1198 /* Copy whatever the last rule matched to the standard output. */
1199 #ifndef ECHO
1200 /* This used to be an fputs(), but since the string might contain NUL's,
1201 * we now use fwrite().
1202 */
1203 #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
1204 #endif
1205
1206 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1207 * is returned in "result".
1208 */
1209 #ifndef YY_INPUT
1210 #define YY_INPUT(buf,result,max_size) \
1211 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1212 { \
1213 int c = '*'; \
1214 int n; \
1215 for ( n = 0; n < max_size && \
1216 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1217 buf[n] = (char) c; \
1218 if ( c == '\n' ) \
1219 buf[n++] = (char) c; \
1220 if ( c == EOF && ferror( yyin ) ) \
1221 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1222 result = n; \
1223 } \
1224 else \
1225 { \
1226 errno=0; \
1227 while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
1228 { \
1229 if( errno != EINTR) \
1230 { \
1231 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1232 break; \
1233 } \
1234 errno=0; \
1235 clearerr(yyin); \
1236 } \
1237 }\
1238 \
1239
1240 #endif
1241
1242 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1243 * we don't want an extra ';' after the "return" because that will cause
1244 * some compilers to complain about unreachable statements.
1245 */
1246 #ifndef yyterminate
1247 #define yyterminate() return YY_NULL
1248 #endif
1249
1250 /* Number of entries by which start-condition stack grows. */
1251 #ifndef YY_START_STACK_INCR
1252 #define YY_START_STACK_INCR 25
1253 #endif
1254
1255 /* Report a fatal error. */
1256 #ifndef YY_FATAL_ERROR
1257 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
1258 #endif
1259
1260 /* end tables serialization structures and prototypes */
1261
1262 /* Default declaration of generated scanner - a define so the user can
1263 * easily add parameters.
1264 */
1265 #ifndef YY_DECL
1266 #define YY_DECL_IS_OURS 1
1267
1268 extern int yylex (yyscan_t yyscanner);
1269
1270 #define YY_DECL int yylex (yyscan_t yyscanner)
1271 #endif /* !YY_DECL */
1272
1273 /* Code executed at the beginning of each rule, after yytext and yyleng
1274 * have been set up.
1275 */
1276 #ifndef YY_USER_ACTION
1277 #define YY_USER_ACTION
1278 #endif
1279
1280 /* Code executed at the end of each rule. */
1281 #ifndef YY_BREAK
1282 #define YY_BREAK /*LINTED*/break;
1283 #endif
1284
1285 #define YY_RULE_SETUP \
1286 YY_USER_ACTION
1287
1288 /** The main scanner function which does all the work.
1289 */
1290 YY_DECL
1291 {
1292 yy_state_type yy_current_state;
1293 char *yy_cp, *yy_bp;
1294 int yy_act;
1295 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1296
1297 if ( !yyg->yy_init )
1298 {
1299 yyg->yy_init = 1;
1300
1301 #ifdef YY_USER_INIT
1302 YY_USER_INIT;
1303 #endif
1304
1305 if ( ! yyg->yy_start )
1306 yyg->yy_start = 1; /* first start state */
1307
1308 if ( ! yyin )
1309 yyin = stdin;
1310
1311 if ( ! yyout )
1312 yyout = stdout;
1313
1314 if ( ! YY_CURRENT_BUFFER ) {
1315 yyensure_buffer_stack (yyscanner);
1316 YY_CURRENT_BUFFER_LVALUE =
1317 yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
1318 }
1319
1320 yy_load_buffer_state( yyscanner );
1321 }
1322
1323 {
1324 #line 63 "scanaut.ll"
1325
1326
1327
1328 #line 67 "scanaut.ll"
1329 std::string s;
1330 yylloc->step();
1331
__anon49f63dbd0102()1332 auto parse_int = [&](){
1333 errno = 0;
1334 char* end;
1335 unsigned long n = strtoul(yytext, &end, 10);
1336 yylval->num = n;
1337 if (errno || yylval->num != n)
1338 {
1339 error_list.push_back(spot::parse_aut_error(*yylloc, "value too large"));
1340 yylval->num = 0;
1341 }
1342 return end;
1343 };
1344
1345
1346
1347 /* skip blanks and comments */
1348 #line 1349 "scanaut.cc"
1349
1350 while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
1351 {
1352 yy_cp = yyg->yy_c_buf_p;
1353
1354 /* Support of yytext. */
1355 *yy_cp = yyg->yy_hold_char;
1356
1357 /* yy_bp points to the position in yy_ch_buf of the start of
1358 * the current run.
1359 */
1360 yy_bp = yy_cp;
1361
1362 yy_current_state = yyg->yy_start;
1363 yy_match:
1364 do
1365 {
1366 YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
1367 if ( yy_accept[yy_current_state] )
1368 {
1369 yyg->yy_last_accepting_state = yy_current_state;
1370 yyg->yy_last_accepting_cpos = yy_cp;
1371 }
1372 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1373 {
1374 yy_current_state = (int) yy_def[yy_current_state];
1375 if ( yy_current_state >= 416 )
1376 yy_c = yy_meta[yy_c];
1377 }
1378 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1379 ++yy_cp;
1380 }
1381 while ( yy_base[yy_current_state] != 999 );
1382
1383 yy_find_action:
1384 yy_act = yy_accept[yy_current_state];
1385 if ( yy_act == 0 )
1386 { /* have to back up */
1387 yy_cp = yyg->yy_last_accepting_cpos;
1388 yy_current_state = yyg->yy_last_accepting_state;
1389 yy_act = yy_accept[yy_current_state];
1390 }
1391
1392 YY_DO_BEFORE_ACTION;
1393
1394 do_action: /* This label is used only to access EOF actions. */
1395
1396 switch ( yy_act )
1397 { /* beginning of action switch */
1398 case 0: /* must back up */
1399 /* undo the effects of YY_DO_BEFORE_ACTION */
1400 *yy_cp = yyg->yy_hold_char;
1401 yy_cp = yyg->yy_last_accepting_cpos;
1402 yy_current_state = yyg->yy_last_accepting_state;
1403 goto yy_find_action;
1404
1405 case 1:
1406 /* rule 1 can match eol */
1407 YY_RULE_SETUP
1408 #line 86 "scanaut.ll"
1409 yylloc->lines(yyleng); yylloc->step();
1410 YY_BREAK
1411 case 2:
1412 /* rule 2 can match eol */
1413 YY_RULE_SETUP
1414 #line 87 "scanaut.ll"
1415 yylloc->lines(yyleng / 2); yylloc->step();
1416 YY_BREAK
1417 case 3:
1418 YY_RULE_SETUP
1419 #line 88 "scanaut.ll"
1420 yylloc->step();
1421 YY_BREAK
1422 case 4:
1423 YY_RULE_SETUP
1424 #line 89 "scanaut.ll"
1425 {
1426 yyextra->orig_cond = YY_START;
1427 BEGIN(in_COMMENT);
1428 yyextra->comment_level = 1;
1429 }
1430 YY_BREAK
1431 case 5:
1432 YY_RULE_SETUP
1433 #line 94 "scanaut.ll"
1434 {
1435 errno = 0;
1436 char* end;
1437 unsigned long n = strtoul(yytext + 5, &end, 10);
1438 yylval->num = n;
1439 if (errno || yylval->num != n)
1440 {
1441 error_list.push_back(spot::parse_aut_error(*yylloc, "value too large")); }
1442 else if (error_list.empty())
1443 {
1444 char* beg = strchr(end, '"');
1445 end = strrchr(beg + 1, '"');
1446 yylval->str = new std::string(beg + 1, end);
1447 yylloc->initialize(nullptr, n - 1, yylloc->begin.column);
1448 return token::LINEDIRECTIVE;
1449 }
1450 else
1451 {
1452 error_list.push_back(spot::parse_aut_error(*yylloc, "#line may not occur after any error"));
1453 }
1454 }
1455 YY_BREAK
1456 case 6:
1457 YY_RULE_SETUP
1458 #line 115 "scanaut.ll"
1459 BEGIN(in_HOA); return token::HOA;
1460 YY_BREAK
1461 case 7:
1462 YY_RULE_SETUP
1463 #line 116 "scanaut.ll"
1464 BEGIN(INITIAL); throw spot::hoa_abort{*yylloc};
1465 YY_BREAK
1466 case 8:
1467 YY_RULE_SETUP
1468 #line 117 "scanaut.ll"
1469 BEGIN(in_NEVER); return token::NEVER;
1470 YY_BREAK
1471 case 9:
1472 YY_RULE_SETUP
1473 #line 118 "scanaut.ll"
1474 BEGIN(in_DSTAR); return token::DSA;
1475 YY_BREAK
1476 case 10:
1477 YY_RULE_SETUP
1478 #line 119 "scanaut.ll"
1479 BEGIN(in_DSTAR); return token::DRA;
1480 YY_BREAK
1481 case 11:
1482 YY_RULE_SETUP
1483 #line 121 "scanaut.ll"
1484 {
1485 BEGIN(in_LBTT_HEADER);
1486 char* end = nullptr;
1487 errno = 0;
1488 unsigned long n = strtoul(yytext, &end, 10);
1489 yylval->num = n;
1490 unsigned s = end - yytext;
1491 yylloc->end = yylloc->begin;
1492 yylloc->end.columns(s);
1493 yyless(s);
1494 if (errno || yylval->num != n)
1495 {
1496 error_list.push_back(
1497 spot::parse_aut_error(*yylloc,
1498 "value too large"));
1499 yylval->num = 0;
1500 }
1501 yyextra->lbtt_states = yylval->num;
1502 return token::LBTT;
1503 }
1504 YY_BREAK
1505
1506 case 12:
1507 YY_RULE_SETUP
1508 #line 143 "scanaut.ll"
1509 return token::STATES;
1510 YY_BREAK
1511 case 13:
1512 YY_RULE_SETUP
1513 #line 144 "scanaut.ll"
1514 return token::START;
1515 YY_BREAK
1516 case 14:
1517 YY_RULE_SETUP
1518 #line 145 "scanaut.ll"
1519 return token::AP;
1520 YY_BREAK
1521 case 15:
1522 YY_RULE_SETUP
1523 #line 146 "scanaut.ll"
1524 return token::ALIAS;
1525 YY_BREAK
1526 case 16:
1527 YY_RULE_SETUP
1528 #line 147 "scanaut.ll"
1529 return token::ACCEPTANCE;
1530 YY_BREAK
1531 case 17:
1532 YY_RULE_SETUP
1533 #line 148 "scanaut.ll"
1534 return token::ACCNAME;
1535 YY_BREAK
1536 case 18:
1537 YY_RULE_SETUP
1538 #line 149 "scanaut.ll"
1539 return token::TOOL;
1540 YY_BREAK
1541 case 19:
1542 YY_RULE_SETUP
1543 #line 150 "scanaut.ll"
1544 return token::NAME;
1545 YY_BREAK
1546 case 20:
1547 YY_RULE_SETUP
1548 #line 151 "scanaut.ll"
1549 return token::PROPERTIES;
1550 YY_BREAK
1551 case 21:
1552 YY_RULE_SETUP
1553 #line 152 "scanaut.ll"
1554 return token::SPOT_HIGHLIGHT_STATES;
1555 YY_BREAK
1556 case 22:
1557 YY_RULE_SETUP
1558 #line 153 "scanaut.ll"
1559 return token::SPOT_HIGHLIGHT_EDGES;
1560 YY_BREAK
1561 case 23:
1562 YY_RULE_SETUP
1563 #line 154 "scanaut.ll"
1564 return token::SPOT_STATE_PLAYER;
1565 YY_BREAK
1566 case 24:
1567 YY_RULE_SETUP
1568 #line 155 "scanaut.ll"
1569 return token::BODY;
1570 YY_BREAK
1571 case 25:
1572 YY_RULE_SETUP
1573 #line 156 "scanaut.ll"
1574 BEGIN(INITIAL); return token::END;
1575 YY_BREAK
1576 case 26:
1577 YY_RULE_SETUP
1578 #line 157 "scanaut.ll"
1579 return token::STATE;
1580 YY_BREAK
1581 case 27:
1582 YY_RULE_SETUP
1583 #line 158 "scanaut.ll"
1584 {
1585 // For labels that do not span over several lines,
1586 // we look them up in fmap to speed the construction
1587 // of automata that use the same label multiple times.
1588 std::string* s =
1589 new std::string(yytext + 1, yyleng - 2);
1590 if (auto i = fmap.find(*s); i != fmap.end())
1591 {
1592 delete s;
1593 yylval->b = i->second.id();
1594 return token::BDD;
1595 }
1596 yylval->str = s;
1597 yylloc->end = yylloc->begin + 1;
1598 yyless(1);
1599 return *yytext;
1600 }
1601 YY_BREAK
1602 case 28:
1603 YY_RULE_SETUP
1604 #line 175 "scanaut.ll"
1605 {
1606 yylval->str = nullptr;
1607 return *yytext;
1608 }
1609 YY_BREAK
1610 case 29:
1611 YY_RULE_SETUP
1612 #line 179 "scanaut.ll"
1613 return *yytext;
1614 YY_BREAK
1615 case 30:
1616 YY_RULE_SETUP
1617 #line 181 "scanaut.ll"
1618 {
1619 yylval->str = new std::string(yytext, yyleng);
1620 return token::IDENTIFIER;
1621 }
1622 YY_BREAK
1623 case 31:
1624 YY_RULE_SETUP
1625 #line 185 "scanaut.ll"
1626 {
1627 yylval->str = new std::string(yytext, yyleng - 1);
1628 return token::HEADERNAME;
1629 }
1630 YY_BREAK
1631 case 32:
1632 YY_RULE_SETUP
1633 #line 189 "scanaut.ll"
1634 {
1635 yylval->str = new std::string(yytext + 1, yyleng - 1);
1636 return token::ANAME;
1637 }
1638 YY_BREAK
1639 /* Handle short numbers without going through parse_int() for efficiency. */
1640 case 33:
1641 YY_RULE_SETUP
1642 #line 194 "scanaut.ll"
1643 yylval->num = *yytext - '0'; return token::INT;
1644 YY_BREAK
1645 case 34:
1646 YY_RULE_SETUP
1647 #line 195 "scanaut.ll"
1648 {
1649 yylval->num = (yytext[0] * 10) + yytext[1] - '0' * 11;
1650 return token::INT;
1651 }
1652 YY_BREAK
1653 case 35:
1654 YY_RULE_SETUP
1655 #line 199 "scanaut.ll"
1656 parse_int(); return token::INT;
1657 YY_BREAK
1658
1659
1660 case 36:
1661 YY_RULE_SETUP
1662 #line 203 "scanaut.ll"
1663 return token::STATES;
1664 YY_BREAK
1665 case 37:
1666 YY_RULE_SETUP
1667 #line 204 "scanaut.ll"
1668 return token::STATE;
1669 YY_BREAK
1670 case 38:
1671 YY_RULE_SETUP
1672 #line 205 "scanaut.ll"
1673 return token::START;
1674 YY_BREAK
1675 case 39:
1676 YY_RULE_SETUP
1677 #line 206 "scanaut.ll"
1678 return token::AP;
1679 YY_BREAK
1680 case 40:
1681 YY_RULE_SETUP
1682 #line 207 "scanaut.ll"
1683 return token::V2;
1684 YY_BREAK
1685 case 41:
1686 YY_RULE_SETUP
1687 #line 208 "scanaut.ll"
1688 return token::EXPLICIT;
1689 YY_BREAK
1690 case 42:
1691 YY_RULE_SETUP
1692 #line 209 "scanaut.ll"
1693 yylloc->step();
1694 YY_BREAK
1695 case 43:
1696 YY_RULE_SETUP
1697 #line 210 "scanaut.ll"
1698 yylloc->step();
1699 YY_BREAK
1700 case 44:
1701 YY_RULE_SETUP
1702 #line 211 "scanaut.ll"
1703 return token::ACCPAIRS;
1704 YY_BREAK
1705 case 45:
1706 YY_RULE_SETUP
1707 #line 212 "scanaut.ll"
1708 return token::ACCSIG;
1709 YY_BREAK
1710 case 46:
1711 YY_RULE_SETUP
1712 #line 213 "scanaut.ll"
1713 return token::ENDOFHEADER;
1714 YY_BREAK
1715 /* Handle short numbers without going through parse_int() for efficiency. */
1716 case 47:
1717 YY_RULE_SETUP
1718 #line 215 "scanaut.ll"
1719 yylval->num = *yytext - '0'; return token::INT;
1720 YY_BREAK
1721 case 48:
1722 YY_RULE_SETUP
1723 #line 216 "scanaut.ll"
1724 {
1725 yylval->num = (yytext[0] * 10) + yytext[1] - '0' * 11;
1726 return token::INT;
1727 }
1728 YY_BREAK
1729 case 49:
1730 YY_RULE_SETUP
1731 #line 220 "scanaut.ll"
1732 parse_int(); return token::INT;
1733 YY_BREAK
1734 /* The start of any automaton is the end of this one.
1735 We do not try to detect LBTT automata, as that would
1736 be too hard to distinguish from state numbers. */
1737 case 50:
1738 /* rule 50 can match eol */
1739 YY_RULE_SETUP
1740 #line 224 "scanaut.ll"
1741 {
1742 yylloc->end = yylloc->begin;
1743 yyless(0);
1744 BEGIN(INITIAL);
1745 return token::ENDDSTAR;
1746 }
1747 YY_BREAK
1748 case YY_STATE_EOF(in_DSTAR):
1749 #line 230 "scanaut.ll"
1750 return token::ENDDSTAR;
1751 YY_BREAK
1752
1753
1754 case 51:
1755 YY_RULE_SETUP
1756 #line 234 "scanaut.ll"
1757 return token::SKIP;
1758 YY_BREAK
1759 case 52:
1760 YY_RULE_SETUP
1761 #line 235 "scanaut.ll"
1762 return token::IF;
1763 YY_BREAK
1764 case 53:
1765 YY_RULE_SETUP
1766 #line 236 "scanaut.ll"
1767 return token::FI;
1768 YY_BREAK
1769 case 54:
1770 YY_RULE_SETUP
1771 #line 237 "scanaut.ll"
1772 return token::DO;
1773 YY_BREAK
1774 case 55:
1775 YY_RULE_SETUP
1776 #line 238 "scanaut.ll"
1777 return token::OD;
1778 YY_BREAK
1779 case 56:
1780 YY_RULE_SETUP
1781 #line 239 "scanaut.ll"
1782 return token::ARROW;
1783 YY_BREAK
1784 case 57:
1785 YY_RULE_SETUP
1786 #line 240 "scanaut.ll"
1787 return token::GOTO;
1788 YY_BREAK
1789 case 58:
1790 YY_RULE_SETUP
1791 #line 241 "scanaut.ll"
1792 return token::FALSE;
1793 YY_BREAK
1794 case 59:
1795 YY_RULE_SETUP
1796 #line 242 "scanaut.ll"
1797 return token::ATOMIC;
1798 YY_BREAK
1799 case 60:
1800 YY_RULE_SETUP
1801 #line 243 "scanaut.ll"
1802 return token::ASSERT;
1803 YY_BREAK
1804 case 61:
1805 YY_RULE_SETUP
1806 #line 245 "scanaut.ll"
1807 {
1808 yyextra->parent_level = 1;
1809 BEGIN(in_NEVER_PAR);
1810 yylval->str = new std::string(yytext, yyleng);
1811 }
1812 YY_BREAK
1813 case 62:
1814 YY_RULE_SETUP
1815 #line 251 "scanaut.ll"
1816 {
1817 yylval->str = new std::string(yytext, yyleng);
1818 return token::FORMULA;
1819 }
1820 YY_BREAK
1821 case 63:
1822 YY_RULE_SETUP
1823 #line 256 "scanaut.ll"
1824 {
1825 yylval->str = new std::string(yytext, yyleng);
1826 return token::IDENTIFIER;
1827 }
1828 YY_BREAK
1829
1830 /* Note: the LBTT format is scanf friendly, but not Bison-friendly.
1831 If we only tokenize it as a stream of INTs, the parser will have
1832 a very hard time recognizing what is a state from what is a
1833 transitions. As a consequence we abuse the start conditions to
1834 maintain a state an return integers with different semantic types
1835 depending on the purpose of those integers. */
1836
1837 case 64:
1838 YY_RULE_SETUP
1839 #line 269 "scanaut.ll"
1840 {
1841 BEGIN(in_LBTT_STATE);
1842 auto end = parse_int();
1843 yyextra->lbtt_s = false;
1844 yyextra->lbtt_t = false;
1845 if (end)
1846 while (int c = *end++)
1847 {
1848 if (c == 's')
1849 yyextra->lbtt_s = true;
1850 else // c == 't'
1851 yyextra->lbtt_t = true;
1852 }
1853 if (!yyextra->lbtt_t)
1854 yyextra->lbtt_s = true;
1855 if (yyextra->lbtt_states == 0)
1856 {
1857 BEGIN(INITIAL);
1858 return token::LBTT_EMPTY;
1859 }
1860 if (yyextra->lbtt_s && !yyextra->lbtt_t)
1861 return token::INT_S;
1862 else
1863 return token::INT;
1864 }
1865 YY_BREAK
1866
1867 case 65:
1868 YY_RULE_SETUP
1869 #line 296 "scanaut.ll"
1870 {
1871 parse_int();
1872 BEGIN(in_LBTT_INIT);
1873 return token::STATE_NUM;
1874 }
1875 YY_BREAK
1876 case 66:
1877 YY_RULE_SETUP
1878 #line 301 "scanaut.ll"
1879 {
1880 yylval->num = *yytext - '0';
1881 if (yyextra->lbtt_s)
1882 BEGIN(in_LBTT_S_ACC);
1883 else
1884 BEGIN(in_LBTT_TRANS);
1885 return token::INT;
1886 }
1887 YY_BREAK
1888
1889 case 67:
1890 YY_RULE_SETUP
1891 #line 310 "scanaut.ll"
1892 parse_int(); return token::ACC;
1893 YY_BREAK
1894 case 68:
1895 YY_RULE_SETUP
1896 #line 311 "scanaut.ll"
1897 BEGIN(in_LBTT_TRANS); yylloc->step();
1898 YY_BREAK
1899
1900
1901 case 69:
1902 YY_RULE_SETUP
1903 #line 314 "scanaut.ll"
1904 {
1905 parse_int();
1906 if (yyextra->lbtt_t)
1907 BEGIN(in_LBTT_T_ACC);
1908 else
1909 BEGIN(in_LBTT_GUARD);
1910 return token::DEST_NUM;
1911 }
1912 YY_BREAK
1913 case 70:
1914 YY_RULE_SETUP
1915 #line 322 "scanaut.ll"
1916 {
1917 if (--yyextra->lbtt_states)
1918 {
1919 BEGIN(in_LBTT_STATE);
1920 yylloc->step();
1921 }
1922 else
1923 {
1924 BEGIN(INITIAL);
1925 return token::ENDAUT;
1926 }
1927 }
1928 YY_BREAK
1929
1930
1931 case 71:
1932 YY_RULE_SETUP
1933 #line 336 "scanaut.ll"
1934 parse_int(); return token::ACC;
1935 YY_BREAK
1936 case 72:
1937 YY_RULE_SETUP
1938 #line 337 "scanaut.ll"
1939 BEGIN(in_LBTT_GUARD); yylloc->step();
1940 YY_BREAK
1941
1942
1943 case 73:
1944 YY_RULE_SETUP
1945 #line 340 "scanaut.ll"
1946 {
1947 yylval->str = new std::string(yytext, yyleng);
1948 BEGIN(in_LBTT_TRANS);
1949 return token::STRING;
1950 }
1951 YY_BREAK
1952
1953
1954 case 74:
1955 YY_RULE_SETUP
1956 #line 349 "scanaut.ll"
1957 ++yyextra->comment_level;
1958 YY_BREAK
1959 case 75:
1960 YY_RULE_SETUP
1961 #line 350 "scanaut.ll"
1962 continue;
1963 YY_BREAK
1964 case 76:
1965 YY_RULE_SETUP
1966 #line 351 "scanaut.ll"
1967 continue;
1968 YY_BREAK
1969 case 77:
1970 YY_RULE_SETUP
1971 #line 352 "scanaut.ll"
1972 continue;
1973 YY_BREAK
1974 case 78:
1975 /* rule 78 can match eol */
1976 YY_RULE_SETUP
1977 #line 353 "scanaut.ll"
1978 yylloc->lines(yyleng); yylloc->end.column = 1;
1979 YY_BREAK
1980 case 79:
1981 /* rule 79 can match eol */
1982 YY_RULE_SETUP
1983 #line 354 "scanaut.ll"
1984 yylloc->lines(yyleng / 2); yylloc->end.column = 1;
1985 YY_BREAK
1986 case 80:
1987 YY_RULE_SETUP
1988 #line 355 "scanaut.ll"
1989 {
1990 if (--yyextra->comment_level == 0)
1991 {
1992 yylloc->step();
1993 int oc = yyextra->orig_cond;
1994 BEGIN(oc);
1995 }
1996 }
1997 YY_BREAK
1998 case YY_STATE_EOF(in_COMMENT):
1999 #line 363 "scanaut.ll"
2000 {
2001 int oc = yyextra->orig_cond;
2002 BEGIN(oc);
2003 error_list.push_back(
2004 spot::parse_aut_error(*yylloc,
2005 "unclosed comment"));
2006 return 0;
2007 }
2008 YY_BREAK
2009
2010 /* matched late, so that the in_LBTT_GUARD pattern has precedence */
2011 case 81:
2012 YY_RULE_SETUP
2013 #line 374 "scanaut.ll"
2014 {
2015 yyextra->orig_cond = YY_START;
2016 BEGIN(in_STRING);
2017 yyextra->comment_level = 1;
2018 }
2019 YY_BREAK
2020
2021 case 82:
2022 YY_RULE_SETUP
2023 #line 381 "scanaut.ll"
2024 {
2025 int oc = yyextra->orig_cond;
2026 BEGIN(oc);
2027 yylval->str = new std::string(s);
2028 return token::STRING;
2029 }
2030 YY_BREAK
2031 case 83:
2032 /* rule 83 can match eol */
2033 YY_RULE_SETUP
2034 #line 387 "scanaut.ll"
2035 {
2036 s.append(yytext, yyleng);
2037 yylloc->lines(yyleng); yylloc->end.column = 1;
2038 }
2039 YY_BREAK
2040 case 84:
2041 /* rule 84 can match eol */
2042 YY_RULE_SETUP
2043 #line 391 "scanaut.ll"
2044 {
2045 s.append(yytext, yyleng);
2046 yylloc->lines(yyleng / 2); yylloc->end.column = 1;
2047 }
2048 YY_BREAK
2049 case 85:
2050 YY_RULE_SETUP
2051 #line 395 "scanaut.ll"
2052 s += yytext[1];
2053 YY_BREAK
2054 case 86:
2055 YY_RULE_SETUP
2056 #line 396 "scanaut.ll"
2057 s.append(yytext, yyleng);
2058 YY_BREAK
2059 case YY_STATE_EOF(in_STRING):
2060 #line 397 "scanaut.ll"
2061 {
2062 error_list.push_back(
2063 spot::parse_aut_error(*yylloc,
2064 "unclosed string"));
2065 int oc = yyextra->orig_cond;
2066 BEGIN(oc);
2067 yylval->str = new std::string(s);
2068 return token::STRING;
2069 }
2070 YY_BREAK
2071
2072
2073 case 87:
2074 YY_RULE_SETUP
2075 #line 409 "scanaut.ll"
2076 {
2077 ++yyextra->parent_level;
2078 yylval->str->append(yytext, yyleng);
2079 }
2080 YY_BREAK
2081 /* if we match ")&&(" or ")||(", stay in <in_NEVER_PAR> mode */
2082 case 88:
2083 YY_RULE_SETUP
2084 #line 414 "scanaut.ll"
2085 {
2086 yylval->str->append(yytext, yyleng);
2087 }
2088 YY_BREAK
2089 case 89:
2090 YY_RULE_SETUP
2091 #line 417 "scanaut.ll"
2092 {
2093 yylval->str->append(yytext, yyleng);
2094 if (!--yyextra->parent_level)
2095 {
2096 BEGIN(in_NEVER);
2097 spot::trim(*yylval->str);
2098 return token::FORMULA;
2099 }
2100 }
2101 YY_BREAK
2102 case 90:
2103 /* rule 90 can match eol */
2104 YY_RULE_SETUP
2105 #line 426 "scanaut.ll"
2106 {
2107 yylval->str->append(yytext, yyleng);
2108 yylloc->lines(yyleng); yylloc->end.column = 1;
2109 }
2110 YY_BREAK
2111 case 91:
2112 /* rule 91 can match eol */
2113 YY_RULE_SETUP
2114 #line 430 "scanaut.ll"
2115 {
2116 yylval->str->append(yytext, yyleng);
2117 yylloc->lines(yyleng / 2); yylloc->end.column = 1;
2118 }
2119 YY_BREAK
2120 case 92:
2121 YY_RULE_SETUP
2122 #line 434 "scanaut.ll"
2123 yylval->str->append(yytext, yyleng);
2124 YY_BREAK
2125 case YY_STATE_EOF(in_NEVER_PAR):
2126 #line 435 "scanaut.ll"
2127 {
2128 error_list.push_back(
2129 spot::parse_aut_error(*yylloc,
2130 "missing closing parenthese"));
2131 yylval->str->append(yyextra->parent_level, ')');
2132 BEGIN(in_NEVER);
2133 spot::trim(*yylval->str);
2134 return token::FORMULA;
2135 }
2136 YY_BREAK
2137
2138 case 93:
2139 YY_RULE_SETUP
2140 #line 446 "scanaut.ll"
2141 return *yytext;
2142 YY_BREAK
2143
2144 /* Dummy use of yyunput to shut up a gcc warning. */
2145 (void) &yyunput;
2146
2147 case 94:
2148 YY_RULE_SETUP
2149 #line 453 "scanaut.ll"
2150 ECHO;
2151 YY_BREAK
2152 #line 2153 "scanaut.cc"
2153 case YY_STATE_EOF(INITIAL):
2154 case YY_STATE_EOF(in_HOA):
2155 case YY_STATE_EOF(in_NEVER):
2156 case YY_STATE_EOF(in_LBTT_HEADER):
2157 case YY_STATE_EOF(in_LBTT_STATE):
2158 case YY_STATE_EOF(in_LBTT_INIT):
2159 case YY_STATE_EOF(in_LBTT_TRANS):
2160 case YY_STATE_EOF(in_LBTT_T_ACC):
2161 case YY_STATE_EOF(in_LBTT_S_ACC):
2162 case YY_STATE_EOF(in_LBTT_GUARD):
2163 yyterminate();
2164
2165 case YY_END_OF_BUFFER:
2166 {
2167 /* Amount of text matched not including the EOB char. */
2168 int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
2169
2170 /* Undo the effects of YY_DO_BEFORE_ACTION. */
2171 *yy_cp = yyg->yy_hold_char;
2172 YY_RESTORE_YY_MORE_OFFSET
2173
2174 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
2175 {
2176 /* We're scanning a new file or input source. It's
2177 * possible that this happened because the user
2178 * just pointed yyin at a new source and called
2179 * yylex(). If so, then we have to assure
2180 * consistency between YY_CURRENT_BUFFER and our
2181 * globals. Here is the right place to do so, because
2182 * this is the first action (other than possibly a
2183 * back-up) that will match for the new input source.
2184 */
2185 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2186 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
2187 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
2188 }
2189
2190 /* Note that here we test for yy_c_buf_p "<=" to the position
2191 * of the first EOB in the buffer, since yy_c_buf_p will
2192 * already have been incremented past the NUL character
2193 * (since all states make transitions on EOB to the
2194 * end-of-buffer state). Contrast this with the test
2195 * in input().
2196 */
2197 if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
2198 { /* This was really a NUL. */
2199 yy_state_type yy_next_state;
2200
2201 yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
2202
2203 yy_current_state = yy_get_previous_state( yyscanner );
2204
2205 /* Okay, we're now positioned to make the NUL
2206 * transition. We couldn't have
2207 * yy_get_previous_state() go ahead and do it
2208 * for us because it doesn't know how to deal
2209 * with the possibility of jamming (and we don't
2210 * want to build jamming into it because then it
2211 * will run more slowly).
2212 */
2213
2214 yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
2215
2216 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
2217
2218 if ( yy_next_state )
2219 {
2220 /* Consume the NUL. */
2221 yy_cp = ++yyg->yy_c_buf_p;
2222 yy_current_state = yy_next_state;
2223 goto yy_match;
2224 }
2225
2226 else
2227 {
2228 yy_cp = yyg->yy_c_buf_p;
2229 goto yy_find_action;
2230 }
2231 }
2232
2233 else switch ( yy_get_next_buffer( yyscanner ) )
2234 {
2235 case EOB_ACT_END_OF_FILE:
2236 {
2237 yyg->yy_did_buffer_switch_on_eof = 0;
2238
2239 if ( yywrap( yyscanner ) )
2240 {
2241 /* Note: because we've taken care in
2242 * yy_get_next_buffer() to have set up
2243 * yytext, we can now set up
2244 * yy_c_buf_p so that if some total
2245 * hoser (like flex itself) wants to
2246 * call the scanner after we return the
2247 * YY_NULL, it'll still work - another
2248 * YY_NULL will get returned.
2249 */
2250 yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
2251
2252 yy_act = YY_STATE_EOF(YY_START);
2253 goto do_action;
2254 }
2255
2256 else
2257 {
2258 if ( ! yyg->yy_did_buffer_switch_on_eof )
2259 YY_NEW_FILE;
2260 }
2261 break;
2262 }
2263
2264 case EOB_ACT_CONTINUE_SCAN:
2265 yyg->yy_c_buf_p =
2266 yyg->yytext_ptr + yy_amount_of_matched_text;
2267
2268 yy_current_state = yy_get_previous_state( yyscanner );
2269
2270 yy_cp = yyg->yy_c_buf_p;
2271 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
2272 goto yy_match;
2273
2274 case EOB_ACT_LAST_MATCH:
2275 yyg->yy_c_buf_p =
2276 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
2277
2278 yy_current_state = yy_get_previous_state( yyscanner );
2279
2280 yy_cp = yyg->yy_c_buf_p;
2281 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
2282 goto yy_find_action;
2283 }
2284 break;
2285 }
2286
2287 default:
2288 YY_FATAL_ERROR(
2289 "fatal flex scanner internal error--no action found" );
2290 } /* end of action switch */
2291 } /* end of scanning one token */
2292 } /* end of user's declarations */
2293 } /* end of yylex */
2294
2295 /* yy_get_next_buffer - try to read in a new buffer
2296 *
2297 * Returns a code representing an action:
2298 * EOB_ACT_LAST_MATCH -
2299 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2300 * EOB_ACT_END_OF_FILE - end of file
2301 */
2302 static int yy_get_next_buffer (yyscan_t yyscanner)
2303 {
2304 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2305 char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
2306 char *source = yyg->yytext_ptr;
2307 int number_to_move, i;
2308 int ret_val;
2309
2310 if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
2311 YY_FATAL_ERROR(
2312 "fatal flex scanner internal error--end of buffer missed" );
2313
2314 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
2315 { /* Don't try to fill the buffer, so this is an EOF. */
2316 if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
2317 {
2318 /* We matched a single character, the EOB, so
2319 * treat this as a final EOF.
2320 */
2321 return EOB_ACT_END_OF_FILE;
2322 }
2323
2324 else
2325 {
2326 /* We matched some text prior to the EOB, first
2327 * process it.
2328 */
2329 return EOB_ACT_LAST_MATCH;
2330 }
2331 }
2332
2333 /* Try to read more data. */
2334
2335 /* First move last chars to start of buffer. */
2336 number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1);
2337
2338 for ( i = 0; i < number_to_move; ++i )
2339 *(dest++) = *(source++);
2340
2341 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2342 /* don't do the read, it's not guaranteed to return an EOF,
2343 * just force an EOF
2344 */
2345 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
2346
2347 else
2348 {
2349 int num_to_read =
2350 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
2351
2352 while ( num_to_read <= 0 )
2353 { /* Not enough room in the buffer - grow it. */
2354
2355 /* just a shorter name for the current buffer */
2356 YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
2357
2358 int yy_c_buf_p_offset =
2359 (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
2360
2361 if ( b->yy_is_our_buffer )
2362 {
2363 int new_size = b->yy_buf_size * 2;
2364
2365 if ( new_size <= 0 )
2366 b->yy_buf_size += b->yy_buf_size / 8;
2367 else
2368 b->yy_buf_size *= 2;
2369
2370 b->yy_ch_buf = (char *)
2371 /* Include room in for 2 EOB chars. */
2372 yyrealloc( (void *) b->yy_ch_buf,
2373 (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
2374 }
2375 else
2376 /* Can't grow it, we don't own it. */
2377 b->yy_ch_buf = NULL;
2378
2379 if ( ! b->yy_ch_buf )
2380 YY_FATAL_ERROR(
2381 "fatal error - scanner input buffer overflow" );
2382
2383 yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
2384
2385 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
2386 number_to_move - 1;
2387
2388 }
2389
2390 if ( num_to_read > YY_READ_BUF_SIZE )
2391 num_to_read = YY_READ_BUF_SIZE;
2392
2393 /* Read in more data. */
2394 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2395 yyg->yy_n_chars, num_to_read );
2396
2397 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2398 }
2399
2400 if ( yyg->yy_n_chars == 0 )
2401 {
2402 if ( number_to_move == YY_MORE_ADJ )
2403 {
2404 ret_val = EOB_ACT_END_OF_FILE;
2405 yyrestart( yyin , yyscanner);
2406 }
2407
2408 else
2409 {
2410 ret_val = EOB_ACT_LAST_MATCH;
2411 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
2412 YY_BUFFER_EOF_PENDING;
2413 }
2414 }
2415
2416 else
2417 ret_val = EOB_ACT_CONTINUE_SCAN;
2418
2419 if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
2420 /* Extend the array by 50%, plus the number we really need. */
2421 int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
2422 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
2423 (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner );
2424 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2425 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
2426 /* "- 2" to take care of EOB's */
2427 YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
2428 }
2429
2430 yyg->yy_n_chars += number_to_move;
2431 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
2432 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
2433
2434 yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
2435
2436 return ret_val;
2437 }
2438
2439 /* yy_get_previous_state - get the state just before the EOB char was reached */
2440
yy_get_previous_state(yyscan_t yyscanner)2441 static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
2442 {
2443 yy_state_type yy_current_state;
2444 char *yy_cp;
2445 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2446
2447 yy_current_state = yyg->yy_start;
2448
2449 for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
2450 {
2451 YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2452 if ( yy_accept[yy_current_state] )
2453 {
2454 yyg->yy_last_accepting_state = yy_current_state;
2455 yyg->yy_last_accepting_cpos = yy_cp;
2456 }
2457 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2458 {
2459 yy_current_state = (int) yy_def[yy_current_state];
2460 if ( yy_current_state >= 416 )
2461 yy_c = yy_meta[yy_c];
2462 }
2463 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
2464 }
2465
2466 return yy_current_state;
2467 }
2468
2469 /* yy_try_NUL_trans - try to make a transition on the NUL character
2470 *
2471 * synopsis
2472 * next_state = yy_try_NUL_trans( current_state );
2473 */
yy_try_NUL_trans(yy_state_type yy_current_state,yyscan_t yyscanner)2474 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
2475 {
2476 int yy_is_jam;
2477 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
2478 char *yy_cp = yyg->yy_c_buf_p;
2479
2480 YY_CHAR yy_c = 1;
2481 if ( yy_accept[yy_current_state] )
2482 {
2483 yyg->yy_last_accepting_state = yy_current_state;
2484 yyg->yy_last_accepting_cpos = yy_cp;
2485 }
2486 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2487 {
2488 yy_current_state = (int) yy_def[yy_current_state];
2489 if ( yy_current_state >= 416 )
2490 yy_c = yy_meta[yy_c];
2491 }
2492 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
2493 yy_is_jam = (yy_current_state == 415);
2494
2495 (void)yyg;
2496 return yy_is_jam ? 0 : yy_current_state;
2497 }
2498
2499 #ifndef YY_NO_UNPUT
2500
yyunput(int c,char * yy_bp,yyscan_t yyscanner)2501 static void yyunput (int c, char * yy_bp , yyscan_t yyscanner)
2502 {
2503 char *yy_cp;
2504 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2505
2506 yy_cp = yyg->yy_c_buf_p;
2507
2508 /* undo effects of setting up yytext */
2509 *yy_cp = yyg->yy_hold_char;
2510
2511 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2512 { /* need to shift things up to make room */
2513 /* +2 for EOB chars. */
2514 int number_to_move = yyg->yy_n_chars + 2;
2515 char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
2516 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
2517 char *source =
2518 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
2519
2520 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2521 *--dest = *--source;
2522
2523 yy_cp += (int) (dest - source);
2524 yy_bp += (int) (dest - source);
2525 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
2526 yyg->yy_n_chars = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
2527
2528 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2529 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2530 }
2531
2532 *--yy_cp = (char) c;
2533
2534 yyg->yytext_ptr = yy_bp;
2535 yyg->yy_hold_char = *yy_cp;
2536 yyg->yy_c_buf_p = yy_cp;
2537 }
2538
2539 #endif
2540
2541 #ifndef YY_NO_INPUT
2542 #ifdef __cplusplus
yyinput(yyscan_t yyscanner)2543 static int yyinput (yyscan_t yyscanner)
2544 #else
2545 static int input (yyscan_t yyscanner)
2546 #endif
2547
2548 {
2549 int c;
2550 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2551
2552 *yyg->yy_c_buf_p = yyg->yy_hold_char;
2553
2554 if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
2555 {
2556 /* yy_c_buf_p now points to the character we want to return.
2557 * If this occurs *before* the EOB characters, then it's a
2558 * valid NUL; if not, then we've hit the end of the buffer.
2559 */
2560 if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
2561 /* This was really a NUL. */
2562 *yyg->yy_c_buf_p = '\0';
2563
2564 else
2565 { /* need more input */
2566 int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr);
2567 ++yyg->yy_c_buf_p;
2568
2569 switch ( yy_get_next_buffer( yyscanner ) )
2570 {
2571 case EOB_ACT_LAST_MATCH:
2572 /* This happens because yy_g_n_b()
2573 * sees that we've accumulated a
2574 * token and flags that we need to
2575 * try matching the token before
2576 * proceeding. But for input(),
2577 * there's no matching to consider.
2578 * So convert the EOB_ACT_LAST_MATCH
2579 * to EOB_ACT_END_OF_FILE.
2580 */
2581
2582 /* Reset buffer status. */
2583 yyrestart( yyin , yyscanner);
2584
2585 /*FALLTHROUGH*/
2586
2587 case EOB_ACT_END_OF_FILE:
2588 {
2589 if ( yywrap( yyscanner ) )
2590 return 0;
2591
2592 if ( ! yyg->yy_did_buffer_switch_on_eof )
2593 YY_NEW_FILE;
2594 #ifdef __cplusplus
2595 return yyinput(yyscanner);
2596 #else
2597 return input(yyscanner);
2598 #endif
2599 }
2600
2601 case EOB_ACT_CONTINUE_SCAN:
2602 yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
2603 break;
2604 }
2605 }
2606 }
2607
2608 c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */
2609 *yyg->yy_c_buf_p = '\0'; /* preserve yytext */
2610 yyg->yy_hold_char = *++yyg->yy_c_buf_p;
2611
2612 return c;
2613 }
2614 #endif /* ifndef YY_NO_INPUT */
2615
2616 /** Immediately switch to a different input stream.
2617 * @param input_file A readable stream.
2618 * @param yyscanner The scanner object.
2619 * @note This function does not reset the start condition to @c INITIAL .
2620 */
yyrestart(FILE * input_file,yyscan_t yyscanner)2621 void yyrestart (FILE * input_file , yyscan_t yyscanner)
2622 {
2623 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2624
2625 if ( ! YY_CURRENT_BUFFER ){
2626 yyensure_buffer_stack (yyscanner);
2627 YY_CURRENT_BUFFER_LVALUE =
2628 yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
2629 }
2630
2631 yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner);
2632 yy_load_buffer_state( yyscanner );
2633 }
2634
2635 /** Switch to a different input buffer.
2636 * @param new_buffer The new input buffer.
2637 * @param yyscanner The scanner object.
2638 */
yy_switch_to_buffer(YY_BUFFER_STATE new_buffer,yyscan_t yyscanner)2639 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
2640 {
2641 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2642
2643 /* TODO. We should be able to replace this entire function body
2644 * with
2645 * yypop_buffer_state();
2646 * yypush_buffer_state(new_buffer);
2647 */
2648 yyensure_buffer_stack (yyscanner);
2649 if ( YY_CURRENT_BUFFER == new_buffer )
2650 return;
2651
2652 if ( YY_CURRENT_BUFFER )
2653 {
2654 /* Flush out information for old buffer. */
2655 *yyg->yy_c_buf_p = yyg->yy_hold_char;
2656 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
2657 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2658 }
2659
2660 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2661 yy_load_buffer_state( yyscanner );
2662
2663 /* We don't actually know whether we did this switch during
2664 * EOF (yywrap()) processing, but the only time this flag
2665 * is looked at is after yywrap() is called, so it's safe
2666 * to go ahead and always set it.
2667 */
2668 yyg->yy_did_buffer_switch_on_eof = 1;
2669 }
2670
yy_load_buffer_state(yyscan_t yyscanner)2671 static void yy_load_buffer_state (yyscan_t yyscanner)
2672 {
2673 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2674 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2675 yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2676 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2677 yyg->yy_hold_char = *yyg->yy_c_buf_p;
2678 }
2679
2680 /** Allocate and initialize an input buffer state.
2681 * @param file A readable stream.
2682 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2683 * @param yyscanner The scanner object.
2684 * @return the allocated buffer state.
2685 */
yy_create_buffer(FILE * file,int size,yyscan_t yyscanner)2686 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner)
2687 {
2688 YY_BUFFER_STATE b;
2689
2690 b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
2691 if ( ! b )
2692 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2693
2694 b->yy_buf_size = size;
2695
2696 /* yy_ch_buf has to be 2 characters longer than the size given because
2697 * we need to put in 2 end-of-buffer characters.
2698 */
2699 b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
2700 if ( ! b->yy_ch_buf )
2701 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2702
2703 b->yy_is_our_buffer = 1;
2704
2705 yy_init_buffer( b, file , yyscanner);
2706
2707 return b;
2708 }
2709
2710 /** Destroy the buffer.
2711 * @param b a buffer created with yy_create_buffer()
2712 * @param yyscanner The scanner object.
2713 */
yy_delete_buffer(YY_BUFFER_STATE b,yyscan_t yyscanner)2714 void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
2715 {
2716 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2717
2718 if ( ! b )
2719 return;
2720
2721 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2722 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
2723
2724 if ( b->yy_is_our_buffer )
2725 yyfree( (void *) b->yy_ch_buf , yyscanner );
2726
2727 yyfree( (void *) b , yyscanner );
2728 }
2729
2730 /* Initializes or reinitializes a buffer.
2731 * This function is sometimes called more than once on the same buffer,
2732 * such as during a yyrestart() or at EOF.
2733 */
yy_init_buffer(YY_BUFFER_STATE b,FILE * file,yyscan_t yyscanner)2734 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
2735
2736 {
2737 int oerrno = errno;
2738 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2739
2740 yy_flush_buffer( b , yyscanner);
2741
2742 b->yy_input_file = file;
2743 b->yy_fill_buffer = 1;
2744
2745 /* If b is the current buffer, then yy_init_buffer was _probably_
2746 * called from yyrestart() or through yy_get_next_buffer.
2747 * In that case, we don't want to reset the lineno or column.
2748 */
2749 if (b != YY_CURRENT_BUFFER){
2750 b->yy_bs_lineno = 1;
2751 b->yy_bs_column = 0;
2752 }
2753
2754 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2755
2756 errno = oerrno;
2757 }
2758
2759 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2760 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2761 * @param yyscanner The scanner object.
2762 */
yy_flush_buffer(YY_BUFFER_STATE b,yyscan_t yyscanner)2763 void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
2764 {
2765 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2766 if ( ! b )
2767 return;
2768
2769 b->yy_n_chars = 0;
2770
2771 /* We always need two end-of-buffer characters. The first causes
2772 * a transition to the end-of-buffer state. The second causes
2773 * a jam in that state.
2774 */
2775 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2776 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2777
2778 b->yy_buf_pos = &b->yy_ch_buf[0];
2779
2780 b->yy_at_bol = 1;
2781 b->yy_buffer_status = YY_BUFFER_NEW;
2782
2783 if ( b == YY_CURRENT_BUFFER )
2784 yy_load_buffer_state( yyscanner );
2785 }
2786
2787 /** Pushes the new state onto the stack. The new state becomes
2788 * the current state. This function will allocate the stack
2789 * if necessary.
2790 * @param new_buffer The new state.
2791 * @param yyscanner The scanner object.
2792 */
yypush_buffer_state(YY_BUFFER_STATE new_buffer,yyscan_t yyscanner)2793 void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
2794 {
2795 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2796 if (new_buffer == NULL)
2797 return;
2798
2799 yyensure_buffer_stack(yyscanner);
2800
2801 /* This block is copied from yy_switch_to_buffer. */
2802 if ( YY_CURRENT_BUFFER )
2803 {
2804 /* Flush out information for old buffer. */
2805 *yyg->yy_c_buf_p = yyg->yy_hold_char;
2806 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
2807 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2808 }
2809
2810 /* Only push if top exists. Otherwise, replace top. */
2811 if (YY_CURRENT_BUFFER)
2812 yyg->yy_buffer_stack_top++;
2813 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2814
2815 /* copied from yy_switch_to_buffer. */
2816 yy_load_buffer_state( yyscanner );
2817 yyg->yy_did_buffer_switch_on_eof = 1;
2818 }
2819
2820 /** Removes and deletes the top of the stack, if present.
2821 * The next element becomes the new top.
2822 * @param yyscanner The scanner object.
2823 */
yypop_buffer_state(yyscan_t yyscanner)2824 void yypop_buffer_state (yyscan_t yyscanner)
2825 {
2826 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2827 if (!YY_CURRENT_BUFFER)
2828 return;
2829
2830 yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner);
2831 YY_CURRENT_BUFFER_LVALUE = NULL;
2832 if (yyg->yy_buffer_stack_top > 0)
2833 --yyg->yy_buffer_stack_top;
2834
2835 if (YY_CURRENT_BUFFER) {
2836 yy_load_buffer_state( yyscanner );
2837 yyg->yy_did_buffer_switch_on_eof = 1;
2838 }
2839 }
2840
2841 /* Allocates the stack if it does not exist.
2842 * Guarantees space for at least one push.
2843 */
yyensure_buffer_stack(yyscan_t yyscanner)2844 static void yyensure_buffer_stack (yyscan_t yyscanner)
2845 {
2846 yy_size_t num_to_alloc;
2847 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2848
2849 if (!yyg->yy_buffer_stack) {
2850
2851 /* First allocation is just for 2 elements, since we don't know if this
2852 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2853 * immediate realloc on the next call.
2854 */
2855 num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
2856 yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc
2857 (num_to_alloc * sizeof(struct yy_buffer_state*)
2858 , yyscanner);
2859 if ( ! yyg->yy_buffer_stack )
2860 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2861
2862 memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2863
2864 yyg->yy_buffer_stack_max = num_to_alloc;
2865 yyg->yy_buffer_stack_top = 0;
2866 return;
2867 }
2868
2869 if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
2870
2871 /* Increase the buffer to prepare for a possible push. */
2872 yy_size_t grow_size = 8 /* arbitrary grow size */;
2873
2874 num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
2875 yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc
2876 (yyg->yy_buffer_stack,
2877 num_to_alloc * sizeof(struct yy_buffer_state*)
2878 , yyscanner);
2879 if ( ! yyg->yy_buffer_stack )
2880 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2881
2882 /* zero only the new slots.*/
2883 memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
2884 yyg->yy_buffer_stack_max = num_to_alloc;
2885 }
2886 }
2887
2888 /** Setup the input buffer state to scan directly from a user-specified character buffer.
2889 * @param base the character buffer
2890 * @param size the size in bytes of the character buffer
2891 * @param yyscanner The scanner object.
2892 * @return the newly allocated buffer state object.
2893 */
yy_scan_buffer(char * base,yy_size_t size,yyscan_t yyscanner)2894 YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
2895 {
2896 YY_BUFFER_STATE b;
2897
2898 if ( size < 2 ||
2899 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2900 base[size-1] != YY_END_OF_BUFFER_CHAR )
2901 /* They forgot to leave room for the EOB's. */
2902 return NULL;
2903
2904 b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
2905 if ( ! b )
2906 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2907
2908 b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
2909 b->yy_buf_pos = b->yy_ch_buf = base;
2910 b->yy_is_our_buffer = 0;
2911 b->yy_input_file = NULL;
2912 b->yy_n_chars = b->yy_buf_size;
2913 b->yy_is_interactive = 0;
2914 b->yy_at_bol = 1;
2915 b->yy_fill_buffer = 0;
2916 b->yy_buffer_status = YY_BUFFER_NEW;
2917
2918 yy_switch_to_buffer( b , yyscanner );
2919
2920 return b;
2921 }
2922
2923 /** Setup the input buffer state to scan a string. The next call to yylex() will
2924 * scan from a @e copy of @a str.
2925 * @param yystr a NUL-terminated string to scan
2926 * @param yyscanner The scanner object.
2927 * @return the newly allocated buffer state object.
2928 * @note If you want to scan bytes that may contain NUL values, then use
2929 * yy_scan_bytes() instead.
2930 */
yy_scan_string(const char * yystr,yyscan_t yyscanner)2931 YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner)
2932 {
2933
2934 return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner);
2935 }
2936
2937 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
2938 * scan from a @e copy of @a bytes.
2939 * @param yybytes the byte buffer to scan
2940 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
2941 * @param yyscanner The scanner object.
2942 * @return the newly allocated buffer state object.
2943 */
yy_scan_bytes(const char * yybytes,int _yybytes_len,yyscan_t yyscanner)2944 YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner)
2945 {
2946 YY_BUFFER_STATE b;
2947 char *buf;
2948 yy_size_t n;
2949 int i;
2950
2951 /* Get memory for full buffer, including space for trailing EOB's. */
2952 n = (yy_size_t) (_yybytes_len + 2);
2953 buf = (char *) yyalloc( n , yyscanner );
2954 if ( ! buf )
2955 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2956
2957 for ( i = 0; i < _yybytes_len; ++i )
2958 buf[i] = yybytes[i];
2959
2960 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2961
2962 b = yy_scan_buffer( buf, n , yyscanner);
2963 if ( ! b )
2964 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2965
2966 /* It's okay to grow etc. this buffer, and we should throw it
2967 * away when we're done.
2968 */
2969 b->yy_is_our_buffer = 1;
2970
2971 return b;
2972 }
2973
2974 #ifndef YY_EXIT_FAILURE
2975 #define YY_EXIT_FAILURE 2
2976 #endif
2977
yy_fatal_error(const char * msg,yyscan_t yyscanner)2978 static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner)
2979 {
2980 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2981 (void)yyg;
2982 fprintf( stderr, "%s\n", msg );
2983 exit( YY_EXIT_FAILURE );
2984 }
2985
2986 /* Redefine yyless() so it works in section 3 code. */
2987
2988 #undef yyless
2989 #define yyless(n) \
2990 do \
2991 { \
2992 /* Undo effects of setting up yytext. */ \
2993 int yyless_macro_arg = (n); \
2994 YY_LESS_LINENO(yyless_macro_arg);\
2995 yytext[yyleng] = yyg->yy_hold_char; \
2996 yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
2997 yyg->yy_hold_char = *yyg->yy_c_buf_p; \
2998 *yyg->yy_c_buf_p = '\0'; \
2999 yyleng = yyless_macro_arg; \
3000 } \
3001 while ( 0 )
3002
3003 /* Accessor methods (get/set functions) to struct members. */
3004
3005 /** Get the user-defined data for this scanner.
3006 * @param yyscanner The scanner object.
3007 */
yyget_extra(yyscan_t yyscanner)3008 YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner)
3009 {
3010 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3011 return yyextra;
3012 }
3013
3014 /** Get the current line number.
3015 * @param yyscanner The scanner object.
3016 */
yyget_lineno(yyscan_t yyscanner)3017 int yyget_lineno (yyscan_t yyscanner)
3018 {
3019 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3020
3021 if (! YY_CURRENT_BUFFER)
3022 return 0;
3023
3024 return yylineno;
3025 }
3026
3027 /** Get the current column number.
3028 * @param yyscanner The scanner object.
3029 */
yyget_column(yyscan_t yyscanner)3030 int yyget_column (yyscan_t yyscanner)
3031 {
3032 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3033
3034 if (! YY_CURRENT_BUFFER)
3035 return 0;
3036
3037 return yycolumn;
3038 }
3039
3040 /** Get the input stream.
3041 * @param yyscanner The scanner object.
3042 */
yyget_in(yyscan_t yyscanner)3043 FILE *yyget_in (yyscan_t yyscanner)
3044 {
3045 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3046 return yyin;
3047 }
3048
3049 /** Get the output stream.
3050 * @param yyscanner The scanner object.
3051 */
yyget_out(yyscan_t yyscanner)3052 FILE *yyget_out (yyscan_t yyscanner)
3053 {
3054 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3055 return yyout;
3056 }
3057
3058 /** Get the length of the current token.
3059 * @param yyscanner The scanner object.
3060 */
yyget_leng(yyscan_t yyscanner)3061 int yyget_leng (yyscan_t yyscanner)
3062 {
3063 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3064 return yyleng;
3065 }
3066
3067 /** Get the current token.
3068 * @param yyscanner The scanner object.
3069 */
3070
yyget_text(yyscan_t yyscanner)3071 char *yyget_text (yyscan_t yyscanner)
3072 {
3073 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3074 return yytext;
3075 }
3076
3077 /** Set the user-defined data. This data is never touched by the scanner.
3078 * @param user_defined The data to be associated with this scanner.
3079 * @param yyscanner The scanner object.
3080 */
yyset_extra(YY_EXTRA_TYPE user_defined,yyscan_t yyscanner)3081 void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
3082 {
3083 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3084 yyextra = user_defined ;
3085 }
3086
3087 /** Set the current line number.
3088 * @param _line_number line number
3089 * @param yyscanner The scanner object.
3090 */
yyset_lineno(int _line_number,yyscan_t yyscanner)3091 void yyset_lineno (int _line_number , yyscan_t yyscanner)
3092 {
3093 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3094
3095 /* lineno is only valid if an input buffer exists. */
3096 if (! YY_CURRENT_BUFFER )
3097 YY_FATAL_ERROR( "yyset_lineno called with no buffer" );
3098
3099 yylineno = _line_number;
3100 }
3101
3102 /** Set the current column.
3103 * @param _column_no column number
3104 * @param yyscanner The scanner object.
3105 */
yyset_column(int _column_no,yyscan_t yyscanner)3106 void yyset_column (int _column_no , yyscan_t yyscanner)
3107 {
3108 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3109
3110 /* column is only valid if an input buffer exists. */
3111 if (! YY_CURRENT_BUFFER )
3112 YY_FATAL_ERROR( "yyset_column called with no buffer" );
3113
3114 yycolumn = _column_no;
3115 }
3116
3117 /** Set the input stream. This does not discard the current
3118 * input buffer.
3119 * @param _in_str A readable stream.
3120 * @param yyscanner The scanner object.
3121 * @see yy_switch_to_buffer
3122 */
yyset_in(FILE * _in_str,yyscan_t yyscanner)3123 void yyset_in (FILE * _in_str , yyscan_t yyscanner)
3124 {
3125 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3126 yyin = _in_str ;
3127 }
3128
yyset_out(FILE * _out_str,yyscan_t yyscanner)3129 void yyset_out (FILE * _out_str , yyscan_t yyscanner)
3130 {
3131 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3132 yyout = _out_str ;
3133 }
3134
yyget_debug(yyscan_t yyscanner)3135 int yyget_debug (yyscan_t yyscanner)
3136 {
3137 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3138 return yy_flex_debug;
3139 }
3140
yyset_debug(int _bdebug,yyscan_t yyscanner)3141 void yyset_debug (int _bdebug , yyscan_t yyscanner)
3142 {
3143 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3144 yy_flex_debug = _bdebug ;
3145 }
3146
3147 /* Accessor methods for yylval and yylloc */
3148
3149 /* User-visible API */
3150
3151 /* yylex_init is special because it creates the scanner itself, so it is
3152 * the ONLY reentrant function that doesn't take the scanner as the last argument.
3153 * That's why we explicitly handle the declaration, instead of using our macros.
3154 */
yylex_init(yyscan_t * ptr_yy_globals)3155 int yylex_init(yyscan_t* ptr_yy_globals)
3156 {
3157 if (ptr_yy_globals == NULL){
3158 errno = EINVAL;
3159 return 1;
3160 }
3161
3162 *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL );
3163
3164 if (*ptr_yy_globals == NULL){
3165 errno = ENOMEM;
3166 return 1;
3167 }
3168
3169 /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
3170 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
3171
3172 return yy_init_globals ( *ptr_yy_globals );
3173 }
3174
3175 /* yylex_init_extra has the same functionality as yylex_init, but follows the
3176 * convention of taking the scanner as the last argument. Note however, that
3177 * this is a *pointer* to a scanner, as it will be allocated by this call (and
3178 * is the reason, too, why this function also must handle its own declaration).
3179 * The user defined value in the first argument will be available to yyalloc in
3180 * the yyextra field.
3181 */
yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t * ptr_yy_globals)3182 int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals )
3183 {
3184 struct yyguts_t dummy_yyguts;
3185
3186 yyset_extra (yy_user_defined, &dummy_yyguts);
3187
3188 if (ptr_yy_globals == NULL){
3189 errno = EINVAL;
3190 return 1;
3191 }
3192
3193 *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
3194
3195 if (*ptr_yy_globals == NULL){
3196 errno = ENOMEM;
3197 return 1;
3198 }
3199
3200 /* By setting to 0xAA, we expose bugs in
3201 yy_init_globals. Leave at 0x00 for releases. */
3202 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
3203
3204 yyset_extra (yy_user_defined, *ptr_yy_globals);
3205
3206 return yy_init_globals ( *ptr_yy_globals );
3207 }
3208
yy_init_globals(yyscan_t yyscanner)3209 static int yy_init_globals (yyscan_t yyscanner)
3210 {
3211 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3212 /* Initialization is the same as for the non-reentrant scanner.
3213 * This function is called from yylex_destroy(), so don't allocate here.
3214 */
3215
3216 yyg->yy_buffer_stack = NULL;
3217 yyg->yy_buffer_stack_top = 0;
3218 yyg->yy_buffer_stack_max = 0;
3219 yyg->yy_c_buf_p = NULL;
3220 yyg->yy_init = 0;
3221 yyg->yy_start = 0;
3222
3223 yyg->yy_start_stack_ptr = 0;
3224 yyg->yy_start_stack_depth = 0;
3225 yyg->yy_start_stack = NULL;
3226
3227 /* Defined in main.c */
3228 #ifdef YY_STDINIT
3229 yyin = stdin;
3230 yyout = stdout;
3231 #else
3232 yyin = NULL;
3233 yyout = NULL;
3234 #endif
3235
3236 /* For future reference: Set errno on error, since we are called by
3237 * yylex_init()
3238 */
3239 return 0;
3240 }
3241
3242 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
yylex_destroy(yyscan_t yyscanner)3243 int yylex_destroy (yyscan_t yyscanner)
3244 {
3245 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3246
3247 /* Pop the buffer stack, destroying each element. */
3248 while(YY_CURRENT_BUFFER){
3249 yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner );
3250 YY_CURRENT_BUFFER_LVALUE = NULL;
3251 yypop_buffer_state(yyscanner);
3252 }
3253
3254 /* Destroy the stack itself. */
3255 yyfree(yyg->yy_buffer_stack , yyscanner);
3256 yyg->yy_buffer_stack = NULL;
3257
3258 /* Destroy the start condition stack. */
3259 yyfree( yyg->yy_start_stack , yyscanner );
3260 yyg->yy_start_stack = NULL;
3261
3262 /* Reset the globals. This is important in a non-reentrant scanner so the next time
3263 * yylex() is called, initialization will occur. */
3264 yy_init_globals( yyscanner);
3265
3266 /* Destroy the main struct (reentrant only). */
3267 yyfree ( yyscanner , yyscanner );
3268 yyscanner = NULL;
3269 return 0;
3270 }
3271
3272 /*
3273 * Internal utility routines.
3274 */
3275
3276 #ifndef yytext_ptr
yy_flex_strncpy(char * s1,const char * s2,int n,yyscan_t yyscanner)3277 static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner)
3278 {
3279 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3280 (void)yyg;
3281
3282 int i;
3283 for ( i = 0; i < n; ++i )
3284 s1[i] = s2[i];
3285 }
3286 #endif
3287
3288 #ifdef YY_NEED_STRLEN
yy_flex_strlen(const char * s,yyscan_t yyscanner)3289 static int yy_flex_strlen (const char * s , yyscan_t yyscanner)
3290 {
3291 int n;
3292 for ( n = 0; s[n]; ++n )
3293 ;
3294
3295 return n;
3296 }
3297 #endif
3298
yyalloc(yy_size_t size,yyscan_t yyscanner)3299 void *yyalloc (yy_size_t size , yyscan_t yyscanner)
3300 {
3301 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3302 (void)yyg;
3303 return malloc(size);
3304 }
3305
yyrealloc(void * ptr,yy_size_t size,yyscan_t yyscanner)3306 void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
3307 {
3308 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3309 (void)yyg;
3310
3311 /* The cast to (char *) in the following accommodates both
3312 * implementations that use char* generic pointers, and those
3313 * that use void* generic pointers. It works with the latter
3314 * because both ANSI C and C++ allow castless assignment from
3315 * any pointer type to void*, and deal with argument conversions
3316 * as though doing an assignment.
3317 */
3318 return realloc(ptr, size);
3319 }
3320
yyfree(void * ptr,yyscan_t yyscanner)3321 void yyfree (void * ptr , yyscan_t yyscanner)
3322 {
3323 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3324 (void)yyg;
3325 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
3326 }
3327
3328 #define YYTABLES_NAME "yytables"
3329
3330 #line 453 "scanaut.ll"
3331
3332
3333 namespace spot
3334 {
3335 void
hoayyreset(yyscan_t yyscanner)3336 hoayyreset(yyscan_t yyscanner)
3337 {
3338 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3339 BEGIN(INITIAL);
3340 yyextra->comment_level = 0;
3341 yyextra->parent_level = 0;
3342 }
3343
3344 int
hoayyopen(const std::string & name,yyscan_t * scanner)3345 hoayyopen(const std::string &name, yyscan_t* scanner)
3346 {
3347 yylex_init_extra(new extra_data, scanner);
3348 yyscan_t yyscanner = *scanner;
3349 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3350 bool want_interactive = false;
3351
3352 // yy_flex_debug = 1;
3353 if (name == "-")
3354 {
3355 // If the input is a pipe, make the scanner
3356 // interactive so that it does not wait for the input
3357 // buffer to be full to process automata.
3358 struct stat s;
3359 if (fstat(fileno(stdin), &s) < 0)
3360 throw std::runtime_error("fstat failed");
3361 if (S_ISFIFO(s.st_mode))
3362 want_interactive = true;
3363
3364 yyin = stdin;
3365 yyextra->yyin_close = false;
3366 }
3367 else
3368 {
3369 yyin = fopen(name.c_str(), "r");
3370 if (!yyin)
3371 return 1;
3372 yyextra->yyin_close = true;
3373 }
3374
3375 if (want_interactive)
3376 yy_set_interactive(1);
3377 return 0;
3378 }
3379
3380 int
hoayystring(const char * data,yyscan_t * scanner)3381 hoayystring(const char* data, yyscan_t* scanner)
3382 {
3383 yylex_init_extra(new extra_data, scanner);
3384 yy_scan_string(data, *scanner);
3385 return 0;
3386 }
3387
3388 int
hoayyopen(int fd,yyscan_t * scanner)3389 hoayyopen(int fd, yyscan_t* scanner)
3390 {
3391 yylex_init_extra(new extra_data, scanner);
3392 yyscan_t yyscanner = *scanner;
3393 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3394 bool want_interactive = false;
3395 yyextra->yyin_close = false;
3396
3397 yyin = fdopen(fd, "r");
3398
3399 if (!yyin)
3400 throw std::runtime_error("fdopen failed");
3401
3402 // If the input is a pipe, make the scanner
3403 // interactive so that it does not wait for the input
3404 // buffer to be full to process automata.
3405 struct stat s;
3406 if (fstat(fd, &s) < 0)
3407 throw std::runtime_error("fstat failed");
3408 if (S_ISFIFO(s.st_mode))
3409 want_interactive = true;
3410
3411 if (want_interactive)
3412 yy_set_interactive(1);
3413 return 0;
3414 }
3415
3416 void
hoayyclose(yyscan_t yyscanner)3417 hoayyclose(yyscan_t yyscanner)
3418 {
3419 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3420 if (yyin)
3421 {
3422 if (yyextra->yyin_close)
3423 fclose(yyin);
3424 yyin = NULL;
3425 }
3426 delete yyextra;
3427 yylex_destroy(yyscanner);
3428 }
3429 }
3430
3431