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