4 #define YY_INT_ALIGNED short int
6 /* A lexical scanner generated by flex */
8 #define yy_create_buffer swf5_create_buffer
9 #define yy_delete_buffer swf5_delete_buffer
10 #define yy_flex_debug swf5_flex_debug
11 #define yy_init_buffer swf5_init_buffer
12 #define yy_flush_buffer swf5_flush_buffer
13 #define yy_load_buffer_state swf5_load_buffer_state
14 #define yy_switch_to_buffer swf5_switch_to_buffer
16 #define yyleng swf5leng
18 #define yylineno swf5lineno
20 #define yyrestart swf5restart
21 #define yytext swf5text
22 #define yywrap swf5wrap
23 #define yyalloc swf5alloc
24 #define yyrealloc swf5realloc
25 #define yyfree swf5free
28 #define YY_FLEX_MAJOR_VERSION 2
29 #define YY_FLEX_MINOR_VERSION 5
30 #define YY_FLEX_SUBMINOR_VERSION 35
31 #if YY_FLEX_SUBMINOR_VERSION > 0
35 /* First, we deal with platform-specific or compiler-specific issues. */
37 /* begin standard C headers. */
43 /* end standard C headers. */
45 /* flex integer type definitions */
50 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
52 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
54 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
55 * if you want the limit (max/min) macros for int types.
57 #ifndef __STDC_LIMIT_MACROS
58 #define __STDC_LIMIT_MACROS 1
62 typedef int8_t flex_int8_t
;
63 typedef uint8_t flex_uint8_t
;
64 typedef int16_t flex_int16_t
;
65 typedef uint16_t flex_uint16_t
;
66 typedef int32_t flex_int32_t
;
67 typedef uint32_t flex_uint32_t
;
69 typedef signed char flex_int8_t
;
70 typedef short int flex_int16_t
;
71 typedef int flex_int32_t
;
72 typedef unsigned char flex_uint8_t
;
73 typedef unsigned short int flex_uint16_t
;
74 typedef unsigned int flex_uint32_t
;
77 /* Limits of integral types. */
79 #define INT8_MIN (-128)
82 #define INT16_MIN (-32767-1)
85 #define INT32_MIN (-2147483647-1)
88 #define INT8_MAX (127)
91 #define INT16_MAX (32767)
94 #define INT32_MAX (2147483647)
97 #define UINT8_MAX (255U)
100 #define UINT16_MAX (65535U)
103 #define UINT32_MAX (4294967295U)
106 #endif /* ! FLEXINT_H */
110 /* The "const" storage-class-modifier is valid. */
113 #else /* ! __cplusplus */
115 /* C99 requires __STDC__ to be defined as 1. */
116 #if defined (__STDC__)
120 #endif /* defined (__STDC__) */
121 #endif /* ! __cplusplus */
124 #define yyconst const
129 /* Returned upon end-of-file. */
132 /* Promotes a possibly negative, possibly signed char to an unsigned
133 * integer for use as an array index. If the signed char is negative,
134 * we want to instead treat it as an 8-bit unsigned char, hence the
137 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
139 /* Enter a start condition. This macro really ought to take a parameter,
140 * but we do it the disgusting crufty way forced on us by the ()-less
141 * definition of BEGIN.
143 #define BEGIN (yy_start) = 1 + 2 *
145 /* Translate the current start state into a value that can be later handed
146 * to BEGIN to return to the state. The YYSTATE alias is for lex
149 #define YY_START (((yy_start) - 1) / 2)
150 #define YYSTATE YY_START
152 /* Action number for EOF rule of a given start state. */
153 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
155 /* Special action meaning "start processing a new file". */
156 #define YY_NEW_FILE swf5restart(swf5in )
158 #define YY_END_OF_BUFFER_CHAR 0
160 /* Size of default input buffer. */
162 #define YY_BUF_SIZE 16384
165 /* The state buf must be large enough to hold one state per character in the main buffer.
167 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
169 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
170 #define YY_TYPEDEF_YY_BUFFER_STATE
171 typedef struct yy_buffer_state
*YY_BUFFER_STATE
;
176 extern FILE *swf5in
, *swf5out
;
178 #define EOB_ACT_CONTINUE_SCAN 0
179 #define EOB_ACT_END_OF_FILE 1
180 #define EOB_ACT_LAST_MATCH 2
182 #define YY_LESS_LINENO(n)
184 /* Return all but the first "n" matched characters back to the input stream. */
188 /* Undo effects of setting up swf5text. */ \
189 int yyless_macro_arg = (n); \
190 YY_LESS_LINENO(yyless_macro_arg);\
191 *yy_cp = (yy_hold_char); \
192 YY_RESTORE_YY_MORE_OFFSET \
193 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
194 YY_DO_BEFORE_ACTION; /* set up swf5text again */ \
198 #define unput(c) yyunput( c, (yytext_ptr) )
200 #ifndef YY_TYPEDEF_YY_SIZE_T
201 #define YY_TYPEDEF_YY_SIZE_T
202 typedef size_t yy_size_t
;
205 #ifndef YY_STRUCT_YY_BUFFER_STATE
206 #define YY_STRUCT_YY_BUFFER_STATE
207 struct yy_buffer_state
211 char *yy_ch_buf
; /* input buffer */
212 char *yy_buf_pos
; /* current position in input buffer */
214 /* Size of input buffer in bytes, not including room for EOB
217 yy_size_t yy_buf_size
;
219 /* Number of characters read into yy_ch_buf, not including EOB
224 /* Whether we "own" the buffer - i.e., we know we created it,
225 * and can realloc() it to grow it, and should free() it to
228 int yy_is_our_buffer
;
230 /* Whether this is an "interactive" input source; if so, and
231 * if we're using stdio for input, then we want to use getc()
232 * instead of fread(), to make sure we stop fetching input after
235 int yy_is_interactive
;
237 /* Whether we're considered to be at the beginning of a line.
238 * If so, '^' rules will be active on the next match, otherwise
243 int yy_bs_lineno
; /**< The line count. */
244 int yy_bs_column
; /**< The column count. */
246 /* Whether to try to fill the input buffer when we reach the
251 int yy_buffer_status
;
253 #define YY_BUFFER_NEW 0
254 #define YY_BUFFER_NORMAL 1
255 /* When an EOF's been seen but there's still some text to process
256 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
257 * shouldn't try reading from the input source any more. We might
258 * still have a bunch of tokens to match, though, because of
259 * possible backing-up.
261 * When we actually see the EOF, we change the status to "new"
262 * (via swf5restart()), so that the user can continue scanning by
263 * just pointing swf5in at a new input file.
265 #define YY_BUFFER_EOF_PENDING 2
268 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
270 /* Stack of input buffers. */
271 static size_t yy_buffer_stack_top
= 0; /**< index of top of stack. */
272 static size_t yy_buffer_stack_max
= 0; /**< capacity of stack. */
273 static YY_BUFFER_STATE
* yy_buffer_stack
= 0; /**< Stack as an array. */
275 /* We provide macros for accessing buffer states in case in the
276 * future we want to put the buffer states in a more general
279 * Returns the top of the stack, or NULL.
281 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
282 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
285 /* Same as previous macro, but useful when we know that the buffer stack is not
286 * NULL or when we need an lvalue. For internal use only.
288 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
290 /* yy_hold_char holds the character lost when swf5text is formed. */
291 static char yy_hold_char
;
292 static int yy_n_chars
; /* number of characters read into yy_ch_buf */
295 /* Points to current character in buffer. */
296 static char *yy_c_buf_p
= (char *) 0;
297 static int yy_init
= 0; /* whether we need to initialize */
298 static int yy_start
= 0; /* start state number */
300 /* Flag which is used to allow swf5wrap()'s to do buffer switches
301 * instead of setting up a fresh swf5in. A bit of a hack ...
303 static int yy_did_buffer_switch_on_eof
;
305 void swf5restart (FILE *input_file
);
306 void swf5_switch_to_buffer (YY_BUFFER_STATE new_buffer
);
307 YY_BUFFER_STATE
swf5_create_buffer (FILE *file
,int size
);
308 void swf5_delete_buffer (YY_BUFFER_STATE b
);
309 void swf5_flush_buffer (YY_BUFFER_STATE b
);
310 void swf5push_buffer_state (YY_BUFFER_STATE new_buffer
);
311 void swf5pop_buffer_state (void );
313 static void swf5ensure_buffer_stack (void );
314 static void swf5_load_buffer_state (void );
315 static void swf5_init_buffer (YY_BUFFER_STATE b
,FILE *file
);
317 #define YY_FLUSH_BUFFER swf5_flush_buffer(YY_CURRENT_BUFFER )
319 YY_BUFFER_STATE
swf5_scan_buffer (char *base
,yy_size_t size
);
320 YY_BUFFER_STATE
swf5_scan_string (yyconst
char *yy_str
);
321 YY_BUFFER_STATE
swf5_scan_bytes (yyconst
char *bytes
,int len
);
323 void *swf5alloc (yy_size_t
);
324 void *swf5realloc (void *,yy_size_t
);
325 void swf5free (void * );
327 #define yy_new_buffer swf5_create_buffer
329 #define yy_set_interactive(is_interactive) \
331 if ( ! YY_CURRENT_BUFFER ){ \
332 swf5ensure_buffer_stack (); \
333 YY_CURRENT_BUFFER_LVALUE = \
334 swf5_create_buffer(swf5in,YY_BUF_SIZE ); \
336 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
339 #define yy_set_bol(at_bol) \
341 if ( ! YY_CURRENT_BUFFER ){\
342 swf5ensure_buffer_stack (); \
343 YY_CURRENT_BUFFER_LVALUE = \
344 swf5_create_buffer(swf5in,YY_BUF_SIZE ); \
346 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
349 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
351 /* Begin user sect3 */
353 typedef unsigned char YY_CHAR
;
355 FILE *swf5in
= (FILE *) 0, *swf5out
= (FILE *) 0;
357 typedef int yy_state_type
;
359 extern int swf5lineno
;
363 extern char *swf5text
;
364 #define yytext_ptr swf5text
366 static yy_state_type
yy_get_previous_state (void );
367 static yy_state_type
yy_try_NUL_trans (yy_state_type current_state
);
368 static int yy_get_next_buffer (void );
369 static void yy_fatal_error (yyconst
char msg
[] );
371 /* Done after the current pattern has been matched and before the
372 * corresponding action - sets up swf5text.
374 #define YY_DO_BEFORE_ACTION \
375 (yytext_ptr) = yy_bp; \
376 swf5leng = (size_t) (yy_cp - yy_bp); \
377 (yy_hold_char) = *yy_cp; \
379 (yy_c_buf_p) = yy_cp;
381 #define YY_NUM_RULES 166
382 #define YY_END_OF_BUFFER 167
383 /* This struct is not used in this scanner,
384 but its presence is necessary. */
387 flex_int32_t yy_verify
;
390 static yyconst flex_int16_t yy_accept
[650] =
392 0, 0, 0, 0, 167, 165, 119, 164, 165, 152,
393 165, 151, 146, 165, 153, 154, 149, 144, 159, 145,
394 160, 150, 3, 3, 162, 142, 140, 143, 141, 161,
395 112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
396 112, 112, 112, 112, 112, 112, 112, 112, 155, 156,
397 148, 157, 147, 158, 163, 112, 112, 112, 112, 112,
398 112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
399 164, 125, 0, 115, 113, 0, 126, 132, 0, 116,
400 114, 0, 128, 120, 130, 121, 131, 117, 118, 129,
401 4, 2, 3, 0, 134, 122, 124, 123, 135, 112,
403 112, 112, 112, 112, 112, 112, 19, 112, 112, 112,
404 112, 112, 112, 112, 112, 17, 16, 112, 112, 112,
405 112, 112, 112, 112, 0, 112, 112, 112, 112, 112,
406 112, 112, 112, 112, 112, 112, 112, 133, 127, 112,
407 112, 112, 112, 112, 112, 112, 112, 112, 112, 16,
408 112, 112, 112, 112, 112, 112, 112, 112, 63, 112,
409 112, 112, 112, 112, 112, 112, 112, 112, 4, 1,
410 137, 138, 136, 25, 112, 112, 112, 37, 112, 112,
411 112, 112, 112, 112, 112, 15, 112, 112, 112, 112,
412 35, 112, 112, 21, 112, 112, 36, 112, 112, 111,
414 112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
415 112, 20, 112, 112, 66, 62, 112, 112, 73, 112,
416 55, 110, 112, 112, 109, 72, 112, 112, 112, 112,
417 112, 112, 112, 112, 112, 21, 91, 112, 57, 112,
418 112, 112, 112, 112, 112, 112, 112, 112, 20, 64,
419 139, 112, 112, 13, 112, 112, 112, 112, 112, 11,
420 26, 112, 112, 112, 112, 112, 112, 112, 112, 112,
421 7, 42, 112, 112, 112, 112, 112, 43, 112, 112,
422 112, 112, 5, 112, 112, 24, 112, 112, 112, 112,
423 112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
425 112, 112, 112, 112, 112, 112, 112, 112, 108, 58,
426 112, 112, 112, 112, 112, 112, 43, 112, 112, 112,
427 56, 112, 8, 112, 112, 112, 112, 112, 112, 6,
428 112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
429 112, 112, 112, 112, 112, 112, 112, 112, 34, 112,
430 18, 112, 112, 112, 112, 112, 112, 112, 112, 112,
431 112, 112, 112, 104, 112, 103, 112, 112, 112, 112,
432 112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
433 112, 112, 112, 112, 112, 112, 112, 32, 112, 112,
434 22, 112, 112, 112, 38, 112, 112, 31, 112, 112,
436 112, 112, 29, 112, 23, 112, 112, 33, 12, 112,
437 27, 105, 112, 112, 86, 112, 70, 112, 112, 112,
438 112, 112, 112, 112, 112, 65, 112, 67, 112, 112,
439 83, 112, 112, 112, 112, 112, 112, 112, 112, 112,
440 112, 112, 33, 112, 112, 112, 112, 14, 112, 112,
441 112, 39, 112, 112, 112, 112, 112, 112, 112, 112,
442 112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
443 112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
444 112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
445 112, 112, 112, 112, 9, 112, 10, 30, 112, 112,
447 112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
448 112, 112, 112, 112, 112, 112, 112, 68, 112, 112,
449 101, 112, 85, 112, 112, 112, 112, 112, 112, 112,
450 112, 112, 112, 112, 99, 92, 112, 112, 84, 112,
451 46, 112, 47, 112, 50, 112, 40, 41, 112, 48,
452 112, 112, 112, 112, 112, 112, 74, 77, 112, 76,
453 112, 112, 90, 112, 71, 112, 87, 112, 78, 112,
454 48, 112, 79, 112, 98, 112, 112, 94, 82, 112,
455 28, 112, 112, 112, 45, 112, 112, 112, 112, 61,
456 112, 75, 89, 112, 112, 112, 112, 112, 112, 80,
458 112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
459 95, 102, 69, 88, 59, 112, 96, 81, 112, 112,
460 112, 52, 112, 112, 112, 106, 107, 60, 112, 93,
461 112, 112, 49, 112, 44, 97, 112, 112, 112, 112,
462 100, 112, 112, 54, 112, 51, 112, 53, 0
465 static yyconst flex_int32_t yy_ec
[256] =
467 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
468 2, 2, 4, 1, 1, 1, 1, 1, 1, 1,
469 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
470 1, 2, 5, 6, 1, 1, 7, 8, 9, 10,
471 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
472 21, 21, 21, 21, 21, 22, 22, 23, 24, 25,
473 26, 27, 28, 1, 29, 30, 31, 32, 33, 34,
474 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
475 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
476 55, 56, 57, 58, 54, 1, 59, 60, 61, 62,
478 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
479 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
480 83, 54, 84, 85, 86, 87, 1, 1, 1, 1,
481 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
482 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
483 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
484 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
485 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
486 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
487 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
489 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
490 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
491 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
492 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
493 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
497 static yyconst flex_int32_t yy_meta
[88] =
499 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
500 1, 1, 1, 1, 1, 1, 1, 2, 2, 2,
501 2, 2, 1, 1, 1, 1, 1, 1, 2, 2,
502 2, 2, 2, 2, 3, 3, 3, 3, 3, 3,
503 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
504 3, 3, 3, 3, 1, 1, 1, 1, 2, 2,
505 2, 2, 2, 2, 3, 3, 3, 3, 3, 3,
506 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
510 static yyconst flex_int16_t yy_base
[654] =
512 0, 0, 59, 0, 322, 1377, 1377, 1377, 317, 275,
513 92, 1377, 89, 101, 1377, 1377, 259, 99, 1377, 90,
514 1377, 111, 124, 131, 1377, 1377, 82, 212, 87, 1377,
515 87, 89, 125, 123, 119, 131, 130, 0, 128, 134,
516 122, 112, 135, 185, 176, 169, 154, 180, 1377, 1377,
517 1377, 1377, 152, 1377, 1377, 187, 174, 192, 223, 228,
518 190, 227, 234, 232, 246, 234, 272, 280, 212, 233,
519 1377, 1377, 176, 237, 1377, 228, 1377, 1377, 227, 279,
520 1377, 223, 1377, 1377, 1377, 1377, 1377, 1377, 1377, 1377,
521 318, 334, 344, 0, 161, 1377, 1377, 1377, 168, 0,
523 243, 254, 327, 248, 285, 307, 0, 305, 321, 340,
524 330, 326, 331, 327, 328, 0, 333, 336, 353, 332,
525 345, 354, 358, 355, 371, 352, 378, 347, 358, 377,
526 372, 385, 392, 378, 377, 390, 380, 1377, 1377, 397,
527 398, 403, 393, 404, 384, 398, 429, 394, 397, 445,
528 437, 448, 454, 437, 440, 435, 433, 456, 457, 451,
529 443, 448, 463, 492, 472, 500, 457, 458, 521, 0,
530 1377, 1377, 112, 0, 507, 504, 512, 0, 515, 518,
531 515, 509, 517, 512, 506, 0, 523, 507, 514, 510,
532 0, 525, 529, 0, 514, 524, 0, 516, 520, 583,
534 549, 546, 546, 548, 553, 551, 558, 572, 577, 576,
535 577, 0, 572, 577, 0, 0, 572, 575, 0, 579,
536 577, 0, 577, 591, 581, 0, 573, 576, 587, 596,
537 600, 588, 586, 592, 601, 637, 0, 640, 0, 607,
538 620, 626, 623, 612, 624, 638, 634, 634, 650, 0,
539 1377, 645, 655, 0, 661, 654, 643, 645, 657, 0,
540 0, 662, 653, 672, 669, 682, 688, 670, 685, 693,
541 0, 0, 694, 686, 680, 686, 704, 687, 688, 706,
542 698, 707, 0, 698, 709, 0, 712, 710, 717, 717,
543 712, 720, 725, 726, 713, 744, 730, 735, 746, 756,
545 747, 751, 757, 745, 759, 761, 749, 762, 0, 0,
546 763, 764, 769, 771, 753, 754, 782, 761, 756, 763,
547 0, 765, 0, 765, 764, 771, 775, 788, 804, 0,
548 799, 796, 798, 800, 805, 812, 806, 821, 806, 807,
549 813, 822, 814, 811, 815, 814, 825, 829, 0, 829,
550 0, 828, 823, 837, 838, 827, 827, 834, 835, 843,
551 865, 860, 868, 0, 863, 0, 859, 864, 864, 877,
552 861, 865, 881, 865, 868, 875, 882, 872, 874, 883,
553 889, 876, 889, 884, 902, 883, 904, 0, 885, 887,
554 0, 912, 906, 922, 108, 927, 926, 0, 908, 920,
556 938, 939, 0, 928, 0, 935, 923, 0, 0, 928,
557 0, 945, 933, 928, 0, 948, 0, 948, 943, 935,
558 945, 955, 949, 942, 943, 0, 952, 0, 964, 947,
559 0, 966, 954, 979, 978, 981, 980, 985, 989, 981,
560 999, 996, 993, 1001, 1004, 993, 1002, 0, 989, 996,
561 994, 0, 1000, 1009, 1006, 1007, 1008, 1009, 1008, 1019,
562 1011, 1005, 1015, 1027, 1038, 1039, 1028, 1044, 1049, 1057,
563 1054, 1046, 1060, 1054, 1046, 1040, 1054, 1047, 1056, 1049,
564 1065, 1053, 1068, 1073, 1070, 1074, 1081, 1076, 1067, 1080,
565 1072, 1067, 1081, 1096, 0, 1102, 0, 0, 1103, 1094,
567 1105, 1117, 1114, 1115, 1099, 1102, 1120, 1124, 1103, 1107,
568 1108, 1114, 1125, 1114, 1131, 1109, 1132, 0, 1122, 1123,
569 0, 1133, 0, 1124, 1136, 1126, 1138, 1129, 1133, 1141,
570 1165, 1148, 1161, 1163, 0, 0, 1165, 1171, 0, 1161,
571 0, 1168, 0, 1176, 1171, 1184, 0, 0, 1178, 0,
572 1169, 1177, 1189, 1174, 1184, 1190, 0, 0, 1183, 0,
573 1176, 1197, 0, 1188, 0, 1202, 0, 1203, 0, 1200,
574 1201, 1195, 0, 1193, 0, 1214, 1208, 0, 0, 1213,
575 0, 1208, 1218, 1233, 0, 1230, 1215, 1220, 1227, 0,
576 1239, 0, 0, 1238, 1232, 1233, 1230, 1225, 1245, 97,
578 1232, 1233, 1232, 1242, 1251, 1258, 1242, 1244, 1259, 1251,
579 0, 0, 0, 0, 0, 1250, 0, 0, 1259, 1265,
580 1272, 0, 1268, 1276, 1264, 0, 0, 0, 1272, 0,
581 1297, 1294, 1286, 1292, 0, 0, 1288, 1301, 1284, 1290,
582 0, 1295, 1295, 0, 1300, 0, 1294, 0, 1377, 1368,
586 static yyconst flex_int16_t yy_def
[654] =
588 649, 1, 1, 3, 649, 649, 649, 649, 649, 649,
589 650, 649, 649, 651, 649, 649, 649, 649, 649, 649,
590 649, 649, 649, 649, 649, 649, 649, 649, 649, 649,
591 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
592 652, 652, 652, 652, 652, 652, 652, 652, 649, 649,
593 649, 649, 649, 649, 649, 652, 652, 652, 652, 652,
594 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
595 649, 649, 650, 650, 649, 650, 649, 649, 651, 651,
596 649, 651, 649, 649, 649, 649, 649, 649, 649, 649,
597 649, 649, 649, 653, 649, 649, 649, 649, 649, 652,
599 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
600 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
601 652, 652, 652, 652, 649, 652, 652, 652, 652, 652,
602 652, 652, 652, 652, 652, 652, 652, 649, 649, 652,
603 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
604 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
605 652, 652, 652, 652, 652, 652, 652, 652, 649, 653,
606 649, 649, 649, 652, 652, 652, 652, 652, 652, 652,
607 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
608 652, 652, 652, 652, 652, 652, 652, 652, 652, 649,
610 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
611 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
612 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
613 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
614 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
615 649, 652, 652, 652, 652, 652, 652, 652, 652, 652,
616 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
617 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
618 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
619 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
621 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
622 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
623 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
624 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
625 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
626 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
627 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
628 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
629 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
630 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
632 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
633 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
634 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
635 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
636 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
637 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
638 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
639 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
640 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
641 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
643 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
644 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
645 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
646 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
647 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
648 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
649 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
650 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
651 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
652 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
654 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
655 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
656 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
657 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
658 652, 652, 652, 652, 652, 652, 652, 652, 0, 649,
662 static yyconst flex_int16_t yy_nxt
[1465] =
664 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
665 16, 17, 18, 19, 20, 21, 22, 23, 24, 24,
666 24, 24, 25, 26, 27, 28, 29, 30, 31, 32,
667 33, 34, 35, 36, 37, 38, 39, 38, 38, 40,
668 38, 41, 42, 43, 38, 44, 45, 46, 38, 47,
669 48, 38, 38, 38, 49, 6, 50, 51, 31, 32,
670 33, 34, 35, 36, 37, 38, 39, 38, 38, 40,
671 38, 41, 42, 43, 38, 44, 45, 46, 38, 47,
672 48, 38, 38, 52, 53, 54, 55, 56, 57, 58,
673 59, 60, 170, 61, 74, 62, 77, 75, 63, 64,
675 65, 66, 67, 80, 86, 68, 95, 96, 69, 81,
676 70, 84, 98, 99, 78, 87, 618, 56, 57, 58,
677 59, 60, 88, 61, 85, 62, 452, 89, 63, 64,
678 65, 66, 67, 101, 102, 68, 90, 251, 69, 91,
679 70, 92, 92, 92, 92, 93, 91, 76, 93, 93,
680 93, 93, 93, 103, 120, 106, 82, 122, 109, 111,
681 104, 116, 114, 101, 102, 107, 118, 105, 110, 117,
682 121, 108, 115, 112, 123, 94, 119, 138, 74, 113,
683 124, 75, 135, 103, 120, 106, 171, 122, 109, 111,
684 104, 116, 114, 172, 173, 107, 118, 105, 110, 117,
686 121, 108, 115, 112, 123, 94, 119, 125, 128, 113,
687 124, 132, 135, 126, 133, 136, 137, 127, 140, 142,
688 143, 134, 149, 129, 130, 649, 131, 104, 141, 80,
689 649, 76, 115, 101, 105, 81, 139, 97, 128, 74,
690 167, 132, 75, 126, 133, 136, 137, 127, 140, 142,
691 143, 134, 149, 129, 130, 144, 131, 104, 141, 145,
692 116, 153, 115, 101, 105, 107, 151, 109, 150, 147,
693 167, 146, 148, 158, 154, 168, 152, 110, 156, 159,
694 155, 80, 82, 174, 83, 144, 175, 81, 157, 145,
695 116, 153, 76, 178, 121, 107, 151, 109, 150, 147,
697 72, 146, 148, 158, 154, 168, 152, 110, 156, 159,
698 155, 123, 162, 174, 160, 163, 175, 124, 157, 71,
699 161, 649, 649, 178, 121, 649, 179, 164, 165, 649,
700 166, 649, 649, 649, 82, 169, 169, 169, 169, 169,
701 180, 123, 162, 649, 160, 163, 181, 124, 182, 91,
702 161, 92, 92, 92, 92, 93, 179, 164, 165, 91,
703 166, 93, 93, 93, 93, 93, 176, 183, 184, 185,
704 180, 186, 187, 177, 188, 189, 181, 192, 182, 190,
705 191, 193, 194, 195, 196, 197, 198, 199, 200, 200,
706 200, 200, 200, 201, 204, 649, 176, 183, 184, 185,
708 205, 186, 187, 177, 188, 189, 206, 192, 207, 190,
709 191, 193, 194, 195, 196, 197, 198, 199, 202, 208,
710 209, 211, 212, 201, 204, 203, 213, 214, 215, 216,
711 205, 217, 218, 220, 219, 175, 206, 180, 207, 177,
712 210, 221, 224, 181, 225, 649, 649, 649, 202, 208,
713 209, 211, 212, 649, 649, 203, 213, 214, 215, 216,
714 222, 217, 218, 220, 219, 175, 649, 180, 234, 177,
715 210, 221, 224, 181, 225, 226, 193, 223, 192, 235,
716 237, 227, 229, 228, 230, 236, 195, 238, 197, 241,
717 222, 190, 191, 231, 239, 242, 232, 240, 234, 243,
719 233, 247, 249, 250, 649, 226, 193, 223, 192, 235,
720 237, 227, 229, 228, 230, 236, 195, 238, 197, 241,
721 244, 190, 191, 231, 239, 242, 232, 240, 248, 243,
722 233, 247, 249, 250, 245, 252, 207, 246, 169, 169,
723 169, 169, 169, 253, 254, 255, 257, 258, 259, 260,
724 244, 261, 262, 263, 264, 265, 266, 267, 248, 268,
725 269, 270, 256, 271, 245, 252, 207, 246, 272, 273,
726 649, 649, 649, 253, 254, 255, 257, 258, 259, 260,
727 274, 261, 262, 263, 264, 265, 266, 267, 275, 268,
728 269, 270, 256, 271, 276, 277, 278, 279, 272, 273,
730 200, 200, 200, 200, 200, 280, 281, 282, 283, 284,
731 274, 285, 286, 287, 288, 289, 259, 290, 275, 291,
732 294, 292, 295, 296, 276, 277, 278, 279, 264, 265,
733 293, 297, 298, 299, 300, 280, 281, 282, 283, 284,
734 301, 285, 286, 287, 288, 289, 259, 290, 302, 291,
735 294, 292, 295, 296, 309, 310, 315, 316, 264, 265,
736 293, 297, 298, 299, 300, 303, 311, 317, 306, 304,
737 301, 312, 307, 313, 318, 314, 305, 321, 302, 308,
738 319, 320, 322, 323, 309, 310, 315, 316, 324, 325,
739 326, 327, 328, 329, 330, 303, 311, 317, 306, 304,
741 331, 312, 307, 313, 318, 314, 305, 321, 332, 308,
742 319, 320, 322, 323, 333, 334, 335, 336, 324, 325,
743 326, 327, 328, 329, 330, 337, 339, 340, 341, 342,
744 331, 343, 344, 345, 338, 346, 347, 348, 332, 349,
745 350, 351, 352, 353, 333, 334, 335, 336, 355, 356,
746 354, 357, 358, 359, 360, 337, 339, 340, 341, 342,
747 362, 343, 344, 345, 338, 346, 347, 348, 361, 349,
748 350, 351, 352, 353, 363, 364, 365, 366, 355, 356,
749 354, 357, 358, 359, 360, 367, 368, 369, 370, 371,
750 362, 372, 373, 374, 375, 376, 377, 378, 361, 379,
752 380, 381, 383, 384, 363, 364, 365, 366, 385, 386,
753 387, 388, 389, 382, 390, 367, 368, 369, 370, 371,
754 391, 372, 373, 374, 375, 376, 377, 378, 345, 379,
755 380, 381, 383, 384, 392, 393, 394, 395, 385, 386,
756 387, 388, 389, 382, 390, 396, 397, 398, 399, 400,
757 391, 401, 402, 403, 404, 405, 406, 407, 345, 408,
758 409, 410, 411, 412, 392, 393, 394, 395, 387, 414,
759 415, 413, 416, 417, 418, 396, 397, 398, 399, 400,
760 419, 401, 402, 403, 404, 405, 406, 407, 420, 408,
761 409, 410, 411, 412, 421, 422, 423, 424, 387, 414,
763 415, 413, 416, 417, 418, 425, 426, 427, 428, 429,
764 419, 430, 431, 432, 433, 434, 435, 436, 420, 437,
765 440, 441, 438, 442, 421, 422, 423, 424, 439, 443,
766 444, 445, 446, 447, 448, 425, 426, 427, 428, 429,
767 449, 430, 431, 432, 433, 434, 435, 436, 450, 437,
768 440, 441, 438, 442, 451, 453, 454, 455, 439, 443,
769 444, 445, 446, 447, 448, 456, 457, 458, 459, 460,
770 449, 461, 462, 463, 465, 466, 467, 468, 450, 469,
771 470, 464, 471, 472, 451, 453, 454, 455, 473, 474,
772 475, 476, 477, 478, 479, 456, 457, 458, 459, 460,
774 480, 461, 462, 463, 465, 466, 467, 468, 481, 469,
775 470, 464, 471, 472, 482, 483, 484, 485, 473, 474,
776 475, 476, 477, 478, 479, 486, 487, 488, 489, 491,
777 480, 492, 493, 494, 495, 490, 496, 497, 481, 498,
778 499, 500, 501, 502, 482, 483, 484, 485, 503, 504,
779 505, 506, 507, 508, 509, 486, 487, 488, 489, 491,
780 510, 492, 493, 494, 495, 490, 496, 497, 511, 498,
781 499, 500, 501, 502, 512, 513, 514, 515, 503, 504,
782 505, 506, 507, 508, 509, 516, 517, 518, 519, 521,
783 510, 522, 523, 524, 525, 526, 527, 528, 511, 529,
785 530, 531, 520, 532, 512, 513, 514, 515, 533, 534,
786 535, 536, 537, 538, 539, 516, 517, 518, 519, 521,
787 540, 522, 523, 524, 525, 526, 527, 528, 541, 529,
788 530, 531, 520, 532, 542, 543, 544, 545, 533, 534,
789 535, 536, 537, 538, 539, 546, 547, 548, 549, 550,
790 540, 551, 552, 553, 554, 555, 556, 557, 541, 558,
791 559, 560, 561, 562, 542, 543, 544, 545, 563, 564,
792 565, 566, 567, 568, 569, 546, 547, 548, 549, 550,
793 570, 551, 552, 553, 554, 555, 556, 557, 571, 558,
794 559, 560, 561, 562, 572, 573, 574, 575, 563, 564,
796 565, 566, 567, 568, 569, 578, 576, 579, 580, 581,
797 570, 577, 582, 583, 584, 585, 586, 587, 571, 588,
798 589, 590, 591, 592, 572, 573, 574, 575, 593, 594,
799 595, 596, 597, 598, 599, 578, 576, 579, 580, 581,
800 600, 577, 582, 583, 584, 585, 586, 587, 601, 588,
801 589, 590, 591, 592, 602, 603, 604, 605, 593, 594,
802 595, 596, 597, 598, 599, 606, 607, 608, 609, 610,
803 600, 611, 612, 613, 614, 615, 616, 617, 601, 619,
804 620, 621, 622, 623, 602, 603, 604, 605, 624, 625,
805 626, 627, 628, 629, 630, 606, 607, 608, 609, 610,
807 631, 611, 612, 613, 614, 615, 616, 617, 632, 619,
808 620, 621, 622, 623, 633, 634, 635, 636, 624, 625,
809 626, 627, 628, 629, 630, 637, 638, 639, 640, 641,
810 631, 642, 643, 644, 645, 646, 647, 648, 632, 649,
811 649, 649, 649, 649, 633, 634, 635, 636, 649, 649,
812 649, 649, 649, 649, 649, 637, 638, 639, 640, 641,
813 649, 642, 643, 644, 645, 646, 647, 648, 73, 73,
814 73, 79, 79, 79, 100, 100, 5, 649, 649, 649,
815 649, 649, 649, 649, 649, 649, 649, 649, 649, 649,
816 649, 649, 649, 649, 649, 649, 649, 649, 649, 649,
818 649, 649, 649, 649, 649, 649, 649, 649, 649, 649,
819 649, 649, 649, 649, 649, 649, 649, 649, 649, 649,
820 649, 649, 649, 649, 649, 649, 649, 649, 649, 649,
821 649, 649, 649, 649, 649, 649, 649, 649, 649, 649,
822 649, 649, 649, 649, 649, 649, 649, 649, 649, 649,
823 649, 649, 649, 649, 649, 649, 649, 649, 649, 649,
827 static yyconst flex_int16_t yy_chk
[1465] =
829 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
830 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
831 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
832 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
833 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
834 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
835 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
836 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
837 1, 1, 1, 1, 1, 1, 1, 3, 3, 3,
838 3, 3, 653, 3, 11, 3, 13, 11, 3, 3,
840 3, 3, 3, 14, 20, 3, 27, 27, 3, 14,
841 3, 18, 29, 29, 13, 20, 600, 3, 3, 3,
842 3, 3, 22, 3, 18, 3, 395, 22, 3, 3,
843 3, 3, 3, 31, 32, 3, 22, 173, 3, 23,
844 3, 23, 23, 23, 23, 23, 24, 11, 24, 24,
845 24, 24, 24, 33, 41, 34, 14, 42, 35, 36,
846 33, 39, 37, 31, 32, 34, 40, 33, 35, 39,
847 41, 34, 37, 36, 43, 23, 40, 53, 73, 36,
848 43, 73, 47, 33, 41, 34, 95, 42, 35, 36,
849 33, 39, 37, 99, 99, 34, 40, 33, 35, 39,
851 41, 34, 37, 36, 43, 23, 40, 44, 45, 36,
852 43, 46, 47, 44, 46, 48, 48, 44, 56, 57,
853 58, 46, 61, 45, 45, 82, 45, 58, 56, 79,
854 76, 73, 61, 56, 58, 79, 53, 28, 45, 74,
855 69, 46, 74, 44, 46, 48, 48, 44, 56, 57,
856 58, 46, 61, 45, 45, 59, 45, 58, 56, 59,
857 62, 64, 61, 56, 58, 59, 63, 60, 62, 60,
858 69, 59, 60, 66, 64, 70, 63, 60, 65, 66,
859 64, 80, 79, 101, 17, 59, 102, 80, 65, 59,
860 62, 64, 74, 104, 65, 59, 63, 60, 62, 60,
862 10, 59, 60, 66, 64, 70, 63, 60, 65, 66,
863 64, 67, 68, 101, 67, 68, 102, 67, 65, 9,
864 67, 5, 0, 104, 65, 0, 105, 68, 68, 0,
865 68, 0, 0, 0, 80, 91, 91, 91, 91, 91,
866 106, 67, 68, 0, 67, 68, 106, 67, 108, 92,
867 67, 92, 92, 92, 92, 92, 105, 68, 68, 93,
868 68, 93, 93, 93, 93, 93, 103, 109, 110, 111,
869 106, 112, 113, 103, 114, 115, 106, 118, 108, 117,
870 117, 119, 120, 120, 121, 122, 123, 124, 125, 125,
871 125, 125, 125, 126, 128, 0, 103, 109, 110, 111,
873 129, 112, 113, 103, 114, 115, 130, 118, 131, 117,
874 117, 119, 120, 120, 121, 122, 123, 124, 127, 132,
875 133, 134, 135, 126, 128, 127, 136, 137, 140, 141,
876 129, 142, 143, 145, 144, 142, 130, 144, 131, 143,
877 133, 146, 148, 144, 149, 0, 0, 0, 127, 132,
878 133, 134, 135, 0, 0, 127, 136, 137, 140, 141,
879 147, 142, 143, 145, 144, 142, 0, 144, 154, 143,
880 133, 146, 148, 144, 149, 150, 152, 147, 151, 155,
881 157, 150, 152, 151, 153, 156, 156, 158, 159, 161,
882 147, 150, 150, 153, 160, 162, 153, 160, 154, 163,
884 153, 165, 167, 168, 0, 150, 152, 147, 151, 155,
885 157, 150, 152, 151, 153, 156, 156, 158, 159, 161,
886 164, 150, 150, 153, 160, 162, 153, 160, 166, 163,
887 153, 165, 167, 168, 164, 175, 166, 164, 169, 169,
888 169, 169, 169, 176, 177, 179, 180, 181, 182, 183,
889 164, 184, 185, 187, 188, 188, 189, 190, 166, 192,
890 193, 195, 179, 196, 164, 175, 166, 164, 198, 199,
891 0, 0, 0, 176, 177, 179, 180, 181, 182, 183,
892 201, 184, 185, 187, 188, 188, 189, 190, 202, 192,
893 193, 195, 179, 196, 203, 204, 205, 206, 198, 199,
895 200, 200, 200, 200, 200, 207, 208, 209, 210, 211,
896 201, 213, 214, 217, 218, 220, 221, 223, 202, 224,
897 227, 225, 228, 229, 203, 204, 205, 206, 225, 225,
898 225, 230, 231, 232, 233, 207, 208, 209, 210, 211,
899 234, 213, 214, 217, 218, 220, 221, 223, 235, 224,
900 227, 225, 228, 229, 240, 241, 243, 244, 225, 225,
901 225, 230, 231, 232, 233, 236, 242, 245, 238, 236,
902 234, 242, 238, 242, 246, 242, 236, 248, 235, 238,
903 247, 247, 249, 252, 240, 241, 243, 244, 253, 255,
904 256, 257, 258, 259, 262, 236, 242, 245, 238, 236,
906 263, 242, 238, 242, 246, 242, 236, 248, 264, 238,
907 247, 247, 249, 252, 265, 266, 267, 268, 253, 255,
908 256, 257, 258, 259, 262, 269, 270, 273, 274, 275,
909 263, 276, 277, 278, 269, 279, 280, 281, 264, 282,
910 284, 285, 287, 288, 265, 266, 267, 268, 289, 290,
911 288, 291, 292, 293, 294, 269, 270, 273, 274, 275,
912 295, 276, 277, 278, 269, 279, 280, 281, 294, 282,
913 284, 285, 287, 288, 296, 297, 298, 299, 289, 290,
914 288, 291, 292, 293, 294, 300, 301, 302, 303, 304,
915 295, 305, 306, 307, 308, 311, 312, 313, 294, 314,
917 315, 316, 318, 319, 296, 297, 298, 299, 320, 322,
918 324, 325, 326, 317, 327, 300, 301, 302, 303, 304,
919 328, 305, 306, 307, 308, 311, 312, 313, 317, 314,
920 315, 316, 318, 319, 329, 331, 332, 333, 320, 322,
921 324, 325, 326, 317, 327, 334, 335, 336, 337, 338,
922 328, 339, 340, 341, 342, 343, 344, 345, 317, 346,
923 347, 348, 350, 352, 329, 331, 332, 333, 353, 354,
924 355, 353, 356, 357, 358, 334, 335, 336, 337, 338,
925 359, 339, 340, 341, 342, 343, 344, 345, 360, 346,
926 347, 348, 350, 352, 361, 362, 363, 365, 353, 354,
928 355, 353, 356, 357, 358, 367, 368, 369, 370, 371,
929 359, 372, 373, 374, 375, 376, 377, 378, 360, 379,
930 381, 382, 380, 383, 361, 362, 363, 365, 380, 384,
931 385, 386, 387, 389, 390, 367, 368, 369, 370, 371,
932 392, 372, 373, 374, 375, 376, 377, 378, 393, 379,
933 381, 382, 380, 383, 394, 396, 397, 399, 380, 384,
934 385, 386, 387, 389, 390, 400, 401, 402, 404, 406,
935 392, 407, 410, 412, 413, 414, 416, 418, 393, 419,
936 420, 412, 421, 422, 394, 396, 397, 399, 423, 424,
937 425, 427, 429, 430, 432, 400, 401, 402, 404, 406,
939 433, 407, 410, 412, 413, 414, 416, 418, 434, 419,
940 420, 412, 421, 422, 435, 436, 437, 438, 423, 424,
941 425, 427, 429, 430, 432, 439, 440, 441, 442, 443,
942 433, 444, 445, 446, 447, 442, 449, 450, 434, 451,
943 453, 454, 455, 456, 435, 436, 437, 438, 457, 458,
944 459, 460, 461, 462, 463, 439, 440, 441, 442, 443,
945 464, 444, 445, 446, 447, 442, 449, 450, 465, 451,
946 453, 454, 455, 456, 466, 467, 468, 469, 457, 458,
947 459, 460, 461, 462, 463, 470, 471, 472, 473, 474,
948 464, 475, 476, 477, 478, 479, 480, 481, 465, 482,
950 483, 484, 473, 485, 466, 467, 468, 469, 486, 487,
951 488, 489, 490, 491, 492, 470, 471, 472, 473, 474,
952 493, 475, 476, 477, 478, 479, 480, 481, 494, 482,
953 483, 484, 473, 485, 496, 499, 500, 501, 486, 487,
954 488, 489, 490, 491, 492, 502, 503, 504, 505, 506,
955 493, 507, 508, 509, 510, 511, 512, 513, 494, 514,
956 515, 516, 517, 519, 496, 499, 500, 501, 520, 522,
957 524, 525, 526, 527, 528, 502, 503, 504, 505, 506,
958 529, 507, 508, 509, 510, 511, 512, 513, 530, 514,
959 515, 516, 517, 519, 531, 532, 533, 534, 520, 522,
961 524, 525, 526, 527, 528, 538, 537, 540, 542, 544,
962 529, 537, 545, 546, 549, 551, 552, 553, 530, 554,
963 555, 556, 559, 561, 531, 532, 533, 534, 562, 564,
964 566, 568, 570, 571, 572, 538, 537, 540, 542, 544,
965 574, 537, 545, 546, 549, 551, 552, 553, 576, 554,
966 555, 556, 559, 561, 577, 580, 582, 583, 562, 564,
967 566, 568, 570, 571, 572, 584, 586, 587, 588, 589,
968 574, 591, 594, 595, 596, 597, 598, 599, 576, 601,
969 602, 603, 604, 605, 577, 580, 582, 583, 606, 607,
970 608, 609, 610, 616, 619, 584, 586, 587, 588, 589,
972 620, 591, 594, 595, 596, 597, 598, 599, 621, 601,
973 602, 603, 604, 605, 623, 624, 625, 629, 606, 607,
974 608, 609, 610, 616, 619, 631, 632, 633, 634, 637,
975 620, 638, 639, 640, 642, 643, 645, 647, 621, 0,
976 0, 0, 0, 0, 623, 624, 625, 629, 0, 0,
977 0, 0, 0, 0, 0, 631, 632, 633, 634, 637,
978 0, 638, 639, 640, 642, 643, 645, 647, 650, 650,
979 650, 651, 651, 651, 652, 652, 649, 649, 649, 649,
980 649, 649, 649, 649, 649, 649, 649, 649, 649, 649,
981 649, 649, 649, 649, 649, 649, 649, 649, 649, 649,
983 649, 649, 649, 649, 649, 649, 649, 649, 649, 649,
984 649, 649, 649, 649, 649, 649, 649, 649, 649, 649,
985 649, 649, 649, 649, 649, 649, 649, 649, 649, 649,
986 649, 649, 649, 649, 649, 649, 649, 649, 649, 649,
987 649, 649, 649, 649, 649, 649, 649, 649, 649, 649,
988 649, 649, 649, 649, 649, 649, 649, 649, 649, 649,
992 static yy_state_type yy_last_accepting_state
;
993 static char *yy_last_accepting_cpos
;
995 extern int swf5_flex_debug
;
996 int swf5_flex_debug
= 0;
998 /* The intent behind this definition is that it'll catch
999 * any uses of REJECT which flex missed.
1001 #define REJECT reject_used_but_not_detected
1002 #define yymore() yymore_used_but_not_detected
1003 #define YY_MORE_ADJ 0
1004 #define YY_RESTORE_YY_MORE_OFFSET
1006 #line 1 "swf5compiler.flex"
1007 #line 2 "swf5compiler.flex"
1012 #include "compile.h"
1014 #include "blocks/error.h"
1015 #include "swf5compiler.tab.h" /* defines token types */
1017 static int swf5debug
;
1019 static const char *lexBuffer
= NULL
;
1020 static int lexBufferLen
= 0;
1022 static int sLineNumber
= 0;
1023 static char szLine
[1024];
1024 static char msgbufs
[2][1024] = { {0}, {0} }, *msgline
= {0};
1025 static int column
= 0;
1027 static void comment();
1028 static void comment1();
1029 static void count();
1030 static void countline();
1031 static void warning(char *msg
);
1033 #define YY_INPUT(buf,result,max_size) result=lexBufferInput(buf, max_size)
1035 /* thanks to the prolific and brilliant Raff: */
1036 static int lexBufferInput(char *buf
, int max_size
)
1038 int l
= lexBufferLen
> max_size
? max_size
: lexBufferLen
;
1040 if (lexBufferLen
<= 0)
1043 memcpy(buf
, lexBuffer
, l
);
1049 /* very inefficient method of unescaping strings */
1050 static void unescape(char *buf
)
1059 case 'b' : *n
++ = '\b'; break;
1060 case 'f' : *n
++ = '\f'; break;
1061 case 'n' : *n
++ = '\n'; break;
1062 case 'r' : *n
++ = '\r'; break;
1063 case 't' : *n
++ = '\t'; break;
1065 case 'u' : warning("unsupported escape sequence");
1075 void swf5ParseInit(const char *script
, int debug
)
1083 lexBufferLen
= strlen(script
);
1086 msgline
= msgbufs
[0];
1090 #line 88 "swf5compiler.flex"
1091 // forward declaration needed by the following function
1093 #ifdef YY_USE_PROTOS
1094 #define YY_PROTO(proto) proto
1096 #define YY_PROTO(proto) ()
1099 static void yyunput
YY_PROTO(( int c
, char *buf_ptr
));
1101 void do_unput5(const char c
) { unput(c
); }
1102 #line 1103 "lex.swf5.c"
1107 #ifndef YY_NO_UNISTD_H
1108 /* Special case for "unistd.h", since it is non-ANSI. We include it way
1109 * down here because we want the user's section 1 to have been scanned first.
1110 * The user has a chance to override it with an option.
1115 #ifndef YY_EXTRA_TYPE
1116 #define YY_EXTRA_TYPE void *
1119 static int yy_init_globals (void );
1121 /* Accessor methods to globals.
1122 These are made visible to non-reentrant scanners for convenience. */
1124 int swf5lex_destroy (void );
1126 int swf5get_debug (void );
1128 void swf5set_debug (int debug_flag
);
1130 YY_EXTRA_TYPE
swf5get_extra (void );
1132 void swf5set_extra (YY_EXTRA_TYPE user_defined
);
1134 FILE *swf5get_in (void );
1136 void swf5set_in (FILE * in_str
);
1138 FILE *swf5get_out (void );
1140 void swf5set_out (FILE * out_str
);
1142 int swf5get_leng (void );
1144 char *swf5get_text (void );
1146 int swf5get_lineno (void );
1148 void swf5set_lineno (int line_number
);
1150 /* Macros after this point can all be overridden by user definitions in
1154 #ifndef YY_SKIP_YYWRAP
1156 extern "C" int swf5wrap (void );
1158 extern int swf5wrap (void );
1162 static void yyunput (int c
,char *buf_ptr
);
1165 static void yy_flex_strncpy (char *,yyconst
char *,int );
1168 #ifdef YY_NEED_STRLEN
1169 static int yy_flex_strlen (yyconst
char * );
1175 static int yyinput (void );
1177 static int input (void );
1182 /* Amount of stuff to slurp up with each read. */
1183 #ifndef YY_READ_BUF_SIZE
1184 #define YY_READ_BUF_SIZE 8192
1187 /* Copy whatever the last rule matched to the standard output. */
1189 /* This used to be an fputs(), but since the string might contain NUL's,
1190 * we now use fwrite().
1192 #define ECHO fwrite( swf5text, swf5leng, 1, swf5out )
1195 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1196 * is returned in "result".
1199 #define YY_INPUT(buf,result,max_size) \
1200 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1204 for ( n = 0; n < max_size && \
1205 (c = getc( swf5in )) != EOF && c != '\n'; ++n ) \
1206 buf[n] = (char) c; \
1208 buf[n++] = (char) c; \
1209 if ( c == EOF && ferror( swf5in ) ) \
1210 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1216 while ( (result = fread(buf, 1, max_size, swf5in))==0 && ferror(swf5in)) \
1218 if( errno != EINTR) \
1220 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1231 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1232 * we don't want an extra ';' after the "return" because that will cause
1233 * some compilers to complain about unreachable statements.
1236 #define yyterminate() return YY_NULL
1239 /* Number of entries by which start-condition stack grows. */
1240 #ifndef YY_START_STACK_INCR
1241 #define YY_START_STACK_INCR 25
1244 /* Report a fatal error. */
1245 #ifndef YY_FATAL_ERROR
1246 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1249 /* end tables serialization structures and prototypes */
1251 /* Default declaration of generated scanner - a define so the user can
1252 * easily add parameters.
1255 #define YY_DECL_IS_OURS 1
1257 extern int swf5lex (void);
1259 #define YY_DECL int swf5lex (void)
1260 #endif /* !YY_DECL */
1262 /* Code executed at the beginning of each rule, after swf5text and swf5leng
1265 #ifndef YY_USER_ACTION
1266 #define YY_USER_ACTION
1269 /* Code executed at the end of each rule. */
1271 #define YY_BREAK break;
1274 #define YY_RULE_SETUP \
1277 /** The main scanner function which does all the work.
1281 register yy_state_type yy_current_state
;
1282 register char *yy_cp
, *yy_bp
;
1283 register int yy_act
;
1285 #line 104 "swf5compiler.flex"
1288 #line 1289 "lex.swf5.c"
1299 (yy_start
) = 1; /* first start state */
1307 if ( ! YY_CURRENT_BUFFER
) {
1308 swf5ensure_buffer_stack ();
1309 YY_CURRENT_BUFFER_LVALUE
=
1310 swf5_create_buffer(swf5in
,YY_BUF_SIZE
);
1313 swf5_load_buffer_state( );
1316 while ( 1 ) /* loops until end-of-file is reached */
1318 yy_cp
= (yy_c_buf_p
);
1320 /* Support of swf5text. */
1321 *yy_cp
= (yy_hold_char
);
1323 /* yy_bp points to the position in yy_ch_buf of the start of
1328 yy_current_state
= (yy_start
);
1332 register YY_CHAR yy_c
= yy_ec
[YY_SC_TO_UI(*yy_cp
)];
1333 if ( yy_accept
[yy_current_state
] )
1335 (yy_last_accepting_state
) = yy_current_state
;
1336 (yy_last_accepting_cpos
) = yy_cp
;
1338 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
1340 yy_current_state
= (int) yy_def
[yy_current_state
];
1341 if ( yy_current_state
>= 650 )
1342 yy_c
= yy_meta
[(unsigned int) yy_c
];
1344 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
1347 while ( yy_base
[yy_current_state
] != 1377 );
1350 yy_act
= yy_accept
[yy_current_state
];
1352 { /* have to back up */
1353 yy_cp
= (yy_last_accepting_cpos
);
1354 yy_current_state
= (yy_last_accepting_state
);
1355 yy_act
= yy_accept
[yy_current_state
];
1358 YY_DO_BEFORE_ACTION
;
1360 do_action
: /* This label is used only to access EOF actions. */
1363 { /* beginning of action switch */
1364 case 0: /* must back up */
1365 /* undo the effects of YY_DO_BEFORE_ACTION */
1366 *yy_cp
= (yy_hold_char
);
1367 yy_cp
= (yy_last_accepting_cpos
);
1368 yy_current_state
= (yy_last_accepting_state
);
1369 goto yy_find_action
;
1373 #line 106 "swf5compiler.flex"
1374 { count(); swf5lval
.intVal
= strtoul(swf5text
, NULL
, 0);
1379 #line 108 "swf5compiler.flex"
1380 { count(); swf5lval
.intVal
= strtoul(swf5text
, NULL
, 0);
1385 #line 110 "swf5compiler.flex"
1386 { count(); swf5lval
.intVal
= atoi(swf5text
);
1391 #line 112 "swf5compiler.flex"
1392 { count(); swf5lval
.doubleVal
= atof(swf5text
);
1397 #line 114 "swf5compiler.flex"
1398 { count(); swf5lval
.intVal
= 1;
1403 #line 116 "swf5compiler.flex"
1404 { count(); swf5lval
.intVal
= 0;
1409 #line 118 "swf5compiler.flex"
1410 { count(); return NULLVAL
; }
1414 #line 119 "swf5compiler.flex"
1415 { count(); return BREAK
; }
1419 #line 120 "swf5compiler.flex"
1420 { count(); return CONTINUE
; }
1424 #line 121 "swf5compiler.flex"
1425 { count(); return FUNCTION
; }
1429 #line 122 "swf5compiler.flex"
1430 { count(); return ELSE
; }
1434 #line 123 "swf5compiler.flex"
1435 { count(); return SWITCH
; }
1439 #line 124 "swf5compiler.flex"
1440 { count(); return CASE
; }
1444 #line 125 "swf5compiler.flex"
1445 { count(); return DEFAULT
; }
1449 #line 126 "swf5compiler.flex"
1450 { count(); return FOR
; }
1454 #line 127 "swf5compiler.flex"
1455 { count(); return IN
; }
1459 #line 128 "swf5compiler.flex"
1460 { count(); return IF
; }
1464 #line 129 "swf5compiler.flex"
1465 { count(); return WHILE
; }
1469 #line 130 "swf5compiler.flex"
1470 { count(); return DO
; }
1474 #line 131 "swf5compiler.flex"
1475 { count(); return VAR
; }
1479 #line 132 "swf5compiler.flex"
1480 { count(); return NEW
; }
1484 #line 133 "swf5compiler.flex"
1485 { count(); return DELETE
; }
1489 #line 134 "swf5compiler.flex"
1490 { count(); return RETURN
; }
1494 #line 135 "swf5compiler.flex"
1495 { count(); return WITH
; }
1499 #line 136 "swf5compiler.flex"
1500 { count(); BEGIN(asm); return ASM
; }
1504 #line 137 "swf5compiler.flex"
1505 { count(); return EVAL
; }
1509 #line 138 "swf5compiler.flex"
1510 { count(); return TYPEOF
; }
1514 #line 139 "swf5compiler.flex"
1515 { count(); return INSTANCEOF
; }
1517 /* legacy functions */
1520 #line 142 "swf5compiler.flex"
1521 { count(); return RANDOM
; }
1525 #line 143 "swf5compiler.flex"
1526 { count(); return GETTIMER
; }
1530 #line 144 "swf5compiler.flex"
1531 { count(); return LENGTH
; }
1535 #line 145 "swf5compiler.flex"
1536 { count(); return CONCAT
; }
1540 #line 146 "swf5compiler.flex"
1541 { count(); return SUBSTR
; }
1545 #line 147 "swf5compiler.flex"
1546 { count(); return TRACE
; }
1550 #line 148 "swf5compiler.flex"
1551 { count(); return INT
; }
1555 #line 149 "swf5compiler.flex"
1556 { count(); return ORD
; }
1560 #line 150 "swf5compiler.flex"
1561 { count(); return CHR
; }
1565 #line 151 "swf5compiler.flex"
1566 { count(); return GETURL
; }
1570 #line 152 "swf5compiler.flex"
1571 { count(); return GETURL1
; }
1575 #line 153 "swf5compiler.flex"
1576 { count(); return NEXTFRAME
; }
1580 #line 154 "swf5compiler.flex"
1581 { count(); return PREVFRAME
; }
1585 #line 155 "swf5compiler.flex"
1586 { count(); return PLAY
; }
1590 #line 156 "swf5compiler.flex"
1591 { count(); return STOP
; }
1595 #line 157 "swf5compiler.flex"
1596 { count(); return TOGGLEQUALITY
; }
1600 #line 158 "swf5compiler.flex"
1601 { count(); return STOPSOUNDS
; }
1605 #line 159 "swf5compiler.flex"
1606 { count(); return CALLFRAME
; }
1610 #line 160 "swf5compiler.flex"
1611 { count(); return GOTOFRAME
; }
1615 #line 161 "swf5compiler.flex"
1616 { count(); return SETTARGET
; }
1620 #line 162 "swf5compiler.flex"
1621 { count(); return LOADVARIABLES
; }
1625 #line 163 "swf5compiler.flex"
1626 { count(); return LOADMOVIE
; }
1630 #line 164 "swf5compiler.flex"
1631 { count(); return LOADVARIABLESNUM
; }
1635 #line 165 "swf5compiler.flex"
1636 { count(); return LOADMOVIENUM
; }
1640 #line 166 "swf5compiler.flex"
1641 { count(); return DUPLICATEMOVIECLIP
; }
1645 #line 167 "swf5compiler.flex"
1646 { count(); return REMOVEMOVIECLIP
; }
1652 #line 171 "swf5compiler.flex"
1653 { count(); return DUP
; }
1657 #line 172 "swf5compiler.flex"
1658 { count(); return SWAP
; }
1662 #line 173 "swf5compiler.flex"
1663 { count(); return POP
; }
1667 #line 174 "swf5compiler.flex"
1668 { count(); return PUSH
; }
1672 #line 175 "swf5compiler.flex"
1673 { count(); return SETREGISTER
; }
1677 #line 176 "swf5compiler.flex"
1678 { count(); return CALLFUNCTION
; }
1682 #line 177 "swf5compiler.flex"
1683 { count(); return CALLMETHOD
; }
1687 #line 178 "swf5compiler.flex"
1688 { count(); return AND
; }
1692 #line 179 "swf5compiler.flex"
1693 { count(); return OR
; }
1697 #line 180 "swf5compiler.flex"
1698 { count(); return XOR
; }
1702 #line 181 "swf5compiler.flex"
1703 { count(); return MODULO
; }
1707 #line 182 "swf5compiler.flex"
1708 { count(); return ADD
; }
1712 #line 183 "swf5compiler.flex"
1713 { count(); return ADD
; }
1717 #line 184 "swf5compiler.flex"
1718 { count(); return LESSTHAN
; }
1722 #line 185 "swf5compiler.flex"
1723 { count(); return LESSTHAN
; }
1727 #line 186 "swf5compiler.flex"
1728 { count(); return EQUALS
; }
1732 #line 187 "swf5compiler.flex"
1733 { count(); return EQUALS
; }
1737 #line 188 "swf5compiler.flex"
1738 { count(); return INC
; }
1742 #line 189 "swf5compiler.flex"
1743 { count(); return DEC
; }
1747 #line 190 "swf5compiler.flex"
1748 { count(); return ENUMERATE
; }
1752 #line 191 "swf5compiler.flex"
1753 { count(); return INITOBJECT
; }
1757 #line 192 "swf5compiler.flex"
1758 { count(); return INITARRAY
; }
1762 #line 193 "swf5compiler.flex"
1763 { count(); return GETMEMBER
; }
1767 #line 194 "swf5compiler.flex"
1768 { count(); return SETMEMBER
; }
1772 #line 195 "swf5compiler.flex"
1773 { count(); return SHIFTLEFT
; }
1777 #line 196 "swf5compiler.flex"
1778 { count(); return SHIFTRIGHT
; }
1782 #line 197 "swf5compiler.flex"
1783 { count(); return SHIFTRIGHT2
; }
1787 #line 198 "swf5compiler.flex"
1788 { count(); return VAREQUALS
; }
1792 #line 199 "swf5compiler.flex"
1793 { count(); return OLDADD
; }
1797 #line 200 "swf5compiler.flex"
1798 { count(); return SUBTRACT
; }
1802 #line 201 "swf5compiler.flex"
1803 { count(); return MULTIPLY
; }
1807 #line 202 "swf5compiler.flex"
1808 { count(); return DIVIDE
; }
1812 #line 203 "swf5compiler.flex"
1813 { count(); return OLDEQUALS
; }
1817 #line 204 "swf5compiler.flex"
1818 { count(); return OLDLESSTHAN
; }
1822 #line 205 "swf5compiler.flex"
1823 { count(); return LOGICALAND
; }
1827 #line 206 "swf5compiler.flex"
1828 { count(); return LOGICALOR
; }
1832 #line 207 "swf5compiler.flex"
1833 { count(); return NOT
; }
1837 #line 208 "swf5compiler.flex"
1838 { count(); return STRINGEQ
; }
1842 #line 209 "swf5compiler.flex"
1843 { count(); return STRINGLENGTH
; }
1847 #line 210 "swf5compiler.flex"
1848 { count(); return SUBSTRING
; }
1852 #line 211 "swf5compiler.flex"
1853 { count(); return GETVARIABLE
; }
1857 #line 212 "swf5compiler.flex"
1858 { count(); return SETVARIABLE
; }
1862 #line 213 "swf5compiler.flex"
1863 { count(); return SETTARGETEXPRESSION
; }
1867 #line 214 "swf5compiler.flex"
1868 { count(); return STARTDRAG
; }
1872 #line 215 "swf5compiler.flex"
1873 { count(); return STOPDRAG
; }
1877 #line 216 "swf5compiler.flex"
1878 { count(); return STRINGLESSTHAN
; }
1882 #line 217 "swf5compiler.flex"
1883 { count(); return MBLENGTH
; }
1887 #line 218 "swf5compiler.flex"
1888 { count(); return MBSUBSTRING
; }
1892 #line 219 "swf5compiler.flex"
1893 { count(); return MBORD
; }
1897 #line 220 "swf5compiler.flex"
1898 { count(); return MBCHR
; }
1902 #line 221 "swf5compiler.flex"
1903 { count(); return BRANCHALWAYS
; }
1907 #line 222 "swf5compiler.flex"
1908 { count(); return BRANCHALWAYS
; }
1912 #line 223 "swf5compiler.flex"
1913 { count(); return BRANCHIFTRUE
; }
1917 #line 224 "swf5compiler.flex"
1918 { count(); return POST
; }
1922 #line 225 "swf5compiler.flex"
1923 { count(); return GET
; }
1927 #line 226 "swf5compiler.flex"
1928 { count(); return END
; }
1933 #line 229 "swf5compiler.flex"
1934 { count(); swf5lval
.str
= strdup(swf5text
+2);
1939 #line 233 "swf5compiler.flex"
1940 { count(); swf5lval
.str
= strdup(swf5text
);
1941 return IDENTIFIER
; }
1944 /* rule 113 can match eol */
1946 #line 236 "swf5compiler.flex"
1947 { count(); swf5lval
.str
= strdup(swf5text
+1);
1948 swf5lval
.str
[strlen(swf5lval
.str
)-1]=0;
1949 unescape(swf5lval
.str
);
1953 /* rule 114 can match eol */
1955 #line 241 "swf5compiler.flex"
1956 { count(); swf5lval
.str
= strdup(swf5text
+1);
1957 swf5lval
.str
[strlen(swf5lval
.str
)-1]=0;
1958 unescape(swf5lval
.str
);
1962 /* rule 115 can match eol */
1963 *yy_cp
= (yy_hold_char
); /* undo effects of setting up swf5text */
1964 (yy_c_buf_p
) = yy_cp
-= 1;
1965 YY_DO_BEFORE_ACTION
; /* set up swf5text again */
1967 #line 246 "swf5compiler.flex"
1968 { count(); swf5lval
.str
= strdup("");
1969 warning("Unterminated string!");
1973 /* rule 116 can match eol */
1974 *yy_cp
= (yy_hold_char
); /* undo effects of setting up swf5text */
1975 (yy_c_buf_p
) = yy_cp
-= 1;
1976 YY_DO_BEFORE_ACTION
; /* set up swf5text again */
1978 #line 250 "swf5compiler.flex"
1979 { count(); swf5lval
.str
= strdup("");
1980 warning("Unterminated string!");
1985 #line 254 "swf5compiler.flex"
1986 { count(); comment(); }
1990 #line 255 "swf5compiler.flex"
1991 { count(); comment1(); }
1995 #line 256 "swf5compiler.flex"
2000 #line 258 "swf5compiler.flex"
2001 { count(); return INCR
; }
2005 #line 259 "swf5compiler.flex"
2006 { count(); return DECR
; }
2010 #line 260 "swf5compiler.flex"
2011 { count(); return LE
; }
2015 #line 261 "swf5compiler.flex"
2016 { count(); return GE
; }
2020 #line 262 "swf5compiler.flex"
2021 { count(); return EQ
; }
2025 #line 263 "swf5compiler.flex"
2026 { count(); return NE
; }
2030 #line 264 "swf5compiler.flex"
2031 { count(); return LAN
; }
2035 #line 265 "swf5compiler.flex"
2036 { count(); return LOR
; }
2040 #line 266 "swf5compiler.flex"
2041 { count(); return MEQ
; }
2045 #line 267 "swf5compiler.flex"
2046 { count(); return DEQ
; }
2050 #line 268 "swf5compiler.flex"
2051 { count(); return IEQ
; }
2055 #line 269 "swf5compiler.flex"
2056 { count(); return SEQ
; }
2060 #line 270 "swf5compiler.flex"
2061 { count(); return AEQ
; }
2065 #line 271 "swf5compiler.flex"
2066 { count(); return OEQ
; }
2070 #line 272 "swf5compiler.flex"
2071 { count(); return SHL
; }
2075 #line 273 "swf5compiler.flex"
2076 { count(); return SHR
; }
2080 #line 274 "swf5compiler.flex"
2081 { count(); return SHR2
; }
2085 #line 275 "swf5compiler.flex"
2086 { count(); return SHLEQ
; }
2090 #line 276 "swf5compiler.flex"
2091 { count(); return SHREQ
; }
2095 #line 277 "swf5compiler.flex"
2096 { count(); return SHR2EQ
; }
2100 #line 279 "swf5compiler.flex"
2101 { count(); return '<'; }
2105 #line 280 "swf5compiler.flex"
2106 { count(); return '>'; }
2110 #line 281 "swf5compiler.flex"
2111 { count(); return ';'; }
2115 #line 282 "swf5compiler.flex"
2116 { count(); return '='; }
2120 #line 283 "swf5compiler.flex"
2121 { count(); return '+'; }
2125 #line 284 "swf5compiler.flex"
2126 { count(); return '-'; }
2130 #line 285 "swf5compiler.flex"
2131 { count(); return '&'; }
2135 #line 286 "swf5compiler.flex"
2136 { count(); return '|'; }
2140 #line 287 "swf5compiler.flex"
2141 { count(); return '^'; }
2145 #line 288 "swf5compiler.flex"
2146 { count(); return '*'; }
2150 #line 289 "swf5compiler.flex"
2151 { count(); return '/'; }
2155 #line 290 "swf5compiler.flex"
2156 { count(); return '%'; }
2160 #line 291 "swf5compiler.flex"
2161 { count(); return '!'; }
2165 #line 292 "swf5compiler.flex"
2166 { count(); return '('; }
2170 #line 293 "swf5compiler.flex"
2171 { count(); return ')'; }
2175 #line 294 "swf5compiler.flex"
2176 { count(); return '['; }
2180 #line 295 "swf5compiler.flex"
2181 { count(); return ']'; }
2185 #line 296 "swf5compiler.flex"
2186 { count(); return '{'; }
2190 #line 297 "swf5compiler.flex"
2191 { count(); BEGIN(0); return '}'; }
2195 #line 298 "swf5compiler.flex"
2196 { count(); return ','; }
2200 #line 299 "swf5compiler.flex"
2201 { count(); return '.'; }
2205 #line 300 "swf5compiler.flex"
2206 { count(); return '?'; }
2210 #line 301 "swf5compiler.flex"
2211 { count(); return ':'; }
2215 #line 302 "swf5compiler.flex"
2216 { count(); return '~'; }
2219 /* rule 164 can match eol */
2221 #line 304 "swf5compiler.flex"
2222 { count(); strcpy(szLine
, swf5text
+ 1);
2223 countline(); yyless(1); }
2227 #line 307 "swf5compiler.flex"
2228 SWF_error("Unrecognized character: %s\n", swf5text
);
2232 #line 309 "swf5compiler.flex"
2235 #line 2236 "lex.swf5.c"
2236 case YY_STATE_EOF(INITIAL
):
2237 case YY_STATE_EOF(asm):
2240 case YY_END_OF_BUFFER
:
2242 /* Amount of text matched not including the EOB char. */
2243 int yy_amount_of_matched_text
= (int) (yy_cp
- (yytext_ptr
)) - 1;
2245 /* Undo the effects of YY_DO_BEFORE_ACTION. */
2246 *yy_cp
= (yy_hold_char
);
2247 YY_RESTORE_YY_MORE_OFFSET
2249 if ( YY_CURRENT_BUFFER_LVALUE
->yy_buffer_status
== YY_BUFFER_NEW
)
2251 /* We're scanning a new file or input source. It's
2252 * possible that this happened because the user
2253 * just pointed swf5in at a new source and called
2254 * swf5lex(). If so, then we have to assure
2255 * consistency between YY_CURRENT_BUFFER and our
2256 * globals. Here is the right place to do so, because
2257 * this is the first action (other than possibly a
2258 * back-up) that will match for the new input source.
2260 (yy_n_chars
) = YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
;
2261 YY_CURRENT_BUFFER_LVALUE
->yy_input_file
= swf5in
;
2262 YY_CURRENT_BUFFER_LVALUE
->yy_buffer_status
= YY_BUFFER_NORMAL
;
2265 /* Note that here we test for yy_c_buf_p "<=" to the position
2266 * of the first EOB in the buffer, since yy_c_buf_p will
2267 * already have been incremented past the NUL character
2268 * (since all states make transitions on EOB to the
2269 * end-of-buffer state). Contrast this with the test
2272 if ( (yy_c_buf_p
) <= &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[(yy_n_chars
)] )
2273 { /* This was really a NUL. */
2274 yy_state_type yy_next_state
;
2276 (yy_c_buf_p
) = (yytext_ptr
) + yy_amount_of_matched_text
;
2278 yy_current_state
= yy_get_previous_state( );
2280 /* Okay, we're now positioned to make the NUL
2281 * transition. We couldn't have
2282 * yy_get_previous_state() go ahead and do it
2283 * for us because it doesn't know how to deal
2284 * with the possibility of jamming (and we don't
2285 * want to build jamming into it because then it
2286 * will run more slowly).
2289 yy_next_state
= yy_try_NUL_trans( yy_current_state
);
2291 yy_bp
= (yytext_ptr
) + YY_MORE_ADJ
;
2293 if ( yy_next_state
)
2295 /* Consume the NUL. */
2296 yy_cp
= ++(yy_c_buf_p
);
2297 yy_current_state
= yy_next_state
;
2303 yy_cp
= (yy_c_buf_p
);
2304 goto yy_find_action
;
2308 else switch ( yy_get_next_buffer( ) )
2310 case EOB_ACT_END_OF_FILE
:
2312 (yy_did_buffer_switch_on_eof
) = 0;
2316 /* Note: because we've taken care in
2317 * yy_get_next_buffer() to have set up
2318 * swf5text, we can now set up
2319 * yy_c_buf_p so that if some total
2320 * hoser (like flex itself) wants to
2321 * call the scanner after we return the
2322 * YY_NULL, it'll still work - another
2323 * YY_NULL will get returned.
2325 (yy_c_buf_p
) = (yytext_ptr
) + YY_MORE_ADJ
;
2327 yy_act
= YY_STATE_EOF(YY_START
);
2333 if ( ! (yy_did_buffer_switch_on_eof
) )
2339 case EOB_ACT_CONTINUE_SCAN
:
2341 (yytext_ptr
) + yy_amount_of_matched_text
;
2343 yy_current_state
= yy_get_previous_state( );
2345 yy_cp
= (yy_c_buf_p
);
2346 yy_bp
= (yytext_ptr
) + YY_MORE_ADJ
;
2349 case EOB_ACT_LAST_MATCH
:
2351 &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[(yy_n_chars
)];
2353 yy_current_state
= yy_get_previous_state( );
2355 yy_cp
= (yy_c_buf_p
);
2356 yy_bp
= (yytext_ptr
) + YY_MORE_ADJ
;
2357 goto yy_find_action
;
2364 "fatal flex scanner internal error--no action found" );
2365 } /* end of action switch */
2366 } /* end of scanning one token */
2367 } /* end of swf5lex */
2369 /* yy_get_next_buffer - try to read in a new buffer
2371 * Returns a code representing an action:
2372 * EOB_ACT_LAST_MATCH -
2373 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2374 * EOB_ACT_END_OF_FILE - end of file
2376 static int yy_get_next_buffer (void)
2378 register char *dest
= YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
;
2379 register char *source
= (yytext_ptr
);
2380 register int number_to_move
, i
;
2383 if ( (yy_c_buf_p
) > &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[(yy_n_chars
) + 1] )
2385 "fatal flex scanner internal error--end of buffer missed" );
2387 if ( YY_CURRENT_BUFFER_LVALUE
->yy_fill_buffer
== 0 )
2388 { /* Don't try to fill the buffer, so this is an EOF. */
2389 if ( (yy_c_buf_p
) - (yytext_ptr
) - YY_MORE_ADJ
== 1 )
2391 /* We matched a single character, the EOB, so
2392 * treat this as a final EOF.
2394 return EOB_ACT_END_OF_FILE
;
2399 /* We matched some text prior to the EOB, first
2402 return EOB_ACT_LAST_MATCH
;
2406 /* Try to read more data. */
2408 /* First move last chars to start of buffer. */
2409 number_to_move
= (int) ((yy_c_buf_p
) - (yytext_ptr
)) - 1;
2411 for ( i
= 0; i
< number_to_move
; ++i
)
2412 *(dest
++) = *(source
++);
2414 if ( YY_CURRENT_BUFFER_LVALUE
->yy_buffer_status
== YY_BUFFER_EOF_PENDING
)
2415 /* don't do the read, it's not guaranteed to return an EOF,
2418 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
= (yy_n_chars
) = 0;
2423 YY_CURRENT_BUFFER_LVALUE
->yy_buf_size
- number_to_move
- 1;
2425 while ( num_to_read
<= 0 )
2426 { /* Not enough room in the buffer - grow it. */
2428 /* just a shorter name for the current buffer */
2429 YY_BUFFER_STATE b
= YY_CURRENT_BUFFER
;
2431 int yy_c_buf_p_offset
=
2432 (int) ((yy_c_buf_p
) - b
->yy_ch_buf
);
2434 if ( b
->yy_is_our_buffer
)
2436 int new_size
= b
->yy_buf_size
* 2;
2438 if ( new_size
<= 0 )
2439 b
->yy_buf_size
+= b
->yy_buf_size
/ 8;
2441 b
->yy_buf_size
*= 2;
2443 b
->yy_ch_buf
= (char *)
2444 /* Include room in for 2 EOB chars. */
2445 swf5realloc((void *) b
->yy_ch_buf
,b
->yy_buf_size
+ 2 );
2448 /* Can't grow it, we don't own it. */
2451 if ( ! b
->yy_ch_buf
)
2453 "fatal error - scanner input buffer overflow" );
2455 (yy_c_buf_p
) = &b
->yy_ch_buf
[yy_c_buf_p_offset
];
2457 num_to_read
= YY_CURRENT_BUFFER_LVALUE
->yy_buf_size
-
2462 if ( num_to_read
> YY_READ_BUF_SIZE
)
2463 num_to_read
= YY_READ_BUF_SIZE
;
2465 /* Read in more data. */
2466 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[number_to_move
]),
2467 (yy_n_chars
), (size_t) num_to_read
);
2469 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
= (yy_n_chars
);
2472 if ( (yy_n_chars
) == 0 )
2474 if ( number_to_move
== YY_MORE_ADJ
)
2476 ret_val
= EOB_ACT_END_OF_FILE
;
2477 swf5restart(swf5in
);
2482 ret_val
= EOB_ACT_LAST_MATCH
;
2483 YY_CURRENT_BUFFER_LVALUE
->yy_buffer_status
=
2484 YY_BUFFER_EOF_PENDING
;
2489 ret_val
= EOB_ACT_CONTINUE_SCAN
;
2491 if ((yy_size_t
) ((yy_n_chars
) + number_to_move
) > YY_CURRENT_BUFFER_LVALUE
->yy_buf_size
) {
2492 /* Extend the array by 50%, plus the number we really need. */
2493 yy_size_t new_size
= (yy_n_chars
) + number_to_move
+ ((yy_n_chars
) >> 1);
2494 YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
= (char *) swf5realloc((void *) YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
,new_size
);
2495 if ( ! YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
)
2496 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
2499 (yy_n_chars
) += number_to_move
;
2500 YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[(yy_n_chars
)] = YY_END_OF_BUFFER_CHAR
;
2501 YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[(yy_n_chars
) + 1] = YY_END_OF_BUFFER_CHAR
;
2503 (yytext_ptr
) = &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[0];
2508 /* yy_get_previous_state - get the state just before the EOB char was reached */
2510 static yy_state_type
yy_get_previous_state (void)
2512 register yy_state_type yy_current_state
;
2513 register char *yy_cp
;
2515 yy_current_state
= (yy_start
);
2517 for ( yy_cp
= (yytext_ptr
) + YY_MORE_ADJ
; yy_cp
< (yy_c_buf_p
); ++yy_cp
)
2519 register YY_CHAR yy_c
= (*yy_cp
? yy_ec
[YY_SC_TO_UI(*yy_cp
)] : 1);
2520 if ( yy_accept
[yy_current_state
] )
2522 (yy_last_accepting_state
) = yy_current_state
;
2523 (yy_last_accepting_cpos
) = yy_cp
;
2525 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
2527 yy_current_state
= (int) yy_def
[yy_current_state
];
2528 if ( yy_current_state
>= 650 )
2529 yy_c
= yy_meta
[(unsigned int) yy_c
];
2531 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
2534 return yy_current_state
;
2537 /* yy_try_NUL_trans - try to make a transition on the NUL character
2540 * next_state = yy_try_NUL_trans( current_state );
2542 static yy_state_type
yy_try_NUL_trans (yy_state_type yy_current_state
)
2544 register int yy_is_jam
;
2545 register char *yy_cp
= (yy_c_buf_p
);
2547 register YY_CHAR yy_c
= 1;
2548 if ( yy_accept
[yy_current_state
] )
2550 (yy_last_accepting_state
) = yy_current_state
;
2551 (yy_last_accepting_cpos
) = yy_cp
;
2553 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
2555 yy_current_state
= (int) yy_def
[yy_current_state
];
2556 if ( yy_current_state
>= 650 )
2557 yy_c
= yy_meta
[(unsigned int) yy_c
];
2559 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
2560 yy_is_jam
= (yy_current_state
== 649);
2562 return yy_is_jam
? 0 : yy_current_state
;
2565 static void yyunput (int c
, register char * yy_bp
)
2567 register char *yy_cp
;
2569 yy_cp
= (yy_c_buf_p
);
2571 /* undo effects of setting up swf5text */
2572 *yy_cp
= (yy_hold_char
);
2574 if ( yy_cp
< YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
+ 2 )
2575 { /* need to shift things up to make room */
2576 /* +2 for EOB chars. */
2577 register int number_to_move
= (yy_n_chars
) + 2;
2578 register char *dest
= &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[
2579 YY_CURRENT_BUFFER_LVALUE
->yy_buf_size
+ 2];
2580 register char *source
=
2581 &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[number_to_move
];
2583 while ( source
> YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
)
2584 *--dest
= *--source
;
2586 yy_cp
+= (int) (dest
- source
);
2587 yy_bp
+= (int) (dest
- source
);
2588 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
=
2589 (yy_n_chars
) = YY_CURRENT_BUFFER_LVALUE
->yy_buf_size
;
2591 if ( yy_cp
< YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
+ 2 )
2592 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2595 *--yy_cp
= (char) c
;
2597 (yytext_ptr
) = yy_bp
;
2598 (yy_hold_char
) = *yy_cp
;
2599 (yy_c_buf_p
) = yy_cp
;
2604 static int yyinput (void)
2606 static int input (void)
2612 *(yy_c_buf_p
) = (yy_hold_char
);
2614 if ( *(yy_c_buf_p
) == YY_END_OF_BUFFER_CHAR
)
2616 /* yy_c_buf_p now points to the character we want to return.
2617 * If this occurs *before* the EOB characters, then it's a
2618 * valid NUL; if not, then we've hit the end of the buffer.
2620 if ( (yy_c_buf_p
) < &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[(yy_n_chars
)] )
2621 /* This was really a NUL. */
2622 *(yy_c_buf_p
) = '\0';
2625 { /* need more input */
2626 int offset
= (yy_c_buf_p
) - (yytext_ptr
);
2629 switch ( yy_get_next_buffer( ) )
2631 case EOB_ACT_LAST_MATCH
:
2632 /* This happens because yy_g_n_b()
2633 * sees that we've accumulated a
2634 * token and flags that we need to
2635 * try matching the token before
2636 * proceeding. But for input(),
2637 * there's no matching to consider.
2638 * So convert the EOB_ACT_LAST_MATCH
2639 * to EOB_ACT_END_OF_FILE.
2642 /* Reset buffer status. */
2643 swf5restart(swf5in
);
2647 case EOB_ACT_END_OF_FILE
:
2652 if ( ! (yy_did_buffer_switch_on_eof
) )
2661 case EOB_ACT_CONTINUE_SCAN
:
2662 (yy_c_buf_p
) = (yytext_ptr
) + offset
;
2668 c
= *(unsigned char *) (yy_c_buf_p
); /* cast for 8-bit char's */
2669 *(yy_c_buf_p
) = '\0'; /* preserve swf5text */
2670 (yy_hold_char
) = *++(yy_c_buf_p
);
2674 #endif /* ifndef YY_NO_INPUT */
2676 /** Immediately switch to a different input stream.
2677 * @param input_file A readable stream.
2679 * @note This function does not reset the start condition to @c INITIAL .
2681 void swf5restart (FILE * input_file
)
2684 if ( ! YY_CURRENT_BUFFER
){
2685 swf5ensure_buffer_stack ();
2686 YY_CURRENT_BUFFER_LVALUE
=
2687 swf5_create_buffer(swf5in
,YY_BUF_SIZE
);
2690 swf5_init_buffer(YY_CURRENT_BUFFER
,input_file
);
2691 swf5_load_buffer_state( );
2694 /** Switch to a different input buffer.
2695 * @param new_buffer The new input buffer.
2698 void swf5_switch_to_buffer (YY_BUFFER_STATE new_buffer
)
2701 /* TODO. We should be able to replace this entire function body
2703 * swf5pop_buffer_state();
2704 * swf5push_buffer_state(new_buffer);
2706 swf5ensure_buffer_stack ();
2707 if ( YY_CURRENT_BUFFER
== new_buffer
)
2710 if ( YY_CURRENT_BUFFER
)
2712 /* Flush out information for old buffer. */
2713 *(yy_c_buf_p
) = (yy_hold_char
);
2714 YY_CURRENT_BUFFER_LVALUE
->yy_buf_pos
= (yy_c_buf_p
);
2715 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
= (yy_n_chars
);
2718 YY_CURRENT_BUFFER_LVALUE
= new_buffer
;
2719 swf5_load_buffer_state( );
2721 /* We don't actually know whether we did this switch during
2722 * EOF (swf5wrap()) processing, but the only time this flag
2723 * is looked at is after swf5wrap() is called, so it's safe
2724 * to go ahead and always set it.
2726 (yy_did_buffer_switch_on_eof
) = 1;
2729 static void swf5_load_buffer_state (void)
2731 (yy_n_chars
) = YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
;
2732 (yytext_ptr
) = (yy_c_buf_p
) = YY_CURRENT_BUFFER_LVALUE
->yy_buf_pos
;
2733 swf5in
= YY_CURRENT_BUFFER_LVALUE
->yy_input_file
;
2734 (yy_hold_char
) = *(yy_c_buf_p
);
2737 /** Allocate and initialize an input buffer state.
2738 * @param file A readable stream.
2739 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2741 * @return the allocated buffer state.
2743 YY_BUFFER_STATE
swf5_create_buffer (FILE * file
, int size
)
2747 b
= (YY_BUFFER_STATE
) swf5alloc(sizeof( struct yy_buffer_state
) );
2749 YY_FATAL_ERROR( "out of dynamic memory in swf5_create_buffer()" );
2751 b
->yy_buf_size
= size
;
2753 /* yy_ch_buf has to be 2 characters longer than the size given because
2754 * we need to put in 2 end-of-buffer characters.
2756 b
->yy_ch_buf
= (char *) swf5alloc(b
->yy_buf_size
+ 2 );
2757 if ( ! b
->yy_ch_buf
)
2758 YY_FATAL_ERROR( "out of dynamic memory in swf5_create_buffer()" );
2760 b
->yy_is_our_buffer
= 1;
2762 swf5_init_buffer(b
,file
);
2767 /** Destroy the buffer.
2768 * @param b a buffer created with swf5_create_buffer()
2771 void swf5_delete_buffer (YY_BUFFER_STATE b
)
2777 if ( b
== YY_CURRENT_BUFFER
) /* Not sure if we should pop here. */
2778 YY_CURRENT_BUFFER_LVALUE
= (YY_BUFFER_STATE
) 0;
2780 if ( b
->yy_is_our_buffer
)
2781 swf5free((void *) b
->yy_ch_buf
);
2783 swf5free((void *) b
);
2786 #ifndef _UNISTD_H /* assume unistd.h has isatty() for us */
2790 #ifdef __THROW /* this is a gnuism */
2791 extern int isatty (int ) __THROW
;
2793 extern int isatty (int );
2800 /* Initializes or reinitializes a buffer.
2801 * This function is sometimes called more than once on the same buffer,
2802 * such as during a swf5restart() or at EOF.
2804 static void swf5_init_buffer (YY_BUFFER_STATE b
, FILE * file
)
2809 swf5_flush_buffer(b
);
2811 b
->yy_input_file
= file
;
2812 b
->yy_fill_buffer
= 1;
2814 /* If b is the current buffer, then swf5_init_buffer was _probably_
2815 * called from swf5restart() or through yy_get_next_buffer.
2816 * In that case, we don't want to reset the lineno or column.
2818 if (b
!= YY_CURRENT_BUFFER
){
2819 b
->yy_bs_lineno
= 1;
2820 b
->yy_bs_column
= 0;
2823 b
->yy_is_interactive
= file
? (isatty( fileno(file
) ) > 0) : 0;
2828 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2829 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2832 void swf5_flush_buffer (YY_BUFFER_STATE b
)
2839 /* We always need two end-of-buffer characters. The first causes
2840 * a transition to the end-of-buffer state. The second causes
2841 * a jam in that state.
2843 b
->yy_ch_buf
[0] = YY_END_OF_BUFFER_CHAR
;
2844 b
->yy_ch_buf
[1] = YY_END_OF_BUFFER_CHAR
;
2846 b
->yy_buf_pos
= &b
->yy_ch_buf
[0];
2849 b
->yy_buffer_status
= YY_BUFFER_NEW
;
2851 if ( b
== YY_CURRENT_BUFFER
)
2852 swf5_load_buffer_state( );
2855 /** Pushes the new state onto the stack. The new state becomes
2856 * the current state. This function will allocate the stack
2858 * @param new_buffer The new state.
2861 void swf5push_buffer_state (YY_BUFFER_STATE new_buffer
)
2863 if (new_buffer
== NULL
)
2866 swf5ensure_buffer_stack();
2868 /* This block is copied from swf5_switch_to_buffer. */
2869 if ( YY_CURRENT_BUFFER
)
2871 /* Flush out information for old buffer. */
2872 *(yy_c_buf_p
) = (yy_hold_char
);
2873 YY_CURRENT_BUFFER_LVALUE
->yy_buf_pos
= (yy_c_buf_p
);
2874 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
= (yy_n_chars
);
2877 /* Only push if top exists. Otherwise, replace top. */
2878 if (YY_CURRENT_BUFFER
)
2879 (yy_buffer_stack_top
)++;
2880 YY_CURRENT_BUFFER_LVALUE
= new_buffer
;
2882 /* copied from swf5_switch_to_buffer. */
2883 swf5_load_buffer_state( );
2884 (yy_did_buffer_switch_on_eof
) = 1;
2887 /** Removes and deletes the top of the stack, if present.
2888 * The next element becomes the new top.
2891 void swf5pop_buffer_state (void)
2893 if (!YY_CURRENT_BUFFER
)
2896 swf5_delete_buffer(YY_CURRENT_BUFFER
);
2897 YY_CURRENT_BUFFER_LVALUE
= NULL
;
2898 if ((yy_buffer_stack_top
) > 0)
2899 --(yy_buffer_stack_top
);
2901 if (YY_CURRENT_BUFFER
) {
2902 swf5_load_buffer_state( );
2903 (yy_did_buffer_switch_on_eof
) = 1;
2907 /* Allocates the stack if it does not exist.
2908 * Guarantees space for at least one push.
2910 static void swf5ensure_buffer_stack (void)
2914 if (!(yy_buffer_stack
)) {
2916 /* First allocation is just for 2 elements, since we don't know if this
2917 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2918 * immediate realloc on the next call.
2921 (yy_buffer_stack
) = (struct yy_buffer_state
**)swf5alloc
2922 (num_to_alloc
* sizeof(struct yy_buffer_state
*)
2924 if ( ! (yy_buffer_stack
) )
2925 YY_FATAL_ERROR( "out of dynamic memory in swf5ensure_buffer_stack()" );
2927 memset((yy_buffer_stack
), 0, num_to_alloc
* sizeof(struct yy_buffer_state
*));
2929 (yy_buffer_stack_max
) = num_to_alloc
;
2930 (yy_buffer_stack_top
) = 0;
2934 if ((yy_buffer_stack_top
) >= ((yy_buffer_stack_max
)) - 1){
2936 /* Increase the buffer to prepare for a possible push. */
2937 int grow_size
= 8 /* arbitrary grow size */;
2939 num_to_alloc
= (yy_buffer_stack_max
) + grow_size
;
2940 (yy_buffer_stack
) = (struct yy_buffer_state
**)swf5realloc
2942 num_to_alloc
* sizeof(struct yy_buffer_state
*)
2944 if ( ! (yy_buffer_stack
) )
2945 YY_FATAL_ERROR( "out of dynamic memory in swf5ensure_buffer_stack()" );
2947 /* zero only the new slots.*/
2948 memset((yy_buffer_stack
) + (yy_buffer_stack_max
), 0, grow_size
* sizeof(struct yy_buffer_state
*));
2949 (yy_buffer_stack_max
) = num_to_alloc
;
2953 /** Setup the input buffer state to scan directly from a user-specified character buffer.
2954 * @param base the character buffer
2955 * @param size the size in bytes of the character buffer
2957 * @return the newly allocated buffer state object.
2959 YY_BUFFER_STATE
swf5_scan_buffer (char * base
, yy_size_t size
)
2964 base
[size
-2] != YY_END_OF_BUFFER_CHAR
||
2965 base
[size
-1] != YY_END_OF_BUFFER_CHAR
)
2966 /* They forgot to leave room for the EOB's. */
2969 b
= (YY_BUFFER_STATE
) swf5alloc(sizeof( struct yy_buffer_state
) );
2971 YY_FATAL_ERROR( "out of dynamic memory in swf5_scan_buffer()" );
2973 b
->yy_buf_size
= size
- 2; /* "- 2" to take care of EOB's */
2974 b
->yy_buf_pos
= b
->yy_ch_buf
= base
;
2975 b
->yy_is_our_buffer
= 0;
2976 b
->yy_input_file
= 0;
2977 b
->yy_n_chars
= b
->yy_buf_size
;
2978 b
->yy_is_interactive
= 0;
2980 b
->yy_fill_buffer
= 0;
2981 b
->yy_buffer_status
= YY_BUFFER_NEW
;
2983 swf5_switch_to_buffer(b
);
2988 /** Setup the input buffer state to scan a string. The next call to swf5lex() will
2989 * scan from a @e copy of @a str.
2990 * @param yystr a NUL-terminated string to scan
2992 * @return the newly allocated buffer state object.
2993 * @note If you want to scan bytes that may contain NUL values, then use
2994 * swf5_scan_bytes() instead.
2996 YY_BUFFER_STATE
swf5_scan_string (yyconst
char * yystr
)
2999 return swf5_scan_bytes(yystr
,strlen(yystr
) );
3002 /** Setup the input buffer state to scan the given bytes. The next call to swf5lex() will
3003 * scan from a @e copy of @a bytes.
3004 * @param bytes the byte buffer to scan
3005 * @param len the number of bytes in the buffer pointed to by @a bytes.
3007 * @return the newly allocated buffer state object.
3009 YY_BUFFER_STATE
swf5_scan_bytes (yyconst
char * yybytes
, int _yybytes_len
)
3016 /* Get memory for full buffer, including space for trailing EOB's. */
3017 n
= _yybytes_len
+ 2;
3018 buf
= (char *) swf5alloc(n
);
3020 YY_FATAL_ERROR( "out of dynamic memory in swf5_scan_bytes()" );
3022 for ( i
= 0; i
< _yybytes_len
; ++i
)
3023 buf
[i
] = yybytes
[i
];
3025 buf
[_yybytes_len
] = buf
[_yybytes_len
+1] = YY_END_OF_BUFFER_CHAR
;
3027 b
= swf5_scan_buffer(buf
,n
);
3029 YY_FATAL_ERROR( "bad buffer in swf5_scan_bytes()" );
3031 /* It's okay to grow etc. this buffer, and we should throw it
3032 * away when we're done.
3034 b
->yy_is_our_buffer
= 1;
3039 #ifndef YY_EXIT_FAILURE
3040 #define YY_EXIT_FAILURE 2
3043 static void yy_fatal_error (yyconst
char* msg
)
3045 (void) fprintf( stderr
, "%s\n", msg
);
3046 exit( YY_EXIT_FAILURE
);
3049 /* Redefine yyless() so it works in section 3 code. */
3055 /* Undo effects of setting up swf5text. */ \
3056 int yyless_macro_arg = (n); \
3057 YY_LESS_LINENO(yyless_macro_arg);\
3058 swf5text[swf5leng] = (yy_hold_char); \
3059 (yy_c_buf_p) = swf5text + yyless_macro_arg; \
3060 (yy_hold_char) = *(yy_c_buf_p); \
3061 *(yy_c_buf_p) = '\0'; \
3062 swf5leng = yyless_macro_arg; \
3066 /* Accessor methods (get/set functions) to struct members. */
3068 /** Get the current line number.
3071 int swf5get_lineno (void)
3077 /** Get the input stream.
3080 FILE *swf5get_in (void)
3085 /** Get the output stream.
3088 FILE *swf5get_out (void)
3093 /** Get the length of the current token.
3096 int swf5get_leng (void)
3101 /** Get the current token.
3105 char *swf5get_text (void)
3110 /** Set the current line number.
3111 * @param line_number
3114 void swf5set_lineno (int line_number
)
3117 swf5lineno
= line_number
;
3120 /** Set the input stream. This does not discard the current
3122 * @param in_str A readable stream.
3124 * @see swf5_switch_to_buffer
3126 void swf5set_in (FILE * in_str
)
3131 void swf5set_out (FILE * out_str
)
3136 int swf5get_debug (void)
3138 return swf5_flex_debug
;
3141 void swf5set_debug (int bdebug
)
3143 swf5_flex_debug
= bdebug
;
3146 static int yy_init_globals (void)
3148 /* Initialization is the same as for the non-reentrant scanner.
3149 * This function is called from swf5lex_destroy(), so don't allocate here.
3152 (yy_buffer_stack
) = 0;
3153 (yy_buffer_stack_top
) = 0;
3154 (yy_buffer_stack_max
) = 0;
3155 (yy_c_buf_p
) = (char *) 0;
3159 /* Defined in main.c */
3164 swf5in
= (FILE *) 0;
3165 swf5out
= (FILE *) 0;
3168 /* For future reference: Set errno on error, since we are called by
3174 /* swf5lex_destroy is for both reentrant and non-reentrant scanners. */
3175 int swf5lex_destroy (void)
3178 /* Pop the buffer stack, destroying each element. */
3179 while(YY_CURRENT_BUFFER
){
3180 swf5_delete_buffer(YY_CURRENT_BUFFER
);
3181 YY_CURRENT_BUFFER_LVALUE
= NULL
;
3182 swf5pop_buffer_state();
3185 /* Destroy the stack itself. */
3186 swf5free((yy_buffer_stack
) );
3187 (yy_buffer_stack
) = NULL
;
3189 /* Reset the globals. This is important in a non-reentrant scanner so the next time
3190 * swf5lex() is called, initialization will occur. */
3197 * Internal utility routines.
3201 static void yy_flex_strncpy (char* s1
, yyconst
char * s2
, int n
)
3204 for ( i
= 0; i
< n
; ++i
)
3209 #ifdef YY_NEED_STRLEN
3210 static int yy_flex_strlen (yyconst
char * s
)
3213 for ( n
= 0; s
[n
]; ++n
)
3220 void *swf5alloc (yy_size_t size
)
3222 return (void *) malloc( size
);
3225 void *swf5realloc (void * ptr
, yy_size_t size
)
3227 /* The cast to (char *) in the following accommodates both
3228 * implementations that use char* generic pointers, and those
3229 * that use void* generic pointers. It works with the latter
3230 * because both ANSI C and C++ allow castless assignment from
3231 * any pointer type to void*, and deal with argument conversions
3232 * as though doing an assignment.
3234 return (void *) realloc( (char *) ptr
, size
);
3237 void swf5free (void * ptr
)
3239 free( (char *) ptr
); /* see swf5realloc() for (char *) cast */
3242 #define YYTABLES_NAME "yytables"
3244 #line 309 "swf5compiler.flex"
3247 static int getinput() {
3260 static void countline()
3262 if(sLineNumber
!= 0)
3263 msgline
[column
] = 0;
3267 msgline
= msgbufs
[sLineNumber
& 1];
3270 static int LineNumber(void)
3272 return (sLineNumber
+ 1);
3275 static int ColumnNumber(void)
3280 static char *LineText(void)
3282 msgline
[column
] = 0;
3286 static void comment()
3288 // Handle block comments
3293 // We have the start of a comment so look skip everything up to the
3294 // end of the comment character
3295 while ((c
= getinput()) != '*' && c
!= EOF
)
3298 msgline
[column
] = c
;
3302 // keep the line number in synch
3305 // start the output (matches the algorithim in the lexx above)
3309 if (swf5debug
) putchar(c
);
3312 // is this the end of comment character
3313 if ((c1
= getinput()) != '/' && c
!= EOF
)
3315 // false start as this was no end of comment
3320 // write out the start of the end of comment
3322 if (swf5debug
) putchar(c
);
3324 // write out the end of the end of comment
3326 if (swf5debug
) putchar(c1
);
3329 static void comment1()
3331 // Handle comment of type 1 (ie '//')
3335 // this is a line comment
3336 while ((c
= getinput()) != '\n' && c
!= EOF
)
3338 if (swf5debug
) putchar(c
);
3341 msgline
[column
] = c
;
3346 // keep the line number in synch
3349 if (swf5debug
) putchar(c
);
3355 static void count(void)
3359 // Count the characters to maintain the current column position
3360 if (swf5text
[0] == '\n')
3362 if (swf5debug
) printf("\n");
3366 if (swf5debug
) printf("%s", swf5text
);
3368 for(n
=0; n
<swf5leng
; ++n
, ++column
)
3371 msgline
[column
] = swf5text
[n
];
3374 //-- keep writing the stuff to standard output
3375 //column += swf5leng;
3379 static void printprog()
3382 SWF_warn("\n%s", msgbufs
[(sLineNumber
-1)&1]);
3385 msgline
[column
] = 0;
3387 SWF_warn("\n%s", msgline
);
3390 static void warning(char *msg
)
3392 // print a warning message
3394 SWF_warn("\n%*s", ColumnNumber(), "^");
3395 SWF_warn("\nLine %4.4d: Reason: '%s' \n", LineNumber(), msg
);
3398 void swf5error(char *msg
)
3401 if(strlen(swf5text
))
3403 SWF_error("\n%s\n%*s\nLine %i: Reason: '%s'\n",
3404 LineText(), ColumnNumber(), "^", LineNumber(), msg
);
3408 SWF_error("\nLine %d: Reason: 'Unexpected EOF found while looking for input.'\n", LineNumber());