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