1 #line 2 "tokenizer.yy.c"
3 #line 4 "tokenizer.yy.c"
5 #define YY_INT_ALIGNED short int
7 /* A lexical scanner generated by flex */
9 #define yy_create_buffer as3__create_buffer
10 #define yy_delete_buffer as3__delete_buffer
11 #define yy_flex_debug as3__flex_debug
12 #define yy_init_buffer as3__init_buffer
13 #define yy_flush_buffer as3__flush_buffer
14 #define yy_load_buffer_state as3__load_buffer_state
15 #define yy_switch_to_buffer as3__switch_to_buffer
17 #define yyleng as3_leng
19 #define yylineno as3_lineno
21 #define yyrestart as3_restart
22 #define yytext as3_text
23 #define yywrap as3_wrap
24 #define yyalloc as3_alloc
25 #define yyrealloc as3_realloc
26 #define yyfree as3_free
29 #define YY_FLEX_MAJOR_VERSION 2
30 #define YY_FLEX_MINOR_VERSION 5
31 #define YY_FLEX_SUBMINOR_VERSION 35
32 #if YY_FLEX_SUBMINOR_VERSION > 0
36 /* First, we deal with platform-specific or compiler-specific issues. */
38 /* begin standard C headers. */
44 /* end standard C headers. */
46 /* flex integer type definitions */
51 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
53 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
55 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
56 * if you want the limit (max/min) macros for int types.
58 #ifndef __STDC_LIMIT_MACROS
59 #define __STDC_LIMIT_MACROS 1
63 typedef int8_t flex_int8_t;
64 typedef uint8_t flex_uint8_t;
65 typedef int16_t flex_int16_t;
66 typedef uint16_t flex_uint16_t;
67 typedef int32_t flex_int32_t;
68 typedef uint32_t flex_uint32_t;
70 typedef signed char flex_int8_t;
71 typedef short int flex_int16_t;
72 typedef int flex_int32_t;
73 typedef unsigned char flex_uint8_t;
74 typedef unsigned short int flex_uint16_t;
75 typedef unsigned int flex_uint32_t;
78 /* Limits of integral types. */
80 #define INT8_MIN (-128)
83 #define INT16_MIN (-32767-1)
86 #define INT32_MIN (-2147483647-1)
89 #define INT8_MAX (127)
92 #define INT16_MAX (32767)
95 #define INT32_MAX (2147483647)
98 #define UINT8_MAX (255U)
101 #define UINT16_MAX (65535U)
104 #define UINT32_MAX (4294967295U)
107 #endif /* ! FLEXINT_H */
111 /* The "const" storage-class-modifier is valid. */
114 #else /* ! __cplusplus */
116 /* C99 requires __STDC__ to be defined as 1. */
117 #if defined (__STDC__)
121 #endif /* defined (__STDC__) */
122 #endif /* ! __cplusplus */
125 #define yyconst const
130 /* Returned upon end-of-file. */
133 /* Promotes a possibly negative, possibly signed char to an unsigned
134 * integer for use as an array index. If the signed char is negative,
135 * we want to instead treat it as an 8-bit unsigned char, hence the
138 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
140 /* Enter a start condition. This macro really ought to take a parameter,
141 * but we do it the disgusting crufty way forced on us by the ()-less
142 * definition of BEGIN.
144 #define BEGIN (yy_start) = 1 + 2 *
146 /* Translate the current start state into a value that can be later handed
147 * to BEGIN to return to the state. The YYSTATE alias is for lex
150 #define YY_START (((yy_start) - 1) / 2)
151 #define YYSTATE YY_START
153 /* Action number for EOF rule of a given start state. */
154 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
156 /* Special action meaning "start processing a new file". */
157 #define YY_NEW_FILE as3_restart(as3_in )
159 #define YY_END_OF_BUFFER_CHAR 0
161 /* Size of default input buffer. */
163 #define YY_BUF_SIZE 16384
166 /* The state buf must be large enough to hold one state per character in the main buffer.
168 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
170 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
171 #define YY_TYPEDEF_YY_BUFFER_STATE
172 typedef struct yy_buffer_state *YY_BUFFER_STATE;
177 extern FILE *as3_in, *as3_out;
179 #define EOB_ACT_CONTINUE_SCAN 0
180 #define EOB_ACT_END_OF_FILE 1
181 #define EOB_ACT_LAST_MATCH 2
183 #define YY_LESS_LINENO(n)
185 /* Return all but the first "n" matched characters back to the input stream. */
189 /* Undo effects of setting up as3_text. */ \
190 int yyless_macro_arg = (n); \
191 YY_LESS_LINENO(yyless_macro_arg);\
192 *yy_cp = (yy_hold_char); \
193 YY_RESTORE_YY_MORE_OFFSET \
194 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
195 YY_DO_BEFORE_ACTION; /* set up as3_text again */ \
199 #define unput(c) yyunput( c, (yytext_ptr) )
201 #ifndef YY_TYPEDEF_YY_SIZE_T
202 #define YY_TYPEDEF_YY_SIZE_T
203 typedef size_t yy_size_t;
206 #ifndef YY_STRUCT_YY_BUFFER_STATE
207 #define YY_STRUCT_YY_BUFFER_STATE
208 struct yy_buffer_state
212 char *yy_ch_buf; /* input buffer */
213 char *yy_buf_pos; /* current position in input buffer */
215 /* Size of input buffer in bytes, not including room for EOB
218 yy_size_t yy_buf_size;
220 /* Number of characters read into yy_ch_buf, not including EOB
225 /* Whether we "own" the buffer - i.e., we know we created it,
226 * and can realloc() it to grow it, and should free() it to
229 int yy_is_our_buffer;
231 /* Whether this is an "interactive" input source; if so, and
232 * if we're using stdio for input, then we want to use getc()
233 * instead of fread(), to make sure we stop fetching input after
236 int yy_is_interactive;
238 /* Whether we're considered to be at the beginning of a line.
239 * If so, '^' rules will be active on the next match, otherwise
244 int yy_bs_lineno; /**< The line count. */
245 int yy_bs_column; /**< The column count. */
247 /* Whether to try to fill the input buffer when we reach the
252 int yy_buffer_status;
254 #define YY_BUFFER_NEW 0
255 #define YY_BUFFER_NORMAL 1
256 /* When an EOF's been seen but there's still some text to process
257 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
258 * shouldn't try reading from the input source any more. We might
259 * still have a bunch of tokens to match, though, because of
260 * possible backing-up.
262 * When we actually see the EOF, we change the status to "new"
263 * (via as3_restart()), so that the user can continue scanning by
264 * just pointing as3_in at a new input file.
266 #define YY_BUFFER_EOF_PENDING 2
269 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
271 /* Stack of input buffers. */
272 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
273 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
274 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
276 /* We provide macros for accessing buffer states in case in the
277 * future we want to put the buffer states in a more general
280 * Returns the top of the stack, or NULL.
282 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
283 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
286 /* Same as previous macro, but useful when we know that the buffer stack is not
287 * NULL or when we need an lvalue. For internal use only.
289 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
291 /* yy_hold_char holds the character lost when as3_text is formed. */
292 static char yy_hold_char;
293 static int yy_n_chars; /* number of characters read into yy_ch_buf */
296 /* Points to current character in buffer. */
297 static char *yy_c_buf_p = (char *) 0;
298 static int yy_init = 0; /* whether we need to initialize */
299 static int yy_start = 0; /* start state number */
301 /* Flag which is used to allow as3_wrap()'s to do buffer switches
302 * instead of setting up a fresh as3_in. A bit of a hack ...
304 static int yy_did_buffer_switch_on_eof;
306 void as3_restart (FILE *input_file );
307 void as3__switch_to_buffer (YY_BUFFER_STATE new_buffer );
308 YY_BUFFER_STATE as3__create_buffer (FILE *file,int size );
309 void as3__delete_buffer (YY_BUFFER_STATE b );
310 void as3__flush_buffer (YY_BUFFER_STATE b );
311 void as3_push_buffer_state (YY_BUFFER_STATE new_buffer );
312 void as3_pop_buffer_state (void );
314 static void as3_ensure_buffer_stack (void );
315 static void as3__load_buffer_state (void );
316 static void as3__init_buffer (YY_BUFFER_STATE b,FILE *file );
318 #define YY_FLUSH_BUFFER as3__flush_buffer(YY_CURRENT_BUFFER )
320 YY_BUFFER_STATE as3__scan_buffer (char *base,yy_size_t size );
321 YY_BUFFER_STATE as3__scan_string (yyconst char *yy_str );
322 YY_BUFFER_STATE as3__scan_bytes (yyconst char *bytes,int len );
324 void *as3_alloc (yy_size_t );
325 void *as3_realloc (void *,yy_size_t );
326 void as3_free (void * );
328 #define yy_new_buffer as3__create_buffer
330 #define yy_set_interactive(is_interactive) \
332 if ( ! YY_CURRENT_BUFFER ){ \
333 as3_ensure_buffer_stack (); \
334 YY_CURRENT_BUFFER_LVALUE = \
335 as3__create_buffer(as3_in,YY_BUF_SIZE ); \
337 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
340 #define yy_set_bol(at_bol) \
342 if ( ! YY_CURRENT_BUFFER ){\
343 as3_ensure_buffer_stack (); \
344 YY_CURRENT_BUFFER_LVALUE = \
345 as3__create_buffer(as3_in,YY_BUF_SIZE ); \
347 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
350 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
352 /* Begin user sect3 */
354 typedef unsigned char YY_CHAR;
356 FILE *as3_in = (FILE *) 0, *as3_out = (FILE *) 0;
358 typedef int yy_state_type;
360 extern int as3_lineno;
364 extern char *as3_text;
365 #define yytext_ptr as3_text
367 static yy_state_type yy_get_previous_state (void );
368 static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
369 static int yy_get_next_buffer (void );
370 static void yy_fatal_error (yyconst char msg[] );
372 /* Done after the current pattern has been matched and before the
373 * corresponding action - sets up as3_text.
375 #define YY_DO_BEFORE_ACTION \
376 (yytext_ptr) = yy_bp; \
377 as3_leng = (size_t) (yy_cp - yy_bp); \
378 (yy_hold_char) = *yy_cp; \
380 (yy_c_buf_p) = yy_cp;
382 #define YY_NUM_RULES 107
383 #define YY_END_OF_BUFFER 108
384 /* This struct is not used in this scanner,
385 but its presence is necessary. */
388 flex_int32_t yy_verify;
391 static yyconst flex_int16_t yy_accept[483] =
393 0, 0, 0, 0, 0, 0, 108, 106, 14, 14,
394 104, 106, 104, 104, 104, 106, 105, 104, 104, 104,
395 52, 104, 17, 17, 17, 54, 104, 104, 104, 103,
396 104, 103, 103, 103, 103, 103, 103, 103, 103, 103,
397 103, 103, 103, 103, 103, 103, 103, 103, 104, 106,
398 103, 104, 104, 52, 104, 11, 11, 11, 30, 0,
399 6, 0, 41, 28, 0, 0, 42, 37, 38, 36,
400 39, 51, 18, 3, 0, 40, 18, 17, 0, 0,
401 53, 0, 47, 35, 33, 34, 49, 0, 103, 0,
402 102, 103, 103, 103, 103, 103, 25, 103, 103, 103,
404 103, 103, 103, 103, 103, 103, 101, 103, 100, 99,
405 103, 103, 103, 103, 103, 103, 103, 103, 103, 103,
406 103, 103, 103, 103, 103, 103, 103, 103, 103, 103,
407 103, 43, 29, 0, 100, 0, 11, 11, 12, 0,
408 3, 8, 40, 0, 12, 11, 0, 31, 50, 0,
409 0, 0, 0, 0, 1, 18, 16, 15, 0, 0,
410 45, 32, 44, 48, 0, 0, 0, 0, 0, 103,
411 103, 103, 103, 103, 103, 103, 103, 103, 103, 103,
412 103, 103, 24, 103, 95, 103, 103, 103, 103, 103,
413 94, 103, 103, 103, 103, 103, 103, 103, 96, 103,
415 103, 103, 103, 103, 98, 103, 103, 93, 97, 103,
416 103, 103, 13, 103, 12, 12, 0, 8, 0, 0,
417 0, 8, 0, 8, 8, 12, 10, 9, 0, 0,
418 0, 2, 0, 16, 0, 0, 46, 0, 0, 0,
419 0, 103, 91, 103, 103, 103, 103, 103, 103, 103,
420 86, 90, 103, 103, 103, 103, 103, 103, 103, 103,
421 103, 103, 89, 103, 103, 103, 103, 103, 103, 103,
422 103, 103, 103, 88, 103, 103, 87, 103, 92, 103,
423 12, 10, 9, 8, 0, 8, 0, 0, 2, 0,
424 8, 8, 10, 0, 2, 19, 0, 21, 0, 0,
426 0, 84, 81, 79, 80, 103, 103, 103, 103, 103,
427 83, 82, 103, 103, 103, 103, 103, 103, 103, 103,
428 103, 103, 103, 103, 103, 103, 85, 103, 78, 103,
429 103, 26, 103, 10, 0, 0, 2, 0, 8, 8,
430 0, 20, 0, 0, 103, 103, 71, 103, 103, 103,
431 103, 103, 76, 103, 103, 103, 103, 74, 103, 103,
432 103, 103, 73, 72, 75, 27, 77, 103, 103, 8,
433 0, 0, 0, 103, 66, 69, 70, 65, 103, 103,
434 103, 103, 103, 103, 103, 67, 68, 103, 103, 103,
435 8, 0, 0, 22, 61, 64, 103, 103, 103, 63,
437 103, 62, 103, 103, 0, 0, 23, 103, 103, 57,
438 58, 59, 60, 0, 0, 0, 0, 0, 0, 56,
439 55, 0, 5, 0, 0, 0, 0, 0, 0, 0,
440 0, 0, 0, 0, 0, 5, 0, 0, 0, 0,
441 0, 0, 0, 4, 0, 0, 4, 0, 5, 0,
442 0, 0, 0, 7, 0, 21, 5, 21, 21, 0,
443 0, 0, 7, 0, 20, 5, 20, 20, 0, 0,
444 0, 0, 0, 22, 5, 22, 22, 23, 5, 23,
448 static yyconst flex_int32_t yy_ec[256] =
450 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
451 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
452 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
453 1, 4, 5, 6, 7, 8, 9, 10, 11, 8,
454 12, 13, 14, 8, 15, 16, 17, 18, 19, 19,
455 20, 19, 19, 19, 19, 19, 19, 21, 8, 22,
456 23, 24, 8, 8, 25, 26, 27, 28, 26, 26,
457 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
458 26, 26, 26, 29, 26, 26, 26, 26, 26, 26,
459 30, 31, 32, 8, 33, 7, 34, 35, 36, 37,
461 38, 39, 40, 41, 42, 26, 43, 44, 45, 46,
462 47, 48, 26, 49, 50, 51, 52, 53, 54, 55,
463 56, 26, 8, 57, 8, 8, 7, 7, 7, 7,
464 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
465 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
466 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
467 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
468 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
469 7, 7, 7, 7, 7, 7, 58, 7, 7, 7,
470 59, 7, 7, 7, 7, 7, 7, 7, 7, 7,
472 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
473 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
474 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
475 7, 7, 7, 7, 7, 7, 7, 7, 60, 7,
476 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
480 static yyconst flex_int32_t yy_meta[61] =
482 1, 2, 3, 2, 4, 4, 4, 4, 4, 4,
483 4, 4, 4, 4, 4, 5, 4, 6, 6, 6,
484 2, 4, 4, 4, 7, 7, 7, 7, 7, 4,
485 8, 4, 8, 7, 7, 7, 7, 7, 7, 7,
486 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
487 7, 7, 7, 7, 7, 7, 4, 4, 4, 4
490 static yyconst flex_int16_t yy_base[511] =
492 0, 526, 47, 54, 61, 68, 567, 2566, 2566, 2566,
493 542, 83, 2566, 537, 545, 80, 2566, 522, 76, 77,
494 85, 85, 97, 102, 107, 523, 107, 506, 70, 129,
495 2566, 132, 136, 139, 142, 163, 167, 172, 192, 170,
496 181, 198, 201, 217, 231, 109, 169, 215, 101, 465,
497 476, 270, 276, 282, 213, 287, 292, 297, 495, 131,
498 2566, 509, 2566, 2566, 150, 504, 2566, 2566, 2566, 2566,
499 2566, 489, 159, 189, 494, 2566, 256, 302, 472, 435,
500 2566, 448, 450, 2566, 442, 2566, 83, 322, 284, 329,
501 299, 302, 311, 317, 326, 336, 328, 345, 353, 355,
503 363, 371, 373, 381, 383, 393, 395, 403, 411, 413,
504 421, 429, 441, 431, 453, 448, 459, 462, 468, 474,
505 483, 490, 494, 505, 506, 522, 528, 529, 543, 545,
506 549, 2566, 2566, 405, 563, 317, 587, 599, 335, 78,
507 609, 640, 210, 229, 417, 605, 439, 2566, 2566, 626,
508 631, 634, 437, 444, 2566, 531, 0, 430, 406, 379,
509 2566, 2566, 2566, 381, 660, 349, 346, 334, 346, 607,
510 664, 671, 488, 543, 670, 686, 685, 700, 697, 712,
511 607, 706, 709, 721, 728, 732, 735, 747, 754, 756,
512 763, 770, 777, 789, 786, 793, 808, 809, 812, 815,
514 831, 829, 840, 851, 852, 863, 874, 872, 875, 886,
515 895, 902, 2566, 906, 652, 912, 369, 0, 954, 959,
516 962, 360, 967, 0, 998, 963, 0, 354, 134, 1058,
517 1061, 346, 1064, 0, 311, 330, 2566, 0, 290, 286,
518 285, 944, 1038, 1041, 845, 1050, 1045, 1052, 1064, 1063,
519 1073, 1075, 1083, 1092, 1095, 1104, 1113, 1121, 1122, 1131,
520 1136, 1145, 1154, 1157, 1145, 1167, 1174, 1171, 1183, 1186,
521 1195, 1207, 1206, 1221, 1222, 1200, 1226, 1239, 1236, 1245,
522 1050, 0, 303, 0, 394, 1297, 1357, 1360, 297, 1363,
523 1394, 0, 0, 1366, 2566, 2566, 284, 2566, 0, 253,
525 253, 1421, 1422, 1423, 1424, 1336, 1433, 1442, 1448, 1452,
526 1451, 1463, 1467, 1339, 1467, 1477, 1485, 1493, 1506, 1495,
527 1506, 1515, 1527, 1534, 1532, 1544, 1546, 1554, 1562, 1564,
528 1564, 1571, 1583, 0, 1625, 1630, 0, 1638, 0, 0,
529 253, 2566, 243, 232, 1602, 1611, 1618, 1630, 1628, 1640,
530 1641, 1642, 1653, 1665, 1664, 1668, 1679, 1680, 1691, 1702,
531 1703, 1700, 1714, 1723, 1725, 1726, 1729, 1658, 1741, 246,
532 229, 211, 0, 1744, 1753, 1756, 1765, 1768, 1777, 1780,
533 1790, 1798, 1806, 1818, 1820, 1828, 1830, 1843, 1845, 1858,
534 212, 190, 0, 2566, 1883, 1894, 1897, 1860, 1872, 1869,
536 1875, 1886, 1889, 1895, 1947, 173, 2566, 1915, 1917, 1925,
537 1927, 1935, 1937, 1144, 193, 1987, 1990, 155, 136, 1956,
538 1958, 1291, 1457, 1829, 1941, 194, 2007, 146, 250, 2010,
539 2021, 2032, 2013, 2044, 2035, 2047, 2053, 2057, 2062, 2065,
540 2073, 140, 2076, 2079, 125, 2091, 2096, 2108, 2113, 2144,
541 2123, 2127, 2131, 2566, 234, 2118, 2134, 2137, 2160, 2204,
542 2178, 2186, 87, 253, 2175, 2181, 2189, 2192, 2195, 2220,
543 2235, 2276, 2336, 2238, 2241, 2244, 2247, 2250, 2253, 2263,
544 2266, 2566, 2396, 2404, 2411, 2419, 2427, 2435, 2439, 2446,
545 2450, 2457, 2460, 2463, 90, 2470, 2473, 2480, 2488, 2488,
547 2495, 2503, 2508, 2513, 2518, 2526, 2533, 2541, 2549, 2557
550 static yyconst flex_int16_t yy_def[511] =
552 482, 1, 1, 1, 1, 1, 482, 482, 482, 482,
553 482, 483, 482, 482, 482, 484, 482, 482, 482, 482,
554 482, 482, 482, 482, 482, 482, 482, 482, 482, 485,
555 482, 485, 485, 485, 485, 485, 485, 485, 485, 37,
556 37, 37, 37, 37, 37, 39, 37, 37, 482, 482,
557 39, 482, 482, 482, 486, 482, 482, 482, 482, 483,
558 482, 483, 482, 482, 484, 484, 482, 482, 482, 482,
559 482, 482, 482, 487, 488, 482, 482, 482, 489, 482,
560 482, 482, 482, 482, 482, 482, 482, 482, 39, 482,
561 39, 39, 39, 37, 39, 39, 39, 39, 39, 39,
563 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
564 39, 39, 39, 39, 39, 37, 37, 37, 37, 37,
565 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
566 37, 482, 482, 482, 39, 482, 482, 482, 482, 486,
567 490, 488, 486, 486, 482, 482, 491, 482, 482, 487,
568 487, 492, 482, 488, 482, 482, 493, 489, 482, 482,
569 482, 482, 482, 482, 482, 482, 482, 482, 482, 37,
570 37, 37, 39, 39, 37, 37, 37, 37, 37, 37,
571 39, 37, 37, 37, 37, 37, 37, 37, 37, 37,
572 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
574 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
575 37, 37, 482, 37, 482, 482, 494, 495, 490, 490,
576 496, 495, 490, 142, 482, 482, 497, 491, 498, 487,
577 492, 482, 487, 493, 482, 482, 482, 499, 482, 482,
578 482, 37, 37, 37, 39, 39, 37, 37, 37, 39,
579 39, 39, 39, 39, 39, 39, 39, 39, 37, 37,
580 39, 39, 39, 39, 37, 37, 37, 37, 37, 37,
581 37, 37, 37, 37, 37, 39, 39, 39, 39, 37,
582 482, 500, 494, 495, 501, 482, 490, 496, 495, 490,
583 482, 225, 497, 487, 482, 482, 482, 482, 502, 482,
585 482, 37, 37, 37, 37, 39, 39, 39, 37, 37,
586 37, 37, 37, 39, 39, 39, 39, 39, 39, 37,
587 37, 37, 37, 37, 39, 39, 39, 39, 39, 39,
588 37, 37, 37, 500, 490, 490, 495, 490, 286, 291,
589 482, 482, 482, 482, 37, 37, 37, 37, 39, 39,
590 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
591 37, 37, 37, 37, 37, 37, 37, 39, 39, 225,
592 482, 482, 503, 39, 39, 39, 39, 39, 39, 39,
593 39, 39, 39, 39, 39, 39, 39, 39, 39, 485,
594 286, 482, 504, 482, 485, 485, 485, 37, 37, 37,
596 37, 37, 37, 37, 505, 506, 482, 39, 39, 39,
597 39, 39, 39, 507, 508, 509, 507, 506, 506, 39,
598 39, 482, 482, 507, 507, 508, 482, 508, 510, 510,
599 509, 509, 507, 509, 482, 482, 507, 507, 507, 507,
600 507, 506, 482, 482, 510, 482, 482, 507, 510, 507,
601 507, 507, 507, 482, 506, 482, 482, 507, 507, 507,
602 507, 507, 506, 506, 482, 482, 507, 507, 507, 507,
603 507, 507, 507, 482, 482, 507, 507, 482, 482, 507,
604 507, 0, 482, 482, 482, 482, 482, 482, 482, 482,
605 482, 482, 482, 482, 482, 482, 482, 482, 482, 482,
607 482, 482, 482, 482, 482, 482, 482, 482, 482, 482
610 static yyconst flex_int16_t yy_nxt[2627] =
612 8, 9, 10, 9, 11, 12, 8, 13, 14, 15,
613 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
614 26, 27, 28, 29, 30, 30, 30, 30, 30, 13,
615 8, 31, 30, 32, 33, 34, 35, 36, 37, 38,
616 30, 39, 30, 30, 30, 40, 41, 42, 43, 44,
617 45, 46, 47, 48, 30, 30, 49, 8, 8, 50,
618 52, 53, 54, 55, 56, 57, 58, 52, 53, 54,
619 55, 56, 57, 58, 52, 53, 54, 55, 56, 57,
620 58, 52, 53, 54, 55, 56, 57, 58, 61, 68,
621 61, 70, 86, 87, 218, 51, 284, 74, 69, 71,
623 72, 75, 73, 73, 73, 163, 164, 76, 144, 51,
624 66, 82, 77, 62, 78, 78, 78, 77, 419, 78,
625 78, 78, 77, 132, 78, 78, 78, 429, 83, 84,
626 88, 88, 88, 88, 88, 88, 61, 88, 88, 88,
627 88, 88, 88, 88, 88, 88, 294, 89, 426, 90,
628 295, 79, 90, 89, 126, 80, 90, 133, 127, 90,
629 61, 62, 90, 454, 88, 88, 88, 442, 88, 88,
630 88, 455, 93, 88, 88, 88, 73, 73, 73, 96,
631 66, 91, 94, 90, 92, 95, 419, 90, 97, 150,
632 150, 150, 90, 88, 88, 88, 99, 98, 427, 427,
634 102, 152, 128, 111, 419, 153, 100, 112, 103, 106,
635 89, 89, 90, 104, 89, 129, 89, 101, 105, 406,
636 89, 113, 89, 428, 428, 141, 218, 89, 153, 142,
637 107, 115, 89, 114, 89, 143, 108, 109, 118, 89,
638 144, 110, 89, 144, 89, 225, 116, 89, 89, 117,
639 89, 393, 89, 392, 119, 130, 131, 463, 89, 144,
640 427, 89, 391, 89, 89, 464, 89, 120, 121, 373,
641 122, 123, 89, 156, 156, 156, 463, 89, 372, 124,
642 445, 371, 89, 68, 442, 136, 125, 137, 138, 138,
643 70, 136, 69, 137, 138, 138, 344, 72, 71, 139,
645 139, 139, 145, 343, 146, 146, 146, 145, 341, 146,
646 146, 146, 145, 233, 146, 146, 146, 77, 282, 78,
647 78, 78, 89, 88, 88, 88, 301, 300, 89, 89,
648 165, 165, 165, 89, 215, 215, 215, 89, 299, 170,
649 89, 147, 90, 89, 89, 80, 89, 89, 89, 89,
650 173, 89, 139, 139, 139, 89, 89, 297, 89, 296,
651 171, 172, 233, 89, 89, 166, 89, 167, 89, 227,
652 89, 174, 89, 89, 175, 89, 233, 89, 168, 176,
653 89, 89, 169, 89, 282, 89, 241, 240, 178, 89,
654 177, 89, 239, 89, 89, 238, 233, 89, 89, 89,
656 89, 89, 89, 237, 179, 236, 336, 89, 89, 89,
657 337, 89, 89, 180, 181, 89, 89, 89, 182, 89,
658 89, 89, 89, 235, 338, 89, 89, 89, 184, 183,
659 89, 89, 89, 89, 226, 226, 226, 89, 89, 89,
660 89, 89, 89, 185, 89, 157, 155, 89, 89, 89,
661 186, 89, 89, 233, 227, 89, 89, 89, 89, 89,
662 187, 188, 89, 213, 162, 189, 89, 89, 193, 89,
663 89, 190, 161, 89, 89, 89, 89, 160, 89, 89,
664 89, 89, 191, 159, 192, 89, 89, 157, 194, 195,
665 89, 89, 89, 197, 196, 89, 155, 89, 89, 89,
667 89, 89, 89, 89, 149, 89, 65, 200, 89, 89,
668 89, 60, 198, 89, 89, 89, 89, 148, 199, 89,
669 89, 135, 134, 89, 89, 89, 89, 89, 85, 89,
670 201, 202, 89, 89, 89, 89, 89, 245, 89, 89,
671 89, 89, 203, 81, 67, 89, 89, 89, 156, 156,
672 156, 89, 89, 206, 64, 89, 204, 89, 207, 63,
673 205, 89, 89, 89, 59, 208, 482, 51, 89, 89,
674 89, 482, 482, 89, 89, 89, 89, 209, 89, 89,
675 89, 89, 89, 482, 210, 482, 211, 89, 89, 89,
676 89, 89, 246, 247, 89, 89, 89, 482, 214, 212,
678 89, 89, 216, 482, 138, 138, 138, 89, 89, 219,
679 219, 150, 187, 188, 216, 482, 138, 138, 138, 482,
680 145, 221, 146, 146, 146, 222, 150, 150, 150, 482,
681 482, 150, 150, 150, 230, 230, 230, 482, 229, 223,
682 242, 217, 155, 229, 482, 89, 231, 482, 89, 482,
683 232, 89, 89, 89, 482, 482, 254, 482, 89, 482,
684 482, 165, 165, 165, 224, 224, 224, 224, 224, 215,
685 215, 215, 482, 224, 224, 224, 224, 224, 224, 224,
686 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
687 224, 224, 224, 224, 224, 224, 166, 89, 167, 482,
689 482, 243, 482, 248, 89, 89, 244, 482, 482, 168,
690 89, 89, 89, 169, 482, 89, 89, 89, 250, 89,
691 482, 89, 89, 249, 482, 482, 89, 89, 482, 482,
692 89, 89, 89, 89, 252, 482, 89, 89, 89, 255,
693 251, 89, 89, 89, 482, 89, 89, 89, 89, 253,
694 89, 89, 89, 89, 89, 89, 256, 89, 89, 482,
695 89, 89, 89, 89, 482, 89, 482, 89, 89, 89,
696 482, 482, 89, 89, 89, 257, 89, 482, 258, 89,
697 89, 89, 482, 89, 260, 259, 89, 89, 89, 89,
698 482, 261, 482, 89, 482, 89, 89, 262, 89, 482,
700 89, 482, 89, 89, 89, 89, 482, 89, 482, 89,
701 89, 89, 482, 263, 89, 482, 89, 482, 89, 89,
702 482, 89, 89, 89, 482, 264, 89, 89, 89, 482,
703 89, 265, 89, 482, 89, 89, 482, 89, 266, 89,
704 89, 89, 89, 267, 89, 89, 482, 482, 89, 89,
705 89, 268, 482, 89, 89, 89, 89, 482, 89, 89,
706 269, 89, 89, 89, 89, 270, 89, 482, 271, 482,
707 89, 482, 89, 89, 482, 89, 482, 89, 482, 272,
708 89, 89, 89, 89, 89, 89, 273, 482, 274, 89,
709 89, 89, 89, 89, 304, 482, 89, 89, 89, 482,
711 275, 482, 89, 89, 89, 89, 482, 89, 89, 89,
712 482, 276, 482, 89, 89, 89, 89, 482, 89, 89,
713 89, 89, 277, 89, 482, 89, 89, 89, 89, 281,
714 281, 281, 89, 482, 482, 89, 89, 89, 278, 89,
715 482, 89, 279, 89, 482, 482, 89, 89, 89, 280,
716 482, 482, 89, 89, 219, 219, 150, 89, 482, 219,
717 219, 150, 287, 287, 230, 482, 285, 219, 219, 150,
718 286, 285, 482, 482, 288, 286, 482, 89, 289, 285,
719 226, 226, 226, 291, 223, 89, 302, 482, 482, 223,
720 89, 482, 290, 482, 482, 89, 482, 223, 140, 140,
722 482, 140, 140, 140, 140, 140, 140, 140, 140, 140,
723 140, 140, 140, 140, 218, 140, 140, 140, 140, 140,
724 140, 140, 292, 292, 292, 292, 292, 140, 144, 140,
725 140, 292, 292, 292, 292, 292, 292, 292, 292, 292,
726 292, 292, 292, 292, 292, 292, 292, 292, 292, 292,
727 292, 292, 292, 292, 140, 140, 140, 140, 150, 150,
728 150, 230, 230, 230, 150, 150, 150, 281, 281, 281,
729 229, 89, 482, 231, 89, 482, 229, 232, 89, 89,
730 153, 303, 89, 482, 89, 89, 306, 89, 89, 89,
731 482, 89, 89, 89, 89, 89, 89, 89, 89, 89,
733 305, 89, 482, 307, 482, 89, 482, 309, 89, 482,
734 89, 89, 89, 89, 308, 89, 482, 89, 89, 89,
735 89, 89, 89, 482, 89, 482, 482, 89, 310, 311,
736 89, 482, 89, 89, 482, 482, 89, 89, 312, 89,
737 89, 89, 89, 482, 89, 422, 423, 424, 89, 89,
738 314, 89, 482, 89, 313, 316, 482, 89, 89, 89,
739 482, 482, 89, 89, 89, 89, 89, 482, 89, 315,
740 89, 482, 89, 89, 89, 482, 482, 89, 321, 317,
741 89, 89, 89, 89, 482, 318, 89, 482, 482, 89,
742 89, 89, 89, 482, 89, 89, 89, 319, 89, 89,
744 322, 89, 89, 89, 89, 320, 89, 89, 89, 482,
745 482, 323, 324, 89, 482, 89, 89, 89, 89, 89,
746 89, 482, 89, 482, 89, 89, 482, 326, 89, 89,
747 482, 325, 89, 482, 89, 482, 89, 89, 331, 89,
748 89, 89, 328, 327, 89, 89, 89, 89, 89, 89,
749 482, 482, 89, 89, 89, 89, 482, 89, 89, 329,
750 482, 482, 89, 89, 89, 482, 482, 89, 330, 482,
751 89, 89, 89, 89, 89, 89, 332, 89, 89, 482,
752 89, 89, 482, 89, 89, 89, 89, 482, 89, 482,
753 482, 89, 422, 423, 422, 482, 333, 150, 150, 150,
755 151, 151, 151, 151, 151, 151, 151, 151, 151, 229,
756 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
757 151, 339, 339, 339, 339, 339, 151, 151, 151, 151,
758 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
759 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
760 339, 339, 339, 151, 151, 151, 151, 219, 219, 150,
761 287, 287, 230, 219, 219, 150, 150, 150, 150, 285,
762 482, 482, 288, 286, 89, 285, 289, 89, 229, 291,
763 89, 345, 232, 352, 89, 89, 482, 223, 89, 482,
764 290, 482, 482, 223, 219, 219, 150, 220, 220, 220,
766 220, 220, 220, 220, 220, 220, 285, 220, 220, 220,
767 286, 220, 220, 220, 220, 220, 220, 220, 340, 340,
768 340, 340, 340, 220, 223, 220, 220, 340, 340, 340,
769 340, 340, 340, 340, 340, 340, 340, 340, 340, 340,
770 340, 340, 340, 340, 340, 340, 340, 340, 340, 340,
771 220, 220, 220, 220, 89, 89, 89, 89, 422, 423,
772 422, 482, 89, 89, 89, 89, 482, 89, 89, 89,
773 89, 89, 89, 89, 89, 89, 346, 89, 89, 347,
774 89, 89, 89, 482, 89, 89, 89, 89, 349, 348,
775 482, 89, 89, 89, 89, 482, 89, 89, 89, 89,
777 89, 482, 89, 89, 89, 89, 350, 482, 351, 89,
778 482, 89, 89, 89, 89, 89, 89, 353, 89, 482,
779 482, 89, 354, 355, 482, 482, 89, 482, 89, 89,
780 356, 89, 482, 482, 89, 482, 359, 89, 89, 89,
781 357, 89, 89, 358, 89, 360, 89, 89, 89, 482,
782 89, 89, 89, 482, 482, 89, 89, 89, 482, 482,
783 89, 89, 362, 482, 482, 361, 89, 89, 89, 363,
784 89, 482, 482, 89, 482, 89, 89, 364, 89, 365,
785 89, 89, 89, 482, 89, 89, 482, 482, 89, 89,
786 89, 89, 89, 89, 366, 89, 482, 89, 89, 89,
788 89, 482, 367, 89, 89, 368, 89, 89, 89, 89,
789 89, 89, 89, 89, 482, 89, 89, 89, 482, 369,
790 482, 482, 89, 482, 89, 219, 219, 150, 482, 89,
791 219, 219, 150, 482, 89, 89, 482, 285, 219, 219,
792 150, 222, 285, 89, 89, 482, 289, 482, 89, 482,
793 285, 89, 89, 374, 370, 223, 482, 89, 482, 89,
794 223, 375, 89, 89, 89, 376, 89, 482, 223, 89,
795 482, 89, 89, 89, 89, 89, 89, 377, 89, 380,
796 482, 89, 89, 89, 89, 89, 89, 379, 89, 89,
797 482, 482, 89, 89, 89, 378, 89, 382, 89, 89,
799 381, 383, 89, 389, 89, 89, 89, 89, 482, 89,
800 89, 89, 384, 89, 89, 89, 89, 482, 482, 89,
801 89, 89, 482, 482, 89, 89, 89, 385, 482, 482,
802 89, 89, 89, 89, 482, 89, 89, 89, 482, 386,
803 387, 89, 89, 89, 89, 482, 89, 89, 89, 89,
804 388, 89, 482, 89, 89, 89, 89, 482, 89, 89,
805 89, 482, 89, 482, 89, 89, 89, 89, 482, 89,
806 89, 89, 89, 482, 89, 89, 89, 89, 390, 89,
807 89, 395, 89, 482, 482, 89, 89, 482, 89, 89,
808 89, 89, 482, 89, 89, 482, 482, 89, 89, 482,
810 89, 89, 89, 89, 482, 89, 89, 482, 482, 89,
811 89, 482, 89, 89, 89, 89, 482, 89, 89, 482,
812 482, 89, 396, 482, 89, 397, 89, 398, 89, 89,
813 422, 423, 424, 399, 89, 89, 89, 482, 482, 89,
814 482, 482, 89, 89, 89, 482, 482, 89, 482, 400,
815 89, 89, 482, 401, 482, 89, 89, 402, 89, 405,
816 405, 405, 89, 89, 89, 89, 89, 89, 89, 89,
817 482, 482, 89, 89, 89, 89, 482, 89, 90, 89,
818 403, 89, 404, 89, 88, 88, 88, 89, 89, 89,
819 89, 482, 89, 89, 89, 88, 88, 88, 88, 88,
821 88, 89, 89, 90, 482, 89, 409, 482, 89, 410,
822 89, 89, 411, 89, 90, 89, 89, 90, 89, 89,
823 89, 89, 89, 89, 482, 412, 89, 89, 89, 482,
824 89, 413, 89, 482, 482, 89, 89, 89, 482, 482,
825 89, 89, 422, 423, 424, 482, 89, 408, 405, 405,
826 405, 482, 415, 89, 482, 421, 482, 416, 482, 89,
827 89, 89, 89, 89, 420, 89, 89, 417, 482, 89,
828 89, 89, 89, 89, 89, 89, 89, 482, 482, 89,
829 89, 89, 89, 482, 89, 482, 89, 429, 430, 423,
830 431, 435, 436, 437, 89, 482, 89, 433, 482, 482,
832 89, 89, 89, 89, 482, 89, 482, 89, 443, 444,
833 443, 430, 423, 430, 446, 447, 448, 434, 482, 482,
834 427, 429, 430, 423, 431, 482, 438, 482, 439, 482,
835 482, 433, 429, 430, 423, 431, 435, 436, 435, 440,
836 445, 482, 433, 441, 429, 430, 449, 431, 435, 436,
837 435, 434, 482, 482, 435, 436, 437, 482, 422, 423,
838 424, 482, 434, 422, 423, 424, 422, 423, 424, 482,
839 482, 166, 482, 167, 422, 423, 424, 443, 444, 443,
840 443, 444, 443, 166, 168, 167, 482, 482, 169, 438,
841 482, 439, 446, 447, 446, 482, 168, 446, 447, 446,
843 169, 482, 440, 450, 482, 482, 441, 482, 451, 446,
844 447, 448, 482, 453, 430, 423, 430, 482, 452, 422,
845 423, 422, 482, 427, 422, 423, 424, 482, 422, 423,
846 424, 482, 422, 423, 424, 422, 423, 422, 422, 423,
847 424, 482, 482, 445, 298, 456, 457, 458, 459, 459,
848 459, 459, 459, 459, 459, 459, 459, 459, 459, 459,
849 459, 422, 423, 424, 459, 459, 459, 459, 461, 482,
850 482, 460, 462, 459, 482, 459, 422, 423, 422, 422,
851 423, 424, 422, 423, 422, 482, 482, 422, 423, 424,
852 422, 423, 424, 422, 423, 424, 422, 423, 424, 482,
854 459, 459, 459, 459, 342, 465, 466, 467, 468, 468,
855 468, 468, 468, 468, 468, 468, 468, 468, 468, 468,
856 468, 422, 423, 424, 468, 468, 468, 468, 469, 470,
857 471, 482, 482, 468, 482, 468, 422, 423, 424, 422,
858 423, 422, 422, 423, 422, 422, 423, 424, 422, 423,
859 424, 422, 423, 422, 422, 423, 422, 472, 482, 482,
860 468, 468, 468, 468, 422, 423, 424, 422, 423, 424,
861 482, 482, 482, 482, 482, 473, 394, 474, 475, 476,
862 477, 477, 477, 477, 477, 477, 477, 477, 477, 477,
863 477, 477, 477, 482, 482, 482, 477, 477, 477, 477,
865 482, 482, 482, 482, 482, 477, 482, 477, 482, 482,
866 482, 482, 482, 482, 482, 482, 482, 482, 482, 482,
867 482, 482, 482, 482, 482, 482, 482, 482, 482, 482,
868 482, 482, 477, 477, 477, 477, 407, 478, 479, 480,
869 481, 481, 481, 481, 481, 481, 481, 481, 481, 481,
870 481, 481, 481, 482, 482, 482, 481, 481, 481, 481,
871 482, 482, 482, 482, 482, 481, 482, 481, 482, 482,
872 482, 482, 482, 482, 482, 482, 482, 482, 482, 482,
873 482, 482, 482, 482, 482, 482, 482, 482, 482, 482,
874 482, 482, 481, 481, 481, 481, 60, 60, 482, 60,
876 60, 60, 60, 60, 65, 65, 482, 65, 65, 65,
877 65, 65, 89, 89, 482, 482, 89, 89, 89, 140,
878 140, 482, 140, 140, 140, 140, 140, 151, 151, 151,
879 151, 151, 151, 151, 151, 154, 154, 154, 154, 154,
880 154, 154, 154, 158, 158, 158, 220, 220, 220, 220,
881 220, 220, 220, 220, 228, 228, 228, 150, 150, 150,
882 150, 150, 150, 150, 150, 234, 234, 283, 283, 283,
883 219, 219, 219, 219, 219, 219, 219, 219, 293, 293,
884 233, 233, 233, 233, 233, 233, 233, 233, 298, 298,
885 298, 298, 298, 334, 334, 335, 335, 335, 335, 335,
887 335, 335, 335, 342, 342, 342, 342, 342, 394, 394,
888 394, 394, 394, 407, 407, 407, 407, 407, 414, 414,
889 414, 414, 414, 414, 414, 414, 418, 418, 418, 418,
890 418, 418, 418, 418, 425, 425, 425, 425, 425, 425,
891 425, 426, 426, 482, 426, 426, 426, 426, 426, 432,
892 432, 432, 432, 432, 432, 432, 432, 429, 429, 482,
893 429, 429, 429, 429, 429, 7, 482, 482, 482, 482,
894 482, 482, 482, 482, 482, 482, 482, 482, 482, 482,
895 482, 482, 482, 482, 482, 482, 482, 482, 482, 482,
896 482, 482, 482, 482, 482, 482, 482, 482, 482, 482,
898 482, 482, 482, 482, 482, 482, 482, 482, 482, 482,
899 482, 482, 482, 482, 482, 482, 482, 482, 482, 482,
900 482, 482, 482, 482, 482, 482
903 static yyconst flex_int16_t yy_chk[2627] =
905 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
906 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
907 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
908 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
909 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
910 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
911 3, 3, 3, 3, 3, 3, 3, 4, 4, 4,
912 4, 4, 4, 4, 5, 5, 5, 5, 5, 5,
913 5, 6, 6, 6, 6, 6, 6, 6, 12, 19,
914 16, 20, 29, 29, 140, 4, 495, 22, 19, 20,
916 21, 22, 21, 21, 21, 87, 87, 22, 140, 6,
917 16, 27, 23, 12, 23, 23, 23, 24, 463, 24,
918 24, 24, 25, 49, 25, 25, 25, 445, 27, 27,
919 30, 30, 30, 32, 32, 32, 60, 33, 33, 33,
920 34, 34, 34, 35, 35, 35, 229, 46, 428, 30,
921 229, 23, 32, 46, 46, 25, 33, 49, 46, 34,
922 65, 60, 35, 442, 36, 36, 36, 419, 37, 37,
923 37, 442, 34, 38, 38, 38, 73, 73, 73, 35,
924 65, 32, 34, 36, 33, 34, 418, 37, 35, 74,
925 74, 74, 38, 39, 39, 39, 36, 35, 415, 426,
927 37, 74, 47, 40, 406, 74, 36, 40, 37, 38,
928 47, 40, 39, 37, 41, 47, 40, 36, 37, 392,
929 47, 40, 41, 415, 426, 55, 143, 41, 391, 55,
930 39, 42, 41, 41, 43, 55, 39, 39, 43, 42,
931 143, 39, 43, 55, 42, 144, 42, 43, 48, 42,
932 44, 372, 43, 371, 44, 48, 48, 455, 44, 144,
933 429, 48, 370, 44, 45, 455, 48, 44, 44, 344,
934 44, 45, 45, 77, 77, 77, 464, 45, 343, 45,
935 429, 341, 45, 52, 464, 52, 45, 52, 52, 52,
936 53, 53, 52, 53, 53, 53, 301, 54, 53, 54,
938 54, 54, 56, 300, 56, 56, 56, 57, 297, 57,
939 57, 57, 58, 289, 58, 58, 58, 78, 283, 78,
940 78, 78, 89, 88, 88, 88, 241, 240, 89, 89,
941 90, 90, 90, 89, 136, 136, 136, 91, 239, 92,
942 92, 56, 88, 91, 91, 58, 92, 92, 91, 93,
943 94, 92, 139, 139, 139, 93, 93, 236, 94, 235,
944 93, 93, 232, 94, 95, 90, 97, 90, 94, 228,
945 95, 95, 97, 97, 96, 95, 222, 97, 90, 96,
946 96, 96, 90, 98, 217, 96, 169, 168, 99, 98,
947 98, 99, 167, 100, 98, 166, 285, 99, 99, 100,
949 100, 101, 99, 164, 100, 160, 285, 101, 101, 102,
950 285, 103, 101, 101, 102, 102, 102, 103, 103, 104,
951 102, 105, 103, 159, 285, 104, 104, 105, 105, 104,
952 104, 106, 105, 107, 145, 145, 145, 106, 106, 107,
953 107, 108, 106, 106, 107, 158, 154, 108, 108, 109,
954 108, 110, 108, 153, 147, 109, 109, 110, 110, 111,
955 109, 109, 110, 134, 85, 111, 111, 112, 114, 114,
956 111, 111, 83, 112, 112, 114, 114, 82, 112, 113,
957 114, 116, 112, 80, 113, 113, 113, 79, 115, 116,
958 113, 115, 117, 117, 116, 118, 75, 115, 115, 116,
960 117, 119, 115, 118, 72, 117, 66, 120, 118, 119,
961 117, 62, 118, 118, 119, 120, 121, 59, 119, 119,
962 120, 51, 50, 122, 121, 120, 173, 123, 28, 121,
963 121, 122, 173, 173, 121, 123, 122, 173, 124, 125,
964 123, 122, 123, 26, 18, 123, 124, 125, 156, 156,
965 156, 124, 125, 125, 15, 126, 124, 125, 126, 14,
966 124, 127, 128, 126, 11, 127, 7, 2, 126, 127,
967 128, 0, 0, 126, 127, 128, 129, 128, 130, 127,
968 128, 174, 131, 0, 129, 0, 130, 174, 174, 129,
969 131, 130, 174, 174, 129, 131, 130, 0, 135, 131,
971 131, 135, 137, 0, 137, 137, 137, 135, 135, 141,
972 141, 141, 135, 135, 138, 0, 138, 138, 138, 0,
973 146, 141, 146, 146, 146, 141, 150, 150, 150, 0,
974 0, 151, 151, 151, 152, 152, 152, 0, 150, 141,
975 170, 137, 142, 151, 0, 181, 152, 0, 170, 0,
976 152, 181, 181, 170, 0, 0, 181, 0, 170, 0,
977 0, 165, 165, 165, 142, 142, 142, 142, 142, 215,
978 215, 215, 0, 142, 142, 142, 142, 142, 142, 142,
979 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
980 142, 142, 142, 142, 142, 142, 165, 171, 165, 0,
982 0, 171, 0, 175, 172, 171, 172, 0, 0, 165,
983 171, 175, 172, 165, 0, 171, 175, 172, 177, 176,
984 0, 175, 172, 176, 0, 0, 177, 176, 0, 0,
985 179, 177, 176, 178, 179, 0, 177, 176, 179, 182,
986 178, 178, 183, 179, 0, 180, 178, 182, 179, 180,
987 183, 178, 182, 180, 184, 183, 184, 182, 180, 0,
988 183, 185, 184, 180, 0, 186, 0, 184, 187, 185,
989 0, 0, 184, 186, 185, 186, 187, 0, 186, 185,
990 188, 187, 0, 186, 188, 187, 187, 189, 188, 190,
991 0, 189, 0, 188, 0, 189, 191, 190, 188, 0,
993 189, 0, 190, 192, 191, 189, 0, 190, 0, 191,
994 193, 192, 0, 192, 191, 0, 192, 0, 193, 195,
995 0, 192, 194, 193, 0, 193, 196, 195, 193, 0,
996 194, 194, 195, 0, 196, 194, 0, 195, 195, 196,
997 194, 197, 198, 196, 196, 199, 0, 0, 200, 197,
998 198, 197, 0, 199, 197, 198, 200, 0, 199, 197,
999 198, 200, 202, 199, 201, 200, 200, 0, 201, 0,
1000 202, 0, 201, 203, 0, 202, 0, 201, 0, 202,
1001 202, 203, 201, 245, 204, 205, 203, 0, 204, 245,
1002 245, 203, 204, 205, 245, 0, 206, 204, 205, 0,
1004 206, 0, 204, 205, 206, 208, 0, 207, 209, 206,
1005 0, 207, 0, 208, 206, 207, 209, 0, 208, 210,
1006 207, 209, 210, 208, 0, 207, 209, 210, 211, 216,
1007 216, 216, 210, 0, 0, 212, 211, 210, 211, 214,
1008 0, 211, 212, 212, 0, 0, 211, 214, 212, 214,
1009 0, 0, 214, 212, 219, 219, 219, 214, 0, 220,
1010 220, 220, 221, 221, 221, 0, 219, 223, 223, 223,
1011 219, 220, 0, 0, 221, 220, 0, 242, 221, 223,
1012 226, 226, 226, 223, 219, 242, 242, 0, 0, 220,
1013 242, 0, 221, 0, 0, 242, 0, 223, 225, 225,
1015 0, 225, 225, 225, 225, 225, 225, 225, 225, 225,
1016 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
1017 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
1018 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
1019 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
1020 225, 225, 225, 225, 225, 225, 225, 225, 230, 230,
1021 230, 231, 231, 231, 233, 233, 233, 281, 281, 281,
1022 230, 243, 0, 231, 244, 0, 233, 231, 247, 243,
1023 233, 244, 244, 0, 243, 248, 247, 244, 246, 243,
1024 0, 247, 244, 248, 246, 246, 247, 249, 248, 246,
1026 246, 250, 0, 248, 0, 249, 0, 250, 250, 0,
1027 249, 251, 250, 252, 249, 249, 0, 251, 251, 252,
1028 252, 253, 251, 0, 252, 0, 0, 253, 253, 254,
1029 254, 0, 253, 255, 0, 0, 254, 254, 255, 255,
1030 255, 254, 256, 0, 255, 414, 414, 414, 256, 256,
1031 257, 257, 0, 256, 256, 259, 0, 257, 257, 258,
1032 0, 0, 257, 259, 260, 258, 258, 0, 259, 258,
1033 258, 0, 260, 259, 261, 0, 0, 260, 265, 260,
1034 261, 261, 260, 262, 0, 261, 265, 0, 0, 262,
1035 262, 265, 263, 0, 262, 264, 265, 262, 263, 263,
1037 266, 264, 264, 263, 268, 264, 264, 267, 266, 0,
1038 0, 267, 268, 266, 0, 267, 269, 268, 266, 270,
1039 267, 0, 268, 0, 269, 267, 0, 270, 271, 269,
1040 0, 269, 270, 0, 269, 0, 271, 270, 276, 273,
1041 272, 271, 272, 271, 276, 276, 271, 273, 272, 276,
1042 0, 0, 273, 272, 274, 275, 0, 273, 272, 273,
1043 0, 0, 274, 275, 277, 0, 0, 274, 275, 0,
1044 277, 277, 274, 275, 279, 277, 278, 278, 280, 0,
1045 279, 279, 0, 278, 278, 279, 280, 0, 278, 0,
1046 0, 280, 422, 422, 422, 0, 280, 286, 286, 286,
1048 286, 286, 286, 286, 286, 286, 286, 286, 286, 286,
1049 286, 286, 286, 286, 286, 286, 286, 286, 286, 286,
1050 286, 286, 286, 286, 286, 286, 286, 286, 286, 286,
1051 286, 286, 286, 286, 286, 286, 286, 286, 286, 286,
1052 286, 286, 286, 286, 286, 286, 286, 286, 286, 286,
1053 286, 286, 286, 286, 286, 286, 286, 287, 287, 287,
1054 288, 288, 288, 290, 290, 290, 294, 294, 294, 287,
1055 0, 0, 288, 287, 306, 290, 288, 314, 294, 290,
1056 306, 306, 294, 314, 314, 306, 0, 287, 314, 0,
1057 288, 0, 0, 290, 291, 291, 291, 291, 291, 291,
1059 291, 291, 291, 291, 291, 291, 291, 291, 291, 291,
1060 291, 291, 291, 291, 291, 291, 291, 291, 291, 291,
1061 291, 291, 291, 291, 291, 291, 291, 291, 291, 291,
1062 291, 291, 291, 291, 291, 291, 291, 291, 291, 291,
1063 291, 291, 291, 291, 291, 291, 291, 291, 291, 291,
1064 291, 291, 291, 291, 302, 303, 304, 305, 423, 423,
1065 423, 0, 302, 303, 304, 305, 0, 302, 303, 304,
1066 305, 307, 302, 303, 304, 305, 307, 307, 307, 308,
1067 308, 309, 307, 0, 311, 310, 308, 308, 310, 309,
1068 0, 308, 311, 310, 309, 0, 312, 311, 310, 309,
1070 313, 0, 311, 310, 312, 315, 312, 0, 313, 312,
1071 0, 315, 315, 313, 312, 316, 315, 315, 313, 0,
1072 0, 316, 316, 317, 0, 0, 316, 0, 320, 317,
1073 317, 318, 0, 0, 317, 0, 320, 318, 318, 321,
1074 318, 320, 318, 319, 319, 321, 320, 321, 322, 0,
1075 319, 319, 321, 0, 0, 319, 322, 321, 0, 0,
1076 323, 322, 323, 0, 0, 322, 322, 324, 323, 324,
1077 325, 0, 0, 323, 0, 324, 325, 325, 323, 326,
1078 324, 325, 326, 0, 327, 324, 0, 0, 326, 326,
1079 327, 327, 328, 326, 328, 327, 0, 331, 328, 328,
1081 329, 0, 330, 328, 332, 331, 329, 329, 330, 330,
1082 331, 329, 332, 330, 0, 331, 333, 332, 0, 333,
1083 0, 0, 332, 0, 333, 335, 335, 335, 0, 333,
1084 336, 336, 336, 0, 333, 345, 0, 335, 338, 338,
1085 338, 335, 336, 345, 346, 0, 336, 0, 345, 0,
1086 338, 347, 346, 345, 338, 335, 0, 346, 0, 347,
1087 336, 346, 346, 348, 347, 348, 349, 0, 338, 347,
1088 0, 348, 349, 349, 351, 352, 348, 349, 350, 352,
1089 0, 348, 351, 352, 350, 350, 353, 351, 352, 350,
1090 0, 0, 351, 352, 353, 350, 368, 355, 354, 353,
1092 354, 356, 368, 368, 353, 355, 354, 368, 0, 356,
1093 355, 354, 357, 358, 356, 355, 354, 0, 0, 356,
1094 357, 358, 0, 0, 359, 357, 358, 359, 0, 0,
1095 357, 358, 359, 362, 0, 360, 361, 359, 0, 360,
1096 361, 362, 359, 360, 361, 0, 362, 363, 360, 361,
1097 362, 362, 0, 360, 361, 363, 364, 0, 365, 366,
1098 363, 0, 367, 0, 364, 363, 365, 366, 0, 364,
1099 367, 365, 366, 0, 364, 367, 365, 366, 369, 369,
1100 367, 374, 374, 0, 0, 369, 369, 0, 374, 374,
1101 369, 375, 0, 374, 376, 0, 0, 375, 375, 0,
1103 376, 376, 375, 377, 0, 376, 378, 0, 0, 377,
1104 377, 0, 378, 378, 377, 379, 0, 378, 380, 0,
1105 0, 379, 379, 0, 380, 380, 379, 381, 381, 380,
1106 424, 424, 424, 382, 381, 381, 382, 0, 0, 381,
1107 0, 0, 382, 382, 383, 0, 0, 382, 0, 383,
1108 383, 383, 0, 384, 0, 383, 384, 385, 385, 390,
1109 390, 390, 384, 384, 385, 385, 386, 384, 387, 385,
1110 0, 0, 386, 386, 387, 387, 0, 386, 390, 387,
1111 388, 388, 389, 389, 395, 395, 395, 388, 388, 389,
1112 389, 0, 388, 398, 389, 396, 396, 396, 397, 397,
1114 397, 398, 400, 395, 0, 399, 398, 0, 401, 399,
1115 400, 398, 401, 399, 396, 400, 401, 397, 399, 402,
1116 400, 401, 403, 399, 0, 403, 401, 402, 404, 0,
1117 403, 404, 402, 0, 0, 403, 404, 402, 0, 0,
1118 403, 404, 425, 425, 425, 0, 404, 397, 405, 405,
1119 405, 0, 405, 408, 0, 409, 0, 405, 0, 408,
1120 408, 409, 409, 410, 408, 411, 409, 405, 0, 410,
1121 410, 411, 411, 412, 410, 413, 411, 0, 0, 412,
1122 412, 413, 413, 0, 412, 0, 413, 416, 416, 416,
1123 416, 417, 417, 417, 420, 0, 421, 416, 0, 0,
1125 420, 420, 421, 421, 0, 420, 0, 421, 427, 427,
1126 427, 430, 430, 430, 433, 433, 433, 416, 0, 0,
1127 430, 431, 431, 431, 431, 0, 417, 0, 417, 0,
1128 0, 431, 432, 432, 432, 432, 435, 435, 435, 417,
1129 430, 0, 432, 417, 434, 434, 434, 434, 436, 436,
1130 436, 431, 0, 0, 437, 437, 437, 0, 438, 438,
1131 438, 0, 432, 439, 439, 439, 440, 440, 440, 0,
1132 0, 435, 0, 435, 441, 441, 441, 443, 443, 443,
1133 444, 444, 444, 436, 435, 436, 0, 0, 435, 437,
1134 0, 437, 446, 446, 446, 0, 436, 447, 447, 447,
1136 436, 0, 437, 438, 0, 0, 437, 0, 439, 448,
1137 448, 448, 0, 441, 449, 449, 449, 0, 440, 456,
1138 456, 456, 0, 449, 451, 451, 451, 0, 452, 452,
1139 452, 0, 453, 453, 453, 457, 457, 457, 458, 458,
1140 458, 0, 0, 449, 450, 450, 450, 450, 450, 450,
1141 450, 450, 450, 450, 450, 450, 450, 450, 450, 450,
1142 450, 459, 459, 459, 450, 450, 450, 450, 452, 0,
1143 0, 451, 453, 450, 0, 450, 465, 465, 465, 461,
1144 461, 461, 466, 466, 466, 0, 0, 462, 462, 462,
1145 467, 467, 467, 468, 468, 468, 469, 469, 469, 0,
1147 450, 450, 450, 450, 460, 460, 460, 460, 460, 460,
1148 460, 460, 460, 460, 460, 460, 460, 460, 460, 460,
1149 460, 470, 470, 470, 460, 460, 460, 460, 461, 462,
1150 469, 0, 0, 460, 0, 460, 471, 471, 471, 474,
1151 474, 474, 475, 475, 475, 476, 476, 476, 477, 477,
1152 477, 478, 478, 478, 479, 479, 479, 470, 0, 0,
1153 460, 460, 460, 460, 480, 480, 480, 481, 481, 481,
1154 0, 0, 0, 0, 0, 471, 472, 472, 472, 472,
1155 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
1156 472, 472, 472, 0, 0, 0, 472, 472, 472, 472,
1158 0, 0, 0, 0, 0, 472, 0, 472, 0, 0,
1159 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1160 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1161 0, 0, 472, 472, 472, 472, 473, 473, 473, 473,
1162 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
1163 473, 473, 473, 0, 0, 0, 473, 473, 473, 473,
1164 0, 0, 0, 0, 0, 473, 0, 473, 0, 0,
1165 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1166 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1167 0, 0, 473, 473, 473, 473, 483, 483, 0, 483,
1169 483, 483, 483, 483, 484, 484, 0, 484, 484, 484,
1170 484, 484, 485, 485, 0, 0, 485, 485, 485, 486,
1171 486, 0, 486, 486, 486, 486, 486, 487, 487, 487,
1172 487, 487, 487, 487, 487, 488, 488, 488, 488, 488,
1173 488, 488, 488, 489, 489, 489, 490, 490, 490, 490,
1174 490, 490, 490, 490, 491, 491, 491, 492, 492, 492,
1175 492, 492, 492, 492, 492, 493, 493, 494, 494, 494,
1176 496, 496, 496, 496, 496, 496, 496, 496, 497, 497,
1177 498, 498, 498, 498, 498, 498, 498, 498, 499, 499,
1178 499, 499, 499, 500, 500, 501, 501, 501, 501, 501,
1180 501, 501, 501, 502, 502, 502, 502, 502, 503, 503,
1181 503, 503, 503, 504, 504, 504, 504, 504, 505, 505,
1182 505, 505, 505, 505, 505, 505, 506, 506, 506, 506,
1183 506, 506, 506, 506, 507, 507, 507, 507, 507, 507,
1184 507, 508, 508, 0, 508, 508, 508, 508, 508, 509,
1185 509, 509, 509, 509, 509, 509, 509, 510, 510, 0,
1186 510, 510, 510, 510, 510, 482, 482, 482, 482, 482,
1187 482, 482, 482, 482, 482, 482, 482, 482, 482, 482,
1188 482, 482, 482, 482, 482, 482, 482, 482, 482, 482,
1189 482, 482, 482, 482, 482, 482, 482, 482, 482, 482,
1191 482, 482, 482, 482, 482, 482, 482, 482, 482, 482,
1192 482, 482, 482, 482, 482, 482, 482, 482, 482, 482,
1193 482, 482, 482, 482, 482, 482
1196 static yy_state_type yy_last_accepting_state;
1197 static char *yy_last_accepting_cpos;
1199 extern int as3__flex_debug;
1200 int as3__flex_debug = 0;
1202 /* The intent behind this definition is that it'll catch
1203 * any uses of REJECT which flex missed.
1205 #define REJECT reject_used_but_not_detected
1206 #define yymore() yymore_used_but_not_detected
1207 #define YY_MORE_ADJ 0
1208 #define YY_RESTORE_YY_MORE_OFFSET
1210 #line 1 "tokenizer.lex"
1213 Routines for compiling Flash2 AVM2 ABC Actionscript
1215 Extension module for the rfxswf library.
1216 Part of the swftools package.
1218 Copyright (c) 2008 Matthias Kramm <kramm@quiss.org>
1220 This program is free software; you can redistribute it and/or modify
1221 it under the terms of the GNU General Public License as published by
1222 the Free Software Foundation; either version 2 of the License, or
1223 (at your option) any later version.
1225 This program is distributed in the hope that it will be useful,
1226 but WITHOUT ANY WARRANTY; without even the implied warranty of
1227 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1228 GNU General Public License for more details.
1230 You should have received a copy of the GNU General Public License
1231 along with this program; if not, write to the Free Software
1232 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
1233 #line 24 "tokenizer.lex"
1240 #include "../utf8.h"
1241 #include "tokenizer.h"
1245 int as3_verbosity = 1;
1246 unsigned int as3_tokencount = 0;
1248 void as3_error(const char*format, ...)
1255 va_start(arglist, format);
1256 vsprintf(buf, format, arglist);
1258 fprintf(stderr, "%s:%d:%d: error: %s\n", current_filename_short, current_line, current_column, buf);
1262 void as3_warning(const char*format, ...)
1269 va_start(arglist, format);
1270 vsprintf(buf, format, arglist);
1272 fprintf(stderr, "%s:%d:%d: warning: %s\n", current_filename_short, current_line, current_column, buf);
1275 void as3_softwarning(const char*format, ...)
1282 va_start(arglist, format);
1283 vsprintf(buf, format, arglist);
1285 fprintf(stderr, "%s:%d:%d: warning: %s\n", current_filename_short, current_line, current_column, buf);
1288 static void dbg(const char*format, ...)
1295 va_start(arglist, format);
1296 vsprintf(buf, format, arglist);
1299 while(l && buf[l-1]=='\n') {
1303 printf("(tokenizer) ");
1304 printf("%s\n", buf);
1308 #ifndef YY_CURRENT_BUFFER
1309 #define YY_CURRENT_BUFFER yy_current_buffer
1312 static void*as3_buffer=0;
1313 static int as3_buffer_pos=0;
1314 static int as3_buffer_len=0;
1315 void as3_file_input(FILE*fi)
1320 void as3_buffer_input(void*buffer, int len)
1322 as3_buffer = buffer;
1323 as3_buffer_len = len;
1328 #define YY_INPUT(buf,result,max_size) { \
1331 while((result = fread(buf, 1, max_size, as3_in))==0 && ferror(as3_in)) \
1332 { if(errno != EINTR) {YY_FATAL_ERROR("input in flex scanner failed"); break;} \
1333 errno=0; clearerr(as3_in); \
1336 int to_read = max_size; \
1337 if(to_read + as3_buffer_pos > as3_buffer_len) \
1338 to_read = as3_buffer_len - as3_buffer_pos; \
1339 memcpy(buf, as3_buffer+as3_buffer_pos, to_read); \
1340 as3_buffer_pos += to_read; \
1345 void handleInclude(char*text, int len, char quotes)
1349 char*p1 = strchr(text, '"');
1350 char*p2 = strrchr(text, '"');
1351 if(!p1 || !p2 || p1==p2) {
1352 syntaxerror("Invalid include in line %d\n", current_line);
1355 filename = strdup(p1+1);
1359 while(!strchr(" \n\r\t", text[i1])) i1++;
1361 while(strchr(" \n\r\t", text[i1])) i1++;
1362 while(strchr(" \n\r\t", text[i2-1])) i2--;
1363 if(i2!=len) text[i2]=0;
1364 filename = strdup(&text[i1]);
1367 char*fullfilename = find_file(filename);
1368 enter_file2(filename, fullfilename, YY_CURRENT_BUFFER);
1369 as3_in = fopen(fullfilename, "rb");
1371 syntaxerror("Couldn't open include file \"%s\"\n", fullfilename);
1374 as3__switch_to_buffer(as3__create_buffer(as3_in,YY_BUF_SIZE ) );
1375 //BEGIN(INITIAL); keep context
1378 static int do_unescape(const char*s, const char*end, char*n)
1384 if(o) o[len] = *s;len++;
1388 s++; //skip past '\'
1389 if(s==end) syntaxerror("invalid \\ at end of string");
1391 /* handle the various line endings (mac, dos, unix) */
1404 case '\\': if(o) o[len] = '\\';s++;len++; break;
1405 case '"': if(o) o[len] = '"';s++;len++; break;
1406 case '\'': if(o) o[len] = '\'';s++;len++; break;
1407 case 'b': if(o) o[len] = '\b';s++;len++; break;
1408 case 'f': if(o) o[len] = '\f';s++;len++; break;
1409 case 'n': if(o) o[len] = '\n';s++;len++; break;
1410 case 'r': if(o) o[len] = '\r';s++;len++; break;
1411 case 't': if(o) o[len] = '\t';s++;len++; break;
1412 case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': {
1415 while(strchr("01234567", *s) && nr<3 && s<end) {
1422 syntaxerror("octal number out of range (0-255): %d", num);
1423 if(o) o[len] = num;len++;
1426 case 'x': case 'u': {
1435 if(s==end) syntaxerror("invalid \\u or \\x at end of string");
1438 if(s==end) syntaxerror("invalid \\u{ at end of string");
1443 while(strchr("0123456789abcdefABCDEF", *s) && (bracket || nr < max) && s<end) {
1445 if(*s>='0' && *s<='9') num |= *s - '0';
1446 if(*s>='a' && *s<='f') num |= *s - 'a' + 10;
1447 if(*s>='A' && *s<='F') num |= *s - 'A' + 10;
1452 if(*s=='}' && s<end) {
1455 syntaxerror("missing terminating '}'");
1459 char*utf8 = getUTF8(num);
1461 if(o) o[len] = *utf8;utf8++;len++;
1465 syntaxerror("byte out of range (0-255): %d", num);
1466 if(o) o[len] = num;len++;
1471 syntaxerror("unknown escape sequence: \"\\%c\"", *s);
1478 static string_t string_unescape(const char*in, int l)
1481 const char*end = &in[l];
1483 int len = do_unescape(s, end, 0);
1484 char*n = (char*)malloc(len+1);
1485 do_unescape(s, end, n);
1486 string_t out = string_new(n, len);
1490 static void handleCData(char*s, int len)
1492 a3_lval.str.str = s+9; // <![CDATA[
1493 a3_lval.str.len = len-9-3;// ]]>
1494 a3_lval.str.str = strdup_n(a3_lval.str.str, a3_lval.str.len);
1497 static void handleString(char*s, int len)
1500 // don't bother decoding strings in pass 1
1501 memset(&a3_lval, 0, sizeof(a3_lval));
1506 if(s[len-1]!='"') syntaxerror("String doesn't end with '\"'");
1509 else if(s[0]=='\'') {
1510 if(s[len-1]!='\'') syntaxerror("String doesn't end with '\"'");
1513 else syntaxerror("String incorrectly terminated");
1516 a3_lval.str = string_unescape(s, len);
1520 char start_of_expression;
1522 static inline int handleIdentifier(int type)
1524 char*s = malloc(as3_leng+1);
1525 memcpy(s, as3_text, as3_leng);
1531 static inline int m(int type)
1533 a3_lval.token = type;
1538 static char numberbuf[64];
1541 if(as3_leng>sizeof(numberbuf)-1)
1542 syntaxerror("decimal number overflow");
1544 memcpy(s, as3_text, as3_leng);
1549 static inline int setint(int v)
1551 a3_lval.number_int = v;
1559 static inline int setuint(unsigned int v)
1561 a3_lval.number_uint = v;
1569 static inline int setfloat(double v)
1571 a3_lval.number_float = v;
1575 static inline int handlefloat()
1578 a3_lval.number_float = atof(s);
1582 static inline int handleint()
1585 char l = (as3_text[0]=='-');
1587 char*max = l?"1073741824":"2147483647";
1589 as3_warning("integer overflow: %s (converted to Number)", s);
1590 return handlefloat();
1592 if(as3_leng-l==10) {
1594 for(t=0;t<as3_leng-l;t++) {
1595 if(as3_text[l+t]>max[t]) {
1596 as3_warning("integer overflow: %s (converted to Number)", s);
1597 return handlefloat();
1599 else if(as3_text[l+t]<max[t])
1603 if(as3_text[0]=='-') {
1609 for(t=0;t<as3_leng;t++) {
1617 static inline int handlehexfloat()
1619 char l = (as3_text[0]=='-')+2;
1624 for(t=l;t<as3_leng;t++) {
1625 char c = as3_text[t];
1635 if(c>='0' && c<='9')
1637 else if((c>='a' && c<='f') || (c>='A' && c<='F'))
1638 d+=((c&0x0f)+9)*base;
1642 static inline int handlehex()
1644 char l = (as3_text[0]=='-')+2;
1649 syntaxerror("integer overflow %s", s);
1654 for(t=l;t<len;t++) {
1656 char c = as3_text[t];
1657 if(c>='0' && c<='9')
1659 else if((c>='a' && c<='f') || (c>='A' && c<='F'))
1662 if(l && v>1073741824) {
1664 as3_warning("signed integer overflow: %s (converted to Number)", s);
1667 if(!l && v>2147483647) {
1669 as3_warning("unsigned integer overflow: %s (converted to Number)", s);
1674 return setint(-(int)v);
1680 void handleLabel(char*text, int len)
1683 for(t=len-1;t>=0;--t) {
1688 char*s = malloc(t+1);
1689 memcpy(s, as3_text, t);
1694 static int handleregexp()
1696 char*s = malloc(as3_leng);
1698 memcpy(s, as3_text+1, len);
1701 for(t=len;t>=0;--t) {
1707 a3_lval.regexp.pattern = s;
1709 a3_lval.regexp.options = 0;
1711 a3_lval.regexp.options = s+t+1;
1716 void initialize_scanner();
1717 #define YY_USER_INIT initialize_scanner();
1719 /* count the number of lines+columns consumed by this token */
1720 static inline void l() {
1722 for(t=0;t<as3_leng;t++) {
1723 if(as3_text[t]=='\n') {
1731 /* count the number of columns consumed by this token */
1732 static inline void c() {
1733 current_column+=as3_leng;
1736 //Boolean {c();return m(KW_BOOLEAN);}
1737 //int {c();return m(KW_INT);}
1738 //uint {c();return m(KW_UINT);}
1739 //Number {c();return m(KW_NUMBER);}
1743 #line 1744 "tokenizer.yy.c"
1749 #ifndef YY_NO_UNISTD_H
1750 /* Special case for "unistd.h", since it is non-ANSI. We include it way
1751 * down here because we want the user's section 1 to have been scanned first.
1752 * The user has a chance to override it with an option.
1757 #ifndef YY_EXTRA_TYPE
1758 #define YY_EXTRA_TYPE void *
1761 static int yy_init_globals (void );
1763 /* Accessor methods to globals.
1764 These are made visible to non-reentrant scanners for convenience. */
1766 int as3_lex_destroy (void );
1768 int as3_get_debug (void );
1770 void as3_set_debug (int debug_flag );
1772 YY_EXTRA_TYPE as3_get_extra (void );
1774 void as3_set_extra (YY_EXTRA_TYPE user_defined );
1776 FILE *as3_get_in (void );
1778 void as3_set_in (FILE * in_str );
1780 FILE *as3_get_out (void );
1782 void as3_set_out (FILE * out_str );
1784 int as3_get_leng (void );
1786 char *as3_get_text (void );
1788 int as3_get_lineno (void );
1790 void as3_set_lineno (int line_number );
1792 /* Macros after this point can all be overridden by user definitions in
1796 #ifndef YY_SKIP_YYWRAP
1798 extern "C" int as3_wrap (void );
1800 extern int as3_wrap (void );
1804 static void yyunput (int c,char *buf_ptr );
1807 static void yy_flex_strncpy (char *,yyconst char *,int );
1810 #ifdef YY_NEED_STRLEN
1811 static int yy_flex_strlen (yyconst char * );
1817 static int yyinput (void );
1819 static int input (void );
1824 /* Amount of stuff to slurp up with each read. */
1825 #ifndef YY_READ_BUF_SIZE
1826 #define YY_READ_BUF_SIZE 8192
1829 /* Copy whatever the last rule matched to the standard output. */
1831 /* This used to be an fputs(), but since the string might contain NUL's,
1832 * we now use fwrite().
1834 #define ECHO fwrite( as3_text, as3_leng, 1, as3_out )
1837 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1838 * is returned in "result".
1841 #define YY_INPUT(buf,result,max_size) \
1842 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1846 for ( n = 0; n < max_size && \
1847 (c = getc( as3_in )) != EOF && c != '\n'; ++n ) \
1848 buf[n] = (char) c; \
1850 buf[n++] = (char) c; \
1851 if ( c == EOF && ferror( as3_in ) ) \
1852 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1858 while ( (result = fread(buf, 1, max_size, as3_in))==0 && ferror(as3_in)) \
1860 if( errno != EINTR) \
1862 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1873 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1874 * we don't want an extra ';' after the "return" because that will cause
1875 * some compilers to complain about unreachable statements.
1878 #define yyterminate() return YY_NULL
1881 /* Number of entries by which start-condition stack grows. */
1882 #ifndef YY_START_STACK_INCR
1883 #define YY_START_STACK_INCR 25
1886 /* Report a fatal error. */
1887 #ifndef YY_FATAL_ERROR
1888 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1891 /* end tables serialization structures and prototypes */
1893 /* Default declaration of generated scanner - a define so the user can
1894 * easily add parameters.
1897 #define YY_DECL_IS_OURS 1
1899 extern int as3_lex (void);
1901 #define YY_DECL int as3_lex (void)
1902 #endif /* !YY_DECL */
1904 /* Code executed at the beginning of each rule, after as3_text and as3_leng
1907 #ifndef YY_USER_ACTION
1908 #define YY_USER_ACTION
1911 /* Code executed at the end of each rule. */
1913 #define YY_BREAK break;
1916 #define YY_RULE_SETUP \
1917 if ( as3_leng > 0 ) \
1918 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
1919 (as3_text[as3_leng - 1] == '\n'); \
1922 /** The main scanner function which does all the work.
1926 register yy_state_type yy_current_state;
1927 register char *yy_cp, *yy_bp;
1928 register int yy_act;
1930 #line 555 "tokenizer.lex"
1934 #line 1935 "tokenizer.yy.c"
1945 (yy_start) = 1; /* first start state */
1953 if ( ! YY_CURRENT_BUFFER ) {
1954 as3_ensure_buffer_stack ();
1955 YY_CURRENT_BUFFER_LVALUE =
1956 as3__create_buffer(as3_in,YY_BUF_SIZE );
1959 as3__load_buffer_state( );
1962 while ( 1 ) /* loops until end-of-file is reached */
1964 yy_cp = (yy_c_buf_p);
1966 /* Support of as3_text. */
1967 *yy_cp = (yy_hold_char);
1969 /* yy_bp points to the position in yy_ch_buf of the start of
1974 yy_current_state = (yy_start);
1975 yy_current_state += YY_AT_BOL();
1979 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1980 if ( yy_accept[yy_current_state] )
1982 (yy_last_accepting_state) = yy_current_state;
1983 (yy_last_accepting_cpos) = yy_cp;
1985 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1987 yy_current_state = (int) yy_def[yy_current_state];
1988 if ( yy_current_state >= 483 )
1989 yy_c = yy_meta[(unsigned int) yy_c];
1991 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1994 while ( yy_current_state != 482 );
1995 yy_cp = (yy_last_accepting_cpos);
1996 yy_current_state = (yy_last_accepting_state);
1999 yy_act = yy_accept[yy_current_state];
2001 YY_DO_BEFORE_ACTION;
2003 do_action: /* This label is used only to access EOF actions. */
2006 { /* beginning of action switch */
2007 case 0: /* must back up */
2008 /* undo the effects of YY_DO_BEFORE_ACTION */
2009 *yy_cp = (yy_hold_char);
2010 yy_cp = (yy_last_accepting_cpos);
2011 yy_current_state = (yy_last_accepting_state);
2012 goto yy_find_action;
2015 /* rule 1 can match eol */
2017 #line 558 "tokenizer.lex"
2018 {l(); /* single line comment */}
2021 /* rule 2 can match eol */
2023 #line 559 "tokenizer.lex"
2024 {l(); /* multi line comment */}
2028 #line 560 "tokenizer.lex"
2029 {syntaxerror("syntax error: unterminated comment", as3_text);}
2032 /* rule 4 can match eol */
2033 *yy_cp = (yy_hold_char); /* undo effects of setting up as3_text */
2034 (yy_c_buf_p) = yy_cp -= 1;
2035 YY_DO_BEFORE_ACTION; /* set up as3_text again */
2037 #line 562 "tokenizer.lex"
2038 {l();handleInclude(as3_text, as3_leng, 1);}
2041 /* rule 5 can match eol */
2042 *yy_cp = (yy_hold_char); /* undo effects of setting up as3_text */
2043 (yy_c_buf_p) = yy_cp -= 1;
2044 YY_DO_BEFORE_ACTION; /* set up as3_text again */
2046 #line 563 "tokenizer.lex"
2047 {l();handleInclude(as3_text, as3_leng, 0);}
2050 /* rule 6 can match eol */
2052 #line 564 "tokenizer.lex"
2053 {l(); BEGIN(INITIAL);handleString(as3_text, as3_leng);return T_STRING;}
2056 /* rule 7 can match eol */
2058 #line 565 "tokenizer.lex"
2059 {l(); BEGIN(INITIAL);handleCData(as3_text, as3_leng);return T_STRING;}
2064 #line 568 "tokenizer.lex"
2065 {c(); BEGIN(INITIAL);return handleregexp();}
2069 #line 569 "tokenizer.lex"
2070 {c(); BEGIN(INITIAL);return handlehex();}
2074 #line 570 "tokenizer.lex"
2075 {c(); BEGIN(INITIAL);return handlehexfloat();}
2079 #line 571 "tokenizer.lex"
2080 {c(); BEGIN(INITIAL);return handleint();}
2084 #line 572 "tokenizer.lex"
2085 {c(); BEGIN(INITIAL);return handlefloat();}
2090 #line 575 "tokenizer.lex"
2094 /* rule 14 can match eol */
2096 #line 576 "tokenizer.lex"
2101 #line 578 "tokenizer.lex"
2102 {c(); BEGIN(INITIAL);return handlehex();}
2106 #line 579 "tokenizer.lex"
2107 {c(); BEGIN(INITIAL);return handlehexfloat();}
2111 #line 580 "tokenizer.lex"
2112 {c(); BEGIN(INITIAL);return handleint();}
2116 #line 581 "tokenizer.lex"
2117 {c(); BEGIN(INITIAL);return handlefloat();}
2121 #line 583 "tokenizer.lex"
2122 {/* for debugging: generates a tokenizer-level error */
2123 syntaxerror("3rr0r");}
2126 /* rule 20 can match eol */
2127 *yy_cp = (yy_hold_char); /* undo effects of setting up as3_text */
2128 (yy_c_buf_p) = yy_cp -= 1;
2129 YY_DO_BEFORE_ACTION; /* set up as3_text again */
2131 #line 586 "tokenizer.lex"
2132 {l();handleLabel(as3_text, as3_leng-3);return T_FOR;}
2135 /* rule 21 can match eol */
2136 *yy_cp = (yy_hold_char); /* undo effects of setting up as3_text */
2137 (yy_c_buf_p) = yy_cp -= 1;
2138 YY_DO_BEFORE_ACTION; /* set up as3_text again */
2140 #line 587 "tokenizer.lex"
2141 {l();handleLabel(as3_text, as3_leng-2);return T_DO;}
2144 /* rule 22 can match eol */
2145 *yy_cp = (yy_hold_char); /* undo effects of setting up as3_text */
2146 (yy_c_buf_p) = yy_cp -= 1;
2147 YY_DO_BEFORE_ACTION; /* set up as3_text again */
2149 #line 588 "tokenizer.lex"
2150 {l();handleLabel(as3_text, as3_leng-5);return T_WHILE;}
2153 /* rule 23 can match eol */
2154 *yy_cp = (yy_hold_char); /* undo effects of setting up as3_text */
2155 (yy_c_buf_p) = yy_cp -= 1;
2156 YY_DO_BEFORE_ACTION; /* set up as3_text again */
2158 #line 589 "tokenizer.lex"
2159 {l();handleLabel(as3_text, as3_leng-6);return T_SWITCH;}
2163 #line 590 "tokenizer.lex"
2164 {c();a3_lval.id="";return T_FOR;}
2168 #line 591 "tokenizer.lex"
2169 {c();a3_lval.id="";return T_DO;}
2173 #line 592 "tokenizer.lex"
2174 {c();a3_lval.id="";return T_WHILE;}
2178 #line 593 "tokenizer.lex"
2179 {c();a3_lval.id="";return T_SWITCH;}
2183 #line 595 "tokenizer.lex"
2184 {c();BEGIN(REGEXPOK);return m(T_ANDAND);}
2188 #line 596 "tokenizer.lex"
2189 {c();BEGIN(REGEXPOK);return m(T_OROR);}
2193 #line 597 "tokenizer.lex"
2194 {c();BEGIN(REGEXPOK);return m(T_NE);}
2198 #line 598 "tokenizer.lex"
2199 {c();BEGIN(REGEXPOK);return m(T_NEE);}
2203 #line 599 "tokenizer.lex"
2204 {c();BEGIN(REGEXPOK);return m(T_EQEQEQ);}
2208 #line 600 "tokenizer.lex"
2209 {c();BEGIN(REGEXPOK);return m(T_EQEQ);}
2213 #line 601 "tokenizer.lex"
2214 {c();return m(T_GE);}
2218 #line 602 "tokenizer.lex"
2219 {c();return m(T_LE);}
2223 #line 603 "tokenizer.lex"
2224 {c();BEGIN(INITIAL);return m(T_MINUSMINUS);}
2228 #line 604 "tokenizer.lex"
2229 {c();BEGIN(INITIAL);return m(T_PLUSPLUS);}
2233 #line 605 "tokenizer.lex"
2234 {c();return m(T_PLUSBY);}
2238 #line 606 "tokenizer.lex"
2239 {c();return m(T_MINUSBY);}
2243 #line 607 "tokenizer.lex"
2244 {c();return m(T_DIVBY);}
2248 #line 608 "tokenizer.lex"
2249 {c();return m(T_MODBY);}
2253 #line 609 "tokenizer.lex"
2254 {c();return m(T_MULBY);}
2258 #line 610 "tokenizer.lex"
2259 {c();return m(T_ORBY);}
2263 #line 611 "tokenizer.lex"
2264 {c();return m(T_SHRBY);}
2268 #line 612 "tokenizer.lex"
2269 {c();return m(T_SHLBY);}
2273 #line 613 "tokenizer.lex"
2274 {c();return m(T_USHRBY);}
2278 #line 614 "tokenizer.lex"
2279 {c();return m(T_SHL);}
2283 #line 615 "tokenizer.lex"
2284 {c();return m(T_USHR);}
2288 #line 616 "tokenizer.lex"
2289 {c();return m(T_SHR);}
2293 #line 617 "tokenizer.lex"
2294 {c();return m(T_DOTDOTDOT);}
2298 #line 618 "tokenizer.lex"
2299 {c();return m(T_DOTDOT);}
2303 #line 619 "tokenizer.lex"
2304 {c();return m('.');}
2308 #line 620 "tokenizer.lex"
2309 {c();return m(T_COLONCOLON);}
2313 #line 621 "tokenizer.lex"
2314 {c();return m(':');}
2318 #line 622 "tokenizer.lex"
2319 {c();return m(KW_INSTANCEOF);}
2323 #line 623 "tokenizer.lex"
2324 {c();return m(KW_IMPLEMENTS);}
2328 #line 624 "tokenizer.lex"
2329 {c();return m(KW_INTERFACE);}
2333 #line 625 "tokenizer.lex"
2334 {c();return m(KW_NAMESPACE);}
2338 #line 626 "tokenizer.lex"
2339 {c();return m(KW_PROTECTED);}
2343 #line 627 "tokenizer.lex"
2344 {c();return m(KW_UNDEFINED);}
2348 #line 628 "tokenizer.lex"
2349 {c();return m(KW_CONTINUE);}
2353 #line 629 "tokenizer.lex"
2354 {c();return m(KW_OVERRIDE);}
2358 #line 630 "tokenizer.lex"
2359 {c();return m(KW_INTERNAL);}
2363 #line 631 "tokenizer.lex"
2364 {c();return m(KW_FUNCTION);}
2368 #line 632 "tokenizer.lex"
2369 {c();return m(KW_FINALLY);}
2373 #line 633 "tokenizer.lex"
2374 {c();return m(KW_DEFAULT);}
2378 #line 634 "tokenizer.lex"
2379 {c();return m(KW_PACKAGE);}
2383 #line 635 "tokenizer.lex"
2384 {c();return m(KW_PRIVATE);}
2388 #line 636 "tokenizer.lex"
2389 {c();return m(KW_DYNAMIC);}
2393 #line 637 "tokenizer.lex"
2394 {c();return m(KW_EXTENDS);}
2398 #line 638 "tokenizer.lex"
2399 {c();return m(KW_DELETE);}
2403 #line 639 "tokenizer.lex"
2404 {c();return m(KW_RETURN);}
2408 #line 640 "tokenizer.lex"
2409 {c();return m(KW_PUBLIC);}
2413 #line 641 "tokenizer.lex"
2414 {c();return m(KW_NATIVE);}
2418 #line 642 "tokenizer.lex"
2419 {c();return m(KW_STATIC);}
2423 #line 643 "tokenizer.lex"
2424 {c();return m(KW_IMPORT);}
2428 #line 644 "tokenizer.lex"
2429 {c();return m(KW_TYPEOF);}
2433 #line 645 "tokenizer.lex"
2434 {c();return m(KW_THROW);}
2438 #line 646 "tokenizer.lex"
2439 {c();return m(KW_CLASS);}
2443 #line 647 "tokenizer.lex"
2444 {c();return m(KW_CONST);}
2448 #line 648 "tokenizer.lex"
2449 {c();return m(KW_CATCH);}
2453 #line 649 "tokenizer.lex"
2454 {c();return m(KW_FINAL);}
2458 #line 650 "tokenizer.lex"
2459 {c();return m(KW_FALSE);}
2463 #line 651 "tokenizer.lex"
2464 {c();return m(KW_BREAK);}
2468 #line 652 "tokenizer.lex"
2469 {c();return m(KW_SUPER);}
2473 #line 653 "tokenizer.lex"
2474 {c();return m(KW_EACH);}
2478 #line 654 "tokenizer.lex"
2479 {c();return m(KW_VOID);}
2483 #line 655 "tokenizer.lex"
2484 {c();return m(KW_TRUE);}
2488 #line 656 "tokenizer.lex"
2489 {c();return m(KW_NULL);}
2493 #line 657 "tokenizer.lex"
2494 {c();return m(KW_ELSE);}
2498 #line 658 "tokenizer.lex"
2499 {c();return m(KW_CASE);}
2503 #line 659 "tokenizer.lex"
2504 {c();return m(KW_WITH);}
2508 #line 660 "tokenizer.lex"
2509 {c();return m(KW_USE);}
2513 #line 661 "tokenizer.lex"
2514 {c();return m(KW_NEW);}
2518 #line 662 "tokenizer.lex"
2519 {c();return m(KW_GET);}
2523 #line 663 "tokenizer.lex"
2524 {c();return m(KW_SET);}
2528 #line 664 "tokenizer.lex"
2529 {c();return m(KW_VAR);}
2533 #line 665 "tokenizer.lex"
2534 {c();return m(KW_TRY);}
2538 #line 666 "tokenizer.lex"
2539 {c();return m(KW_IS) ;}
2543 #line 667 "tokenizer.lex"
2544 {c();return m(KW_IN) ;}
2548 #line 668 "tokenizer.lex"
2549 {c();return m(KW_IF) ;}
2553 #line 669 "tokenizer.lex"
2554 {c();return m(KW_AS);}
2558 #line 670 "tokenizer.lex"
2559 {c();BEGIN(INITIAL);return handleIdentifier(T_IDENTIFIER);}
2563 #line 672 "tokenizer.lex"
2564 {c();BEGIN(REGEXPOK);return m(as3_text[0]);}
2568 #line 673 "tokenizer.lex"
2569 {c();BEGIN(INITIAL);return m(as3_text[0]);}
2573 #line 675 "tokenizer.lex"
2575 char c1=as3_text[0];
2577 buf[0] = as3_text[0];
2579 for(t=1;t<128;t++) {
2580 char c = buf[t]=input();
2581 if(c=='\n' || c==EOF) {
2586 if(c1>='0' && c1<='9')
2587 syntaxerror("syntax error: %s (identifiers must not start with a digit)");
2589 syntaxerror("syntax error: %s", buf);
2595 case YY_STATE_EOF(INITIAL):
2596 case YY_STATE_EOF(REGEXPOK):
2597 case YY_STATE_EOF(BEGINNING):
2598 #line 695 "tokenizer.lex"
2600 void*b = leave_file();
2603 as3__delete_buffer(YY_CURRENT_BUFFER);
2606 as3__delete_buffer(YY_CURRENT_BUFFER);
2607 as3__switch_to_buffer(b);
2613 #line 707 "tokenizer.lex"
2616 #line 2617 "tokenizer.yy.c"
2618 case YY_END_OF_BUFFER:
2620 /* Amount of text matched not including the EOB char. */
2621 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
2623 /* Undo the effects of YY_DO_BEFORE_ACTION. */
2624 *yy_cp = (yy_hold_char);
2625 YY_RESTORE_YY_MORE_OFFSET
2627 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
2629 /* We're scanning a new file or input source. It's
2630 * possible that this happened because the user
2631 * just pointed as3_in at a new source and called
2632 * as3_lex(). If so, then we have to assure
2633 * consistency between YY_CURRENT_BUFFER and our
2634 * globals. Here is the right place to do so, because
2635 * this is the first action (other than possibly a
2636 * back-up) that will match for the new input source.
2638 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2639 YY_CURRENT_BUFFER_LVALUE->yy_input_file = as3_in;
2640 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
2643 /* Note that here we test for yy_c_buf_p "<=" to the position
2644 * of the first EOB in the buffer, since yy_c_buf_p will
2645 * already have been incremented past the NUL character
2646 * (since all states make transitions on EOB to the
2647 * end-of-buffer state). Contrast this with the test
2650 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2651 { /* This was really a NUL. */
2652 yy_state_type yy_next_state;
2654 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
2656 yy_current_state = yy_get_previous_state( );
2658 /* Okay, we're now positioned to make the NUL
2659 * transition. We couldn't have
2660 * yy_get_previous_state() go ahead and do it
2661 * for us because it doesn't know how to deal
2662 * with the possibility of jamming (and we don't
2663 * want to build jamming into it because then it
2664 * will run more slowly).
2667 yy_next_state = yy_try_NUL_trans( yy_current_state );
2669 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2671 if ( yy_next_state )
2673 /* Consume the NUL. */
2674 yy_cp = ++(yy_c_buf_p);
2675 yy_current_state = yy_next_state;
2681 yy_cp = (yy_last_accepting_cpos);
2682 yy_current_state = (yy_last_accepting_state);
2683 goto yy_find_action;
2687 else switch ( yy_get_next_buffer( ) )
2689 case EOB_ACT_END_OF_FILE:
2691 (yy_did_buffer_switch_on_eof) = 0;
2695 /* Note: because we've taken care in
2696 * yy_get_next_buffer() to have set up
2697 * as3_text, we can now set up
2698 * yy_c_buf_p so that if some total
2699 * hoser (like flex itself) wants to
2700 * call the scanner after we return the
2701 * YY_NULL, it'll still work - another
2702 * YY_NULL will get returned.
2704 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
2706 yy_act = YY_STATE_EOF(YY_START);
2712 if ( ! (yy_did_buffer_switch_on_eof) )
2718 case EOB_ACT_CONTINUE_SCAN:
2720 (yytext_ptr) + yy_amount_of_matched_text;
2722 yy_current_state = yy_get_previous_state( );
2724 yy_cp = (yy_c_buf_p);
2725 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2728 case EOB_ACT_LAST_MATCH:
2730 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
2732 yy_current_state = yy_get_previous_state( );
2734 yy_cp = (yy_c_buf_p);
2735 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2736 goto yy_find_action;
2743 "fatal flex scanner internal error--no action found" );
2744 } /* end of action switch */
2745 } /* end of scanning one token */
2746 } /* end of as3_lex */
2748 /* yy_get_next_buffer - try to read in a new buffer
2750 * Returns a code representing an action:
2751 * EOB_ACT_LAST_MATCH -
2752 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2753 * EOB_ACT_END_OF_FILE - end of file
2755 static int yy_get_next_buffer (void)
2757 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
2758 register char *source = (yytext_ptr);
2759 register int number_to_move, i;
2762 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
2764 "fatal flex scanner internal error--end of buffer missed" );
2766 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
2767 { /* Don't try to fill the buffer, so this is an EOF. */
2768 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
2770 /* We matched a single character, the EOB, so
2771 * treat this as a final EOF.
2773 return EOB_ACT_END_OF_FILE;
2778 /* We matched some text prior to the EOB, first
2781 return EOB_ACT_LAST_MATCH;
2785 /* Try to read more data. */
2787 /* First move last chars to start of buffer. */
2788 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
2790 for ( i = 0; i < number_to_move; ++i )
2791 *(dest++) = *(source++);
2793 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2794 /* don't do the read, it's not guaranteed to return an EOF,
2797 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
2802 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
2804 while ( num_to_read <= 0 )
2805 { /* Not enough room in the buffer - grow it. */
2807 /* just a shorter name for the current buffer */
2808 YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
2810 int yy_c_buf_p_offset =
2811 (int) ((yy_c_buf_p) - b->yy_ch_buf);
2813 if ( b->yy_is_our_buffer )
2815 int new_size = b->yy_buf_size * 2;
2817 if ( new_size <= 0 )
2818 b->yy_buf_size += b->yy_buf_size / 8;
2820 b->yy_buf_size *= 2;
2822 b->yy_ch_buf = (char *)
2823 /* Include room in for 2 EOB chars. */
2824 as3_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
2827 /* Can't grow it, we don't own it. */
2830 if ( ! b->yy_ch_buf )
2832 "fatal error - scanner input buffer overflow" );
2834 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
2836 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
2841 if ( num_to_read > YY_READ_BUF_SIZE )
2842 num_to_read = YY_READ_BUF_SIZE;
2844 /* Read in more data. */
2845 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2846 (yy_n_chars), (size_t) num_to_read );
2848 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2851 if ( (yy_n_chars) == 0 )
2853 if ( number_to_move == YY_MORE_ADJ )
2855 ret_val = EOB_ACT_END_OF_FILE;
2856 as3_restart(as3_in );
2861 ret_val = EOB_ACT_LAST_MATCH;
2862 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
2863 YY_BUFFER_EOF_PENDING;
2868 ret_val = EOB_ACT_CONTINUE_SCAN;
2870 if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
2871 /* Extend the array by 50%, plus the number we really need. */
2872 yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
2873 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) as3_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
2874 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2875 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
2878 (yy_n_chars) += number_to_move;
2879 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
2880 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
2882 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
2887 /* yy_get_previous_state - get the state just before the EOB char was reached */
2889 static yy_state_type yy_get_previous_state (void)
2891 register yy_state_type yy_current_state;
2892 register char *yy_cp;
2894 yy_current_state = (yy_start);
2895 yy_current_state += YY_AT_BOL();
2897 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
2899 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2900 if ( yy_accept[yy_current_state] )
2902 (yy_last_accepting_state) = yy_current_state;
2903 (yy_last_accepting_cpos) = yy_cp;
2905 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2907 yy_current_state = (int) yy_def[yy_current_state];
2908 if ( yy_current_state >= 483 )
2909 yy_c = yy_meta[(unsigned int) yy_c];
2911 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2914 return yy_current_state;
2917 /* yy_try_NUL_trans - try to make a transition on the NUL character
2920 * next_state = yy_try_NUL_trans( current_state );
2922 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
2924 register int yy_is_jam;
2925 register char *yy_cp = (yy_c_buf_p);
2927 register YY_CHAR yy_c = 1;
2928 if ( yy_accept[yy_current_state] )
2930 (yy_last_accepting_state) = yy_current_state;
2931 (yy_last_accepting_cpos) = yy_cp;
2933 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2935 yy_current_state = (int) yy_def[yy_current_state];
2936 if ( yy_current_state >= 483 )
2937 yy_c = yy_meta[(unsigned int) yy_c];
2939 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2940 yy_is_jam = (yy_current_state == 482);
2942 return yy_is_jam ? 0 : yy_current_state;
2945 static void yyunput (int c, register char * yy_bp )
2947 register char *yy_cp;
2949 yy_cp = (yy_c_buf_p);
2951 /* undo effects of setting up as3_text */
2952 *yy_cp = (yy_hold_char);
2954 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2955 { /* need to shift things up to make room */
2956 /* +2 for EOB chars. */
2957 register int number_to_move = (yy_n_chars) + 2;
2958 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
2959 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
2960 register char *source =
2961 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
2963 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2964 *--dest = *--source;
2966 yy_cp += (int) (dest - source);
2967 yy_bp += (int) (dest - source);
2968 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
2969 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
2971 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2972 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2975 *--yy_cp = (char) c;
2977 (yytext_ptr) = yy_bp;
2978 (yy_hold_char) = *yy_cp;
2979 (yy_c_buf_p) = yy_cp;
2984 static int yyinput (void)
2986 static int input (void)
2992 *(yy_c_buf_p) = (yy_hold_char);
2994 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
2996 /* yy_c_buf_p now points to the character we want to return.
2997 * If this occurs *before* the EOB characters, then it's a
2998 * valid NUL; if not, then we've hit the end of the buffer.
3000 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
3001 /* This was really a NUL. */
3002 *(yy_c_buf_p) = '\0';
3005 { /* need more input */
3006 int offset = (yy_c_buf_p) - (yytext_ptr);
3009 switch ( yy_get_next_buffer( ) )
3011 case EOB_ACT_LAST_MATCH:
3012 /* This happens because yy_g_n_b()
3013 * sees that we've accumulated a
3014 * token and flags that we need to
3015 * try matching the token before
3016 * proceeding. But for input(),
3017 * there's no matching to consider.
3018 * So convert the EOB_ACT_LAST_MATCH
3019 * to EOB_ACT_END_OF_FILE.
3022 /* Reset buffer status. */
3023 as3_restart(as3_in );
3027 case EOB_ACT_END_OF_FILE:
3032 if ( ! (yy_did_buffer_switch_on_eof) )
3041 case EOB_ACT_CONTINUE_SCAN:
3042 (yy_c_buf_p) = (yytext_ptr) + offset;
3048 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
3049 *(yy_c_buf_p) = '\0'; /* preserve as3_text */
3050 (yy_hold_char) = *++(yy_c_buf_p);
3052 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
3056 #endif /* ifndef YY_NO_INPUT */
3058 /** Immediately switch to a different input stream.
3059 * @param input_file A readable stream.
3061 * @note This function does not reset the start condition to @c INITIAL .
3063 void as3_restart (FILE * input_file )
3066 if ( ! YY_CURRENT_BUFFER ){
3067 as3_ensure_buffer_stack ();
3068 YY_CURRENT_BUFFER_LVALUE =
3069 as3__create_buffer(as3_in,YY_BUF_SIZE );
3072 as3__init_buffer(YY_CURRENT_BUFFER,input_file );
3073 as3__load_buffer_state( );
3076 /** Switch to a different input buffer.
3077 * @param new_buffer The new input buffer.
3080 void as3__switch_to_buffer (YY_BUFFER_STATE new_buffer )
3083 /* TODO. We should be able to replace this entire function body
3085 * as3_pop_buffer_state();
3086 * as3_push_buffer_state(new_buffer);
3088 as3_ensure_buffer_stack ();
3089 if ( YY_CURRENT_BUFFER == new_buffer )
3092 if ( YY_CURRENT_BUFFER )
3094 /* Flush out information for old buffer. */
3095 *(yy_c_buf_p) = (yy_hold_char);
3096 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
3097 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
3100 YY_CURRENT_BUFFER_LVALUE = new_buffer;
3101 as3__load_buffer_state( );
3103 /* We don't actually know whether we did this switch during
3104 * EOF (as3_wrap()) processing, but the only time this flag
3105 * is looked at is after as3_wrap() is called, so it's safe
3106 * to go ahead and always set it.
3108 (yy_did_buffer_switch_on_eof) = 1;
3111 static void as3__load_buffer_state (void)
3113 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
3114 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
3115 as3_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
3116 (yy_hold_char) = *(yy_c_buf_p);
3119 /** Allocate and initialize an input buffer state.
3120 * @param file A readable stream.
3121 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
3123 * @return the allocated buffer state.
3125 YY_BUFFER_STATE as3__create_buffer (FILE * file, int size )
3129 b = (YY_BUFFER_STATE) as3_alloc(sizeof( struct yy_buffer_state ) );
3131 YY_FATAL_ERROR( "out of dynamic memory in as3__create_buffer()" );
3133 b->yy_buf_size = size;
3135 /* yy_ch_buf has to be 2 characters longer than the size given because
3136 * we need to put in 2 end-of-buffer characters.
3138 b->yy_ch_buf = (char *) as3_alloc(b->yy_buf_size + 2 );
3139 if ( ! b->yy_ch_buf )
3140 YY_FATAL_ERROR( "out of dynamic memory in as3__create_buffer()" );
3142 b->yy_is_our_buffer = 1;
3144 as3__init_buffer(b,file );
3149 /** Destroy the buffer.
3150 * @param b a buffer created with as3__create_buffer()
3153 void as3__delete_buffer (YY_BUFFER_STATE b )
3159 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
3160 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
3162 if ( b->yy_is_our_buffer )
3163 as3_free((void *) b->yy_ch_buf );
3165 as3_free((void *) b );
3168 #ifndef _UNISTD_H /* assume unistd.h has isatty() for us */
3172 #ifdef __THROW /* this is a gnuism */
3173 extern int isatty (int ) __THROW;
3175 extern int isatty (int );
3182 /* Initializes or reinitializes a buffer.
3183 * This function is sometimes called more than once on the same buffer,
3184 * such as during a as3_restart() or at EOF.
3186 static void as3__init_buffer (YY_BUFFER_STATE b, FILE * file )
3191 as3__flush_buffer(b );
3193 b->yy_input_file = file;
3194 b->yy_fill_buffer = 1;
3196 /* If b is the current buffer, then as3__init_buffer was _probably_
3197 * called from as3_restart() or through yy_get_next_buffer.
3198 * In that case, we don't want to reset the lineno or column.
3200 if (b != YY_CURRENT_BUFFER){
3201 b->yy_bs_lineno = 1;
3202 b->yy_bs_column = 0;
3205 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
3210 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
3211 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
3214 void as3__flush_buffer (YY_BUFFER_STATE b )
3221 /* We always need two end-of-buffer characters. The first causes
3222 * a transition to the end-of-buffer state. The second causes
3223 * a jam in that state.
3225 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
3226 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
3228 b->yy_buf_pos = &b->yy_ch_buf[0];
3231 b->yy_buffer_status = YY_BUFFER_NEW;
3233 if ( b == YY_CURRENT_BUFFER )
3234 as3__load_buffer_state( );
3237 /** Pushes the new state onto the stack. The new state becomes
3238 * the current state. This function will allocate the stack
3240 * @param new_buffer The new state.
3243 void as3_push_buffer_state (YY_BUFFER_STATE new_buffer )
3245 if (new_buffer == NULL)
3248 as3_ensure_buffer_stack();
3250 /* This block is copied from as3__switch_to_buffer. */
3251 if ( YY_CURRENT_BUFFER )
3253 /* Flush out information for old buffer. */
3254 *(yy_c_buf_p) = (yy_hold_char);
3255 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
3256 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
3259 /* Only push if top exists. Otherwise, replace top. */
3260 if (YY_CURRENT_BUFFER)
3261 (yy_buffer_stack_top)++;
3262 YY_CURRENT_BUFFER_LVALUE = new_buffer;
3264 /* copied from as3__switch_to_buffer. */
3265 as3__load_buffer_state( );
3266 (yy_did_buffer_switch_on_eof) = 1;
3269 /** Removes and deletes the top of the stack, if present.
3270 * The next element becomes the new top.
3273 void as3_pop_buffer_state (void)
3275 if (!YY_CURRENT_BUFFER)
3278 as3__delete_buffer(YY_CURRENT_BUFFER );
3279 YY_CURRENT_BUFFER_LVALUE = NULL;
3280 if ((yy_buffer_stack_top) > 0)
3281 --(yy_buffer_stack_top);
3283 if (YY_CURRENT_BUFFER) {
3284 as3__load_buffer_state( );
3285 (yy_did_buffer_switch_on_eof) = 1;
3289 /* Allocates the stack if it does not exist.
3290 * Guarantees space for at least one push.
3292 static void as3_ensure_buffer_stack (void)
3296 if (!(yy_buffer_stack)) {
3298 /* First allocation is just for 2 elements, since we don't know if this
3299 * scanner will even need a stack. We use 2 instead of 1 to avoid an
3300 * immediate realloc on the next call.
3303 (yy_buffer_stack) = (struct yy_buffer_state**)as3_alloc
3304 (num_to_alloc * sizeof(struct yy_buffer_state*)
3306 if ( ! (yy_buffer_stack) )
3307 YY_FATAL_ERROR( "out of dynamic memory in as3_ensure_buffer_stack()" );
3309 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
3311 (yy_buffer_stack_max) = num_to_alloc;
3312 (yy_buffer_stack_top) = 0;
3316 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
3318 /* Increase the buffer to prepare for a possible push. */
3319 int grow_size = 8 /* arbitrary grow size */;
3321 num_to_alloc = (yy_buffer_stack_max) + grow_size;
3322 (yy_buffer_stack) = (struct yy_buffer_state**)as3_realloc
3324 num_to_alloc * sizeof(struct yy_buffer_state*)
3326 if ( ! (yy_buffer_stack) )
3327 YY_FATAL_ERROR( "out of dynamic memory in as3_ensure_buffer_stack()" );
3329 /* zero only the new slots.*/
3330 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
3331 (yy_buffer_stack_max) = num_to_alloc;
3335 /** Setup the input buffer state to scan directly from a user-specified character buffer.
3336 * @param base the character buffer
3337 * @param size the size in bytes of the character buffer
3339 * @return the newly allocated buffer state object.
3341 YY_BUFFER_STATE as3__scan_buffer (char * base, yy_size_t size )
3346 base[size-2] != YY_END_OF_BUFFER_CHAR ||
3347 base[size-1] != YY_END_OF_BUFFER_CHAR )
3348 /* They forgot to leave room for the EOB's. */
3351 b = (YY_BUFFER_STATE) as3_alloc(sizeof( struct yy_buffer_state ) );
3353 YY_FATAL_ERROR( "out of dynamic memory in as3__scan_buffer()" );
3355 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
3356 b->yy_buf_pos = b->yy_ch_buf = base;
3357 b->yy_is_our_buffer = 0;
3358 b->yy_input_file = 0;
3359 b->yy_n_chars = b->yy_buf_size;
3360 b->yy_is_interactive = 0;
3362 b->yy_fill_buffer = 0;
3363 b->yy_buffer_status = YY_BUFFER_NEW;
3365 as3__switch_to_buffer(b );
3370 /** Setup the input buffer state to scan a string. The next call to as3_lex() will
3371 * scan from a @e copy of @a str.
3372 * @param yystr a NUL-terminated string to scan
3374 * @return the newly allocated buffer state object.
3375 * @note If you want to scan bytes that may contain NUL values, then use
3376 * as3__scan_bytes() instead.
3378 YY_BUFFER_STATE as3__scan_string (yyconst char * yystr )
3381 return as3__scan_bytes(yystr,strlen(yystr) );
3384 /** Setup the input buffer state to scan the given bytes. The next call to as3_lex() will
3385 * scan from a @e copy of @a bytes.
3386 * @param bytes the byte buffer to scan
3387 * @param len the number of bytes in the buffer pointed to by @a bytes.
3389 * @return the newly allocated buffer state object.
3391 YY_BUFFER_STATE as3__scan_bytes (yyconst char * yybytes, int _yybytes_len )
3398 /* Get memory for full buffer, including space for trailing EOB's. */
3399 n = _yybytes_len + 2;
3400 buf = (char *) as3_alloc(n );
3402 YY_FATAL_ERROR( "out of dynamic memory in as3__scan_bytes()" );
3404 for ( i = 0; i < _yybytes_len; ++i )
3405 buf[i] = yybytes[i];
3407 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
3409 b = as3__scan_buffer(buf,n );
3411 YY_FATAL_ERROR( "bad buffer in as3__scan_bytes()" );
3413 /* It's okay to grow etc. this buffer, and we should throw it
3414 * away when we're done.
3416 b->yy_is_our_buffer = 1;
3421 #ifndef YY_EXIT_FAILURE
3422 #define YY_EXIT_FAILURE 2
3425 static void yy_fatal_error (yyconst char* msg )
3427 (void) fprintf( stderr, "%s\n", msg );
3428 exit( YY_EXIT_FAILURE );
3431 /* Redefine yyless() so it works in section 3 code. */
3437 /* Undo effects of setting up as3_text. */ \
3438 int yyless_macro_arg = (n); \
3439 YY_LESS_LINENO(yyless_macro_arg);\
3440 as3_text[as3_leng] = (yy_hold_char); \
3441 (yy_c_buf_p) = as3_text + yyless_macro_arg; \
3442 (yy_hold_char) = *(yy_c_buf_p); \
3443 *(yy_c_buf_p) = '\0'; \
3444 as3_leng = yyless_macro_arg; \
3448 /* Accessor methods (get/set functions) to struct members. */
3450 /** Get the current line number.
3453 int as3_get_lineno (void)
3459 /** Get the input stream.
3462 FILE *as3_get_in (void)
3467 /** Get the output stream.
3470 FILE *as3_get_out (void)
3475 /** Get the length of the current token.
3478 int as3_get_leng (void)
3483 /** Get the current token.
3487 char *as3_get_text (void)
3492 /** Set the current line number.
3493 * @param line_number
3496 void as3_set_lineno (int line_number )
3499 as3_lineno = line_number;
3502 /** Set the input stream. This does not discard the current
3504 * @param in_str A readable stream.
3506 * @see as3__switch_to_buffer
3508 void as3_set_in (FILE * in_str )
3513 void as3_set_out (FILE * out_str )
3518 int as3_get_debug (void)
3520 return as3__flex_debug;
3523 void as3_set_debug (int bdebug )
3525 as3__flex_debug = bdebug ;
3528 static int yy_init_globals (void)
3530 /* Initialization is the same as for the non-reentrant scanner.
3531 * This function is called from as3_lex_destroy(), so don't allocate here.
3534 (yy_buffer_stack) = 0;
3535 (yy_buffer_stack_top) = 0;
3536 (yy_buffer_stack_max) = 0;
3537 (yy_c_buf_p) = (char *) 0;
3541 /* Defined in main.c */
3546 as3_in = (FILE *) 0;
3547 as3_out = (FILE *) 0;
3550 /* For future reference: Set errno on error, since we are called by
3556 /* as3_lex_destroy is for both reentrant and non-reentrant scanners. */
3557 int as3_lex_destroy (void)
3560 /* Pop the buffer stack, destroying each element. */
3561 while(YY_CURRENT_BUFFER){
3562 as3__delete_buffer(YY_CURRENT_BUFFER );
3563 YY_CURRENT_BUFFER_LVALUE = NULL;
3564 as3_pop_buffer_state();
3567 /* Destroy the stack itself. */
3568 as3_free((yy_buffer_stack) );
3569 (yy_buffer_stack) = NULL;
3571 /* Reset the globals. This is important in a non-reentrant scanner so the next time
3572 * as3_lex() is called, initialization will occur. */
3579 * Internal utility routines.
3583 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
3586 for ( i = 0; i < n; ++i )
3591 #ifdef YY_NEED_STRLEN
3592 static int yy_flex_strlen (yyconst char * s )
3595 for ( n = 0; s[n]; ++n )
3602 void *as3_alloc (yy_size_t size )
3604 return (void *) malloc( size );
3607 void *as3_realloc (void * ptr, yy_size_t size )
3609 /* The cast to (char *) in the following accommodates both
3610 * implementations that use char* generic pointers, and those
3611 * that use void* generic pointers. It works with the latter
3612 * because both ANSI C and C++ allow castless assignment from
3613 * any pointer type to void*, and deal with argument conversions
3614 * as though doing an assignment.
3616 return (void *) realloc( (char *) ptr, size );
3619 void as3_free (void * ptr )
3621 free( (char *) ptr ); /* see as3_realloc() for (char *) cast */
3624 #define YYTABLES_NAME "yytables"
3626 #line 707 "tokenizer.lex"
3635 static char mbuf[256];
3636 char*token2string(enum yytokentype nr, YYSTYPE v)
3638 if(nr==T_STRING) return "<string>";
3639 else if(nr==T_INT) return "<int>";
3640 else if(nr==T_UINT) return "<uint>";
3641 else if(nr==T_BYTE) return "<byte>";
3642 else if(nr==T_FLOAT) return "<float>";
3643 else if(nr==T_REGEXP) return "REGEXP";
3644 else if(nr==T_EOF) return "***END***";
3645 else if(nr==T_GE) return ">=";
3646 else if(nr==T_LE) return "<=";
3647 else if(nr==T_MINUSMINUS) return "--";
3648 else if(nr==T_PLUSPLUS) return "++";
3649 else if(nr==KW_IMPLEMENTS) return "implements";
3650 else if(nr==KW_INTERFACE) return "interface";
3651 else if(nr==KW_NAMESPACE) return "namespace";
3652 else if(nr==KW_PROTECTED) return "protected";
3653 else if(nr==KW_OVERRIDE) return "override";
3654 else if(nr==KW_INTERNAL) return "internal";
3655 else if(nr==KW_FUNCTION) return "function";
3656 else if(nr==KW_PACKAGE) return "package";
3657 else if(nr==KW_PRIVATE) return "private";
3658 else if(nr==KW_BOOLEAN) return "Boolean";
3659 else if(nr==KW_DYNAMIC) return "dynamic";
3660 else if(nr==KW_EXTENDS) return "extends";
3661 else if(nr==KW_PUBLIC) return "public";
3662 else if(nr==KW_NATIVE) return "native";
3663 else if(nr==KW_STATIC) return "static";
3664 else if(nr==KW_IMPORT) return "import";
3665 else if(nr==KW_NUMBER) return "number";
3666 else if(nr==KW_CLASS) return "class";
3667 else if(nr==KW_CONST) return "const";
3668 else if(nr==KW_FINAL) return "final";
3669 else if(nr==KW_FALSE) return "False";
3670 else if(nr==KW_TRUE) return "True";
3671 else if(nr==KW_UINT) return "uint";
3672 else if(nr==KW_NULL) return "null";
3673 else if(nr==KW_ELSE) return "else";
3674 else if(nr==KW_USE) return "use";
3675 else if(nr==KW_INT) return "int";
3676 else if(nr==KW_NEW) return "new";
3677 else if(nr==KW_GET) return "get";
3678 else if(nr==KW_SET) return "set";
3679 else if(nr==KW_VAR) return "var";
3680 else if(nr==KW_IS) return "is";
3681 else if(nr==KW_AS) return "as";
3682 else if(nr==T_IDENTIFIER) return "ID";
3684 sprintf(mbuf, "%d", nr);
3689 void initialize_scanner()