07942e1d4a0493bb013ad088fd05e108f02af722
[swftools.git] / lib / as3 / parser.tab.c
1
2 /* A Bison parser, made by GNU Bison 2.4.1.  */
3
4 /* Skeleton implementation for Bison's Yacc-like parsers in C
5    
6       Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
7    Free Software Foundation, Inc.
8    
9    This program is free software: you can redistribute it and/or modify
10    it under the terms of the GNU General Public License as published by
11    the Free Software Foundation, either version 3 of the License, or
12    (at your option) any later version.
13    
14    This program is distributed in the hope that it will be useful,
15    but WITHOUT ANY WARRANTY; without even the implied warranty of
16    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17    GNU General Public License for more details.
18    
19    You should have received a copy of the GNU General Public License
20    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
21
22 /* As a special exception, you may create a larger work that contains
23    part or all of the Bison parser skeleton and distribute that work
24    under terms of your choice, so long as that work isn't itself a
25    parser generator using the skeleton or a modified version thereof
26    as a parser skeleton.  Alternatively, if you modify or redistribute
27    the parser skeleton itself, you may (at your option) remove this
28    special exception, which will cause the skeleton and the resulting
29    Bison output files to be licensed under the GNU General Public
30    License without this special exception.
31    
32    This special exception was added by the Free Software Foundation in
33    version 2.2 of Bison.  */
34
35 /* C LALR(1) parser skeleton written by Richard Stallman, by
36    simplifying the original so-called "semantic" parser.  */
37
38 /* All symbols defined below should begin with yy or YY, to avoid
39    infringing on user name space.  This should be done even for local
40    variables, as they might otherwise be expanded by user macros.
41    There are some unavoidable exceptions within include files to
42    define necessary library symbols; they are noted "INFRINGES ON
43    USER NAME SPACE" below.  */
44
45 /* Identify Bison output.  */
46 #define YYBISON 1
47
48 /* Bison version.  */
49 #define YYBISON_VERSION "2.4.1"
50
51 /* Skeleton name.  */
52 #define YYSKELETON_NAME "./skeleton.m4"
53
54 /* Pure parsers.  */
55 #define YYPURE 0
56
57 /* Push parsers.  */
58 #define YYPUSH 0
59
60 /* Pull parsers.  */
61 #define YYPULL 1
62
63 /* Using locations.  */
64 #define YYLSP_NEEDED 0
65
66 /* Substitute the variable and function names.  */
67 #define yyparse         a3_parse
68 #define yylex           a3_lex
69 #define yyerror         a3_error
70 #define yylval          a3_lval
71 #define yychar          a3_char
72 #define yydebug         a3_debug
73 #define yynerrs         a3_nerrs
74
75
76 /* Copy the first part of user declarations.  */
77
78 /* Line 198 of skeleton.m4  */
79 #line 23 "parser.y"
80
81 #include <stdlib.h>
82 #include <stdio.h>
83 #include <memory.h>
84 #include "abc.h"
85 #include "pool.h"
86 #include "files.h"
87 #include "common.h"
88 #include "tokenizer.h"
89 #include "registry.h"
90 #include "code.h"
91 #include "opcodes.h"
92 #include "compiler.h"
93 #include "expr.h"
94 #include "initcode.h"
95
96 extern int a3_lex();
97
98
99
100 /* Line 198 of skeleton.m4  */
101 #line 102 "parser.tab.c"
102
103 /* Enabling traces.  */
104 #ifndef YYDEBUG
105 # define YYDEBUG 0
106 #endif
107
108 /* Enabling verbose error messages.  */
109 #ifdef YYERROR_VERBOSE
110 # undef YYERROR_VERBOSE
111 # define YYERROR_VERBOSE 1
112 #else
113 # define YYERROR_VERBOSE 1
114 #endif
115
116 /* Enabling the token table.  */
117 #ifndef YYTOKEN_TABLE
118 # define YYTOKEN_TABLE 0
119 #endif
120
121
122 /* Tokens.  */
123 #ifndef YYTOKENTYPE
124 # define YYTOKENTYPE
125    /* Put the tokens into the symbol table, so that GDB and other debuggers
126       know about them.  */
127    enum yytokentype {
128      T_IDENTIFIER = 258,
129      T_NAMESPACE = 259,
130      T_STRING = 260,
131      T_REGEXP = 261,
132      T_EMPTY = 262,
133      T_INT = 263,
134      T_UINT = 264,
135      T_FLOAT = 265,
136      T_FOR = 266,
137      T_WHILE = 267,
138      T_DO = 268,
139      T_SWITCH = 269,
140      KW_IMPLEMENTS = 270,
141      KW_NAMESPACE = 271,
142      KW_PACKAGE = 272,
143      KW_PROTECTED = 273,
144      KW_ARGUMENTS = 274,
145      KW_PUBLIC = 275,
146      KW_PRIVATE = 276,
147      KW_USE = 277,
148      KW_INTERNAL = 278,
149      KW_NEW = 279,
150      KW_NATIVE = 280,
151      KW_FUNCTION = 281,
152      KW_FINALLY = 282,
153      KW_UNDEFINED = 283,
154      KW_NAN = 284,
155      KW_CONTINUE = 285,
156      KW_CLASS = 286,
157      KW_CONST = 287,
158      KW_CATCH = 288,
159      KW_CASE = 289,
160      KW_SET = 290,
161      KW_VOID = 291,
162      KW_THROW = 292,
163      KW_STATIC = 293,
164      KW_WITH = 294,
165      KW_INSTANCEOF = 295,
166      KW_IMPORT = 296,
167      KW_RETURN = 297,
168      KW_TYPEOF = 298,
169      KW_INTERFACE = 299,
170      KW_NULL = 300,
171      KW_VAR = 301,
172      KW_DYNAMIC = 302,
173      KW_OVERRIDE = 303,
174      KW_FINAL = 304,
175      KW_EACH = 305,
176      KW_GET = 306,
177      KW_TRY = 307,
178      KW_SUPER = 308,
179      KW_EXTENDS = 309,
180      KW_FALSE = 310,
181      KW_TRUE = 311,
182      KW_BOOLEAN = 312,
183      KW_UINT = 313,
184      KW_INT = 314,
185      KW_NUMBER = 315,
186      KW_STRING = 316,
187      KW_DEFAULT = 317,
188      KW_DEFAULT_XML = 318,
189      KW_DELETE = 319,
190      KW_IF = 320,
191      KW_ELSE = 321,
192      KW_BREAK = 322,
193      KW_IS = 323,
194      KW_IN = 324,
195      KW_AS = 325,
196      T_DICTSTART = 326,
197      T_EQEQ = 327,
198      T_EQEQEQ = 328,
199      T_NE = 329,
200      T_NEE = 330,
201      T_LE = 331,
202      T_GE = 332,
203      T_ORBY = 333,
204      T_DIVBY = 334,
205      T_MODBY = 335,
206      T_MULBY = 336,
207      T_ANDBY = 337,
208      T_PLUSBY = 338,
209      T_MINUSBY = 339,
210      T_XORBY = 340,
211      T_SHRBY = 341,
212      T_SHLBY = 342,
213      T_USHRBY = 343,
214      T_OROR = 344,
215      T_ANDAND = 345,
216      T_COLONCOLON = 346,
217      T_MINUSMINUS = 347,
218      T_PLUSPLUS = 348,
219      T_DOTDOT = 349,
220      T_DOTDOTDOT = 350,
221      T_SHL = 351,
222      T_USHR = 352,
223      T_SHR = 353,
224      prec_none = 354,
225      below_semicolon = 355,
226      below_assignment = 356,
227      below_lt = 357,
228      below_minus = 358,
229      minusminus_prefix = 359,
230      plusplus_prefix = 360,
231      below_curly = 361,
232      new2 = 362,
233      above_identifier = 363,
234      below_else = 364,
235      above_function = 365
236    };
237 #endif
238
239
240
241 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
242 typedef union 
243 /* Line 223 of skeleton.m4  */
244 #line 47 "parser.y"
245 tokenunion
246 {
247
248 /* Line 223 of skeleton.m4  */
249 #line 47 "parser.y"
250
251     enum yytokentype token;
252
253     classinfo_t*classinfo;
254     classinfo_list_t*classinfo_list;
255     slotinfo_t*slotinfo;
256     slotinfo_list_t*slotinfo_list;
257
258     int number_int;
259     unsigned int number_uint;
260     double number_float;
261     code_t*code;
262     typedcode_t value;
263     //typedcode_list_t*value_list;
264     codeandnumber_t value_list;
265     param_t* param;
266     params_t params;
267     string_t str;
268     char*id;
269     constant_t*constant;
270     for_start_t for_start;
271     abc_exception_t *exception;
272     regexp_t regexp;
273     modifiers_t flags;
274     namespace_decl_t* namespace_decl;
275     node_t*node;
276     struct {
277         abc_exception_list_t *l;
278         code_t*finally;
279     } catch_list;
280
281
282
283 /* Line 223 of skeleton.m4  */
284 #line 285 "parser.tab.c"
285 } YYSTYPE;
286 # define YYSTYPE_IS_TRIVIAL 1
287 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
288 # define YYSTYPE_IS_DECLARED 1
289 #endif
290
291
292 /* Copy the second part of user declarations.  */
293
294 /* Line 273 of skeleton.m4  */
295 #line 275 "parser.y"
296
297
298 static int a3_error(char*s)
299 {
300    syntaxerror("%s", s); 
301    return 0; //make gcc happy
302 }
303
304 static void parsererror(const char*file, int line, const char*f)
305 {
306     syntaxerror("internal error in %s, %s:%d", f, file, line);
307 }
308
309 #define parserassert(b) {if(!(b)) parsererror(__FILE__, __LINE__,__func__);}
310
311
312 static char* concat2(const char* t1, const char* t2)
313 {
314     int l1 = strlen(t1);
315     int l2 = strlen(t2);
316     char*text = malloc(l1+l2+1);
317     memcpy(text   , t1, l1);
318     memcpy(text+l1, t2, l2);
319     text[l1+l2] = 0;
320     return text;
321 }
322 static char* concat3(const char* t1, const char* t2, const char* t3)
323 {
324     int l1 = strlen(t1);
325     int l2 = strlen(t2);
326     int l3 = strlen(t3);
327     char*text = malloc(l1+l2+l3+1);
328     memcpy(text   , t1, l1);
329     memcpy(text+l1, t2, l2);
330     memcpy(text+l1+l2, t3, l3);
331     text[l1+l2+l3] = 0;
332     return text;
333 }
334
335 typedef struct _import {
336     char*package;
337 } import_t;
338 DECLARE_LIST(import);
339
340 DECLARE(methodstate);
341 DECLARE_LIST(methodstate);
342
343 typedef struct _classstate {
344     /* class data */
345     classinfo_t*info;
346     abc_class_t*abc;
347
348     methodstate_t*init;
349     methodstate_t*static_init;
350     //code_t*init;
351     //code_t*static_init;
352     parsedclass_t*dependencies;
353
354     char has_constructor;
355 } classstate_t;
356
357 struct _methodstate {
358     /* method data */
359     methodinfo_t*info;
360     char has_exceptions;
361     char late_binding;
362     char is_constructor;
363     char has_super;
364     char is_global;
365     char is_static;
366     int variable_count;
367
368     dict_t*unresolved_variables;
369
370     char inner;
371     char uses_parent_function;
372     char no_variable_scoping;
373     int uses_slots;
374     dict_t*slots;
375     int activation_var;
376
377     int need_arguments;
378
379     abc_method_t*abc;
380     int var_index; // for inner methods
381     int slot_index; // for inner methods
382     char is_a_slot; // for inner methods
383
384     code_t*header;
385
386     code_t*scope_code;
387     abc_exception_list_t*exceptions;
388     
389     methodstate_list_t*innerfunctions;
390 };
391
392 void methodstate_destroy(methodstate_t*m) 
393 {
394     dict_destroy(m->unresolved_variables);
395     m->unresolved_variables = 0;
396     list_free(m->innerfunctions);m->innerfunctions=0;
397 }
398
399 typedef struct _state {
400     struct _state*old;
401     int level;
402     
403     char*package;     
404     import_list_t*wildcard_imports;
405     dict_t*import_toplevel_packages;
406     dict_t*imports;
407
408     namespace_list_t*active_namespace_urls;
409     
410     char has_own_imports;
411     char new_vars; // e.g. transition between two functions
412     char xmlfilter; // are we inside a xmlobj..() filter?
413   
414     classstate_t*cls;   
415     methodstate_t*method;
416
417     char*exception_name;
418
419     int switch_var;
420     
421     dict_t*vars;
422     dict_t*allvars; // also contains variables from sublevels
423 } state_t;
424
425 typedef struct _global {
426     abc_file_t*file;
427
428     parsedclass_list_t*classes;
429     abc_script_t*classinit;
430
431     abc_script_t*init; //package-level code
432
433     dict_t*token2info;
434     dict_t*file2token2info;
435 } global_t;
436
437 static global_t*global = 0;
438 static state_t* state = 0;
439
440 DECLARE_LIST(state);
441
442 /* protected handling here is a big hack: we just assume the protectedns
443    is package:class. the correct approach would be to add the proper
444    namespace to all protected members in the registry, even though that
445    would slow down searching */
446 #define MEMBER_MULTINAME(m,f,n) \
447     multiname_t m;\
448     namespace_t m##_ns;\
449     if(f) { \
450         m##_ns.access = ((slotinfo_t*)(f))->access; \
451         if(m##_ns.access == ACCESS_NAMESPACE) \
452             m##_ns.name = ((slotinfo_t*)(f))->package; \
453         else if(m##_ns.access == ACCESS_PROTECTED && (f)->parent) \
454             m##_ns.name = concat3((f)->parent->package,":",(f)->parent->name); \
455         else \
456             m##_ns.name = ""; \
457         m.type = QNAME; \
458         m.ns = &m##_ns; \
459         m.namespace_set = 0; \
460         m.name = ((slotinfo_t*)(f))->name; \
461     } else { \
462         m.type = MULTINAME; \
463         m.ns =0; \
464         m.namespace_set = &nopackage_namespace_set; \
465         m.name = n; \
466     }
467
468 /* warning: list length of namespace set is undefined */
469 #define MULTINAME_LATE(m, access, package) \
470     namespace_t m##_ns = {access, package}; \
471     namespace_set_t m##_nsset; \
472     namespace_list_t m##_l;m##_l.next = 0; \
473     m##_nsset.namespaces = &m##_l; \
474     m##_nsset = m##_nsset; \
475     m##_l.namespace = &m##_ns; \
476     multiname_t m = {MULTINAMEL, 0, &m##_nsset, 0};
477
478 static namespace_t ns1 = {ACCESS_PRIVATE, ""};
479 static namespace_t ns2 = {ACCESS_PROTECTED, ""};
480 static namespace_t ns3 = {ACCESS_PACKAGEINTERNAL, ""};
481 static namespace_t stdns = {ACCESS_PACKAGE, ""};
482 static namespace_list_t nl4 = {&stdns,0};
483 static namespace_list_t nl3 = {&ns3,&nl4};
484 static namespace_list_t nl2 = {&ns2,&nl3};
485 static namespace_list_t nl1 = {&ns1,&nl2};
486 static namespace_set_t nopackage_namespace_set = {&nl1};
487
488 static dict_t*definitions=0;
489 void as3_set_define(const char*c)
490 {
491     if(!definitions) 
492         definitions = dict_new();
493     if(!dict_contains(definitions,c))
494         dict_put(definitions,c,0);
495 }
496
497 static void new_state()
498 {
499     NEW(state_t, s);
500     state_t*oldstate = state;
501     if(state)
502         memcpy(s, state, sizeof(state_t)); //shallow copy
503     if(!s->imports) {
504         s->imports = dict_new();
505     }
506     if(!s->import_toplevel_packages) {
507         s->import_toplevel_packages = dict_new(); 
508     }
509     state = s;
510     state->level++;
511     state->has_own_imports = 0;    
512     state->vars = dict_new(); 
513     state->old = oldstate;
514     state->new_vars = 0;
515
516     trie_remember(active_namespaces);
517    
518     if(oldstate)
519         state->active_namespace_urls = list_clone(oldstate->active_namespace_urls);
520 }
521
522 static void state_destroy(state_t*state)
523 {
524     if(state->has_own_imports) {
525         list_free(state->wildcard_imports);
526         dict_destroy(state->imports);state->imports=0;
527     }
528     if(state->imports && (!state->old || state->old->imports!=state->imports)) {
529         dict_destroy(state->imports);state->imports=0;
530     }
531     if(state->vars) {
532         dict_destroy(state->vars);state->vars=0;
533     }
534     if(state->new_vars && state->allvars) {
535         parserassert(!state->old || state->old->allvars != state->allvars);
536         DICT_ITERATE_DATA(state->allvars, void*, data) {
537             free(data);
538         }
539         dict_destroy(state->allvars);
540     }
541     
542     list_free(state->active_namespace_urls)
543     state->active_namespace_urls = 0;
544     
545     free(state);
546 }
547
548 static void old_state()
549 {
550     trie_rollback(active_namespaces);
551
552     if(!state || !state->old)
553         syntaxerror("invalid nesting");
554     state_t*leaving = state;
555     
556     state = state->old;
557
558     if(as3_pass>1 && leaving->method && leaving->method != state->method && !leaving->method->inner) {
559         methodstate_destroy(leaving->method);leaving->method=0;
560     }
561     if(as3_pass>1 && leaving->cls && leaving->cls != state->cls) {
562         free(leaving->cls);
563         leaving->cls=0;
564     }
565
566     state_destroy(leaving);
567 }
568
569 static code_t* method_header(methodstate_t*m);
570 static code_t* wrap_function(code_t*c,code_t*header, code_t*body);
571 static void function_initvars(methodstate_t*m, char has_params, params_t*params, int flags, char var0);
572
573
574 static char* internal_filename_package = 0;
575 void initialize_file(char*filename)
576 {
577     if(state) {
578         syntaxerror("invalid call to initialize_file during parsing of another file");
579     }
580     
581     active_namespaces = trie_new();
582
583     new_state();
584     state->package = internal_filename_package = strdup(filename);
585     state->allvars = dict_new();
586     
587     global->token2info = dict_lookup(global->file2token2info, 
588                                      current_filename // use long version
589                                     );
590     if(!global->token2info) {
591         global->token2info = dict_new2(&ptr_type);
592         dict_put(global->file2token2info, current_filename, global->token2info);
593     }
594   
595     if(as3_pass==1) {
596         state->method = rfx_calloc(sizeof(methodstate_t));
597         dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
598         state->method->late_binding = 1; // init scripts use getglobalscope, so we need a getlocal0/pushscope
599     } else {
600         state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
601         state->method->variable_count = 0;
602         if(!state->method)
603             syntaxerror("internal error: skewed tokencount");
604         function_initvars(state->method, 0, 0, 0, 1);
605         global->init = 0;
606     }
607 }
608
609 void finish_file()
610 {
611     if(!state || state->level!=1) {
612         syntaxerror("unexpected end of file in pass %d", as3_pass);
613     }
614     
615     if(as3_pass==2) {
616         dict_del(global->file2token2info, current_filename);
617         code_t*header = method_header(state->method);
618         //if(global->init->method->body->code || global->init->traits) {
619         if(global->init) {
620             code_t*c = wrap_function(header, 0, global->init->method->body->code);
621             global->init->method->body->code = abc_returnvoid(c);
622             free(state->method);state->method=0;
623         }
624     }
625
626     //free(state->package);state->package=0; // used in registry
627     state_destroy(state);state=0;
628 }
629
630 void initialize_parser()
631 {
632     global = rfx_calloc(sizeof(global_t));
633     global->file = abc_file_new();
634     global->file->flags &= ~ABCFILE_LAZY;
635     global->file2token2info = dict_new();
636     global->token2info = 0;
637     global->classinit = abc_initscript(global->file);
638 }
639
640 void* finish_parser()
641 {
642     dict_free_all(global->file2token2info, 1, (void*)dict_destroy);
643     global->token2info=0;
644     
645     initcode_add_classlist(global->classinit, global->classes);
646
647     return global->file;
648 }
649
650 typedef struct _variable {
651     int index;
652     classinfo_t*type;
653     char init;
654     char kill;
655     char is_parameter;
656     methodstate_t*is_inner_method;
657 } variable_t;
658
659 static variable_t* find_variable(state_t*s, char*name)
660 {
661     if(s->method->no_variable_scoping) {
662         return dict_lookup(s->allvars, name);
663     } else {
664         state_t*top = s;
665         while(s) {
666             variable_t*v = 0;
667             v = dict_lookup(s->vars, name);
668             if(v) return v;
669             if(s->new_vars) break;
670             s = s->old;
671         }
672         return 0;
673     }
674 }
675 static variable_t* find_slot(methodstate_t*m, const char*name)
676 {
677     if(m && m->slots)
678         return dict_lookup(m->slots, name);
679     return 0;
680 }
681
682 static variable_t* find_variable_safe(state_t*s, char*name)
683 {
684     variable_t* v = find_variable(s, name);
685     if(!v)
686         syntaxerror("undefined variable: %s", name);
687     return v;
688 }
689
690 static char variable_exists(char*name) 
691 {
692     return dict_contains(state->vars, name);
693 }
694
695 static code_t*defaultvalue(code_t*c, classinfo_t*type)
696 {
697     if(TYPE_IS_INT(type)) {
698        c = abc_pushbyte(c, 0);
699     } else if(TYPE_IS_UINT(type)) {
700        c = abc_pushuint(c, 0);
701     } else if(TYPE_IS_FLOAT(type)) {
702        c = abc_pushnan(c);
703     } else if(TYPE_IS_BOOLEAN(type)) {
704        c = abc_pushfalse(c);
705     } else if(TYPE_IS_STRING(type)) {
706        c = abc_pushnull(c);
707        c = abc_coerce_s(c);
708     } else if(!type) {
709        //c = abc_pushundefined(c);
710         syntaxerror("internal error: can't generate default value for * type");
711     } else {
712        c = abc_pushnull(c);
713        MULTINAME(m, type);
714        c = abc_coerce2(c, &m);
715     }
716     return c;
717 }
718
719 static int alloc_local()
720 {
721     return state->method->variable_count++;
722 }
723
724 static variable_t* new_variable2(methodstate_t*method, const char*name, classinfo_t*type, char init, char maybeslot)
725 {
726     if(maybeslot) {
727         variable_t*v = find_slot(method, name);
728         if(v) {
729             alloc_local(); 
730             return v;
731         }
732     }
733
734     NEW(variable_t, v);
735     v->index = alloc_local();
736     v->type = type;
737     v->init = v->kill = init;
738  
739     if(name) {
740         if(!method->no_variable_scoping) 
741         {
742             if(dict_contains(state->vars, name)) {
743                 *(int*)0=0;
744                 syntaxerror("variable %s already defined", name);
745             }
746             dict_put(state->vars, name, v);
747         }
748         if(method->no_variable_scoping && 
749            as3_pass==2 && 
750            dict_contains(state->allvars, name)) 
751         {
752             variable_t*v = dict_lookup(state->allvars, name);
753             if(v->type != type)
754                 syntaxerror("variable %s already defined.", name);
755             return v;
756         }
757         dict_put(state->allvars, name, v);
758     }
759
760     return v;
761 }
762 static int new_variable(methodstate_t*method, const char*name, classinfo_t*type, char init, char maybeslot)
763 {
764     return new_variable2(method, name, type, init, maybeslot)->index;
765 }
766
767 #define TEMPVARNAME "__as3_temp__"
768 int gettempvar()
769 {
770     variable_t*v = find_variable(state, TEMPVARNAME);
771     int i;
772     if(v) 
773         i = v->index;
774     else
775         i = new_variable(state->method, TEMPVARNAME, 0, 0, 0);
776     parserassert(i);
777     return i;
778 }
779
780 static code_t* var_block(code_t*body, dict_t*vars) 
781 {
782     code_t*c = 0;
783     code_t*k = 0;
784     int t;
785     DICT_ITERATE_DATA(vars, variable_t*, v) {
786         if(v->type && v->init) {
787             c = defaultvalue(c, v->type);
788             c = abc_setlocal(c, v->index);
789         }
790         if(v->type && v->kill) {
791             k = abc_kill(k, v->index); 
792         }
793     }
794
795     if(k) {
796         code_t*x = body;
797         while(x) {
798             if(x->opcode== OPCODE___BREAK__ ||
799                x->opcode== OPCODE___CONTINUE__) {
800                /* link kill code before break/continue */
801                 code_t*e = code_dup(k);
802                 code_t*s = code_start(e);
803                 s->prev = x->prev;
804                 if(x->prev) {
805                     x->prev->next = s;
806                 }
807                 e->next = x;
808                 x->prev = e;
809             }
810             x = x->prev;
811         }
812     }
813     
814     c = code_append(c, body);
815     c = code_append(c, k);
816     return c;
817 }
818
819 static void unknown_variable(char*name) 
820 {
821     if(!state->method->unresolved_variables)
822         state->method->unresolved_variables = dict_new();
823     if(!dict_contains(state->method->unresolved_variables, name))
824         dict_put(state->method->unresolved_variables, name, 0);
825 }
826
827 static code_t* add_scope_code(code_t*c, methodstate_t*m, char init)
828 {
829     if(m->uses_slots || m->innerfunctions || (m->late_binding && !m->inner)) {
830         c = abc_getlocal_0(c);
831         c = abc_pushscope(c);
832     }
833     if(m->uses_slots) {
834         /* FIXME: this alloc_local() causes variable indexes to be
835            different in pass2 than in pass1 */
836         if(!m->activation_var) {
837             m->activation_var = alloc_local();
838         }
839         if(init) {
840             c = abc_newactivation(c);
841             c = abc_dup(c);
842             c = abc_pushscope(c);
843             c = abc_setlocal(c, m->activation_var);
844         } else {
845             c = abc_getlocal(c, m->activation_var);
846             c = abc_pushscope(c);
847         }
848     }
849     return c;
850 }
851
852 static code_t* method_header(methodstate_t*m)
853 {
854     code_t*c = 0;
855
856     c = add_scope_code(c, m, 1);
857
858     methodstate_list_t*l = m->innerfunctions;
859     while(l) {
860         parserassert(l->methodstate->abc);
861         if(m->uses_slots && l->methodstate->is_a_slot) {
862             c = abc_getscopeobject(c, 1);
863             c = abc_newfunction(c, l->methodstate->abc);
864             c = abc_dup(c);
865             c = abc_setlocal(c, l->methodstate->var_index);
866             c = abc_setslot(c, l->methodstate->slot_index);
867         } else {
868             c = abc_newfunction(c, l->methodstate->abc);
869             c = abc_setlocal(c, l->methodstate->var_index);
870         }
871         free(l->methodstate);l->methodstate=0;
872         l = l->next;
873     }
874     if(m->header) {
875         c = code_append(c, m->header);
876         m->header = 0;
877     }
878     if(m->is_constructor && !m->has_super) {
879         // call default constructor
880         c = abc_getlocal_0(c);
881         c = abc_constructsuper(c, 0);
882     }
883
884     if(m->slots) {
885         /* all parameters that are used by inner functions
886            need to be copied from local to slot */
887         parserassert(m->activation_var);
888         DICT_ITERATE_ITEMS(m->slots,char*,name,variable_t*,v) {
889             if(v->is_parameter) {
890                 c = abc_getlocal(c, m->activation_var); 
891                 c = abc_getlocal(c, v->index); 
892                 c = abc_setslot(c, v->index); 
893             }
894         }
895     }
896     list_free(m->innerfunctions);
897     m->innerfunctions = 0;
898     return c;
899 }
900     
901
902 static code_t* wrap_function(code_t*c,code_t*header, code_t*body)
903 {
904     c = code_append(c, header);
905     c = code_append(c, var_block(body, state->method->no_variable_scoping?state->allvars:state->vars));
906     /* append return if necessary */
907     if(!c || (c->opcode != OPCODE_RETURNVOID && 
908               c->opcode != OPCODE_RETURNVALUE)) {
909         c = abc_returnvoid(c);
910     }
911     return c;
912 }
913
914 static void startpackage(char*name)
915 {
916     new_state();
917     state->package = strdup(name);
918 }
919 static void endpackage()
920 {
921     //used e.g. in classinfo_register:
922     //free(state->package);state->package=0;
923     old_state();
924 }
925
926 #define FLAG_PUBLIC 256
927 #define FLAG_PROTECTED 512
928 #define FLAG_PRIVATE 1024
929 #define FLAG_PACKAGEINTERNAL 2048
930 #define FLAG_NAMESPACE 4096
931
932 static namespace_t modifiers2access(modifiers_t*mod)
933 {
934     namespace_t ns;
935     ns.access = 0;
936     ns.name = "";
937     if(mod->flags&FLAG_NAMESPACE)  {
938         if(mod->flags&(FLAG_PRIVATE|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL)) 
939             syntaxerror("invalid combination of access levels and namespaces");
940         ns.access = ACCESS_NAMESPACE;
941         state_t*s = state;
942         const char*url = (const char*)trie_lookup(active_namespaces, (unsigned char*)mod->ns);
943         if(!url) {
944             /* shouldn't happen- the tokenizer only reports something as a namespace
945                if it was already registered */
946             trie_dump(active_namespaces);
947             syntaxerror("unknown namespace: %s", mod->ns);
948         }
949         ns.name = url;
950     } else if(mod->flags&FLAG_PUBLIC)  {
951         if(mod->flags&(FLAG_PRIVATE|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL)) 
952             syntaxerror("invalid combination of access levels");
953         ns.access = ACCESS_PACKAGE;
954     } else if(mod->flags&FLAG_PRIVATE) {
955         if(mod->flags&(FLAG_PUBLIC|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL)) 
956             syntaxerror("invalid combination of access levels");
957         ns.access = ACCESS_PRIVATE;
958     } else if(mod->flags&FLAG_PROTECTED) {
959         if(mod->flags&(FLAG_PUBLIC|FLAG_PRIVATE|FLAG_PACKAGEINTERNAL)) 
960             syntaxerror("invalid combination of access levels");
961         ns.access = ACCESS_PROTECTED;
962     } else {
963         ns.access = ACCESS_PACKAGEINTERNAL;
964     }
965     return ns;
966 }
967 static slotinfo_t* find_class(const char*name);
968
969 static memberinfo_t* findmember_nsset(classinfo_t*cls, const char*name, char recurse)
970 {
971     return registry_findmember_nsset(cls, state->active_namespace_urls, name, recurse);
972 }
973
974 static void innerfunctions2vars(methodstate_t*m)
975 {
976     methodstate_list_t*l = m->innerfunctions;
977     while(l) {
978         methodstate_t*m = l->methodstate;
979         
980         variable_t* v = new_variable2(state->method, m->info->name, TYPE_FUNCTION(m->info), 0, 0);
981         m->var_index = v->index;
982         if(m->is_a_slot)
983             m->slot_index = m->is_a_slot;
984         v->is_inner_method = m;
985         l = l->next;
986     }
987 }
988
989 static void function_initvars(methodstate_t*m, char has_params, params_t*params, int flags, char var0)
990 {
991     if(var0) {
992         int index = -1;
993         if(m->inner)
994             index = new_variable(m, "this", 0, 0, 0);
995         else if(!m->is_global)
996             index = new_variable(m, (flags&FLAG_STATIC)?"class":"this", state->cls?state->cls->info:0, 0, 0);
997         else
998             index = new_variable(m, "globalscope", 0, 0, 0);
999         if(index) {
1000             DICT_ITERATE_ITEMS(state->vars, char*, name, variable_t*, v) {
1001                 printf("%s %d\n", name, v->index);
1002             }
1003         }
1004         parserassert(!index);
1005     }
1006
1007     if(has_params) {
1008         param_list_t*p=0;
1009         for(p=params->list;p;p=p->next) {
1010             variable_t*v = new_variable2(m, p->param->name, p->param->type, 0, 1);
1011             v->is_parameter = 1;
1012         }
1013         if(as3_pass==2 && m->need_arguments) {
1014             /* arguments can never be used by an innerfunction (the inner functions
1015                have their own arguments var), so it's ok to  not initialize this until
1016                pass 2. (We don't know whether we need it before, anyway) */
1017             variable_t*v = new_variable2(m, "arguments", TYPE_ARRAY, 0, 0);
1018             m->need_arguments = v->index;
1019         }
1020     }
1021     
1022     innerfunctions2vars(m);
1023     
1024     if(as3_pass==2) {
1025         m->scope_code = add_scope_code(m->scope_code, m, 0);
1026         if(m->slots) {
1027             /* exchange unresolved identifiers with the actual objects */
1028             DICT_ITERATE_ITEMS(m->slots, char*, name, variable_t*, v) {
1029                 if(v->type && v->type->kind == INFOTYPE_UNRESOLVED) {
1030                     classinfo_t*type = (classinfo_t*)registry_resolve((slotinfo_t*)v->type);
1031                     if(!type || type->kind != INFOTYPE_CLASS) {
1032                         syntaxerror("Couldn't find class %s::%s (%s)", v->type->package, v->type->name, name);
1033                     }
1034                     v->type = type;
1035                 }
1036             }
1037         }
1038     }
1039 }
1040
1041
1042 char*as3_globalclass=0;
1043 static void startclass(modifiers_t* mod, char*classname, classinfo_t*extends, classinfo_list_t*implements)
1044 {
1045     if(state->cls) {
1046         syntaxerror("inner classes now allowed"); 
1047     }
1048
1049     new_state();
1050     token_list_t*t=0;
1051     classinfo_list_t*mlist=0;
1052
1053     if(mod->flags&~(FLAG_PACKAGEINTERNAL|FLAG_PUBLIC|FLAG_FINAL|FLAG_DYNAMIC|FLAG_INTERFACE))
1054         syntaxerror("invalid modifier(s)");
1055
1056     if((mod->flags&(FLAG_PUBLIC|FLAG_PACKAGEINTERNAL)) == (FLAG_PUBLIC|FLAG_PACKAGEINTERNAL))
1057         syntaxerror("public and internal not supported at the same time.");
1058     
1059     if((mod->flags&(FLAG_PROTECTED|FLAG_STATIC)) == (FLAG_PROTECTED|FLAG_STATIC))
1060         syntaxerror("protected and static not supported at the same time.");
1061     
1062     //if(!(mod->flags&FLAG_INTERFACE) && !extends) {
1063     if(!(mod->flags&FLAG_INTERFACE) && !extends) {
1064         // all classes extend object
1065         extends = registry_getobjectclass();
1066     }
1067
1068     /* create the class name, together with the proper attributes */
1069     int access=0;
1070     char*package=0;
1071
1072     if(!(mod->flags&FLAG_PUBLIC) && state->package==internal_filename_package) {
1073         access = ACCESS_PRIVATE; package = internal_filename_package;
1074     } else if(!(mod->flags&FLAG_PUBLIC) && state->package!=internal_filename_package) {
1075         access = ACCESS_PACKAGEINTERNAL; package = state->package;
1076     } else if(state->package!=internal_filename_package) {
1077         access = ACCESS_PACKAGE; package = state->package;
1078     } else {
1079         syntaxerror("public classes only allowed inside a package");
1080     }
1081
1082     if(as3_pass==1) {
1083         state->cls = rfx_calloc(sizeof(classstate_t));
1084         state->cls->init = rfx_calloc(sizeof(methodstate_t));
1085         state->cls->static_init = rfx_calloc(sizeof(methodstate_t));
1086         state->cls->static_init->is_static=FLAG_STATIC;
1087         /* notice: we make no effort to initialize the top variable (local0) here,
1088            even though it has special meaning. We just rely on the fact
1089            that pass 1 won't do anything with variables */
1090         
1091         dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->cls);
1092
1093         /* set current method to constructor- all code within the class-level (except
1094            static variable initializations) will be executed during construction time */
1095         state->method = state->cls->init;
1096
1097         if(registry_find(package, classname)) {
1098             syntaxerror("Package \"%s\" already contains a class called \"%s\"", package, classname);
1099         }
1100         /* build info struct */
1101         int num_interfaces = (list_length(implements));
1102         state->cls->info = classinfo_register(access, package, classname, num_interfaces);
1103         state->cls->info->flags |= mod->flags & (FLAG_DYNAMIC|FLAG_INTERFACE|FLAG_FINAL);
1104         state->cls->info->superclass = extends;
1105         
1106         int pos = 0;
1107         classinfo_list_t*l = implements;
1108         for(l=implements;l;l=l->next) {
1109             state->cls->info->interfaces[pos++] = l->classinfo;
1110         }
1111     }
1112     
1113     if(as3_pass == 2) {
1114         state->cls = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1115     
1116         parserassert(state->cls && state->cls->info);
1117        
1118         state->method = state->cls->static_init;
1119
1120         function_initvars(state->cls->init, 0, 0, 0, 1);
1121         state->cls->static_init->variable_count=1;
1122         function_initvars(state->cls->static_init, 0, 0, 0, 0);
1123
1124         if(extends && (extends->flags & FLAG_FINAL))
1125             syntaxerror("Can't extend final class '%s'", extends->name);
1126         
1127         int pos = 0;
1128         while(state->cls->info->interfaces[pos]) {
1129             if(!(state->cls->info->interfaces[pos]->flags & FLAG_INTERFACE))
1130                 syntaxerror("'%s' is not an interface", 
1131                     state->cls->info->interfaces[pos]->name);
1132             pos++;
1133         }
1134
1135         /* generate the abc code for this class */
1136         MULTINAME(classname2,state->cls->info);
1137         multiname_t*extends2 = sig2mname(extends);
1138
1139         /* don't add the class to the class index just yet- that will be done later
1140            by initscript */
1141         state->cls->abc = abc_class_new(0, &classname2, extends2);
1142         state->cls->abc->file = global->file;
1143
1144         multiname_destroy(extends2);
1145         if(state->cls->info->flags&FLAG_FINAL) abc_class_final(state->cls->abc);
1146         if(!(state->cls->info->flags&FLAG_DYNAMIC)) abc_class_sealed(state->cls->abc);
1147         if(state->cls->info->flags&FLAG_INTERFACE) {
1148             abc_class_interface(state->cls->abc);
1149         }
1150
1151         for(mlist=implements;mlist;mlist=mlist->next) {
1152             MULTINAME(m, mlist->classinfo);
1153             abc_class_add_interface(state->cls->abc, &m);
1154         }
1155
1156         state->cls->dependencies = parsedclass_new(state->cls->info, state->cls->abc);
1157         list_append(global->classes, state->cls->dependencies);
1158
1159         /* flash.display.MovieClip handling */
1160         if(!as3_globalclass && (mod->flags&FLAG_PUBLIC) && slotinfo_equals((slotinfo_t*)registry_getMovieClip(),(slotinfo_t*)extends)) {
1161             if(state->package && state->package[0]) {
1162                 as3_globalclass = concat3(state->package, ".", classname);
1163             } else {
1164                 as3_globalclass = strdup(classname);
1165             }
1166         }
1167     }
1168 }
1169
1170 static void endclass()
1171 {
1172     if(as3_pass == 2) {
1173         if(!state->cls->has_constructor && !(state->cls->info->flags&FLAG_INTERFACE)) {
1174             code_t*c = 0;
1175             c = abc_getlocal_0(c);
1176             c = abc_constructsuper(c, 0);
1177             state->cls->init->header = code_append(state->cls->init->header, c);
1178             state->cls->has_constructor=1;
1179         }
1180         if(state->cls->init) {
1181             if(state->cls->info->flags&FLAG_INTERFACE) {
1182                 if(state->cls->init->header) 
1183                     syntaxerror("interface can not have class-level code");
1184             } else {
1185                 abc_method_t*m = abc_class_getconstructor(state->cls->abc, 0);
1186                 code_t*c = method_header(state->cls->init);
1187                 m->body->code = wrap_function(c, 0, m->body->code);
1188             }
1189         }
1190         if(state->cls->static_init) {
1191             abc_method_t*m = abc_class_getstaticconstructor(state->cls->abc, 0);
1192             code_t*c = method_header(state->cls->static_init);
1193             m->body->code = wrap_function(c, 0, m->body->code);
1194         }
1195       
1196         trait_list_t*trait = state->cls->abc->traits;
1197         /* switch all protected members to the protected ns of this class */
1198         while(trait) {
1199             trait_t*t = trait->trait;
1200             if(t->name->ns->access == ACCESS_PROTECTED) {
1201                 if(!state->cls->abc->protectedNS) {
1202                     char*n = concat3(state->cls->info->package, ":", state->cls->info->name);
1203                     state->cls->abc->protectedNS = namespace_new_protected(n);
1204                     state->cls->abc->flags |= CLASS_PROTECTED_NS;
1205                 }
1206                 t->name->ns->name = strdup(state->cls->abc->protectedNS->name);
1207             }
1208             trait = trait->next;
1209         }
1210     }
1211
1212     old_state();
1213 }
1214
1215 void check_code_for_break(code_t*c)
1216 {
1217     while(c) {
1218         if(c->opcode == OPCODE___BREAK__) {
1219             char*name = string_cstr(c->data[0]);
1220             syntaxerror("Unresolved \"break %s\"", name);
1221         }
1222         if(c->opcode == OPCODE___CONTINUE__) {
1223             char*name = string_cstr(c->data[0]);
1224             syntaxerror("Unresolved \"continue %s\"", name);
1225         }
1226         if(c->opcode == OPCODE___RETHROW__) {
1227             syntaxerror("Unresolved \"rethrow\"");
1228         }
1229         if(c->opcode == OPCODE___FALLTHROUGH__) {
1230             syntaxerror("Unresolved \"fallthrough\"");
1231         }
1232         if(c->opcode == OPCODE___PUSHPACKAGE__) {
1233             char*name = string_cstr(c->data[0]);
1234             syntaxerror("Can't reference a package (%s) as such", name);
1235         }
1236         c=c->prev;
1237     }
1238 }
1239
1240 static void check_constant_against_type(classinfo_t*t, constant_t*c)
1241 {
1242 #define xassert(b) if(!(b)) syntaxerror("Invalid default value %s for type '%s'", constant_tostring(c), t->name)
1243    if(TYPE_IS_NUMBER(t)) {
1244         xassert(c->type == CONSTANT_FLOAT
1245              || c->type == CONSTANT_INT
1246              || c->type == CONSTANT_UINT);
1247    } else if(TYPE_IS_UINT(t)) {
1248         xassert(c->type == CONSTANT_UINT ||
1249                (c->type == CONSTANT_INT && c->i>=0));
1250    } else if(TYPE_IS_INT(t)) {
1251         xassert(c->type == CONSTANT_INT);
1252    } else if(TYPE_IS_BOOLEAN(t)) {
1253         xassert(c->type == CONSTANT_TRUE
1254              || c->type == CONSTANT_FALSE);
1255    }
1256 }
1257
1258 static void check_override(memberinfo_t*m, int flags)
1259 {
1260     if(!m)
1261         return;
1262     if(m->parent == state->cls->info)
1263         syntaxerror("class '%s' already contains a method/slot '%s'", m->parent->name, m->name);
1264     if(!m->parent)
1265         syntaxerror("internal error: overriding method %s, which doesn't have parent", m->name);
1266     if(m->access==ACCESS_PRIVATE)
1267         return;
1268     if(m->flags & FLAG_FINAL)
1269         syntaxerror("can't override final member %s", m->name);
1270     
1271     /* allow this. it's no issue.
1272     if((m->flags & FLAG_STATIC) && !(flags&FLAG_STATIC))
1273         syntaxerror("can't override static member %s", m->name);*/
1274
1275     if(!(m->flags & FLAG_STATIC) && (flags&FLAG_STATIC))
1276         syntaxerror("can't override non-static member %s with static declaration", m->name);
1277
1278     if(!(flags&FLAG_OVERRIDE) && !(flags&FLAG_STATIC) && !(m->flags&FLAG_STATIC)) {
1279         if(m->parent && !(m->parent->flags&FLAG_INTERFACE)) {
1280             if(m->kind == INFOTYPE_METHOD)
1281                 syntaxerror("can't override without explicit 'override' declaration");
1282             else
1283                 syntaxerror("can't override '%s'", m->name);
1284         }
1285     }
1286 }
1287
1288 static methodinfo_t*registerfunction(enum yytokentype getset, modifiers_t*mod, char*name, params_t*params, classinfo_t*return_type, int slot)
1289 {
1290     methodinfo_t*minfo = 0;
1291     namespace_t ns = modifiers2access(mod);
1292     if(!state->cls) {
1293         //package method
1294         minfo = methodinfo_register_global(ns.access, state->package, name);
1295         minfo->return_type = return_type;
1296     } else if(getset != KW_GET && getset != KW_SET) {
1297         //class method
1298         memberinfo_t* m = registry_findmember(state->cls->info, ns.name, name, 0);
1299         if(m) {
1300             syntaxerror("class already contains a %s '%s'", infotypename((slotinfo_t*)m), m->name);
1301         }
1302         minfo = methodinfo_register_onclass(state->cls->info, ns.access, ns.name, name);
1303         minfo->return_type = return_type;
1304         // getslot on a member slot only returns "undefined", so no need
1305         // to actually store these
1306         //state->minfo->slot = state->method->abc->method->trait->slot_id;
1307     } else {
1308         //class getter/setter
1309         int gs = getset==KW_GET?SUBTYPE_GET:SUBTYPE_SET;
1310         classinfo_t*type=0;
1311         if(getset == KW_GET) {
1312             type = return_type;
1313         } else if(params->list && params->list->param && !params->list->next) {
1314             type = params->list->param->type;
1315         } else
1316             syntaxerror("setter function needs to take exactly one argument");
1317         // not sure wether to look into superclasses here, too
1318         minfo = (methodinfo_t*)registry_findmember(state->cls->info, ns.name, name, 1);
1319         if(minfo) {
1320             if(minfo->kind!=INFOTYPE_VAR)
1321                 syntaxerror("class already contains a method called '%s'", name);
1322             if(!(minfo->subtype & (SUBTYPE_GETSET)))
1323                 syntaxerror("class already contains a field called '%s'", name);
1324             if(minfo->subtype & gs)
1325                 syntaxerror("getter/setter for '%s' already defined", name);
1326             /* make a setter or getter into a getset */
1327             minfo->subtype |= gs;
1328             
1329             /*
1330             FIXME: this check needs to be done in pass 2
1331             
1332             if((!minfo->return_type != !type) ||
1333                 (minfo->return_type && type && 
1334                  !strcmp(minfo->return_type->name, type->name))) {
1335                 syntaxerror("different type in getter and setter: %s and %s", 
1336                     minfo->return_type?minfo->return_type->name:"*", 
1337                     type?type->name:"*");
1338             }*/
1339         } else {
1340             minfo = methodinfo_register_onclass(state->cls->info, ns.access, ns.name, name);
1341             minfo->kind = INFOTYPE_VAR; //hack
1342             minfo->subtype = gs;
1343             minfo->return_type = type;
1344         }
1345
1346         /* can't assign a slot as getter and setter might have different slots */
1347         //minfo->slot = slot;
1348     }
1349     if(mod->flags&FLAG_FINAL) minfo->flags |= FLAG_FINAL;
1350     if(mod->flags&FLAG_STATIC) minfo->flags |= FLAG_STATIC;
1351     if(mod->flags&FLAG_OVERRIDE) minfo->flags |= FLAG_OVERRIDE;
1352
1353     return minfo;
1354 }
1355
1356 static void innerfunction(char*name, params_t*params, classinfo_t*return_type)
1357 {
1358     //parserassert(state->method && state->method->info);
1359
1360     methodstate_t*parent_method = state->method;
1361     variable_t*v = 0;
1362
1363     if(as3_pass==1) {
1364         return_type = 0; // not valid in pass 1
1365         if(name) {
1366             v = new_variable2(parent_method, name, 0, 0, 0);
1367         }
1368     }
1369
1370     new_state();
1371     state->new_vars = 1;
1372     state->allvars = dict_new();
1373    
1374     if(as3_pass == 1) {
1375         state->method = rfx_calloc(sizeof(methodstate_t));
1376         state->method->inner = 1;
1377         state->method->is_static = parent_method->is_static;
1378         state->method->variable_count = 0;
1379         state->method->abc = rfx_calloc(sizeof(abc_method_t));
1380         if(v) {
1381             v->is_inner_method = state->method;
1382         }
1383
1384         NEW(methodinfo_t,minfo);
1385         minfo->kind = INFOTYPE_METHOD;
1386         minfo->access = ACCESS_PACKAGEINTERNAL;
1387         minfo->name = name;
1388         state->method->info = minfo;
1389
1390         if(parent_method)
1391             list_append(parent_method->innerfunctions, state->method);
1392
1393         dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
1394     
1395         function_initvars(state->method, 1, params, 0, 1);
1396     }
1397
1398     if(as3_pass == 2) {
1399         state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1400         state->method->variable_count = 0;
1401         parserassert(state->method);
1402
1403         state->method->info->return_type = return_type;
1404         function_initvars(state->method, 1, params, 0, 1);
1405     }
1406 }
1407
1408 static void startfunction(modifiers_t*mod, enum yytokentype getset, char*name,
1409                           params_t*params, classinfo_t*return_type)
1410 {
1411     if(state->method && state->method->info) {
1412         syntaxerror("not able to start another method scope");
1413     }
1414     new_state();
1415     state->new_vars = 1;
1416     state->allvars = dict_new();
1417
1418     if(as3_pass == 1) {
1419         state->method = rfx_calloc(sizeof(methodstate_t));
1420         state->method->has_super = 0;
1421         state->method->is_static = mod->flags&FLAG_STATIC;
1422
1423         if(state->cls) {
1424             state->method->is_constructor = !strcmp(state->cls->info->name,name);
1425         } else {
1426             state->method->is_global = 1;
1427             state->method->late_binding = 1; // for global methods, always push local_0 on the scope stack
1428         }
1429         if(state->method->is_constructor)
1430             name = "__as3_constructor__";
1431
1432         state->method->info = registerfunction(getset, mod, name, params, return_type, 0);
1433        
1434         function_initvars(state->method, 1, params, mod->flags, 1);
1435         
1436         dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
1437     }
1438
1439     if(as3_pass == 2) {
1440         state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1441         state->method->variable_count = 0;
1442         parserassert(state->method);
1443                 
1444         if(state->cls) {
1445             memberinfo_t*m = registry_findmember(state->cls->info, mod->ns, name, 2);
1446             check_override(m, mod->flags);
1447         }
1448             
1449         if(state->cls) { 
1450             state->cls->has_constructor |= state->method->is_constructor;
1451         }
1452         
1453         function_initvars(state->method, 1, params, mod->flags, 1);
1454     } 
1455 }
1456
1457 static void insert_unresolved(methodstate_t*m, dict_t*xvars, dict_t*allvars)
1458 {
1459     parserassert(m->inner);
1460     if(m->unresolved_variables) {
1461         dict_t*d = m->unresolved_variables;
1462         int t;
1463         DICT_ITERATE_KEY(d, char*, id) {
1464             /* check parent method's variables */
1465             variable_t*v;
1466             if(dict_contains(allvars, id)) {
1467                 m->uses_parent_function = 1;
1468                 state->method->uses_slots = 1;
1469                 dict_put(xvars, id, 0);
1470             }
1471         }
1472     }
1473     methodstate_list_t*ml = m->innerfunctions;
1474     while(ml) {
1475         insert_unresolved(ml->methodstate, xvars, allvars);
1476         ml = ml->next;
1477     }
1478 }
1479
1480 static abc_method_t* endfunction(modifiers_t*mod, enum yytokentype getset, char*name,
1481                           params_t*params, classinfo_t*return_type, code_t*body)
1482 {
1483     if(as3_pass==1) {
1484         dict_t*xvars = dict_new();
1485         
1486         if(state->method->unresolved_variables) {
1487             DICT_ITERATE_KEY(state->method->unresolved_variables, char*, vname) {
1488                 if(!state->method->no_variable_scoping && dict_contains(state->allvars, vname)) {
1489                     variable_t*v = dict_lookup(state->allvars, vname);
1490                     if(!v->is_inner_method) {
1491                         state->method->no_variable_scoping = 1;
1492                         as3_warning("function %s uses forward or outer block variable references (%s): switching into compatiblity mode", name, vname);
1493                     }
1494                 }
1495             }
1496         }
1497
1498         methodstate_list_t*ml = state->method->innerfunctions;
1499         while(ml) {
1500             insert_unresolved(ml->methodstate, xvars, state->allvars);
1501             ml = ml->next;
1502         }
1503         
1504         if(state->method->uses_slots) {
1505             state->method->slots = dict_new();
1506             int i = 1;
1507             DICT_ITERATE_ITEMS(state->allvars, char*, name, variable_t*, v) {
1508                 if(!name) syntaxerror("internal error");
1509                 if(v->index && dict_contains(xvars, name)) {
1510                     v->init = v->kill = 0;
1511                     v->index = i;
1512                     if(v->is_inner_method) {
1513                         v->is_inner_method->is_a_slot = i;
1514                     }
1515                     i++;
1516                     dict_put(state->method->slots, name, v);
1517                 }
1518             }
1519             state->method->uses_slots = i;
1520             dict_destroy(state->vars);state->vars = 0;
1521             parserassert(state->new_vars);
1522             dict_destroy(state->allvars);state->allvars = 0;
1523         }
1524         old_state();
1525         return 0;
1526     }
1527
1528     if(as3_pass==2) {
1529         /*if(state->method->uses_parent_function){
1530             syntaxerror("accessing variables of parent function from inner functions not supported yet");
1531         }*/
1532
1533         abc_method_t*f = 0;
1534
1535         multiname_t*type2 = sig2mname(return_type);
1536         int slot = 0;
1537         if(state->method->inner) {
1538             f = state->method->abc;
1539             abc_method_init(f, global->file, type2, 1);
1540         } else if(state->method->is_constructor) {
1541             f = abc_class_getconstructor(state->cls->abc, type2);
1542         } else if(!state->method->is_global) {
1543             namespace_t ns = modifiers2access(mod);
1544             multiname_t mname = {QNAME, &ns, 0, name};
1545             if(mod->flags&FLAG_STATIC)
1546                 f = abc_class_staticmethod(state->cls->abc, type2, &mname);
1547             else
1548                 f = abc_class_method(state->cls->abc, type2, &mname);
1549             slot = f->trait->slot_id;
1550         } else {
1551             namespace_t mname_ns = {state->method->info->access, state->package};
1552             multiname_t mname = {QNAME, &mname_ns, 0, name};
1553
1554             f = abc_method_new(global->file, type2, 1);
1555             if(!global->init) global->init = abc_initscript(global->file);
1556             trait_t*t = trait_new_method(&global->init->traits, multiname_clone(&mname), f);
1557             //abc_code_t*c = global->init->method->body->code;
1558         }
1559         //flash doesn't seem to allow us to access function slots
1560         //state->method->info->slot = slot;
1561
1562         if(mod && mod->flags&FLAG_OVERRIDE) f->trait->attributes |= TRAIT_ATTR_OVERRIDE;
1563         if(getset == KW_GET) f->trait->kind = TRAIT_GETTER;
1564         if(getset == KW_SET) f->trait->kind = TRAIT_SETTER;
1565         if(params->varargs) f->flags |= METHOD_NEED_REST;
1566         if(state->method->need_arguments) f->flags |= METHOD_NEED_ARGUMENTS;
1567
1568         char opt=0;
1569         param_list_t*p=0;
1570         for(p=params->list;p;p=p->next) {
1571             if(params->varargs && !p->next) {
1572                 break; //varargs: omit last parameter in function signature
1573             }
1574             multiname_t*m = sig2mname(p->param->type);
1575             list_append(f->parameters, m);
1576             if(p->param->value) {
1577                 check_constant_against_type(p->param->type, p->param->value);
1578                 opt=1;list_append(f->optional_parameters, p->param->value);
1579             } else if(opt) {
1580                 syntaxerror("function %s: non-optional parameter not allowed after optional parameters", name);
1581             }
1582         }
1583         if(state->method->slots) {
1584             DICT_ITERATE_ITEMS(state->method->slots, char*, name, variable_t*, v) {
1585                 if(v->index) {
1586                     multiname_t*mname = multiname_new(namespace_new(ACCESS_PACKAGE, ""), name);
1587                     multiname_t*type = sig2mname(v->type);
1588                     trait_t*t = trait_new_member(&f->body->traits, type, mname, 0);
1589                     t->slot_id = v->index;
1590                 }
1591             }
1592         }
1593
1594         check_code_for_break(body);
1595
1596         /* Seems this works now.
1597         if(state->method->exceptions && state->method->uses_slots) {
1598            as3_warning("try/catch and activation not supported yet within the same method");
1599         }*/
1600
1601         if(f->body) {
1602             f->body->code = body;
1603             f->body->exceptions = state->method->exceptions;
1604         } else { //interface
1605             if(body)
1606                 syntaxerror("interface methods can't have a method body");
1607         }
1608
1609         old_state();
1610         return f;
1611     }
1612         
1613     return 0;
1614 }
1615
1616 void breakjumpsto(code_t*c, char*name, code_t*jump) 
1617 {
1618     while(c) {
1619         if(c->opcode == OPCODE___BREAK__) {
1620             string_t*name2 = c->data[0];
1621             if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1622                 c->opcode = OPCODE_JUMP;
1623                 c->branch = jump;
1624             }
1625         }
1626         c=c->prev;
1627     }
1628 }
1629 void continuejumpsto(code_t*c, char*name, code_t*jump) 
1630 {
1631     while(c) {
1632         if(c->opcode == OPCODE___CONTINUE__) {
1633             string_t*name2 = c->data[0];
1634             if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1635                 c->opcode = OPCODE_JUMP;
1636                 c->branch = jump;
1637             }
1638         }
1639         c = c->prev;
1640     }
1641 }
1642
1643 code_t*converttype(code_t*c, classinfo_t*from, classinfo_t*to)
1644 {
1645     if(from==to)
1646         return c;
1647     if(!to) {
1648         return abc_coerce_a(c);
1649     }
1650     MULTINAME(m, to);
1651     if(!from) {
1652         // cast an "any" type to a specific type. subject to
1653         // runtime exceptions
1654         return abc_coerce2(c, &m);
1655     }
1656     
1657     if((TYPE_IS_NUMBER(from) || TYPE_IS_UINT(from) || TYPE_IS_INT(from)) &&
1658        (TYPE_IS_NUMBER(to) || TYPE_IS_UINT(to) || TYPE_IS_INT(to))) {
1659         // allow conversion between number types
1660         if(TYPE_IS_UINT(to))
1661             return abc_convert_u(c);
1662         else if(TYPE_IS_INT(to))
1663             return abc_convert_i(c);
1664         else if(TYPE_IS_NUMBER(to))
1665             return abc_convert_d(c);
1666         return abc_coerce2(c, &m);
1667     }
1668
1669     if(TYPE_IS_XMLLIST(to) && TYPE_IS_XML(from))
1670         return c;
1671
1672     if(TYPE_IS_BOOLEAN(to))
1673         return abc_convert_b(c);
1674     if(TYPE_IS_STRING(to))
1675         return abc_convert_s(c);
1676     if(TYPE_IS_OBJECT(to))
1677         return abc_coerce2(c, &m);
1678     if(TYPE_IS_OBJECT(from) && TYPE_IS_XMLLIST(to))
1679         return abc_coerce2(c, &m);
1680     if(TYPE_IS_OBJECT(from) && TYPE_IS_ARRAY(to))
1681         return abc_coerce2(c, &m);
1682
1683     classinfo_t*supertype = from;
1684     while(supertype) {
1685         if(supertype == to) {
1686              /* target type is one of from's superclasses.
1687                 (not sure we need this coerce - as far as the verifier
1688                  is concerned, object==object (i think) */
1689              return abc_coerce2(c, &m);
1690         }
1691         int t=0;
1692         while(supertype->interfaces[t]) {
1693             if(supertype->interfaces[t]==to) {
1694                 // target type is one of from's interfaces
1695                 return abc_coerce2(c, &m);
1696             }
1697             t++;
1698         }
1699         supertype = supertype->superclass;
1700     }
1701     if(TYPE_IS_FUNCTION(from) && TYPE_IS_FUNCTION(to))
1702         return c;
1703     if(TYPE_IS_CLASS(from) && TYPE_IS_CLASS(to))
1704         return c;
1705     if(TYPE_IS_NULL(from) && !IS_NUMBER_OR_INT(to))
1706         return c;
1707
1708     as3_error("can't convert type %s%s%s to %s%s%s", 
1709         from->package, from->package[0]?".":"", from->name, 
1710         to->package, to->package[0]?".":"", to->name);
1711
1712     return c;
1713 }
1714 code_t* coerce_to_type(code_t*c, classinfo_t*t)
1715 {
1716     if(!t) {
1717         return abc_coerce_a(c);
1718     } else if(TYPE_IS_STRING(t)) {
1719         return abc_coerce_s(c);
1720     } else {
1721         MULTINAME(m, t);
1722         return abc_coerce2(c, &m);
1723     }
1724 }
1725
1726 char is_pushundefined(code_t*c)
1727 {
1728     return (c && !c->prev && !c->next && c->opcode == OPCODE_PUSHUNDEFINED);
1729 }
1730
1731 static const char* get_package_from_name(const char*name)
1732 {
1733     /* try explicit imports */
1734     dictentry_t* e = dict_get_slot(state->imports, name);
1735     while(e) {
1736         if(!strcmp(e->key, name)) {
1737             slotinfo_t*c = (slotinfo_t*)e->data;
1738             if(c) return c->package;
1739         }
1740         e = e->next;
1741     }
1742     return 0;
1743 }
1744 static namespace_list_t*get_current_imports()
1745 {
1746     namespace_list_t*searchlist = 0;
1747     
1748     list_append(searchlist, namespace_new_package(state->package));
1749
1750     import_list_t*l = state->wildcard_imports;
1751     while(l) {
1752         namespace_t*ns = namespace_new_package(l->import->package);
1753         list_append(searchlist, ns);
1754         l = l->next;
1755     }
1756     list_append(searchlist, namespace_new_package(""));
1757     list_append(searchlist, namespace_new_package(internal_filename_package));
1758     return searchlist;
1759 }
1760
1761 static slotinfo_t* find_class(const char*name)
1762 {
1763     slotinfo_t*c=0;
1764
1765     c = registry_find(state->package, name);
1766     if(c) return c;
1767
1768     /* try explicit imports */
1769     dictentry_t* e = dict_get_slot(state->imports, name);
1770     if(c) return c;
1771     while(e) {
1772         if(!strcmp(e->key, name)) {
1773             c = (slotinfo_t*)e->data;
1774             if(c) return c;
1775         }
1776         e = e->next;
1777     }
1778
1779     /* try package.* imports */
1780     import_list_t*l = state->wildcard_imports;
1781     while(l) {
1782         //printf("does package %s contain a class %s?\n", l->import->package, name);
1783         c = registry_find(l->import->package, name);
1784         if(c) return c;
1785         l = l->next;
1786     }
1787
1788     /* try global package */
1789     c = registry_find("", name);
1790     if(c) return c;
1791   
1792     /* try local "filename" package */
1793     c = registry_find(internal_filename_package, name);
1794     if(c) return c;
1795
1796     return 0;
1797 }
1798 typedcode_t push_class(slotinfo_t*a)
1799 {
1800     typedcode_t x;
1801     x.c = 0;
1802     x.t = 0;
1803     if(a->access == ACCESS_PACKAGEINTERNAL &&
1804        strcmp(a->package, state->package) &&
1805        strcmp(a->package, internal_filename_package)
1806        ) {
1807        syntaxerror("Can't access internal %s %s in package '%s' from package '%s'",
1808             infotypename(a), a->name, a->package, state->package);
1809     }
1810
1811
1812     if(a->kind != INFOTYPE_CLASS) {
1813         MULTINAME(m, a);
1814         x.c = abc_findpropstrict2(x.c, &m);
1815         x.c = abc_getproperty2(x.c, &m);
1816         if(a->kind == INFOTYPE_METHOD) {
1817             methodinfo_t*f = (methodinfo_t*)a;
1818             x.t = TYPE_FUNCTION(f);
1819         } else {
1820             varinfo_t*v = (varinfo_t*)a;
1821             x.t = v->type;
1822         }
1823         return x;
1824     } else {
1825         if(state->cls && state->method == state->cls->static_init) {
1826             /* we're in the static initializer. 
1827                record the fact that we're using this class here */
1828             parsedclass_add_dependency(state->cls->dependencies, (classinfo_t*)a);
1829         }
1830         classinfo_t*c = (classinfo_t*)a;
1831         //if(c->slot) {
1832         if(0) { //Error #1026: Slot 1 exceeds slotCount=0 of global
1833             x.c = abc_getglobalscope(x.c);
1834             x.c = abc_getslot(x.c, c->slot);
1835         } else {
1836             MULTINAME(m, c);
1837             x.c = abc_getlex2(x.c, &m);
1838         }
1839         x.t = TYPE_CLASS(c);
1840     }
1841     return x;
1842 }
1843
1844
1845 char is_break_or_jump(code_t*c)
1846 {
1847     if(!c)
1848         return 0;
1849     if(c->opcode == OPCODE_JUMP ||
1850        c->opcode == OPCODE___BREAK__ ||
1851        c->opcode == OPCODE___CONTINUE__ ||
1852        c->opcode == OPCODE_THROW ||
1853        c->opcode == OPCODE_RETURNVOID ||
1854        c->opcode == OPCODE_RETURNVALUE) {
1855        return 1;
1856     }
1857     return 0;
1858 }
1859
1860 #define IS_FINALLY_TARGET(op) \
1861         ((op) == OPCODE___CONTINUE__ || \
1862          (op) == OPCODE___BREAK__ || \
1863          (op) == OPCODE_RETURNVOID || \
1864          (op) == OPCODE_RETURNVALUE || \
1865          (op) == OPCODE___RETHROW__)
1866
1867 static code_t* insert_finally_lookup(code_t*c, code_t*finally, int tempvar)
1868 {
1869 #define NEED_EXTRA_STACK_ARG
1870     code_t*finally_label = abc_nop(0);
1871     NEW(lookupswitch_t, l);
1872     //_lookupswitch
1873
1874     code_t*i = c;
1875     int count=0;
1876     while(i) {
1877         code_t*prev = i->prev;
1878         if(IS_FINALLY_TARGET(i->opcode)) {
1879            code_t*p = prev;
1880            char needvalue=0;
1881            if(i->opcode == OPCODE___RETHROW__ ||
1882               i->opcode == OPCODE_RETURNVALUE) {
1883                if(i->opcode == OPCODE___RETHROW__)
1884                  i->opcode = OPCODE_THROW;
1885                needvalue=1;
1886                p = abc_coerce_a(p);
1887                p = abc_setlocal(p, tempvar);
1888            }
1889            p = abc_pushbyte(p, count++);
1890            p = abc_jump(p, finally_label);
1891            code_t*target = p = abc_label(p);
1892 #ifdef NEED_EXTRA_STACK_ARG
1893            p = abc_pop(p);
1894 #endif
1895            if(needvalue) {
1896                p = abc_getlocal(p, tempvar);
1897            }
1898
1899            p->next = i;i->prev = p;
1900            list_append(l->targets, target);
1901         }
1902         i = prev;
1903     }
1904
1905     code_t*j,*f;
1906     c = abc_pushbyte(c, -1);
1907     c = code_append(c, finally_label);
1908     c = code_append(c, finally);
1909
1910 #ifdef NEED_EXTRA_STACK_ARG
1911     c = abc_dup(c);
1912 #endif
1913     c = abc_lookupswitch(c, l);
1914     c = l->def = abc_label(c);
1915 #ifdef NEED_EXTRA_STACK_ARG
1916     c = abc_pop(c);
1917 #endif
1918
1919     return c;
1920 }
1921
1922 static code_t* insert_finally_simple(code_t*c, code_t*finally, int tempvar)
1923 {
1924     code_t*i = c;
1925     while(i) {
1926         code_t*prev = i->prev;
1927         if(IS_FINALLY_TARGET(i->opcode)) {
1928            if(i->opcode == OPCODE___RETHROW__)
1929                 i->opcode = OPCODE_THROW;
1930            code_t*end = code_dup(finally);
1931            code_t*start = code_start(end);
1932            if(prev) prev->next = start;
1933            start->prev = prev;
1934            i->prev = end;
1935            end->next = i;
1936         }
1937         i = prev;
1938     }
1939     return code_append(c, finally);
1940 }
1941
1942 code_t* insert_finally(code_t*c, code_t*finally, int tempvar)
1943 {
1944     if(!finally)
1945         return c;
1946     code_t*i = c;
1947     char cantdup=0;
1948     int num_insertion_points=0;
1949     while(i) {
1950         if(IS_FINALLY_TARGET(i->opcode))
1951             num_insertion_points++;
1952         i = i->prev;
1953     }
1954     i = finally;
1955     int code_size=0;
1956     while(i) {
1957         code_size++;
1958         if(i->branch || i->opcode == OPCODE_LOOKUPSWITCH) {
1959             cantdup=1;
1960         }
1961         i = i->prev;
1962     }
1963     int simple_version_cost = (1+num_insertion_points)*code_size;
1964     int lookup_version_cost = 4*num_insertion_points + 5;
1965
1966     if(cantdup || simple_version_cost > lookup_version_cost) {
1967         //printf("(use lookup) simple=%d > lookup=%d\n", simple_version_cost, lookup_version_cost);
1968         return insert_finally_lookup(c, finally, tempvar);
1969     } else {
1970         //printf("(use simple) simple=%d < lookup=%d\n", simple_version_cost, lookup_version_cost);
1971         return insert_finally_simple(c, finally, tempvar);
1972     }
1973 }
1974
1975 #define PASS1 }} if(as3_pass == 1) {{
1976 #define PASS1END }} if(as3_pass == 2) {{
1977 #define PASS2 }} if(as3_pass == 2) {{
1978 #define PASS12 }} if(as3_pass == 1 || as3_pass == 2) {{
1979 #define PASS12END }} if(as3_pass == 2) {{
1980 #define PASS_ALWAYS }} {{
1981
1982
1983
1984 /* Line 273 of skeleton.m4  */
1985 #line 1986 "parser.tab.c"
1986 /* Unqualified %code blocks.  */
1987
1988 /* Line 274 of skeleton.m4  */
1989 #line 2076 "parser.y"
1990
1991     char is_subtype_of(classinfo_t*type, classinfo_t*supertype)
1992     {
1993         return 1; // FIXME
1994     }
1995     char do_init_variable(char*name)
1996     {
1997         if(!state->method->no_variable_scoping)
1998             return 0;
1999         if(!state->new_vars)
2000             return 1;
2001         return 1;
2002     }
2003
2004
2005 /* Line 274 of skeleton.m4  */
2006 #line 2527 "parser.y"
2007
2008     static void state_has_imports()
2009     {
2010         state->wildcard_imports = list_clone(state->wildcard_imports);
2011         state->imports = dict_clone(state->imports);
2012         state->has_own_imports = 1;
2013     }
2014     static void import_toplevel(const char*package)
2015     {
2016         char* s = strdup(package);
2017         while(1) {
2018             dict_put(state->import_toplevel_packages, s, 0);
2019             char*x = strrchr(s, '.');
2020             if(!x)
2021                 break;
2022             *x = 0;
2023         }
2024         free(s);
2025     }
2026
2027
2028 /* Line 274 of skeleton.m4  */
2029 #line 2666 "parser.y"
2030
2031     static int slotstate_varconst = 0;
2032     static modifiers_t*slotstate_flags = 0;
2033     static void setslotstate(modifiers_t* flags, int varconst)
2034     {
2035         slotstate_varconst = varconst;
2036         slotstate_flags = flags;
2037         if(state->cls) {
2038             if(flags) {
2039                 if(flags->flags&FLAG_STATIC) {
2040                     state->method = state->cls->static_init;
2041                 } else {
2042                     state->method = state->cls->init;
2043                 }
2044             } else {
2045                 // reset to "default" state (all in class code is static by default) */
2046                 state->method = state->cls->static_init;
2047             }
2048         } else {
2049             parserassert(state->method);
2050         }
2051     }
2052     static trait_t* add_abc_slot(modifiers_t* modifiers, const char*name, multiname_t*m, code_t***c)
2053     {
2054         int flags = modifiers->flags;
2055         namespace_t ns = modifiers2access(modifiers);
2056
2057         /* slot name */
2058         multiname_t mname = {QNAME, &ns, 0, name};
2059       
2060         trait_list_t**traits;
2061         code_t**code=0;
2062         if(!state->cls) {
2063             // global variable
2064             if(!global->init) global->init = abc_initscript(global->file);
2065             ns.name = state->package;
2066             traits = &global->init->traits;
2067             code = &global->init->method->body->code;
2068         } else if(flags&FLAG_STATIC) {
2069             // static variable
2070             traits = &state->cls->abc->static_traits;
2071             code = &state->cls->static_init->header;
2072         } else {
2073             // instance variable
2074             traits = &state->cls->abc->traits;
2075             code = &state->cls->init->header;
2076             
2077             if(ns.access == ACCESS_PROTECTED) {
2078                 ns.name = concat3(state->cls->info->package,":",state->cls->info->name);
2079             }
2080         }
2081         if(c)
2082             *c = code;
2083         if(m) 
2084             *m = *multiname_clone(&mname);
2085             
2086         return trait_new_member(traits, 0, multiname_clone(&mname), 0);
2087     }
2088
2089
2090 /* Line 274 of skeleton.m4  */
2091 #line 2846 "parser.y"
2092
2093     static int xml_level = 0;
2094
2095
2096 /* Line 274 of skeleton.m4  */
2097 #line 3654 "parser.y"
2098
2099     node_t* var_read(variable_t*v)
2100     {
2101         typedcode_t o;
2102         o.c = abc_getlocal(0, v->index);
2103         o.t = v->type;
2104         return mkcodenode(o);
2105     }
2106
2107     node_t* resolve_identifier(char*name)
2108     {
2109         typedcode_t o;
2110         o.t = 0;
2111         o.c = 0;
2112
2113         slotinfo_t*a = 0;
2114         memberinfo_t*f = 0;
2115
2116         variable_t*v;
2117         /* look at variables */
2118         if((v = find_variable(state, name))) {
2119             // name is a local variable
2120             return var_read(v);
2121         }
2122         if((v = find_slot(state->method, name))) {
2123             o.c = abc_getscopeobject(o.c, 1);
2124             o.c = abc_getslot(o.c, v->index);
2125             o.t = v->type;
2126             return mkcodenode(o);
2127         }
2128
2129         int i_am_static = state->method->is_static;
2130
2131         /* look at current class' members */
2132         if(!state->method->inner && 
2133            !state->xmlfilter &&
2134             state->cls && 
2135             (f = findmember_nsset(state->cls->info, name, 1)))
2136         {
2137             // name is a member or attribute in this class
2138             int var_is_static = (f->flags&FLAG_STATIC);
2139
2140             if(f->kind == INFOTYPE_VAR && (f->flags&FLAG_CONST)) {
2141                 /* if the variable is a constant (and we know what is evaluates to), we
2142                    can just use the value itself */
2143                 varinfo_t*v = (varinfo_t*)f;
2144                 if(v->value) {
2145                     return mkconstnode(v->value);
2146                 }
2147             }
2148            
2149             if(var_is_static >= i_am_static) {
2150                 if(f->kind == INFOTYPE_METHOD) {
2151                     o.t = TYPE_FUNCTION(f);
2152                 } else {
2153                     o.t = f->type;
2154                 }
2155
2156                 if(var_is_static && !i_am_static) {
2157                 /* access to a static member from a non-static location.
2158                    do this via findpropstrict:
2159                    there doesn't seem to be any non-lookup way to access
2160                    static properties of a class */
2161                     state->method->late_binding = 1;
2162                     o.t = f->type;
2163                     namespace_t ns = {f->access, f->package};
2164                     multiname_t m = {QNAME, &ns, 0, name};
2165                     o.c = abc_findpropstrict2(o.c, &m);
2166                     o.c = abc_getproperty2(o.c, &m);
2167                     return mkcodenode(o);
2168                 } else if(f->slot>0) {
2169                     o.c = abc_getlocal_0(o.c);
2170                     o.c = abc_getslot(o.c, f->slot);
2171                     return mkcodenode(o);
2172                 } else {
2173                     MEMBER_MULTINAME(m, f, name);
2174                     o.c = abc_getlocal_0(o.c);
2175                     o.c = abc_getproperty2(o.c, &m);
2176                     return mkcodenode(o);
2177                 }
2178             }
2179         } 
2180         
2181         /* look at actual classes, in the current package and imported */
2182         if(!state->xmlfilter && (a = find_class(name))) {
2183             if(state->cls && state->cls->info == (classinfo_t*)a && i_am_static) {
2184                 o.c = abc_getlocal_0(0);
2185                 o.t = TYPE_CLASS((classinfo_t*)a);
2186             } else {
2187                 o = push_class(a);
2188             }
2189             return mkcodenode(o);
2190         }
2191
2192         /* look through package prefixes */
2193         if(!state->xmlfilter && 
2194            (dict_contains(state->import_toplevel_packages, name) || 
2195             registry_ispackage(name))) {
2196             o.c = abc___pushpackage__(o.c, name);
2197             o.t = 0;
2198             return mkcodenode(o); //?
2199         }
2200
2201         /* unknown object, let the avm2 resolve it */
2202         if(1) {
2203             if(!state->method->inner && !state->xmlfilter) {
2204                 /* we really should make inner functions aware of the class context */
2205                 as3_warning("Couldn't resolve '%s', doing late binding", name);
2206             }
2207             state->method->late_binding = 1;
2208                     
2209             multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, name};
2210
2211             o.t = 0;
2212             o.c = abc_findpropstrict2(o.c, &m);
2213             o.c = abc_getproperty2(o.c, &m);
2214             return mkcodenode(o);
2215         }
2216     }
2217
2218
2219 /* Line 274 of skeleton.m4  */
2220 #line 3805 "parser.y"
2221
2222     void add_active_url(const char*url)
2223     {
2224         NEW(namespace_t,n);
2225         n->name = url;
2226         list_append(state->active_namespace_urls, n);
2227     }
2228
2229
2230
2231 /* Line 274 of skeleton.m4  */
2232 #line 2233 "parser.tab.c"
2233
2234 #ifdef short
2235 # undef short
2236 #endif
2237
2238 #ifdef YYTYPE_UINT8
2239 typedef YYTYPE_UINT8 yytype_uint8;
2240 #else
2241 typedef unsigned char yytype_uint8;
2242 #endif
2243
2244 #ifdef YYTYPE_INT8
2245 typedef YYTYPE_INT8 yytype_int8;
2246 #elif (defined __STDC__ || defined __C99__FUNC__ \
2247      || defined __cplusplus || defined _MSC_VER)
2248 typedef signed char yytype_int8;
2249 #else
2250 typedef short int yytype_int8;
2251 #endif
2252
2253 #ifdef YYTYPE_UINT16
2254 typedef YYTYPE_UINT16 yytype_uint16;
2255 #else
2256 typedef unsigned short int yytype_uint16;
2257 #endif
2258
2259 #ifdef YYTYPE_INT16
2260 typedef YYTYPE_INT16 yytype_int16;
2261 #else
2262 typedef short int yytype_int16;
2263 #endif
2264
2265 #ifndef YYSIZE_T
2266 # ifdef __SIZE_TYPE__
2267 #  define YYSIZE_T __SIZE_TYPE__
2268 # elif defined size_t
2269 #  define YYSIZE_T size_t
2270 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
2271      || defined __cplusplus || defined _MSC_VER)
2272 #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
2273 #  define YYSIZE_T size_t
2274 # else
2275 #  define YYSIZE_T unsigned int
2276 # endif
2277 #endif
2278
2279 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
2280
2281 #ifndef YY_
2282 # if YYENABLE_NLS
2283 #  if ENABLE_NLS
2284 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
2285 #   define YY_(msgid) dgettext ("bison-runtime", msgid)
2286 #  endif
2287 # endif
2288 # ifndef YY_
2289 #  define YY_(msgid) msgid
2290 # endif
2291 #endif
2292
2293 /* Suppress unused-variable warnings by "using" E.  */
2294 #if ! defined lint || defined __GNUC__
2295 # define YYUSE(e) ((void) (e))
2296 #else
2297 # define YYUSE(e) /* empty */
2298 #endif
2299
2300 /* Identity function, used to suppress warnings about constant conditions.  */
2301 #ifndef lint
2302 # define YYID(n) (n)
2303 #else
2304 #if (defined __STDC__ || defined __C99__FUNC__ \
2305      || defined __cplusplus || defined _MSC_VER)
2306 static int
2307 YYID (int yyi)
2308 #else
2309 static int
2310 YYID (yyi)
2311     int yyi;
2312 #endif
2313 {
2314   return yyi;
2315 }
2316 #endif
2317
2318 #if ! defined yyoverflow || YYERROR_VERBOSE
2319
2320 /* The parser invokes alloca or malloc; define the necessary symbols.  */
2321
2322 # ifdef YYSTACK_USE_ALLOCA
2323 #  if YYSTACK_USE_ALLOCA
2324 #   ifdef __GNUC__
2325 #    define YYSTACK_ALLOC __builtin_alloca
2326 #   elif defined __BUILTIN_VA_ARG_INCR
2327 #    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
2328 #   elif defined _AIX
2329 #    define YYSTACK_ALLOC __alloca
2330 #   elif defined _MSC_VER
2331 #    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
2332 #    define alloca _alloca
2333 #   else
2334 #    define YYSTACK_ALLOC alloca
2335 #    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
2336      || defined __cplusplus || defined _MSC_VER)
2337 #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
2338 #     ifndef _STDLIB_H
2339 #      define _STDLIB_H 1
2340 #     endif
2341 #    endif
2342 #   endif
2343 #  endif
2344 # endif
2345
2346 # ifdef YYSTACK_ALLOC
2347    /* Pacify GCC's `empty if-body' warning.  */
2348 #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
2349 #  ifndef YYSTACK_ALLOC_MAXIMUM
2350     /* The OS might guarantee only one guard page at the bottom of the stack,
2351        and a page size can be as small as 4096 bytes.  So we cannot safely
2352        invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
2353        to allow for a few compiler-allocated temporary stack slots.  */
2354 #   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
2355 #  endif
2356 # else
2357 #  define YYSTACK_ALLOC YYMALLOC
2358 #  define YYSTACK_FREE YYFREE
2359 #  ifndef YYSTACK_ALLOC_MAXIMUM
2360 #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
2361 #  endif
2362 #  if (defined __cplusplus && ! defined _STDLIB_H \
2363        && ! ((defined YYMALLOC || defined malloc) \
2364              && (defined YYFREE || defined free)))
2365 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
2366 #   ifndef _STDLIB_H
2367 #    define _STDLIB_H 1
2368 #   endif
2369 #  endif
2370 #  ifndef YYMALLOC
2371 #   define YYMALLOC malloc
2372 #   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
2373      || defined __cplusplus || defined _MSC_VER)
2374 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
2375 #   endif
2376 #  endif
2377 #  ifndef YYFREE
2378 #   define YYFREE free
2379 #   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
2380      || defined __cplusplus || defined _MSC_VER)
2381 void free (void *); /* INFRINGES ON USER NAME SPACE */
2382 #   endif
2383 #  endif
2384 # endif
2385 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
2386
2387
2388 #if (! defined yyoverflow \
2389      && (! defined __cplusplus \
2390          || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
2391
2392 /* A type that is properly aligned for any stack member.  */
2393 union yyalloc
2394 {
2395   yytype_int16 yyss_alloc;
2396   YYSTYPE yyvs_alloc;
2397 };
2398
2399 /* The size of the maximum gap between one aligned stack and the next.  */
2400 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
2401
2402 /* The size of an array large to enough to hold all stacks, each with
2403    N elements.  */
2404 # define YYSTACK_BYTES(N) \
2405      ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
2406       + YYSTACK_GAP_MAXIMUM)
2407
2408 /* Copy COUNT objects from FROM to TO.  The source and destination do
2409    not overlap.  */
2410 # ifndef YYCOPY
2411 #  if defined __GNUC__ && 1 < __GNUC__
2412 #   define YYCOPY(To, From, Count) \
2413       __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
2414 #  else
2415 #   define YYCOPY(To, From, Count)              \
2416       do                                        \
2417         {                                       \
2418           YYSIZE_T yyi;                         \
2419           for (yyi = 0; yyi < (Count); yyi++)   \
2420             (To)[yyi] = (From)[yyi];            \
2421         }                                       \
2422       while (YYID (0))
2423 #  endif
2424 # endif
2425
2426 /* Relocate STACK from its old location to the new one.  The
2427    local variables YYSIZE and YYSTACKSIZE give the old and new number of
2428    elements in the stack, and YYPTR gives the new location of the
2429    stack.  Advance YYPTR to a properly aligned location for the next
2430    stack.  */
2431 # define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
2432     do                                                                  \
2433       {                                                                 \
2434         YYSIZE_T yynewbytes;                                            \
2435         YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
2436         Stack = &yyptr->Stack_alloc;                                    \
2437         yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
2438         yyptr += yynewbytes / sizeof (*yyptr);                          \
2439       }                                                                 \
2440     while (YYID (0))
2441
2442 #endif
2443
2444 /* YYFINAL -- State number of the termination state.  */
2445 #define YYFINAL  165
2446 /* YYLAST -- Last index in YYTABLE.  */
2447 #define YYLAST   3415
2448
2449 /* YYNTOKENS -- Number of terminals.  */
2450 #define YYNTOKENS  136
2451 /* YYNNTS -- Number of nonterminals.  */
2452 #define YYNNTS  135
2453 /* YYNRULES -- Number of rules.  */
2454 #define YYNRULES  355
2455 /* YYNRULES -- Number of states.  */
2456 #define YYNSTATES  603
2457
2458 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
2459 #define YYUNDEFTOK  2
2460 #define YYMAXUTOK   365
2461
2462 #define YYTRANSLATE(YYX)                                                \
2463   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
2464
2465 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
2466 static const yytype_uint8 yytranslate[] =
2467 {
2468        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
2469        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
2470        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
2471        2,     2,     2,   120,     2,     2,     2,   118,   109,     2,
2472      124,   135,   117,   115,   102,   114,   129,   116,     2,     2,
2473        2,     2,     2,     2,     2,     2,     2,     2,   106,   101,
2474      111,   104,   112,   105,   130,     2,     2,     2,     2,     2,
2475        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
2476        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
2477        2,   126,     2,   127,   108,     2,     2,     2,     2,     2,
2478        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
2479        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
2480        2,     2,     2,   128,   107,   134,   119,     2,     2,     2,
2481        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
2482        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
2483        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
2484        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
2485        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
2486        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
2487        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
2488        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
2489        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
2490        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
2491        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
2492        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
2493        2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
2494        5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
2495       15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
2496       25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
2497       35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
2498       45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
2499       55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
2500       65,    66,    67,    68,    69,    70,    71,    72,    73,    74,
2501       75,    76,    77,    78,    79,    80,    81,    82,    83,    84,
2502       85,    86,    87,    88,    89,    90,    91,    92,    93,    94,
2503       95,    96,    97,    98,    99,   100,   103,   110,   113,   121,
2504      122,   123,   125,   131,   132,   133
2505 };
2506
2507 #if YYDEBUG
2508 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
2509    YYRHS.  */
2510 static const yytype_uint16 yyprhs[] =
2511 {
2512        0,     0,     3,     5,     6,     8,    10,    13,    15,    17,
2513       19,    21,    23,    25,    30,    32,    33,    35,    37,    40,
2514       42,    44,    46,    48,    50,    55,    60,    62,    64,    65,
2515       68,    70,    72,    74,    76,    78,    80,    82,    84,    86,
2516       88,    90,    92,    94,    96,   100,   103,   105,   107,   109,
2517      111,   113,   115,   117,   122,   125,   127,   129,   130,   134,
2518      137,   138,   141,   144,   146,   150,   154,   155,   158,   159,
2519      162,   169,   170,   172,   174,   178,   180,   183,   187,   196,
2520      203,   209,   216,   218,   221,   223,   226,   227,   229,   231,
2521      234,   236,   239,   244,   248,   249,   258,   259,   269,   270,
2522      276,   278,   281,   283,   286,   288,   289,   296,   299,   301,
2523      306,   309,   311,   313,   315,   317,   319,   323,   325,   326,
2524      333,   334,   340,   343,   346,   351,   352,   354,   356,   359,
2525      361,   363,   365,   367,   369,   371,   373,   375,   377,   379,
2526      380,   383,   384,   387,   388,   391,   392,   402,   403,   412,
2527      413,   415,   417,   420,   422,   427,   429,   431,   433,   434,
2528      436,   438,   441,   443,   446,   455,   457,   459,   460,   465,
2529      467,   471,   475,   476,   479,   481,   483,   485,   487,   489,
2530      491,   493,   495,   497,   499,   501,   503,   504,   505,   510,
2531      511,   516,   517,   520,   523,   526,   529,   533,   535,   537,
2532      538,   540,   547,   558,   570,   572,   575,   577,   581,   585,
2533      589,   593,   594,   596,   599,   604,   608,   610,   615,   618,
2534      620,   622,   623,   624,   637,   639,   640,   641,   652,   654,
2535      658,   660,   662,   664,   668,   670,   672,   674,   677,   678,
2536      679,   683,   684,   686,   688,   690,   693,   696,   697,   702,
2537      707,   712,   715,   717,   720,   722,   724,   726,   730,   732,
2538      736,   737,   739,   741,   743,   745,   747,   749,   753,   759,
2539      761,   763,   765,   767,   769,   771,   773,   775,   777,   779,
2540      783,   787,   791,   795,   799,   803,   807,   811,   815,   819,
2541      823,   827,   830,   833,   837,   841,   845,   849,   853,   857,
2542      861,   865,   869,   873,   877,   881,   885,   889,   893,   896,
2543      899,   901,   905,   908,   913,   917,   921,   925,   929,   933,
2544      937,   941,   945,   949,   953,   957,   961,   967,   970,   973,
2545      976,   979,   983,   986,   987,   994,   996,   998,  1000,  1002,
2546     1004,  1010,  1014,  1020,  1025,  1030,  1037,  1044,  1048,  1050,
2547     1052,  1055,  1060,  1065,  1068,  1073
2548 };
2549
2550 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
2551 static const yytype_int16 yyrhs[] =
2552 {
2553      137,     0,    -1,   138,    -1,    -1,   139,    -1,   140,    -1,
2554      139,   140,    -1,   188,    -1,   200,    -1,   198,    -1,   234,
2555       -1,   209,    -1,   149,    -1,   151,   128,   138,   134,    -1,
2556      101,    -1,    -1,   142,    -1,   143,    -1,   142,   143,    -1,
2557      200,    -1,   198,    -1,   234,    -1,   209,    -1,   149,    -1,
2558      151,   128,   141,   134,    -1,   126,   150,   261,   127,    -1,
2559      101,    -1,   145,    -1,    -1,   145,   147,    -1,   147,    -1,
2560      269,    -1,   191,    -1,   163,    -1,   164,    -1,   165,    -1,
2561      166,    -1,   173,    -1,   159,    -1,   185,    -1,   181,    -1,
2562      257,    -1,   270,    -1,   268,    -1,   128,   145,   134,    -1,
2563      128,   134,    -1,   101,    -1,   146,    -1,   153,    -1,   167,
2564       -1,   168,    -1,   253,    -1,   183,    -1,   151,   128,   145,
2565      134,    -1,   147,   101,    -1,   147,    -1,   146,    -1,    -1,
2566        3,    91,     3,    -1,   104,   261,    -1,    -1,    46,   154,
2567       -1,    32,   154,    -1,   155,    -1,   154,   102,   155,    -1,
2568        3,   244,   152,    -1,    -1,   157,   148,    -1,    -1,    66,
2569      156,    -1,    65,   124,   255,   135,   156,   158,    -1,    -1,
2570      153,    -1,   257,    -1,    46,     3,   244,    -1,     3,    -1,
2571       11,   124,    -1,    11,    50,   124,    -1,   162,   160,   101,
2572      255,   101,   257,   135,   156,    -1,   162,   161,    69,   255,
2573      135,   156,    -1,    12,   124,   255,   135,   156,    -1,    13,
2574      156,    12,   124,   255,   135,    -1,    67,    -1,    67,     3,
2575       -1,    30,    -1,    30,     3,    -1,    -1,   170,    -1,   172,
2576       -1,   170,   172,    -1,   171,    -1,   170,   171,    -1,    34,
2577      261,   106,   144,    -1,    62,   106,   144,    -1,    -1,    14,
2578      124,   174,   261,   135,   128,   169,   134,    -1,    -1,    33,
2579      124,     3,   244,   135,   176,   128,   144,   134,    -1,    -1,
2580       27,   128,   178,   144,   134,    -1,   175,    -1,   179,   175,
2581       -1,   179,    -1,   179,   177,    -1,   177,    -1,    -1,    52,
2582      128,   182,   144,   134,   180,    -1,    37,   255,    -1,    37,
2583       -1,    39,   124,   255,   135,    -1,   184,   148,    -1,     3,
2584       -1,    17,    -1,    16,    -1,    29,    -1,     4,    -1,   187,
2585      129,   186,    -1,   186,    -1,    -1,    17,   187,   128,   189,
2586      141,   134,    -1,    -1,    17,   128,   190,   141,   134,    -1,
2587       41,     3,    -1,    41,   240,    -1,    41,   187,   129,   117,
2588       -1,    -1,   193,    -1,   194,    -1,   193,   194,    -1,    20,
2589       -1,    21,    -1,    18,    -1,    38,    -1,    47,    -1,    49,
2590       -1,    48,    -1,    25,    -1,    23,    -1,     4,    -1,    -1,
2591       54,   241,    -1,    -1,    54,   242,    -1,    -1,    15,   242,
2592       -1,    -1,   192,    31,     3,   195,   197,   128,   199,   202,
2593      134,    -1,    -1,   192,    44,     3,   196,   128,   201,   205,
2594      134,    -1,    -1,   203,    -1,   204,    -1,   203,   204,    -1,
2595      101,    -1,   151,   128,   202,   134,    -1,   209,    -1,   234,
2596       -1,   146,    -1,    -1,   206,    -1,   207,    -1,   206,   207,
2597       -1,   101,    -1,    46,     3,    -1,   192,    26,   233,     3,
2598      124,   230,   135,   244,    -1,    46,    -1,    32,    -1,    -1,
2599      192,   208,   210,   211,    -1,   212,    -1,   211,   102,   212,
2600       -1,     3,   244,   152,    -1,    -1,   104,   261,    -1,     8,
2601       -1,     9,    -1,    10,    -1,     5,    -1,    56,    -1,    55,
2602       -1,    45,    -1,    28,    -1,    29,    -1,   227,    -1,   111,
2603       -1,   112,    -1,    -1,    -1,   128,   261,   220,   134,    -1,
2604       -1,   128,   261,   222,   134,    -1,    -1,   223,   219,    -1,
2605      223,     5,    -1,   223,   112,    -1,   227,   223,    -1,   224,
2606      227,   223,    -1,     3,    -1,   221,    -1,    -1,   228,    -1,
2607      216,   225,   226,   116,   218,   112,    -1,   216,   225,   226,
2608      217,   223,   111,   116,   225,   218,   112,    -1,   216,   225,
2609      226,   217,   223,   224,   111,   116,   225,   218,   112,    -1,
2610      229,    -1,   228,   229,    -1,   221,    -1,   221,   104,     5,
2611       -1,   221,   104,   221,    -1,     3,   104,   221,    -1,     3,
2612      104,     5,    -1,    -1,   231,    -1,    95,   232,    -1,   231,
2613      102,    95,   232,    -1,   231,   102,   232,    -1,   232,    -1,
2614        3,   106,   243,   213,    -1,     3,   213,    -1,    51,    -1,
2615       35,    -1,    -1,    -1,   192,    26,   233,     3,   124,   230,
2616      135,   244,   128,   235,   144,   134,    -1,     3,    -1,    -1,
2617       -1,    26,   236,   124,   230,   135,   244,   128,   238,   144,
2618      134,    -1,   186,    -1,   187,   129,   186,    -1,   240,    -1,
2619      239,    -1,   241,    -1,   242,   102,   241,    -1,   241,    -1,
2620      117,    -1,    36,    -1,   106,   243,    -1,    -1,    -1,   124,
2621      246,   135,    -1,    -1,   247,    -1,   248,    -1,   254,    -1,
2622      247,   102,    -1,   248,   254,    -1,    -1,    24,   261,   249,
2623      245,    -1,   261,   124,   246,   135,    -1,    53,   124,   246,
2624      135,    -1,    64,   261,    -1,    42,    -1,    42,   255,    -1,
2625      261,    -1,   256,    -1,   261,    -1,   256,   102,   261,    -1,
2626      261,    -1,   257,   102,   261,    -1,    -1,   260,    -1,     3,
2627       -1,     5,    -1,     8,    -1,     9,    -1,    10,    -1,   259,
2628      106,   254,    -1,   260,   102,   259,   106,   254,    -1,   237,
2629       -1,   265,    -1,   250,    -1,   252,    -1,   251,    -1,   266,
2630       -1,   214,    -1,   215,    -1,     6,    -1,    19,    -1,   126,
2631      246,   127,    -1,    71,   258,   134,    -1,   261,   111,   261,
2632       -1,   261,   112,   261,    -1,   261,    76,   261,    -1,   261,
2633       77,   261,    -1,   261,    72,   261,    -1,   261,    73,   261,
2634       -1,   261,    75,   261,    -1,   261,    74,   261,    -1,   261,
2635       89,   261,    -1,   261,    90,   261,    -1,   120,   261,    -1,
2636      119,   261,    -1,   261,   109,   261,    -1,   261,   108,   261,
2637       -1,   261,   107,   261,    -1,   261,    98,   261,    -1,   261,
2638       97,   261,    -1,   261,    96,   261,    -1,   261,   116,   261,
2639       -1,   261,   118,   261,    -1,   261,   115,   261,    -1,   261,
2640      114,   261,    -1,   261,   117,   261,    -1,   261,    69,   261,
2641       -1,   261,    70,   261,    -1,   261,    40,   261,    -1,   261,
2642       68,   261,    -1,    43,   261,    -1,    36,   261,    -1,    36,
2643       -1,   124,   256,   135,    -1,   114,   261,    -1,   261,   126,
2644      261,   127,    -1,   261,    81,   261,    -1,   261,    80,   261,
2645       -1,   261,    87,   261,    -1,   261,    86,   261,    -1,   261,
2646       88,   261,    -1,   261,    79,   261,    -1,   261,    78,   261,
2647       -1,   261,    85,   261,    -1,   261,    82,   261,    -1,   261,
2648       83,   261,    -1,   261,    84,   261,    -1,   261,   104,   261,
2649       -1,   261,   105,   261,   106,   261,    -1,   261,    93,    -1,
2650      261,    92,    -1,    93,   261,    -1,    92,   261,    -1,    53,
2651      129,     3,    -1,   130,     3,    -1,    -1,   261,   129,   124,
2652      262,   261,   135,    -1,     3,    -1,   117,    -1,     4,    -1,
2653      186,    -1,   117,    -1,   261,   129,   263,    91,   264,    -1,
2654      261,    94,   264,    -1,   261,   129,   126,   261,   127,    -1,
2655      261,   129,   130,   264,    -1,   261,    94,   130,   264,    -1,
2656      261,   129,   130,   126,   261,   127,    -1,   261,    94,   130,
2657      126,   261,   127,    -1,   261,   129,   264,    -1,     4,    -1,
2658        3,    -1,    16,     3,    -1,    16,     3,   104,     3,    -1,
2659       16,     3,   104,     5,    -1,   192,   267,    -1,    63,    16,
2660      104,   261,    -1,    22,    16,   241,    -1
2661 };
2662
2663 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
2664 static const yytype_uint16 yyrline[] =
2665 {
2666        0,  1967,  1967,  1969,  1969,  1970,  1971,  1973,  1974,  1975,
2667     1976,  1977,  1978,  1979,  1980,  1982,  1982,  1983,  1984,  1986,
2668     1987,  1988,  1989,  1990,  1991,  1992,  1993,  1995,  1996,  1998,
2669     2001,  2004,  2005,  2006,  2007,  2008,  2009,  2010,  2011,  2012,
2670     2013,  2014,  2015,  2016,  2017,  2018,  2021,  2022,  2023,  2024,
2671     2025,  2026,  2027,  2028,  2040,  2041,  2045,  2056,  2064,  2091,
2672     2092,  2094,  2095,  2097,  2098,  2100,  2161,  2161,  2165,  2166,
2673     2169,  2185,  2186,  2187,  2192,  2196,  2201,  2202,  2204,  2224,
2674     2268,  2284,  2296,  2299,  2302,  2305,  2309,  2310,  2311,  2312,
2675     2313,  2314,  2316,  2327,  2330,  2330,  2361,  2361,  2386,  2386,
2676     2402,  2403,  2404,  2405,  2413,  2422,  2422,  2471,  2475,  2486,
2677     2496,  2513,  2514,  2515,  2516,  2517,  2519,  2520,  2522,  2522,
2678     2524,  2524,  2548,  2556,  2567,  2583,  2584,  2585,  2586,  2593,
2679     2594,  2595,  2596,  2597,  2598,  2599,  2600,  2601,  2602,  2606,
2680     2607,  2609,  2610,  2612,  2613,  2617,  2615,  2623,  2621,  2630,
2681     2631,  2632,  2633,  2634,  2635,  2636,  2637,  2639,  2645,  2646,
2682     2647,  2648,  2649,  2650,  2653,  2726,  2726,  2728,  2728,  2730,
2683     2731,  2733,  2817,  2818,  2827,  2828,  2831,  2832,  2833,  2834,
2684     2835,  2836,  2837,  2850,  2861,  2862,  2863,  2865,  2865,  2868,
2685     2868,  2871,  2872,  2875,  2880,  2883,  2886,  2889,  2892,  2896,
2686     2899,  2903,  2907,  2912,  2918,  2921,  2924,  2927,  2932,  2935,
2687     2938,  2948,  2952,  2958,  2964,  2972,  2977,  2983,  2991,  2999,
2688     3000,  3001,  3004,  3003,  3020,  3021,  3023,  3022,  3046,  3065,
2689     3079,  3080,  3082,  3083,  3085,  3086,  3087,  3096,  3097,  3101,
2690     3102,  3104,  3105,  3106,  3108,  3112,  3113,  3118,  3119,  3166,
2691     3216,  3237,  3259,  3262,  3269,  3272,  3275,  3278,  3281,  3284,
2692     3289,  3290,  3292,  3293,  3294,  3295,  3296,  3298,  3304,  3313,
2693     3314,  3315,  3316,  3317,  3318,  3320,  3324,  3329,  3347,  3358,
2694     3368,  3377,  3378,  3379,  3380,  3381,  3382,  3383,  3384,  3385,
2695     3386,  3387,  3388,  3389,  3390,  3391,  3392,  3393,  3394,  3395,
2696     3396,  3397,  3398,  3399,  3400,  3401,  3402,  3403,  3404,  3405,
2697     3406,  3407,  3408,  3409,  3410,  3411,  3412,  3413,  3414,  3415,
2698     3416,  3417,  3418,  3419,  3420,  3421,  3422,  3424,  3425,  3426,
2699     3427,  3429,  3444,  3452,  3452,  3506,  3507,  3508,  3509,  3510,
2700     3518,  3536,  3543,  3554,  3561,  3568,  3578,  3589,  3776,  3780,
2701     3814,  3821,  3828,  3835,  3857,  3863
2702 };
2703 #endif
2704
2705 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
2706 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
2707    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
2708 static const char *const yytname[] =
2709 {
2710   "$end", "error", "$undefined", "T_IDENTIFIER", "T_NAMESPACE",
2711   "T_STRING", "T_REGEXP", "T_EMPTY", "T_INT", "T_UINT", "T_FLOAT",
2712   "\"for\"", "\"while\"", "\"do\"", "\"switch\"", "\"implements\"",
2713   "\"namespace\"", "\"package\"", "\"protected\"", "\"arguments\"",
2714   "\"public\"", "\"private\"", "\"use\"", "\"internal\"", "\"new\"",
2715   "\"native\"", "\"function\"", "\"finally\"", "\"undefined\"", "\"NaN\"",
2716   "\"continue\"", "\"class\"", "\"const\"", "\"catch\"", "\"case\"",
2717   "\"set\"", "\"void\"", "\"throw\"", "\"static\"", "\"with\"",
2718   "\"instanceof\"", "\"import\"", "\"return\"", "\"typeof\"",
2719   "\"interface\"", "\"null\"", "\"var\"", "\"dynamic\"", "\"override\"",
2720   "\"final\"", "\"each\"", "\"get\"", "\"try\"", "\"super\"",
2721   "\"extends\"", "\"false\"", "\"true\"", "\"Boolean\"", "\"uint\"",
2722   "\"int\"", "\"Number\"", "\"String\"", "\"default\"", "\"default xml\"",
2723   "\"delete\"", "\"if\"", "\"else\"", "\"break\"", "\"is\"", "\"in\"",
2724   "\"as\"", "\"{ (dictionary)\"", "\"==\"", "\"===\"", "\"!=\"", "\"!==\"",
2725   "\"<=\"", "\">=\"", "\"|=\"", "\"/=\"", "\"%=\"", "\"*=\"", "\"&=\"",
2726   "\"+=\"", "\"-=\"", "\"^=\"", "\">>=\"", "\"<<=\"", "\">>>=\"", "\"||\"",
2727   "\"&&\"", "\"::\"", "\"--\"", "\"++\"", "\"..\"", "\"...\"", "\"<<\"",
2728   "\">>>\"", "\">>\"", "prec_none", "below_semicolon", "';'", "','",
2729   "below_assignment", "'='", "'?'", "':'", "'|'", "'^'", "'&'", "below_lt",
2730   "'<'", "'>'", "below_minus", "'-'", "'+'", "'/'", "'*'", "'%'", "'~'",
2731   "'!'", "minusminus_prefix", "plusplus_prefix", "below_curly", "'('",
2732   "new2", "'['", "']'", "'{'", "'.'", "'@'", "above_identifier",
2733   "below_else", "above_function", "'}'", "')'", "$accept", "PROGRAM",
2734   "MAYBE_PROGRAM_CODE_LIST", "PROGRAM_CODE_LIST", "PROGRAM_CODE",
2735   "MAYBE_INPACKAGE_CODE_LIST", "INPACKAGE_CODE_LIST", "INPACKAGE_CODE",
2736   "MAYBECODE", "CODE", "CODE_STATEMENT", "CODEPIECE", "CODEBLOCK",
2737   "PACKAGE_INITCODE", "EMBED_START", "CONDITIONAL_COMPILATION",
2738   "MAYBEEXPRESSION", "VARIABLE_DECLARATION", "VARIABLE_LIST",
2739   "ONE_VARIABLE", "IF_CODEBLOCK", "$@1", "MAYBEELSE", "IF", "FOR_INIT",
2740   "FOR_IN_INIT", "FOR_START", "FOR", "FOR_IN", "WHILE", "DO_WHILE",
2741   "BREAK", "CONTINUE", "MAYBE_CASE_LIST", "CASE_LIST", "CASE", "DEFAULT",
2742   "SWITCH", "$@2", "CATCH", "$@3", "FINALLY", "$@4", "CATCH_LIST",
2743   "CATCH_FINALLY_LIST", "TRY", "$@5", "THROW", "WITH_HEAD", "WITH",
2744   "X_IDENTIFIER", "PACKAGE", "PACKAGE_DECLARATION", "$@6", "$@7", "IMPORT",
2745   "MAYBE_MODIFIERS", "MODIFIER_LIST", "MODIFIER", "EXTENDS",
2746   "EXTENDS_LIST", "IMPLEMENTS_LIST", "CLASS_DECLARATION", "$@8",
2747   "INTERFACE_DECLARATION", "$@9", "MAYBE_CLASS_BODY", "CLASS_BODY",
2748   "CLASS_BODY_ITEM", "MAYBE_INTERFACE_BODY", "INTERFACE_BODY",
2749   "IDECLARATION", "VARCONST", "SLOT_DECLARATION", "$@10", "SLOT_LIST",
2750   "ONE_SLOT", "MAYBECONSTANT", "CONSTANT", "XML", "OPEN", "CLOSE",
2751   "CLOSE2", "XMLEXPR1", "$@11", "XMLEXPR2", "$@12", "XMLTEXT", "XML2",
2752   "XML_ID_OR_EXPR", "MAYBE_XMLATTRIBUTES", "XMLNODE", "XMLATTRIBUTES",
2753   "XMLATTRIBUTE", "MAYBE_PARAM_LIST", "PARAM_LIST", "PARAM", "GETSET",
2754   "FUNCTION_DECLARATION", "$@13", "MAYBE_IDENTIFIER", "INNERFUNCTION",
2755   "$@14", "CLASS", "PACKAGEANDCLASS", "CLASS_SPEC", "CLASS_SPEC_LIST",
2756   "TYPE", "MAYBETYPE", "MAYBE_PARAM_VALUES", "MAYBE_EXPRESSION_LIST",
2757   "EXPRESSION_LIST", "EXPRESSION_LIST_AND_COMMA", "XX", "NEW",
2758   "FUNCTIONCALL", "DELETE", "RETURN", "NONCOMMAEXPRESSION", "EXPRESSION",
2759   "COMMA_EXPRESSION", "VOIDEXPRESSION", "MAYBE_DICT_EXPRPAIR_LIST",
2760   "DICTLH", "DICT_EXPRPAIR_LIST", "E", "$@15", "ID_OR_NS", "SUBNODE",
2761   "MEMBER", "VAR_READ", "NAMESPACE_ID", "NAMESPACE_DECLARATION",
2762   "DEFAULT_NAMESPACE", "USE_NAMESPACE", 0
2763 };
2764 #endif
2765
2766 # ifdef YYPRINT
2767 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
2768    token YYLEX-NUM.  */
2769 static const yytype_uint16 yytoknum[] =
2770 {
2771        0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
2772      265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
2773      275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
2774      285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
2775      295,   296,   297,   298,   299,   300,   301,   302,   303,   304,
2776      305,   306,   307,   308,   309,   310,   311,   312,   313,   314,
2777      315,   316,   317,   318,   319,   320,   321,   322,   323,   324,
2778      325,   326,   327,   328,   329,   330,   331,   332,   333,   334,
2779      335,   336,   337,   338,   339,   340,   341,   342,   343,   344,
2780      345,   346,   347,   348,   349,   350,   351,   352,   353,   354,
2781      355,    59,    44,   356,    61,    63,    58,   124,    94,    38,
2782      357,    60,    62,   358,    45,    43,    47,    42,    37,   126,
2783       33,   359,   360,   361,    40,   362,    91,    93,   123,    46,
2784       64,   363,   364,   365,   125,    41
2785 };
2786 # endif
2787
2788 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
2789 static const yytype_uint16 yyr1[] =
2790 {
2791        0,   136,   137,   138,   138,   139,   139,   140,   140,   140,
2792      140,   140,   140,   140,   140,   141,   141,   142,   142,   143,
2793      143,   143,   143,   143,   143,   143,   143,   144,   144,   145,
2794      145,   146,   146,   146,   146,   146,   146,   146,   146,   146,
2795      146,   146,   146,   146,   146,   146,   147,   147,   147,   147,
2796      147,   147,   147,   147,   148,   148,   149,   150,   151,   152,
2797      152,   153,   153,   154,   154,   155,   157,   156,   158,   158,
2798      159,   160,   160,   160,   161,   161,   162,   162,   163,   164,
2799      165,   166,   167,   167,   168,   168,   169,   169,   169,   169,
2800      170,   170,   171,   172,   174,   173,   176,   175,   178,   177,
2801      179,   179,   180,   180,   180,   182,   181,   183,   183,   184,
2802      185,   186,   186,   186,   186,   186,   187,   187,   189,   188,
2803      190,   188,   191,   191,   191,   192,   192,   193,   193,   194,
2804      194,   194,   194,   194,   194,   194,   194,   194,   194,   195,
2805      195,   196,   196,   197,   197,   199,   198,   201,   200,   202,
2806      202,   203,   203,   204,   204,   204,   204,   204,   205,   205,
2807      206,   206,   207,   207,   207,   208,   208,   210,   209,   211,
2808      211,   212,   213,   213,   214,   214,   214,   214,   214,   214,
2809      214,   214,   214,   215,   216,   217,   218,   220,   219,   222,
2810      221,   223,   223,   223,   223,   224,   224,   225,   225,   226,
2811      226,   227,   227,   227,   228,   228,   229,   229,   229,   229,
2812      229,   230,   230,   230,   230,   231,   231,   232,   232,   233,
2813      233,   233,   235,   234,   236,   236,   238,   237,   239,   240,
2814      241,   241,   242,   242,   243,   243,   243,   244,   244,   245,
2815      245,   246,   246,   246,   247,   248,   247,   249,   250,   251,
2816      251,   252,   253,   253,   254,   255,   256,   256,   257,   257,
2817      258,   258,   259,   259,   259,   259,   259,   260,   260,   261,
2818      261,   261,   261,   261,   261,   261,   261,   261,   261,   261,
2819      261,   261,   261,   261,   261,   261,   261,   261,   261,   261,
2820      261,   261,   261,   261,   261,   261,   261,   261,   261,   261,
2821      261,   261,   261,   261,   261,   261,   261,   261,   261,   261,
2822      261,   261,   261,   261,   261,   261,   261,   261,   261,   261,
2823      261,   261,   261,   261,   261,   261,   261,   261,   261,   261,
2824      261,   261,   261,   262,   261,   263,   263,   263,   264,   264,
2825      261,   261,   261,   261,   261,   261,   261,   265,   266,   266,
2826      267,   267,   267,   268,   269,   270
2827 };
2828
2829 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
2830 static const yytype_uint8 yyr2[] =
2831 {
2832        0,     2,     1,     0,     1,     1,     2,     1,     1,     1,
2833        1,     1,     1,     4,     1,     0,     1,     1,     2,     1,
2834        1,     1,     1,     1,     4,     4,     1,     1,     0,     2,
2835        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
2836        1,     1,     1,     1,     3,     2,     1,     1,     1,     1,
2837        1,     1,     1,     4,     2,     1,     1,     0,     3,     2,
2838        0,     2,     2,     1,     3,     3,     0,     2,     0,     2,
2839        6,     0,     1,     1,     3,     1,     2,     3,     8,     6,
2840        5,     6,     1,     2,     1,     2,     0,     1,     1,     2,
2841        1,     2,     4,     3,     0,     8,     0,     9,     0,     5,
2842        1,     2,     1,     2,     1,     0,     6,     2,     1,     4,
2843        2,     1,     1,     1,     1,     1,     3,     1,     0,     6,
2844        0,     5,     2,     2,     4,     0,     1,     1,     2,     1,
2845        1,     1,     1,     1,     1,     1,     1,     1,     1,     0,
2846        2,     0,     2,     0,     2,     0,     9,     0,     8,     0,
2847        1,     1,     2,     1,     4,     1,     1,     1,     0,     1,
2848        1,     2,     1,     2,     8,     1,     1,     0,     4,     1,
2849        3,     3,     0,     2,     1,     1,     1,     1,     1,     1,
2850        1,     1,     1,     1,     1,     1,     0,     0,     4,     0,
2851        4,     0,     2,     2,     2,     2,     3,     1,     1,     0,
2852        1,     6,    10,    11,     1,     2,     1,     3,     3,     3,
2853        3,     0,     1,     2,     4,     3,     1,     4,     2,     1,
2854        1,     0,     0,    12,     1,     0,     0,    10,     1,     3,
2855        1,     1,     1,     3,     1,     1,     1,     2,     0,     0,
2856        3,     0,     1,     1,     1,     2,     2,     0,     4,     4,
2857        4,     2,     1,     2,     1,     1,     1,     3,     1,     3,
2858        0,     1,     1,     1,     1,     1,     1,     3,     5,     1,
2859        1,     1,     1,     1,     1,     1,     1,     1,     1,     3,
2860        3,     3,     3,     3,     3,     3,     3,     3,     3,     3,
2861        3,     2,     2,     3,     3,     3,     3,     3,     3,     3,
2862        3,     3,     3,     3,     3,     3,     3,     3,     2,     2,
2863        1,     3,     2,     4,     3,     3,     3,     3,     3,     3,
2864        3,     3,     3,     3,     3,     3,     5,     2,     2,     2,
2865        2,     3,     2,     0,     6,     1,     1,     1,     1,     1,
2866        5,     3,     5,     4,     4,     6,     6,     3,     1,     1,
2867        2,     4,     4,     2,     4,     3
2868 };
2869
2870 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
2871    STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
2872    means the default is an error.  */
2873 static const yytype_uint16 yydefact[] =
2874 {
2875      125,   349,   348,   177,   277,   174,   175,   176,     0,     0,
2876       66,     0,     0,   131,   278,   129,   130,     0,   137,     0,
2877      136,   225,   181,   182,   310,   132,     0,     0,     0,   180,
2878      133,   135,   134,     0,     0,   179,   178,     0,     0,     0,
2879      260,     0,     0,    14,   184,     0,     0,     0,     0,   241,
2880      125,     0,     0,     2,   125,     5,    56,    12,     0,    38,
2881       71,    33,    34,    35,    36,    37,    40,   125,    39,     7,
2882       32,     0,   126,   127,     9,     8,    11,   275,   276,     0,
2883      183,    10,   269,   271,   273,   272,    41,   258,   270,   274,
2884       43,    31,    42,     0,     0,    76,     0,     0,   125,    94,
2885      111,   115,   113,   112,   114,   120,   117,     0,     0,   349,
2886      348,   247,   224,     0,   309,     0,   122,     0,   123,   308,
2887      105,   241,     0,     0,   251,     0,   262,   263,   264,   265,
2888      266,     0,     0,   261,   330,   329,   312,   292,   291,     0,
2889      256,     0,   242,   243,   244,   254,    84,     0,   108,   252,
2890        0,    82,    46,    45,   125,    47,    30,     0,    48,    49,
2891       50,    52,     0,    51,   332,     1,     6,   125,   349,     0,
2892       72,     0,     0,    73,    55,   110,     0,   221,     0,   166,
2893        0,   165,   167,   353,   138,   128,   197,     0,   198,   199,
2894        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2895        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2896        0,     0,     0,     0,   328,   327,     0,     0,     0,     0,
2897        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2898        0,     0,   241,     0,     0,    58,    77,     0,   255,     0,
2899       67,     0,   125,   118,     0,   228,     0,   231,   230,   355,
2900      239,   211,     0,     0,    28,     0,   331,     0,     0,   280,
2901        0,     0,     0,   311,   279,   245,   246,    85,   238,    62,
2902       63,   107,   253,    61,    83,    44,    29,   125,     0,   238,
2903        0,     0,    54,   350,   220,   219,     0,   139,   141,     0,
2904      189,     0,   206,     0,   200,   204,   259,   306,   307,   304,
2905      305,   285,   286,   288,   287,   283,   284,   320,   319,   315,
2906      314,   322,   323,   324,   321,   317,   316,   318,   289,   290,
2907      339,     0,   338,   341,   298,   297,   296,   325,     0,   295,
2908      294,   293,   281,   282,   302,   301,   299,   303,   300,     0,
2909        0,   111,   115,   339,   333,     0,     0,     0,   347,    66,
2910        0,     0,    26,    57,     0,   125,    17,    23,     0,    20,
2911       19,    22,    21,   125,   116,     0,   241,   248,   172,     0,
2912        0,   212,   216,   109,   124,   229,     0,    27,   250,   354,
2913       66,   267,     0,   257,     0,    60,     0,   125,    13,    60,
2914        0,     0,     0,     0,     0,   143,     0,     0,   238,   168,
2915      169,     0,     0,     0,   185,   186,   191,   205,     0,   344,
2916        0,   249,   313,     0,     0,     0,   343,     0,    80,     0,
2917        0,     0,   121,    18,   125,     0,     0,     0,     0,   218,
2918      213,   238,     0,     0,    68,     0,   236,   235,   234,   237,
2919        0,    65,    64,    53,     0,    66,   351,   352,   211,   140,
2920        0,     0,   232,   142,   147,    60,     0,   190,   210,   209,
2921      207,   208,     0,     0,     0,   326,     0,   342,     0,   340,
2922       81,    86,     0,     0,   119,   240,   173,   172,     0,     0,
2923      215,     0,     0,   100,   104,   102,   106,    66,    70,   268,
2924       59,     0,    79,     0,   144,   145,     0,   125,   171,   170,
2925      201,   193,   184,   194,     0,   192,     0,   191,   346,   334,
2926      345,     0,     0,     0,    87,    90,    88,    25,    24,   217,
2927      226,   214,    98,     0,   101,   103,    69,    66,   238,   125,
2928      233,     0,   162,     0,     0,   125,   160,     0,   187,   184,
2929      191,   195,     0,    28,    95,    91,    89,    28,    28,   238,
2930       78,     0,   153,   157,     0,     0,     0,   125,   151,   155,
2931      156,   163,   221,   148,   161,   186,     0,     0,   196,    28,
2932       93,     0,     0,     0,   222,   125,   146,   152,     0,     0,
2933      188,   186,    92,   227,    99,    96,    28,     0,     0,   202,
2934        0,     0,     0,   154,   211,   203,    28,   223,     0,     0,
2935      238,    97,   164
2936 };
2937
2938 /* YYDEFGOTO[NTERM-NUM].  */
2939 static const yytype_int16 yydefgoto[] =
2940 {
2941       -1,    52,    53,    54,    55,   354,   355,   356,   376,   377,
2942      155,   156,   175,   357,   421,   157,   441,   158,   273,   270,
2943       97,    98,   488,    59,   171,   172,    60,    61,    62,    63,
2944       64,   159,   160,   513,   514,   515,   516,    65,   241,   483,
2945      591,   484,   548,   485,   486,    66,   254,   161,    67,    68,
2946      245,   246,    69,   363,   242,    70,   162,    72,    73,   395,
2947      397,   451,   359,   529,   360,   497,   556,   557,   558,   534,
2948      535,   536,   182,   361,   289,   399,   400,   429,    77,    78,
2949       79,   406,   462,   505,   566,   188,   401,   463,   506,   189,
2950      293,    80,   294,   295,   370,   371,   372,   286,   362,   586,
2951      113,    82,   547,   247,   248,   438,   453,   439,   385,   367,
2952      141,   142,   143,   250,    83,    84,    85,   163,   144,   237,
2953      238,    86,   131,   132,   133,    87,   413,   347,   323,    88,
2954       89,   183,    90,    91,    92
2955 };
2956
2957 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
2958    STATE-NUM.  */
2959 #define YYPACT_NINF -487
2960 static const yytype_int16 yypact[] =
2961 {
2962     1768,   -22,   518,  -487,  -487,  -487,  -487,  -487,   -28,   -46,
2963     -487,   -44,    95,  -487,  -487,  -487,  -487,    71,  -487,  2224,
2964     -487,   102,  -487,  -487,  2281,  -487,   -17,   378,  2224,  -487,
2965     -487,  -487,  -487,    -5,  -101,  -487,  -487,   128,  2224,    39,
2966      334,  2224,  2224,  -487,  -487,  2224,  2224,  2224,  2224,  2224,
2967      712,   169,   176,  -487,   580,  -487,  -487,  -487,    94,  -487,
2968     2152,  -487,  -487,  -487,  -487,  -487,  -487,  2024,  -487,  -487,
2969     -487,   353,   396,  -487,  -487,  -487,  -487,  -487,  -487,    14,
2970     -487,  -487,  -487,  -487,  -487,  -487,   124,  2914,  -487,  -487,
2971     -487,  -487,  -487,   228,   111,  -487,  2224,   229,  2024,  -487,
2972     -487,  -487,  -487,  -487,  -487,  -487,  -487,    27,   676,  -487,
2973     -487,   -35,  -487,   125,   312,  2224,   126,   132,  -487,   312,
2974     -487,  2224,   251,   158,   312,  2224,  -487,  -487,  -487,  -487,
2975     -487,   129,   161,   168,   312,   312,   677,   312,   312,   -40,
2976     2852,   149,   175,  2224,  -487,  2852,   276,   277,  2224,  2224,
2977      277,   281,  -487,  -487,   844,  -487,  -487,   154,  -487,  -487,
2978     -487,  -487,   270,  -487,  -487,  -487,  -487,  1108,   223,   291,
2979     -487,   194,   227,   124,   197,  -487,   300,    65,   302,  -487,
2980      304,  -487,  -487,  -487,  -487,  -487,  -487,  2224,  -487,    18,
2981     2224,  2224,  2224,  2224,  2224,  2224,  2224,  2224,  2224,  2224,
2982     2224,  2224,  2224,  2224,  2224,  2224,  2224,  2224,  2224,  2224,
2983     2224,  2224,  2224,  2224,  -487,  -487,    36,  2224,  2224,  2224,
2984     2224,  2224,  2224,  2224,  2224,  2224,  2224,  2224,  2224,  2224,
2985     2224,  2224,  2224,  2224,    15,  -487,  -487,   173,   212,   191,
2986     -487,  2224,  1240,  -487,   676,   187,   189,  -487,  -487,  -487,
2987      198,    40,   188,    85,  1896,   196,  -487,  2224,   199,  -487,
2988     2224,   334,  2224,  -487,  -487,  -487,  -487,  -487,   230,   233,
2989     -487,  -487,  -487,   233,  -487,  -487,  -487,  2024,   206,   230,
2990     2224,  2224,  -487,   241,  -487,  -487,   347,   305,   313,   365,
2991     2852,   266,   267,    46,    18,  -487,  2852,  1100,   572,   572,
2992      572,  3286,  3286,  3286,  3286,  1100,  1100,  2852,  2852,  2852,
2993     2852,  2852,  2852,  2852,  2852,  2852,  2852,  2852,  2976,  3038,
2994     -487,   148,  -487,  -487,   195,   195,   195,  2852,   397,  3100,
2995     3162,  3224,  1100,  1100,   677,   677,   312,   312,   312,   238,
2996     2480,   295,   296,   297,  -487,  2224,   235,   298,  -487,  -487,
2997     2224,  2340,  -487,   264,   274,  1372,  -487,  -487,   282,  -487,
2998     -487,  -487,  -487,  1240,  -487,   676,  2224,  -487,   -36,   408,
2999      283,   310,  -487,  -487,  -487,   293,   286,  1896,  -487,  2852,
3000     -487,  -487,   321,  2852,    57,   326,   277,   976,  -487,     6,
3001      330,   307,    74,   308,   676,   418,   676,   311,   230,   333,
3002     -487,   306,    19,    20,  -487,  -487,  -487,  -487,  2224,  -487,
3003     2224,  -487,  -487,  2224,  2542,  2224,  -487,   243,  -487,   314,
3004      318,  2224,  -487,  -487,  1240,   316,   317,  2224,    57,  -487,
3005     -487,   230,    43,   116,   381,  2224,  -487,  -487,  -487,  -487,
3006     2224,  -487,  -487,  -487,  2224,  -487,  -487,  -487,    40,  -487,
3007      676,   320,  -487,   349,  -487,   326,   365,  -487,  -487,  -487,
3008     -487,  -487,   341,    22,  2604,  2852,  2410,  -487,  2666,  -487,
3009     -487,    42,  2728,   322,  -487,  -487,  2852,   351,   329,   408,
3010     -487,   331,   336,  -487,  -487,   116,  -487,  -487,  -487,  -487,
3011     2852,   -20,  -487,   323,   349,  -487,   676,   279,  -487,  -487,
3012     -487,  -487,   345,  -487,  2224,  -487,   352,  -487,  -487,  -487,
3013     -487,  2224,   358,   354,    42,  -487,  -487,  -487,  -487,  -487,
3014     -487,  -487,  -487,   465,  -487,  -487,  -487,  -487,   230,  1504,
3015     -487,   493,  -487,   472,   366,   328,  -487,    14,  2852,   391,
3016     -487,    45,  2790,  1896,  -487,  -487,  -487,  1896,  1896,   230,
3017     -487,   382,  -487,  -487,   388,   346,   383,  1636,  -487,  -487,
3018     -487,  -487,    65,  -487,  -487,  -487,   384,    14,    45,  1896,
3019     -487,   385,   386,   389,  -487,  1504,  -487,  -487,   522,   415,
3020     -487,  -487,  -487,  -487,  -487,  -487,  1896,   394,   413,  -487,
3021      428,   414,   411,  -487,    40,  -487,  1896,  -487,   412,   417,
3022      230,  -487,  -487
3023 };
3024
3025 /* YYPGOTO[NTERM-NUM].  */
3026 static const yytype_int16 yypgoto[] =
3027 {
3028     -487,  -487,   379,  -487,   494,  -318,  -487,   200,  -311,   -37,
3029        1,   -57,   454,    63,  -487,     2,    98,   503,   407,   182,
3030     -221,  -487,  -487,  -487,  -487,  -487,  -487,  -487,  -487,  -487,
3031     -487,  -487,  -487,  -487,  -487,    55,    56,  -487,  -487,    86,
3032     -487,    87,  -487,  -487,  -487,  -487,  -487,  -487,  -487,  -487,
3033       37,   113,  -487,  -487,  -487,  -487,     0,  -487,   501,  -487,
3034     -487,  -487,    66,  -487,    67,  -487,    -1,  -487,    24,  -487,
3035     -487,    47,  -487,     3,  -487,  -487,   131,   118,  -487,  -487,
3036     -487,  -487,  -473,  -487,  -487,  -175,  -487,  -422,  -487,  -486,
3037     -487,  -416,  -487,   319,  -433,  -487,  -349,    34,     4,  -487,
3038     -487,  -487,  -487,  -487,   579,  -103,   157,   183,  -271,  -487,
3039     -110,  -487,  -487,  -487,  -487,  -487,  -487,  -487,  -134,   -77,
3040      562,   -54,  -487,   356,  -487,   -12,  -487,  -487,  -192,  -487,
3041     -487,  -487,  -487,  -487,  -487
3042 };
3043
3044 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
3045    positive, shift that token.  If negative, reduce the rule which
3046    number is the opposite.  If zero, do what YYDEFACT says.
3047    If YYTABLE_NINF, syntax error.  */
3048 #define YYTABLE_NINF -338
3049 static const yytype_int16 yytable[] =
3050 {
3051       71,    56,    58,    76,    81,   249,   173,   111,   389,   266,
3052      174,   255,   114,   154,   292,   493,   119,   186,   341,   342,
3053      430,   291,    94,   121,   458,   460,   124,   501,   122,   134,
3054      135,   102,   103,   136,   137,   138,   140,   145,   252,   100,
3055      101,   174,   348,   368,   104,   425,   368,   507,   258,   106,
3056      501,   565,   102,   103,    71,    56,    58,    76,    81,   216,
3057      100,   101,   262,    57,   106,   104,    74,    75,   427,    93,
3058      428,   271,   272,   102,   103,   -74,   511,   446,    96,   447,
3059       99,   581,   190,   480,   140,   541,   104,   108,   100,   101,
3060      540,   233,   579,   436,   234,   263,    95,   276,   100,   101,
3061      284,   102,   103,   140,   512,   112,   473,   115,   590,   145,
3062      440,   102,   103,   140,   104,   527,   285,    57,   568,   292,
3063       74,    75,   339,   120,   104,   107,   381,   455,   418,   409,
3064      521,   145,   343,   502,   503,   369,   140,   140,   479,   344,
3065      117,   345,   187,   481,   123,   346,   187,   187,   187,   482,
3066      504,   100,   101,   320,   416,   243,   244,   503,   404,   434,
3067      478,   598,   405,   125,   102,   103,   321,    71,    56,    58,
3068       76,    81,   164,   504,   437,   290,   165,   104,   296,   297,
3069      298,   299,   300,   301,   302,   303,   304,   305,   306,   307,
3070      308,   309,   310,   311,   312,   313,   314,   315,   316,   317,
3071      318,   319,   374,   390,   391,   324,   325,   326,   327,   328,
3072      329,   330,   331,   332,   333,   334,   335,   336,   337,   338,
3073      145,   340,   167,   105,   492,   469,   190,   459,   461,   351,
3074       57,   235,   570,    74,    75,   236,   571,   572,   100,   101,
3075      387,   239,    71,    56,   358,   379,   100,   101,   145,   251,
3076      383,   102,   103,   322,   256,  -111,   426,   551,   582,   102,
3077      103,   253,   257,   259,   104,   320,   526,   260,   140,   140,
3078      261,   322,   104,   419,   408,   592,   264,   265,   573,   267,
3079      268,   364,   277,   184,   274,   599,   176,   214,   215,   216,
3080      375,   449,   -75,   452,   279,   280,   281,    13,   282,    15,
3081       16,   489,    18,   283,    20,   287,   550,   288,   349,   227,
3082      228,   229,   230,   231,   262,   350,  -117,    25,   365,   232,
3083      276,   233,   366,   373,   234,   531,    30,    31,    32,   602,
3084      276,   378,   184,   414,   380,   386,   384,   126,   140,   127,
3085      388,   145,   128,   129,   130,   392,    13,   452,    15,    16,
3086      393,    18,   320,    20,   145,    71,    56,   358,   322,   394,
3087      320,   415,   176,    71,    56,   358,    25,   396,   398,   176,
3088      402,   403,   177,   411,   531,    30,    31,    32,   179,   177,
3089      532,   116,   101,   322,   178,   179,  -335,  -337,  -336,   417,
3090      491,  -241,   181,   530,   102,   103,   464,   180,   465,   181,
3091      184,   466,   375,   468,   214,   215,   216,   104,   422,   472,
3092      424,   368,   432,  -158,    13,   476,    15,    16,   431,    18,
3093      433,    20,  -116,   145,    71,    56,   358,   435,   490,   532,
3094      440,   444,   448,   450,    25,   456,   232,   191,   233,   454,
3095      457,   234,   445,    30,    31,    32,   471,   487,   495,   470,
3096      474,   496,   475,   500,   322,   427,   518,   520,   528,   522,
3097      523,   537,  -159,   539,   543,   192,   193,   194,   549,   195,
3098      196,   197,   198,   199,   200,   201,   202,   203,   204,   205,
3099      206,   207,   208,   209,   210,   211,   212,   213,   544,   214,
3100      215,   216,   538,   217,   218,   219,   561,   533,   562,   542,
3101      563,   220,   221,   410,   222,   223,   224,   567,   225,   226,
3102      574,   227,   228,   229,   230,   231,   575,   576,   580,   583,
3103      584,   232,  -138,   233,   585,   588,   234,   589,   593,   555,
3104      553,   554,   559,   560,  -138,   533,  -138,   594,  -138,  -138,
3105      595,  -138,   596,  -138,  -138,   597,   278,   600,   166,  -138,
3106     -138,   601,   240,   498,   269,   423,  -138,   555,   553,   554,
3107      559,   560,  -138,   170,  -138,  -138,  -138,  -138,   442,   545,
3108      546,   524,   525,   185,   587,   555,   553,   554,   559,   560,
3109       -4,   577,   564,     1,     2,     3,     4,   499,     5,     6,
3110        7,     8,     9,    10,    11,   519,   578,    12,    13,    14,
3111       15,    16,    17,    18,    19,    20,   118,   494,    22,    23,
3112      139,   477,   191,   407,     0,     0,    24,   382,    25,    26,
3113        0,    27,     0,    28,     0,    29,     0,    30,    31,    32,
3114        0,     0,    33,    34,     0,    35,    36,     0,     0,     0,
3115     -338,  -338,  -338,    37,    38,    39,     0,     0,   199,   200,
3116        0,    40,     0,     0,     0,     0,     0,     0,     0,     0,
3117        0,     0,     0,     0,   214,   215,   216,     0,   217,   218,
3118      219,     0,    41,    42,     0,     0,     0,     0,     0,   100,
3119      101,    43,     0,   225,   226,     0,   227,   228,   229,   230,
3120      231,    44,   102,   103,    45,     0,   232,     0,   233,    46,
3121       47,   234,     0,     0,    48,   104,    49,     0,    50,     0,
3122       51,     0,     0,     0,    -4,     1,     2,     3,     4,     0,
3123        5,     6,     7,     8,     9,    10,    11,     0,     0,     0,
3124       13,    14,    15,    16,    17,    18,    19,    20,    21,     0,
3125       22,    23,   146,     0,   147,     0,     0,     0,    24,   148,
3126       25,    26,     0,    27,   149,    28,     0,    29,   150,    30,
3127       31,    32,     0,     0,    33,    34,     0,    35,    36,   214,
3128      215,   216,     0,     0,     0,    37,    38,    39,     0,   151,
3129        0,     0,     0,    40,     0,     0,     0,     0,     0,     0,
3130        0,     0,     0,   229,   230,   231,     0,     0,     0,     0,
3131        0,   232,     0,   233,    41,    42,   234,     0,     0,     0,
3132        0,     0,     0,   152,     0,     0,     0,     0,     0,     0,
3133        0,     0,     0,    44,     0,     0,    45,     0,     0,     0,
3134        0,    46,    47,     0,     0,     0,    48,     0,    49,     0,
3135       50,     0,    51,     0,     0,     0,   153,     1,     2,     3,
3136        4,     0,     5,     6,     7,     8,     9,    10,    11,     0,
3137        0,     0,    13,    14,    15,    16,    17,    18,    19,    20,
3138       21,     0,    22,    23,   146,     0,   147,     0,     0,     0,
3139       24,   148,    25,    26,     0,    27,   149,    28,     0,    29,
3140      150,    30,    31,    32,     0,     0,    33,    34,     0,    35,
3141       36,     0,     0,     0,     0,     0,     0,    37,    38,    39,
3142        0,   151,     0,     0,     0,    40,     0,     0,     0,     0,
3143        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
3144        0,     0,     0,     0,     0,     0,    41,    42,     0,     0,
3145        0,     0,     0,     0,     0,   152,     0,     0,     0,     0,
3146        0,     0,     0,     0,     0,    44,     0,     0,    45,     0,
3147        0,     0,     0,    46,    47,     0,     0,     0,    48,     0,
3148       49,     0,    50,     0,    51,     0,     0,     0,   275,     1,
3149        2,     3,     4,     0,     5,     6,     7,     8,     9,    10,
3150       11,     0,     0,     0,    13,    14,    15,    16,    17,    18,
3151       19,    20,    21,     0,    22,    23,   146,     0,   147,     0,
3152        0,     0,    24,   148,    25,    26,     0,    27,   149,    28,
3153        0,    29,   150,    30,    31,    32,     0,     0,    33,    34,
3154        0,    35,    36,     0,     0,     0,     0,     0,     0,    37,
3155       38,    39,     0,   151,     0,     0,     0,    40,     0,     0,
3156        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
3157        0,     0,     0,     0,     0,     0,     0,     0,    41,    42,
3158        0,     0,     0,     0,     0,     0,     0,   152,     0,     0,
3159        0,     0,     0,     0,     0,     0,     0,    44,     0,     0,
3160       45,     0,     0,     0,     0,    46,    47,     0,     0,     0,
3161       48,     0,    49,     0,    50,     0,    51,     0,     0,     0,
3162      443,     1,     2,     3,     4,     0,     5,     6,     7,     8,
3163        9,    10,    11,     0,     0,    12,    13,    14,    15,    16,
3164       17,    18,    19,    20,     0,     0,    22,    23,     0,     0,
3165     -338,     0,     0,     0,    24,     0,    25,    26,     0,    27,
3166        0,    28,     0,    29,     0,    30,    31,    32,     0,     0,
3167       33,    34,     0,    35,    36,     0,     0,     0,     0,     0,
3168        0,    37,    38,    39,     0,     0,  -338,  -338,     0,    40,
3169        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
3170        0,     0,   214,   215,   216,     0,   217,   218,   219,     0,
3171       41,    42,     0,     0,     0,     0,     0,     0,     0,    43,
3172        0,  -338,  -338,     0,   227,   228,   229,   230,   231,    44,
3173        0,     0,    45,     0,   232,     0,   233,    46,    47,   234,
3174        0,     0,    48,     0,    49,     0,    50,     0,    51,     0,
3175        0,     0,    -3,     1,     2,     3,     4,     0,     5,     6,
3176        7,     8,     9,    10,    11,     0,     0,     0,    13,    14,
3177       15,    16,    17,    18,    19,    20,     0,     0,    22,    23,
3178        0,     0,     0,     0,     0,     0,    24,     0,    25,    26,
3179        0,    27,     0,    28,     0,    29,     0,    30,    31,    32,
3180        0,     0,    33,    34,     0,    35,    36,     0,     0,     0,
3181        0,     0,     0,    37,    38,    39,     0,     0,     0,     0,
3182        0,    40,     0,     0,     0,     0,     0,     0,     0,     0,
3183        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
3184        0,     0,    41,    42,     0,     0,     0,     0,     0,     0,
3185        0,   352,     0,     0,     0,     0,     0,     0,     0,     0,
3186        0,    44,     0,     0,    45,     0,     0,     0,     0,    46,
3187       47,     0,     0,     0,    48,     0,   353,     0,    50,     0,
3188       51,     0,     0,     0,   -15,     1,     2,     3,     4,     0,
3189        5,     6,     7,     8,     9,    10,    11,     0,     0,     0,
3190       13,    14,    15,    16,    17,    18,    19,    20,     0,     0,
3191       22,    23,     0,     0,     0,     0,     0,     0,    24,     0,
3192       25,    26,     0,    27,     0,    28,     0,    29,     0,    30,
3193       31,    32,     0,     0,    33,    34,     0,    35,    36,     0,
3194        0,     0,     0,     0,     0,    37,    38,    39,     0,     0,
3195        0,     0,     0,    40,     0,     0,     0,     0,     0,     0,
3196        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
3197        0,     0,     0,     0,    41,    42,     0,     0,     0,     0,
3198        0,     0,     0,   352,     0,     0,     0,     0,     0,     0,
3199        0,     0,     0,    44,     0,     0,    45,     0,     0,     0,
3200        0,    46,    47,     0,     0,     0,    48,     0,   353,     0,
3201       50,     0,    51,     0,     0,     0,   -16,     1,     2,     3,
3202        4,     0,     5,     6,     7,     8,     9,    10,    11,     0,
3203        0,     0,    13,    14,    15,    16,    17,    18,    19,    20,
3204        0,     0,    22,    23,     0,     0,     0,     0,     0,     0,
3205       24,     0,    25,    26,     0,    27,     0,    28,     0,    29,
3206        0,    30,    31,    32,     0,     0,    33,    34,     0,    35,
3207       36,     0,     0,     0,     0,     0,     0,    37,    38,    39,
3208        0,     0,     0,     0,     0,    40,     0,     0,     0,     0,
3209        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
3210        0,     0,     0,     0,     0,     0,    41,    42,     0,     0,
3211        0,     0,     0,     0,     0,   552,     0,     0,     0,     0,
3212        0,     0,     0,     0,     0,    44,     0,     0,    45,     0,
3213        0,     0,     0,    46,    47,     0,     0,     0,    48,     0,
3214       49,     0,    50,     0,    51,     0,     0,     0,  -149,     1,
3215        2,     3,     4,     0,     5,     6,     7,     8,     9,    10,
3216       11,     0,     0,     0,    13,    14,    15,    16,    17,    18,
3217       19,    20,     0,     0,    22,    23,     0,     0,     0,     0,
3218        0,     0,    24,     0,    25,    26,     0,    27,     0,    28,
3219        0,    29,     0,    30,    31,    32,     0,     0,    33,    34,
3220        0,    35,    36,     0,     0,     0,     0,     0,     0,    37,
3221       38,    39,     0,     0,     0,     0,     0,    40,     0,     0,
3222        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
3223        0,     0,     0,     0,     0,     0,     0,     0,    41,    42,
3224        0,     0,     0,     0,     0,     0,     0,   552,     0,     0,
3225        0,     0,     0,     0,     0,     0,     0,    44,     0,     0,
3226       45,     0,     0,     0,     0,    46,    47,     0,     0,     0,
3227       48,     0,    49,     0,    50,     0,    51,     0,    -3,     0,
3228     -150,     1,     2,     3,     4,     0,     5,     6,     7,     8,
3229        9,    10,    11,     0,     0,    12,    13,    14,    15,    16,
3230       17,    18,    19,    20,     0,     0,    22,    23,     0,     0,
3231        0,     0,     0,     0,    24,     0,    25,    26,     0,    27,
3232        0,    28,     0,    29,     0,    30,    31,    32,     0,     0,
3233       33,    34,     0,    35,    36,     0,     0,     0,     0,     0,
3234        0,    37,    38,    39,     0,     0,     0,     0,     0,    40,
3235        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
3236        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
3237       41,    42,     0,     0,     0,     0,     0,     0,     0,    43,
3238        0,     0,     0,     0,     0,     0,     0,     0,     0,    44,
3239        0,     0,    45,     0,     0,     0,     0,    46,    47,     0,
3240        0,     0,    48,     0,    49,     0,    50,     0,    51,     1,
3241        2,     3,     4,     0,     5,     6,     7,     8,     9,    10,
3242       11,     0,  -125,     0,    13,    14,    15,    16,    17,    18,
3243       19,    20,    21,     0,    22,    23,   146,     0,   147,     0,
3244        0,     0,    24,   148,    25,    26,     0,    27,   149,    28,
3245        0,    29,   150,    30,    31,    32,     0,     0,    33,    34,
3246        0,    35,    36,     0,     0,     0,     0,     0,     0,    37,
3247       38,    39,     0,   151,     0,     0,     0,    40,     0,     0,
3248        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
3249        0,     0,     0,     0,     0,     0,     0,     0,    41,    42,
3250        0,     0,     0,     0,     0,     0,     0,   152,     0,     0,
3251        0,     0,     0,     0,     0,     0,     0,    44,     0,     0,
3252       45,     0,     0,     0,     0,    46,    47,     0,     0,     0,
3253       48,     0,    49,     0,    50,     0,    51,     1,     2,     3,
3254        4,     0,     5,     6,     7,     8,     9,    10,    11,     0,
3255        0,     0,    13,    14,    15,    16,    17,    18,    19,    20,
3256       21,     0,    22,    23,   146,     0,   147,     0,     0,     0,
3257       24,   148,    25,    26,     0,    27,   149,    28,     0,    29,
3258      150,    30,    31,    32,     0,     0,    33,    34,     0,    35,
3259       36,     0,     0,     0,     0,     0,     0,    37,    38,    39,
3260        0,   151,     0,     0,     0,    40,     0,     0,     0,     0,
3261        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
3262        0,     0,     0,     0,     0,     0,    41,    42,     0,     0,
3263        0,     0,     0,     0,     0,   152,     0,     0,     0,     0,
3264        0,     0,     0,     0,     0,    44,     0,     0,    45,     0,
3265        0,     0,     0,    46,    47,     0,     0,     0,    48,     0,
3266       49,     0,    50,     0,    51,   168,   110,     3,     4,     0,
3267        5,     6,     7,     0,     0,     0,     0,     0,     0,     0,
3268        0,    14,     0,     0,     0,     0,    19,     0,    21,     0,
3269       22,    23,     0,     0,   147,     0,     0,     0,    24,     0,
3270        0,     0,     0,     0,     0,    28,     0,    29,   169,     0,
3271        0,     0,     0,     0,     0,    34,     0,    35,    36,     0,
3272        0,     0,     0,     0,     0,     0,    38,     0,     0,     0,
3273        0,     0,     0,    40,     0,     0,     0,   109,   110,     3,
3274        4,     0,     5,     6,     7,     0,     0,     0,     0,     0,
3275        0,     0,     0,    14,    41,    42,     0,     0,    19,     0,
3276       21,     0,    22,    23,     0,     0,     0,     0,     0,     0,
3277       24,     0,     0,    44,     0,     0,    45,    28,     0,    29,
3278        0,    46,    47,     0,     0,     0,    48,    34,    49,    35,
3279       36,     0,    51,     0,   109,   110,     3,     4,    38,     5,
3280        6,     7,     0,     0,     0,    40,     0,     0,     0,     0,
3281       14,     0,     0,     0,     0,    19,     0,    21,     0,    22,
3282       23,     0,     0,     0,     0,     0,    41,    42,     0,     0,
3283        0,     0,     0,     0,     0,     0,    29,     0,     0,     0,
3284        0,     0,     0,     0,    34,    44,    35,    36,    45,     0,
3285        0,     0,     0,    46,    47,     0,     0,     0,    48,     0,
3286       49,     0,    40,     0,    51,     0,     0,     0,     0,     0,
3287        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
3288        0,     0,     0,    41,    42,     0,     0,     0,     0,     0,
3289      191,     0,     0,     0,     0,     0,     0,     0,     0,     0,
3290        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
3291        0,     0,     0,     0,     0,    48,     0,    49,   192,   193,
3292      194,    51,   195,   196,   197,   198,   199,   200,   201,   202,
3293      203,   204,   205,   206,   207,   208,   209,   210,   211,   212,
3294      213,     0,   214,   215,   216,     0,   217,   218,   219,     0,
3295        0,     0,     0,     0,   220,   221,     0,   222,   223,   224,
3296      191,   225,   226,     0,   227,   228,   229,   230,   231,     0,
3297        0,     0,     0,     0,   232,     0,   233,     0,     0,   234,
3298        0,     0,     0,     0,     0,   420,     0,     0,   192,   193,
3299      194,     0,   195,   196,   197,   198,   199,   200,   201,   202,
3300      203,   204,   205,   206,   207,   208,   209,   210,   211,   212,
3301      213,     0,   214,   215,   216,     0,   217,   218,   219,     0,
3302        0,     0,     0,     0,   220,   221,     0,   222,   223,   224,
3303      191,   225,   226,     0,   227,   228,   229,   230,   231,     0,
3304        0,     0,     0,     0,   232,     0,   233,     0,     0,   234,
3305        0,     0,     0,     0,     0,   509,     0,     0,   192,   193,
3306      194,     0,   195,   196,   197,   198,   199,   200,   201,   202,
3307      203,   204,   205,   206,   207,   208,   209,   210,   211,   212,
3308      213,     0,   214,   215,   216,     0,   217,   218,   219,     0,
3309        0,     0,   191,     0,   220,   221,     0,   222,   223,   224,
3310        0,   225,   226,     0,   227,   228,   229,   230,   231,     0,
3311        0,     0,     0,     0,   232,     0,   233,   412,     0,   234,
3312      192,   193,   194,     0,   195,   196,   197,   198,   199,   200,
3313      201,   202,   203,   204,   205,   206,   207,   208,   209,   210,
3314      211,   212,   213,     0,   214,   215,   216,     0,   217,   218,
3315      219,     0,     0,     0,   191,     0,   220,   221,     0,   222,
3316      223,   224,     0,   225,   226,     0,   227,   228,   229,   230,
3317      231,     0,     0,     0,     0,     0,   232,     0,   233,   467,
3318        0,   234,   192,   193,   194,     0,   195,   196,   197,   198,
3319      199,   200,   201,   202,   203,   204,   205,   206,   207,   208,
3320      209,   210,   211,   212,   213,     0,   214,   215,   216,     0,
3321      217,   218,   219,     0,     0,     0,   191,     0,   220,   221,
3322        0,   222,   223,   224,     0,   225,   226,     0,   227,   228,
3323      229,   230,   231,     0,     0,     0,     0,     0,   232,     0,
3324      233,   508,     0,   234,   192,   193,   194,     0,   195,   196,
3325      197,   198,   199,   200,   201,   202,   203,   204,   205,   206,
3326      207,   208,   209,   210,   211,   212,   213,     0,   214,   215,
3327      216,     0,   217,   218,   219,     0,     0,     0,   191,     0,
3328      220,   221,     0,   222,   223,   224,     0,   225,   226,     0,
3329      227,   228,   229,   230,   231,     0,     0,     0,     0,     0,
3330      232,     0,   233,   510,     0,   234,   192,   193,   194,     0,
3331      195,   196,   197,   198,   199,   200,   201,   202,   203,   204,
3332      205,   206,   207,   208,   209,   210,   211,   212,   213,     0,
3333      214,   215,   216,     0,   217,   218,   219,     0,     0,     0,
3334      191,     0,   220,   221,     0,   222,   223,   224,     0,   225,
3335      226,     0,   227,   228,   229,   230,   231,     0,     0,     0,
3336        0,     0,   232,     0,   233,   517,     0,   234,   192,   193,
3337      194,     0,   195,   196,   197,   198,   199,   200,   201,   202,
3338      203,   204,   205,   206,   207,   208,   209,   210,   211,   212,
3339      213,     0,   214,   215,   216,     0,   217,   218,   219,     0,
3340        0,     0,   191,     0,   220,   221,   569,   222,   223,   224,
3341        0,   225,   226,     0,   227,   228,   229,   230,   231,     0,
3342        0,     0,     0,     0,   232,     0,   233,     0,     0,   234,
3343      192,   193,   194,     0,   195,   196,   197,   198,   199,   200,
3344      201,   202,   203,   204,   205,   206,   207,   208,   209,   210,
3345      211,   212,   213,     0,   214,   215,   216,     0,   217,   218,
3346      219,     0,     0,     0,   191,     0,   220,   221,     0,   222,
3347      223,   224,     0,   225,   226,     0,   227,   228,   229,   230,
3348      231,     0,     0,     0,     0,     0,   232,     0,   233,     0,
3349        0,   234,   192,   193,   194,     0,   195,   196,   197,   198,
3350      199,   200,   201,   202,   203,   204,   205,   206,   207,   208,
3351      209,   210,   211,   212,   213,     0,   214,   215,   216,     0,
3352      217,   218,   219,     0,     0,     0,   191,     0,   220,   221,
3353        0,   222,   223,   224,     0,     0,   226,     0,   227,   228,
3354      229,   230,   231,     0,     0,     0,     0,     0,   232,     0,
3355      233,     0,     0,   234,   192,   193,   194,     0,   195,   196,
3356      197,   198,   199,   200,     0,     0,     0,     0,     0,     0,
3357        0,     0,     0,     0,     0,     0,   213,     0,   214,   215,
3358      216,     0,   217,   218,   219,     0,     0,     0,   191,     0,
3359        0,     0,     0,   222,   223,   224,     0,   225,   226,     0,
3360      227,   228,   229,   230,   231,     0,     0,     0,     0,     0,
3361      232,     0,   233,     0,     0,   234,   192,   193,   194,     0,
3362      195,   196,   197,   198,   199,   200,     0,     0,     0,     0,
3363        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
3364      214,   215,   216,     0,   217,   218,   219,     0,     0,     0,
3365      191,     0,     0,     0,     0,   222,   223,   224,     0,   225,
3366      226,     0,   227,   228,   229,   230,   231,     0,     0,     0,
3367        0,     0,   232,     0,   233,     0,     0,   234,   192,   193,
3368      194,     0,   195,   196,   197,   198,   199,   200,     0,     0,
3369        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
3370        0,     0,   214,   215,   216,     0,   217,   218,   219,     0,
3371        0,     0,   191,     0,     0,     0,     0,     0,   223,   224,
3372        0,   225,   226,     0,   227,   228,   229,   230,   231,     0,
3373        0,     0,     0,     0,   232,     0,   233,     0,     0,   234,
3374      192,   193,   194,     0,   195,   196,   197,   198,   199,   200,
3375        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
3376        0,     0,     0,     0,   214,   215,   216,     0,   217,   218,
3377      219,     0,     0,     0,   191,     0,     0,     0,     0,     0,
3378        0,   224,     0,   225,   226,     0,   227,   228,   229,   230,
3379      231,     0,     0,     0,     0,     0,   232,     0,   233,     0,
3380        0,   234,   192,   193,   194,     0,   195,   196,   197,   198,
3381      199,   200,     0,     0,     0,     0,     0,     0,     0,     0,
3382        0,     0,     0,     0,     0,     0,   214,   215,   216,     0,
3383      217,   218,   219,     0,     0,     0,   191,     0,     0,     0,
3384        0,     0,     0,  -338,     0,   225,   226,     0,   227,   228,
3385      229,   230,   231,     0,     0,     0,     0,     0,   232,     0,
3386      233,     0,     0,   234,   192,   193,   194,     0,  -338,  -338,
3387     -338,  -338,   199,   200,     0,     0,     0,     0,     0,     0,
3388        0,     0,     0,     0,     0,     0,     0,     0,   214,   215,
3389      216,     0,   217,   218,   219,     0,     0,     0,     0,     0,
3390        0,     0,     0,     0,     0,     0,     0,   225,   226,     0,
3391      227,   228,   229,   230,   231,     0,     0,     0,     0,     0,
3392      232,     0,   233,     0,     0,   234
3393 };
3394
3395 static const yytype_int16 yycheck[] =
3396 {
3397        0,     0,     0,     0,     0,   108,    60,    19,   279,   143,
3398       67,   121,    24,    50,   189,   448,    28,     3,     3,     4,
3399      369,     3,    50,   124,     5,     5,    38,     5,   129,    41,
3400       42,    16,    17,    45,    46,    47,    48,    49,   115,     3,
3401        4,    98,   234,     3,    29,   363,     3,   463,   125,    12,
3402        5,   537,    16,    17,    54,    54,    54,    54,    54,    94,
3403        3,     4,   102,     0,    27,    29,     0,     0,   104,    91,
3404      106,   148,   149,    16,    17,    69,    34,     3,   124,     5,
3405      124,   567,   102,   432,    96,   507,    29,    16,     3,     4,
3406      506,   126,   565,    36,   129,   135,   124,   154,     3,     4,
3407       35,    16,    17,   115,    62,     3,   424,   124,   581,   121,
3408      104,    16,    17,   125,    29,   135,    51,    54,   540,   294,
3409       54,    54,   232,   128,    29,    12,   260,   398,   349,   321,
3410      479,   143,   117,   111,   112,    95,   148,   149,    95,   124,
3411       27,   126,   128,    27,    16,   130,   128,   128,   128,    33,
3412      128,     3,     4,   117,   346,   128,   129,   112,   112,   380,
3413      431,   594,   116,   124,    16,    17,   130,   167,   167,   167,
3414      167,   167,     3,   128,   117,   187,     0,    29,   190,   191,
3415      192,   193,   194,   195,   196,   197,   198,   199,   200,   201,
3416      202,   203,   204,   205,   206,   207,   208,   209,   210,   211,
3417      212,   213,   117,   280,   281,   217,   218,   219,   220,   221,
3418      222,   223,   224,   225,   226,   227,   228,   229,   230,   231,
3419      232,   233,   128,   128,   445,   417,   102,   402,   403,   241,
3420      167,     3,   543,   167,   167,   124,   547,   548,     3,     4,
3421      277,    12,   242,   242,   242,   257,     3,     4,   260,   124,
3422      262,    16,    17,   216,     3,   129,   366,   528,   569,    16,
3423       17,   129,   104,   134,    29,   117,   487,   106,   280,   281,
3424      102,   234,    29,   350,   126,   586,   127,   102,   549,     3,
3425        3,   244,   128,     4,     3,   596,    16,    92,    93,    94,
3426      253,   394,    69,   396,     3,   101,    69,    18,   101,    20,
3427       21,   435,    23,     3,    25,     3,   527,     3,   135,   114,
3428      115,   116,   117,   118,   102,   124,   129,    38,   129,   124,
3429      377,   126,   124,   135,   129,    46,    47,    48,    49,   600,
3430      387,   135,     4,   345,   135,   102,   106,     3,   350,     5,
3431      134,   353,     8,     9,    10,   104,    18,   450,    20,    21,
3432        3,    23,   117,    25,   366,   355,   355,   355,   321,    54,
3433      117,   126,    16,   363,   363,   363,    38,    54,     3,    16,
3434      104,   104,    26,   135,    46,    47,    48,    49,    32,    26,
3435      101,     3,     4,   346,    31,    32,    91,    91,    91,    91,
3436      444,   127,    46,   496,    16,    17,   408,    44,   410,    46,
3437        4,   413,   365,   415,    92,    93,    94,    29,   134,   421,
3438      128,     3,   102,   134,    18,   427,    20,    21,   135,    23,
3439      134,    25,   129,   435,   424,   424,   424,   106,   440,   101,
3440      104,   101,   124,    15,    38,   102,   124,    40,   126,   128,
3441      134,   129,   135,    47,    48,    49,   128,    66,   128,   135,
3442      134,   102,   135,   112,   417,   104,   134,   128,   135,   128,
3443      124,   116,   134,   111,   106,    68,    69,    70,     3,    72,
3444       73,    74,    75,    76,    77,    78,    79,    80,    81,    82,
3445       83,    84,    85,    86,    87,    88,    89,    90,   134,    92,
3446       93,    94,   504,    96,    97,    98,     3,   497,    26,   511,
3447      134,   104,   105,   106,   107,   108,   109,   116,   111,   112,
3448      128,   114,   115,   116,   117,   118,   128,   134,   134,   134,
3449      134,   124,     4,   126,   135,     3,   129,   112,   134,   529,
3450      529,   529,   529,   529,    16,   535,    18,   124,    20,    21,
3451      112,    23,   128,    25,    26,   134,   167,   135,    54,    31,
3452       32,   134,    98,   455,   147,   355,    38,   557,   557,   557,
3453      557,   557,    44,    60,    46,    47,    48,    49,   386,   514,
3454      514,   485,   485,    72,   575,   575,   575,   575,   575,   575,
3455        0,   557,   535,     3,     4,     5,     6,   456,     8,     9,
3456       10,    11,    12,    13,    14,   477,   562,    17,    18,    19,
3457       20,    21,    22,    23,    24,    25,    27,   450,    28,    29,
3458       48,   428,    40,   294,    -1,    -1,    36,   261,    38,    39,
3459       -1,    41,    -1,    43,    -1,    45,    -1,    47,    48,    49,
3460       -1,    -1,    52,    53,    -1,    55,    56,    -1,    -1,    -1,
3461       68,    69,    70,    63,    64,    65,    -1,    -1,    76,    77,
3462       -1,    71,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3463       -1,    -1,    -1,    -1,    92,    93,    94,    -1,    96,    97,
3464       98,    -1,    92,    93,    -1,    -1,    -1,    -1,    -1,     3,
3465        4,   101,    -1,   111,   112,    -1,   114,   115,   116,   117,
3466      118,   111,    16,    17,   114,    -1,   124,    -1,   126,   119,
3467      120,   129,    -1,    -1,   124,    29,   126,    -1,   128,    -1,
3468      130,    -1,    -1,    -1,   134,     3,     4,     5,     6,    -1,
3469        8,     9,    10,    11,    12,    13,    14,    -1,    -1,    -1,
3470       18,    19,    20,    21,    22,    23,    24,    25,    26,    -1,
3471       28,    29,    30,    -1,    32,    -1,    -1,    -1,    36,    37,
3472       38,    39,    -1,    41,    42,    43,    -1,    45,    46,    47,
3473       48,    49,    -1,    -1,    52,    53,    -1,    55,    56,    92,
3474       93,    94,    -1,    -1,    -1,    63,    64,    65,    -1,    67,
3475       -1,    -1,    -1,    71,    -1,    -1,    -1,    -1,    -1,    -1,
3476       -1,    -1,    -1,   116,   117,   118,    -1,    -1,    -1,    -1,
3477       -1,   124,    -1,   126,    92,    93,   129,    -1,    -1,    -1,
3478       -1,    -1,    -1,   101,    -1,    -1,    -1,    -1,    -1,    -1,
3479       -1,    -1,    -1,   111,    -1,    -1,   114,    -1,    -1,    -1,
3480       -1,   119,   120,    -1,    -1,    -1,   124,    -1,   126,    -1,
3481      128,    -1,   130,    -1,    -1,    -1,   134,     3,     4,     5,
3482        6,    -1,     8,     9,    10,    11,    12,    13,    14,    -1,
3483       -1,    -1,    18,    19,    20,    21,    22,    23,    24,    25,
3484       26,    -1,    28,    29,    30,    -1,    32,    -1,    -1,    -1,
3485       36,    37,    38,    39,    -1,    41,    42,    43,    -1,    45,
3486       46,    47,    48,    49,    -1,    -1,    52,    53,    -1,    55,
3487       56,    -1,    -1,    -1,    -1,    -1,    -1,    63,    64,    65,
3488       -1,    67,    -1,    -1,    -1,    71,    -1,    -1,    -1,    -1,
3489       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3490       -1,    -1,    -1,    -1,    -1,    -1,    92,    93,    -1,    -1,
3491       -1,    -1,    -1,    -1,    -1,   101,    -1,    -1,    -1,    -1,
3492       -1,    -1,    -1,    -1,    -1,   111,    -1,    -1,   114,    -1,
3493       -1,    -1,    -1,   119,   120,    -1,    -1,    -1,   124,    -1,
3494      126,    -1,   128,    -1,   130,    -1,    -1,    -1,   134,     3,
3495        4,     5,     6,    -1,     8,     9,    10,    11,    12,    13,
3496       14,    -1,    -1,    -1,    18,    19,    20,    21,    22,    23,
3497       24,    25,    26,    -1,    28,    29,    30,    -1,    32,    -1,
3498       -1,    -1,    36,    37,    38,    39,    -1,    41,    42,    43,
3499       -1,    45,    46,    47,    48,    49,    -1,    -1,    52,    53,
3500       -1,    55,    56,    -1,    -1,    -1,    -1,    -1,    -1,    63,
3501       64,    65,    -1,    67,    -1,    -1,    -1,    71,    -1,    -1,
3502       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3503       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    92,    93,
3504       -1,    -1,    -1,    -1,    -1,    -1,    -1,   101,    -1,    -1,
3505       -1,    -1,    -1,    -1,    -1,    -1,    -1,   111,    -1,    -1,
3506      114,    -1,    -1,    -1,    -1,   119,   120,    -1,    -1,    -1,
3507      124,    -1,   126,    -1,   128,    -1,   130,    -1,    -1,    -1,
3508      134,     3,     4,     5,     6,    -1,     8,     9,    10,    11,
3509       12,    13,    14,    -1,    -1,    17,    18,    19,    20,    21,
3510       22,    23,    24,    25,    -1,    -1,    28,    29,    -1,    -1,
3511       40,    -1,    -1,    -1,    36,    -1,    38,    39,    -1,    41,
3512       -1,    43,    -1,    45,    -1,    47,    48,    49,    -1,    -1,
3513       52,    53,    -1,    55,    56,    -1,    -1,    -1,    -1,    -1,
3514       -1,    63,    64,    65,    -1,    -1,    76,    77,    -1,    71,
3515       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3516       -1,    -1,    92,    93,    94,    -1,    96,    97,    98,    -1,
3517       92,    93,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   101,
3518       -1,   111,   112,    -1,   114,   115,   116,   117,   118,   111,
3519       -1,    -1,   114,    -1,   124,    -1,   126,   119,   120,   129,
3520       -1,    -1,   124,    -1,   126,    -1,   128,    -1,   130,    -1,
3521       -1,    -1,   134,     3,     4,     5,     6,    -1,     8,     9,
3522       10,    11,    12,    13,    14,    -1,    -1,    -1,    18,    19,
3523       20,    21,    22,    23,    24,    25,    -1,    -1,    28,    29,
3524       -1,    -1,    -1,    -1,    -1,    -1,    36,    -1,    38,    39,
3525       -1,    41,    -1,    43,    -1,    45,    -1,    47,    48,    49,
3526       -1,    -1,    52,    53,    -1,    55,    56,    -1,    -1,    -1,
3527       -1,    -1,    -1,    63,    64,    65,    -1,    -1,    -1,    -1,
3528       -1,    71,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3529       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3530       -1,    -1,    92,    93,    -1,    -1,    -1,    -1,    -1,    -1,
3531       -1,   101,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3532       -1,   111,    -1,    -1,   114,    -1,    -1,    -1,    -1,   119,
3533      120,    -1,    -1,    -1,   124,    -1,   126,    -1,   128,    -1,
3534      130,    -1,    -1,    -1,   134,     3,     4,     5,     6,    -1,
3535        8,     9,    10,    11,    12,    13,    14,    -1,    -1,    -1,
3536       18,    19,    20,    21,    22,    23,    24,    25,    -1,    -1,
3537       28,    29,    -1,    -1,    -1,    -1,    -1,    -1,    36,    -1,
3538       38,    39,    -1,    41,    -1,    43,    -1,    45,    -1,    47,
3539       48,    49,    -1,    -1,    52,    53,    -1,    55,    56,    -1,
3540       -1,    -1,    -1,    -1,    -1,    63,    64,    65,    -1,    -1,
3541       -1,    -1,    -1,    71,    -1,    -1,    -1,    -1,    -1,    -1,
3542       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3543       -1,    -1,    -1,    -1,    92,    93,    -1,    -1,    -1,    -1,
3544       -1,    -1,    -1,   101,    -1,    -1,    -1,    -1,    -1,    -1,
3545       -1,    -1,    -1,   111,    -1,    -1,   114,    -1,    -1,    -1,
3546       -1,   119,   120,    -1,    -1,    -1,   124,    -1,   126,    -1,
3547      128,    -1,   130,    -1,    -1,    -1,   134,     3,     4,     5,
3548        6,    -1,     8,     9,    10,    11,    12,    13,    14,    -1,
3549       -1,    -1,    18,    19,    20,    21,    22,    23,    24,    25,
3550       -1,    -1,    28,    29,    -1,    -1,    -1,    -1,    -1,    -1,
3551       36,    -1,    38,    39,    -1,    41,    -1,    43,    -1,    45,
3552       -1,    47,    48,    49,    -1,    -1,    52,    53,    -1,    55,
3553       56,    -1,    -1,    -1,    -1,    -1,    -1,    63,    64,    65,
3554       -1,    -1,    -1,    -1,    -1,    71,    -1,    -1,    -1,    -1,
3555       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3556       -1,    -1,    -1,    -1,    -1,    -1,    92,    93,    -1,    -1,
3557       -1,    -1,    -1,    -1,    -1,   101,    -1,    -1,    -1,    -1,
3558       -1,    -1,    -1,    -1,    -1,   111,    -1,    -1,   114,    -1,
3559       -1,    -1,    -1,   119,   120,    -1,    -1,    -1,   124,    -1,
3560      126,    -1,   128,    -1,   130,    -1,    -1,    -1,   134,     3,
3561        4,     5,     6,    -1,     8,     9,    10,    11,    12,    13,
3562       14,    -1,    -1,    -1,    18,    19,    20,    21,    22,    23,
3563       24,    25,    -1,    -1,    28,    29,    -1,    -1,    -1,    -1,
3564       -1,    -1,    36,    -1,    38,    39,    -1,    41,    -1,    43,
3565       -1,    45,    -1,    47,    48,    49,    -1,    -1,    52,    53,
3566       -1,    55,    56,    -1,    -1,    -1,    -1,    -1,    -1,    63,
3567       64,    65,    -1,    -1,    -1,    -1,    -1,    71,    -1,    -1,
3568       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3569       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    92,    93,
3570       -1,    -1,    -1,    -1,    -1,    -1,    -1,   101,    -1,    -1,
3571       -1,    -1,    -1,    -1,    -1,    -1,    -1,   111,    -1,    -1,
3572      114,    -1,    -1,    -1,    -1,   119,   120,    -1,    -1,    -1,
3573      124,    -1,   126,    -1,   128,    -1,   130,    -1,     0,    -1,
3574      134,     3,     4,     5,     6,    -1,     8,     9,    10,    11,
3575       12,    13,    14,    -1,    -1,    17,    18,    19,    20,    21,
3576       22,    23,    24,    25,    -1,    -1,    28,    29,    -1,    -1,
3577       -1,    -1,    -1,    -1,    36,    -1,    38,    39,    -1,    41,
3578       -1,    43,    -1,    45,    -1,    47,    48,    49,    -1,    -1,
3579       52,    53,    -1,    55,    56,    -1,    -1,    -1,    -1,    -1,
3580       -1,    63,    64,    65,    -1,    -1,    -1,    -1,    -1,    71,
3581       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3582       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3583       92,    93,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   101,
3584       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   111,
3585       -1,    -1,   114,    -1,    -1,    -1,    -1,   119,   120,    -1,
3586       -1,    -1,   124,    -1,   126,    -1,   128,    -1,   130,     3,
3587        4,     5,     6,    -1,     8,     9,    10,    11,    12,    13,
3588       14,    -1,    16,    -1,    18,    19,    20,    21,    22,    23,
3589       24,    25,    26,    -1,    28,    29,    30,    -1,    32,    -1,
3590       -1,    -1,    36,    37,    38,    39,    -1,    41,    42,    43,
3591       -1,    45,    46,    47,    48,    49,    -1,    -1,    52,    53,
3592       -1,    55,    56,    -1,    -1,    -1,    -1,    -1,    -1,    63,
3593       64,    65,    -1,    67,    -1,    -1,    -1,    71,    -1,    -1,
3594       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3595       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    92,    93,
3596       -1,    -1,    -1,    -1,    -1,    -1,    -1,   101,    -1,    -1,
3597       -1,    -1,    -1,    -1,    -1,    -1,    -1,   111,    -1,    -1,
3598      114,    -1,    -1,    -1,    -1,   119,   120,    -1,    -1,    -1,
3599      124,    -1,   126,    -1,   128,    -1,   130,     3,     4,     5,
3600        6,    -1,     8,     9,    10,    11,    12,    13,    14,    -1,
3601       -1,    -1,    18,    19,    20,    21,    22,    23,    24,    25,
3602       26,    -1,    28,    29,    30,    -1,    32,    -1,    -1,    -1,
3603       36,    37,    38,    39,    -1,    41,    42,    43,    -1,    45,
3604       46,    47,    48,    49,    -1,    -1,    52,    53,    -1,    55,
3605       56,    -1,    -1,    -1,    -1,    -1,    -1,    63,    64,    65,
3606       -1,    67,    -1,    -1,    -1,    71,    -1,    -1,    -1,    -1,
3607       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3608       -1,    -1,    -1,    -1,    -1,    -1,    92,    93,    -1,    -1,
3609       -1,    -1,    -1,    -1,    -1,   101,    -1,    -1,    -1,    -1,
3610       -1,    -1,    -1,    -1,    -1,   111,    -1,    -1,   114,    -1,
3611       -1,    -1,    -1,   119,   120,    -1,    -1,    -1,   124,    -1,
3612      126,    -1,   128,    -1,   130,     3,     4,     5,     6,    -1,
3613        8,     9,    10,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3614       -1,    19,    -1,    -1,    -1,    -1,    24,    -1,    26,    -1,
3615       28,    29,    -1,    -1,    32,    -1,    -1,    -1,    36,    -1,
3616       -1,    -1,    -1,    -1,    -1,    43,    -1,    45,    46,    -1,
3617       -1,    -1,    -1,    -1,    -1,    53,    -1,    55,    56,    -1,
3618       -1,    -1,    -1,    -1,    -1,    -1,    64,    -1,    -1,    -1,
3619       -1,    -1,    -1,    71,    -1,    -1,    -1,     3,     4,     5,
3620        6,    -1,     8,     9,    10,    -1,    -1,    -1,    -1,    -1,
3621       -1,    -1,    -1,    19,    92,    93,    -1,    -1,    24,    -1,
3622       26,    -1,    28,    29,    -1,    -1,    -1,    -1,    -1,    -1,
3623       36,    -1,    -1,   111,    -1,    -1,   114,    43,    -1,    45,
3624       -1,   119,   120,    -1,    -1,    -1,   124,    53,   126,    55,
3625       56,    -1,   130,    -1,     3,     4,     5,     6,    64,     8,
3626        9,    10,    -1,    -1,    -1,    71,    -1,    -1,    -1,    -1,
3627       19,    -1,    -1,    -1,    -1,    24,    -1,    26,    -1,    28,
3628       29,    -1,    -1,    -1,    -1,    -1,    92,    93,    -1,    -1,
3629       -1,    -1,    -1,    -1,    -1,    -1,    45,    -1,    -1,    -1,
3630       -1,    -1,    -1,    -1,    53,   111,    55,    56,   114,    -1,
3631       -1,    -1,    -1,   119,   120,    -1,    -1,    -1,   124,    -1,
3632      126,    -1,    71,    -1,   130,    -1,    -1,    -1,    -1,    -1,
3633       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3634       -1,    -1,    -1,    92,    93,    -1,    -1,    -1,    -1,    -1,
3635       40,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3636       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3637       -1,    -1,    -1,    -1,    -1,   124,    -1,   126,    68,    69,
3638       70,   130,    72,    73,    74,    75,    76,    77,    78,    79,
3639       80,    81,    82,    83,    84,    85,    86,    87,    88,    89,
3640       90,    -1,    92,    93,    94,    -1,    96,    97,    98,    -1,
3641       -1,    -1,    -1,    -1,   104,   105,    -1,   107,   108,   109,
3642       40,   111,   112,    -1,   114,   115,   116,   117,   118,    -1,
3643       -1,    -1,    -1,    -1,   124,    -1,   126,    -1,    -1,   129,
3644       -1,    -1,    -1,    -1,    -1,   135,    -1,    -1,    68,    69,
3645       70,    -1,    72,    73,    74,    75,    76,    77,    78,    79,
3646       80,    81,    82,    83,    84,    85,    86,    87,    88,    89,
3647       90,    -1,    92,    93,    94,    -1,    96,    97,    98,    -1,
3648       -1,    -1,    -1,    -1,   104,   105,    -1,   107,   108,   109,
3649       40,   111,   112,    -1,   114,   115,   116,   117,   118,    -1,
3650       -1,    -1,    -1,    -1,   124,    -1,   126,    -1,    -1,   129,
3651       -1,    -1,    -1,    -1,    -1,   135,    -1,    -1,    68,    69,
3652       70,    -1,    72,    73,    74,    75,    76,    77,    78,    79,
3653       80,    81,    82,    83,    84,    85,    86,    87,    88,    89,
3654       90,    -1,    92,    93,    94,    -1,    96,    97,    98,    -1,
3655       -1,    -1,    40,    -1,   104,   105,    -1,   107,   108,   109,
3656       -1,   111,   112,    -1,   114,   115,   116,   117,   118,    -1,
3657       -1,    -1,    -1,    -1,   124,    -1,   126,   127,    -1,   129,
3658       68,    69,    70,    -1,    72,    73,    74,    75,    76,    77,
3659       78,    79,    80,    81,    82,    83,    84,    85,    86,    87,
3660       88,    89,    90,    -1,    92,    93,    94,    -1,    96,    97,
3661       98,    -1,    -1,    -1,    40,    -1,   104,   105,    -1,   107,
3662      108,   109,    -1,   111,   112,    -1,   114,   115,   116,   117,
3663      118,    -1,    -1,    -1,    -1,    -1,   124,    -1,   126,   127,
3664       -1,   129,    68,    69,    70,    -1,    72,    73,    74,    75,
3665       76,    77,    78,    79,    80,    81,    82,    83,    84,    85,
3666       86,    87,    88,    89,    90,    -1,    92,    93,    94,    -1,
3667       96,    97,    98,    -1,    -1,    -1,    40,    -1,   104,   105,
3668       -1,   107,   108,   109,    -1,   111,   112,    -1,   114,   115,
3669      116,   117,   118,    -1,    -1,    -1,    -1,    -1,   124,    -1,
3670      126,   127,    -1,   129,    68,    69,    70,    -1,    72,    73,
3671       74,    75,    76,    77,    78,    79,    80,    81,    82,    83,
3672       84,    85,    86,    87,    88,    89,    90,    -1,    92,    93,
3673       94,    -1,    96,    97,    98,    -1,    -1,    -1,    40,    -1,
3674      104,   105,    -1,   107,   108,   109,    -1,   111,   112,    -1,
3675      114,   115,   116,   117,   118,    -1,    -1,    -1,    -1,    -1,
3676      124,    -1,   126,   127,    -1,   129,    68,    69,    70,    -1,
3677       72,    73,    74,    75,    76,    77,    78,    79,    80,    81,
3678       82,    83,    84,    85,    86,    87,    88,    89,    90,    -1,
3679       92,    93,    94,    -1,    96,    97,    98,    -1,    -1,    -1,
3680       40,    -1,   104,   105,    -1,   107,   108,   109,    -1,   111,
3681      112,    -1,   114,   115,   116,   117,   118,    -1,    -1,    -1,
3682       -1,    -1,   124,    -1,   126,   127,    -1,   129,    68,    69,
3683       70,    -1,    72,    73,    74,    75,    76,    77,    78,    79,
3684       80,    81,    82,    83,    84,    85,    86,    87,    88,    89,
3685       90,    -1,    92,    93,    94,    -1,    96,    97,    98,    -1,
3686       -1,    -1,    40,    -1,   104,   105,   106,   107,   108,   109,
3687       -1,   111,   112,    -1,   114,   115,   116,   117,   118,    -1,
3688       -1,    -1,    -1,    -1,   124,    -1,   126,    -1,    -1,   129,
3689       68,    69,    70,    -1,    72,    73,    74,    75,    76,    77,
3690       78,    79,    80,    81,    82,    83,    84,    85,    86,    87,
3691       88,    89,    90,    -1,    92,    93,    94,    -1,    96,    97,
3692       98,    -1,    -1,    -1,    40,    -1,   104,   105,    -1,   107,
3693      108,   109,    -1,   111,   112,    -1,   114,   115,   116,   117,
3694      118,    -1,    -1,    -1,    -1,    -1,   124,    -1,   126,    -1,
3695       -1,   129,    68,    69,    70,    -1,    72,    73,    74,    75,
3696       76,    77,    78,    79,    80,    81,    82,    83,    84,    85,
3697       86,    87,    88,    89,    90,    -1,    92,    93,    94,    -1,
3698       96,    97,    98,    -1,    -1,    -1,    40,    -1,   104,   105,
3699       -1,   107,   108,   109,    -1,    -1,   112,    -1,   114,   115,
3700      116,   117,   118,    -1,    -1,    -1,    -1,    -1,   124,    -1,
3701      126,    -1,    -1,   129,    68,    69,    70,    -1,    72,    73,
3702       74,    75,    76,    77,    -1,    -1,    -1,    -1,    -1,    -1,
3703       -1,    -1,    -1,    -1,    -1,    -1,    90,    -1,    92,    93,
3704       94,    -1,    96,    97,    98,    -1,    -1,    -1,    40,    -1,
3705       -1,    -1,    -1,   107,   108,   109,    -1,   111,   112,    -1,
3706      114,   115,   116,   117,   118,    -1,    -1,    -1,    -1,    -1,
3707      124,    -1,   126,    -1,    -1,   129,    68,    69,    70,    -1,
3708       72,    73,    74,    75,    76,    77,    -1,    -1,    -1,    -1,
3709       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3710       92,    93,    94,    -1,    96,    97,    98,    -1,    -1,    -1,
3711       40,    -1,    -1,    -1,    -1,   107,   108,   109,    -1,   111,
3712      112,    -1,   114,   115,   116,   117,   118,    -1,    -1,    -1,
3713       -1,    -1,   124,    -1,   126,    -1,    -1,   129,    68,    69,
3714       70,    -1,    72,    73,    74,    75,    76,    77,    -1,    -1,
3715       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3716       -1,    -1,    92,    93,    94,    -1,    96,    97,    98,    -1,
3717       -1,    -1,    40,    -1,    -1,    -1,    -1,    -1,   108,   109,
3718       -1,   111,   112,    -1,   114,   115,   116,   117,   118,    -1,
3719       -1,    -1,    -1,    -1,   124,    -1,   126,    -1,    -1,   129,
3720       68,    69,    70,    -1,    72,    73,    74,    75,    76,    77,
3721       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3722       -1,    -1,    -1,    -1,    92,    93,    94,    -1,    96,    97,
3723       98,    -1,    -1,    -1,    40,    -1,    -1,    -1,    -1,    -1,
3724       -1,   109,    -1,   111,   112,    -1,   114,   115,   116,   117,
3725      118,    -1,    -1,    -1,    -1,    -1,   124,    -1,   126,    -1,
3726       -1,   129,    68,    69,    70,    -1,    72,    73,    74,    75,
3727       76,    77,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3728       -1,    -1,    -1,    -1,    -1,    -1,    92,    93,    94,    -1,
3729       96,    97,    98,    -1,    -1,    -1,    40,    -1,    -1,    -1,
3730       -1,    -1,    -1,   109,    -1,   111,   112,    -1,   114,   115,
3731      116,   117,   118,    -1,    -1,    -1,    -1,    -1,   124,    -1,
3732      126,    -1,    -1,   129,    68,    69,    70,    -1,    72,    73,
3733       74,    75,    76,    77,    -1,    -1,    -1,    -1,    -1,    -1,
3734       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    92,    93,
3735       94,    -1,    96,    97,    98,    -1,    -1,    -1,    -1,    -1,
3736       -1,    -1,    -1,    -1,    -1,    -1,    -1,   111,   112,    -1,
3737      114,   115,   116,   117,   118,    -1,    -1,    -1,    -1,    -1,
3738      124,    -1,   126,    -1,    -1,   129
3739 };
3740
3741 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
3742    symbol of state STATE-NUM.  */
3743 static const yytype_uint16 yystos[] =
3744 {
3745        0,     3,     4,     5,     6,     8,     9,    10,    11,    12,
3746       13,    14,    17,    18,    19,    20,    21,    22,    23,    24,
3747       25,    26,    28,    29,    36,    38,    39,    41,    43,    45,
3748       47,    48,    49,    52,    53,    55,    56,    63,    64,    65,
3749       71,    92,    93,   101,   111,   114,   119,   120,   124,   126,
3750      128,   130,   137,   138,   139,   140,   146,   149,   151,   159,
3751      162,   163,   164,   165,   166,   173,   181,   184,   185,   188,
3752      191,   192,   193,   194,   198,   200,   209,   214,   215,   216,
3753      227,   234,   237,   250,   251,   252,   257,   261,   265,   266,
3754      268,   269,   270,    91,    50,   124,   124,   156,   157,   124,
3755        3,     4,    16,    17,    29,   128,   186,   187,    16,     3,
3756        4,   261,     3,   236,   261,   124,     3,   187,   240,   261,
3757      128,   124,   129,    16,   261,   124,     3,     5,     8,     9,
3758       10,   258,   259,   260,   261,   261,   261,   261,   261,   256,
3759      261,   246,   247,   248,   254,   261,    30,    32,    37,    42,
3760       46,    67,   101,   134,   145,   146,   147,   151,   153,   167,
3761      168,   183,   192,   253,     3,     0,   140,   128,     3,    46,
3762      153,   160,   161,   257,   147,   148,    16,    26,    31,    32,
3763       44,    46,   208,   267,     4,   194,     3,   128,   221,   225,
3764      102,    40,    68,    69,    70,    72,    73,    74,    75,    76,
3765       77,    78,    79,    80,    81,    82,    83,    84,    85,    86,
3766       87,    88,    89,    90,    92,    93,    94,    96,    97,    98,
3767      104,   105,   107,   108,   109,   111,   112,   114,   115,   116,
3768      117,   118,   124,   126,   129,     3,   124,   255,   256,    12,
3769      148,   174,   190,   128,   129,   186,   187,   239,   240,   241,
3770      249,   124,   255,   129,   182,   246,     3,   104,   255,   134,
3771      106,   102,   102,   135,   127,   102,   254,     3,     3,   154,
3772      155,   255,   255,   154,     3,   134,   147,   128,   138,     3,
3773      101,    69,   101,     3,    35,    51,   233,     3,     3,   210,
3774      261,     3,   221,   226,   228,   229,   261,   261,   261,   261,
3775      261,   261,   261,   261,   261,   261,   261,   261,   261,   261,
3776      261,   261,   261,   261,   261,   261,   261,   261,   261,   261,
3777      117,   130,   186,   264,   261,   261,   261,   261,   261,   261,
3778      261,   261,   261,   261,   261,   261,   261,   261,   261,   246,
3779      261,     3,     4,   117,   124,   126,   130,   263,   264,   135,
3780      124,   261,   101,   126,   141,   142,   143,   149,   151,   198,
3781      200,   209,   234,   189,   186,   129,   124,   245,     3,    95,
3782      230,   231,   232,   135,   117,   186,   144,   145,   135,   261,
3783      135,   254,   259,   261,   106,   244,   102,   145,   134,   244,
3784      255,   255,   104,     3,    54,   195,    54,   196,     3,   211,
3785      212,   222,   104,   104,   112,   116,   217,   229,   126,   264,
3786      106,   135,   127,   262,   261,   126,   264,    91,   156,   255,
3787      135,   150,   134,   143,   128,   141,   246,   104,   106,   213,
3788      232,   135,   102,   134,   156,   106,    36,   117,   241,   243,
3789      104,   152,   155,   134,   101,   135,     3,     5,   124,   241,
3790       15,   197,   241,   242,   128,   244,   102,   134,     5,   221,
3791        5,   221,   218,   223,   261,   261,   261,   127,   261,   264,
3792      135,   128,   261,   141,   134,   135,   261,   243,   244,    95,
3793      232,    27,    33,   175,   177,   179,   180,    66,   158,   254,
3794      261,   257,   156,   230,   242,   128,   102,   201,   152,   212,
3795      112,     5,   111,   112,   128,   219,   224,   227,   127,   135,
3796      127,    34,    62,   169,   170,   171,   172,   127,   134,   213,
3797      128,   232,   128,   124,   175,   177,   156,   135,   135,   199,
3798      241,    46,   101,   192,   205,   206,   207,   116,   261,   111,
3799      227,   223,   261,   106,   134,   171,   172,   238,   178,     3,
3800      156,   244,   101,   146,   151,   192,   202,   203,   204,   209,
3801      234,     3,    26,   134,   207,   225,   220,   116,   223,   106,
3802      144,   144,   144,   244,   128,   128,   134,   204,   233,   218,
3803      134,   225,   144,   134,   134,   135,   235,   202,     3,   112,
3804      218,   176,   144,   134,   124,   112,   128,   134,   230,   144,
3805      135,   134,   244
3806 };
3807
3808 #define yyerrok         (yyerrstatus = 0)
3809 #define yyclearin       (yychar = YYEMPTY)
3810 #define YYEMPTY         (-2)
3811 #define YYEOF           0
3812
3813 #define YYACCEPT        goto yyacceptlab
3814 #define YYABORT         goto yyabortlab
3815 #define YYERROR         goto yyerrorlab
3816
3817
3818 /* Like YYERROR except do call yyerror.  This remains here temporarily
3819    to ease the transition to the new meaning of YYERROR, for GCC.
3820    Once GCC version 2 has supplanted version 1, this can go.  */
3821
3822 #define YYFAIL          goto yyerrlab
3823
3824 #define YYRECOVERING()  (!!yyerrstatus)
3825
3826 #define YYBACKUP(Token, Value)                                  \
3827 do                                                              \
3828   if (yychar == YYEMPTY && yylen == 1)                          \
3829     {                                                           \
3830       yychar = (Token);                                         \
3831       yylval = (Value);                                         \
3832       yytoken = YYTRANSLATE (yychar);                           \
3833       YYPOPSTACK (1);                                           \
3834       goto yybackup;                                            \
3835     }                                                           \
3836   else                                                          \
3837     {                                                           \
3838       yyerror (YY_("syntax error: cannot back up")); \
3839       YYERROR;                                                  \
3840     }                                                           \
3841 while (YYID (0))
3842
3843
3844 #define YYTERROR        1
3845 #define YYERRCODE       256
3846
3847
3848 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
3849    If N is 0, then set CURRENT to the empty location which ends
3850    the previous symbol: RHS[0] (always defined).  */
3851
3852 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
3853 #ifndef YYLLOC_DEFAULT
3854 # define YYLLOC_DEFAULT(Current, Rhs, N)                                \
3855     do                                                                  \
3856       if (YYID (N))                                                    \
3857         {                                                               \
3858           (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
3859           (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
3860           (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
3861           (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
3862         }                                                               \
3863       else                                                              \
3864         {                                                               \
3865           (Current).first_line   = (Current).last_line   =              \
3866             YYRHSLOC (Rhs, 0).last_line;                                \
3867           (Current).first_column = (Current).last_column =              \
3868             YYRHSLOC (Rhs, 0).last_column;                              \
3869         }                                                               \
3870     while (YYID (0))
3871 #endif
3872
3873
3874 /* YY_LOCATION_PRINT -- Print the location on the stream.
3875    This macro was not mandated originally: define only if we know
3876    we won't break user code: when these are the locations we know.  */
3877
3878 #ifndef YY_LOCATION_PRINT
3879 # if YYLTYPE_IS_TRIVIAL
3880 #  define YY_LOCATION_PRINT(File, Loc)                  \
3881      fprintf (File, "%d.%d-%d.%d",                      \
3882               (Loc).first_line, (Loc).first_column,     \
3883               (Loc).last_line,  (Loc).last_column)
3884 # else
3885 #  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
3886 # endif
3887 #endif
3888
3889
3890 /* YYLEX -- calling `yylex' with the right arguments.  */
3891
3892 #ifdef YYLEX_PARAM
3893 # define YYLEX yylex (YYLEX_PARAM)
3894 #else
3895 # define YYLEX yylex ()
3896 #endif
3897
3898 /* Enable debugging if requested.  */
3899 #if YYDEBUG
3900
3901 # ifndef YYFPRINTF
3902 #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
3903 #  define YYFPRINTF fprintf
3904 # endif
3905
3906 # define YYDPRINTF(Args)                        \
3907 do {                                            \
3908   if (yydebug)                                  \
3909     YYFPRINTF Args;                             \
3910 } while (YYID (0))
3911
3912 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
3913 do {                                                                      \
3914   if (yydebug)                                                            \
3915     {                                                                     \
3916       YYFPRINTF (stderr, "%s ", Title);                                   \
3917       yy_symbol_print (stderr,                                            \
3918                   Type, Value); \
3919       YYFPRINTF (stderr, "\n");                                           \
3920     }                                                                     \
3921 } while (YYID (0))
3922
3923
3924 /*--------------------------------.
3925 | Print this symbol on YYOUTPUT.  |
3926 `--------------------------------*/
3927
3928 /*ARGSUSED*/
3929 #if (defined __STDC__ || defined __C99__FUNC__ \
3930      || defined __cplusplus || defined _MSC_VER)
3931 static void
3932 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
3933 #else
3934 static void
3935 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
3936     FILE *yyoutput;
3937     int yytype;
3938     YYSTYPE const * const yyvaluep;
3939 #endif
3940 {
3941   if (!yyvaluep)
3942     return;
3943 # ifdef YYPRINT
3944   if (yytype < YYNTOKENS)
3945     YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
3946 # else
3947   YYUSE (yyoutput);
3948 # endif
3949   switch (yytype)
3950     {
3951       default:
3952         break;
3953     }
3954 }
3955
3956
3957 /*--------------------------------.
3958 | Print this symbol on YYOUTPUT.  |
3959 `--------------------------------*/
3960
3961 #if (defined __STDC__ || defined __C99__FUNC__ \
3962      || defined __cplusplus || defined _MSC_VER)
3963 static void
3964 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
3965 #else
3966 static void
3967 yy_symbol_print (yyoutput, yytype, yyvaluep)
3968     FILE *yyoutput;
3969     int yytype;
3970     YYSTYPE const * const yyvaluep;
3971 #endif
3972 {
3973   if (yytype < YYNTOKENS)
3974     YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
3975   else
3976     YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
3977
3978   yy_symbol_value_print (yyoutput, yytype, yyvaluep);
3979   YYFPRINTF (yyoutput, ")");
3980 }
3981
3982 /*------------------------------------------------------------------.
3983 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
3984 | TOP (included).                                                   |
3985 `------------------------------------------------------------------*/
3986
3987 #if (defined __STDC__ || defined __C99__FUNC__ \
3988      || defined __cplusplus || defined _MSC_VER)
3989 static void
3990 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
3991 #else
3992 static void
3993 yy_stack_print (yybottom, yytop)
3994     yytype_int16 *yybottom;
3995     yytype_int16 *yytop;
3996 #endif
3997 {
3998   YYFPRINTF (stderr, "Stack now");
3999   for (; yybottom <= yytop; yybottom++)
4000     {
4001       int yybot = *yybottom;
4002       YYFPRINTF (stderr, " %d", yybot);
4003     }
4004   YYFPRINTF (stderr, "\n");
4005 }
4006
4007 # define YY_STACK_PRINT(Bottom, Top)                            \
4008 do {                                                            \
4009   if (yydebug)                                                  \
4010     yy_stack_print ((Bottom), (Top));                           \
4011 } while (YYID (0))
4012
4013
4014 /*------------------------------------------------.
4015 | Report that the YYRULE is going to be reduced.  |
4016 `------------------------------------------------*/
4017
4018 #if (defined __STDC__ || defined __C99__FUNC__ \
4019      || defined __cplusplus || defined _MSC_VER)
4020 static void
4021 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
4022 #else
4023 static void
4024 yy_reduce_print (yyvsp, yyrule)
4025     YYSTYPE *yyvsp;
4026     int yyrule;
4027 #endif
4028 {
4029   int yynrhs = yyr2[yyrule];
4030   int yyi;
4031   unsigned long int yylno = yyrline[yyrule];
4032   YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
4033              yyrule - 1, yylno);
4034   /* The symbols being reduced.  */
4035   for (yyi = 0; yyi < yynrhs; yyi++)
4036     {
4037       YYFPRINTF (stderr, "   $%d = ", yyi + 1);
4038       yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
4039                        &(yyvsp[(yyi + 1) - (yynrhs)])
4040                                        );
4041       YYFPRINTF (stderr, "\n");
4042     }
4043 }
4044
4045 # define YY_REDUCE_PRINT(Rule)          \
4046 do {                                    \
4047   if (yydebug)                          \
4048     yy_reduce_print (yyvsp, Rule); \
4049 } while (YYID (0))
4050
4051 /* Nonzero means print parse trace.  It is left uninitialized so that
4052    multiple parsers can coexist.  */
4053 int yydebug;
4054 #else /* !YYDEBUG */
4055 # define YYDPRINTF(Args)
4056 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
4057 # define YY_STACK_PRINT(Bottom, Top)
4058 # define YY_REDUCE_PRINT(Rule)
4059 #endif /* !YYDEBUG */
4060
4061
4062 /* YYINITDEPTH -- initial size of the parser's stacks.  */
4063 #ifndef YYINITDEPTH
4064 # define YYINITDEPTH 200
4065 #endif
4066
4067 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
4068    if the built-in stack extension method is used).
4069
4070    Do not make this value too large; the results are undefined if
4071    YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
4072    evaluated with infinite-precision integer arithmetic.  */
4073
4074 #ifndef YYMAXDEPTH
4075 # define YYMAXDEPTH 10000
4076 #endif
4077
4078 \f
4079
4080 #if YYERROR_VERBOSE
4081
4082 # ifndef yystrlen
4083 #  if defined __GLIBC__ && defined _STRING_H
4084 #   define yystrlen strlen
4085 #  else
4086 /* Return the length of YYSTR.  */
4087 #if (defined __STDC__ || defined __C99__FUNC__ \
4088      || defined __cplusplus || defined _MSC_VER)
4089 static YYSIZE_T
4090 yystrlen (const char *yystr)
4091 #else
4092 static YYSIZE_T
4093 yystrlen (yystr)
4094     const char *yystr;
4095 #endif
4096 {
4097   YYSIZE_T yylen;
4098   for (yylen = 0; yystr[yylen]; yylen++)
4099     continue;
4100   return yylen;
4101 }
4102 #  endif
4103 # endif
4104
4105 # ifndef yystpcpy
4106 #  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
4107 #   define yystpcpy stpcpy
4108 #  else
4109 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
4110    YYDEST.  */
4111 #if (defined __STDC__ || defined __C99__FUNC__ \
4112      || defined __cplusplus || defined _MSC_VER)
4113 static char *
4114 yystpcpy (char *yydest, const char *yysrc)
4115 #else
4116 static char *
4117 yystpcpy (yydest, yysrc)
4118     char *yydest;
4119     const char *yysrc;
4120 #endif
4121 {
4122   char *yyd = yydest;
4123   const char *yys = yysrc;
4124
4125   while ((*yyd++ = *yys++) != '\0')
4126     continue;
4127
4128   return yyd - 1;
4129 }
4130 #  endif
4131 # endif
4132
4133 # ifndef yytnamerr
4134 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
4135    quotes and backslashes, so that it's suitable for yyerror.  The
4136    heuristic is that double-quoting is unnecessary unless the string
4137    contains an apostrophe, a comma, or backslash (other than
4138    backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
4139    null, do not copy; instead, return the length of what the result
4140    would have been.  */
4141 static YYSIZE_T
4142 yytnamerr (char *yyres, const char *yystr)
4143 {
4144   if (*yystr == '"')
4145     {
4146       YYSIZE_T yyn = 0;
4147       char const *yyp = yystr;
4148
4149       for (;;)
4150         switch (*++yyp)
4151           {
4152           case '\'':
4153           case ',':
4154             goto do_not_strip_quotes;
4155
4156           case '\\':
4157             if (*++yyp != '\\')
4158               goto do_not_strip_quotes;
4159             /* Fall through.  */
4160           default:
4161             if (yyres)
4162               yyres[yyn] = *yyp;
4163             yyn++;
4164             break;
4165
4166           case '"':
4167             if (yyres)
4168               yyres[yyn] = '\0';
4169             return yyn;
4170           }
4171     do_not_strip_quotes: ;
4172     }
4173
4174   if (! yyres)
4175     return yystrlen (yystr);
4176
4177   return yystpcpy (yyres, yystr) - yyres;
4178 }
4179 # endif
4180
4181 /* Copy into YYRESULT an error message about the unexpected token
4182    YYCHAR while in state YYSTATE.  Return the number of bytes copied,
4183    including the terminating null byte.  If YYRESULT is null, do not
4184    copy anything; just return the number of bytes that would be
4185    copied.  As a special case, return 0 if an ordinary "syntax error"
4186    message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
4187    size calculation.  */
4188 static YYSIZE_T
4189 yysyntax_error (char *yyresult, int yystate, int yychar)
4190 {
4191   int yyn = yypact[yystate];
4192
4193   if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
4194     return 0;
4195   else
4196     {
4197       int yytype = YYTRANSLATE (yychar);
4198       YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
4199       YYSIZE_T yysize = yysize0;
4200       YYSIZE_T yysize1;
4201       int yysize_overflow = 0;
4202       enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
4203       char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
4204       int yyx;
4205
4206 # if 0
4207       /* This is so xgettext sees the translatable formats that are
4208          constructed on the fly.  */
4209       YY_("syntax error, unexpected %s");
4210       YY_("syntax error, unexpected %s, expecting %s");
4211       YY_("syntax error, unexpected %s, expecting %s or %s");
4212       YY_("syntax error, unexpected %s, expecting %s or %s or %s");
4213       YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
4214 # endif
4215       char *yyfmt;
4216       char const *yyf;
4217       static char const yyunexpected[] = "syntax error, unexpected %s";
4218       static char const yyexpecting[] = ", expecting %s";
4219       static char const yyor[] = " or %s";
4220       char yyformat[sizeof yyunexpected
4221                     + sizeof yyexpecting - 1
4222                     + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
4223                        * (sizeof yyor - 1))];
4224       char const *yyprefix = yyexpecting;
4225
4226       /* Start YYX at -YYN if negative to avoid negative indexes in
4227          YYCHECK.  */
4228       int yyxbegin = yyn < 0 ? -yyn : 0;
4229
4230       /* Stay within bounds of both yycheck and yytname.  */
4231       int yychecklim = YYLAST - yyn + 1;
4232       int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
4233       int yycount = 1;
4234
4235       yyarg[0] = yytname[yytype];
4236       yyfmt = yystpcpy (yyformat, yyunexpected);
4237
4238       for (yyx = yyxbegin; yyx < yyxend; ++yyx)
4239         if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
4240           {
4241             if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
4242               {
4243                 yycount = 1;
4244                 yysize = yysize0;
4245                 yyformat[sizeof yyunexpected - 1] = '\0';
4246                 break;
4247               }
4248             yyarg[yycount++] = yytname[yyx];
4249             yysize1 = yysize + yytnamerr (0, yytname[yyx]);
4250             yysize_overflow |= (yysize1 < yysize);
4251             yysize = yysize1;
4252             yyfmt = yystpcpy (yyfmt, yyprefix);
4253             yyprefix = yyor;
4254           }
4255
4256       yyf = YY_(yyformat);
4257       yysize1 = yysize + yystrlen (yyf);
4258       yysize_overflow |= (yysize1 < yysize);
4259       yysize = yysize1;
4260
4261       if (yysize_overflow)
4262         return YYSIZE_MAXIMUM;
4263
4264       if (yyresult)
4265         {
4266           /* Avoid sprintf, as that infringes on the user's name space.
4267              Don't have undefined behavior even if the translation
4268              produced a string with the wrong number of "%s"s.  */
4269           char *yyp = yyresult;
4270           int yyi = 0;
4271           while ((*yyp = *yyf) != '\0')
4272             {
4273               if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
4274                 {
4275                   yyp += yytnamerr (yyp, yyarg[yyi++]);
4276                   yyf += 2;
4277                 }
4278               else
4279                 {
4280                   yyp++;
4281                   yyf++;
4282                 }
4283             }
4284         }
4285       return yysize;
4286     }
4287 }
4288 #endif /* YYERROR_VERBOSE */
4289 \f
4290
4291 /*-----------------------------------------------.
4292 | Release the memory associated to this symbol.  |
4293 `-----------------------------------------------*/
4294
4295 /*ARGSUSED*/
4296 #if (defined __STDC__ || defined __C99__FUNC__ \
4297      || defined __cplusplus || defined _MSC_VER)
4298 static void
4299 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
4300 #else
4301 static void
4302 yydestruct (yymsg, yytype, yyvaluep)
4303     const char *yymsg;
4304     int yytype;
4305     YYSTYPE *yyvaluep;
4306 #endif
4307 {
4308   YYUSE (yyvaluep);
4309
4310   if (!yymsg)
4311     yymsg = "Deleting";
4312   YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
4313
4314   switch (yytype)
4315     {
4316
4317       default:
4318         break;
4319     }
4320 }
4321
4322 /* Prevent warnings from -Wmissing-prototypes.  */
4323 #ifdef YYPARSE_PARAM
4324 #if defined __STDC__ || defined __cplusplus
4325 int yyparse (void *YYPARSE_PARAM);
4326 #else
4327 int yyparse ();
4328 #endif
4329 #else /* ! YYPARSE_PARAM */
4330 #if defined __STDC__ || defined __cplusplus
4331 int yyparse (void);
4332 #else
4333 int yyparse ();
4334 #endif
4335 #endif /* ! YYPARSE_PARAM */
4336
4337
4338 /* The lookahead symbol.  */
4339 int yychar;
4340
4341 /* The semantic value of the lookahead symbol.  */
4342 YYSTYPE yylval;
4343
4344 /* Number of syntax errors so far.  */
4345 int yynerrs;
4346
4347
4348
4349 /*-------------------------.
4350 | yyparse or yypush_parse.  |
4351 `-------------------------*/
4352
4353 #ifdef YYPARSE_PARAM
4354 #if (defined __STDC__ || defined __C99__FUNC__ \
4355      || defined __cplusplus || defined _MSC_VER)
4356 int
4357 yyparse (void *YYPARSE_PARAM)
4358 #else
4359 int
4360 yyparse (YYPARSE_PARAM)
4361     void *YYPARSE_PARAM;
4362 #endif
4363 #else /* ! YYPARSE_PARAM */
4364 #if (defined __STDC__ || defined __C99__FUNC__ \
4365      || defined __cplusplus || defined _MSC_VER)
4366 int
4367 yyparse (void)
4368 #else
4369 int
4370 yyparse ()
4371
4372 #endif
4373 #endif
4374 {
4375
4376
4377     int yystate;
4378     /* Number of tokens to shift before error messages enabled.  */
4379     int yyerrstatus;
4380
4381     /* The stacks and their tools:
4382        `yyss': related to states.
4383        `yyvs': related to semantic values.
4384
4385        Refer to the stacks thru separate pointers, to allow yyoverflow
4386        to reallocate them elsewhere.  */
4387
4388     /* The state stack.  */
4389     yytype_int16 yyssa[YYINITDEPTH];
4390     yytype_int16 *yyss;
4391     yytype_int16 *yyssp;
4392
4393     /* The semantic value stack.  */
4394     YYSTYPE yyvsa[YYINITDEPTH];
4395     YYSTYPE *yyvs;
4396     YYSTYPE *yyvsp;
4397
4398     YYSIZE_T yystacksize;
4399
4400   int yyn;
4401   int yyresult;
4402   /* Lookahead token as an internal (translated) token number.  */
4403   int yytoken;
4404   /* The variables used to return semantic value and location from the
4405      action routines.  */
4406   YYSTYPE yyval;
4407
4408 #if YYERROR_VERBOSE
4409   /* Buffer for error messages, and its allocated size.  */
4410   char yymsgbuf[128];
4411   char *yymsg = yymsgbuf;
4412   YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
4413 #endif
4414
4415 #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
4416
4417   /* The number of symbols on the RHS of the reduced rule.
4418      Keep to zero when no symbol should be popped.  */
4419   int yylen = 0;
4420
4421   yytoken = 0;
4422   yyss = yyssa;
4423   yyvs = yyvsa;
4424   yystacksize = YYINITDEPTH;
4425
4426   YYDPRINTF ((stderr, "Starting parse\n"));
4427
4428   yystate = 0;
4429   yyerrstatus = 0;
4430   yynerrs = 0;
4431   yychar = YYEMPTY; /* Cause a token to be read.  */
4432
4433   /* Initialize stack pointers.
4434      Waste one element of value and location stack
4435      so that they stay on the same level as the state stack.
4436      The wasted elements are never initialized.  */
4437   yyssp = yyss;
4438   yyvsp = yyvs;
4439
4440   goto yysetstate;
4441
4442 /*------------------------------------------------------------.
4443 | yynewstate -- Push a new state, which is found in yystate.  |
4444 `------------------------------------------------------------*/
4445  yynewstate:
4446   /* In all cases, when you get here, the value and location stacks
4447      have just been pushed.  So pushing a state here evens the stacks.  */
4448   yyssp++;
4449
4450  yysetstate:
4451   *yyssp = yystate;
4452
4453   if (yyss + yystacksize - 1 <= yyssp)
4454     {
4455       /* Get the current used size of the three stacks, in elements.  */
4456       YYSIZE_T yysize = yyssp - yyss + 1;
4457
4458 #ifdef yyoverflow
4459       {
4460         /* Give user a chance to reallocate the stack.  Use copies of
4461            these so that the &'s don't force the real ones into
4462            memory.  */
4463         YYSTYPE *yyvs1 = yyvs;
4464         yytype_int16 *yyss1 = yyss;
4465
4466         /* Each stack pointer address is followed by the size of the
4467            data in use in that stack, in bytes.  This used to be a
4468            conditional around just the two extra args, but that might
4469            be undefined if yyoverflow is a macro.  */
4470         yyoverflow (YY_("memory exhausted"),
4471                     &yyss1, yysize * sizeof (*yyssp),
4472                     &yyvs1, yysize * sizeof (*yyvsp),
4473                     &yystacksize);
4474
4475         yyss = yyss1;
4476         yyvs = yyvs1;
4477       }
4478 #else /* no yyoverflow */
4479 # ifndef YYSTACK_RELOCATE
4480       goto yyexhaustedlab;
4481 # else
4482       /* Extend the stack our own way.  */
4483       if (YYMAXDEPTH <= yystacksize)
4484         goto yyexhaustedlab;
4485       yystacksize *= 2;
4486       if (YYMAXDEPTH < yystacksize)
4487         yystacksize = YYMAXDEPTH;
4488
4489       {
4490         yytype_int16 *yyss1 = yyss;
4491         union yyalloc *yyptr =
4492           (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
4493         if (! yyptr)
4494           goto yyexhaustedlab;
4495         YYSTACK_RELOCATE (yyss_alloc, yyss);
4496         YYSTACK_RELOCATE (yyvs_alloc, yyvs);
4497 #  undef YYSTACK_RELOCATE
4498         if (yyss1 != yyssa)
4499           YYSTACK_FREE (yyss1);
4500       }
4501 # endif
4502 #endif /* no yyoverflow */
4503
4504       yyssp = yyss + yysize - 1;
4505       yyvsp = yyvs + yysize - 1;
4506
4507       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
4508                   (unsigned long int) yystacksize));
4509
4510       if (yyss + yystacksize - 1 <= yyssp)
4511         YYABORT;
4512     }
4513
4514   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
4515
4516   if (yystate == YYFINAL)
4517     YYACCEPT;
4518
4519   goto yybackup;
4520
4521 /*-----------.
4522 | yybackup.  |
4523 `-----------*/
4524 yybackup:
4525
4526   /* Do appropriate processing given the current state.  Read a
4527      lookahead token if we need one and don't already have one.  */
4528
4529   /* First try to decide what to do without reference to lookahead token.  */
4530   yyn = yypact[yystate];
4531   if (yyn == YYPACT_NINF)
4532     goto yydefault;
4533
4534   /* Not known => get a lookahead token if don't already have one.  */
4535
4536   /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
4537   if (yychar == YYEMPTY)
4538     {
4539       YYDPRINTF ((stderr, "Reading a token: "));
4540       yychar = YYLEX;
4541     }
4542
4543   if (yychar <= YYEOF)
4544     {
4545       yychar = yytoken = YYEOF;
4546       YYDPRINTF ((stderr, "Now at end of input.\n"));
4547     }
4548   else
4549     {
4550       yytoken = YYTRANSLATE (yychar);
4551       YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
4552     }
4553
4554   /* If the proper action on seeing token YYTOKEN is to reduce or to
4555      detect an error, take that action.  */
4556   yyn += yytoken;
4557   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
4558     goto yydefault;
4559   yyn = yytable[yyn];
4560   if (yyn <= 0)
4561     {
4562       if (yyn == 0 || yyn == YYTABLE_NINF)
4563         goto yyerrlab;
4564       yyn = -yyn;
4565       goto yyreduce;
4566     }
4567
4568   /* Count tokens shifted since error; after three, turn off error
4569      status.  */
4570   if (yyerrstatus)
4571     yyerrstatus--;
4572
4573   /* Shift the lookahead token.  */
4574   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
4575
4576   /* Discard the shifted token.  */
4577   yychar = YYEMPTY;
4578
4579   yystate = yyn;
4580   *++yyvsp = yylval;
4581
4582   goto yynewstate;
4583
4584
4585 /*-----------------------------------------------------------.
4586 | yydefault -- do the default action for the current state.  |
4587 `-----------------------------------------------------------*/
4588 yydefault:
4589   yyn = yydefact[yystate];
4590   if (yyn == 0)
4591     goto yyerrlab;
4592   goto yyreduce;
4593
4594
4595 /*-----------------------------.
4596 | yyreduce -- Do a reduction.  |
4597 `-----------------------------*/
4598 yyreduce:
4599   /* yyn is the number of a rule to reduce with.  */
4600   yylen = yyr2[yyn];
4601
4602   /* If YYLEN is nonzero, implement the default value of the action:
4603      `$$ = $1'.
4604
4605      Otherwise, the following line sets YYVAL to garbage.
4606      This behavior is undocumented and Bison
4607      users should not rely upon it.  Assigning to YYVAL
4608      unconditionally makes the parser a bit smaller, and it avoids a
4609      GCC warning that YYVAL may be used uninitialized.  */
4610   yyval = yyvsp[1-yylen];
4611
4612
4613   YY_REDUCE_PRINT (yyn);
4614   switch (yyn)
4615     {
4616         
4617     case 13:
4618     if(as3_pass==2) {
4619
4620 /* Line 1464 of skeleton.m4  */
4621 #line 1979 "parser.y"
4622     {PASS_ALWAYS as3_pass=(yyvsp[(1) - (4)].number_int);}
4623     }
4624     break;
4625
4626
4627   
4628     case 24:
4629     if(as3_pass==2) {
4630
4631 /* Line 1464 of skeleton.m4  */
4632 #line 1991 "parser.y"
4633     {PASS_ALWAYS as3_pass=(yyvsp[(1) - (4)].number_int);}
4634     }
4635     break;
4636
4637
4638   
4639     case 25:
4640     if(as3_pass==2) {
4641
4642 /* Line 1464 of skeleton.m4  */
4643 #line 1992 "parser.y"
4644     {PASS_ALWAYS as3_pass=(yyvsp[(2) - (4)].number_int);PASS1 as3_warning("embed command ignored");}
4645     }
4646     break;
4647
4648
4649   
4650     case 27:
4651     if(as3_pass==2) {
4652
4653 /* Line 1464 of skeleton.m4  */
4654 #line 1995 "parser.y"
4655     {(yyval.code)=(yyvsp[(1) - (1)].code);}
4656     }
4657     break;
4658
4659
4660   
4661     case 28:
4662     if(as3_pass==2) {
4663
4664 /* Line 1464 of skeleton.m4  */
4665 #line 1996 "parser.y"
4666     {(yyval.code)=code_new();}
4667     }
4668     break;
4669
4670
4671   
4672     case 29:
4673     if(as3_pass==2) {
4674
4675 /* Line 1464 of skeleton.m4  */
4676 #line 1998 "parser.y"
4677     {
4678     (yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));
4679 }
4680     }
4681     break;
4682
4683
4684   
4685     case 30:
4686     if(as3_pass==2) {
4687
4688 /* Line 1464 of skeleton.m4  */
4689 #line 2001 "parser.y"
4690     {(yyval.code)=(yyvsp[(1) - (1)].code);}
4691     }
4692     break;
4693
4694
4695   
4696     case 44:
4697     if(as3_pass==2) {
4698
4699 /* Line 1464 of skeleton.m4  */
4700 #line 2017 "parser.y"
4701     {(yyval.code)=(yyvsp[(2) - (3)].code);}
4702     }
4703     break;
4704
4705
4706   
4707     case 45:
4708     if(as3_pass==2) {
4709
4710 /* Line 1464 of skeleton.m4  */
4711 #line 2018 "parser.y"
4712     {(yyval.code)=0;}
4713     }
4714     break;
4715
4716
4717   
4718     case 46:
4719     if(as3_pass==2) {
4720
4721 /* Line 1464 of skeleton.m4  */
4722 #line 2021 "parser.y"
4723     {(yyval.code)=0;}
4724     }
4725     break;
4726
4727
4728   
4729     case 53:
4730     if(as3_pass==2) {
4731
4732 /* Line 1464 of skeleton.m4  */
4733 #line 2028 "parser.y"
4734     {
4735     PASS_ALWAYS 
4736     if(as3_pass) {
4737         (yyval.code) = (yyvsp[(3) - (4)].code);
4738     } else {
4739         (yyval.code) = 0;
4740     }
4741     as3_pass=(yyvsp[(1) - (4)].number_int);
4742 }
4743     }
4744     break;
4745
4746
4747   
4748     case 54:
4749     if(as3_pass==2) {
4750
4751 /* Line 1464 of skeleton.m4  */
4752 #line 2040 "parser.y"
4753     {(yyval.code)=(yyvsp[(1) - (2)].code);}
4754     }
4755     break;
4756
4757
4758   
4759     case 55:
4760     if(as3_pass==2) {
4761
4762 /* Line 1464 of skeleton.m4  */
4763 #line 2041 "parser.y"
4764     {(yyval.code)=(yyvsp[(1) - (1)].code);}
4765     }
4766     break;
4767
4768
4769   
4770     case 56:
4771     if(as3_pass==2) {
4772
4773 /* Line 1464 of skeleton.m4  */
4774 #line 2045 "parser.y"
4775     {
4776     if((yyvsp[(1) - (1)].code)) {
4777         if(!global->init) 
4778             global->init = abc_initscript(global->file);
4779         code_t**cc = &global->init->method->body->code;
4780         *cc = code_append(*cc, (yyvsp[(1) - (1)].code));
4781     }
4782 }
4783     }
4784     break;
4785
4786
4787   
4788     case 57:
4789     if(as3_pass==2) {
4790
4791 /* Line 1464 of skeleton.m4  */
4792 #line 2056 "parser.y"
4793     {
4794     PASS_ALWAYS
4795     (yyval.number_int) = as3_pass;
4796     as3_pass=0;
4797 }
4798     }
4799     break;
4800
4801
4802   
4803     case 58:
4804     if(as3_pass==2) {
4805
4806 /* Line 1464 of skeleton.m4  */
4807 #line 2064 "parser.y"
4808     {
4809     PASS12
4810     (yyval.number_int)=as3_pass;
4811     char*key = concat3((yyvsp[(1) - (3)].id),"::",(yyvsp[(3) - (3)].id));
4812     if(!definitions || !dict_contains(definitions, key)) {
4813         as3_pass=0;
4814     }
4815     free(key);
4816 }
4817     }
4818     break;
4819
4820
4821   
4822     case 59:
4823     if(as3_pass==2) {
4824
4825 /* Line 1464 of skeleton.m4  */
4826 #line 2091 "parser.y"
4827     {(yyval.node)=(yyvsp[(2) - (2)].node);}
4828     }
4829     break;
4830
4831
4832   
4833     case 60:
4834     if(as3_pass==2) {
4835
4836 /* Line 1464 of skeleton.m4  */
4837 #line 2092 "parser.y"
4838     {(yyval.node)=mkdummynode();}
4839     }
4840     break;
4841
4842
4843   
4844     case 61:
4845     if(as3_pass==2) {
4846
4847 /* Line 1464 of skeleton.m4  */
4848 #line 2094 "parser.y"
4849     {(yyval.code)=(yyvsp[(2) - (2)].code);}
4850     }
4851     break;
4852
4853
4854   
4855     case 62:
4856     if(as3_pass==2) {
4857
4858 /* Line 1464 of skeleton.m4  */
4859 #line 2095 "parser.y"
4860     {(yyval.code)=(yyvsp[(2) - (2)].code);}
4861     }
4862     break;
4863
4864
4865   
4866     case 63:
4867     if(as3_pass==2) {
4868
4869 /* Line 1464 of skeleton.m4  */
4870 #line 2097 "parser.y"
4871     {(yyval.code) = (yyvsp[(1) - (1)].code);}
4872     }
4873     break;
4874
4875
4876   
4877     case 64:
4878     if(as3_pass==2) {
4879
4880 /* Line 1464 of skeleton.m4  */
4881 #line 2098 "parser.y"
4882     {(yyval.code) = code_append((yyvsp[(1) - (3)].code), (yyvsp[(3) - (3)].code));}
4883     }
4884     break;
4885
4886
4887   
4888     case 65:
4889     if(as3_pass==2) {
4890
4891 /* Line 1464 of skeleton.m4  */
4892 #line 2101 "parser.y"
4893     {
4894 PASS12
4895     if(variable_exists((yyvsp[(1) - (3)].id))) 
4896         syntaxerror("Variable %s already defined", (yyvsp[(1) - (3)].id));
4897 PASS1
4898     new_variable(state->method, (yyvsp[(1) - (3)].id), 0, 1, 0);
4899 PASS2
4900    
4901     char slot = 0;
4902     int index = 0;
4903     variable_t*v = 0;
4904     if(state->method->uses_slots) {
4905         v = find_slot(state->method, (yyvsp[(1) - (3)].id));
4906         if(v && !v->init) {
4907             // this variable is stored in a slot
4908             v->init = 1;
4909             v->type = (yyvsp[(2) - (3)].classinfo);
4910             slot = 1;
4911         }
4912     }
4913     if(!v) {
4914         v = new_variable2(state->method, (yyvsp[(1) - (3)].id), (yyvsp[(2) - (3)].classinfo), 1, 0);
4915     }
4916
4917     (yyval.code) = slot?abc_getscopeobject(0, 1):0;
4918     
4919     typedcode_t val = node_read((yyvsp[(3) - (3)].node));
4920     if(!is_subtype_of(val.t, (yyvsp[(2) - (3)].classinfo))) {
4921         syntaxerror("Can't convert %s to %s", val.t->name, (yyvsp[(2) - (3)].classinfo)->name);
4922     }
4923     if((yyvsp[(2) - (3)].classinfo)) {
4924         if(val.c->prev || val.c->opcode != OPCODE_PUSHUNDEFINED) {
4925             (yyval.code) = code_append((yyval.code), val.c);
4926             (yyval.code) = converttype((yyval.code), val.t, (yyvsp[(2) - (3)].classinfo));
4927         } else {
4928             code_free(val.c);
4929             (yyval.code) = defaultvalue((yyval.code), (yyvsp[(2) - (3)].classinfo));
4930         }
4931     } else {
4932         if(val.c->prev || val.c->opcode != OPCODE_PUSHUNDEFINED) {
4933             (yyval.code) = code_append((yyval.code), val.c);
4934             (yyval.code) = abc_coerce_a((yyval.code));
4935         } else {
4936             // don't do anything
4937             code_free(val.c);
4938             code_free((yyval.code));
4939             (yyval.code) = 0;
4940             break;
4941         }
4942     }
4943     if(slot) {
4944         (yyval.code) = abc_setslot((yyval.code), v->index);
4945     } else {
4946         (yyval.code) = abc_setlocal((yyval.code), v->index);
4947         v->init = do_init_variable((yyvsp[(1) - (3)].id));
4948     }
4949 }
4950     }
4951     break;
4952
4953
4954   
4955     case 66:
4956     if(as3_pass==2) {
4957
4958 /* Line 1464 of skeleton.m4  */
4959 #line 2161 "parser.y"
4960     {PASS12 new_state();}
4961     }
4962     break;
4963
4964
4965   
4966     case 67:
4967     if(as3_pass==2) {
4968
4969 /* Line 1464 of skeleton.m4  */
4970 #line 2161 "parser.y"
4971     {
4972     (yyval.code) = var_block((yyvsp[(2) - (2)].code), state->vars);
4973     PASS12 old_state();
4974 }
4975     }
4976     break;
4977
4978
4979   
4980     case 68:
4981     if(as3_pass==2) {
4982
4983 /* Line 1464 of skeleton.m4  */
4984 #line 2165 "parser.y"
4985     {(yyval.code) = code_new();}
4986     }
4987     break;
4988
4989
4990   
4991     case 69:
4992     if(as3_pass==2) {
4993
4994 /* Line 1464 of skeleton.m4  */
4995 #line 2166 "parser.y"
4996     {(yyval.code)=(yyvsp[(2) - (2)].code);}
4997     }
4998     break;
4999
5000
5001   
5002     case 70:
5003     if(as3_pass==2) {
5004
5005 /* Line 1464 of skeleton.m4  */
5006 #line 2169 "parser.y"
5007     {
5008     (yyval.code) = code_new();
5009     (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (6)].value).c);
5010     code_t*myjmp,*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
5011    
5012     (yyval.code) = code_append((yyval.code), (yyvsp[(5) - (6)].code));
5013     if((yyvsp[(6) - (6)].code)) {
5014         myjmp = (yyval.code) = abc_jump((yyval.code), 0);
5015     }
5016     myif->branch = (yyval.code) = abc_nop((yyval.code));
5017     if((yyvsp[(6) - (6)].code)) {
5018         (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
5019         myjmp->branch = (yyval.code) = abc_nop((yyval.code));
5020     }
5021 }
5022     }
5023     break;
5024
5025
5026   
5027     case 71:
5028     if(as3_pass==2) {
5029
5030 /* Line 1464 of skeleton.m4  */
5031 #line 2185 "parser.y"
5032     {(yyval.code)=code_new();}
5033     }
5034     break;
5035
5036
5037   
5038     case 74:
5039     if(as3_pass==2) {
5040
5041 /* Line 1464 of skeleton.m4  */
5042 #line 2192 "parser.y"
5043     {
5044     PASS1 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable(state->method, (yyvsp[(2) - (3)].id),0,1,0);
5045     PASS2 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable(state->method, (yyvsp[(2) - (3)].id),(yyvsp[(3) - (3)].classinfo),1,0);
5046 }
5047     }
5048     break;
5049
5050
5051   
5052     case 75:
5053     if(as3_pass==2) {
5054
5055 /* Line 1464 of skeleton.m4  */
5056 #line 2196 "parser.y"
5057     {
5058     PASS12
5059     (yyval.id)=(yyvsp[(1) - (1)].id);
5060 }
5061     }
5062     break;
5063
5064
5065   
5066     case 76:
5067     if(as3_pass==2) {
5068
5069 /* Line 1464 of skeleton.m4  */
5070 #line 2201 "parser.y"
5071     {PASS12 new_state();(yyval.for_start).name=(yyvsp[(1) - (2)].id);(yyval.for_start).each=0;}
5072     }
5073     break;
5074
5075
5076   
5077     case 77:
5078     if(as3_pass==2) {
5079
5080 /* Line 1464 of skeleton.m4  */
5081 #line 2202 "parser.y"
5082     {PASS12 new_state();(yyval.for_start).name=(yyvsp[(1) - (3)].id);(yyval.for_start).each=1;}
5083     }
5084     break;
5085
5086
5087   
5088     case 78:
5089     if(as3_pass==2) {
5090
5091 /* Line 1464 of skeleton.m4  */
5092 #line 2204 "parser.y"
5093     {
5094     if((yyvsp[(1) - (8)].for_start).each) syntaxerror("invalid syntax: ; not allowed in for each statement");
5095     (yyval.code) = code_new();
5096     (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (8)].code));
5097     code_t*loopstart = (yyval.code) = abc_label((yyval.code));
5098     (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (8)].value).c);
5099     code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
5100     (yyval.code) = code_append((yyval.code), (yyvsp[(8) - (8)].code));
5101     code_t*cont = (yyval.code) = abc_nop((yyval.code));
5102     (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (8)].code));
5103     (yyval.code) = abc_jump((yyval.code), loopstart);
5104     code_t*out = (yyval.code) = abc_nop((yyval.code));
5105     breakjumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, out);
5106     continuejumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, cont);
5107     myif->branch = out;
5108
5109     (yyval.code) = var_block((yyval.code), state->vars);
5110     PASS12 old_state();
5111 }
5112     }
5113     break;
5114
5115
5116   
5117     case 79:
5118     if(as3_pass==2) {
5119
5120 /* Line 1464 of skeleton.m4  */
5121 #line 2224 "parser.y"
5122     {
5123     node_t*n = resolve_identifier((yyvsp[(2) - (6)].id));
5124     typedcode_t w = node_write(n);
5125     
5126     int it = alloc_local();
5127     int array = alloc_local();
5128
5129     (yyval.code) = code_new();
5130     (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
5131     (yyval.code) = abc_coerce_a((yyval.code));
5132     (yyval.code) = abc_setlocal((yyval.code), array);
5133     (yyval.code) = abc_pushbyte((yyval.code), 0);
5134     (yyval.code) = abc_setlocal((yyval.code), it);
5135
5136     code_t*loopstart = (yyval.code) = abc_label((yyval.code));
5137     
5138     (yyval.code) = abc_hasnext2((yyval.code), array, it);
5139     code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
5140     (yyval.code) = abc_getlocal((yyval.code), array);
5141     (yyval.code) = abc_getlocal((yyval.code), it);
5142     if(!(yyvsp[(1) - (6)].for_start).each)
5143         (yyval.code) = abc_nextname((yyval.code));
5144     else
5145         (yyval.code) = abc_nextvalue((yyval.code));
5146
5147     (yyval.code) = converttype((yyval.code), 0, w.t);
5148     (yyval.code) = code_append((yyval.code), w.c);
5149
5150     (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
5151     (yyval.code) = abc_jump((yyval.code), loopstart);
5152     
5153     code_t*out = (yyval.code) = abc_nop((yyval.code));
5154     breakjumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, out);
5155     continuejumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, loopstart);
5156     
5157     myif->branch = out;
5158
5159     (yyval.code) = abc_kill((yyval.code), it);
5160     (yyval.code) = abc_kill((yyval.code), array);
5161
5162     (yyval.code) = var_block((yyval.code), state->vars);
5163     PASS12 old_state();
5164 }
5165     }
5166     break;
5167
5168
5169   
5170     case 80:
5171     if(as3_pass==2) {
5172
5173 /* Line 1464 of skeleton.m4  */
5174 #line 2268 "parser.y"
5175     {
5176
5177     (yyval.code) = code_new();
5178
5179     code_t*myjmp = (yyval.code) = abc_jump((yyval.code), 0);
5180     code_t*loopstart = (yyval.code) = abc_label((yyval.code));
5181     (yyval.code) = code_append((yyval.code), (yyvsp[(5) - (5)].code));
5182     code_t*cont = (yyval.code) = abc_nop((yyval.code));
5183     myjmp->branch = cont;
5184     (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (5)].value).c);
5185     (yyval.code) = abc_iftrue((yyval.code), loopstart);
5186     code_t*out = (yyval.code) = abc_nop((yyval.code));
5187     breakjumpsto((yyval.code), (yyvsp[(1) - (5)].id), out);
5188     continuejumpsto((yyval.code), (yyvsp[(1) - (5)].id), cont);
5189 }
5190     }
5191     break;
5192
5193
5194   
5195     case 81:
5196     if(as3_pass==2) {
5197
5198 /* Line 1464 of skeleton.m4  */
5199 #line 2284 "parser.y"
5200     {
5201     (yyval.code) = code_new();
5202     code_t*loopstart = (yyval.code) = abc_label((yyval.code));
5203     (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (6)].code));
5204     code_t*cont = (yyval.code) = abc_nop((yyval.code));
5205     (yyval.code) = code_append((yyval.code), (yyvsp[(5) - (6)].value).c);
5206     (yyval.code) = abc_iftrue((yyval.code), loopstart);
5207     code_t*out = (yyval.code) = abc_nop((yyval.code));
5208     breakjumpsto((yyval.code), (yyvsp[(1) - (6)].id), out);
5209     continuejumpsto((yyval.code), (yyvsp[(1) - (6)].id), cont);
5210 }
5211     }
5212     break;
5213
5214
5215   
5216     case 82:
5217     if(as3_pass==2) {
5218
5219 /* Line 1464 of skeleton.m4  */
5220 #line 2296 "parser.y"
5221     {
5222     (yyval.code) = abc___break__(0, "");
5223 }
5224     }
5225     break;
5226
5227
5228   
5229     case 83:
5230     if(as3_pass==2) {
5231
5232 /* Line 1464 of skeleton.m4  */
5233 #line 2299 "parser.y"
5234     {
5235     (yyval.code) = abc___break__(0, (yyvsp[(2) - (2)].id));
5236 }
5237     }
5238     break;
5239
5240
5241   
5242     case 84:
5243     if(as3_pass==2) {
5244
5245 /* Line 1464 of skeleton.m4  */
5246 #line 2302 "parser.y"
5247     {
5248     (yyval.code) = abc___continue__(0, "");
5249 }
5250     }
5251     break;
5252
5253
5254   
5255     case 85:
5256     if(as3_pass==2) {
5257
5258 /* Line 1464 of skeleton.m4  */
5259 #line 2305 "parser.y"
5260     {
5261     (yyval.code) = abc___continue__(0, (yyvsp[(2) - (2)].id));
5262 }
5263     }
5264     break;
5265
5266
5267   
5268     case 86:
5269     if(as3_pass==2) {
5270
5271 /* Line 1464 of skeleton.m4  */
5272 #line 2309 "parser.y"
5273     {(yyval.code)=0;}
5274     }
5275     break;
5276
5277
5278   
5279     case 87:
5280     if(as3_pass==2) {
5281
5282 /* Line 1464 of skeleton.m4  */
5283 #line 2310 "parser.y"
5284     {(yyval.code)=(yyvsp[(1) - (1)].code);}
5285     }
5286     break;
5287
5288
5289   
5290     case 88:
5291     if(as3_pass==2) {
5292
5293 /* Line 1464 of skeleton.m4  */
5294 #line 2311 "parser.y"
5295     {(yyval.code)=(yyvsp[(1) - (1)].code);}
5296     }
5297     break;
5298
5299
5300   
5301     case 89:
5302     if(as3_pass==2) {
5303
5304 /* Line 1464 of skeleton.m4  */
5305 #line 2312 "parser.y"
5306     {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
5307     }
5308     break;
5309
5310
5311   
5312     case 90:
5313     if(as3_pass==2) {
5314
5315 /* Line 1464 of skeleton.m4  */
5316 #line 2313 "parser.y"
5317     {(yyval.code)=(yyvsp[(1) - (1)].code);}
5318     }
5319     break;
5320
5321
5322   
5323     case 91:
5324     if(as3_pass==2) {
5325
5326 /* Line 1464 of skeleton.m4  */
5327 #line 2314 "parser.y"
5328     {(yyval.code)=code_append((yyval.code),(yyvsp[(2) - (2)].code));}
5329     }
5330     break;
5331
5332
5333   
5334     case 92:
5335     if(as3_pass==2) {
5336
5337 /* Line 1464 of skeleton.m4  */
5338 #line 2316 "parser.y"
5339     {
5340     (yyval.code) = abc_getlocal(0, state->switch_var);
5341     (yyval.code) = code_append((yyval.code), node_read((yyvsp[(2) - (4)].node)).c);
5342     code_t*j = (yyval.code) = abc_ifne((yyval.code), 0);
5343     (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (4)].code));
5344     if((yyval.code)->opcode != OPCODE___BREAK__) {
5345         (yyval.code) = abc___fallthrough__((yyval.code), "");
5346     }
5347     code_t*e = (yyval.code) = abc_nop((yyval.code));
5348     j->branch = e;
5349 }
5350     }
5351     break;
5352
5353
5354   
5355     case 93:
5356     if(as3_pass==2) {
5357
5358 /* Line 1464 of skeleton.m4  */
5359 #line 2327 "parser.y"
5360     {
5361     (yyval.code) = (yyvsp[(3) - (3)].code);
5362 }
5363     }
5364     break;
5365
5366
5367   
5368     case 94:
5369     if(as3_pass==2) {
5370
5371 /* Line 1464 of skeleton.m4  */
5372 #line 2330 "parser.y"
5373     {PASS12 new_state();state->switch_var=alloc_local();}
5374     }
5375     break;
5376
5377
5378   
5379     case 95:
5380     if(as3_pass==2) {
5381
5382 /* Line 1464 of skeleton.m4  */
5383 #line 2330 "parser.y"
5384     {
5385     (yyval.code) = node_read((yyvsp[(4) - (8)].node)).c;
5386     (yyval.code) = abc_setlocal((yyval.code), state->switch_var);
5387     (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (8)].code));
5388
5389     code_t*out = (yyval.code) = abc_kill((yyval.code), state->switch_var);
5390     breakjumpsto((yyval.code), (yyvsp[(1) - (8)].id), out);
5391     
5392     code_t*c = (yyval.code),*lastblock=0;
5393     while(c) {
5394         if(c->opcode == OPCODE_IFNE) {
5395             if(!c->next) syntaxerror("internal error in fallthrough handling");
5396             lastblock=c->next;
5397         } else if(c->opcode == OPCODE___FALLTHROUGH__) {
5398             if(lastblock) {
5399                 c->opcode = OPCODE_JUMP;
5400                 c->branch = lastblock;
5401             } else {
5402                 /* fall through end of switch */
5403                 c->opcode = OPCODE_NOP;
5404             }
5405         }
5406         c=c->prev;
5407     }
5408    
5409     (yyval.code) = var_block((yyval.code), state->vars);
5410     PASS12 old_state();
5411 }
5412     }
5413     break;
5414
5415
5416   
5417     case 96:
5418     if(as3_pass==2) {
5419
5420 /* Line 1464 of skeleton.m4  */
5421 #line 2361 "parser.y"
5422     {PASS12 new_state();
5423                                                       state->exception_name=(yyvsp[(3) - (5)].id);
5424                                                PASS1 new_variable(state->method, (yyvsp[(3) - (5)].id), 0, 0, 0);
5425                                                PASS2 new_variable(state->method, (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].classinfo), 0, 0);
5426                                               }
5427     }
5428     break;
5429
5430
5431   
5432     case 97:
5433     if(as3_pass==2) {
5434
5435 /* Line 1464 of skeleton.m4  */
5436 #line 2366 "parser.y"
5437     {
5438     namespace_t name_ns = {ACCESS_PACKAGE, ""};
5439     multiname_t name = {QNAME, &name_ns, 0, (yyvsp[(3) - (9)].id)};
5440     
5441     NEW(abc_exception_t, e)
5442     e->exc_type = sig2mname((yyvsp[(4) - (9)].classinfo));
5443     e->var_name = multiname_clone(&name);
5444     (yyval.exception) = e;
5445
5446     code_t*c = 0;
5447     int i = find_variable_safe(state, (yyvsp[(3) - (9)].id))->index;
5448     e->target = c = abc_nop(0);
5449     c = abc_setlocal(c, i);
5450     c = code_append(c, code_dup(state->method->scope_code));
5451     c = code_append(c, (yyvsp[(8) - (9)].code));
5452     c = abc_kill(c, i);
5453
5454     c = var_block(c, state->vars);
5455     PASS12 old_state();
5456 }
5457     }
5458     break;
5459
5460
5461   
5462     case 98:
5463     if(as3_pass==2) {
5464
5465 /* Line 1464 of skeleton.m4  */
5466 #line 2386 "parser.y"
5467     {PASS12 new_state();state->exception_name=0;}
5468     }
5469     break;
5470
5471
5472   
5473     case 99:
5474     if(as3_pass==2) {
5475
5476 /* Line 1464 of skeleton.m4  */
5477 #line 2386 "parser.y"
5478     {
5479     (yyvsp[(4) - (5)].code) = var_block((yyvsp[(4) - (5)].code), state->vars);
5480     if(!(yyvsp[(4) - (5)].code)) {
5481         (yyval.exception)=0;
5482     } else {
5483         NEW(abc_exception_t, e)
5484         e->exc_type = 0; //all exceptions
5485         e->var_name = 0; //no name
5486         e->target = 0;
5487         e->to = abc_nop(0);
5488         e->to = code_append(e->to, (yyvsp[(4) - (5)].code));
5489         (yyval.exception) = e;
5490     }
5491     PASS12 old_state();
5492 }
5493     }
5494     break;
5495
5496
5497   
5498     case 100:
5499     if(as3_pass==2) {
5500
5501 /* Line 1464 of skeleton.m4  */
5502 #line 2402 "parser.y"
5503     {(yyval.catch_list).l=list_new();(yyval.catch_list).finally=0;list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));}
5504     }
5505     break;
5506
5507
5508   
5509     case 101:
5510     if(as3_pass==2) {
5511
5512 /* Line 1464 of skeleton.m4  */
5513 #line 2403 "parser.y"
5514     {(yyval.catch_list)=(yyvsp[(1) - (2)].catch_list);list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));}
5515     }
5516     break;
5517
5518
5519   
5520     case 102:
5521     if(as3_pass==2) {
5522
5523 /* Line 1464 of skeleton.m4  */
5524 #line 2404 "parser.y"
5525     {(yyval.catch_list)=(yyvsp[(1) - (1)].catch_list);}
5526     }
5527     break;
5528
5529
5530   
5531     case 103:
5532     if(as3_pass==2) {
5533
5534 /* Line 1464 of skeleton.m4  */
5535 #line 2405 "parser.y"
5536     {
5537     (yyval.catch_list) = (yyvsp[(1) - (2)].catch_list);
5538     (yyval.catch_list).finally = 0;
5539     if((yyvsp[(2) - (2)].exception)) {
5540         list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));
5541         (yyval.catch_list).finally = (yyvsp[(2) - (2)].exception)->to;(yyvsp[(2) - (2)].exception)->to=0;
5542     }
5543 }
5544     }
5545     break;
5546
5547
5548   
5549     case 104:
5550     if(as3_pass==2) {
5551
5552 /* Line 1464 of skeleton.m4  */
5553 #line 2413 "parser.y"
5554     {
5555     (yyval.catch_list).l=list_new();
5556     (yyval.catch_list).finally = 0;
5557     if((yyvsp[(1) - (1)].exception)) {
5558         list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));
5559         (yyval.catch_list).finally = (yyvsp[(1) - (1)].exception)->to;(yyvsp[(1) - (1)].exception)->to=0;
5560     }
5561 }
5562     }
5563     break;
5564
5565
5566   
5567     case 105:
5568     if(as3_pass==2) {
5569
5570 /* Line 1464 of skeleton.m4  */
5571 #line 2422 "parser.y"
5572     {PASS12 new_state();
5573                  state->method->has_exceptions=1;
5574                  state->method->late_binding=1;//for invariant scope_code
5575                 }
5576     }
5577     break;
5578
5579
5580   
5581     case 106:
5582     if(as3_pass==2) {
5583
5584 /* Line 1464 of skeleton.m4  */
5585 #line 2425 "parser.y"
5586     {
5587     code_t*out = abc_nop(0);
5588
5589     code_t*start = abc_nop(0);
5590     (yyval.code) = code_append(start, (yyvsp[(4) - (6)].code));
5591     if(!is_break_or_jump((yyvsp[(4) - (6)].code))) {
5592         (yyval.code) = abc_jump((yyval.code), out);
5593     }
5594     code_t*end = (yyval.code) = abc_nop((yyval.code));
5595   
5596     int tmp;
5597     if((yyvsp[(6) - (6)].catch_list).finally)
5598         tmp = alloc_local();
5599     
5600     abc_exception_list_t*l = (yyvsp[(6) - (6)].catch_list).l;
5601     int count=0;
5602     while(l) {
5603         abc_exception_t*e = l->abc_exception;
5604         if(e->var_name) {
5605             (yyval.code) = code_append((yyval.code), e->target);
5606             (yyval.code) = abc_jump((yyval.code), out);
5607         } else {
5608             parserassert((ptroff_t)(yyvsp[(6) - (6)].catch_list).finally);
5609             // finally block
5610             e->target = (yyval.code) = abc_nop((yyval.code));
5611             (yyval.code) = code_append((yyval.code), code_dup(state->method->scope_code));
5612             (yyval.code) = abc___rethrow__((yyval.code));
5613         }
5614         
5615         e->from = start;
5616         e->to = end;
5617
5618         l = l->next;
5619     }
5620     (yyval.code) = code_append((yyval.code), out);
5621
5622     (yyval.code) = insert_finally((yyval.code), (yyvsp[(6) - (6)].catch_list).finally, tmp);
5623         
5624     list_concat(state->method->exceptions, (yyvsp[(6) - (6)].catch_list).l);
5625    
5626     (yyval.code) = var_block((yyval.code), state->vars);
5627     PASS12 old_state();
5628 }
5629     }
5630     break;
5631
5632
5633   
5634     case 107:
5635     if(as3_pass==2) {
5636
5637 /* Line 1464 of skeleton.m4  */
5638 #line 2471 "parser.y"
5639     {
5640     (yyval.code)=(yyvsp[(2) - (2)].value).c;
5641     (yyval.code)=abc_throw((yyval.code));
5642 }
5643     }
5644     break;
5645
5646
5647   
5648     case 108:
5649     if(as3_pass==2) {
5650
5651 /* Line 1464 of skeleton.m4  */
5652 #line 2475 "parser.y"
5653     {
5654     if(!state->exception_name)
5655         syntaxerror("re-throw only possible within a catch block");
5656     variable_t*v = find_variable(state, state->exception_name);
5657     (yyval.code)=code_new();
5658     (yyval.code)=abc_getlocal((yyval.code), v->index);
5659     (yyval.code)=abc_throw((yyval.code));
5660 }
5661     }
5662     break;
5663
5664
5665   
5666     case 109:
5667     if(as3_pass==2) {
5668
5669 /* Line 1464 of skeleton.m4  */
5670 #line 2486 "parser.y"
5671     {
5672      new_state();
5673      if(state->method->has_exceptions) {
5674          int v = alloc_local();
5675          state->method->scope_code = abc_getlocal(state->method->scope_code, v);
5676          state->method->scope_code = abc_pushwith(state->method->scope_code);
5677          (yyval.value_list).number = v;
5678      }
5679      (yyval.value_list).cc = (yyvsp[(3) - (4)].value).c;
5680 }
5681     }
5682     break;
5683
5684
5685   
5686     case 110:
5687     if(as3_pass==2) {
5688
5689 /* Line 1464 of skeleton.m4  */
5690 #line 2496 "parser.y"
5691     {
5692      /* remove getlocal;pushwith from scope code again */
5693      state->method->scope_code = code_cutlast(code_cutlast(state->method->scope_code));
5694
5695      (yyval.code) = (yyvsp[(1) - (2)].value_list).cc;
5696      if(state->method->has_exceptions) {
5697          (yyval.code) = abc_dup((yyval.code));
5698          (yyval.code) = abc_setlocal((yyval.code), (yyvsp[(1) - (2)].value_list).number);
5699      }
5700      (yyval.code) = abc_pushwith((yyval.code));
5701      (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (2)].code));
5702      (yyval.code) = abc_popscope((yyval.code));
5703      old_state();
5704 }
5705     }
5706     break;
5707
5708
5709   
5710     case 112:
5711     if(as3_pass==2) {
5712
5713 /* Line 1464 of skeleton.m4  */
5714 #line 2514 "parser.y"
5715     {PASS12 (yyval.id)="package";}
5716     }
5717     break;
5718
5719
5720   
5721     case 113:
5722     if(as3_pass==2) {
5723
5724 /* Line 1464 of skeleton.m4  */
5725 #line 2515 "parser.y"
5726     {PASS12 (yyval.id)="namespace";}
5727     }
5728     break;
5729
5730
5731   
5732     case 114:
5733     if(as3_pass==2) {
5734
5735 /* Line 1464 of skeleton.m4  */
5736 #line 2516 "parser.y"
5737     {PASS12 (yyval.id)="NaN";}
5738     }
5739     break;
5740
5741
5742   
5743     case 115:
5744     if(as3_pass==2) {
5745
5746 /* Line 1464 of skeleton.m4  */
5747 #line 2517 "parser.y"
5748     {PASS12 (yyval.id)=(yyvsp[(1) - (1)].id);}
5749     }
5750     break;
5751
5752
5753   
5754     case 116:
5755     if(as3_pass==2) {
5756
5757 /* Line 1464 of skeleton.m4  */
5758 #line 2519 "parser.y"
5759     {PASS12 (yyval.id) = concat3((yyvsp[(1) - (3)].id),".",(yyvsp[(3) - (3)].id));free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;}
5760     }
5761     break;
5762
5763
5764   
5765     case 117:
5766     if(as3_pass==2) {
5767
5768 /* Line 1464 of skeleton.m4  */
5769 #line 2520 "parser.y"
5770     {PASS12 (yyval.id)=strdup((yyvsp[(1) - (1)].id));}
5771     }
5772     break;
5773
5774
5775   
5776     case 118:
5777     if(as3_pass==2) {
5778
5779 /* Line 1464 of skeleton.m4  */
5780 #line 2522 "parser.y"
5781     {PASS12 startpackage((yyvsp[(2) - (3)].id));free((yyvsp[(2) - (3)].id));(yyvsp[(2) - (3)].id)=0;}
5782     }
5783     break;
5784
5785
5786   
5787     case 119:
5788     if(as3_pass==2) {
5789
5790 /* Line 1464 of skeleton.m4  */
5791 #line 2523 "parser.y"
5792     {PASS12 endpackage();(yyval.code)=0;}
5793     }
5794     break;
5795
5796
5797   
5798     case 120:
5799     if(as3_pass==2) {
5800
5801 /* Line 1464 of skeleton.m4  */
5802 #line 2524 "parser.y"
5803     {PASS12 startpackage("");}
5804     }
5805     break;
5806
5807
5808   
5809     case 121:
5810     if(as3_pass==2) {
5811
5812 /* Line 1464 of skeleton.m4  */
5813 #line 2525 "parser.y"
5814     {PASS12 endpackage();(yyval.code)=0;}
5815     }
5816     break;
5817
5818
5819   
5820     case 122:
5821     if(as3_pass==2) {
5822
5823 /* Line 1464 of skeleton.m4  */
5824 #line 2548 "parser.y"
5825     {
5826        PASS12
5827        slotinfo_t*s = registry_find(state->package, (yyvsp[(2) - (2)].id));
5828        if(!s && as3_pass==1) {as3_schedule_class(state->package, (yyvsp[(2) - (2)].id));}
5829        state_has_imports();
5830        dict_put(state->imports, state->package, (yyvsp[(2) - (2)].id));
5831        (yyval.code)=0;
5832 }
5833     }
5834     break;
5835
5836
5837   
5838     case 123:
5839     if(as3_pass==2) {
5840
5841 /* Line 1464 of skeleton.m4  */
5842 #line 2556 "parser.y"
5843     {
5844        PASS12
5845        slotinfo_t*s = registry_find((yyvsp[(2) - (2)].classinfo)->package, (yyvsp[(2) - (2)].classinfo)->name);
5846        if(!s && as3_pass==1) {// || !(s->flags&FLAG_BUILTIN)) {
5847            as3_schedule_class((yyvsp[(2) - (2)].classinfo)->package, (yyvsp[(2) - (2)].classinfo)->name);
5848        }
5849        state_has_imports();
5850        dict_put(state->imports, (yyvsp[(2) - (2)].classinfo)->name, (yyvsp[(2) - (2)].classinfo));
5851        import_toplevel((yyvsp[(2) - (2)].classinfo)->package);
5852        (yyval.code)=0;
5853 }
5854     }
5855     break;
5856
5857
5858   
5859     case 124:
5860     if(as3_pass==2) {
5861
5862 /* Line 1464 of skeleton.m4  */
5863 #line 2567 "parser.y"
5864     {
5865        PASS12
5866        if(strncmp("flash.", (yyvsp[(2) - (4)].id), 6) && as3_pass==1) {
5867            as3_schedule_package((yyvsp[(2) - (4)].id));
5868        }
5869
5870        NEW(import_t,i);
5871        i->package = (yyvsp[(2) - (4)].id);
5872        state_has_imports();
5873        list_append(state->wildcard_imports, i);
5874        import_toplevel(i->package);
5875        (yyval.code)=0;
5876 }
5877     }
5878     break;
5879
5880
5881   
5882     case 125:
5883     if(as3_pass==2) {
5884
5885 /* Line 1464 of skeleton.m4  */
5886 #line 2583 "parser.y"
5887     {PASS12 (yyval.flags).flags=0;(yyval.flags).ns=0;}
5888     }
5889     break;
5890
5891
5892   
5893     case 126:
5894     if(as3_pass==2) {
5895
5896 /* Line 1464 of skeleton.m4  */
5897 #line 2584 "parser.y"
5898     {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
5899     }
5900     break;
5901
5902
5903   
5904     case 127:
5905     if(as3_pass==2) {
5906
5907 /* Line 1464 of skeleton.m4  */
5908 #line 2585 "parser.y"
5909     {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
5910     }
5911     break;
5912
5913
5914   
5915     case 128:
5916     if(as3_pass==2) {
5917
5918 /* Line 1464 of skeleton.m4  */
5919 #line 2586 "parser.y"
5920     {
5921     PASS12 
5922     (yyval.flags).flags=(yyvsp[(1) - (2)].flags).flags|(yyvsp[(2) - (2)].flags).flags;
5923     if((yyvsp[(1) - (2)].flags).ns && (yyvsp[(2) - (2)].flags).ns) syntaxerror("only one namespace allowed in one declaration");
5924     (yyval.flags).ns=(yyvsp[(1) - (2)].flags).ns?(yyvsp[(1) - (2)].flags).ns:(yyvsp[(2) - (2)].flags).ns;
5925
5926 }
5927     }
5928     break;
5929
5930
5931   
5932     case 129:
5933     if(as3_pass==2) {
5934
5935 /* Line 1464 of skeleton.m4  */
5936 #line 2593 "parser.y"
5937     {PASS12 (yyval.flags).flags=FLAG_PUBLIC;(yyval.flags).ns=0;}
5938     }
5939     break;
5940
5941
5942   
5943     case 130:
5944     if(as3_pass==2) {
5945
5946 /* Line 1464 of skeleton.m4  */
5947 #line 2594 "parser.y"
5948     {PASS12 (yyval.flags).flags=FLAG_PRIVATE;(yyval.flags).ns=0;}
5949     }
5950     break;
5951
5952
5953   
5954     case 131:
5955     if(as3_pass==2) {
5956
5957 /* Line 1464 of skeleton.m4  */
5958 #line 2595 "parser.y"
5959     {PASS12 (yyval.flags).flags=FLAG_PROTECTED;(yyval.flags).ns=0;}
5960     }
5961     break;
5962
5963
5964   
5965     case 132:
5966     if(as3_pass==2) {
5967
5968 /* Line 1464 of skeleton.m4  */
5969 #line 2596 "parser.y"
5970     {PASS12 (yyval.flags).flags=FLAG_STATIC;(yyval.flags).ns=0;}
5971     }
5972     break;
5973
5974
5975   
5976     case 133:
5977     if(as3_pass==2) {
5978
5979 /* Line 1464 of skeleton.m4  */
5980 #line 2597 "parser.y"
5981     {PASS12 (yyval.flags).flags=FLAG_DYNAMIC;(yyval.flags).ns=0;}
5982     }
5983     break;
5984
5985
5986   
5987     case 134:
5988     if(as3_pass==2) {
5989
5990 /* Line 1464 of skeleton.m4  */
5991 #line 2598 "parser.y"
5992     {PASS12 (yyval.flags).flags=FLAG_FINAL;(yyval.flags).ns=0;}
5993     }
5994     break;
5995
5996
5997   
5998     case 135:
5999     if(as3_pass==2) {
6000
6001 /* Line 1464 of skeleton.m4  */
6002 #line 2599 "parser.y"
6003     {PASS12 (yyval.flags).flags=FLAG_OVERRIDE;(yyval.flags).ns=0;}
6004     }
6005     break;
6006
6007
6008   
6009     case 136:
6010     if(as3_pass==2) {
6011
6012 /* Line 1464 of skeleton.m4  */
6013 #line 2600 "parser.y"
6014     {PASS12 (yyval.flags).flags=FLAG_NATIVE;(yyval.flags).ns=0;}
6015     }
6016     break;
6017
6018
6019   
6020     case 137:
6021     if(as3_pass==2) {
6022
6023 /* Line 1464 of skeleton.m4  */
6024 #line 2601 "parser.y"
6025     {PASS12 (yyval.flags).flags=FLAG_PACKAGEINTERNAL;(yyval.flags).ns=0;}
6026     }
6027     break;
6028
6029
6030   
6031     case 138:
6032     if(as3_pass==2) {
6033
6034 /* Line 1464 of skeleton.m4  */
6035 #line 2602 "parser.y"
6036     {PASS12 (yyval.flags).flags=FLAG_NAMESPACE;
6037                                (yyval.flags).ns=(yyvsp[(1) - (1)].id);
6038                        }
6039     }
6040     break;
6041
6042
6043   
6044     case 139:
6045     if(as3_pass==2) {
6046
6047 /* Line 1464 of skeleton.m4  */
6048 #line 2606 "parser.y"
6049     {PASS12 (yyval.classinfo)=0;}
6050     }
6051     break;
6052
6053
6054   
6055     case 140:
6056     if(as3_pass==2) {
6057
6058 /* Line 1464 of skeleton.m4  */
6059 #line 2607 "parser.y"
6060     {PASS12 (yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
6061     }
6062     break;
6063
6064
6065   
6066     case 141:
6067     if(as3_pass==2) {
6068
6069 /* Line 1464 of skeleton.m4  */
6070 #line 2609 "parser.y"
6071     {PASS12 (yyval.classinfo_list)=list_new();}
6072     }
6073     break;
6074
6075
6076   
6077     case 142:
6078     if(as3_pass==2) {
6079
6080 /* Line 1464 of skeleton.m4  */
6081 #line 2610 "parser.y"
6082     {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
6083     }
6084     break;
6085
6086
6087   
6088     case 143:
6089     if(as3_pass==2) {
6090
6091 /* Line 1464 of skeleton.m4  */
6092 #line 2612 "parser.y"
6093     {PASS12 (yyval.classinfo_list)=list_new();}
6094     }
6095     break;
6096
6097
6098   
6099     case 144:
6100     if(as3_pass==2) {
6101
6102 /* Line 1464 of skeleton.m4  */
6103 #line 2613 "parser.y"
6104     {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
6105     }
6106     break;
6107
6108
6109   
6110     case 145:
6111     if(as3_pass==2) {
6112
6113 /* Line 1464 of skeleton.m4  */
6114 #line 2617 "parser.y"
6115     {PASS12 startclass(&(yyvsp[(1) - (6)].flags),(yyvsp[(3) - (6)].id),(yyvsp[(4) - (6)].classinfo),(yyvsp[(5) - (6)].classinfo_list));}
6116     }
6117     break;
6118
6119
6120   
6121     case 146:
6122     if(as3_pass==2) {
6123
6124 /* Line 1464 of skeleton.m4  */
6125 #line 2619 "parser.y"
6126     {PASS12 endclass();(yyval.code)=0;}
6127     }
6128     break;
6129
6130
6131   
6132     case 147:
6133     if(as3_pass==2) {
6134
6135 /* Line 1464 of skeleton.m4  */
6136 #line 2623 "parser.y"
6137     {PASS12 (yyvsp[(1) - (5)].flags).flags|=FLAG_INTERFACE;
6138                                           startclass(&(yyvsp[(1) - (5)].flags),(yyvsp[(3) - (5)].id),0,(yyvsp[(4) - (5)].classinfo_list));}
6139     }
6140     break;
6141
6142
6143   
6144     case 148:
6145     if(as3_pass==2) {
6146
6147 /* Line 1464 of skeleton.m4  */
6148 #line 2626 "parser.y"
6149     {PASS12 endclass();(yyval.code)=0;}
6150     }
6151     break;
6152
6153
6154   
6155     case 154:
6156     if(as3_pass==2) {
6157
6158 /* Line 1464 of skeleton.m4  */
6159 #line 2635 "parser.y"
6160     {PASS_ALWAYS as3_pass=(yyvsp[(1) - (4)].number_int);}
6161     }
6162     break;
6163
6164
6165   
6166     case 157:
6167     if(as3_pass==2) {
6168
6169 /* Line 1464 of skeleton.m4  */
6170 #line 2639 "parser.y"
6171     {
6172     code_t*c = state->cls->static_init->header;
6173     c = code_append(c, (yyvsp[(1) - (1)].code));  
6174     state->cls->static_init->header = c;
6175 }
6176     }
6177     break;
6178
6179
6180   
6181     case 163:
6182     if(as3_pass==2) {
6183
6184 /* Line 1464 of skeleton.m4  */
6185 #line 2650 "parser.y"
6186     {
6187     syntaxerror("variable declarations not allowed in interfaces");
6188 }
6189     }
6190     break;
6191
6192
6193   
6194     case 164:
6195     if(as3_pass==2) {
6196
6197 /* Line 1464 of skeleton.m4  */
6198 #line 2653 "parser.y"
6199     {
6200     PASS12
6201     (yyvsp[(1) - (8)].flags).flags |= FLAG_PUBLIC;
6202     if((yyvsp[(1) - (8)].flags).flags&(FLAG_PRIVATE|FLAG_PACKAGEINTERNAL|FLAG_PROTECTED)) {
6203         syntaxerror("invalid method modifiers: interface methods always need to be public");
6204     }
6205     startfunction(&(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo));
6206     endfunction(&(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo), 0);
6207     list_deep_free((yyvsp[(6) - (8)].params).list);
6208 }
6209     }
6210     break;
6211
6212
6213   
6214     case 167:
6215     if(as3_pass==2) {
6216
6217 /* Line 1464 of skeleton.m4  */
6218 #line 2728 "parser.y"
6219     {PASS12 setslotstate(&(yyvsp[(1) - (2)].flags),(yyvsp[(2) - (2)].token));}
6220     }
6221     break;
6222
6223
6224   
6225     case 168:
6226     if(as3_pass==2) {
6227
6228 /* Line 1464 of skeleton.m4  */
6229 #line 2728 "parser.y"
6230     {PASS12 (yyval.code)=(yyvsp[(4) - (4)].code);setslotstate(0, 0);}
6231     }
6232     break;
6233
6234
6235   
6236     case 169:
6237     if(as3_pass==2) {
6238
6239 /* Line 1464 of skeleton.m4  */
6240 #line 2730 "parser.y"
6241     {PASS12 (yyval.code)=0;}
6242     }
6243     break;
6244
6245
6246   
6247     case 170:
6248     if(as3_pass==2) {
6249
6250 /* Line 1464 of skeleton.m4  */
6251 #line 2731 "parser.y"
6252     {PASS12 (yyval.code)=0;}
6253     }
6254     break;
6255
6256
6257   
6258     case 171:
6259     if(as3_pass==2) {
6260
6261 /* Line 1464 of skeleton.m4  */
6262 #line 2734 "parser.y"
6263     {
6264 PASS12
6265     int flags = slotstate_flags->flags;
6266     namespace_t ns = modifiers2access(slotstate_flags);
6267
6268     if(as3_pass == 1) {
6269
6270         varinfo_t* info = 0;
6271         if(state->cls) {
6272             memberinfo_t*i = registry_findmember(state->cls->info, ns.name, (yyvsp[(1) - (3)].id), 1);
6273             if(i) {
6274                 check_override(i, flags);
6275             }
6276             info = varinfo_register_onclass(state->cls->info, ns.access, ns.name, (yyvsp[(1) - (3)].id));
6277         } else {
6278             slotinfo_t*i = registry_find(state->package, (yyvsp[(1) - (3)].id));
6279             if(i) {
6280                 syntaxerror("package %s already contains '%s'", state->package, (yyvsp[(1) - (3)].id));
6281             }
6282             if(ns.name && ns.name[0]) {
6283                 syntaxerror("namespaces not allowed on package-level variables");
6284             }
6285             info = varinfo_register_global(ns.access, state->package, (yyvsp[(1) - (3)].id));
6286         }
6287
6288         info->type = (yyvsp[(2) - (3)].classinfo);
6289         info->flags = flags;
6290         
6291         dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, info);
6292     }
6293
6294     if(as3_pass == 2) {
6295         varinfo_t*info = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
6296
6297         multiname_t mname;
6298         code_t**code;
6299         trait_t*t = add_abc_slot(slotstate_flags, (yyvsp[(1) - (3)].id), &mname, &code);
6300
6301         if((yyvsp[(2) - (3)].classinfo)) {
6302             MULTINAME(m, (yyvsp[(2) - (3)].classinfo));
6303             t->type_name = multiname_clone(&m);
6304         }
6305         info->slot = t->slot_id;
6306         
6307         /* workaround for "VerifyError: Error #1053: Illegal override of ::test2 in C1" 
6308            FIXME: is there a way to use slots and still don't have conflicting overrides?
6309         */
6310         info->slot = t->slot_id = 0;
6311        
6312         constant_t cval = (yyvsp[(3) - (3)].node)->type->eval((yyvsp[(3) - (3)].node));
6313         if(cval.type!=CONSTANT_UNKNOWN) {
6314             /* compile time constant */
6315             t->value = malloc(sizeof(constant_t));
6316             memcpy(t->value, &cval, sizeof(constant_t));
6317             info->value = constant_clone(t->value);
6318         } else {
6319             typedcode_t v = node_read((yyvsp[(3) - (3)].node));
6320             /* initalization code (if needed) */
6321             code_t*c = 0;
6322             if(v.c && !is_pushundefined(v.c)) {
6323                 c = abc_getlocal_0(c);
6324                 c = code_append(c, v.c);
6325                 c = converttype(c, v.t, (yyvsp[(2) - (3)].classinfo));
6326                 if(!t->slot_id) {
6327                     c = abc_initproperty2(c, &mname);
6328                 } else {
6329                     c = abc_setslot(c, t->slot_id);
6330                 }
6331             }
6332             *code = code_append(*code, c);
6333         }
6334
6335         if(slotstate_varconst==KW_CONST) {
6336             t->kind= TRAIT_CONST;
6337             info->flags |= FLAG_CONST;
6338         }
6339     }
6340
6341     (yyval.code)=0;
6342 }
6343     }
6344     break;
6345
6346
6347   
6348     case 172:
6349     if(as3_pass==2) {
6350
6351 /* Line 1464 of skeleton.m4  */
6352 #line 2817 "parser.y"
6353     {(yyval.constant)=0;}
6354     }
6355     break;
6356
6357
6358   
6359     case 173:
6360     if(as3_pass==2) {
6361
6362 /* Line 1464 of skeleton.m4  */
6363 #line 2818 "parser.y"
6364     {
6365   (yyval.constant) = malloc(sizeof(constant_t));
6366   *(yyval.constant) = node_eval((yyvsp[(2) - (2)].node));
6367   if((yyval.constant)->type == CONSTANT_UNKNOWN) {
6368     syntaxerror("can't evaluate default parameter value (needs to be a compile-time constant)");
6369   }
6370 }
6371     }
6372     break;
6373
6374
6375   
6376     case 174:
6377     if(as3_pass==2) {
6378
6379 /* Line 1464 of skeleton.m4  */
6380 #line 2827 "parser.y"
6381     {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_int));}
6382     }
6383     break;
6384
6385
6386   
6387     case 175:
6388     if(as3_pass==2) {
6389
6390 /* Line 1464 of skeleton.m4  */
6391 #line 2828 "parser.y"
6392     {
6393     (yyval.constant) = constant_new_uint((yyvsp[(1) - (1)].number_uint));
6394 }
6395     }
6396     break;
6397
6398
6399   
6400     case 176:
6401     if(as3_pass==2) {
6402
6403 /* Line 1464 of skeleton.m4  */
6404 #line 2831 "parser.y"
6405     {(yyval.constant) = constant_new_float((yyvsp[(1) - (1)].number_float));}
6406     }
6407     break;
6408
6409
6410   
6411     case 177:
6412     if(as3_pass==2) {
6413
6414 /* Line 1464 of skeleton.m4  */
6415 #line 2832 "parser.y"
6416     {(yyval.constant) = constant_new_string2((yyvsp[(1) - (1)].str).str,(yyvsp[(1) - (1)].str).len);free((char*)(yyvsp[(1) - (1)].str).str);}
6417     }
6418     break;
6419
6420
6421   
6422     case 178:
6423     if(as3_pass==2) {
6424
6425 /* Line 1464 of skeleton.m4  */
6426 #line 2833 "parser.y"
6427     {(yyval.constant) = constant_new_true((yyvsp[(1) - (1)].token));}
6428     }
6429     break;
6430
6431
6432   
6433     case 179:
6434     if(as3_pass==2) {
6435
6436 /* Line 1464 of skeleton.m4  */
6437 #line 2834 "parser.y"
6438     {(yyval.constant) = constant_new_false((yyvsp[(1) - (1)].token));}
6439     }
6440     break;
6441
6442
6443   
6444     case 180:
6445     if(as3_pass==2) {
6446
6447 /* Line 1464 of skeleton.m4  */
6448 #line 2835 "parser.y"
6449     {(yyval.constant) = constant_new_null((yyvsp[(1) - (1)].token));}
6450     }
6451     break;
6452
6453
6454   
6455     case 181:
6456     if(as3_pass==2) {
6457
6458 /* Line 1464 of skeleton.m4  */
6459 #line 2836 "parser.y"
6460     {(yyval.constant) = constant_new_undefined((yyvsp[(1) - (1)].token));}
6461     }
6462     break;
6463
6464
6465   
6466     case 182:
6467     if(as3_pass==2) {
6468
6469 /* Line 1464 of skeleton.m4  */
6470 #line 2837 "parser.y"
6471     {(yyval.constant) = constant_new_float(__builtin_nan(""));}
6472     }
6473     break;
6474
6475
6476   
6477     case 183:
6478     if(as3_pass==2) {
6479
6480 /* Line 1464 of skeleton.m4  */
6481 #line 2850 "parser.y"
6482     {
6483    multiname_t m = {QNAME, &stdns, 0, "XML"};
6484    typedcode_t v;
6485    v.c = 0;
6486    v.c = abc_getlex2(v.c, &m);
6487    v.c = code_append(v.c, node_read((yyvsp[(1) - (1)].node)).c);
6488    v.c = abc_construct(v.c, 1);
6489    v.t = TYPE_XML;
6490    (yyval.node) = mkcodenode(v);
6491 }
6492     }
6493     break;
6494
6495
6496   
6497     case 184:
6498     if(as3_pass==2) {
6499
6500 /* Line 1464 of skeleton.m4  */
6501 #line 2861 "parser.y"
6502     {PASS_ALWAYS if(!xml_level++) tokenizer_begin_xml();}
6503     }
6504     break;
6505
6506
6507   
6508     case 185:
6509     if(as3_pass==2) {
6510
6511 /* Line 1464 of skeleton.m4  */
6512 #line 2862 "parser.y"
6513     {PASS_ALWAYS tokenizer_begin_xmltext();}
6514     }
6515     break;
6516
6517
6518   
6519     case 186:
6520     if(as3_pass==2) {
6521
6522 /* Line 1464 of skeleton.m4  */
6523 #line 2863 "parser.y"
6524     {PASS_ALWAYS if(!--xml_level) tokenizer_end_xml(); else tokenizer_begin_xmltext();}
6525     }
6526     break;
6527
6528
6529   
6530     case 187:
6531     if(as3_pass==2) {
6532
6533 /* Line 1464 of skeleton.m4  */
6534 #line 2865 "parser.y"
6535     {PASS_ALWAYS tokenizer_begin_xmltext();}
6536     }
6537     break;
6538
6539
6540   
6541     case 188:
6542     if(as3_pass==2) {
6543
6544 /* Line 1464 of skeleton.m4  */
6545 #line 2865 "parser.y"
6546     {
6547     (yyval.node) = (yyvsp[(2) - (4)].node);
6548 }
6549     }
6550     break;
6551
6552
6553   
6554     case 189:
6555     if(as3_pass==2) {
6556
6557 /* Line 1464 of skeleton.m4  */
6558 #line 2868 "parser.y"
6559     {PASS_ALWAYS tokenizer_begin_xml();}
6560     }
6561     break;
6562
6563
6564   
6565     case 190:
6566     if(as3_pass==2) {
6567
6568 /* Line 1464 of skeleton.m4  */
6569 #line 2868 "parser.y"
6570     {
6571     (yyval.node) = (yyvsp[(2) - (4)].node);
6572 }
6573     }
6574     break;
6575
6576
6577   
6578     case 191:
6579     if(as3_pass==2) {
6580
6581 /* Line 1464 of skeleton.m4  */
6582 #line 2871 "parser.y"
6583     {(yyval.node)=mkstringnode("");}
6584     }
6585     break;
6586
6587
6588   
6589     case 192:
6590     if(as3_pass==2) {
6591
6592 /* Line 1464 of skeleton.m4  */
6593 #line 2872 "parser.y"
6594     {
6595     (yyval.node) = mkaddnode((yyvsp[(1) - (2)].node),(yyvsp[(2) - (2)].node));
6596 }
6597     }
6598     break;
6599
6600
6601   
6602     case 193:
6603     if(as3_pass==2) {
6604
6605 /* Line 1464 of skeleton.m4  */
6606 #line 2875 "parser.y"
6607     {
6608     char* str = string_cstr(&(yyvsp[(2) - (2)].str));
6609     (yyval.node) = mkaddnode((yyvsp[(1) - (2)].node),mkstringnode(str));
6610     free(str);
6611 }
6612     }
6613     break;
6614
6615
6616   
6617     case 194:
6618     if(as3_pass==2) {
6619
6620 /* Line 1464 of skeleton.m4  */
6621 #line 2880 "parser.y"
6622     {
6623     (yyval.node) = mkaddnode((yyvsp[(1) - (2)].node), mkstringnode(">"));
6624 }
6625     }
6626     break;
6627
6628
6629   
6630     case 195:
6631     if(as3_pass==2) {
6632
6633 /* Line 1464 of skeleton.m4  */
6634 #line 2883 "parser.y"
6635     {
6636     (yyval.node) = mkaddnode((yyvsp[(1) - (2)].node),(yyvsp[(2) - (2)].node));
6637 }
6638     }
6639     break;
6640
6641
6642   
6643     case 196:
6644     if(as3_pass==2) {
6645
6646 /* Line 1464 of skeleton.m4  */
6647 #line 2886 "parser.y"
6648     {
6649     (yyval.node) = mkaddnode((yyvsp[(1) - (3)].node), mkaddnode((yyvsp[(2) - (3)].node),(yyvsp[(3) - (3)].node)));
6650 }
6651     }
6652     break;
6653
6654
6655   
6656     case 197:
6657     if(as3_pass==2) {
6658
6659 /* Line 1464 of skeleton.m4  */
6660 #line 2889 "parser.y"
6661     {
6662     (yyval.node) = mkstringnode((yyvsp[(1) - (1)].id));
6663 }
6664     }
6665     break;
6666
6667
6668   
6669     case 198:
6670     if(as3_pass==2) {
6671
6672 /* Line 1464 of skeleton.m4  */
6673 #line 2892 "parser.y"
6674     {
6675     (yyval.node) = (yyvsp[(1) - (1)].node);
6676 }
6677     }
6678     break;
6679
6680
6681   
6682     case 199:
6683     if(as3_pass==2) {
6684
6685 /* Line 1464 of skeleton.m4  */
6686 #line 2896 "parser.y"
6687     {
6688     (yyval.node) = mkstringnode("");
6689 }
6690     }
6691     break;
6692
6693
6694   
6695     case 200:
6696     if(as3_pass==2) {
6697
6698 /* Line 1464 of skeleton.m4  */
6699 #line 2899 "parser.y"
6700     {
6701     (yyval.node) = mkaddnode(mkstringnode(" "),(yyvsp[(1) - (1)].node));
6702 }
6703     }
6704     break;
6705
6706
6707   
6708     case 201:
6709     if(as3_pass==2) {
6710
6711 /* Line 1464 of skeleton.m4  */
6712 #line 2903 "parser.y"
6713     {
6714     //$$ = allocprintf("<%s%s/>", $2, $3, $5, $8);
6715     (yyval.node) = mkaddnode(mkaddnode(mkaddnode(mkstringnode("<"),(yyvsp[(2) - (6)].node)),(yyvsp[(3) - (6)].node)),mkstringnode("/>"));
6716 }
6717     }
6718     break;
6719
6720
6721   
6722     case 202:
6723     if(as3_pass==2) {
6724
6725 /* Line 1464 of skeleton.m4  */
6726 #line 2907 "parser.y"
6727     {
6728     //$$ = allocprintf("<%s%s>%s</%s>", $2, $3, $5, $8);
6729     (yyval.node) = mkaddnode(mkaddnode(mkaddnode(mkaddnode(mkaddnode(mkaddnode(mkaddnode(
6730          mkstringnode("<"),(yyvsp[(2) - (10)].node)),(yyvsp[(3) - (10)].node)),mkstringnode(">")),(yyvsp[(5) - (10)].node)),mkstringnode("</")),(yyvsp[(8) - (10)].node)),mkstringnode(">"));
6731 }
6732     }
6733     break;
6734
6735
6736   
6737     case 203:
6738     if(as3_pass==2) {
6739
6740 /* Line 1464 of skeleton.m4  */
6741 #line 2912 "parser.y"
6742     {
6743     //$$ = allocprintf("<%s%s>%s%s</%s>", $2, $3, $5, $6, $9);
6744     (yyval.node) = mkaddnode(mkaddnode(mkaddnode(mkaddnode(mkaddnode(mkaddnode(mkaddnode(mkaddnode(
6745          mkstringnode("<"),(yyvsp[(2) - (11)].node)),(yyvsp[(3) - (11)].node)),mkstringnode(">")),(yyvsp[(5) - (11)].node)),(yyvsp[(6) - (11)].node)),mkstringnode("</")),(yyvsp[(9) - (11)].node)),mkstringnode(">"));
6746 }
6747     }
6748     break;
6749
6750
6751   
6752     case 204:
6753     if(as3_pass==2) {
6754
6755 /* Line 1464 of skeleton.m4  */
6756 #line 2918 "parser.y"
6757     {
6758     (yyval.node) = (yyvsp[(1) - (1)].node);
6759 }
6760     }
6761     break;
6762
6763
6764   
6765     case 205:
6766     if(as3_pass==2) {
6767
6768 /* Line 1464 of skeleton.m4  */
6769 #line 2921 "parser.y"
6770     {
6771     (yyval.node) = mkaddnode((yyvsp[(1) - (2)].node), mkaddnode(mkstringnode(" "),(yyvsp[(2) - (2)].node)));
6772 }
6773     }
6774     break;
6775
6776
6777   
6778     case 206:
6779     if(as3_pass==2) {
6780
6781 /* Line 1464 of skeleton.m4  */
6782 #line 2924 "parser.y"
6783     {
6784     (yyval.node) = (yyvsp[(1) - (1)].node);
6785 }
6786     }
6787     break;
6788
6789
6790   
6791     case 207:
6792     if(as3_pass==2) {
6793
6794 /* Line 1464 of skeleton.m4  */
6795 #line 2927 "parser.y"
6796     {
6797     char* str = string_cstr(&(yyvsp[(3) - (3)].str));
6798     (yyval.node) = mkaddnode((yyvsp[(1) - (3)].node), mkstringnode(concat2("=",str)));
6799     free(str);
6800 }
6801     }
6802     break;
6803
6804
6805   
6806     case 208:
6807     if(as3_pass==2) {
6808
6809 /* Line 1464 of skeleton.m4  */
6810 #line 2932 "parser.y"
6811     {
6812     (yyval.node) = mkaddnode((yyvsp[(1) - (3)].node), mkaddnode(mkstringnode("=\""), mkaddnode((yyvsp[(3) - (3)].node), mkstringnode("\""))));
6813 }
6814     }
6815     break;
6816
6817
6818   
6819     case 209:
6820     if(as3_pass==2) {
6821
6822 /* Line 1464 of skeleton.m4  */
6823 #line 2935 "parser.y"
6824     {
6825     (yyval.node) = mkaddnode(mkaddnode(mkstringnode(concat2((yyvsp[(1) - (3)].id),"=\"")), (yyvsp[(3) - (3)].node)), mkstringnode("\""));
6826 }
6827     }
6828     break;
6829
6830
6831   
6832     case 210:
6833     if(as3_pass==2) {
6834
6835 /* Line 1464 of skeleton.m4  */
6836 #line 2938 "parser.y"
6837     {
6838     char* str = string_cstr(&(yyvsp[(3) - (3)].str));
6839     (yyval.node)=mkstringnode(allocprintf("%s=%s", (yyvsp[(1) - (3)].id),str));
6840     free(str);
6841     free((yyvsp[(1) - (3)].id));free((char*)(yyvsp[(3) - (3)].str).str);
6842 }
6843     }
6844     break;
6845
6846
6847   
6848     case 211:
6849     if(as3_pass==2) {
6850
6851 /* Line 1464 of skeleton.m4  */
6852 #line 2948 "parser.y"
6853     {
6854     PASS12
6855     memset(&(yyval.params),0,sizeof((yyval.params)));
6856 }
6857     }
6858     break;
6859
6860
6861   
6862     case 212:
6863     if(as3_pass==2) {
6864
6865 /* Line 1464 of skeleton.m4  */
6866 #line 2952 "parser.y"
6867     {
6868     PASS12
6869     (yyval.params)=(yyvsp[(1) - (1)].params);
6870 }
6871     }
6872     break;
6873
6874
6875   
6876     case 213:
6877     if(as3_pass==2) {
6878
6879 /* Line 1464 of skeleton.m4  */
6880 #line 2958 "parser.y"
6881     {
6882     PASS12
6883     memset(&(yyval.params),0,sizeof((yyval.params)));
6884     (yyval.params).varargs=1;
6885     list_append((yyval.params).list, (yyvsp[(2) - (2)].param));
6886 }
6887     }
6888     break;
6889
6890
6891   
6892     case 214:
6893     if(as3_pass==2) {
6894
6895 /* Line 1464 of skeleton.m4  */
6896 #line 2964 "parser.y"
6897     {
6898     PASS12
6899     (yyval.params) =(yyvsp[(1) - (4)].params);
6900     (yyval.params).varargs=1;
6901     list_append((yyval.params).list, (yyvsp[(4) - (4)].param));
6902 }
6903     }
6904     break;
6905
6906
6907   
6908     case 215:
6909     if(as3_pass==2) {
6910
6911 /* Line 1464 of skeleton.m4  */
6912 #line 2972 "parser.y"
6913     {
6914     PASS12
6915     (yyval.params) = (yyvsp[(1) - (3)].params);
6916     list_append((yyval.params).list, (yyvsp[(3) - (3)].param));
6917 }
6918     }
6919     break;
6920
6921
6922   
6923     case 216:
6924     if(as3_pass==2) {
6925
6926 /* Line 1464 of skeleton.m4  */
6927 #line 2977 "parser.y"
6928     {
6929     PASS12
6930     memset(&(yyval.params),0,sizeof((yyval.params)));
6931     list_append((yyval.params).list, (yyvsp[(1) - (1)].param));
6932 }
6933     }
6934     break;
6935
6936
6937   
6938     case 217:
6939     if(as3_pass==2) {
6940
6941 /* Line 1464 of skeleton.m4  */
6942 #line 2983 "parser.y"
6943     {
6944      PASS12
6945      (yyval.param) = rfx_calloc(sizeof(param_t));
6946      (yyval.param)->name=(yyvsp[(1) - (4)].id);
6947      (yyval.param)->type = (yyvsp[(3) - (4)].classinfo);
6948      PASS2
6949      (yyval.param)->value = (yyvsp[(4) - (4)].constant);
6950 }
6951     }
6952     break;
6953
6954
6955   
6956     case 218:
6957     if(as3_pass==2) {
6958
6959 /* Line 1464 of skeleton.m4  */
6960 #line 2991 "parser.y"
6961     {
6962      PASS12
6963      (yyval.param) = rfx_calloc(sizeof(param_t));
6964      (yyval.param)->name=(yyvsp[(1) - (2)].id);
6965      (yyval.param)->type = TYPE_ANY;
6966      PASS2
6967      (yyval.param)->value = (yyvsp[(2) - (2)].constant);
6968 }
6969     }
6970     break;
6971
6972
6973   
6974     case 221:
6975     if(as3_pass==2) {
6976
6977 /* Line 1464 of skeleton.m4  */
6978 #line 3001 "parser.y"
6979     {PASS12 (yyval.token)=0;}
6980     }
6981     break;
6982
6983
6984   
6985     case 222:
6986     if(as3_pass==2) {
6987
6988 /* Line 1464 of skeleton.m4  */
6989 #line 3004 "parser.y"
6990     {PASS12 startfunction(&(yyvsp[(1) - (9)].flags),(yyvsp[(3) - (9)].token),(yyvsp[(4) - (9)].id),&(yyvsp[(6) - (9)].params),(yyvsp[(8) - (9)].classinfo));}
6991     }
6992     break;
6993
6994
6995   
6996     case 223:
6997     if(as3_pass==2) {
6998
6999 /* Line 1464 of skeleton.m4  */
7000 #line 3005 "parser.y"
7001     {
7002     PASS1 
7003     endfunction(&(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),0,0);
7004     PASS2
7005     if(!state->method->info) syntaxerror("internal error");
7006     
7007     code_t*c = method_header(state->method);
7008     c = wrap_function(c, 0, (yyvsp[(11) - (12)].code));
7009
7010     endfunction(&(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),(yyvsp[(8) - (12)].classinfo),c);
7011     PASS12
7012     list_deep_free((yyvsp[(6) - (12)].params).list);
7013     (yyval.code)=0;
7014 }
7015     }
7016     break;
7017
7018
7019   
7020     case 225:
7021     if(as3_pass==2) {
7022
7023 /* Line 1464 of skeleton.m4  */
7024 #line 3021 "parser.y"
7025     {PASS12 (yyval.id)=0;}
7026     }
7027     break;
7028
7029
7030   
7031     case 226:
7032     if(as3_pass==2) {
7033
7034 /* Line 1464 of skeleton.m4  */
7035 #line 3023 "parser.y"
7036     {PASS12 innerfunction((yyvsp[(2) - (7)].id),&(yyvsp[(4) - (7)].params),(yyvsp[(6) - (7)].classinfo));}
7037     }
7038     break;
7039
7040
7041   
7042     case 227:
7043     if(as3_pass==2) {
7044
7045 /* Line 1464 of skeleton.m4  */
7046 #line 3024 "parser.y"
7047     {
7048     PASS1
7049     endfunction(0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),0,0);
7050     PASS2
7051     methodinfo_t*f = state->method->info;
7052     if(!f || !f->kind) syntaxerror("internal error");
7053     
7054     code_t*c = method_header(state->method);
7055     c = wrap_function(c, 0, (yyvsp[(9) - (10)].code));
7056
7057     int index = state->method->var_index;
7058     endfunction(0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),(yyvsp[(6) - (10)].classinfo),c);
7059     
7060     (yyval.value).c = abc_getlocal(0, index);
7061     (yyval.value).t = TYPE_FUNCTION(f);
7062
7063     PASS12 list_deep_free((yyvsp[(4) - (10)].params).list);
7064 }
7065     }
7066     break;
7067
7068
7069   
7070     case 228:
7071     if(as3_pass==2) {
7072
7073 /* Line 1464 of skeleton.m4  */
7074 #line 3046 "parser.y"
7075     {
7076     PASS1 NEW(unresolvedinfo_t,c);
7077           memset(c, 0, sizeof(*c));
7078           c->kind = INFOTYPE_UNRESOLVED;
7079           c->name = (yyvsp[(1) - (1)].id);
7080           c->package = get_package_from_name((yyvsp[(1) - (1)].id));
7081           if(!c->package) {
7082               c->nsset = get_current_imports();
7083               /* make the compiler look for this class in the current directory,
7084                  just in case: */
7085               as3_schedule_class_noerror(state->package, (yyvsp[(1) - (1)].id));
7086           }
7087           (yyval.classinfo) = (classinfo_t*)c;
7088     PASS2
7089     slotinfo_t*s = find_class((yyvsp[(1) - (1)].id));
7090     if(!s) syntaxerror("Could not find class/method %s (current package: %s)\n", (yyvsp[(1) - (1)].id), state->package);
7091     (yyval.classinfo) = (classinfo_t*)s;
7092 }
7093     }
7094     break;
7095
7096
7097   
7098     case 229:
7099     if(as3_pass==2) {
7100
7101 /* Line 1464 of skeleton.m4  */
7102 #line 3065 "parser.y"
7103     {
7104     PASS1 NEW(unresolvedinfo_t,c);
7105           memset(c, 0, sizeof(*c));
7106           c->kind = INFOTYPE_UNRESOLVED;
7107           c->package = (yyvsp[(1) - (3)].id);
7108           c->name = (yyvsp[(3) - (3)].id);
7109           (yyval.classinfo) = (classinfo_t*)c;
7110     PASS2
7111     slotinfo_t*s = registry_find((yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
7112     if(!s) syntaxerror("Couldn't find class/method %s.%s\n", (yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
7113     free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;
7114     (yyval.classinfo) = (classinfo_t*)s;
7115 }
7116     }
7117     break;
7118
7119
7120   
7121     case 232:
7122     if(as3_pass==2) {
7123
7124 /* Line 1464 of skeleton.m4  */
7125 #line 3082 "parser.y"
7126     {PASS12 (yyval.classinfo_list)=list_new();list_append((yyval.classinfo_list), (yyvsp[(1) - (1)].classinfo));}
7127     }
7128     break;
7129
7130
7131   
7132     case 233:
7133     if(as3_pass==2) {
7134
7135 /* Line 1464 of skeleton.m4  */
7136 #line 3083 "parser.y"
7137     {PASS12 (yyval.classinfo_list)=(yyvsp[(1) - (3)].classinfo_list);list_append((yyval.classinfo_list),(yyvsp[(3) - (3)].classinfo));}
7138     }
7139     break;
7140
7141
7142   
7143     case 234:
7144     if(as3_pass==2) {
7145
7146 /* Line 1464 of skeleton.m4  */
7147 #line 3085 "parser.y"
7148     {PASS12 (yyval.classinfo)=(yyvsp[(1) - (1)].classinfo);}
7149     }
7150     break;
7151
7152
7153   
7154     case 235:
7155     if(as3_pass==2) {
7156
7157 /* Line 1464 of skeleton.m4  */
7158 #line 3086 "parser.y"
7159     {PASS12 (yyval.classinfo)=TYPE_ANY;}
7160     }
7161     break;
7162
7163
7164   
7165     case 236:
7166     if(as3_pass==2) {
7167
7168 /* Line 1464 of skeleton.m4  */
7169 #line 3087 "parser.y"
7170     {PASS12 (yyval.classinfo)=TYPE_VOID;}
7171     }
7172     break;
7173
7174
7175   
7176     case 237:
7177     if(as3_pass==2) {
7178
7179 /* Line 1464 of skeleton.m4  */
7180 #line 3096 "parser.y"
7181     {PASS12 (yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
7182     }
7183     break;
7184
7185
7186   
7187     case 238:
7188     if(as3_pass==2) {
7189
7190 /* Line 1464 of skeleton.m4  */
7191 #line 3097 "parser.y"
7192     {PASS12 (yyval.classinfo)=0;}
7193     }
7194     break;
7195
7196
7197   
7198     case 239:
7199     if(as3_pass==2) {
7200
7201 /* Line 1464 of skeleton.m4  */
7202 #line 3101 "parser.y"
7203     {(yyval.value_list).cc=0;(yyval.value_list).number=0;}
7204     }
7205     break;
7206
7207
7208   
7209     case 240:
7210     if(as3_pass==2) {
7211
7212 /* Line 1464 of skeleton.m4  */
7213 #line 3102 "parser.y"
7214     {(yyval.value_list)=(yyvsp[(2) - (3)].value_list);}
7215     }
7216     break;
7217
7218
7219   
7220     case 241:
7221     if(as3_pass==2) {
7222
7223 /* Line 1464 of skeleton.m4  */
7224 #line 3104 "parser.y"
7225     {(yyval.value_list).cc=0;(yyval.value_list).number=0;}
7226     }
7227     break;
7228
7229
7230   
7231     case 244:
7232     if(as3_pass==2) {
7233
7234 /* Line 1464 of skeleton.m4  */
7235 #line 3108 "parser.y"
7236     {(yyval.value_list).number=1;
7237                                                   (yyval.value_list).cc = (yyvsp[(1) - (1)].value).c;
7238                                                  }
7239     }
7240     break;
7241
7242
7243   
7244     case 245:
7245     if(as3_pass==2) {
7246
7247 /* Line 1464 of skeleton.m4  */
7248 #line 3112 "parser.y"
7249     {(yyval.value_list) = (yyvsp[(1) - (2)].value_list);}
7250     }
7251     break;
7252
7253
7254   
7255     case 246:
7256     if(as3_pass==2) {
7257
7258 /* Line 1464 of skeleton.m4  */
7259 #line 3113 "parser.y"
7260     {
7261                                                   (yyval.value_list).number= (yyvsp[(1) - (2)].value_list).number+1;
7262                                                   (yyval.value_list).cc = code_append((yyvsp[(1) - (2)].value_list).cc, (yyvsp[(2) - (2)].value).c);
7263                                                   }
7264     }
7265     break;
7266
7267
7268   
7269     case 248:
7270     if(as3_pass==2) {
7271
7272 /* Line 1464 of skeleton.m4  */
7273 #line 3119 "parser.y"
7274     {
7275     typedcode_t v = node_read((yyvsp[(2) - (4)].node));
7276     (yyval.value).c = v.c;
7277     if((yyval.value).c->opcode == OPCODE_COERCE_A) (yyval.value).c = code_cutlast((yyval.value).c);
7278     
7279     code_t*paramcode = (yyvsp[(4) - (4)].value_list).cc;
7280     if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
7281         multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
7282         (yyval.value).c = code_cutlast((yyval.value).c);
7283         (yyval.value).c = code_append((yyval.value).c, paramcode);
7284         (yyval.value).c = abc_constructprop2((yyval.value).c, name, (yyvsp[(4) - (4)].value_list).number);
7285         multiname_destroy(name);
7286     } else if(is_getlocal((yyval.value).c)) {
7287         (yyval.value).c = code_append((yyval.value).c, paramcode);
7288         (yyval.value).c = abc_construct((yyval.value).c, (yyvsp[(4) - (4)].value_list).number);
7289     } else if(TYPE_IS_CLASS(v.t) && v.t->data) {
7290         code_free((yyval.value).c);
7291         classinfo_t*c = v.t->data;
7292         MULTINAME(m, c);
7293         (yyval.value).c = abc_findpropstrict2(0, &m);
7294         (yyval.value).c = code_append((yyval.value).c, paramcode);
7295         (yyval.value).c = abc_constructprop2((yyval.value).c, &m, (yyvsp[(4) - (4)].value_list).number);
7296     /*} else if($$.c->opcode == OPCODE_GETSLOT) {
7297         int slot = (int)(ptroff_t)$$.c->data[0];
7298         trait_t*t = traits_find_slotid(state->cls->abc->traits,slot);//FIXME
7299         multiname_t*name = t->name;
7300         $$.c = code_cutlast($$.c);
7301         $$.c = code_append($$.c, paramcode);
7302         $$.c = abc_constructprop2($$.c, name, $4.number);*/
7303     } else {
7304         (yyval.value).c = code_append((yyval.value).c, paramcode);
7305         (yyval.value).c = abc_construct((yyval.value).c, (yyvsp[(4) - (4)].value_list).number);
7306     }
7307    
7308     (yyval.value).t = TYPE_ANY;
7309     if(TYPE_IS_CLASS(v.t) && v.t->data) {
7310         (yyval.value).t = v.t->data;
7311     } else {
7312         (yyval.value).c = abc_coerce_a((yyval.value).c);
7313         (yyval.value).t = TYPE_ANY;
7314     }
7315 }
7316     }
7317     break;
7318
7319
7320   
7321     case 249:
7322     if(as3_pass==2) {
7323
7324 /* Line 1464 of skeleton.m4  */
7325 #line 3166 "parser.y"
7326     {
7327    
7328     typedcode_t v = node_read((yyvsp[(1) - (4)].node));
7329     (yyval.value).c = v.c;
7330     if((yyval.value).c->opcode == OPCODE_COERCE_A) {
7331         (yyval.value).c = code_cutlast((yyval.value).c);
7332     }
7333     code_t*paramcode = (yyvsp[(3) - (4)].value_list).cc;
7334
7335     (yyval.value).t = TYPE_ANY;
7336     if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
7337         multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
7338         (yyval.value).c = code_cutlast((yyval.value).c);
7339         (yyval.value).c = code_append((yyval.value).c, paramcode);
7340         (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).number);
7341         multiname_destroy(name);
7342 /*    } else if($$.c->opcode == OPCODE_GETSLOT && $$.c->prev->opcode != OPCODE_GETSCOPEOBJECT) {
7343         int slot = (int)(ptroff_t)$$.c->data[0];
7344         trait_t*t = traits_find_slotid(state->cls->abc->traits,slot);
7345         if(t->kind!=TRAIT_METHOD) {
7346             //ok: flash allows to assign closures to members.
7347         }
7348         multiname_t*name = t->name;
7349         $$.c = code_cutlast($$.c);
7350         $$.c = code_append($$.c, paramcode);
7351         //$$.c = abc_callmethod($$.c, t->method, len); //#1051 illegal early access binding
7352         $$.c = abc_callproperty2($$.c, name, $3.number);*/
7353     } else if((yyval.value).c->opcode == OPCODE_GETSUPER) {
7354         multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
7355         (yyval.value).c = code_cutlast((yyval.value).c);
7356         (yyval.value).c = code_append((yyval.value).c, paramcode);
7357         (yyval.value).c = abc_callsuper2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).number);
7358         multiname_destroy(name);
7359     } else {
7360         (yyval.value).c = abc_getglobalscope((yyval.value).c);
7361         (yyval.value).c = code_append((yyval.value).c, paramcode);
7362         (yyval.value).c = abc_call((yyval.value).c, (yyvsp[(3) - (4)].value_list).number);
7363     }
7364    
7365     if(TYPE_IS_FUNCTION(v.t) && v.t->data) {
7366         (yyval.value).t = ((methodinfo_t*)(v.t->data))->return_type;
7367     } else if(TYPE_IS_CLASS(v.t) && v.t->data) {
7368         // calling a class is like a typecast
7369         (yyval.value).t = (classinfo_t*)v.t->data;
7370     } else {
7371         (yyval.value).t = TYPE_ANY;
7372         (yyval.value).c = abc_coerce_a((yyval.value).c);
7373     }
7374 }
7375     }
7376     break;
7377
7378
7379   
7380     case 250:
7381     if(as3_pass==2) {
7382
7383 /* Line 1464 of skeleton.m4  */
7384 #line 3216 "parser.y"
7385     {
7386     if(!state->cls) syntaxerror("super() not allowed outside of a class");
7387     if(!state->method) syntaxerror("super() not allowed outside of a function");
7388     if(!state->method->is_constructor) syntaxerror("super() not allowed outside of a constructor");
7389
7390     (yyval.value).c = code_new();
7391     (yyval.value).c = abc_getlocal_0((yyval.value).c);
7392
7393     (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value_list).cc);
7394     /*
7395     this is dependent on the control path, check this somewhere else
7396     if(state->method->has_super)
7397         syntaxerror("constructor may call super() only once");
7398     */
7399     state->method->has_super = 1;
7400
7401     (yyval.value).c = abc_constructsuper((yyval.value).c, (yyvsp[(3) - (4)].value_list).number);
7402     (yyval.value).c = abc_pushundefined((yyval.value).c);
7403     (yyval.value).t = TYPE_ANY;
7404 }
7405     }
7406     break;
7407
7408
7409   
7410     case 251:
7411     if(as3_pass==2) {
7412
7413 /* Line 1464 of skeleton.m4  */
7414 #line 3237 "parser.y"
7415     {
7416     typedcode_t v = node_read((yyvsp[(2) - (2)].node));
7417     (yyval.value).c = v.c;
7418     if((yyval.value).c->opcode == OPCODE_COERCE_A) {
7419         (yyval.value).c = code_cutlast((yyval.value).c);
7420     }
7421     multiname_t*name = 0;
7422     if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
7423         (yyval.value).c->opcode = OPCODE_DELETEPROPERTY;
7424     } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
7425         int slot = (int)(ptroff_t)(yyval.value).c->data[0];
7426         multiname_t*name = traits_find_slotid(state->cls->abc->traits,slot)->name;
7427         (yyval.value).c = code_cutlast((yyval.value).c);
7428         (yyval.value).c = abc_deleteproperty2((yyval.value).c, name);
7429     } else {
7430         (yyval.value).c = abc_getlocal_0((yyval.value).c);
7431         MULTINAME_LATE(m, v.t?v.t->access:ACCESS_PACKAGE, "");
7432         (yyval.value).c = abc_deleteproperty2((yyval.value).c, &m);
7433     }
7434     (yyval.value).t = TYPE_BOOLEAN;
7435 }
7436     }
7437     break;
7438
7439
7440   
7441     case 252:
7442     if(as3_pass==2) {
7443
7444 /* Line 1464 of skeleton.m4  */
7445 #line 3259 "parser.y"
7446     {
7447     (yyval.code) = abc_returnvoid(0);
7448 }
7449     }
7450     break;
7451
7452
7453   
7454     case 253:
7455     if(as3_pass==2) {
7456
7457 /* Line 1464 of skeleton.m4  */
7458 #line 3262 "parser.y"
7459     {
7460     (yyval.code) = (yyvsp[(2) - (2)].value).c;
7461     (yyval.code) = abc_returnvalue((yyval.code));
7462 }
7463     }
7464     break;
7465
7466
7467   
7468     case 254:
7469     if(as3_pass==2) {
7470
7471 /* Line 1464 of skeleton.m4  */
7472 #line 3269 "parser.y"
7473     {
7474     (yyval.value) = node_read((yyvsp[(1) - (1)].node));
7475 }
7476     }
7477     break;
7478
7479
7480   
7481     case 255:
7482     if(as3_pass==2) {
7483
7484 /* Line 1464 of skeleton.m4  */
7485 #line 3272 "parser.y"
7486     {
7487     (yyval.value) = node_read((yyvsp[(1) - (1)].node));
7488 }
7489     }
7490     break;
7491
7492
7493   
7494     case 256:
7495     if(as3_pass==2) {
7496
7497 /* Line 1464 of skeleton.m4  */
7498 #line 3275 "parser.y"
7499     {
7500     (yyval.node) = mkmultinode(&node_comma, (yyvsp[(1) - (1)].node));
7501 }
7502     }
7503     break;
7504
7505
7506   
7507     case 257:
7508     if(as3_pass==2) {
7509
7510 /* Line 1464 of skeleton.m4  */
7511 #line 3278 "parser.y"
7512     {
7513     (yyval.node) = multinode_extend((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
7514 }
7515     }
7516     break;
7517
7518
7519   
7520     case 258:
7521     if(as3_pass==2) {
7522
7523 /* Line 1464 of skeleton.m4  */
7524 #line 3281 "parser.y"
7525     { 
7526     (yyval.code) = node_exec((yyvsp[(1) - (1)].node)); 
7527 }
7528     }
7529     break;
7530
7531
7532   
7533     case 259:
7534     if(as3_pass==2) {
7535
7536 /* Line 1464 of skeleton.m4  */
7537 #line 3284 "parser.y"
7538     { 
7539     (yyval.code) = (yyvsp[(1) - (3)].code);
7540     (yyval.code) = code_append((yyval.code), node_exec((yyvsp[(3) - (3)].node))); 
7541 }
7542     }
7543     break;
7544
7545
7546   
7547     case 260:
7548     if(as3_pass==2) {
7549
7550 /* Line 1464 of skeleton.m4  */
7551 #line 3289 "parser.y"
7552     {(yyval.value_list).cc=0;(yyval.value_list).number=0;}
7553     }
7554     break;
7555
7556
7557   
7558     case 261:
7559     if(as3_pass==2) {
7560
7561 /* Line 1464 of skeleton.m4  */
7562 #line 3290 "parser.y"
7563     {(yyval.value_list)=(yyvsp[(1) - (1)].value_list);}
7564     }
7565     break;
7566
7567
7568   
7569     case 262:
7570     if(as3_pass==2) {
7571
7572 /* Line 1464 of skeleton.m4  */
7573 #line 3292 "parser.y"
7574     {(yyval.code)=abc_pushstring(0,(yyvsp[(1) - (1)].id));}
7575     }
7576     break;
7577
7578
7579   
7580     case 263:
7581     if(as3_pass==2) {
7582
7583 /* Line 1464 of skeleton.m4  */
7584 #line 3293 "parser.y"
7585     {(yyval.code)=abc_pushstring2(0,&(yyvsp[(1) - (1)].str));}
7586     }
7587     break;
7588
7589
7590   
7591     case 264:
7592     if(as3_pass==2) {
7593
7594 /* Line 1464 of skeleton.m4  */
7595 #line 3294 "parser.y"
7596     {syntaxerror("dictionary keys must be strings");}
7597     }
7598     break;
7599
7600
7601   
7602     case 265:
7603     if(as3_pass==2) {
7604
7605 /* Line 1464 of skeleton.m4  */
7606 #line 3295 "parser.y"
7607     {syntaxerror("dictionary keys must be strings");}
7608     }
7609     break;
7610
7611
7612   
7613     case 266:
7614     if(as3_pass==2) {
7615
7616 /* Line 1464 of skeleton.m4  */
7617 #line 3296 "parser.y"
7618     {syntaxerror("dictionary keys must be strings");}
7619     }
7620     break;
7621
7622
7623   
7624     case 267:
7625     if(as3_pass==2) {
7626
7627 /* Line 1464 of skeleton.m4  */
7628 #line 3298 "parser.y"
7629     {
7630     (yyval.value_list).cc = 0;
7631     (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(1) - (3)].code));
7632     (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (3)].value).c);
7633     (yyval.value_list).number = 2;
7634 }
7635     }
7636     break;
7637
7638
7639   
7640     case 268:
7641     if(as3_pass==2) {
7642
7643 /* Line 1464 of skeleton.m4  */
7644 #line 3304 "parser.y"
7645     {
7646     (yyval.value_list).cc = (yyvsp[(1) - (5)].value_list).cc;
7647     (yyval.value_list).number = (yyvsp[(1) - (5)].value_list).number+2;
7648     (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (5)].code));
7649     (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(5) - (5)].value).c);
7650 }
7651     }
7652     break;
7653
7654
7655   
7656     case 269:
7657     if(as3_pass==2) {
7658
7659 /* Line 1464 of skeleton.m4  */
7660 #line 3313 "parser.y"
7661     {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
7662     }
7663     break;
7664
7665
7666   
7667     case 270:
7668     if(as3_pass==2) {
7669
7670 /* Line 1464 of skeleton.m4  */
7671 #line 3314 "parser.y"
7672     {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
7673     }
7674     break;
7675
7676
7677   
7678     case 271:
7679     if(as3_pass==2) {
7680
7681 /* Line 1464 of skeleton.m4  */
7682 #line 3315 "parser.y"
7683     {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
7684     }
7685     break;
7686
7687
7688   
7689     case 272:
7690     if(as3_pass==2) {
7691
7692 /* Line 1464 of skeleton.m4  */
7693 #line 3316 "parser.y"
7694     {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
7695     }
7696     break;
7697
7698
7699   
7700     case 273:
7701     if(as3_pass==2) {
7702
7703 /* Line 1464 of skeleton.m4  */
7704 #line 3317 "parser.y"
7705     {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
7706     }
7707     break;
7708
7709
7710   
7711     case 274:
7712     if(as3_pass==2) {
7713
7714 /* Line 1464 of skeleton.m4  */
7715 #line 3318 "parser.y"
7716     {(yyval.node) = (yyvsp[(1) - (1)].node);}
7717     }
7718     break;
7719
7720
7721   
7722     case 275:
7723     if(as3_pass==2) {
7724
7725 /* Line 1464 of skeleton.m4  */
7726 #line 3320 "parser.y"
7727     { 
7728     (yyval.node) = mkconstnode((yyvsp[(1) - (1)].constant));
7729 }
7730     }
7731     break;
7732
7733
7734   
7735     case 276:
7736     if(as3_pass==2) {
7737
7738 /* Line 1464 of skeleton.m4  */
7739 #line 3324 "parser.y"
7740     {
7741     (yyval.node) = (yyvsp[(1) - (1)].node);
7742 }
7743     }
7744     break;
7745
7746
7747   
7748     case 277:
7749     if(as3_pass==2) {
7750
7751 /* Line 1464 of skeleton.m4  */
7752 #line 3329 "parser.y"
7753     {
7754     typedcode_t v;
7755     v.c = 0;
7756     multiname_t m = {QNAME, &stdns, 0, "RegExp"};
7757     if(!(yyvsp[(1) - (1)].regexp).options) {
7758         v.c = abc_getlex2(v.c, &m);
7759         v.c = abc_pushstring(v.c, (yyvsp[(1) - (1)].regexp).pattern);
7760         v.c = abc_construct(v.c, 1);
7761     } else {
7762         v.c = abc_getlex2(v.c, &m);
7763         v.c = abc_pushstring(v.c, (yyvsp[(1) - (1)].regexp).pattern);
7764         v.c = abc_pushstring(v.c, (yyvsp[(1) - (1)].regexp).options);
7765         v.c = abc_construct(v.c, 2);
7766     }
7767     v.t = TYPE_REGEXP;
7768     (yyval.node) = mkcodenode(v);
7769 }
7770     }
7771     break;
7772
7773
7774   
7775     case 278:
7776     if(as3_pass==2) {
7777
7778 /* Line 1464 of skeleton.m4  */
7779 #line 3347 "parser.y"
7780     {
7781     PASS1
7782     state->method->need_arguments = 1;
7783     PASS2
7784     typedcode_t v;
7785     v.c = abc_getlocal(0, state->method->need_arguments);
7786     v.t = TYPE_ARRAY;
7787     (yyval.node) = mkcodenode(v);
7788 }
7789     }
7790     break;
7791
7792
7793   
7794     case 279:
7795     if(as3_pass==2) {
7796
7797 /* Line 1464 of skeleton.m4  */
7798 #line 3358 "parser.y"
7799     {
7800     typedcode_t v;
7801     v.c = code_new();
7802     v.c = code_append(v.c, (yyvsp[(2) - (3)].value_list).cc);
7803     v.c = abc_newarray(v.c, (yyvsp[(2) - (3)].value_list).number);
7804     v.t = registry_getarrayclass();
7805     (yyval.node) = mkcodenode(v);
7806 }
7807     }
7808     break;
7809
7810
7811   
7812     case 280:
7813     if(as3_pass==2) {
7814
7815 /* Line 1464 of skeleton.m4  */
7816 #line 3368 "parser.y"
7817     {
7818     typedcode_t v;
7819     v.c = code_new();
7820     v.c = code_append(v.c, (yyvsp[(2) - (3)].value_list).cc);
7821     v.c = abc_newobject(v.c, (yyvsp[(2) - (3)].value_list).number/2);
7822     v.t = registry_getobjectclass();
7823     (yyval.node) =  mkcodenode(v);
7824 }
7825     }
7826     break;
7827
7828
7829   
7830     case 281:
7831     if(as3_pass==2) {
7832
7833 /* Line 1464 of skeleton.m4  */
7834 #line 3377 "parser.y"
7835     {(yyval.node) = mknode2(&node_lt,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
7836     }
7837     break;
7838
7839
7840   
7841     case 282:
7842     if(as3_pass==2) {
7843
7844 /* Line 1464 of skeleton.m4  */
7845 #line 3378 "parser.y"
7846     {(yyval.node) = mknode2(&node_gt,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
7847     }
7848     break;
7849
7850
7851   
7852     case 283:
7853     if(as3_pass==2) {
7854
7855 /* Line 1464 of skeleton.m4  */
7856 #line 3379 "parser.y"
7857     {(yyval.node) = mknode2(&node_le,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
7858     }
7859     break;
7860
7861
7862   
7863     case 284:
7864     if(as3_pass==2) {
7865
7866 /* Line 1464 of skeleton.m4  */
7867 #line 3380 "parser.y"
7868     {(yyval.node) = mknode2(&node_ge,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
7869     }
7870     break;
7871
7872
7873   
7874     case 285:
7875     if(as3_pass==2) {
7876
7877 /* Line 1464 of skeleton.m4  */
7878 #line 3381 "parser.y"
7879     {(yyval.node) = mknode2(&node_eqeq,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
7880     }
7881     break;
7882
7883
7884   
7885     case 286:
7886     if(as3_pass==2) {
7887
7888 /* Line 1464 of skeleton.m4  */
7889 #line 3382 "parser.y"
7890     {(yyval.node) = mknode2(&node_eqeqeq,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
7891     }
7892     break;
7893
7894
7895   
7896     case 287:
7897     if(as3_pass==2) {
7898
7899 /* Line 1464 of skeleton.m4  */
7900 #line 3383 "parser.y"
7901     {(yyval.node) = mknode2(&node_noteqeq,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
7902     }
7903     break;
7904
7905
7906   
7907     case 288:
7908     if(as3_pass==2) {
7909
7910 /* Line 1464 of skeleton.m4  */
7911 #line 3384 "parser.y"
7912     {(yyval.node) = mknode2(&node_noteq,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
7913     }
7914     break;
7915
7916
7917   
7918     case 289:
7919     if(as3_pass==2) {
7920
7921 /* Line 1464 of skeleton.m4  */
7922 #line 3385 "parser.y"
7923     {(yyval.node) = mknode2(&node_oror,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
7924     }
7925     break;
7926
7927
7928   
7929     case 290:
7930     if(as3_pass==2) {
7931
7932 /* Line 1464 of skeleton.m4  */
7933 #line 3386 "parser.y"
7934     {(yyval.node) = mknode2(&node_andand,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
7935     }
7936     break;
7937
7938
7939   
7940     case 291:
7941     if(as3_pass==2) {
7942
7943 /* Line 1464 of skeleton.m4  */
7944 #line 3387 "parser.y"
7945     {(yyval.node) = mknode1(&node_not, (yyvsp[(2) - (2)].node));}
7946     }
7947     break;
7948
7949
7950   
7951     case 292:
7952     if(as3_pass==2) {
7953
7954 /* Line 1464 of skeleton.m4  */
7955 #line 3388 "parser.y"
7956     {(yyval.node) = mknode1(&node_bitnot, (yyvsp[(2) - (2)].node));}
7957     }
7958     break;
7959
7960
7961   
7962     case 293:
7963     if(as3_pass==2) {
7964
7965 /* Line 1464 of skeleton.m4  */
7966 #line 3389 "parser.y"
7967     {(yyval.node) = mknode2(&node_bitand, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7968     }
7969     break;
7970
7971
7972   
7973     case 294:
7974     if(as3_pass==2) {
7975
7976 /* Line 1464 of skeleton.m4  */
7977 #line 3390 "parser.y"
7978     {(yyval.node) = mknode2(&node_bitxor, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7979     }
7980     break;
7981
7982
7983   
7984     case 295:
7985     if(as3_pass==2) {
7986
7987 /* Line 1464 of skeleton.m4  */
7988 #line 3391 "parser.y"
7989     {(yyval.node) = mknode2(&node_bitor, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7990     }
7991     break;
7992
7993
7994   
7995     case 296:
7996     if(as3_pass==2) {
7997
7998 /* Line 1464 of skeleton.m4  */
7999 #line 3392 "parser.y"
8000     {(yyval.node) = mknode2(&node_shr, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8001     }
8002     break;
8003
8004
8005   
8006     case 297:
8007     if(as3_pass==2) {
8008
8009 /* Line 1464 of skeleton.m4  */
8010 #line 3393 "parser.y"
8011     {(yyval.node) = mknode2(&node_ushr, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8012     }
8013     break;
8014
8015
8016   
8017     case 298:
8018     if(as3_pass==2) {
8019
8020 /* Line 1464 of skeleton.m4  */
8021 #line 3394 "parser.y"
8022     {(yyval.node) = mknode2(&node_shl, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8023     }
8024     break;
8025
8026
8027   
8028     case 299:
8029     if(as3_pass==2) {
8030
8031 /* Line 1464 of skeleton.m4  */
8032 #line 3395 "parser.y"
8033     {(yyval.node) = mknode2(&node_div, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8034     }
8035     break;
8036
8037
8038   
8039     case 300:
8040     if(as3_pass==2) {
8041
8042 /* Line 1464 of skeleton.m4  */
8043 #line 3396 "parser.y"
8044     {(yyval.node) = mknode2(&node_mod, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8045     }
8046     break;
8047
8048
8049   
8050     case 301:
8051     if(as3_pass==2) {
8052
8053 /* Line 1464 of skeleton.m4  */
8054 #line 3397 "parser.y"
8055     {(yyval.node) = mknode2(&node_plus, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8056     }
8057     break;
8058
8059
8060   
8061     case 302:
8062     if(as3_pass==2) {
8063
8064 /* Line 1464 of skeleton.m4  */
8065 #line 3398 "parser.y"
8066     {(yyval.node) = mknode2(&node_minus, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8067     }
8068     break;
8069
8070
8071   
8072     case 303:
8073     if(as3_pass==2) {
8074
8075 /* Line 1464 of skeleton.m4  */
8076 #line 3399 "parser.y"
8077     {(yyval.node) = mknode2(&node_multiply, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8078     }
8079     break;
8080
8081
8082   
8083     case 304:
8084     if(as3_pass==2) {
8085
8086 /* Line 1464 of skeleton.m4  */
8087 #line 3400 "parser.y"
8088     {(yyval.node) = mknode2(&node_in, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8089     }
8090     break;
8091
8092
8093   
8094     case 305:
8095     if(as3_pass==2) {
8096
8097 /* Line 1464 of skeleton.m4  */
8098 #line 3401 "parser.y"
8099     {(yyval.node) = mknode2(&node_as, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8100     }
8101     break;
8102
8103
8104   
8105     case 306:
8106     if(as3_pass==2) {
8107
8108 /* Line 1464 of skeleton.m4  */
8109 #line 3402 "parser.y"
8110     {(yyval.node) = mknode2(&node_instanceof, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8111     }
8112     break;
8113
8114
8115   
8116     case 307:
8117     if(as3_pass==2) {
8118
8119 /* Line 1464 of skeleton.m4  */
8120 #line 3403 "parser.y"
8121     {(yyval.node) = mknode2(&node_is, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8122     }
8123     break;
8124
8125
8126   
8127     case 308:
8128     if(as3_pass==2) {
8129
8130 /* Line 1464 of skeleton.m4  */
8131 #line 3404 "parser.y"
8132     {(yyval.node) = mknode1(&node_typeof, (yyvsp[(2) - (2)].node));}
8133     }
8134     break;
8135
8136
8137   
8138     case 309:
8139     if(as3_pass==2) {
8140
8141 /* Line 1464 of skeleton.m4  */
8142 #line 3405 "parser.y"
8143     {(yyval.node) = mknode1(&node_void, (yyvsp[(2) - (2)].node));}
8144     }
8145     break;
8146
8147
8148   
8149     case 310:
8150     if(as3_pass==2) {
8151
8152 /* Line 1464 of skeleton.m4  */
8153 #line 3406 "parser.y"
8154     { (yyval.node) = mkconstnode(constant_new_undefined());}
8155     }
8156     break;
8157
8158
8159   
8160     case 311:
8161     if(as3_pass==2) {
8162
8163 /* Line 1464 of skeleton.m4  */
8164 #line 3407 "parser.y"
8165     { (yyval.node)=(yyvsp[(2) - (3)].node);}
8166     }
8167     break;
8168
8169
8170   
8171     case 312:
8172     if(as3_pass==2) {
8173
8174 /* Line 1464 of skeleton.m4  */
8175 #line 3408 "parser.y"
8176     {(yyval.node) = mknode1(&node_neg, (yyvsp[(2) - (2)].node));}
8177     }
8178     break;
8179
8180
8181   
8182     case 313:
8183     if(as3_pass==2) {
8184
8185 /* Line 1464 of skeleton.m4  */
8186 #line 3409 "parser.y"
8187     {(yyval.node) = mknode2(&node_arraylookup, (yyvsp[(1) - (4)].node),(yyvsp[(3) - (4)].node));}
8188     }
8189     break;
8190
8191
8192   
8193     case 314:
8194     if(as3_pass==2) {
8195
8196 /* Line 1464 of skeleton.m4  */
8197 #line 3410 "parser.y"
8198     {(yyval.node) = mknode2(&node_muleq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8199     }
8200     break;
8201
8202
8203   
8204     case 315:
8205     if(as3_pass==2) {
8206
8207 /* Line 1464 of skeleton.m4  */
8208 #line 3411 "parser.y"
8209     {(yyval.node) = mknode2(&node_modeq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8210     }
8211     break;
8212
8213
8214   
8215     case 316:
8216     if(as3_pass==2) {
8217
8218 /* Line 1464 of skeleton.m4  */
8219 #line 3412 "parser.y"
8220     {(yyval.node) = mknode2(&node_shleq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8221     }
8222     break;
8223
8224
8225   
8226     case 317:
8227     if(as3_pass==2) {
8228
8229 /* Line 1464 of skeleton.m4  */
8230 #line 3413 "parser.y"
8231     {(yyval.node) = mknode2(&node_shreq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8232     }
8233     break;
8234
8235
8236   
8237     case 318:
8238     if(as3_pass==2) {
8239
8240 /* Line 1464 of skeleton.m4  */
8241 #line 3414 "parser.y"
8242     {(yyval.node) = mknode2(&node_ushreq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8243     }
8244     break;
8245
8246
8247   
8248     case 319:
8249     if(as3_pass==2) {
8250
8251 /* Line 1464 of skeleton.m4  */
8252 #line 3415 "parser.y"
8253     { (yyval.node) = mknode2(&node_diveq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8254     }
8255     break;
8256
8257
8258   
8259     case 320:
8260     if(as3_pass==2) {
8261
8262 /* Line 1464 of skeleton.m4  */
8263 #line 3416 "parser.y"
8264     { (yyval.node) = mknode2(&node_bitoreq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8265     }
8266     break;
8267
8268
8269   
8270     case 321:
8271     if(as3_pass==2) {
8272
8273 /* Line 1464 of skeleton.m4  */
8274 #line 3417 "parser.y"
8275     { (yyval.node) = mknode2(&node_bitxoreq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8276     }
8277     break;
8278
8279
8280   
8281     case 322:
8282     if(as3_pass==2) {
8283
8284 /* Line 1464 of skeleton.m4  */
8285 #line 3418 "parser.y"
8286     { (yyval.node) = mknode2(&node_bitandeq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8287     }
8288     break;
8289
8290
8291   
8292     case 323:
8293     if(as3_pass==2) {
8294
8295 /* Line 1464 of skeleton.m4  */
8296 #line 3419 "parser.y"
8297     { (yyval.node) = mknode2(&node_pluseq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8298     }
8299     break;
8300
8301
8302   
8303     case 324:
8304     if(as3_pass==2) {
8305
8306 /* Line 1464 of skeleton.m4  */
8307 #line 3420 "parser.y"
8308     { (yyval.node) = mknode2(&node_minuseq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8309     }
8310     break;
8311
8312
8313   
8314     case 325:
8315     if(as3_pass==2) {
8316
8317 /* Line 1464 of skeleton.m4  */
8318 #line 3421 "parser.y"
8319     { (yyval.node) = mknode2(&node_assign, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8320     }
8321     break;
8322
8323
8324   
8325     case 326:
8326     if(as3_pass==2) {
8327
8328 /* Line 1464 of skeleton.m4  */
8329 #line 3422 "parser.y"
8330     { (yyval.node) = mknode3(&node_tenary, (yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].node), (yyvsp[(5) - (5)].node));}
8331     }
8332     break;
8333
8334
8335   
8336     case 327:
8337     if(as3_pass==2) {
8338
8339 /* Line 1464 of skeleton.m4  */
8340 #line 3424 "parser.y"
8341     { (yyval.node) = mknode1(&node_rplusplus, (yyvsp[(1) - (2)].node));}
8342     }
8343     break;
8344
8345
8346   
8347     case 328:
8348     if(as3_pass==2) {
8349
8350 /* Line 1464 of skeleton.m4  */
8351 #line 3425 "parser.y"
8352     { (yyval.node) = mknode1(&node_rminusminus, (yyvsp[(1) - (2)].node));}
8353     }
8354     break;
8355
8356
8357   
8358     case 329:
8359     if(as3_pass==2) {
8360
8361 /* Line 1464 of skeleton.m4  */
8362 #line 3426 "parser.y"
8363     {(yyval.node) = mknode1(&node_lplusplus, (yyvsp[(2) - (2)].node)); }
8364     }
8365     break;
8366
8367
8368   
8369     case 330:
8370     if(as3_pass==2) {
8371
8372 /* Line 1464 of skeleton.m4  */
8373 #line 3427 "parser.y"
8374     {(yyval.node) = mknode1(&node_lminusminus, (yyvsp[(2) - (2)].node)); }
8375     }
8376     break;
8377
8378
8379   
8380     case 331:
8381     if(as3_pass==2) {
8382
8383 /* Line 1464 of skeleton.m4  */
8384 #line 3430 "parser.y"
8385     { if(!state->cls->info)
8386                   syntaxerror("super keyword not allowed outside a class");
8387               classinfo_t*t = state->cls->info->superclass;
8388               if(!t) t = TYPE_OBJECT;
8389               memberinfo_t*f = findmember_nsset(t, (yyvsp[(3) - (3)].id), 1);
8390               MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
8391               typedcode_t v;
8392               v.c = 0;
8393               v.c = abc_getlocal_0(v.c);
8394               v.c = abc_getsuper2(v.c, &m);
8395               v.t = slotinfo_gettype((slotinfo_t*)f);
8396               (yyval.node) = mkcodenode(v);
8397            }
8398     }
8399     break;
8400
8401
8402   
8403     case 332:
8404     if(as3_pass==2) {
8405
8406 /* Line 1464 of skeleton.m4  */
8407 #line 3444 "parser.y"
8408     {
8409     typedcode_t v;
8410     multiname_t m = {MULTINAMEA, 0, &nopackage_namespace_set, (yyvsp[(2) - (2)].id)};
8411     v.c = abc_getlex2(0, &m);
8412     v.t = TYPE_STRING;
8413     (yyval.node) = mkcodenode(v);
8414 }
8415     }
8416     break;
8417
8418
8419   
8420     case 333:
8421     if(as3_pass==2) {
8422
8423 /* Line 1464 of skeleton.m4  */
8424 #line 3452 "parser.y"
8425     {PASS12 new_state();state->xmlfilter=1;}
8426     }
8427     break;
8428
8429
8430   
8431     case 334:
8432     if(as3_pass==2) {
8433
8434 /* Line 1464 of skeleton.m4  */
8435 #line 3452 "parser.y"
8436     {
8437     PASS1 old_state();
8438     PASS2
8439     typedcode_t v = node_read((yyvsp[(1) - (6)].node));
8440     typedcode_t w = node_read((yyvsp[(5) - (6)].node));
8441     code_t*c = 0;
8442     int index = alloc_local();
8443     int result = alloc_local();
8444     int tmp = alloc_local();
8445     int xml = alloc_local();
8446     
8447     c = code_append(c, v.c);
8448     c = abc_checkfilter(c);
8449     c = abc_coerce_a(c); //hasnext2 converts to *
8450     c = abc_setlocal(c, xml);
8451     multiname_t m = {QNAME, &stdns, 0, "XMLList"};
8452     c = abc_getlex2(c, &m);
8453     c = abc_construct(c, 0);
8454     c = abc_setlocal(c, result);
8455     c = abc_pushbyte(c, 0);
8456     c = abc_setlocal(c, index);
8457     code_t*jmp = c = abc_jump(c, 0);
8458     code_t*loop = c = abc_label(c);
8459     c = abc_getlocal(c, xml);
8460     c = abc_getlocal(c, index);
8461     c = abc_nextvalue(c);
8462     c = abc_dup(c);
8463     c = abc_setlocal(c, tmp);
8464     c = abc_pushwith(c);
8465     c = code_append(c, w.c);
8466     c = abc_popscope(c);
8467     code_t*b = c = abc_iffalse(c, 0);
8468     c = abc_getlocal(c, result);
8469     c = abc_getlocal(c, index);
8470     c = abc_getlocal(c, tmp);
8471     multiname_t m2 = {MULTINAMEL, 0, &nopackage_namespace_set, 0};
8472     c = abc_setproperty2(c, &m2);
8473     c = b->branch = jmp->branch = abc_nop(c);
8474     c = abc_kill(c, tmp);
8475     c = abc_hasnext2(c, xml, index);
8476     c = abc_iftrue(c, loop);
8477     c = abc_getlocal(c, result);
8478     c = abc_kill(c, xml);
8479     c = abc_kill(c, result);
8480     c = abc_kill(c, index);
8481     
8482     c = var_block(c, state->vars);
8483     old_state();
8484     typedcode_t r;
8485     r.c = c;
8486     r.t = TYPE_XMLLIST;
8487     (yyval.node) = mkcodenode(r);
8488 }
8489     }
8490     break;
8491
8492
8493   
8494     case 335:
8495     if(as3_pass==2) {
8496
8497 /* Line 1464 of skeleton.m4  */
8498 #line 3506 "parser.y"
8499     {(yyval.id)=(yyvsp[(1) - (1)].id);}
8500     }
8501     break;
8502
8503
8504   
8505     case 336:
8506     if(as3_pass==2) {
8507
8508 /* Line 1464 of skeleton.m4  */
8509 #line 3507 "parser.y"
8510     {(yyval.id)="*";}
8511     }
8512     break;
8513
8514
8515   
8516     case 337:
8517     if(as3_pass==2) {
8518
8519 /* Line 1464 of skeleton.m4  */
8520 #line 3508 "parser.y"
8521     {(yyval.id)=(char*)(yyvsp[(1) - (1)].id);}
8522     }
8523     break;
8524
8525
8526   
8527     case 339:
8528     if(as3_pass==2) {
8529
8530 /* Line 1464 of skeleton.m4  */
8531 #line 3510 "parser.y"
8532     {(yyval.id)="*";}
8533     }
8534     break;
8535
8536
8537   
8538     case 340:
8539     if(as3_pass==2) {
8540
8541 /* Line 1464 of skeleton.m4  */
8542 #line 3518 "parser.y"
8543     {
8544     typedcode_t v = node_read((yyvsp[(1) - (5)].node));
8545     typedcode_t w = node_read(resolve_identifier((yyvsp[(3) - (5)].id)));
8546     v.c = code_append(v.c, w.c);
8547     if(!TYPE_IS_NAMESPACE(w.t)) {
8548         as3_softwarning("%s might not be a namespace", (yyvsp[(3) - (5)].id));
8549     }
8550     v.c = converttype(v.c, w.t, TYPE_NAMESPACE);
8551     multiname_t m = {RTQNAME, 0, 0, (yyvsp[(5) - (5)].id)};
8552     v.c = abc_getproperty2(v.c, &m);
8553     if(TYPE_IS_XML(v.t)) {
8554         v.t = TYPE_XMLLIST;
8555     } else {
8556         v.c = abc_coerce_a(v.c);
8557         v.t = TYPE_ANY;
8558     }
8559     (yyval.node) = mkcodenode(v);
8560 }
8561     }
8562     break;
8563
8564
8565   
8566     case 341:
8567     if(as3_pass==2) {
8568
8569 /* Line 1464 of skeleton.m4  */
8570 #line 3536 "parser.y"
8571     {
8572     typedcode_t v = node_read((yyvsp[(1) - (3)].node));
8573     multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(3) - (3)].id)};
8574     v.c = abc_getdescendants2(v.c, &m);
8575     v.t = TYPE_XMLLIST;
8576     (yyval.node) = mkcodenode(v);
8577 }
8578     }
8579     break;
8580
8581
8582   
8583     case 342:
8584     if(as3_pass==2) {
8585
8586 /* Line 1464 of skeleton.m4  */
8587 #line 3543 "parser.y"
8588     {
8589     typedcode_t v = node_read((yyvsp[(1) - (5)].node));
8590     typedcode_t w = node_read((yyvsp[(4) - (5)].node));
8591     multiname_t m = {MULTINAMEL, 0, &nopackage_namespace_set, 0};
8592     v.c = code_append(v.c, w.c);
8593     v.c = converttype(w.c, w.t, TYPE_STRING);
8594     v.c = abc_getproperty2(v.c, &m);
8595     v.t = TYPE_XMLLIST;
8596     (yyval.node) = mkcodenode(v);
8597 }
8598     }
8599     break;
8600
8601
8602   
8603     case 343:
8604     if(as3_pass==2) {
8605
8606 /* Line 1464 of skeleton.m4  */
8607 #line 3554 "parser.y"
8608     {
8609     typedcode_t v = node_read((yyvsp[(1) - (4)].node));
8610     multiname_t m = {MULTINAMEA, 0, &nopackage_namespace_set, (yyvsp[(4) - (4)].id)};
8611     v.c = abc_getproperty2(v.c, &m);
8612     v.t = TYPE_STRING;
8613     (yyval.node) = mkcodenode(v);
8614 }
8615     }
8616     break;
8617
8618
8619   
8620     case 344:
8621     if(as3_pass==2) {
8622
8623 /* Line 1464 of skeleton.m4  */
8624 #line 3561 "parser.y"
8625     {
8626     typedcode_t v = node_read((yyvsp[(1) - (4)].node));
8627     multiname_t m = {MULTINAMEA, 0, &nopackage_namespace_set, (yyvsp[(4) - (4)].id)};
8628     v.c = abc_getdescendants2(v.c, &m);
8629     v.t = TYPE_STRING;
8630     (yyval.node) = mkcodenode(v);
8631 }
8632     }
8633     break;
8634
8635
8636   
8637     case 345:
8638     if(as3_pass==2) {
8639
8640 /* Line 1464 of skeleton.m4  */
8641 #line 3568 "parser.y"
8642     {
8643     typedcode_t v = node_read((yyvsp[(1) - (6)].node));
8644     typedcode_t w = node_read((yyvsp[(5) - (6)].node));
8645     multiname_t m = {MULTINAMELA, 0, &nopackage_namespace_set, 0};
8646     v.c = code_append(v.c, w.c);
8647     v.c = converttype(w.c, w.t, TYPE_STRING);
8648     v.c = abc_getproperty2(v.c, &m);
8649     v.t = TYPE_STRING;
8650     (yyval.node) = mkcodenode(v);
8651 }
8652     }
8653     break;
8654
8655
8656   
8657     case 346:
8658     if(as3_pass==2) {
8659
8660 /* Line 1464 of skeleton.m4  */
8661 #line 3578 "parser.y"
8662     {
8663     typedcode_t v = node_read((yyvsp[(1) - (6)].node));
8664     typedcode_t w = node_read((yyvsp[(5) - (6)].node));
8665     multiname_t m = {MULTINAMELA, 0, &nopackage_namespace_set, 0};
8666     v.c = code_append(v.c, w.c);
8667     v.c = converttype(w.c, w.t, TYPE_STRING);
8668     v.c = abc_getdescendants2(v.c, &m);
8669     v.t = TYPE_STRING;
8670     (yyval.node) = mkcodenode(v);
8671 }
8672     }
8673     break;
8674
8675
8676   
8677     case 347:
8678     if(as3_pass==2) {
8679
8680 /* Line 1464 of skeleton.m4  */
8681 #line 3589 "parser.y"
8682     {
8683     typedcode_t v1 = node_read((yyvsp[(1) - (3)].node));
8684     (yyval.value).c = v1.c;
8685     classinfo_t*t = v1.t;
8686     char is_static = 0;
8687     if(TYPE_IS_CLASS(t) && t->data) {
8688         t = t->data;
8689         is_static = 1;
8690     }
8691     if(TYPE_IS_XML(t)) {
8692         multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(3) - (3)].id)};
8693         (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
8694         (yyval.value).c = abc_coerce_a((yyval.value).c);
8695         (yyval.value).t = TYPE_XMLLIST;
8696     } else if(t) {
8697         if(t->subtype==INFOTYPE_UNRESOLVED) {
8698             syntaxerror("syntaxerror: trying to resolve property '%s' on incomplete object '%s'", (yyvsp[(3) - (3)].id), t->name);
8699         }
8700         memberinfo_t*f = findmember_nsset(t, (yyvsp[(3) - (3)].id), 1);
8701         char noslot = 0;
8702         if(f && !is_static != !(f->flags&FLAG_STATIC))
8703            noslot=1;
8704         if(f && f->slot && !noslot) {
8705             (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
8706         } else {
8707             if(!f) {
8708                 if(!TYPE_IS_XMLLIST(t)) {
8709                     as3_softwarning("Access of undefined property '%s' in %s", (yyvsp[(3) - (3)].id), t->name);
8710                 }
8711             }
8712             MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
8713             (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
8714         }
8715         /* determine type */
8716         (yyval.value).t = slotinfo_gettype((slotinfo_t*)f);
8717         if(!(yyval.value).t)
8718            (yyval.value).c = abc_coerce_a((yyval.value).c);
8719         
8720     } else if(v1.c && v1.c->opcode == OPCODE___PUSHPACKAGE__) {
8721         string_t*package = v1.c->data[0];
8722         char*package2 = concat3(package->str, ".", (yyvsp[(3) - (3)].id));
8723
8724         slotinfo_t*a = registry_find(package->str, (yyvsp[(3) - (3)].id));
8725         if(a) {
8726             (yyval.value) = push_class(a);
8727         } else if(dict_contains(state->import_toplevel_packages, package2) ||
8728                   registry_ispackage(package2)) {
8729             (yyval.value).c = v1.c;
8730             (yyval.value).c->data[0] = string_new4(package2);
8731             (yyval.value).t = 0;
8732         } else {
8733             syntaxerror("couldn't resolve %s", package2);
8734         }
8735     } else {
8736         /* when resolving a property on an unknown type, we do know the
8737            name of the property (and don't seem to need the package), but
8738            we need to make avm2 try out all access modes */
8739         as3_softwarning("Resolving %s on unknown type", (yyvsp[(3) - (3)].id));
8740         multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(3) - (3)].id)};
8741         (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
8742         (yyval.value).c = abc_coerce_a((yyval.value).c);
8743         (yyval.value).t = TYPE_ANY;
8744     }
8745 }
8746     }
8747     break;
8748
8749
8750   
8751     case 348:
8752     if(as3_pass==2) {
8753
8754 /* Line 1464 of skeleton.m4  */
8755 #line 3776 "parser.y"
8756     {
8757     PASS2 
8758     (yyval.node) = resolve_identifier((yyvsp[(1) - (1)].id));
8759 }
8760     }
8761     break;
8762
8763
8764   
8765     case 349:
8766     if(as3_pass==2) {
8767
8768 /* Line 1464 of skeleton.m4  */
8769 #line 3780 "parser.y"
8770     {
8771     PASS1
8772     /* Queue unresolved identifiers for checking against the parent
8773        function's variables.
8774        We consider everything which is not a local variable "unresolved".
8775        This encompasses class names, members of the surrounding class
8776        etc. which is *correct* because local variables of the parent function
8777        would shadow those.
8778        */
8779
8780     if(!find_variable(state, (yyvsp[(1) - (1)].id))) {
8781         unknown_variable((yyvsp[(1) - (1)].id));
8782         /* let the compiler know that it might want to check the current directory/package
8783            for this identifier- maybe there's a file $1.as defining $1. */
8784         as3_schedule_class_noerror(state->package, (yyvsp[(1) - (1)].id));
8785     }
8786    
8787     (yyval.node) = 0;
8788     PASS2
8789
8790     (yyval.node) = resolve_identifier((yyvsp[(1) - (1)].id));
8791 }
8792     }
8793     break;
8794
8795
8796   
8797     case 350:
8798     if(as3_pass==2) {
8799
8800 /* Line 1464 of skeleton.m4  */
8801 #line 3814 "parser.y"
8802     {
8803     PASS12
8804     NEW(namespace_decl_t,n);
8805     n->name = (yyvsp[(2) - (2)].id);
8806     n->url = (yyvsp[(2) - (2)].id);
8807     (yyval.namespace_decl)=n;
8808 }
8809     }
8810     break;
8811
8812
8813   
8814     case 351:
8815     if(as3_pass==2) {
8816
8817 /* Line 1464 of skeleton.m4  */
8818 #line 3821 "parser.y"
8819     {
8820     PASS12
8821     NEW(namespace_decl_t,n);
8822     n->name = (yyvsp[(2) - (4)].id);
8823     n->url = (yyvsp[(4) - (4)].id);
8824     (yyval.namespace_decl)=n;
8825 }
8826     }
8827     break;
8828
8829
8830   
8831     case 352:
8832     if(as3_pass==2) {
8833
8834 /* Line 1464 of skeleton.m4  */
8835 #line 3828 "parser.y"
8836     {
8837     PASS12
8838     NEW(namespace_decl_t,n);
8839     n->name = (yyvsp[(2) - (4)].id);
8840     n->url = (yyvsp[(4) - (4)].str).str;
8841     (yyval.namespace_decl)=n;
8842 }
8843     }
8844     break;
8845
8846
8847   
8848     case 353:
8849     if(as3_pass==2) {
8850
8851 /* Line 1464 of skeleton.m4  */
8852 #line 3835 "parser.y"
8853     {
8854     PASS12
8855     trie_put(active_namespaces, (unsigned char*)(yyvsp[(2) - (2)].namespace_decl)->name, (void*)(yyvsp[(2) - (2)].namespace_decl)->url);
8856
8857     namespace_t access = modifiers2access(&(yyvsp[(1) - (2)].flags));
8858     varinfo_t* var = varinfo_register_global(access.access, state->package, (yyvsp[(2) - (2)].namespace_decl)->name);
8859     var->type = TYPE_NAMESPACE;
8860     namespace_t ns;
8861     ns.access = ACCESS_NAMESPACE;
8862     ns.name = (yyvsp[(2) - (2)].namespace_decl)->url;
8863     var->value = constant_new_namespace(&ns);
8864       
8865     if(as3_pass==2) {
8866         MULTINAME(m, TYPE_NAMESPACE);
8867         trait_t*t = add_abc_slot(&(yyvsp[(1) - (2)].flags), (yyvsp[(2) - (2)].namespace_decl)->name, 0, 0);
8868         t->value = var->value;
8869         t->type_name = multiname_clone(&m);
8870     }
8871
8872     (yyval.code)=0;
8873 }
8874     }
8875     break;
8876
8877
8878   
8879     case 354:
8880     if(as3_pass==2) {
8881
8882 /* Line 1464 of skeleton.m4  */
8883 #line 3858 "parser.y"
8884     {
8885     as3_warning("default xml namespaces not supported yet");
8886     (yyval.code) = 0;
8887 }
8888     }
8889     break;
8890
8891
8892   
8893     case 355:
8894     if(as3_pass==2) {
8895
8896 /* Line 1464 of skeleton.m4  */
8897 #line 3863 "parser.y"
8898     {
8899     PASS12
8900     const char*url = (yyvsp[(3) - (3)].classinfo)->name;
8901
8902     varinfo_t*s = (varinfo_t*)(yyvsp[(3) - (3)].classinfo);
8903     if(s->kind == INFOTYPE_UNRESOLVED) {
8904         s = (varinfo_t*)registry_resolve((slotinfo_t*)s);
8905         if(!s)
8906             syntaxerror("Couldn't resolve namespace %s", (yyvsp[(3) - (3)].classinfo)->name);
8907     }
8908
8909     if(!s || s->kind != INFOTYPE_VAR)
8910         syntaxerror("%s.%s is not a public namespace (%d)", (yyvsp[(3) - (3)].classinfo)->package, (yyvsp[(3) - (3)].classinfo)->name, s?s->kind:-1);
8911     if(!s->value || !NS_TYPE(s->value->type))
8912         syntaxerror("%s.%s is not a namespace", (yyvsp[(3) - (3)].classinfo)->package, (yyvsp[(3) - (3)].classinfo)->name);
8913     url = s->value->ns->name;
8914
8915     trie_put(active_namespaces, (unsigned char*)(yyvsp[(3) - (3)].classinfo)->name, (void*)url);
8916     add_active_url(url);
8917     (yyval.code)=0;
8918 }
8919     }
8920     break;
8921
8922
8923
8924
8925 /* Line 1464 of skeleton.m4  */
8926 #line 8927 "parser.tab.c"
8927       default: break;
8928     }
8929   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
8930
8931   YYPOPSTACK (yylen);
8932   yylen = 0;
8933   YY_STACK_PRINT (yyss, yyssp);
8934
8935   *++yyvsp = yyval;
8936
8937   /* Now `shift' the result of the reduction.  Determine what state
8938      that goes to, based on the state we popped back to and the rule
8939      number reduced by.  */
8940
8941   yyn = yyr1[yyn];
8942
8943   yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
8944   if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
8945     yystate = yytable[yystate];
8946   else
8947     yystate = yydefgoto[yyn - YYNTOKENS];
8948
8949   goto yynewstate;
8950
8951
8952 /*------------------------------------.
8953 | yyerrlab -- here on detecting error |
8954 `------------------------------------*/
8955 yyerrlab:
8956   /* If not already recovering from an error, report this error.  */
8957   if (!yyerrstatus)
8958     {
8959       ++yynerrs;
8960 #if ! YYERROR_VERBOSE
8961       yyerror (YY_("syntax error"));
8962 #else
8963       {
8964         YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
8965         if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
8966           {
8967             YYSIZE_T yyalloc = 2 * yysize;
8968             if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
8969               yyalloc = YYSTACK_ALLOC_MAXIMUM;
8970             if (yymsg != yymsgbuf)
8971               YYSTACK_FREE (yymsg);
8972             yymsg = (char *) YYSTACK_ALLOC (yyalloc);
8973             if (yymsg)
8974               yymsg_alloc = yyalloc;
8975             else
8976               {
8977                 yymsg = yymsgbuf;
8978                 yymsg_alloc = sizeof yymsgbuf;
8979               }
8980           }
8981
8982         if (0 < yysize && yysize <= yymsg_alloc)
8983           {
8984             (void) yysyntax_error (yymsg, yystate, yychar);
8985             yyerror (yymsg);
8986           }
8987         else
8988           {
8989             yyerror (YY_("syntax error"));
8990             if (yysize != 0)
8991               goto yyexhaustedlab;
8992           }
8993       }
8994 #endif
8995     }
8996
8997
8998
8999   if (yyerrstatus == 3)
9000     {
9001       /* If just tried and failed to reuse lookahead token after an
9002          error, discard it.  */
9003
9004       if (yychar <= YYEOF)
9005         {
9006           /* Return failure if at end of input.  */
9007           if (yychar == YYEOF)
9008             YYABORT;
9009         }
9010       else
9011         {
9012           yydestruct ("Error: discarding",
9013                       yytoken, &yylval);
9014           yychar = YYEMPTY;
9015         }
9016     }
9017
9018   /* Else will try to reuse lookahead token after shifting the error
9019      token.  */
9020   goto yyerrlab1;
9021
9022
9023 /*---------------------------------------------------.
9024 | yyerrorlab -- error raised explicitly by YYERROR.  |
9025 `---------------------------------------------------*/
9026 yyerrorlab:
9027
9028   /* Pacify compilers like GCC when the user code never invokes
9029      YYERROR and the label yyerrorlab therefore never appears in user
9030      code.  */
9031   if (/*CONSTCOND*/ 0)
9032      goto yyerrorlab;
9033
9034   /* Do not reclaim the symbols of the rule which action triggered
9035      this YYERROR.  */
9036   YYPOPSTACK (yylen);
9037   yylen = 0;
9038   YY_STACK_PRINT (yyss, yyssp);
9039   yystate = *yyssp;
9040   goto yyerrlab1;
9041
9042
9043 /*-------------------------------------------------------------.
9044 | yyerrlab1 -- common code for both syntax error and YYERROR.  |
9045 `-------------------------------------------------------------*/
9046 yyerrlab1:
9047   yyerrstatus = 3;      /* Each real token shifted decrements this.  */
9048
9049   for (;;)
9050     {
9051       yyn = yypact[yystate];
9052       if (yyn != YYPACT_NINF)
9053         {
9054           yyn += YYTERROR;
9055           if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
9056             {
9057               yyn = yytable[yyn];
9058               if (0 < yyn)
9059                 break;
9060             }
9061         }
9062
9063       /* Pop the current state because it cannot handle the error token.  */
9064       if (yyssp == yyss)
9065         YYABORT;
9066
9067
9068       yydestruct ("Error: popping",
9069                   yystos[yystate], yyvsp);
9070       YYPOPSTACK (1);
9071       yystate = *yyssp;
9072       YY_STACK_PRINT (yyss, yyssp);
9073     }
9074
9075   *++yyvsp = yylval;
9076
9077
9078   /* Shift the error token.  */
9079   YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
9080
9081   yystate = yyn;
9082   goto yynewstate;
9083
9084
9085 /*-------------------------------------.
9086 | yyacceptlab -- YYACCEPT comes here.  |
9087 `-------------------------------------*/
9088 yyacceptlab:
9089   yyresult = 0;
9090   goto yyreturn;
9091
9092 /*-----------------------------------.
9093 | yyabortlab -- YYABORT comes here.  |
9094 `-----------------------------------*/
9095 yyabortlab:
9096   yyresult = 1;
9097   goto yyreturn;
9098
9099 #if !defined(yyoverflow) || YYERROR_VERBOSE
9100 /*-------------------------------------------------.
9101 | yyexhaustedlab -- memory exhaustion comes here.  |
9102 `-------------------------------------------------*/
9103 yyexhaustedlab:
9104   yyerror (YY_("memory exhausted"));
9105   yyresult = 2;
9106   /* Fall through.  */
9107 #endif
9108
9109 yyreturn:
9110   if (yychar != YYEMPTY)
9111      yydestruct ("Cleanup: discarding lookahead",
9112                  yytoken, &yylval);
9113   /* Do not reclaim the symbols of the rule which action triggered
9114      this YYABORT or YYACCEPT.  */
9115   YYPOPSTACK (yylen);
9116   YY_STACK_PRINT (yyss, yyssp);
9117   while (yyssp != yyss)
9118     {
9119       yydestruct ("Cleanup: popping",
9120                   yystos[*yyssp], yyvsp);
9121       YYPOPSTACK (1);
9122     }
9123 #ifndef yyoverflow
9124   if (yyss != yyssa)
9125     YYSTACK_FREE (yyss);
9126 #endif
9127 #if YYERROR_VERBOSE
9128   if (yymsg != yymsgbuf)
9129     YYSTACK_FREE (yymsg);
9130 #endif
9131   /* Make sure YYID is used.  */
9132   return YYID (yyresult);
9133 }
9134
9135
9136