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);
1310 #ifndef YY_CURRENT_BUFFER
1311 #define YY_CURRENT_BUFFER yy_current_buffer
1314 void handleInclude(char*text, int len, char quotes)
1318 char*p1 = strchr(text, '"');
1319 char*p2 = strrchr(text, '"');
1320 if(!p1 || !p2 || p1==p2) {
1321 syntaxerror("Invalid include in line %d\n", current_line);
1324 filename = strdup(p1+1);
1328 while(!strchr(" \n\r\t", text[i1])) i1++;
1330 while(strchr(" \n\r\t", text[i1])) i1++;
1331 while(strchr(" \n\r\t", text[i2-1])) i2--;
1332 if(i2!=len) text[i2]=0;
1333 filename = strdup(&text[i1]);
1336 char*fullfilename = enter_file(filename, YY_CURRENT_BUFFER);
1337 as3_in = fopen(fullfilename, "rb");
1339 syntaxerror("Couldn't open include file \"%s\"\n", fullfilename);
1342 as3__switch_to_buffer(as3__create_buffer(as3_in,YY_BUF_SIZE ) );
1343 //BEGIN(INITIAL); keep context
1346 static int do_unescape(const char*s, const char*end, char*n)
1352 if(o) o[len] = *s;len++;
1356 s++; //skip past '\'
1357 if(s==end) syntaxerror("invalid \\ at end of string");
1359 /* handle the various line endings (mac, dos, unix) */
1372 case '\\': if(o) o[len] = '\\';s++;len++; break;
1373 case '"': if(o) o[len] = '"';s++;len++; break;
1374 case '\'': if(o) o[len] = '\'';s++;len++; break;
1375 case 'b': if(o) o[len] = '\b';s++;len++; break;
1376 case 'f': if(o) o[len] = '\f';s++;len++; break;
1377 case 'n': if(o) o[len] = '\n';s++;len++; break;
1378 case 'r': if(o) o[len] = '\r';s++;len++; break;
1379 case 't': if(o) o[len] = '\t';s++;len++; break;
1380 case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': {
1383 while(strchr("01234567", *s) && nr<3 && s<end) {
1390 syntaxerror("octal number out of range (0-255): %d", num);
1391 if(o) o[len] = num;len++;
1394 case 'x': case 'u': {
1403 if(s==end) syntaxerror("invalid \\u or \\x at end of string");
1406 if(s==end) syntaxerror("invalid \\u{ at end of string");
1411 while(strchr("0123456789abcdefABCDEF", *s) && (bracket || nr < max) && s<end) {
1413 if(*s>='0' && *s<='9') num |= *s - '0';
1414 if(*s>='a' && *s<='f') num |= *s - 'a' + 10;
1415 if(*s>='A' && *s<='F') num |= *s - 'A' + 10;
1420 if(*s=='}' && s<end) {
1423 syntaxerror("missing terminating '}'");
1427 char*utf8 = getUTF8(num);
1429 if(o) o[len] = *utf8;utf8++;len++;
1433 syntaxerror("byte out of range (0-255): %d", num);
1434 if(o) o[len] = num;len++;
1439 syntaxerror("unknown escape sequence: \"\\%c\"", *s);
1446 static string_t string_unescape(const char*in, int l)
1449 const char*end = &in[l];
1451 int len = do_unescape(s, end, 0);
1452 char*n = (char*)malloc(len+1);
1453 do_unescape(s, end, n);
1454 string_t out = string_new(n, len);
1458 static void handleCData(char*s, int len)
1460 a3_lval.str.str = s+9; // <![CDATA[
1461 a3_lval.str.len = len-9-3;// ]]>
1464 static void handleString(char*s, int len)
1467 // don't bother decoding strings in pass 1
1468 memset(&a3_lval, 0, sizeof(a3_lval));
1473 if(s[len-1]!='"') syntaxerror("String doesn't end with '\"'");
1476 else if(s[0]=='\'') {
1477 if(s[len-1]!='\'') syntaxerror("String doesn't end with '\"'");
1480 else syntaxerror("String incorrectly terminated");
1483 a3_lval.str = string_unescape(s, len);
1487 char start_of_expression;
1489 static inline int mkid(int type)
1491 char*s = malloc(as3_leng+1);
1492 memcpy(s, as3_text, as3_leng);
1498 static inline int m(int type)
1500 a3_lval.token = type;
1505 static char numberbuf[64];
1508 if(as3_leng>sizeof(numberbuf)-1)
1509 syntaxerror("decimal number overflow");
1511 memcpy(s, as3_text, as3_leng);
1516 static inline int setint(int v)
1518 a3_lval.number_int = v;
1526 static inline int setuint(unsigned int v)
1528 a3_lval.number_uint = v;
1536 static inline int setfloat(double v)
1538 a3_lval.number_float = v;
1542 static inline int handlefloat()
1545 a3_lval.number_float = atof(s);
1549 static inline int handleint()
1552 char l = (as3_text[0]=='-');
1554 char*max = l?"1073741824":"2147483647";
1556 as3_warning("integer overflow: %s (converted to Number)", s);
1557 return handlefloat();
1559 if(as3_leng-l==10) {
1561 for(t=0;t<as3_leng-l;t++) {
1562 if(as3_text[l+t]>max[t]) {
1563 as3_warning("integer overflow: %s (converted to Number)", s);
1564 return handlefloat();
1566 else if(as3_text[l+t]<max[t])
1570 if(as3_text[0]=='-') {
1576 for(t=0;t<as3_leng;t++) {
1584 static inline int handlehexfloat()
1586 char l = (as3_text[0]=='-')+2;
1591 for(t=l;t<as3_leng;t++) {
1592 char c = as3_text[t];
1602 if(c>='0' && c<='9')
1604 else if((c>='a' && c<='f') || (c>='A' && c<='F'))
1605 d+=((c&0x0f)+9)*base;
1609 static inline int handlehex()
1611 char l = (as3_text[0]=='-')+2;
1616 syntaxerror("integer overflow %s", s);
1621 for(t=l;t<len;t++) {
1623 char c = as3_text[t];
1624 if(c>='0' && c<='9')
1626 else if((c>='a' && c<='f') || (c>='A' && c<='F'))
1629 if(l && v>1073741824) {
1631 as3_warning("signed integer overflow: %s (converted to Number)", s);
1634 if(!l && v>2147483647) {
1636 as3_warning("unsigned integer overflow: %s (converted to Number)", s);
1641 return setint(-(int)v);
1647 void handleLabel(char*text, int len)
1650 for(t=len-1;t>=0;--t) {
1655 char*s = malloc(t+1);
1656 memcpy(s, as3_text, t);
1661 static int handleregexp()
1663 char*s = malloc(as3_leng);
1665 memcpy(s, as3_text+1, len);
1668 for(t=len;t>=0;--t) {
1674 a3_lval.regexp.pattern = s;
1676 a3_lval.regexp.options = 0;
1678 a3_lval.regexp.options = s+t+1;
1683 void initialize_scanner();
1684 #define YY_USER_INIT initialize_scanner();
1686 /* count the number of lines+columns consumed by this token */
1687 static inline void l() {
1689 for(t=0;t<as3_leng;t++) {
1690 if(as3_text[t]=='\n') {
1698 /* count the number of columns consumed by this token */
1699 static inline void c() {
1700 current_column+=as3_leng;
1703 //Boolean {c();return m(KW_BOOLEAN);}
1704 //int {c();return m(KW_INT);}
1705 //uint {c();return m(KW_UINT);}
1706 //Number {c();return m(KW_NUMBER);}
1711 #line 1712 "tokenizer.yy.c"
1717 #ifndef YY_NO_UNISTD_H
1718 /* Special case for "unistd.h", since it is non-ANSI. We include it way
1719 * down here because we want the user's section 1 to have been scanned first.
1720 * The user has a chance to override it with an option.
1725 #ifndef YY_EXTRA_TYPE
1726 #define YY_EXTRA_TYPE void *
1729 static int yy_init_globals (void );
1731 /* Accessor methods to globals.
1732 These are made visible to non-reentrant scanners for convenience. */
1734 int as3_lex_destroy (void );
1736 int as3_get_debug (void );
1738 void as3_set_debug (int debug_flag );
1740 YY_EXTRA_TYPE as3_get_extra (void );
1742 void as3_set_extra (YY_EXTRA_TYPE user_defined );
1744 FILE *as3_get_in (void );
1746 void as3_set_in (FILE * in_str );
1748 FILE *as3_get_out (void );
1750 void as3_set_out (FILE * out_str );
1752 int as3_get_leng (void );
1754 char *as3_get_text (void );
1756 int as3_get_lineno (void );
1758 void as3_set_lineno (int line_number );
1760 /* Macros after this point can all be overridden by user definitions in
1764 #ifndef YY_SKIP_YYWRAP
1766 extern "C" int as3_wrap (void );
1768 extern int as3_wrap (void );
1772 static void yyunput (int c,char *buf_ptr );
1775 static void yy_flex_strncpy (char *,yyconst char *,int );
1778 #ifdef YY_NEED_STRLEN
1779 static int yy_flex_strlen (yyconst char * );
1785 static int yyinput (void );
1787 static int input (void );
1792 /* Amount of stuff to slurp up with each read. */
1793 #ifndef YY_READ_BUF_SIZE
1794 #define YY_READ_BUF_SIZE 8192
1797 /* Copy whatever the last rule matched to the standard output. */
1799 /* This used to be an fputs(), but since the string might contain NUL's,
1800 * we now use fwrite().
1802 #define ECHO fwrite( as3_text, as3_leng, 1, as3_out )
1805 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1806 * is returned in "result".
1809 #define YY_INPUT(buf,result,max_size) \
1810 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1814 for ( n = 0; n < max_size && \
1815 (c = getc( as3_in )) != EOF && c != '\n'; ++n ) \
1816 buf[n] = (char) c; \
1818 buf[n++] = (char) c; \
1819 if ( c == EOF && ferror( as3_in ) ) \
1820 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1826 while ( (result = fread(buf, 1, max_size, as3_in))==0 && ferror(as3_in)) \
1828 if( errno != EINTR) \
1830 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1841 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1842 * we don't want an extra ';' after the "return" because that will cause
1843 * some compilers to complain about unreachable statements.
1846 #define yyterminate() return YY_NULL
1849 /* Number of entries by which start-condition stack grows. */
1850 #ifndef YY_START_STACK_INCR
1851 #define YY_START_STACK_INCR 25
1854 /* Report a fatal error. */
1855 #ifndef YY_FATAL_ERROR
1856 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1859 /* end tables serialization structures and prototypes */
1861 /* Default declaration of generated scanner - a define so the user can
1862 * easily add parameters.
1865 #define YY_DECL_IS_OURS 1
1867 extern int as3_lex (void);
1869 #define YY_DECL int as3_lex (void)
1870 #endif /* !YY_DECL */
1872 /* Code executed at the beginning of each rule, after as3_text and as3_leng
1875 #ifndef YY_USER_ACTION
1876 #define YY_USER_ACTION
1879 /* Code executed at the end of each rule. */
1881 #define YY_BREAK break;
1884 #define YY_RULE_SETUP \
1885 if ( as3_leng > 0 ) \
1886 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
1887 (as3_text[as3_leng - 1] == '\n'); \
1890 /** The main scanner function which does all the work.
1894 register yy_state_type yy_current_state;
1895 register char *yy_cp, *yy_bp;
1896 register int yy_act;
1898 #line 523 "tokenizer.lex"
1902 #line 1903 "tokenizer.yy.c"
1913 (yy_start) = 1; /* first start state */
1921 if ( ! YY_CURRENT_BUFFER ) {
1922 as3_ensure_buffer_stack ();
1923 YY_CURRENT_BUFFER_LVALUE =
1924 as3__create_buffer(as3_in,YY_BUF_SIZE );
1927 as3__load_buffer_state( );
1930 while ( 1 ) /* loops until end-of-file is reached */
1932 yy_cp = (yy_c_buf_p);
1934 /* Support of as3_text. */
1935 *yy_cp = (yy_hold_char);
1937 /* yy_bp points to the position in yy_ch_buf of the start of
1942 yy_current_state = (yy_start);
1943 yy_current_state += YY_AT_BOL();
1947 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1948 if ( yy_accept[yy_current_state] )
1950 (yy_last_accepting_state) = yy_current_state;
1951 (yy_last_accepting_cpos) = yy_cp;
1953 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1955 yy_current_state = (int) yy_def[yy_current_state];
1956 if ( yy_current_state >= 483 )
1957 yy_c = yy_meta[(unsigned int) yy_c];
1959 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1962 while ( yy_current_state != 482 );
1963 yy_cp = (yy_last_accepting_cpos);
1964 yy_current_state = (yy_last_accepting_state);
1967 yy_act = yy_accept[yy_current_state];
1969 YY_DO_BEFORE_ACTION;
1971 do_action: /* This label is used only to access EOF actions. */
1974 { /* beginning of action switch */
1975 case 0: /* must back up */
1976 /* undo the effects of YY_DO_BEFORE_ACTION */
1977 *yy_cp = (yy_hold_char);
1978 yy_cp = (yy_last_accepting_cpos);
1979 yy_current_state = (yy_last_accepting_state);
1980 goto yy_find_action;
1983 /* rule 1 can match eol */
1985 #line 526 "tokenizer.lex"
1986 {l(); /* single line comment */}
1989 /* rule 2 can match eol */
1991 #line 527 "tokenizer.lex"
1992 {l(); /* multi line comment */}
1996 #line 528 "tokenizer.lex"
1997 {syntaxerror("syntax error: unterminated comment", as3_text);}
2000 /* rule 4 can match eol */
2001 *yy_cp = (yy_hold_char); /* undo effects of setting up as3_text */
2002 (yy_c_buf_p) = yy_cp -= 1;
2003 YY_DO_BEFORE_ACTION; /* set up as3_text again */
2005 #line 530 "tokenizer.lex"
2006 {l();handleInclude(as3_text, as3_leng, 1);}
2009 /* rule 5 can match eol */
2010 *yy_cp = (yy_hold_char); /* undo effects of setting up as3_text */
2011 (yy_c_buf_p) = yy_cp -= 1;
2012 YY_DO_BEFORE_ACTION; /* set up as3_text again */
2014 #line 531 "tokenizer.lex"
2015 {l();handleInclude(as3_text, as3_leng, 0);}
2018 /* rule 6 can match eol */
2020 #line 532 "tokenizer.lex"
2021 {l(); BEGIN(INITIAL);handleString(as3_text, as3_leng);return T_STRING;}
2024 /* rule 7 can match eol */
2026 #line 533 "tokenizer.lex"
2027 {l(); BEGIN(INITIAL);handleCData(as3_text, as3_leng);return T_STRING;}
2032 #line 536 "tokenizer.lex"
2033 {c(); BEGIN(INITIAL);return handleregexp();}
2037 #line 537 "tokenizer.lex"
2038 {c(); BEGIN(INITIAL);return handlehex();}
2042 #line 538 "tokenizer.lex"
2043 {c(); BEGIN(INITIAL);return handlehexfloat();}
2047 #line 539 "tokenizer.lex"
2048 {c(); BEGIN(INITIAL);return handleint();}
2052 #line 540 "tokenizer.lex"
2053 {c(); BEGIN(INITIAL);return handlefloat();}
2058 #line 543 "tokenizer.lex"
2062 /* rule 14 can match eol */
2064 #line 544 "tokenizer.lex"
2069 #line 546 "tokenizer.lex"
2070 {c(); BEGIN(INITIAL);return handlehex();}
2074 #line 547 "tokenizer.lex"
2075 {c(); BEGIN(INITIAL);return handlehexfloat();}
2079 #line 548 "tokenizer.lex"
2080 {c(); BEGIN(INITIAL);return handleint();}
2084 #line 549 "tokenizer.lex"
2085 {c(); BEGIN(INITIAL);return handlefloat();}
2089 #line 551 "tokenizer.lex"
2090 {/* for debugging: generates a tokenizer-level error */
2091 syntaxerror("3rr0r");}
2094 /* rule 20 can match eol */
2095 *yy_cp = (yy_hold_char); /* undo effects of setting up as3_text */
2096 (yy_c_buf_p) = yy_cp -= 1;
2097 YY_DO_BEFORE_ACTION; /* set up as3_text again */
2099 #line 554 "tokenizer.lex"
2100 {l();handleLabel(as3_text, as3_leng-3);return T_FOR;}
2103 /* rule 21 can match eol */
2104 *yy_cp = (yy_hold_char); /* undo effects of setting up as3_text */
2105 (yy_c_buf_p) = yy_cp -= 1;
2106 YY_DO_BEFORE_ACTION; /* set up as3_text again */
2108 #line 555 "tokenizer.lex"
2109 {l();handleLabel(as3_text, as3_leng-2);return T_DO;}
2112 /* rule 22 can match eol */
2113 *yy_cp = (yy_hold_char); /* undo effects of setting up as3_text */
2114 (yy_c_buf_p) = yy_cp -= 1;
2115 YY_DO_BEFORE_ACTION; /* set up as3_text again */
2117 #line 556 "tokenizer.lex"
2118 {l();handleLabel(as3_text, as3_leng-5);return T_WHILE;}
2121 /* rule 23 can match eol */
2122 *yy_cp = (yy_hold_char); /* undo effects of setting up as3_text */
2123 (yy_c_buf_p) = yy_cp -= 1;
2124 YY_DO_BEFORE_ACTION; /* set up as3_text again */
2126 #line 557 "tokenizer.lex"
2127 {l();handleLabel(as3_text, as3_leng-6);return T_SWITCH;}
2131 #line 558 "tokenizer.lex"
2132 {c();a3_lval.id="";return T_FOR;}
2136 #line 559 "tokenizer.lex"
2137 {c();a3_lval.id="";return T_DO;}
2141 #line 560 "tokenizer.lex"
2142 {c();a3_lval.id="";return T_WHILE;}
2146 #line 561 "tokenizer.lex"
2147 {c();a3_lval.id="";return T_SWITCH;}
2151 #line 563 "tokenizer.lex"
2152 {c();BEGIN(REGEXPOK);return m(T_ANDAND);}
2156 #line 564 "tokenizer.lex"
2157 {c();BEGIN(REGEXPOK);return m(T_OROR);}
2161 #line 565 "tokenizer.lex"
2162 {c();BEGIN(REGEXPOK);return m(T_NE);}
2166 #line 566 "tokenizer.lex"
2167 {c();BEGIN(REGEXPOK);return m(T_NEE);}
2171 #line 567 "tokenizer.lex"
2172 {c();BEGIN(REGEXPOK);return m(T_EQEQEQ);}
2176 #line 568 "tokenizer.lex"
2177 {c();BEGIN(REGEXPOK);return m(T_EQEQ);}
2181 #line 569 "tokenizer.lex"
2182 {c();return m(T_GE);}
2186 #line 570 "tokenizer.lex"
2187 {c();return m(T_LE);}
2191 #line 571 "tokenizer.lex"
2192 {c();BEGIN(INITIAL);return m(T_MINUSMINUS);}
2196 #line 572 "tokenizer.lex"
2197 {c();BEGIN(INITIAL);return m(T_PLUSPLUS);}
2201 #line 573 "tokenizer.lex"
2202 {c();return m(T_PLUSBY);}
2206 #line 574 "tokenizer.lex"
2207 {c();return m(T_MINUSBY);}
2211 #line 575 "tokenizer.lex"
2212 {c();return m(T_DIVBY);}
2216 #line 576 "tokenizer.lex"
2217 {c();return m(T_MODBY);}
2221 #line 577 "tokenizer.lex"
2222 {c();return m(T_MULBY);}
2226 #line 578 "tokenizer.lex"
2227 {c();return m(T_ORBY);}
2231 #line 579 "tokenizer.lex"
2232 {c();return m(T_SHRBY);}
2236 #line 580 "tokenizer.lex"
2237 {c();return m(T_SHLBY);}
2241 #line 581 "tokenizer.lex"
2242 {c();return m(T_USHRBY);}
2246 #line 582 "tokenizer.lex"
2247 {c();return m(T_SHL);}
2251 #line 583 "tokenizer.lex"
2252 {c();return m(T_USHR);}
2256 #line 584 "tokenizer.lex"
2257 {c();return m(T_SHR);}
2261 #line 585 "tokenizer.lex"
2262 {c();return m(T_DOTDOTDOT);}
2266 #line 586 "tokenizer.lex"
2267 {c();return m(T_DOTDOT);}
2271 #line 587 "tokenizer.lex"
2272 {c();return m('.');}
2276 #line 588 "tokenizer.lex"
2277 {c();return m(T_COLONCOLON);}
2281 #line 589 "tokenizer.lex"
2282 {c();return m(':');}
2286 #line 590 "tokenizer.lex"
2287 {c();return m(KW_INSTANCEOF);}
2291 #line 591 "tokenizer.lex"
2292 {c();return m(KW_IMPLEMENTS);}
2296 #line 592 "tokenizer.lex"
2297 {c();return m(KW_INTERFACE);}
2301 #line 593 "tokenizer.lex"
2302 {c();return m(KW_NAMESPACE);}
2306 #line 594 "tokenizer.lex"
2307 {c();return m(KW_PROTECTED);}
2311 #line 595 "tokenizer.lex"
2312 {c();return m(KW_UNDEFINED);}
2316 #line 596 "tokenizer.lex"
2317 {c();return m(KW_CONTINUE);}
2321 #line 597 "tokenizer.lex"
2322 {c();return m(KW_OVERRIDE);}
2326 #line 598 "tokenizer.lex"
2327 {c();return m(KW_INTERNAL);}
2331 #line 599 "tokenizer.lex"
2332 {c();return m(KW_FUNCTION);}
2336 #line 600 "tokenizer.lex"
2337 {c();return m(KW_FINALLY);}
2341 #line 601 "tokenizer.lex"
2342 {c();return m(KW_DEFAULT);}
2346 #line 602 "tokenizer.lex"
2347 {c();return m(KW_PACKAGE);}
2351 #line 603 "tokenizer.lex"
2352 {c();return m(KW_PRIVATE);}
2356 #line 604 "tokenizer.lex"
2357 {c();return m(KW_DYNAMIC);}
2361 #line 605 "tokenizer.lex"
2362 {c();return m(KW_EXTENDS);}
2366 #line 606 "tokenizer.lex"
2367 {c();return m(KW_DELETE);}
2371 #line 607 "tokenizer.lex"
2372 {c();return m(KW_RETURN);}
2376 #line 608 "tokenizer.lex"
2377 {c();return m(KW_PUBLIC);}
2381 #line 609 "tokenizer.lex"
2382 {c();return m(KW_NATIVE);}
2386 #line 610 "tokenizer.lex"
2387 {c();return m(KW_STATIC);}
2391 #line 611 "tokenizer.lex"
2392 {c();return m(KW_IMPORT);}
2396 #line 612 "tokenizer.lex"
2397 {c();return m(KW_TYPEOF);}
2401 #line 613 "tokenizer.lex"
2402 {c();return m(KW_THROW);}
2406 #line 614 "tokenizer.lex"
2407 {c();return m(KW_CLASS);}
2411 #line 615 "tokenizer.lex"
2412 {c();return m(KW_CONST);}
2416 #line 616 "tokenizer.lex"
2417 {c();return m(KW_CATCH);}
2421 #line 617 "tokenizer.lex"
2422 {c();return m(KW_FINAL);}
2426 #line 618 "tokenizer.lex"
2427 {c();return m(KW_FALSE);}
2431 #line 619 "tokenizer.lex"
2432 {c();return m(KW_BREAK);}
2436 #line 620 "tokenizer.lex"
2437 {c();return m(KW_SUPER);}
2441 #line 621 "tokenizer.lex"
2442 {c();return m(KW_EACH);}
2446 #line 622 "tokenizer.lex"
2447 {c();return m(KW_VOID);}
2451 #line 623 "tokenizer.lex"
2452 {c();return m(KW_TRUE);}
2456 #line 624 "tokenizer.lex"
2457 {c();return m(KW_NULL);}
2461 #line 625 "tokenizer.lex"
2462 {c();return m(KW_ELSE);}
2466 #line 626 "tokenizer.lex"
2467 {c();return m(KW_CASE);}
2471 #line 627 "tokenizer.lex"
2472 {c();return m(KW_WITH);}
2476 #line 628 "tokenizer.lex"
2477 {c();return m(KW_USE);}
2481 #line 629 "tokenizer.lex"
2482 {c();return m(KW_NEW);}
2486 #line 630 "tokenizer.lex"
2487 {c();return m(KW_GET);}
2491 #line 631 "tokenizer.lex"
2492 {c();return m(KW_SET);}
2496 #line 632 "tokenizer.lex"
2497 {c();return m(KW_VAR);}
2501 #line 633 "tokenizer.lex"
2502 {c();return m(KW_TRY);}
2506 #line 634 "tokenizer.lex"
2507 {c();return m(KW_IS) ;}
2511 #line 635 "tokenizer.lex"
2512 {c();return m(KW_IN) ;}
2516 #line 636 "tokenizer.lex"
2517 {c();return m(KW_IF) ;}
2521 #line 637 "tokenizer.lex"
2522 {c();return m(KW_AS);}
2526 #line 638 "tokenizer.lex"
2527 {c();BEGIN(INITIAL);return mkid(T_IDENTIFIER);}
2531 #line 640 "tokenizer.lex"
2532 {c();BEGIN(REGEXPOK);return m(as3_text[0]);}
2536 #line 641 "tokenizer.lex"
2537 {c();BEGIN(INITIAL);return m(as3_text[0]);}
2541 #line 643 "tokenizer.lex"
2543 char c1=as3_text[0];
2545 buf[0] = as3_text[0];
2547 for(t=1;t<128;t++) {
2548 char c = buf[t]=input();
2549 if(c=='\n' || c==EOF) {
2554 if(c1>='0' && c1<='9')
2555 syntaxerror("syntax error: %s (identifiers must not start with a digit)");
2557 syntaxerror("syntax error: %s", buf);
2563 case YY_STATE_EOF(INITIAL):
2564 case YY_STATE_EOF(REGEXPOK):
2565 case YY_STATE_EOF(BEGINNING):
2566 #line 663 "tokenizer.lex"
2568 void*b = leave_file();
2571 as3__delete_buffer(YY_CURRENT_BUFFER);
2574 as3__delete_buffer(YY_CURRENT_BUFFER);
2575 as3__switch_to_buffer(b);
2581 #line 675 "tokenizer.lex"
2584 #line 2585 "tokenizer.yy.c"
2586 case YY_END_OF_BUFFER:
2588 /* Amount of text matched not including the EOB char. */
2589 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
2591 /* Undo the effects of YY_DO_BEFORE_ACTION. */
2592 *yy_cp = (yy_hold_char);
2593 YY_RESTORE_YY_MORE_OFFSET
2595 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
2597 /* We're scanning a new file or input source. It's
2598 * possible that this happened because the user
2599 * just pointed as3_in at a new source and called
2600 * as3_lex(). If so, then we have to assure
2601 * consistency between YY_CURRENT_BUFFER and our
2602 * globals. Here is the right place to do so, because
2603 * this is the first action (other than possibly a
2604 * back-up) that will match for the new input source.
2606 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2607 YY_CURRENT_BUFFER_LVALUE->yy_input_file = as3_in;
2608 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
2611 /* Note that here we test for yy_c_buf_p "<=" to the position
2612 * of the first EOB in the buffer, since yy_c_buf_p will
2613 * already have been incremented past the NUL character
2614 * (since all states make transitions on EOB to the
2615 * end-of-buffer state). Contrast this with the test
2618 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2619 { /* This was really a NUL. */
2620 yy_state_type yy_next_state;
2622 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
2624 yy_current_state = yy_get_previous_state( );
2626 /* Okay, we're now positioned to make the NUL
2627 * transition. We couldn't have
2628 * yy_get_previous_state() go ahead and do it
2629 * for us because it doesn't know how to deal
2630 * with the possibility of jamming (and we don't
2631 * want to build jamming into it because then it
2632 * will run more slowly).
2635 yy_next_state = yy_try_NUL_trans( yy_current_state );
2637 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2639 if ( yy_next_state )
2641 /* Consume the NUL. */
2642 yy_cp = ++(yy_c_buf_p);
2643 yy_current_state = yy_next_state;
2649 yy_cp = (yy_last_accepting_cpos);
2650 yy_current_state = (yy_last_accepting_state);
2651 goto yy_find_action;
2655 else switch ( yy_get_next_buffer( ) )
2657 case EOB_ACT_END_OF_FILE:
2659 (yy_did_buffer_switch_on_eof) = 0;
2663 /* Note: because we've taken care in
2664 * yy_get_next_buffer() to have set up
2665 * as3_text, we can now set up
2666 * yy_c_buf_p so that if some total
2667 * hoser (like flex itself) wants to
2668 * call the scanner after we return the
2669 * YY_NULL, it'll still work - another
2670 * YY_NULL will get returned.
2672 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
2674 yy_act = YY_STATE_EOF(YY_START);
2680 if ( ! (yy_did_buffer_switch_on_eof) )
2686 case EOB_ACT_CONTINUE_SCAN:
2688 (yytext_ptr) + yy_amount_of_matched_text;
2690 yy_current_state = yy_get_previous_state( );
2692 yy_cp = (yy_c_buf_p);
2693 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2696 case EOB_ACT_LAST_MATCH:
2698 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
2700 yy_current_state = yy_get_previous_state( );
2702 yy_cp = (yy_c_buf_p);
2703 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2704 goto yy_find_action;
2711 "fatal flex scanner internal error--no action found" );
2712 } /* end of action switch */
2713 } /* end of scanning one token */
2714 } /* end of as3_lex */
2716 /* yy_get_next_buffer - try to read in a new buffer
2718 * Returns a code representing an action:
2719 * EOB_ACT_LAST_MATCH -
2720 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2721 * EOB_ACT_END_OF_FILE - end of file
2723 static int yy_get_next_buffer (void)
2725 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
2726 register char *source = (yytext_ptr);
2727 register int number_to_move, i;
2730 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
2732 "fatal flex scanner internal error--end of buffer missed" );
2734 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
2735 { /* Don't try to fill the buffer, so this is an EOF. */
2736 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
2738 /* We matched a single character, the EOB, so
2739 * treat this as a final EOF.
2741 return EOB_ACT_END_OF_FILE;
2746 /* We matched some text prior to the EOB, first
2749 return EOB_ACT_LAST_MATCH;
2753 /* Try to read more data. */
2755 /* First move last chars to start of buffer. */
2756 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
2758 for ( i = 0; i < number_to_move; ++i )
2759 *(dest++) = *(source++);
2761 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2762 /* don't do the read, it's not guaranteed to return an EOF,
2765 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
2770 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
2772 while ( num_to_read <= 0 )
2773 { /* Not enough room in the buffer - grow it. */
2775 /* just a shorter name for the current buffer */
2776 YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
2778 int yy_c_buf_p_offset =
2779 (int) ((yy_c_buf_p) - b->yy_ch_buf);
2781 if ( b->yy_is_our_buffer )
2783 int new_size = b->yy_buf_size * 2;
2785 if ( new_size <= 0 )
2786 b->yy_buf_size += b->yy_buf_size / 8;
2788 b->yy_buf_size *= 2;
2790 b->yy_ch_buf = (char *)
2791 /* Include room in for 2 EOB chars. */
2792 as3_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
2795 /* Can't grow it, we don't own it. */
2798 if ( ! b->yy_ch_buf )
2800 "fatal error - scanner input buffer overflow" );
2802 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
2804 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
2809 if ( num_to_read > YY_READ_BUF_SIZE )
2810 num_to_read = YY_READ_BUF_SIZE;
2812 /* Read in more data. */
2813 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2814 (yy_n_chars), (size_t) num_to_read );
2816 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2819 if ( (yy_n_chars) == 0 )
2821 if ( number_to_move == YY_MORE_ADJ )
2823 ret_val = EOB_ACT_END_OF_FILE;
2824 as3_restart(as3_in );
2829 ret_val = EOB_ACT_LAST_MATCH;
2830 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
2831 YY_BUFFER_EOF_PENDING;
2836 ret_val = EOB_ACT_CONTINUE_SCAN;
2838 if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
2839 /* Extend the array by 50%, plus the number we really need. */
2840 yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
2841 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) as3_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
2842 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2843 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
2846 (yy_n_chars) += number_to_move;
2847 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
2848 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
2850 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
2855 /* yy_get_previous_state - get the state just before the EOB char was reached */
2857 static yy_state_type yy_get_previous_state (void)
2859 register yy_state_type yy_current_state;
2860 register char *yy_cp;
2862 yy_current_state = (yy_start);
2863 yy_current_state += YY_AT_BOL();
2865 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
2867 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2868 if ( yy_accept[yy_current_state] )
2870 (yy_last_accepting_state) = yy_current_state;
2871 (yy_last_accepting_cpos) = yy_cp;
2873 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2875 yy_current_state = (int) yy_def[yy_current_state];
2876 if ( yy_current_state >= 483 )
2877 yy_c = yy_meta[(unsigned int) yy_c];
2879 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2882 return yy_current_state;
2885 /* yy_try_NUL_trans - try to make a transition on the NUL character
2888 * next_state = yy_try_NUL_trans( current_state );
2890 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
2892 register int yy_is_jam;
2893 register char *yy_cp = (yy_c_buf_p);
2895 register YY_CHAR yy_c = 1;
2896 if ( yy_accept[yy_current_state] )
2898 (yy_last_accepting_state) = yy_current_state;
2899 (yy_last_accepting_cpos) = yy_cp;
2901 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2903 yy_current_state = (int) yy_def[yy_current_state];
2904 if ( yy_current_state >= 483 )
2905 yy_c = yy_meta[(unsigned int) yy_c];
2907 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2908 yy_is_jam = (yy_current_state == 482);
2910 return yy_is_jam ? 0 : yy_current_state;
2913 static void yyunput (int c, register char * yy_bp )
2915 register char *yy_cp;
2917 yy_cp = (yy_c_buf_p);
2919 /* undo effects of setting up as3_text */
2920 *yy_cp = (yy_hold_char);
2922 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2923 { /* need to shift things up to make room */
2924 /* +2 for EOB chars. */
2925 register int number_to_move = (yy_n_chars) + 2;
2926 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
2927 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
2928 register char *source =
2929 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
2931 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2932 *--dest = *--source;
2934 yy_cp += (int) (dest - source);
2935 yy_bp += (int) (dest - source);
2936 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
2937 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
2939 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2940 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2943 *--yy_cp = (char) c;
2945 (yytext_ptr) = yy_bp;
2946 (yy_hold_char) = *yy_cp;
2947 (yy_c_buf_p) = yy_cp;
2952 static int yyinput (void)
2954 static int input (void)
2960 *(yy_c_buf_p) = (yy_hold_char);
2962 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
2964 /* yy_c_buf_p now points to the character we want to return.
2965 * If this occurs *before* the EOB characters, then it's a
2966 * valid NUL; if not, then we've hit the end of the buffer.
2968 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2969 /* This was really a NUL. */
2970 *(yy_c_buf_p) = '\0';
2973 { /* need more input */
2974 int offset = (yy_c_buf_p) - (yytext_ptr);
2977 switch ( yy_get_next_buffer( ) )
2979 case EOB_ACT_LAST_MATCH:
2980 /* This happens because yy_g_n_b()
2981 * sees that we've accumulated a
2982 * token and flags that we need to
2983 * try matching the token before
2984 * proceeding. But for input(),
2985 * there's no matching to consider.
2986 * So convert the EOB_ACT_LAST_MATCH
2987 * to EOB_ACT_END_OF_FILE.
2990 /* Reset buffer status. */
2991 as3_restart(as3_in );
2995 case EOB_ACT_END_OF_FILE:
3000 if ( ! (yy_did_buffer_switch_on_eof) )
3009 case EOB_ACT_CONTINUE_SCAN:
3010 (yy_c_buf_p) = (yytext_ptr) + offset;
3016 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
3017 *(yy_c_buf_p) = '\0'; /* preserve as3_text */
3018 (yy_hold_char) = *++(yy_c_buf_p);
3020 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
3024 #endif /* ifndef YY_NO_INPUT */
3026 /** Immediately switch to a different input stream.
3027 * @param input_file A readable stream.
3029 * @note This function does not reset the start condition to @c INITIAL .
3031 void as3_restart (FILE * input_file )
3034 if ( ! YY_CURRENT_BUFFER ){
3035 as3_ensure_buffer_stack ();
3036 YY_CURRENT_BUFFER_LVALUE =
3037 as3__create_buffer(as3_in,YY_BUF_SIZE );
3040 as3__init_buffer(YY_CURRENT_BUFFER,input_file );
3041 as3__load_buffer_state( );
3044 /** Switch to a different input buffer.
3045 * @param new_buffer The new input buffer.
3048 void as3__switch_to_buffer (YY_BUFFER_STATE new_buffer )
3051 /* TODO. We should be able to replace this entire function body
3053 * as3_pop_buffer_state();
3054 * as3_push_buffer_state(new_buffer);
3056 as3_ensure_buffer_stack ();
3057 if ( YY_CURRENT_BUFFER == new_buffer )
3060 if ( YY_CURRENT_BUFFER )
3062 /* Flush out information for old buffer. */
3063 *(yy_c_buf_p) = (yy_hold_char);
3064 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
3065 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
3068 YY_CURRENT_BUFFER_LVALUE = new_buffer;
3069 as3__load_buffer_state( );
3071 /* We don't actually know whether we did this switch during
3072 * EOF (as3_wrap()) processing, but the only time this flag
3073 * is looked at is after as3_wrap() is called, so it's safe
3074 * to go ahead and always set it.
3076 (yy_did_buffer_switch_on_eof) = 1;
3079 static void as3__load_buffer_state (void)
3081 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
3082 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
3083 as3_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
3084 (yy_hold_char) = *(yy_c_buf_p);
3087 /** Allocate and initialize an input buffer state.
3088 * @param file A readable stream.
3089 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
3091 * @return the allocated buffer state.
3093 YY_BUFFER_STATE as3__create_buffer (FILE * file, int size )
3097 b = (YY_BUFFER_STATE) as3_alloc(sizeof( struct yy_buffer_state ) );
3099 YY_FATAL_ERROR( "out of dynamic memory in as3__create_buffer()" );
3101 b->yy_buf_size = size;
3103 /* yy_ch_buf has to be 2 characters longer than the size given because
3104 * we need to put in 2 end-of-buffer characters.
3106 b->yy_ch_buf = (char *) as3_alloc(b->yy_buf_size + 2 );
3107 if ( ! b->yy_ch_buf )
3108 YY_FATAL_ERROR( "out of dynamic memory in as3__create_buffer()" );
3110 b->yy_is_our_buffer = 1;
3112 as3__init_buffer(b,file );
3117 /** Destroy the buffer.
3118 * @param b a buffer created with as3__create_buffer()
3121 void as3__delete_buffer (YY_BUFFER_STATE b )
3127 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
3128 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
3130 if ( b->yy_is_our_buffer )
3131 as3_free((void *) b->yy_ch_buf );
3133 as3_free((void *) b );
3136 #ifndef _UNISTD_H /* assume unistd.h has isatty() for us */
3140 #ifdef __THROW /* this is a gnuism */
3141 extern int isatty (int ) __THROW;
3143 extern int isatty (int );
3150 /* Initializes or reinitializes a buffer.
3151 * This function is sometimes called more than once on the same buffer,
3152 * such as during a as3_restart() or at EOF.
3154 static void as3__init_buffer (YY_BUFFER_STATE b, FILE * file )
3159 as3__flush_buffer(b );
3161 b->yy_input_file = file;
3162 b->yy_fill_buffer = 1;
3164 /* If b is the current buffer, then as3__init_buffer was _probably_
3165 * called from as3_restart() or through yy_get_next_buffer.
3166 * In that case, we don't want to reset the lineno or column.
3168 if (b != YY_CURRENT_BUFFER){
3169 b->yy_bs_lineno = 1;
3170 b->yy_bs_column = 0;
3173 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
3178 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
3179 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
3182 void as3__flush_buffer (YY_BUFFER_STATE b )
3189 /* We always need two end-of-buffer characters. The first causes
3190 * a transition to the end-of-buffer state. The second causes
3191 * a jam in that state.
3193 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
3194 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
3196 b->yy_buf_pos = &b->yy_ch_buf[0];
3199 b->yy_buffer_status = YY_BUFFER_NEW;
3201 if ( b == YY_CURRENT_BUFFER )
3202 as3__load_buffer_state( );
3205 /** Pushes the new state onto the stack. The new state becomes
3206 * the current state. This function will allocate the stack
3208 * @param new_buffer The new state.
3211 void as3_push_buffer_state (YY_BUFFER_STATE new_buffer )
3213 if (new_buffer == NULL)
3216 as3_ensure_buffer_stack();
3218 /* This block is copied from as3__switch_to_buffer. */
3219 if ( YY_CURRENT_BUFFER )
3221 /* Flush out information for old buffer. */
3222 *(yy_c_buf_p) = (yy_hold_char);
3223 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
3224 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
3227 /* Only push if top exists. Otherwise, replace top. */
3228 if (YY_CURRENT_BUFFER)
3229 (yy_buffer_stack_top)++;
3230 YY_CURRENT_BUFFER_LVALUE = new_buffer;
3232 /* copied from as3__switch_to_buffer. */
3233 as3__load_buffer_state( );
3234 (yy_did_buffer_switch_on_eof) = 1;
3237 /** Removes and deletes the top of the stack, if present.
3238 * The next element becomes the new top.
3241 void as3_pop_buffer_state (void)
3243 if (!YY_CURRENT_BUFFER)
3246 as3__delete_buffer(YY_CURRENT_BUFFER );
3247 YY_CURRENT_BUFFER_LVALUE = NULL;
3248 if ((yy_buffer_stack_top) > 0)
3249 --(yy_buffer_stack_top);
3251 if (YY_CURRENT_BUFFER) {
3252 as3__load_buffer_state( );
3253 (yy_did_buffer_switch_on_eof) = 1;
3257 /* Allocates the stack if it does not exist.
3258 * Guarantees space for at least one push.
3260 static void as3_ensure_buffer_stack (void)
3264 if (!(yy_buffer_stack)) {
3266 /* First allocation is just for 2 elements, since we don't know if this
3267 * scanner will even need a stack. We use 2 instead of 1 to avoid an
3268 * immediate realloc on the next call.
3271 (yy_buffer_stack) = (struct yy_buffer_state**)as3_alloc
3272 (num_to_alloc * sizeof(struct yy_buffer_state*)
3274 if ( ! (yy_buffer_stack) )
3275 YY_FATAL_ERROR( "out of dynamic memory in as3_ensure_buffer_stack()" );
3277 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
3279 (yy_buffer_stack_max) = num_to_alloc;
3280 (yy_buffer_stack_top) = 0;
3284 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
3286 /* Increase the buffer to prepare for a possible push. */
3287 int grow_size = 8 /* arbitrary grow size */;
3289 num_to_alloc = (yy_buffer_stack_max) + grow_size;
3290 (yy_buffer_stack) = (struct yy_buffer_state**)as3_realloc
3292 num_to_alloc * sizeof(struct yy_buffer_state*)
3294 if ( ! (yy_buffer_stack) )
3295 YY_FATAL_ERROR( "out of dynamic memory in as3_ensure_buffer_stack()" );
3297 /* zero only the new slots.*/
3298 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
3299 (yy_buffer_stack_max) = num_to_alloc;
3303 /** Setup the input buffer state to scan directly from a user-specified character buffer.
3304 * @param base the character buffer
3305 * @param size the size in bytes of the character buffer
3307 * @return the newly allocated buffer state object.
3309 YY_BUFFER_STATE as3__scan_buffer (char * base, yy_size_t size )
3314 base[size-2] != YY_END_OF_BUFFER_CHAR ||
3315 base[size-1] != YY_END_OF_BUFFER_CHAR )
3316 /* They forgot to leave room for the EOB's. */
3319 b = (YY_BUFFER_STATE) as3_alloc(sizeof( struct yy_buffer_state ) );
3321 YY_FATAL_ERROR( "out of dynamic memory in as3__scan_buffer()" );
3323 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
3324 b->yy_buf_pos = b->yy_ch_buf = base;
3325 b->yy_is_our_buffer = 0;
3326 b->yy_input_file = 0;
3327 b->yy_n_chars = b->yy_buf_size;
3328 b->yy_is_interactive = 0;
3330 b->yy_fill_buffer = 0;
3331 b->yy_buffer_status = YY_BUFFER_NEW;
3333 as3__switch_to_buffer(b );
3338 /** Setup the input buffer state to scan a string. The next call to as3_lex() will
3339 * scan from a @e copy of @a str.
3340 * @param yystr a NUL-terminated string to scan
3342 * @return the newly allocated buffer state object.
3343 * @note If you want to scan bytes that may contain NUL values, then use
3344 * as3__scan_bytes() instead.
3346 YY_BUFFER_STATE as3__scan_string (yyconst char * yystr )
3349 return as3__scan_bytes(yystr,strlen(yystr) );
3352 /** Setup the input buffer state to scan the given bytes. The next call to as3_lex() will
3353 * scan from a @e copy of @a bytes.
3354 * @param bytes the byte buffer to scan
3355 * @param len the number of bytes in the buffer pointed to by @a bytes.
3357 * @return the newly allocated buffer state object.
3359 YY_BUFFER_STATE as3__scan_bytes (yyconst char * yybytes, int _yybytes_len )
3366 /* Get memory for full buffer, including space for trailing EOB's. */
3367 n = _yybytes_len + 2;
3368 buf = (char *) as3_alloc(n );
3370 YY_FATAL_ERROR( "out of dynamic memory in as3__scan_bytes()" );
3372 for ( i = 0; i < _yybytes_len; ++i )
3373 buf[i] = yybytes[i];
3375 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
3377 b = as3__scan_buffer(buf,n );
3379 YY_FATAL_ERROR( "bad buffer in as3__scan_bytes()" );
3381 /* It's okay to grow etc. this buffer, and we should throw it
3382 * away when we're done.
3384 b->yy_is_our_buffer = 1;
3389 #ifndef YY_EXIT_FAILURE
3390 #define YY_EXIT_FAILURE 2
3393 static void yy_fatal_error (yyconst char* msg )
3395 (void) fprintf( stderr, "%s\n", msg );
3396 exit( YY_EXIT_FAILURE );
3399 /* Redefine yyless() so it works in section 3 code. */
3405 /* Undo effects of setting up as3_text. */ \
3406 int yyless_macro_arg = (n); \
3407 YY_LESS_LINENO(yyless_macro_arg);\
3408 as3_text[as3_leng] = (yy_hold_char); \
3409 (yy_c_buf_p) = as3_text + yyless_macro_arg; \
3410 (yy_hold_char) = *(yy_c_buf_p); \
3411 *(yy_c_buf_p) = '\0'; \
3412 as3_leng = yyless_macro_arg; \
3416 /* Accessor methods (get/set functions) to struct members. */
3418 /** Get the current line number.
3421 int as3_get_lineno (void)
3427 /** Get the input stream.
3430 FILE *as3_get_in (void)
3435 /** Get the output stream.
3438 FILE *as3_get_out (void)
3443 /** Get the length of the current token.
3446 int as3_get_leng (void)
3451 /** Get the current token.
3455 char *as3_get_text (void)
3460 /** Set the current line number.
3461 * @param line_number
3464 void as3_set_lineno (int line_number )
3467 as3_lineno = line_number;
3470 /** Set the input stream. This does not discard the current
3472 * @param in_str A readable stream.
3474 * @see as3__switch_to_buffer
3476 void as3_set_in (FILE * in_str )
3481 void as3_set_out (FILE * out_str )
3486 int as3_get_debug (void)
3488 return as3__flex_debug;
3491 void as3_set_debug (int bdebug )
3493 as3__flex_debug = bdebug ;
3496 static int yy_init_globals (void)
3498 /* Initialization is the same as for the non-reentrant scanner.
3499 * This function is called from as3_lex_destroy(), so don't allocate here.
3502 (yy_buffer_stack) = 0;
3503 (yy_buffer_stack_top) = 0;
3504 (yy_buffer_stack_max) = 0;
3505 (yy_c_buf_p) = (char *) 0;
3509 /* Defined in main.c */
3514 as3_in = (FILE *) 0;
3515 as3_out = (FILE *) 0;
3518 /* For future reference: Set errno on error, since we are called by
3524 /* as3_lex_destroy is for both reentrant and non-reentrant scanners. */
3525 int as3_lex_destroy (void)
3528 /* Pop the buffer stack, destroying each element. */
3529 while(YY_CURRENT_BUFFER){
3530 as3__delete_buffer(YY_CURRENT_BUFFER );
3531 YY_CURRENT_BUFFER_LVALUE = NULL;
3532 as3_pop_buffer_state();
3535 /* Destroy the stack itself. */
3536 as3_free((yy_buffer_stack) );
3537 (yy_buffer_stack) = NULL;
3539 /* Reset the globals. This is important in a non-reentrant scanner so the next time
3540 * as3_lex() is called, initialization will occur. */
3547 * Internal utility routines.
3551 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
3554 for ( i = 0; i < n; ++i )
3559 #ifdef YY_NEED_STRLEN
3560 static int yy_flex_strlen (yyconst char * s )
3563 for ( n = 0; s[n]; ++n )
3570 void *as3_alloc (yy_size_t size )
3572 return (void *) malloc( size );
3575 void *as3_realloc (void * ptr, yy_size_t size )
3577 /* The cast to (char *) in the following accommodates both
3578 * implementations that use char* generic pointers, and those
3579 * that use void* generic pointers. It works with the latter
3580 * because both ANSI C and C++ allow castless assignment from
3581 * any pointer type to void*, and deal with argument conversions
3582 * as though doing an assignment.
3584 return (void *) realloc( (char *) ptr, size );
3587 void as3_free (void * ptr )
3589 free( (char *) ptr ); /* see as3_realloc() for (char *) cast */
3592 #define YYTABLES_NAME "yytables"
3594 #line 675 "tokenizer.lex"
3603 static char mbuf[256];
3604 char*token2string(enum yytokentype nr, YYSTYPE v)
3606 if(nr==T_STRING) return "<string>";
3607 else if(nr==T_INT) return "<int>";
3608 else if(nr==T_UINT) return "<uint>";
3609 else if(nr==T_BYTE) return "<byte>";
3610 else if(nr==T_FLOAT) return "<float>";
3611 else if(nr==T_REGEXP) return "REGEXP";
3612 else if(nr==T_EOF) return "***END***";
3613 else if(nr==T_GE) return ">=";
3614 else if(nr==T_LE) return "<=";
3615 else if(nr==T_MINUSMINUS) return "--";
3616 else if(nr==T_PLUSPLUS) return "++";
3617 else if(nr==KW_IMPLEMENTS) return "implements";
3618 else if(nr==KW_INTERFACE) return "interface";
3619 else if(nr==KW_NAMESPACE) return "namespace";
3620 else if(nr==KW_PROTECTED) return "protected";
3621 else if(nr==KW_OVERRIDE) return "override";
3622 else if(nr==KW_INTERNAL) return "internal";
3623 else if(nr==KW_FUNCTION) return "function";
3624 else if(nr==KW_PACKAGE) return "package";
3625 else if(nr==KW_PRIVATE) return "private";
3626 else if(nr==KW_BOOLEAN) return "Boolean";
3627 else if(nr==KW_DYNAMIC) return "dynamic";
3628 else if(nr==KW_EXTENDS) return "extends";
3629 else if(nr==KW_PUBLIC) return "public";
3630 else if(nr==KW_NATIVE) return "native";
3631 else if(nr==KW_STATIC) return "static";
3632 else if(nr==KW_IMPORT) return "import";
3633 else if(nr==KW_NUMBER) return "number";
3634 else if(nr==KW_CLASS) return "class";
3635 else if(nr==KW_CONST) return "const";
3636 else if(nr==KW_FINAL) return "final";
3637 else if(nr==KW_FALSE) return "False";
3638 else if(nr==KW_TRUE) return "True";
3639 else if(nr==KW_UINT) return "uint";
3640 else if(nr==KW_NULL) return "null";
3641 else if(nr==KW_ELSE) return "else";
3642 else if(nr==KW_USE) return "use";
3643 else if(nr==KW_INT) return "int";
3644 else if(nr==KW_NEW) return "new";
3645 else if(nr==KW_GET) return "get";
3646 else if(nr==KW_SET) return "set";
3647 else if(nr==KW_VAR) return "var";
3648 else if(nr==KW_IS) return "is";
3649 else if(nr==KW_AS) return "as";
3650 else if(nr==T_IDENTIFIER) return "ID";
3652 sprintf(mbuf, "%d", nr);
3657 void initialize_scanner()