1 #define yy_create_buffer swf5_create_buffer
2 #define yy_delete_buffer swf5_delete_buffer
3 #define yy_scan_buffer swf5_scan_buffer
4 #define yy_scan_string swf5_scan_string
5 #define yy_scan_bytes swf5_scan_bytes
6 #define yy_flex_debug swf5_flex_debug
7 #define yy_init_buffer swf5_init_buffer
8 #define yy_flush_buffer swf5_flush_buffer
9 #define yy_load_buffer_state swf5_load_buffer_state
10 #define yy_switch_to_buffer swf5_switch_to_buffer
12 #define yyleng swf5leng
15 #define yyrestart swf5restart
16 #define yytext swf5text
17 #define yywrap swf5wrap
19 /* A lexical scanner generated by flex */
21 /* Scanner skeleton version:
22 * $Header: /cvsroot/swftools/swftools/lib/action/lex.swf5.c,v 1.1 2008/05/24 17:09:56 kramm Exp $
26 #define YY_FLEX_MAJOR_VERSION 2
27 #define YY_FLEX_MINOR_VERSION 5
33 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
45 /* Use prototypes in function declarations. */
48 /* The "const" storage-class-modifier is valid. */
51 #else /* ! __cplusplus */
59 #endif /* ! __cplusplus */
78 #define YY_PROTO(proto) proto
80 #define YY_PROTO(proto) ()
83 /* Returned upon end-of-file. */
86 /* Promotes a possibly negative, possibly signed char to an unsigned
87 * integer for use as an array index. If the signed char is negative,
88 * we want to instead treat it as an 8-bit unsigned char, hence the
91 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
93 /* Enter a start condition. This macro really ought to take a parameter,
94 * but we do it the disgusting crufty way forced on us by the ()-less
95 * definition of BEGIN.
97 #define BEGIN yy_start = 1 + 2 *
99 /* Translate the current start state into a value that can be later handed
100 * to BEGIN to return to the state. The YYSTATE alias is for lex
103 #define YY_START ((yy_start - 1) / 2)
104 #define YYSTATE YY_START
106 /* Action number for EOF rule of a given start state. */
107 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
109 /* Special action meaning "start processing a new file". */
110 #define YY_NEW_FILE yyrestart( yyin )
112 #define YY_END_OF_BUFFER_CHAR 0
114 /* Size of default input buffer. */
115 #define YY_BUF_SIZE 16384
117 typedef struct yy_buffer_state *YY_BUFFER_STATE;
120 extern FILE *yyin, *yyout;
122 #define EOB_ACT_CONTINUE_SCAN 0
123 #define EOB_ACT_END_OF_FILE 1
124 #define EOB_ACT_LAST_MATCH 2
126 /* The funky do-while in the following #define is used to turn the definition
127 * int a single C statement (which needs a semi-colon terminator). This
128 * avoids problems with code like:
130 * if ( condition_holds )
133 * do_something_else();
135 * Prior to using the do-while the compiler would get upset at the
136 * "else" because it interpreted the "if" statement as being all
137 * done when it reached the ';' after the yyless() call.
140 /* Return all but the first 'n' matched characters back to the input stream. */
145 /* Undo effects of setting up yytext. */ \
146 *yy_cp = yy_hold_char; \
147 YY_RESTORE_YY_MORE_OFFSET \
148 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
149 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
153 #define unput(c) yyunput( c, yytext_ptr )
155 /* The following is because we cannot portably get our hands on size_t
156 * (without autoconf's help, which isn't available because we want
157 * flex-generated scanners to compile on their own).
159 typedef unsigned int yy_size_t;
162 struct yy_buffer_state
166 char *yy_ch_buf; /* input buffer */
167 char *yy_buf_pos; /* current position in input buffer */
169 /* Size of input buffer in bytes, not including room for EOB
172 yy_size_t yy_buf_size;
174 /* Number of characters read into yy_ch_buf, not including EOB
179 /* Whether we "own" the buffer - i.e., we know we created it,
180 * and can realloc() it to grow it, and should free() it to
183 int yy_is_our_buffer;
185 /* Whether this is an "interactive" input source; if so, and
186 * if we're using stdio for input, then we want to use getc()
187 * instead of fread(), to make sure we stop fetching input after
190 int yy_is_interactive;
192 /* Whether we're considered to be at the beginning of a line.
193 * If so, '^' rules will be active on the next match, otherwise
198 /* Whether to try to fill the input buffer when we reach the
203 int yy_buffer_status;
204 #define YY_BUFFER_NEW 0
205 #define YY_BUFFER_NORMAL 1
206 /* When an EOF's been seen but there's still some text to process
207 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
208 * shouldn't try reading from the input source any more. We might
209 * still have a bunch of tokens to match, though, because of
210 * possible backing-up.
212 * When we actually see the EOF, we change the status to "new"
213 * (via yyrestart()), so that the user can continue scanning by
214 * just pointing yyin at a new input file.
216 #define YY_BUFFER_EOF_PENDING 2
219 static YY_BUFFER_STATE yy_current_buffer = 0;
221 /* We provide macros for accessing buffer states in case in the
222 * future we want to put the buffer states in a more general
225 #define YY_CURRENT_BUFFER yy_current_buffer
228 /* yy_hold_char holds the character lost when yytext is formed. */
229 static char yy_hold_char;
231 static int yy_n_chars; /* number of characters read into yy_ch_buf */
236 /* Points to current character in buffer. */
237 static char *yy_c_buf_p = (char *) 0;
238 static int yy_init = 1; /* whether we need to initialize */
239 static int yy_start = 0; /* start state number */
241 /* Flag which is used to allow yywrap()'s to do buffer switches
242 * instead of setting up a fresh yyin. A bit of a hack ...
244 static int yy_did_buffer_switch_on_eof;
246 void yyrestart YY_PROTO(( FILE *input_file ));
248 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
249 void yy_load_buffer_state YY_PROTO(( void ));
250 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
251 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
252 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
253 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
254 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
256 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
257 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
258 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
260 static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
261 static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
262 static void yy_flex_free YY_PROTO(( void * ));
264 #define yy_new_buffer yy_create_buffer
266 #define yy_set_interactive(is_interactive) \
268 if ( ! yy_current_buffer ) \
269 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
270 yy_current_buffer->yy_is_interactive = is_interactive; \
273 #define yy_set_bol(at_bol) \
275 if ( ! yy_current_buffer ) \
276 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
277 yy_current_buffer->yy_at_bol = at_bol; \
280 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
282 typedef unsigned char YY_CHAR;
283 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
284 typedef int yy_state_type;
286 #define yytext_ptr yytext
288 static yy_state_type yy_get_previous_state YY_PROTO(( void ));
289 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
290 static int yy_get_next_buffer YY_PROTO(( void ));
291 static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
293 /* Done after the current pattern has been matched and before the
294 * corresponding action - sets up yytext.
296 #define YY_DO_BEFORE_ACTION \
297 yytext_ptr = yy_bp; \
298 yyleng = (int) (yy_cp - yy_bp); \
299 yy_hold_char = *yy_cp; \
303 #define YY_NUM_RULES 166
304 #define YY_END_OF_BUFFER 167
305 static yyconst short int yy_accept[650] =
307 0, 0, 0, 0, 167, 165, 119, 164, 165, 152,
308 165, 151, 146, 165, 153, 154, 149, 144, 159, 145,
309 160, 150, 3, 3, 162, 142, 140, 143, 141, 161,
310 155, 156, 148, 112, 112, 112, 112, 112, 112, 112,
311 112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
312 112, 157, 147, 158, 163, 112, 112, 112, 112, 112,
313 112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
314 164, 125, 0, 115, 113, 0, 126, 132, 0, 116,
315 114, 0, 128, 120, 130, 121, 131, 117, 118, 129,
316 4, 2, 3, 0, 134, 122, 124, 123, 135, 112,
318 112, 112, 112, 112, 112, 112, 19, 112, 112, 112,
319 112, 112, 112, 112, 112, 17, 16, 112, 112, 112,
320 112, 112, 112, 112, 0, 112, 112, 112, 112, 112,
321 112, 112, 112, 112, 112, 112, 112, 133, 127, 112,
322 112, 112, 112, 112, 112, 112, 112, 112, 112, 16,
323 112, 112, 112, 112, 112, 112, 112, 112, 63, 112,
324 112, 112, 112, 112, 112, 112, 112, 112, 4, 1,
325 137, 138, 136, 25, 112, 112, 112, 37, 112, 112,
326 112, 112, 112, 112, 112, 15, 112, 112, 112, 112,
327 35, 112, 112, 21, 112, 112, 36, 112, 112, 111,
329 112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
330 112, 20, 112, 112, 66, 62, 112, 112, 73, 112,
331 55, 110, 112, 112, 109, 72, 112, 112, 112, 112,
332 112, 112, 112, 112, 112, 21, 91, 112, 57, 112,
333 112, 112, 112, 112, 112, 112, 112, 112, 20, 64,
334 139, 112, 112, 13, 112, 112, 112, 112, 112, 11,
335 26, 112, 112, 112, 112, 112, 112, 112, 112, 112,
336 7, 42, 112, 112, 112, 112, 112, 43, 112, 112,
337 112, 112, 5, 112, 112, 24, 112, 112, 112, 112,
338 112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
340 112, 112, 112, 112, 112, 112, 112, 112, 108, 58,
341 112, 112, 112, 112, 112, 112, 43, 112, 112, 112,
342 56, 112, 8, 112, 112, 112, 112, 112, 112, 6,
343 112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
344 112, 112, 112, 112, 112, 112, 112, 112, 34, 112,
345 18, 112, 112, 112, 112, 112, 112, 112, 112, 112,
346 112, 112, 112, 104, 112, 103, 112, 112, 112, 112,
347 112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
348 112, 112, 112, 112, 112, 112, 112, 32, 112, 112,
349 22, 112, 112, 112, 38, 112, 112, 31, 112, 112,
351 112, 112, 29, 112, 23, 112, 112, 33, 12, 112,
352 27, 105, 112, 112, 86, 112, 70, 112, 112, 112,
353 112, 112, 112, 112, 112, 65, 112, 67, 112, 112,
354 83, 112, 112, 112, 112, 112, 112, 112, 112, 112,
355 112, 112, 33, 112, 112, 112, 112, 14, 112, 112,
356 112, 39, 112, 112, 112, 112, 112, 112, 112, 112,
357 112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
358 112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
359 112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
360 112, 112, 112, 112, 9, 112, 10, 30, 112, 112,
362 112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
363 112, 112, 112, 112, 112, 112, 112, 68, 112, 112,
364 101, 112, 85, 112, 112, 112, 112, 112, 112, 112,
365 112, 112, 112, 112, 99, 92, 112, 112, 84, 112,
366 46, 112, 47, 112, 50, 112, 40, 41, 112, 48,
367 112, 112, 112, 112, 112, 112, 74, 77, 112, 76,
368 112, 112, 90, 112, 71, 112, 87, 112, 78, 112,
369 48, 112, 79, 112, 98, 112, 112, 94, 82, 112,
370 28, 112, 112, 112, 45, 112, 112, 112, 112, 61,
371 112, 75, 89, 112, 112, 112, 112, 112, 112, 80,
373 112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
374 95, 102, 69, 88, 59, 112, 96, 81, 112, 112,
375 112, 52, 112, 112, 112, 106, 107, 60, 112, 93,
376 112, 112, 49, 112, 44, 97, 112, 112, 112, 112,
377 100, 112, 112, 54, 112, 51, 112, 53, 0
380 static yyconst int yy_ec[256] =
382 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
383 2, 2, 4, 1, 1, 1, 1, 1, 1, 1,
384 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
385 1, 2, 5, 6, 1, 1, 7, 8, 9, 10,
386 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
387 21, 21, 21, 21, 21, 22, 22, 23, 24, 25,
388 26, 27, 28, 1, 34, 35, 36, 37, 38, 39,
389 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
390 50, 51, 52, 53, 54, 55, 56, 57, 58, 33,
391 29, 30, 31, 32, 33, 1, 34, 35, 36, 37,
393 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
394 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
395 58, 33, 59, 60, 61, 62, 1, 1, 1, 1,
396 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
397 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
398 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
399 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
400 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
401 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
402 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
404 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
405 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
406 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
407 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
408 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
412 static yyconst int yy_meta[63] =
414 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
415 1, 1, 1, 1, 1, 1, 1, 2, 2, 2,
416 2, 2, 1, 1, 1, 1, 1, 1, 1, 1,
417 1, 1, 3, 2, 2, 2, 2, 2, 2, 3,
418 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
419 3, 3, 3, 3, 3, 3, 3, 3, 1, 1,
423 static yyconst short int yy_base[654] =
425 0, 0, 29, 0, 741, 742, 742, 742, 737, 713,
426 67, 742, 64, 76, 742, 742, 712, 67, 742, 68,
427 742, 70, 82, 89, 742, 742, 63, 711, 65, 742,
428 742, 742, 742, 0, 684, 684, 78, 75, 69, 82,
429 77, 81, 79, 80, 683, 86, 109, 95, 87, 699,
430 80, 742, 114, 742, 742, 105, 681, 112, 116, 116,
431 117, 120, 124, 121, 130, 99, 128, 139, 697, 682,
432 742, 742, 180, 182, 742, 726, 742, 742, 178, 187,
433 742, 725, 742, 742, 742, 742, 742, 742, 742, 742,
434 179, 200, 207, 0, 701, 742, 742, 742, 176, 0,
436 680, 687, 159, 673, 676, 168, 0, 673, 669, 686,
437 674, 667, 670, 663, 662, 0, 153, 667, 679, 158,
438 667, 674, 676, 671, 212, 661, 189, 654, 658, 670,
439 662, 663, 155, 653, 650, 658, 646, 742, 742, 661,
440 660, 61, 191, 201, 641, 646, 187, 640, 640, 202,
441 198, 213, 212, 655, 646, 195, 637, 652, 651, 142,
442 635, 633, 643, 215, 649, 225, 632, 631, 250, 0,
443 742, 742, 655, 0, 646, 634, 640, 0, 203, 643,
444 638, 630, 636, 628, 620, 0, 635, 208, 622, 616,
445 0, 628, 630, 0, 613, 620, 0, 606, 608, 255,
447 625, 613, 606, 606, 609, 605, 603, 615, 618, 615,
448 614, 0, 606, 609, 0, 0, 602, 603, 0, 605,
449 601, 0, 599, 610, 232, 0, 590, 590, 599, 599,
450 601, 587, 583, 582, 582, 245, 0, 246, 0, 581,
451 592, 242, 593, 580, 581, 587, 229, 579, 589, 0,
452 742, 582, 586, 0, 590, 581, 568, 568, 578, 0,
453 0, 581, 565, 575, 565, 576, 580, 560, 243, 573,
454 0, 0, 572, 562, 554, 557, 573, 554, 552, 568,
455 558, 564, 0, 553, 562, 0, 563, 219, 561, 559,
456 551, 557, 560, 258, 540, 556, 540, 543, 552, 553,
458 542, 544, 548, 534, 545, 545, 531, 542, 0, 0,
459 541, 540, 543, 542, 522, 521, 257, 526, 519, 520,
460 0, 520, 0, 518, 515, 520, 521, 527, 528, 0,
461 521, 516, 516, 509, 512, 517, 509, 522, 504, 503,
462 507, 514, 504, 499, 501, 497, 506, 508, 0, 506,
463 0, 503, 245, 505, 504, 490, 488, 493, 487, 486,
464 501, 494, 500, 0, 493, 0, 480, 483, 481, 492,
465 474, 475, 489, 471, 472, 477, 482, 470, 469, 256,
466 482, 467, 477, 465, 481, 460, 479, 0, 458, 458,
467 0, 476, 461, 470, 488, 472, 469, 0, 449, 452,
469 468, 467, 0, 454, 0, 459, 444, 0, 0, 447,
470 0, 266, 449, 442, 0, 460, 0, 458, 450, 440,
471 447, 455, 443, 434, 433, 0, 440, 0, 450, 431,
472 0, 448, 429, 445, 437, 438, 435, 438, 433, 423,
473 439, 265, 430, 435, 436, 423, 430, 0, 414, 419,
474 414, 0, 418, 425, 420, 419, 414, 413, 410, 419,
475 409, 401, 409, 414, 416, 410, 397, 411, 414, 413,
476 408, 398, 268, 403, 392, 384, 396, 387, 394, 385,
477 399, 384, 397, 400, 394, 392, 397, 390, 379, 390,
478 380, 373, 380, 386, 0, 385, 0, 0, 384, 373,
480 382, 385, 380, 379, 361, 362, 377, 379, 356, 358,
481 357, 361, 370, 356, 371, 347, 368, 0, 356, 351,
482 0, 359, 0, 348, 358, 346, 356, 345, 342, 341,
483 358, 339, 350, 350, 0, 0, 265, 349, 0, 336,
484 0, 341, 0, 347, 338, 349, 0, 0, 341, 0,
485 330, 336, 346, 328, 336, 340, 0, 0, 331, 0,
486 322, 337, 0, 326, 0, 338, 0, 337, 0, 332,
487 331, 323, 0, 314, 0, 326, 313, 0, 0, 316,
488 0, 309, 317, 323, 0, 318, 301, 304, 309, 0,
489 318, 0, 0, 315, 307, 306, 301, 294, 312, 329,
491 295, 294, 291, 299, 306, 307, 289, 289, 302, 292,
492 0, 0, 0, 0, 0, 289, 0, 0, 296, 295,
493 293, 0, 282, 288, 274, 0, 0, 0, 280, 0,
494 296, 291, 281, 285, 0, 0, 279, 279, 260, 264,
495 0, 266, 259, 0, 262, 0, 92, 0, 742, 317,
499 static yyconst short int yy_def[654] =
501 649, 1, 1, 3, 649, 649, 649, 649, 649, 649,
502 650, 649, 649, 651, 649, 649, 649, 649, 649, 649,
503 649, 649, 649, 649, 649, 649, 649, 649, 649, 649,
504 649, 649, 649, 652, 652, 652, 652, 652, 652, 652,
505 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
506 652, 649, 649, 649, 649, 652, 652, 652, 652, 652,
507 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
508 649, 649, 650, 650, 649, 650, 649, 649, 651, 651,
509 649, 651, 649, 649, 649, 649, 649, 649, 649, 649,
510 649, 649, 649, 653, 649, 649, 649, 649, 649, 652,
512 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
513 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
514 652, 652, 652, 652, 649, 652, 652, 652, 652, 652,
515 652, 652, 652, 652, 652, 652, 652, 649, 649, 652,
516 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
517 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
518 652, 652, 652, 652, 652, 652, 652, 652, 649, 653,
519 649, 649, 649, 652, 652, 652, 652, 652, 652, 652,
520 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
521 652, 652, 652, 652, 652, 652, 652, 652, 652, 649,
523 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
524 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
525 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
526 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
527 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
528 649, 652, 652, 652, 652, 652, 652, 652, 652, 652,
529 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
530 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
531 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
532 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
534 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
535 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
536 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
537 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
538 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
539 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
540 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
541 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
542 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
543 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
545 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
546 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
547 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
548 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
549 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
550 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
551 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
552 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
553 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
554 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
556 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
557 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
558 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
559 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
560 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
561 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
562 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
563 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
564 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
565 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
567 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
568 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
569 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
570 652, 652, 652, 652, 652, 652, 652, 652, 652, 652,
571 652, 652, 652, 652, 652, 652, 652, 652, 0, 649,
575 static yyconst short int yy_nxt[805] =
577 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
578 16, 17, 18, 19, 20, 21, 22, 23, 24, 24,
579 24, 24, 25, 26, 27, 28, 29, 30, 31, 6,
580 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
581 34, 42, 34, 34, 43, 34, 44, 45, 46, 34,
582 47, 48, 49, 34, 50, 51, 34, 34, 52, 53,
583 54, 55, 56, 57, 58, 59, 60, 170, 61, 74,
584 62, 77, 75, 63, 64, 65, 66, 67, 80, 84,
585 68, 88, 86, 69, 81, 70, 89, 95, 96, 78,
586 98, 99, 85, 87, 217, 90, 76, 91, 175, 92,
588 92, 92, 92, 93, 91, 82, 93, 93, 93, 93,
589 93, 103, 106, 109, 114, 111, 118, 120, 104, 116,
590 136, 137, 107, 110, 115, 105, 119, 117, 108, 112,
591 123, 125, 128, 121, 132, 113, 124, 133, 94, 138,
592 648, 140, 126, 158, 134, 143, 127, 129, 130, 159,
593 131, 141, 104, 144, 149, 153, 101, 145, 116, 105,
594 109, 151, 147, 107, 115, 148, 150, 156, 154, 146,
595 110, 152, 123, 139, 155, 160, 162, 157, 124, 163,
596 80, 161, 74, 121, 74, 75, 81, 75, 209, 80,
597 239, 164, 165, 240, 166, 81, 169, 169, 169, 169,
599 169, 172, 173, 176, 190, 191, 180, 82, 210, 76,
600 177, 76, 181, 194, 195, 91, 82, 92, 92, 92,
601 92, 93, 91, 222, 93, 93, 93, 93, 93, 200,
602 200, 200, 200, 200, 202, 218, 219, 226, 255, 180,
603 223, 203, 177, 227, 192, 181, 193, 230, 244, 228,
604 236, 195, 229, 190, 191, 256, 231, 353, 248, 232,
605 264, 265, 245, 233, 354, 246, 207, 169, 169, 169,
606 169, 169, 200, 200, 200, 200, 200, 292, 303, 306,
607 319, 320, 304, 307, 264, 265, 293, 311, 337, 305,
608 308, 360, 312, 382, 313, 387, 314, 338, 413, 463,
610 438, 519, 489, 647, 646, 361, 439, 464, 345, 490,
611 645, 576, 644, 643, 642, 520, 577, 73, 73, 73,
612 79, 79, 79, 100, 100, 641, 640, 639, 638, 637,
613 636, 635, 634, 633, 632, 631, 630, 629, 628, 627,
614 626, 625, 624, 623, 622, 621, 620, 619, 618, 617,
615 616, 615, 614, 613, 612, 611, 610, 609, 608, 607,
616 606, 605, 604, 603, 602, 601, 600, 599, 598, 597,
617 596, 595, 594, 593, 592, 591, 590, 589, 588, 587,
618 586, 585, 584, 583, 582, 581, 580, 579, 578, 575,
619 574, 573, 572, 571, 570, 569, 568, 567, 566, 565,
621 564, 563, 562, 561, 560, 559, 558, 557, 556, 555,
622 554, 553, 552, 551, 550, 549, 548, 547, 546, 545,
623 544, 543, 542, 541, 540, 539, 538, 537, 536, 535,
624 534, 533, 532, 531, 530, 529, 528, 527, 526, 525,
625 524, 523, 522, 521, 518, 517, 516, 515, 514, 513,
626 512, 511, 510, 509, 508, 507, 506, 505, 504, 503,
627 502, 501, 500, 499, 498, 497, 496, 495, 494, 493,
628 492, 491, 488, 487, 486, 485, 484, 483, 482, 481,
629 480, 479, 478, 477, 476, 475, 474, 473, 472, 471,
630 470, 469, 468, 467, 466, 465, 462, 461, 460, 459,
632 458, 457, 456, 455, 454, 453, 452, 451, 450, 449,
633 448, 447, 446, 445, 444, 443, 442, 441, 440, 437,
634 436, 435, 434, 433, 432, 431, 430, 429, 428, 427,
635 426, 425, 424, 423, 422, 421, 420, 419, 418, 417,
636 416, 415, 414, 412, 411, 410, 409, 408, 407, 406,
637 405, 404, 403, 402, 401, 400, 399, 398, 397, 396,
638 395, 394, 393, 392, 391, 390, 389, 388, 387, 386,
639 385, 384, 383, 381, 380, 379, 378, 377, 376, 375,
640 374, 373, 372, 371, 370, 369, 368, 367, 366, 365,
641 364, 363, 362, 359, 358, 357, 356, 355, 352, 351,
643 350, 349, 348, 347, 346, 345, 344, 343, 342, 341,
644 340, 339, 336, 335, 334, 333, 332, 331, 330, 329,
645 328, 327, 326, 325, 324, 323, 322, 321, 318, 317,
646 316, 315, 310, 309, 302, 301, 300, 299, 298, 297,
647 296, 295, 294, 291, 290, 259, 289, 288, 287, 286,
648 285, 284, 283, 282, 281, 280, 279, 278, 277, 276,
649 275, 274, 273, 272, 271, 270, 269, 268, 267, 266,
650 263, 262, 261, 260, 259, 258, 257, 254, 253, 252,
651 251, 250, 249, 247, 243, 242, 241, 197, 238, 237,
652 235, 234, 225, 224, 221, 220, 216, 215, 214, 213,
654 212, 211, 208, 207, 206, 205, 204, 201, 199, 198,
655 197, 196, 193, 192, 189, 188, 187, 186, 185, 184,
656 183, 182, 179, 178, 175, 174, 171, 649, 649, 168,
657 167, 142, 135, 122, 102, 101, 97, 83, 72, 71,
658 649, 5, 649, 649, 649, 649, 649, 649, 649, 649,
659 649, 649, 649, 649, 649, 649, 649, 649, 649, 649,
660 649, 649, 649, 649, 649, 649, 649, 649, 649, 649,
661 649, 649, 649, 649, 649, 649, 649, 649, 649, 649,
662 649, 649, 649, 649, 649, 649, 649, 649, 649, 649,
663 649, 649, 649, 649, 649, 649, 649, 649, 649, 649,
668 static yyconst short int yy_chk[805] =
670 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
671 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
672 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
673 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
674 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
675 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
676 1, 1, 3, 3, 3, 3, 3, 653, 3, 11,
677 3, 13, 11, 3, 3, 3, 3, 3, 14, 18,
678 3, 22, 20, 3, 14, 3, 22, 27, 27, 13,
679 29, 29, 18, 20, 142, 22, 11, 23, 142, 23,
681 23, 23, 23, 23, 24, 14, 24, 24, 24, 24,
682 24, 37, 38, 39, 41, 40, 43, 44, 37, 42,
683 51, 51, 38, 39, 41, 37, 43, 42, 38, 40,
684 46, 47, 48, 44, 49, 40, 46, 49, 23, 53,
685 647, 56, 47, 66, 49, 58, 47, 48, 48, 66,
686 48, 56, 58, 59, 61, 64, 56, 59, 62, 58,
687 60, 63, 60, 59, 61, 60, 62, 65, 64, 59,
688 60, 63, 67, 53, 64, 67, 68, 65, 67, 68,
689 79, 67, 73, 65, 74, 73, 79, 74, 133, 80,
690 160, 68, 68, 160, 68, 80, 91, 91, 91, 91,
692 91, 99, 99, 103, 117, 117, 106, 79, 133, 73,
693 103, 74, 106, 120, 120, 92, 80, 92, 92, 92,
694 92, 92, 93, 147, 93, 93, 93, 93, 93, 125,
695 125, 125, 125, 125, 127, 143, 144, 150, 179, 144,
696 147, 127, 143, 150, 151, 144, 152, 153, 164, 151,
697 156, 156, 152, 150, 150, 179, 153, 288, 166, 153,
698 188, 188, 164, 153, 288, 164, 166, 169, 169, 169,
699 169, 169, 200, 200, 200, 200, 200, 225, 236, 238,
700 247, 247, 236, 238, 225, 225, 225, 242, 269, 236,
701 238, 294, 242, 317, 242, 353, 242, 269, 353, 412,
703 380, 473, 442, 645, 643, 294, 380, 412, 317, 442,
704 642, 537, 640, 639, 638, 473, 537, 650, 650, 650,
705 651, 651, 651, 652, 652, 637, 634, 633, 632, 631,
706 629, 625, 624, 623, 621, 620, 619, 616, 610, 609,
707 608, 607, 606, 605, 604, 603, 602, 601, 600, 599,
708 598, 597, 596, 595, 594, 591, 589, 588, 587, 586,
709 584, 583, 582, 580, 577, 576, 574, 572, 571, 570,
710 568, 566, 564, 562, 561, 559, 556, 555, 554, 553,
711 552, 551, 549, 546, 545, 544, 542, 540, 538, 534,
712 533, 532, 531, 530, 529, 528, 527, 526, 525, 524,
714 522, 520, 519, 517, 516, 515, 514, 513, 512, 511,
715 510, 509, 508, 507, 506, 505, 504, 503, 502, 501,
716 500, 499, 496, 494, 493, 492, 491, 490, 489, 488,
717 487, 486, 485, 484, 483, 482, 481, 480, 479, 478,
718 477, 476, 475, 474, 472, 471, 470, 469, 468, 467,
719 466, 465, 464, 463, 462, 461, 460, 459, 458, 457,
720 456, 455, 454, 453, 451, 450, 449, 447, 446, 445,
721 444, 443, 441, 440, 439, 438, 437, 436, 435, 434,
722 433, 432, 430, 429, 427, 425, 424, 423, 422, 421,
723 420, 419, 418, 416, 414, 413, 410, 407, 406, 404,
725 402, 401, 400, 399, 397, 396, 395, 394, 393, 392,
726 390, 389, 387, 386, 385, 384, 383, 382, 381, 379,
727 378, 377, 376, 375, 374, 373, 372, 371, 370, 369,
728 368, 367, 365, 363, 362, 361, 360, 359, 358, 357,
729 356, 355, 354, 352, 350, 348, 347, 346, 345, 344,
730 343, 342, 341, 340, 339, 338, 337, 336, 335, 334,
731 333, 332, 331, 329, 328, 327, 326, 325, 324, 322,
732 320, 319, 318, 316, 315, 314, 313, 312, 311, 308,
733 307, 306, 305, 304, 303, 302, 301, 300, 299, 298,
734 297, 296, 295, 293, 292, 291, 290, 289, 287, 285,
736 284, 282, 281, 280, 279, 278, 277, 276, 275, 274,
737 273, 270, 268, 267, 266, 265, 264, 263, 262, 259,
738 258, 257, 256, 255, 253, 252, 249, 248, 246, 245,
739 244, 243, 241, 240, 235, 234, 233, 232, 231, 230,
740 229, 228, 227, 224, 223, 221, 220, 218, 217, 214,
741 213, 211, 210, 209, 208, 207, 206, 205, 204, 203,
742 202, 201, 199, 198, 196, 195, 193, 192, 190, 189,
743 187, 185, 184, 183, 182, 181, 180, 177, 176, 175,
744 173, 168, 167, 165, 163, 162, 161, 159, 158, 157,
745 155, 154, 149, 148, 146, 145, 141, 140, 137, 136,
747 135, 134, 132, 131, 130, 129, 128, 126, 124, 123,
748 122, 121, 119, 118, 115, 114, 113, 112, 111, 110,
749 109, 108, 105, 104, 102, 101, 95, 82, 76, 70,
750 69, 57, 50, 45, 36, 35, 28, 17, 10, 9,
751 5, 649, 649, 649, 649, 649, 649, 649, 649, 649,
752 649, 649, 649, 649, 649, 649, 649, 649, 649, 649,
753 649, 649, 649, 649, 649, 649, 649, 649, 649, 649,
754 649, 649, 649, 649, 649, 649, 649, 649, 649, 649,
755 649, 649, 649, 649, 649, 649, 649, 649, 649, 649,
756 649, 649, 649, 649, 649, 649, 649, 649, 649, 649,
761 static yy_state_type yy_last_accepting_state;
762 static char *yy_last_accepting_cpos;
764 /* The intent behind this definition is that it'll catch
765 * any uses of REJECT which flex missed.
767 #define REJECT reject_used_but_not_detected
768 #define yymore() yymore_used_but_not_detected
769 #define YY_MORE_ADJ 0
770 #define YY_RESTORE_YY_MORE_OFFSET
772 #line 1 "swf5compiler.flex"
774 #line 2 "swf5compiler.flex"
781 #include "blocks/error.h"
782 #include "swf5compiler.tab.h" /* defines token types */
784 static int swf5debug;
786 static const char *lexBuffer = NULL;
787 static int lexBufferLen = 0;
789 static int sLineNumber = 0;
790 static char szLine[1024];
791 static char msgbufs[2][1024] = { {0}, {0} }, *msgline = {0};
792 static int column = 0;
794 static void comment();
795 static void comment1();
797 static void countline();
798 static void warning(char *msg);
800 #define YY_INPUT(buf,result,max_size) result=lexBufferInput(buf, max_size)
802 /* thanks to the prolific and brilliant Raff: */
803 static int lexBufferInput(char *buf, int max_size)
805 int l = lexBufferLen > max_size ? max_size : lexBufferLen;
807 if (lexBufferLen <= 0)
810 memcpy(buf, lexBuffer, l);
816 /* very inefficient method of unescaping strings */
817 static void unescape(char *buf)
821 for (p1=buf; (p=strchr(p1, '\\')) != 0; p1 = p+1) {
824 case 'b' : p[1] = '\b'; break;
825 case 'f' : p[1] = '\f'; break;
826 case 'n' : p[1] = '\n'; break;
827 case 'r' : p[1] = '\r'; break;
828 case 't' : p[1] = '\t'; break;
830 case 'u' : warning("unsupported escape sequence");
836 void swf5ParseInit(const char *script, int debug)
844 lexBufferLen = strlen(script);
847 msgline = msgbufs[0];
852 #line 82 "swf5compiler.flex"
853 // forward declaration needed by the following function
856 #define YY_PROTO(proto) proto
858 #define YY_PROTO(proto) ()
861 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
863 void do_unput5(const char c) { unput(c); }
864 #line 865 "lex.swf5.c"
866 /* Macros after this point can all be overridden by user definitions in
870 #ifndef YY_SKIP_YYWRAP
872 extern "C" int yywrap YY_PROTO(( void ));
874 extern int yywrap YY_PROTO(( void ));
879 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
883 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
886 #ifdef YY_NEED_STRLEN
887 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
892 static int yyinput YY_PROTO(( void ));
894 static int input YY_PROTO(( void ));
899 static int yy_start_stack_ptr = 0;
900 static int yy_start_stack_depth = 0;
901 static int *yy_start_stack = 0;
902 #ifndef YY_NO_PUSH_STATE
903 static void yy_push_state YY_PROTO(( int new_state ));
905 #ifndef YY_NO_POP_STATE
906 static void yy_pop_state YY_PROTO(( void ));
908 #ifndef YY_NO_TOP_STATE
909 static int yy_top_state YY_PROTO(( void ));
913 #define YY_NO_PUSH_STATE 1
914 #define YY_NO_POP_STATE 1
915 #define YY_NO_TOP_STATE 1
918 #ifdef YY_MALLOC_DECL
926 /* Just try to get by without declaring the routines. This will fail
927 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
928 * or sizeof(void*) != sizeof(int).
933 /* Amount of stuff to slurp up with each read. */
934 #ifndef YY_READ_BUF_SIZE
935 #define YY_READ_BUF_SIZE 8192
938 /* Copy whatever the last rule matched to the standard output. */
941 /* This used to be an fputs(), but since the string might contain NUL's,
942 * we now use fwrite().
944 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
947 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
948 * is returned in "result".
951 #define YY_INPUT(buf,result,max_size) \
952 if ( yy_current_buffer->yy_is_interactive ) \
955 for ( n = 0; n < max_size && \
956 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
959 buf[n++] = (char) c; \
960 if ( c == EOF && ferror( yyin ) ) \
961 YY_FATAL_ERROR( "input in flex scanner failed" ); \
964 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
965 && ferror( yyin ) ) \
966 YY_FATAL_ERROR( "input in flex scanner failed" );
969 /* No semi-colon after return; correct usage is to write "yyterminate();" -
970 * we don't want an extra ';' after the "return" because that will cause
971 * some compilers to complain about unreachable statements.
974 #define yyterminate() return YY_NULL
977 /* Number of entries by which start-condition stack grows. */
978 #ifndef YY_START_STACK_INCR
979 #define YY_START_STACK_INCR 25
982 /* Report a fatal error. */
983 #ifndef YY_FATAL_ERROR
984 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
987 /* Default declaration of generated scanner - a define so the user can
988 * easily add parameters.
991 #define YY_DECL int yylex YY_PROTO(( void ))
994 /* Code executed at the beginning of each rule, after yytext and yyleng
997 #ifndef YY_USER_ACTION
998 #define YY_USER_ACTION
1001 /* Code executed at the end of each rule. */
1003 #define YY_BREAK break;
1006 #define YY_RULE_SETUP \
1011 register yy_state_type yy_current_state;
1012 register char *yy_cp = NULL, *yy_bp = NULL;
1013 register int yy_act;
1015 #line 98 "swf5compiler.flex"
1018 #line 1019 "lex.swf5.c"
1029 yy_start = 1; /* first start state */
1037 if ( ! yy_current_buffer )
1039 yy_create_buffer( yyin, YY_BUF_SIZE );
1041 yy_load_buffer_state();
1044 while ( 1 ) /* loops until end-of-file is reached */
1048 /* Support of yytext. */
1049 *yy_cp = yy_hold_char;
1051 /* yy_bp points to the position in yy_ch_buf of the start of
1056 yy_current_state = yy_start;
1060 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1061 if ( yy_accept[yy_current_state] )
1063 yy_last_accepting_state = yy_current_state;
1064 yy_last_accepting_cpos = yy_cp;
1066 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1068 yy_current_state = (int) yy_def[yy_current_state];
1069 if ( yy_current_state >= 650 )
1070 yy_c = yy_meta[(unsigned int) yy_c];
1072 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1075 while ( yy_base[yy_current_state] != 742 );
1078 yy_act = yy_accept[yy_current_state];
1080 { /* have to back up */
1081 yy_cp = yy_last_accepting_cpos;
1082 yy_current_state = yy_last_accepting_state;
1083 yy_act = yy_accept[yy_current_state];
1086 YY_DO_BEFORE_ACTION;
1089 do_action: /* This label is used only to access EOF actions. */
1093 { /* beginning of action switch */
1094 case 0: /* must back up */
1095 /* undo the effects of YY_DO_BEFORE_ACTION */
1096 *yy_cp = yy_hold_char;
1097 yy_cp = yy_last_accepting_cpos;
1098 yy_current_state = yy_last_accepting_state;
1099 goto yy_find_action;
1103 #line 100 "swf5compiler.flex"
1104 { count(); swf5lval.intVal = strtoul(yytext, NULL, 0);
1109 #line 102 "swf5compiler.flex"
1110 { count(); swf5lval.intVal = strtoul(yytext, NULL, 0);
1115 #line 104 "swf5compiler.flex"
1116 { count(); swf5lval.intVal = atoi(yytext);
1121 #line 106 "swf5compiler.flex"
1122 { count(); swf5lval.doubleVal = atof(yytext);
1127 #line 108 "swf5compiler.flex"
1128 { count(); swf5lval.intVal = 1;
1133 #line 110 "swf5compiler.flex"
1134 { count(); swf5lval.intVal = 0;
1139 #line 112 "swf5compiler.flex"
1140 { count(); return NULLVAL; }
1144 #line 113 "swf5compiler.flex"
1145 { count(); return BREAK; }
1149 #line 114 "swf5compiler.flex"
1150 { count(); return CONTINUE; }
1154 #line 115 "swf5compiler.flex"
1155 { count(); return FUNCTION; }
1159 #line 116 "swf5compiler.flex"
1160 { count(); return ELSE; }
1164 #line 117 "swf5compiler.flex"
1165 { count(); return SWITCH; }
1169 #line 118 "swf5compiler.flex"
1170 { count(); return CASE; }
1174 #line 119 "swf5compiler.flex"
1175 { count(); return DEFAULT; }
1179 #line 120 "swf5compiler.flex"
1180 { count(); return FOR; }
1184 #line 121 "swf5compiler.flex"
1185 { count(); return IN; }
1189 #line 122 "swf5compiler.flex"
1190 { count(); return IF; }
1194 #line 123 "swf5compiler.flex"
1195 { count(); return WHILE; }
1199 #line 124 "swf5compiler.flex"
1200 { count(); return DO; }
1204 #line 125 "swf5compiler.flex"
1205 { count(); return VAR; }
1209 #line 126 "swf5compiler.flex"
1210 { count(); return NEW; }
1214 #line 127 "swf5compiler.flex"
1215 { count(); return DELETE; }
1219 #line 128 "swf5compiler.flex"
1220 { count(); return RETURN; }
1224 #line 129 "swf5compiler.flex"
1225 { count(); return WITH; }
1229 #line 130 "swf5compiler.flex"
1230 { count(); BEGIN(asm); return ASM; }
1234 #line 131 "swf5compiler.flex"
1235 { count(); return EVAL; }
1239 #line 132 "swf5compiler.flex"
1240 { count(); return TYPEOF; }
1244 #line 133 "swf5compiler.flex"
1245 { count(); return INSTANCEOF; }
1247 /* legacy functions */
1250 #line 136 "swf5compiler.flex"
1251 { count(); return RANDOM; }
1255 #line 137 "swf5compiler.flex"
1256 { count(); return GETTIMER; }
1260 #line 138 "swf5compiler.flex"
1261 { count(); return LENGTH; }
1265 #line 139 "swf5compiler.flex"
1266 { count(); return CONCAT; }
1270 #line 140 "swf5compiler.flex"
1271 { count(); return SUBSTR; }
1275 #line 141 "swf5compiler.flex"
1276 { count(); return TRACE; }
1280 #line 142 "swf5compiler.flex"
1281 { count(); return INT; }
1285 #line 143 "swf5compiler.flex"
1286 { count(); return ORD; }
1290 #line 144 "swf5compiler.flex"
1291 { count(); return CHR; }
1295 #line 145 "swf5compiler.flex"
1296 { count(); return GETURL; }
1300 #line 146 "swf5compiler.flex"
1301 { count(); return GETURL1; }
1305 #line 147 "swf5compiler.flex"
1306 { count(); return NEXTFRAME; }
1310 #line 148 "swf5compiler.flex"
1311 { count(); return PREVFRAME; }
1315 #line 149 "swf5compiler.flex"
1316 { count(); return PLAY; }
1320 #line 150 "swf5compiler.flex"
1321 { count(); return STOP; }
1325 #line 151 "swf5compiler.flex"
1326 { count(); return TOGGLEQUALITY; }
1330 #line 152 "swf5compiler.flex"
1331 { count(); return STOPSOUNDS; }
1335 #line 153 "swf5compiler.flex"
1336 { count(); return CALLFRAME; }
1340 #line 154 "swf5compiler.flex"
1341 { count(); return GOTOFRAME; }
1345 #line 155 "swf5compiler.flex"
1346 { count(); return SETTARGET; }
1350 #line 156 "swf5compiler.flex"
1351 { count(); return LOADVARIABLES; }
1355 #line 157 "swf5compiler.flex"
1356 { count(); return LOADMOVIE; }
1360 #line 158 "swf5compiler.flex"
1361 { count(); return LOADVARIABLESNUM; }
1365 #line 159 "swf5compiler.flex"
1366 { count(); return LOADMOVIENUM; }
1370 #line 160 "swf5compiler.flex"
1371 { count(); return DUPLICATEMOVIECLIP; }
1375 #line 161 "swf5compiler.flex"
1376 { count(); return REMOVEMOVIECLIP; }
1382 #line 165 "swf5compiler.flex"
1383 { count(); return DUP; }
1387 #line 166 "swf5compiler.flex"
1388 { count(); return SWAP; }
1392 #line 167 "swf5compiler.flex"
1393 { count(); return POP; }
1397 #line 168 "swf5compiler.flex"
1398 { count(); return PUSH; }
1402 #line 169 "swf5compiler.flex"
1403 { count(); return SETREGISTER; }
1407 #line 170 "swf5compiler.flex"
1408 { count(); return CALLFUNCTION; }
1412 #line 171 "swf5compiler.flex"
1413 { count(); return CALLMETHOD; }
1417 #line 172 "swf5compiler.flex"
1418 { count(); return AND; }
1422 #line 173 "swf5compiler.flex"
1423 { count(); return OR; }
1427 #line 174 "swf5compiler.flex"
1428 { count(); return XOR; }
1432 #line 175 "swf5compiler.flex"
1433 { count(); return MODULO; }
1437 #line 176 "swf5compiler.flex"
1438 { count(); return ADD; }
1442 #line 177 "swf5compiler.flex"
1443 { count(); return ADD; }
1447 #line 178 "swf5compiler.flex"
1448 { count(); return LESSTHAN; }
1452 #line 179 "swf5compiler.flex"
1453 { count(); return LESSTHAN; }
1457 #line 180 "swf5compiler.flex"
1458 { count(); return EQUALS; }
1462 #line 181 "swf5compiler.flex"
1463 { count(); return EQUALS; }
1467 #line 182 "swf5compiler.flex"
1468 { count(); return INC; }
1472 #line 183 "swf5compiler.flex"
1473 { count(); return DEC; }
1477 #line 184 "swf5compiler.flex"
1478 { count(); return ENUMERATE; }
1482 #line 185 "swf5compiler.flex"
1483 { count(); return INITOBJECT; }
1487 #line 186 "swf5compiler.flex"
1488 { count(); return INITARRAY; }
1492 #line 187 "swf5compiler.flex"
1493 { count(); return GETMEMBER; }
1497 #line 188 "swf5compiler.flex"
1498 { count(); return SETMEMBER; }
1502 #line 189 "swf5compiler.flex"
1503 { count(); return SHIFTLEFT; }
1507 #line 190 "swf5compiler.flex"
1508 { count(); return SHIFTRIGHT; }
1512 #line 191 "swf5compiler.flex"
1513 { count(); return SHIFTRIGHT2; }
1517 #line 192 "swf5compiler.flex"
1518 { count(); return VAREQUALS; }
1522 #line 193 "swf5compiler.flex"
1523 { count(); return OLDADD; }
1527 #line 194 "swf5compiler.flex"
1528 { count(); return SUBTRACT; }
1532 #line 195 "swf5compiler.flex"
1533 { count(); return MULTIPLY; }
1537 #line 196 "swf5compiler.flex"
1538 { count(); return DIVIDE; }
1542 #line 197 "swf5compiler.flex"
1543 { count(); return OLDEQUALS; }
1547 #line 198 "swf5compiler.flex"
1548 { count(); return OLDLESSTHAN; }
1552 #line 199 "swf5compiler.flex"
1553 { count(); return LOGICALAND; }
1557 #line 200 "swf5compiler.flex"
1558 { count(); return LOGICALOR; }
1562 #line 201 "swf5compiler.flex"
1563 { count(); return NOT; }
1567 #line 202 "swf5compiler.flex"
1568 { count(); return STRINGEQ; }
1572 #line 203 "swf5compiler.flex"
1573 { count(); return STRINGLENGTH; }
1577 #line 204 "swf5compiler.flex"
1578 { count(); return SUBSTRING; }
1582 #line 205 "swf5compiler.flex"
1583 { count(); return GETVARIABLE; }
1587 #line 206 "swf5compiler.flex"
1588 { count(); return SETVARIABLE; }
1592 #line 207 "swf5compiler.flex"
1593 { count(); return SETTARGETEXPRESSION; }
1597 #line 208 "swf5compiler.flex"
1598 { count(); return STARTDRAG; }
1602 #line 209 "swf5compiler.flex"
1603 { count(); return STOPDRAG; }
1607 #line 210 "swf5compiler.flex"
1608 { count(); return STRINGLESSTHAN; }
1612 #line 211 "swf5compiler.flex"
1613 { count(); return MBLENGTH; }
1617 #line 212 "swf5compiler.flex"
1618 { count(); return MBSUBSTRING; }
1622 #line 213 "swf5compiler.flex"
1623 { count(); return MBORD; }
1627 #line 214 "swf5compiler.flex"
1628 { count(); return MBCHR; }
1632 #line 215 "swf5compiler.flex"
1633 { count(); return BRANCHALWAYS; }
1637 #line 216 "swf5compiler.flex"
1638 { count(); return BRANCHALWAYS; }
1642 #line 217 "swf5compiler.flex"
1643 { count(); return BRANCHIFTRUE; }
1647 #line 218 "swf5compiler.flex"
1648 { count(); return POST; }
1652 #line 219 "swf5compiler.flex"
1653 { count(); return GET; }
1657 #line 220 "swf5compiler.flex"
1658 { count(); return END; }
1663 #line 223 "swf5compiler.flex"
1664 { count(); swf5lval.str = strdup(yytext+2);
1669 #line 227 "swf5compiler.flex"
1670 { count(); swf5lval.str = strdup(yytext);
1671 return IDENTIFIER; }
1675 #line 230 "swf5compiler.flex"
1676 { count(); swf5lval.str = strdup(yytext+1);
1677 swf5lval.str[strlen(swf5lval.str)-1]=0;
1678 unescape(swf5lval.str);
1683 #line 235 "swf5compiler.flex"
1684 { count(); swf5lval.str = strdup(yytext+1);
1685 swf5lval.str[strlen(swf5lval.str)-1]=0;
1686 unescape(swf5lval.str);
1690 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1691 yy_c_buf_p = yy_cp -= 1;
1692 YY_DO_BEFORE_ACTION; /* set up yytext again */
1694 #line 240 "swf5compiler.flex"
1695 { count(); swf5lval.str = strdup("");
1696 warning("Unterminated string!");
1700 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1701 yy_c_buf_p = yy_cp -= 1;
1702 YY_DO_BEFORE_ACTION; /* set up yytext again */
1704 #line 244 "swf5compiler.flex"
1705 { count(); swf5lval.str = strdup("");
1706 warning("Unterminated string!");
1711 #line 248 "swf5compiler.flex"
1712 { count(); comment(); }
1716 #line 249 "swf5compiler.flex"
1717 { count(); comment1(); }
1721 #line 250 "swf5compiler.flex"
1726 #line 252 "swf5compiler.flex"
1727 { count(); return INCR; }
1731 #line 253 "swf5compiler.flex"
1732 { count(); return DECR; }
1736 #line 254 "swf5compiler.flex"
1737 { count(); return LE; }
1741 #line 255 "swf5compiler.flex"
1742 { count(); return GE; }
1746 #line 256 "swf5compiler.flex"
1747 { count(); return EQ; }
1751 #line 257 "swf5compiler.flex"
1752 { count(); return NE; }
1756 #line 258 "swf5compiler.flex"
1757 { count(); return LAN; }
1761 #line 259 "swf5compiler.flex"
1762 { count(); return LOR; }
1766 #line 260 "swf5compiler.flex"
1767 { count(); return MEQ; }
1771 #line 261 "swf5compiler.flex"
1772 { count(); return DEQ; }
1776 #line 262 "swf5compiler.flex"
1777 { count(); return IEQ; }
1781 #line 263 "swf5compiler.flex"
1782 { count(); return SEQ; }
1786 #line 264 "swf5compiler.flex"
1787 { count(); return AEQ; }
1791 #line 265 "swf5compiler.flex"
1792 { count(); return OEQ; }
1796 #line 266 "swf5compiler.flex"
1797 { count(); return SHL; }
1801 #line 267 "swf5compiler.flex"
1802 { count(); return SHR; }
1806 #line 268 "swf5compiler.flex"
1807 { count(); return SHR2; }
1811 #line 269 "swf5compiler.flex"
1812 { count(); return SHLEQ; }
1816 #line 270 "swf5compiler.flex"
1817 { count(); return SHREQ; }
1821 #line 271 "swf5compiler.flex"
1822 { count(); return SHR2EQ; }
1826 #line 273 "swf5compiler.flex"
1827 { count(); return '<'; }
1831 #line 274 "swf5compiler.flex"
1832 { count(); return '>'; }
1836 #line 275 "swf5compiler.flex"
1837 { count(); return ';'; }
1841 #line 276 "swf5compiler.flex"
1842 { count(); return '='; }
1846 #line 277 "swf5compiler.flex"
1847 { count(); return '+'; }
1851 #line 278 "swf5compiler.flex"
1852 { count(); return '-'; }
1856 #line 279 "swf5compiler.flex"
1857 { count(); return '&'; }
1861 #line 280 "swf5compiler.flex"
1862 { count(); return '|'; }
1866 #line 281 "swf5compiler.flex"
1867 { count(); return '^'; }
1871 #line 282 "swf5compiler.flex"
1872 { count(); return '*'; }
1876 #line 283 "swf5compiler.flex"
1877 { count(); return '/'; }
1881 #line 284 "swf5compiler.flex"
1882 { count(); return '%'; }
1886 #line 285 "swf5compiler.flex"
1887 { count(); return '!'; }
1891 #line 286 "swf5compiler.flex"
1892 { count(); return '('; }
1896 #line 287 "swf5compiler.flex"
1897 { count(); return ')'; }
1901 #line 288 "swf5compiler.flex"
1902 { count(); return '['; }
1906 #line 289 "swf5compiler.flex"
1907 { count(); return ']'; }
1911 #line 290 "swf5compiler.flex"
1912 { count(); return '{'; }
1916 #line 291 "swf5compiler.flex"
1917 { count(); BEGIN(0); return '}'; }
1921 #line 292 "swf5compiler.flex"
1922 { count(); return ','; }
1926 #line 293 "swf5compiler.flex"
1927 { count(); return '.'; }
1931 #line 294 "swf5compiler.flex"
1932 { count(); return '?'; }
1936 #line 295 "swf5compiler.flex"
1937 { count(); return ':'; }
1941 #line 296 "swf5compiler.flex"
1942 { count(); return '~'; }
1946 #line 298 "swf5compiler.flex"
1947 { count(); strcpy(szLine, yytext + 1);
1948 countline(); yyless(1); }
1952 #line 301 "swf5compiler.flex"
1953 SWF_error("Unrecognized character: %s\n", yytext);
1957 #line 303 "swf5compiler.flex"
1960 #line 1961 "lex.swf5.c"
1961 case YY_STATE_EOF(INITIAL):
1962 case YY_STATE_EOF(asm):
1965 case YY_END_OF_BUFFER:
1967 /* Amount of text matched not including the EOB char. */
1968 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
1970 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1971 *yy_cp = yy_hold_char;
1972 YY_RESTORE_YY_MORE_OFFSET
1974 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
1976 /* We're scanning a new file or input source. It's
1977 * possible that this happened because the user
1978 * just pointed yyin at a new source and called
1979 * yylex(). If so, then we have to assure
1980 * consistency between yy_current_buffer and our
1981 * globals. Here is the right place to do so, because
1982 * this is the first action (other than possibly a
1983 * back-up) that will match for the new input source.
1985 yy_n_chars = yy_current_buffer->yy_n_chars;
1986 yy_current_buffer->yy_input_file = yyin;
1987 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
1990 /* Note that here we test for yy_c_buf_p "<=" to the position
1991 * of the first EOB in the buffer, since yy_c_buf_p will
1992 * already have been incremented past the NUL character
1993 * (since all states make transitions on EOB to the
1994 * end-of-buffer state). Contrast this with the test
1997 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1998 { /* This was really a NUL. */
1999 yy_state_type yy_next_state;
2001 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
2003 yy_current_state = yy_get_previous_state();
2005 /* Okay, we're now positioned to make the NUL
2006 * transition. We couldn't have
2007 * yy_get_previous_state() go ahead and do it
2008 * for us because it doesn't know how to deal
2009 * with the possibility of jamming (and we don't
2010 * want to build jamming into it because then it
2011 * will run more slowly).
2014 yy_next_state = yy_try_NUL_trans( yy_current_state );
2016 yy_bp = yytext_ptr + YY_MORE_ADJ;
2018 if ( yy_next_state )
2020 /* Consume the NUL. */
2021 yy_cp = ++yy_c_buf_p;
2022 yy_current_state = yy_next_state;
2029 goto yy_find_action;
2033 else switch ( yy_get_next_buffer() )
2035 case EOB_ACT_END_OF_FILE:
2037 yy_did_buffer_switch_on_eof = 0;
2041 /* Note: because we've taken care in
2042 * yy_get_next_buffer() to have set up
2043 * yytext, we can now set up
2044 * yy_c_buf_p so that if some total
2045 * hoser (like flex itself) wants to
2046 * call the scanner after we return the
2047 * YY_NULL, it'll still work - another
2048 * YY_NULL will get returned.
2050 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
2052 yy_act = YY_STATE_EOF(YY_START);
2058 if ( ! yy_did_buffer_switch_on_eof )
2064 case EOB_ACT_CONTINUE_SCAN:
2066 yytext_ptr + yy_amount_of_matched_text;
2068 yy_current_state = yy_get_previous_state();
2071 yy_bp = yytext_ptr + YY_MORE_ADJ;
2074 case EOB_ACT_LAST_MATCH:
2076 &yy_current_buffer->yy_ch_buf[yy_n_chars];
2078 yy_current_state = yy_get_previous_state();
2081 yy_bp = yytext_ptr + YY_MORE_ADJ;
2082 goto yy_find_action;
2089 "fatal flex scanner internal error--no action found" );
2090 } /* end of action switch */
2091 } /* end of scanning one token */
2092 } /* end of yylex */
2095 /* yy_get_next_buffer - try to read in a new buffer
2097 * Returns a code representing an action:
2098 * EOB_ACT_LAST_MATCH -
2099 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2100 * EOB_ACT_END_OF_FILE - end of file
2103 static int yy_get_next_buffer()
2105 register char *dest = yy_current_buffer->yy_ch_buf;
2106 register char *source = yytext_ptr;
2107 register int number_to_move, i;
2110 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
2112 "fatal flex scanner internal error--end of buffer missed" );
2114 if ( yy_current_buffer->yy_fill_buffer == 0 )
2115 { /* Don't try to fill the buffer, so this is an EOF. */
2116 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
2118 /* We matched a single character, the EOB, so
2119 * treat this as a final EOF.
2121 return EOB_ACT_END_OF_FILE;
2126 /* We matched some text prior to the EOB, first
2129 return EOB_ACT_LAST_MATCH;
2133 /* Try to read more data. */
2135 /* First move last chars to start of buffer. */
2136 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
2138 for ( i = 0; i < number_to_move; ++i )
2139 *(dest++) = *(source++);
2141 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2142 /* don't do the read, it's not guaranteed to return an EOF,
2145 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
2150 yy_current_buffer->yy_buf_size - number_to_move - 1;
2152 while ( num_to_read <= 0 )
2153 { /* Not enough room in the buffer - grow it. */
2154 #ifdef YY_USES_REJECT
2156 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
2159 /* just a shorter name for the current buffer */
2160 YY_BUFFER_STATE b = yy_current_buffer;
2162 int yy_c_buf_p_offset =
2163 (int) (yy_c_buf_p - b->yy_ch_buf);
2165 if ( b->yy_is_our_buffer )
2167 int new_size = b->yy_buf_size * 2;
2169 if ( new_size <= 0 )
2170 b->yy_buf_size += b->yy_buf_size / 8;
2172 b->yy_buf_size *= 2;
2174 b->yy_ch_buf = (char *)
2175 /* Include room in for 2 EOB chars. */
2176 yy_flex_realloc( (void *) b->yy_ch_buf,
2177 b->yy_buf_size + 2 );
2180 /* Can't grow it, we don't own it. */
2183 if ( ! b->yy_ch_buf )
2185 "fatal error - scanner input buffer overflow" );
2187 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
2189 num_to_read = yy_current_buffer->yy_buf_size -
2194 if ( num_to_read > YY_READ_BUF_SIZE )
2195 num_to_read = YY_READ_BUF_SIZE;
2197 /* Read in more data. */
2198 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
2199 yy_n_chars, num_to_read );
2201 yy_current_buffer->yy_n_chars = yy_n_chars;
2204 if ( yy_n_chars == 0 )
2206 if ( number_to_move == YY_MORE_ADJ )
2208 ret_val = EOB_ACT_END_OF_FILE;
2214 ret_val = EOB_ACT_LAST_MATCH;
2215 yy_current_buffer->yy_buffer_status =
2216 YY_BUFFER_EOF_PENDING;
2221 ret_val = EOB_ACT_CONTINUE_SCAN;
2223 yy_n_chars += number_to_move;
2224 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
2225 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
2227 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
2233 /* yy_get_previous_state - get the state just before the EOB char was reached */
2235 static yy_state_type yy_get_previous_state()
2237 register yy_state_type yy_current_state;
2238 register char *yy_cp;
2240 yy_current_state = yy_start;
2242 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
2244 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2245 if ( yy_accept[yy_current_state] )
2247 yy_last_accepting_state = yy_current_state;
2248 yy_last_accepting_cpos = yy_cp;
2250 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2252 yy_current_state = (int) yy_def[yy_current_state];
2253 if ( yy_current_state >= 650 )
2254 yy_c = yy_meta[(unsigned int) yy_c];
2256 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2259 return yy_current_state;
2263 /* yy_try_NUL_trans - try to make a transition on the NUL character
2266 * next_state = yy_try_NUL_trans( current_state );
2269 #ifdef YY_USE_PROTOS
2270 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
2272 static yy_state_type yy_try_NUL_trans( yy_current_state )
2273 yy_state_type yy_current_state;
2276 register int yy_is_jam;
2277 register char *yy_cp = yy_c_buf_p;
2279 register YY_CHAR yy_c = 1;
2280 if ( yy_accept[yy_current_state] )
2282 yy_last_accepting_state = yy_current_state;
2283 yy_last_accepting_cpos = yy_cp;
2285 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2287 yy_current_state = (int) yy_def[yy_current_state];
2288 if ( yy_current_state >= 650 )
2289 yy_c = yy_meta[(unsigned int) yy_c];
2291 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2292 yy_is_jam = (yy_current_state == 649);
2294 return yy_is_jam ? 0 : yy_current_state;
2299 #ifdef YY_USE_PROTOS
2300 static void yyunput( int c, register char *yy_bp )
2302 static void yyunput( c, yy_bp )
2304 register char *yy_bp;
2307 register char *yy_cp = yy_c_buf_p;
2309 /* undo effects of setting up yytext */
2310 *yy_cp = yy_hold_char;
2312 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2313 { /* need to shift things up to make room */
2314 /* +2 for EOB chars. */
2315 register int number_to_move = yy_n_chars + 2;
2316 register char *dest = &yy_current_buffer->yy_ch_buf[
2317 yy_current_buffer->yy_buf_size + 2];
2318 register char *source =
2319 &yy_current_buffer->yy_ch_buf[number_to_move];
2321 while ( source > yy_current_buffer->yy_ch_buf )
2322 *--dest = *--source;
2324 yy_cp += (int) (dest - source);
2325 yy_bp += (int) (dest - source);
2326 yy_current_buffer->yy_n_chars =
2327 yy_n_chars = yy_current_buffer->yy_buf_size;
2329 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2330 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2333 *--yy_cp = (char) c;
2337 yy_hold_char = *yy_cp;
2340 #endif /* ifndef YY_NO_UNPUT */
2344 static int yyinput()
2351 *yy_c_buf_p = yy_hold_char;
2353 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
2355 /* yy_c_buf_p now points to the character we want to return.
2356 * If this occurs *before* the EOB characters, then it's a
2357 * valid NUL; if not, then we've hit the end of the buffer.
2359 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
2360 /* This was really a NUL. */
2364 { /* need more input */
2365 int offset = yy_c_buf_p - yytext_ptr;
2368 switch ( yy_get_next_buffer() )
2370 case EOB_ACT_LAST_MATCH:
2371 /* This happens because yy_g_n_b()
2372 * sees that we've accumulated a
2373 * token and flags that we need to
2374 * try matching the token before
2375 * proceeding. But for input(),
2376 * there's no matching to consider.
2377 * So convert the EOB_ACT_LAST_MATCH
2378 * to EOB_ACT_END_OF_FILE.
2381 /* Reset buffer status. */
2386 case EOB_ACT_END_OF_FILE:
2391 if ( ! yy_did_buffer_switch_on_eof )
2400 case EOB_ACT_CONTINUE_SCAN:
2401 yy_c_buf_p = yytext_ptr + offset;
2407 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
2408 *yy_c_buf_p = '\0'; /* preserve yytext */
2409 yy_hold_char = *++yy_c_buf_p;
2416 #ifdef YY_USE_PROTOS
2417 void yyrestart( FILE *input_file )
2419 void yyrestart( input_file )
2423 if ( ! yy_current_buffer )
2424 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
2426 yy_init_buffer( yy_current_buffer, input_file );
2427 yy_load_buffer_state();
2431 #ifdef YY_USE_PROTOS
2432 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
2434 void yy_switch_to_buffer( new_buffer )
2435 YY_BUFFER_STATE new_buffer;
2438 if ( yy_current_buffer == new_buffer )
2441 if ( yy_current_buffer )
2443 /* Flush out information for old buffer. */
2444 *yy_c_buf_p = yy_hold_char;
2445 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
2446 yy_current_buffer->yy_n_chars = yy_n_chars;
2449 yy_current_buffer = new_buffer;
2450 yy_load_buffer_state();
2452 /* We don't actually know whether we did this switch during
2453 * EOF (yywrap()) processing, but the only time this flag
2454 * is looked at is after yywrap() is called, so it's safe
2455 * to go ahead and always set it.
2457 yy_did_buffer_switch_on_eof = 1;
2461 #ifdef YY_USE_PROTOS
2462 void yy_load_buffer_state( void )
2464 void yy_load_buffer_state()
2467 yy_n_chars = yy_current_buffer->yy_n_chars;
2468 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
2469 yyin = yy_current_buffer->yy_input_file;
2470 yy_hold_char = *yy_c_buf_p;
2474 #ifdef YY_USE_PROTOS
2475 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
2477 YY_BUFFER_STATE yy_create_buffer( file, size )
2484 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2486 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2488 b->yy_buf_size = size;
2490 /* yy_ch_buf has to be 2 characters longer than the size given because
2491 * we need to put in 2 end-of-buffer characters.
2493 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
2494 if ( ! b->yy_ch_buf )
2495 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2497 b->yy_is_our_buffer = 1;
2499 yy_init_buffer( b, file );
2505 #ifdef YY_USE_PROTOS
2506 void yy_delete_buffer( YY_BUFFER_STATE b )
2508 void yy_delete_buffer( b )
2515 if ( b == yy_current_buffer )
2516 yy_current_buffer = (YY_BUFFER_STATE) 0;
2518 if ( b->yy_is_our_buffer )
2519 yy_flex_free( (void *) b->yy_ch_buf );
2521 yy_flex_free( (void *) b );
2526 #ifdef YY_USE_PROTOS
2527 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
2529 void yy_init_buffer( b, file )
2536 yy_flush_buffer( b );
2538 b->yy_input_file = file;
2539 b->yy_fill_buffer = 1;
2541 #if YY_ALWAYS_INTERACTIVE
2542 b->yy_is_interactive = 1;
2544 #if YY_NEVER_INTERACTIVE
2545 b->yy_is_interactive = 0;
2547 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2553 #ifdef YY_USE_PROTOS
2554 void yy_flush_buffer( YY_BUFFER_STATE b )
2556 void yy_flush_buffer( b )
2566 /* We always need two end-of-buffer characters. The first causes
2567 * a transition to the end-of-buffer state. The second causes
2568 * a jam in that state.
2570 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2571 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2573 b->yy_buf_pos = &b->yy_ch_buf[0];
2576 b->yy_buffer_status = YY_BUFFER_NEW;
2578 if ( b == yy_current_buffer )
2579 yy_load_buffer_state();
2583 #ifndef YY_NO_SCAN_BUFFER
2584 #ifdef YY_USE_PROTOS
2585 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
2587 YY_BUFFER_STATE yy_scan_buffer( base, size )
2595 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2596 base[size-1] != YY_END_OF_BUFFER_CHAR )
2597 /* They forgot to leave room for the EOB's. */
2600 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2602 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2604 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2605 b->yy_buf_pos = b->yy_ch_buf = base;
2606 b->yy_is_our_buffer = 0;
2607 b->yy_input_file = 0;
2608 b->yy_n_chars = b->yy_buf_size;
2609 b->yy_is_interactive = 0;
2611 b->yy_fill_buffer = 0;
2612 b->yy_buffer_status = YY_BUFFER_NEW;
2614 yy_switch_to_buffer( b );
2621 #ifndef YY_NO_SCAN_STRING
2622 #ifdef YY_USE_PROTOS
2623 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
2625 YY_BUFFER_STATE yy_scan_string( yy_str )
2626 yyconst char *yy_str;
2630 for ( len = 0; yy_str[len]; ++len )
2633 return yy_scan_bytes( yy_str, len );
2638 #ifndef YY_NO_SCAN_BYTES
2639 #ifdef YY_USE_PROTOS
2640 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
2642 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
2643 yyconst char *bytes;
2652 /* Get memory for full buffer, including space for trailing EOB's. */
2654 buf = (char *) yy_flex_alloc( n );
2656 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2658 for ( i = 0; i < len; ++i )
2661 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
2663 b = yy_scan_buffer( buf, n );
2665 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2667 /* It's okay to grow etc. this buffer, and we should throw it
2668 * away when we're done.
2670 b->yy_is_our_buffer = 1;
2677 #ifndef YY_NO_PUSH_STATE
2678 #ifdef YY_USE_PROTOS
2679 static void yy_push_state( int new_state )
2681 static void yy_push_state( new_state )
2685 if ( yy_start_stack_ptr >= yy_start_stack_depth )
2689 yy_start_stack_depth += YY_START_STACK_INCR;
2690 new_size = yy_start_stack_depth * sizeof( int );
2692 if ( ! yy_start_stack )
2693 yy_start_stack = (int *) yy_flex_alloc( new_size );
2696 yy_start_stack = (int *) yy_flex_realloc(
2697 (void *) yy_start_stack, new_size );
2699 if ( ! yy_start_stack )
2701 "out of memory expanding start-condition stack" );
2704 yy_start_stack[yy_start_stack_ptr++] = YY_START;
2711 #ifndef YY_NO_POP_STATE
2712 static void yy_pop_state()
2714 if ( --yy_start_stack_ptr < 0 )
2715 YY_FATAL_ERROR( "start-condition stack underflow" );
2717 BEGIN(yy_start_stack[yy_start_stack_ptr]);
2722 #ifndef YY_NO_TOP_STATE
2723 static int yy_top_state()
2725 return yy_start_stack[yy_start_stack_ptr - 1];
2729 #ifndef YY_EXIT_FAILURE
2730 #define YY_EXIT_FAILURE 2
2733 #ifdef YY_USE_PROTOS
2734 static void yy_fatal_error( yyconst char msg[] )
2736 static void yy_fatal_error( msg )
2740 (void) fprintf( stderr, "%s\n", msg );
2741 exit( YY_EXIT_FAILURE );
2746 /* Redefine yyless() so it works in section 3 code. */
2752 /* Undo effects of setting up yytext. */ \
2753 yytext[yyleng] = yy_hold_char; \
2754 yy_c_buf_p = yytext + n; \
2755 yy_hold_char = *yy_c_buf_p; \
2756 *yy_c_buf_p = '\0'; \
2762 /* Internal utility routines. */
2765 #ifdef YY_USE_PROTOS
2766 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
2768 static void yy_flex_strncpy( s1, s2, n )
2775 for ( i = 0; i < n; ++i )
2780 #ifdef YY_NEED_STRLEN
2781 #ifdef YY_USE_PROTOS
2782 static int yy_flex_strlen( yyconst char *s )
2784 static int yy_flex_strlen( s )
2789 for ( n = 0; s[n]; ++n )
2797 #ifdef YY_USE_PROTOS
2798 static void *yy_flex_alloc( yy_size_t size )
2800 static void *yy_flex_alloc( size )
2804 return (void *) malloc( size );
2807 #ifdef YY_USE_PROTOS
2808 static void *yy_flex_realloc( void *ptr, yy_size_t size )
2810 static void *yy_flex_realloc( ptr, size )
2815 /* The cast to (char *) in the following accommodates both
2816 * implementations that use char* generic pointers, and those
2817 * that use void* generic pointers. It works with the latter
2818 * because both ANSI C and C++ allow castless assignment from
2819 * any pointer type to void*, and deal with argument conversions
2820 * as though doing an assignment.
2822 return (void *) realloc( (char *) ptr, size );
2825 #ifdef YY_USE_PROTOS
2826 static void yy_flex_free( void *ptr )
2828 static void yy_flex_free( ptr )
2842 #line 303 "swf5compiler.flex"
2844 static int getinput() {
2857 static void countline()
2859 if(sLineNumber != 0)
2860 msgline[column] = 0;
2864 msgline = msgbufs[sLineNumber & 1];
2867 static int LineNumber(void)
2869 return (sLineNumber + 1);
2872 static int ColumnNumber(void)
2877 static char *LineText(void)
2879 msgline[column] = 0;
2883 static void comment()
2885 // Handle block comments
2890 // We have the start of a comment so look skip everything up to the
2891 // end of the comment character
2892 while ((c = getinput()) != '*' && c != EOF)
2895 msgline[column] = c;
2899 // keep the line number in synch
2902 // start the output (matches the algorithim in the lexx above)
2906 if (swf5debug) putchar(c);
2909 // is this the end of comment character
2910 if ((c1 = getinput()) != '/' && c != EOF)
2912 // false start as this was no end of comment
2917 // write out the start of the end of comment
2919 if (swf5debug) putchar(c);
2921 // write out the end of the end of comment
2923 if (swf5debug) putchar(c1);
2926 static void comment1()
2928 // Handle comment of type 1 (ie '//')
2932 // this is a line comment
2933 while ((c = getinput()) != '\n' && c != EOF)
2935 if (swf5debug) putchar(c);
2938 msgline[column] = c;
2943 // keep the line number in synch
2946 if (swf5debug) putchar(c);
2952 static void count(void)
2956 // Count the characters to maintain the current column position
2957 if (yytext[0] == '\n')
2959 if (swf5debug) printf("\n");
2963 if (swf5debug) printf("%s", yytext);
2965 for(n=0; n<yyleng; ++n, ++column)
2968 msgline[column] = yytext[n];
2971 //-- keep writing the stuff to standard output
2976 static void printprog()
2979 SWF_warn("\n%s", msgbufs[(sLineNumber-1)&1]);
2982 msgline[column] = 0;
2984 SWF_warn("\n%s", msgline);
2987 static void warning(char *msg)
2989 // print a warning message
2991 SWF_warn("\n%*s", ColumnNumber(), "^");
2992 SWF_warn("\nLine %4.4d: Reason: '%s' \n", LineNumber(), msg);
2995 void swf5error(char *msg)
3000 SWF_error("\n%s\n%*s\nLine %i: Reason: '%s'\n",
3001 LineText(), ColumnNumber(), "^", LineNumber(), msg);
3005 SWF_error("\nLine %d: Reason: 'Unexpected EOF found while looking for input.'\n", LineNumber());