autogenerated
[swftools.git] / lib / as3 / tokenizer.yy.c
1 #line 2 "tokenizer.yy.c"
2
3 #line 4 "tokenizer.yy.c"
4
5 #define  YY_INT_ALIGNED short int
6
7 /* A lexical scanner generated by flex */
8
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
16 #define yyin as3_in
17 #define yyleng as3_leng
18 #define yylex as3_lex
19 #define yylineno as3_lineno
20 #define yyout as3_out
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
27
28 #define FLEX_SCANNER
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
33 #define FLEX_BETA
34 #endif
35
36 /* First, we deal with  platform-specific or compiler-specific issues. */
37
38 /* begin standard C headers. */
39 #include <stdio.h>
40 #include <string.h>
41 #include <errno.h>
42 #include <stdlib.h>
43
44 /* end standard C headers. */
45
46 /* flex integer type definitions */
47
48 #ifndef FLEXINT_H
49 #define FLEXINT_H
50
51 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
52
53 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
54
55 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
56  * if you want the limit (max/min) macros for int types. 
57  */
58 #ifndef __STDC_LIMIT_MACROS
59 #define __STDC_LIMIT_MACROS 1
60 #endif
61
62 #include <inttypes.h>
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;
69 #else
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;
76 #endif /* ! C99 */
77
78 /* Limits of integral types. */
79 #ifndef INT8_MIN
80 #define INT8_MIN               (-128)
81 #endif
82 #ifndef INT16_MIN
83 #define INT16_MIN              (-32767-1)
84 #endif
85 #ifndef INT32_MIN
86 #define INT32_MIN              (-2147483647-1)
87 #endif
88 #ifndef INT8_MAX
89 #define INT8_MAX               (127)
90 #endif
91 #ifndef INT16_MAX
92 #define INT16_MAX              (32767)
93 #endif
94 #ifndef INT32_MAX
95 #define INT32_MAX              (2147483647)
96 #endif
97 #ifndef UINT8_MAX
98 #define UINT8_MAX              (255U)
99 #endif
100 #ifndef UINT16_MAX
101 #define UINT16_MAX             (65535U)
102 #endif
103 #ifndef UINT32_MAX
104 #define UINT32_MAX             (4294967295U)
105 #endif
106
107 #endif /* ! FLEXINT_H */
108
109 #ifdef __cplusplus
110
111 /* The "const" storage-class-modifier is valid. */
112 #define YY_USE_CONST
113
114 #else   /* ! __cplusplus */
115
116 /* C99 requires __STDC__ to be defined as 1. */
117 #if defined (__STDC__)
118
119 #define YY_USE_CONST
120
121 #endif  /* defined (__STDC__) */
122 #endif  /* ! __cplusplus */
123
124 #ifdef YY_USE_CONST
125 #define yyconst const
126 #else
127 #define yyconst
128 #endif
129
130 /* Returned upon end-of-file. */
131 #define YY_NULL 0
132
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
136  * double cast.
137  */
138 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
139
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.
143  */
144 #define BEGIN (yy_start) = 1 + 2 *
145
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
148  * compatibility.
149  */
150 #define YY_START (((yy_start) - 1) / 2)
151 #define YYSTATE YY_START
152
153 /* Action number for EOF rule of a given start state. */
154 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
155
156 /* Special action meaning "start processing a new file". */
157 #define YY_NEW_FILE as3_restart(as3_in  )
158
159 #define YY_END_OF_BUFFER_CHAR 0
160
161 /* Size of default input buffer. */
162 #ifndef YY_BUF_SIZE
163 #define YY_BUF_SIZE 16384
164 #endif
165
166 /* The state buf must be large enough to hold one state per character in the main buffer.
167  */
168 #define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
169
170 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
171 #define YY_TYPEDEF_YY_BUFFER_STATE
172 typedef struct yy_buffer_state *YY_BUFFER_STATE;
173 #endif
174
175 extern int as3_leng;
176
177 extern FILE *as3_in, *as3_out;
178
179 #define EOB_ACT_CONTINUE_SCAN 0
180 #define EOB_ACT_END_OF_FILE 1
181 #define EOB_ACT_LAST_MATCH 2
182
183     #define YY_LESS_LINENO(n)
184     
185 /* Return all but the first "n" matched characters back to the input stream. */
186 #define yyless(n) \
187         do \
188                 { \
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 */ \
196                 } \
197         while ( 0 )
198
199 #define unput(c) yyunput( c, (yytext_ptr)  )
200
201 #ifndef YY_TYPEDEF_YY_SIZE_T
202 #define YY_TYPEDEF_YY_SIZE_T
203 typedef size_t yy_size_t;
204 #endif
205
206 #ifndef YY_STRUCT_YY_BUFFER_STATE
207 #define YY_STRUCT_YY_BUFFER_STATE
208 struct yy_buffer_state
209         {
210         FILE *yy_input_file;
211
212         char *yy_ch_buf;                /* input buffer */
213         char *yy_buf_pos;               /* current position in input buffer */
214
215         /* Size of input buffer in bytes, not including room for EOB
216          * characters.
217          */
218         yy_size_t yy_buf_size;
219
220         /* Number of characters read into yy_ch_buf, not including EOB
221          * characters.
222          */
223         int yy_n_chars;
224
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
227          * delete it.
228          */
229         int yy_is_our_buffer;
230
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
234          * each newline.
235          */
236         int yy_is_interactive;
237
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
240          * not.
241          */
242         int yy_at_bol;
243
244     int yy_bs_lineno; /**< The line count. */
245     int yy_bs_column; /**< The column count. */
246     
247         /* Whether to try to fill the input buffer when we reach the
248          * end of it.
249          */
250         int yy_fill_buffer;
251
252         int yy_buffer_status;
253
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.
261          *
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.
265          */
266 #define YY_BUFFER_EOF_PENDING 2
267
268         };
269 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
270
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. */
275
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
278  * "scanner state".
279  *
280  * Returns the top of the stack, or NULL.
281  */
282 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
283                           ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
284                           : NULL)
285
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.
288  */
289 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
290
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 */
294 int as3_leng;
295
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 */
300
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 ...
303  */
304 static int yy_did_buffer_switch_on_eof;
305
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 );
313
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  );
317
318 #define YY_FLUSH_BUFFER as3__flush_buffer(YY_CURRENT_BUFFER )
319
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  );
323
324 void *as3_alloc (yy_size_t  );
325 void *as3_realloc (void *,yy_size_t  );
326 void as3_free (void *  );
327
328 #define yy_new_buffer as3__create_buffer
329
330 #define yy_set_interactive(is_interactive) \
331         { \
332         if ( ! YY_CURRENT_BUFFER ){ \
333         as3_ensure_buffer_stack (); \
334                 YY_CURRENT_BUFFER_LVALUE =    \
335             as3__create_buffer(as3_in,YY_BUF_SIZE ); \
336         } \
337         YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
338         }
339
340 #define yy_set_bol(at_bol) \
341         { \
342         if ( ! YY_CURRENT_BUFFER ){\
343         as3_ensure_buffer_stack (); \
344                 YY_CURRENT_BUFFER_LVALUE =    \
345             as3__create_buffer(as3_in,YY_BUF_SIZE ); \
346         } \
347         YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
348         }
349
350 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
351
352 /* Begin user sect3 */
353
354 typedef unsigned char YY_CHAR;
355
356 FILE *as3_in = (FILE *) 0, *as3_out = (FILE *) 0;
357
358 typedef int yy_state_type;
359
360 extern int as3_lineno;
361
362 int as3_lineno = 1;
363
364 extern char *as3_text;
365 #define yytext_ptr as3_text
366
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[]  );
371
372 /* Done after the current pattern has been matched and before the
373  * corresponding action - sets up as3_text.
374  */
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; \
379         *yy_cp = '\0'; \
380         (yy_c_buf_p) = yy_cp;
381
382 #define YY_NUM_RULES 106
383 #define YY_END_OF_BUFFER 107
384 /* This struct is not used in this scanner,
385    but its presence is necessary. */
386 struct yy_trans_info
387         {
388         flex_int32_t yy_verify;
389         flex_int32_t yy_nxt;
390         };
391 static yyconst flex_int16_t yy_accept[468] =
392     {   0,
393         0,    0,    0,    0,    0,    0,  107,  105,   13,   13,
394       103,  105,  103,  103,  103,  105,  104,  103,  103,  103,
395        51,  103,   16,   16,   16,   53,  103,  103,  103,  102,
396       103,  102,  102,  102,  102,  102,  102,  102,  102,  102,
397       102,  102,  102,  102,  102,  102,  102,  102,  103,  105,
398       102,  103,  103,   51,  103,   10,   10,   10,   29,    0,
399         6,    0,   40,   27,    0,    0,   41,   36,   37,   35,
400        38,   50,   17,    3,    0,   39,   17,   16,    0,    0,
401        52,   46,   34,   32,   33,   48,    0,  102,    0,  101,
402       102,  102,  102,  102,  102,   24,  102,  102,  102,  102,
403
404       102,  102,  102,  102,  102,  100,  102,   99,   98,  102,
405       102,  102,  102,  102,  102,  102,  102,  102,  102,  102,
406       102,  102,  102,  102,  102,  102,  102,  102,  102,  102,
407        42,   28,    0,   99,    0,   10,   10,   11,    0,    3,
408         7,   39,    0,   11,   10,    0,   30,   49,    0,    0,
409         0,    0,    0,    1,   17,   15,   14,    0,   44,   31,
410        43,   47,    0,    0,    0,    0,    0,  102,  102,  102,
411       102,  102,  102,  102,  102,  102,  102,  102,  102,  102,
412        23,  102,   94,  102,  102,  102,  102,  102,   93,  102,
413       102,  102,  102,  102,  102,  102,   95,  102,  102,  102,
414
415       102,  102,   97,  102,  102,   92,   96,  102,  102,  102,
416        12,  102,   11,   11,    0,    7,    0,    0,    0,    7,
417         0,    7,    7,   11,    9,    8,    0,    0,    0,    2,
418         0,   15,    0,   45,    0,    0,    0,    0,  102,   90,
419       102,  102,  102,  102,  102,  102,  102,   85,   89,  102,
420       102,  102,  102,  102,  102,  102,  102,  102,  102,   88,
421       102,  102,  102,  102,  102,  102,  102,  102,  102,  102,
422        87,  102,  102,   86,  102,   91,  102,   11,    9,    8,
423         7,    0,    7,    0,    0,    2,    0,    7,    7,    9,
424         0,    2,   18,   20,    0,    0,    0,   83,   80,   78,
425
426        79,  102,  102,  102,  102,  102,   82,   81,  102,  102,
427       102,  102,  102,  102,  102,  102,  102,  102,  102,  102,
428       102,  102,   84,  102,   77,  102,  102,   25,  102,    9,
429         0,    0,    2,    0,    7,    7,   19,    0,    0,  102,
430       102,   70,  102,  102,  102,  102,  102,   75,  102,  102,
431       102,  102,   73,  102,  102,  102,  102,   72,   71,   74,
432        26,   76,  102,  102,    7,    0,    0,  102,   65,   68,
433        69,   64,  102,  102,  102,  102,  102,  102,  102,   66,
434        67,  102,  102,  102,    7,    0,   21,   60,   63,  102,
435       102,  102,   62,  102,   61,  102,  102,    0,   22,  102,
436
437       102,   56,   57,   58,   59,    0,    0,    0,    0,   55,
438        54,    0,    5,    0,    0,    0,    0,    0,    0,    0,
439         0,    0,    0,    0,    0,    5,    0,    0,    0,    0,
440         0,    0,    4,    0,    0,    4,    0,    5,    0,    0,
441         0,    0,   20,    5,   20,   20,    0,    0,    0,   19,
442         5,   19,   19,    0,    0,    0,    0,    0,   21,    5,
443        21,   21,   22,    5,   22,   22,    0
444     } ;
445
446 static yyconst flex_int32_t yy_ec[256] =
447     {   0,
448         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
449         1,    1,    2,    1,    1,    1,    1,    1,    1,    1,
450         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
451         1,    4,    5,    6,    7,    8,    9,   10,   11,    8,
452        12,   13,   14,    8,   15,   16,   17,   18,   19,   19,
453        20,   19,   19,   19,   19,   19,   19,   21,    8,   22,
454        23,   24,    8,    8,   25,   25,   25,   25,   25,   25,
455        25,   25,   25,   25,   25,   25,   25,   25,   25,   25,
456        25,   25,   25,   25,   25,   25,   25,   25,   25,   25,
457         8,   26,   27,    8,   28,    7,   29,   30,   31,   32,
458
459        33,   34,   35,   36,   37,   25,   38,   39,   40,   41,
460        42,   43,   25,   44,   45,   46,   47,   48,   49,   50,
461        51,   25,    8,   52,    8,    8,    7,    7,    7,    7,
462         7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
463         7,    7,    7,    7,    7,    7,    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,   53,    7,    7,    7,
468        54,    7,    7,    7,    7,    7,    7,    7,    7,    7,
469
470         7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
471         7,    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,   55,    7,
474         7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
475         7,    7,    7,    7,    7
476     } ;
477
478 static yyconst flex_int32_t yy_meta[56] =
479     {   0,
480         1,    2,    3,    2,    4,    4,    4,    4,    4,    4,
481         4,    4,    4,    4,    4,    5,    4,    6,    6,    6,
482         2,    4,    4,    4,    7,    8,    4,    8,    7,    7,
483         7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
484         7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
485         7,    4,    4,    4,    4
486     } ;
487
488 static yyconst flex_int16_t yy_base[495] =
489     {   0,
490         0,  420,   42,   49,   56,   63,  455, 2184, 2184, 2184,
491       431,   78, 2184,  427,  436,   76, 2184,  418,   71,   73,
492        73,   82,   90,   95,  100,  415,   75,  406,   98,  121,
493      2184,  124,  127,  131,  108,  107,  114,  125,  143,  147,
494       126,  158,  162,  170,  179,  186,  193,  200,   80,  365,
495       376,  227,  233,  239,  247,  247,  256,  261,  391,  172,
496      2184,  403, 2184, 2184,  155,  400, 2184, 2184, 2184, 2184,
497      2184,  384,  264,  285,  393, 2184,  271,  276,  379,  344,
498      2184,  362, 2184,  360, 2184,  115,  297,  264,  305,  275,
499       282,  281,  283,  290,  299,  301,  305,  320,  313,  324,
500
501       306,  332,  336,  340,  347,  348,  355,  362,  363,  370,
502       382,  384,  386,  391,  398,  409,  403,  414,  405,  423,
503       430,  429,  435,  441,  446,  458,  450,  464,  470,  469,
504      2184, 2184,  318,  485,  499,  516,  521,  502,  207,  541,
505       565,  208,  245,  527,  532,  352, 2184, 2184,  558,  561,
506       574,  350,  361, 2184,  537,    0,  344,  339, 2184, 2184,
507      2184,  333,  615,  294,  274,  264,  249,  484,  540,  541,
508       591,  592,  593,  611,  600,  612,  623,  628,  629,  630,
509       634,  646,  650,  651,  652,  666,  667,  673,  672,  674,
510       678,  689,  690,  694,  695,  706,  710,  712,  717,  718,
511
512       726,  733,  732,  734,  748,  740,  741,  756,  755,  757,
513      2184,  762,  566,  605,  262,    0,  804,  807,  810,  252,
514       836,    0,  846,  608,    0,  252,  162,  813,  839,  244,
515       842,    0,  210, 2184,    0,  200,  203,  201,  790,  818,
516       822,  869,  870,  876,  878,  890,  895,  899,  901,  910,
517       915,  916,  917,  931,  932,  933,  938,  939,  950,  954,
518       958,  962,  966,  970,  977,  978,  984,  986,  998, 1002,
519      1003, 1004, 1018, 1019, 1020, 1025, 1026,  664,    0,  212,
520         0, 1053, 1079, 1134, 1137,  197, 1140, 1166,    0,    0,
521      1221, 2184, 2184, 2184,    0,  165,  167, 1116, 1117, 1123,
522
523      1197, 1201, 1202, 1216, 1217, 1218, 1222, 1223, 1234, 1238,
524      1240, 1246, 1249, 1262, 1264, 1270, 1279, 1271, 1291, 1295,
525      1286, 1300, 1306, 1307, 1311, 1318, 1322, 1326, 1334,    0,
526      1368, 1376,    0, 1394,    0,    0, 2184,  165,  130, 1333,
527      1345, 1359, 1361, 1370, 1375, 1377, 1389, 1394, 1396, 1395,
528      1400, 1401, 1412, 1416, 1417, 1424, 1423, 1431, 1432, 1438,
529      1439, 1443, 1447, 1454,  145,   81,    0, 1461, 1462, 1463,
530      1468, 1469, 1477, 1483, 1484, 1498, 1491, 1503, 1502, 1507,
531      1509, 1514, 1521,  900,   95,    0, 2184, 1523, 1528, 1529,
532      1530, 1544, 1537, 1545, 1551, 1553, 1559, 1600, 2184, 1568,
533
534      1580, 1576, 1587, 1588, 1594,  740,  184, 1636, 1639, 1606,
535      1615,  863,  866, 1032, 1072,  187, 1225,  104,  181, 1648,
536      1664, 1675, 1678, 1690, 1693, 1696, 1701, 1705, 1709, 1712,
537      1716, 1719, 1751,   98, 1754, 1760, 1763, 1766, 1792, 1776,
538      1780, 1784, 1769, 1772, 1787, 1808, 1847, 1820, 1826, 1823,
539      1829, 1832, 1835, 1873, 1839, 1876, 1912, 1967, 1879, 1882,
540      1885, 1888, 1891, 1894, 1903, 1906, 2184, 2022, 2030, 2037,
541      2045, 2053, 2061, 2065, 2072, 2076, 2083, 2086, 2089,   83,
542      2096, 2099, 2106, 2114, 2114, 2121, 2129, 2134, 2139, 2144,
543      2151, 2159, 2167, 2175
544
545     } ;
546
547 static yyconst flex_int16_t yy_def[495] =
548     {   0,
549       467,    1,    1,    1,    1,    1,  467,  467,  467,  467,
550       467,  468,  467,  467,  467,  469,  467,  467,  467,  467,
551       467,  467,  467,  467,  467,  467,  467,  467,  467,  470,
552       467,  470,  470,  470,   34,   34,   34,   34,   34,   34,
553        34,   34,   34,   34,   34,   39,   34,   34,  467,  467,
554        39,  467,  467,  467,  471,  467,  467,  467,  467,  468,
555       467,  468,  467,  467,  469,  469,  467,  467,  467,  467,
556       467,  467,  467,  472,  473,  467,  467,  467,  474,  467,
557       467,  467,  467,  467,  467,  467,  467,   34,  467,   34,
558        34,   34,   34,   34,   34,   34,   34,   34,   34,   34,
559
560        34,   34,   34,   34,   34,   34,   34,   34,   34,   34,
561        34,   34,   34,   34,   34,   34,   34,   34,   34,   34,
562        34,   34,   34,   34,   34,   34,   34,   34,   34,   34,
563       467,  467,  467,   34,  467,  467,  467,  467,  471,  475,
564       473,  471,  471,  467,  467,  476,  467,  467,  472,  472,
565       477,  467,  473,  467,  467,  478,  474,  467,  467,  467,
566       467,  467,  467,  467,  467,  467,  467,   34,   34,   34,
567        34,   34,   34,   34,   34,   34,   34,   34,   34,   34,
568        34,   34,   34,   34,   34,   34,   34,   34,   34,   34,
569        34,   34,   34,   34,   34,   34,   34,   34,   34,   34,
570
571        34,   34,   34,   34,   34,   34,   34,   34,   34,   34,
572       467,   34,  467,  467,  479,  480,  475,  475,  481,  480,
573       475,  141,  471,  467,  482,  476,  483,  472,  477,  467,
574       472,  478,  467,  467,  484,  467,  467,  467,   34,   34,
575        34,   34,   34,   34,   34,   34,   34,   34,   34,   34,
576        34,   34,   34,   34,   34,   34,   34,   34,   34,   34,
577        34,   34,   34,   34,   34,   34,   34,   34,   34,   34,
578        34,   34,   34,   34,   34,   34,   34,  467,  485,  479,
579       480,  486,  467,  475,  481,  480,  475,  467,  223,  482,
580       472,  467,  467,  467,  487,  467,  467,   34,   34,   34,
581
582        34,   34,   34,   34,   34,   34,   34,   34,   34,   34,
583        34,   34,   39,   34,   34,   34,   34,   34,   34,   34,
584        34,   34,   34,   34,   34,   34,   34,   34,   34,  485,
585       475,  475,  480,  475,  283,  288,  467,  467,  467,   34,
586        34,   34,   34,   34,   34,   34,   34,   34,   34,   34,
587        34,   34,   34,   34,   34,   34,   34,   34,   34,   34,
588        34,   34,   34,   34,  223,  467,  488,   34,   34,   34,
589        34,   34,   34,   34,   34,   34,   34,   34,   34,   34,
590        34,   34,   34,  470,  283,  489,  467,   34,   34,   34,
591        34,   34,   34,   34,   34,   34,   34,  490,  467,   34,
592
593        34,   34,   34,   34,   34,  491,  492,  493,  491,   34,
594        34,  467,  467,  491,  491,  492,  467,  492,  494,  494,
595       493,  493,  491,  493,  467,  467,  491,  491,  491,  491,
596       491,  467,  467,  494,  467,  467,  491,  494,  491,  491,
597       491,  491,  467,  467,  491,  491,  491,  491,  491,  467,
598       467,  491,  491,  491,  491,  491,  491,  491,  467,  467,
599       491,  491,  467,  467,  491,  491,    0,  467,  467,  467,
600       467,  467,  467,  467,  467,  467,  467,  467,  467,  467,
601       467,  467,  467,  467,  467,  467,  467,  467,  467,  467,
602       467,  467,  467,  467
603
604     } ;
605
606 static yyconst flex_int16_t yy_nxt[2240] =
607     {   0,
608         8,    9,   10,    9,   11,   12,    8,   13,   14,   15,
609        16,   17,   18,   19,   20,   21,   22,   23,   24,   25,
610        26,   27,   28,   29,   30,    8,   31,   30,   32,   33,
611        34,   35,   36,   37,   38,   30,   39,   30,   30,   30,
612        40,   41,   42,   43,   44,   45,   46,   47,   48,   30,
613        30,   49,    8,    8,   50,   52,   53,   54,   55,   56,
614        57,   58,   52,   53,   54,   55,   56,   57,   58,   52,
615        53,   54,   55,   56,   57,   58,   52,   53,   54,   55,
616        56,   57,   58,   61,   68,   51,   61,   70,   72,  281,
617        73,   73,   73,   69,   74,   71,   82,   83,   75,   51,
618
619       419,   66,  131,   62,   76,   77,  416,   78,   78,   78,
620        77,  152,   78,   78,   78,   77,  386,   78,   78,   78,
621        85,   86,   87,   87,   87,   87,   87,   87,   87,   87,
622        87,  132,   87,   87,   87,   98,   88,  161,  162,   79,
623        95,   89,  101,   80,   89,   99,   88,   89,   88,   96,
624       102,   89,   88,   88,   88,  103,  100,  105,   97,   92,
625       104,  385,  367,   88,   88,   61,   88,   88,   90,   93,
626        91,   88,   94,  113,  291,  110,  106,   61,  292,  111,
627        66,   88,  107,  108,   88,   88,  114,  109,   88,  417,
628        88,  417,  417,  112,  117,  366,   88,   62,   88,   88,
629
630        88,  115,  118,   88,  116,  339,  434,   88,   88,  418,
631       338,   88,  418,  231,  122,  119,  120,   88,  121,   88,
632        88,  127,  123,  216,  216,   88,  125,  279,   88,  124,
633       126,   88,  143,  143,  128,  129,  130,  297,   88,  296,
634        68,   88,  135,  295,  136,  137,  137,   70,  135,   69,
635       136,  137,  137,  293,   72,   71,  138,  138,  138,  140,
636       231,  223,  144,  141,  145,  145,  145,  225,  231,  142,
637       143,  144,  143,  145,  145,  145,  144,  279,  145,  145,
638       145,   73,   73,   73,  238,  149,  149,  149,  155,  155,
639       155,   77,   88,   78,   78,   78,  146,  151,   87,   87,
640
641        87,  152,   88,   88,   80,   88,  163,  163,  163,   88,
642        88,  171,  237,   88,  168,  236,   88,   89,   88,   88,
643        88,   88,   88,   88,   88,  169,  170,   88,   88,   88,
644       172,   88,  173,   88,   88,  235,  164,  174,  165,   88,
645        88,   88,   88,   88,  179,  175,   88,   88,   88,  166,
646       176,   88,   88,  167,   88,  234,  233,  177,   88,  156,
647        88,   88,   88,  154,   88,   88,  231,  225,   88,  178,
648        88,  211,  180,   88,   88,   88,   88,   88,   88,  181,
649       182,   88,  160,   88,  159,   88,   88,  158,   88,   88,
650        88,   88,  183,   88,  156,  154,   88,  184,   88,  148,
651
652        88,   88,   65,   88,   88,   60,  185,  186,   88,  187,
653        88,   88,   88,  147,   88,  188,  134,  133,  191,   88,
654        88,  192,  190,   88,   88,   88,   88,   88,   84,   88,
655       189,   88,   88,  198,  193,   81,   88,   88,  195,  194,
656        67,   88,   88,   88,   88,   64,   88,   88,  196,   63,
657        88,   88,   88,   59,  467,   88,   51,   88,   88,  197,
658       467,   88,  467,   88,   88,  199,  200,   88,   88,   88,
659        88,   88,  201,   88,   88,  467,   88,  205,   88,   88,
660       467,  202,   88,  204,   88,  203,   88,   88,   88,  467,
661       206,   88,   88,  207,  467,  467,   88,   88,   88,   88,
662
663       208,  467,   88,  467,  467,   88,  209,   88,   88,  467,
664        88,   88,  239,   88,  210,  212,  213,  213,  213,  138,
665       138,  138,   88,   88,  467,   88,   88,  467,  467,  185,
666       186,  214,  467,  137,  137,  137,  214,  467,  137,  137,
667       137,  217,  217,  149,  224,  224,  224,  144,  467,  145,
668       145,  145,  467,  219,  155,  155,  155,  220,  149,  149,
669       149,  149,  149,  149,  467,  215,  221,  154,   88,   88,
670       227,  241,  240,  227,  228,  228,  228,  467,   88,   88,
671       467,   88,   88,  213,  213,  213,  229,  467,  467,  222,
672       230,  467,  467,  222,  222,  222,  222,  222,  222,  222,
673
674       222,  222,  222,  222,  222,  222,  222,  222,  222,  222,
675       222,  222,  222,  222,  222,  222,  163,  163,  163,   88,
676        88,  245,  278,  278,  278,  224,  224,  224,  247,   88,
677        88,   88,   88,   88,   88,  242,  243,  244,   88,   88,
678        88,   88,  467,  246,  467,  467,  164,  248,  165,   88,
679        88,   88,   88,   88,  467,  249,   88,   88,  252,  166,
680       250,   88,   88,  167,   88,  467,   88,   88,   88,   88,
681        88,   88,   88,  251,   88,   88,  253,  467,   88,   88,
682        88,  278,  278,  278,   88,  467,  467,   88,   88,  254,
683        88,   88,  255,   88,   88,   88,  467,  256,  257,  258,
684
685        88,   88,   88,  467,   88,   88,   88,   88,   88,  259,
686        88,   88,  260,   88,   88,   88,   88,   88,   88,   88,
687       467,  261,   88,   88,  467,  467,  262,   88,   88,  467,
688        88,   88,   88,  265,   88,   88,   88,  263,   88,  264,
689        88,  412,  413,  414,   88,   88,   88,   88,   88,  268,
690        88,   88,  266,   88,   88,   88,   88,  267,   88,   88,
691        88,   88,   88,  269,   88,  271,  272,  270,   88,   88,
692        88,   88,   88,   88,   88,   88,   88,  467,   88,   88,
693       273,   88,   88,   88,   88,   88,   88,  274,  467,   88,
694        88,  467,  276,  275,   88,   88,   88,   88,   88,  467,
695
696       277,  467,  467,   88,  217,  217,  149,  217,  217,  149,
697       284,  284,  228,  149,  149,  149,  282,  467,   88,  282,
698       283,  467,  285,  283,  467,  227,  286,  298,   88,  221,
699       467,   88,  221,  467,  467,  287,  217,  217,  149,  228,
700       228,  228,  149,  149,  149,  467,   88,  467,  282,  467,
701        88,  229,  288,  467,  227,  230,   88,  299,  152,   88,
702        88,  221,  216,   88,  412,  413,  412,  412,  413,  412,
703       289,  143,  467,  467,  289,  289,  289,  289,  289,  289,
704       289,  289,  289,  289,  289,  289,  289,  289,  289,  289,
705       289,  289,  289,  289,  289,  289,  289,   88,   88,  467,
706
707       467,  398,  398,  398,   88,  467,   88,   88,   88,  467,
708        88,   88,  302,  300,   88,  301,   88,   88,   88,   88,
709        89,  467,  467,   88,  303,  467,  467,   88,   88,   88,
710       467,   88,  467,   88,  305,  304,   88,   88,   88,   88,
711        88,  467,   88,   88,   88,   88,  467,  307,   88,  467,
712       306,   88,  467,   88,  308,   88,   88,   88,   88,   88,
713        88,  312,  309,  310,  467,  467,   88,   88,  467,   88,
714        88,   88,   88,   88,   88,  311,   88,   88,   88,   88,
715        88,  313,   88,  314,  467,  467,   88,  467,   88,  467,
716       317,   88,   88,  467,  318,   88,   88,  315,   88,   88,
717
718        88,  316,  319,   88,   88,   88,   88,   88,   88,  467,
719       467,   88,   88,  320,   88,   88,   88,  467,   88,   88,
720       322,  321,   88,  467,   88,   88,   88,   88,  324,  323,
721        88,   88,   88,  412,  413,  414,   88,  467,  467,   88,
722        88,   88,   88,   88,   88,  326,   88,   88,   88,  467,
723       325,  327,  328,   88,   88,  231,   88,   88,   88,   88,
724        88,   88,  467,   88,   88,  332,   88,   88,  467,  333,
725       467,  467,  329,  412,  413,  414,  467,  467,  334,  149,
726       149,  149,  150,  150,  150,  150,  150,  150,  150,  150,
727       150,  227,  150,  150,  150,  150,  150,  150,  150,  150,
728
729       150,  150,  150,  335,  150,  150,  150,  335,  335,  335,
730       335,  335,  335,  335,  335,  335,  335,  335,  335,  335,
731       335,  335,  335,  335,  335,  335,  335,  335,  335,  335,
732       150,  150,  150,  150,  217,  217,  149,  284,  284,  228,
733       217,  217,  149,  467,   88,   88,  282,  467,  467,  285,
734       283,   88,  282,  286,   88,   88,  288,   88,   88,  221,
735       467,   88,  287,  467,   88,  221,  217,  217,  149,  218,
736       218,  218,  218,  218,  218,  218,  218,  218,  282,  218,
737       218,  218,  283,  218,  218,  218,  218,  218,  218,  218,
738       336,  221,  218,  218,  336,  336,  336,  336,  336,  336,
739
740       336,  336,  336,  336,  336,  336,  336,  336,  336,  336,
741       336,  336,  336,  336,  336,  336,  336,  218,  218,  218,
742       218,  149,  149,  149,  467,   88,  432,  433,  432,   88,
743        88,  467,  467,  227,  467,   88,  467,  230,   88,   88,
744       341,  340,   88,   88,   88,   88,   88,  467,  342,  344,
745        88,   88,  467,  343,   88,   88,   88,   88,   88,   88,
746        88,  345,   88,   88,   88,  467,   88,  467,   88,  467,
747       346,  467,   88,  467,   88,   88,   88,  347,   88,   88,
748       467,   88,  350,  467,   88,  348,  349,   88,   88,  351,
749        88,  467,   88,   88,  467,  467,  353,  467,   88,   88,
750
751        88,  467,   88,   88,  352,   88,  354,   88,   88,   88,
752       467,   88,   88,  355,   88,  467,  356,   88,  467,   88,
753        88,  357,  467,   88,   88,  358,  359,   88,   88,   88,
754       360,  467,   88,   88,   88,   88,   88,  467,   88,   88,
755       467,   88,  361,  467,   88,   88,   88,   88,   88,   88,
756        88,  362,   88,  467,   88,  467,   88,  467,  363,   88,
757        88,   88,   88,   88,   88,  364,  467,   88,  217,  217,
758       149,   88,   88,   88,   88,   88,  217,  217,  149,  368,
759       282,  467,  467,   88,  220,  467,   88,   88,  282,   88,
760       369,  370,  286,  221,  217,  217,  149,   88,   88,   88,
761
762        88,  221,   88,   88,  467,   88,  282,  467,   88,  467,
763       365,   88,  467,   88,  371,   88,   88,   88,  373,  221,
764       467,  374,   88,  376,   88,  372,  375,   88,  377,  378,
765        88,  467,   88,   88,   88,   88,   88,   88,   88,   88,
766        88,   88,   88,  467,   88,   88,  467,  379,  467,  380,
767        88,   88,   88,   88,   88,   88,  381,   88,   88,   88,
768        88,   88,   88,  467,   88,   88,   88,   88,  382,   88,
769        88,   88,   88,   88,  467,   88,   88,   88,  467,   88,
770        88,   88,   88,  467,   88,   88,  384,  383,   88,   88,
771        88,   88,   88,  388,  467,   88,   88,   88,  467,   88,
772
773        88,   88,   88,   88,   88,   88,   88,   88,  467,   88,
774        88,   88,   88,  467,  467,   88,  391,  389,   88,   88,
775       467,   88,   88,  390,   88,   88,   88,  467,  392,  393,
776        88,   88,   88,  394,  395,   88,   88,   88,  467,   88,
777        88,   88,   88,   88,   88,   88,  396,   88,   88,   88,
778        88,   88,   88,  397,  467,   88,   88,   88,   88,   88,
779       467,   88,   88,  467,   88,   88,   88,   88,   88,   88,
780        88,  401,   88,   88,  400,   88,  402,  403,   88,   88,
781       467,   88,   88,   88,  404,   88,   88,   88,  467,   88,
782       405,   88,   88,  467,   88,  467,   88,   88,  467,  467,
783
784        88,  398,  398,  398,   88,  407,   88,  467,   88,   88,
785       408,  467,  410,  411,   88,   88,   88,   88,   88,  467,
786       409,   88,   88,  467,  467,   88,   88,  467,   88,   88,
787       467,  467,   88,  467,   88,   88,  419,  420,  413,  421,
788       425,  426,  427,   88,   88,  467,  423,   88,  467,  420,
789       413,  420,  467,   88,  467,  467,   88,  467,  417,  467,
790       467,  424,  467,  467,  419,  420,  413,  421,  467,  467,
791       428,  467,  429,  434,  423,  419,  420,  413,  421,  435,
792       436,  437,  467,  430,  467,  423,  467,  431,  467,  424,
793       419,  420,  438,  421,  425,  426,  425,  425,  426,  425,
794
795       424,  467,  425,  426,  427,  467,  412,  413,  414,  467,
796       412,  413,  414,  412,  413,  414,  467,  412,  413,  414,
797       432,  433,  432,  467,  164,  467,  165,  164,  467,  165,
798       467,  467,  428,  467,  429,  467,  467,  166,  467,  467,
799       166,  167,  467,  467,  167,  430,  439,  467,  467,  431,
800       440,  442,  432,  433,  432,  435,  436,  435,  467,  467,
801       441,  435,  436,  435,  435,  436,  437,  420,  413,  420,
802       412,  413,  412,  412,  413,  412,  417,  412,  413,  414,
803       467,  412,  413,  414,  467,  412,  413,  414,  412,  413,
804       414,  434,  294,  443,  444,  445,  446,  446,  446,  446,
805
806       446,  446,  446,  446,  446,  446,  446,  446,  446,  412,
807       413,  414,  446,  446,  446,  446,  448,  467,  446,  447,
808       449,  412,  413,  414,  412,  413,  412,  412,  413,  414,
809       412,  413,  412,  412,  413,  414,  412,  413,  414,  467,
810       412,  413,  414,  446,  446,  446,  446,  337,  450,  451,
811       452,  453,  453,  453,  453,  453,  453,  453,  453,  453,
812       453,  453,  453,  453,  455,  454,  467,  453,  453,  453,
813       453,  457,  467,  453,  412,  413,  414,  412,  413,  414,
814       412,  413,  412,  412,  413,  412,  412,  413,  414,  412,
815       413,  414,  412,  413,  412,  412,  413,  412,  453,  453,
816
817       453,  453,  467,  456,  412,  413,  414,  412,  413,  414,
818       467,  458,  387,  459,  460,  461,  462,  462,  462,  462,
819       462,  462,  462,  462,  462,  462,  462,  462,  462,  467,
820       467,  467,  462,  462,  462,  462,  467,  467,  462,  467,
821       467,  467,  467,  467,  467,  467,  467,  467,  467,  467,
822       467,  467,  467,  467,  467,  467,  467,  467,  467,  467,
823       467,  467,  467,  462,  462,  462,  462,  399,  463,  464,
824       465,  466,  466,  466,  466,  466,  466,  466,  466,  466,
825       466,  466,  466,  466,  467,  467,  467,  466,  466,  466,
826       466,  467,  467,  466,  467,  467,  467,  467,  467,  467,
827
828       467,  467,  467,  467,  467,  467,  467,  467,  467,  467,
829       467,  467,  467,  467,  467,  467,  467,  467,  466,  466,
830       466,  466,   60,   60,  467,   60,   60,   60,   60,   60,
831        65,   65,  467,   65,   65,   65,   65,   65,   88,   88,
832       467,  467,   88,   88,   88,  139,  139,  467,  139,  139,
833       139,  139,  139,  150,  150,  150,  150,  150,  150,  150,
834       150,  153,  153,  153,  153,  153,  153,  153,  153,  157,
835       157,  157,  218,  218,  218,  218,  218,  218,  218,  218,
836       226,  226,  226,  149,  149,  149,  149,  149,  149,  149,
837       149,  232,  232,  280,  280,  280,  217,  217,  217,  217,
838
839       217,  217,  217,  217,  290,  290,  231,  231,  231,  231,
840       231,  231,  231,  231,  294,  294,  294,  294,  294,  330,
841       330,  331,  331,  331,  331,  331,  331,  331,  331,  337,
842       337,  337,  337,  337,  387,  387,  387,  387,  387,  399,
843       399,  399,  399,  399,  406,  406,  406,  406,  406,  406,
844       406,  406,  415,  415,  415,  415,  415,  415,  415,  416,
845       416,  467,  416,  416,  416,  416,  416,  422,  422,  422,
846       422,  422,  422,  422,  422,  419,  419,  467,  419,  419,
847       419,  419,  419,    7,  467,  467,  467,  467,  467,  467,
848       467,  467,  467,  467,  467,  467,  467,  467,  467,  467,
849
850       467,  467,  467,  467,  467,  467,  467,  467,  467,  467,
851       467,  467,  467,  467,  467,  467,  467,  467,  467,  467,
852       467,  467,  467,  467,  467,  467,  467,  467,  467,  467,
853       467,  467,  467,  467,  467,  467,  467,  467,  467
854     } ;
855
856 static yyconst flex_int16_t yy_chk[2240] =
857     {   0,
858         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
859         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
860         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
861         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
862         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
863         1,    1,    1,    1,    1,    3,    3,    3,    3,    3,
864         3,    3,    4,    4,    4,    4,    4,    4,    4,    5,
865         5,    5,    5,    5,    5,    5,    6,    6,    6,    6,
866         6,    6,    6,   12,   19,    4,   16,   20,   21,  480,
867        21,   21,   21,   19,   22,   20,   27,   27,   22,    6,
868
869       434,   16,   49,   12,   22,   23,  418,   23,   23,   23,
870        24,  385,   24,   24,   24,   25,  366,   25,   25,   25,
871        29,   29,   30,   30,   30,   32,   32,   32,   33,   33,
872        33,   49,   34,   34,   34,   36,   35,   86,   86,   23,
873        35,   30,   37,   25,   32,   36,   35,   33,   36,   35,
874        37,   34,   37,   38,   41,   37,   36,   38,   35,   34,
875        37,  365,  339,   38,   41,   65,   38,   41,   32,   34,
876        33,   39,   34,   41,  227,   40,   39,   60,  227,   40,
877        65,   39,   39,   39,   39,   40,   42,   39,   40,  407,
878        43,  419,  416,   40,   43,  338,   42,   60,   44,   42,
879
880        43,   42,   44,   43,   42,  297,  419,   45,   44,  407,
881       296,   44,  416,  286,   45,   44,   44,   45,   44,   46,
882        45,   47,   45,  139,  142,   46,   46,  280,   48,   45,
883        46,   47,  139,  142,   47,   48,   48,  238,   48,  237,
884        52,   48,   52,  236,   52,   52,   52,   53,   53,   52,
885        53,   53,   53,  233,   54,   53,   54,   54,   54,   55,
886       230,  143,   56,   55,   56,   56,   56,  226,  220,   55,
887       143,   57,   55,   57,   57,   57,   58,  215,   58,   58,
888        58,   73,   73,   73,  167,   74,   74,   74,   77,   77,
889        77,   78,   88,   78,   78,   78,   56,   74,   87,   87,
890
891        87,   74,   88,   90,   58,   88,   89,   89,   89,   92,
892        91,   93,  166,   90,   91,  165,   90,   87,   94,   92,
893        91,   93,   92,   91,   93,   92,   92,   95,   94,   96,
894        94,   94,   95,   97,  101,  164,   89,   95,   89,   96,
895        95,   99,   96,   97,  101,   97,   97,  101,   98,   89,
896        98,   99,  100,   89,   99,  162,  158,   99,   98,  157,
897       102,   98,  100,  153,  103,  100,  152,  146,  104,  100,
898       102,  133,  102,  102,  103,  105,  106,  103,  104,  103,
899       104,  104,   84,  107,   82,  105,  106,   80,  105,  106,
900       108,  109,  105,  107,   79,   75,  107,  107,  110,   72,
901
902       108,  109,   66,  108,  109,   62,  108,  108,  110,  110,
903       111,  110,  112,   59,  113,  110,   51,   50,  113,  114,
904       111,  114,  112,  111,  113,  112,  115,  113,   28,  114,
905       111,  117,  114,  119,  115,   26,  115,  116,  116,  115,
906        18,  117,  118,  119,  117,   15,  119,  116,  117,   14,
907       116,  120,  118,   11,    7,  118,    2,  122,  121,  118,
908         0,  120,    0,  123,  120,  120,  121,  122,  121,  124,
909       122,  121,  122,  123,  125,    0,  123,  125,  127,  124,
910         0,  123,  124,  124,  125,  123,  126,  125,  127,    0,
911       126,  127,  128,  127,    0,    0,  126,  130,  129,  126,
912
913       128,    0,  128,    0,    0,  128,  129,  130,  129,    0,
914       130,  129,  168,  134,  130,  134,  135,  135,  135,  138,
915       138,  138,  168,  134,    0,  168,  134,    0,    0,  134,
916       134,  136,    0,  136,  136,  136,  137,    0,  137,  137,
917       137,  140,  140,  140,  144,  144,  144,  145,    0,  145,
918       145,  145,    0,  140,  155,  155,  155,  140,  149,  149,
919       149,  150,  150,  150,    0,  136,  140,  141,  169,  170,
920       149,  170,  169,  150,  151,  151,  151,    0,  169,  170,
921         0,  169,  170,  213,  213,  213,  151,    0,    0,  141,
922       151,    0,    0,  141,  141,  141,  141,  141,  141,  141,
923
924       141,  141,  141,  141,  141,  141,  141,  141,  141,  141,
925       141,  141,  141,  141,  141,  141,  163,  163,  163,  171,
926       172,  173,  214,  214,  214,  224,  224,  224,  175,  171,
927       172,  173,  171,  172,  173,  171,  172,  172,  175,  174,
928       176,  175,    0,  174,    0,    0,  163,  176,  163,  174,
929       176,  177,  174,  176,    0,  177,  178,  179,  180,  163,
930       178,  177,  181,  163,  177,    0,  178,  179,  180,  178,
931       179,  180,  181,  179,  182,  181,  182,    0,  183,  184,
932       185,  278,  278,  278,  182,    0,    0,  182,  183,  184,
933       185,  183,  184,  185,  186,  187,    0,  185,  186,  187,
934
935       189,  188,  190,    0,  186,  187,  191,  186,  187,  188,
936       189,  188,  190,  189,  188,  190,  191,  192,  193,  191,
937         0,  191,  194,  195,    0,    0,  192,  192,  193,    0,
938       192,  193,  194,  195,  196,  194,  195,  193,  197,  194,
939       198,  406,  406,  406,  196,  199,  200,  196,  197,  199,
940       198,  197,  196,  198,  201,  199,  200,  198,  199,  200,
941       203,  202,  204,  200,  201,  202,  204,  201,  206,  207,
942       203,  202,  204,  203,  202,  204,  205,    0,  206,  207,
943       205,  206,  207,  209,  208,  210,  205,  208,    0,  205,
944       212,    0,  210,  209,  208,  210,  209,  208,  210,    0,
945
946       212,    0,    0,  212,  217,  217,  217,  218,  218,  218,
947       219,  219,  219,  228,  228,  228,  217,    0,  239,  218,
948       217,    0,  219,  218,    0,  228,  219,  239,  239,  217,
949         0,  239,  218,    0,    0,  219,  221,  221,  221,  229,
950       229,  229,  231,  231,  231,    0,  240,    0,  221,    0,
951       241,  229,  221,    0,  231,  229,  240,  241,  231,  240,
952       241,  221,  223,  241,  412,  412,  412,  413,  413,  413,
953       223,  223,    0,    0,  223,  223,  223,  223,  223,  223,
954       223,  223,  223,  223,  223,  223,  223,  223,  223,  223,
955       223,  223,  223,  223,  223,  223,  223,  242,  243,    0,
956
957         0,  384,  384,  384,  244,    0,  245,  242,  243,    0,
958       242,  243,  244,  242,  244,  243,  245,  244,  246,  245,
959       384,    0,    0,  247,  245,    0,    0,  248,  246,  249,
960         0,  246,    0,  247,  247,  246,  247,  248,  250,  249,
961       248,    0,  249,  251,  252,  253,    0,  251,  250,    0,
962       250,  250,    0,  251,  252,  253,  251,  252,  253,  254,
963       255,  256,  253,  254,    0,    0,  257,  258,    0,  254,
964       255,  256,  254,  255,  256,  255,  257,  258,  259,  257,
965       258,  257,  260,  258,    0,    0,  261,    0,  259,    0,
966       262,  259,  260,    0,  263,  260,  261,  259,  264,  261,
967
968       262,  261,  264,  262,  263,  265,  266,  263,  264,    0,
969         0,  264,  267,  265,  268,  265,  266,    0,  265,  266,
970       267,  266,  267,    0,  268,  267,  269,  268,  269,  268,
971       270,  271,  272,  414,  414,  414,  269,    0,    0,  269,
972       270,  271,  272,  270,  271,  272,  273,  274,  275,    0,
973       270,  273,  275,  276,  277,  282,  273,  274,  275,  273,
974       274,  275,    0,  276,  277,  282,  276,  277,    0,  282,
975         0,    0,  277,  415,  415,  415,    0,    0,  282,  283,
976       283,  283,  283,  283,  283,  283,  283,  283,  283,  283,
977       283,  283,  283,  283,  283,  283,  283,  283,  283,  283,
978
979       283,  283,  283,  283,  283,  283,  283,  283,  283,  283,
980       283,  283,  283,  283,  283,  283,  283,  283,  283,  283,
981       283,  283,  283,  283,  283,  283,  283,  283,  283,  283,
982       283,  283,  283,  283,  284,  284,  284,  285,  285,  285,
983       287,  287,  287,    0,  298,  299,  284,    0,    0,  285,
984       284,  300,  287,  285,  298,  299,  287,  298,  299,  284,
985         0,  300,  285,    0,  300,  287,  288,  288,  288,  288,
986       288,  288,  288,  288,  288,  288,  288,  288,  288,  288,
987       288,  288,  288,  288,  288,  288,  288,  288,  288,  288,
988       288,  288,  288,  288,  288,  288,  288,  288,  288,  288,
989
990       288,  288,  288,  288,  288,  288,  288,  288,  288,  288,
991       288,  288,  288,  288,  288,  288,  288,  288,  288,  288,
992       288,  291,  291,  291,    0,  301,  417,  417,  417,  302,
993       303,    0,    0,  291,    0,  301,    0,  291,  301,  302,
994       303,  302,  302,  303,  304,  305,  306,    0,  304,  306,
995       307,  308,    0,  305,  304,  305,  306,  304,  305,  306,
996       307,  308,  309,  307,  308,    0,  310,    0,  311,    0,
997       309,    0,  309,    0,  312,  309,  310,  310,  311,  310,
998         0,  311,  313,    0,  312,  311,  312,  312,  313,  313,
999       314,    0,  315,  313,    0,    0,  315,    0,  316,  318,
1000
1001       314,    0,  315,  314,  314,  315,  316,  317,  316,  318,
1002         0,  316,  318,  317,  321,    0,  318,  317,    0,  319,
1003       317,  319,    0,  320,  321,  320,  321,  321,  322,  319,
1004       322,    0,  319,  320,  323,  324,  320,    0,  322,  325,
1005         0,  322,  324,    0,  323,  324,  326,  323,  324,  325,
1006       327,  326,  325,    0,  328,    0,  326,    0,  327,  326,
1007       327,  340,  329,  327,  328,  329,    0,  328,  331,  331,
1008       331,  340,  329,  341,  340,  329,  332,  332,  332,  340,
1009       331,    0,    0,  341,  331,    0,  341,  342,  332,  343,
1010       341,  343,  332,  331,  334,  334,  334,  342,  344,  343,
1011
1012       342,  332,  343,  345,    0,  346,  334,    0,  344,    0,
1013       334,  344,    0,  345,  344,  346,  345,  347,  346,  334,
1014         0,  347,  348,  350,  349,  345,  349,  347,  351,  352,
1015       347,    0,  348,  350,  349,  348,  350,  349,  351,  352,
1016       353,  351,  352,    0,  354,  355,    0,  354,    0,  355,
1017       353,  357,  356,  353,  354,  355,  356,  354,  355,  358,
1018       359,  357,  356,    0,  357,  356,  360,  361,  357,  358,
1019       359,  362,  358,  359,    0,  363,  360,  361,    0,  360,
1020       361,  362,  364,    0,  362,  363,  364,  363,  363,  368,
1021       369,  370,  364,  368,    0,  364,  371,  372,    0,  368,
1022
1023       369,  370,  368,  369,  370,  373,  371,  372,    0,  371,
1024       372,  374,  375,    0,    0,  373,  375,  373,  373,  377,
1025         0,  374,  375,  374,  374,  375,  376,    0,  376,  377,
1026       379,  378,  377,  378,  379,  380,  376,  381,    0,  376,
1027       379,  378,  382,  379,  378,  380,  382,  381,  380,  383,
1028       381,  388,  382,  383,    0,  382,  389,  390,  391,  383,
1029         0,  388,  383,    0,  388,  393,  389,  390,  391,  389,
1030       390,  391,  392,  394,  390,  393,  392,  394,  393,  395,
1031         0,  396,  392,  394,  396,  392,  394,  397,    0,  395,
1032       397,  396,  395,    0,  396,    0,  400,  397,    0,    0,
1033
1034       397,  398,  398,  398,  402,  398,  400,    0,  401,  400,
1035       398,    0,  400,  401,  402,  403,  404,  402,  401,    0,
1036       398,  401,  405,    0,    0,  403,  404,    0,  403,  404,
1037         0,    0,  405,    0,  410,  405,  408,  408,  408,  408,
1038       409,  409,  409,  411,  410,    0,  408,  410,    0,  420,
1039       420,  420,    0,  411,    0,    0,  411,    0,  420,    0,
1040         0,  408,    0,    0,  421,  421,  421,  421,    0,    0,
1041       409,    0,  409,  420,  421,  422,  422,  422,  422,  423,
1042       423,  423,    0,  409,    0,  422,    0,  409,    0,  421,
1043       424,  424,  424,  424,  425,  425,  425,  426,  426,  426,
1044
1045       422,    0,  427,  427,  427,    0,  428,  428,  428,    0,
1046       429,  429,  429,  430,  430,  430,    0,  431,  431,  431,
1047       432,  432,  432,    0,  425,    0,  425,  426,    0,  426,
1048         0,    0,  427,    0,  427,    0,    0,  425,    0,    0,
1049       426,  425,    0,    0,  426,  427,  428,    0,    0,  427,
1050       429,  431,  433,  433,  433,  435,  435,  435,    0,    0,
1051       430,  436,  436,  436,  437,  437,  437,  438,  438,  438,
1052       443,  443,  443,  444,  444,  444,  438,  440,  440,  440,
1053         0,  441,  441,  441,    0,  442,  442,  442,  445,  445,
1054       445,  438,  439,  439,  439,  439,  439,  439,  439,  439,
1055
1056       439,  439,  439,  439,  439,  439,  439,  439,  439,  446,
1057       446,  446,  439,  439,  439,  439,  441,    0,  439,  440,
1058       442,  448,  448,  448,  450,  450,  450,  449,  449,  449,
1059       451,  451,  451,  452,  452,  452,  453,  453,  453,    0,
1060       455,  455,  455,  439,  439,  439,  439,  447,  447,  447,
1061       447,  447,  447,  447,  447,  447,  447,  447,  447,  447,
1062       447,  447,  447,  447,  449,  448,    0,  447,  447,  447,
1063       447,  455,    0,  447,  454,  454,  454,  456,  456,  456,
1064       459,  459,  459,  460,  460,  460,  461,  461,  461,  462,
1065       462,  462,  463,  463,  463,  464,  464,  464,  447,  447,
1066
1067       447,  447,    0,  454,  465,  465,  465,  466,  466,  466,
1068         0,  456,  457,  457,  457,  457,  457,  457,  457,  457,
1069       457,  457,  457,  457,  457,  457,  457,  457,  457,    0,
1070         0,    0,  457,  457,  457,  457,    0,    0,  457,    0,
1071         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
1072         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
1073         0,    0,    0,  457,  457,  457,  457,  458,  458,  458,
1074       458,  458,  458,  458,  458,  458,  458,  458,  458,  458,
1075       458,  458,  458,  458,    0,    0,    0,  458,  458,  458,
1076       458,    0,    0,  458,    0,    0,    0,    0,    0,    0,
1077
1078         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
1079         0,    0,    0,    0,    0,    0,    0,    0,  458,  458,
1080       458,  458,  468,  468,    0,  468,  468,  468,  468,  468,
1081       469,  469,    0,  469,  469,  469,  469,  469,  470,  470,
1082         0,    0,  470,  470,  470,  471,  471,    0,  471,  471,
1083       471,  471,  471,  472,  472,  472,  472,  472,  472,  472,
1084       472,  473,  473,  473,  473,  473,  473,  473,  473,  474,
1085       474,  474,  475,  475,  475,  475,  475,  475,  475,  475,
1086       476,  476,  476,  477,  477,  477,  477,  477,  477,  477,
1087       477,  478,  478,  479,  479,  479,  481,  481,  481,  481,
1088
1089       481,  481,  481,  481,  482,  482,  483,  483,  483,  483,
1090       483,  483,  483,  483,  484,  484,  484,  484,  484,  485,
1091       485,  486,  486,  486,  486,  486,  486,  486,  486,  487,
1092       487,  487,  487,  487,  488,  488,  488,  488,  488,  489,
1093       489,  489,  489,  489,  490,  490,  490,  490,  490,  490,
1094       490,  490,  491,  491,  491,  491,  491,  491,  491,  492,
1095       492,    0,  492,  492,  492,  492,  492,  493,  493,  493,
1096       493,  493,  493,  493,  493,  494,  494,    0,  494,  494,
1097       494,  494,  494,  467,  467,  467,  467,  467,  467,  467,
1098       467,  467,  467,  467,  467,  467,  467,  467,  467,  467,
1099
1100       467,  467,  467,  467,  467,  467,  467,  467,  467,  467,
1101       467,  467,  467,  467,  467,  467,  467,  467,  467,  467,
1102       467,  467,  467,  467,  467,  467,  467,  467,  467,  467,
1103       467,  467,  467,  467,  467,  467,  467,  467,  467
1104     } ;
1105
1106 static yy_state_type yy_last_accepting_state;
1107 static char *yy_last_accepting_cpos;
1108
1109 extern int as3__flex_debug;
1110 int as3__flex_debug = 0;
1111
1112 /* The intent behind this definition is that it'll catch
1113  * any uses of REJECT which flex missed.
1114  */
1115 #define REJECT reject_used_but_not_detected
1116 #define yymore() yymore_used_but_not_detected
1117 #define YY_MORE_ADJ 0
1118 #define YY_RESTORE_YY_MORE_OFFSET
1119 char *as3_text;
1120 #line 1 "tokenizer.lex"
1121 /* tokenizer.lex
1122
1123    Routines for compiling Flash2 AVM2 ABC Actionscript
1124
1125    Extension module for the rfxswf library.
1126    Part of the swftools package.
1127
1128    Copyright (c) 2008 Matthias Kramm <kramm@quiss.org>
1129  
1130    This program is free software; you can redistribute it and/or modify
1131    it under the terms of the GNU General Public License as published by
1132    the Free Software Foundation; either version 2 of the License, or
1133    (at your option) any later version.
1134
1135    This program is distributed in the hope that it will be useful,
1136    but WITHOUT ANY WARRANTY; without even the implied warranty of
1137    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1138    GNU General Public License for more details.
1139
1140    You should have received a copy of the GNU General Public License
1141    along with this program; if not, write to the Free Software
1142    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
1143 #line 24 "tokenizer.lex"
1144
1145
1146 #include <string.h>
1147 #include <stdlib.h>
1148 #include <stdio.h>
1149 #include <stdarg.h>
1150 #include "../utf8.h"
1151 #include "tokenizer.h"
1152 #include "files.h"
1153
1154 int as3_pass = 0;
1155 int as3_verbosity = 1;
1156 unsigned int as3_tokencount = 0;
1157
1158 void as3_error(const char*format, ...)
1159 {
1160     char buf[1024];
1161     int l;
1162     va_list arglist;
1163     if(as3_verbosity<0)
1164         exit(1);
1165     va_start(arglist, format);
1166     vsprintf(buf, format, arglist);
1167     va_end(arglist);
1168     fprintf(stderr, "%s:%d:%d: error: %s\n", current_filename_short, current_line, current_column, buf);
1169     fflush(stderr);
1170     exit(1);
1171 }
1172 void as3_warning(const char*format, ...)
1173 {
1174     char buf[1024];
1175     int l;
1176     va_list arglist;
1177     if(as3_verbosity<1)
1178         return;
1179     va_start(arglist, format);
1180     vsprintf(buf, format, arglist);
1181     va_end(arglist);
1182     fprintf(stderr, "%s:%d:%d: warning: %s\n", current_filename_short, current_line, current_column, buf);
1183     fflush(stderr);
1184 }
1185 void as3_softwarning(const char*format, ...)
1186 {
1187     char buf[1024];
1188     int l;
1189     va_list arglist;
1190     if(as3_verbosity<2)
1191         return;
1192     va_start(arglist, format);
1193     vsprintf(buf, format, arglist);
1194     va_end(arglist);
1195     fprintf(stderr, "%s:%d:%d: warning: %s\n", current_filename_short, current_line, current_column, buf);
1196     fflush(stderr);
1197 }
1198 static void dbg(const char*format, ...)
1199 {
1200     char buf[1024];
1201     int l;
1202     va_list arglist;
1203     if(as3_verbosity<3)
1204         return;
1205     va_start(arglist, format);
1206     vsprintf(buf, format, arglist);
1207     va_end(arglist);
1208     l = strlen(buf);
1209     while(l && buf[l-1]=='\n') {
1210         buf[l-1] = 0;
1211         l--;
1212     }
1213     printf("(tokenizer) ");
1214     printf("%s\n", buf);
1215     fflush(stdout);
1216 }
1217
1218
1219
1220 #ifndef YY_CURRENT_BUFFER
1221 #define YY_CURRENT_BUFFER yy_current_buffer
1222 #endif
1223
1224 void handleInclude(char*text, int len, char quotes)
1225 {
1226     char*filename = 0;
1227     if(quotes) {
1228         char*p1 = strchr(text, '"');
1229         char*p2 = strrchr(text, '"');
1230         if(!p1 || !p2 || p1==p2) {
1231             syntaxerror("Invalid include in line %d\n", current_line);
1232         }
1233         *p2 = 0;
1234         filename = strdup(p1+1);
1235     } else {
1236         int i1=0,i2=len;
1237         // find start
1238         while(!strchr(" \n\r\t", text[i1])) i1++;
1239         // strip
1240         while(strchr(" \n\r\t", text[i1])) i1++;
1241         while(strchr(" \n\r\t", text[i2-1])) i2--;
1242         if(i2!=len) text[i2]=0;
1243         filename = strdup(&text[i1]);
1244     }
1245     
1246     char*fullfilename = enter_file(filename, YY_CURRENT_BUFFER);
1247     as3_in = fopen(fullfilename, "rb");
1248     if (!as3_in) {
1249         syntaxerror("Couldn't open include file \"%s\"\n", fullfilename);
1250     }
1251
1252     as3__switch_to_buffer(as3__create_buffer(as3_in,YY_BUF_SIZE ) );
1253     //BEGIN(INITIAL); keep context
1254 }
1255
1256 static int do_unescape(const char*s, const char*end, char*n) 
1257 {
1258     char*o = n;
1259     int len=0;
1260     while(s<end) {
1261         if(*s!='\\') {
1262             if(o) o[len] = *s;len++;
1263             s++;
1264             continue;
1265         }
1266         s++; //skip past '\'
1267         if(s==end) syntaxerror("invalid \\ at end of string");
1268
1269         /* handle the various line endings (mac, dos, unix) */
1270         if(*s=='\r') { 
1271             s++; 
1272             if(s==end) break;
1273             if(*s=='\n') 
1274                 s++;
1275             continue;
1276         }
1277         if(*s=='\n')  {
1278             s++;
1279             continue;
1280         }
1281         switch(*s) {
1282             case '\\': if(o) o[len] = '\\';s++;len++; break;
1283             case '"': if(o) o[len] = '"';s++;len++; break;
1284             case '\'': if(o) o[len] = '\'';s++;len++; break;
1285             case 'b': if(o) o[len] = '\b';s++;len++; break;
1286             case 'f': if(o) o[len] = '\f';s++;len++; break;
1287             case 'n': if(o) o[len] = '\n';s++;len++; break;
1288             case 'r': if(o) o[len] = '\r';s++;len++; break;
1289             case 't': if(o) o[len] = '\t';s++;len++; break;
1290             case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': {
1291                 unsigned int num=0;
1292                 int nr = 0;
1293                 while(strchr("01234567", *s) && nr<3 && s<end) {
1294                     num <<= 3;
1295                     num |= *s-'0';
1296                     nr++;
1297                     s++;
1298                 }
1299                 if(num>256) 
1300                     syntaxerror("octal number out of range (0-255): %d", num);
1301                 if(o) o[len] = num;len++;
1302                 continue;
1303             }
1304             case 'x': case 'u': {
1305                 int max=2;
1306                 char bracket = 0;
1307                 char unicode = 0;
1308                 if(*s == 'u') {
1309                     max = 6;
1310                     unicode = 1;
1311                 }
1312                 s++;
1313                 if(s==end) syntaxerror("invalid \\u or \\x at end of string");
1314                 if(*s == '{')  {
1315                     s++;
1316                     if(s==end) syntaxerror("invalid \\u{ at end of string");
1317                     bracket=1;
1318                 }
1319                 unsigned int num=0;
1320                 int nr = 0;
1321                 while(strchr("0123456789abcdefABCDEF", *s) && (bracket || nr < max) && s<end) {
1322                     num <<= 4;
1323                     if(*s>='0' && *s<='9') num |= *s - '0';
1324                     if(*s>='a' && *s<='f') num |= *s - 'a' + 10;
1325                     if(*s>='A' && *s<='F') num |= *s - 'A' + 10;
1326                     nr++;
1327                     s++;
1328                 }
1329                 if(bracket) {
1330                     if(*s=='}' && s<end) {
1331                         s++;
1332                     } else {
1333                         syntaxerror("missing terminating '}'");
1334                     }
1335                 }
1336                 if(unicode) {
1337                     char*utf8 = getUTF8(num);
1338                     while(*utf8) {
1339                         if(o) o[len] = *utf8;utf8++;len++;
1340                     }
1341                 } else {
1342                     if(num>256) 
1343                         syntaxerror("byte out of range (0-255): %d", num);
1344                     if(o) o[len] = num;len++;
1345                 }
1346                 break;
1347             }
1348             default:
1349                 syntaxerror("unknown escape sequence: \"\\%c\"", *s);
1350         }
1351     }
1352     if(o) o[len]=0;
1353     return len;
1354 }
1355
1356 static string_t string_unescape(const char*in, int l)
1357 {
1358     const char*s = in;
1359     const char*end = &in[l];
1360
1361     int len = do_unescape(s, end, 0);
1362     char*n = (char*)malloc(len+1);
1363     do_unescape(s, end, n);
1364     string_t out = string_new(n, len);
1365     return out; 
1366 }
1367
1368 static void handleString(char*s, int len)
1369 {
1370     if(as3_pass < 2) {
1371         // don't bother decoding strings in pass 1
1372         memset(&a3_lval, 0, sizeof(a3_lval));
1373         return;
1374     }
1375
1376     if(s[0]=='"') {
1377         if(s[len-1]!='"') syntaxerror("String doesn't end with '\"'");
1378         s++;len-=2;
1379     }
1380     else if(s[0]=='\'') {
1381         if(s[len-1]!='\'') syntaxerror("String doesn't end with '\"'");
1382         s++;len-=2;
1383     }
1384     else syntaxerror("String incorrectly terminated");
1385
1386     
1387     a3_lval.str = string_unescape(s, len);
1388 }
1389
1390
1391 char start_of_expression;
1392
1393 static inline int mkid(int type)
1394 {
1395     char*s = malloc(as3_leng+1);
1396     memcpy(s, as3_text, as3_leng);
1397     s[as3_leng]=0;
1398     a3_lval.id = s;
1399     return type;
1400 }
1401
1402 static inline int m(int type)
1403 {
1404     a3_lval.token = type;
1405     return type;
1406 }
1407
1408
1409 static char numberbuf[64];
1410 static char*nrbuf()
1411 {
1412     if(as3_leng>sizeof(numberbuf)-1)
1413         syntaxerror("decimal number overflow");
1414     char*s = numberbuf;
1415     memcpy(s, as3_text, as3_leng);
1416     s[as3_leng]=0;
1417     return s;
1418 }
1419
1420 static inline int setint(int v)
1421 {
1422     a3_lval.number_int = v;
1423     if(v>-128)
1424         return T_BYTE;
1425     else if(v>=-32768)
1426         return T_SHORT;
1427     else
1428         return T_INT;
1429 }
1430 static inline int setuint(unsigned int v)
1431 {
1432     a3_lval.number_uint = v;
1433     if(v<128)
1434         return T_BYTE;
1435     else if(v<32768)
1436         return T_SHORT;
1437     else
1438         return T_UINT;
1439 }
1440 static inline int setfloat(double v)
1441 {
1442     a3_lval.number_float = v;
1443     return T_FLOAT;
1444 }
1445
1446 static inline int handlefloat()
1447 {
1448     char*s = nrbuf();
1449     a3_lval.number_float = atof(s);
1450     return T_FLOAT;
1451 }
1452
1453 static inline int handleint()
1454 {
1455     char*s = nrbuf();
1456     char l = (as3_text[0]=='-');
1457
1458     char*max = l?"1073741824":"2147483647";
1459     if(as3_leng-l>10) {
1460         as3_warning("integer overflow: %s (converted to Number)", s);
1461         return handlefloat();
1462     }
1463     if(as3_leng-l==10) {
1464         int t;
1465         for(t=0;t<as3_leng-l;t++) {
1466             if(as3_text[l+t]>max[t]) {
1467                 as3_warning("integer overflow: %s (converted to Number)", s);
1468                 return handlefloat();
1469             }
1470             else if(as3_text[l+t]<max[t])
1471                 break;
1472         }
1473     }
1474     if(as3_text[0]=='-') {
1475         int v = atoi(s);
1476         return setint(v);
1477     } else {
1478         unsigned int v = 0;
1479         int t;
1480         for(t=0;t<as3_leng;t++) {
1481             v*=10;
1482             v+=as3_text[t]-'0';
1483         }
1484         return setuint(v);
1485     }
1486 }
1487
1488 static inline int handlehexfloat()
1489 {
1490     char l = (as3_text[0]=='-')+2;
1491     double d=0;
1492     char dot=0;
1493     double base=1;
1494     int t;
1495     for(t=l;t<as3_leng;t++) {
1496         char c = as3_text[t];
1497         if(c=='.') {
1498             dot=1;
1499             continue;
1500         }
1501         if(!dot) {
1502             d*=16;
1503         } else {
1504             base*=1/16.0;
1505         }
1506         if(c>='0' && c<='9')
1507             d+=(c&15)*base;
1508         else if((c>='a' && c<='f') || (c>='A' && c<='F'))
1509             d+=((c&0x0f)+9)*base;
1510     }
1511     return setfloat(d);
1512 }
1513 static inline int handlehex()
1514 {
1515     char l = (as3_text[0]=='-')+2;
1516     int len = as3_leng;
1517
1518     if(len-l>8) {
1519         char*s = nrbuf();
1520         syntaxerror("integer overflow %s", s);
1521     }
1522
1523     int t;
1524     unsigned int v = 0;
1525     for(t=l;t<len;t++) {
1526         v<<=4;
1527         char c = as3_text[t];
1528         if(c>='0' && c<='9')
1529             v|=(c&15);
1530         else if((c>='a' && c<='f') || (c>='A' && c<='F'))
1531             v|=(c&0x0f)+9;
1532     }
1533     if(l && v>1073741824) {
1534         char*s = nrbuf();
1535         as3_warning("signed integer overflow: %s (converted to Number)", s);
1536         return setfloat(v);
1537     }
1538     if(!l && v>2147483647) {
1539         char*s = nrbuf();
1540         as3_warning("unsigned integer overflow: %s (converted to Number)", s);
1541         return setfloat(v);
1542     }
1543
1544     if(l==3) {
1545         return setint(-(int)v);
1546     } else {
1547         return setuint(v);
1548     }
1549 }
1550
1551 void handleLabel(char*text, int len)
1552 {
1553     int t;
1554     for(t=len-1;t>=0;--t) {
1555         if(text[t]!=' ' &&
1556            text[t]!=':')
1557             break;
1558     }
1559     char*s = malloc(t+1);
1560     memcpy(s, as3_text, t);
1561     s[t]=0;
1562     a3_lval.id = s;
1563 }
1564
1565 static int handleregexp()
1566 {
1567     char*s = malloc(as3_leng);
1568     int len=as3_leng-1;
1569     memcpy(s, as3_text+1, len);
1570     s[len] = 0;
1571     int t;
1572     for(t=len;t>=0;--t) {
1573         if(s[t]=='/') {
1574             s[t] = 0;
1575             break;
1576         }
1577     }
1578     a3_lval.regexp.pattern = s;
1579     if(t==len) {
1580         a3_lval.regexp.options = 0;
1581     } else {
1582         a3_lval.regexp.options = s+t+1;
1583     }
1584     return T_REGEXP;
1585 }
1586
1587 void initialize_scanner();
1588 #define YY_USER_INIT initialize_scanner();
1589
1590 /* count the number of lines+columns consumed by this token */
1591 static inline void l() {
1592     int t;
1593     for(t=0;t<as3_leng;t++) {
1594         if(as3_text[t]=='\n') {
1595             current_line++;
1596             current_column=0;
1597         } else {
1598             current_column++;
1599         }
1600     }
1601 }
1602 /* count the number of columns consumed by this token */
1603 static inline void c() {
1604     current_column+=as3_leng;
1605 }
1606
1607 //Boolean                      {c();return m(KW_BOOLEAN);}
1608 //int                          {c();return m(KW_INT);}
1609 //uint                         {c();return m(KW_UINT);}
1610 //Number                       {c();return m(KW_NUMBER);}
1611
1612
1613
1614
1615 #line 1616 "tokenizer.yy.c"
1616
1617 #define INITIAL 0
1618 #define REGEXPOK 1
1619 #define BEGINNING 2
1620
1621 #ifndef YY_NO_UNISTD_H
1622 /* Special case for "unistd.h", since it is non-ANSI. We include it way
1623  * down here because we want the user's section 1 to have been scanned first.
1624  * The user has a chance to override it with an option.
1625  */
1626 #include <unistd.h>
1627 #endif
1628
1629 #ifndef YY_EXTRA_TYPE
1630 #define YY_EXTRA_TYPE void *
1631 #endif
1632
1633 static int yy_init_globals (void );
1634
1635 /* Accessor methods to globals.
1636    These are made visible to non-reentrant scanners for convenience. */
1637
1638 int as3_lex_destroy (void );
1639
1640 int as3_get_debug (void );
1641
1642 void as3_set_debug (int debug_flag  );
1643
1644 YY_EXTRA_TYPE as3_get_extra (void );
1645
1646 void as3_set_extra (YY_EXTRA_TYPE user_defined  );
1647
1648 FILE *as3_get_in (void );
1649
1650 void as3_set_in  (FILE * in_str  );
1651
1652 FILE *as3_get_out (void );
1653
1654 void as3_set_out  (FILE * out_str  );
1655
1656 int as3_get_leng (void );
1657
1658 char *as3_get_text (void );
1659
1660 int as3_get_lineno (void );
1661
1662 void as3_set_lineno (int line_number  );
1663
1664 /* Macros after this point can all be overridden by user definitions in
1665  * section 1.
1666  */
1667
1668 #ifndef YY_SKIP_YYWRAP
1669 #ifdef __cplusplus
1670 extern "C" int as3_wrap (void );
1671 #else
1672 extern int as3_wrap (void );
1673 #endif
1674 #endif
1675
1676     static void yyunput (int c,char *buf_ptr  );
1677     
1678 #ifndef yytext_ptr
1679 static void yy_flex_strncpy (char *,yyconst char *,int );
1680 #endif
1681
1682 #ifdef YY_NEED_STRLEN
1683 static int yy_flex_strlen (yyconst char * );
1684 #endif
1685
1686 #ifndef YY_NO_INPUT
1687
1688 #ifdef __cplusplus
1689 static int yyinput (void );
1690 #else
1691 static int input (void );
1692 #endif
1693
1694 #endif
1695
1696 /* Amount of stuff to slurp up with each read. */
1697 #ifndef YY_READ_BUF_SIZE
1698 #define YY_READ_BUF_SIZE 8192
1699 #endif
1700
1701 /* Copy whatever the last rule matched to the standard output. */
1702 #ifndef ECHO
1703 /* This used to be an fputs(), but since the string might contain NUL's,
1704  * we now use fwrite().
1705  */
1706 #define ECHO fwrite( as3_text, as3_leng, 1, as3_out )
1707 #endif
1708
1709 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
1710  * is returned in "result".
1711  */
1712 #ifndef YY_INPUT
1713 #define YY_INPUT(buf,result,max_size) \
1714         if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1715                 { \
1716                 int c = '*'; \
1717                 int n; \
1718                 for ( n = 0; n < max_size && \
1719                              (c = getc( as3_in )) != EOF && c != '\n'; ++n ) \
1720                         buf[n] = (char) c; \
1721                 if ( c == '\n' ) \
1722                         buf[n++] = (char) c; \
1723                 if ( c == EOF && ferror( as3_in ) ) \
1724                         YY_FATAL_ERROR( "input in flex scanner failed" ); \
1725                 result = n; \
1726                 } \
1727         else \
1728                 { \
1729                 errno=0; \
1730                 while ( (result = fread(buf, 1, max_size, as3_in))==0 && ferror(as3_in)) \
1731                         { \
1732                         if( errno != EINTR) \
1733                                 { \
1734                                 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1735                                 break; \
1736                                 } \
1737                         errno=0; \
1738                         clearerr(as3_in); \
1739                         } \
1740                 }\
1741 \
1742
1743 #endif
1744
1745 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1746  * we don't want an extra ';' after the "return" because that will cause
1747  * some compilers to complain about unreachable statements.
1748  */
1749 #ifndef yyterminate
1750 #define yyterminate() return YY_NULL
1751 #endif
1752
1753 /* Number of entries by which start-condition stack grows. */
1754 #ifndef YY_START_STACK_INCR
1755 #define YY_START_STACK_INCR 25
1756 #endif
1757
1758 /* Report a fatal error. */
1759 #ifndef YY_FATAL_ERROR
1760 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1761 #endif
1762
1763 /* end tables serialization structures and prototypes */
1764
1765 /* Default declaration of generated scanner - a define so the user can
1766  * easily add parameters.
1767  */
1768 #ifndef YY_DECL
1769 #define YY_DECL_IS_OURS 1
1770
1771 extern int as3_lex (void);
1772
1773 #define YY_DECL int as3_lex (void)
1774 #endif /* !YY_DECL */
1775
1776 /* Code executed at the beginning of each rule, after as3_text and as3_leng
1777  * have been set up.
1778  */
1779 #ifndef YY_USER_ACTION
1780 #define YY_USER_ACTION
1781 #endif
1782
1783 /* Code executed at the end of each rule. */
1784 #ifndef YY_BREAK
1785 #define YY_BREAK break;
1786 #endif
1787
1788 #define YY_RULE_SETUP \
1789         if ( as3_leng > 0 ) \
1790                 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
1791                                 (as3_text[as3_leng - 1] == '\n'); \
1792         YY_USER_ACTION
1793
1794 /** The main scanner function which does all the work.
1795  */
1796 YY_DECL
1797 {
1798         register yy_state_type yy_current_state;
1799         register char *yy_cp, *yy_bp;
1800         register int yy_act;
1801     
1802 #line 516 "tokenizer.lex"
1803
1804
1805
1806 #line 1807 "tokenizer.yy.c"
1807
1808         if ( !(yy_init) )
1809                 {
1810                 (yy_init) = 1;
1811
1812 #ifdef YY_USER_INIT
1813                 YY_USER_INIT;
1814 #endif
1815
1816                 if ( ! (yy_start) )
1817                         (yy_start) = 1; /* first start state */
1818
1819                 if ( ! as3_in )
1820                         as3_in = stdin;
1821
1822                 if ( ! as3_out )
1823                         as3_out = stdout;
1824
1825                 if ( ! YY_CURRENT_BUFFER ) {
1826                         as3_ensure_buffer_stack ();
1827                         YY_CURRENT_BUFFER_LVALUE =
1828                                 as3__create_buffer(as3_in,YY_BUF_SIZE );
1829                 }
1830
1831                 as3__load_buffer_state( );
1832                 }
1833
1834         while ( 1 )             /* loops until end-of-file is reached */
1835                 {
1836                 yy_cp = (yy_c_buf_p);
1837
1838                 /* Support of as3_text. */
1839                 *yy_cp = (yy_hold_char);
1840
1841                 /* yy_bp points to the position in yy_ch_buf of the start of
1842                  * the current run.
1843                  */
1844                 yy_bp = yy_cp;
1845
1846                 yy_current_state = (yy_start);
1847                 yy_current_state += YY_AT_BOL();
1848 yy_match:
1849                 do
1850                         {
1851                         register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1852                         if ( yy_accept[yy_current_state] )
1853                                 {
1854                                 (yy_last_accepting_state) = yy_current_state;
1855                                 (yy_last_accepting_cpos) = yy_cp;
1856                                 }
1857                         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1858                                 {
1859                                 yy_current_state = (int) yy_def[yy_current_state];
1860                                 if ( yy_current_state >= 468 )
1861                                         yy_c = yy_meta[(unsigned int) yy_c];
1862                                 }
1863                         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1864                         ++yy_cp;
1865                         }
1866                 while ( yy_current_state != 467 );
1867                 yy_cp = (yy_last_accepting_cpos);
1868                 yy_current_state = (yy_last_accepting_state);
1869
1870 yy_find_action:
1871                 yy_act = yy_accept[yy_current_state];
1872
1873                 YY_DO_BEFORE_ACTION;
1874
1875 do_action:      /* This label is used only to access EOF actions. */
1876
1877                 switch ( yy_act )
1878         { /* beginning of action switch */
1879                         case 0: /* must back up */
1880                         /* undo the effects of YY_DO_BEFORE_ACTION */
1881                         *yy_cp = (yy_hold_char);
1882                         yy_cp = (yy_last_accepting_cpos);
1883                         yy_current_state = (yy_last_accepting_state);
1884                         goto yy_find_action;
1885
1886 case 1:
1887 /* rule 1 can match eol */
1888 YY_RULE_SETUP
1889 #line 519 "tokenizer.lex"
1890 {l(); /* single line comment */}
1891         YY_BREAK
1892 case 2:
1893 /* rule 2 can match eol */
1894 YY_RULE_SETUP
1895 #line 520 "tokenizer.lex"
1896 {l(); /* multi line comment */}
1897         YY_BREAK
1898 case 3:
1899 YY_RULE_SETUP
1900 #line 521 "tokenizer.lex"
1901 {syntaxerror("syntax error: unterminated comment", as3_text);}
1902         YY_BREAK
1903 case 4:
1904 /* rule 4 can match eol */
1905 *yy_cp = (yy_hold_char); /* undo effects of setting up as3_text */
1906 (yy_c_buf_p) = yy_cp -= 1;
1907 YY_DO_BEFORE_ACTION; /* set up as3_text again */
1908 YY_RULE_SETUP
1909 #line 523 "tokenizer.lex"
1910 {l();handleInclude(as3_text, as3_leng, 1);}
1911         YY_BREAK
1912 case 5:
1913 /* rule 5 can match eol */
1914 *yy_cp = (yy_hold_char); /* undo effects of setting up as3_text */
1915 (yy_c_buf_p) = yy_cp -= 1;
1916 YY_DO_BEFORE_ACTION; /* set up as3_text again */
1917 YY_RULE_SETUP
1918 #line 524 "tokenizer.lex"
1919 {l();handleInclude(as3_text, as3_leng, 0);}
1920         YY_BREAK
1921 case 6:
1922 /* rule 6 can match eol */
1923 YY_RULE_SETUP
1924 #line 525 "tokenizer.lex"
1925 {l(); BEGIN(INITIAL);handleString(as3_text, as3_leng);return T_STRING;}
1926         YY_BREAK
1927
1928 case 7:
1929 YY_RULE_SETUP
1930 #line 528 "tokenizer.lex"
1931 {c(); BEGIN(INITIAL);return handleregexp();} 
1932         YY_BREAK
1933 case 8:
1934 YY_RULE_SETUP
1935 #line 529 "tokenizer.lex"
1936 {c(); BEGIN(INITIAL);return handlehex();}
1937         YY_BREAK
1938 case 9:
1939 YY_RULE_SETUP
1940 #line 530 "tokenizer.lex"
1941 {c(); BEGIN(INITIAL);return handlehexfloat();}
1942         YY_BREAK
1943 case 10:
1944 YY_RULE_SETUP
1945 #line 531 "tokenizer.lex"
1946 {c(); BEGIN(INITIAL);return handleint();}
1947         YY_BREAK
1948 case 11:
1949 YY_RULE_SETUP
1950 #line 532 "tokenizer.lex"
1951 {c(); BEGIN(INITIAL);return handlefloat();}
1952         YY_BREAK
1953
1954 case 12:
1955 YY_RULE_SETUP
1956 #line 535 "tokenizer.lex"
1957 {/* utf 8 bom */}
1958         YY_BREAK
1959 case 13:
1960 /* rule 13 can match eol */
1961 YY_RULE_SETUP
1962 #line 536 "tokenizer.lex"
1963 {l();}
1964         YY_BREAK
1965 case 14:
1966 YY_RULE_SETUP
1967 #line 538 "tokenizer.lex"
1968 {c(); BEGIN(INITIAL);return handlehex();}
1969         YY_BREAK
1970 case 15:
1971 YY_RULE_SETUP
1972 #line 539 "tokenizer.lex"
1973 {c(); BEGIN(INITIAL);return handlehexfloat();}
1974         YY_BREAK
1975 case 16:
1976 YY_RULE_SETUP
1977 #line 540 "tokenizer.lex"
1978 {c(); BEGIN(INITIAL);return handleint();}
1979         YY_BREAK
1980 case 17:
1981 YY_RULE_SETUP
1982 #line 541 "tokenizer.lex"
1983 {c(); BEGIN(INITIAL);return handlefloat();}
1984         YY_BREAK
1985 case 18:
1986 YY_RULE_SETUP
1987 #line 543 "tokenizer.lex"
1988 {/* for debugging: generates a tokenizer-level error */
1989                               syntaxerror("3rr0r");}
1990         YY_BREAK
1991 case 19:
1992 /* rule 19 can match eol */
1993 *yy_cp = (yy_hold_char); /* undo effects of setting up as3_text */
1994 (yy_c_buf_p) = yy_cp -= 1;
1995 YY_DO_BEFORE_ACTION; /* set up as3_text again */
1996 YY_RULE_SETUP
1997 #line 546 "tokenizer.lex"
1998 {l();handleLabel(as3_text, as3_leng-3);return T_FOR;}
1999         YY_BREAK
2000 case 20:
2001 /* rule 20 can match eol */
2002 *yy_cp = (yy_hold_char); /* undo effects of setting up as3_text */
2003 (yy_c_buf_p) = yy_cp -= 1;
2004 YY_DO_BEFORE_ACTION; /* set up as3_text again */
2005 YY_RULE_SETUP
2006 #line 547 "tokenizer.lex"
2007 {l();handleLabel(as3_text, as3_leng-2);return T_DO;}
2008         YY_BREAK
2009 case 21:
2010 /* rule 21 can match eol */
2011 *yy_cp = (yy_hold_char); /* undo effects of setting up as3_text */
2012 (yy_c_buf_p) = yy_cp -= 1;
2013 YY_DO_BEFORE_ACTION; /* set up as3_text again */
2014 YY_RULE_SETUP
2015 #line 548 "tokenizer.lex"
2016 {l();handleLabel(as3_text, as3_leng-5);return T_WHILE;}
2017         YY_BREAK
2018 case 22:
2019 /* rule 22 can match eol */
2020 *yy_cp = (yy_hold_char); /* undo effects of setting up as3_text */
2021 (yy_c_buf_p) = yy_cp -= 1;
2022 YY_DO_BEFORE_ACTION; /* set up as3_text again */
2023 YY_RULE_SETUP
2024 #line 549 "tokenizer.lex"
2025 {l();handleLabel(as3_text, as3_leng-6);return T_SWITCH;}
2026         YY_BREAK
2027 case 23:
2028 YY_RULE_SETUP
2029 #line 550 "tokenizer.lex"
2030 {c();a3_lval.id="";return T_FOR;}
2031         YY_BREAK
2032 case 24:
2033 YY_RULE_SETUP
2034 #line 551 "tokenizer.lex"
2035 {c();a3_lval.id="";return T_DO;}
2036         YY_BREAK
2037 case 25:
2038 YY_RULE_SETUP
2039 #line 552 "tokenizer.lex"
2040 {c();a3_lval.id="";return T_WHILE;}
2041         YY_BREAK
2042 case 26:
2043 YY_RULE_SETUP
2044 #line 553 "tokenizer.lex"
2045 {c();a3_lval.id="";return T_SWITCH;}
2046         YY_BREAK
2047 case 27:
2048 YY_RULE_SETUP
2049 #line 555 "tokenizer.lex"
2050 {c();BEGIN(REGEXPOK);return m(T_ANDAND);}
2051         YY_BREAK
2052 case 28:
2053 YY_RULE_SETUP
2054 #line 556 "tokenizer.lex"
2055 {c();BEGIN(REGEXPOK);return m(T_OROR);}
2056         YY_BREAK
2057 case 29:
2058 YY_RULE_SETUP
2059 #line 557 "tokenizer.lex"
2060 {c();BEGIN(REGEXPOK);return m(T_NE);}
2061         YY_BREAK
2062 case 30:
2063 YY_RULE_SETUP
2064 #line 558 "tokenizer.lex"
2065 {c();BEGIN(REGEXPOK);return m(T_NEE);}
2066         YY_BREAK
2067 case 31:
2068 YY_RULE_SETUP
2069 #line 559 "tokenizer.lex"
2070 {c();BEGIN(REGEXPOK);return m(T_EQEQEQ);}
2071         YY_BREAK
2072 case 32:
2073 YY_RULE_SETUP
2074 #line 560 "tokenizer.lex"
2075 {c();BEGIN(REGEXPOK);return m(T_EQEQ);}
2076         YY_BREAK
2077 case 33:
2078 YY_RULE_SETUP
2079 #line 561 "tokenizer.lex"
2080 {c();return m(T_GE);}
2081         YY_BREAK
2082 case 34:
2083 YY_RULE_SETUP
2084 #line 562 "tokenizer.lex"
2085 {c();return m(T_LE);}
2086         YY_BREAK
2087 case 35:
2088 YY_RULE_SETUP
2089 #line 563 "tokenizer.lex"
2090 {c();BEGIN(INITIAL);return m(T_MINUSMINUS);}
2091         YY_BREAK
2092 case 36:
2093 YY_RULE_SETUP
2094 #line 564 "tokenizer.lex"
2095 {c();BEGIN(INITIAL);return m(T_PLUSPLUS);}
2096         YY_BREAK
2097 case 37:
2098 YY_RULE_SETUP
2099 #line 565 "tokenizer.lex"
2100 {c();return m(T_PLUSBY);}
2101         YY_BREAK
2102 case 38:
2103 YY_RULE_SETUP
2104 #line 566 "tokenizer.lex"
2105 {c();return m(T_MINUSBY);}
2106         YY_BREAK
2107 case 39:
2108 YY_RULE_SETUP
2109 #line 567 "tokenizer.lex"
2110 {c();return m(T_DIVBY);}
2111         YY_BREAK
2112 case 40:
2113 YY_RULE_SETUP
2114 #line 568 "tokenizer.lex"
2115 {c();return m(T_MODBY);}
2116         YY_BREAK
2117 case 41:
2118 YY_RULE_SETUP
2119 #line 569 "tokenizer.lex"
2120 {c();return m(T_MULBY);}
2121         YY_BREAK
2122 case 42:
2123 YY_RULE_SETUP
2124 #line 570 "tokenizer.lex"
2125 {c();return m(T_ORBY);}
2126         YY_BREAK
2127 case 43:
2128 YY_RULE_SETUP
2129 #line 571 "tokenizer.lex"
2130 {c();return m(T_SHRBY);}
2131         YY_BREAK
2132 case 44:
2133 YY_RULE_SETUP
2134 #line 572 "tokenizer.lex"
2135 {c();return m(T_SHLBY);}
2136         YY_BREAK
2137 case 45:
2138 YY_RULE_SETUP
2139 #line 573 "tokenizer.lex"
2140 {c();return m(T_USHRBY);}
2141         YY_BREAK
2142 case 46:
2143 YY_RULE_SETUP
2144 #line 574 "tokenizer.lex"
2145 {c();return m(T_SHL);}
2146         YY_BREAK
2147 case 47:
2148 YY_RULE_SETUP
2149 #line 575 "tokenizer.lex"
2150 {c();return m(T_USHR);}
2151         YY_BREAK
2152 case 48:
2153 YY_RULE_SETUP
2154 #line 576 "tokenizer.lex"
2155 {c();return m(T_SHR);}
2156         YY_BREAK
2157 case 49:
2158 YY_RULE_SETUP
2159 #line 577 "tokenizer.lex"
2160 {c();return m(T_DOTDOTDOT);}
2161         YY_BREAK
2162 case 50:
2163 YY_RULE_SETUP
2164 #line 578 "tokenizer.lex"
2165 {c();return m(T_DOTDOT);}
2166         YY_BREAK
2167 case 51:
2168 YY_RULE_SETUP
2169 #line 579 "tokenizer.lex"
2170 {c();return m('.');}
2171         YY_BREAK
2172 case 52:
2173 YY_RULE_SETUP
2174 #line 580 "tokenizer.lex"
2175 {c();return m(T_COLONCOLON);}
2176         YY_BREAK
2177 case 53:
2178 YY_RULE_SETUP
2179 #line 581 "tokenizer.lex"
2180 {c();return m(':');}
2181         YY_BREAK
2182 case 54:
2183 YY_RULE_SETUP
2184 #line 582 "tokenizer.lex"
2185 {c();return m(KW_INSTANCEOF);}
2186         YY_BREAK
2187 case 55:
2188 YY_RULE_SETUP
2189 #line 583 "tokenizer.lex"
2190 {c();return m(KW_IMPLEMENTS);}
2191         YY_BREAK
2192 case 56:
2193 YY_RULE_SETUP
2194 #line 584 "tokenizer.lex"
2195 {c();return m(KW_INTERFACE);}
2196         YY_BREAK
2197 case 57:
2198 YY_RULE_SETUP
2199 #line 585 "tokenizer.lex"
2200 {c();return m(KW_NAMESPACE);}
2201         YY_BREAK
2202 case 58:
2203 YY_RULE_SETUP
2204 #line 586 "tokenizer.lex"
2205 {c();return m(KW_PROTECTED);}
2206         YY_BREAK
2207 case 59:
2208 YY_RULE_SETUP
2209 #line 587 "tokenizer.lex"
2210 {c();return m(KW_UNDEFINED);}
2211         YY_BREAK
2212 case 60:
2213 YY_RULE_SETUP
2214 #line 588 "tokenizer.lex"
2215 {c();return m(KW_CONTINUE);}
2216         YY_BREAK
2217 case 61:
2218 YY_RULE_SETUP
2219 #line 589 "tokenizer.lex"
2220 {c();return m(KW_OVERRIDE);}
2221         YY_BREAK
2222 case 62:
2223 YY_RULE_SETUP
2224 #line 590 "tokenizer.lex"
2225 {c();return m(KW_INTERNAL);}
2226         YY_BREAK
2227 case 63:
2228 YY_RULE_SETUP
2229 #line 591 "tokenizer.lex"
2230 {c();return m(KW_FUNCTION);}
2231         YY_BREAK
2232 case 64:
2233 YY_RULE_SETUP
2234 #line 592 "tokenizer.lex"
2235 {c();return m(KW_FINALLY);}
2236         YY_BREAK
2237 case 65:
2238 YY_RULE_SETUP
2239 #line 593 "tokenizer.lex"
2240 {c();return m(KW_DEFAULT);}
2241         YY_BREAK
2242 case 66:
2243 YY_RULE_SETUP
2244 #line 594 "tokenizer.lex"
2245 {c();return m(KW_PACKAGE);}
2246         YY_BREAK
2247 case 67:
2248 YY_RULE_SETUP
2249 #line 595 "tokenizer.lex"
2250 {c();return m(KW_PRIVATE);}
2251         YY_BREAK
2252 case 68:
2253 YY_RULE_SETUP
2254 #line 596 "tokenizer.lex"
2255 {c();return m(KW_DYNAMIC);}
2256         YY_BREAK
2257 case 69:
2258 YY_RULE_SETUP
2259 #line 597 "tokenizer.lex"
2260 {c();return m(KW_EXTENDS);}
2261         YY_BREAK
2262 case 70:
2263 YY_RULE_SETUP
2264 #line 598 "tokenizer.lex"
2265 {c();return m(KW_DELETE);}
2266         YY_BREAK
2267 case 71:
2268 YY_RULE_SETUP
2269 #line 599 "tokenizer.lex"
2270 {c();return m(KW_RETURN);}
2271         YY_BREAK
2272 case 72:
2273 YY_RULE_SETUP
2274 #line 600 "tokenizer.lex"
2275 {c();return m(KW_PUBLIC);}
2276         YY_BREAK
2277 case 73:
2278 YY_RULE_SETUP
2279 #line 601 "tokenizer.lex"
2280 {c();return m(KW_NATIVE);}
2281         YY_BREAK
2282 case 74:
2283 YY_RULE_SETUP
2284 #line 602 "tokenizer.lex"
2285 {c();return m(KW_STATIC);}
2286         YY_BREAK
2287 case 75:
2288 YY_RULE_SETUP
2289 #line 603 "tokenizer.lex"
2290 {c();return m(KW_IMPORT);}
2291         YY_BREAK
2292 case 76:
2293 YY_RULE_SETUP
2294 #line 604 "tokenizer.lex"
2295 {c();return m(KW_TYPEOF);}
2296         YY_BREAK
2297 case 77:
2298 YY_RULE_SETUP
2299 #line 605 "tokenizer.lex"
2300 {c();return m(KW_THROW);}
2301         YY_BREAK
2302 case 78:
2303 YY_RULE_SETUP
2304 #line 606 "tokenizer.lex"
2305 {c();return m(KW_CLASS);}
2306         YY_BREAK
2307 case 79:
2308 YY_RULE_SETUP
2309 #line 607 "tokenizer.lex"
2310 {c();return m(KW_CONST);}
2311         YY_BREAK
2312 case 80:
2313 YY_RULE_SETUP
2314 #line 608 "tokenizer.lex"
2315 {c();return m(KW_CATCH);}
2316         YY_BREAK
2317 case 81:
2318 YY_RULE_SETUP
2319 #line 609 "tokenizer.lex"
2320 {c();return m(KW_FINAL);}
2321         YY_BREAK
2322 case 82:
2323 YY_RULE_SETUP
2324 #line 610 "tokenizer.lex"
2325 {c();return m(KW_FALSE);}
2326         YY_BREAK
2327 case 83:
2328 YY_RULE_SETUP
2329 #line 611 "tokenizer.lex"
2330 {c();return m(KW_BREAK);}
2331         YY_BREAK
2332 case 84:
2333 YY_RULE_SETUP
2334 #line 612 "tokenizer.lex"
2335 {c();return m(KW_SUPER);}
2336         YY_BREAK
2337 case 85:
2338 YY_RULE_SETUP
2339 #line 613 "tokenizer.lex"
2340 {c();return m(KW_EACH);}
2341         YY_BREAK
2342 case 86:
2343 YY_RULE_SETUP
2344 #line 614 "tokenizer.lex"
2345 {c();return m(KW_VOID);}
2346         YY_BREAK
2347 case 87:
2348 YY_RULE_SETUP
2349 #line 615 "tokenizer.lex"
2350 {c();return m(KW_TRUE);}
2351         YY_BREAK
2352 case 88:
2353 YY_RULE_SETUP
2354 #line 616 "tokenizer.lex"
2355 {c();return m(KW_NULL);}
2356         YY_BREAK
2357 case 89:
2358 YY_RULE_SETUP
2359 #line 617 "tokenizer.lex"
2360 {c();return m(KW_ELSE);}
2361         YY_BREAK
2362 case 90:
2363 YY_RULE_SETUP
2364 #line 618 "tokenizer.lex"
2365 {c();return m(KW_CASE);}
2366         YY_BREAK
2367 case 91:
2368 YY_RULE_SETUP
2369 #line 619 "tokenizer.lex"
2370 {c();return m(KW_WITH);}
2371         YY_BREAK
2372 case 92:
2373 YY_RULE_SETUP
2374 #line 620 "tokenizer.lex"
2375 {c();return m(KW_USE);}
2376         YY_BREAK
2377 case 93:
2378 YY_RULE_SETUP
2379 #line 621 "tokenizer.lex"
2380 {c();return m(KW_NEW);}
2381         YY_BREAK
2382 case 94:
2383 YY_RULE_SETUP
2384 #line 622 "tokenizer.lex"
2385 {c();return m(KW_GET);}
2386         YY_BREAK
2387 case 95:
2388 YY_RULE_SETUP
2389 #line 623 "tokenizer.lex"
2390 {c();return m(KW_SET);}
2391         YY_BREAK
2392 case 96:
2393 YY_RULE_SETUP
2394 #line 624 "tokenizer.lex"
2395 {c();return m(KW_VAR);}
2396         YY_BREAK
2397 case 97:
2398 YY_RULE_SETUP
2399 #line 625 "tokenizer.lex"
2400 {c();return m(KW_TRY);}
2401         YY_BREAK
2402 case 98:
2403 YY_RULE_SETUP
2404 #line 626 "tokenizer.lex"
2405 {c();return m(KW_IS) ;}
2406         YY_BREAK
2407 case 99:
2408 YY_RULE_SETUP
2409 #line 627 "tokenizer.lex"
2410 {c();return m(KW_IN) ;}
2411         YY_BREAK
2412 case 100:
2413 YY_RULE_SETUP
2414 #line 628 "tokenizer.lex"
2415 {c();return m(KW_IF) ;}
2416         YY_BREAK
2417 case 101:
2418 YY_RULE_SETUP
2419 #line 629 "tokenizer.lex"
2420 {c();return m(KW_AS);}
2421         YY_BREAK
2422 case 102:
2423 YY_RULE_SETUP
2424 #line 630 "tokenizer.lex"
2425 {c();BEGIN(INITIAL);return mkid(T_IDENTIFIER);}
2426         YY_BREAK
2427 case 103:
2428 YY_RULE_SETUP
2429 #line 632 "tokenizer.lex"
2430 {c();BEGIN(REGEXPOK);return m(as3_text[0]);}
2431         YY_BREAK
2432 case 104:
2433 YY_RULE_SETUP
2434 #line 633 "tokenizer.lex"
2435 {c();BEGIN(INITIAL);return m(as3_text[0]);}
2436         YY_BREAK
2437 case 105:
2438 YY_RULE_SETUP
2439 #line 635 "tokenizer.lex"
2440 {/* ERROR */
2441                               char c1=as3_text[0];
2442                               char buf[128];
2443                               buf[0] = as3_text[0];
2444                               int t;
2445                               for(t=1;t<128;t++) {
2446                                   char c = buf[t]=input();
2447                                   if(c=='\n' || c==EOF)  {
2448                                       buf[t] = 0;
2449                                       break;
2450                                   }
2451                               }
2452                               if(c1>='0' && c1<='9')
2453                                   syntaxerror("syntax error: %s (identifiers must not start with a digit)");
2454                               else
2455                                   syntaxerror("syntax error: %s", buf);
2456                               printf("\n");
2457                               exit(1);
2458                               yyterminate();
2459                              }
2460         YY_BREAK
2461 case YY_STATE_EOF(INITIAL):
2462 case YY_STATE_EOF(REGEXPOK):
2463 case YY_STATE_EOF(BEGINNING):
2464 #line 655 "tokenizer.lex"
2465 {l();
2466                               void*b = leave_file();
2467                               if (!b) {
2468                                  yyterminate();
2469                                  as3__delete_buffer(YY_CURRENT_BUFFER);
2470                                  return m(T_EOF);
2471                               } else {
2472                                   as3__delete_buffer(YY_CURRENT_BUFFER);
2473                                   as3__switch_to_buffer(b);
2474                               }
2475                              }
2476         YY_BREAK
2477 case 106:
2478 YY_RULE_SETUP
2479 #line 667 "tokenizer.lex"
2480 ECHO;
2481         YY_BREAK
2482 #line 2483 "tokenizer.yy.c"
2483
2484         case YY_END_OF_BUFFER:
2485                 {
2486                 /* Amount of text matched not including the EOB char. */
2487                 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
2488
2489                 /* Undo the effects of YY_DO_BEFORE_ACTION. */
2490                 *yy_cp = (yy_hold_char);
2491                 YY_RESTORE_YY_MORE_OFFSET
2492
2493                 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
2494                         {
2495                         /* We're scanning a new file or input source.  It's
2496                          * possible that this happened because the user
2497                          * just pointed as3_in at a new source and called
2498                          * as3_lex().  If so, then we have to assure
2499                          * consistency between YY_CURRENT_BUFFER and our
2500                          * globals.  Here is the right place to do so, because
2501                          * this is the first action (other than possibly a
2502                          * back-up) that will match for the new input source.
2503                          */
2504                         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2505                         YY_CURRENT_BUFFER_LVALUE->yy_input_file = as3_in;
2506                         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
2507                         }
2508
2509                 /* Note that here we test for yy_c_buf_p "<=" to the position
2510                  * of the first EOB in the buffer, since yy_c_buf_p will
2511                  * already have been incremented past the NUL character
2512                  * (since all states make transitions on EOB to the
2513                  * end-of-buffer state).  Contrast this with the test
2514                  * in input().
2515                  */
2516                 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2517                         { /* This was really a NUL. */
2518                         yy_state_type yy_next_state;
2519
2520                         (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
2521
2522                         yy_current_state = yy_get_previous_state(  );
2523
2524                         /* Okay, we're now positioned to make the NUL
2525                          * transition.  We couldn't have
2526                          * yy_get_previous_state() go ahead and do it
2527                          * for us because it doesn't know how to deal
2528                          * with the possibility of jamming (and we don't
2529                          * want to build jamming into it because then it
2530                          * will run more slowly).
2531                          */
2532
2533                         yy_next_state = yy_try_NUL_trans( yy_current_state );
2534
2535                         yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2536
2537                         if ( yy_next_state )
2538                                 {
2539                                 /* Consume the NUL. */
2540                                 yy_cp = ++(yy_c_buf_p);
2541                                 yy_current_state = yy_next_state;
2542                                 goto yy_match;
2543                                 }
2544
2545                         else
2546                                 {
2547                                 yy_cp = (yy_last_accepting_cpos);
2548                                 yy_current_state = (yy_last_accepting_state);
2549                                 goto yy_find_action;
2550                                 }
2551                         }
2552
2553                 else switch ( yy_get_next_buffer(  ) )
2554                         {
2555                         case EOB_ACT_END_OF_FILE:
2556                                 {
2557                                 (yy_did_buffer_switch_on_eof) = 0;
2558
2559                                 if ( as3_wrap( ) )
2560                                         {
2561                                         /* Note: because we've taken care in
2562                                          * yy_get_next_buffer() to have set up
2563                                          * as3_text, we can now set up
2564                                          * yy_c_buf_p so that if some total
2565                                          * hoser (like flex itself) wants to
2566                                          * call the scanner after we return the
2567                                          * YY_NULL, it'll still work - another
2568                                          * YY_NULL will get returned.
2569                                          */
2570                                         (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
2571
2572                                         yy_act = YY_STATE_EOF(YY_START);
2573                                         goto do_action;
2574                                         }
2575
2576                                 else
2577                                         {
2578                                         if ( ! (yy_did_buffer_switch_on_eof) )
2579                                                 YY_NEW_FILE;
2580                                         }
2581                                 break;
2582                                 }
2583
2584                         case EOB_ACT_CONTINUE_SCAN:
2585                                 (yy_c_buf_p) =
2586                                         (yytext_ptr) + yy_amount_of_matched_text;
2587
2588                                 yy_current_state = yy_get_previous_state(  );
2589
2590                                 yy_cp = (yy_c_buf_p);
2591                                 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2592                                 goto yy_match;
2593
2594                         case EOB_ACT_LAST_MATCH:
2595                                 (yy_c_buf_p) =
2596                                 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
2597
2598                                 yy_current_state = yy_get_previous_state(  );
2599
2600                                 yy_cp = (yy_c_buf_p);
2601                                 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2602                                 goto yy_find_action;
2603                         }
2604                 break;
2605                 }
2606
2607         default:
2608                 YY_FATAL_ERROR(
2609                         "fatal flex scanner internal error--no action found" );
2610         } /* end of action switch */
2611                 } /* end of scanning one token */
2612 } /* end of as3_lex */
2613
2614 /* yy_get_next_buffer - try to read in a new buffer
2615  *
2616  * Returns a code representing an action:
2617  *      EOB_ACT_LAST_MATCH -
2618  *      EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2619  *      EOB_ACT_END_OF_FILE - end of file
2620  */
2621 static int yy_get_next_buffer (void)
2622 {
2623         register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
2624         register char *source = (yytext_ptr);
2625         register int number_to_move, i;
2626         int ret_val;
2627
2628         if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
2629                 YY_FATAL_ERROR(
2630                 "fatal flex scanner internal error--end of buffer missed" );
2631
2632         if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
2633                 { /* Don't try to fill the buffer, so this is an EOF. */
2634                 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
2635                         {
2636                         /* We matched a single character, the EOB, so
2637                          * treat this as a final EOF.
2638                          */
2639                         return EOB_ACT_END_OF_FILE;
2640                         }
2641
2642                 else
2643                         {
2644                         /* We matched some text prior to the EOB, first
2645                          * process it.
2646                          */
2647                         return EOB_ACT_LAST_MATCH;
2648                         }
2649                 }
2650
2651         /* Try to read more data. */
2652
2653         /* First move last chars to start of buffer. */
2654         number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
2655
2656         for ( i = 0; i < number_to_move; ++i )
2657                 *(dest++) = *(source++);
2658
2659         if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2660                 /* don't do the read, it's not guaranteed to return an EOF,
2661                  * just force an EOF
2662                  */
2663                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
2664
2665         else
2666                 {
2667                         int num_to_read =
2668                         YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
2669
2670                 while ( num_to_read <= 0 )
2671                         { /* Not enough room in the buffer - grow it. */
2672
2673                         /* just a shorter name for the current buffer */
2674                         YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
2675
2676                         int yy_c_buf_p_offset =
2677                                 (int) ((yy_c_buf_p) - b->yy_ch_buf);
2678
2679                         if ( b->yy_is_our_buffer )
2680                                 {
2681                                 int new_size = b->yy_buf_size * 2;
2682
2683                                 if ( new_size <= 0 )
2684                                         b->yy_buf_size += b->yy_buf_size / 8;
2685                                 else
2686                                         b->yy_buf_size *= 2;
2687
2688                                 b->yy_ch_buf = (char *)
2689                                         /* Include room in for 2 EOB chars. */
2690                                         as3_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  );
2691                                 }
2692                         else
2693                                 /* Can't grow it, we don't own it. */
2694                                 b->yy_ch_buf = 0;
2695
2696                         if ( ! b->yy_ch_buf )
2697                                 YY_FATAL_ERROR(
2698                                 "fatal error - scanner input buffer overflow" );
2699
2700                         (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
2701
2702                         num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
2703                                                 number_to_move - 1;
2704
2705                         }
2706
2707                 if ( num_to_read > YY_READ_BUF_SIZE )
2708                         num_to_read = YY_READ_BUF_SIZE;
2709
2710                 /* Read in more data. */
2711                 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2712                         (yy_n_chars), (size_t) num_to_read );
2713
2714                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2715                 }
2716
2717         if ( (yy_n_chars) == 0 )
2718                 {
2719                 if ( number_to_move == YY_MORE_ADJ )
2720                         {
2721                         ret_val = EOB_ACT_END_OF_FILE;
2722                         as3_restart(as3_in  );
2723                         }
2724
2725                 else
2726                         {
2727                         ret_val = EOB_ACT_LAST_MATCH;
2728                         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
2729                                 YY_BUFFER_EOF_PENDING;
2730                         }
2731                 }
2732
2733         else
2734                 ret_val = EOB_ACT_CONTINUE_SCAN;
2735
2736         if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
2737                 /* Extend the array by 50%, plus the number we really need. */
2738                 yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
2739                 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) as3_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size  );
2740                 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2741                         YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
2742         }
2743
2744         (yy_n_chars) += number_to_move;
2745         YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
2746         YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
2747
2748         (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
2749
2750         return ret_val;
2751 }
2752
2753 /* yy_get_previous_state - get the state just before the EOB char was reached */
2754
2755     static yy_state_type yy_get_previous_state (void)
2756 {
2757         register yy_state_type yy_current_state;
2758         register char *yy_cp;
2759     
2760         yy_current_state = (yy_start);
2761         yy_current_state += YY_AT_BOL();
2762
2763         for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
2764                 {
2765                 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2766                 if ( yy_accept[yy_current_state] )
2767                         {
2768                         (yy_last_accepting_state) = yy_current_state;
2769                         (yy_last_accepting_cpos) = yy_cp;
2770                         }
2771                 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2772                         {
2773                         yy_current_state = (int) yy_def[yy_current_state];
2774                         if ( yy_current_state >= 468 )
2775                                 yy_c = yy_meta[(unsigned int) yy_c];
2776                         }
2777                 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2778                 }
2779
2780         return yy_current_state;
2781 }
2782
2783 /* yy_try_NUL_trans - try to make a transition on the NUL character
2784  *
2785  * synopsis
2786  *      next_state = yy_try_NUL_trans( current_state );
2787  */
2788     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
2789 {
2790         register int yy_is_jam;
2791         register char *yy_cp = (yy_c_buf_p);
2792
2793         register YY_CHAR yy_c = 1;
2794         if ( yy_accept[yy_current_state] )
2795                 {
2796                 (yy_last_accepting_state) = yy_current_state;
2797                 (yy_last_accepting_cpos) = yy_cp;
2798                 }
2799         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2800                 {
2801                 yy_current_state = (int) yy_def[yy_current_state];
2802                 if ( yy_current_state >= 468 )
2803                         yy_c = yy_meta[(unsigned int) yy_c];
2804                 }
2805         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2806         yy_is_jam = (yy_current_state == 467);
2807
2808         return yy_is_jam ? 0 : yy_current_state;
2809 }
2810
2811     static void yyunput (int c, register char * yy_bp )
2812 {
2813         register char *yy_cp;
2814     
2815     yy_cp = (yy_c_buf_p);
2816
2817         /* undo effects of setting up as3_text */
2818         *yy_cp = (yy_hold_char);
2819
2820         if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2821                 { /* need to shift things up to make room */
2822                 /* +2 for EOB chars. */
2823                 register int number_to_move = (yy_n_chars) + 2;
2824                 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
2825                                         YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
2826                 register char *source =
2827                                 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
2828
2829                 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2830                         *--dest = *--source;
2831
2832                 yy_cp += (int) (dest - source);
2833                 yy_bp += (int) (dest - source);
2834                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
2835                         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
2836
2837                 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2838                         YY_FATAL_ERROR( "flex scanner push-back overflow" );
2839                 }
2840
2841         *--yy_cp = (char) c;
2842
2843         (yytext_ptr) = yy_bp;
2844         (yy_hold_char) = *yy_cp;
2845         (yy_c_buf_p) = yy_cp;
2846 }
2847
2848 #ifndef YY_NO_INPUT
2849 #ifdef __cplusplus
2850     static int yyinput (void)
2851 #else
2852     static int input  (void)
2853 #endif
2854
2855 {
2856         int c;
2857     
2858         *(yy_c_buf_p) = (yy_hold_char);
2859
2860         if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
2861                 {
2862                 /* yy_c_buf_p now points to the character we want to return.
2863                  * If this occurs *before* the EOB characters, then it's a
2864                  * valid NUL; if not, then we've hit the end of the buffer.
2865                  */
2866                 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2867                         /* This was really a NUL. */
2868                         *(yy_c_buf_p) = '\0';
2869
2870                 else
2871                         { /* need more input */
2872                         int offset = (yy_c_buf_p) - (yytext_ptr);
2873                         ++(yy_c_buf_p);
2874
2875                         switch ( yy_get_next_buffer(  ) )
2876                                 {
2877                                 case EOB_ACT_LAST_MATCH:
2878                                         /* This happens because yy_g_n_b()
2879                                          * sees that we've accumulated a
2880                                          * token and flags that we need to
2881                                          * try matching the token before
2882                                          * proceeding.  But for input(),
2883                                          * there's no matching to consider.
2884                                          * So convert the EOB_ACT_LAST_MATCH
2885                                          * to EOB_ACT_END_OF_FILE.
2886                                          */
2887
2888                                         /* Reset buffer status. */
2889                                         as3_restart(as3_in );
2890
2891                                         /*FALLTHROUGH*/
2892
2893                                 case EOB_ACT_END_OF_FILE:
2894                                         {
2895                                         if ( as3_wrap( ) )
2896                                                 return EOF;
2897
2898                                         if ( ! (yy_did_buffer_switch_on_eof) )
2899                                                 YY_NEW_FILE;
2900 #ifdef __cplusplus
2901                                         return yyinput();
2902 #else
2903                                         return input();
2904 #endif
2905                                         }
2906
2907                                 case EOB_ACT_CONTINUE_SCAN:
2908                                         (yy_c_buf_p) = (yytext_ptr) + offset;
2909                                         break;
2910                                 }
2911                         }
2912                 }
2913
2914         c = *(unsigned char *) (yy_c_buf_p);    /* cast for 8-bit char's */
2915         *(yy_c_buf_p) = '\0';   /* preserve as3_text */
2916         (yy_hold_char) = *++(yy_c_buf_p);
2917
2918         YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
2919
2920         return c;
2921 }
2922 #endif  /* ifndef YY_NO_INPUT */
2923
2924 /** Immediately switch to a different input stream.
2925  * @param input_file A readable stream.
2926  * 
2927  * @note This function does not reset the start condition to @c INITIAL .
2928  */
2929     void as3_restart  (FILE * input_file )
2930 {
2931     
2932         if ( ! YY_CURRENT_BUFFER ){
2933         as3_ensure_buffer_stack ();
2934                 YY_CURRENT_BUFFER_LVALUE =
2935             as3__create_buffer(as3_in,YY_BUF_SIZE );
2936         }
2937
2938         as3__init_buffer(YY_CURRENT_BUFFER,input_file );
2939         as3__load_buffer_state( );
2940 }
2941
2942 /** Switch to a different input buffer.
2943  * @param new_buffer The new input buffer.
2944  * 
2945  */
2946     void as3__switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
2947 {
2948     
2949         /* TODO. We should be able to replace this entire function body
2950          * with
2951          *              as3_pop_buffer_state();
2952          *              as3_push_buffer_state(new_buffer);
2953      */
2954         as3_ensure_buffer_stack ();
2955         if ( YY_CURRENT_BUFFER == new_buffer )
2956                 return;
2957
2958         if ( YY_CURRENT_BUFFER )
2959                 {
2960                 /* Flush out information for old buffer. */
2961                 *(yy_c_buf_p) = (yy_hold_char);
2962                 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2963                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2964                 }
2965
2966         YY_CURRENT_BUFFER_LVALUE = new_buffer;
2967         as3__load_buffer_state( );
2968
2969         /* We don't actually know whether we did this switch during
2970          * EOF (as3_wrap()) processing, but the only time this flag
2971          * is looked at is after as3_wrap() is called, so it's safe
2972          * to go ahead and always set it.
2973          */
2974         (yy_did_buffer_switch_on_eof) = 1;
2975 }
2976
2977 static void as3__load_buffer_state  (void)
2978 {
2979         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2980         (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2981         as3_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2982         (yy_hold_char) = *(yy_c_buf_p);
2983 }
2984
2985 /** Allocate and initialize an input buffer state.
2986  * @param file A readable stream.
2987  * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2988  * 
2989  * @return the allocated buffer state.
2990  */
2991     YY_BUFFER_STATE as3__create_buffer  (FILE * file, int  size )
2992 {
2993         YY_BUFFER_STATE b;
2994     
2995         b = (YY_BUFFER_STATE) as3_alloc(sizeof( struct yy_buffer_state )  );
2996         if ( ! b )
2997                 YY_FATAL_ERROR( "out of dynamic memory in as3__create_buffer()" );
2998
2999         b->yy_buf_size = size;
3000
3001         /* yy_ch_buf has to be 2 characters longer than the size given because
3002          * we need to put in 2 end-of-buffer characters.
3003          */
3004         b->yy_ch_buf = (char *) as3_alloc(b->yy_buf_size + 2  );
3005         if ( ! b->yy_ch_buf )
3006                 YY_FATAL_ERROR( "out of dynamic memory in as3__create_buffer()" );
3007
3008         b->yy_is_our_buffer = 1;
3009
3010         as3__init_buffer(b,file );
3011
3012         return b;
3013 }
3014
3015 /** Destroy the buffer.
3016  * @param b a buffer created with as3__create_buffer()
3017  * 
3018  */
3019     void as3__delete_buffer (YY_BUFFER_STATE  b )
3020 {
3021     
3022         if ( ! b )
3023                 return;
3024
3025         if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
3026                 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
3027
3028         if ( b->yy_is_our_buffer )
3029                 as3_free((void *) b->yy_ch_buf  );
3030
3031         as3_free((void *) b  );
3032 }
3033
3034 #ifndef _UNISTD_H /* assume unistd.h has isatty() for us */
3035 #ifdef __cplusplus
3036 extern "C" {
3037 #endif
3038 #ifdef __THROW /* this is a gnuism */
3039 extern int isatty (int ) __THROW;
3040 #else
3041 extern int isatty (int );
3042 #endif
3043 #ifdef __cplusplus
3044 }
3045 #endif
3046 #endif
3047     
3048 /* Initializes or reinitializes a buffer.
3049  * This function is sometimes called more than once on the same buffer,
3050  * such as during a as3_restart() or at EOF.
3051  */
3052     static void as3__init_buffer  (YY_BUFFER_STATE  b, FILE * file )
3053
3054 {
3055         int oerrno = errno;
3056     
3057         as3__flush_buffer(b );
3058
3059         b->yy_input_file = file;
3060         b->yy_fill_buffer = 1;
3061
3062     /* If b is the current buffer, then as3__init_buffer was _probably_
3063      * called from as3_restart() or through yy_get_next_buffer.
3064      * In that case, we don't want to reset the lineno or column.
3065      */
3066     if (b != YY_CURRENT_BUFFER){
3067         b->yy_bs_lineno = 1;
3068         b->yy_bs_column = 0;
3069     }
3070
3071         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
3072     
3073         errno = oerrno;
3074 }
3075
3076 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
3077  * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
3078  * 
3079  */
3080     void as3__flush_buffer (YY_BUFFER_STATE  b )
3081 {
3082         if ( ! b )
3083                 return;
3084
3085         b->yy_n_chars = 0;
3086
3087         /* We always need two end-of-buffer characters.  The first causes
3088          * a transition to the end-of-buffer state.  The second causes
3089          * a jam in that state.
3090          */
3091         b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
3092         b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
3093
3094         b->yy_buf_pos = &b->yy_ch_buf[0];
3095
3096         b->yy_at_bol = 1;
3097         b->yy_buffer_status = YY_BUFFER_NEW;
3098
3099         if ( b == YY_CURRENT_BUFFER )
3100                 as3__load_buffer_state( );
3101 }
3102
3103 /** Pushes the new state onto the stack. The new state becomes
3104  *  the current state. This function will allocate the stack
3105  *  if necessary.
3106  *  @param new_buffer The new state.
3107  *  
3108  */
3109 void as3_push_buffer_state (YY_BUFFER_STATE new_buffer )
3110 {
3111         if (new_buffer == NULL)
3112                 return;
3113
3114         as3_ensure_buffer_stack();
3115
3116         /* This block is copied from as3__switch_to_buffer. */
3117         if ( YY_CURRENT_BUFFER )
3118                 {
3119                 /* Flush out information for old buffer. */
3120                 *(yy_c_buf_p) = (yy_hold_char);
3121                 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
3122                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
3123                 }
3124
3125         /* Only push if top exists. Otherwise, replace top. */
3126         if (YY_CURRENT_BUFFER)
3127                 (yy_buffer_stack_top)++;
3128         YY_CURRENT_BUFFER_LVALUE = new_buffer;
3129
3130         /* copied from as3__switch_to_buffer. */
3131         as3__load_buffer_state( );
3132         (yy_did_buffer_switch_on_eof) = 1;
3133 }
3134
3135 /** Removes and deletes the top of the stack, if present.
3136  *  The next element becomes the new top.
3137  *  
3138  */
3139 void as3_pop_buffer_state (void)
3140 {
3141         if (!YY_CURRENT_BUFFER)
3142                 return;
3143
3144         as3__delete_buffer(YY_CURRENT_BUFFER );
3145         YY_CURRENT_BUFFER_LVALUE = NULL;
3146         if ((yy_buffer_stack_top) > 0)
3147                 --(yy_buffer_stack_top);
3148
3149         if (YY_CURRENT_BUFFER) {
3150                 as3__load_buffer_state( );
3151                 (yy_did_buffer_switch_on_eof) = 1;
3152         }
3153 }
3154
3155 /* Allocates the stack if it does not exist.
3156  *  Guarantees space for at least one push.
3157  */
3158 static void as3_ensure_buffer_stack (void)
3159 {
3160         int num_to_alloc;
3161     
3162         if (!(yy_buffer_stack)) {
3163
3164                 /* First allocation is just for 2 elements, since we don't know if this
3165                  * scanner will even need a stack. We use 2 instead of 1 to avoid an
3166                  * immediate realloc on the next call.
3167          */
3168                 num_to_alloc = 1;
3169                 (yy_buffer_stack) = (struct yy_buffer_state**)as3_alloc
3170                                                                 (num_to_alloc * sizeof(struct yy_buffer_state*)
3171                                                                 );
3172                 if ( ! (yy_buffer_stack) )
3173                         YY_FATAL_ERROR( "out of dynamic memory in as3_ensure_buffer_stack()" );
3174                                                                   
3175                 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
3176                                 
3177                 (yy_buffer_stack_max) = num_to_alloc;
3178                 (yy_buffer_stack_top) = 0;
3179                 return;
3180         }
3181
3182         if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
3183
3184                 /* Increase the buffer to prepare for a possible push. */
3185                 int grow_size = 8 /* arbitrary grow size */;
3186
3187                 num_to_alloc = (yy_buffer_stack_max) + grow_size;
3188                 (yy_buffer_stack) = (struct yy_buffer_state**)as3_realloc
3189                                                                 ((yy_buffer_stack),
3190                                                                 num_to_alloc * sizeof(struct yy_buffer_state*)
3191                                                                 );
3192                 if ( ! (yy_buffer_stack) )
3193                         YY_FATAL_ERROR( "out of dynamic memory in as3_ensure_buffer_stack()" );
3194
3195                 /* zero only the new slots.*/
3196                 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
3197                 (yy_buffer_stack_max) = num_to_alloc;
3198         }
3199 }
3200
3201 /** Setup the input buffer state to scan directly from a user-specified character buffer.
3202  * @param base the character buffer
3203  * @param size the size in bytes of the character buffer
3204  * 
3205  * @return the newly allocated buffer state object. 
3206  */
3207 YY_BUFFER_STATE as3__scan_buffer  (char * base, yy_size_t  size )
3208 {
3209         YY_BUFFER_STATE b;
3210     
3211         if ( size < 2 ||
3212              base[size-2] != YY_END_OF_BUFFER_CHAR ||
3213              base[size-1] != YY_END_OF_BUFFER_CHAR )
3214                 /* They forgot to leave room for the EOB's. */
3215                 return 0;
3216
3217         b = (YY_BUFFER_STATE) as3_alloc(sizeof( struct yy_buffer_state )  );
3218         if ( ! b )
3219                 YY_FATAL_ERROR( "out of dynamic memory in as3__scan_buffer()" );
3220
3221         b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
3222         b->yy_buf_pos = b->yy_ch_buf = base;
3223         b->yy_is_our_buffer = 0;
3224         b->yy_input_file = 0;
3225         b->yy_n_chars = b->yy_buf_size;
3226         b->yy_is_interactive = 0;
3227         b->yy_at_bol = 1;
3228         b->yy_fill_buffer = 0;
3229         b->yy_buffer_status = YY_BUFFER_NEW;
3230
3231         as3__switch_to_buffer(b  );
3232
3233         return b;
3234 }
3235
3236 /** Setup the input buffer state to scan a string. The next call to as3_lex() will
3237  * scan from a @e copy of @a str.
3238  * @param yystr a NUL-terminated string to scan
3239  * 
3240  * @return the newly allocated buffer state object.
3241  * @note If you want to scan bytes that may contain NUL values, then use
3242  *       as3__scan_bytes() instead.
3243  */
3244 YY_BUFFER_STATE as3__scan_string (yyconst char * yystr )
3245 {
3246     
3247         return as3__scan_bytes(yystr,strlen(yystr) );
3248 }
3249
3250 /** Setup the input buffer state to scan the given bytes. The next call to as3_lex() will
3251  * scan from a @e copy of @a bytes.
3252  * @param bytes the byte buffer to scan
3253  * @param len the number of bytes in the buffer pointed to by @a bytes.
3254  * 
3255  * @return the newly allocated buffer state object.
3256  */
3257 YY_BUFFER_STATE as3__scan_bytes  (yyconst char * yybytes, int  _yybytes_len )
3258 {
3259         YY_BUFFER_STATE b;
3260         char *buf;
3261         yy_size_t n;
3262         int i;
3263     
3264         /* Get memory for full buffer, including space for trailing EOB's. */
3265         n = _yybytes_len + 2;
3266         buf = (char *) as3_alloc(n  );
3267         if ( ! buf )
3268                 YY_FATAL_ERROR( "out of dynamic memory in as3__scan_bytes()" );
3269
3270         for ( i = 0; i < _yybytes_len; ++i )
3271                 buf[i] = yybytes[i];
3272
3273         buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
3274
3275         b = as3__scan_buffer(buf,n );
3276         if ( ! b )
3277                 YY_FATAL_ERROR( "bad buffer in as3__scan_bytes()" );
3278
3279         /* It's okay to grow etc. this buffer, and we should throw it
3280          * away when we're done.
3281          */
3282         b->yy_is_our_buffer = 1;
3283
3284         return b;
3285 }
3286
3287 #ifndef YY_EXIT_FAILURE
3288 #define YY_EXIT_FAILURE 2
3289 #endif
3290
3291 static void yy_fatal_error (yyconst char* msg )
3292 {
3293         (void) fprintf( stderr, "%s\n", msg );
3294         exit( YY_EXIT_FAILURE );
3295 }
3296
3297 /* Redefine yyless() so it works in section 3 code. */
3298
3299 #undef yyless
3300 #define yyless(n) \
3301         do \
3302                 { \
3303                 /* Undo effects of setting up as3_text. */ \
3304         int yyless_macro_arg = (n); \
3305         YY_LESS_LINENO(yyless_macro_arg);\
3306                 as3_text[as3_leng] = (yy_hold_char); \
3307                 (yy_c_buf_p) = as3_text + yyless_macro_arg; \
3308                 (yy_hold_char) = *(yy_c_buf_p); \
3309                 *(yy_c_buf_p) = '\0'; \
3310                 as3_leng = yyless_macro_arg; \
3311                 } \
3312         while ( 0 )
3313
3314 /* Accessor  methods (get/set functions) to struct members. */
3315
3316 /** Get the current line number.
3317  * 
3318  */
3319 int as3_get_lineno  (void)
3320 {
3321         
3322     return as3_lineno;
3323 }
3324
3325 /** Get the input stream.
3326  * 
3327  */
3328 FILE *as3_get_in  (void)
3329 {
3330         return as3_in;
3331 }
3332
3333 /** Get the output stream.
3334  * 
3335  */
3336 FILE *as3_get_out  (void)
3337 {
3338         return as3_out;
3339 }
3340
3341 /** Get the length of the current token.
3342  * 
3343  */
3344 int as3_get_leng  (void)
3345 {
3346         return as3_leng;
3347 }
3348
3349 /** Get the current token.
3350  * 
3351  */
3352
3353 char *as3_get_text  (void)
3354 {
3355         return as3_text;
3356 }
3357
3358 /** Set the current line number.
3359  * @param line_number
3360  * 
3361  */
3362 void as3_set_lineno (int  line_number )
3363 {
3364     
3365     as3_lineno = line_number;
3366 }
3367
3368 /** Set the input stream. This does not discard the current
3369  * input buffer.
3370  * @param in_str A readable stream.
3371  * 
3372  * @see as3__switch_to_buffer
3373  */
3374 void as3_set_in (FILE *  in_str )
3375 {
3376         as3_in = in_str ;
3377 }
3378
3379 void as3_set_out (FILE *  out_str )
3380 {
3381         as3_out = out_str ;
3382 }
3383
3384 int as3_get_debug  (void)
3385 {
3386         return as3__flex_debug;
3387 }
3388
3389 void as3_set_debug (int  bdebug )
3390 {
3391         as3__flex_debug = bdebug ;
3392 }
3393
3394 static int yy_init_globals (void)
3395 {
3396         /* Initialization is the same as for the non-reentrant scanner.
3397      * This function is called from as3_lex_destroy(), so don't allocate here.
3398      */
3399
3400     (yy_buffer_stack) = 0;
3401     (yy_buffer_stack_top) = 0;
3402     (yy_buffer_stack_max) = 0;
3403     (yy_c_buf_p) = (char *) 0;
3404     (yy_init) = 0;
3405     (yy_start) = 0;
3406
3407 /* Defined in main.c */
3408 #ifdef YY_STDINIT
3409     as3_in = stdin;
3410     as3_out = stdout;
3411 #else
3412     as3_in = (FILE *) 0;
3413     as3_out = (FILE *) 0;
3414 #endif
3415
3416     /* For future reference: Set errno on error, since we are called by
3417      * as3_lex_init()
3418      */
3419     return 0;
3420 }
3421
3422 /* as3_lex_destroy is for both reentrant and non-reentrant scanners. */
3423 int as3_lex_destroy  (void)
3424 {
3425     
3426     /* Pop the buffer stack, destroying each element. */
3427         while(YY_CURRENT_BUFFER){
3428                 as3__delete_buffer(YY_CURRENT_BUFFER  );
3429                 YY_CURRENT_BUFFER_LVALUE = NULL;
3430                 as3_pop_buffer_state();
3431         }
3432
3433         /* Destroy the stack itself. */
3434         as3_free((yy_buffer_stack) );
3435         (yy_buffer_stack) = NULL;
3436
3437     /* Reset the globals. This is important in a non-reentrant scanner so the next time
3438      * as3_lex() is called, initialization will occur. */
3439     yy_init_globals( );
3440
3441     return 0;
3442 }
3443
3444 /*
3445  * Internal utility routines.
3446  */
3447
3448 #ifndef yytext_ptr
3449 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
3450 {
3451         register int i;
3452         for ( i = 0; i < n; ++i )
3453                 s1[i] = s2[i];
3454 }
3455 #endif
3456
3457 #ifdef YY_NEED_STRLEN
3458 static int yy_flex_strlen (yyconst char * s )
3459 {
3460         register int n;
3461         for ( n = 0; s[n]; ++n )
3462                 ;
3463
3464         return n;
3465 }
3466 #endif
3467
3468 void *as3_alloc (yy_size_t  size )
3469 {
3470         return (void *) malloc( size );
3471 }
3472
3473 void *as3_realloc  (void * ptr, yy_size_t  size )
3474 {
3475         /* The cast to (char *) in the following accommodates both
3476          * implementations that use char* generic pointers, and those
3477          * that use void* generic pointers.  It works with the latter
3478          * because both ANSI C and C++ allow castless assignment from
3479          * any pointer type to void*, and deal with argument conversions
3480          * as though doing an assignment.
3481          */
3482         return (void *) realloc( (char *) ptr, size );
3483 }
3484
3485 void as3_free (void * ptr )
3486 {
3487         free( (char *) ptr );   /* see as3_realloc() for (char *) cast */
3488 }
3489
3490 #define YYTABLES_NAME "yytables"
3491
3492 #line 667 "tokenizer.lex"
3493
3494
3495
3496 int as3_wrap()
3497 {
3498     return 1;
3499 }
3500
3501 static char mbuf[256];
3502 char*token2string(enum yytokentype nr, YYSTYPE v)
3503 {
3504     if(nr==T_STRING)     return "<string>";
3505     else if(nr==T_INT)     return "<int>";
3506     else if(nr==T_UINT)     return "<uint>";
3507     else if(nr==T_BYTE)     return "<byte>";
3508     else if(nr==T_FLOAT)     return "<float>";
3509     else if(nr==T_REGEXP)     return "REGEXP";
3510     else if(nr==T_EOF)        return "***END***";
3511     else if(nr==T_GE)         return ">=";
3512     else if(nr==T_LE)         return "<=";
3513     else if(nr==T_MINUSMINUS) return "--";
3514     else if(nr==T_PLUSPLUS)   return "++";
3515     else if(nr==KW_IMPLEMENTS) return "implements";
3516     else if(nr==KW_INTERFACE)  return "interface";
3517     else if(nr==KW_NAMESPACE)  return "namespace";
3518     else if(nr==KW_PROTECTED)  return "protected";
3519     else if(nr==KW_OVERRIDE)   return "override";
3520     else if(nr==KW_INTERNAL)   return "internal";
3521     else if(nr==KW_FUNCTION)   return "function";
3522     else if(nr==KW_PACKAGE)    return "package";
3523     else if(nr==KW_PRIVATE)    return "private";
3524     else if(nr==KW_BOOLEAN)    return "Boolean";
3525     else if(nr==KW_DYNAMIC)    return "dynamic";
3526     else if(nr==KW_EXTENDS)    return "extends";
3527     else if(nr==KW_PUBLIC)     return "public";
3528     else if(nr==KW_NATIVE)     return "native";
3529     else if(nr==KW_STATIC)     return "static";
3530     else if(nr==KW_IMPORT)     return "import";
3531     else if(nr==KW_NUMBER)     return "number";
3532     else if(nr==KW_CLASS)      return "class";
3533     else if(nr==KW_CONST)      return "const";
3534     else if(nr==KW_FINAL)      return "final";
3535     else if(nr==KW_FALSE)      return "False";
3536     else if(nr==KW_TRUE)       return "True";
3537     else if(nr==KW_UINT)       return "uint";
3538     else if(nr==KW_NULL)       return "null";
3539     else if(nr==KW_ELSE)       return "else";
3540     else if(nr==KW_USE)        return "use";
3541     else if(nr==KW_INT)        return "int";
3542     else if(nr==KW_NEW)        return "new";
3543     else if(nr==KW_GET)        return "get";
3544     else if(nr==KW_SET)        return "set";
3545     else if(nr==KW_VAR)        return "var";
3546     else if(nr==KW_IS)         return "is";
3547     else if(nr==KW_AS)         return "as";
3548     else if(nr==T_IDENTIFIER)  return "ID";
3549     else {
3550         sprintf(mbuf, "%d", nr);
3551         return mbuf;
3552     }
3553 }
3554
3555 void initialize_scanner()
3556 {
3557     BEGIN(BEGINNING);
3558 }
3559
3560