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