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