autogenerated
[swftools.git] / lib / as3 / parser.tab.c
1
2 /* A Bison parser, made by GNU Bison 2.4.  */
3
4 /* Skeleton implementation for Bison's Yacc-like parsers in C
5    
6       Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
7    Free Software Foundation, Inc.
8    
9    This program is free software: you can redistribute it and/or modify
10    it under the terms of the GNU General Public License as published by
11    the Free Software Foundation, either version 3 of the License, or
12    (at your option) any later version.
13    
14    This program is distributed in the hope that it will be useful,
15    but WITHOUT ANY WARRANTY; without even the implied warranty of
16    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17    GNU General Public License for more details.
18    
19    You should have received a copy of the GNU General Public License
20    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
21
22 /* As a special exception, you may create a larger work that contains
23    part or all of the Bison parser skeleton and distribute that work
24    under terms of your choice, so long as that work isn't itself a
25    parser generator using the skeleton or a modified version thereof
26    as a parser skeleton.  Alternatively, if you modify or redistribute
27    the parser skeleton itself, you may (at your option) remove this
28    special exception, which will cause the skeleton and the resulting
29    Bison output files to be licensed under the GNU General Public
30    License without this special exception.
31    
32    This special exception was added by the Free Software Foundation in
33    version 2.2 of Bison.  */
34
35 /* C LALR(1) parser skeleton written by Richard Stallman, by
36    simplifying the original so-called "semantic" parser.  */
37
38 /* All symbols defined below should begin with yy or YY, to avoid
39    infringing on user name space.  This should be done even for local
40    variables, as they might otherwise be expanded by user macros.
41    There are some unavoidable exceptions within include files to
42    define necessary library symbols; they are noted "INFRINGES ON
43    USER NAME SPACE" below.  */
44
45 /* Identify Bison output.  */
46 #define YYBISON 1
47
48 /* Bison version.  */
49 #define YYBISON_VERSION "2.4"
50
51 /* Skeleton name.  */
52 #define YYSKELETON_NAME "./skeleton.m4"
53
54 /* Pure parsers.  */
55 #define YYPURE 0
56
57 /* Push parsers.  */
58 #define YYPUSH 0
59
60 /* Pull parsers.  */
61 #define YYPULL 1
62
63 /* Using locations.  */
64 #define YYLSP_NEEDED 0
65
66 /* Substitute the variable and function names.  */
67 #define yyparse         avm2_parse
68 #define yylex           avm2_lex
69 #define yyerror         avm2_error
70 #define yylval          avm2_lval
71 #define yychar          avm2_char
72 #define yydebug         avm2_debug
73 #define yynerrs         avm2_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 "tokenizer.h"
88 #include "registry.h"
89 #include "code.h"
90 #include "opcodes.h"
91
92
93
94 /* Line 198 of skeleton.m4  */
95 #line 96 "parser.tab.c"
96
97 /* Enabling traces.  */
98 #ifndef YYDEBUG
99 # define YYDEBUG 0
100 #endif
101
102 /* Enabling verbose error messages.  */
103 #ifdef YYERROR_VERBOSE
104 # undef YYERROR_VERBOSE
105 # define YYERROR_VERBOSE 1
106 #else
107 # define YYERROR_VERBOSE 1
108 #endif
109
110 /* Enabling the token table.  */
111 #ifndef YYTOKEN_TABLE
112 # define YYTOKEN_TABLE 0
113 #endif
114
115
116 /* Tokens.  */
117 #ifndef YYTOKENTYPE
118 # define YYTOKENTYPE
119    /* Put the tokens into the symbol table, so that GDB and other debuggers
120       know about them.  */
121    enum yytokentype {
122      T_IDENTIFIER = 258,
123      T_STRING = 259,
124      T_REGEXP = 260,
125      T_EMPTY = 261,
126      T_INT = 262,
127      T_UINT = 263,
128      T_BYTE = 264,
129      T_SHORT = 265,
130      T_FLOAT = 266,
131      T_FOR = 267,
132      T_WHILE = 268,
133      T_DO = 269,
134      T_SWITCH = 270,
135      KW_IMPLEMENTS = 271,
136      KW_NAMESPACE = 272,
137      KW_PACKAGE = 273,
138      KW_PROTECTED = 274,
139      KW_PUBLIC = 275,
140      KW_PRIVATE = 276,
141      KW_USE = 277,
142      KW_INTERNAL = 278,
143      KW_NEW = 279,
144      KW_NATIVE = 280,
145      KW_FUNCTION = 281,
146      KW_FINALLY = 282,
147      KW_UNDEFINED = 283,
148      KW_CONTINUE = 284,
149      KW_CLASS = 285,
150      KW_CONST = 286,
151      KW_CATCH = 287,
152      KW_CASE = 288,
153      KW_SET = 289,
154      KW_VOID = 290,
155      KW_THROW = 291,
156      KW_STATIC = 292,
157      KW_WITH = 293,
158      KW_INSTANCEOF = 294,
159      KW_IMPORT = 295,
160      KW_RETURN = 296,
161      KW_TYPEOF = 297,
162      KW_INTERFACE = 298,
163      KW_NULL = 299,
164      KW_VAR = 300,
165      KW_DYNAMIC = 301,
166      KW_OVERRIDE = 302,
167      KW_FINAL = 303,
168      KW_EACH = 304,
169      KW_GET = 305,
170      KW_TRY = 306,
171      KW_SUPER = 307,
172      KW_EXTENDS = 308,
173      KW_FALSE = 309,
174      KW_TRUE = 310,
175      KW_BOOLEAN = 311,
176      KW_UINT = 312,
177      KW_INT = 313,
178      KW_NUMBER = 314,
179      KW_STRING = 315,
180      KW_DEFAULT = 316,
181      KW_DELETE = 317,
182      KW_IF = 318,
183      KW_ELSE = 319,
184      KW_BREAK = 320,
185      KW_IS = 321,
186      KW_IN = 322,
187      KW_AS = 323,
188      T_EQEQ = 324,
189      T_EQEQEQ = 325,
190      T_NE = 326,
191      T_NEE = 327,
192      T_LE = 328,
193      T_GE = 329,
194      T_ORBY = 330,
195      T_DIVBY = 331,
196      T_MODBY = 332,
197      T_MULBY = 333,
198      T_PLUSBY = 334,
199      T_MINUSBY = 335,
200      T_SHRBY = 336,
201      T_SHLBY = 337,
202      T_USHRBY = 338,
203      T_OROR = 339,
204      T_ANDAND = 340,
205      T_COLONCOLON = 341,
206      T_MINUSMINUS = 342,
207      T_PLUSPLUS = 343,
208      T_DOTDOT = 344,
209      T_DOTDOTDOT = 345,
210      T_SHL = 346,
211      T_USHR = 347,
212      T_SHR = 348,
213      prec_none = 349,
214      below_semicolon = 350,
215      below_assignment = 351,
216      below_minus = 354,
217      minusminus_prefix = 355,
218      plusplus_prefix = 356,
219      below_curly = 357,
220      above_identifier = 358,
221      below_else = 359,
222      above_function = 360
223    };
224 #endif
225
226
227
228 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
229 typedef union 
230 /* Line 223 of skeleton.m4  */
231 #line 41 "parser.y"
232 tokenunion
233 {
234
235 /* Line 223 of skeleton.m4  */
236 #line 41 "parser.y"
237
238     enum yytokentype token;
239     int flags;
240
241     classinfo_t*classinfo;
242     classinfo_list_t*classinfo_list;
243
244     int number_int;
245     unsigned int number_uint;
246     double number_float;
247     code_t*code;
248     typedcode_t value;
249     //typedcode_list_t*value_list;
250     codeandnumber_t value_list;
251     param_t* param;
252     params_t params;
253     string_t str;
254     char*id;
255     constant_t*constant;
256     for_start_t for_start;
257     abc_exception_t *exception;
258     regexp_t regexp;
259     struct {
260         abc_exception_list_t *l;
261         code_t*finally;
262     } catch_list;
263
264
265
266 /* Line 223 of skeleton.m4  */
267 #line 268 "parser.tab.c"
268 } YYSTYPE;
269 # define YYSTYPE_IS_TRIVIAL 1
270 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
271 # define YYSTYPE_IS_DECLARED 1
272 #endif
273
274
275 /* Copy the second part of user declarations.  */
276
277 /* Line 273 of skeleton.m4  */
278 #line 251 "parser.y"
279
280
281 static int yyerror(char*s)
282 {
283    syntaxerror("%s", s); 
284    return 0; //make gcc happy
285 }
286
287 static char* concat2(const char* t1, const char* t2)
288 {
289     int l1 = strlen(t1);
290     int l2 = strlen(t2);
291     char*text = malloc(l1+l2+1);
292     memcpy(text   , t1, l1);
293     memcpy(text+l1, t2, l2);
294     text[l1+l2] = 0;
295     return text;
296 }
297 static char* concat3(const char* t1, const char* t2, const char* t3)
298 {
299     int l1 = strlen(t1);
300     int l2 = strlen(t2);
301     int l3 = strlen(t3);
302     char*text = malloc(l1+l2+l3+1);
303     memcpy(text   , t1, l1);
304     memcpy(text+l1, t2, l2);
305     memcpy(text+l1+l2, t3, l3);
306     text[l1+l2+l3] = 0;
307     return text;
308 }
309
310 typedef struct _import {
311     char*package;
312 } import_t;
313
314 DECLARE_LIST(import);
315
316 typedef struct _classstate {
317     /* class data */
318     classinfo_t*info;
319     abc_class_t*abc;
320     code_t*init;
321     code_t*static_init;
322     char has_constructor;
323 } classstate_t;
324
325 typedef struct _methodstate {
326     /* method data */
327     memberinfo_t*info;
328     char late_binding;
329     char is_constructor;
330     char has_super;
331     char is_global;
332     char inner;
333     abc_exception_list_t*exceptions;
334 } methodstate_t;
335
336 typedef struct _state {
337     struct _state*old;
338     int level;
339     
340     char*package;     
341     import_list_t*wildcard_imports;
342     dict_t*imports;
343     char has_own_imports;
344   
345     classstate_t*cls;   
346     methodstate_t*method;
347
348     char*exception_name;
349     
350     dict_t*vars;
351 } state_t;
352
353 typedef struct _global {
354     abc_file_t*file;
355     abc_script_t*init;
356
357     int variable_count;
358 } global_t;
359
360 static global_t*global = 0;
361 static state_t* state = 0;
362
363 DECLARE_LIST(state);
364
365 #define MULTINAME(m,x) \
366     multiname_t m;\
367     namespace_t m##_ns;\
368     registry_fill_multiname(&m, &m##_ns, x);
369                     
370 #define MEMBER_MULTINAME(m,f,n) \
371     multiname_t m;\
372     namespace_t m##_ns;\
373     if(f) { \
374         m##_ns = flags2namespace(f->flags, ""); \
375         m.type = QNAME; \
376         m.ns = &m##_ns; \
377         m.namespace_set = 0; \
378         m.name = f->name; \
379     } else { \
380         m.type = MULTINAME; \
381         m.ns =0; \
382         m.namespace_set = &nopackage_namespace_set; \
383         m.name = n; \
384     }
385
386 /* warning: list length of namespace set is undefined */
387 #define MULTINAME_LATE(m, access, package) \
388     namespace_t m##_ns = {access, package}; \
389     namespace_set_t m##_nsset; \
390     namespace_list_t m##_l;m##_l.next = 0; \
391     m##_nsset.namespaces = &m##_l; \
392     m##_nsset = m##_nsset; \
393     m##_l.namespace = &m##_ns; \
394     multiname_t m = {MULTINAMEL, 0, &m##_nsset, 0};
395
396 static namespace_t ns1 = {ACCESS_PRIVATE, ""};
397 static namespace_t ns2 = {ACCESS_PROTECTED, ""};
398 static namespace_t ns3 = {ACCESS_PACKAGEINTERNAL, ""};
399 static namespace_t ns4 = {ACCESS_PACKAGE, ""};
400 static namespace_list_t nl4 = {&ns4,0};
401 static namespace_list_t nl3 = {&ns3,&nl4};
402 static namespace_list_t nl2 = {&ns2,&nl3};
403 static namespace_list_t nl1 = {&ns1,&nl2};
404 static namespace_set_t nopackage_namespace_set = {&nl1};
405
406 static void new_state()
407 {
408     NEW(state_t, s);
409     state_t*oldstate = state;
410     if(state)
411         memcpy(s, state, sizeof(state_t)); //shallow copy
412     if(!s->imports) {
413         s->imports = dict_new();
414     }
415     state = s;
416     state->level++;
417     state->has_own_imports = 0;    
418     state->vars = dict_new(); 
419     state->old = oldstate;
420 }
421 static void state_has_imports()
422 {
423     state->wildcard_imports = list_clone(state->wildcard_imports);
424     state->imports = dict_clone(state->imports);
425     state->has_own_imports = 1;
426 }
427
428 static void state_destroy(state_t*state)
429 {
430     if(state->has_own_imports) {
431         list_free(state->wildcard_imports);
432         dict_destroy(state->imports);state->imports=0;
433     }
434     if(state->imports && (!state->old || state->old->imports!=state->imports)) {
435         dict_destroy(state->imports);state->imports=0;
436     }
437     if(state->vars) {
438         int t;
439         for(t=0;t<state->vars->hashsize;t++) {
440             dictentry_t*e =state->vars->slots[t];
441             while(e) {
442                 free(e->data);e->data=0;
443                 e = e->next;
444             }
445         }
446         dict_destroy(state->vars);state->vars=0;
447     }
448     
449     free(state);
450 }
451
452 static void old_state()
453 {
454     if(!state || !state->old)
455         syntaxerror("invalid nesting");
456     state_t*leaving = state;
457     
458     state = state->old;
459     
460     if(leaving->method && leaving->method != state->method) {
461         free(leaving->method);
462         leaving->method=0;
463     }
464     if(leaving->cls && leaving->cls != state->cls) {
465         free(leaving->cls);
466         leaving->cls=0;
467     }
468     
469     state_destroy(leaving);
470 }
471
472 void initialize_parser()
473 {
474     global = rfx_calloc(sizeof(global_t));
475     global->file = abc_file_new();
476     global->file->flags &= ~ABCFILE_LAZY;
477     global->variable_count = 1;
478     global->init = abc_initscript(global->file);
479     code_t*c = global->init->method->body->code;
480     c = abc_getlocal_0(c);
481     c = abc_pushscope(c);
482     /*c = abc_findpropstrict(c, "[package]::trace");
483     c = abc_pushstring(c, "[entering global init function]");
484     c = abc_callpropvoid(c, "[package]::trace", 1);*/
485     global->init->method->body->code = c;
486 }
487
488 void initialize_file(char*filename)
489 {
490     new_state();
491     state->package = filename;
492     // needed for state->method->late_binding:
493     state->method = rfx_calloc(sizeof(methodstate_t));
494 }
495 void finish_file()
496 {
497     if(!state || state->level!=1) {
498         syntaxerror("unexpected end of file");
499     }
500     state_destroy(state);state=0;
501 }
502
503 void* finish_parser()
504 {
505     code_t*c = global->init->method->body->code;
506     /*c = abc_findpropstrict(c, "[package]::trace");
507       c = abc_pushstring(c, "[leaving global init function]");
508       c = abc_callpropvoid(c, "[package]::trace", 1);*/
509     c = abc_returnvoid(c);
510     global->init->method->body->code = c;
511     return global->file;
512 }
513
514
515 static void xx_scopetest() 
516 {
517     /* findpropstrict doesn't just return a scope object- it
518        also makes it "active" somehow. Push local_0 on the
519        scope stack and read it back with findpropstrict, it'll
520        contain properties like "trace". Trying to find the same
521        property on a "vanilla" local_0 yields only a "undefined" */
522     //c = abc_findpropstrict(c, "[package]::trace");
523     
524     /*c = abc_getlocal_0(c);
525     c = abc_findpropstrict(c, "[package]::trace");
526     c = abc_coerce_a(c);
527     c = abc_setlocal_1(c);
528
529     c = abc_pushbyte(c, 0);
530     c = abc_setlocal_2(c);
531    
532     code_t*xx = c = abc_label(c);
533     c = abc_findpropstrict(c, "[package]::trace");
534     c = abc_pushstring(c, "prop:");
535     c = abc_hasnext2(c, 1, 2);
536     c = abc_dup(c);
537     c = abc_setlocal_3(c);
538     c = abc_callpropvoid(c, "[package]::trace", 2);
539     c = abc_getlocal_3(c);
540     c = abc_kill(c, 3);
541     c = abc_iftrue(c,xx);*/
542 }
543
544
545 typedef struct _variable {
546     int index;
547     classinfo_t*type;
548     char init;
549 } variable_t;
550
551 static variable_t* find_variable(char*name)
552 {
553     state_t* s = state;
554     while(s) {
555         variable_t*v = 0;
556         if(s->method)
557             v = dict_lookup(s->vars, name);
558         if(v) {
559             return v;
560         }
561         s = s->old;
562     }
563     return 0;
564
565 static variable_t* find_variable_safe(char*name)
566 {
567     variable_t* v = find_variable(name);
568     if(!v)
569         syntaxerror("undefined variable: %s", name);
570     return v;
571 }
572 static char variable_exists(char*name) 
573 {
574     return dict_lookup(state->vars, name)!=0;
575 }
576 code_t*defaultvalue(code_t*c, classinfo_t*type);
577 static int new_variable(char*name, classinfo_t*type, char init)
578 {
579     NEW(variable_t, v);
580     v->index = global->variable_count;
581     v->type = type;
582     v->init = init;
583     
584     dict_put(state->vars, name, v);
585
586     return global->variable_count++;
587 }
588 #define TEMPVARNAME "__as3_temp__"
589 static int gettempvar()
590 {
591     variable_t*v = find_variable(TEMPVARNAME);
592     if(v) 
593         return v->index;
594     return new_variable(TEMPVARNAME, 0, 0);
595 }
596
597 code_t* var_block(code_t*body) 
598 {
599     code_t*c = 0;
600     code_t*k = 0;
601     int t;
602     int num=0;
603     for(t=0;t<state->vars->hashsize;t++) {
604         dictentry_t*e = state->vars->slots[t];
605         while(e) {
606             variable_t*v = (variable_t*)e->data;
607             if(v->type && v->init) {
608                 c = defaultvalue(c, v->type);
609                 c = abc_setlocal(c, v->index);
610                 k = abc_kill(k, v->index); 
611                 num++;
612             }
613             e = e->next;
614         }
615     }
616
617     if(k) {
618         code_t*x = body;
619         while(x) {
620             if(x->opcode== OPCODE___BREAK__ ||
621                x->opcode== OPCODE___CONTINUE__) {
622                /* link kill code before break/continue */
623                 code_t*e = code_dup(k);
624                 code_t*s = code_start(e);
625                 s->prev = x->prev;
626                 if(x->prev) {
627                     x->prev->next = s;
628                 }
629                 e->next = x;
630                 x->prev = e;
631             }
632             x = x->prev;
633         }
634     }
635     
636     c = code_append(c, body);
637     c = code_append(c, k);
638     return c;
639 }
640
641 static code_t* wrap_function(code_t*c,code_t*header, code_t*body)
642 {
643     c = code_append(c, header);
644     c = code_append(c, var_block(body));
645     /* append return if necessary */
646     if(!c || (c->opcode != OPCODE_RETURNVOID && 
647               c->opcode != OPCODE_RETURNVALUE)) {
648         c = abc_returnvoid(c);
649     }
650     return c;
651 }
652
653
654 static void startpackage(char*name)
655 {
656     new_state();
657     /*printf("entering package \"%s\"\n", name);*/
658     state->package = strdup(name);
659     global->variable_count = 1;
660 }
661 static void endpackage()
662 {
663     /*printf("leaving package \"%s\"\n", state->package);*/
664
665     //used e.g. in classinfo_register:
666     //free(state->package);state->package=0;
667
668     old_state();
669 }
670
671 void parserassert(int b)
672 {
673     if(!b) syntaxerror("internal error: assertion failed");
674 }
675
676
677 char*as3_globalclass=0;
678 static void startclass(int flags, char*classname, classinfo_t*extends, classinfo_list_t*implements, char interface)
679 {
680     if(state->cls) {
681         syntaxerror("inner classes now allowed"); 
682     }
683     new_state();
684     global->variable_count = 1;
685     state->cls = rfx_calloc(sizeof(classstate_t));
686     state->method = rfx_calloc(sizeof(methodstate_t)); // method state, for static constructor
687
688     token_list_t*t=0;
689     classinfo_list_t*mlist=0;
690
691     if(flags&~(FLAG_PACKAGEINTERNAL|FLAG_PUBLIC|FLAG_FINAL|FLAG_DYNAMIC))
692         syntaxerror("invalid modifier(s)");
693
694     if((flags&(FLAG_PUBLIC|FLAG_PACKAGEINTERNAL)) == (FLAG_PUBLIC|FLAG_PACKAGEINTERNAL))
695         syntaxerror("public and internal not supported at the same time.");
696
697     /* create the class name, together with the proper attributes */
698     int access=0;
699     char*package=0;
700
701     if(!(flags&FLAG_PUBLIC) && !state->package) {
702         access = ACCESS_PRIVATE; package = current_filename;
703     } else if(!(flags&FLAG_PUBLIC) && state->package) {
704         access = ACCESS_PACKAGEINTERNAL; package = state->package;
705     } else if(state->package) {
706         access = ACCESS_PACKAGE; package = state->package;
707     } else {
708         syntaxerror("public classes only allowed inside a package");
709     }
710
711     if(as3_pass==1) {
712         if(registry_findclass(package, classname)) {
713             syntaxerror("Package \"%s\" already contains a class called \"%s\"", package, classname);
714         }
715         /* build info struct */
716         int num_interfaces = (list_length(implements));
717         state->cls->info = classinfo_register(access, package, classname, num_interfaces);
718     }
719     
720     if(as3_pass == 2) {
721         state->cls->info = registry_findclass(package, classname);
722         parserassert((int)state->cls->info);
723
724         /* fill out interfaces and extends (we couldn't resolve those during the first pass) */
725         state->cls->info->superclass = extends?extends:TYPE_OBJECT;
726         int pos = 0;
727         classinfo_list_t*l = implements;
728         for(l=implements;l;l=l->next) {
729             state->cls->info->interfaces[pos++] = l->classinfo;
730         }
731
732         /* generate the abc code for this class */
733         MULTINAME(classname2,state->cls->info);
734         multiname_t*extends2 = sig2mname(extends);
735
736         state->cls->abc = abc_class_new(global->file, &classname2, extends2);
737         if(flags&FLAG_FINAL) abc_class_final(state->cls->abc);
738         if(!(flags&FLAG_DYNAMIC)) abc_class_sealed(state->cls->abc);
739         if(interface) {
740             state->cls->info->flags |= CLASS_INTERFACE;
741             abc_class_interface(state->cls->abc);
742         }
743
744         abc_class_protectedNS(state->cls->abc, classname);
745
746         for(mlist=implements;mlist;mlist=mlist->next) {
747             MULTINAME(m, mlist->classinfo);
748             abc_class_add_interface(state->cls->abc, &m);
749         }
750
751         /* write the construction code for this class to the global init
752            function */
753         int slotindex = abc_initscript_addClassTrait(global->init, &classname2, state->cls->abc);
754
755         abc_method_body_t*m = global->init->method->body;
756         __ getglobalscope(m);
757         classinfo_t*s = extends;
758
759         int count=0;
760         
761         while(s) {
762             //TODO: take a look at the current scope stack, maybe 
763             //      we can re-use something
764             s = s->superclass;
765             if(!s) 
766             break;
767            
768             multiname_t*s2 = sig2mname(s);
769             __ getlex2(m, s2);
770             multiname_destroy(s2);
771
772             __ pushscope(m); count++;
773             m->code = m->code->prev->prev; // invert
774         }
775         /* continue appending after last op end */
776         while(m->code && m->code->next) m->code = m->code->next; 
777
778         /* TODO: if this is one of *our* classes, we can also 
779                  do a getglobalscope/getslot <nr> (which references
780                  the init function's slots) */
781         if(extends2) {
782             __ getlex2(m, extends2);
783             __ dup(m);
784             /* notice: we get a Verify Error #1107 if the top elemnt on the scope
785                stack is not the superclass */
786             __ pushscope(m);count++;
787         } else {
788             __ pushnull(m);
789             /* notice: we get a verify error #1107 if the top element on the scope 
790                stack is not the global object */
791             __ getlocal_0(m);
792             __ pushscope(m);count++;
793         }
794         __ newclass(m,state->cls->abc);
795         while(count--) {
796             __ popscope(m);
797         }
798         __ setslot(m, slotindex);
799         multiname_destroy(extends2);
800
801         /* flash.display.MovieClip handling */
802
803         if(!as3_globalclass && (flags&FLAG_PUBLIC) && classinfo_equals(registry_getMovieClip(),extends)) {
804             if(state->package && state->package[0]) {
805                 as3_globalclass = concat3(state->package, ".", classname);
806             } else {
807                 as3_globalclass = strdup(classname);
808             }
809         }
810     }
811 }
812
813 static void endclass()
814 {
815     if(as3_pass == 2) {
816         if(!state->cls->has_constructor && !(state->cls->info->flags&CLASS_INTERFACE)) {
817             code_t*c = 0;
818             c = abc_getlocal_0(c);
819             c = abc_constructsuper(c, 0);
820             state->cls->init = code_append(state->cls->init, c);
821         }
822         if(!state->method->late_binding) {
823             // class initialization code uses late binding
824             code_t*c = 0;
825             c = abc_getlocal_0(c);
826             c = abc_pushscope(c);
827             state->cls->static_init = code_append(c, state->cls->static_init);
828         }
829
830         if(state->cls->init) {
831             abc_method_t*m = abc_class_getconstructor(state->cls->abc, 0);
832             m->body->code = wrap_function(0, state->cls->init, m->body->code);
833         }
834         if(state->cls->static_init) {
835             abc_method_t*m = abc_class_getstaticconstructor(state->cls->abc, 0);
836             m->body->code = wrap_function(0, state->cls->static_init, m->body->code);
837         }
838     }
839
840     old_state();
841 }
842
843 void check_code_for_break(code_t*c)
844 {
845     while(c) {
846         if(c->opcode == OPCODE___BREAK__) {
847             char*name = string_cstr(c->data[0]);
848             syntaxerror("Unresolved \"break %s\"", name);
849         }
850         if(c->opcode == OPCODE___CONTINUE__) {
851             char*name = string_cstr(c->data[0]);
852             syntaxerror("Unresolved \"continue %s\"", name);
853         }
854         c=c->prev;
855     }
856 }
857
858
859 static void check_constant_against_type(classinfo_t*t, constant_t*c)
860 {
861 #define xassert(b) if(!(b)) syntaxerror("Invalid default value %s for type '%s'", constant_tostring(c), t->name)
862    if(TYPE_IS_NUMBER(t)) {
863         xassert(c->type == CONSTANT_FLOAT
864              || c->type == CONSTANT_INT
865              || c->type == CONSTANT_UINT);
866    } else if(TYPE_IS_UINT(t)) {
867         xassert(c->type == CONSTANT_UINT ||
868                (c->type == CONSTANT_INT && c->i>0));
869    } else if(TYPE_IS_INT(t)) {
870         xassert(c->type == CONSTANT_INT);
871    } else if(TYPE_IS_BOOLEAN(t)) {
872         xassert(c->type == CONSTANT_TRUE
873              || c->type == CONSTANT_FALSE);
874    }
875 }
876
877
878 static int flags2access(int flags)
879 {
880     int access = 0;
881     if(flags&FLAG_PUBLIC)  {
882         if(access&(FLAG_PRIVATE|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL)) 
883             syntaxerror("invalid combination of access levels");
884         access = ACCESS_PACKAGE;
885     } else if(flags&FLAG_PRIVATE) {
886         if(access&(FLAG_PUBLIC|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL)) 
887             syntaxerror("invalid combination of access levels");
888         access = ACCESS_PRIVATE;
889     } else if(flags&FLAG_PROTECTED) {
890         if(access&(FLAG_PUBLIC|FLAG_PRIVATE|FLAG_PACKAGEINTERNAL)) 
891             syntaxerror("invalid combination of access levels");
892         access = ACCESS_PROTECTED;
893     } else {
894         access = ACCESS_PACKAGEINTERNAL;
895     }
896     return access;
897 }
898
899
900 static memberinfo_t*registerfunction(enum yytokentype getset, int flags, char*name, params_t*params, classinfo_t*return_type, int slot)
901 {
902     memberinfo_t*minfo = 0;
903     if(!state->cls) {
904         //package method
905         minfo = memberinfo_register_global(flags2access(flags), state->package, name, MEMBER_METHOD);
906         minfo->return_type = return_type;
907     } else if(getset != KW_GET && getset != KW_SET) {
908         //class method
909         if((minfo = registry_findmember(state->cls->info, name, 0))) {
910             if(minfo->parent == state->cls->info) {
911                 syntaxerror("class already contains a member/method called '%s'", name);
912             } else if(!minfo->parent) {
913                 syntaxerror("internal error: overriding method %s, which doesn't have parent", name);
914             } else {
915                 if(!(minfo->flags&(FLAG_STATIC|FLAG_PRIVATE)))
916                     syntaxerror("function %s already exists in superclass. Did you forget the 'override' keyword?");
917             }
918         }
919         minfo = memberinfo_register(state->cls->info, name, MEMBER_METHOD);
920         minfo->return_type = return_type;
921         // getslot on a member slot only returns "undefined", so no need
922         // to actually store these
923         //state->minfo->slot = state->method->abc->method->trait->slot_id;
924     } else {
925         //class getter/setter
926         int gs = getset==KW_GET?MEMBER_GET:MEMBER_SET;
927         classinfo_t*type=0;
928         if(getset == KW_GET)
929             type = return_type;
930         else if(params->list)
931             type = params->list->param->type;
932         // not sure wether to look into superclasses here, too
933         if((minfo=registry_findmember(state->cls->info, name, 0))) {
934             if(minfo->kind & ~(MEMBER_GET|MEMBER_SET))
935                 syntaxerror("class already contains a member or method called '%s'", name);
936             if(minfo->kind & gs)
937                 syntaxerror("getter/setter for '%s' already defined", name);
938             /* make a setter or getter into a getset */
939             minfo->kind |= gs;
940             if(!minfo->type) 
941                 minfo->type = type;
942             else
943                 if(type && minfo->type != type)
944                     syntaxerror("different type in getter and setter");
945         } else {
946             minfo = memberinfo_register(state->cls->info, name, gs);
947             minfo->type = type;
948         }
949         /* can't assign a slot as getter and setter might have different slots */
950         //minfo->slot = slot;
951     }
952     if(flags&FLAG_STATIC) minfo->flags |= FLAG_STATIC;
953     if(flags&FLAG_PUBLIC) minfo->flags |= FLAG_PUBLIC;
954     if(flags&FLAG_PRIVATE) minfo->flags |= FLAG_PRIVATE;
955     if(flags&FLAG_PROTECTED) minfo->flags |= FLAG_PROTECTED;
956     if(flags&FLAG_PACKAGEINTERNAL) minfo->flags |= FLAG_PACKAGEINTERNAL;
957     if(flags&FLAG_OVERRIDE) minfo->flags |= FLAG_OVERRIDE;
958     return minfo;
959 }
960
961 static void innerfunction(char*name, params_t*params, classinfo_t*return_type)
962 {
963     parserassert(state->method && state->method->info);
964     memberinfo_t*parent_method = state->method->info;
965
966     if(as3_pass==1) {
967         // not valid yet
968         params = 0;
969         return_type = 0;
970     }
971
972     new_state();
973     state->method = rfx_calloc(sizeof(methodstate_t));
974     state->method->inner = 1;
975     
976     NEW(memberinfo_t,minfo);
977     minfo->return_type = return_type;
978     minfo->name = name;
979
980     if(!parent_method->subfunctions) 
981         parent_method->subfunctions = dict_new();
982
983     dict_put(parent_method->subfunctions, name, minfo);
984     state->method->info = minfo;
985 }
986
987 static void startfunction(token_t*ns, int flags, enum yytokentype getset, char*name,
988                           params_t*params, classinfo_t*return_type)
989 {
990     if(state->method && state->method->info) {
991         syntaxerror("not able to start another method scope");
992     }
993     new_state();
994     state->method = rfx_calloc(sizeof(methodstate_t));
995     state->method->has_super = 0;
996
997     if(state->cls) {
998         state->method->is_constructor = !strcmp(state->cls->info->name,name);
999         state->cls->has_constructor |= state->method->is_constructor;
1000     } else {
1001         state->method->is_global = 1;
1002         state->method->late_binding = 1; // for global methods, always push local_0 on the scope stack
1003     }
1004     if(state->method->is_constructor)
1005         name = "__as3_constructor__";
1006
1007     if(as3_pass == 1) {
1008         return_type = 0;
1009         state->method->info = registerfunction(getset, flags, name, params, return_type, 0);
1010     }
1011
1012     if(as3_pass == 2) {
1013         /* retrieve the member info that we stored in the first pass.
1014            TODO: better getter/setter support? */
1015         if(!state->cls) state->method->info = registry_findclass(state->package, name)->function;
1016         else            state->method->info = registry_findmember(state->cls->info, name, 0);
1017         state->method->info->return_type = return_type;
1018
1019         global->variable_count = 0;
1020         /* state->vars is initialized by state_new */
1021         if(!state->method->is_global)
1022             new_variable((flags&FLAG_STATIC)?"class":"this", state->cls->info, 0);
1023         else
1024             new_variable("globalscope", 0, 0);
1025         param_list_t*p=0;
1026         for(p=params->list;p;p=p->next) {
1027             new_variable(p->param->name, p->param->type, 0);
1028         }
1029     } 
1030 }
1031
1032 static abc_method_t* endfunction(token_t*ns, int flags, enum yytokentype getset, char*name,
1033                           params_t*params, classinfo_t*return_type, code_t*body)
1034 {
1035     if(as3_pass==1) {
1036         old_state();
1037         return 0;
1038     }
1039
1040     abc_method_t*f = 0;
1041
1042     multiname_t*type2 = sig2mname(return_type);
1043     int slot = 0;
1044     if(state->method->inner) {
1045         f = abc_method_new(global->file, type2, 1);
1046         //trait_t*t = trait_new_method(&global->init->traits, 0, f);
1047     } else if(state->method->is_constructor) {
1048         f = abc_class_getconstructor(state->cls->abc, type2);
1049     } else if(!state->method->is_global) {
1050         namespace_t mname_ns = flags2namespace(flags, "");
1051         multiname_t mname = {QNAME, &mname_ns, 0, name};
1052
1053         if(flags&FLAG_STATIC)
1054             f = abc_class_staticmethod(state->cls->abc, type2, &mname);
1055         else
1056             f = abc_class_method(state->cls->abc, type2, &mname);
1057         slot = f->trait->slot_id;
1058     } else {
1059         namespace_t mname_ns = flags2namespace(flags, state->package);
1060         multiname_t mname = {QNAME, &mname_ns, 0, name};
1061
1062         f = abc_method_new(global->file, type2, 1);
1063         trait_t*t = trait_new_method(&global->init->traits, multiname_clone(&mname), f);
1064         //abc_code_t*c = global->init->method->body->code;
1065     }
1066     //flash doesn't seem to allow us to access function slots
1067     //state->method->info->slot = slot;
1068
1069     if(flags&FLAG_OVERRIDE) f->trait->attributes |= TRAIT_ATTR_OVERRIDE;
1070     if(getset == KW_GET) f->trait->kind = TRAIT_GETTER;
1071     if(getset == KW_SET) f->trait->kind = TRAIT_SETTER;
1072     if(params->varargs) f->flags |= METHOD_NEED_REST;
1073
1074     char opt=0;
1075     param_list_t*p=0;
1076     for(p=params->list;p;p=p->next) {
1077         if(params->varargs && !p->next) {
1078             break; //varargs: omit last parameter in function signature
1079         }
1080         multiname_t*m = sig2mname(p->param->type);
1081         list_append(f->parameters, m);
1082         if(p->param->value) {
1083             check_constant_against_type(p->param->type, p->param->value);
1084             opt=1;list_append(f->optional_parameters, p->param->value);
1085         } else if(opt) {
1086             syntaxerror("non-optional parameter not allowed after optional parameters");
1087         }
1088     }
1089     check_code_for_break(body);
1090
1091     if(f->body) {
1092         f->body->code = body;
1093         f->body->exceptions = state->method->exceptions;
1094     } else { //interface
1095         if(body)
1096             syntaxerror("interface methods can't have a method body");
1097     }
1098        
1099     old_state();
1100     return f;
1101 }
1102
1103 char is_subtype_of(classinfo_t*type, classinfo_t*supertype)
1104 {
1105     return 1; // FIXME
1106 }
1107
1108 void breakjumpsto(code_t*c, char*name, code_t*jump) 
1109 {
1110     while(c) {
1111         if(c->opcode == OPCODE___BREAK__) {
1112             string_t*name2 = c->data[0];
1113             if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1114                 c->opcode = OPCODE_JUMP;
1115                 c->branch = jump;
1116             }
1117         }
1118         c=c->prev;
1119     }
1120 }
1121 void continuejumpsto(code_t*c, char*name, code_t*jump) 
1122 {
1123     while(c) {
1124         if(c->opcode == OPCODE___CONTINUE__) {
1125             string_t*name2 = c->data[0];
1126             if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1127                 c->opcode = OPCODE_JUMP;
1128                 c->branch = jump;
1129             }
1130         }
1131         c = c->prev;
1132     }
1133 }
1134
1135 #define IS_INT(a) (TYPE_IS_INT((a)) || TYPE_IS_UINT((a)))
1136 #define IS_NUMBER_OR_INT(a) (TYPE_IS_INT((a)) || TYPE_IS_UINT((a)) || TYPE_IS_NUMBER((a)))
1137 #define BOTH_INT(a,b) (IS_INT(a) && IS_INT(b))
1138
1139 classinfo_t*join_types(classinfo_t*type1, classinfo_t*type2, char op)
1140 {
1141     if(!type1 || !type2) 
1142         return registry_getanytype();
1143     if(TYPE_IS_ANY(type1) || TYPE_IS_ANY(type2))
1144         return registry_getanytype();
1145
1146     if(op=='+') {
1147         if(IS_NUMBER_OR_INT(type1) && IS_NUMBER_OR_INT(type2)) {
1148             return TYPE_NUMBER;
1149         } else {
1150             return TYPE_ANY;
1151         }
1152     }
1153
1154     if(type1 == type2)
1155         return type1;
1156     return registry_getanytype();
1157 }
1158 code_t*converttype(code_t*c, classinfo_t*from, classinfo_t*to)
1159 {
1160     if(from==to)
1161         return c;
1162     if(!to) {
1163         return abc_coerce_a(c);
1164     }
1165     MULTINAME(m, to);
1166     if(!from) {
1167         // cast an "any" type to a specific type. subject to
1168         // runtime exceptions
1169         return abc_coerce2(c, &m);
1170     }
1171     
1172     if((TYPE_IS_NUMBER(from) || TYPE_IS_UINT(from) || TYPE_IS_INT(from)) &&
1173        (TYPE_IS_NUMBER(to) || TYPE_IS_UINT(to) || TYPE_IS_INT(to))) {
1174         // allow conversion between number types
1175         return abc_coerce2(c, &m);
1176     }
1177     //printf("%s.%s\n", from.package, from.name);
1178     //printf("%s.%s\n", to.package, to.name);
1179
1180     classinfo_t*supertype = from;
1181     while(supertype) {
1182         if(supertype == to) {
1183              // target type is one of from's superclasses
1184              return abc_coerce2(c, &m);
1185         }
1186         int t=0;
1187         while(supertype->interfaces[t]) {
1188             if(supertype->interfaces[t]==to) {
1189                 // target type is one of from's interfaces
1190                 return abc_coerce2(c, &m);
1191             }
1192             t++;
1193         }
1194         supertype = supertype->superclass;
1195     }
1196     if(TYPE_IS_FUNCTION(from) && TYPE_IS_FUNCTION(to))
1197         return c;
1198     if(TYPE_IS_CLASS(from) && TYPE_IS_CLASS(to))
1199         return c;
1200     syntaxerror("can't convert type %s to %s", from->name, to->name);
1201     return 0; // make gcc happy
1202 }
1203
1204 code_t*defaultvalue(code_t*c, classinfo_t*type)
1205 {
1206     if(TYPE_IS_INT(type)) {
1207        c = abc_pushbyte(c, 0);
1208     } else if(TYPE_IS_UINT(type)) {
1209        c = abc_pushuint(c, 0);
1210     } else if(TYPE_IS_FLOAT(type)) {
1211        c = abc_pushnan(c);
1212     } else if(TYPE_IS_BOOLEAN(type)) {
1213        c = abc_pushfalse(c);
1214     } else if(!type) {
1215        //c = abc_pushundefined(c);
1216     } else {
1217        c = abc_pushnull(c);
1218        MULTINAME(m, type);
1219        c = abc_coerce2(c, &m);
1220     }
1221     return c;
1222 }
1223
1224 char is_pushundefined(code_t*c)
1225 {
1226     return (c && !c->prev && !c->next && c->opcode == OPCODE_PUSHUNDEFINED);
1227 }
1228
1229 static classinfo_t* find_class(char*name)
1230 {
1231     classinfo_t*c=0;
1232
1233     c = registry_findclass(state->package, name);
1234     if(c) return c;
1235
1236     /* try explicit imports */
1237     dictentry_t* e = dict_get_slot(state->imports, name);
1238     if(c) return c;
1239     while(e) {
1240         if(!strcmp(e->key, name)) {
1241             c = (classinfo_t*)e->data;
1242             if(c) return c;
1243         }
1244         e = e->next;
1245     }
1246
1247     /* try package.* imports */
1248     import_list_t*l = state->wildcard_imports;
1249     while(l) {
1250         //printf("does package %s contain a class %s?\n", l->import->package, name);
1251         c = registry_findclass(l->import->package, name);
1252         if(c) return c;
1253         l = l->next;
1254     }
1255
1256     /* try global package */
1257     c = registry_findclass("", name);
1258     if(c) return c;
1259    
1260     /* try local "filename" package */
1261     c = registry_findclass(current_filename_short, name);
1262     if(c) return c;
1263
1264     return 0;
1265 }
1266
1267 static char is_getlocal(code_t*c)
1268 {
1269     if(!c || c->prev || c->next)
1270         return 0;
1271     return(c->opcode == OPCODE_GETLOCAL
1272         || c->opcode == OPCODE_GETLOCAL_0
1273         || c->opcode == OPCODE_GETLOCAL_1
1274         || c->opcode == OPCODE_GETLOCAL_2
1275         || c->opcode == OPCODE_GETLOCAL_3);
1276 }
1277 static int getlocalnr(code_t*c)
1278 {
1279     if(c->opcode == OPCODE_GETLOCAL) {return (ptroff_t)c->data[0];}
1280     else if(c->opcode == OPCODE_GETLOCAL_0) {return 0;}
1281     else if(c->opcode == OPCODE_GETLOCAL_1) {return 1;}
1282     else if(c->opcode == OPCODE_GETLOCAL_2) {return 2;}
1283     else if(c->opcode == OPCODE_GETLOCAL_3) {return 3;}
1284     else syntaxerror("Internal error: opcode %02x is not a getlocal call", c->opcode);
1285     return 0;
1286 }
1287
1288 static code_t* toreadwrite(code_t*in, code_t*middlepart, char justassign, char readbefore)
1289 {
1290     /* converts this:
1291
1292        [prefix code] [read instruction]
1293
1294        to this:
1295
1296        [prefix code] ([dup]) [read instruction] [middlepart] [setvar] [write instruction] [getvar]
1297     */
1298     
1299     if(in && in->opcode == OPCODE_COERCE_A) {
1300         in = code_cutlast(in);
1301     }
1302     if(in->next)
1303         syntaxerror("internal error");
1304
1305     /* chop off read instruction */
1306     code_t*prefix = in;
1307     code_t*r = in;
1308     if(r->prev) {
1309         prefix = r->prev;r->prev = 0;
1310         prefix->next=0;
1311     } else {
1312         prefix = 0;
1313     }
1314
1315     char use_temp_var = readbefore;
1316
1317     /* generate the write instruction, and maybe append a dup to the prefix code */
1318     code_t* write = abc_nop(0);
1319     if(r->opcode == OPCODE_GETPROPERTY) {
1320         write->opcode = OPCODE_SETPROPERTY;
1321         multiname_t*m = (multiname_t*)r->data[0];
1322         write->data[0] = multiname_clone(m);
1323         if(m->type == QNAME || m->type == MULTINAME) {
1324             if(!justassign) {
1325                 prefix = abc_dup(prefix); // we need the object, too
1326             }
1327             use_temp_var = 1;
1328         } else if(m->type == MULTINAMEL) {
1329             if(!justassign) {
1330                 /* dupping two values on the stack requires 5 operations and one register- 
1331                    couldn't adobe just have given us a dup2? */
1332                 int temp = gettempvar();
1333                 prefix = abc_setlocal(prefix, temp);
1334                 prefix = abc_dup(prefix);
1335                 prefix = abc_getlocal(prefix, temp);
1336                 prefix = abc_swap(prefix);
1337                 prefix = abc_getlocal(prefix, temp);
1338                 if(!use_temp_var);
1339                     prefix = abc_kill(prefix, temp);
1340             }
1341             use_temp_var = 1;
1342         } else {
1343             syntaxerror("illegal lvalue: can't assign a value to this expression (not a qname/multiname)");
1344         }
1345     } else if(r->opcode == OPCODE_GETSLOT) {
1346         write->opcode = OPCODE_SETSLOT;
1347         write->data[0] = r->data[0];
1348         if(!justassign) {
1349             prefix = abc_dup(prefix); // we need the object, too
1350         }
1351         use_temp_var = 1;
1352     } else if(r->opcode == OPCODE_GETLOCAL) { 
1353         write->opcode = OPCODE_SETLOCAL;
1354         write->data[0] = r->data[0];
1355     } else if(r->opcode == OPCODE_GETLOCAL_0) { 
1356         write->opcode = OPCODE_SETLOCAL_0;
1357     } else if(r->opcode == OPCODE_GETLOCAL_1) { 
1358         write->opcode = OPCODE_SETLOCAL_1;
1359     } else if(r->opcode == OPCODE_GETLOCAL_2) { 
1360         write->opcode = OPCODE_SETLOCAL_2;
1361     } else if(r->opcode == OPCODE_GETLOCAL_3) { 
1362         write->opcode = OPCODE_SETLOCAL_3;
1363     } else {
1364         code_dump(r);
1365         syntaxerror("illegal lvalue: can't assign a value to this expression");
1366     }
1367     code_t* c = 0;
1368     
1369     int temp = -1;
1370     if(!justassign) {
1371         if(use_temp_var) {
1372             /* with getproperty/getslot, we have to be extra careful not
1373                to execute the read code twice, as it might have side-effects
1374                (e.g. if the property is in fact a setter/getter combination)
1375
1376                So read the value, modify it, and write it again,
1377                using prefix only once and making sure (by using a temporary
1378                register) that the return value is what we just wrote */
1379             temp = gettempvar();
1380             c = code_append(c, prefix);
1381             c = code_append(c, r);
1382             if(readbefore) {
1383                 c = abc_dup(c);
1384                 c = abc_setlocal(c, temp);
1385             }
1386             c = code_append(c, middlepart);
1387             if(!readbefore) {
1388                 c = abc_dup(c);
1389                 c = abc_setlocal(c, temp);
1390             }
1391             c = code_append(c, write);
1392             c = abc_getlocal(c, temp);
1393             c = abc_kill(c, temp);
1394         } else {
1395             /* if we're allowed to execute the read code twice *and*
1396                the middlepart doesn't modify the code, things are easier.
1397             */
1398             code_t* r2 = code_dup(r);
1399             //c = code_append(c, prefix);
1400             parserassert(!prefix);
1401             c = code_append(c, r);
1402             c = code_append(c, middlepart);
1403             c = code_append(c, write);
1404             c = code_append(c, r2);
1405         }
1406     } else {
1407         /* even smaller version: overwrite the value without reading
1408            it out first */
1409         if(!use_temp_var) {
1410             if(prefix) {
1411                 c = code_append(c, prefix);
1412                 c = abc_dup(c);
1413             }
1414             c = code_append(c, middlepart);
1415             c = code_append(c, write);
1416             c = code_append(c, r);
1417         } else {
1418             temp = gettempvar();
1419             if(prefix) {
1420                 c = code_append(c, prefix);
1421             }
1422             c = code_append(c, middlepart);
1423             c = abc_dup(c);
1424             c = abc_setlocal(c, temp);
1425             c = code_append(c, write);
1426             c = abc_getlocal(c, temp);
1427             c = abc_kill(c, temp);
1428         }
1429     }
1430     return c;
1431 }
1432
1433 char is_break_or_jump(code_t*c)
1434 {
1435     if(!c)
1436         return 0;
1437     if(c->opcode == OPCODE_JUMP ||
1438        c->opcode == OPCODE___BREAK__ ||
1439        c->opcode == OPCODE___CONTINUE__ ||
1440        c->opcode == OPCODE_THROW ||
1441        c->opcode == OPCODE_RETURNVOID ||
1442        c->opcode == OPCODE_RETURNVALUE) {
1443        return 1;
1444     }
1445     return 0;
1446 }
1447
1448
1449 #define IS_FINALLY_TARGET(op) \
1450         ((op) == OPCODE___CONTINUE__ || \
1451          (op) == OPCODE___BREAK__ || \
1452          (op) == OPCODE_RETURNVOID || \
1453          (op) == OPCODE_RETURNVALUE || \
1454          (op) == OPCODE___RETHROW__)
1455
1456 static code_t* insert_finally_lookup(code_t*c, code_t*finally, int tempvar)
1457 {
1458 #define NEED_EXTRA_STACK_ARG
1459     code_t*finally_label = abc_nop(0);
1460     NEW(lookupswitch_t, l);
1461     //_lookupswitch
1462
1463     code_t*i = c;
1464     int count=0;
1465     while(i) {
1466         code_t*prev = i->prev;
1467         if(IS_FINALLY_TARGET(i->opcode)) {
1468            code_t*p = prev;
1469            char needvalue=0;
1470            if(i->opcode == OPCODE___RETHROW__ ||
1471               i->opcode == OPCODE_RETURNVALUE) {
1472                if(i->opcode == OPCODE___RETHROW__)
1473                  i->opcode = OPCODE_THROW;
1474                needvalue=1;
1475                p = abc_coerce_a(p);
1476                p = abc_setlocal(p, tempvar);
1477            }
1478            p = abc_pushbyte(p, count++);
1479            p = abc_jump(p, finally_label);
1480            code_t*target = p = abc_label(p);
1481 #ifdef NEED_EXTRA_STACK_ARG
1482            p = abc_pop(p);
1483 #endif
1484            if(needvalue) {
1485                p = abc_getlocal(p, tempvar);
1486            }
1487
1488            p->next = i;i->prev = p;
1489            list_append(l->targets, target);
1490         }
1491         i = prev;
1492     }
1493
1494     code_t*j,*f;
1495     c = abc_pushbyte(c, -1);
1496     c = code_append(c, finally_label);
1497     c = code_append(c, finally);
1498
1499 #ifdef NEED_EXTRA_STACK_ARG
1500     c = abc_dup(c);
1501 #endif
1502     c = abc_lookupswitch(c, l);
1503     c = l->def = abc_label(c);
1504 #ifdef NEED_EXTRA_STACK_ARG
1505     c = abc_pop(c);
1506 #endif
1507
1508     return c;
1509 }
1510
1511 static code_t* insert_finally_simple(code_t*c, code_t*finally, int tempvar)
1512 {
1513     code_t*i = c;
1514     while(i) {
1515         code_t*prev = i->prev;
1516         if(IS_FINALLY_TARGET(i->opcode)) {
1517            if(i->opcode == OPCODE___RETHROW__)
1518                 i->opcode = OPCODE_THROW;
1519            code_t*end = code_dup(finally);
1520            code_t*start = code_start(end);
1521            if(prev) prev->next = start;
1522            start->prev = prev;
1523            i->prev = end;
1524            end->next = i;
1525         }
1526         i = prev;
1527     }
1528     return code_append(c, finally);
1529 }
1530
1531 code_t* insert_finally(code_t*c, code_t*finally, int tempvar)
1532 {
1533     if(!finally)
1534         return c;
1535     code_t*i = c;
1536     char cantdup=0;
1537     int num_insertion_points=0;
1538     while(i) {
1539         if(IS_FINALLY_TARGET(i->opcode))
1540             num_insertion_points++;
1541         i = i->prev;
1542     }
1543     i = finally;
1544     int code_size=0;
1545     while(i) {
1546         code_size++;
1547         if(i->branch || i->opcode == OPCODE_LOOKUPSWITCH) {
1548             cantdup=1;
1549         }
1550         i = i->prev;
1551     }
1552     int simple_version_cost = (1+num_insertion_points)*code_size;
1553     int lookup_version_cost = 4*num_insertion_points + 5;
1554
1555     if(cantdup || simple_version_cost > lookup_version_cost) {
1556         printf("lookup %d > *%d*\n", simple_version_cost, lookup_version_cost);
1557         return insert_finally_lookup(c, finally, tempvar);
1558     } else {
1559         printf("simple *%d* < %d\n", simple_version_cost, lookup_version_cost);
1560         return insert_finally_simple(c, finally, tempvar);
1561     }
1562 }
1563
1564 #define PASS1 }} if(as3_pass == 1) {{
1565 #define PASS1END }} if(as3_pass == 2) {{
1566 #define PASS2 }} if(as3_pass == 2) {{
1567 #define PASS12 }} {{
1568 #define PASS12END }} if(as3_pass == 2) {{
1569
1570
1571
1572 /* Line 273 of skeleton.m4  */
1573 #line 1574 "parser.tab.c"
1574
1575 #ifdef short
1576 # undef short
1577 #endif
1578
1579 #ifdef YYTYPE_UINT8
1580 typedef YYTYPE_UINT8 yytype_uint8;
1581 #else
1582 typedef unsigned char yytype_uint8;
1583 #endif
1584
1585 #ifdef YYTYPE_INT8
1586 typedef YYTYPE_INT8 yytype_int8;
1587 #elif (defined __STDC__ || defined __C99__FUNC__ \
1588      || defined __cplusplus || defined _MSC_VER)
1589 typedef signed char yytype_int8;
1590 #else
1591 typedef short int yytype_int8;
1592 #endif
1593
1594 #ifdef YYTYPE_UINT16
1595 typedef YYTYPE_UINT16 yytype_uint16;
1596 #else
1597 typedef unsigned short int yytype_uint16;
1598 #endif
1599
1600 #ifdef YYTYPE_INT16
1601 typedef YYTYPE_INT16 yytype_int16;
1602 #else
1603 typedef short int yytype_int16;
1604 #endif
1605
1606 #ifndef YYSIZE_T
1607 # ifdef __SIZE_TYPE__
1608 #  define YYSIZE_T __SIZE_TYPE__
1609 # elif defined size_t
1610 #  define YYSIZE_T size_t
1611 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
1612      || defined __cplusplus || defined _MSC_VER)
1613 #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
1614 #  define YYSIZE_T size_t
1615 # else
1616 #  define YYSIZE_T unsigned int
1617 # endif
1618 #endif
1619
1620 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
1621
1622 #ifndef YY_
1623 # if YYENABLE_NLS
1624 #  if ENABLE_NLS
1625 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
1626 #   define YY_(msgid) dgettext ("bison-runtime", msgid)
1627 #  endif
1628 # endif
1629 # ifndef YY_
1630 #  define YY_(msgid) msgid
1631 # endif
1632 #endif
1633
1634 /* Suppress unused-variable warnings by "using" E.  */
1635 #if ! defined lint || defined __GNUC__
1636 # define YYUSE(e) ((void) (e))
1637 #else
1638 # define YYUSE(e) /* empty */
1639 #endif
1640
1641 /* Identity function, used to suppress warnings about constant conditions.  */
1642 #ifndef lint
1643 # define YYID(n) (n)
1644 #else
1645 #if (defined __STDC__ || defined __C99__FUNC__ \
1646      || defined __cplusplus || defined _MSC_VER)
1647 static int
1648 YYID (int yyi)
1649 #else
1650 static int
1651 YYID (yyi)
1652     int yyi;
1653 #endif
1654 {
1655   return yyi;
1656 }
1657 #endif
1658
1659 #if ! defined yyoverflow || YYERROR_VERBOSE
1660
1661 /* The parser invokes alloca or malloc; define the necessary symbols.  */
1662
1663 # ifdef YYSTACK_USE_ALLOCA
1664 #  if YYSTACK_USE_ALLOCA
1665 #   ifdef __GNUC__
1666 #    define YYSTACK_ALLOC __builtin_alloca
1667 #   elif defined __BUILTIN_VA_ARG_INCR
1668 #    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
1669 #   elif defined _AIX
1670 #    define YYSTACK_ALLOC __alloca
1671 #   elif defined _MSC_VER
1672 #    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
1673 #    define alloca _alloca
1674 #   else
1675 #    define YYSTACK_ALLOC alloca
1676 #    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1677      || defined __cplusplus || defined _MSC_VER)
1678 #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1679 #     ifndef _STDLIB_H
1680 #      define _STDLIB_H 1
1681 #     endif
1682 #    endif
1683 #   endif
1684 #  endif
1685 # endif
1686
1687 # ifdef YYSTACK_ALLOC
1688    /* Pacify GCC's `empty if-body' warning.  */
1689 #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
1690 #  ifndef YYSTACK_ALLOC_MAXIMUM
1691     /* The OS might guarantee only one guard page at the bottom of the stack,
1692        and a page size can be as small as 4096 bytes.  So we cannot safely
1693        invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
1694        to allow for a few compiler-allocated temporary stack slots.  */
1695 #   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
1696 #  endif
1697 # else
1698 #  define YYSTACK_ALLOC YYMALLOC
1699 #  define YYSTACK_FREE YYFREE
1700 #  ifndef YYSTACK_ALLOC_MAXIMUM
1701 #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
1702 #  endif
1703 #  if (defined __cplusplus && ! defined _STDLIB_H \
1704        && ! ((defined YYMALLOC || defined malloc) \
1705              && (defined YYFREE || defined free)))
1706 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1707 #   ifndef _STDLIB_H
1708 #    define _STDLIB_H 1
1709 #   endif
1710 #  endif
1711 #  ifndef YYMALLOC
1712 #   define YYMALLOC malloc
1713 #   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1714      || defined __cplusplus || defined _MSC_VER)
1715 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
1716 #   endif
1717 #  endif
1718 #  ifndef YYFREE
1719 #   define YYFREE free
1720 #   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1721      || defined __cplusplus || defined _MSC_VER)
1722 void free (void *); /* INFRINGES ON USER NAME SPACE */
1723 #   endif
1724 #  endif
1725 # endif
1726 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
1727
1728
1729 #if (! defined yyoverflow \
1730      && (! defined __cplusplus \
1731          || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
1732
1733 /* A type that is properly aligned for any stack member.  */
1734 union yyalloc
1735 {
1736   yytype_int16 yyss_alloc;
1737   YYSTYPE yyvs_alloc;
1738 };
1739
1740 /* The size of the maximum gap between one aligned stack and the next.  */
1741 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
1742
1743 /* The size of an array large to enough to hold all stacks, each with
1744    N elements.  */
1745 # define YYSTACK_BYTES(N) \
1746      ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
1747       + YYSTACK_GAP_MAXIMUM)
1748
1749 /* Copy COUNT objects from FROM to TO.  The source and destination do
1750    not overlap.  */
1751 # ifndef YYCOPY
1752 #  if defined __GNUC__ && 1 < __GNUC__
1753 #   define YYCOPY(To, From, Count) \
1754       __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
1755 #  else
1756 #   define YYCOPY(To, From, Count)              \
1757       do                                        \
1758         {                                       \
1759           YYSIZE_T yyi;                         \
1760           for (yyi = 0; yyi < (Count); yyi++)   \
1761             (To)[yyi] = (From)[yyi];            \
1762         }                                       \
1763       while (YYID (0))
1764 #  endif
1765 # endif
1766
1767 /* Relocate STACK from its old location to the new one.  The
1768    local variables YYSIZE and YYSTACKSIZE give the old and new number of
1769    elements in the stack, and YYPTR gives the new location of the
1770    stack.  Advance YYPTR to a properly aligned location for the next
1771    stack.  */
1772 # define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
1773     do                                                                  \
1774       {                                                                 \
1775         YYSIZE_T yynewbytes;                                            \
1776         YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
1777         Stack = &yyptr->Stack_alloc;                                    \
1778         yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
1779         yyptr += yynewbytes / sizeof (*yyptr);                          \
1780       }                                                                 \
1781     while (YYID (0))
1782
1783 #endif
1784
1785 /* YYFINAL -- State number of the termination state.  */
1786 #define YYFINAL  119
1787 /* YYLAST -- Last index in YYTABLE.  */
1788 #define YYLAST   2463
1789
1790 /* YYNTOKENS -- Number of terminals.  */
1791 #define YYNTOKENS  130
1792 /* YYNNTS -- Number of nonterminals.  */
1793 #define YYNNTS  106
1794 /* YYNRULES -- Number of rules.  */
1795 #define YYNRULES  286
1796 /* YYNRULES -- Number of states.  */
1797 #define YYNSTATES  479
1798
1799 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
1800 #define YYUNDEFTOK  2
1801 #define YYMAXUTOK   360
1802
1803 #define YYTRANSLATE(YYX)                                                \
1804   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
1805
1806 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
1807 static const yytype_uint8 yytranslate[] =
1808 {
1809        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1810        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1811        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1812        2,     2,     2,   116,     2,     2,     2,   114,   106,     2,
1813      126,   129,   113,   111,    97,   110,   123,   112,     2,     2,
1814        2,     2,     2,     2,     2,     2,     2,     2,   103,    96,
1815      107,    99,   108,   102,     2,     2,     2,     2,     2,     2,
1816        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1817        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1818        2,   120,     2,   121,   105,     2,     2,     2,     2,     2,
1819        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1820        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1821        2,     2,     2,   122,   104,   128,   115,     2,     2,     2,
1822        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1823        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1824        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1825        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1826        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1827        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1828        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1829        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1830        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1831        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1832        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1833        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1834        2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
1835        5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
1836       15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
1837       25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
1838       35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
1839       45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
1840       55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
1841       65,    66,    67,    68,    69,    70,    71,    72,    73,    74,
1842       75,    76,    77,    78,    79,    80,    81,    82,    83,    84,
1843       85,    86,    87,    88,    89,    90,    91,    92,    93,    94,
1844       95,    98,   100,   101,   109,   117,   118,   119,   124,   125,
1845      127
1846 };
1847
1848 #if YYDEBUG
1849 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
1850    YYRHS.  */
1851 static const yytype_uint16 yyprhs[] =
1852 {
1853        0,     0,     3,     5,     6,     8,    10,    13,    15,    17,
1854       19,    21,    23,    25,    27,    28,    30,    32,    35,    37,
1855       39,    41,    43,    45,    47,    49,    50,    53,    55,    57,
1856       59,    61,    63,    65,    67,    69,    71,    73,    75,    77,
1857       79,    81,    83,    85,    87,    89,    91,    93,    97,   100,
1858      103,   105,   107,   110,   111,   114,   117,   119,   123,   127,
1859      128,   131,   132,   140,   141,   143,   145,   149,   151,   154,
1860      158,   167,   174,   175,   182,   183,   191,   193,   196,   198,
1861      201,   202,   204,   206,   209,   211,   214,   219,   223,   224,
1862      233,   234,   244,   245,   251,   253,   256,   258,   261,   263,
1863      264,   271,   274,   276,   282,   284,   286,   290,   292,   293,
1864      300,   301,   307,   310,   315,   316,   318,   320,   323,   325,
1865      327,   329,   331,   333,   335,   337,   339,   341,   342,   345,
1866      346,   349,   350,   353,   354,   364,   365,   374,   375,   377,
1867      379,   382,   384,   386,   388,   390,   391,   393,   395,   398,
1868      400,   403,   412,   414,   416,   422,   423,   426,   428,   430,
1869      432,   434,   436,   438,   440,   442,   443,   445,   448,   453,
1870      457,   459,   464,   467,   469,   471,   472,   473,   486,   488,
1871      489,   490,   501,   503,   507,   509,   511,   513,   517,   519,
1872      521,   523,   526,   527,   528,   532,   533,   535,   537,   541,
1873      545,   550,   555,   558,   560,   563,   565,   567,   571,   573,
1874      575,   577,   579,   581,   583,   585,   587,   589,   591,   593,
1875      595,   597,   599,   601,   603,   605,   607,   611,   615,   619,
1876      623,   627,   631,   635,   639,   643,   647,   650,   653,   657,
1877      661,   665,   669,   673,   677,   681,   685,   689,   693,   697,
1878      701,   705,   709,   713,   718,   721,   723,   727,   730,   735,
1879      739,   740,   742,   746,   752,   756,   760,   764,   768,   772,
1880      776,   780,   784,   788,   792,   796,   802,   805,   808,   811,
1881      814,   818,   822,   824,   828,   834,   840
1882 };
1883
1884 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
1885 static const yytype_int16 yyrhs[] =
1886 {
1887      131,     0,    -1,   132,    -1,    -1,   133,    -1,   134,    -1,
1888      133,   134,    -1,   180,    -1,   192,    -1,   190,    -1,   208,
1889       -1,   201,    -1,   143,    -1,    96,    -1,    -1,   136,    -1,
1890      137,    -1,   136,   137,    -1,   192,    -1,   190,    -1,   208,
1891       -1,   201,    -1,   143,    -1,    96,    -1,   139,    -1,    -1,
1892      139,   141,    -1,   141,    -1,   183,    -1,   154,    -1,   155,
1893       -1,   156,    -1,   158,    -1,   166,    -1,   149,    -1,   177,
1894       -1,   174,    -1,   228,    -1,    96,    -1,   140,    -1,   145,
1895       -1,   160,    -1,   161,    -1,   225,    -1,   176,    -1,   234,
1896       -1,   235,    -1,   122,   139,   128,    -1,   122,   128,    -1,
1897      141,    96,    -1,   141,    -1,   140,    -1,    99,   226,    -1,
1898       -1,    45,   146,    -1,    31,   146,    -1,   147,    -1,   146,
1899       97,   147,    -1,     3,   218,   144,    -1,    -1,    64,   142,
1900       -1,    -1,    63,   126,   150,   227,   129,   142,   148,    -1,
1901       -1,   145,    -1,   228,    -1,    45,     3,   218,    -1,     3,
1902       -1,    12,   126,    -1,    12,    49,   126,    -1,   153,   151,
1903       96,   227,    96,   228,   129,   142,    -1,   153,   152,    67,
1904      227,   129,   142,    -1,    -1,    13,   126,   157,   227,   129,
1905      142,    -1,    -1,    14,   159,   142,    13,   126,   227,   129,
1906       -1,    65,    -1,    65,     3,    -1,    29,    -1,    29,     3,
1907       -1,    -1,   163,    -1,   165,    -1,   163,   165,    -1,   164,
1908       -1,   163,   164,    -1,    33,   229,   103,   138,    -1,    61,
1909      103,   138,    -1,    -1,    15,   126,   167,   229,   129,   122,
1910      162,   128,    -1,    -1,    32,   126,     3,   218,   129,   169,
1911      122,   138,   128,    -1,    -1,    27,   122,   171,   138,   128,
1912       -1,   168,    -1,   172,   168,    -1,   172,    -1,   172,   170,
1913       -1,   170,    -1,    -1,    51,   122,   175,   138,   128,   173,
1914       -1,    36,   227,    -1,    36,    -1,    38,   126,   227,   129,
1915      142,    -1,     3,    -1,    18,    -1,   179,   123,   178,    -1,
1916      178,    -1,    -1,    18,   179,   122,   181,   135,   128,    -1,
1917       -1,    18,   122,   182,   135,   128,    -1,    40,   215,    -1,
1918       40,   179,   123,   113,    -1,    -1,   185,    -1,   186,    -1,
1919      185,   186,    -1,    20,    -1,    21,    -1,    19,    -1,    37,
1920       -1,    46,    -1,    48,    -1,    47,    -1,    25,    -1,    23,
1921       -1,    -1,    53,   215,    -1,    -1,    53,   216,    -1,    -1,
1922       16,   216,    -1,    -1,   184,    30,     3,   187,   189,   122,
1923      191,   194,   128,    -1,    -1,   184,    43,     3,   188,   122,
1924      193,   197,   128,    -1,    -1,   195,    -1,   196,    -1,   195,
1925      196,    -1,    96,    -1,   201,    -1,   208,    -1,   140,    -1,
1926       -1,   198,    -1,   199,    -1,   198,   199,    -1,    96,    -1,
1927       45,     3,    -1,   184,    26,   207,     3,   126,   204,   129,
1928      218,    -1,    45,    -1,    31,    -1,   184,   200,     3,   218,
1929      144,    -1,    -1,    99,   203,    -1,     9,    -1,     7,    -1,
1930        8,    -1,    11,    -1,     4,    -1,    55,    -1,    54,    -1,
1931       44,    -1,    -1,   205,    -1,    90,   206,    -1,   205,    97,
1932       90,   206,    -1,   205,    97,   206,    -1,   206,    -1,     3,
1933      103,   217,   202,    -1,     3,   202,    -1,    50,    -1,    34,
1934       -1,    -1,    -1,   184,    26,   207,     3,   126,   204,   129,
1935      218,   122,   209,   138,   128,    -1,     3,    -1,    -1,    -1,
1936       26,   210,   126,   204,   129,   218,   122,   212,   138,   128,
1937       -1,     3,    -1,   179,   123,     3,    -1,   214,    -1,   213,
1938       -1,   215,    -1,   216,    97,   215,    -1,   215,    -1,   113,
1939       -1,    35,    -1,   103,   217,    -1,    -1,    -1,   126,   220,
1940      129,    -1,    -1,   221,    -1,   226,    -1,   221,    97,   226,
1941       -1,    24,   213,   219,    -1,   229,   126,   220,   129,    -1,
1942       52,   126,   220,   129,    -1,    62,   229,    -1,    41,    -1,
1943       41,   227,    -1,   229,    -1,   229,    -1,   227,    97,   229,
1944       -1,   227,    -1,   211,    -1,   230,    -1,   233,    -1,   222,
1945       -1,   224,    -1,     5,    -1,     9,    -1,    10,    -1,     7,
1946       -1,     8,    -1,    11,    -1,     4,    -1,    28,    -1,    55,
1947       -1,    54,    -1,    44,    -1,   223,    -1,   229,   107,   229,
1948       -1,   229,   108,   229,    -1,   229,    73,   229,    -1,   229,
1949       74,   229,    -1,   229,    69,   229,    -1,   229,    70,   229,
1950       -1,   229,    72,   229,    -1,   229,    71,   229,    -1,   229,
1951       84,   229,    -1,   229,    85,   229,    -1,   116,   229,    -1,
1952      115,   229,    -1,   229,   106,   229,    -1,   229,   105,   229,
1953       -1,   229,   104,   229,    -1,   229,    93,   229,    -1,   229,
1954       92,   229,    -1,   229,    91,   229,    -1,   229,   112,   229,
1955       -1,   229,   114,   229,    -1,   229,   111,   229,    -1,   229,
1956      110,   229,    -1,   229,   113,   229,    -1,   229,    67,   229,
1957       -1,   229,    68,   229,    -1,   229,    39,   229,    -1,   229,
1958       66,   229,    -1,    42,   126,   229,   129,    -1,    35,   229,
1959       -1,    35,    -1,   126,   227,   129,    -1,   110,   229,    -1,
1960      229,   120,   229,   121,    -1,   120,   220,   121,    -1,    -1,
1961      232,    -1,   226,   103,   226,    -1,   232,    97,   226,   103,
1962      226,    -1,   122,   231,   128,    -1,   229,    78,   229,    -1,
1963      229,    77,   229,    -1,   229,    82,   229,    -1,   229,    81,
1964      229,    -1,   229,    83,   229,    -1,   229,    76,   229,    -1,
1965      229,    75,   229,    -1,   229,    79,   229,    -1,   229,    80,
1966      229,    -1,   229,    99,   229,    -1,   229,   102,   229,   103,
1967      229,    -1,   229,    88,    -1,   229,    87,    -1,    88,   229,
1968       -1,    87,   229,    -1,    52,   123,     3,    -1,   229,   123,
1969        3,    -1,     3,    -1,   184,    17,     3,    -1,   184,    17,
1970        3,    99,     3,    -1,   184,    17,     3,    99,     4,    -1,
1971       22,    17,     3,    -1
1972 };
1973
1974 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
1975 static const yytype_uint16 yyrline[] =
1976 {
1977        0,  1548,  1548,  1550,  1550,  1551,  1552,  1554,  1555,  1556,
1978     1557,  1558,  1559,  1560,  1562,  1562,  1563,  1564,  1566,  1567,
1979     1568,  1569,  1570,  1571,  1573,  1574,  1576,  1577,  1580,  1581,
1980     1582,  1583,  1584,  1585,  1586,  1587,  1588,  1589,  1592,  1593,
1981     1594,  1595,  1596,  1597,  1598,  1600,  1601,  1603,  1604,  1605,
1982     1606,  1610,  1617,  1618,  1622,  1623,  1625,  1626,  1628,  1669,
1983     1670,  1673,  1673,  1692,  1693,  1694,  1697,  1700,  1704,  1705,
1984     1707,  1727,  1770,  1770,  1789,  1789,  1804,  1807,  1810,  1813,
1985     1817,  1818,  1819,  1820,  1821,  1822,  1824,  1835,  1838,  1838,
1986     1867,  1867,  1887,  1887,  1904,  1905,  1906,  1907,  1915,  1924,
1987     1924,  1969,  1973,  1984,  1993,  1994,  1996,  1997,  1999,  1999,
1988     2001,  2001,  2004,  2012,  2022,  2023,  2024,  2025,  2027,  2028,
1989     2029,  2030,  2031,  2032,  2033,  2034,  2035,  2037,  2038,  2040,
1990     2041,  2043,  2044,  2048,  2046,  2054,  2052,  2060,  2061,  2062,
1991     2063,  2064,  2065,  2066,  2068,  2074,  2075,  2076,  2077,  2078,
1992     2079,  2082,  2094,  2094,  2096,  2155,  2156,  2158,  2159,  2160,
1993     2161,  2162,  2164,  2165,  2166,  2171,  2174,  2179,  2184,  2191,
1994     2195,  2200,  2206,  2212,  2213,  2214,  2217,  2216,  2238,  2239,
1995     2241,  2240,  2260,  2268,  2276,  2277,  2279,  2280,  2282,  2283,
1996     2284,  2293,  2294,  2298,  2299,  2301,  2302,  2303,  2306,  2311,
1997     2335,  2383,  2403,  2424,  2427,  2434,  2435,  2436,  2442,  2448,
1998     2450,  2452,  2454,  2456,  2458,  2475,  2480,  2483,  2486,  2489,
1999     2492,  2495,  2498,  2501,  2504,  2508,  2509,  2512,  2515,  2518,
2000     2521,  2524,  2527,  2530,  2534,  2545,  2563,  2568,  2573,  2578,
2001     2583,  2588,  2592,  2596,  2601,  2605,  2609,  2618,  2627,  2637,
2002     2642,  2654,  2660,  2665,  2671,  2677,  2681,  2683,  2694,  2703,
2003     2710,  2711,  2713,  2719,  2728,  2735,  2747,  2753,  2759,  2765,
2004     2771,  2777,  2783,  2796,  2807,  2814,  2827,  2854,  2868,  2882,
2005     2896,  2911,  2945,  3043,  3044,  3045,  3047
2006 };
2007 #endif
2008
2009 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
2010 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
2011    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
2012 static const char *const yytname[] =
2013 {
2014   "$end", "error", "$undefined", "T_IDENTIFIER", "T_STRING", "T_REGEXP",
2015   "T_EMPTY", "T_INT", "T_UINT", "T_BYTE", "T_SHORT", "T_FLOAT", "\"for\"",
2016   "\"while\"", "\"do\"", "\"switch\"", "\"implements\"", "\"namespace\"",
2017   "\"package\"", "\"protected\"", "\"public\"", "\"private\"", "\"use\"",
2018   "\"internal\"", "\"new\"", "\"native\"", "\"function\"", "\"finally\"",
2019   "\"undefined\"", "\"continue\"", "\"class\"", "\"const\"", "\"catch\"",
2020   "\"case\"", "\"set\"", "\"void\"", "\"throw\"", "\"static\"", "\"with\"",
2021   "\"instanceof\"", "\"import\"", "\"return\"", "\"typeof\"",
2022   "\"interface\"", "\"null\"", "\"var\"", "\"dynamic\"", "\"override\"",
2023   "\"final\"", "\"each\"", "\"get\"", "\"try\"", "\"super\"",
2024   "\"extends\"", "\"false\"", "\"true\"", "\"Boolean\"", "\"uint\"",
2025   "\"int\"", "\"Number\"", "\"String\"", "\"default\"", "\"delete\"",
2026   "\"if\"", "\"else\"", "\"break\"", "\"is\"", "\"in\"", "\"as\"",
2027   "\"==\"", "\"===\"", "\"!=\"", "\"!==\"", "\"<=\"", "\">=\"", "\"|=\"",
2028   "\"/=\"", "\"%=\"", "\"*=\"", "\"+=\"", "\"-=\"", "\">>=\"", "\"<<=\"",
2029   "\">>>=\"", "\"||\"", "\"&&\"", "\"::\"", "\"--\"", "\"++\"", "\"..\"",
2030   "\"...\"", "\"<<\"", "\">>>\"", "\">>\"", "prec_none", "below_semicolon",
2031   "';'", "','", "below_assignment", "'='", "\"&=\"", "\"^=\"", "'?'",
2032   "':'", "'|'", "'^'", "'&'", "'<'", "'>'", "below_minus", "'-'", "'+'",
2033   "'/'", "'*'", "'%'", "'~'", "'!'", "minusminus_prefix",
2034   "plusplus_prefix", "below_curly", "'['", "']'", "'{'", "'.'",
2035   "above_identifier", "below_else", "'('", "above_function", "'}'", "')'",
2036   "$accept", "PROGRAM", "MAYBE_PROGRAM_CODE_LIST", "PROGRAM_CODE_LIST",
2037   "PROGRAM_CODE", "MAYBE_INPACKAGE_CODE_LIST", "INPACKAGE_CODE_LIST",
2038   "INPACKAGE_CODE", "MAYBECODE", "CODE", "CODE_STATEMENT", "CODEPIECE",
2039   "CODEBLOCK", "PACKAGE_INITCODE", "MAYBEEXPRESSION",
2040   "VARIABLE_DECLARATION", "VARIABLE_LIST", "ONE_VARIABLE", "MAYBEELSE",
2041   "IF", "$@1", "FOR_INIT", "FOR_IN_INIT", "FOR_START", "FOR", "FOR_IN",
2042   "WHILE", "$@2", "DO_WHILE", "$@3", "BREAK", "CONTINUE",
2043   "MAYBE_CASE_LIST", "CASE_LIST", "CASE", "DEFAULT", "SWITCH", "$@4",
2044   "CATCH", "$@5", "FINALLY", "$@6", "CATCH_LIST", "CATCH_FINALLY_LIST",
2045   "TRY", "$@7", "THROW", "WITH", "X_IDENTIFIER", "PACKAGE",
2046   "PACKAGE_DECLARATION", "$@8", "$@9", "IMPORT", "MAYBE_MODIFIERS",
2047   "MODIFIER_LIST", "MODIFIER", "EXTENDS", "EXTENDS_LIST",
2048   "IMPLEMENTS_LIST", "CLASS_DECLARATION", "$@10", "INTERFACE_DECLARATION",
2049   "$@11", "MAYBE_CLASS_BODY", "CLASS_BODY", "CLASS_BODY_ITEM",
2050   "MAYBE_INTERFACE_BODY", "INTERFACE_BODY", "IDECLARATION", "VARCONST",
2051   "SLOT_DECLARATION", "MAYBESTATICCONSTANT", "STATICCONSTANT",
2052   "MAYBE_PARAM_LIST", "PARAM_LIST", "PARAM", "GETSET",
2053   "FUNCTION_DECLARATION", "$@12", "MAYBE_IDENTIFIER", "INNERFUNCTION",
2054   "$@13", "CLASS", "PACKAGEANDCLASS", "QNAME", "QNAME_LIST", "TYPE",
2055   "MAYBETYPE", "MAYBE_PARAM_VALUES", "MAYBE_EXPRESSION_LIST",
2056   "EXPRESSION_LIST", "NEW", "FUNCTIONCALL", "DELETE", "RETURN",
2057   "NONCOMMAEXPRESSION", "EXPRESSION", "VOIDEXPRESSION", "E", "CONSTANT",
2058   "MAYBE_EXPRPAIR_LIST", "EXPRPAIR_LIST", "VAR_READ",
2059   "NAMESPACE_DECLARATION", "USE_NAMESPACE", 0
2060 };
2061 #endif
2062
2063 # ifdef YYPRINT
2064 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
2065    token YYLEX-NUM.  */
2066 static const yytype_uint16 yytoknum[] =
2067 {
2068        0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
2069      265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
2070      275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
2071      285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
2072      295,   296,   297,   298,   299,   300,   301,   302,   303,   304,
2073      305,   306,   307,   308,   309,   310,   311,   312,   313,   314,
2074      315,   316,   317,   318,   319,   320,   321,   322,   323,   324,
2075      325,   326,   327,   328,   329,   330,   331,   332,   333,   334,
2076      335,   336,   337,   338,   339,   340,   341,   342,   343,   344,
2077      345,   346,   347,   348,   349,   350,    59,    44,   351,    61,
2078      352,   353,    63,    58,   124,    94,    38,    60,    62,   354,
2079       45,    43,    47,    42,    37,   126,    33,   355,   356,   357,
2080       91,    93,   123,    46,   358,   359,    40,   360,   125,    41
2081 };
2082 # endif
2083
2084 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
2085 static const yytype_uint8 yyr1[] =
2086 {
2087        0,   130,   131,   132,   132,   133,   133,   134,   134,   134,
2088      134,   134,   134,   134,   135,   135,   136,   136,   137,   137,
2089      137,   137,   137,   137,   138,   138,   139,   139,   140,   140,
2090      140,   140,   140,   140,   140,   140,   140,   140,   141,   141,
2091      141,   141,   141,   141,   141,   141,   141,   142,   142,   142,
2092      142,   143,   144,   144,   145,   145,   146,   146,   147,   148,
2093      148,   150,   149,   151,   151,   151,   152,   152,   153,   153,
2094      154,   155,   157,   156,   159,   158,   160,   160,   161,   161,
2095      162,   162,   162,   162,   163,   163,   164,   165,   167,   166,
2096      169,   168,   171,   170,   172,   172,   173,   173,   173,   175,
2097      174,   176,   176,   177,   178,   178,   179,   179,   181,   180,
2098      182,   180,   183,   183,   184,   184,   185,   185,   186,   186,
2099      186,   186,   186,   186,   186,   186,   186,   187,   187,   188,
2100      188,   189,   189,   191,   190,   193,   192,   194,   194,   195,
2101      195,   196,   196,   196,   196,   197,   197,   198,   198,   199,
2102      199,   199,   200,   200,   201,   202,   202,   203,   203,   203,
2103      203,   203,   203,   203,   203,   204,   204,   204,   204,   205,
2104      205,   206,   206,   207,   207,   207,   209,   208,   210,   210,
2105      212,   211,   213,   214,   215,   215,   216,   216,   217,   217,
2106      217,   218,   218,   219,   219,   220,   220,   221,   221,   222,
2107      223,   223,   224,   225,   225,   226,   227,   227,   228,   229,
2108      229,   229,   229,   229,   229,   230,   230,   230,   230,   230,
2109      230,   230,   230,   230,   230,   229,   229,   229,   229,   229,
2110      229,   229,   229,   229,   229,   229,   229,   229,   229,   229,
2111      229,   229,   229,   229,   229,   229,   229,   229,   229,   229,
2112      229,   229,   229,   229,   229,   229,   229,   229,   229,   229,
2113      231,   231,   232,   232,   229,   229,   229,   229,   229,   229,
2114      229,   229,   229,   229,   229,   229,   229,   229,   229,   229,
2115      229,   229,   233,   234,   234,   234,   235
2116 };
2117
2118 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
2119 static const yytype_uint8 yyr2[] =
2120 {
2121        0,     2,     1,     0,     1,     1,     2,     1,     1,     1,
2122        1,     1,     1,     1,     0,     1,     1,     2,     1,     1,
2123        1,     1,     1,     1,     1,     0,     2,     1,     1,     1,
2124        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
2125        1,     1,     1,     1,     1,     1,     1,     3,     2,     2,
2126        1,     1,     2,     0,     2,     2,     1,     3,     3,     0,
2127        2,     0,     7,     0,     1,     1,     3,     1,     2,     3,
2128        8,     6,     0,     6,     0,     7,     1,     2,     1,     2,
2129        0,     1,     1,     2,     1,     2,     4,     3,     0,     8,
2130        0,     9,     0,     5,     1,     2,     1,     2,     1,     0,
2131        6,     2,     1,     5,     1,     1,     3,     1,     0,     6,
2132        0,     5,     2,     4,     0,     1,     1,     2,     1,     1,
2133        1,     1,     1,     1,     1,     1,     1,     0,     2,     0,
2134        2,     0,     2,     0,     9,     0,     8,     0,     1,     1,
2135        2,     1,     1,     1,     1,     0,     1,     1,     2,     1,
2136        2,     8,     1,     1,     5,     0,     2,     1,     1,     1,
2137        1,     1,     1,     1,     1,     0,     1,     2,     4,     3,
2138        1,     4,     2,     1,     1,     0,     0,    12,     1,     0,
2139        0,    10,     1,     3,     1,     1,     1,     3,     1,     1,
2140        1,     2,     0,     0,     3,     0,     1,     1,     3,     3,
2141        4,     4,     2,     1,     2,     1,     1,     3,     1,     1,
2142        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
2143        1,     1,     1,     1,     1,     1,     3,     3,     3,     3,
2144        3,     3,     3,     3,     3,     3,     2,     2,     3,     3,
2145        3,     3,     3,     3,     3,     3,     3,     3,     3,     3,
2146        3,     3,     3,     4,     2,     1,     3,     2,     4,     3,
2147        0,     1,     3,     5,     3,     3,     3,     3,     3,     3,
2148        3,     3,     3,     3,     3,     5,     2,     2,     2,     2,
2149        3,     3,     1,     3,     5,     5,     3
2150 };
2151
2152 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
2153    STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
2154    means the default is an error.  */
2155 static const yytype_uint16 yydefact[] =
2156 {
2157      114,   282,   220,   214,   217,   218,   215,   216,   219,     0,
2158        0,    74,     0,     0,   120,   118,   119,   126,     0,   125,
2159      179,   221,   255,   121,     0,     0,     0,   224,   122,   124,
2160      123,     0,     0,   223,   222,     0,     0,     0,     0,    13,
2161        0,     0,     0,   195,   260,     0,     0,     2,   114,     5,
2162       51,    12,    34,    63,    29,    30,    31,    32,    33,    36,
2163       35,     7,    28,     0,   115,   116,     9,     8,    11,    10,
2164      209,   212,   225,   213,   208,    37,   206,   210,   211,     0,
2165       68,    72,   114,    88,   104,   105,   110,   107,     0,   182,
2166      193,   178,     0,   254,     0,   182,     0,   185,   184,   112,
2167        0,    99,     0,   195,   202,    61,   279,   278,   257,   237,
2168      236,     0,   196,   197,   205,     0,     0,   261,     0,     1,
2169        6,   282,     0,     0,    64,     0,     0,    65,   175,     0,
2170      153,     0,   152,     0,   117,     0,     0,     0,     0,     0,
2171        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2172        0,     0,     0,     0,     0,     0,     0,   277,   276,     0,
2173        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2174        0,     0,     0,     0,     0,     0,   195,    69,     0,     0,
2175       78,   102,   203,     0,    76,    38,   114,    39,    50,     0,
2176       40,    41,    42,    44,     0,    43,    45,    46,     0,   114,
2177      108,     0,   195,   199,   165,     0,     0,     0,    25,   280,
2178        0,     0,   259,     0,     0,   264,     0,   256,   192,    55,
2179       56,   192,    54,     0,     0,   174,   173,     0,   127,   129,
2180      192,   207,   251,   252,   249,   250,   230,   231,   233,   232,
2181      228,   229,   271,   270,   266,   265,   272,   273,   268,   267,
2182      269,   234,   235,   243,   242,   241,   274,     0,   240,   239,
2183      238,   226,   227,   247,   246,   244,   248,   245,     0,   281,
2184        0,     0,     0,    79,   101,   204,    77,    48,   114,    27,
2185      206,    49,     0,     0,     0,    23,     0,   114,    16,    22,
2186       19,    18,    21,    20,   114,   106,     0,   155,     0,     0,
2187      166,   170,   114,   183,   113,   253,     0,    24,   201,     0,
2188      198,   262,     0,     0,    53,     0,    53,     0,     0,     0,
2189        0,   131,     0,     0,    53,     0,   258,   200,   114,   286,
2190       47,    26,     0,   283,     0,   111,    17,     0,   194,     0,
2191        0,   172,   167,   192,     0,   103,     0,   114,     0,   190,
2192      189,     0,   188,   191,     0,    58,    57,     0,   114,   165,
2193      128,     0,     0,   186,   130,   135,   154,   275,    73,     0,
2194        0,    80,   109,   161,   158,   159,   157,   160,   164,   163,
2195      162,   156,   155,     0,     0,   169,     0,     0,    94,    98,
2196       96,   100,    59,   263,     0,    52,     0,    71,     0,   132,
2197      133,     0,   114,    75,   284,   285,     0,     0,     0,    81,
2198       84,    82,   171,   180,   168,    92,     0,    95,    97,   114,
2199       62,   114,   192,   114,   187,     0,   149,     0,     0,   114,
2200      147,     0,    25,    89,    85,    83,    25,    25,   192,    60,
2201       70,     0,   141,   144,     0,     0,   114,   139,   142,   143,
2202      150,   175,   136,   148,    25,    87,     0,     0,     0,   176,
2203      134,   140,     0,    86,   181,    93,    90,    25,     0,     0,
2204        0,   165,    25,   177,     0,     0,   192,    91,   151
2205 };
2206
2207 /* YYDEFGOTO[NTERM-NUM].  */
2208 static const yytype_int16 yydefgoto[] =
2209 {
2210       -1,    46,    47,    48,    49,   286,   287,   288,   306,   307,
2211      187,   279,   189,   289,   355,   190,   222,   220,   420,    52,
2212      211,   125,   126,    53,    54,    55,    56,   178,    57,    82,
2213      191,   192,   408,   409,   410,   411,    58,   198,   388,   469,
2214      389,   437,   390,   391,    59,   208,   193,    60,    87,   351,
2215       61,   294,   199,    62,   194,    64,    65,   321,   323,   362,
2216      290,   423,   291,   402,   445,   446,   447,   428,   429,   430,
2217      133,   292,   341,   381,   299,   300,   301,   227,   293,   467,
2218       92,    70,   436,    97,    98,   352,   364,   353,   314,   203,
2219      111,   112,    71,    72,    73,   195,   113,    74,    75,    76,
2220       77,   116,   117,    78,   196,   197
2221 };
2222
2223 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
2224    STATE-NUM.  */
2225 #define YYPACT_NINF -306
2226 static const yytype_int16 yypact[] =
2227 {
2228      349,  -306,  -306,  -306,  -306,  -306,  -306,  -306,  -306,   -40,
2229      -85,  -306,   -37,    35,  -306,  -306,  -306,  -306,    30,  -306,
2230       68,  -306,    52,  -306,   -24,    18,   -16,  -306,  -306,  -306,
2231     -306,   -22,   -35,  -306,  -306,  1538,   -14,  1538,  1538,  -306,
2232     1538,  1538,  1538,  1538,  1538,  1538,   167,  -306,   473,  -306,
2233     -306,  -306,  -306,   211,  -306,  -306,  -306,  -306,  -306,  -306,
2234     -306,  -306,  -306,   217,   640,  -306,  -306,  -306,  -306,  -306,
2235     -306,  -306,  -306,  -306,    76,  -306,  1971,  -306,  -306,    60,
2236     -306,  -306,  1469,  -306,  -306,  -306,  -306,  -306,   -28,  -306,
2237       67,  -306,    71,   141,  1538,    69,    81,  -306,  -306,  -306,
2238     1538,  -306,   186,  1538,   141,  -306,   141,   141,   163,   141,
2239      141,    87,   115,  -306,  1971,   120,    96,   128,   -86,  -306,
2240     -306,   165,   227,   230,  -306,   138,   169,  -306,    -5,   238,
2241     -306,   241,  -306,   246,  -306,  1538,  1538,  1538,  1538,  1538,
2242     1538,  1538,  1538,  1538,  1538,  1538,  1538,  1538,  1538,  1538,
2243     1538,  1538,  1538,  1538,  1538,  1538,  1538,  -306,  -306,  1538,
2244     1538,  1538,  1538,  1538,  1538,  1538,  1538,  1538,  1538,  1538,
2245     1538,  1538,  1538,  1538,  1538,   254,  1538,  -306,  1538,   242,
2246      255,  1538,  1538,   227,   265,  -306,   593,  -306,   173,   257,
2247     -306,  -306,  -306,  -306,   261,  -306,  -306,  -306,  1538,   845,
2248     -306,    72,  1538,  -306,     9,   -82,    49,  1599,  1349,  -306,
2249      143,  1538,  -306,  1538,  1538,  -306,  1538,  -306,   171,   182,
2250     -306,   171,   182,  1538,  1538,  -306,  -306,   277,   228,   231,
2251      171,  1971,   962,   836,   836,   836,  2337,  2337,  2337,  2337,
2252      962,   962,  1971,  1971,  1971,  1971,  1971,  1971,  1971,  1971,
2253     1971,  2032,  2093,   340,   340,   340,  1971,  1727,  2154,  2215,
2254     2276,   962,   962,   163,   163,   141,   141,   141,  1788,  -306,
2255      156,   -55,   287,  -306,    76,    76,  -306,  -306,   719,  -306,
2256     1849,  -306,   170,   288,  1663,  -306,   175,   971,  -306,  -306,
2257     -306,  -306,  -306,  -306,   845,  -306,   164,   -69,   294,   172,
2258      207,  -306,  1469,    69,  -306,  -306,   177,  1349,  -306,    74,
2259     -306,  -306,   203,    63,   209,   227,   112,    73,    84,   183,
2260       18,   296,    18,   188,   209,  1538,  -306,  -306,  1469,  -306,
2261     -306,  -306,  1538,   214,   192,  -306,  -306,   189,  -306,    61,
2262       63,  -306,  -306,   171,    11,  -306,     8,  1469,  1538,  -306,
2263     -306,   193,  -306,  -306,  1538,  -306,  -306,  1538,  1469,     9,
2264     -306,    18,   196,  -306,   222,  -306,  -306,  1971,  -306,    88,
2265      179,   130,  -306,  -306,  -306,  -306,  -306,  -306,  -306,  -306,
2266     -306,  -306,   221,   201,   294,  -306,   202,   199,  -306,  -306,
2267        8,  -306,   268,  -306,    90,  -306,   200,  -306,   205,   222,
2268     -306,    18,   394,  -306,  -306,  -306,  1538,   232,   210,   130,
2269     -306,  -306,  -306,  -306,  -306,  -306,   336,  -306,  -306,  1469,
2270     -306,  1469,   171,  1097,  -306,   337,  -306,   316,   216,   529,
2271     -306,  1910,  1349,  -306,  -306,  -306,  1349,  1349,   171,  -306,
2272     -306,   224,  -306,  -306,    66,   219,  1223,  -306,  -306,  -306,
2273     -306,    -5,  -306,  -306,  1349,  -306,   220,   223,   226,  -306,
2274     -306,  -306,   347,  -306,  -306,  -306,  -306,  1349,   239,   244,
2275      243,     9,  1349,  -306,   247,   250,   171,  -306,  -306
2276 };
2277
2278 /* YYPGOTO[NTERM-NUM].  */
2279 static const yytype_int16 yypgoto[] =
2280 {
2281     -306,  -306,  -306,  -306,   327,    85,  -306,    93,  -227,   197,
2282        1,   -76,  -244,    16,    58,   332,   270,    75,  -306,  -306,
2283     -306,  -306,  -306,  -306,  -306,  -306,  -306,  -306,  -306,  -306,
2284     -306,  -306,  -306,  -306,   -15,   -11,  -306,  -306,    15,  -306,
2285       17,  -306,  -306,  -306,  -306,  -306,  -306,  -306,  -193,    19,
2286     -306,  -306,  -306,  -306,     0,  -306,   335,  -306,  -306,  -306,
2287       31,  -306,    39,  -306,  -306,  -306,   -38,  -306,  -306,   -23,
2288     -306,     2,    27,  -306,  -305,  -306,  -271,   -41,     3,  -306,
2289     -306,  -306,  -306,   398,  -306,   -20,    57,    80,  -184,  -306,
2290      -93,  -306,  -306,  -306,  -306,  -306,   -26,   -17,   -46,   -18,
2291     -306,  -306,  -306,  -306,  -306,  -306
2292 };
2293
2294 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
2295    positive, shift that token.  If negative, reduce the rule which
2296    number is the opposite.  If zero, do what YYDEFACT says.
2297    If YYTABLE_NINF, syntax error.  */
2298 #define YYTABLE_NINF -206
2299 static const yytype_int16 yytable[] =
2300 {
2301       63,    50,    68,    69,    93,    99,   188,   127,   295,    79,
2302      210,   135,   297,   295,   297,   135,    51,   104,   115,   106,
2303      107,    95,   108,   109,   110,   114,   114,   342,   118,   225,
2304      339,    66,    88,    89,   340,   386,    85,   316,    84,    67,
2305      387,    81,   135,   217,    96,   226,   324,   302,    63,    50,
2306       68,    69,   303,    85,   398,     1,     2,     3,   345,     4,
2307        5,     6,     7,     8,    51,   373,    95,    85,   374,   375,
2308      376,    91,   377,   385,   328,    84,    18,   205,    20,    66,
2309       21,    85,   207,   270,   368,   114,    80,    67,   102,    83,
2310       85,   103,   128,   303,   200,   201,    27,   130,   349,   298,
2311      101,   384,    94,   392,    32,   378,    33,    34,    85,   296,
2312      100,   132,   105,   414,   397,   379,   380,   231,   232,   233,
2313      234,   235,   236,   237,   238,   239,   240,   241,   242,   243,
2314      244,   245,   246,   247,   248,   249,   250,   251,   252,    37,
2315       38,   253,   254,   255,   256,   257,   258,   259,   260,   261,
2316      262,   263,   264,   265,   266,   267,   268,    86,   114,   383,
2317      115,   271,   304,   406,   274,   275,   474,   119,   280,   357,
2318      135,   135,    43,   135,    44,   439,   350,   440,    45,   -66,
2319      284,   135,   404,   405,   114,   135,   177,   310,   311,   209,
2320      312,   407,  -104,   202,   309,   114,   114,   204,   114,    63,
2321       50,   295,   331,   347,   206,   455,   317,   318,   212,   456,
2322      457,   354,   213,   358,   121,     2,     3,   403,     4,     5,
2323        6,     7,     8,   214,   215,   216,   188,   463,   157,   158,
2324      218,   331,   -67,   221,   223,    18,   224,    20,   441,    21,
2325      470,   228,   122,   128,   229,   475,    22,   129,   130,   230,
2326      157,   158,   188,    26,   458,    27,   123,   269,   273,   272,
2327      131,   174,   132,    32,   175,    33,    34,   176,   276,   281,
2328      282,   188,   308,    35,   313,   171,   172,   173,   283,   315,
2329      319,   320,   188,   174,   322,   327,   175,    63,    50,   176,
2330      329,   333,   478,   338,    63,    50,   332,   297,    37,    38,
2331      360,   343,   363,   335,   344,   346,   348,   367,   354,   359,
2332      365,   396,   361,   370,   371,   369,   394,   372,   400,   401,
2333      339,    40,   393,   413,   415,   416,    41,    42,   395,   421,
2334      114,    43,   419,    44,   422,   432,   114,    45,   433,   438,
2335      450,   363,   451,   188,   452,   188,   459,   460,   464,    -3,
2336      468,   465,     1,     2,     3,   466,     4,     5,     6,     7,
2337        8,     9,    10,    11,    12,   471,   472,    13,    14,    15,
2338       16,   473,    17,    18,    19,   120,   476,    21,   477,   337,
2339      336,   424,   366,   278,    22,   124,    23,    24,   431,    25,
2340      356,    26,   219,    27,   434,    28,    29,    30,   435,   134,
2341       31,    32,   427,    33,    34,   417,   453,   418,   461,   412,
2342      462,    35,    36,    14,    15,    16,    90,    17,   399,    19,
2343      382,     0,     0,   444,   443,   448,   449,   157,   158,   427,
2344        0,    23,     0,     0,     0,     0,    37,    38,     0,   425,
2345       28,    29,    30,     0,     0,    39,   444,   443,   448,   449,
2346      169,   170,   171,   172,   173,     0,     0,     0,     0,    40,
2347      174,     0,     0,   175,    41,    42,   176,     0,     0,    43,
2348        0,    44,     0,    -4,     0,    45,     1,     2,     3,     0,
2349        4,     5,     6,     7,     8,     9,    10,    11,    12,     0,
2350      426,    13,    14,    15,    16,     0,    17,    18,    19,     0,
2351        0,    21,     0,     0,     0,     0,     0,     0,    22,     0,
2352       23,    24,     0,    25,     0,    26,     0,    27,     0,    28,
2353       29,    30,  -145,     0,    31,    32,     0,    33,    34,     0,
2354        0,     0,     0,     0,     0,    35,    36,     0,     0,     0,
2355        0,     0,     0,     0,     0,     0,     0,     0,    14,    15,
2356       16,     0,    17,     0,    19,     0,     0,     0,     0,     0,
2357       37,    38,     0,     0,     0,     0,    23,     0,     0,    39,
2358        0,     0,     0,     0,   425,    28,    29,    30,     0,     0,
2359        0,     0,     0,    40,     0,     0,     0,     0,    41,    42,
2360        0,     0,     0,    43,     0,    44,     1,     2,     3,    45,
2361        4,     5,     6,     7,     8,     9,    10,    11,    12,     0,
2362        0,     0,    14,    15,    16,   179,    17,    18,    19,    20,
2363        0,    21,   180,     0,   122,   426,     0,     0,    22,   181,
2364       23,    24,     0,    25,   182,    26,     0,    27,   183,    28,
2365       29,    30,     0,     0,    31,    32,     0,    33,    34,     0,
2366        0,     0,     0,     0,     0,    35,    36,  -146,   184,    14,
2367       15,    16,     0,    17,     0,    19,     0,     0,     0,     0,
2368        0,     0,     0,     0,     0,     0,     0,    23,     0,     0,
2369       37,    38,     0,     0,     0,     0,    28,    29,    30,   185,
2370        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2371        0,     0,     0,    40,     0,     0,     0,     0,    41,    42,
2372        0,     0,     0,    43,     0,    44,     0,     0,     0,    45,
2373        0,   277,     1,     2,     3,     0,     4,     5,     6,     7,
2374        8,     9,    10,    11,    12,     0,     0,     0,    14,    15,
2375       16,   179,    17,    18,    19,    20,     0,    21,   180,     0,
2376      122,     0,     0,     0,    22,   181,    23,    24,     0,    25,
2377      182,    26,     0,    27,   183,    28,    29,    30,     0,     0,
2378       31,    32,     0,    33,    34,     0,     0,     0,     0,     0,
2379        0,    35,    36,     0,   184,     0,     0,     0,     0,     0,
2380        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2381        0,     0,     0,     0,     0,     0,    37,    38,     0,     0,
2382        0,     0,     0,     0,     0,   185,     0,     0,     0,     0,
2383        0,     0,     0,     0,     0,     0,     0,     0,     0,    40,
2384        0,     0,     0,     0,    41,    42,     0,     0,     0,    43,
2385        0,    44,     0,     0,     0,    45,     0,   330,     1,     2,
2386        3,     0,     4,     5,     6,     7,     8,     9,    10,    11,
2387       12,     0,     0,     0,    14,    15,    16,     0,    17,    18,
2388       19,     0,     0,    21,     0,   136,     0,     0,     0,     0,
2389       22,     0,    23,    24,     0,    25,     0,    26,     0,    27,
2390        0,    28,    29,    30,     0,     0,    31,    32,     0,    33,
2391       34,     0,  -206,  -206,  -206,     0,     0,    35,    36,   144,
2392      145,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2393        0,     0,     0,   157,   158,     0,     0,   159,   160,   161,
2394        0,     0,    37,    38,     0,     0,     0,     0,     0,     0,
2395        0,   285,     0,   167,   168,     0,   169,   170,   171,   172,
2396      173,     0,     0,     0,     0,    40,   174,     0,     0,   175,
2397       41,    42,   176,     0,     0,    43,     0,    44,     0,     0,
2398        0,    45,     0,   -14,     1,     2,     3,     0,     4,     5,
2399        6,     7,     8,     9,    10,    11,    12,     0,     0,     0,
2400       14,    15,    16,     0,    17,    18,    19,     0,     0,    21,
2401        0,  -206,     0,     0,     0,     0,    22,     0,    23,    24,
2402        0,    25,     0,    26,     0,    27,     0,    28,    29,    30,
2403        0,     0,    31,    32,     0,    33,    34,     0,     0,     0,
2404        0,     0,     0,    35,    36,  -206,  -206,     0,     0,     0,
2405        0,     0,     0,     0,     0,     0,     0,     0,     0,   157,
2406      158,     0,     0,   159,   160,   161,     0,     0,    37,    38,
2407        0,     0,     0,     0,     0,     0,     0,   285,     0,  -206,
2408     -206,     0,   169,   170,   171,   172,   173,     0,     0,     0,
2409        0,    40,   174,     0,     0,   175,    41,    42,   176,     0,
2410        0,    43,     0,    44,     0,     0,     0,    45,     0,   -15,
2411        1,     2,     3,     0,     4,     5,     6,     7,     8,     9,
2412       10,    11,    12,     0,     0,     0,    14,    15,    16,     0,
2413       17,    18,    19,     0,     0,    21,     0,     0,     0,     0,
2414        0,     0,    22,     0,    23,    24,     0,    25,     0,    26,
2415        0,    27,     0,    28,    29,    30,     0,     0,    31,    32,
2416        0,    33,    34,     0,     0,     0,     0,     0,     0,    35,
2417       36,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2418        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2419        0,     0,     0,     0,    37,    38,     0,     0,     0,     0,
2420        0,     0,     0,   442,     0,     0,     0,     0,     0,     0,
2421        0,     0,     0,     0,     0,     0,     0,    40,     0,     0,
2422        0,     0,    41,    42,     0,     0,     0,    43,     0,    44,
2423        0,     0,     0,    45,     0,  -137,     1,     2,     3,     0,
2424        4,     5,     6,     7,     8,     9,    10,    11,    12,     0,
2425        0,     0,    14,    15,    16,     0,    17,    18,    19,     0,
2426        0,    21,     0,     0,     0,     0,     0,     0,    22,     0,
2427       23,    24,     0,    25,     0,    26,     0,    27,     0,    28,
2428       29,    30,     0,     0,    31,    32,     0,    33,    34,     0,
2429        0,     0,     0,     0,     0,    35,    36,     0,     0,     0,
2430        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2431        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2432       37,    38,     0,     0,     0,     0,     0,     0,     0,   442,
2433        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2434        0,     0,     0,    40,     0,     0,     0,     0,    41,    42,
2435        0,     0,     0,    43,     0,    44,     0,     0,     0,    45,
2436        0,  -138,     1,     2,     3,     0,     4,     5,     6,     7,
2437        8,     9,    10,    11,    12,     0,  -114,     0,    14,    15,
2438       16,   179,    17,    18,    19,    20,     0,    21,   180,     0,
2439      122,     0,     0,     0,    22,   181,    23,    24,     0,    25,
2440      182,    26,     0,    27,   183,    28,    29,    30,     0,     0,
2441       31,    32,     0,    33,    34,     0,     0,     0,     0,     0,
2442        0,    35,    36,     0,   184,     0,     0,     0,     0,     0,
2443        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2444        0,     0,     0,     0,     0,     0,    37,    38,     0,     0,
2445        0,     0,     0,     0,     0,   185,     0,     0,     0,     0,
2446        0,     0,     0,     0,     0,     0,     0,     0,     0,    40,
2447        0,     0,     0,     0,    41,    42,     0,     0,     0,    43,
2448        0,    44,     1,     2,     3,    45,     4,     5,     6,     7,
2449        8,     9,    10,    11,    12,     0,     0,     0,    14,    15,
2450       16,   179,    17,    18,    19,    20,     0,    21,   180,     0,
2451      122,     0,     0,     0,    22,   181,    23,    24,     0,    25,
2452      182,    26,     0,    27,   183,    28,    29,    30,     0,     0,
2453       31,    32,     0,    33,    34,     0,     0,     0,     0,     0,
2454        0,    35,    36,     0,   184,     0,     0,     0,     0,     0,
2455        0,     1,     2,     3,     0,     4,     5,     6,     7,     8,
2456        0,     0,     0,     0,     0,     0,    37,    38,     0,     0,
2457        0,     0,    18,     0,    20,   185,    21,     0,     0,     0,
2458        0,     0,     0,    22,     0,     0,     0,     0,     0,    40,
2459       26,     0,    27,     0,    41,    42,     0,     0,     0,    43,
2460       32,   186,    33,    34,     0,    45,     0,     0,     0,     0,
2461       35,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2462        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2463        0,     0,     0,     0,     0,    37,    38,     0,     0,     0,
2464        0,     0,     0,     0,     0,     0,     0,     0,   136,     0,
2465        0,     0,     0,     0,     0,     0,     0,     0,    40,     0,
2466        0,     0,     0,    41,    42,     0,     0,     0,    43,     0,
2467       44,     0,     0,     0,    45,   137,   138,   139,   140,   141,
2468      142,   143,   144,   145,   146,   147,   148,   149,   150,   151,
2469      152,   153,   154,   155,   156,     0,   157,   158,     0,     0,
2470      159,   160,   161,     0,     0,     0,     0,     0,   162,     0,
2471        0,   163,   136,   164,   165,   166,   167,   168,     0,   169,
2472      170,   171,   172,   173,     0,     0,     0,     0,     0,   174,
2473        0,     0,   175,     0,     0,   176,     0,     0,   305,   137,
2474      138,   139,   140,   141,   142,   143,   144,   145,   146,   147,
2475      148,   149,   150,   151,   152,   153,   154,   155,   156,     0,
2476      157,   158,     0,     0,   159,   160,   161,     0,     0,     0,
2477        0,     0,   162,     0,     0,   163,   136,   164,   165,   166,
2478      167,   168,     0,   169,   170,   171,   172,   173,     0,     0,
2479        0,     0,     0,   174,     0,     0,   175,     0,     0,   176,
2480        0,     0,   334,   137,   138,   139,   140,   141,   142,   143,
2481      144,   145,   146,   147,   148,   149,   150,   151,   152,   153,
2482      154,   155,   156,     0,   157,   158,     0,     0,   159,   160,
2483      161,     0,     0,     0,     0,     0,   162,   136,     0,   163,
2484      325,   164,   165,   166,   167,   168,     0,   169,   170,   171,
2485      172,   173,     0,     0,     0,     0,     0,   174,     0,     0,
2486      175,     0,     0,   176,   137,   138,   139,   140,   141,   142,
2487      143,   144,   145,   146,   147,   148,   149,   150,   151,   152,
2488      153,   154,   155,   156,     0,   157,   158,     0,     0,   159,
2489      160,   161,     0,     0,     0,     0,     0,   162,   136,     0,
2490      163,     0,   164,   165,   166,   167,   168,     0,   169,   170,
2491      171,   172,   173,     0,     0,     0,     0,     0,   174,   326,
2492        0,   175,     0,     0,   176,   137,   138,   139,   140,   141,
2493      142,   143,   144,   145,   146,   147,   148,   149,   150,   151,
2494      152,   153,   154,   155,   156,     0,   157,   158,     0,     0,
2495      159,   160,   161,     0,     0,     0,     0,     0,   162,   136,
2496        0,   163,  -205,   164,   165,   166,   167,   168,     0,   169,
2497      170,   171,   172,   173,     0,     0,     0,     0,     0,   174,
2498        0,     0,   175,     0,     0,   176,   137,   138,   139,   140,
2499      141,   142,   143,   144,   145,   146,   147,   148,   149,   150,
2500      151,   152,   153,   154,   155,   156,     0,   157,   158,     0,
2501        0,   159,   160,   161,     0,     0,     0,     0,     0,   162,
2502      136,     0,   163,   454,   164,   165,   166,   167,   168,     0,
2503      169,   170,   171,   172,   173,     0,     0,     0,     0,     0,
2504      174,     0,     0,   175,     0,     0,   176,   137,   138,   139,
2505      140,   141,   142,   143,   144,   145,   146,   147,   148,   149,
2506      150,   151,   152,   153,   154,   155,   156,     0,   157,   158,
2507        0,     0,   159,   160,   161,     0,     0,     0,     0,     0,
2508      162,   136,     0,   163,     0,   164,   165,   166,   167,   168,
2509        0,   169,   170,   171,   172,   173,     0,     0,     0,     0,
2510        0,   174,     0,     0,   175,     0,     0,   176,   137,   138,
2511      139,   140,   141,   142,   143,   144,   145,     0,     0,     0,
2512        0,     0,     0,     0,     0,     0,     0,   156,     0,   157,
2513      158,     0,     0,   159,   160,   161,     0,     0,     0,     0,
2514        0,     0,   136,     0,     0,     0,   164,   165,   166,   167,
2515      168,     0,   169,   170,   171,   172,   173,     0,     0,     0,
2516        0,     0,   174,     0,     0,   175,     0,     0,   176,   137,
2517      138,   139,   140,   141,   142,   143,   144,   145,     0,     0,
2518        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2519      157,   158,     0,     0,   159,   160,   161,     0,     0,     0,
2520        0,     0,     0,   136,     0,     0,     0,   164,   165,   166,
2521      167,   168,     0,   169,   170,   171,   172,   173,     0,     0,
2522        0,     0,     0,   174,     0,     0,   175,     0,     0,   176,
2523      137,   138,   139,   140,   141,   142,   143,   144,   145,     0,
2524        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2525        0,   157,   158,     0,     0,   159,   160,   161,     0,     0,
2526        0,     0,     0,     0,   136,     0,     0,     0,     0,   165,
2527      166,   167,   168,     0,   169,   170,   171,   172,   173,     0,
2528        0,     0,     0,     0,   174,     0,     0,   175,     0,     0,
2529      176,   137,   138,   139,   140,   141,   142,   143,   144,   145,
2530        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2531        0,     0,   157,   158,     0,     0,   159,   160,   161,     0,
2532        0,     0,     0,     0,     0,   136,     0,     0,     0,     0,
2533        0,   166,   167,   168,     0,   169,   170,   171,   172,   173,
2534        0,     0,     0,     0,     0,   174,     0,     0,   175,     0,
2535        0,   176,   137,   138,   139,   140,   141,   142,   143,   144,
2536      145,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2537        0,     0,     0,   157,   158,     0,     0,   159,   160,   161,
2538        0,     0,     0,     0,     0,     0,   136,     0,     0,     0,
2539        0,     0,  -206,   167,   168,     0,   169,   170,   171,   172,
2540      173,     0,     0,     0,     0,     0,   174,     0,     0,   175,
2541        0,     0,   176,   137,   138,   139,  -206,  -206,  -206,  -206,
2542      144,   145,     0,     0,     0,     0,     0,     0,     0,     0,
2543        0,     0,     0,     0,   157,   158,     0,     0,   159,   160,
2544      161,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2545        0,     0,     0,     0,   167,   168,     0,   169,   170,   171,
2546      172,   173,     0,     0,     0,     0,     0,   174,     0,     0,
2547      175,     0,     0,   176
2548 };
2549
2550 static const yytype_int16 yycheck[] =
2551 {
2552        0,     0,     0,     0,    22,    25,    82,    53,   201,    49,
2553      103,    97,     3,   206,     3,    97,     0,    35,    44,    37,
2554       38,     3,    40,    41,    42,    43,    44,   298,    45,    34,
2555       99,     0,    13,     3,   103,    27,    18,   221,     3,     0,
2556       32,   126,    97,   129,    25,    50,   230,   129,    48,    48,
2557       48,    48,     3,    18,   359,     3,     4,     5,   302,     7,
2558        8,     9,    10,    11,    48,     4,     3,    18,     7,     8,
2559        9,     3,    11,   344,   129,     3,    24,    94,    26,    48,
2560       28,    18,   100,   176,   328,   103,   126,    48,   123,   126,
2561       18,   126,    26,     3,   122,   123,    44,    31,    35,    90,
2562      122,    90,   126,   347,    52,    44,    54,    55,    18,   202,
2563      126,    45,   126,   384,   358,    54,    55,   135,   136,   137,
2564      138,   139,   140,   141,   142,   143,   144,   145,   146,   147,
2565      148,   149,   150,   151,   152,   153,   154,   155,   156,    87,
2566       88,   159,   160,   161,   162,   163,   164,   165,   166,   167,
2567      168,   169,   170,   171,   172,   173,   174,   122,   176,   343,
2568      186,   178,   113,    33,   181,   182,   471,     0,   186,    96,
2569       97,    97,   120,    97,   122,   419,   113,   421,   126,    67,
2570      198,    97,     3,     4,   202,    97,   126,   213,   214,     3,
2571      216,    61,   123,   126,   211,   213,   214,   126,   216,   199,
2572      199,   394,   278,   129,   123,   432,   223,   224,   121,   436,
2573      437,    99,    97,   129,     3,     4,     5,   129,     7,     8,
2574        9,    10,    11,   103,   128,    97,   302,   454,    87,    88,
2575        3,   307,    67,     3,    96,    24,    67,    26,   422,    28,
2576      467,     3,    31,    26,     3,   472,    35,    30,    31,     3,
2577       87,    88,   328,    42,   438,    44,    45,     3,     3,    17,
2578       43,   120,    45,    52,   123,    54,    55,   126,     3,    96,
2579       13,   347,   129,    62,   103,   112,   113,   114,    17,    97,
2580        3,    53,   358,   120,    53,   129,   123,   287,   287,   126,
2581        3,     3,   476,   129,   294,   294,   126,     3,    87,    88,
2582      320,   129,   322,   128,    97,   128,   103,   325,    99,   126,
2583      122,   357,    16,    99,   122,   332,   123,   128,   122,    97,
2584       99,   110,   348,   122,   122,   126,   115,   116,   354,   129,
2585      348,   120,    64,   122,   129,   103,   354,   126,   128,     3,
2586        3,   361,    26,   419,   128,   421,   122,   128,   128,     0,
2587        3,   128,     3,     4,     5,   129,     7,     8,     9,    10,
2588       11,    12,    13,    14,    15,   126,   122,    18,    19,    20,
2589       21,   128,    23,    24,    25,    48,   129,    28,   128,   294,
2590      287,   401,   324,   186,    35,    53,    37,    38,   406,    40,
2591      315,    42,   122,    44,   409,    46,    47,    48,   409,    64,
2592       51,    52,   402,    54,    55,   390,   429,   390,   446,   382,
2593      451,    62,    63,    19,    20,    21,    18,    23,   361,    25,
2594      340,    -1,    -1,   423,   423,   423,   423,    87,    88,   429,
2595       -1,    37,    -1,    -1,    -1,    -1,    87,    88,    -1,    45,
2596       46,    47,    48,    -1,    -1,    96,   446,   446,   446,   446,
2597      110,   111,   112,   113,   114,    -1,    -1,    -1,    -1,   110,
2598      120,    -1,    -1,   123,   115,   116,   126,    -1,    -1,   120,
2599       -1,   122,    -1,     0,    -1,   126,     3,     4,     5,    -1,
2600        7,     8,     9,    10,    11,    12,    13,    14,    15,    -1,
2601       96,    18,    19,    20,    21,    -1,    23,    24,    25,    -1,
2602       -1,    28,    -1,    -1,    -1,    -1,    -1,    -1,    35,    -1,
2603       37,    38,    -1,    40,    -1,    42,    -1,    44,    -1,    46,
2604       47,    48,   128,    -1,    51,    52,    -1,    54,    55,    -1,
2605       -1,    -1,    -1,    -1,    -1,    62,    63,    -1,    -1,    -1,
2606       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    19,    20,
2607       21,    -1,    23,    -1,    25,    -1,    -1,    -1,    -1,    -1,
2608       87,    88,    -1,    -1,    -1,    -1,    37,    -1,    -1,    96,
2609       -1,    -1,    -1,    -1,    45,    46,    47,    48,    -1,    -1,
2610       -1,    -1,    -1,   110,    -1,    -1,    -1,    -1,   115,   116,
2611       -1,    -1,    -1,   120,    -1,   122,     3,     4,     5,   126,
2612        7,     8,     9,    10,    11,    12,    13,    14,    15,    -1,
2613       -1,    -1,    19,    20,    21,    22,    23,    24,    25,    26,
2614       -1,    28,    29,    -1,    31,    96,    -1,    -1,    35,    36,
2615       37,    38,    -1,    40,    41,    42,    -1,    44,    45,    46,
2616       47,    48,    -1,    -1,    51,    52,    -1,    54,    55,    -1,
2617       -1,    -1,    -1,    -1,    -1,    62,    63,   128,    65,    19,
2618       20,    21,    -1,    23,    -1,    25,    -1,    -1,    -1,    -1,
2619       -1,    -1,    -1,    -1,    -1,    -1,    -1,    37,    -1,    -1,
2620       87,    88,    -1,    -1,    -1,    -1,    46,    47,    48,    96,
2621       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
2622       -1,    -1,    -1,   110,    -1,    -1,    -1,    -1,   115,   116,
2623       -1,    -1,    -1,   120,    -1,   122,    -1,    -1,    -1,   126,
2624       -1,   128,     3,     4,     5,    -1,     7,     8,     9,    10,
2625       11,    12,    13,    14,    15,    -1,    -1,    -1,    19,    20,
2626       21,    22,    23,    24,    25,    26,    -1,    28,    29,    -1,
2627       31,    -1,    -1,    -1,    35,    36,    37,    38,    -1,    40,
2628       41,    42,    -1,    44,    45,    46,    47,    48,    -1,    -1,
2629       51,    52,    -1,    54,    55,    -1,    -1,    -1,    -1,    -1,
2630       -1,    62,    63,    -1,    65,    -1,    -1,    -1,    -1,    -1,
2631       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
2632       -1,    -1,    -1,    -1,    -1,    -1,    87,    88,    -1,    -1,
2633       -1,    -1,    -1,    -1,    -1,    96,    -1,    -1,    -1,    -1,
2634       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   110,
2635       -1,    -1,    -1,    -1,   115,   116,    -1,    -1,    -1,   120,
2636       -1,   122,    -1,    -1,    -1,   126,    -1,   128,     3,     4,
2637        5,    -1,     7,     8,     9,    10,    11,    12,    13,    14,
2638       15,    -1,    -1,    -1,    19,    20,    21,    -1,    23,    24,
2639       25,    -1,    -1,    28,    -1,    39,    -1,    -1,    -1,    -1,
2640       35,    -1,    37,    38,    -1,    40,    -1,    42,    -1,    44,
2641       -1,    46,    47,    48,    -1,    -1,    51,    52,    -1,    54,
2642       55,    -1,    66,    67,    68,    -1,    -1,    62,    63,    73,
2643       74,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
2644       -1,    -1,    -1,    87,    88,    -1,    -1,    91,    92,    93,
2645       -1,    -1,    87,    88,    -1,    -1,    -1,    -1,    -1,    -1,
2646       -1,    96,    -1,   107,   108,    -1,   110,   111,   112,   113,
2647      114,    -1,    -1,    -1,    -1,   110,   120,    -1,    -1,   123,
2648      115,   116,   126,    -1,    -1,   120,    -1,   122,    -1,    -1,
2649       -1,   126,    -1,   128,     3,     4,     5,    -1,     7,     8,
2650        9,    10,    11,    12,    13,    14,    15,    -1,    -1,    -1,
2651       19,    20,    21,    -1,    23,    24,    25,    -1,    -1,    28,
2652       -1,    39,    -1,    -1,    -1,    -1,    35,    -1,    37,    38,
2653       -1,    40,    -1,    42,    -1,    44,    -1,    46,    47,    48,
2654       -1,    -1,    51,    52,    -1,    54,    55,    -1,    -1,    -1,
2655       -1,    -1,    -1,    62,    63,    73,    74,    -1,    -1,    -1,
2656       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    87,
2657       88,    -1,    -1,    91,    92,    93,    -1,    -1,    87,    88,
2658       -1,    -1,    -1,    -1,    -1,    -1,    -1,    96,    -1,   107,
2659      108,    -1,   110,   111,   112,   113,   114,    -1,    -1,    -1,
2660       -1,   110,   120,    -1,    -1,   123,   115,   116,   126,    -1,
2661       -1,   120,    -1,   122,    -1,    -1,    -1,   126,    -1,   128,
2662        3,     4,     5,    -1,     7,     8,     9,    10,    11,    12,
2663       13,    14,    15,    -1,    -1,    -1,    19,    20,    21,    -1,
2664       23,    24,    25,    -1,    -1,    28,    -1,    -1,    -1,    -1,
2665       -1,    -1,    35,    -1,    37,    38,    -1,    40,    -1,    42,
2666       -1,    44,    -1,    46,    47,    48,    -1,    -1,    51,    52,
2667       -1,    54,    55,    -1,    -1,    -1,    -1,    -1,    -1,    62,
2668       63,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
2669       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
2670       -1,    -1,    -1,    -1,    87,    88,    -1,    -1,    -1,    -1,
2671       -1,    -1,    -1,    96,    -1,    -1,    -1,    -1,    -1,    -1,
2672       -1,    -1,    -1,    -1,    -1,    -1,    -1,   110,    -1,    -1,
2673       -1,    -1,   115,   116,    -1,    -1,    -1,   120,    -1,   122,
2674       -1,    -1,    -1,   126,    -1,   128,     3,     4,     5,    -1,
2675        7,     8,     9,    10,    11,    12,    13,    14,    15,    -1,
2676       -1,    -1,    19,    20,    21,    -1,    23,    24,    25,    -1,
2677       -1,    28,    -1,    -1,    -1,    -1,    -1,    -1,    35,    -1,
2678       37,    38,    -1,    40,    -1,    42,    -1,    44,    -1,    46,
2679       47,    48,    -1,    -1,    51,    52,    -1,    54,    55,    -1,
2680       -1,    -1,    -1,    -1,    -1,    62,    63,    -1,    -1,    -1,
2681       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
2682       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
2683       87,    88,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    96,
2684       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
2685       -1,    -1,    -1,   110,    -1,    -1,    -1,    -1,   115,   116,
2686       -1,    -1,    -1,   120,    -1,   122,    -1,    -1,    -1,   126,
2687       -1,   128,     3,     4,     5,    -1,     7,     8,     9,    10,
2688       11,    12,    13,    14,    15,    -1,    17,    -1,    19,    20,
2689       21,    22,    23,    24,    25,    26,    -1,    28,    29,    -1,
2690       31,    -1,    -1,    -1,    35,    36,    37,    38,    -1,    40,
2691       41,    42,    -1,    44,    45,    46,    47,    48,    -1,    -1,
2692       51,    52,    -1,    54,    55,    -1,    -1,    -1,    -1,    -1,
2693       -1,    62,    63,    -1,    65,    -1,    -1,    -1,    -1,    -1,
2694       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
2695       -1,    -1,    -1,    -1,    -1,    -1,    87,    88,    -1,    -1,
2696       -1,    -1,    -1,    -1,    -1,    96,    -1,    -1,    -1,    -1,
2697       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   110,
2698       -1,    -1,    -1,    -1,   115,   116,    -1,    -1,    -1,   120,
2699       -1,   122,     3,     4,     5,   126,     7,     8,     9,    10,
2700       11,    12,    13,    14,    15,    -1,    -1,    -1,    19,    20,
2701       21,    22,    23,    24,    25,    26,    -1,    28,    29,    -1,
2702       31,    -1,    -1,    -1,    35,    36,    37,    38,    -1,    40,
2703       41,    42,    -1,    44,    45,    46,    47,    48,    -1,    -1,
2704       51,    52,    -1,    54,    55,    -1,    -1,    -1,    -1,    -1,
2705       -1,    62,    63,    -1,    65,    -1,    -1,    -1,    -1,    -1,
2706       -1,     3,     4,     5,    -1,     7,     8,     9,    10,    11,
2707       -1,    -1,    -1,    -1,    -1,    -1,    87,    88,    -1,    -1,
2708       -1,    -1,    24,    -1,    26,    96,    28,    -1,    -1,    -1,
2709       -1,    -1,    -1,    35,    -1,    -1,    -1,    -1,    -1,   110,
2710       42,    -1,    44,    -1,   115,   116,    -1,    -1,    -1,   120,
2711       52,   122,    54,    55,    -1,   126,    -1,    -1,    -1,    -1,
2712       62,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
2713       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
2714       -1,    -1,    -1,    -1,    -1,    87,    88,    -1,    -1,    -1,
2715       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    39,    -1,
2716       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   110,    -1,
2717       -1,    -1,    -1,   115,   116,    -1,    -1,    -1,   120,    -1,
2718      122,    -1,    -1,    -1,   126,    66,    67,    68,    69,    70,
2719       71,    72,    73,    74,    75,    76,    77,    78,    79,    80,
2720       81,    82,    83,    84,    85,    -1,    87,    88,    -1,    -1,
2721       91,    92,    93,    -1,    -1,    -1,    -1,    -1,    99,    -1,
2722       -1,   102,    39,   104,   105,   106,   107,   108,    -1,   110,
2723      111,   112,   113,   114,    -1,    -1,    -1,    -1,    -1,   120,
2724       -1,    -1,   123,    -1,    -1,   126,    -1,    -1,   129,    66,
2725       67,    68,    69,    70,    71,    72,    73,    74,    75,    76,
2726       77,    78,    79,    80,    81,    82,    83,    84,    85,    -1,
2727       87,    88,    -1,    -1,    91,    92,    93,    -1,    -1,    -1,
2728       -1,    -1,    99,    -1,    -1,   102,    39,   104,   105,   106,
2729      107,   108,    -1,   110,   111,   112,   113,   114,    -1,    -1,
2730       -1,    -1,    -1,   120,    -1,    -1,   123,    -1,    -1,   126,
2731       -1,    -1,   129,    66,    67,    68,    69,    70,    71,    72,
2732       73,    74,    75,    76,    77,    78,    79,    80,    81,    82,
2733       83,    84,    85,    -1,    87,    88,    -1,    -1,    91,    92,
2734       93,    -1,    -1,    -1,    -1,    -1,    99,    39,    -1,   102,
2735      103,   104,   105,   106,   107,   108,    -1,   110,   111,   112,
2736      113,   114,    -1,    -1,    -1,    -1,    -1,   120,    -1,    -1,
2737      123,    -1,    -1,   126,    66,    67,    68,    69,    70,    71,
2738       72,    73,    74,    75,    76,    77,    78,    79,    80,    81,
2739       82,    83,    84,    85,    -1,    87,    88,    -1,    -1,    91,
2740       92,    93,    -1,    -1,    -1,    -1,    -1,    99,    39,    -1,
2741      102,    -1,   104,   105,   106,   107,   108,    -1,   110,   111,
2742      112,   113,   114,    -1,    -1,    -1,    -1,    -1,   120,   121,
2743       -1,   123,    -1,    -1,   126,    66,    67,    68,    69,    70,
2744       71,    72,    73,    74,    75,    76,    77,    78,    79,    80,
2745       81,    82,    83,    84,    85,    -1,    87,    88,    -1,    -1,
2746       91,    92,    93,    -1,    -1,    -1,    -1,    -1,    99,    39,
2747       -1,   102,   103,   104,   105,   106,   107,   108,    -1,   110,
2748      111,   112,   113,   114,    -1,    -1,    -1,    -1,    -1,   120,
2749       -1,    -1,   123,    -1,    -1,   126,    66,    67,    68,    69,
2750       70,    71,    72,    73,    74,    75,    76,    77,    78,    79,
2751       80,    81,    82,    83,    84,    85,    -1,    87,    88,    -1,
2752       -1,    91,    92,    93,    -1,    -1,    -1,    -1,    -1,    99,
2753       39,    -1,   102,   103,   104,   105,   106,   107,   108,    -1,
2754      110,   111,   112,   113,   114,    -1,    -1,    -1,    -1,    -1,
2755      120,    -1,    -1,   123,    -1,    -1,   126,    66,    67,    68,
2756       69,    70,    71,    72,    73,    74,    75,    76,    77,    78,
2757       79,    80,    81,    82,    83,    84,    85,    -1,    87,    88,
2758       -1,    -1,    91,    92,    93,    -1,    -1,    -1,    -1,    -1,
2759       99,    39,    -1,   102,    -1,   104,   105,   106,   107,   108,
2760       -1,   110,   111,   112,   113,   114,    -1,    -1,    -1,    -1,
2761       -1,   120,    -1,    -1,   123,    -1,    -1,   126,    66,    67,
2762       68,    69,    70,    71,    72,    73,    74,    -1,    -1,    -1,
2763       -1,    -1,    -1,    -1,    -1,    -1,    -1,    85,    -1,    87,
2764       88,    -1,    -1,    91,    92,    93,    -1,    -1,    -1,    -1,
2765       -1,    -1,    39,    -1,    -1,    -1,   104,   105,   106,   107,
2766      108,    -1,   110,   111,   112,   113,   114,    -1,    -1,    -1,
2767       -1,    -1,   120,    -1,    -1,   123,    -1,    -1,   126,    66,
2768       67,    68,    69,    70,    71,    72,    73,    74,    -1,    -1,
2769       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
2770       87,    88,    -1,    -1,    91,    92,    93,    -1,    -1,    -1,
2771       -1,    -1,    -1,    39,    -1,    -1,    -1,   104,   105,   106,
2772      107,   108,    -1,   110,   111,   112,   113,   114,    -1,    -1,
2773       -1,    -1,    -1,   120,    -1,    -1,   123,    -1,    -1,   126,
2774       66,    67,    68,    69,    70,    71,    72,    73,    74,    -1,
2775       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
2776       -1,    87,    88,    -1,    -1,    91,    92,    93,    -1,    -1,
2777       -1,    -1,    -1,    -1,    39,    -1,    -1,    -1,    -1,   105,
2778      106,   107,   108,    -1,   110,   111,   112,   113,   114,    -1,
2779       -1,    -1,    -1,    -1,   120,    -1,    -1,   123,    -1,    -1,
2780      126,    66,    67,    68,    69,    70,    71,    72,    73,    74,
2781       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
2782       -1,    -1,    87,    88,    -1,    -1,    91,    92,    93,    -1,
2783       -1,    -1,    -1,    -1,    -1,    39,    -1,    -1,    -1,    -1,
2784       -1,   106,   107,   108,    -1,   110,   111,   112,   113,   114,
2785       -1,    -1,    -1,    -1,    -1,   120,    -1,    -1,   123,    -1,
2786       -1,   126,    66,    67,    68,    69,    70,    71,    72,    73,
2787       74,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
2788       -1,    -1,    -1,    87,    88,    -1,    -1,    91,    92,    93,
2789       -1,    -1,    -1,    -1,    -1,    -1,    39,    -1,    -1,    -1,
2790       -1,    -1,   106,   107,   108,    -1,   110,   111,   112,   113,
2791      114,    -1,    -1,    -1,    -1,    -1,   120,    -1,    -1,   123,
2792       -1,    -1,   126,    66,    67,    68,    69,    70,    71,    72,
2793       73,    74,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
2794       -1,    -1,    -1,    -1,    87,    88,    -1,    -1,    91,    92,
2795       93,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
2796       -1,    -1,    -1,    -1,   107,   108,    -1,   110,   111,   112,
2797      113,   114,    -1,    -1,    -1,    -1,    -1,   120,    -1,    -1,
2798      123,    -1,    -1,   126
2799 };
2800
2801 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
2802    symbol of state STATE-NUM.  */
2803 static const yytype_uint8 yystos[] =
2804 {
2805        0,     3,     4,     5,     7,     8,     9,    10,    11,    12,
2806       13,    14,    15,    18,    19,    20,    21,    23,    24,    25,
2807       26,    28,    35,    37,    38,    40,    42,    44,    46,    47,
2808       48,    51,    52,    54,    55,    62,    63,    87,    88,    96,
2809      110,   115,   116,   120,   122,   126,   131,   132,   133,   134,
2810      140,   143,   149,   153,   154,   155,   156,   158,   166,   174,
2811      177,   180,   183,   184,   185,   186,   190,   192,   201,   208,
2812      211,   222,   223,   224,   227,   228,   229,   230,   233,    49,
2813      126,   126,   159,   126,     3,    18,   122,   178,   179,     3,
2814      213,     3,   210,   229,   126,     3,   179,   213,   214,   215,
2815      126,   122,   123,   126,   229,   126,   229,   229,   229,   229,
2816      229,   220,   221,   226,   229,   226,   231,   232,   227,     0,
2817      134,     3,    31,    45,   145,   151,   152,   228,    26,    30,
2818       31,    43,    45,   200,   186,    97,    39,    66,    67,    68,
2819       69,    70,    71,    72,    73,    74,    75,    76,    77,    78,
2820       79,    80,    81,    82,    83,    84,    85,    87,    88,    91,
2821       92,    93,    99,   102,   104,   105,   106,   107,   108,   110,
2822      111,   112,   113,   114,   120,   123,   126,   126,   157,    22,
2823       29,    36,    41,    45,    65,    96,   122,   140,   141,   142,
2824      145,   160,   161,   176,   184,   225,   234,   235,   167,   182,
2825      122,   123,   126,   219,   126,   227,   123,   229,   175,     3,
2826      220,   150,   121,    97,   103,   128,    97,   129,     3,   146,
2827      147,     3,   146,    96,    67,    34,    50,   207,     3,     3,
2828        3,   229,   229,   229,   229,   229,   229,   229,   229,   229,
2829      229,   229,   229,   229,   229,   229,   229,   229,   229,   229,
2830      229,   229,   229,   229,   229,   229,   229,   229,   229,   229,
2831      229,   229,   229,   229,   229,   229,   229,   229,   229,     3,
2832      220,   227,    17,     3,   227,   227,     3,   128,   139,   141,
2833      229,    96,    13,    17,   229,    96,   135,   136,   137,   143,
2834      190,   192,   201,   208,   181,   178,   220,     3,    90,   204,
2835      205,   206,   129,     3,   113,   129,   138,   139,   129,   227,
2836      226,   226,   226,   103,   218,    97,   218,   227,   227,     3,
2837       53,   187,    53,   188,   218,   103,   121,   129,   129,     3,
2838      128,   141,   126,     3,   129,   128,   137,   135,   129,    99,
2839      103,   202,   206,   129,    97,   142,   128,   129,   103,    35,
2840      113,   179,   215,   217,    99,   144,   147,    96,   129,   126,
2841      215,    16,   189,   215,   216,   122,   144,   229,   142,   227,
2842       99,   122,   128,     4,     7,     8,     9,    11,    44,    54,
2843       55,   203,   217,   218,    90,   206,    27,    32,   168,   170,
2844      172,   173,   142,   226,   123,   226,   228,   142,   204,   216,
2845      122,    97,   193,   129,     3,     4,    33,    61,   162,   163,
2846      164,   165,   202,   122,   206,   122,   126,   168,   170,    64,
2847      148,   129,   129,   191,   215,    45,    96,   184,   197,   198,
2848      199,   229,   103,   128,   164,   165,   212,   171,     3,   142,
2849      142,   218,    96,   140,   184,   194,   195,   196,   201,   208,
2850        3,    26,   128,   199,   103,   138,   138,   138,   218,   122,
2851      128,   196,   207,   138,   128,   128,   129,   209,     3,   169,
2852      138,   126,   122,   128,   204,   138,   129,   128,   218
2853 };
2854
2855 #define yyerrok         (yyerrstatus = 0)
2856 #define yyclearin       (yychar = YYEMPTY)
2857 #define YYEMPTY         (-2)
2858 #define YYEOF           0
2859
2860 #define YYACCEPT        goto yyacceptlab
2861 #define YYABORT         goto yyabortlab
2862 #define YYERROR         goto yyerrorlab
2863
2864
2865 /* Like YYERROR except do call yyerror.  This remains here temporarily
2866    to ease the transition to the new meaning of YYERROR, for GCC.
2867    Once GCC version 2 has supplanted version 1, this can go.  */
2868
2869 #define YYFAIL          goto yyerrlab
2870
2871 #define YYRECOVERING()  (!!yyerrstatus)
2872
2873 #define YYBACKUP(Token, Value)                                  \
2874 do                                                              \
2875   if (yychar == YYEMPTY && yylen == 1)                          \
2876     {                                                           \
2877       yychar = (Token);                                         \
2878       yylval = (Value);                                         \
2879       yytoken = YYTRANSLATE (yychar);                           \
2880       YYPOPSTACK (1);                                           \
2881       goto yybackup;                                            \
2882     }                                                           \
2883   else                                                          \
2884     {                                                           \
2885       yyerror (YY_("syntax error: cannot back up")); \
2886       YYERROR;                                                  \
2887     }                                                           \
2888 while (YYID (0))
2889
2890
2891 #define YYTERROR        1
2892 #define YYERRCODE       256
2893
2894
2895 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
2896    If N is 0, then set CURRENT to the empty location which ends
2897    the previous symbol: RHS[0] (always defined).  */
2898
2899 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
2900 #ifndef YYLLOC_DEFAULT
2901 # define YYLLOC_DEFAULT(Current, Rhs, N)                                \
2902     do                                                                  \
2903       if (YYID (N))                                                    \
2904         {                                                               \
2905           (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
2906           (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
2907           (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
2908           (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
2909         }                                                               \
2910       else                                                              \
2911         {                                                               \
2912           (Current).first_line   = (Current).last_line   =              \
2913             YYRHSLOC (Rhs, 0).last_line;                                \
2914           (Current).first_column = (Current).last_column =              \
2915             YYRHSLOC (Rhs, 0).last_column;                              \
2916         }                                                               \
2917     while (YYID (0))
2918 #endif
2919
2920
2921 /* YY_LOCATION_PRINT -- Print the location on the stream.
2922    This macro was not mandated originally: define only if we know
2923    we won't break user code: when these are the locations we know.  */
2924
2925 #ifndef YY_LOCATION_PRINT
2926 # if YYLTYPE_IS_TRIVIAL
2927 #  define YY_LOCATION_PRINT(File, Loc)                  \
2928      fprintf (File, "%d.%d-%d.%d",                      \
2929               (Loc).first_line, (Loc).first_column,     \
2930               (Loc).last_line,  (Loc).last_column)
2931 # else
2932 #  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
2933 # endif
2934 #endif
2935
2936
2937 /* YYLEX -- calling `yylex' with the right arguments.  */
2938
2939 #ifdef YYLEX_PARAM
2940 # define YYLEX yylex (YYLEX_PARAM)
2941 #else
2942 # define YYLEX yylex ()
2943 #endif
2944
2945 /* Enable debugging if requested.  */
2946 #if YYDEBUG
2947
2948 # ifndef YYFPRINTF
2949 #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
2950 #  define YYFPRINTF fprintf
2951 # endif
2952
2953 # define YYDPRINTF(Args)                        \
2954 do {                                            \
2955   if (yydebug)                                  \
2956     YYFPRINTF Args;                             \
2957 } while (YYID (0))
2958
2959 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
2960 do {                                                                      \
2961   if (yydebug)                                                            \
2962     {                                                                     \
2963       YYFPRINTF (stderr, "%s ", Title);                                   \
2964       yy_symbol_print (stderr,                                            \
2965                   Type, Value); \
2966       YYFPRINTF (stderr, "\n");                                           \
2967     }                                                                     \
2968 } while (YYID (0))
2969
2970
2971 /*--------------------------------.
2972 | Print this symbol on YYOUTPUT.  |
2973 `--------------------------------*/
2974
2975 /*ARGSUSED*/
2976 #if (defined __STDC__ || defined __C99__FUNC__ \
2977      || defined __cplusplus || defined _MSC_VER)
2978 static void
2979 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
2980 #else
2981 static void
2982 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
2983     FILE *yyoutput;
2984     int yytype;
2985     YYSTYPE const * const yyvaluep;
2986 #endif
2987 {
2988   if (!yyvaluep)
2989     return;
2990 # ifdef YYPRINT
2991   if (yytype < YYNTOKENS)
2992     YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
2993 # else
2994   YYUSE (yyoutput);
2995 # endif
2996   switch (yytype)
2997     {
2998       default:
2999         break;
3000     }
3001 }
3002
3003
3004 /*--------------------------------.
3005 | Print this symbol on YYOUTPUT.  |
3006 `--------------------------------*/
3007
3008 #if (defined __STDC__ || defined __C99__FUNC__ \
3009      || defined __cplusplus || defined _MSC_VER)
3010 static void
3011 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
3012 #else
3013 static void
3014 yy_symbol_print (yyoutput, yytype, yyvaluep)
3015     FILE *yyoutput;
3016     int yytype;
3017     YYSTYPE const * const yyvaluep;
3018 #endif
3019 {
3020   if (yytype < YYNTOKENS)
3021     YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
3022   else
3023     YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
3024
3025   yy_symbol_value_print (yyoutput, yytype, yyvaluep);
3026   YYFPRINTF (yyoutput, ")");
3027 }
3028
3029 /*------------------------------------------------------------------.
3030 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
3031 | TOP (included).                                                   |
3032 `------------------------------------------------------------------*/
3033
3034 #if (defined __STDC__ || defined __C99__FUNC__ \
3035      || defined __cplusplus || defined _MSC_VER)
3036 static void
3037 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
3038 #else
3039 static void
3040 yy_stack_print (yybottom, yytop)
3041     yytype_int16 *yybottom;
3042     yytype_int16 *yytop;
3043 #endif
3044 {
3045   YYFPRINTF (stderr, "Stack now");
3046   for (; yybottom <= yytop; yybottom++)
3047     {
3048       int yybot = *yybottom;
3049       YYFPRINTF (stderr, " %d", yybot);
3050     }
3051   YYFPRINTF (stderr, "\n");
3052 }
3053
3054 # define YY_STACK_PRINT(Bottom, Top)                            \
3055 do {                                                            \
3056   if (yydebug)                                                  \
3057     yy_stack_print ((Bottom), (Top));                           \
3058 } while (YYID (0))
3059
3060
3061 /*------------------------------------------------.
3062 | Report that the YYRULE is going to be reduced.  |
3063 `------------------------------------------------*/
3064
3065 #if (defined __STDC__ || defined __C99__FUNC__ \
3066      || defined __cplusplus || defined _MSC_VER)
3067 static void
3068 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
3069 #else
3070 static void
3071 yy_reduce_print (yyvsp, yyrule)
3072     YYSTYPE *yyvsp;
3073     int yyrule;
3074 #endif
3075 {
3076   int yynrhs = yyr2[yyrule];
3077   int yyi;
3078   unsigned long int yylno = yyrline[yyrule];
3079   YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
3080              yyrule - 1, yylno);
3081   /* The symbols being reduced.  */
3082   for (yyi = 0; yyi < yynrhs; yyi++)
3083     {
3084       YYFPRINTF (stderr, "   $%d = ", yyi + 1);
3085       yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
3086                        &(yyvsp[(yyi + 1) - (yynrhs)])
3087                                        );
3088       YYFPRINTF (stderr, "\n");
3089     }
3090 }
3091
3092 # define YY_REDUCE_PRINT(Rule)          \
3093 do {                                    \
3094   if (yydebug)                          \
3095     yy_reduce_print (yyvsp, Rule); \
3096 } while (YYID (0))
3097
3098 /* Nonzero means print parse trace.  It is left uninitialized so that
3099    multiple parsers can coexist.  */
3100 int yydebug;
3101 #else /* !YYDEBUG */
3102 # define YYDPRINTF(Args)
3103 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
3104 # define YY_STACK_PRINT(Bottom, Top)
3105 # define YY_REDUCE_PRINT(Rule)
3106 #endif /* !YYDEBUG */
3107
3108
3109 /* YYINITDEPTH -- initial size of the parser's stacks.  */
3110 #ifndef YYINITDEPTH
3111 # define YYINITDEPTH 200
3112 #endif
3113
3114 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
3115    if the built-in stack extension method is used).
3116
3117    Do not make this value too large; the results are undefined if
3118    YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
3119    evaluated with infinite-precision integer arithmetic.  */
3120
3121 #ifndef YYMAXDEPTH
3122 # define YYMAXDEPTH 10000
3123 #endif
3124
3125 \f
3126
3127 #if YYERROR_VERBOSE
3128
3129 # ifndef yystrlen
3130 #  if defined __GLIBC__ && defined _STRING_H
3131 #   define yystrlen strlen
3132 #  else
3133 /* Return the length of YYSTR.  */
3134 #if (defined __STDC__ || defined __C99__FUNC__ \
3135      || defined __cplusplus || defined _MSC_VER)
3136 static YYSIZE_T
3137 yystrlen (const char *yystr)
3138 #else
3139 static YYSIZE_T
3140 yystrlen (yystr)
3141     const char *yystr;
3142 #endif
3143 {
3144   YYSIZE_T yylen;
3145   for (yylen = 0; yystr[yylen]; yylen++)
3146     continue;
3147   return yylen;
3148 }
3149 #  endif
3150 # endif
3151
3152 # ifndef yystpcpy
3153 #  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
3154 #   define yystpcpy stpcpy
3155 #  else
3156 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
3157    YYDEST.  */
3158 #if (defined __STDC__ || defined __C99__FUNC__ \
3159      || defined __cplusplus || defined _MSC_VER)
3160 static char *
3161 yystpcpy (char *yydest, const char *yysrc)
3162 #else
3163 static char *
3164 yystpcpy (yydest, yysrc)
3165     char *yydest;
3166     const char *yysrc;
3167 #endif
3168 {
3169   char *yyd = yydest;
3170   const char *yys = yysrc;
3171
3172   while ((*yyd++ = *yys++) != '\0')
3173     continue;
3174
3175   return yyd - 1;
3176 }
3177 #  endif
3178 # endif
3179
3180 # ifndef yytnamerr
3181 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
3182    quotes and backslashes, so that it's suitable for yyerror.  The
3183    heuristic is that double-quoting is unnecessary unless the string
3184    contains an apostrophe, a comma, or backslash (other than
3185    backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
3186    null, do not copy; instead, return the length of what the result
3187    would have been.  */
3188 static YYSIZE_T
3189 yytnamerr (char *yyres, const char *yystr)
3190 {
3191   if (*yystr == '"')
3192     {
3193       YYSIZE_T yyn = 0;
3194       char const *yyp = yystr;
3195
3196       for (;;)
3197         switch (*++yyp)
3198           {
3199           case '\'':
3200           case ',':
3201             goto do_not_strip_quotes;
3202
3203           case '\\':
3204             if (*++yyp != '\\')
3205               goto do_not_strip_quotes;
3206             /* Fall through.  */
3207           default:
3208             if (yyres)
3209               yyres[yyn] = *yyp;
3210             yyn++;
3211             break;
3212
3213           case '"':
3214             if (yyres)
3215               yyres[yyn] = '\0';
3216             return yyn;
3217           }
3218     do_not_strip_quotes: ;
3219     }
3220
3221   if (! yyres)
3222     return yystrlen (yystr);
3223
3224   return yystpcpy (yyres, yystr) - yyres;
3225 }
3226 # endif
3227
3228 /* Copy into YYRESULT an error message about the unexpected token
3229    YYCHAR while in state YYSTATE.  Return the number of bytes copied,
3230    including the terminating null byte.  If YYRESULT is null, do not
3231    copy anything; just return the number of bytes that would be
3232    copied.  As a special case, return 0 if an ordinary "syntax error"
3233    message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
3234    size calculation.  */
3235 static YYSIZE_T
3236 yysyntax_error (char *yyresult, int yystate, int yychar)
3237 {
3238   int yyn = yypact[yystate];
3239
3240   if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
3241     return 0;
3242   else
3243     {
3244       int yytype = YYTRANSLATE (yychar);
3245       YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
3246       YYSIZE_T yysize = yysize0;
3247       YYSIZE_T yysize1;
3248       int yysize_overflow = 0;
3249       enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
3250       char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
3251       int yyx;
3252
3253 # if 0
3254       /* This is so xgettext sees the translatable formats that are
3255          constructed on the fly.  */
3256       YY_("syntax error, unexpected %s");
3257       YY_("syntax error, unexpected %s, expecting %s");
3258       YY_("syntax error, unexpected %s, expecting %s or %s");
3259       YY_("syntax error, unexpected %s, expecting %s or %s or %s");
3260       YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
3261 # endif
3262       char *yyfmt;
3263       char const *yyf;
3264       static char const yyunexpected[] = "syntax error, unexpected %s";
3265       static char const yyexpecting[] = ", expecting %s";
3266       static char const yyor[] = " or %s";
3267       char yyformat[sizeof yyunexpected
3268                     + sizeof yyexpecting - 1
3269                     + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
3270                        * (sizeof yyor - 1))];
3271       char const *yyprefix = yyexpecting;
3272
3273       /* Start YYX at -YYN if negative to avoid negative indexes in
3274          YYCHECK.  */
3275       int yyxbegin = yyn < 0 ? -yyn : 0;
3276
3277       /* Stay within bounds of both yycheck and yytname.  */
3278       int yychecklim = YYLAST - yyn + 1;
3279       int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
3280       int yycount = 1;
3281
3282       yyarg[0] = yytname[yytype];
3283       yyfmt = yystpcpy (yyformat, yyunexpected);
3284
3285       for (yyx = yyxbegin; yyx < yyxend; ++yyx)
3286         if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
3287           {
3288             if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
3289               {
3290                 yycount = 1;
3291                 yysize = yysize0;
3292                 yyformat[sizeof yyunexpected - 1] = '\0';
3293                 break;
3294               }
3295             yyarg[yycount++] = yytname[yyx];
3296             yysize1 = yysize + yytnamerr (0, yytname[yyx]);
3297             yysize_overflow |= (yysize1 < yysize);
3298             yysize = yysize1;
3299             yyfmt = yystpcpy (yyfmt, yyprefix);
3300             yyprefix = yyor;
3301           }
3302
3303       yyf = YY_(yyformat);
3304       yysize1 = yysize + yystrlen (yyf);
3305       yysize_overflow |= (yysize1 < yysize);
3306       yysize = yysize1;
3307
3308       if (yysize_overflow)
3309         return YYSIZE_MAXIMUM;
3310
3311       if (yyresult)
3312         {
3313           /* Avoid sprintf, as that infringes on the user's name space.
3314              Don't have undefined behavior even if the translation
3315              produced a string with the wrong number of "%s"s.  */
3316           char *yyp = yyresult;
3317           int yyi = 0;
3318           while ((*yyp = *yyf) != '\0')
3319             {
3320               if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
3321                 {
3322                   yyp += yytnamerr (yyp, yyarg[yyi++]);
3323                   yyf += 2;
3324                 }
3325               else
3326                 {
3327                   yyp++;
3328                   yyf++;
3329                 }
3330             }
3331         }
3332       return yysize;
3333     }
3334 }
3335 #endif /* YYERROR_VERBOSE */
3336 \f
3337
3338 /*-----------------------------------------------.
3339 | Release the memory associated to this symbol.  |
3340 `-----------------------------------------------*/
3341
3342 /*ARGSUSED*/
3343 #if (defined __STDC__ || defined __C99__FUNC__ \
3344      || defined __cplusplus || defined _MSC_VER)
3345 static void
3346 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
3347 #else
3348 static void
3349 yydestruct (yymsg, yytype, yyvaluep)
3350     const char *yymsg;
3351     int yytype;
3352     YYSTYPE *yyvaluep;
3353 #endif
3354 {
3355   YYUSE (yyvaluep);
3356
3357   if (!yymsg)
3358     yymsg = "Deleting";
3359   YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
3360
3361   switch (yytype)
3362     {
3363
3364       default:
3365         break;
3366     }
3367 }
3368
3369 /* Prevent warnings from -Wmissing-prototypes.  */
3370 #ifdef YYPARSE_PARAM
3371 #if defined __STDC__ || defined __cplusplus
3372 int yyparse (void *YYPARSE_PARAM);
3373 #else
3374 int yyparse ();
3375 #endif
3376 #else /* ! YYPARSE_PARAM */
3377 #if defined __STDC__ || defined __cplusplus
3378 int yyparse (void);
3379 #else
3380 int yyparse ();
3381 #endif
3382 #endif /* ! YYPARSE_PARAM */
3383
3384
3385 /* The lookahead symbol.  */
3386 int yychar;
3387
3388 /* The semantic value of the lookahead symbol.  */
3389 YYSTYPE yylval;
3390
3391 /* Number of syntax errors so far.  */
3392 int yynerrs;
3393
3394
3395
3396 /*-------------------------.
3397 | yyparse or yypush_parse.  |
3398 `-------------------------*/
3399
3400 #ifdef YYPARSE_PARAM
3401 #if (defined __STDC__ || defined __C99__FUNC__ \
3402      || defined __cplusplus || defined _MSC_VER)
3403 int
3404 yyparse (void *YYPARSE_PARAM)
3405 #else
3406 int
3407 yyparse (YYPARSE_PARAM)
3408     void *YYPARSE_PARAM;
3409 #endif
3410 #else /* ! YYPARSE_PARAM */
3411 #if (defined __STDC__ || defined __C99__FUNC__ \
3412      || defined __cplusplus || defined _MSC_VER)
3413 int
3414 yyparse (void)
3415 #else
3416 int
3417 yyparse ()
3418
3419 #endif
3420 #endif
3421 {
3422
3423
3424     int yystate;
3425     /* Number of tokens to shift before error messages enabled.  */
3426     int yyerrstatus;
3427
3428     /* The stacks and their tools:
3429        `yyss': related to states.
3430        `yyvs': related to semantic values.
3431
3432        Refer to the stacks thru separate pointers, to allow yyoverflow
3433        to reallocate them elsewhere.  */
3434
3435     /* The state stack.  */
3436     yytype_int16 yyssa[YYINITDEPTH];
3437     yytype_int16 *yyss;
3438     yytype_int16 *yyssp;
3439
3440     /* The semantic value stack.  */
3441     YYSTYPE yyvsa[YYINITDEPTH];
3442     YYSTYPE *yyvs;
3443     YYSTYPE *yyvsp;
3444
3445     YYSIZE_T yystacksize;
3446
3447   int yyn;
3448   int yyresult;
3449   /* Lookahead token as an internal (translated) token number.  */
3450   int yytoken;
3451   /* The variables used to return semantic value and location from the
3452      action routines.  */
3453   YYSTYPE yyval;
3454
3455 #if YYERROR_VERBOSE
3456   /* Buffer for error messages, and its allocated size.  */
3457   char yymsgbuf[128];
3458   char *yymsg = yymsgbuf;
3459   YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
3460 #endif
3461
3462 #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
3463
3464   /* The number of symbols on the RHS of the reduced rule.
3465      Keep to zero when no symbol should be popped.  */
3466   int yylen = 0;
3467
3468   yytoken = 0;
3469   yyss = yyssa;
3470   yyvs = yyvsa;
3471   yystacksize = YYINITDEPTH;
3472
3473   YYDPRINTF ((stderr, "Starting parse\n"));
3474
3475   yystate = 0;
3476   yyerrstatus = 0;
3477   yynerrs = 0;
3478   yychar = YYEMPTY; /* Cause a token to be read.  */
3479
3480   /* Initialize stack pointers.
3481      Waste one element of value and location stack
3482      so that they stay on the same level as the state stack.
3483      The wasted elements are never initialized.  */
3484   yyssp = yyss;
3485   yyvsp = yyvs;
3486
3487   goto yysetstate;
3488
3489 /*------------------------------------------------------------.
3490 | yynewstate -- Push a new state, which is found in yystate.  |
3491 `------------------------------------------------------------*/
3492  yynewstate:
3493   /* In all cases, when you get here, the value and location stacks
3494      have just been pushed.  So pushing a state here evens the stacks.  */
3495   yyssp++;
3496
3497  yysetstate:
3498   *yyssp = yystate;
3499
3500   if (yyss + yystacksize - 1 <= yyssp)
3501     {
3502       /* Get the current used size of the three stacks, in elements.  */
3503       YYSIZE_T yysize = yyssp - yyss + 1;
3504
3505 #ifdef yyoverflow
3506       {
3507         /* Give user a chance to reallocate the stack.  Use copies of
3508            these so that the &'s don't force the real ones into
3509            memory.  */
3510         YYSTYPE *yyvs1 = yyvs;
3511         yytype_int16 *yyss1 = yyss;
3512
3513         /* Each stack pointer address is followed by the size of the
3514            data in use in that stack, in bytes.  This used to be a
3515            conditional around just the two extra args, but that might
3516            be undefined if yyoverflow is a macro.  */
3517         yyoverflow (YY_("memory exhausted"),
3518                     &yyss1, yysize * sizeof (*yyssp),
3519                     &yyvs1, yysize * sizeof (*yyvsp),
3520                     &yystacksize);
3521
3522         yyss = yyss1;
3523         yyvs = yyvs1;
3524       }
3525 #else /* no yyoverflow */
3526 # ifndef YYSTACK_RELOCATE
3527       goto yyexhaustedlab;
3528 # else
3529       /* Extend the stack our own way.  */
3530       if (YYMAXDEPTH <= yystacksize)
3531         goto yyexhaustedlab;
3532       yystacksize *= 2;
3533       if (YYMAXDEPTH < yystacksize)
3534         yystacksize = YYMAXDEPTH;
3535
3536       {
3537         yytype_int16 *yyss1 = yyss;
3538         union yyalloc *yyptr =
3539           (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
3540         if (! yyptr)
3541           goto yyexhaustedlab;
3542         YYSTACK_RELOCATE (yyss_alloc, yyss);
3543         YYSTACK_RELOCATE (yyvs_alloc, yyvs);
3544 #  undef YYSTACK_RELOCATE
3545         if (yyss1 != yyssa)
3546           YYSTACK_FREE (yyss1);
3547       }
3548 # endif
3549 #endif /* no yyoverflow */
3550
3551       yyssp = yyss + yysize - 1;
3552       yyvsp = yyvs + yysize - 1;
3553
3554       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
3555                   (unsigned long int) yystacksize));
3556
3557       if (yyss + yystacksize - 1 <= yyssp)
3558         YYABORT;
3559     }
3560
3561   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
3562
3563   if (yystate == YYFINAL)
3564     YYACCEPT;
3565
3566   goto yybackup;
3567
3568 /*-----------.
3569 | yybackup.  |
3570 `-----------*/
3571 yybackup:
3572
3573   /* Do appropriate processing given the current state.  Read a
3574      lookahead token if we need one and don't already have one.  */
3575
3576   /* First try to decide what to do without reference to lookahead token.  */
3577   yyn = yypact[yystate];
3578   if (yyn == YYPACT_NINF)
3579     goto yydefault;
3580
3581   /* Not known => get a lookahead token if don't already have one.  */
3582
3583   /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
3584   if (yychar == YYEMPTY)
3585     {
3586       YYDPRINTF ((stderr, "Reading a token: "));
3587       yychar = YYLEX;
3588     }
3589
3590   if (yychar <= YYEOF)
3591     {
3592       yychar = yytoken = YYEOF;
3593       YYDPRINTF ((stderr, "Now at end of input.\n"));
3594     }
3595   else
3596     {
3597       yytoken = YYTRANSLATE (yychar);
3598       YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
3599     }
3600
3601   /* If the proper action on seeing token YYTOKEN is to reduce or to
3602      detect an error, take that action.  */
3603   yyn += yytoken;
3604   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
3605     goto yydefault;
3606   yyn = yytable[yyn];
3607   if (yyn <= 0)
3608     {
3609       if (yyn == 0 || yyn == YYTABLE_NINF)
3610         goto yyerrlab;
3611       yyn = -yyn;
3612       goto yyreduce;
3613     }
3614
3615   /* Count tokens shifted since error; after three, turn off error
3616      status.  */
3617   if (yyerrstatus)
3618     yyerrstatus--;
3619
3620   /* Shift the lookahead token.  */
3621   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
3622
3623   /* Discard the shifted token.  */
3624   yychar = YYEMPTY;
3625
3626   yystate = yyn;
3627   *++yyvsp = yylval;
3628
3629   goto yynewstate;
3630
3631
3632 /*-----------------------------------------------------------.
3633 | yydefault -- do the default action for the current state.  |
3634 `-----------------------------------------------------------*/
3635 yydefault:
3636   yyn = yydefact[yystate];
3637   if (yyn == 0)
3638     goto yyerrlab;
3639   goto yyreduce;
3640
3641
3642 /*-----------------------------.
3643 | yyreduce -- Do a reduction.  |
3644 `-----------------------------*/
3645 yyreduce:
3646   /* yyn is the number of a rule to reduce with.  */
3647   yylen = yyr2[yyn];
3648
3649   /* If YYLEN is nonzero, implement the default value of the action:
3650      `$$ = $1'.
3651
3652      Otherwise, the following line sets YYVAL to garbage.
3653      This behavior is undocumented and Bison
3654      users should not rely upon it.  Assigning to YYVAL
3655      unconditionally makes the parser a bit smaller, and it avoids a
3656      GCC warning that YYVAL may be used uninitialized.  */
3657   yyval = yyvsp[1-yylen];
3658
3659
3660   YY_REDUCE_PRINT (yyn);
3661   switch (yyn)
3662     {
3663         
3664     case 24:
3665     if(as3_pass==2) {
3666
3667 /* Line 1464 of skeleton.m4  */
3668 #line 1573 "parser.y"
3669     {(yyval.code)=(yyvsp[(1) - (1)].code);}
3670     }
3671     break;
3672
3673
3674   
3675     case 25:
3676     if(as3_pass==2) {
3677
3678 /* Line 1464 of skeleton.m4  */
3679 #line 1574 "parser.y"
3680     {(yyval.code)=code_new();}
3681     }
3682     break;
3683
3684
3685   
3686     case 26:
3687     if(as3_pass==2) {
3688
3689 /* Line 1464 of skeleton.m4  */
3690 #line 1576 "parser.y"
3691     {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
3692     }
3693     break;
3694
3695
3696   
3697     case 27:
3698     if(as3_pass==2) {
3699
3700 /* Line 1464 of skeleton.m4  */
3701 #line 1577 "parser.y"
3702     {(yyval.code)=(yyvsp[(1) - (1)].code);}
3703     }
3704     break;
3705
3706
3707   
3708     case 38:
3709     if(as3_pass==2) {
3710
3711 /* Line 1464 of skeleton.m4  */
3712 #line 1592 "parser.y"
3713     {(yyval.code)=0;}
3714     }
3715     break;
3716
3717
3718   
3719     case 45:
3720     if(as3_pass==2) {
3721
3722 /* Line 1464 of skeleton.m4  */
3723 #line 1600 "parser.y"
3724     {/*TODO*/(yyval.code)=0;}
3725     }
3726     break;
3727
3728
3729   
3730     case 46:
3731     if(as3_pass==2) {
3732
3733 /* Line 1464 of skeleton.m4  */
3734 #line 1601 "parser.y"
3735     {/*TODO*/(yyval.code)=0;}
3736     }
3737     break;
3738
3739
3740   
3741     case 47:
3742     if(as3_pass==2) {
3743
3744 /* Line 1464 of skeleton.m4  */
3745 #line 1603 "parser.y"
3746     {(yyval.code)=(yyvsp[(2) - (3)].code);}
3747     }
3748     break;
3749
3750
3751   
3752     case 48:
3753     if(as3_pass==2) {
3754
3755 /* Line 1464 of skeleton.m4  */
3756 #line 1604 "parser.y"
3757     {(yyval.code)=0;}
3758     }
3759     break;
3760
3761
3762   
3763     case 49:
3764     if(as3_pass==2) {
3765
3766 /* Line 1464 of skeleton.m4  */
3767 #line 1605 "parser.y"
3768     {(yyval.code)=(yyvsp[(1) - (2)].code);}
3769     }
3770     break;
3771
3772
3773   
3774     case 50:
3775     if(as3_pass==2) {
3776
3777 /* Line 1464 of skeleton.m4  */
3778 #line 1606 "parser.y"
3779     {(yyval.code)=(yyvsp[(1) - (1)].code);}
3780     }
3781     break;
3782
3783
3784   
3785     case 51:
3786     if(as3_pass==2) {
3787
3788 /* Line 1464 of skeleton.m4  */
3789 #line 1610 "parser.y"
3790     {
3791     code_t**cc = &global->init->method->body->code;
3792     *cc = code_append(*cc, (yyvsp[(1) - (1)].code));
3793 }
3794     }
3795     break;
3796
3797
3798   
3799     case 52:
3800     if(as3_pass==2) {
3801
3802 /* Line 1464 of skeleton.m4  */
3803 #line 1617 "parser.y"
3804     {(yyval.value)=(yyvsp[(2) - (2)].value);}
3805     }
3806     break;
3807
3808
3809   
3810     case 53:
3811     if(as3_pass==2) {
3812
3813 /* Line 1464 of skeleton.m4  */
3814 #line 1618 "parser.y"
3815     {(yyval.value).c=abc_pushundefined(0);
3816                                   (yyval.value).t=TYPE_ANY;
3817                                  }
3818     }
3819     break;
3820
3821
3822   
3823     case 54:
3824     if(as3_pass==2) {
3825
3826 /* Line 1464 of skeleton.m4  */
3827 #line 1622 "parser.y"
3828     {(yyval.code)=(yyvsp[(2) - (2)].code);}
3829     }
3830     break;
3831
3832
3833   
3834     case 55:
3835     if(as3_pass==2) {
3836
3837 /* Line 1464 of skeleton.m4  */
3838 #line 1623 "parser.y"
3839     {(yyval.code)=(yyvsp[(2) - (2)].code);}
3840     }
3841     break;
3842
3843
3844   
3845     case 56:
3846     if(as3_pass==2) {
3847
3848 /* Line 1464 of skeleton.m4  */
3849 #line 1625 "parser.y"
3850     {(yyval.code) = (yyvsp[(1) - (1)].code);}
3851     }
3852     break;
3853
3854
3855   
3856     case 57:
3857     if(as3_pass==2) {
3858
3859 /* Line 1464 of skeleton.m4  */
3860 #line 1626 "parser.y"
3861     {(yyval.code) = code_append((yyvsp[(1) - (3)].code), (yyvsp[(3) - (3)].code));}
3862     }
3863     break;
3864
3865
3866   
3867     case 58:
3868     if(as3_pass==2) {
3869
3870 /* Line 1464 of skeleton.m4  */
3871 #line 1629 "parser.y"
3872     {
3873     if(variable_exists((yyvsp[(1) - (3)].id)))
3874         syntaxerror("Variable %s already defined", (yyvsp[(1) - (3)].id));
3875    
3876     if(!is_subtype_of((yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo))) {
3877         syntaxerror("Can't convert %s to %s", (yyvsp[(3) - (3)].value).t->name, 
3878                                               (yyvsp[(2) - (3)].classinfo)->name);
3879     }
3880
3881     int index = new_variable((yyvsp[(1) - (3)].id), (yyvsp[(2) - (3)].classinfo), 1);
3882     
3883     if((yyvsp[(2) - (3)].classinfo)) {
3884         if((yyvsp[(3) - (3)].value).c->prev || (yyvsp[(3) - (3)].value).c->opcode != OPCODE_PUSHUNDEFINED) {
3885             (yyval.code) = (yyvsp[(3) - (3)].value).c;
3886             (yyval.code) = converttype((yyval.code), (yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo));
3887             (yyval.code) = abc_setlocal((yyval.code), index);
3888         } else {
3889             (yyval.code) = defaultvalue(0, (yyvsp[(2) - (3)].classinfo));
3890             (yyval.code) = abc_setlocal((yyval.code), index);
3891         }
3892     } else {
3893         if((yyvsp[(3) - (3)].value).c->prev || (yyvsp[(3) - (3)].value).c->opcode != OPCODE_PUSHUNDEFINED) {
3894             (yyval.code) = (yyvsp[(3) - (3)].value).c;
3895             (yyval.code) = abc_coerce_a((yyval.code));
3896             (yyval.code) = abc_setlocal((yyval.code), index);
3897         } else {
3898             (yyval.code) = code_new();
3899         }
3900     }
3901     
3902     /* that's the default for a local register, anyway
3903         else {
3904         state->method->initcode = abc_pushundefined(state->method->initcode);
3905         state->method->initcode = abc_setlocal(state->method->initcode, index);
3906     }*/
3907     //printf("variable %s -> %d (%s)\n", $2->text, index, $4.t?$4.t->name:"");
3908 }
3909     }
3910     break;
3911
3912
3913   
3914     case 59:
3915     if(as3_pass==2) {
3916
3917 /* Line 1464 of skeleton.m4  */
3918 #line 1669 "parser.y"
3919     {(yyval.code) = code_new();}
3920     }
3921     break;
3922
3923
3924   
3925     case 60:
3926     if(as3_pass==2) {
3927
3928 /* Line 1464 of skeleton.m4  */
3929 #line 1670 "parser.y"
3930     {(yyval.code)=(yyvsp[(2) - (2)].code);}
3931     }
3932     break;
3933
3934
3935   
3936     case 61:
3937     if(as3_pass==2) {
3938
3939 /* Line 1464 of skeleton.m4  */
3940 #line 1673 "parser.y"
3941     {new_state();}
3942     }
3943     break;
3944
3945
3946   
3947     case 62:
3948     if(as3_pass==2) {
3949
3950 /* Line 1464 of skeleton.m4  */
3951 #line 1673 "parser.y"
3952     {
3953      
3954     (yyval.code) = code_new();
3955     (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (7)].value).c);
3956     code_t*myjmp,*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
3957    
3958     (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].code));
3959     if((yyvsp[(7) - (7)].code)) {
3960         myjmp = (yyval.code) = abc_jump((yyval.code), 0);
3961     }
3962     myif->branch = (yyval.code) = abc_nop((yyval.code));
3963     if((yyvsp[(7) - (7)].code)) {
3964         (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (7)].code));
3965         myjmp->branch = (yyval.code) = abc_nop((yyval.code));
3966     }
3967     (yyval.code) = var_block((yyval.code));
3968     old_state();
3969 }
3970     }
3971     break;
3972
3973
3974   
3975     case 63:
3976     if(as3_pass==2) {
3977
3978 /* Line 1464 of skeleton.m4  */
3979 #line 1692 "parser.y"
3980     {(yyval.code)=code_new();}
3981     }
3982     break;
3983
3984
3985   
3986     case 66:
3987     if(as3_pass==2) {
3988
3989 /* Line 1464 of skeleton.m4  */
3990 #line 1697 "parser.y"
3991     {
3992     (yyval.id)=(yyvsp[(2) - (3)].id);new_variable((yyvsp[(2) - (3)].id),(yyvsp[(3) - (3)].classinfo),1);
3993 }
3994     }
3995     break;
3996
3997
3998   
3999     case 67:
4000     if(as3_pass==2) {
4001
4002 /* Line 1464 of skeleton.m4  */
4003 #line 1700 "parser.y"
4004     {
4005     (yyval.id)=(yyvsp[(1) - (1)].id);
4006 }
4007     }
4008     break;
4009
4010
4011   
4012     case 68:
4013     if(as3_pass==2) {
4014
4015 /* Line 1464 of skeleton.m4  */
4016 #line 1704 "parser.y"
4017     {new_state();(yyval.for_start).name=(yyvsp[(1) - (2)].id);(yyval.for_start).each=0;}
4018     }
4019     break;
4020
4021
4022   
4023     case 69:
4024     if(as3_pass==2) {
4025
4026 /* Line 1464 of skeleton.m4  */
4027 #line 1705 "parser.y"
4028     {new_state();(yyval.for_start).name=(yyvsp[(1) - (3)].id);(yyval.for_start).each=1;}
4029     }
4030     break;
4031
4032
4033   
4034     case 70:
4035     if(as3_pass==2) {
4036
4037 /* Line 1464 of skeleton.m4  */
4038 #line 1707 "parser.y"
4039     {
4040     if((yyvsp[(1) - (8)].for_start).each) syntaxerror("invalid syntax: ; not allowed in for each statement");
4041     (yyval.code) = code_new();
4042     (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (8)].code));
4043     code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4044     (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (8)].value).c);
4045     code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4046     (yyval.code) = code_append((yyval.code), (yyvsp[(8) - (8)].code));
4047     code_t*cont = (yyval.code) = abc_nop((yyval.code));
4048     (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (8)].code));
4049     (yyval.code) = abc_jump((yyval.code), loopstart);
4050     code_t*out = (yyval.code) = abc_nop((yyval.code));
4051     breakjumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, out);
4052     continuejumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, cont);
4053     myif->branch = out;
4054
4055     (yyval.code) = var_block((yyval.code));
4056     old_state();
4057 }
4058     }
4059     break;
4060
4061
4062   
4063     case 71:
4064     if(as3_pass==2) {
4065
4066 /* Line 1464 of skeleton.m4  */
4067 #line 1727 "parser.y"
4068     {
4069     variable_t*var = find_variable((yyvsp[(2) - (6)].id));
4070     char*tmp1name = concat2((yyvsp[(2) - (6)].id), "__tmp1__");
4071     int it = new_variable(tmp1name, TYPE_INT, 0);
4072     char*tmp2name = concat2((yyvsp[(2) - (6)].id), "__array__");
4073     int array = new_variable(tmp1name, 0, 0);
4074
4075     (yyval.code) = code_new();
4076     (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
4077     (yyval.code) = abc_coerce_a((yyval.code));
4078     (yyval.code) = abc_setlocal((yyval.code), array);
4079     (yyval.code) = abc_pushbyte((yyval.code), 0);
4080     (yyval.code) = abc_setlocal((yyval.code), it);
4081
4082     code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4083     
4084     (yyval.code) = abc_hasnext2((yyval.code), array, it);
4085     code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4086     (yyval.code) = abc_getlocal((yyval.code), array);
4087     (yyval.code) = abc_getlocal((yyval.code), it);
4088     if(!(yyvsp[(1) - (6)].for_start).each)
4089         (yyval.code) = abc_nextname((yyval.code));
4090     else
4091         (yyval.code) = abc_nextvalue((yyval.code));
4092     (yyval.code) = converttype((yyval.code), 0, var->type);
4093     (yyval.code) = abc_setlocal((yyval.code), var->index);
4094
4095     (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
4096     (yyval.code) = abc_jump((yyval.code), loopstart);
4097     
4098     code_t*out = (yyval.code) = abc_nop((yyval.code));
4099     breakjumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, out);
4100     continuejumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, loopstart);
4101     
4102     myif->branch = out;
4103
4104     (yyval.code) = var_block((yyval.code));
4105     old_state();
4106
4107     free(tmp1name);
4108     free(tmp2name);
4109 }
4110     }
4111     break;
4112
4113
4114   
4115     case 72:
4116     if(as3_pass==2) {
4117
4118 /* Line 1464 of skeleton.m4  */
4119 #line 1770 "parser.y"
4120     {new_state();}
4121     }
4122     break;
4123
4124
4125   
4126     case 73:
4127     if(as3_pass==2) {
4128
4129 /* Line 1464 of skeleton.m4  */
4130 #line 1770 "parser.y"
4131     {
4132
4133     (yyval.code) = code_new();
4134
4135     code_t*myjmp = (yyval.code) = abc_jump((yyval.code), 0);
4136     code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4137     (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
4138     code_t*cont = (yyval.code) = abc_nop((yyval.code));
4139     myjmp->branch = cont;
4140     (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
4141     (yyval.code) = abc_iftrue((yyval.code), loopstart);
4142     code_t*out = (yyval.code) = abc_nop((yyval.code));
4143     breakjumpsto((yyval.code), (yyvsp[(1) - (6)].id), out);
4144     continuejumpsto((yyval.code), (yyvsp[(1) - (6)].id), cont);
4145
4146     (yyval.code) = var_block((yyval.code));
4147     old_state();
4148 }
4149     }
4150     break;
4151
4152
4153   
4154     case 74:
4155     if(as3_pass==2) {
4156
4157 /* Line 1464 of skeleton.m4  */
4158 #line 1789 "parser.y"
4159     {new_state();}
4160     }
4161     break;
4162
4163
4164   
4165     case 75:
4166     if(as3_pass==2) {
4167
4168 /* Line 1464 of skeleton.m4  */
4169 #line 1789 "parser.y"
4170     {
4171     (yyval.code) = code_new();
4172     code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4173     (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (7)].code));
4174     code_t*cont = (yyval.code) = abc_nop((yyval.code));
4175     (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].value).c);
4176     (yyval.code) = abc_iftrue((yyval.code), loopstart);
4177     code_t*out = (yyval.code) = abc_nop((yyval.code));
4178     breakjumpsto((yyval.code), (yyvsp[(1) - (7)].id), out);
4179     continuejumpsto((yyval.code), (yyvsp[(1) - (7)].id), cont);
4180     
4181     (yyval.code) = var_block((yyval.code));
4182     old_state();
4183 }
4184     }
4185     break;
4186
4187
4188   
4189     case 76:
4190     if(as3_pass==2) {
4191
4192 /* Line 1464 of skeleton.m4  */
4193 #line 1804 "parser.y"
4194     {
4195     (yyval.code) = abc___break__(0, "");
4196 }
4197     }
4198     break;
4199
4200
4201   
4202     case 77:
4203     if(as3_pass==2) {
4204
4205 /* Line 1464 of skeleton.m4  */
4206 #line 1807 "parser.y"
4207     {
4208     (yyval.code) = abc___break__(0, (yyvsp[(2) - (2)].id));
4209 }
4210     }
4211     break;
4212
4213
4214   
4215     case 78:
4216     if(as3_pass==2) {
4217
4218 /* Line 1464 of skeleton.m4  */
4219 #line 1810 "parser.y"
4220     {
4221     (yyval.code) = abc___continue__(0, "");
4222 }
4223     }
4224     break;
4225
4226
4227   
4228     case 79:
4229     if(as3_pass==2) {
4230
4231 /* Line 1464 of skeleton.m4  */
4232 #line 1813 "parser.y"
4233     {
4234     (yyval.code) = abc___continue__(0, (yyvsp[(2) - (2)].id));
4235 }
4236     }
4237     break;
4238
4239
4240   
4241     case 80:
4242     if(as3_pass==2) {
4243
4244 /* Line 1464 of skeleton.m4  */
4245 #line 1817 "parser.y"
4246     {(yyval.code)=0;}
4247     }
4248     break;
4249
4250
4251   
4252     case 81:
4253     if(as3_pass==2) {
4254
4255 /* Line 1464 of skeleton.m4  */
4256 #line 1818 "parser.y"
4257     {(yyval.code)=(yyvsp[(1) - (1)].code);}
4258     }
4259     break;
4260
4261
4262   
4263     case 82:
4264     if(as3_pass==2) {
4265
4266 /* Line 1464 of skeleton.m4  */
4267 #line 1819 "parser.y"
4268     {(yyval.code)=(yyvsp[(1) - (1)].code);}
4269     }
4270     break;
4271
4272
4273   
4274     case 83:
4275     if(as3_pass==2) {
4276
4277 /* Line 1464 of skeleton.m4  */
4278 #line 1820 "parser.y"
4279     {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
4280     }
4281     break;
4282
4283
4284   
4285     case 84:
4286     if(as3_pass==2) {
4287
4288 /* Line 1464 of skeleton.m4  */
4289 #line 1821 "parser.y"
4290     {(yyval.code)=(yyvsp[(1) - (1)].code);}
4291     }
4292     break;
4293
4294
4295   
4296     case 85:
4297     if(as3_pass==2) {
4298
4299 /* Line 1464 of skeleton.m4  */
4300 #line 1822 "parser.y"
4301     {(yyval.code)=code_append((yyval.code),(yyvsp[(2) - (2)].code));}
4302     }
4303     break;
4304
4305
4306   
4307     case 86:
4308     if(as3_pass==2) {
4309
4310 /* Line 1464 of skeleton.m4  */
4311 #line 1824 "parser.y"
4312     {
4313     (yyval.code) = abc_dup(0);
4314     (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (4)].value).c);
4315     code_t*j = (yyval.code) = abc_ifne((yyval.code), 0);
4316     (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (4)].code));
4317     if((yyval.code)->opcode != OPCODE___BREAK__) {
4318         (yyval.code) = abc___fallthrough__((yyval.code), "");
4319     }
4320     code_t*e = (yyval.code) = abc_nop((yyval.code));
4321     j->branch = e;
4322 }
4323     }
4324     break;
4325
4326
4327   
4328     case 87:
4329     if(as3_pass==2) {
4330
4331 /* Line 1464 of skeleton.m4  */
4332 #line 1835 "parser.y"
4333     {
4334     (yyval.code) = (yyvsp[(3) - (3)].code);
4335 }
4336     }
4337     break;
4338
4339
4340   
4341     case 88:
4342     if(as3_pass==2) {
4343
4344 /* Line 1464 of skeleton.m4  */
4345 #line 1838 "parser.y"
4346     {new_state();}
4347     }
4348     break;
4349
4350
4351   
4352     case 89:
4353     if(as3_pass==2) {
4354
4355 /* Line 1464 of skeleton.m4  */
4356 #line 1838 "parser.y"
4357     {
4358     (yyval.code)=(yyvsp[(4) - (8)].value).c;
4359     (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (8)].code));
4360     code_t*out = (yyval.code) = abc_pop((yyval.code));
4361     breakjumpsto((yyval.code), (yyvsp[(1) - (8)].id), out);
4362     
4363     code_t*c = (yyval.code),*lastblock=0;
4364     while(c) {
4365         if(c->opcode == OPCODE_IFNE) {
4366             if(!c->next) syntaxerror("internal error in fallthrough handling");
4367             lastblock=c->next;
4368         } else if(c->opcode == OPCODE___FALLTHROUGH__) {
4369             if(lastblock) {
4370                 c->opcode = OPCODE_JUMP;
4371                 c->branch = lastblock;
4372             } else {
4373                 /* fall through end of switch */
4374                 c->opcode = OPCODE_NOP;
4375             }
4376         }
4377         c=c->prev;
4378     }
4379    
4380     (yyval.code) = var_block((yyval.code));
4381     old_state();
4382 }
4383     }
4384     break;
4385
4386
4387   
4388     case 90:
4389     if(as3_pass==2) {
4390
4391 /* Line 1464 of skeleton.m4  */
4392 #line 1867 "parser.y"
4393     {new_state();state->exception_name=(yyvsp[(3) - (5)].id);new_variable((yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].classinfo), 0);}
4394     }
4395     break;
4396
4397
4398   
4399     case 91:
4400     if(as3_pass==2) {
4401
4402 /* Line 1464 of skeleton.m4  */
4403 #line 1868 "parser.y"
4404     {
4405     namespace_t name_ns = {ACCESS_PACKAGE, ""};
4406     multiname_t name = {QNAME, &name_ns, 0, (yyvsp[(3) - (9)].id)};
4407     
4408     NEW(abc_exception_t, e)
4409     e->exc_type = sig2mname((yyvsp[(4) - (9)].classinfo));
4410     e->var_name = multiname_clone(&name);
4411     (yyval.exception) = e;
4412
4413     code_t*c = 0;
4414     int i = find_variable_safe((yyvsp[(3) - (9)].id))->index;
4415     e->target = c = abc_nop(0);
4416     c = abc_setlocal(c, i);
4417     c = code_append(c, (yyvsp[(8) - (9)].code));
4418     c = abc_kill(c, i);
4419
4420     c = var_block(c);
4421     old_state();
4422 }
4423     }
4424     break;
4425
4426
4427   
4428     case 92:
4429     if(as3_pass==2) {
4430
4431 /* Line 1464 of skeleton.m4  */
4432 #line 1887 "parser.y"
4433     {new_state();state->exception_name=0;}
4434     }
4435     break;
4436
4437
4438   
4439     case 93:
4440     if(as3_pass==2) {
4441
4442 /* Line 1464 of skeleton.m4  */
4443 #line 1887 "parser.y"
4444     {
4445     (yyvsp[(4) - (5)].code) = var_block((yyvsp[(4) - (5)].code));
4446     if(!(yyvsp[(4) - (5)].code)) {
4447         (yyval.exception)=0;
4448         old_state();
4449     } else {
4450         NEW(abc_exception_t, e)
4451         e->exc_type = 0; //all exceptions
4452         e->var_name = 0; //no name
4453         e->target = 0;
4454         e->to = abc_nop(0);
4455         e->to = code_append(e->to, (yyvsp[(4) - (5)].code));
4456         old_state();
4457         (yyval.exception) = e;
4458     }
4459 }
4460     }
4461     break;
4462
4463
4464   
4465     case 94:
4466     if(as3_pass==2) {
4467
4468 /* Line 1464 of skeleton.m4  */
4469 #line 1904 "parser.y"
4470     {(yyval.catch_list).l=list_new();(yyval.catch_list).finally=0;list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));}
4471     }
4472     break;
4473
4474
4475   
4476     case 95:
4477     if(as3_pass==2) {
4478
4479 /* Line 1464 of skeleton.m4  */
4480 #line 1905 "parser.y"
4481     {(yyval.catch_list)=(yyvsp[(1) - (2)].catch_list);list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));}
4482     }
4483     break;
4484
4485
4486   
4487     case 96:
4488     if(as3_pass==2) {
4489
4490 /* Line 1464 of skeleton.m4  */
4491 #line 1906 "parser.y"
4492     {(yyval.catch_list)=(yyvsp[(1) - (1)].catch_list);}
4493     }
4494     break;
4495
4496
4497   
4498     case 97:
4499     if(as3_pass==2) {
4500
4501 /* Line 1464 of skeleton.m4  */
4502 #line 1907 "parser.y"
4503     {
4504     (yyval.catch_list) = (yyvsp[(1) - (2)].catch_list);
4505     (yyval.catch_list).finally = 0;
4506     if((yyvsp[(2) - (2)].exception)) {
4507         list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));
4508         (yyval.catch_list).finally = (yyvsp[(2) - (2)].exception)->to;(yyvsp[(2) - (2)].exception)->to=0;
4509     }
4510 }
4511     }
4512     break;
4513
4514
4515   
4516     case 98:
4517     if(as3_pass==2) {
4518
4519 /* Line 1464 of skeleton.m4  */
4520 #line 1915 "parser.y"
4521     {
4522     (yyval.catch_list).l=list_new();
4523     (yyval.catch_list).finally = 0;
4524     if((yyvsp[(1) - (1)].exception)) {
4525         list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));
4526         (yyval.catch_list).finally = (yyvsp[(1) - (1)].exception)->to;(yyvsp[(1) - (1)].exception)->to=0;
4527     }
4528 }
4529     }
4530     break;
4531
4532
4533   
4534     case 99:
4535     if(as3_pass==2) {
4536
4537 /* Line 1464 of skeleton.m4  */
4538 #line 1924 "parser.y"
4539     {new_state();}
4540     }
4541     break;
4542
4543
4544   
4545     case 100:
4546     if(as3_pass==2) {
4547
4548 /* Line 1464 of skeleton.m4  */
4549 #line 1924 "parser.y"
4550     {
4551     code_t*out = abc_nop(0);
4552
4553     code_t*start = abc_nop(0);
4554     (yyval.code) = code_append(start, (yyvsp[(4) - (6)].code));
4555     if(!is_break_or_jump((yyvsp[(4) - (6)].code))) {
4556         (yyval.code) = abc_jump((yyval.code), out);
4557     }
4558     code_t*end = (yyval.code) = abc_nop((yyval.code));
4559   
4560     int tmp;
4561     if((yyvsp[(6) - (6)].catch_list).finally)
4562         tmp = new_variable("__finally__", 0, 0);
4563     
4564     abc_exception_list_t*l = (yyvsp[(6) - (6)].catch_list).l;
4565     int count=0;
4566     while(l) {
4567         abc_exception_t*e = l->abc_exception;
4568         if(e->var_name) {
4569             (yyval.code) = code_append((yyval.code), e->target);
4570             (yyval.code) = abc_jump((yyval.code), out);
4571         } else {
4572             parserassert((ptroff_t)(yyvsp[(6) - (6)].catch_list).finally);
4573             // finally block
4574             e->target = (yyval.code) = abc_nop((yyval.code));
4575             (yyval.code) = abc___rethrow__((yyval.code));
4576         }
4577         
4578         e->from = start;
4579         e->to = end;
4580
4581         l = l->next;
4582     }
4583     (yyval.code) = code_append((yyval.code), out);
4584
4585     (yyval.code) = insert_finally((yyval.code), (yyvsp[(6) - (6)].catch_list).finally, tmp);
4586         
4587     list_concat(state->method->exceptions, (yyvsp[(6) - (6)].catch_list).l);
4588    
4589     (yyval.code) = var_block((yyval.code));
4590     old_state();
4591 }
4592     }
4593     break;
4594
4595
4596   
4597     case 101:
4598     if(as3_pass==2) {
4599
4600 /* Line 1464 of skeleton.m4  */
4601 #line 1969 "parser.y"
4602     {
4603     (yyval.code)=(yyvsp[(2) - (2)].value).c;
4604     (yyval.code)=abc_throw((yyval.code));
4605 }
4606     }
4607     break;
4608
4609
4610   
4611     case 102:
4612     if(as3_pass==2) {
4613
4614 /* Line 1464 of skeleton.m4  */
4615 #line 1973 "parser.y"
4616     {
4617     if(!state->exception_name)
4618         syntaxerror("re-throw only possible within a catch block");
4619     variable_t*v = find_variable(state->exception_name);
4620     (yyval.code)=code_new();
4621     (yyval.code)=abc_getlocal((yyval.code), v->index);
4622     (yyval.code)=abc_throw((yyval.code));
4623 }
4624     }
4625     break;
4626
4627
4628   
4629     case 103:
4630     if(as3_pass==2) {
4631
4632 /* Line 1464 of skeleton.m4  */
4633 #line 1984 "parser.y"
4634     {
4635      (yyval.code) = (yyvsp[(3) - (5)].value).c;
4636      (yyval.code) = abc_pushscope((yyval.code));
4637      (yyval.code) = code_append((yyval.code), (yyvsp[(5) - (5)].code));
4638      (yyval.code) = abc_popscope((yyval.code));
4639 }
4640     }
4641     break;
4642
4643
4644   
4645     case 105:
4646     if(as3_pass==2) {
4647
4648 /* Line 1464 of skeleton.m4  */
4649 #line 1994 "parser.y"
4650     {PASS12 (yyval.id)="package";}
4651     }
4652     break;
4653
4654
4655   
4656     case 106:
4657     if(as3_pass==2) {
4658
4659 /* Line 1464 of skeleton.m4  */
4660 #line 1996 "parser.y"
4661     {PASS12 (yyval.id) = concat3((yyvsp[(1) - (3)].id),".",(yyvsp[(3) - (3)].id));free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;}
4662     }
4663     break;
4664
4665
4666   
4667     case 107:
4668     if(as3_pass==2) {
4669
4670 /* Line 1464 of skeleton.m4  */
4671 #line 1997 "parser.y"
4672     {PASS12 (yyval.id)=strdup((yyvsp[(1) - (1)].id));}
4673     }
4674     break;
4675
4676
4677   
4678     case 108:
4679     if(as3_pass==2) {
4680
4681 /* Line 1464 of skeleton.m4  */
4682 #line 1999 "parser.y"
4683     {PASS12 startpackage((yyvsp[(2) - (3)].id));free((yyvsp[(2) - (3)].id));(yyvsp[(2) - (3)].id)=0;}
4684     }
4685     break;
4686
4687
4688   
4689     case 109:
4690     if(as3_pass==2) {
4691
4692 /* Line 1464 of skeleton.m4  */
4693 #line 2000 "parser.y"
4694     {PASS12 endpackage();(yyval.code)=0;}
4695     }
4696     break;
4697
4698
4699   
4700     case 110:
4701     if(as3_pass==2) {
4702
4703 /* Line 1464 of skeleton.m4  */
4704 #line 2001 "parser.y"
4705     {PASS12 startpackage("");}
4706     }
4707     break;
4708
4709
4710   
4711     case 111:
4712     if(as3_pass==2) {
4713
4714 /* Line 1464 of skeleton.m4  */
4715 #line 2002 "parser.y"
4716     {PASS12 endpackage();(yyval.code)=0;}
4717     }
4718     break;
4719
4720
4721   
4722     case 112:
4723     if(as3_pass==2) {
4724
4725 /* Line 1464 of skeleton.m4  */
4726 #line 2004 "parser.y"
4727     {
4728        classinfo_t*c = (yyvsp[(2) - (2)].classinfo);
4729        if(!c) 
4730             syntaxerror("Couldn't import class\n");
4731        state_has_imports();
4732        dict_put(state->imports, c->name, c);
4733        (yyval.code)=0;
4734 }
4735     }
4736     break;
4737
4738
4739   
4740     case 113:
4741     if(as3_pass==2) {
4742
4743 /* Line 1464 of skeleton.m4  */
4744 #line 2012 "parser.y"
4745     {
4746        NEW(import_t,i);
4747        i->package = (yyvsp[(2) - (4)].id);
4748        state_has_imports();
4749        list_append(state->wildcard_imports, i);
4750        (yyval.code)=0;
4751 }
4752     }
4753     break;
4754
4755
4756   
4757     case 114:
4758     if(as3_pass==2) {
4759
4760 /* Line 1464 of skeleton.m4  */
4761 #line 2022 "parser.y"
4762     {PASS12 (yyval.flags)=0;}
4763     }
4764     break;
4765
4766
4767   
4768     case 115:
4769     if(as3_pass==2) {
4770
4771 /* Line 1464 of skeleton.m4  */
4772 #line 2023 "parser.y"
4773     {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
4774     }
4775     break;
4776
4777
4778   
4779     case 116:
4780     if(as3_pass==2) {
4781
4782 /* Line 1464 of skeleton.m4  */
4783 #line 2024 "parser.y"
4784     {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].token);}
4785     }
4786     break;
4787
4788
4789   
4790     case 117:
4791     if(as3_pass==2) {
4792
4793 /* Line 1464 of skeleton.m4  */
4794 #line 2025 "parser.y"
4795     {PASS12 (yyval.flags)=(yyvsp[(1) - (2)].flags)|(yyvsp[(2) - (2)].token);}
4796     }
4797     break;
4798
4799
4800   
4801     case 118:
4802     if(as3_pass==2) {
4803
4804 /* Line 1464 of skeleton.m4  */
4805 #line 2027 "parser.y"
4806     {PASS12 (yyval.token)=FLAG_PUBLIC;}
4807     }
4808     break;
4809
4810
4811   
4812     case 119:
4813     if(as3_pass==2) {
4814
4815 /* Line 1464 of skeleton.m4  */
4816 #line 2028 "parser.y"
4817     {PASS12 (yyval.token)=FLAG_PRIVATE;}
4818     }
4819     break;
4820
4821
4822   
4823     case 120:
4824     if(as3_pass==2) {
4825
4826 /* Line 1464 of skeleton.m4  */
4827 #line 2029 "parser.y"
4828     {PASS12 (yyval.token)=FLAG_PROTECTED;}
4829     }
4830     break;
4831
4832
4833   
4834     case 121:
4835     if(as3_pass==2) {
4836
4837 /* Line 1464 of skeleton.m4  */
4838 #line 2030 "parser.y"
4839     {PASS12 (yyval.token)=FLAG_STATIC;}
4840     }
4841     break;
4842
4843
4844   
4845     case 122:
4846     if(as3_pass==2) {
4847
4848 /* Line 1464 of skeleton.m4  */
4849 #line 2031 "parser.y"
4850     {PASS12 (yyval.token)=FLAG_DYNAMIC;}
4851     }
4852     break;
4853
4854
4855   
4856     case 123:
4857     if(as3_pass==2) {
4858
4859 /* Line 1464 of skeleton.m4  */
4860 #line 2032 "parser.y"
4861     {PASS12 (yyval.token)=FLAG_FINAL;}
4862     }
4863     break;
4864
4865
4866   
4867     case 124:
4868     if(as3_pass==2) {
4869
4870 /* Line 1464 of skeleton.m4  */
4871 #line 2033 "parser.y"
4872     {PASS12 (yyval.token)=FLAG_OVERRIDE;}
4873     }
4874     break;
4875
4876
4877   
4878     case 125:
4879     if(as3_pass==2) {
4880
4881 /* Line 1464 of skeleton.m4  */
4882 #line 2034 "parser.y"
4883     {PASS12 (yyval.token)=FLAG_NATIVE;}
4884     }
4885     break;
4886
4887
4888   
4889     case 126:
4890     if(as3_pass==2) {
4891
4892 /* Line 1464 of skeleton.m4  */
4893 #line 2035 "parser.y"
4894     {PASS12 (yyval.token)=FLAG_PACKAGEINTERNAL;}
4895     }
4896     break;
4897
4898
4899   
4900     case 127:
4901     if(as3_pass==2) {
4902
4903 /* Line 1464 of skeleton.m4  */
4904 #line 2037 "parser.y"
4905     {(yyval.classinfo)=registry_getobjectclass();}
4906     }
4907     break;
4908
4909
4910   
4911     case 128:
4912     if(as3_pass==2) {
4913
4914 /* Line 1464 of skeleton.m4  */
4915 #line 2038 "parser.y"
4916     {(yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
4917     }
4918     break;
4919
4920
4921   
4922     case 129:
4923     if(as3_pass==2) {
4924
4925 /* Line 1464 of skeleton.m4  */
4926 #line 2040 "parser.y"
4927     {PASS12 (yyval.classinfo_list)=list_new();}
4928     }
4929     break;
4930
4931
4932   
4933     case 130:
4934     if(as3_pass==2) {
4935
4936 /* Line 1464 of skeleton.m4  */
4937 #line 2041 "parser.y"
4938     {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
4939     }
4940     break;
4941
4942
4943   
4944     case 131:
4945     if(as3_pass==2) {
4946
4947 /* Line 1464 of skeleton.m4  */
4948 #line 2043 "parser.y"
4949     {PASS12 (yyval.classinfo_list)=list_new();}
4950     }
4951     break;
4952
4953
4954   
4955     case 132:
4956     if(as3_pass==2) {
4957
4958 /* Line 1464 of skeleton.m4  */
4959 #line 2044 "parser.y"
4960     {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
4961     }
4962     break;
4963
4964
4965   
4966     case 133:
4967     if(as3_pass==2) {
4968
4969 /* Line 1464 of skeleton.m4  */
4970 #line 2048 "parser.y"
4971     {PASS12 startclass((yyvsp[(1) - (6)].flags),(yyvsp[(3) - (6)].id),(yyvsp[(4) - (6)].classinfo),(yyvsp[(5) - (6)].classinfo_list), 0);}
4972     }
4973     break;
4974
4975
4976   
4977     case 134:
4978     if(as3_pass==2) {
4979
4980 /* Line 1464 of skeleton.m4  */
4981 #line 2050 "parser.y"
4982     {PASS12 endclass();(yyval.code)=0;}
4983     }
4984     break;
4985
4986
4987   
4988     case 135:
4989     if(as3_pass==2) {
4990
4991 /* Line 1464 of skeleton.m4  */
4992 #line 2054 "parser.y"
4993     {PASS12 startclass((yyvsp[(1) - (5)].flags),(yyvsp[(3) - (5)].id),0,(yyvsp[(4) - (5)].classinfo_list),1);}
4994     }
4995     break;
4996
4997
4998   
4999     case 136:
5000     if(as3_pass==2) {
5001
5002 /* Line 1464 of skeleton.m4  */
5003 #line 2056 "parser.y"
5004     {PASS12 endclass();(yyval.code)=0;}
5005     }
5006     break;
5007
5008
5009   
5010     case 144:
5011     if(as3_pass==2) {
5012
5013 /* Line 1464 of skeleton.m4  */
5014 #line 2068 "parser.y"
5015     {
5016     code_t*c = state->cls->static_init;
5017     c = code_append(c, (yyvsp[(1) - (1)].code));  
5018     state->cls->static_init = c;
5019 }
5020     }
5021     break;
5022
5023
5024   
5025     case 150:
5026     if(as3_pass==2) {
5027
5028 /* Line 1464 of skeleton.m4  */
5029 #line 2079 "parser.y"
5030     {
5031     syntaxerror("variable declarations not allowed in interfaces");
5032 }
5033     }
5034     break;
5035
5036
5037   
5038     case 151:
5039     if(as3_pass==2) {
5040
5041 /* Line 1464 of skeleton.m4  */
5042 #line 2082 "parser.y"
5043     {
5044     PASS12
5045     (yyvsp[(1) - (8)].flags) |= FLAG_PUBLIC;
5046     if((yyvsp[(1) - (8)].flags)&(FLAG_PRIVATE|FLAG_PACKAGEINTERNAL|FLAG_PROTECTED)) {
5047         syntaxerror("invalid method modifiers: interface methods always need to be public");
5048     }
5049     startfunction(0,(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo));
5050     endfunction(0,(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo), 0);
5051 }
5052     }
5053     break;
5054
5055
5056   
5057     case 154:
5058     if(as3_pass==2) {
5059
5060 /* Line 1464 of skeleton.m4  */
5061 #line 2096 "parser.y"
5062     {
5063     int flags = (yyvsp[(1) - (5)].flags);
5064     memberinfo_t* info = state->cls?
5065             memberinfo_register(state->cls->info, (yyvsp[(3) - (5)].id), MEMBER_SLOT):
5066             memberinfo_register_global(flags2access((yyvsp[(1) - (5)].flags)), state->package, (yyvsp[(3) - (5)].id), MEMBER_SLOT);
5067
5068     info->type = (yyvsp[(4) - (5)].classinfo);
5069     info->flags = flags;
5070
5071     /* slot name */
5072     namespace_t mname_ns = {flags2access(flags), ""};
5073     multiname_t mname = {QNAME, &mname_ns, 0, (yyvsp[(3) - (5)].id)};
5074   
5075     trait_list_t**traits;
5076     code_t**code;
5077     if(!state->cls) {
5078         // global variable
5079         mname_ns.name = state->package;
5080         traits = &global->init->traits;
5081         code = &global->init->method->body->code;
5082     } else if(flags&FLAG_STATIC) {
5083         // static variable
5084         traits = &state->cls->abc->static_traits;
5085         code = &state->cls->static_init;
5086     } else {
5087         // instance variable
5088         traits = &state->cls->abc->traits;
5089         code = &state->cls->init;
5090     }
5091     
5092     trait_t*t=0;
5093     if((yyvsp[(4) - (5)].classinfo)) {
5094         MULTINAME(m, (yyvsp[(4) - (5)].classinfo));
5095         t = trait_new_member(traits, multiname_clone(&m), multiname_clone(&mname), 0);
5096     } else {
5097         t = trait_new_member(traits, 0, multiname_clone(&mname), 0);
5098     }
5099     info->slot = t->slot_id;
5100     
5101     /* initalization code (if needed) */
5102     code_t*c = 0;
5103     if((yyvsp[(5) - (5)].value).c && !is_pushundefined((yyvsp[(5) - (5)].value).c)) {
5104         c = abc_getlocal_0(c);
5105         c = code_append(c, (yyvsp[(5) - (5)].value).c);
5106         c = converttype(c, (yyvsp[(5) - (5)].value).t, (yyvsp[(4) - (5)].classinfo));
5107         c = abc_setslot(c, t->slot_id);
5108     }
5109
5110     *code = code_append(*code, c);
5111
5112     if((yyvsp[(2) - (5)].token)==KW_CONST) {
5113         t->kind= TRAIT_CONST;
5114     }
5115
5116     (yyval.code)=0;
5117 }
5118     }
5119     break;
5120
5121
5122   
5123     case 155:
5124     if(as3_pass==2) {
5125
5126 /* Line 1464 of skeleton.m4  */
5127 #line 2155 "parser.y"
5128     {(yyval.constant)=0;}
5129     }
5130     break;
5131
5132
5133   
5134     case 156:
5135     if(as3_pass==2) {
5136
5137 /* Line 1464 of skeleton.m4  */
5138 #line 2156 "parser.y"
5139     {(yyval.constant)=(yyvsp[(2) - (2)].constant);}
5140     }
5141     break;
5142
5143
5144   
5145     case 157:
5146     if(as3_pass==2) {
5147
5148 /* Line 1464 of skeleton.m4  */
5149 #line 2158 "parser.y"
5150     {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_uint));}
5151     }
5152     break;
5153
5154
5155   
5156     case 158:
5157     if(as3_pass==2) {
5158
5159 /* Line 1464 of skeleton.m4  */
5160 #line 2159 "parser.y"
5161     {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_int));}
5162     }
5163     break;
5164
5165
5166   
5167     case 159:
5168     if(as3_pass==2) {
5169
5170 /* Line 1464 of skeleton.m4  */
5171 #line 2160 "parser.y"
5172     {(yyval.constant) = constant_new_uint((yyvsp[(1) - (1)].number_uint));}
5173     }
5174     break;
5175
5176
5177   
5178     case 160:
5179     if(as3_pass==2) {
5180
5181 /* Line 1464 of skeleton.m4  */
5182 #line 2161 "parser.y"
5183     {(yyval.constant) = constant_new_float((yyvsp[(1) - (1)].number_float));}
5184     }
5185     break;
5186
5187
5188   
5189     case 161:
5190     if(as3_pass==2) {
5191
5192 /* Line 1464 of skeleton.m4  */
5193 #line 2162 "parser.y"
5194     {(yyval.constant) = constant_new_string2((yyvsp[(1) - (1)].str).str,(yyvsp[(1) - (1)].str).len);}
5195     }
5196     break;
5197
5198
5199   
5200     case 162:
5201     if(as3_pass==2) {
5202
5203 /* Line 1464 of skeleton.m4  */
5204 #line 2164 "parser.y"
5205     {(yyval.constant) = constant_new_true((yyvsp[(1) - (1)].token));}
5206     }
5207     break;
5208
5209
5210   
5211     case 163:
5212     if(as3_pass==2) {
5213
5214 /* Line 1464 of skeleton.m4  */
5215 #line 2165 "parser.y"
5216     {(yyval.constant) = constant_new_false((yyvsp[(1) - (1)].token));}
5217     }
5218     break;
5219
5220
5221   
5222     case 164:
5223     if(as3_pass==2) {
5224
5225 /* Line 1464 of skeleton.m4  */
5226 #line 2166 "parser.y"
5227     {(yyval.constant) = constant_new_null((yyvsp[(1) - (1)].token));}
5228     }
5229     break;
5230
5231
5232   
5233     case 165:
5234     if(as3_pass==2) {
5235
5236 /* Line 1464 of skeleton.m4  */
5237 #line 2171 "parser.y"
5238     {
5239     memset(&(yyval.params),0,sizeof((yyval.params)));
5240 }
5241     }
5242     break;
5243
5244
5245   
5246     case 166:
5247     if(as3_pass==2) {
5248
5249 /* Line 1464 of skeleton.m4  */
5250 #line 2174 "parser.y"
5251     {
5252     (yyval.params)=(yyvsp[(1) - (1)].params);
5253 }
5254     }
5255     break;
5256
5257
5258   
5259     case 167:
5260     if(as3_pass==2) {
5261
5262 /* Line 1464 of skeleton.m4  */
5263 #line 2179 "parser.y"
5264     {
5265     memset(&(yyval.params),0,sizeof((yyval.params)));
5266     (yyval.params).varargs=1;
5267     list_append((yyval.params).list, (yyvsp[(2) - (2)].param));
5268 }
5269     }
5270     break;
5271
5272
5273   
5274     case 168:
5275     if(as3_pass==2) {
5276
5277 /* Line 1464 of skeleton.m4  */
5278 #line 2184 "parser.y"
5279     {
5280     (yyval.params) =(yyvsp[(1) - (4)].params);
5281     (yyval.params).varargs=1;
5282     list_append((yyval.params).list, (yyvsp[(4) - (4)].param));
5283 }
5284     }
5285     break;
5286
5287
5288   
5289     case 169:
5290     if(as3_pass==2) {
5291
5292 /* Line 1464 of skeleton.m4  */
5293 #line 2191 "parser.y"
5294     {
5295     (yyval.params) = (yyvsp[(1) - (3)].params);
5296     list_append((yyval.params).list, (yyvsp[(3) - (3)].param));
5297 }
5298     }
5299     break;
5300
5301
5302   
5303     case 170:
5304     if(as3_pass==2) {
5305
5306 /* Line 1464 of skeleton.m4  */
5307 #line 2195 "parser.y"
5308     {
5309     memset(&(yyval.params),0,sizeof((yyval.params)));
5310     list_append((yyval.params).list, (yyvsp[(1) - (1)].param));
5311 }
5312     }
5313     break;
5314
5315
5316   
5317     case 171:
5318     if(as3_pass==2) {
5319
5320 /* Line 1464 of skeleton.m4  */
5321 #line 2200 "parser.y"
5322     {
5323      (yyval.param) = malloc(sizeof(param_t));
5324      (yyval.param)->name=(yyvsp[(1) - (4)].id);
5325      (yyval.param)->type = (yyvsp[(3) - (4)].classinfo);
5326      (yyval.param)->value = (yyvsp[(4) - (4)].constant);
5327 }
5328     }
5329     break;
5330
5331
5332   
5333     case 172:
5334     if(as3_pass==2) {
5335
5336 /* Line 1464 of skeleton.m4  */
5337 #line 2206 "parser.y"
5338     {
5339      (yyval.param) = malloc(sizeof(param_t));
5340      (yyval.param)->name=(yyvsp[(1) - (2)].id);
5341      (yyval.param)->type = TYPE_ANY;
5342      (yyval.param)->value = (yyvsp[(2) - (2)].constant);
5343 }
5344     }
5345     break;
5346
5347
5348   
5349     case 173:
5350     if(as3_pass==2) {
5351
5352 /* Line 1464 of skeleton.m4  */
5353 #line 2212 "parser.y"
5354     {(yyval.token)=(yyvsp[(1) - (1)].token);}
5355     }
5356     break;
5357
5358
5359   
5360     case 174:
5361     if(as3_pass==2) {
5362
5363 /* Line 1464 of skeleton.m4  */
5364 #line 2213 "parser.y"
5365     {(yyval.token)=(yyvsp[(1) - (1)].token);}
5366     }
5367     break;
5368
5369
5370   
5371     case 175:
5372     if(as3_pass==2) {
5373
5374 /* Line 1464 of skeleton.m4  */
5375 #line 2214 "parser.y"
5376     {(yyval.token)=0;}
5377     }
5378     break;
5379
5380
5381   
5382     case 176:
5383     if(as3_pass==2) {
5384
5385 /* Line 1464 of skeleton.m4  */
5386 #line 2217 "parser.y"
5387     {PASS12 startfunction(0,(yyvsp[(1) - (9)].flags),(yyvsp[(3) - (9)].token),(yyvsp[(4) - (9)].id),&(yyvsp[(6) - (9)].params),(yyvsp[(8) - (9)].classinfo));}
5388     }
5389     break;
5390
5391
5392   
5393     case 177:
5394     if(as3_pass==2) {
5395
5396 /* Line 1464 of skeleton.m4  */
5397 #line 2218 "parser.y"
5398     {
5399     PASS1 old_state();
5400     PASS2
5401     if(!state->method->info) syntaxerror("internal error");
5402     code_t*c = 0;
5403     if(state->method->late_binding) {
5404         c = abc_getlocal_0(c);
5405         c = abc_pushscope(c);
5406     }
5407     if(state->method->is_constructor && !state->method->has_super) {
5408         // call default constructor
5409         c = abc_getlocal_0(c);
5410         c = abc_constructsuper(c, 0);
5411     }
5412     c = wrap_function(c, 0, (yyvsp[(11) - (12)].code));
5413
5414     endfunction(0,(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),(yyvsp[(8) - (12)].classinfo),c);
5415     (yyval.code)=0;
5416 }
5417     }
5418     break;
5419
5420
5421   
5422     case 179:
5423     if(as3_pass==2) {
5424
5425 /* Line 1464 of skeleton.m4  */
5426 #line 2239 "parser.y"
5427     {(yyval.id)=0;}
5428     }
5429     break;
5430
5431
5432   
5433     case 180:
5434     if(as3_pass==2) {
5435
5436 /* Line 1464 of skeleton.m4  */
5437 #line 2241 "parser.y"
5438     {PASS12 innerfunction((yyvsp[(2) - (7)].id),&(yyvsp[(4) - (7)].params),(yyvsp[(6) - (7)].classinfo));}
5439     }
5440     break;
5441
5442
5443   
5444     case 181:
5445     if(as3_pass==2) {
5446
5447 /* Line 1464 of skeleton.m4  */
5448 #line 2242 "parser.y"
5449     {
5450     PASS1 old_state();
5451     PASS2
5452     memberinfo_t*f = state->method->info;
5453     if(!f) syntaxerror("internal error");
5454
5455     code_t*c = 0;
5456     c = wrap_function(c, 0, (yyvsp[(9) - (10)].code));
5457
5458     abc_method_t*abc = endfunction(0,0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),(yyvsp[(6) - (10)].classinfo),c);
5459     
5460     (yyval.value).c = abc_newfunction(0, abc);
5461     (yyval.value).t = TYPE_FUNCTION(f);
5462 }
5463     }
5464     break;
5465
5466
5467   
5468     case 182:
5469     if(as3_pass==2) {
5470
5471 /* Line 1464 of skeleton.m4  */
5472 #line 2260 "parser.y"
5473     {
5474     PASS1 (yyval.classinfo)=0;
5475     PASS2
5476     /* try current package */
5477     (yyval.classinfo) = find_class((yyvsp[(1) - (1)].id));
5478     if(!(yyval.classinfo)) syntaxerror("Could not find class %s\n", (yyvsp[(1) - (1)].id));
5479 }
5480     }
5481     break;
5482
5483
5484   
5485     case 183:
5486     if(as3_pass==2) {
5487
5488 /* Line 1464 of skeleton.m4  */
5489 #line 2268 "parser.y"
5490     {
5491     PASS1 (yyval.classinfo)=0;
5492     PASS2
5493     (yyval.classinfo) = registry_findclass((yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
5494     if(!(yyval.classinfo)) syntaxerror("Couldn't find class %s.%s\n", (yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
5495     free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;
5496 }
5497     }
5498     break;
5499
5500
5501   
5502     case 186:
5503     if(as3_pass==2) {
5504
5505 /* Line 1464 of skeleton.m4  */
5506 #line 2279 "parser.y"
5507     {PASS12 (yyval.classinfo_list)=list_new();list_append((yyval.classinfo_list), (yyvsp[(1) - (1)].classinfo));}
5508     }
5509     break;
5510
5511
5512   
5513     case 187:
5514     if(as3_pass==2) {
5515
5516 /* Line 1464 of skeleton.m4  */
5517 #line 2280 "parser.y"
5518     {PASS12 (yyval.classinfo_list)=(yyvsp[(1) - (3)].classinfo_list);list_append((yyval.classinfo_list),(yyvsp[(3) - (3)].classinfo));}
5519     }
5520     break;
5521
5522
5523   
5524     case 188:
5525     if(as3_pass==2) {
5526
5527 /* Line 1464 of skeleton.m4  */
5528 #line 2282 "parser.y"
5529     {(yyval.classinfo)=(yyvsp[(1) - (1)].classinfo);}
5530     }
5531     break;
5532
5533
5534   
5535     case 189:
5536     if(as3_pass==2) {
5537
5538 /* Line 1464 of skeleton.m4  */
5539 #line 2283 "parser.y"
5540     {(yyval.classinfo)=registry_getanytype();}
5541     }
5542     break;
5543
5544
5545   
5546     case 190:
5547     if(as3_pass==2) {
5548
5549 /* Line 1464 of skeleton.m4  */
5550 #line 2284 "parser.y"
5551     {(yyval.classinfo)=registry_getanytype();}
5552     }
5553     break;
5554
5555
5556   
5557     case 191:
5558     if(as3_pass==2) {
5559
5560 /* Line 1464 of skeleton.m4  */
5561 #line 2293 "parser.y"
5562     {(yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
5563     }
5564     break;
5565
5566
5567   
5568     case 192:
5569     if(as3_pass==2) {
5570
5571 /* Line 1464 of skeleton.m4  */
5572 #line 2294 "parser.y"
5573     {(yyval.classinfo)=0;}
5574     }
5575     break;
5576
5577
5578   
5579     case 193:
5580     if(as3_pass==2) {
5581
5582 /* Line 1464 of skeleton.m4  */
5583 #line 2298 "parser.y"
5584     {(yyval.value_list).cc=0;(yyval.value_list).len=0;}
5585     }
5586     break;
5587
5588
5589   
5590     case 194:
5591     if(as3_pass==2) {
5592
5593 /* Line 1464 of skeleton.m4  */
5594 #line 2299 "parser.y"
5595     {(yyval.value_list)=(yyvsp[(2) - (3)].value_list);}
5596     }
5597     break;
5598
5599
5600   
5601     case 195:
5602     if(as3_pass==2) {
5603
5604 /* Line 1464 of skeleton.m4  */
5605 #line 2301 "parser.y"
5606     {(yyval.value_list).cc=0;(yyval.value_list).len=0;}
5607     }
5608     break;
5609
5610
5611   
5612     case 197:
5613     if(as3_pass==2) {
5614
5615 /* Line 1464 of skeleton.m4  */
5616 #line 2303 "parser.y"
5617     {(yyval.value_list).len=1;
5618                                                   (yyval.value_list).cc = (yyvsp[(1) - (1)].value).c;
5619                                                  }
5620     }
5621     break;
5622
5623
5624   
5625     case 198:
5626     if(as3_pass==2) {
5627
5628 /* Line 1464 of skeleton.m4  */
5629 #line 2306 "parser.y"
5630     {
5631                                                   (yyval.value_list).len= (yyvsp[(1) - (3)].value_list).len+1;
5632                                                   (yyval.value_list).cc = code_append((yyvsp[(1) - (3)].value_list).cc, (yyvsp[(3) - (3)].value).c);
5633                                                   }
5634     }
5635     break;
5636
5637
5638   
5639     case 199:
5640     if(as3_pass==2) {
5641
5642 /* Line 1464 of skeleton.m4  */
5643 #line 2311 "parser.y"
5644     {
5645     MULTINAME(m, (yyvsp[(2) - (3)].classinfo));
5646     (yyval.value).c = code_new();
5647
5648     if((yyvsp[(2) - (3)].classinfo)->slot) {
5649         (yyval.value).c = abc_getglobalscope((yyval.value).c);
5650         (yyval.value).c = abc_getslot((yyval.value).c, (yyvsp[(2) - (3)].classinfo)->slot);
5651     } else {
5652         (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
5653     }
5654
5655     (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (3)].value_list).cc);
5656
5657     if((yyvsp[(2) - (3)].classinfo)->slot)
5658         (yyval.value).c = abc_construct((yyval.value).c, (yyvsp[(3) - (3)].value_list).len);
5659     else
5660         (yyval.value).c = abc_constructprop2((yyval.value).c, &m, (yyvsp[(3) - (3)].value_list).len);
5661     (yyval.value).t = (yyvsp[(2) - (3)].classinfo);
5662 }
5663     }
5664     break;
5665
5666
5667   
5668     case 200:
5669     if(as3_pass==2) {
5670
5671 /* Line 1464 of skeleton.m4  */
5672 #line 2335 "parser.y"
5673     {
5674     
5675     (yyval.value).c = (yyvsp[(1) - (4)].value).c;
5676     if((yyval.value).c->opcode == OPCODE_COERCE_A) {
5677         (yyval.value).c = code_cutlast((yyval.value).c);
5678     }
5679     code_t*paramcode = (yyvsp[(3) - (4)].value_list).cc;
5680
5681     (yyval.value).t = TYPE_ANY;
5682     if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
5683         multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
5684         (yyval.value).c = code_cutlast((yyval.value).c);
5685         (yyval.value).c = code_append((yyval.value).c, paramcode);
5686         (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).len);
5687         multiname_destroy(name);
5688     } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
5689         int slot = (int)(ptroff_t)(yyval.value).c->data[0];
5690         trait_t*t = abc_class_find_slotid(state->cls->abc,slot);//FIXME
5691         if(t->kind!=TRAIT_METHOD) {
5692             //ok: flash allows to assign closures to members.
5693         }
5694         multiname_t*name = t->name;
5695         (yyval.value).c = code_cutlast((yyval.value).c);
5696         (yyval.value).c = code_append((yyval.value).c, paramcode);
5697         //$$.c = abc_callmethod($$.c, t->method, len); //#1051 illegal early access binding
5698         (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).len);
5699     } else if((yyval.value).c->opcode == OPCODE_GETSUPER) {
5700         multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
5701         (yyval.value).c = code_cutlast((yyval.value).c);
5702         (yyval.value).c = code_append((yyval.value).c, paramcode);
5703         (yyval.value).c = abc_callsuper2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).len);
5704         multiname_destroy(name);
5705     } else {
5706         (yyval.value).c = abc_getlocal_0((yyval.value).c);
5707         (yyval.value).c = code_append((yyval.value).c, paramcode);
5708         (yyval.value).c = abc_call((yyval.value).c, (yyvsp[(3) - (4)].value_list).len);
5709     }
5710    
5711     memberinfo_t*f = 0;
5712    
5713     if(TYPE_IS_FUNCTION((yyvsp[(1) - (4)].value).t) && (yyvsp[(1) - (4)].value).t->function) {
5714         (yyval.value).t = (yyvsp[(1) - (4)].value).t->function->return_type;
5715     } else {
5716         (yyval.value).c = abc_coerce_a((yyval.value).c);
5717         (yyval.value).t = TYPE_ANY;
5718     }
5719
5720 }
5721     }
5722     break;
5723
5724
5725   
5726     case 201:
5727     if(as3_pass==2) {
5728
5729 /* Line 1464 of skeleton.m4  */
5730 #line 2383 "parser.y"
5731     {
5732     if(!state->cls) syntaxerror("super() not allowed outside of a class");
5733     if(!state->method) syntaxerror("super() not allowed outside of a function");
5734     if(!state->method->is_constructor) syntaxerror("super() not allowed outside of a constructor");
5735
5736     (yyval.value).c = code_new();
5737     (yyval.value).c = abc_getlocal_0((yyval.value).c);
5738
5739     (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value_list).cc);
5740     /*
5741     this is dependent on the control path, check this somewhere else
5742     if(state->method->has_super)
5743         syntaxerror("constructor may call super() only once");
5744     */
5745     state->method->has_super = 1;
5746     (yyval.value).c = abc_constructsuper((yyval.value).c, (yyvsp[(3) - (4)].value_list).len);
5747     (yyval.value).c = abc_pushundefined((yyval.value).c);
5748     (yyval.value).t = TYPE_ANY;
5749 }
5750     }
5751     break;
5752
5753
5754   
5755     case 202:
5756     if(as3_pass==2) {
5757
5758 /* Line 1464 of skeleton.m4  */
5759 #line 2403 "parser.y"
5760     {
5761     (yyval.value).c = (yyvsp[(2) - (2)].value).c;
5762     if((yyval.value).c->opcode == OPCODE_COERCE_A) {
5763         (yyval.value).c = code_cutlast((yyval.value).c);
5764     }
5765     multiname_t*name = 0;
5766     if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
5767         (yyval.value).c->opcode = OPCODE_DELETEPROPERTY;
5768     } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
5769         int slot = (int)(ptroff_t)(yyval.value).c->data[0];
5770         multiname_t*name = abc_class_find_slotid(state->cls->abc,slot)->name;
5771         (yyval.value).c = code_cutlast((yyval.value).c);
5772         (yyval.value).c = abc_deleteproperty2((yyval.value).c, name);
5773     } else {
5774         (yyval.value).c = abc_getlocal_0((yyval.value).c);
5775         MULTINAME_LATE(m, (yyvsp[(2) - (2)].value).t?(yyvsp[(2) - (2)].value).t->access:ACCESS_PACKAGE, "");
5776         (yyval.value).c = abc_deleteproperty2((yyval.value).c, &m);
5777     }
5778     (yyval.value).t = TYPE_BOOLEAN;
5779 }
5780     }
5781     break;
5782
5783
5784   
5785     case 203:
5786     if(as3_pass==2) {
5787
5788 /* Line 1464 of skeleton.m4  */
5789 #line 2424 "parser.y"
5790     {
5791     (yyval.code) = abc_returnvoid(0);
5792 }
5793     }
5794     break;
5795
5796
5797   
5798     case 204:
5799     if(as3_pass==2) {
5800
5801 /* Line 1464 of skeleton.m4  */
5802 #line 2427 "parser.y"
5803     {
5804     (yyval.code) = (yyvsp[(2) - (2)].value).c;
5805     (yyval.code) = abc_returnvalue((yyval.code));
5806 }
5807     }
5808     break;
5809
5810
5811   
5812     case 205:
5813     if(as3_pass==2) {
5814
5815 /* Line 1464 of skeleton.m4  */
5816 #line 2434 "parser.y"
5817     {(yyval.value)=(yyvsp[(1) - (1)].value);}
5818     }
5819     break;
5820
5821
5822   
5823     case 206:
5824     if(as3_pass==2) {
5825
5826 /* Line 1464 of skeleton.m4  */
5827 #line 2435 "parser.y"
5828     {(yyval.value) = (yyvsp[(1) - (1)].value);}
5829     }
5830     break;
5831
5832
5833   
5834     case 207:
5835     if(as3_pass==2) {
5836
5837 /* Line 1464 of skeleton.m4  */
5838 #line 2436 "parser.y"
5839     {
5840     (yyval.value).c = (yyvsp[(1) - (3)].value).c;
5841     (yyval.value).c = cut_last_push((yyval.value).c);
5842     (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
5843     (yyval.value).t = (yyvsp[(3) - (3)].value).t;
5844 }
5845     }
5846     break;
5847
5848
5849   
5850     case 208:
5851     if(as3_pass==2) {
5852
5853 /* Line 1464 of skeleton.m4  */
5854 #line 2442 "parser.y"
5855     {
5856     (yyval.code)=cut_last_push((yyvsp[(1) - (1)].value).c);
5857 }
5858     }
5859     break;
5860
5861
5862   
5863     case 209:
5864     if(as3_pass==2) {
5865
5866 /* Line 1464 of skeleton.m4  */
5867 #line 2448 "parser.y"
5868     {(yyval.value) = (yyvsp[(1) - (1)].value);}
5869     }
5870     break;
5871
5872
5873   
5874     case 211:
5875     if(as3_pass==2) {
5876
5877 /* Line 1464 of skeleton.m4  */
5878 #line 2452 "parser.y"
5879     {(yyval.value) = (yyvsp[(1) - (1)].value);}
5880     }
5881     break;
5882
5883
5884   
5885     case 212:
5886     if(as3_pass==2) {
5887
5888 /* Line 1464 of skeleton.m4  */
5889 #line 2454 "parser.y"
5890     {(yyval.value) = (yyvsp[(1) - (1)].value);}
5891     }
5892     break;
5893
5894
5895   
5896     case 213:
5897     if(as3_pass==2) {
5898
5899 /* Line 1464 of skeleton.m4  */
5900 #line 2456 "parser.y"
5901     {(yyval.value) = (yyvsp[(1) - (1)].value);}
5902     }
5903     break;
5904
5905
5906   
5907     case 214:
5908     if(as3_pass==2) {
5909
5910 /* Line 1464 of skeleton.m4  */
5911 #line 2458 "parser.y"
5912     {
5913     (yyval.value).c = 0;
5914     namespace_t ns = {ACCESS_PACKAGE, ""};
5915     multiname_t m = {QNAME, &ns, 0, "RegExp"};
5916     if(!(yyvsp[(1) - (1)].regexp).options) {
5917         (yyval.value).c = abc_getlex2((yyval.value).c, &m);
5918         (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).pattern);
5919         (yyval.value).c = abc_construct((yyval.value).c, 1);
5920     } else {
5921         (yyval.value).c = abc_getlex2((yyval.value).c, &m);
5922         (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).pattern);
5923         (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).options);
5924         (yyval.value).c = abc_construct((yyval.value).c, 2);
5925     }
5926     (yyval.value).t = TYPE_REGEXP;
5927 }
5928     }
5929     break;
5930
5931
5932   
5933     case 215:
5934     if(as3_pass==2) {
5935
5936 /* Line 1464 of skeleton.m4  */
5937 #line 2475 "parser.y"
5938     {(yyval.value).c = abc_pushbyte(0, (yyvsp[(1) - (1)].number_uint));
5939                    //MULTINAME(m, registry_getintclass());
5940                    //$$.c = abc_coerce2($$.c, &m); // FIXME
5941                    (yyval.value).t = TYPE_INT;
5942                   }
5943     }
5944     break;
5945
5946
5947   
5948     case 216:
5949     if(as3_pass==2) {
5950
5951 /* Line 1464 of skeleton.m4  */
5952 #line 2480 "parser.y"
5953     {(yyval.value).c = abc_pushshort(0, (yyvsp[(1) - (1)].number_uint));
5954                     (yyval.value).t = TYPE_INT;
5955                    }
5956     }
5957     break;
5958
5959
5960   
5961     case 217:
5962     if(as3_pass==2) {
5963
5964 /* Line 1464 of skeleton.m4  */
5965 #line 2483 "parser.y"
5966     {(yyval.value).c = abc_pushint(0, (yyvsp[(1) - (1)].number_int));
5967                   (yyval.value).t = TYPE_INT;
5968                  }
5969     }
5970     break;
5971
5972
5973   
5974     case 218:
5975     if(as3_pass==2) {
5976
5977 /* Line 1464 of skeleton.m4  */
5978 #line 2486 "parser.y"
5979     {(yyval.value).c = abc_pushuint(0, (yyvsp[(1) - (1)].number_uint));
5980                    (yyval.value).t = TYPE_UINT;
5981                   }
5982     }
5983     break;
5984
5985
5986   
5987     case 219:
5988     if(as3_pass==2) {
5989
5990 /* Line 1464 of skeleton.m4  */
5991 #line 2489 "parser.y"
5992     {(yyval.value).c = abc_pushdouble(0, (yyvsp[(1) - (1)].number_float));
5993                     (yyval.value).t = TYPE_FLOAT;
5994                    }
5995     }
5996     break;
5997
5998
5999   
6000     case 220:
6001     if(as3_pass==2) {
6002
6003 /* Line 1464 of skeleton.m4  */
6004 #line 2492 "parser.y"
6005     {(yyval.value).c = abc_pushstring2(0, &(yyvsp[(1) - (1)].str));
6006                      (yyval.value).t = TYPE_STRING;
6007                     }
6008     }
6009     break;
6010
6011
6012   
6013     case 221:
6014     if(as3_pass==2) {
6015
6016 /* Line 1464 of skeleton.m4  */
6017 #line 2495 "parser.y"
6018     {(yyval.value).c = abc_pushundefined(0);
6019                     (yyval.value).t = TYPE_ANY;
6020                    }
6021     }
6022     break;
6023
6024
6025   
6026     case 222:
6027     if(as3_pass==2) {
6028
6029 /* Line 1464 of skeleton.m4  */
6030 #line 2498 "parser.y"
6031     {(yyval.value).c = abc_pushtrue(0);
6032                     (yyval.value).t = TYPE_BOOLEAN;
6033                    }
6034     }
6035     break;
6036
6037
6038   
6039     case 223:
6040     if(as3_pass==2) {
6041
6042 /* Line 1464 of skeleton.m4  */
6043 #line 2501 "parser.y"
6044     {(yyval.value).c = abc_pushfalse(0);
6045                      (yyval.value).t = TYPE_BOOLEAN;
6046                     }
6047     }
6048     break;
6049
6050
6051   
6052     case 224:
6053     if(as3_pass==2) {
6054
6055 /* Line 1464 of skeleton.m4  */
6056 #line 2504 "parser.y"
6057     {(yyval.value).c = abc_pushnull(0);
6058                     (yyval.value).t = TYPE_NULL;
6059                    }
6060     }
6061     break;
6062
6063
6064   
6065     case 226:
6066     if(as3_pass==2) {
6067
6068 /* Line 1464 of skeleton.m4  */
6069 #line 2509 "parser.y"
6070     {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterequals((yyval.value).c);(yyval.value).c=abc_not((yyval.value).c);
6071              (yyval.value).t = TYPE_BOOLEAN;
6072             }
6073     }
6074     break;
6075
6076
6077   
6078     case 227:
6079     if(as3_pass==2) {
6080
6081 /* Line 1464 of skeleton.m4  */
6082 #line 2512 "parser.y"
6083     {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterthan((yyval.value).c);
6084              (yyval.value).t = TYPE_BOOLEAN;
6085             }
6086     }
6087     break;
6088
6089
6090   
6091     case 228:
6092     if(as3_pass==2) {
6093
6094 /* Line 1464 of skeleton.m4  */
6095 #line 2515 "parser.y"
6096     {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterthan((yyval.value).c);(yyval.value).c=abc_not((yyval.value).c);
6097               (yyval.value).t = TYPE_BOOLEAN;
6098              }
6099     }
6100     break;
6101
6102
6103   
6104     case 229:
6105     if(as3_pass==2) {
6106
6107 /* Line 1464 of skeleton.m4  */
6108 #line 2518 "parser.y"
6109     {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterequals((yyval.value).c);
6110               (yyval.value).t = TYPE_BOOLEAN;
6111              }
6112     }
6113     break;
6114
6115
6116   
6117     case 230:
6118     if(as3_pass==2) {
6119
6120 /* Line 1464 of skeleton.m4  */
6121 #line 2521 "parser.y"
6122     {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_equals((yyval.value).c);
6123               (yyval.value).t = TYPE_BOOLEAN;
6124              }
6125     }
6126     break;
6127
6128
6129   
6130     case 231:
6131     if(as3_pass==2) {
6132
6133 /* Line 1464 of skeleton.m4  */
6134 #line 2524 "parser.y"
6135     {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_strictequals((yyval.value).c);
6136               (yyval.value).t = TYPE_BOOLEAN;
6137               }
6138     }
6139     break;
6140
6141
6142   
6143     case 232:
6144     if(as3_pass==2) {
6145
6146 /* Line 1464 of skeleton.m4  */
6147 #line 2527 "parser.y"
6148     {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_strictequals((yyval.value).c);(yyval.value).c = abc_not((yyval.value).c);
6149               (yyval.value).t = TYPE_BOOLEAN;
6150              }
6151     }
6152     break;
6153
6154
6155   
6156     case 233:
6157     if(as3_pass==2) {
6158
6159 /* Line 1464 of skeleton.m4  */
6160 #line 2530 "parser.y"
6161     {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_equals((yyval.value).c);(yyval.value).c = abc_not((yyval.value).c);
6162               (yyval.value).t = TYPE_BOOLEAN;
6163              }
6164     }
6165     break;
6166
6167
6168   
6169     case 234:
6170     if(as3_pass==2) {
6171
6172 /* Line 1464 of skeleton.m4  */
6173 #line 2534 "parser.y"
6174     {(yyval.value).t = join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'O');
6175               (yyval.value).c = (yyvsp[(1) - (3)].value).c;
6176               (yyval.value).c = converttype((yyval.value).c, (yyvsp[(1) - (3)].value).t, (yyval.value).t);
6177               (yyval.value).c = abc_dup((yyval.value).c);
6178               code_t*jmp = (yyval.value).c = abc_iftrue((yyval.value).c, 0);
6179               (yyval.value).c = cut_last_push((yyval.value).c);
6180               (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
6181               (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (3)].value).t, (yyval.value).t);
6182               code_t*label = (yyval.value).c = abc_label((yyval.value).c);
6183               jmp->branch = label;
6184              }
6185     }
6186     break;
6187
6188
6189   
6190     case 235:
6191     if(as3_pass==2) {
6192
6193 /* Line 1464 of skeleton.m4  */
6194 #line 2545 "parser.y"
6195     {
6196               (yyval.value).t = join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'A');
6197               /*printf("%08x:\n",$1.t);
6198               code_dump($1.c, 0, 0, "", stdout);
6199               printf("%08x:\n",$3.t);
6200               code_dump($3.c, 0, 0, "", stdout);
6201               printf("joining %08x and %08x to %08x\n", $1.t, $3.t, $$.t);*/
6202               (yyval.value).c = (yyvsp[(1) - (3)].value).c;
6203               (yyval.value).c = converttype((yyval.value).c, (yyvsp[(1) - (3)].value).t, (yyval.value).t);
6204               (yyval.value).c = abc_dup((yyval.value).c);
6205               code_t*jmp = (yyval.value).c = abc_iffalse((yyval.value).c, 0);
6206               (yyval.value).c = cut_last_push((yyval.value).c);
6207               (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
6208               (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (3)].value).t, (yyval.value).t);
6209               code_t*label = (yyval.value).c = abc_label((yyval.value).c);
6210               jmp->branch = label;              
6211              }
6212     }
6213     break;
6214
6215
6216   
6217     case 236:
6218     if(as3_pass==2) {
6219
6220 /* Line 1464 of skeleton.m4  */
6221 #line 2563 "parser.y"
6222     {(yyval.value).c=(yyvsp[(2) - (2)].value).c;
6223               (yyval.value).c = abc_not((yyval.value).c);
6224               (yyval.value).t = TYPE_BOOLEAN;
6225              }
6226     }
6227     break;
6228
6229
6230   
6231     case 237:
6232     if(as3_pass==2) {
6233
6234 /* Line 1464 of skeleton.m4  */
6235 #line 2568 "parser.y"
6236     {(yyval.value).c=(yyvsp[(2) - (2)].value).c;
6237               (yyval.value).c = abc_bitnot((yyval.value).c);
6238               (yyval.value).t = TYPE_INT;
6239              }
6240     }
6241     break;
6242
6243
6244   
6245     case 238:
6246     if(as3_pass==2) {
6247
6248 /* Line 1464 of skeleton.m4  */
6249 #line 2573 "parser.y"
6250     {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6251              (yyval.value).c = abc_bitand((yyval.value).c);
6252              (yyval.value).t = TYPE_INT;
6253             }
6254     }
6255     break;
6256
6257
6258   
6259     case 239:
6260     if(as3_pass==2) {
6261
6262 /* Line 1464 of skeleton.m4  */
6263 #line 2578 "parser.y"
6264     {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6265              (yyval.value).c = abc_bitxor((yyval.value).c);
6266              (yyval.value).t = TYPE_INT;
6267             }
6268     }
6269     break;
6270
6271
6272   
6273     case 240:
6274     if(as3_pass==2) {
6275
6276 /* Line 1464 of skeleton.m4  */
6277 #line 2583 "parser.y"
6278     {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6279              (yyval.value).c = abc_bitor((yyval.value).c);
6280              (yyval.value).t = TYPE_INT;
6281             }
6282     }
6283     break;
6284
6285
6286   
6287     case 241:
6288     if(as3_pass==2) {
6289
6290 /* Line 1464 of skeleton.m4  */
6291 #line 2588 "parser.y"
6292     {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6293              (yyval.value).c = abc_rshift((yyval.value).c);
6294              (yyval.value).t = TYPE_INT;
6295             }
6296     }
6297     break;
6298
6299
6300   
6301     case 242:
6302     if(as3_pass==2) {
6303
6304 /* Line 1464 of skeleton.m4  */
6305 #line 2592 "parser.y"
6306     {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6307              (yyval.value).c = abc_urshift((yyval.value).c);
6308              (yyval.value).t = TYPE_INT;
6309             }
6310     }
6311     break;
6312
6313
6314   
6315     case 243:
6316     if(as3_pass==2) {
6317
6318 /* Line 1464 of skeleton.m4  */
6319 #line 2596 "parser.y"
6320     {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6321              (yyval.value).c = abc_lshift((yyval.value).c);
6322              (yyval.value).t = TYPE_INT;
6323             }
6324     }
6325     break;
6326
6327
6328   
6329     case 244:
6330     if(as3_pass==2) {
6331
6332 /* Line 1464 of skeleton.m4  */
6333 #line 2601 "parser.y"
6334     {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6335              (yyval.value).c = abc_divide((yyval.value).c);
6336              (yyval.value).t = TYPE_NUMBER;
6337             }
6338     }
6339     break;
6340
6341
6342   
6343     case 245:
6344     if(as3_pass==2) {
6345
6346 /* Line 1464 of skeleton.m4  */
6347 #line 2605 "parser.y"
6348     {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6349              (yyval.value).c = abc_modulo((yyval.value).c);
6350              (yyval.value).t = TYPE_NUMBER;
6351             }
6352     }
6353     break;
6354
6355
6356   
6357     case 246:
6358     if(as3_pass==2) {
6359
6360 /* Line 1464 of skeleton.m4  */
6361 #line 2609 "parser.y"
6362     {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6363              if(BOTH_INT((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t)) {
6364                 (yyval.value).c = abc_add_i((yyval.value).c);
6365                 (yyval.value).t = TYPE_INT;
6366              } else {
6367                 (yyval.value).c = abc_add((yyval.value).c);
6368                 (yyval.value).t = join_types((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t,'+');
6369              }
6370             }
6371     }
6372     break;
6373
6374
6375   
6376     case 247:
6377     if(as3_pass==2) {
6378
6379 /* Line 1464 of skeleton.m4  */
6380 #line 2618 "parser.y"
6381     {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6382              if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
6383                 (yyval.value).c = abc_subtract_i((yyval.value).c);
6384                 (yyval.value).t = TYPE_INT;
6385              } else {
6386                 (yyval.value).c = abc_subtract((yyval.value).c);
6387                 (yyval.value).t = TYPE_NUMBER;
6388              }
6389             }
6390     }
6391     break;
6392
6393
6394   
6395     case 248:
6396     if(as3_pass==2) {
6397
6398 /* Line 1464 of skeleton.m4  */
6399 #line 2627 "parser.y"
6400     {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6401              if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
6402                 (yyval.value).c = abc_multiply_i((yyval.value).c);
6403                 (yyval.value).t = TYPE_INT;
6404              } else {
6405                 (yyval.value).c = abc_multiply((yyval.value).c);
6406                 (yyval.value).t = TYPE_NUMBER;
6407              }
6408             }
6409     }
6410     break;
6411
6412
6413   
6414     case 249:
6415     if(as3_pass==2) {
6416
6417 /* Line 1464 of skeleton.m4  */
6418 #line 2637 "parser.y"
6419     {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6420               (yyval.value).c = abc_in((yyval.value).c);
6421               (yyval.value).t = TYPE_BOOLEAN;
6422              }
6423     }
6424     break;
6425
6426
6427   
6428     case 250:
6429     if(as3_pass==2) {
6430
6431 /* Line 1464 of skeleton.m4  */
6432 #line 2642 "parser.y"
6433     {char use_astype=0; // flash player's astype works differently than astypelate
6434               if(use_astype && TYPE_IS_CLASS((yyvsp[(3) - (3)].value).t)) {
6435                 MULTINAME(m,(yyvsp[(3) - (3)].value).t->cls);
6436                 (yyval.value).c = abc_astype2((yyvsp[(1) - (3)].value).c, &m);
6437                 (yyval.value).t = (yyvsp[(3) - (3)].value).t->cls;
6438               } else {
6439                 (yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
6440                 (yyval.value).c = abc_astypelate((yyval.value).c);
6441                 (yyval.value).t = TYPE_ANY;
6442               }
6443              }
6444     }
6445     break;
6446
6447
6448   
6449     case 251:
6450     if(as3_pass==2) {
6451
6452 /* Line 1464 of skeleton.m4  */
6453 #line 2655 "parser.y"
6454     {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
6455               (yyval.value).c = abc_instanceof((yyval.value).c);
6456               (yyval.value).t = TYPE_BOOLEAN;
6457              }
6458     }
6459     break;
6460
6461
6462   
6463     case 252:
6464     if(as3_pass==2) {
6465
6466 /* Line 1464 of skeleton.m4  */
6467 #line 2660 "parser.y"
6468     {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
6469               (yyval.value).c = abc_istypelate((yyval.value).c);
6470               (yyval.value).t = TYPE_BOOLEAN;
6471              }
6472     }
6473     break;
6474
6475
6476   
6477     case 253:
6478     if(as3_pass==2) {
6479
6480 /* Line 1464 of skeleton.m4  */
6481 #line 2665 "parser.y"
6482     {
6483               (yyval.value).c = (yyvsp[(3) - (4)].value).c;
6484               (yyval.value).c = abc_typeof((yyval.value).c);
6485               (yyval.value).t = TYPE_STRING;
6486              }
6487     }
6488     break;
6489
6490
6491   
6492     case 254:
6493     if(as3_pass==2) {
6494
6495 /* Line 1464 of skeleton.m4  */
6496 #line 2671 "parser.y"
6497     {
6498               (yyval.value).c = cut_last_push((yyvsp[(2) - (2)].value).c);
6499               (yyval.value).c = abc_pushundefined((yyval.value).c);
6500               (yyval.value).t = TYPE_ANY;
6501              }
6502     }
6503     break;
6504
6505
6506   
6507     case 255:
6508     if(as3_pass==2) {
6509
6510 /* Line 1464 of skeleton.m4  */
6511 #line 2677 "parser.y"
6512     { (yyval.value).c = abc_pushundefined(0);
6513              (yyval.value).t = TYPE_ANY;
6514            }
6515     }
6516     break;
6517
6518
6519   
6520     case 256:
6521     if(as3_pass==2) {
6522
6523 /* Line 1464 of skeleton.m4  */
6524 #line 2681 "parser.y"
6525     {(yyval.value)=(yyvsp[(2) - (3)].value);}
6526     }
6527     break;
6528
6529
6530   
6531     case 257:
6532     if(as3_pass==2) {
6533
6534 /* Line 1464 of skeleton.m4  */
6535 #line 2683 "parser.y"
6536     {
6537   (yyval.value)=(yyvsp[(2) - (2)].value);
6538   if(IS_INT((yyvsp[(2) - (2)].value).t)) {
6539    (yyval.value).c=abc_negate_i((yyval.value).c);
6540    (yyval.value).t = TYPE_INT;
6541   } else {
6542    (yyval.value).c=abc_negate((yyval.value).c);
6543    (yyval.value).t = TYPE_NUMBER;
6544   }
6545 }
6546     }
6547     break;
6548
6549
6550   
6551     case 258:
6552     if(as3_pass==2) {
6553
6554 /* Line 1464 of skeleton.m4  */
6555 #line 2694 "parser.y"
6556     {
6557   (yyval.value).c = (yyvsp[(1) - (4)].value).c;
6558   (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value).c);
6559
6560   MULTINAME_LATE(m, (yyvsp[(1) - (4)].value).t?(yyvsp[(1) - (4)].value).t->access:ACCESS_PACKAGE, "");
6561   (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
6562   (yyval.value).t = 0; // array elements have unknown type
6563 }
6564     }
6565     break;
6566
6567
6568   
6569     case 259:
6570     if(as3_pass==2) {
6571
6572 /* Line 1464 of skeleton.m4  */
6573 #line 2703 "parser.y"
6574     {
6575     (yyval.value).c = code_new();
6576     (yyval.value).c = code_append((yyval.value).c, (yyvsp[(2) - (3)].value_list).cc);
6577     (yyval.value).c = abc_newarray((yyval.value).c, (yyvsp[(2) - (3)].value_list).len);
6578     (yyval.value).t = registry_getarrayclass();
6579 }
6580     }
6581     break;
6582
6583
6584   
6585     case 260:
6586     if(as3_pass==2) {
6587
6588 /* Line 1464 of skeleton.m4  */
6589 #line 2710 "parser.y"
6590     {(yyval.value_list).cc=0;(yyval.value_list).len=0;}
6591     }
6592     break;
6593
6594
6595   
6596     case 261:
6597     if(as3_pass==2) {
6598
6599 /* Line 1464 of skeleton.m4  */
6600 #line 2711 "parser.y"
6601     {(yyval.value_list)=(yyvsp[(1) - (1)].value_list);}
6602     }
6603     break;
6604
6605
6606   
6607     case 262:
6608     if(as3_pass==2) {
6609
6610 /* Line 1464 of skeleton.m4  */
6611 #line 2713 "parser.y"
6612     {
6613     (yyval.value_list).cc = 0;
6614     (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(1) - (3)].value).c);
6615     (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (3)].value).c);
6616     (yyval.value_list).len = 2;
6617 }
6618     }
6619     break;
6620
6621
6622   
6623     case 263:
6624     if(as3_pass==2) {
6625
6626 /* Line 1464 of skeleton.m4  */
6627 #line 2719 "parser.y"
6628     {
6629     (yyval.value_list).cc = (yyvsp[(1) - (5)].value_list).cc;
6630     (yyval.value_list).len = (yyvsp[(1) - (5)].value_list).len+2;
6631     (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (5)].value).c);
6632     (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(5) - (5)].value).c);
6633 }
6634     }
6635     break;
6636
6637
6638   
6639     case 264:
6640     if(as3_pass==2) {
6641
6642 /* Line 1464 of skeleton.m4  */
6643 #line 2728 "parser.y"
6644     {
6645     (yyval.value).c = code_new();
6646     (yyval.value).c = code_append((yyval.value).c, (yyvsp[(2) - (3)].value_list).cc);
6647     (yyval.value).c = abc_newobject((yyval.value).c, (yyvsp[(2) - (3)].value_list).len/2);
6648     (yyval.value).t = registry_getobjectclass();
6649 }
6650     }
6651     break;
6652
6653
6654   
6655     case 265:
6656     if(as3_pass==2) {
6657
6658 /* Line 1464 of skeleton.m4  */
6659 #line 2735 "parser.y"
6660     { 
6661                code_t*c = (yyvsp[(3) - (3)].value).c;
6662                if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
6663                 c=abc_multiply_i(c);
6664                } else {
6665                 c=abc_multiply(c);
6666                }
6667                c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '*'), (yyvsp[(1) - (3)].value).t);
6668                (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6669                (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6670               }
6671     }
6672     break;
6673
6674
6675   
6676     case 266:
6677     if(as3_pass==2) {
6678
6679 /* Line 1464 of skeleton.m4  */
6680 #line 2747 "parser.y"
6681     { 
6682                code_t*c = abc_modulo((yyvsp[(3) - (3)].value).c);
6683                c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '%'), (yyvsp[(1) - (3)].value).t);
6684                (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6685                (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6686               }
6687     }
6688     break;
6689
6690
6691   
6692     case 267:
6693     if(as3_pass==2) {
6694
6695 /* Line 1464 of skeleton.m4  */
6696 #line 2753 "parser.y"
6697     { 
6698                code_t*c = abc_lshift((yyvsp[(3) - (3)].value).c);
6699                c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '<'), (yyvsp[(1) - (3)].value).t);
6700                (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6701                (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6702               }
6703     }
6704     break;
6705
6706
6707   
6708     case 268:
6709     if(as3_pass==2) {
6710
6711 /* Line 1464 of skeleton.m4  */
6712 #line 2759 "parser.y"
6713     { 
6714                code_t*c = abc_rshift((yyvsp[(3) - (3)].value).c);
6715                c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '>'), (yyvsp[(1) - (3)].value).t);
6716                (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6717                (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6718               }
6719     }
6720     break;
6721
6722
6723   
6724     case 269:
6725     if(as3_pass==2) {
6726
6727 /* Line 1464 of skeleton.m4  */
6728 #line 2765 "parser.y"
6729     { 
6730                code_t*c = abc_urshift((yyvsp[(3) - (3)].value).c);
6731                c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'U'), (yyvsp[(1) - (3)].value).t);
6732                (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6733                (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6734               }
6735     }
6736     break;
6737
6738
6739   
6740     case 270:
6741     if(as3_pass==2) {
6742
6743 /* Line 1464 of skeleton.m4  */
6744 #line 2771 "parser.y"
6745     { 
6746                code_t*c = abc_divide((yyvsp[(3) - (3)].value).c);
6747                c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '/'), (yyvsp[(1) - (3)].value).t);
6748                (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6749                (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6750               }
6751     }
6752     break;
6753
6754
6755   
6756     case 271:
6757     if(as3_pass==2) {
6758
6759 /* Line 1464 of skeleton.m4  */
6760 #line 2777 "parser.y"
6761     { 
6762                code_t*c = abc_bitor((yyvsp[(3) - (3)].value).c);
6763                c=converttype(c, TYPE_INT, (yyvsp[(1) - (3)].value).t);
6764                (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6765                (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6766               }
6767     }
6768     break;
6769
6770
6771   
6772     case 272:
6773     if(as3_pass==2) {
6774
6775 /* Line 1464 of skeleton.m4  */
6776 #line 2783 "parser.y"
6777     { 
6778                code_t*c = (yyvsp[(3) - (3)].value).c;
6779
6780                if(TYPE_IS_INT((yyvsp[(1) - (3)].value).t)) {
6781                 c=abc_add_i(c);
6782                } else {
6783                 c=abc_add(c);
6784                 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '+'), (yyvsp[(1) - (3)].value).t);
6785                }
6786                
6787                (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6788                (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6789               }
6790     }
6791     break;
6792
6793
6794   
6795     case 273:
6796     if(as3_pass==2) {
6797
6798 /* Line 1464 of skeleton.m4  */
6799 #line 2796 "parser.y"
6800     { code_t*c = (yyvsp[(3) - (3)].value).c; 
6801                if(TYPE_IS_INT((yyvsp[(1) - (3)].value).t)) {
6802                 c=abc_subtract_i(c);
6803                } else {
6804                 c=abc_subtract(c);
6805                 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '-'), (yyvsp[(1) - (3)].value).t);
6806                }
6807                
6808                (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6809                (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6810              }
6811     }
6812     break;
6813
6814
6815   
6816     case 274:
6817     if(as3_pass==2) {
6818
6819 /* Line 1464 of skeleton.m4  */
6820 #line 2807 "parser.y"
6821     { code_t*c = 0;
6822               c = code_append(c, (yyvsp[(3) - (3)].value).c);
6823               c = converttype(c, (yyvsp[(3) - (3)].value).t, (yyvsp[(1) - (3)].value).t);
6824               (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 1, 0);
6825               (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6826             }
6827     }
6828     break;
6829
6830
6831   
6832     case 275:
6833     if(as3_pass==2) {
6834
6835 /* Line 1464 of skeleton.m4  */
6836 #line 2814 "parser.y"
6837     { 
6838               (yyval.value).t = join_types((yyvsp[(3) - (5)].value).t,(yyvsp[(5) - (5)].value).t,'?');
6839               (yyval.value).c = (yyvsp[(1) - (5)].value).c;
6840               code_t*j1 = (yyval.value).c = abc_iffalse((yyval.value).c, 0);
6841               (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (5)].value).c);
6842               (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (5)].value).t, (yyval.value).t);
6843               code_t*j2 = (yyval.value).c = abc_jump((yyval.value).c, 0);
6844               (yyval.value).c = j1->branch = abc_label((yyval.value).c);
6845               (yyval.value).c = code_append((yyval.value).c, (yyvsp[(5) - (5)].value).c);
6846               (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (5)].value).t, (yyval.value).t);
6847               (yyval.value).c = j2->branch = abc_label((yyval.value).c);
6848             }
6849     }
6850     break;
6851
6852
6853   
6854     case 276:
6855     if(as3_pass==2) {
6856
6857 /* Line 1464 of skeleton.m4  */
6858 #line 2827 "parser.y"
6859     { code_t*c = 0;
6860              classinfo_t*type = (yyvsp[(1) - (2)].value).t;
6861              if((is_getlocal((yyvsp[(1) - (2)].value).c) && TYPE_IS_INT((yyvsp[(1) - (2)].value).t)) || TYPE_IS_NUMBER((yyvsp[(1) - (2)].value).t)) {
6862                  int nr = getlocalnr((yyvsp[(1) - (2)].value).c);
6863                  code_free((yyvsp[(1) - (2)].value).c);(yyvsp[(1) - (2)].value).c=0;
6864                  if(TYPE_IS_INT((yyvsp[(1) - (2)].value).t)) {
6865                     (yyval.value).c = abc_getlocal(0, nr);
6866                     (yyval.value).c = abc_inclocal_i((yyval.value).c, nr);
6867                  } else if(TYPE_IS_NUMBER((yyvsp[(1) - (2)].value).t)) {
6868                     (yyval.value).c = abc_getlocal(0, nr);
6869                     (yyval.value).c = abc_inclocal((yyval.value).c, nr);
6870                  } else syntaxerror("internal error");
6871              } else {
6872                  if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
6873                      c=abc_increment_i(c);
6874                      type = TYPE_INT;
6875                  } else {
6876                      c=abc_increment(c);
6877                      type = TYPE_NUMBER;
6878                  }
6879                  c=converttype(c, type, (yyvsp[(1) - (2)].value).t);
6880                  (yyval.value).c = toreadwrite((yyvsp[(1) - (2)].value).c, c, 0, 1);
6881                  (yyval.value).t = (yyvsp[(1) - (2)].value).t;
6882              }
6883            }
6884     }
6885     break;
6886
6887
6888   
6889     case 277:
6890     if(as3_pass==2) {
6891
6892 /* Line 1464 of skeleton.m4  */
6893 #line 2854 "parser.y"
6894     { code_t*c = 0;
6895              classinfo_t*type = (yyvsp[(1) - (2)].value).t;
6896              if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
6897                  c=abc_decrement_i(c);
6898                  type = TYPE_INT;
6899              } else {
6900                  c=abc_decrement(c);
6901                  type = TYPE_NUMBER;
6902              }
6903              c=converttype(c, type, (yyvsp[(1) - (2)].value).t);
6904              (yyval.value).c = toreadwrite((yyvsp[(1) - (2)].value).c, c, 0, 1);
6905              (yyval.value).t = (yyvsp[(1) - (2)].value).t;
6906             }
6907     }
6908     break;
6909
6910
6911   
6912     case 278:
6913     if(as3_pass==2) {
6914
6915 /* Line 1464 of skeleton.m4  */
6916 #line 2868 "parser.y"
6917     { code_t*c = 0;
6918              classinfo_t*type = (yyvsp[(2) - (2)].value).t;
6919              if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
6920                  c=abc_increment_i(c);
6921                  type = TYPE_INT;
6922              } else {
6923                  c=abc_increment(c);
6924                  type = TYPE_NUMBER;
6925              }
6926              c=converttype(c, type, (yyvsp[(2) - (2)].value).t);
6927              (yyval.value).c = toreadwrite((yyvsp[(2) - (2)].value).c, c, 0, 0);
6928              (yyval.value).t = (yyvsp[(2) - (2)].value).t;
6929            }
6930     }
6931     break;
6932
6933
6934   
6935     case 279:
6936     if(as3_pass==2) {
6937
6938 /* Line 1464 of skeleton.m4  */
6939 #line 2882 "parser.y"
6940     { code_t*c = 0;
6941              classinfo_t*type = (yyvsp[(2) - (2)].value).t;
6942              if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
6943                  c=abc_decrement_i(c);
6944                  type = TYPE_INT;
6945              } else {
6946                  c=abc_decrement(c);
6947                  type = TYPE_NUMBER;
6948              }
6949              c=converttype(c, type, (yyvsp[(2) - (2)].value).t);
6950              (yyval.value).c = toreadwrite((yyvsp[(2) - (2)].value).c, c, 0, 0);
6951              (yyval.value).t = (yyvsp[(2) - (2)].value).t;
6952            }
6953     }
6954     break;
6955
6956
6957   
6958     case 280:
6959     if(as3_pass==2) {
6960
6961 /* Line 1464 of skeleton.m4  */
6962 #line 2897 "parser.y"
6963     { if(!state->cls->info)
6964                   syntaxerror("super keyword not allowed outside a class");
6965               classinfo_t*t = state->cls->info->superclass;
6966               if(!t) t = TYPE_OBJECT;
6967
6968               memberinfo_t*f = registry_findmember(t, (yyvsp[(3) - (3)].id), 1);
6969               namespace_t ns = flags2namespace(f->flags, "");
6970               MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
6971               (yyval.value).c = 0;
6972               (yyval.value).c = abc_getlocal_0((yyval.value).c);
6973               (yyval.value).c = abc_getsuper2((yyval.value).c, &m);
6974               (yyval.value).t = memberinfo_gettype(f);
6975            }
6976     }
6977     break;
6978
6979
6980   
6981     case 281:
6982     if(as3_pass==2) {
6983
6984 /* Line 1464 of skeleton.m4  */
6985 #line 2912 "parser.y"
6986     {(yyval.value).c = (yyvsp[(1) - (3)].value).c;
6987              classinfo_t*t = (yyvsp[(1) - (3)].value).t;
6988              char is_static = 0;
6989              if(TYPE_IS_CLASS(t) && t->cls) {
6990                  t = t->cls;
6991                  is_static = 1;
6992              }
6993              if(t) {
6994                  memberinfo_t*f = registry_findmember(t, (yyvsp[(3) - (3)].id), 1);
6995                  char noslot = 0;
6996                  if(f && !is_static != !(f->flags&FLAG_STATIC))
6997                     noslot=1;
6998                  if(f && f->slot && !noslot) {
6999                      (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
7000                  } else {
7001                      MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
7002                      (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7003                  }
7004                  /* determine type */
7005                  (yyval.value).t = memberinfo_gettype(f);
7006                  if(!(yyval.value).t)
7007                     (yyval.value).c = abc_coerce_a((yyval.value).c);
7008              } else {
7009                  /* when resolving a property on an unknown type, we do know the
7010                     name of the property (and don't seem to need the package), but
7011                     we need to make avm2 try out all access modes */
7012                  multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(3) - (3)].id)};
7013                  (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7014                  (yyval.value).c = abc_coerce_a((yyval.value).c);
7015                  (yyval.value).t = registry_getanytype();
7016              }
7017             }
7018     }
7019     break;
7020
7021
7022   
7023     case 282:
7024     if(as3_pass==2) {
7025
7026 /* Line 1464 of skeleton.m4  */
7027 #line 2945 "parser.y"
7028     {
7029     (yyval.value).t = 0;
7030     (yyval.value).c = 0;
7031     classinfo_t*a = 0;
7032     memberinfo_t*f = 0;
7033
7034     variable_t*v;
7035     /* look at variables */
7036     if((v = find_variable((yyvsp[(1) - (1)].id)))) {
7037         // $1 is a local variable
7038         (yyval.value).c = abc_getlocal((yyval.value).c, v->index);
7039         (yyval.value).t = v->type;
7040         break;
7041     }
7042
7043     int i_am_static = (state->method && state->method->info)?(state->method->info->flags&FLAG_STATIC):FLAG_STATIC;
7044
7045     /* look at current class' members */
7046     if(state->cls && (f = registry_findmember(state->cls->info, (yyvsp[(1) - (1)].id), 1)) &&
7047         (f->flags&FLAG_STATIC) >= i_am_static) {
7048         // $1 is a function in this class
7049         int var_is_static = (f->flags&FLAG_STATIC);
7050
7051         if(f->kind == MEMBER_METHOD) {
7052             (yyval.value).t = TYPE_FUNCTION(f);
7053         } else {
7054             (yyval.value).t = f->type;
7055         }
7056         if(var_is_static && !i_am_static) {
7057         /* access to a static member from a non-static location.
7058            do this via findpropstrict:
7059            there doesn't seem to be any non-lookup way to access
7060            static properties of a class */
7061             state->method->late_binding = 1;
7062             (yyval.value).t = f->type;
7063             namespace_t ns = {flags2access(f->flags), ""};
7064             multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
7065             (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
7066             (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7067             break;
7068         } else if(f->slot>0) {
7069             (yyval.value).c = abc_getlocal_0((yyval.value).c);
7070             (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
7071             break;
7072         } else {
7073             namespace_t ns = {flags2access(f->flags), ""};
7074             multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
7075             (yyval.value).c = abc_getlocal_0((yyval.value).c);
7076             (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7077             break;
7078         }
7079     } 
7080     
7081     /* look at actual classes, in the current package and imported */
7082     if((a = find_class((yyvsp[(1) - (1)].id)))) {
7083         if(a->flags & FLAG_METHOD) {
7084             MULTINAME(m, a);
7085             (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
7086             (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7087             if(a->function->kind == MEMBER_METHOD) {
7088                 (yyval.value).t = TYPE_FUNCTION(a->function);
7089             } else {
7090                 (yyval.value).t = a->function->type;
7091             }
7092         } else {
7093             if(a->slot) {
7094                 (yyval.value).c = abc_getglobalscope((yyval.value).c);
7095                 (yyval.value).c = abc_getslot((yyval.value).c, a->slot);
7096             } else {
7097                 MULTINAME(m, a);
7098                 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
7099             }
7100             (yyval.value).t = TYPE_CLASS(a);
7101         }
7102         break;
7103     }
7104
7105     /* unknown object, let the avm2 resolve it */
7106     if(1) {
7107         if(strcmp((yyvsp[(1) - (1)].id),"trace"))
7108             as3_softwarning("Couldn't resolve '%s', doing late binding", (yyvsp[(1) - (1)].id));
7109         state->method->late_binding = 1;
7110                 
7111         multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(1) - (1)].id)};
7112
7113         (yyval.value).t = 0;
7114         (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
7115         (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7116     }
7117 }
7118     }
7119     break;
7120
7121
7122   
7123     case 283:
7124     if(as3_pass==2) {
7125
7126 /* Line 1464 of skeleton.m4  */
7127 #line 3043 "parser.y"
7128     {(yyval.code)=0;}
7129     }
7130     break;
7131
7132
7133   
7134     case 284:
7135     if(as3_pass==2) {
7136
7137 /* Line 1464 of skeleton.m4  */
7138 #line 3044 "parser.y"
7139     {(yyval.code)=0;}
7140     }
7141     break;
7142
7143
7144   
7145     case 285:
7146     if(as3_pass==2) {
7147
7148 /* Line 1464 of skeleton.m4  */
7149 #line 3045 "parser.y"
7150     {(yyval.code)=0;}
7151     }
7152     break;
7153
7154
7155   
7156     case 286:
7157     if(as3_pass==2) {
7158
7159 /* Line 1464 of skeleton.m4  */
7160 #line 3047 "parser.y"
7161     {(yyval.token)=0;}
7162     }
7163     break;
7164
7165
7166
7167
7168 /* Line 1464 of skeleton.m4  */
7169 #line 7170 "parser.tab.c"
7170       default: break;
7171     }
7172   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
7173
7174   YYPOPSTACK (yylen);
7175   yylen = 0;
7176   YY_STACK_PRINT (yyss, yyssp);
7177
7178   *++yyvsp = yyval;
7179
7180   /* Now `shift' the result of the reduction.  Determine what state
7181      that goes to, based on the state we popped back to and the rule
7182      number reduced by.  */
7183
7184   yyn = yyr1[yyn];
7185
7186   yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
7187   if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
7188     yystate = yytable[yystate];
7189   else
7190     yystate = yydefgoto[yyn - YYNTOKENS];
7191
7192   goto yynewstate;
7193
7194
7195 /*------------------------------------.
7196 | yyerrlab -- here on detecting error |
7197 `------------------------------------*/
7198 yyerrlab:
7199   /* If not already recovering from an error, report this error.  */
7200   if (!yyerrstatus)
7201     {
7202       ++yynerrs;
7203 #if ! YYERROR_VERBOSE
7204       yyerror (YY_("syntax error"));
7205 #else
7206       {
7207         YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
7208         if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
7209           {
7210             YYSIZE_T yyalloc = 2 * yysize;
7211             if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
7212               yyalloc = YYSTACK_ALLOC_MAXIMUM;
7213             if (yymsg != yymsgbuf)
7214               YYSTACK_FREE (yymsg);
7215             yymsg = (char *) YYSTACK_ALLOC (yyalloc);
7216             if (yymsg)
7217               yymsg_alloc = yyalloc;
7218             else
7219               {
7220                 yymsg = yymsgbuf;
7221                 yymsg_alloc = sizeof yymsgbuf;
7222               }
7223           }
7224
7225         if (0 < yysize && yysize <= yymsg_alloc)
7226           {
7227             (void) yysyntax_error (yymsg, yystate, yychar);
7228             yyerror (yymsg);
7229           }
7230         else
7231           {
7232             yyerror (YY_("syntax error"));
7233             if (yysize != 0)
7234               goto yyexhaustedlab;
7235           }
7236       }
7237 #endif
7238     }
7239
7240
7241
7242   if (yyerrstatus == 3)
7243     {
7244       /* If just tried and failed to reuse lookahead token after an
7245          error, discard it.  */
7246
7247       if (yychar <= YYEOF)
7248         {
7249           /* Return failure if at end of input.  */
7250           if (yychar == YYEOF)
7251             YYABORT;
7252         }
7253       else
7254         {
7255           yydestruct ("Error: discarding",
7256                       yytoken, &yylval);
7257           yychar = YYEMPTY;
7258         }
7259     }
7260
7261   /* Else will try to reuse lookahead token after shifting the error
7262      token.  */
7263   goto yyerrlab1;
7264
7265
7266 /*---------------------------------------------------.
7267 | yyerrorlab -- error raised explicitly by YYERROR.  |
7268 `---------------------------------------------------*/
7269 yyerrorlab:
7270
7271   /* Pacify compilers like GCC when the user code never invokes
7272      YYERROR and the label yyerrorlab therefore never appears in user
7273      code.  */
7274   if (/*CONSTCOND*/ 0)
7275      goto yyerrorlab;
7276
7277   /* Do not reclaim the symbols of the rule which action triggered
7278      this YYERROR.  */
7279   YYPOPSTACK (yylen);
7280   yylen = 0;
7281   YY_STACK_PRINT (yyss, yyssp);
7282   yystate = *yyssp;
7283   goto yyerrlab1;
7284
7285
7286 /*-------------------------------------------------------------.
7287 | yyerrlab1 -- common code for both syntax error and YYERROR.  |
7288 `-------------------------------------------------------------*/
7289 yyerrlab1:
7290   yyerrstatus = 3;      /* Each real token shifted decrements this.  */
7291
7292   for (;;)
7293     {
7294       yyn = yypact[yystate];
7295       if (yyn != YYPACT_NINF)
7296         {
7297           yyn += YYTERROR;
7298           if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
7299             {
7300               yyn = yytable[yyn];
7301               if (0 < yyn)
7302                 break;
7303             }
7304         }
7305
7306       /* Pop the current state because it cannot handle the error token.  */
7307       if (yyssp == yyss)
7308         YYABORT;
7309
7310
7311       yydestruct ("Error: popping",
7312                   yystos[yystate], yyvsp);
7313       YYPOPSTACK (1);
7314       yystate = *yyssp;
7315       YY_STACK_PRINT (yyss, yyssp);
7316     }
7317
7318   *++yyvsp = yylval;
7319
7320
7321   /* Shift the error token.  */
7322   YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
7323
7324   yystate = yyn;
7325   goto yynewstate;
7326
7327
7328 /*-------------------------------------.
7329 | yyacceptlab -- YYACCEPT comes here.  |
7330 `-------------------------------------*/
7331 yyacceptlab:
7332   yyresult = 0;
7333   goto yyreturn;
7334
7335 /*-----------------------------------.
7336 | yyabortlab -- YYABORT comes here.  |
7337 `-----------------------------------*/
7338 yyabortlab:
7339   yyresult = 1;
7340   goto yyreturn;
7341
7342 #if !defined(yyoverflow) || YYERROR_VERBOSE
7343 /*-------------------------------------------------.
7344 | yyexhaustedlab -- memory exhaustion comes here.  |
7345 `-------------------------------------------------*/
7346 yyexhaustedlab:
7347   yyerror (YY_("memory exhausted"));
7348   yyresult = 2;
7349   /* Fall through.  */
7350 #endif
7351
7352 yyreturn:
7353   if (yychar != YYEMPTY)
7354      yydestruct ("Cleanup: discarding lookahead",
7355                  yytoken, &yylval);
7356   /* Do not reclaim the symbols of the rule which action triggered
7357      this YYABORT or YYACCEPT.  */
7358   YYPOPSTACK (yylen);
7359   YY_STACK_PRINT (yyss, yyssp);
7360   while (yyssp != yyss)
7361     {
7362       yydestruct ("Cleanup: popping",
7363                   yystos[*yyssp], yyvsp);
7364       YYPOPSTACK (1);
7365     }
7366 #ifndef yyoverflow
7367   if (yyss != yyssa)
7368     YYSTACK_FREE (yyss);
7369 #endif
7370 #if YYERROR_VERBOSE
7371   if (yymsg != yymsgbuf)
7372     YYSTACK_FREE (yymsg);
7373 #endif
7374   /* Make sure YYID is used.  */
7375   return YYID (yyresult);
7376 }
7377
7378
7379