4 #define YY_INT_ALIGNED short int
6 /* A lexical scanner generated by flex */
9 #define YY_FLEX_MAJOR_VERSION 2
10 #define YY_FLEX_MINOR_VERSION 5
11 #define YY_FLEX_SUBMINOR_VERSION 33
12 #if YY_FLEX_SUBMINOR_VERSION > 0
16 /* First, we deal with platform-specific or compiler-specific issues. */
18 /* begin standard C headers. */
24 /* end standard C headers. */
26 /* flex integer type definitions */
31 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
33 #if __STDC_VERSION__ >= 199901L
35 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
36 * if you want the limit (max/min) macros for int types.
38 #ifndef __STDC_LIMIT_MACROS
39 #define __STDC_LIMIT_MACROS 1
43 typedef int8_t flex_int8_t;
44 typedef uint8_t flex_uint8_t;
45 typedef int16_t flex_int16_t;
46 typedef uint16_t flex_uint16_t;
47 typedef int32_t flex_int32_t;
48 typedef uint32_t flex_uint32_t;
50 typedef signed char flex_int8_t;
51 typedef short int flex_int16_t;
52 typedef int flex_int32_t;
53 typedef unsigned char flex_uint8_t;
54 typedef unsigned short int flex_uint16_t;
55 typedef unsigned int flex_uint32_t;
58 /* Limits of integral types. */
60 #define INT8_MIN (-128)
63 #define INT16_MIN (-32767-1)
66 #define INT32_MIN (-2147483647-1)
69 #define INT8_MAX (127)
72 #define INT16_MAX (32767)
75 #define INT32_MAX (2147483647)
78 #define UINT8_MAX (255U)
81 #define UINT16_MAX (65535U)
84 #define UINT32_MAX (4294967295U)
87 #endif /* ! FLEXINT_H */
91 /* The "const" storage-class-modifier is valid. */
94 #else /* ! __cplusplus */
100 #endif /* __STDC__ */
101 #endif /* ! __cplusplus */
104 #define yyconst const
109 /* Returned upon end-of-file. */
112 /* Promotes a possibly negative, possibly signed char to an unsigned
113 * integer for use as an array index. If the signed char is negative,
114 * we want to instead treat it as an 8-bit unsigned char, hence the
117 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
119 /* Enter a start condition. This macro really ought to take a parameter,
120 * but we do it the disgusting crufty way forced on us by the ()-less
121 * definition of BEGIN.
123 #define BEGIN (yy_start) = 1 + 2 *
125 /* Translate the current start state into a value that can be later handed
126 * to BEGIN to return to the state. The YYSTATE alias is for lex
129 #define YY_START (((yy_start) - 1) / 2)
130 #define YYSTATE YY_START
132 /* Action number for EOF rule of a given start state. */
133 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
135 /* Special action meaning "start processing a new file". */
136 #define YY_NEW_FILE swf5restart(swf5in )
138 #define YY_END_OF_BUFFER_CHAR 0
140 /* Size of default input buffer. */
142 #define YY_BUF_SIZE 16384
145 /* The state buf must be large enough to hold one state per character in the main buffer.
147 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
149 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
150 #define YY_TYPEDEF_YY_BUFFER_STATE
151 typedef struct yy_buffer_state *YY_BUFFER_STATE;
156 extern FILE *swf5in, *swf5out;
158 #define EOB_ACT_CONTINUE_SCAN 0
159 #define EOB_ACT_END_OF_FILE 1
160 #define EOB_ACT_LAST_MATCH 2
162 #define YY_LESS_LINENO(n)
164 /* Return all but the first "n" matched characters back to the input stream. */
168 /* Undo effects of setting up swf5text. */ \
169 int yyless_macro_arg = (n); \
170 YY_LESS_LINENO(yyless_macro_arg);\
171 *yy_cp = (yy_hold_char); \
172 YY_RESTORE_YY_MORE_OFFSET \
173 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
174 YY_DO_BEFORE_ACTION; /* set up swf5text again */ \
178 #define unput(c) yyunput( c, (yytext_ptr) )
180 /* The following is because we cannot portably get our hands on size_t
181 * (without autoconf's help, which isn't available because we want
182 * flex-generated scanners to compile on their own).
185 #ifndef YY_TYPEDEF_YY_SIZE_T
186 #define YY_TYPEDEF_YY_SIZE_T
187 typedef unsigned int yy_size_t;
190 #ifndef YY_STRUCT_YY_BUFFER_STATE
191 #define YY_STRUCT_YY_BUFFER_STATE
192 struct yy_buffer_state
196 char *yy_ch_buf; /* input buffer */
197 char *yy_buf_pos; /* current position in input buffer */
199 /* Size of input buffer in bytes, not including room for EOB
202 yy_size_t yy_buf_size;
204 /* Number of characters read into yy_ch_buf, not including EOB
209 /* Whether we "own" the buffer - i.e., we know we created it,
210 * and can realloc() it to grow it, and should free() it to
213 int yy_is_our_buffer;
215 /* Whether this is an "interactive" input source; if so, and
216 * if we're using stdio for input, then we want to use getc()
217 * instead of fread(), to make sure we stop fetching input after
220 int yy_is_interactive;
222 /* Whether we're considered to be at the beginning of a line.
223 * If so, '^' rules will be active on the next match, otherwise
228 int yy_bs_lineno; /**< The line count. */
229 int yy_bs_column; /**< The column count. */
231 /* Whether to try to fill the input buffer when we reach the
236 int yy_buffer_status;
238 #define YY_BUFFER_NEW 0
239 #define YY_BUFFER_NORMAL 1
240 /* When an EOF's been seen but there's still some text to process
241 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
242 * shouldn't try reading from the input source any more. We might
243 * still have a bunch of tokens to match, though, because of
244 * possible backing-up.
246 * When we actually see the EOF, we change the status to "new"
247 * (via swf5restart()), so that the user can continue scanning by
248 * just pointing swf5in at a new input file.
250 #define YY_BUFFER_EOF_PENDING 2
253 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
255 /* Stack of input buffers. */
256 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
257 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
258 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
260 /* We provide macros for accessing buffer states in case in the
261 * future we want to put the buffer states in a more general
264 * Returns the top of the stack, or NULL.
266 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
267 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
270 /* Same as previous macro, but useful when we know that the buffer stack is not
271 * NULL or when we need an lvalue. For internal use only.
273 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
275 /* yy_hold_char holds the character lost when swf5text is formed. */
276 static char yy_hold_char;
277 static int yy_n_chars; /* number of characters read into yy_ch_buf */
280 /* Points to current character in buffer. */
281 static char *yy_c_buf_p = (char *) 0;
282 static int yy_init = 0; /* whether we need to initialize */
283 static int yy_start = 0; /* start state number */
285 /* Flag which is used to allow swf5wrap()'s to do buffer switches
286 * instead of setting up a fresh swf5in. A bit of a hack ...
288 static int yy_did_buffer_switch_on_eof;
290 void swf5restart (FILE *input_file );
291 void swf5_switch_to_buffer (YY_BUFFER_STATE new_buffer );
292 YY_BUFFER_STATE swf5_create_buffer (FILE *file,int size );
293 void swf5_delete_buffer (YY_BUFFER_STATE b );
294 void swf5_flush_buffer (YY_BUFFER_STATE b );
295 void swf5push_buffer_state (YY_BUFFER_STATE new_buffer );
296 void swf5pop_buffer_state (void );
298 static void swf5ensure_buffer_stack (void );
299 static void swf5_load_buffer_state (void );
300 static void swf5_init_buffer (YY_BUFFER_STATE b,FILE *file );
302 #define YY_FLUSH_BUFFER swf5_flush_buffer(YY_CURRENT_BUFFER )
304 YY_BUFFER_STATE swf5_scan_buffer (char *base,yy_size_t size );
305 YY_BUFFER_STATE swf5_scan_string (yyconst char *yy_str );
306 YY_BUFFER_STATE swf5_scan_bytes (yyconst char *bytes,int len );
308 void *swf5alloc (yy_size_t );
309 void *swf5realloc (void *,yy_size_t );
310 void swf5free (void * );
312 #define yy_new_buffer swf5_create_buffer
314 #define yy_set_interactive(is_interactive) \
316 if ( ! YY_CURRENT_BUFFER ){ \
317 swf5ensure_buffer_stack (); \
318 YY_CURRENT_BUFFER_LVALUE = \
319 swf5_create_buffer(swf5in,YY_BUF_SIZE ); \
321 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
324 #define yy_set_bol(at_bol) \
326 if ( ! YY_CURRENT_BUFFER ){\
327 swf5ensure_buffer_stack (); \
328 YY_CURRENT_BUFFER_LVALUE = \
329 swf5_create_buffer(swf5in,YY_BUF_SIZE ); \
331 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
334 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
336 /* Begin user sect3 */
338 typedef unsigned char YY_CHAR;
340 FILE *swf5in = (FILE *) 0, *swf5out = (FILE *) 0;
342 typedef int yy_state_type;
344 extern int swf5lineno;
348 extern char *swf5text;
349 #define yytext_ptr swf5text
351 static yy_state_type yy_get_previous_state (void );
352 static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
353 static int yy_get_next_buffer (void );
354 static void yy_fatal_error (yyconst char msg[] );
356 /* Done after the current pattern has been matched and before the
357 * corresponding action - sets up swf5text.
359 #define YY_DO_BEFORE_ACTION \
360 (yytext_ptr) = yy_bp; \
361 swf5leng = (size_t) (yy_cp - yy_bp); \
362 (yy_hold_char) = *yy_cp; \
364 (yy_c_buf_p) = yy_cp;
366 #define YY_NUM_RULES 166
367 #define YY_END_OF_BUFFER 167
368 /* This struct is not used in this scanner,
369 but its presence is necessary. */
372 flex_int32_t yy_verify;
375 static yyconst flex_int16_t yy_accept[650] =
377 0, 0, 0, 0, 167, 165, 119, 164, 165, 152,
378 165, 151, 146, 165, 153, 154, 149, 144, 159, 145,
379 160, 150, 3, 3, 162, 142, 140, 143, 141, 161,
380 155, 156, 148, 112, 112, 112, 112, 112, 112, 112,
381 112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
382 112, 157, 147, 158, 163, 112, 112, 112, 112, 112,
383 112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
384 164, 125, 0, 115, 113, 0, 126, 132, 0, 116,
385 114, 0, 128, 120, 130, 121, 131, 117, 118, 129,
386 4, 2, 3, 0, 134, 122, 124, 123, 135, 112,
388 112, 112, 112, 112, 112, 112, 19, 112, 112, 112,
389 112, 112, 112, 112, 112, 17, 16, 112, 112, 112,
390 112, 112, 112, 112, 0, 112, 112, 112, 112, 112,
391 112, 112, 112, 112, 112, 112, 112, 133, 127, 112,
392 112, 112, 112, 112, 112, 112, 112, 112, 112, 16,
393 112, 112, 112, 112, 112, 112, 112, 112, 63, 112,
394 112, 112, 112, 112, 112, 112, 112, 112, 4, 1,
395 137, 138, 136, 25, 112, 112, 112, 37, 112, 112,
396 112, 112, 112, 112, 112, 15, 112, 112, 112, 112,
397 35, 112, 112, 21, 112, 112, 36, 112, 112, 111,
399 112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
400 112, 20, 112, 112, 66, 62, 112, 112, 73, 112,
401 55, 110, 112, 112, 109, 72, 112, 112, 112, 112,
402 112, 112, 112, 112, 112, 21, 91, 112, 57, 112,
403 112, 112, 112, 112, 112, 112, 112, 112, 20, 64,
404 139, 112, 112, 13, 112, 112, 112, 112, 112, 11,
405 26, 112, 112, 112, 112, 112, 112, 112, 112, 112,
406 7, 42, 112, 112, 112, 112, 112, 43, 112, 112,
407 112, 112, 5, 112, 112, 24, 112, 112, 112, 112,
408 112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
410 112, 112, 112, 112, 112, 112, 112, 112, 108, 58,
411 112, 112, 112, 112, 112, 112, 43, 112, 112, 112,
412 56, 112, 8, 112, 112, 112, 112, 112, 112, 6,
413 112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
414 112, 112, 112, 112, 112, 112, 112, 112, 34, 112,
415 18, 112, 112, 112, 112, 112, 112, 112, 112, 112,
416 112, 112, 112, 104, 112, 103, 112, 112, 112, 112,
417 112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
418 112, 112, 112, 112, 112, 112, 112, 32, 112, 112,
419 22, 112, 112, 112, 38, 112, 112, 31, 112, 112,
421 112, 112, 29, 112, 23, 112, 112, 33, 12, 112,
422 27, 105, 112, 112, 86, 112, 70, 112, 112, 112,
423 112, 112, 112, 112, 112, 65, 112, 67, 112, 112,
424 83, 112, 112, 112, 112, 112, 112, 112, 112, 112,
425 112, 112, 33, 112, 112, 112, 112, 14, 112, 112,
426 112, 39, 112, 112, 112, 112, 112, 112, 112, 112,
427 112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
428 112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
429 112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
430 112, 112, 112, 112, 9, 112, 10, 30, 112, 112,
432 112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
433 112, 112, 112, 112, 112, 112, 112, 68, 112, 112,
434 101, 112, 85, 112, 112, 112, 112, 112, 112, 112,
435 112, 112, 112, 112, 99, 92, 112, 112, 84, 112,
436 46, 112, 47, 112, 50, 112, 40, 41, 112, 48,
437 112, 112, 112, 112, 112, 112, 74, 77, 112, 76,
438 112, 112, 90, 112, 71, 112, 87, 112, 78, 112,
439 48, 112, 79, 112, 98, 112, 112, 94, 82, 112,
440 28, 112, 112, 112, 45, 112, 112, 112, 112, 61,
441 112, 75, 89, 112, 112, 112, 112, 112, 112, 80,
443 112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
444 95, 102, 69, 88, 59, 112, 96, 81, 112, 112,
445 112, 52, 112, 112, 112, 106, 107, 60, 112, 93,
446 112, 112, 49, 112, 44, 97, 112, 112, 112, 112,
447 100, 112, 112, 54, 112, 51, 112, 53, 0
450 static yyconst flex_int32_t yy_ec[256] =
452 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
453 2, 2, 4, 1, 1, 1, 1, 1, 1, 1,
454 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
455 1, 2, 5, 6, 1, 1, 7, 8, 9, 10,
456 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
457 21, 21, 21, 21, 21, 22, 22, 23, 24, 25,
458 26, 27, 28, 1, 34, 35, 36, 37, 38, 39,
459 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
460 50, 51, 52, 53, 54, 55, 56, 57, 58, 33,
461 29, 30, 31, 32, 33, 1, 34, 35, 36, 37,
463 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
464 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
465 58, 33, 59, 60, 61, 62, 1, 1, 1, 1,
466 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
467 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
468 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
469 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
470 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
471 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
472 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
474 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
475 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
476 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
477 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
478 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
482 static yyconst flex_int32_t yy_meta[63] =
484 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
485 1, 1, 1, 1, 1, 1, 1, 2, 2, 2,
486 2, 2, 1, 1, 1, 1, 1, 1, 1, 1,
487 1, 1, 3, 2, 2, 2, 2, 2, 2, 3,
488 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
489 3, 3, 3, 3, 3, 3, 3, 3, 1, 1,
493 static yyconst flex_int16_t yy_base[654] =
495 0, 0, 29, 0, 741, 742, 742, 742, 737, 713,
496 67, 742, 64, 76, 742, 742, 712, 67, 742, 68,
497 742, 70, 82, 89, 742, 742, 63, 711, 65, 742,
498 742, 742, 742, 0, 684, 684, 78, 75, 69, 82,
499 77, 81, 79, 80, 683, 86, 109, 95, 87, 699,
500 80, 742, 114, 742, 742, 105, 681, 112, 116, 116,
501 117, 120, 124, 121, 130, 99, 128, 139, 697, 682,
502 742, 742, 180, 182, 742, 726, 742, 742, 178, 187,
503 742, 725, 742, 742, 742, 742, 742, 742, 742, 742,
504 179, 200, 207, 0, 701, 742, 742, 742, 176, 0,
506 680, 687, 159, 673, 676, 168, 0, 673, 669, 686,
507 674, 667, 670, 663, 662, 0, 153, 667, 679, 158,
508 667, 674, 676, 671, 212, 661, 189, 654, 658, 670,
509 662, 663, 155, 653, 650, 658, 646, 742, 742, 661,
510 660, 61, 191, 201, 641, 646, 187, 640, 640, 202,
511 198, 213, 212, 655, 646, 195, 637, 652, 651, 142,
512 635, 633, 643, 215, 649, 225, 632, 631, 250, 0,
513 742, 742, 655, 0, 646, 634, 640, 0, 203, 643,
514 638, 630, 636, 628, 620, 0, 635, 208, 622, 616,
515 0, 628, 630, 0, 613, 620, 0, 606, 608, 255,
517 625, 613, 606, 606, 609, 605, 603, 615, 618, 615,
518 614, 0, 606, 609, 0, 0, 602, 603, 0, 605,
519 601, 0, 599, 610, 232, 0, 590, 590, 599, 599,
520 601, 587, 583, 582, 582, 245, 0, 246, 0, 581,
521 592, 242, 593, 580, 581, 587, 229, 579, 589, 0,
522 742, 582, 586, 0, 590, 581, 568, 568, 578, 0,
523 0, 581, 565, 575, 565, 576, 580, 560, 243, 573,
524 0, 0, 572, 562, 554, 557, 573, 554, 552, 568,
525 558, 564, 0, 553, 562, 0, 563, 219, 561, 559,
526 551, 557, 560, 258, 540, 556, 540, 543, 552, 553,
528 542, 544, 548, 534, 545, 545, 531, 542, 0, 0,
529 541, 540, 543, 542, 522, 521, 257, 526, 519, 520,
530 0, 520, 0, 518, 515, 520, 521, 527, 528, 0,
531 521, 516, 516, 509, 512, 517, 509, 522, 504, 503,
532 507, 514, 504, 499, 501, 497, 506, 508, 0, 506,
533 0, 503, 245, 505, 504, 490, 488, 493, 487, 486,
534 501, 494, 500, 0, 493, 0, 480, 483, 481, 492,
535 474, 475, 489, 471, 472, 477, 482, 470, 469, 256,
536 482, 467, 477, 465, 481, 460, 479, 0, 458, 458,
537 0, 476, 461, 470, 488, 472, 469, 0, 449, 452,
539 468, 467, 0, 454, 0, 459, 444, 0, 0, 447,
540 0, 266, 449, 442, 0, 460, 0, 458, 450, 440,
541 447, 455, 443, 434, 433, 0, 440, 0, 450, 431,
542 0, 448, 429, 445, 437, 438, 435, 438, 433, 423,
543 439, 265, 430, 435, 436, 423, 430, 0, 414, 419,
544 414, 0, 418, 425, 420, 419, 414, 413, 410, 419,
545 409, 401, 409, 414, 416, 410, 397, 411, 414, 413,
546 408, 398, 268, 403, 392, 384, 396, 387, 394, 385,
547 399, 384, 397, 400, 394, 392, 397, 390, 379, 390,
548 380, 373, 380, 386, 0, 385, 0, 0, 384, 373,
550 382, 385, 380, 379, 361, 362, 377, 379, 356, 358,
551 357, 361, 370, 356, 371, 347, 368, 0, 356, 351,
552 0, 359, 0, 348, 358, 346, 356, 345, 342, 341,
553 358, 339, 350, 350, 0, 0, 265, 349, 0, 336,
554 0, 341, 0, 347, 338, 349, 0, 0, 341, 0,
555 330, 336, 346, 328, 336, 340, 0, 0, 331, 0,
556 322, 337, 0, 326, 0, 338, 0, 337, 0, 332,
557 331, 323, 0, 314, 0, 326, 313, 0, 0, 316,
558 0, 309, 317, 323, 0, 318, 301, 304, 309, 0,
559 318, 0, 0, 315, 307, 306, 301, 294, 312, 329,
561 295, 294, 291, 299, 306, 307, 289, 289, 302, 292,
562 0, 0, 0, 0, 0, 289, 0, 0, 296, 295,
563 293, 0, 282, 288, 274, 0, 0, 0, 280, 0,
564 296, 291, 281, 285, 0, 0, 279, 279, 260, 264,
565 0, 266, 259, 0, 262, 0, 92, 0, 742, 317,
569 static yyconst flex_int16_t yy_def[654] =
571 649, 1, 1, 3, 649, 649, 649, 649, 649, 649,
572 650, 649, 649, 651, 649, 649, 649, 649, 649, 649,
573 649, 649, 649, 649, 649, 649, 649, 649, 649, 649,
574 649, 649, 649, 652, 652, 652, 652, 652, 652, 652,
575 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
576 652, 649, 649, 649, 649, 652, 652, 652, 652, 652,
577 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
578 649, 649, 650, 650, 649, 650, 649, 649, 651, 651,
579 649, 651, 649, 649, 649, 649, 649, 649, 649, 649,
580 649, 649, 649, 653, 649, 649, 649, 649, 649, 652,
582 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
583 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
584 652, 652, 652, 652, 649, 652, 652, 652, 652, 652,
585 652, 652, 652, 652, 652, 652, 652, 649, 649, 652,
586 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
587 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
588 652, 652, 652, 652, 652, 652, 652, 652, 649, 653,
589 649, 649, 649, 652, 652, 652, 652, 652, 652, 652,
590 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
591 652, 652, 652, 652, 652, 652, 652, 652, 652, 649,
593 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
594 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
595 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
596 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
597 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
598 649, 652, 652, 652, 652, 652, 652, 652, 652, 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, 652, 652, 652, 652, 652, 652,
602 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, 652, 652,
606 652, 652, 652, 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, 652,
609 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
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,
615 652, 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,
620 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,
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,
631 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,
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, 0, 649,
645 static yyconst flex_int16_t yy_nxt[805] =
647 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
648 16, 17, 18, 19, 20, 21, 22, 23, 24, 24,
649 24, 24, 25, 26, 27, 28, 29, 30, 31, 6,
650 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
651 34, 42, 34, 34, 43, 34, 44, 45, 46, 34,
652 47, 48, 49, 34, 50, 51, 34, 34, 52, 53,
653 54, 55, 56, 57, 58, 59, 60, 170, 61, 74,
654 62, 77, 75, 63, 64, 65, 66, 67, 80, 84,
655 68, 88, 86, 69, 81, 70, 89, 95, 96, 78,
656 98, 99, 85, 87, 217, 90, 76, 91, 175, 92,
658 92, 92, 92, 93, 91, 82, 93, 93, 93, 93,
659 93, 103, 106, 109, 114, 111, 118, 120, 104, 116,
660 136, 137, 107, 110, 115, 105, 119, 117, 108, 112,
661 123, 125, 128, 121, 132, 113, 124, 133, 94, 138,
662 648, 140, 126, 158, 134, 143, 127, 129, 130, 159,
663 131, 141, 104, 144, 149, 153, 101, 145, 116, 105,
664 109, 151, 147, 107, 115, 148, 150, 156, 154, 146,
665 110, 152, 123, 139, 155, 160, 162, 157, 124, 163,
666 80, 161, 74, 121, 74, 75, 81, 75, 209, 80,
667 239, 164, 165, 240, 166, 81, 169, 169, 169, 169,
669 169, 172, 173, 176, 190, 191, 180, 82, 210, 76,
670 177, 76, 181, 194, 195, 91, 82, 92, 92, 92,
671 92, 93, 91, 222, 93, 93, 93, 93, 93, 200,
672 200, 200, 200, 200, 202, 218, 219, 226, 255, 180,
673 223, 203, 177, 227, 192, 181, 193, 230, 244, 228,
674 236, 195, 229, 190, 191, 256, 231, 353, 248, 232,
675 264, 265, 245, 233, 354, 246, 207, 169, 169, 169,
676 169, 169, 200, 200, 200, 200, 200, 292, 303, 306,
677 319, 320, 304, 307, 264, 265, 293, 311, 337, 305,
678 308, 360, 312, 382, 313, 387, 314, 338, 413, 463,
680 438, 519, 489, 647, 646, 361, 439, 464, 345, 490,
681 645, 576, 644, 643, 642, 520, 577, 73, 73, 73,
682 79, 79, 79, 100, 100, 641, 640, 639, 638, 637,
683 636, 635, 634, 633, 632, 631, 630, 629, 628, 627,
684 626, 625, 624, 623, 622, 621, 620, 619, 618, 617,
685 616, 615, 614, 613, 612, 611, 610, 609, 608, 607,
686 606, 605, 604, 603, 602, 601, 600, 599, 598, 597,
687 596, 595, 594, 593, 592, 591, 590, 589, 588, 587,
688 586, 585, 584, 583, 582, 581, 580, 579, 578, 575,
689 574, 573, 572, 571, 570, 569, 568, 567, 566, 565,
691 564, 563, 562, 561, 560, 559, 558, 557, 556, 555,
692 554, 553, 552, 551, 550, 549, 548, 547, 546, 545,
693 544, 543, 542, 541, 540, 539, 538, 537, 536, 535,
694 534, 533, 532, 531, 530, 529, 528, 527, 526, 525,
695 524, 523, 522, 521, 518, 517, 516, 515, 514, 513,
696 512, 511, 510, 509, 508, 507, 506, 505, 504, 503,
697 502, 501, 500, 499, 498, 497, 496, 495, 494, 493,
698 492, 491, 488, 487, 486, 485, 484, 483, 482, 481,
699 480, 479, 478, 477, 476, 475, 474, 473, 472, 471,
700 470, 469, 468, 467, 466, 465, 462, 461, 460, 459,
702 458, 457, 456, 455, 454, 453, 452, 451, 450, 449,
703 448, 447, 446, 445, 444, 443, 442, 441, 440, 437,
704 436, 435, 434, 433, 432, 431, 430, 429, 428, 427,
705 426, 425, 424, 423, 422, 421, 420, 419, 418, 417,
706 416, 415, 414, 412, 411, 410, 409, 408, 407, 406,
707 405, 404, 403, 402, 401, 400, 399, 398, 397, 396,
708 395, 394, 393, 392, 391, 390, 389, 388, 387, 386,
709 385, 384, 383, 381, 380, 379, 378, 377, 376, 375,
710 374, 373, 372, 371, 370, 369, 368, 367, 366, 365,
711 364, 363, 362, 359, 358, 357, 356, 355, 352, 351,
713 350, 349, 348, 347, 346, 345, 344, 343, 342, 341,
714 340, 339, 336, 335, 334, 333, 332, 331, 330, 329,
715 328, 327, 326, 325, 324, 323, 322, 321, 318, 317,
716 316, 315, 310, 309, 302, 301, 300, 299, 298, 297,
717 296, 295, 294, 291, 290, 259, 289, 288, 287, 286,
718 285, 284, 283, 282, 281, 280, 279, 278, 277, 276,
719 275, 274, 273, 272, 271, 270, 269, 268, 267, 266,
720 263, 262, 261, 260, 259, 258, 257, 254, 253, 252,
721 251, 250, 249, 247, 243, 242, 241, 197, 238, 237,
722 235, 234, 225, 224, 221, 220, 216, 215, 214, 213,
724 212, 211, 208, 207, 206, 205, 204, 201, 199, 198,
725 197, 196, 193, 192, 189, 188, 187, 186, 185, 184,
726 183, 182, 179, 178, 175, 174, 171, 649, 649, 168,
727 167, 142, 135, 122, 102, 101, 97, 83, 72, 71,
728 649, 5, 649, 649, 649, 649, 649, 649, 649, 649,
729 649, 649, 649, 649, 649, 649, 649, 649, 649, 649,
730 649, 649, 649, 649, 649, 649, 649, 649, 649, 649,
731 649, 649, 649, 649, 649, 649, 649, 649, 649, 649,
732 649, 649, 649, 649, 649, 649, 649, 649, 649, 649,
733 649, 649, 649, 649, 649, 649, 649, 649, 649, 649,
738 static yyconst flex_int16_t yy_chk[805] =
740 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
741 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
742 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
743 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
744 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
745 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
746 1, 1, 3, 3, 3, 3, 3, 653, 3, 11,
747 3, 13, 11, 3, 3, 3, 3, 3, 14, 18,
748 3, 22, 20, 3, 14, 3, 22, 27, 27, 13,
749 29, 29, 18, 20, 142, 22, 11, 23, 142, 23,
751 23, 23, 23, 23, 24, 14, 24, 24, 24, 24,
752 24, 37, 38, 39, 41, 40, 43, 44, 37, 42,
753 51, 51, 38, 39, 41, 37, 43, 42, 38, 40,
754 46, 47, 48, 44, 49, 40, 46, 49, 23, 53,
755 647, 56, 47, 66, 49, 58, 47, 48, 48, 66,
756 48, 56, 58, 59, 61, 64, 56, 59, 62, 58,
757 60, 63, 60, 59, 61, 60, 62, 65, 64, 59,
758 60, 63, 67, 53, 64, 67, 68, 65, 67, 68,
759 79, 67, 73, 65, 74, 73, 79, 74, 133, 80,
760 160, 68, 68, 160, 68, 80, 91, 91, 91, 91,
762 91, 99, 99, 103, 117, 117, 106, 79, 133, 73,
763 103, 74, 106, 120, 120, 92, 80, 92, 92, 92,
764 92, 92, 93, 147, 93, 93, 93, 93, 93, 125,
765 125, 125, 125, 125, 127, 143, 144, 150, 179, 144,
766 147, 127, 143, 150, 151, 144, 152, 153, 164, 151,
767 156, 156, 152, 150, 150, 179, 153, 288, 166, 153,
768 188, 188, 164, 153, 288, 164, 166, 169, 169, 169,
769 169, 169, 200, 200, 200, 200, 200, 225, 236, 238,
770 247, 247, 236, 238, 225, 225, 225, 242, 269, 236,
771 238, 294, 242, 317, 242, 353, 242, 269, 353, 412,
773 380, 473, 442, 645, 643, 294, 380, 412, 317, 442,
774 642, 537, 640, 639, 638, 473, 537, 650, 650, 650,
775 651, 651, 651, 652, 652, 637, 634, 633, 632, 631,
776 629, 625, 624, 623, 621, 620, 619, 616, 610, 609,
777 608, 607, 606, 605, 604, 603, 602, 601, 600, 599,
778 598, 597, 596, 595, 594, 591, 589, 588, 587, 586,
779 584, 583, 582, 580, 577, 576, 574, 572, 571, 570,
780 568, 566, 564, 562, 561, 559, 556, 555, 554, 553,
781 552, 551, 549, 546, 545, 544, 542, 540, 538, 534,
782 533, 532, 531, 530, 529, 528, 527, 526, 525, 524,
784 522, 520, 519, 517, 516, 515, 514, 513, 512, 511,
785 510, 509, 508, 507, 506, 505, 504, 503, 502, 501,
786 500, 499, 496, 494, 493, 492, 491, 490, 489, 488,
787 487, 486, 485, 484, 483, 482, 481, 480, 479, 478,
788 477, 476, 475, 474, 472, 471, 470, 469, 468, 467,
789 466, 465, 464, 463, 462, 461, 460, 459, 458, 457,
790 456, 455, 454, 453, 451, 450, 449, 447, 446, 445,
791 444, 443, 441, 440, 439, 438, 437, 436, 435, 434,
792 433, 432, 430, 429, 427, 425, 424, 423, 422, 421,
793 420, 419, 418, 416, 414, 413, 410, 407, 406, 404,
795 402, 401, 400, 399, 397, 396, 395, 394, 393, 392,
796 390, 389, 387, 386, 385, 384, 383, 382, 381, 379,
797 378, 377, 376, 375, 374, 373, 372, 371, 370, 369,
798 368, 367, 365, 363, 362, 361, 360, 359, 358, 357,
799 356, 355, 354, 352, 350, 348, 347, 346, 345, 344,
800 343, 342, 341, 340, 339, 338, 337, 336, 335, 334,
801 333, 332, 331, 329, 328, 327, 326, 325, 324, 322,
802 320, 319, 318, 316, 315, 314, 313, 312, 311, 308,
803 307, 306, 305, 304, 303, 302, 301, 300, 299, 298,
804 297, 296, 295, 293, 292, 291, 290, 289, 287, 285,
806 284, 282, 281, 280, 279, 278, 277, 276, 275, 274,
807 273, 270, 268, 267, 266, 265, 264, 263, 262, 259,
808 258, 257, 256, 255, 253, 252, 249, 248, 246, 245,
809 244, 243, 241, 240, 235, 234, 233, 232, 231, 230,
810 229, 228, 227, 224, 223, 221, 220, 218, 217, 214,
811 213, 211, 210, 209, 208, 207, 206, 205, 204, 203,
812 202, 201, 199, 198, 196, 195, 193, 192, 190, 189,
813 187, 185, 184, 183, 182, 181, 180, 177, 176, 175,
814 173, 168, 167, 165, 163, 162, 161, 159, 158, 157,
815 155, 154, 149, 148, 146, 145, 141, 140, 137, 136,
817 135, 134, 132, 131, 130, 129, 128, 126, 124, 123,
818 122, 121, 119, 118, 115, 114, 113, 112, 111, 110,
819 109, 108, 105, 104, 102, 101, 95, 82, 76, 70,
820 69, 57, 50, 45, 36, 35, 28, 17, 10, 9,
821 5, 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,
824 649, 649, 649, 649, 649, 649, 649, 649, 649, 649,
825 649, 649, 649, 649, 649, 649, 649, 649, 649, 649,
826 649, 649, 649, 649, 649, 649, 649, 649, 649, 649,
831 static yy_state_type yy_last_accepting_state;
832 static char *yy_last_accepting_cpos;
834 extern int swf5_flex_debug;
835 int swf5_flex_debug = 0;
837 /* The intent behind this definition is that it'll catch
838 * any uses of REJECT which flex missed.
840 #define REJECT reject_used_but_not_detected
841 #define yymore() yymore_used_but_not_detected
842 #define YY_MORE_ADJ 0
843 #define YY_RESTORE_YY_MORE_OFFSET
845 #line 1 "swf5compiler.flex"
846 #line 2 "swf5compiler.flex"
853 #include "blocks/error.h"
854 #include "swf5compiler.tab.h" /* defines token types */
856 static int swf5debug;
858 static const char *lexBuffer = NULL;
859 static int lexBufferLen = 0;
861 static int sLineNumber = 0;
862 static char szLine[1024];
863 static char msgbufs[2][1024] = { {0}, {0} }, *msgline = {0};
864 static int column = 0;
866 static void comment();
867 static void comment1();
869 static void countline();
870 static void warning(char *msg);
872 #define YY_INPUT(buf,result,max_size) result=lexBufferInput(buf, max_size)
874 /* thanks to the prolific and brilliant Raff: */
875 static int lexBufferInput(char *buf, int max_size)
877 int l = lexBufferLen > max_size ? max_size : lexBufferLen;
879 if (lexBufferLen <= 0)
882 memcpy(buf, lexBuffer, l);
888 /* very inefficient method of unescaping strings */
889 static void unescape(char *buf)
893 for (p1=buf; (p=strchr(p1, '\\')) != 0; p1 = p+1) {
896 case 'b' : p[1] = '\b'; break;
897 case 'f' : p[1] = '\f'; break;
898 case 'n' : p[1] = '\n'; break;
899 case 'r' : p[1] = '\r'; break;
900 case 't' : p[1] = '\t'; break;
902 case 'u' : warning("unsupported escape sequence");
908 void swf5ParseInit(const char *script, int debug)
916 lexBufferLen = strlen(script);
919 msgline = msgbufs[0];
923 #line 82 "swf5compiler.flex"
924 // forward declaration needed by the following function
927 #define YY_PROTO(proto) proto
929 #define YY_PROTO(proto) ()
932 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
934 void do_unput5(const char c) { unput(c); }
935 #line 936 "lex.swf5.c"
940 #ifndef YY_NO_UNISTD_H
941 /* Special case for "unistd.h", since it is non-ANSI. We include it way
942 * down here because we want the user's section 1 to have been scanned first.
943 * The user has a chance to override it with an option.
948 #ifndef YY_EXTRA_TYPE
949 #define YY_EXTRA_TYPE void *
952 static int yy_init_globals (void );
954 /* Macros after this point can all be overridden by user definitions in
958 #ifndef YY_SKIP_YYWRAP
960 extern "C" int swf5wrap (void );
962 extern int swf5wrap (void );
966 static void yyunput (int c,char *buf_ptr );
969 static void yy_flex_strncpy (char *,yyconst char *,int );
972 #ifdef YY_NEED_STRLEN
973 static int yy_flex_strlen (yyconst char * );
979 static int yyinput (void );
981 static int input (void );
986 /* Amount of stuff to slurp up with each read. */
987 #ifndef YY_READ_BUF_SIZE
988 #define YY_READ_BUF_SIZE 8192
991 /* Copy whatever the last rule matched to the standard output. */
993 /* This used to be an fputs(), but since the string might contain NUL's,
994 * we now use fwrite().
996 #define ECHO (void) fwrite( swf5text, swf5leng, 1, swf5out )
999 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1000 * is returned in "result".
1003 #define YY_INPUT(buf,result,max_size) \
1004 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1008 for ( n = 0; n < max_size && \
1009 (c = getc( swf5in )) != EOF && c != '\n'; ++n ) \
1010 buf[n] = (char) c; \
1012 buf[n++] = (char) c; \
1013 if ( c == EOF && ferror( swf5in ) ) \
1014 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1020 while ( (result = fread(buf, 1, max_size, swf5in))==0 && ferror(swf5in)) \
1022 if( errno != EINTR) \
1024 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1035 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1036 * we don't want an extra ';' after the "return" because that will cause
1037 * some compilers to complain about unreachable statements.
1040 #define yyterminate() return YY_NULL
1043 /* Number of entries by which start-condition stack grows. */
1044 #ifndef YY_START_STACK_INCR
1045 #define YY_START_STACK_INCR 25
1048 /* Report a fatal error. */
1049 #ifndef YY_FATAL_ERROR
1050 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1053 /* end tables serialization structures and prototypes */
1055 /* Default declaration of generated scanner - a define so the user can
1056 * easily add parameters.
1059 #define YY_DECL_IS_OURS 1
1061 extern int swf5lex (void);
1063 #define YY_DECL int swf5lex (void)
1064 #endif /* !YY_DECL */
1066 /* Code executed at the beginning of each rule, after swf5text and swf5leng
1069 #ifndef YY_USER_ACTION
1070 #define YY_USER_ACTION
1073 /* Code executed at the end of each rule. */
1075 #define YY_BREAK break;
1078 #define YY_RULE_SETUP \
1081 /** The main scanner function which does all the work.
1085 register yy_state_type yy_current_state;
1086 register char *yy_cp, *yy_bp;
1087 register int yy_act;
1089 #line 98 "swf5compiler.flex"
1092 #line 1093 "lex.swf5.c"
1103 (yy_start) = 1; /* first start state */
1111 if ( ! YY_CURRENT_BUFFER ) {
1112 swf5ensure_buffer_stack ();
1113 YY_CURRENT_BUFFER_LVALUE =
1114 swf5_create_buffer(swf5in,YY_BUF_SIZE );
1117 swf5_load_buffer_state( );
1120 while ( 1 ) /* loops until end-of-file is reached */
1122 yy_cp = (yy_c_buf_p);
1124 /* Support of swf5text. */
1125 *yy_cp = (yy_hold_char);
1127 /* yy_bp points to the position in yy_ch_buf of the start of
1132 yy_current_state = (yy_start);
1136 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1137 if ( yy_accept[yy_current_state] )
1139 (yy_last_accepting_state) = yy_current_state;
1140 (yy_last_accepting_cpos) = yy_cp;
1142 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1144 yy_current_state = (int) yy_def[yy_current_state];
1145 if ( yy_current_state >= 650 )
1146 yy_c = yy_meta[(unsigned int) yy_c];
1148 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1151 while ( yy_base[yy_current_state] != 742 );
1154 yy_act = yy_accept[yy_current_state];
1156 { /* have to back up */
1157 yy_cp = (yy_last_accepting_cpos);
1158 yy_current_state = (yy_last_accepting_state);
1159 yy_act = yy_accept[yy_current_state];
1162 YY_DO_BEFORE_ACTION;
1164 do_action: /* This label is used only to access EOF actions. */
1167 { /* beginning of action switch */
1168 case 0: /* must back up */
1169 /* undo the effects of YY_DO_BEFORE_ACTION */
1170 *yy_cp = (yy_hold_char);
1171 yy_cp = (yy_last_accepting_cpos);
1172 yy_current_state = (yy_last_accepting_state);
1173 goto yy_find_action;
1177 #line 100 "swf5compiler.flex"
1178 { count(); swf5lval.intVal = strtoul(swf5text, NULL, 0);
1183 #line 102 "swf5compiler.flex"
1184 { count(); swf5lval.intVal = strtoul(swf5text, NULL, 0);
1189 #line 104 "swf5compiler.flex"
1190 { count(); swf5lval.intVal = atoi(swf5text);
1195 #line 106 "swf5compiler.flex"
1196 { count(); swf5lval.doubleVal = atof(swf5text);
1201 #line 108 "swf5compiler.flex"
1202 { count(); swf5lval.intVal = 1;
1207 #line 110 "swf5compiler.flex"
1208 { count(); swf5lval.intVal = 0;
1213 #line 112 "swf5compiler.flex"
1214 { count(); return NULLVAL; }
1218 #line 113 "swf5compiler.flex"
1219 { count(); return BREAK; }
1223 #line 114 "swf5compiler.flex"
1224 { count(); return CONTINUE; }
1228 #line 115 "swf5compiler.flex"
1229 { count(); return FUNCTION; }
1233 #line 116 "swf5compiler.flex"
1234 { count(); return ELSE; }
1238 #line 117 "swf5compiler.flex"
1239 { count(); return SWITCH; }
1243 #line 118 "swf5compiler.flex"
1244 { count(); return CASE; }
1248 #line 119 "swf5compiler.flex"
1249 { count(); return DEFAULT; }
1253 #line 120 "swf5compiler.flex"
1254 { count(); return FOR; }
1258 #line 121 "swf5compiler.flex"
1259 { count(); return IN; }
1263 #line 122 "swf5compiler.flex"
1264 { count(); return IF; }
1268 #line 123 "swf5compiler.flex"
1269 { count(); return WHILE; }
1273 #line 124 "swf5compiler.flex"
1274 { count(); return DO; }
1278 #line 125 "swf5compiler.flex"
1279 { count(); return VAR; }
1283 #line 126 "swf5compiler.flex"
1284 { count(); return NEW; }
1288 #line 127 "swf5compiler.flex"
1289 { count(); return DELETE; }
1293 #line 128 "swf5compiler.flex"
1294 { count(); return RETURN; }
1298 #line 129 "swf5compiler.flex"
1299 { count(); return WITH; }
1303 #line 130 "swf5compiler.flex"
1304 { count(); BEGIN(asm); return ASM; }
1308 #line 131 "swf5compiler.flex"
1309 { count(); return EVAL; }
1313 #line 132 "swf5compiler.flex"
1314 { count(); return TYPEOF; }
1318 #line 133 "swf5compiler.flex"
1319 { count(); return INSTANCEOF; }
1321 /* legacy functions */
1324 #line 136 "swf5compiler.flex"
1325 { count(); return RANDOM; }
1329 #line 137 "swf5compiler.flex"
1330 { count(); return GETTIMER; }
1334 #line 138 "swf5compiler.flex"
1335 { count(); return LENGTH; }
1339 #line 139 "swf5compiler.flex"
1340 { count(); return CONCAT; }
1344 #line 140 "swf5compiler.flex"
1345 { count(); return SUBSTR; }
1349 #line 141 "swf5compiler.flex"
1350 { count(); return TRACE; }
1354 #line 142 "swf5compiler.flex"
1355 { count(); return INT; }
1359 #line 143 "swf5compiler.flex"
1360 { count(); return ORD; }
1364 #line 144 "swf5compiler.flex"
1365 { count(); return CHR; }
1369 #line 145 "swf5compiler.flex"
1370 { count(); return GETURL; }
1374 #line 146 "swf5compiler.flex"
1375 { count(); return GETURL1; }
1379 #line 147 "swf5compiler.flex"
1380 { count(); return NEXTFRAME; }
1384 #line 148 "swf5compiler.flex"
1385 { count(); return PREVFRAME; }
1389 #line 149 "swf5compiler.flex"
1390 { count(); return PLAY; }
1394 #line 150 "swf5compiler.flex"
1395 { count(); return STOP; }
1399 #line 151 "swf5compiler.flex"
1400 { count(); return TOGGLEQUALITY; }
1404 #line 152 "swf5compiler.flex"
1405 { count(); return STOPSOUNDS; }
1409 #line 153 "swf5compiler.flex"
1410 { count(); return CALLFRAME; }
1414 #line 154 "swf5compiler.flex"
1415 { count(); return GOTOFRAME; }
1419 #line 155 "swf5compiler.flex"
1420 { count(); return SETTARGET; }
1424 #line 156 "swf5compiler.flex"
1425 { count(); return LOADVARIABLES; }
1429 #line 157 "swf5compiler.flex"
1430 { count(); return LOADMOVIE; }
1434 #line 158 "swf5compiler.flex"
1435 { count(); return LOADVARIABLESNUM; }
1439 #line 159 "swf5compiler.flex"
1440 { count(); return LOADMOVIENUM; }
1444 #line 160 "swf5compiler.flex"
1445 { count(); return DUPLICATEMOVIECLIP; }
1449 #line 161 "swf5compiler.flex"
1450 { count(); return REMOVEMOVIECLIP; }
1456 #line 165 "swf5compiler.flex"
1457 { count(); return DUP; }
1461 #line 166 "swf5compiler.flex"
1462 { count(); return SWAP; }
1466 #line 167 "swf5compiler.flex"
1467 { count(); return POP; }
1471 #line 168 "swf5compiler.flex"
1472 { count(); return PUSH; }
1476 #line 169 "swf5compiler.flex"
1477 { count(); return SETREGISTER; }
1481 #line 170 "swf5compiler.flex"
1482 { count(); return CALLFUNCTION; }
1486 #line 171 "swf5compiler.flex"
1487 { count(); return CALLMETHOD; }
1491 #line 172 "swf5compiler.flex"
1492 { count(); return AND; }
1496 #line 173 "swf5compiler.flex"
1497 { count(); return OR; }
1501 #line 174 "swf5compiler.flex"
1502 { count(); return XOR; }
1506 #line 175 "swf5compiler.flex"
1507 { count(); return MODULO; }
1511 #line 176 "swf5compiler.flex"
1512 { count(); return ADD; }
1516 #line 177 "swf5compiler.flex"
1517 { count(); return ADD; }
1521 #line 178 "swf5compiler.flex"
1522 { count(); return LESSTHAN; }
1526 #line 179 "swf5compiler.flex"
1527 { count(); return LESSTHAN; }
1531 #line 180 "swf5compiler.flex"
1532 { count(); return EQUALS; }
1536 #line 181 "swf5compiler.flex"
1537 { count(); return EQUALS; }
1541 #line 182 "swf5compiler.flex"
1542 { count(); return INC; }
1546 #line 183 "swf5compiler.flex"
1547 { count(); return DEC; }
1551 #line 184 "swf5compiler.flex"
1552 { count(); return ENUMERATE; }
1556 #line 185 "swf5compiler.flex"
1557 { count(); return INITOBJECT; }
1561 #line 186 "swf5compiler.flex"
1562 { count(); return INITARRAY; }
1566 #line 187 "swf5compiler.flex"
1567 { count(); return GETMEMBER; }
1571 #line 188 "swf5compiler.flex"
1572 { count(); return SETMEMBER; }
1576 #line 189 "swf5compiler.flex"
1577 { count(); return SHIFTLEFT; }
1581 #line 190 "swf5compiler.flex"
1582 { count(); return SHIFTRIGHT; }
1586 #line 191 "swf5compiler.flex"
1587 { count(); return SHIFTRIGHT2; }
1591 #line 192 "swf5compiler.flex"
1592 { count(); return VAREQUALS; }
1596 #line 193 "swf5compiler.flex"
1597 { count(); return OLDADD; }
1601 #line 194 "swf5compiler.flex"
1602 { count(); return SUBTRACT; }
1606 #line 195 "swf5compiler.flex"
1607 { count(); return MULTIPLY; }
1611 #line 196 "swf5compiler.flex"
1612 { count(); return DIVIDE; }
1616 #line 197 "swf5compiler.flex"
1617 { count(); return OLDEQUALS; }
1621 #line 198 "swf5compiler.flex"
1622 { count(); return OLDLESSTHAN; }
1626 #line 199 "swf5compiler.flex"
1627 { count(); return LOGICALAND; }
1631 #line 200 "swf5compiler.flex"
1632 { count(); return LOGICALOR; }
1636 #line 201 "swf5compiler.flex"
1637 { count(); return NOT; }
1641 #line 202 "swf5compiler.flex"
1642 { count(); return STRINGEQ; }
1646 #line 203 "swf5compiler.flex"
1647 { count(); return STRINGLENGTH; }
1651 #line 204 "swf5compiler.flex"
1652 { count(); return SUBSTRING; }
1656 #line 205 "swf5compiler.flex"
1657 { count(); return GETVARIABLE; }
1661 #line 206 "swf5compiler.flex"
1662 { count(); return SETVARIABLE; }
1666 #line 207 "swf5compiler.flex"
1667 { count(); return SETTARGETEXPRESSION; }
1671 #line 208 "swf5compiler.flex"
1672 { count(); return STARTDRAG; }
1676 #line 209 "swf5compiler.flex"
1677 { count(); return STOPDRAG; }
1681 #line 210 "swf5compiler.flex"
1682 { count(); return STRINGLESSTHAN; }
1686 #line 211 "swf5compiler.flex"
1687 { count(); return MBLENGTH; }
1691 #line 212 "swf5compiler.flex"
1692 { count(); return MBSUBSTRING; }
1696 #line 213 "swf5compiler.flex"
1697 { count(); return MBORD; }
1701 #line 214 "swf5compiler.flex"
1702 { count(); return MBCHR; }
1706 #line 215 "swf5compiler.flex"
1707 { count(); return BRANCHALWAYS; }
1711 #line 216 "swf5compiler.flex"
1712 { count(); return BRANCHALWAYS; }
1716 #line 217 "swf5compiler.flex"
1717 { count(); return BRANCHIFTRUE; }
1721 #line 218 "swf5compiler.flex"
1722 { count(); return POST; }
1726 #line 219 "swf5compiler.flex"
1727 { count(); return GET; }
1731 #line 220 "swf5compiler.flex"
1732 { count(); return END; }
1737 #line 223 "swf5compiler.flex"
1738 { count(); swf5lval.str = strdup(swf5text+2);
1743 #line 227 "swf5compiler.flex"
1744 { count(); swf5lval.str = strdup(swf5text);
1745 return IDENTIFIER; }
1748 /* rule 113 can match eol */
1750 #line 230 "swf5compiler.flex"
1751 { count(); swf5lval.str = strdup(swf5text+1);
1752 swf5lval.str[strlen(swf5lval.str)-1]=0;
1753 unescape(swf5lval.str);
1757 /* rule 114 can match eol */
1759 #line 235 "swf5compiler.flex"
1760 { count(); swf5lval.str = strdup(swf5text+1);
1761 swf5lval.str[strlen(swf5lval.str)-1]=0;
1762 unescape(swf5lval.str);
1766 /* rule 115 can match eol */
1767 *yy_cp = (yy_hold_char); /* undo effects of setting up swf5text */
1768 (yy_c_buf_p) = yy_cp -= 1;
1769 YY_DO_BEFORE_ACTION; /* set up swf5text again */
1771 #line 240 "swf5compiler.flex"
1772 { count(); swf5lval.str = strdup("");
1773 warning("Unterminated string!");
1777 /* rule 116 can match eol */
1778 *yy_cp = (yy_hold_char); /* undo effects of setting up swf5text */
1779 (yy_c_buf_p) = yy_cp -= 1;
1780 YY_DO_BEFORE_ACTION; /* set up swf5text again */
1782 #line 244 "swf5compiler.flex"
1783 { count(); swf5lval.str = strdup("");
1784 warning("Unterminated string!");
1789 #line 248 "swf5compiler.flex"
1790 { count(); comment(); }
1794 #line 249 "swf5compiler.flex"
1795 { count(); comment1(); }
1799 #line 250 "swf5compiler.flex"
1804 #line 252 "swf5compiler.flex"
1805 { count(); return INCR; }
1809 #line 253 "swf5compiler.flex"
1810 { count(); return DECR; }
1814 #line 254 "swf5compiler.flex"
1815 { count(); return LE; }
1819 #line 255 "swf5compiler.flex"
1820 { count(); return GE; }
1824 #line 256 "swf5compiler.flex"
1825 { count(); return EQ; }
1829 #line 257 "swf5compiler.flex"
1830 { count(); return NE; }
1834 #line 258 "swf5compiler.flex"
1835 { count(); return LAN; }
1839 #line 259 "swf5compiler.flex"
1840 { count(); return LOR; }
1844 #line 260 "swf5compiler.flex"
1845 { count(); return MEQ; }
1849 #line 261 "swf5compiler.flex"
1850 { count(); return DEQ; }
1854 #line 262 "swf5compiler.flex"
1855 { count(); return IEQ; }
1859 #line 263 "swf5compiler.flex"
1860 { count(); return SEQ; }
1864 #line 264 "swf5compiler.flex"
1865 { count(); return AEQ; }
1869 #line 265 "swf5compiler.flex"
1870 { count(); return OEQ; }
1874 #line 266 "swf5compiler.flex"
1875 { count(); return SHL; }
1879 #line 267 "swf5compiler.flex"
1880 { count(); return SHR; }
1884 #line 268 "swf5compiler.flex"
1885 { count(); return SHR2; }
1889 #line 269 "swf5compiler.flex"
1890 { count(); return SHLEQ; }
1894 #line 270 "swf5compiler.flex"
1895 { count(); return SHREQ; }
1899 #line 271 "swf5compiler.flex"
1900 { count(); return SHR2EQ; }
1904 #line 273 "swf5compiler.flex"
1905 { count(); return '<'; }
1909 #line 274 "swf5compiler.flex"
1910 { count(); return '>'; }
1914 #line 275 "swf5compiler.flex"
1915 { count(); return ';'; }
1919 #line 276 "swf5compiler.flex"
1920 { count(); return '='; }
1924 #line 277 "swf5compiler.flex"
1925 { count(); return '+'; }
1929 #line 278 "swf5compiler.flex"
1930 { count(); return '-'; }
1934 #line 279 "swf5compiler.flex"
1935 { count(); return '&'; }
1939 #line 280 "swf5compiler.flex"
1940 { count(); return '|'; }
1944 #line 281 "swf5compiler.flex"
1945 { count(); return '^'; }
1949 #line 282 "swf5compiler.flex"
1950 { count(); return '*'; }
1954 #line 283 "swf5compiler.flex"
1955 { count(); return '/'; }
1959 #line 284 "swf5compiler.flex"
1960 { count(); return '%'; }
1964 #line 285 "swf5compiler.flex"
1965 { count(); return '!'; }
1969 #line 286 "swf5compiler.flex"
1970 { count(); return '('; }
1974 #line 287 "swf5compiler.flex"
1975 { count(); return ')'; }
1979 #line 288 "swf5compiler.flex"
1980 { count(); return '['; }
1984 #line 289 "swf5compiler.flex"
1985 { count(); return ']'; }
1989 #line 290 "swf5compiler.flex"
1990 { count(); return '{'; }
1994 #line 291 "swf5compiler.flex"
1995 { count(); BEGIN(0); return '}'; }
1999 #line 292 "swf5compiler.flex"
2000 { count(); return ','; }
2004 #line 293 "swf5compiler.flex"
2005 { count(); return '.'; }
2009 #line 294 "swf5compiler.flex"
2010 { count(); return '?'; }
2014 #line 295 "swf5compiler.flex"
2015 { count(); return ':'; }
2019 #line 296 "swf5compiler.flex"
2020 { count(); return '~'; }
2023 /* rule 164 can match eol */
2025 #line 298 "swf5compiler.flex"
2026 { count(); strcpy(szLine, swf5text + 1);
2027 countline(); yyless(1); }
2031 #line 301 "swf5compiler.flex"
2032 SWF_error("Unrecognized character: %s\n", swf5text);
2036 #line 303 "swf5compiler.flex"
2039 #line 2040 "lex.swf5.c"
2040 case YY_STATE_EOF(INITIAL):
2041 case YY_STATE_EOF(asm):
2044 case YY_END_OF_BUFFER:
2046 /* Amount of text matched not including the EOB char. */
2047 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
2049 /* Undo the effects of YY_DO_BEFORE_ACTION. */
2050 *yy_cp = (yy_hold_char);
2051 YY_RESTORE_YY_MORE_OFFSET
2053 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
2055 /* We're scanning a new file or input source. It's
2056 * possible that this happened because the user
2057 * just pointed swf5in at a new source and called
2058 * swf5lex(). If so, then we have to assure
2059 * consistency between YY_CURRENT_BUFFER and our
2060 * globals. Here is the right place to do so, because
2061 * this is the first action (other than possibly a
2062 * back-up) that will match for the new input source.
2064 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2065 YY_CURRENT_BUFFER_LVALUE->yy_input_file = swf5in;
2066 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
2069 /* Note that here we test for yy_c_buf_p "<=" to the position
2070 * of the first EOB in the buffer, since yy_c_buf_p will
2071 * already have been incremented past the NUL character
2072 * (since all states make transitions on EOB to the
2073 * end-of-buffer state). Contrast this with the test
2076 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2077 { /* This was really a NUL. */
2078 yy_state_type yy_next_state;
2080 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
2082 yy_current_state = yy_get_previous_state( );
2084 /* Okay, we're now positioned to make the NUL
2085 * transition. We couldn't have
2086 * yy_get_previous_state() go ahead and do it
2087 * for us because it doesn't know how to deal
2088 * with the possibility of jamming (and we don't
2089 * want to build jamming into it because then it
2090 * will run more slowly).
2093 yy_next_state = yy_try_NUL_trans( yy_current_state );
2095 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2097 if ( yy_next_state )
2099 /* Consume the NUL. */
2100 yy_cp = ++(yy_c_buf_p);
2101 yy_current_state = yy_next_state;
2107 yy_cp = (yy_c_buf_p);
2108 goto yy_find_action;
2112 else switch ( yy_get_next_buffer( ) )
2114 case EOB_ACT_END_OF_FILE:
2116 (yy_did_buffer_switch_on_eof) = 0;
2120 /* Note: because we've taken care in
2121 * yy_get_next_buffer() to have set up
2122 * swf5text, we can now set up
2123 * yy_c_buf_p so that if some total
2124 * hoser (like flex itself) wants to
2125 * call the scanner after we return the
2126 * YY_NULL, it'll still work - another
2127 * YY_NULL will get returned.
2129 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
2131 yy_act = YY_STATE_EOF(YY_START);
2137 if ( ! (yy_did_buffer_switch_on_eof) )
2143 case EOB_ACT_CONTINUE_SCAN:
2145 (yytext_ptr) + yy_amount_of_matched_text;
2147 yy_current_state = yy_get_previous_state( );
2149 yy_cp = (yy_c_buf_p);
2150 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2153 case EOB_ACT_LAST_MATCH:
2155 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
2157 yy_current_state = yy_get_previous_state( );
2159 yy_cp = (yy_c_buf_p);
2160 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2161 goto yy_find_action;
2168 "fatal flex scanner internal error--no action found" );
2169 } /* end of action switch */
2170 } /* end of scanning one token */
2171 } /* end of swf5lex */
2173 /* yy_get_next_buffer - try to read in a new buffer
2175 * Returns a code representing an action:
2176 * EOB_ACT_LAST_MATCH -
2177 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2178 * EOB_ACT_END_OF_FILE - end of file
2180 static int yy_get_next_buffer (void)
2182 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
2183 register char *source = (yytext_ptr);
2184 register int number_to_move, i;
2187 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
2189 "fatal flex scanner internal error--end of buffer missed" );
2191 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
2192 { /* Don't try to fill the buffer, so this is an EOF. */
2193 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
2195 /* We matched a single character, the EOB, so
2196 * treat this as a final EOF.
2198 return EOB_ACT_END_OF_FILE;
2203 /* We matched some text prior to the EOB, first
2206 return EOB_ACT_LAST_MATCH;
2210 /* Try to read more data. */
2212 /* First move last chars to start of buffer. */
2213 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
2215 for ( i = 0; i < number_to_move; ++i )
2216 *(dest++) = *(source++);
2218 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2219 /* don't do the read, it's not guaranteed to return an EOF,
2222 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
2227 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
2229 while ( num_to_read <= 0 )
2230 { /* Not enough room in the buffer - grow it. */
2232 /* just a shorter name for the current buffer */
2233 YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
2235 int yy_c_buf_p_offset =
2236 (int) ((yy_c_buf_p) - b->yy_ch_buf);
2238 if ( b->yy_is_our_buffer )
2240 int new_size = b->yy_buf_size * 2;
2242 if ( new_size <= 0 )
2243 b->yy_buf_size += b->yy_buf_size / 8;
2245 b->yy_buf_size *= 2;
2247 b->yy_ch_buf = (char *)
2248 /* Include room in for 2 EOB chars. */
2249 swf5realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
2252 /* Can't grow it, we don't own it. */
2255 if ( ! b->yy_ch_buf )
2257 "fatal error - scanner input buffer overflow" );
2259 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
2261 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
2266 if ( num_to_read > YY_READ_BUF_SIZE )
2267 num_to_read = YY_READ_BUF_SIZE;
2269 /* Read in more data. */
2270 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2271 (yy_n_chars), num_to_read );
2273 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2276 if ( (yy_n_chars) == 0 )
2278 if ( number_to_move == YY_MORE_ADJ )
2280 ret_val = EOB_ACT_END_OF_FILE;
2281 swf5restart(swf5in );
2286 ret_val = EOB_ACT_LAST_MATCH;
2287 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
2288 YY_BUFFER_EOF_PENDING;
2293 ret_val = EOB_ACT_CONTINUE_SCAN;
2295 (yy_n_chars) += number_to_move;
2296 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
2297 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
2299 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
2304 /* yy_get_previous_state - get the state just before the EOB char was reached */
2306 static yy_state_type yy_get_previous_state (void)
2308 register yy_state_type yy_current_state;
2309 register char *yy_cp;
2311 yy_current_state = (yy_start);
2313 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
2315 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2316 if ( yy_accept[yy_current_state] )
2318 (yy_last_accepting_state) = yy_current_state;
2319 (yy_last_accepting_cpos) = yy_cp;
2321 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2323 yy_current_state = (int) yy_def[yy_current_state];
2324 if ( yy_current_state >= 650 )
2325 yy_c = yy_meta[(unsigned int) yy_c];
2327 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2330 return yy_current_state;
2333 /* yy_try_NUL_trans - try to make a transition on the NUL character
2336 * next_state = yy_try_NUL_trans( current_state );
2338 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
2340 register int yy_is_jam;
2341 register char *yy_cp = (yy_c_buf_p);
2343 register YY_CHAR yy_c = 1;
2344 if ( yy_accept[yy_current_state] )
2346 (yy_last_accepting_state) = yy_current_state;
2347 (yy_last_accepting_cpos) = yy_cp;
2349 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2351 yy_current_state = (int) yy_def[yy_current_state];
2352 if ( yy_current_state >= 650 )
2353 yy_c = yy_meta[(unsigned int) yy_c];
2355 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2356 yy_is_jam = (yy_current_state == 649);
2358 return yy_is_jam ? 0 : yy_current_state;
2361 static void yyunput (int c, register char * yy_bp )
2363 register char *yy_cp;
2365 yy_cp = (yy_c_buf_p);
2367 /* undo effects of setting up swf5text */
2368 *yy_cp = (yy_hold_char);
2370 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2371 { /* need to shift things up to make room */
2372 /* +2 for EOB chars. */
2373 register int number_to_move = (yy_n_chars) + 2;
2374 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
2375 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
2376 register char *source =
2377 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
2379 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2380 *--dest = *--source;
2382 yy_cp += (int) (dest - source);
2383 yy_bp += (int) (dest - source);
2384 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
2385 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
2387 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2388 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2391 *--yy_cp = (char) c;
2393 (yytext_ptr) = yy_bp;
2394 (yy_hold_char) = *yy_cp;
2395 (yy_c_buf_p) = yy_cp;
2400 static int yyinput (void)
2402 static int input (void)
2408 *(yy_c_buf_p) = (yy_hold_char);
2410 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
2412 /* yy_c_buf_p now points to the character we want to return.
2413 * If this occurs *before* the EOB characters, then it's a
2414 * valid NUL; if not, then we've hit the end of the buffer.
2416 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2417 /* This was really a NUL. */
2418 *(yy_c_buf_p) = '\0';
2421 { /* need more input */
2422 int offset = (yy_c_buf_p) - (yytext_ptr);
2425 switch ( yy_get_next_buffer( ) )
2427 case EOB_ACT_LAST_MATCH:
2428 /* This happens because yy_g_n_b()
2429 * sees that we've accumulated a
2430 * token and flags that we need to
2431 * try matching the token before
2432 * proceeding. But for input(),
2433 * there's no matching to consider.
2434 * So convert the EOB_ACT_LAST_MATCH
2435 * to EOB_ACT_END_OF_FILE.
2438 /* Reset buffer status. */
2439 swf5restart(swf5in );
2443 case EOB_ACT_END_OF_FILE:
2448 if ( ! (yy_did_buffer_switch_on_eof) )
2457 case EOB_ACT_CONTINUE_SCAN:
2458 (yy_c_buf_p) = (yytext_ptr) + offset;
2464 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
2465 *(yy_c_buf_p) = '\0'; /* preserve swf5text */
2466 (yy_hold_char) = *++(yy_c_buf_p);
2470 #endif /* ifndef YY_NO_INPUT */
2472 /** Immediately switch to a different input stream.
2473 * @param input_file A readable stream.
2475 * @note This function does not reset the start condition to @c INITIAL .
2477 void swf5restart (FILE * input_file )
2480 if ( ! YY_CURRENT_BUFFER ){
2481 swf5ensure_buffer_stack ();
2482 YY_CURRENT_BUFFER_LVALUE =
2483 swf5_create_buffer(swf5in,YY_BUF_SIZE );
2486 swf5_init_buffer(YY_CURRENT_BUFFER,input_file );
2487 swf5_load_buffer_state( );
2490 /** Switch to a different input buffer.
2491 * @param new_buffer The new input buffer.
2494 void swf5_switch_to_buffer (YY_BUFFER_STATE new_buffer )
2497 /* TODO. We should be able to replace this entire function body
2499 * swf5pop_buffer_state();
2500 * swf5push_buffer_state(new_buffer);
2502 swf5ensure_buffer_stack ();
2503 if ( YY_CURRENT_BUFFER == new_buffer )
2506 if ( YY_CURRENT_BUFFER )
2508 /* Flush out information for old buffer. */
2509 *(yy_c_buf_p) = (yy_hold_char);
2510 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2511 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2514 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2515 swf5_load_buffer_state( );
2517 /* We don't actually know whether we did this switch during
2518 * EOF (swf5wrap()) processing, but the only time this flag
2519 * is looked at is after swf5wrap() is called, so it's safe
2520 * to go ahead and always set it.
2522 (yy_did_buffer_switch_on_eof) = 1;
2525 static void swf5_load_buffer_state (void)
2527 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2528 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2529 swf5in = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2530 (yy_hold_char) = *(yy_c_buf_p);
2533 /** Allocate and initialize an input buffer state.
2534 * @param file A readable stream.
2535 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2537 * @return the allocated buffer state.
2539 YY_BUFFER_STATE swf5_create_buffer (FILE * file, int size )
2543 b = (YY_BUFFER_STATE) swf5alloc(sizeof( struct yy_buffer_state ) );
2545 YY_FATAL_ERROR( "out of dynamic memory in swf5_create_buffer()" );
2547 b->yy_buf_size = size;
2549 /* yy_ch_buf has to be 2 characters longer than the size given because
2550 * we need to put in 2 end-of-buffer characters.
2552 b->yy_ch_buf = (char *) swf5alloc(b->yy_buf_size + 2 );
2553 if ( ! b->yy_ch_buf )
2554 YY_FATAL_ERROR( "out of dynamic memory in swf5_create_buffer()" );
2556 b->yy_is_our_buffer = 1;
2558 swf5_init_buffer(b,file );
2563 /** Destroy the buffer.
2564 * @param b a buffer created with swf5_create_buffer()
2567 void swf5_delete_buffer (YY_BUFFER_STATE b )
2573 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2574 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
2576 if ( b->yy_is_our_buffer )
2577 swf5free((void *) b->yy_ch_buf );
2579 swf5free((void *) b );
2582 #ifndef _UNISTD_H /* assume unistd.h has isatty() for us */
2586 #ifdef __THROW /* this is a gnuism */
2587 extern int isatty (int ) __THROW;
2589 extern int isatty (int );
2596 /* Initializes or reinitializes a buffer.
2597 * This function is sometimes called more than once on the same buffer,
2598 * such as during a swf5restart() or at EOF.
2600 static void swf5_init_buffer (YY_BUFFER_STATE b, FILE * file )
2605 swf5_flush_buffer(b );
2607 b->yy_input_file = file;
2608 b->yy_fill_buffer = 1;
2610 /* If b is the current buffer, then swf5_init_buffer was _probably_
2611 * called from swf5restart() or through yy_get_next_buffer.
2612 * In that case, we don't want to reset the lineno or column.
2614 if (b != YY_CURRENT_BUFFER){
2615 b->yy_bs_lineno = 1;
2616 b->yy_bs_column = 0;
2619 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2624 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2625 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2628 void swf5_flush_buffer (YY_BUFFER_STATE b )
2635 /* We always need two end-of-buffer characters. The first causes
2636 * a transition to the end-of-buffer state. The second causes
2637 * a jam in that state.
2639 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2640 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2642 b->yy_buf_pos = &b->yy_ch_buf[0];
2645 b->yy_buffer_status = YY_BUFFER_NEW;
2647 if ( b == YY_CURRENT_BUFFER )
2648 swf5_load_buffer_state( );
2651 /** Pushes the new state onto the stack. The new state becomes
2652 * the current state. This function will allocate the stack
2654 * @param new_buffer The new state.
2657 void swf5push_buffer_state (YY_BUFFER_STATE new_buffer )
2659 if (new_buffer == NULL)
2662 swf5ensure_buffer_stack();
2664 /* This block is copied from swf5_switch_to_buffer. */
2665 if ( YY_CURRENT_BUFFER )
2667 /* Flush out information for old buffer. */
2668 *(yy_c_buf_p) = (yy_hold_char);
2669 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2670 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2673 /* Only push if top exists. Otherwise, replace top. */
2674 if (YY_CURRENT_BUFFER)
2675 (yy_buffer_stack_top)++;
2676 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2678 /* copied from swf5_switch_to_buffer. */
2679 swf5_load_buffer_state( );
2680 (yy_did_buffer_switch_on_eof) = 1;
2683 /** Removes and deletes the top of the stack, if present.
2684 * The next element becomes the new top.
2687 void swf5pop_buffer_state (void)
2689 if (!YY_CURRENT_BUFFER)
2692 swf5_delete_buffer(YY_CURRENT_BUFFER );
2693 YY_CURRENT_BUFFER_LVALUE = NULL;
2694 if ((yy_buffer_stack_top) > 0)
2695 --(yy_buffer_stack_top);
2697 if (YY_CURRENT_BUFFER) {
2698 swf5_load_buffer_state( );
2699 (yy_did_buffer_switch_on_eof) = 1;
2703 /* Allocates the stack if it does not exist.
2704 * Guarantees space for at least one push.
2706 static void swf5ensure_buffer_stack (void)
2710 if (!(yy_buffer_stack)) {
2712 /* First allocation is just for 2 elements, since we don't know if this
2713 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2714 * immediate realloc on the next call.
2717 (yy_buffer_stack) = (struct yy_buffer_state**)swf5alloc
2718 (num_to_alloc * sizeof(struct yy_buffer_state*)
2721 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2723 (yy_buffer_stack_max) = num_to_alloc;
2724 (yy_buffer_stack_top) = 0;
2728 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
2730 /* Increase the buffer to prepare for a possible push. */
2731 int grow_size = 8 /* arbitrary grow size */;
2733 num_to_alloc = (yy_buffer_stack_max) + grow_size;
2734 (yy_buffer_stack) = (struct yy_buffer_state**)swf5realloc
2736 num_to_alloc * sizeof(struct yy_buffer_state*)
2739 /* zero only the new slots.*/
2740 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
2741 (yy_buffer_stack_max) = num_to_alloc;
2745 /** Setup the input buffer state to scan directly from a user-specified character buffer.
2746 * @param base the character buffer
2747 * @param size the size in bytes of the character buffer
2749 * @return the newly allocated buffer state object.
2751 YY_BUFFER_STATE swf5_scan_buffer (char * base, yy_size_t size )
2756 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2757 base[size-1] != YY_END_OF_BUFFER_CHAR )
2758 /* They forgot to leave room for the EOB's. */
2761 b = (YY_BUFFER_STATE) swf5alloc(sizeof( struct yy_buffer_state ) );
2763 YY_FATAL_ERROR( "out of dynamic memory in swf5_scan_buffer()" );
2765 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2766 b->yy_buf_pos = b->yy_ch_buf = base;
2767 b->yy_is_our_buffer = 0;
2768 b->yy_input_file = 0;
2769 b->yy_n_chars = b->yy_buf_size;
2770 b->yy_is_interactive = 0;
2772 b->yy_fill_buffer = 0;
2773 b->yy_buffer_status = YY_BUFFER_NEW;
2775 swf5_switch_to_buffer(b );
2780 /** Setup the input buffer state to scan a string. The next call to swf5lex() will
2781 * scan from a @e copy of @a str.
2782 * @param str a NUL-terminated string to scan
2784 * @return the newly allocated buffer state object.
2785 * @note If you want to scan bytes that may contain NUL values, then use
2786 * swf5_scan_bytes() instead.
2788 YY_BUFFER_STATE swf5_scan_string (yyconst char * yystr )
2791 return swf5_scan_bytes(yystr,strlen(yystr) );
2794 /** Setup the input buffer state to scan the given bytes. The next call to swf5lex() will
2795 * scan from a @e copy of @a bytes.
2796 * @param bytes the byte buffer to scan
2797 * @param len the number of bytes in the buffer pointed to by @a bytes.
2799 * @return the newly allocated buffer state object.
2801 YY_BUFFER_STATE swf5_scan_bytes (yyconst char * yybytes, int _yybytes_len )
2808 /* Get memory for full buffer, including space for trailing EOB's. */
2809 n = _yybytes_len + 2;
2810 buf = (char *) swf5alloc(n );
2812 YY_FATAL_ERROR( "out of dynamic memory in swf5_scan_bytes()" );
2814 for ( i = 0; i < _yybytes_len; ++i )
2815 buf[i] = yybytes[i];
2817 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2819 b = swf5_scan_buffer(buf,n );
2821 YY_FATAL_ERROR( "bad buffer in swf5_scan_bytes()" );
2823 /* It's okay to grow etc. this buffer, and we should throw it
2824 * away when we're done.
2826 b->yy_is_our_buffer = 1;
2831 #ifndef YY_EXIT_FAILURE
2832 #define YY_EXIT_FAILURE 2
2835 static void yy_fatal_error (yyconst char* msg )
2837 (void) fprintf( stderr, "%s\n", msg );
2838 exit( YY_EXIT_FAILURE );
2841 /* Redefine yyless() so it works in section 3 code. */
2847 /* Undo effects of setting up swf5text. */ \
2848 int yyless_macro_arg = (n); \
2849 YY_LESS_LINENO(yyless_macro_arg);\
2850 swf5text[swf5leng] = (yy_hold_char); \
2851 (yy_c_buf_p) = swf5text + yyless_macro_arg; \
2852 (yy_hold_char) = *(yy_c_buf_p); \
2853 *(yy_c_buf_p) = '\0'; \
2854 swf5leng = yyless_macro_arg; \
2858 /* Accessor methods (get/set functions) to struct members. */
2860 /** Get the current line number.
2863 int swf5get_lineno (void)
2869 /** Get the input stream.
2872 FILE *swf5get_in (void)
2877 /** Get the output stream.
2880 FILE *swf5get_out (void)
2885 /** Get the length of the current token.
2888 int swf5get_leng (void)
2893 /** Get the current token.
2897 char *swf5get_text (void)
2902 /** Set the current line number.
2903 * @param line_number
2906 void swf5set_lineno (int line_number )
2909 swf5lineno = line_number;
2912 /** Set the input stream. This does not discard the current
2914 * @param in_str A readable stream.
2916 * @see swf5_switch_to_buffer
2918 void swf5set_in (FILE * in_str )
2923 void swf5set_out (FILE * out_str )
2928 int swf5get_debug (void)
2930 return swf5_flex_debug;
2933 void swf5set_debug (int bdebug )
2935 swf5_flex_debug = bdebug ;
2938 static int yy_init_globals (void)
2940 /* Initialization is the same as for the non-reentrant scanner.
2941 * This function is called from swf5lex_destroy(), so don't allocate here.
2944 (yy_buffer_stack) = 0;
2945 (yy_buffer_stack_top) = 0;
2946 (yy_buffer_stack_max) = 0;
2947 (yy_c_buf_p) = (char *) 0;
2951 /* Defined in main.c */
2956 swf5in = (FILE *) 0;
2957 swf5out = (FILE *) 0;
2960 /* For future reference: Set errno on error, since we are called by
2966 /* swf5lex_destroy is for both reentrant and non-reentrant scanners. */
2967 int swf5lex_destroy (void)
2970 /* Pop the buffer stack, destroying each element. */
2971 while(YY_CURRENT_BUFFER){
2972 swf5_delete_buffer(YY_CURRENT_BUFFER );
2973 YY_CURRENT_BUFFER_LVALUE = NULL;
2974 swf5pop_buffer_state();
2977 /* Destroy the stack itself. */
2978 swf5free((yy_buffer_stack) );
2979 (yy_buffer_stack) = NULL;
2981 /* Reset the globals. This is important in a non-reentrant scanner so the next time
2982 * swf5lex() is called, initialization will occur. */
2989 * Internal utility routines.
2993 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
2996 for ( i = 0; i < n; ++i )
3001 #ifdef YY_NEED_STRLEN
3002 static int yy_flex_strlen (yyconst char * s )
3005 for ( n = 0; s[n]; ++n )
3012 void *swf5alloc (yy_size_t size )
3014 return (void *) malloc( size );
3017 void *swf5realloc (void * ptr, yy_size_t size )
3019 /* The cast to (char *) in the following accommodates both
3020 * implementations that use char* generic pointers, and those
3021 * that use void* generic pointers. It works with the latter
3022 * because both ANSI C and C++ allow castless assignment from
3023 * any pointer type to void*, and deal with argument conversions
3024 * as though doing an assignment.
3026 return (void *) realloc( (char *) ptr, size );
3029 void swf5free (void * ptr )
3031 free( (char *) ptr ); /* see swf5realloc() for (char *) cast */
3034 #define YYTABLES_NAME "yytables"
3036 #line 303 "swf5compiler.flex"
3039 static int getinput() {
3052 static void countline()
3054 if(sLineNumber != 0)
3055 msgline[column] = 0;
3059 msgline = msgbufs[sLineNumber & 1];
3062 static int LineNumber(void)
3064 return (sLineNumber + 1);
3067 static int ColumnNumber(void)
3072 static char *LineText(void)
3074 msgline[column] = 0;
3078 static void comment()
3080 // Handle block comments
3085 // We have the start of a comment so look skip everything up to the
3086 // end of the comment character
3087 while ((c = getinput()) != '*' && c != EOF)
3090 msgline[column] = c;
3094 // keep the line number in synch
3097 // start the output (matches the algorithim in the lexx above)
3101 if (swf5debug) putchar(c);
3104 // is this the end of comment character
3105 if ((c1 = getinput()) != '/' && c != EOF)
3107 // false start as this was no end of comment
3112 // write out the start of the end of comment
3114 if (swf5debug) putchar(c);
3116 // write out the end of the end of comment
3118 if (swf5debug) putchar(c1);
3121 static void comment1()
3123 // Handle comment of type 1 (ie '//')
3127 // this is a line comment
3128 while ((c = getinput()) != '\n' && c != EOF)
3130 if (swf5debug) putchar(c);
3133 msgline[column] = c;
3138 // keep the line number in synch
3141 if (swf5debug) putchar(c);
3147 static void count(void)
3151 // Count the characters to maintain the current column position
3152 if (swf5text[0] == '\n')
3154 if (swf5debug) printf("\n");
3158 if (swf5debug) printf("%s", swf5text);
3160 for(n=0; n<swf5leng; ++n, ++column)
3163 msgline[column] = swf5text[n];
3166 //-- keep writing the stuff to standard output
3167 //column += swf5leng;
3171 static void printprog()
3174 SWF_warn("\n%s", msgbufs[(sLineNumber-1)&1]);
3177 msgline[column] = 0;
3179 SWF_warn("\n%s", msgline);
3182 static void warning(char *msg)
3184 // print a warning message
3186 SWF_warn("\n%*s", ColumnNumber(), "^");
3187 SWF_warn("\nLine %4.4d: Reason: '%s' \n", LineNumber(), msg);
3190 void swf5error(char *msg)
3193 if(strlen(swf5text))
3195 SWF_error("\n%s\n%*s\nLine %i: Reason: '%s'\n",
3196 LineText(), ColumnNumber(), "^", LineNumber(), msg);
3200 SWF_error("\nLine %d: Reason: 'Unexpected EOF found while looking for input.'\n", LineNumber());