2 /* A Bison parser, made by GNU Bison 2.4. */
4 /* Skeleton implementation for Bison's Yacc-like parsers in C
6 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
7 Free Software Foundation, Inc.
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.
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.
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/>. */
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.
32 This special exception was added by the Free Software Foundation in
33 version 2.2 of Bison. */
35 /* C LALR(1) parser skeleton written by Richard Stallman, by
36 simplifying the original so-called "semantic" parser. */
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. */
45 /* Identify Bison output. */
49 #define YYBISON_VERSION "2.4"
52 #define YYSKELETON_NAME "./skeleton.m4"
63 /* Using locations. */
64 #define YYLSP_NEEDED 0
66 /* Substitute the variable and function names. */
67 #define yyparse a3_parse
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
76 /* Copy the first part of user declarations. */
78 /* Line 198 of skeleton.m4 */
88 #include "tokenizer.h"
98 /* Line 198 of skeleton.m4 */
99 #line 100 "parser.tab.c"
101 /* Enabling traces. */
106 /* Enabling verbose error messages. */
107 #ifdef YYERROR_VERBOSE
108 # undef YYERROR_VERBOSE
109 # define YYERROR_VERBOSE 1
111 # define YYERROR_VERBOSE 1
114 /* Enabling the token table. */
115 #ifndef YYTOKEN_TABLE
116 # define YYTOKEN_TABLE 0
123 /* Put the tokens into the symbol table, so that GDB and other debuggers
221 below_semicolon = 353,
222 below_assignment = 354,
224 minusminus_prefix = 357,
225 plusplus_prefix = 358,
228 above_identifier = 361,
236 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
238 /* Line 223 of skeleton.m4 */
243 /* Line 223 of skeleton.m4 */
246 enum yytokentype token;
248 classinfo_t*classinfo;
249 classinfo_list_t*classinfo_list;
251 slotinfo_list_t*slotinfo_list;
254 unsigned int number_uint;
258 //typedcode_list_t*value_list;
259 codeandnumber_t value_list;
265 for_start_t for_start;
266 abc_exception_t *exception;
269 namespace_decl_t* namespace_decl;
271 abc_exception_list_t *l;
277 /* Line 223 of skeleton.m4 */
278 #line 279 "parser.tab.c"
280 # define YYSTYPE_IS_TRIVIAL 1
281 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
282 # define YYSTYPE_IS_DECLARED 1
286 /* Copy the second part of user declarations. */
288 /* Line 273 of skeleton.m4 */
292 static int a3_error(char*s)
294 syntaxerror("%s", s);
295 return 0; //make gcc happy
298 static void parsererror(const char*file, int line, const char*f)
300 syntaxerror("internal error in %s, %s:%d", f, file, line);
303 #define parserassert(b) {if(!(b)) parsererror(__FILE__, __LINE__,__func__);}
306 static char* concat2(const char* t1, const char* t2)
310 char*text = malloc(l1+l2+1);
311 memcpy(text , t1, l1);
312 memcpy(text+l1, t2, l2);
316 static char* concat3(const char* t1, const char* t2, const char* t3)
321 char*text = malloc(l1+l2+l3+1);
322 memcpy(text , t1, l1);
323 memcpy(text+l1, t2, l2);
324 memcpy(text+l1+l2, t3, l3);
329 typedef struct _import {
332 DECLARE_LIST(import);
334 DECLARE(methodstate);
335 DECLARE_LIST(methodstate);
337 typedef struct _classstate {
343 methodstate_t*static_init;
345 //code_t*static_init;
347 char has_constructor;
350 struct _methodstate {
360 dict_t*unresolved_variables;
363 char uses_parent_function;
369 int var_index; // for inner methods
370 int slot_index; // for inner methods
371 char is_a_slot; // for inner methods
376 abc_exception_list_t*exceptions;
378 methodstate_list_t*innerfunctions;
381 typedef struct _state {
386 import_list_t*wildcard_imports;
387 dict_t*import_toplevel_packages;
390 namespace_list_t*active_namespace_urls;
392 char has_own_imports;
393 char new_vars; // e.g. transition between two functions
396 methodstate_t*method;
405 typedef struct _global {
409 dict_t*file2token2info;
412 static global_t*global = 0;
413 static state_t* state = 0;
417 #define MULTINAME(m,x) \
421 registry_fill_multiname(&m, &m##_ns, (slotinfo_t*)(x));
423 #define MEMBER_MULTINAME(m,f,n) \
427 if((m##_ns.access = ((slotinfo_t*)(f))->access)==ACCESS_NAMESPACE) \
428 m##_ns.name = ((slotinfo_t*)(f))->package; \
433 m.namespace_set = 0; \
434 m.name = ((slotinfo_t*)(f))->name; \
436 m.type = MULTINAME; \
438 m.namespace_set = &nopackage_namespace_set; \
442 /* warning: list length of namespace set is undefined */
443 #define MULTINAME_LATE(m, access, package) \
444 namespace_t m##_ns = {access, package}; \
445 namespace_set_t m##_nsset; \
446 namespace_list_t m##_l;m##_l.next = 0; \
447 m##_nsset.namespaces = &m##_l; \
448 m##_nsset = m##_nsset; \
449 m##_l.namespace = &m##_ns; \
450 multiname_t m = {MULTINAMEL, 0, &m##_nsset, 0};
452 static namespace_t ns1 = {ACCESS_PRIVATE, ""};
453 static namespace_t ns2 = {ACCESS_PROTECTED, ""};
454 static namespace_t ns3 = {ACCESS_PACKAGEINTERNAL, ""};
455 static namespace_t ns4 = {ACCESS_PACKAGE, ""};
456 static namespace_list_t nl4 = {&ns4,0};
457 static namespace_list_t nl3 = {&ns3,&nl4};
458 static namespace_list_t nl2 = {&ns2,&nl3};
459 static namespace_list_t nl1 = {&ns1,&nl2};
460 static namespace_set_t nopackage_namespace_set = {&nl1};
462 static dict_t*definitions=0;
463 void as3_set_definition(const char*c)
466 definitions = dict_new();
467 if(!dict_contains(definitions,c))
468 dict_put(definitions,c,0);
471 static void new_state()
474 state_t*oldstate = state;
476 memcpy(s, state, sizeof(state_t)); //shallow copy
478 s->imports = dict_new();
480 if(!s->import_toplevel_packages) {
481 s->import_toplevel_packages = dict_new();
485 state->has_own_imports = 0;
486 state->vars = dict_new();
487 state->old = oldstate;
490 trie_remember(active_namespaces);
493 state->active_namespace_urls = list_clone(oldstate->active_namespace_urls);
496 static void state_destroy(state_t*state)
498 if(state->has_own_imports) {
499 list_free(state->wildcard_imports);
500 dict_destroy(state->imports);state->imports=0;
502 if(state->imports && (!state->old || state->old->imports!=state->imports)) {
503 dict_destroy(state->imports);state->imports=0;
507 for(t=0;t<state->vars->hashsize;t++) {
508 dictentry_t*e =state->vars->slots[t];
510 free(e->data);e->data=0;
514 dict_destroy(state->vars);state->vars=0;
517 list_free(state->active_namespace_urls)
518 state->active_namespace_urls = 0;
523 static void old_state()
525 trie_rollback(active_namespaces);
527 if(!state || !state->old)
528 syntaxerror("invalid nesting");
529 state_t*leaving = state;
533 if(as3_pass>1 && leaving->method && leaving->method != state->method && !leaving->method->inner) {
534 free(leaving->method);
537 if(as3_pass>1 && leaving->cls && leaving->cls != state->cls) {
542 state_destroy(leaving);
545 static code_t* method_header(methodstate_t*m);
546 static code_t* wrap_function(code_t*c,code_t*header, code_t*body);
547 static void function_initvars(methodstate_t*m, params_t*params, int flags, char var0);
550 static char* internal_filename_package = 0;
551 void initialize_file(char*filename)
554 syntaxerror("invalid call to initialize_file during parsing of another file");
557 active_namespaces = trie_new();
560 state->package = internal_filename_package = strdup(filename);
562 global->token2info = dict_lookup(global->file2token2info,
563 current_filename // use long version
565 if(!global->token2info) {
566 global->token2info = dict_new2(&ptr_type);
567 dict_put(global->file2token2info, current_filename, global->token2info);
571 state->method = rfx_calloc(sizeof(methodstate_t));
572 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
573 state->method->late_binding = 1; // init scripts use getglobalscope, so we need a getlocal0/pushscope
575 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
576 function_initvars(state->method, 0, 0, 1);
577 global->init = abc_initscript(global->file);
583 if(!state || state->level!=1) {
584 syntaxerror("unexpected end of file in pass %d", as3_pass);
588 code_t*header = method_header(state->method);
589 code_t*c = wrap_function(header, 0, global->init->method->body->code);
590 global->init->method->body->code = c;
591 free(state->method);state->method=0;
594 //free(state->package);state->package=0; // used in registry
595 state_destroy(state);state=0;
598 void initialize_parser()
600 global = rfx_calloc(sizeof(global_t));
601 global->file = abc_file_new();
602 global->file->flags &= ~ABCFILE_LAZY;
603 global->file2token2info = dict_new();
604 global->token2info = 0;
607 void* finish_parser()
609 dict_free_all(global->file2token2info, 1, (void*)dict_destroy);
610 global->token2info=0;
614 typedef struct _variable {
619 methodstate_t*is_inner_method;
622 static variable_t* find_variable(state_t*s, char*name)
626 v = dict_lookup(s->vars, name);
628 if(s->new_vars) break;
633 static variable_t* find_slot(state_t*s, const char*name)
635 if(s->method && s->method->slots)
636 return dict_lookup(s->method->slots, name);
640 static variable_t* find_variable_safe(state_t*s, char*name)
642 variable_t* v = find_variable(s, name);
644 syntaxerror("undefined variable: %s", name);
648 static char variable_exists(char*name)
650 return dict_contains(state->vars, name);
653 static code_t*defaultvalue(code_t*c, classinfo_t*type)
655 if(TYPE_IS_INT(type)) {
656 c = abc_pushbyte(c, 0);
657 } else if(TYPE_IS_UINT(type)) {
658 c = abc_pushuint(c, 0);
659 } else if(TYPE_IS_FLOAT(type)) {
661 } else if(TYPE_IS_BOOLEAN(type)) {
662 c = abc_pushfalse(c);
664 //c = abc_pushundefined(c);
665 syntaxerror("internal error: can't generate default value for * type");
669 c = abc_coerce2(c, &m);
674 static int alloc_local()
676 return state->method->variable_count++;
679 static variable_t* new_variable2(const char*name, classinfo_t*type, char init, char maybeslot)
682 variable_t*v = find_slot(state, name);
688 v->index = alloc_local();
693 dict_put(state->vars, name, v);
697 static int new_variable(const char*name, classinfo_t*type, char init, char maybeslot)
699 return new_variable2(name, type, init, maybeslot)->index;
702 #define TEMPVARNAME "__as3_temp__"
703 static int gettempvar()
705 variable_t*v = find_variable(state, TEMPVARNAME);
708 return new_variable(TEMPVARNAME, 0, 0, 0);
711 static code_t* var_block(code_t*body)
717 for(t=0;t<state->vars->hashsize;t++) {
718 dictentry_t*e = state->vars->slots[t];
720 variable_t*v = (variable_t*)e->data;
721 if(v->type && v->init) {
722 c = defaultvalue(c, v->type);
723 c = abc_setlocal(c, v->index);
724 k = abc_kill(k, v->index);
734 if(x->opcode== OPCODE___BREAK__ ||
735 x->opcode== OPCODE___CONTINUE__) {
736 /* link kill code before break/continue */
737 code_t*e = code_dup(k);
738 code_t*s = code_start(e);
750 c = code_append(c, body);
751 c = code_append(c, k);
755 static void unknown_variable(char*name)
757 if(!state->method->unresolved_variables)
758 state->method->unresolved_variables = dict_new();
759 if(!dict_contains(state->method->unresolved_variables, name))
760 dict_put(state->method->unresolved_variables, name, 0);
763 static code_t* add_scope_code(code_t*c, methodstate_t*m, char init)
765 if(m->uses_slots || (m->late_binding && !m->inner)) { //???? especially inner functions need the pushscope
766 c = abc_getlocal_0(c);
767 c = abc_pushscope(c);
770 /* FIXME: this alloc_local() causes variable indexes to be
771 different in pass2 than in pass1 */
772 if(!m->activation_var)
773 m->activation_var = alloc_local();
775 c = abc_newactivation(c);
777 c = abc_pushscope(c);
778 c = abc_setlocal(c, m->activation_var);
780 c = abc_getlocal(c, m->activation_var);
781 c = abc_pushscope(c);
787 static code_t* method_header(methodstate_t*m)
791 c = add_scope_code(c, m, 1);
793 methodstate_list_t*l = m->innerfunctions;
795 parserassert(l->methodstate->abc);
796 if(m->uses_slots && l->methodstate->is_a_slot) {
797 c = abc_getscopeobject(c, 1);
798 c = abc_newfunction(c, l->methodstate->abc);
800 c = abc_setlocal(c, l->methodstate->var_index);
801 c = abc_setslot(c, l->methodstate->slot_index);
803 c = abc_newfunction(c, l->methodstate->abc);
804 c = abc_setlocal(c, l->methodstate->var_index);
806 free(l->methodstate);l->methodstate=0;
810 c = code_append(c, m->header);
813 if(m->is_constructor && !m->has_super) {
814 // call default constructor
815 c = abc_getlocal_0(c);
816 c = abc_constructsuper(c, 0);
820 /* all parameters that are used by inner functions
821 need to be copied from local to slot */
822 parserassert(m->activation_var);
823 DICT_ITERATE_ITEMS(m->slots,char*,name,variable_t*,v) {
824 if(v->is_parameter) {
825 c = abc_getlocal(c, m->activation_var);
826 c = abc_getlocal(c, v->index);
827 c = abc_setslot(c, v->index);
831 list_free(m->innerfunctions);
832 m->innerfunctions = 0;
837 static code_t* wrap_function(code_t*c,code_t*header, code_t*body)
839 c = code_append(c, header);
840 c = code_append(c, var_block(body));
841 /* append return if necessary */
842 if(!c || (c->opcode != OPCODE_RETURNVOID &&
843 c->opcode != OPCODE_RETURNVALUE)) {
844 c = abc_returnvoid(c);
849 static void startpackage(char*name)
852 state->package = strdup(name);
854 static void endpackage()
856 //used e.g. in classinfo_register:
857 //free(state->package);state->package=0;
861 #define FLAG_PUBLIC 256
862 #define FLAG_PROTECTED 512
863 #define FLAG_PRIVATE 1024
864 #define FLAG_PACKAGEINTERNAL 2048
865 #define FLAG_NAMESPACE 4096
867 static namespace_t modifiers2access(modifiers_t*mod)
872 if(mod->flags&FLAG_NAMESPACE) {
873 if(mod->flags&(FLAG_PRIVATE|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
874 syntaxerror("invalid combination of access levels and namespaces");
875 ns.access = ACCESS_NAMESPACE;
877 const char*url = (const char*)trie_lookup(active_namespaces, mod->ns);
879 /* shouldn't happen- the tokenizer only reports something as a namespace
880 if it was already registered */
881 trie_dump(active_namespaces);
882 syntaxerror("unknown namespace: %s", mod->ns);
885 } else if(mod->flags&FLAG_PUBLIC) {
886 if(mod->flags&(FLAG_PRIVATE|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
887 syntaxerror("invalid combination of access levels");
888 ns.access = ACCESS_PACKAGE;
889 } else if(mod->flags&FLAG_PRIVATE) {
890 if(mod->flags&(FLAG_PUBLIC|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
891 syntaxerror("invalid combination of access levels");
892 ns.access = ACCESS_PRIVATE;
893 } else if(mod->flags&FLAG_PROTECTED) {
894 if(mod->flags&(FLAG_PUBLIC|FLAG_PRIVATE|FLAG_PACKAGEINTERNAL))
895 syntaxerror("invalid combination of access levels");
896 ns.access = ACCESS_PROTECTED;
898 ns.access = ACCESS_PACKAGEINTERNAL;
902 static slotinfo_t* find_class(const char*name);
904 static memberinfo_t* findmember_nsset(classinfo_t*cls, const char*name, char recurse)
906 return registry_findmember_nsset(cls, state->active_namespace_urls, name, recurse);
909 static void function_initvars(methodstate_t*m, params_t*params, int flags, char var0)
914 index = new_variable("this", 0, 0, 0);
915 else if(!m->is_global)
916 index = new_variable((flags&FLAG_STATIC)?"class":"this", state->cls?state->cls->info:0, 0, 0);
918 index = new_variable("globalscope", 0, 0, 0);
921 parserassert(!index);
925 /* as variables and slots share the same number, make sure
926 that those variable indices are reserved. It's up to the
927 optimizer to later shuffle the variables down to lower
929 m->variable_count = m->uses_slots;
934 for(p=params->list;p;p=p->next) {
935 variable_t*v = new_variable2(p->param->name, p->param->type, 0, 1);
940 methodstate_list_t*l = m->innerfunctions;
942 methodstate_t*m = l->methodstate;
944 variable_t* v = new_variable2(m->info->name, TYPE_FUNCTION(m->info), 0, 1);
945 m->var_index = v->index;
946 m->slot_index = v->index;
947 v->is_inner_method = m;
953 m->scope_code = add_scope_code(m->scope_code, m, 0);
956 if(as3_pass==2 && m->slots) {
957 /* exchange unresolved identifiers with the actual objects */
958 DICT_ITERATE_ITEMS(m->slots, char*, name, variable_t*, v) {
959 if(v->type && v->type->kind == INFOTYPE_UNRESOLVED) {
960 classinfo_t*type = (classinfo_t*)registry_resolve((slotinfo_t*)v->type);
961 if(!type || type->kind != INFOTYPE_CLASS) {
962 syntaxerror("Couldn't find class %s::%s (%s)", v->type->package, v->type->name, name);
971 char*as3_globalclass=0;
972 static void startclass(modifiers_t* mod, char*classname, classinfo_t*extends, classinfo_list_t*implements)
975 syntaxerror("inner classes now allowed");
980 classinfo_list_t*mlist=0;
982 if(mod->flags&~(FLAG_PACKAGEINTERNAL|FLAG_PUBLIC|FLAG_FINAL|FLAG_DYNAMIC|FLAG_INTERFACE))
983 syntaxerror("invalid modifier(s)");
985 if((mod->flags&(FLAG_PUBLIC|FLAG_PACKAGEINTERNAL)) == (FLAG_PUBLIC|FLAG_PACKAGEINTERNAL))
986 syntaxerror("public and internal not supported at the same time.");
988 //if(!(mod->flags&FLAG_INTERFACE) && !extends) {
989 if(!(mod->flags&FLAG_INTERFACE) && !extends) {
990 // all classes extend object
991 extends = registry_getobjectclass();
994 /* create the class name, together with the proper attributes */
998 if(!(mod->flags&FLAG_PUBLIC) && state->package==internal_filename_package) {
999 access = ACCESS_PRIVATE; package = internal_filename_package;
1000 } else if(!(mod->flags&FLAG_PUBLIC) && state->package!=internal_filename_package) {
1001 access = ACCESS_PACKAGEINTERNAL; package = state->package;
1002 } else if(state->package!=internal_filename_package) {
1003 access = ACCESS_PACKAGE; package = state->package;
1005 syntaxerror("public classes only allowed inside a package");
1009 state->cls = rfx_calloc(sizeof(classstate_t));
1010 state->cls->init = rfx_calloc(sizeof(methodstate_t));
1011 state->cls->static_init = rfx_calloc(sizeof(methodstate_t));
1012 /* notice: we make no effort to initialize the top variable (local0) here,
1013 even though it has special meaning. We just rely on the facat
1014 that pass 1 won't do anything with variables */
1016 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->cls);
1018 /* set current method to constructor- all code within the class-level (except
1019 static variable initializations) will be executed during construction time */
1020 state->method = state->cls->init;
1022 if(registry_find(package, classname)) {
1023 syntaxerror("Package \"%s\" already contains a class called \"%s\"", package, classname);
1025 /* build info struct */
1026 int num_interfaces = (list_length(implements));
1027 state->cls->info = classinfo_register(access, package, classname, num_interfaces);
1028 state->cls->info->flags |= mod->flags & (FLAG_DYNAMIC|FLAG_INTERFACE|FLAG_FINAL);
1031 classinfo_list_t*l = implements;
1032 for(l=implements;l;l=l->next) {
1033 state->cls->info->interfaces[pos++] = l->classinfo;
1038 state->cls = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1040 state->method = state->cls->init;
1041 parserassert(state->cls && state->cls->info);
1043 function_initvars(state->cls->init, 0, 0, 1);
1044 function_initvars(state->cls->static_init, 0, 0, 0);
1046 if(extends && (extends->flags & FLAG_FINAL))
1047 syntaxerror("Can't extend final class '%s'", extends->name);
1050 while(state->cls->info->interfaces[pos]) {
1051 if(!(state->cls->info->interfaces[pos]->flags & FLAG_INTERFACE))
1052 syntaxerror("'%s' is not an interface",
1053 state->cls->info->interfaces[pos]->name);
1057 /* fill out interfaces and extends (we couldn't resolve those during the first pass) */
1058 state->cls->info->superclass = extends;
1060 /* generate the abc code for this class */
1061 MULTINAME(classname2,state->cls->info);
1062 multiname_t*extends2 = sig2mname(extends);
1064 state->cls->abc = abc_class_new(global->file, &classname2, extends2);
1065 if(state->cls->info->flags&FLAG_FINAL) abc_class_final(state->cls->abc);
1066 if(!(state->cls->info->flags&FLAG_DYNAMIC)) abc_class_sealed(state->cls->abc);
1067 if(state->cls->info->flags&FLAG_INTERFACE) {
1068 abc_class_interface(state->cls->abc);
1071 abc_class_protectedNS(state->cls->abc, classname);
1073 for(mlist=implements;mlist;mlist=mlist->next) {
1074 MULTINAME(m, mlist->classinfo);
1075 abc_class_add_interface(state->cls->abc, &m);
1078 /* write the construction code for this class to the global init
1080 int slotindex = abc_initscript_addClassTrait(global->init, &classname2, state->cls->abc);
1082 abc_method_body_t*m = global->init->method->body;
1083 __ getglobalscope(m);
1084 classinfo_t*s = extends;
1089 //TODO: take a look at the current scope stack, maybe
1090 // we can re-use something
1095 multiname_t*s2 = sig2mname(s);
1097 multiname_destroy(s2);
1099 __ pushscope(m); count++;
1100 m->code = m->code->prev->prev; // invert
1102 /* continue appending after last op end */
1103 while(m->code && m->code->next) m->code = m->code->next;
1105 /* TODO: if this is one of *our* classes, we can also
1106 do a getglobalscope/getslot <nr> (which references
1107 the init function's slots) */
1109 __ getlex2(m, extends2);
1111 /* notice: we get a Verify Error #1107 if the top elemnt on the scope
1112 stack is not the superclass */
1113 __ pushscope(m);count++;
1116 /* notice: we get a verify error #1107 if the top element on the scope
1117 stack is not the global object */
1119 __ pushscope(m);count++;
1121 __ newclass(m,state->cls->abc);
1125 __ setslot(m, slotindex);
1126 multiname_destroy(extends2);
1128 /* flash.display.MovieClip handling */
1130 if(!as3_globalclass && (mod->flags&FLAG_PUBLIC) && slotinfo_equals((slotinfo_t*)registry_getMovieClip(),(slotinfo_t*)extends)) {
1131 if(state->package && state->package[0]) {
1132 as3_globalclass = concat3(state->package, ".", classname);
1134 as3_globalclass = strdup(classname);
1140 static void endclass()
1143 if(!state->cls->has_constructor && !(state->cls->info->flags&FLAG_INTERFACE)) {
1145 c = abc_getlocal_0(c);
1146 c = abc_constructsuper(c, 0);
1147 state->cls->init->header = code_append(state->cls->init->header, c);
1148 state->cls->has_constructor=1;
1150 if(state->cls->init) {
1151 if(state->cls->info->flags&FLAG_INTERFACE) {
1152 if(state->cls->init->header)
1153 syntaxerror("interface can not have class-level code");
1155 abc_method_t*m = abc_class_getconstructor(state->cls->abc, 0);
1156 code_t*c = method_header(state->cls->init);
1157 m->body->code = wrap_function(c, 0, m->body->code);
1160 if(state->cls->static_init) {
1161 abc_method_t*m = abc_class_getstaticconstructor(state->cls->abc, 0);
1162 code_t*c = method_header(state->cls->static_init);
1163 m->body->code = wrap_function(c, 0, m->body->code);
1170 void check_code_for_break(code_t*c)
1173 if(c->opcode == OPCODE___BREAK__) {
1174 char*name = string_cstr(c->data[0]);
1175 syntaxerror("Unresolved \"break %s\"", name);
1177 if(c->opcode == OPCODE___CONTINUE__) {
1178 char*name = string_cstr(c->data[0]);
1179 syntaxerror("Unresolved \"continue %s\"", name);
1181 if(c->opcode == OPCODE___RETHROW__) {
1182 syntaxerror("Unresolved \"rethrow\"");
1184 if(c->opcode == OPCODE___FALLTHROUGH__) {
1185 syntaxerror("Unresolved \"fallthrough\"");
1187 if(c->opcode == OPCODE___PUSHPACKAGE__) {
1188 char*name = string_cstr(c->data[0]);
1189 syntaxerror("Can't reference a package (%s) as such", name);
1195 static void check_constant_against_type(classinfo_t*t, constant_t*c)
1197 #define xassert(b) if(!(b)) syntaxerror("Invalid default value %s for type '%s'", constant_tostring(c), t->name)
1198 if(TYPE_IS_NUMBER(t)) {
1199 xassert(c->type == CONSTANT_FLOAT
1200 || c->type == CONSTANT_INT
1201 || c->type == CONSTANT_UINT);
1202 } else if(TYPE_IS_UINT(t)) {
1203 xassert(c->type == CONSTANT_UINT ||
1204 (c->type == CONSTANT_INT && c->i>=0));
1205 } else if(TYPE_IS_INT(t)) {
1206 xassert(c->type == CONSTANT_INT);
1207 } else if(TYPE_IS_BOOLEAN(t)) {
1208 xassert(c->type == CONSTANT_TRUE
1209 || c->type == CONSTANT_FALSE);
1213 static void check_override(memberinfo_t*m, int flags)
1217 if(m->parent == state->cls->info)
1218 syntaxerror("class '%s' already contains a method/slot '%s'", m->parent->name, m->name);
1220 syntaxerror("internal error: overriding method %s, which doesn't have parent", m->name);
1221 if(m->access==ACCESS_PRIVATE)
1223 if(m->flags & FLAG_FINAL)
1224 syntaxerror("can't override final member %s", m->name);
1226 /* allow this. it's no issue.
1227 if((m->flags & FLAG_STATIC) && !(flags&FLAG_STATIC))
1228 syntaxerror("can't override static member %s", m->name);*/
1230 if(!(m->flags & FLAG_STATIC) && (flags&FLAG_STATIC))
1231 syntaxerror("can't override non-static member %s with static declaration", m->name);
1233 if(!(flags&FLAG_OVERRIDE) && !(flags&FLAG_STATIC) && !(m->flags&FLAG_STATIC)) {
1234 if(m->parent && !(m->parent->flags&FLAG_INTERFACE)) {
1235 if(m->kind == INFOTYPE_METHOD)
1236 syntaxerror("can't override without explicit 'override' declaration");
1238 syntaxerror("can't override '%s'", m->name);
1243 static methodinfo_t*registerfunction(enum yytokentype getset, modifiers_t*mod, char*name, params_t*params, classinfo_t*return_type, int slot)
1245 methodinfo_t*minfo = 0;
1246 namespace_t ns = modifiers2access(mod);
1249 minfo = methodinfo_register_global(ns.access, state->package, name);
1250 minfo->return_type = 0; // save this for pass 2
1251 } else if(getset != KW_GET && getset != KW_SET) {
1253 memberinfo_t* m = registry_findmember(state->cls->info, ns.name, name, 0);
1255 syntaxerror("class already contains a %s '%s'", infotypename((slotinfo_t*)m), m->name);
1257 minfo = methodinfo_register_onclass(state->cls->info, ns.access, ns.name, name);
1258 minfo->return_type = 0; // save this for pass 2
1259 // getslot on a member slot only returns "undefined", so no need
1260 // to actually store these
1261 //state->minfo->slot = state->method->abc->method->trait->slot_id;
1263 //class getter/setter
1264 int gs = getset==KW_GET?SUBTYPE_GET:SUBTYPE_SET;
1266 if(getset == KW_GET) {
1268 } else if(params->list && params->list->param && !params->list->next) {
1269 type = params->list->param->type;
1271 syntaxerror("setter function needs to take exactly one argument");
1272 // not sure wether to look into superclasses here, too
1273 minfo = (methodinfo_t*)registry_findmember(state->cls->info, ns.name, name, 1);
1275 if(minfo->kind!=INFOTYPE_SLOT)
1276 syntaxerror("class already contains a method called '%s'", name);
1277 if(!(minfo->subtype & (SUBTYPE_GETSET)))
1278 syntaxerror("class already contains a field called '%s'", name);
1279 if(minfo->subtype & gs)
1280 syntaxerror("getter/setter for '%s' already defined", name);
1281 /* make a setter or getter into a getset */
1282 minfo->subtype |= gs;
1285 FIXME: this check needs to be done in pass 2
1287 if((!minfo->return_type != !type) ||
1288 (minfo->return_type && type &&
1289 !strcmp(minfo->return_type->name, type->name))) {
1290 syntaxerror("different type in getter and setter: %s and %s",
1291 minfo->return_type?minfo->return_type->name:"*",
1292 type?type->name:"*");
1295 minfo = methodinfo_register_onclass(state->cls->info, ns.access, ns.name, name);
1296 minfo->kind = INFOTYPE_SLOT; //hack
1297 minfo->subtype = gs;
1298 minfo->return_type = 0;
1300 /* can't assign a slot as getter and setter might have different slots */
1301 //minfo->slot = slot;
1303 if(mod->flags&FLAG_FINAL) minfo->flags |= FLAG_FINAL;
1304 if(mod->flags&FLAG_STATIC) minfo->flags |= FLAG_STATIC;
1305 if(mod->flags&FLAG_OVERRIDE) minfo->flags |= FLAG_OVERRIDE;
1310 static void innerfunction(char*name, params_t*params, classinfo_t*return_type)
1312 //parserassert(state->method && state->method->info);
1314 methodstate_t*parent_method = state->method;
1317 return_type = 0; // not valid in pass 1
1321 state->new_vars = 1;
1324 state->method = rfx_calloc(sizeof(methodstate_t));
1325 state->method->inner = 1;
1326 state->method->variable_count = 0;
1327 state->method->abc = rfx_calloc(sizeof(abc_method_t));
1329 NEW(methodinfo_t,minfo);
1330 minfo->kind = INFOTYPE_METHOD;
1331 minfo->access = ACCESS_PACKAGEINTERNAL;
1333 state->method->info = minfo;
1336 list_append(parent_method->innerfunctions, state->method);
1338 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
1340 function_initvars(state->method, params, 0, 1);
1344 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1345 state->method->variable_count = 0;
1346 parserassert(state->method);
1348 state->method->info->return_type = return_type;
1349 function_initvars(state->method, params, 0, 1);
1353 static void startfunction(modifiers_t*mod, enum yytokentype getset, char*name,
1354 params_t*params, classinfo_t*return_type)
1356 if(state->method && state->method->info) {
1357 syntaxerror("not able to start another method scope");
1360 state->new_vars = 1;
1363 state->method = rfx_calloc(sizeof(methodstate_t));
1364 state->method->has_super = 0;
1367 state->method->is_constructor = !strcmp(state->cls->info->name,name);
1369 state->method->is_global = 1;
1370 state->method->late_binding = 1; // for global methods, always push local_0 on the scope stack
1372 if(state->method->is_constructor)
1373 name = "__as3_constructor__";
1375 state->method->info = registerfunction(getset, mod, name, params, return_type, 0);
1377 function_initvars(state->method, params, mod->flags, 1);
1379 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
1383 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1384 state->method->variable_count = 0;
1385 parserassert(state->method);
1388 memberinfo_t*m = registry_findmember(state->cls->info, mod->ns, name, 2);
1389 check_override(m, mod->flags);
1393 state->cls->has_constructor |= state->method->is_constructor;
1396 state->method->info->return_type = return_type;
1397 function_initvars(state->method, params, mod->flags, 1);
1401 static abc_method_t* endfunction(modifiers_t*mod, enum yytokentype getset, char*name,
1402 params_t*params, classinfo_t*return_type, code_t*body)
1405 // store inner methods in variables
1406 function_initvars(state->method, 0, 0, 0);
1408 methodstate_list_t*ml = state->method->innerfunctions;
1410 dict_t*xvars = dict_new();
1413 methodstate_t*m = ml->methodstate;
1414 parserassert(m->inner);
1415 if(m->unresolved_variables) {
1416 dict_t*d = m->unresolved_variables;
1418 for(t=0;t<d->hashsize;t++) {
1419 dictentry_t*l = d->slots[t];
1421 /* check parent method's variables */
1423 if((v=find_variable(state, l->key))) {
1424 m->uses_parent_function = 1;
1425 state->method->uses_slots = 1;
1426 dict_put(xvars, l->key, 0);
1433 dict_destroy(m->unresolved_variables);
1434 m->unresolved_variables = 0;
1439 if(state->method->uses_slots) {
1440 state->method->slots = dict_new();
1442 DICT_ITERATE_ITEMS(state->vars, char*, name, variable_t*, v) {
1443 if(!name) syntaxerror("internal error");
1444 if(v->index && dict_contains(xvars, name)) {
1447 if(v->is_inner_method) {
1448 v->is_inner_method->is_a_slot = 1;
1451 dict_put(state->method->slots, name, v);
1454 state->method->uses_slots = i;
1455 dict_destroy(state->vars);state->vars = 0;
1462 /*if(state->method->uses_parent_function){
1463 syntaxerror("accessing variables of parent function from inner functions not supported yet");
1468 multiname_t*type2 = sig2mname(return_type);
1470 if(state->method->inner) {
1471 f = state->method->abc;
1472 abc_method_init(f, global->file, type2, 1);
1473 } else if(state->method->is_constructor) {
1474 f = abc_class_getconstructor(state->cls->abc, type2);
1475 } else if(!state->method->is_global) {
1476 namespace_t mname_ns = modifiers2access(mod);
1477 multiname_t mname = {QNAME, &mname_ns, 0, name};
1479 if(mod->flags&FLAG_STATIC)
1480 f = abc_class_staticmethod(state->cls->abc, type2, &mname);
1482 f = abc_class_method(state->cls->abc, type2, &mname);
1483 slot = f->trait->slot_id;
1485 namespace_t mname_ns = {state->method->info->access, state->package};
1486 multiname_t mname = {QNAME, &mname_ns, 0, name};
1488 f = abc_method_new(global->file, type2, 1);
1489 trait_t*t = trait_new_method(&global->init->traits, multiname_clone(&mname), f);
1490 //abc_code_t*c = global->init->method->body->code;
1492 //flash doesn't seem to allow us to access function slots
1493 //state->method->info->slot = slot;
1495 if(mod && mod->flags&FLAG_OVERRIDE) f->trait->attributes |= TRAIT_ATTR_OVERRIDE;
1496 if(getset == KW_GET) f->trait->kind = TRAIT_GETTER;
1497 if(getset == KW_SET) f->trait->kind = TRAIT_SETTER;
1498 if(params->varargs) f->flags |= METHOD_NEED_REST;
1502 for(p=params->list;p;p=p->next) {
1503 if(params->varargs && !p->next) {
1504 break; //varargs: omit last parameter in function signature
1506 multiname_t*m = sig2mname(p->param->type);
1507 list_append(f->parameters, m);
1508 if(p->param->value) {
1509 check_constant_against_type(p->param->type, p->param->value);
1510 opt=1;list_append(f->optional_parameters, p->param->value);
1512 syntaxerror("non-optional parameter not allowed after optional parameters");
1515 if(state->method->slots) {
1516 DICT_ITERATE_ITEMS(state->method->slots, char*, name, variable_t*, v) {
1518 multiname_t*mname = multiname_new(namespace_new(ACCESS_PACKAGE, ""), name);
1519 multiname_t*type = sig2mname(v->type);
1520 trait_t*t = trait_new_member(&f->body->traits, type, mname, 0);
1521 t->slot_id = v->index;
1526 check_code_for_break(body);
1528 /* Seems this works now.
1529 if(state->method->exceptions && state->method->uses_slots) {
1530 as3_warning("try/catch and activation not supported yet within the same method");
1534 f->body->code = body;
1535 f->body->exceptions = state->method->exceptions;
1536 } else { //interface
1538 syntaxerror("interface methods can't have a method body");
1548 void breakjumpsto(code_t*c, char*name, code_t*jump)
1551 if(c->opcode == OPCODE___BREAK__) {
1552 string_t*name2 = c->data[0];
1553 if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1554 c->opcode = OPCODE_JUMP;
1561 void continuejumpsto(code_t*c, char*name, code_t*jump)
1564 if(c->opcode == OPCODE___CONTINUE__) {
1565 string_t*name2 = c->data[0];
1566 if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1567 c->opcode = OPCODE_JUMP;
1575 /* TODO: move this to ast.c */
1576 #define IS_INT(a) (TYPE_IS_INT((a)) || TYPE_IS_UINT((a)))
1577 #define IS_NUMBER_OR_INT(a) (TYPE_IS_INT((a)) || TYPE_IS_UINT((a)) || TYPE_IS_NUMBER((a)))
1578 #define BOTH_INT(a,b) (IS_INT(a) && IS_INT(b))
1579 static classinfo_t*join_types(classinfo_t*type1, classinfo_t*type2, char op)
1581 if(!type1 || !type2)
1582 return registry_getanytype();
1583 if(TYPE_IS_ANY(type1) || TYPE_IS_ANY(type2))
1584 return registry_getanytype();
1587 if(IS_NUMBER_OR_INT(type1) && IS_NUMBER_OR_INT(type2)) {
1596 return registry_getanytype();
1598 static char is_getlocal(code_t*c)
1600 if(!c || c->prev || c->next)
1602 return(c->opcode == OPCODE_GETLOCAL
1603 || c->opcode == OPCODE_GETLOCAL_0
1604 || c->opcode == OPCODE_GETLOCAL_1
1605 || c->opcode == OPCODE_GETLOCAL_2
1606 || c->opcode == OPCODE_GETLOCAL_3);
1608 static int getlocalnr(code_t*c)
1610 if(c->opcode == OPCODE_GETLOCAL) {return (ptroff_t)c->data[0];}
1611 else if(c->opcode == OPCODE_GETLOCAL_0) {return 0;}
1612 else if(c->opcode == OPCODE_GETLOCAL_1) {return 1;}
1613 else if(c->opcode == OPCODE_GETLOCAL_2) {return 2;}
1614 else if(c->opcode == OPCODE_GETLOCAL_3) {return 3;}
1615 else syntaxerror("Internal error: opcode %02x is not a getlocal call", c->opcode);
1618 code_t*converttype(code_t*c, classinfo_t*from, classinfo_t*to)
1623 return abc_coerce_a(c);
1627 // cast an "any" type to a specific type. subject to
1628 // runtime exceptions
1629 return abc_coerce2(c, &m);
1632 if((TYPE_IS_NUMBER(from) || TYPE_IS_UINT(from) || TYPE_IS_INT(from)) &&
1633 (TYPE_IS_NUMBER(to) || TYPE_IS_UINT(to) || TYPE_IS_INT(to))) {
1634 // allow conversion between number types
1635 return abc_coerce2(c, &m);
1637 //printf("%s.%s\n", from.package, from.name);
1638 //printf("%s.%s\n", to.package, to.name);
1640 classinfo_t*supertype = from;
1642 if(supertype == to) {
1643 // target type is one of from's superclasses
1644 return abc_coerce2(c, &m);
1647 while(supertype->interfaces[t]) {
1648 if(supertype->interfaces[t]==to) {
1649 // target type is one of from's interfaces
1650 return abc_coerce2(c, &m);
1654 supertype = supertype->superclass;
1656 if(TYPE_IS_FUNCTION(from) && TYPE_IS_FUNCTION(to))
1658 if(TYPE_IS_CLASS(from) && TYPE_IS_CLASS(to))
1660 if(TYPE_IS_NULL(from) && !IS_NUMBER_OR_INT(to))
1663 as3_error("can't convert type %s%s%s to %s%s%s",
1664 from->package, from->package?".":"", from->name,
1665 to->package, to->package?".":"", to->name);
1669 /* move to ast.c todo end */
1671 char is_pushundefined(code_t*c)
1673 return (c && !c->prev && !c->next && c->opcode == OPCODE_PUSHUNDEFINED);
1676 static const char* get_package_from_name(const char*name)
1678 /* try explicit imports */
1679 dictentry_t* e = dict_get_slot(state->imports, name);
1681 if(!strcmp(e->key, name)) {
1682 slotinfo_t*c = (slotinfo_t*)e->data;
1683 if(c) return c->package;
1689 static namespace_list_t*get_current_imports()
1691 namespace_list_t*searchlist = 0;
1693 list_append(searchlist, namespace_new_package(state->package));
1695 import_list_t*l = state->wildcard_imports;
1697 namespace_t*ns = namespace_new_package(l->import->package);
1698 list_append(searchlist, ns);
1701 list_append(searchlist, namespace_new_package(""));
1702 list_append(searchlist, namespace_new_package(internal_filename_package));
1706 static slotinfo_t* find_class(const char*name)
1710 c = registry_find(state->package, name);
1713 /* try explicit imports */
1714 dictentry_t* e = dict_get_slot(state->imports, name);
1717 if(!strcmp(e->key, name)) {
1718 c = (slotinfo_t*)e->data;
1724 /* try package.* imports */
1725 import_list_t*l = state->wildcard_imports;
1727 //printf("does package %s contain a class %s?\n", l->import->package, name);
1728 c = registry_find(l->import->package, name);
1733 /* try global package */
1734 c = registry_find("", name);
1737 /* try local "filename" package */
1738 c = registry_find(internal_filename_package, name);
1743 typedcode_t push_class(slotinfo_t*a)
1748 if(a->access == ACCESS_PACKAGEINTERNAL &&
1749 strcmp(a->package, state->package) &&
1750 strcmp(a->package, internal_filename_package)
1752 syntaxerror("Can't access internal %s %s in package '%s' from package '%s'",
1753 infotypename(a), a->name, a->package, state->package);
1756 if(a->kind != INFOTYPE_CLASS) {
1758 x.c = abc_findpropstrict2(x.c, &m);
1759 x.c = abc_getproperty2(x.c, &m);
1760 if(a->kind == INFOTYPE_METHOD) {
1761 methodinfo_t*f = (methodinfo_t*)a;
1762 x.t = TYPE_FUNCTION(f);
1764 varinfo_t*v = (varinfo_t*)a;
1768 classinfo_t*c = (classinfo_t*)a;
1770 x.c = abc_getglobalscope(x.c);
1771 x.c = abc_getslot(x.c, c->slot);
1774 x.c = abc_getlex2(x.c, &m);
1776 x.t = TYPE_CLASS(c);
1782 code_t* toreadwrite(code_t*in, code_t*middlepart, char justassign, char readbefore, char pushvalue)
1786 [prefix code] [read instruction]
1790 [prefix code] ([dup]) [read instruction] [middlepart] [setvar] [write instruction] [getvar]
1792 if(in && in->opcode == OPCODE_COERCE_A) {
1793 in = code_cutlast(in);
1796 syntaxerror("internal error");
1798 /* chop off read instruction */
1802 prefix = r->prev;r->prev = 0;
1808 char use_temp_var = readbefore;
1810 /* generate the write instruction, and maybe append a dup to the prefix code */
1811 code_t* write = abc_nop(0);
1812 if(r->opcode == OPCODE_GETPROPERTY) {
1813 write->opcode = OPCODE_SETPROPERTY;
1814 multiname_t*m = (multiname_t*)r->data[0];
1815 write->data[0] = multiname_clone(m);
1816 if(m->type == QNAME || m->type == MULTINAME) {
1818 prefix = abc_dup(prefix); // we need the object, too
1821 } else if(m->type == MULTINAMEL) {
1823 /* dupping two values on the stack requires 5 operations and one register-
1824 couldn't adobe just have given us a dup2? */
1825 int temp = gettempvar();
1826 prefix = abc_setlocal(prefix, temp);
1827 prefix = abc_dup(prefix);
1828 prefix = abc_getlocal(prefix, temp);
1829 prefix = abc_swap(prefix);
1830 prefix = abc_getlocal(prefix, temp);
1832 prefix = abc_kill(prefix, temp);
1836 syntaxerror("illegal lvalue: can't assign a value to this expression (not a qname/multiname)");
1838 } else if(r->opcode == OPCODE_GETSLOT) {
1839 write->opcode = OPCODE_SETSLOT;
1840 write->data[0] = r->data[0];
1842 prefix = abc_dup(prefix); // we need the object, too
1845 } else if(r->opcode == OPCODE_GETLOCAL) {
1846 write->opcode = OPCODE_SETLOCAL;
1847 write->data[0] = r->data[0];
1848 } else if(r->opcode == OPCODE_GETLOCAL_0) {
1849 write->opcode = OPCODE_SETLOCAL_0;
1850 } else if(r->opcode == OPCODE_GETLOCAL_1) {
1851 write->opcode = OPCODE_SETLOCAL_1;
1852 } else if(r->opcode == OPCODE_GETLOCAL_2) {
1853 write->opcode = OPCODE_SETLOCAL_2;
1854 } else if(r->opcode == OPCODE_GETLOCAL_3) {
1855 write->opcode = OPCODE_SETLOCAL_3;
1856 } else if(r->opcode == OPCODE_GETSUPER) {
1857 write->opcode = OPCODE_SETSUPER;
1858 multiname_t*m = (multiname_t*)r->data[0];
1859 write->data[0] = multiname_clone(m);
1862 syntaxerror("illegal lvalue: can't assign a value to this expression");
1869 /* with getproperty/getslot, we have to be extra careful not
1870 to execute the read code twice, as it might have side-effects
1871 (e.g. if the property is in fact a setter/getter combination)
1873 So read the value, modify it, and write it again,
1874 using prefix only once and making sure (by using a temporary
1875 register) that the return value is what we just wrote */
1876 temp = gettempvar();
1877 c = code_append(c, prefix);
1878 c = code_append(c, r);
1879 if(pushvalue && readbefore) {
1881 c = abc_setlocal(c, temp);
1883 c = code_append(c, middlepart);
1884 if(pushvalue && !readbefore) {
1886 c = abc_setlocal(c, temp);
1888 c = code_append(c, write);
1890 c = abc_getlocal(c, temp);
1891 c = abc_kill(c, temp);
1894 /* if we're allowed to execute the read code twice *and*
1895 the middlepart doesn't modify the code, things are easier.
1897 //c = code_append(c, prefix);
1898 parserassert(!prefix);
1903 c = code_append(c, r);
1904 c = code_append(c, middlepart);
1905 c = code_append(c, write);
1907 c = code_append(c, r2);
1911 /* even smaller version: overwrite the value without reading
1915 c = code_append(c, prefix);
1918 c = code_append(c, middlepart);
1919 c = code_append(c, write);
1921 c = code_append(c, r);
1925 temp = gettempvar();
1927 c = code_append(c, prefix);
1929 c = code_append(c, middlepart);
1932 c = abc_setlocal(c, temp);
1934 c = code_append(c, write);
1936 c = abc_getlocal(c, temp);
1937 c = abc_kill(c, temp);
1944 char is_break_or_jump(code_t*c)
1948 if(c->opcode == OPCODE_JUMP ||
1949 c->opcode == OPCODE___BREAK__ ||
1950 c->opcode == OPCODE___CONTINUE__ ||
1951 c->opcode == OPCODE_THROW ||
1952 c->opcode == OPCODE_RETURNVOID ||
1953 c->opcode == OPCODE_RETURNVALUE) {
1959 #define IS_FINALLY_TARGET(op) \
1960 ((op) == OPCODE___CONTINUE__ || \
1961 (op) == OPCODE___BREAK__ || \
1962 (op) == OPCODE_RETURNVOID || \
1963 (op) == OPCODE_RETURNVALUE || \
1964 (op) == OPCODE___RETHROW__)
1966 static code_t* insert_finally_lookup(code_t*c, code_t*finally, int tempvar)
1968 #define NEED_EXTRA_STACK_ARG
1969 code_t*finally_label = abc_nop(0);
1970 NEW(lookupswitch_t, l);
1976 code_t*prev = i->prev;
1977 if(IS_FINALLY_TARGET(i->opcode)) {
1980 if(i->opcode == OPCODE___RETHROW__ ||
1981 i->opcode == OPCODE_RETURNVALUE) {
1982 if(i->opcode == OPCODE___RETHROW__)
1983 i->opcode = OPCODE_THROW;
1985 p = abc_coerce_a(p);
1986 p = abc_setlocal(p, tempvar);
1988 p = abc_pushbyte(p, count++);
1989 p = abc_jump(p, finally_label);
1990 code_t*target = p = abc_label(p);
1991 #ifdef NEED_EXTRA_STACK_ARG
1995 p = abc_getlocal(p, tempvar);
1998 p->next = i;i->prev = p;
1999 list_append(l->targets, target);
2005 c = abc_pushbyte(c, -1);
2006 c = code_append(c, finally_label);
2007 c = code_append(c, finally);
2009 #ifdef NEED_EXTRA_STACK_ARG
2012 c = abc_lookupswitch(c, l);
2013 c = l->def = abc_label(c);
2014 #ifdef NEED_EXTRA_STACK_ARG
2021 static code_t* insert_finally_simple(code_t*c, code_t*finally, int tempvar)
2025 code_t*prev = i->prev;
2026 if(IS_FINALLY_TARGET(i->opcode)) {
2027 if(i->opcode == OPCODE___RETHROW__)
2028 i->opcode = OPCODE_THROW;
2029 code_t*end = code_dup(finally);
2030 code_t*start = code_start(end);
2031 if(prev) prev->next = start;
2038 return code_append(c, finally);
2041 code_t* insert_finally(code_t*c, code_t*finally, int tempvar)
2047 int num_insertion_points=0;
2049 if(IS_FINALLY_TARGET(i->opcode))
2050 num_insertion_points++;
2057 if(i->branch || i->opcode == OPCODE_LOOKUPSWITCH) {
2062 int simple_version_cost = (1+num_insertion_points)*code_size;
2063 int lookup_version_cost = 4*num_insertion_points + 5;
2065 if(cantdup || simple_version_cost > lookup_version_cost) {
2066 //printf("(use lookup) simple=%d > lookup=%d\n", simple_version_cost, lookup_version_cost);
2067 return insert_finally_lookup(c, finally, tempvar);
2069 //printf("(use simple) simple=%d < lookup=%d\n", simple_version_cost, lookup_version_cost);
2070 return insert_finally_simple(c, finally, tempvar);
2074 #define PASS1 }} if(as3_pass == 1) {{
2075 #define PASS1END }} if(as3_pass == 2) {{
2076 #define PASS2 }} if(as3_pass == 2) {{
2077 #define PASS12 }} if(as3_pass == 1 || as3_pass == 2) {{
2078 #define PASS12END }} if(as3_pass == 2) {{
2079 #define PASS_ALWAYS }} {{
2083 /* Line 273 of skeleton.m4 */
2084 #line 2085 "parser.tab.c"
2085 /* Unqualified %code blocks. */
2087 /* Line 274 of skeleton.m4 */
2088 #line 2149 "parser.y"
2090 char is_subtype_of(classinfo_t*type, classinfo_t*supertype)
2096 /* Line 274 of skeleton.m4 */
2097 #line 2601 "parser.y"
2099 static void state_has_imports()
2101 state->wildcard_imports = list_clone(state->wildcard_imports);
2102 state->imports = dict_clone(state->imports);
2103 state->has_own_imports = 1;
2105 static void import_toplevel(const char*package)
2107 char* s = strdup(package);
2109 dict_put(state->import_toplevel_packages, s, 0);
2110 char*x = strrchr(s, '.');
2119 /* Line 274 of skeleton.m4 */
2120 #line 2734 "parser.y"
2122 static int slotstate_varconst = 0;
2123 static modifiers_t*slotstate_flags = 0;
2124 static void setslotstate(modifiers_t* flags, int varconst)
2126 slotstate_varconst = varconst;
2127 slotstate_flags = flags;
2129 if(flags && flags->flags&FLAG_STATIC) {
2130 state->method = state->cls->static_init;
2132 state->method = state->cls->init;
2135 parserassert(state->method);
2140 /* Line 274 of skeleton.m4 */
2141 #line 3899 "parser.y"
2143 void add_active_url(const char*url)
2147 list_append(state->active_namespace_urls, n);
2152 /* Line 274 of skeleton.m4 */
2153 #line 2154 "parser.tab.c"
2160 typedef YYTYPE_UINT8 yytype_uint8;
2162 typedef unsigned char yytype_uint8;
2166 typedef YYTYPE_INT8 yytype_int8;
2167 #elif (defined __STDC__ || defined __C99__FUNC__ \
2168 || defined __cplusplus || defined _MSC_VER)
2169 typedef signed char yytype_int8;
2171 typedef short int yytype_int8;
2174 #ifdef YYTYPE_UINT16
2175 typedef YYTYPE_UINT16 yytype_uint16;
2177 typedef unsigned short int yytype_uint16;
2181 typedef YYTYPE_INT16 yytype_int16;
2183 typedef short int yytype_int16;
2187 # ifdef __SIZE_TYPE__
2188 # define YYSIZE_T __SIZE_TYPE__
2189 # elif defined size_t
2190 # define YYSIZE_T size_t
2191 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
2192 || defined __cplusplus || defined _MSC_VER)
2193 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
2194 # define YYSIZE_T size_t
2196 # define YYSIZE_T unsigned int
2200 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
2205 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
2206 # define YY_(msgid) dgettext ("bison-runtime", msgid)
2210 # define YY_(msgid) msgid
2214 /* Suppress unused-variable warnings by "using" E. */
2215 #if ! defined lint || defined __GNUC__
2216 # define YYUSE(e) ((void) (e))
2218 # define YYUSE(e) /* empty */
2221 /* Identity function, used to suppress warnings about constant conditions. */
2223 # define YYID(n) (n)
2225 #if (defined __STDC__ || defined __C99__FUNC__ \
2226 || defined __cplusplus || defined _MSC_VER)
2239 #if ! defined yyoverflow || YYERROR_VERBOSE
2241 /* The parser invokes alloca or malloc; define the necessary symbols. */
2243 # ifdef YYSTACK_USE_ALLOCA
2244 # if YYSTACK_USE_ALLOCA
2246 # define YYSTACK_ALLOC __builtin_alloca
2247 # elif defined __BUILTIN_VA_ARG_INCR
2248 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
2250 # define YYSTACK_ALLOC __alloca
2251 # elif defined _MSC_VER
2252 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
2253 # define alloca _alloca
2255 # define YYSTACK_ALLOC alloca
2256 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
2257 || defined __cplusplus || defined _MSC_VER)
2258 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
2260 # define _STDLIB_H 1
2267 # ifdef YYSTACK_ALLOC
2268 /* Pacify GCC's `empty if-body' warning. */
2269 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
2270 # ifndef YYSTACK_ALLOC_MAXIMUM
2271 /* The OS might guarantee only one guard page at the bottom of the stack,
2272 and a page size can be as small as 4096 bytes. So we cannot safely
2273 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
2274 to allow for a few compiler-allocated temporary stack slots. */
2275 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
2278 # define YYSTACK_ALLOC YYMALLOC
2279 # define YYSTACK_FREE YYFREE
2280 # ifndef YYSTACK_ALLOC_MAXIMUM
2281 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
2283 # if (defined __cplusplus && ! defined _STDLIB_H \
2284 && ! ((defined YYMALLOC || defined malloc) \
2285 && (defined YYFREE || defined free)))
2286 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
2288 # define _STDLIB_H 1
2292 # define YYMALLOC malloc
2293 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
2294 || defined __cplusplus || defined _MSC_VER)
2295 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
2299 # define YYFREE free
2300 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
2301 || defined __cplusplus || defined _MSC_VER)
2302 void free (void *); /* INFRINGES ON USER NAME SPACE */
2306 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
2309 #if (! defined yyoverflow \
2310 && (! defined __cplusplus \
2311 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
2313 /* A type that is properly aligned for any stack member. */
2316 yytype_int16 yyss_alloc;
2320 /* The size of the maximum gap between one aligned stack and the next. */
2321 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
2323 /* The size of an array large to enough to hold all stacks, each with
2325 # define YYSTACK_BYTES(N) \
2326 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
2327 + YYSTACK_GAP_MAXIMUM)
2329 /* Copy COUNT objects from FROM to TO. The source and destination do
2332 # if defined __GNUC__ && 1 < __GNUC__
2333 # define YYCOPY(To, From, Count) \
2334 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
2336 # define YYCOPY(To, From, Count) \
2340 for (yyi = 0; yyi < (Count); yyi++) \
2341 (To)[yyi] = (From)[yyi]; \
2347 /* Relocate STACK from its old location to the new one. The
2348 local variables YYSIZE and YYSTACKSIZE give the old and new number of
2349 elements in the stack, and YYPTR gives the new location of the
2350 stack. Advance YYPTR to a properly aligned location for the next
2352 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
2355 YYSIZE_T yynewbytes; \
2356 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
2357 Stack = &yyptr->Stack_alloc; \
2358 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
2359 yyptr += yynewbytes / sizeof (*yyptr); \
2365 /* YYFINAL -- State number of the termination state. */
2367 /* YYLAST -- Last index in YYTABLE. */
2370 /* YYNTOKENS -- Number of terminals. */
2371 #define YYNTOKENS 134
2372 /* YYNNTS -- Number of nonterminals. */
2374 /* YYNRULES -- Number of rules. */
2375 #define YYNRULES 309
2376 /* YYNRULES -- Number of states. */
2377 #define YYNSTATES 521
2379 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
2380 #define YYUNDEFTOK 2
2381 #define YYMAXUTOK 363
2383 #define YYTRANSLATE(YYX) \
2384 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
2386 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
2387 static const yytype_uint8 yytranslate[] =
2389 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2390 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2391 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2392 2, 2, 2, 118, 2, 2, 2, 116, 108, 2,
2393 122, 133, 115, 113, 100, 112, 127, 114, 2, 2,
2394 2, 2, 2, 2, 2, 2, 2, 2, 105, 99,
2395 109, 102, 110, 104, 128, 2, 2, 2, 2, 2,
2396 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2397 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2398 2, 124, 2, 125, 107, 2, 2, 2, 2, 2,
2399 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2400 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2401 2, 2, 2, 126, 106, 132, 117, 2, 2, 2,
2402 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2403 2, 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, 2, 2, 2, 2, 2, 2, 2,
2407 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2408 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2409 2, 2, 2, 2, 2, 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, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2413 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2414 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
2415 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
2416 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
2417 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
2418 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
2419 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
2420 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
2421 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
2422 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
2423 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
2424 95, 96, 97, 98, 101, 103, 111, 119, 120, 121,
2429 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
2431 static const yytype_uint16 yyprhs[] =
2433 0, 0, 3, 5, 6, 8, 10, 13, 15, 17,
2434 19, 21, 23, 25, 30, 32, 33, 35, 37, 40,
2435 42, 44, 46, 48, 50, 55, 57, 59, 60, 63,
2436 65, 67, 69, 71, 73, 75, 77, 79, 81, 83,
2437 85, 87, 89, 93, 96, 98, 100, 102, 104, 106,
2438 108, 110, 115, 118, 120, 122, 126, 129, 130, 133,
2439 136, 138, 142, 146, 147, 150, 151, 159, 160, 162,
2440 164, 168, 170, 173, 177, 186, 193, 194, 201, 202,
2441 210, 212, 215, 217, 220, 221, 223, 225, 228, 230,
2442 233, 238, 242, 243, 252, 253, 263, 264, 270, 272,
2443 275, 277, 280, 282, 283, 290, 293, 295, 300, 303,
2444 305, 307, 309, 313, 315, 316, 323, 324, 330, 333,
2445 338, 339, 341, 343, 346, 348, 350, 352, 354, 356,
2446 358, 360, 362, 364, 366, 367, 370, 371, 374, 375,
2447 378, 379, 389, 390, 399, 400, 402, 404, 407, 409,
2448 414, 416, 418, 420, 421, 423, 425, 428, 430, 433,
2449 442, 444, 446, 447, 452, 454, 458, 462, 463, 466,
2450 468, 470, 472, 474, 476, 478, 480, 482, 484, 485,
2451 487, 490, 495, 499, 501, 506, 509, 511, 513, 514,
2452 515, 528, 530, 531, 532, 543, 545, 549, 551, 553,
2453 555, 559, 561, 563, 565, 568, 569, 570, 574, 575,
2454 577, 579, 581, 584, 587, 588, 593, 598, 603, 606,
2455 608, 611, 613, 615, 619, 621, 623, 625, 627, 629,
2456 631, 633, 635, 637, 639, 641, 643, 645, 647, 649,
2457 651, 653, 655, 659, 663, 667, 671, 675, 679, 683,
2458 687, 691, 695, 698, 701, 705, 709, 713, 717, 721,
2459 725, 729, 733, 737, 741, 745, 749, 753, 757, 761,
2460 766, 769, 771, 775, 778, 783, 787, 788, 790, 794,
2461 800, 804, 808, 812, 816, 820, 824, 828, 832, 836,
2462 840, 844, 848, 854, 857, 860, 863, 866, 870, 873,
2463 878, 884, 888, 894, 898, 900, 903, 908, 913, 916
2466 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
2467 static const yytype_int16 yyrhs[] =
2469 135, 0, -1, 136, -1, -1, 137, -1, 138, -1,
2470 137, 138, -1, 186, -1, 198, -1, 196, -1, 217,
2471 -1, 207, -1, 147, -1, 148, 126, 136, 132, -1,
2472 99, -1, -1, 140, -1, 141, -1, 140, 141, -1,
2473 198, -1, 196, -1, 217, -1, 207, -1, 147, -1,
2474 148, 126, 139, 132, -1, 99, -1, 143, -1, -1,
2475 143, 145, -1, 145, -1, 189, -1, 159, -1, 160,
2476 -1, 161, -1, 163, -1, 171, -1, 154, -1, 183,
2477 -1, 179, -1, 239, -1, 247, -1, 246, -1, 126,
2478 143, 132, -1, 126, 132, -1, 99, -1, 144, -1,
2479 150, -1, 165, -1, 166, -1, 236, -1, 181, -1,
2480 148, 126, 143, 132, -1, 145, 99, -1, 145, -1,
2481 144, -1, 3, 89, 3, -1, 102, 237, -1, -1,
2482 46, 151, -1, 32, 151, -1, 152, -1, 151, 100,
2483 152, -1, 3, 227, 149, -1, -1, 65, 146, -1,
2484 -1, 64, 122, 155, 238, 133, 146, 153, -1, -1,
2485 150, -1, 239, -1, 46, 3, 227, -1, 3, -1,
2486 13, 122, -1, 13, 50, 122, -1, 158, 156, 99,
2487 238, 99, 239, 133, 146, -1, 158, 157, 68, 238,
2488 133, 146, -1, -1, 14, 122, 162, 238, 133, 146,
2489 -1, -1, 15, 164, 146, 14, 122, 238, 133, -1,
2490 66, -1, 66, 3, -1, 30, -1, 30, 3, -1,
2491 -1, 168, -1, 170, -1, 168, 170, -1, 169, -1,
2492 168, 169, -1, 34, 240, 105, 142, -1, 62, 105,
2493 142, -1, -1, 16, 122, 172, 240, 133, 126, 167,
2494 132, -1, -1, 33, 122, 3, 227, 133, 174, 126,
2495 142, 132, -1, -1, 28, 126, 176, 142, 132, -1,
2496 173, -1, 177, 173, -1, 177, -1, 177, 175, -1,
2497 175, -1, -1, 52, 126, 180, 142, 132, 178, -1,
2498 37, 238, -1, 37, -1, 39, 122, 238, 133, -1,
2499 182, 146, -1, 3, -1, 19, -1, 4, -1, 185,
2500 127, 184, -1, 184, -1, -1, 19, 185, 126, 187,
2501 139, 132, -1, -1, 19, 126, 188, 139, 132, -1,
2502 41, 223, -1, 41, 185, 127, 115, -1, -1, 191,
2503 -1, 192, -1, 191, 192, -1, 21, -1, 22, -1,
2504 20, -1, 38, -1, 47, -1, 49, -1, 48, -1,
2505 26, -1, 24, -1, 4, -1, -1, 54, 224, -1,
2506 -1, 54, 225, -1, -1, 17, 225, -1, -1, 190,
2507 31, 3, 193, 195, 126, 197, 200, 132, -1, -1,
2508 190, 44, 3, 194, 126, 199, 203, 132, -1, -1,
2509 201, -1, 202, -1, 201, 202, -1, 99, -1, 148,
2510 126, 200, 132, -1, 207, -1, 217, -1, 144, -1,
2511 -1, 204, -1, 205, -1, 204, 205, -1, 99, -1,
2512 46, 3, -1, 190, 27, 216, 3, 122, 213, 133,
2513 227, -1, 46, -1, 32, -1, -1, 190, 206, 208,
2514 209, -1, 210, -1, 209, 100, 210, -1, 3, 227,
2515 149, -1, -1, 102, 212, -1, 10, -1, 8, -1,
2516 9, -1, 12, -1, 5, -1, 56, -1, 55, -1,
2517 45, -1, 3, -1, -1, 214, -1, 93, 215, -1,
2518 214, 100, 93, 215, -1, 214, 100, 215, -1, 215,
2519 -1, 3, 105, 226, 211, -1, 3, 211, -1, 51,
2520 -1, 35, -1, -1, -1, 190, 27, 216, 3, 122,
2521 213, 133, 227, 126, 218, 142, 132, -1, 3, -1,
2522 -1, -1, 27, 219, 122, 213, 133, 227, 126, 221,
2523 142, 132, -1, 184, -1, 185, 127, 184, -1, 223,
2524 -1, 222, -1, 224, -1, 225, 100, 224, -1, 224,
2525 -1, 115, -1, 36, -1, 105, 226, -1, -1, -1,
2526 122, 229, 133, -1, -1, 230, -1, 231, -1, 237,
2527 -1, 230, 100, -1, 231, 237, -1, -1, 25, 240,
2528 232, 228, -1, 240, 122, 229, 133, -1, 53, 122,
2529 229, 133, -1, 63, 240, -1, 42, -1, 42, 238,
2530 -1, 240, -1, 240, -1, 238, 100, 240, -1, 238,
2531 -1, 220, -1, 241, -1, 244, -1, 233, -1, 235,
2532 -1, 234, -1, 6, -1, 10, -1, 11, -1, 8,
2533 -1, 9, -1, 12, -1, 5, -1, 29, -1, 56,
2534 -1, 55, -1, 45, -1, 240, 109, 240, -1, 240,
2535 110, 240, -1, 240, 75, 240, -1, 240, 76, 240,
2536 -1, 240, 71, 240, -1, 240, 72, 240, -1, 240,
2537 74, 240, -1, 240, 73, 240, -1, 240, 87, 240,
2538 -1, 240, 88, 240, -1, 118, 240, -1, 117, 240,
2539 -1, 240, 108, 240, -1, 240, 107, 240, -1, 240,
2540 106, 240, -1, 240, 96, 240, -1, 240, 95, 240,
2541 -1, 240, 94, 240, -1, 240, 114, 240, -1, 240,
2542 116, 240, -1, 240, 113, 240, -1, 240, 112, 240,
2543 -1, 240, 115, 240, -1, 240, 68, 240, -1, 240,
2544 69, 240, -1, 240, 40, 240, -1, 240, 67, 240,
2545 -1, 43, 122, 240, 133, -1, 36, 240, -1, 36,
2546 -1, 122, 238, 133, -1, 112, 240, -1, 240, 124,
2547 240, 125, -1, 124, 229, 125, -1, -1, 243, -1,
2548 237, 105, 237, -1, 243, 100, 237, 105, 237, -1,
2549 70, 242, 132, -1, 240, 80, 240, -1, 240, 79,
2550 240, -1, 240, 85, 240, -1, 240, 84, 240, -1,
2551 240, 86, 240, -1, 240, 78, 240, -1, 240, 77,
2552 240, -1, 240, 83, 240, -1, 240, 81, 240, -1,
2553 240, 82, 240, -1, 240, 102, 240, -1, 240, 104,
2554 240, 105, 240, -1, 240, 91, -1, 240, 90, -1,
2555 91, 240, -1, 90, 240, -1, 53, 127, 3, -1,
2556 128, 3, -1, 240, 127, 128, 3, -1, 240, 127,
2557 3, 89, 3, -1, 240, 92, 3, -1, 240, 127,
2558 122, 240, 133, -1, 240, 127, 3, -1, 3, -1,
2559 18, 3, -1, 18, 3, 102, 3, -1, 18, 3,
2560 102, 5, -1, 190, 245, -1, 23, 18, 224, -1
2563 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
2564 static const yytype_uint16 yyrline[] =
2566 0, 2064, 2064, 2066, 2066, 2067, 2068, 2070, 2071, 2072,
2567 2073, 2074, 2075, 2076, 2077, 2079, 2079, 2080, 2081, 2083,
2568 2084, 2085, 2086, 2087, 2088, 2089, 2091, 2092, 2094, 2095,
2569 2098, 2099, 2100, 2101, 2102, 2103, 2104, 2105, 2106, 2107,
2570 2108, 2109, 2110, 2111, 2114, 2115, 2116, 2117, 2118, 2119,
2571 2120, 2121, 2125, 2126, 2130, 2137, 2156, 2157, 2161, 2162,
2572 2164, 2165, 2167, 2228, 2229, 2232, 2232, 2251, 2252, 2253,
2573 2258, 2262, 2267, 2268, 2270, 2290, 2338, 2338, 2357, 2357,
2574 2372, 2375, 2378, 2381, 2385, 2386, 2387, 2388, 2389, 2390,
2575 2392, 2403, 2406, 2406, 2437, 2437, 2462, 2462, 2478, 2479,
2576 2480, 2481, 2489, 2498, 2498, 2547, 2551, 2562, 2572, 2589,
2577 2590, 2591, 2593, 2594, 2596, 2596, 2598, 2598, 2621, 2635,
2578 2651, 2652, 2653, 2654, 2661, 2662, 2663, 2664, 2665, 2666,
2579 2667, 2668, 2669, 2670, 2674, 2675, 2677, 2678, 2680, 2681,
2580 2685, 2683, 2691, 2689, 2698, 2699, 2700, 2701, 2702, 2703,
2581 2704, 2705, 2707, 2713, 2714, 2715, 2716, 2717, 2718, 2721,
2582 2753, 2753, 2755, 2755, 2757, 2758, 2760, 2845, 2846, 2848,
2583 2849, 2850, 2851, 2852, 2854, 2855, 2856, 2857, 2869, 2873,
2584 2879, 2885, 2893, 2898, 2904, 2912, 2920, 2921, 2922, 2925,
2585 2924, 2941, 2942, 2944, 2943, 2967, 2986, 3000, 3001, 3003,
2586 3004, 3006, 3007, 3008, 3017, 3018, 3022, 3023, 3025, 3026,
2587 3027, 3029, 3033, 3034, 3039, 3040, 3076, 3122, 3143, 3164,
2588 3167, 3174, 3175, 3176, 3182, 3188, 3189, 3190, 3191, 3192,
2589 3194, 3196, 3213, 3218, 3221, 3224, 3227, 3230, 3233, 3236,
2590 3239, 3242, 3246, 3249, 3252, 3255, 3258, 3261, 3264, 3267,
2591 3271, 3282, 3300, 3305, 3310, 3315, 3320, 3325, 3329, 3333,
2592 3338, 3342, 3346, 3355, 3364, 3374, 3379, 3391, 3397, 3402,
2593 3408, 3414, 3418, 3420, 3431, 3440, 3447, 3448, 3450, 3456,
2594 3465, 3472, 3484, 3490, 3496, 3502, 3508, 3514, 3520, 3526,
2595 3539, 3550, 3557, 3570, 3597, 3611, 3625, 3639, 3654, 3661,
2596 3668, 3675, 3682, 3697, 3754, 3863, 3870, 3877, 3884, 3908
2600 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
2601 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
2602 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
2603 static const char *const yytname[] =
2605 "$end", "error", "$undefined", "T_IDENTIFIER", "T_NAMESPACE",
2606 "T_STRING", "T_REGEXP", "T_EMPTY", "T_INT", "T_UINT", "T_BYTE",
2607 "T_SHORT", "T_FLOAT", "\"for\"", "\"while\"", "\"do\"", "\"switch\"",
2608 "\"implements\"", "\"namespace\"", "\"package\"", "\"protected\"",
2609 "\"public\"", "\"private\"", "\"use\"", "\"internal\"", "\"new\"",
2610 "\"native\"", "\"function\"", "\"finally\"", "\"undefined\"",
2611 "\"continue\"", "\"class\"", "\"const\"", "\"catch\"", "\"case\"",
2612 "\"set\"", "\"void\"", "\"throw\"", "\"static\"", "\"with\"",
2613 "\"instanceof\"", "\"import\"", "\"return\"", "\"typeof\"",
2614 "\"interface\"", "\"null\"", "\"var\"", "\"dynamic\"", "\"override\"",
2615 "\"final\"", "\"each\"", "\"get\"", "\"try\"", "\"super\"",
2616 "\"extends\"", "\"false\"", "\"true\"", "\"Boolean\"", "\"uint\"",
2617 "\"int\"", "\"Number\"", "\"String\"", "\"default\"", "\"delete\"",
2618 "\"if\"", "\"else\"", "\"break\"", "\"is\"", "\"in\"", "\"as\"",
2619 "\"{ (dictionary)\"", "\"==\"", "\"===\"", "\"!=\"", "\"!==\"", "\"<=\"",
2620 "\">=\"", "\"|=\"", "\"/=\"", "\"%=\"", "\"*=\"", "\"+=\"", "\"-=\"",
2621 "\"^=\"", "\">>=\"", "\"<<=\"", "\">>>=\"", "\"||\"", "\"&&\"", "\"::\"",
2622 "\"--\"", "\"++\"", "\"..\"", "\"...\"", "\"<<\"", "\">>>\"", "\">>\"",
2623 "prec_none", "below_semicolon", "';'", "','", "below_assignment", "'='",
2624 "\"&=\"", "'?'", "':'", "'|'", "'^'", "'&'", "'<'", "'>'", "below_minus",
2625 "'-'", "'+'", "'/'", "'*'", "'%'", "'~'", "'!'", "minusminus_prefix",
2626 "plusplus_prefix", "below_curly", "'('", "new2", "'['", "']'", "'{'",
2627 "'.'", "'@'", "above_identifier", "below_else", "above_function", "'}'",
2628 "')'", "$accept", "PROGRAM", "MAYBE_PROGRAM_CODE_LIST",
2629 "PROGRAM_CODE_LIST", "PROGRAM_CODE", "MAYBE_INPACKAGE_CODE_LIST",
2630 "INPACKAGE_CODE_LIST", "INPACKAGE_CODE", "MAYBECODE", "CODE",
2631 "CODE_STATEMENT", "CODEPIECE", "CODEBLOCK", "PACKAGE_INITCODE",
2632 "CONDITIONAL_COMPILATION", "MAYBEEXPRESSION", "VARIABLE_DECLARATION",
2633 "VARIABLE_LIST", "ONE_VARIABLE", "MAYBEELSE", "IF", "$@1", "FOR_INIT",
2634 "FOR_IN_INIT", "FOR_START", "FOR", "FOR_IN", "WHILE", "$@2", "DO_WHILE",
2635 "$@3", "BREAK", "CONTINUE", "MAYBE_CASE_LIST", "CASE_LIST", "CASE",
2636 "DEFAULT", "SWITCH", "$@4", "CATCH", "$@5", "FINALLY", "$@6",
2637 "CATCH_LIST", "CATCH_FINALLY_LIST", "TRY", "$@7", "THROW", "WITH_HEAD",
2638 "WITH", "X_IDENTIFIER", "PACKAGE", "PACKAGE_DECLARATION", "$@8", "$@9",
2639 "IMPORT", "MAYBE_MODIFIERS", "MODIFIER_LIST", "MODIFIER", "EXTENDS",
2640 "EXTENDS_LIST", "IMPLEMENTS_LIST", "CLASS_DECLARATION", "$@10",
2641 "INTERFACE_DECLARATION", "$@11", "MAYBE_CLASS_BODY", "CLASS_BODY",
2642 "CLASS_BODY_ITEM", "MAYBE_INTERFACE_BODY", "INTERFACE_BODY",
2643 "IDECLARATION", "VARCONST", "SLOT_DECLARATION", "$@12", "SLOT_LIST",
2644 "ONE_SLOT", "MAYBESTATICCONSTANT", "STATICCONSTANT", "MAYBE_PARAM_LIST",
2645 "PARAM_LIST", "PARAM", "GETSET", "FUNCTION_DECLARATION", "$@13",
2646 "MAYBE_IDENTIFIER", "INNERFUNCTION", "$@14", "CLASS", "PACKAGEANDCLASS",
2647 "CLASS_SPEC", "CLASS_SPEC_LIST", "TYPE", "MAYBETYPE",
2648 "MAYBE_PARAM_VALUES", "MAYBE_EXPRESSION_LIST", "EXPRESSION_LIST",
2649 "EXPRESSION_LIST_AND_COMMA", "XX", "NEW", "FUNCTIONCALL", "DELETE",
2650 "RETURN", "NONCOMMAEXPRESSION", "EXPRESSION", "VOIDEXPRESSION", "E",
2651 "CONSTANT", "MAYBE_EXPRPAIR_LIST", "EXPRPAIR_LIST", "VAR_READ",
2652 "NAMESPACE_ID", "NAMESPACE_DECLARATION", "USE_NAMESPACE", 0
2657 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
2659 static const yytype_uint16 yytoknum[] =
2661 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
2662 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
2663 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
2664 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
2665 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
2666 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
2667 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
2668 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
2669 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
2670 345, 346, 347, 348, 349, 350, 351, 352, 353, 59,
2671 44, 354, 61, 355, 63, 58, 124, 94, 38, 60,
2672 62, 356, 45, 43, 47, 42, 37, 126, 33, 357,
2673 358, 359, 40, 360, 91, 93, 123, 46, 64, 361,
2678 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
2679 static const yytype_uint8 yyr1[] =
2681 0, 134, 135, 136, 136, 137, 137, 138, 138, 138,
2682 138, 138, 138, 138, 138, 139, 139, 140, 140, 141,
2683 141, 141, 141, 141, 141, 141, 142, 142, 143, 143,
2684 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
2685 144, 144, 144, 144, 145, 145, 145, 145, 145, 145,
2686 145, 145, 146, 146, 147, 148, 149, 149, 150, 150,
2687 151, 151, 152, 153, 153, 155, 154, 156, 156, 156,
2688 157, 157, 158, 158, 159, 160, 162, 161, 164, 163,
2689 165, 165, 166, 166, 167, 167, 167, 167, 168, 168,
2690 169, 170, 172, 171, 174, 173, 176, 175, 177, 177,
2691 178, 178, 178, 180, 179, 181, 181, 182, 183, 184,
2692 184, 184, 185, 185, 187, 186, 188, 186, 189, 189,
2693 190, 190, 191, 191, 192, 192, 192, 192, 192, 192,
2694 192, 192, 192, 192, 193, 193, 194, 194, 195, 195,
2695 197, 196, 199, 198, 200, 200, 201, 201, 202, 202,
2696 202, 202, 202, 203, 203, 204, 204, 205, 205, 205,
2697 206, 206, 208, 207, 209, 209, 210, 211, 211, 212,
2698 212, 212, 212, 212, 212, 212, 212, 212, 213, 213,
2699 213, 213, 214, 214, 215, 215, 216, 216, 216, 218,
2700 217, 219, 219, 221, 220, 222, 223, 224, 224, 225,
2701 225, 226, 226, 226, 227, 227, 228, 228, 229, 229,
2702 229, 230, 231, 230, 232, 233, 234, 234, 235, 236,
2703 236, 237, 238, 238, 239, 240, 240, 240, 240, 240,
2704 240, 240, 241, 241, 241, 241, 241, 241, 241, 241,
2705 241, 241, 240, 240, 240, 240, 240, 240, 240, 240,
2706 240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
2707 240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
2708 240, 240, 240, 240, 240, 240, 242, 242, 243, 243,
2709 240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
2710 240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
2711 240, 240, 240, 240, 244, 245, 245, 245, 246, 247
2714 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
2715 static const yytype_uint8 yyr2[] =
2717 0, 2, 1, 0, 1, 1, 2, 1, 1, 1,
2718 1, 1, 1, 4, 1, 0, 1, 1, 2, 1,
2719 1, 1, 1, 1, 4, 1, 1, 0, 2, 1,
2720 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2721 1, 1, 3, 2, 1, 1, 1, 1, 1, 1,
2722 1, 4, 2, 1, 1, 3, 2, 0, 2, 2,
2723 1, 3, 3, 0, 2, 0, 7, 0, 1, 1,
2724 3, 1, 2, 3, 8, 6, 0, 6, 0, 7,
2725 1, 2, 1, 2, 0, 1, 1, 2, 1, 2,
2726 4, 3, 0, 8, 0, 9, 0, 5, 1, 2,
2727 1, 2, 1, 0, 6, 2, 1, 4, 2, 1,
2728 1, 1, 3, 1, 0, 6, 0, 5, 2, 4,
2729 0, 1, 1, 2, 1, 1, 1, 1, 1, 1,
2730 1, 1, 1, 1, 0, 2, 0, 2, 0, 2,
2731 0, 9, 0, 8, 0, 1, 1, 2, 1, 4,
2732 1, 1, 1, 0, 1, 1, 2, 1, 2, 8,
2733 1, 1, 0, 4, 1, 3, 3, 0, 2, 1,
2734 1, 1, 1, 1, 1, 1, 1, 1, 0, 1,
2735 2, 4, 3, 1, 4, 2, 1, 1, 0, 0,
2736 12, 1, 0, 0, 10, 1, 3, 1, 1, 1,
2737 3, 1, 1, 1, 2, 0, 0, 3, 0, 1,
2738 1, 1, 2, 2, 0, 4, 4, 4, 2, 1,
2739 2, 1, 1, 3, 1, 1, 1, 1, 1, 1,
2740 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2741 1, 1, 3, 3, 3, 3, 3, 3, 3, 3,
2742 3, 3, 2, 2, 3, 3, 3, 3, 3, 3,
2743 3, 3, 3, 3, 3, 3, 3, 3, 3, 4,
2744 2, 1, 3, 2, 4, 3, 0, 1, 3, 5,
2745 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
2746 3, 3, 5, 2, 2, 2, 2, 3, 2, 4,
2747 5, 3, 5, 3, 1, 2, 4, 4, 2, 3
2750 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
2751 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
2752 means the default is an error. */
2753 static const yytype_uint16 yydefact[] =
2755 120, 304, 133, 237, 231, 234, 235, 232, 233, 236,
2756 0, 0, 78, 0, 0, 126, 124, 125, 0, 132,
2757 0, 131, 192, 238, 271, 127, 0, 0, 0, 241,
2758 128, 130, 129, 0, 0, 240, 239, 0, 0, 276,
2759 0, 0, 14, 0, 0, 0, 0, 208, 120, 0,
2760 0, 2, 120, 5, 54, 12, 0, 36, 67, 31,
2761 32, 33, 34, 35, 38, 120, 37, 7, 30, 0,
2762 121, 122, 9, 8, 11, 10, 225, 228, 230, 229,
2763 224, 39, 222, 226, 227, 41, 40, 0, 0, 72,
2764 76, 120, 92, 109, 111, 110, 116, 113, 0, 0,
2765 304, 214, 191, 0, 270, 0, 0, 118, 0, 103,
2766 208, 0, 218, 65, 0, 221, 0, 277, 296, 295,
2767 273, 253, 252, 0, 0, 209, 210, 211, 82, 0,
2768 106, 219, 0, 80, 44, 43, 120, 45, 29, 0,
2769 46, 47, 48, 50, 0, 49, 298, 1, 6, 120,
2770 304, 0, 68, 0, 0, 69, 53, 108, 0, 188,
2771 0, 161, 0, 160, 162, 308, 123, 0, 0, 0,
2772 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2773 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2774 294, 293, 0, 0, 0, 0, 0, 0, 0, 0,
2775 0, 0, 0, 0, 0, 0, 0, 0, 208, 0,
2776 0, 55, 73, 0, 0, 0, 120, 114, 0, 195,
2777 0, 198, 197, 309, 206, 178, 0, 0, 0, 27,
2778 0, 297, 0, 0, 280, 0, 272, 275, 212, 213,
2779 83, 205, 59, 60, 105, 220, 58, 81, 42, 28,
2780 120, 0, 205, 0, 0, 52, 305, 187, 186, 0,
2781 134, 136, 0, 223, 267, 268, 265, 266, 246, 247,
2782 249, 248, 244, 245, 287, 286, 282, 281, 289, 290,
2783 288, 284, 283, 285, 250, 251, 301, 259, 258, 257,
2784 291, 0, 256, 255, 254, 242, 243, 263, 262, 260,
2785 264, 261, 0, 0, 303, 0, 0, 0, 0, 0,
2786 25, 0, 120, 17, 23, 0, 20, 19, 22, 21,
2787 120, 112, 0, 208, 215, 167, 0, 0, 179, 183,
2788 107, 119, 196, 269, 0, 26, 217, 0, 278, 0,
2789 0, 57, 0, 120, 13, 57, 0, 0, 0, 0,
2790 0, 138, 0, 0, 205, 163, 164, 0, 216, 274,
2791 0, 0, 299, 120, 0, 0, 117, 18, 120, 0,
2792 0, 0, 0, 185, 180, 205, 0, 0, 120, 0,
2793 203, 202, 201, 204, 0, 62, 61, 51, 0, 120,
2794 306, 307, 178, 135, 0, 0, 199, 137, 142, 57,
2795 0, 292, 300, 302, 77, 0, 84, 0, 115, 207,
2796 177, 173, 170, 171, 169, 172, 176, 175, 174, 168,
2797 167, 0, 0, 182, 0, 0, 98, 102, 100, 104,
2798 63, 279, 56, 0, 75, 0, 139, 140, 0, 120,
2799 166, 165, 79, 0, 0, 0, 85, 88, 86, 24,
2800 184, 193, 181, 96, 0, 99, 101, 120, 66, 120,
2801 205, 120, 200, 0, 157, 0, 0, 120, 155, 0,
2802 27, 93, 89, 87, 27, 27, 205, 64, 74, 0,
2803 148, 152, 0, 0, 0, 120, 146, 150, 151, 158,
2804 188, 143, 156, 27, 91, 0, 0, 0, 189, 120,
2805 141, 147, 0, 90, 194, 97, 94, 27, 0, 0,
2806 0, 0, 149, 178, 27, 190, 0, 0, 205, 95,
2810 /* YYDEFGOTO[NTERM-NUM]. */
2811 static const yytype_int16 yydefgoto[] =
2813 -1, 50, 51, 52, 53, 311, 312, 313, 334, 335,
2814 137, 138, 157, 314, 139, 385, 140, 246, 243, 458,
2815 57, 232, 153, 154, 58, 59, 60, 61, 213, 62,
2816 91, 141, 142, 445, 446, 447, 448, 63, 215, 426,
2817 510, 427, 475, 428, 429, 64, 229, 143, 65, 66,
2818 219, 220, 67, 320, 216, 68, 144, 70, 71, 351,
2819 353, 395, 316, 461, 317, 439, 484, 485, 486, 466,
2820 467, 468, 164, 318, 262, 355, 356, 373, 419, 327,
2821 328, 329, 259, 319, 507, 103, 76, 474, 221, 222,
2822 382, 397, 383, 341, 324, 124, 125, 126, 224, 77,
2823 78, 79, 145, 127, 80, 81, 82, 83, 116, 117,
2827 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
2829 #define YYPACT_NINF -403
2830 static const yytype_int16 yypact[] =
2832 1674, -70, -403, -403, -403, -403, -403, -403, -403, -403,
2833 -15, -72, -403, -52, 19, -403, -403, -403, 80, -403,
2834 2094, -403, 99, -403, 2164, -403, -16, 42, -5, -403,
2835 -403, -403, -403, -1, 5, -403, -403, 2094, 13, 2094,
2836 2094, 2094, -403, 2094, 2094, 2094, 2094, 2094, 634, 123,
2837 128, -403, 504, -403, -403, -403, 8, -403, 2024, -403,
2838 -403, -403, -403, -403, -403, 1926, -403, -403, -403, 240,
2839 361, -403, -403, -403, -403, -403, -403, -403, -403, -403,
2840 38, -403, 2569, -403, -403, -403, -403, 137, 20, -403,
2841 -403, 1926, -403, -403, -403, -403, -403, -403, -87, 42,
2842 -403, -67, -403, 21, -48, 2094, 79, -403, 2094, -403,
2843 2094, 138, -48, -403, 43, 2569, 76, 107, -48, -48,
2844 604, -48, -48, -29, 84, 110, 2094, -403, 210, 211,
2845 2094, 2094, 211, 212, -403, -403, 764, -403, -403, 85,
2846 -403, -403, -403, -403, 209, -403, -403, -403, -403, 1024,
2847 158, 232, -403, 139, 171, -403, 141, -403, 238, 12,
2848 239, -403, 247, -403, -403, -403, -403, 2094, 2094, 2094,
2849 2094, 2094, 2094, 2094, 2094, 2094, 2094, 2094, 2094, 2094,
2850 2094, 2094, 2094, 2094, 2094, 2094, 2094, 2094, 2094, 2094,
2851 -403, -403, 249, 2094, 2094, 2094, 2094, 2094, 2094, 2094,
2852 2094, 2094, 2094, 2094, 2094, 2094, 2094, 2094, 2094, 2094,
2853 11, -403, -403, 2094, 229, 2094, 1154, -403, 42, 133,
2854 135, -403, -403, -403, 142, 15, -10, 90, 2189, 1800,
2855 130, -403, 2094, 2094, -403, 2094, -403, -403, -403, -403,
2856 -403, 161, 169, -403, 38, 38, 169, -403, -403, -403,
2857 1926, 149, 161, 2094, 2094, -403, 168, -403, -403, 280,
2858 231, 233, 286, 2569, 1016, 496, 496, 496, 322, 322,
2859 322, 322, 1016, 1016, 2569, 2569, 2569, 2569, 2569, 2569,
2860 2569, 2569, 2569, 2569, 2630, 2691, -403, 368, 368, 368,
2861 2569, 2386, 2752, 2813, 2874, 1016, 1016, 604, 604, -48,
2862 -48, -48, 157, 2447, 202, 2094, 291, 14, 173, 2260,
2863 -403, 165, 1284, -403, -403, 172, -403, -403, -403, -403,
2864 1154, -403, 42, 2094, -403, -43, 296, 167, 201, -403,
2865 -403, -403, 175, -403, 174, 1800, -403, 44, -403, 200,
2866 63, 207, 211, 894, -403, -27, -11, 46, 113, 189,
2867 42, 298, 42, 190, 161, 217, -403, 2094, -403, -403,
2868 315, 2323, -403, 1926, 2094, 193, -403, -403, 1154, 192,
2869 194, 75, 63, -403, -403, 161, 26, 96, 1926, 2094,
2870 -403, -403, -403, -403, 2094, -403, -403, -403, 2094, 1926,
2871 -403, -403, 15, -403, 42, 199, -403, 230, -403, 207,
2872 286, 2569, -403, -403, -403, 103, 24, 197, -403, -403,
2873 -403, -403, -403, -403, -403, -403, -403, -403, -403, -403,
2874 234, 205, 296, -403, 206, 213, -403, -403, 96, -403,
2875 268, -403, -403, 204, -403, 215, 230, -403, 42, 208,
2876 -403, -403, -403, 2094, 236, 214, 24, -403, -403, -403,
2877 -403, -403, -403, -403, 335, -403, -403, 1926, -403, 1926,
2878 161, 1414, -403, 339, -403, 316, 219, 227, -403, 2508,
2879 1800, -403, -403, -403, 1800, 1800, 161, -403, -403, 223,
2880 -403, -403, 226, 250, 221, 1544, -403, -403, -403, -403,
2881 12, -403, -403, 1800, -403, 222, 224, 225, -403, 1414,
2882 -403, -403, 354, -403, -403, -403, -403, 1800, 228, 241,
2883 235, 243, -403, 15, 1800, -403, 244, 246, 161, -403,
2887 /* YYPGOTO[NTERM-NUM]. */
2888 static const yytype_int16 yypgoto[] =
2890 -403, -403, 218, -403, 312, -299, -403, 61, -402, -31,
2891 1, -55, -85, 48, 2, -23, 321, 251, 58, -403,
2892 -403, -403, -403, -403, -403, -403, -403, -403, -403, -403,
2893 -403, -403, -403, -403, -403, -62, -60, -403, -403, -40,
2894 -403, -36, -403, -403, -403, -403, -403, -403, -403, -403,
2895 6, 50, -403, -403, -403, -403, 0, -403, 331, -403,
2896 -403, -403, 49, -403, 51, -403, -96, -403, -80, -403,
2897 -403, -61, -403, 3, -403, -403, 7, 9, -403, -376,
2898 -403, -311, -79, 4, -403, -403, -403, -403, -403, 388,
2899 -91, 25, 52, -239, -403, -98, -403, -403, -403, -403,
2900 -403, -403, -403, -34, -9, -49, -13, -403, -403, -403,
2901 -403, -403, -403, -403
2904 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
2905 positive, shift that token. If negative, reduce the rule which
2906 number is the opposite. If zero, do what YYDEFACT says.
2907 If YYTABLE_NINF, syntax error. */
2908 #define YYTABLE_NINF -155
2909 static const yytype_int16 yytable[] =
2911 69, 54, 56, 74, 75, 114, 214, 101, 223, 155,
2912 156, 104, 230, 345, 304, 374, 435, 136, 325, 87,
2913 97, 369, 93, 94, 112, 192, 115, 118, 119, 325,
2914 120, 121, 122, 97, 115, 88, 156, 123, 95, 217,
2915 218, -70, 190, 191, 192, 93, 94, 257, 55, 72,
2916 90, 73, 69, 54, 56, 74, 75, 209, 443, 371,
2917 210, 95, 372, 258, 98, 423, 93, 94, 494, 407,
2918 92, 167, 495, 496, 208, 384, 209, 106, 410, 210,
2919 411, 249, 95, 412, 413, 414, 444, 415, 388, 167,
2920 167, 503, 239, 93, 94, 228, 226, 115, 99, 380,
2921 55, 72, 102, 73, 236, 511, 105, 89, 326, 95,
2922 302, 452, 517, 115, 167, 399, 390, 108, 391, 422,
2923 416, 244, 245, 330, 424, 109, 146, 110, 147, 425,
2924 417, 418, 111, 305, 149, 113, 421, 516, 167, 306,
2925 211, 231, 212, 225, 167, 96, 167, 363, 233, 69,
2926 54, 56, 74, 75, 263, 264, 265, 266, 267, 268,
2927 269, 270, 271, 272, 273, 274, 275, 276, 277, 278,
2928 279, 280, 281, 282, 283, 284, 285, 378, 381, 389,
2929 287, 288, 289, 290, 291, 292, 293, 294, 295, 296,
2930 297, 298, 299, 300, 301, 115, 303, 55, 72, 338,
2931 73, 339, 309, 167, 307, 331, 227, 235, 234, 237,
2932 238, 250, 2, 240, 241, 247, 69, 54, 315, 343,
2933 115, 479, 115, 337, 321, 370, -71, 158, 15, 16,
2934 17, 2, 19, 332, 21, 252, 442, 497, 253, 254,
2935 255, 256, 260, 308, 346, 347, 25, 15, 16, 17,
2936 261, 19, 286, 21, 463, 30, 31, 32, 158, 393,
2937 -113, 396, 322, 336, 323, 25, 340, 159, 158, 342,
2938 348, 160, 161, 463, 30, 31, 32, 159, 404, 520,
2939 249, 344, 161, 349, 162, 350, 163, 352, 249, 354,
2940 358, 360, 361, 430, 362, 364, 163, 366, 368, 325,
2941 375, 376, -112, 396, 434, 379, 377, 464, 156, 384,
2942 115, 392, 69, 54, 315, 394, 398, 400, 402, 406,
2943 69, 54, 315, 156, 408, 437, 464, 409, 332, 449,
2944 438, 451, 453, 457, 156, 454, 371, 459, 476, 433,
2945 -153, 470, 489, 490, 401, 431, 471, 462, 460, 498,
2946 432, 491, 499, 500, 504, 405, 505, 509, 506, -154,
2947 512, 514, 168, 513, 148, 2, 115, 251, 69, 54,
2948 315, 115, 477, 367, 478, 515, 440, 518, 519, 152,
2949 242, 15, 16, 17, 472, 19, 473, 21, 455, 169,
2950 170, 171, 456, -155, -155, -155, -155, 176, 177, 25,
2951 386, 166, 156, 508, 156, 501, 492, 441, 30, 31,
2952 32, 502, 190, 191, 192, 107, 193, 194, 195, 436,
2953 0, 0, 0, 0, 420, 0, 0, 0, 0, 450,
2954 469, 201, 202, 0, 203, 204, 205, 206, 207, 465,
2955 0, 0, 0, 0, 208, 0, 209, 0, 0, 210,
2956 0, 0, 0, 0, 0, 0, 0, 0, 190, 191,
2957 192, 483, 481, 482, 487, 488, 0, 465, 0, 0,
2958 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2959 203, 204, 205, 206, 207, 483, 481, 482, 487, 488,
2960 208, 0, 209, 0, 0, 210, 0, 0, 0, 483,
2961 481, 482, 487, 488, -4, 0, 0, 1, 2, 3,
2962 4, 0, 5, 6, 7, 8, 9, 10, 11, 12,
2963 13, 0, 0, 14, 15, 16, 17, 18, 19, 20,
2964 21, 0, 0, 23, 0, 0, 168, 0, 0, 0,
2965 24, 0, 25, 26, 0, 27, 0, 28, 0, 29,
2966 0, 30, 31, 32, 0, 0, 33, 34, 0, 35,
2967 36, 0, 0, -155, -155, -155, 0, 37, 38, 0,
2968 0, 176, 177, 0, 39, 0, 0, 0, 0, 0,
2969 0, 0, 0, 0, 0, 0, 190, 191, 192, 0,
2970 193, 194, 195, 0, 40, 41, 0, 0, 0, 0,
2971 0, 0, 0, 42, 0, 201, 202, 0, 203, 204,
2972 205, 206, 207, 0, 0, 0, 43, 0, 208, 0,
2973 209, 44, 45, 210, 0, 0, 46, 0, 47, 0,
2974 48, 0, 49, 0, 0, 0, -4, 1, 2, 3,
2975 4, 0, 5, 6, 7, 8, 9, 10, 11, 12,
2976 13, 0, 0, 0, 15, 16, 17, 18, 19, 20,
2977 21, 22, 0, 23, 128, 0, 129, 0, 0, 0,
2978 24, 130, 25, 26, 0, 27, 131, 28, 0, 29,
2979 132, 30, 31, 32, 0, 0, 33, 34, 0, 35,
2980 36, 0, 0, 0, 190, 191, 192, 37, 38, 0,
2981 133, 0, 0, 0, 39, 0, 0, 0, 0, 0,
2982 0, 0, 0, 0, 0, 0, 0, 0, 205, 206,
2983 207, 0, 0, 0, 40, 41, 208, 0, 209, 0,
2984 0, 210, 0, 134, 0, 0, 0, 0, 0, 0,
2985 0, 0, 0, 0, 0, 0, 43, 0, 0, 0,
2986 0, 44, 45, 0, 0, 0, 46, 0, 47, 0,
2987 48, 0, 49, 0, 0, 0, 135, 1, 2, 3,
2988 4, 0, 5, 6, 7, 8, 9, 10, 11, 12,
2989 13, 0, 0, 0, 15, 16, 17, 18, 19, 20,
2990 21, 22, 0, 23, 128, 0, 129, 0, 0, 0,
2991 24, 130, 25, 26, 0, 27, 131, 28, 0, 29,
2992 132, 30, 31, 32, 0, 0, 33, 34, 0, 35,
2993 36, 0, 0, 0, 0, 0, 0, 37, 38, 0,
2994 133, 0, 0, 0, 39, 0, 0, 0, 0, 0,
2995 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2996 0, 0, 0, 0, 40, 41, 0, 0, 0, 0,
2997 0, 0, 0, 134, 0, 0, 0, 0, 0, 0,
2998 0, 0, 0, 0, 0, 0, 43, 0, 0, 0,
2999 0, 44, 45, 0, 0, 0, 46, 0, 47, 0,
3000 48, 0, 49, 0, 0, 0, 248, 1, 2, 3,
3001 4, 0, 5, 6, 7, 8, 9, 10, 11, 12,
3002 13, 0, 0, 0, 15, 16, 17, 18, 19, 20,
3003 21, 22, 0, 23, 128, 0, 129, 0, 0, 0,
3004 24, 130, 25, 26, 0, 27, 131, 28, 0, 29,
3005 132, 30, 31, 32, 0, 0, 33, 34, 0, 35,
3006 36, 0, 0, 0, 0, 0, 0, 37, 38, 0,
3007 133, 0, 0, 0, 39, 0, 0, 0, 0, 0,
3008 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3009 0, 0, 0, 0, 40, 41, 0, 0, 0, 0,
3010 0, 0, 0, 134, 0, 0, 0, 0, 0, 0,
3011 0, 0, 0, 0, 0, 0, 43, 0, 0, 0,
3012 0, 44, 45, 0, 0, 0, 46, 0, 47, 0,
3013 48, 0, 49, 0, 0, 0, 387, 1, 2, 3,
3014 4, 0, 5, 6, 7, 8, 9, 10, 11, 12,
3015 13, 0, 0, 14, 15, 16, 17, 18, 19, 20,
3016 21, 0, 0, 23, 0, 0, -155, 0, 0, 0,
3017 24, 0, 25, 26, 0, 27, 0, 28, 0, 29,
3018 0, 30, 31, 32, 0, 0, 33, 34, 0, 35,
3019 36, 0, 0, 0, 0, 0, 0, 37, 38, 0,
3020 0, -155, -155, 0, 39, 0, 0, 0, 0, 0,
3021 0, 0, 0, 0, 0, 0, 190, 191, 192, 0,
3022 193, 194, 195, 0, 40, 41, 0, 0, 0, 0,
3023 0, 0, 0, 42, 0, -155, -155, 0, 203, 204,
3024 205, 206, 207, 0, 0, 0, 43, 0, 208, 0,
3025 209, 44, 45, 210, 0, 0, 46, 0, 47, 0,
3026 48, 0, 49, 0, 0, 0, -3, 1, 2, 3,
3027 4, 0, 5, 6, 7, 8, 9, 10, 11, 12,
3028 13, 0, 0, 0, 15, 16, 17, 18, 19, 20,
3029 21, 0, 0, 23, 0, 0, 0, 0, 0, 0,
3030 24, 0, 25, 26, 0, 27, 0, 28, 0, 29,
3031 0, 30, 31, 32, 0, 0, 33, 34, 0, 35,
3032 36, 0, 0, 0, 0, 0, 0, 37, 38, 0,
3033 0, 0, 0, 0, 39, 0, 0, 0, 0, 0,
3034 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3035 0, 0, 0, 0, 40, 41, 0, 0, 0, 0,
3036 0, 0, 0, 310, 0, 0, 0, 0, 0, 0,
3037 0, 0, 0, 0, 0, 0, 43, 0, 0, 0,
3038 0, 44, 45, 0, 0, 0, 46, 0, 47, 0,
3039 48, 0, 49, 0, 0, 0, -15, 1, 2, 3,
3040 4, 0, 5, 6, 7, 8, 9, 10, 11, 12,
3041 13, 0, 0, 0, 15, 16, 17, 18, 19, 20,
3042 21, 0, 0, 23, 0, 0, 0, 0, 0, 0,
3043 24, 0, 25, 26, 0, 27, 0, 28, 0, 29,
3044 0, 30, 31, 32, 0, 0, 33, 34, 0, 35,
3045 36, 0, 0, 0, 0, 0, 0, 37, 38, 0,
3046 0, 0, 0, 0, 39, 0, 0, 0, 0, 0,
3047 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3048 0, 0, 0, 0, 40, 41, 0, 0, 0, 0,
3049 0, 0, 0, 310, 0, 0, 0, 0, 0, 0,
3050 0, 0, 0, 0, 0, 0, 43, 0, 0, 0,
3051 0, 44, 45, 0, 0, 0, 46, 0, 47, 0,
3052 48, 0, 49, 0, 0, 0, -16, 1, 2, 3,
3053 4, 0, 5, 6, 7, 8, 9, 10, 11, 12,
3054 13, 0, 0, 0, 15, 16, 17, 18, 19, 20,
3055 21, 0, 0, 23, 0, 0, 0, 0, 0, 0,
3056 24, 0, 25, 26, 0, 27, 0, 28, 0, 29,
3057 0, 30, 31, 32, 0, 0, 33, 34, 0, 35,
3058 36, 0, 0, 0, 0, 0, 0, 37, 38, 0,
3059 0, 0, 0, 0, 39, 0, 0, 0, 0, 0,
3060 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3061 0, 0, 0, 0, 40, 41, 0, 0, 0, 0,
3062 0, 0, 0, 480, 0, 0, 0, 0, 0, 0,
3063 0, 0, 0, 0, 0, 0, 43, 0, 0, 0,
3064 0, 44, 45, 0, 0, 0, 46, 0, 47, 0,
3065 48, 0, 49, 0, 0, 0, -144, 1, 2, 3,
3066 4, 0, 5, 6, 7, 8, 9, 10, 11, 12,
3067 13, 0, 0, 0, 15, 16, 17, 18, 19, 20,
3068 21, 0, 0, 23, 0, 0, 0, 0, 0, 0,
3069 24, 0, 25, 26, 0, 27, 0, 28, 0, 29,
3070 0, 30, 31, 32, 0, 0, 33, 34, 0, 35,
3071 36, 0, 0, 0, 0, 0, 0, 37, 38, 0,
3072 0, 0, 0, 0, 39, 0, 0, 0, 0, 0,
3073 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3074 0, 0, 0, 0, 40, 41, 0, 0, 0, 0,
3075 0, 0, 0, 480, 0, 0, 0, 0, 0, 0,
3076 0, 0, 0, 0, 0, 0, 43, 0, 0, 0,
3077 0, 44, 45, 0, 0, 0, 46, 0, 47, 0,
3078 48, 0, 49, 0, -3, 0, -145, 1, 2, 3,
3079 4, 0, 5, 6, 7, 8, 9, 10, 11, 12,
3080 13, 0, 0, 14, 15, 16, 17, 18, 19, 20,
3081 21, 0, 0, 23, 0, 0, 0, 0, 0, 0,
3082 24, 0, 25, 26, 0, 27, 0, 28, 0, 29,
3083 0, 30, 31, 32, 0, 0, 33, 34, 0, 35,
3084 36, 0, 0, 0, 0, 0, 0, 37, 38, 0,
3085 0, 0, 0, 0, 39, 0, 0, 0, 0, 0,
3086 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3087 0, 0, 0, 0, 40, 41, 0, 0, 0, 0,
3088 0, 0, 0, 42, 0, 0, 0, 0, 0, 0,
3089 0, 0, 0, 0, 0, 0, 43, 0, 0, 0,
3090 0, 44, 45, 0, 0, 0, 46, 0, 47, 0,
3091 48, 0, 49, 1, 2, 3, 4, 0, 5, 6,
3092 7, 8, 9, 10, 11, 12, 13, 0, -120, 0,
3093 15, 16, 17, 18, 19, 20, 21, 22, 0, 23,
3094 128, 0, 129, 0, 0, 0, 24, 130, 25, 26,
3095 0, 27, 131, 28, 0, 29, 132, 30, 31, 32,
3096 0, 0, 33, 34, 0, 35, 36, 0, 0, 0,
3097 0, 0, 0, 37, 38, 0, 133, 0, 0, 0,
3098 39, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3099 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3100 40, 41, 0, 0, 0, 0, 0, 0, 0, 134,
3101 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3102 0, 0, 43, 0, 0, 0, 0, 44, 45, 0,
3103 0, 0, 46, 0, 47, 0, 48, 0, 49, 1,
3104 2, 3, 4, 0, 5, 6, 7, 8, 9, 10,
3105 11, 12, 13, 0, 0, 0, 15, 16, 17, 18,
3106 19, 20, 21, 22, 0, 23, 128, 0, 129, 0,
3107 0, 0, 24, 130, 25, 26, 0, 27, 131, 28,
3108 0, 29, 132, 30, 31, 32, 0, 0, 33, 34,
3109 0, 35, 36, 0, 0, 0, 0, 0, 0, 37,
3110 38, 0, 133, 0, 0, 0, 39, 0, 0, 0,
3111 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3112 0, 0, 0, 0, 0, 0, 40, 41, 0, 0,
3113 0, 0, 0, 0, 0, 134, 0, 150, 0, 3,
3114 4, 0, 5, 6, 7, 8, 9, 0, 43, 0,
3115 0, 0, 0, 44, 45, 0, 0, 0, 46, 20,
3116 47, 22, 48, 23, 49, 0, 129, 0, 0, 0,
3117 24, 0, 0, 0, 0, 0, 0, 28, 0, 29,
3118 151, 0, 0, 0, 0, 0, 0, 34, 0, 35,
3119 36, 0, 0, 0, 0, 0, 0, 37, 0, 0,
3120 0, 0, 0, 0, 39, 0, 0, 100, 0, 3,
3121 4, 0, 5, 6, 7, 8, 9, 0, 0, 0,
3122 0, 0, 0, 0, 40, 41, 0, 0, 0, 20,
3123 0, 22, 0, 23, 0, 0, 0, 0, 0, 0,
3124 24, 0, 0, 0, 0, 0, 43, 28, 0, 29,
3125 0, 44, 45, 0, 0, 0, 46, 34, 47, 35,
3126 36, 0, 49, 0, 0, 0, 0, 37, 0, 0,
3127 0, 0, 0, 0, 39, 0, 0, 100, 0, 3,
3128 4, 0, 5, 6, 7, 8, 9, 0, 0, 0,
3129 0, 0, 0, 0, 40, 41, 0, 0, 0, 20,
3130 0, 22, 0, 23, 0, 0, 0, 0, 0, 0,
3131 0, 0, 0, 0, 0, 0, 43, 0, 0, 29,
3132 0, 44, 45, 0, 0, 0, 46, 34, 47, 35,
3133 36, 0, 49, 0, 0, 0, 0, 0, 0, 168,
3134 0, 0, 0, 0, 39, 0, 0, 0, 0, 0,
3135 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3136 0, 0, 0, 0, 40, 41, 169, 170, 171, 0,
3137 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
3138 182, 183, 184, 185, 186, 187, 188, 189, 0, 190,
3139 191, 192, 0, 193, 194, 195, 46, 0, 47, 0,
3140 0, 196, 49, 197, 0, 198, 199, 200, 201, 202,
3141 168, 203, 204, 205, 206, 207, 0, 0, 0, 0,
3142 0, 208, 0, 209, 0, 0, 210, 0, 0, 0,
3143 0, 0, 333, 0, 0, 0, 0, 169, 170, 171,
3144 0, 172, 173, 174, 175, 176, 177, 178, 179, 180,
3145 181, 182, 183, 184, 185, 186, 187, 188, 189, 0,
3146 190, 191, 192, 0, 193, 194, 195, 0, 0, 0,
3147 0, 0, 196, 168, 197, 0, 198, 199, 200, 201,
3148 202, 0, 203, 204, 205, 206, 207, 0, 0, 0,
3149 0, 0, 208, 0, 209, 0, 0, 210, 0, 0,
3150 169, 170, 171, 365, 172, 173, 174, 175, 176, 177,
3151 178, 179, 180, 181, 182, 183, 184, 185, 186, 187,
3152 188, 189, 0, 190, 191, 192, 0, 193, 194, 195,
3153 0, 0, 0, 0, 0, 196, 168, 197, 0, 198,
3154 199, 200, 201, 202, 0, 203, 204, 205, 206, 207,
3155 0, 0, 0, 0, 0, 208, 0, 209, 0, 0,
3156 210, 0, 0, 169, 170, 171, 403, 172, 173, 174,
3157 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
3158 185, 186, 187, 188, 189, 0, 190, 191, 192, 0,
3159 193, 194, 195, 0, 0, 0, 0, 168, 196, 0,
3160 197, 357, 198, 199, 200, 201, 202, 0, 203, 204,
3161 205, 206, 207, 0, 0, 0, 0, 0, 208, 0,
3162 209, 0, 0, 210, 169, 170, 171, 0, 172, 173,
3163 174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
3164 184, 185, 186, 187, 188, 189, 0, 190, 191, 192,
3165 0, 193, 194, 195, 0, 0, 0, 0, 168, 196,
3166 0, 197, 0, 198, 199, 200, 201, 202, 0, 203,
3167 204, 205, 206, 207, 0, 0, 0, 0, 0, 208,
3168 0, 209, 359, 0, 210, 169, 170, 171, 0, 172,
3169 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
3170 183, 184, 185, 186, 187, 188, 189, 0, 190, 191,
3171 192, 0, 193, 194, 195, 0, 0, 0, 0, 168,
3172 196, 0, 197, 493, 198, 199, 200, 201, 202, 0,
3173 203, 204, 205, 206, 207, 0, 0, 0, 0, 0,
3174 208, 0, 209, 0, 0, 210, 169, 170, 171, 0,
3175 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
3176 182, 183, 184, 185, 186, 187, 188, 189, 0, 190,
3177 191, 192, 0, 193, 194, 195, 0, 0, 0, 0,
3178 168, 196, 0, 197, 0, 198, 199, 200, 201, 202,
3179 0, 203, 204, 205, 206, 207, 0, 0, 0, 0,
3180 0, 208, 0, 209, 0, 0, 210, 169, 170, 171,
3181 0, 172, 173, 174, 175, 176, 177, 0, 0, 0,
3182 0, 0, 0, 0, 0, 0, 0, 0, 189, 0,
3183 190, 191, 192, 0, 193, 194, 195, 0, 0, 0,
3184 0, 168, 0, 0, 0, 0, 198, 199, 200, 201,
3185 202, 0, 203, 204, 205, 206, 207, 0, 0, 0,
3186 0, 0, 208, 0, 209, 0, 0, 210, 169, 170,
3187 171, 0, 172, 173, 174, 175, 176, 177, 0, 0,
3188 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3189 0, 190, 191, 192, 0, 193, 194, 195, 0, 0,
3190 0, 0, 168, 0, 0, 0, 0, 198, 199, 200,
3191 201, 202, 0, 203, 204, 205, 206, 207, 0, 0,
3192 0, 0, 0, 208, 0, 209, 0, 0, 210, 169,
3193 170, 171, 0, 172, 173, 174, 175, 176, 177, 0,
3194 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3195 0, 0, 190, 191, 192, 0, 193, 194, 195, 0,
3196 0, 0, 0, 168, 0, 0, 0, 0, 0, 199,
3197 200, 201, 202, 0, 203, 204, 205, 206, 207, 0,
3198 0, 0, 0, 0, 208, 0, 209, 0, 0, 210,
3199 169, 170, 171, 0, 172, 173, 174, 175, 176, 177,
3200 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3201 0, 0, 0, 190, 191, 192, 0, 193, 194, 195,
3202 0, 0, 0, 0, 168, 0, 0, 0, 0, 0,
3203 0, 200, 201, 202, 0, 203, 204, 205, 206, 207,
3204 0, 0, 0, 0, 0, 208, 0, 209, 0, 0,
3205 210, 169, 170, 171, 0, 172, 173, 174, 175, 176,
3206 177, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3207 0, 0, 0, 0, 190, 191, 192, 0, 193, 194,
3208 195, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3209 0, 0, -155, 201, 202, 0, 203, 204, 205, 206,
3210 207, 0, 0, 0, 0, 0, 208, 0, 209, 0,
3214 static const yytype_int16 yycheck[] =
3216 0, 0, 0, 0, 0, 39, 91, 20, 99, 58,
3217 65, 24, 110, 252, 3, 326, 392, 48, 3, 89,
3218 14, 320, 3, 4, 37, 92, 39, 40, 41, 3,
3219 43, 44, 45, 27, 47, 50, 91, 46, 19, 126,
3220 127, 68, 90, 91, 92, 3, 4, 35, 0, 0,
3221 122, 0, 52, 52, 52, 52, 52, 124, 34, 102,
3222 127, 19, 105, 51, 14, 376, 3, 4, 470, 368,
3223 122, 100, 474, 475, 122, 102, 124, 27, 3, 127,
3224 5, 136, 19, 8, 9, 10, 62, 12, 99, 100,
3225 100, 493, 126, 3, 4, 108, 105, 110, 18, 36,
3226 52, 52, 3, 52, 133, 507, 122, 122, 93, 19,
3227 208, 422, 514, 126, 100, 354, 3, 122, 5, 93,
3228 45, 130, 131, 133, 28, 126, 3, 122, 0, 33,
3229 55, 56, 127, 122, 126, 122, 375, 513, 100, 128,
3230 3, 3, 122, 122, 100, 126, 100, 133, 105, 149,
3231 149, 149, 149, 149, 167, 168, 169, 170, 171, 172,
3232 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
3233 183, 184, 185, 186, 187, 188, 189, 133, 115, 133,
3234 193, 194, 195, 196, 197, 198, 199, 200, 201, 202,
3235 203, 204, 205, 206, 207, 208, 209, 149, 149, 233,
3236 149, 235, 215, 100, 213, 115, 127, 100, 132, 125,
3237 100, 126, 4, 3, 3, 3, 216, 216, 216, 250,
3238 233, 460, 235, 232, 218, 323, 68, 18, 20, 21,
3239 22, 4, 24, 227, 26, 3, 133, 476, 99, 68,
3240 99, 3, 3, 14, 253, 254, 38, 20, 21, 22,
3241 3, 24, 3, 26, 46, 47, 48, 49, 18, 350,
3242 127, 352, 127, 133, 122, 38, 105, 27, 18, 100,
3243 102, 31, 32, 46, 47, 48, 49, 27, 363, 518,
3244 335, 132, 32, 3, 44, 54, 46, 54, 343, 3,
3245 133, 89, 305, 378, 3, 122, 46, 132, 126, 3,
3246 133, 100, 127, 394, 389, 105, 132, 99, 363, 102,
3247 323, 122, 312, 312, 312, 17, 126, 100, 3, 126,
3248 320, 320, 320, 378, 132, 126, 99, 133, 322, 132,
3249 100, 126, 126, 65, 389, 122, 102, 133, 3, 388,
3250 132, 105, 3, 27, 357, 379, 132, 438, 133, 126,
3251 384, 132, 126, 132, 132, 364, 132, 3, 133, 132,
3252 132, 126, 40, 122, 52, 4, 379, 149, 368, 368,
3253 368, 384, 457, 312, 459, 132, 399, 133, 132, 58,
3254 129, 20, 21, 22, 446, 24, 446, 26, 428, 67,
3255 68, 69, 428, 71, 72, 73, 74, 75, 76, 38,
3256 342, 70, 457, 499, 459, 485, 467, 400, 47, 48,
3257 49, 490, 90, 91, 92, 27, 94, 95, 96, 394,
3258 -1, -1, -1, -1, 372, -1, -1, -1, -1, 420,
3259 443, 109, 110, -1, 112, 113, 114, 115, 116, 439,
3260 -1, -1, -1, -1, 122, -1, 124, -1, -1, 127,
3261 -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
3262 92, 461, 461, 461, 461, 461, -1, 467, -1, -1,
3263 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3264 112, 113, 114, 115, 116, 485, 485, 485, 485, 485,
3265 122, -1, 124, -1, -1, 127, -1, -1, -1, 499,
3266 499, 499, 499, 499, 0, -1, -1, 3, 4, 5,
3267 6, -1, 8, 9, 10, 11, 12, 13, 14, 15,
3268 16, -1, -1, 19, 20, 21, 22, 23, 24, 25,
3269 26, -1, -1, 29, -1, -1, 40, -1, -1, -1,
3270 36, -1, 38, 39, -1, 41, -1, 43, -1, 45,
3271 -1, 47, 48, 49, -1, -1, 52, 53, -1, 55,
3272 56, -1, -1, 67, 68, 69, -1, 63, 64, -1,
3273 -1, 75, 76, -1, 70, -1, -1, -1, -1, -1,
3274 -1, -1, -1, -1, -1, -1, 90, 91, 92, -1,
3275 94, 95, 96, -1, 90, 91, -1, -1, -1, -1,
3276 -1, -1, -1, 99, -1, 109, 110, -1, 112, 113,
3277 114, 115, 116, -1, -1, -1, 112, -1, 122, -1,
3278 124, 117, 118, 127, -1, -1, 122, -1, 124, -1,
3279 126, -1, 128, -1, -1, -1, 132, 3, 4, 5,
3280 6, -1, 8, 9, 10, 11, 12, 13, 14, 15,
3281 16, -1, -1, -1, 20, 21, 22, 23, 24, 25,
3282 26, 27, -1, 29, 30, -1, 32, -1, -1, -1,
3283 36, 37, 38, 39, -1, 41, 42, 43, -1, 45,
3284 46, 47, 48, 49, -1, -1, 52, 53, -1, 55,
3285 56, -1, -1, -1, 90, 91, 92, 63, 64, -1,
3286 66, -1, -1, -1, 70, -1, -1, -1, -1, -1,
3287 -1, -1, -1, -1, -1, -1, -1, -1, 114, 115,
3288 116, -1, -1, -1, 90, 91, 122, -1, 124, -1,
3289 -1, 127, -1, 99, -1, -1, -1, -1, -1, -1,
3290 -1, -1, -1, -1, -1, -1, 112, -1, -1, -1,
3291 -1, 117, 118, -1, -1, -1, 122, -1, 124, -1,
3292 126, -1, 128, -1, -1, -1, 132, 3, 4, 5,
3293 6, -1, 8, 9, 10, 11, 12, 13, 14, 15,
3294 16, -1, -1, -1, 20, 21, 22, 23, 24, 25,
3295 26, 27, -1, 29, 30, -1, 32, -1, -1, -1,
3296 36, 37, 38, 39, -1, 41, 42, 43, -1, 45,
3297 46, 47, 48, 49, -1, -1, 52, 53, -1, 55,
3298 56, -1, -1, -1, -1, -1, -1, 63, 64, -1,
3299 66, -1, -1, -1, 70, -1, -1, -1, -1, -1,
3300 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3301 -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
3302 -1, -1, -1, 99, -1, -1, -1, -1, -1, -1,
3303 -1, -1, -1, -1, -1, -1, 112, -1, -1, -1,
3304 -1, 117, 118, -1, -1, -1, 122, -1, 124, -1,
3305 126, -1, 128, -1, -1, -1, 132, 3, 4, 5,
3306 6, -1, 8, 9, 10, 11, 12, 13, 14, 15,
3307 16, -1, -1, -1, 20, 21, 22, 23, 24, 25,
3308 26, 27, -1, 29, 30, -1, 32, -1, -1, -1,
3309 36, 37, 38, 39, -1, 41, 42, 43, -1, 45,
3310 46, 47, 48, 49, -1, -1, 52, 53, -1, 55,
3311 56, -1, -1, -1, -1, -1, -1, 63, 64, -1,
3312 66, -1, -1, -1, 70, -1, -1, -1, -1, -1,
3313 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3314 -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
3315 -1, -1, -1, 99, -1, -1, -1, -1, -1, -1,
3316 -1, -1, -1, -1, -1, -1, 112, -1, -1, -1,
3317 -1, 117, 118, -1, -1, -1, 122, -1, 124, -1,
3318 126, -1, 128, -1, -1, -1, 132, 3, 4, 5,
3319 6, -1, 8, 9, 10, 11, 12, 13, 14, 15,
3320 16, -1, -1, 19, 20, 21, 22, 23, 24, 25,
3321 26, -1, -1, 29, -1, -1, 40, -1, -1, -1,
3322 36, -1, 38, 39, -1, 41, -1, 43, -1, 45,
3323 -1, 47, 48, 49, -1, -1, 52, 53, -1, 55,
3324 56, -1, -1, -1, -1, -1, -1, 63, 64, -1,
3325 -1, 75, 76, -1, 70, -1, -1, -1, -1, -1,
3326 -1, -1, -1, -1, -1, -1, 90, 91, 92, -1,
3327 94, 95, 96, -1, 90, 91, -1, -1, -1, -1,
3328 -1, -1, -1, 99, -1, 109, 110, -1, 112, 113,
3329 114, 115, 116, -1, -1, -1, 112, -1, 122, -1,
3330 124, 117, 118, 127, -1, -1, 122, -1, 124, -1,
3331 126, -1, 128, -1, -1, -1, 132, 3, 4, 5,
3332 6, -1, 8, 9, 10, 11, 12, 13, 14, 15,
3333 16, -1, -1, -1, 20, 21, 22, 23, 24, 25,
3334 26, -1, -1, 29, -1, -1, -1, -1, -1, -1,
3335 36, -1, 38, 39, -1, 41, -1, 43, -1, 45,
3336 -1, 47, 48, 49, -1, -1, 52, 53, -1, 55,
3337 56, -1, -1, -1, -1, -1, -1, 63, 64, -1,
3338 -1, -1, -1, -1, 70, -1, -1, -1, -1, -1,
3339 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3340 -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
3341 -1, -1, -1, 99, -1, -1, -1, -1, -1, -1,
3342 -1, -1, -1, -1, -1, -1, 112, -1, -1, -1,
3343 -1, 117, 118, -1, -1, -1, 122, -1, 124, -1,
3344 126, -1, 128, -1, -1, -1, 132, 3, 4, 5,
3345 6, -1, 8, 9, 10, 11, 12, 13, 14, 15,
3346 16, -1, -1, -1, 20, 21, 22, 23, 24, 25,
3347 26, -1, -1, 29, -1, -1, -1, -1, -1, -1,
3348 36, -1, 38, 39, -1, 41, -1, 43, -1, 45,
3349 -1, 47, 48, 49, -1, -1, 52, 53, -1, 55,
3350 56, -1, -1, -1, -1, -1, -1, 63, 64, -1,
3351 -1, -1, -1, -1, 70, -1, -1, -1, -1, -1,
3352 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3353 -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
3354 -1, -1, -1, 99, -1, -1, -1, -1, -1, -1,
3355 -1, -1, -1, -1, -1, -1, 112, -1, -1, -1,
3356 -1, 117, 118, -1, -1, -1, 122, -1, 124, -1,
3357 126, -1, 128, -1, -1, -1, 132, 3, 4, 5,
3358 6, -1, 8, 9, 10, 11, 12, 13, 14, 15,
3359 16, -1, -1, -1, 20, 21, 22, 23, 24, 25,
3360 26, -1, -1, 29, -1, -1, -1, -1, -1, -1,
3361 36, -1, 38, 39, -1, 41, -1, 43, -1, 45,
3362 -1, 47, 48, 49, -1, -1, 52, 53, -1, 55,
3363 56, -1, -1, -1, -1, -1, -1, 63, 64, -1,
3364 -1, -1, -1, -1, 70, -1, -1, -1, -1, -1,
3365 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3366 -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
3367 -1, -1, -1, 99, -1, -1, -1, -1, -1, -1,
3368 -1, -1, -1, -1, -1, -1, 112, -1, -1, -1,
3369 -1, 117, 118, -1, -1, -1, 122, -1, 124, -1,
3370 126, -1, 128, -1, -1, -1, 132, 3, 4, 5,
3371 6, -1, 8, 9, 10, 11, 12, 13, 14, 15,
3372 16, -1, -1, -1, 20, 21, 22, 23, 24, 25,
3373 26, -1, -1, 29, -1, -1, -1, -1, -1, -1,
3374 36, -1, 38, 39, -1, 41, -1, 43, -1, 45,
3375 -1, 47, 48, 49, -1, -1, 52, 53, -1, 55,
3376 56, -1, -1, -1, -1, -1, -1, 63, 64, -1,
3377 -1, -1, -1, -1, 70, -1, -1, -1, -1, -1,
3378 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3379 -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
3380 -1, -1, -1, 99, -1, -1, -1, -1, -1, -1,
3381 -1, -1, -1, -1, -1, -1, 112, -1, -1, -1,
3382 -1, 117, 118, -1, -1, -1, 122, -1, 124, -1,
3383 126, -1, 128, -1, 0, -1, 132, 3, 4, 5,
3384 6, -1, 8, 9, 10, 11, 12, 13, 14, 15,
3385 16, -1, -1, 19, 20, 21, 22, 23, 24, 25,
3386 26, -1, -1, 29, -1, -1, -1, -1, -1, -1,
3387 36, -1, 38, 39, -1, 41, -1, 43, -1, 45,
3388 -1, 47, 48, 49, -1, -1, 52, 53, -1, 55,
3389 56, -1, -1, -1, -1, -1, -1, 63, 64, -1,
3390 -1, -1, -1, -1, 70, -1, -1, -1, -1, -1,
3391 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3392 -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
3393 -1, -1, -1, 99, -1, -1, -1, -1, -1, -1,
3394 -1, -1, -1, -1, -1, -1, 112, -1, -1, -1,
3395 -1, 117, 118, -1, -1, -1, 122, -1, 124, -1,
3396 126, -1, 128, 3, 4, 5, 6, -1, 8, 9,
3397 10, 11, 12, 13, 14, 15, 16, -1, 18, -1,
3398 20, 21, 22, 23, 24, 25, 26, 27, -1, 29,
3399 30, -1, 32, -1, -1, -1, 36, 37, 38, 39,
3400 -1, 41, 42, 43, -1, 45, 46, 47, 48, 49,
3401 -1, -1, 52, 53, -1, 55, 56, -1, -1, -1,
3402 -1, -1, -1, 63, 64, -1, 66, -1, -1, -1,
3403 70, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3404 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3405 90, 91, -1, -1, -1, -1, -1, -1, -1, 99,
3406 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3407 -1, -1, 112, -1, -1, -1, -1, 117, 118, -1,
3408 -1, -1, 122, -1, 124, -1, 126, -1, 128, 3,
3409 4, 5, 6, -1, 8, 9, 10, 11, 12, 13,
3410 14, 15, 16, -1, -1, -1, 20, 21, 22, 23,
3411 24, 25, 26, 27, -1, 29, 30, -1, 32, -1,
3412 -1, -1, 36, 37, 38, 39, -1, 41, 42, 43,
3413 -1, 45, 46, 47, 48, 49, -1, -1, 52, 53,
3414 -1, 55, 56, -1, -1, -1, -1, -1, -1, 63,
3415 64, -1, 66, -1, -1, -1, 70, -1, -1, -1,
3416 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3417 -1, -1, -1, -1, -1, -1, 90, 91, -1, -1,
3418 -1, -1, -1, -1, -1, 99, -1, 3, -1, 5,
3419 6, -1, 8, 9, 10, 11, 12, -1, 112, -1,
3420 -1, -1, -1, 117, 118, -1, -1, -1, 122, 25,
3421 124, 27, 126, 29, 128, -1, 32, -1, -1, -1,
3422 36, -1, -1, -1, -1, -1, -1, 43, -1, 45,
3423 46, -1, -1, -1, -1, -1, -1, 53, -1, 55,
3424 56, -1, -1, -1, -1, -1, -1, 63, -1, -1,
3425 -1, -1, -1, -1, 70, -1, -1, 3, -1, 5,
3426 6, -1, 8, 9, 10, 11, 12, -1, -1, -1,
3427 -1, -1, -1, -1, 90, 91, -1, -1, -1, 25,
3428 -1, 27, -1, 29, -1, -1, -1, -1, -1, -1,
3429 36, -1, -1, -1, -1, -1, 112, 43, -1, 45,
3430 -1, 117, 118, -1, -1, -1, 122, 53, 124, 55,
3431 56, -1, 128, -1, -1, -1, -1, 63, -1, -1,
3432 -1, -1, -1, -1, 70, -1, -1, 3, -1, 5,
3433 6, -1, 8, 9, 10, 11, 12, -1, -1, -1,
3434 -1, -1, -1, -1, 90, 91, -1, -1, -1, 25,
3435 -1, 27, -1, 29, -1, -1, -1, -1, -1, -1,
3436 -1, -1, -1, -1, -1, -1, 112, -1, -1, 45,
3437 -1, 117, 118, -1, -1, -1, 122, 53, 124, 55,
3438 56, -1, 128, -1, -1, -1, -1, -1, -1, 40,
3439 -1, -1, -1, -1, 70, -1, -1, -1, -1, -1,
3440 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3441 -1, -1, -1, -1, 90, 91, 67, 68, 69, -1,
3442 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
3443 81, 82, 83, 84, 85, 86, 87, 88, -1, 90,
3444 91, 92, -1, 94, 95, 96, 122, -1, 124, -1,
3445 -1, 102, 128, 104, -1, 106, 107, 108, 109, 110,
3446 40, 112, 113, 114, 115, 116, -1, -1, -1, -1,
3447 -1, 122, -1, 124, -1, -1, 127, -1, -1, -1,
3448 -1, -1, 133, -1, -1, -1, -1, 67, 68, 69,
3449 -1, 71, 72, 73, 74, 75, 76, 77, 78, 79,
3450 80, 81, 82, 83, 84, 85, 86, 87, 88, -1,
3451 90, 91, 92, -1, 94, 95, 96, -1, -1, -1,
3452 -1, -1, 102, 40, 104, -1, 106, 107, 108, 109,
3453 110, -1, 112, 113, 114, 115, 116, -1, -1, -1,
3454 -1, -1, 122, -1, 124, -1, -1, 127, -1, -1,
3455 67, 68, 69, 133, 71, 72, 73, 74, 75, 76,
3456 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
3457 87, 88, -1, 90, 91, 92, -1, 94, 95, 96,
3458 -1, -1, -1, -1, -1, 102, 40, 104, -1, 106,
3459 107, 108, 109, 110, -1, 112, 113, 114, 115, 116,
3460 -1, -1, -1, -1, -1, 122, -1, 124, -1, -1,
3461 127, -1, -1, 67, 68, 69, 133, 71, 72, 73,
3462 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
3463 84, 85, 86, 87, 88, -1, 90, 91, 92, -1,
3464 94, 95, 96, -1, -1, -1, -1, 40, 102, -1,
3465 104, 105, 106, 107, 108, 109, 110, -1, 112, 113,
3466 114, 115, 116, -1, -1, -1, -1, -1, 122, -1,
3467 124, -1, -1, 127, 67, 68, 69, -1, 71, 72,
3468 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
3469 83, 84, 85, 86, 87, 88, -1, 90, 91, 92,
3470 -1, 94, 95, 96, -1, -1, -1, -1, 40, 102,
3471 -1, 104, -1, 106, 107, 108, 109, 110, -1, 112,
3472 113, 114, 115, 116, -1, -1, -1, -1, -1, 122,
3473 -1, 124, 125, -1, 127, 67, 68, 69, -1, 71,
3474 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
3475 82, 83, 84, 85, 86, 87, 88, -1, 90, 91,
3476 92, -1, 94, 95, 96, -1, -1, -1, -1, 40,
3477 102, -1, 104, 105, 106, 107, 108, 109, 110, -1,
3478 112, 113, 114, 115, 116, -1, -1, -1, -1, -1,
3479 122, -1, 124, -1, -1, 127, 67, 68, 69, -1,
3480 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
3481 81, 82, 83, 84, 85, 86, 87, 88, -1, 90,
3482 91, 92, -1, 94, 95, 96, -1, -1, -1, -1,
3483 40, 102, -1, 104, -1, 106, 107, 108, 109, 110,
3484 -1, 112, 113, 114, 115, 116, -1, -1, -1, -1,
3485 -1, 122, -1, 124, -1, -1, 127, 67, 68, 69,
3486 -1, 71, 72, 73, 74, 75, 76, -1, -1, -1,
3487 -1, -1, -1, -1, -1, -1, -1, -1, 88, -1,
3488 90, 91, 92, -1, 94, 95, 96, -1, -1, -1,
3489 -1, 40, -1, -1, -1, -1, 106, 107, 108, 109,
3490 110, -1, 112, 113, 114, 115, 116, -1, -1, -1,
3491 -1, -1, 122, -1, 124, -1, -1, 127, 67, 68,
3492 69, -1, 71, 72, 73, 74, 75, 76, -1, -1,
3493 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3494 -1, 90, 91, 92, -1, 94, 95, 96, -1, -1,
3495 -1, -1, 40, -1, -1, -1, -1, 106, 107, 108,
3496 109, 110, -1, 112, 113, 114, 115, 116, -1, -1,
3497 -1, -1, -1, 122, -1, 124, -1, -1, 127, 67,
3498 68, 69, -1, 71, 72, 73, 74, 75, 76, -1,
3499 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3500 -1, -1, 90, 91, 92, -1, 94, 95, 96, -1,
3501 -1, -1, -1, 40, -1, -1, -1, -1, -1, 107,
3502 108, 109, 110, -1, 112, 113, 114, 115, 116, -1,
3503 -1, -1, -1, -1, 122, -1, 124, -1, -1, 127,
3504 67, 68, 69, -1, 71, 72, 73, 74, 75, 76,
3505 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3506 -1, -1, -1, 90, 91, 92, -1, 94, 95, 96,
3507 -1, -1, -1, -1, 40, -1, -1, -1, -1, -1,
3508 -1, 108, 109, 110, -1, 112, 113, 114, 115, 116,
3509 -1, -1, -1, -1, -1, 122, -1, 124, -1, -1,
3510 127, 67, 68, 69, -1, 71, 72, 73, 74, 75,
3511 76, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3512 -1, -1, -1, -1, 90, 91, 92, -1, 94, 95,
3513 96, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3514 -1, -1, 108, 109, 110, -1, 112, 113, 114, 115,
3515 116, -1, -1, -1, -1, -1, 122, -1, 124, -1,
3519 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
3520 symbol of state STATE-NUM. */
3521 static const yytype_uint8 yystos[] =
3523 0, 3, 4, 5, 6, 8, 9, 10, 11, 12,
3524 13, 14, 15, 16, 19, 20, 21, 22, 23, 24,
3525 25, 26, 27, 29, 36, 38, 39, 41, 43, 45,
3526 47, 48, 49, 52, 53, 55, 56, 63, 64, 70,
3527 90, 91, 99, 112, 117, 118, 122, 124, 126, 128,
3528 135, 136, 137, 138, 144, 147, 148, 154, 158, 159,
3529 160, 161, 163, 171, 179, 182, 183, 186, 189, 190,
3530 191, 192, 196, 198, 207, 217, 220, 233, 234, 235,
3531 238, 239, 240, 241, 244, 246, 247, 89, 50, 122,
3532 122, 164, 122, 3, 4, 19, 126, 184, 185, 18,
3533 3, 240, 3, 219, 240, 122, 185, 223, 122, 126,
3534 122, 127, 240, 122, 237, 240, 242, 243, 240, 240,
3535 240, 240, 240, 238, 229, 230, 231, 237, 30, 32,
3536 37, 42, 46, 66, 99, 132, 143, 144, 145, 148,
3537 150, 165, 166, 181, 190, 236, 3, 0, 138, 126,
3538 3, 46, 150, 156, 157, 239, 145, 146, 18, 27,
3539 31, 32, 44, 46, 206, 245, 192, 100, 40, 67,
3540 68, 69, 71, 72, 73, 74, 75, 76, 77, 78,
3541 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
3542 90, 91, 92, 94, 95, 96, 102, 104, 106, 107,
3543 108, 109, 110, 112, 113, 114, 115, 116, 122, 124,
3544 127, 3, 122, 162, 146, 172, 188, 126, 127, 184,
3545 185, 222, 223, 224, 232, 122, 238, 127, 240, 180,
3546 229, 3, 155, 105, 132, 100, 133, 125, 100, 237,
3547 3, 3, 151, 152, 238, 238, 151, 3, 132, 145,
3548 126, 136, 3, 99, 68, 99, 3, 35, 51, 216,
3549 3, 3, 208, 240, 240, 240, 240, 240, 240, 240,
3550 240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
3551 240, 240, 240, 240, 240, 240, 3, 240, 240, 240,
3552 240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
3553 240, 240, 229, 240, 3, 122, 128, 238, 14, 240,
3554 99, 139, 140, 141, 147, 148, 196, 198, 207, 217,
3555 187, 184, 127, 122, 228, 3, 93, 213, 214, 215,
3556 133, 115, 184, 133, 142, 143, 133, 238, 237, 237,
3557 105, 227, 100, 143, 132, 227, 238, 238, 102, 3,
3558 54, 193, 54, 194, 3, 209, 210, 105, 133, 125,
3559 89, 240, 3, 133, 122, 133, 132, 141, 126, 139,
3560 229, 102, 105, 211, 215, 133, 100, 132, 133, 105,
3561 36, 115, 224, 226, 102, 149, 152, 132, 99, 133,
3562 3, 5, 122, 224, 17, 195, 224, 225, 126, 227,
3563 100, 240, 3, 133, 146, 238, 126, 139, 132, 133,
3564 3, 5, 8, 9, 10, 12, 45, 55, 56, 212,
3565 226, 227, 93, 215, 28, 33, 173, 175, 177, 178,
3566 146, 237, 237, 239, 146, 213, 225, 126, 100, 199,
3567 149, 210, 133, 34, 62, 167, 168, 169, 170, 132,
3568 211, 126, 215, 126, 122, 173, 175, 65, 153, 133,
3569 133, 197, 224, 46, 99, 190, 203, 204, 205, 240,
3570 105, 132, 169, 170, 221, 176, 3, 146, 146, 227,
3571 99, 144, 148, 190, 200, 201, 202, 207, 217, 3,
3572 27, 132, 205, 105, 142, 142, 142, 227, 126, 126,
3573 132, 202, 216, 142, 132, 132, 133, 218, 200, 3,
3574 174, 142, 132, 122, 126, 132, 213, 142, 133, 132,
3578 #define yyerrok (yyerrstatus = 0)
3579 #define yyclearin (yychar = YYEMPTY)
3580 #define YYEMPTY (-2)
3583 #define YYACCEPT goto yyacceptlab
3584 #define YYABORT goto yyabortlab
3585 #define YYERROR goto yyerrorlab
3588 /* Like YYERROR except do call yyerror. This remains here temporarily
3589 to ease the transition to the new meaning of YYERROR, for GCC.
3590 Once GCC version 2 has supplanted version 1, this can go. */
3592 #define YYFAIL goto yyerrlab
3594 #define YYRECOVERING() (!!yyerrstatus)
3596 #define YYBACKUP(Token, Value) \
3598 if (yychar == YYEMPTY && yylen == 1) \
3602 yytoken = YYTRANSLATE (yychar); \
3608 yyerror (YY_("syntax error: cannot back up")); \
3615 #define YYERRCODE 256
3618 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
3619 If N is 0, then set CURRENT to the empty location which ends
3620 the previous symbol: RHS[0] (always defined). */
3622 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
3623 #ifndef YYLLOC_DEFAULT
3624 # define YYLLOC_DEFAULT(Current, Rhs, N) \
3628 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
3629 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
3630 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
3631 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
3635 (Current).first_line = (Current).last_line = \
3636 YYRHSLOC (Rhs, 0).last_line; \
3637 (Current).first_column = (Current).last_column = \
3638 YYRHSLOC (Rhs, 0).last_column; \
3644 /* YY_LOCATION_PRINT -- Print the location on the stream.
3645 This macro was not mandated originally: define only if we know
3646 we won't break user code: when these are the locations we know. */
3648 #ifndef YY_LOCATION_PRINT
3649 # if YYLTYPE_IS_TRIVIAL
3650 # define YY_LOCATION_PRINT(File, Loc) \
3651 fprintf (File, "%d.%d-%d.%d", \
3652 (Loc).first_line, (Loc).first_column, \
3653 (Loc).last_line, (Loc).last_column)
3655 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
3660 /* YYLEX -- calling `yylex' with the right arguments. */
3663 # define YYLEX yylex (YYLEX_PARAM)
3665 # define YYLEX yylex ()
3668 /* Enable debugging if requested. */
3672 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
3673 # define YYFPRINTF fprintf
3676 # define YYDPRINTF(Args) \
3682 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
3686 YYFPRINTF (stderr, "%s ", Title); \
3687 yy_symbol_print (stderr, \
3689 YYFPRINTF (stderr, "\n"); \
3694 /*--------------------------------.
3695 | Print this symbol on YYOUTPUT. |
3696 `--------------------------------*/
3699 #if (defined __STDC__ || defined __C99__FUNC__ \
3700 || defined __cplusplus || defined _MSC_VER)
3702 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
3705 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
3708 YYSTYPE const * const yyvaluep;
3714 if (yytype < YYNTOKENS)
3715 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
3727 /*--------------------------------.
3728 | Print this symbol on YYOUTPUT. |
3729 `--------------------------------*/
3731 #if (defined __STDC__ || defined __C99__FUNC__ \
3732 || defined __cplusplus || defined _MSC_VER)
3734 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
3737 yy_symbol_print (yyoutput, yytype, yyvaluep)
3740 YYSTYPE const * const yyvaluep;
3743 if (yytype < YYNTOKENS)
3744 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
3746 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
3748 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
3749 YYFPRINTF (yyoutput, ")");
3752 /*------------------------------------------------------------------.
3753 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
3755 `------------------------------------------------------------------*/
3757 #if (defined __STDC__ || defined __C99__FUNC__ \
3758 || defined __cplusplus || defined _MSC_VER)
3760 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
3763 yy_stack_print (yybottom, yytop)
3764 yytype_int16 *yybottom;
3765 yytype_int16 *yytop;
3768 YYFPRINTF (stderr, "Stack now");
3769 for (; yybottom <= yytop; yybottom++)
3771 int yybot = *yybottom;
3772 YYFPRINTF (stderr, " %d", yybot);
3774 YYFPRINTF (stderr, "\n");
3777 # define YY_STACK_PRINT(Bottom, Top) \
3780 yy_stack_print ((Bottom), (Top)); \
3784 /*------------------------------------------------.
3785 | Report that the YYRULE is going to be reduced. |
3786 `------------------------------------------------*/
3788 #if (defined __STDC__ || defined __C99__FUNC__ \
3789 || defined __cplusplus || defined _MSC_VER)
3791 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
3794 yy_reduce_print (yyvsp, yyrule)
3799 int yynrhs = yyr2[yyrule];
3801 unsigned long int yylno = yyrline[yyrule];
3802 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
3804 /* The symbols being reduced. */
3805 for (yyi = 0; yyi < yynrhs; yyi++)
3807 YYFPRINTF (stderr, " $%d = ", yyi + 1);
3808 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
3809 &(yyvsp[(yyi + 1) - (yynrhs)])
3811 YYFPRINTF (stderr, "\n");
3815 # define YY_REDUCE_PRINT(Rule) \
3818 yy_reduce_print (yyvsp, Rule); \
3821 /* Nonzero means print parse trace. It is left uninitialized so that
3822 multiple parsers can coexist. */
3824 #else /* !YYDEBUG */
3825 # define YYDPRINTF(Args)
3826 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
3827 # define YY_STACK_PRINT(Bottom, Top)
3828 # define YY_REDUCE_PRINT(Rule)
3829 #endif /* !YYDEBUG */
3832 /* YYINITDEPTH -- initial size of the parser's stacks. */
3834 # define YYINITDEPTH 200
3837 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
3838 if the built-in stack extension method is used).
3840 Do not make this value too large; the results are undefined if
3841 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
3842 evaluated with infinite-precision integer arithmetic. */
3845 # define YYMAXDEPTH 10000
3853 # if defined __GLIBC__ && defined _STRING_H
3854 # define yystrlen strlen
3856 /* Return the length of YYSTR. */
3857 #if (defined __STDC__ || defined __C99__FUNC__ \
3858 || defined __cplusplus || defined _MSC_VER)
3860 yystrlen (const char *yystr)
3868 for (yylen = 0; yystr[yylen]; yylen++)
3876 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
3877 # define yystpcpy stpcpy
3879 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
3881 #if (defined __STDC__ || defined __C99__FUNC__ \
3882 || defined __cplusplus || defined _MSC_VER)
3884 yystpcpy (char *yydest, const char *yysrc)
3887 yystpcpy (yydest, yysrc)
3893 const char *yys = yysrc;
3895 while ((*yyd++ = *yys++) != '\0')
3904 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
3905 quotes and backslashes, so that it's suitable for yyerror. The
3906 heuristic is that double-quoting is unnecessary unless the string
3907 contains an apostrophe, a comma, or backslash (other than
3908 backslash-backslash). YYSTR is taken from yytname. If YYRES is
3909 null, do not copy; instead, return the length of what the result
3912 yytnamerr (char *yyres, const char *yystr)
3917 char const *yyp = yystr;
3924 goto do_not_strip_quotes;
3928 goto do_not_strip_quotes;
3941 do_not_strip_quotes: ;
3945 return yystrlen (yystr);
3947 return yystpcpy (yyres, yystr) - yyres;
3951 /* Copy into YYRESULT an error message about the unexpected token
3952 YYCHAR while in state YYSTATE. Return the number of bytes copied,
3953 including the terminating null byte. If YYRESULT is null, do not
3954 copy anything; just return the number of bytes that would be
3955 copied. As a special case, return 0 if an ordinary "syntax error"
3956 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
3957 size calculation. */
3959 yysyntax_error (char *yyresult, int yystate, int yychar)
3961 int yyn = yypact[yystate];
3963 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
3967 int yytype = YYTRANSLATE (yychar);
3968 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
3969 YYSIZE_T yysize = yysize0;
3971 int yysize_overflow = 0;
3972 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
3973 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
3977 /* This is so xgettext sees the translatable formats that are
3978 constructed on the fly. */
3979 YY_("syntax error, unexpected %s");
3980 YY_("syntax error, unexpected %s, expecting %s");
3981 YY_("syntax error, unexpected %s, expecting %s or %s");
3982 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
3983 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
3987 static char const yyunexpected[] = "syntax error, unexpected %s";
3988 static char const yyexpecting[] = ", expecting %s";
3989 static char const yyor[] = " or %s";
3990 char yyformat[sizeof yyunexpected
3991 + sizeof yyexpecting - 1
3992 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
3993 * (sizeof yyor - 1))];
3994 char const *yyprefix = yyexpecting;
3996 /* Start YYX at -YYN if negative to avoid negative indexes in
3998 int yyxbegin = yyn < 0 ? -yyn : 0;
4000 /* Stay within bounds of both yycheck and yytname. */
4001 int yychecklim = YYLAST - yyn + 1;
4002 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
4005 yyarg[0] = yytname[yytype];
4006 yyfmt = yystpcpy (yyformat, yyunexpected);
4008 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
4009 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
4011 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
4015 yyformat[sizeof yyunexpected - 1] = '\0';
4018 yyarg[yycount++] = yytname[yyx];
4019 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
4020 yysize_overflow |= (yysize1 < yysize);
4022 yyfmt = yystpcpy (yyfmt, yyprefix);
4026 yyf = YY_(yyformat);
4027 yysize1 = yysize + yystrlen (yyf);
4028 yysize_overflow |= (yysize1 < yysize);
4031 if (yysize_overflow)
4032 return YYSIZE_MAXIMUM;
4036 /* Avoid sprintf, as that infringes on the user's name space.
4037 Don't have undefined behavior even if the translation
4038 produced a string with the wrong number of "%s"s. */
4039 char *yyp = yyresult;
4041 while ((*yyp = *yyf) != '\0')
4043 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
4045 yyp += yytnamerr (yyp, yyarg[yyi++]);
4058 #endif /* YYERROR_VERBOSE */
4061 /*-----------------------------------------------.
4062 | Release the memory associated to this symbol. |
4063 `-----------------------------------------------*/
4066 #if (defined __STDC__ || defined __C99__FUNC__ \
4067 || defined __cplusplus || defined _MSC_VER)
4069 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
4072 yydestruct (yymsg, yytype, yyvaluep)
4082 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
4092 /* Prevent warnings from -Wmissing-prototypes. */
4093 #ifdef YYPARSE_PARAM
4094 #if defined __STDC__ || defined __cplusplus
4095 int yyparse (void *YYPARSE_PARAM);
4099 #else /* ! YYPARSE_PARAM */
4100 #if defined __STDC__ || defined __cplusplus
4105 #endif /* ! YYPARSE_PARAM */
4108 /* The lookahead symbol. */
4111 /* The semantic value of the lookahead symbol. */
4114 /* Number of syntax errors so far. */
4119 /*-------------------------.
4120 | yyparse or yypush_parse. |
4121 `-------------------------*/
4123 #ifdef YYPARSE_PARAM
4124 #if (defined __STDC__ || defined __C99__FUNC__ \
4125 || defined __cplusplus || defined _MSC_VER)
4127 yyparse (void *YYPARSE_PARAM)
4130 yyparse (YYPARSE_PARAM)
4131 void *YYPARSE_PARAM;
4133 #else /* ! YYPARSE_PARAM */
4134 #if (defined __STDC__ || defined __C99__FUNC__ \
4135 || defined __cplusplus || defined _MSC_VER)
4148 /* Number of tokens to shift before error messages enabled. */
4151 /* The stacks and their tools:
4152 `yyss': related to states.
4153 `yyvs': related to semantic values.
4155 Refer to the stacks thru separate pointers, to allow yyoverflow
4156 to reallocate them elsewhere. */
4158 /* The state stack. */
4159 yytype_int16 yyssa[YYINITDEPTH];
4161 yytype_int16 *yyssp;
4163 /* The semantic value stack. */
4164 YYSTYPE yyvsa[YYINITDEPTH];
4168 YYSIZE_T yystacksize;
4172 /* Lookahead token as an internal (translated) token number. */
4174 /* The variables used to return semantic value and location from the
4179 /* Buffer for error messages, and its allocated size. */
4181 char *yymsg = yymsgbuf;
4182 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
4185 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
4187 /* The number of symbols on the RHS of the reduced rule.
4188 Keep to zero when no symbol should be popped. */
4194 yystacksize = YYINITDEPTH;
4196 YYDPRINTF ((stderr, "Starting parse\n"));
4201 yychar = YYEMPTY; /* Cause a token to be read. */
4203 /* Initialize stack pointers.
4204 Waste one element of value and location stack
4205 so that they stay on the same level as the state stack.
4206 The wasted elements are never initialized. */
4212 /*------------------------------------------------------------.
4213 | yynewstate -- Push a new state, which is found in yystate. |
4214 `------------------------------------------------------------*/
4216 /* In all cases, when you get here, the value and location stacks
4217 have just been pushed. So pushing a state here evens the stacks. */
4223 if (yyss + yystacksize - 1 <= yyssp)
4225 /* Get the current used size of the three stacks, in elements. */
4226 YYSIZE_T yysize = yyssp - yyss + 1;
4230 /* Give user a chance to reallocate the stack. Use copies of
4231 these so that the &'s don't force the real ones into
4233 YYSTYPE *yyvs1 = yyvs;
4234 yytype_int16 *yyss1 = yyss;
4236 /* Each stack pointer address is followed by the size of the
4237 data in use in that stack, in bytes. This used to be a
4238 conditional around just the two extra args, but that might
4239 be undefined if yyoverflow is a macro. */
4240 yyoverflow (YY_("memory exhausted"),
4241 &yyss1, yysize * sizeof (*yyssp),
4242 &yyvs1, yysize * sizeof (*yyvsp),
4248 #else /* no yyoverflow */
4249 # ifndef YYSTACK_RELOCATE
4250 goto yyexhaustedlab;
4252 /* Extend the stack our own way. */
4253 if (YYMAXDEPTH <= yystacksize)
4254 goto yyexhaustedlab;
4256 if (YYMAXDEPTH < yystacksize)
4257 yystacksize = YYMAXDEPTH;
4260 yytype_int16 *yyss1 = yyss;
4261 union yyalloc *yyptr =
4262 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
4264 goto yyexhaustedlab;
4265 YYSTACK_RELOCATE (yyss_alloc, yyss);
4266 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
4267 # undef YYSTACK_RELOCATE
4269 YYSTACK_FREE (yyss1);
4272 #endif /* no yyoverflow */
4274 yyssp = yyss + yysize - 1;
4275 yyvsp = yyvs + yysize - 1;
4277 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
4278 (unsigned long int) yystacksize));
4280 if (yyss + yystacksize - 1 <= yyssp)
4284 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
4286 if (yystate == YYFINAL)
4296 /* Do appropriate processing given the current state. Read a
4297 lookahead token if we need one and don't already have one. */
4299 /* First try to decide what to do without reference to lookahead token. */
4300 yyn = yypact[yystate];
4301 if (yyn == YYPACT_NINF)
4304 /* Not known => get a lookahead token if don't already have one. */
4306 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
4307 if (yychar == YYEMPTY)
4309 YYDPRINTF ((stderr, "Reading a token: "));
4313 if (yychar <= YYEOF)
4315 yychar = yytoken = YYEOF;
4316 YYDPRINTF ((stderr, "Now at end of input.\n"));
4320 yytoken = YYTRANSLATE (yychar);
4321 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
4324 /* If the proper action on seeing token YYTOKEN is to reduce or to
4325 detect an error, take that action. */
4327 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
4332 if (yyn == 0 || yyn == YYTABLE_NINF)
4338 /* Count tokens shifted since error; after three, turn off error
4343 /* Shift the lookahead token. */
4344 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
4346 /* Discard the shifted token. */
4355 /*-----------------------------------------------------------.
4356 | yydefault -- do the default action for the current state. |
4357 `-----------------------------------------------------------*/
4359 yyn = yydefact[yystate];
4365 /*-----------------------------.
4366 | yyreduce -- Do a reduction. |
4367 `-----------------------------*/
4369 /* yyn is the number of a rule to reduce with. */
4372 /* If YYLEN is nonzero, implement the default value of the action:
4375 Otherwise, the following line sets YYVAL to garbage.
4376 This behavior is undocumented and Bison
4377 users should not rely upon it. Assigning to YYVAL
4378 unconditionally makes the parser a bit smaller, and it avoids a
4379 GCC warning that YYVAL may be used uninitialized. */
4380 yyval = yyvsp[1-yylen];
4383 YY_REDUCE_PRINT (yyn);
4390 /* Line 1464 of skeleton.m4 */
4391 #line 2076 "parser.y"
4392 {PASS_ALWAYS as3_pass=(yyvsp[(1) - (4)].number_int);}
4401 /* Line 1464 of skeleton.m4 */
4402 #line 2088 "parser.y"
4403 {PASS_ALWAYS as3_pass=(yyvsp[(1) - (4)].number_int);}
4412 /* Line 1464 of skeleton.m4 */
4413 #line 2091 "parser.y"
4414 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4423 /* Line 1464 of skeleton.m4 */
4424 #line 2092 "parser.y"
4425 {(yyval.code)=code_new();}
4434 /* Line 1464 of skeleton.m4 */
4435 #line 2094 "parser.y"
4436 {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
4445 /* Line 1464 of skeleton.m4 */
4446 #line 2095 "parser.y"
4447 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4456 /* Line 1464 of skeleton.m4 */
4457 #line 2110 "parser.y"
4458 {(yyval.code)=(yyvsp[(2) - (3)].code);}
4467 /* Line 1464 of skeleton.m4 */
4468 #line 2111 "parser.y"
4478 /* Line 1464 of skeleton.m4 */
4479 #line 2114 "parser.y"
4489 /* Line 1464 of skeleton.m4 */
4490 #line 2121 "parser.y"
4491 {PASS_ALWAYS as3_pass=(yyvsp[(1) - (4)].number_int);}
4500 /* Line 1464 of skeleton.m4 */
4501 #line 2125 "parser.y"
4502 {(yyval.code)=(yyvsp[(1) - (2)].code);}
4511 /* Line 1464 of skeleton.m4 */
4512 #line 2126 "parser.y"
4513 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4522 /* Line 1464 of skeleton.m4 */
4523 #line 2130 "parser.y"
4525 code_t**cc = &global->init->method->body->code;
4526 *cc = code_append(*cc, (yyvsp[(1) - (1)].code));
4536 /* Line 1464 of skeleton.m4 */
4537 #line 2137 "parser.y"
4540 (yyval.number_int)=as3_pass;
4541 char*key = concat3((yyvsp[(1) - (3)].id),"::",(yyvsp[(3) - (3)].id));
4542 if(!definitions || !dict_contains(definitions, key)) {
4555 /* Line 1464 of skeleton.m4 */
4556 #line 2156 "parser.y"
4557 {(yyval.value)=(yyvsp[(2) - (2)].value);}
4566 /* Line 1464 of skeleton.m4 */
4567 #line 2157 "parser.y"
4568 {(yyval.value).c=abc_pushundefined(0);
4569 (yyval.value).t=TYPE_ANY;
4579 /* Line 1464 of skeleton.m4 */
4580 #line 2161 "parser.y"
4581 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4590 /* Line 1464 of skeleton.m4 */
4591 #line 2162 "parser.y"
4592 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4601 /* Line 1464 of skeleton.m4 */
4602 #line 2164 "parser.y"
4603 {(yyval.code) = (yyvsp[(1) - (1)].code);}
4612 /* Line 1464 of skeleton.m4 */
4613 #line 2165 "parser.y"
4614 {(yyval.code) = code_append((yyvsp[(1) - (3)].code), (yyvsp[(3) - (3)].code));}
4623 /* Line 1464 of skeleton.m4 */
4624 #line 2168 "parser.y"
4627 if(variable_exists((yyvsp[(1) - (3)].id)))
4628 syntaxerror("Variable %s already defined", (yyvsp[(1) - (3)].id));
4630 new_variable((yyvsp[(1) - (3)].id), 0, 1, 0);
4633 if(!is_subtype_of((yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo))) {
4634 syntaxerror("Can't convert %s to %s", (yyvsp[(3) - (3)].value).t->name,
4635 (yyvsp[(2) - (3)].classinfo)->name);
4640 if(state->method->uses_slots) {
4641 variable_t* v = find_slot(state, (yyvsp[(1) - (3)].id));
4643 // this variable is stored in a slot
4645 v->type = (yyvsp[(2) - (3)].classinfo);
4651 index = new_variable((yyvsp[(1) - (3)].id), (yyvsp[(2) - (3)].classinfo), 1, 0);
4654 (yyval.code) = slot?abc_getscopeobject(0, 1):0;
4656 if((yyvsp[(2) - (3)].classinfo)) {
4657 if((yyvsp[(3) - (3)].value).c->prev || (yyvsp[(3) - (3)].value).c->opcode != OPCODE_PUSHUNDEFINED) {
4658 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (3)].value).c);
4659 (yyval.code) = converttype((yyval.code), (yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo));
4661 code_free((yyvsp[(3) - (3)].value).c);
4662 (yyval.code) = defaultvalue((yyval.code), (yyvsp[(2) - (3)].classinfo));
4665 if((yyvsp[(3) - (3)].value).c->prev || (yyvsp[(3) - (3)].value).c->opcode != OPCODE_PUSHUNDEFINED) {
4666 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (3)].value).c);
4667 (yyval.code) = abc_coerce_a((yyval.code));
4669 // don't do anything
4670 code_free((yyvsp[(3) - (3)].value).c);
4671 code_free((yyval.code));
4677 (yyval.code) = abc_setslot((yyval.code), index);
4679 (yyval.code) = abc_setlocal((yyval.code), index);
4690 /* Line 1464 of skeleton.m4 */
4691 #line 2228 "parser.y"
4692 {(yyval.code) = code_new();}
4701 /* Line 1464 of skeleton.m4 */
4702 #line 2229 "parser.y"
4703 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4712 /* Line 1464 of skeleton.m4 */
4713 #line 2232 "parser.y"
4714 {PASS12 new_state();}
4723 /* Line 1464 of skeleton.m4 */
4724 #line 2232 "parser.y"
4727 (yyval.code) = code_new();
4728 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (7)].value).c);
4729 code_t*myjmp,*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4731 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].code));
4732 if((yyvsp[(7) - (7)].code)) {
4733 myjmp = (yyval.code) = abc_jump((yyval.code), 0);
4735 myif->branch = (yyval.code) = abc_nop((yyval.code));
4736 if((yyvsp[(7) - (7)].code)) {
4737 (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (7)].code));
4738 myjmp->branch = (yyval.code) = abc_nop((yyval.code));
4740 (yyval.code) = var_block((yyval.code));
4751 /* Line 1464 of skeleton.m4 */
4752 #line 2251 "parser.y"
4753 {(yyval.code)=code_new();}
4762 /* Line 1464 of skeleton.m4 */
4763 #line 2258 "parser.y"
4765 PASS1 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable((yyvsp[(2) - (3)].id),0,1,0);
4766 PASS2 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable((yyvsp[(2) - (3)].id),(yyvsp[(3) - (3)].classinfo),1,0);
4776 /* Line 1464 of skeleton.m4 */
4777 #line 2262 "parser.y"
4780 (yyval.id)=(yyvsp[(1) - (1)].id);
4790 /* Line 1464 of skeleton.m4 */
4791 #line 2267 "parser.y"
4792 {PASS12 new_state();(yyval.for_start).name=(yyvsp[(1) - (2)].id);(yyval.for_start).each=0;}
4801 /* Line 1464 of skeleton.m4 */
4802 #line 2268 "parser.y"
4803 {PASS12 new_state();(yyval.for_start).name=(yyvsp[(1) - (3)].id);(yyval.for_start).each=1;}
4812 /* Line 1464 of skeleton.m4 */
4813 #line 2270 "parser.y"
4815 if((yyvsp[(1) - (8)].for_start).each) syntaxerror("invalid syntax: ; not allowed in for each statement");
4816 (yyval.code) = code_new();
4817 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (8)].code));
4818 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4819 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (8)].value).c);
4820 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4821 (yyval.code) = code_append((yyval.code), (yyvsp[(8) - (8)].code));
4822 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4823 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (8)].code));
4824 (yyval.code) = abc_jump((yyval.code), loopstart);
4825 code_t*out = (yyval.code) = abc_nop((yyval.code));
4826 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, out);
4827 continuejumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, cont);
4830 (yyval.code) = var_block((yyval.code));
4841 /* Line 1464 of skeleton.m4 */
4842 #line 2290 "parser.y"
4844 variable_t*var = find_variable(state, (yyvsp[(2) - (6)].id));
4846 syntaxerror("variable %s not known in this scope", (yyvsp[(2) - (6)].id));
4849 char*tmp1name = concat2((yyvsp[(2) - (6)].id), "__tmp1__");
4850 int it = new_variable(tmp1name, TYPE_INT, 0, 0);
4851 char*tmp2name = concat2((yyvsp[(2) - (6)].id), "__array__");
4852 int array = new_variable(tmp1name, 0, 0, 0);
4854 (yyval.code) = code_new();
4855 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
4856 (yyval.code) = abc_coerce_a((yyval.code));
4857 (yyval.code) = abc_setlocal((yyval.code), array);
4858 (yyval.code) = abc_pushbyte((yyval.code), 0);
4859 (yyval.code) = abc_setlocal((yyval.code), it);
4861 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4863 (yyval.code) = abc_hasnext2((yyval.code), array, it);
4864 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4865 (yyval.code) = abc_getlocal((yyval.code), array);
4866 (yyval.code) = abc_getlocal((yyval.code), it);
4867 if(!(yyvsp[(1) - (6)].for_start).each)
4868 (yyval.code) = abc_nextname((yyval.code));
4870 (yyval.code) = abc_nextvalue((yyval.code));
4871 (yyval.code) = converttype((yyval.code), 0, var->type);
4872 (yyval.code) = abc_setlocal((yyval.code), var->index);
4874 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
4875 (yyval.code) = abc_jump((yyval.code), loopstart);
4877 code_t*out = (yyval.code) = abc_nop((yyval.code));
4878 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, out);
4879 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, loopstart);
4883 (yyval.code) = var_block((yyval.code));
4898 /* Line 1464 of skeleton.m4 */
4899 #line 2338 "parser.y"
4900 {PASS12 new_state();}
4909 /* Line 1464 of skeleton.m4 */
4910 #line 2338 "parser.y"
4913 (yyval.code) = code_new();
4915 code_t*myjmp = (yyval.code) = abc_jump((yyval.code), 0);
4916 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4917 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
4918 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4919 myjmp->branch = cont;
4920 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
4921 (yyval.code) = abc_iftrue((yyval.code), loopstart);
4922 code_t*out = (yyval.code) = abc_nop((yyval.code));
4923 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].id), out);
4924 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].id), cont);
4926 (yyval.code) = var_block((yyval.code));
4937 /* Line 1464 of skeleton.m4 */
4938 #line 2357 "parser.y"
4939 {PASS12 new_state();}
4948 /* Line 1464 of skeleton.m4 */
4949 #line 2357 "parser.y"
4951 (yyval.code) = code_new();
4952 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4953 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (7)].code));
4954 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4955 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].value).c);
4956 (yyval.code) = abc_iftrue((yyval.code), loopstart);
4957 code_t*out = (yyval.code) = abc_nop((yyval.code));
4958 breakjumpsto((yyval.code), (yyvsp[(1) - (7)].id), out);
4959 continuejumpsto((yyval.code), (yyvsp[(1) - (7)].id), cont);
4961 (yyval.code) = var_block((yyval.code));
4972 /* Line 1464 of skeleton.m4 */
4973 #line 2372 "parser.y"
4975 (yyval.code) = abc___break__(0, "");
4985 /* Line 1464 of skeleton.m4 */
4986 #line 2375 "parser.y"
4988 (yyval.code) = abc___break__(0, (yyvsp[(2) - (2)].id));
4998 /* Line 1464 of skeleton.m4 */
4999 #line 2378 "parser.y"
5001 (yyval.code) = abc___continue__(0, "");
5011 /* Line 1464 of skeleton.m4 */
5012 #line 2381 "parser.y"
5014 (yyval.code) = abc___continue__(0, (yyvsp[(2) - (2)].id));
5024 /* Line 1464 of skeleton.m4 */
5025 #line 2385 "parser.y"
5035 /* Line 1464 of skeleton.m4 */
5036 #line 2386 "parser.y"
5037 {(yyval.code)=(yyvsp[(1) - (1)].code);}
5046 /* Line 1464 of skeleton.m4 */
5047 #line 2387 "parser.y"
5048 {(yyval.code)=(yyvsp[(1) - (1)].code);}
5057 /* Line 1464 of skeleton.m4 */
5058 #line 2388 "parser.y"
5059 {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
5068 /* Line 1464 of skeleton.m4 */
5069 #line 2389 "parser.y"
5070 {(yyval.code)=(yyvsp[(1) - (1)].code);}
5079 /* Line 1464 of skeleton.m4 */
5080 #line 2390 "parser.y"
5081 {(yyval.code)=code_append((yyval.code),(yyvsp[(2) - (2)].code));}
5090 /* Line 1464 of skeleton.m4 */
5091 #line 2392 "parser.y"
5093 (yyval.code) = abc_getlocal(0, state->switch_var);
5094 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (4)].value).c);
5095 code_t*j = (yyval.code) = abc_ifne((yyval.code), 0);
5096 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (4)].code));
5097 if((yyval.code)->opcode != OPCODE___BREAK__) {
5098 (yyval.code) = abc___fallthrough__((yyval.code), "");
5100 code_t*e = (yyval.code) = abc_nop((yyval.code));
5111 /* Line 1464 of skeleton.m4 */
5112 #line 2403 "parser.y"
5114 (yyval.code) = (yyvsp[(3) - (3)].code);
5124 /* Line 1464 of skeleton.m4 */
5125 #line 2406 "parser.y"
5126 {PASS12 new_state();state->switch_var=alloc_local();}
5135 /* Line 1464 of skeleton.m4 */
5136 #line 2406 "parser.y"
5138 (yyval.code)=(yyvsp[(4) - (8)].value).c;
5139 (yyval.code) = abc_setlocal((yyval.code), state->switch_var);
5140 (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (8)].code));
5142 code_t*out = (yyval.code) = abc_kill((yyval.code), state->switch_var);
5143 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].id), out);
5145 code_t*c = (yyval.code),*lastblock=0;
5147 if(c->opcode == OPCODE_IFNE) {
5148 if(!c->next) syntaxerror("internal error in fallthrough handling");
5150 } else if(c->opcode == OPCODE___FALLTHROUGH__) {
5152 c->opcode = OPCODE_JUMP;
5153 c->branch = lastblock;
5155 /* fall through end of switch */
5156 c->opcode = OPCODE_NOP;
5162 (yyval.code) = var_block((yyval.code));
5173 /* Line 1464 of skeleton.m4 */
5174 #line 2437 "parser.y"
5175 {PASS12 new_state();
5176 state->exception_name=(yyvsp[(3) - (5)].id);
5177 PASS1 new_variable((yyvsp[(3) - (5)].id), 0, 0, 0);
5178 PASS2 new_variable((yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].classinfo), 0, 0);
5188 /* Line 1464 of skeleton.m4 */
5189 #line 2442 "parser.y"
5191 namespace_t name_ns = {ACCESS_PACKAGE, ""};
5192 multiname_t name = {QNAME, &name_ns, 0, (yyvsp[(3) - (9)].id)};
5194 NEW(abc_exception_t, e)
5195 e->exc_type = sig2mname((yyvsp[(4) - (9)].classinfo));
5196 e->var_name = multiname_clone(&name);
5197 (yyval.exception) = e;
5200 int i = find_variable_safe(state, (yyvsp[(3) - (9)].id))->index;
5201 e->target = c = abc_nop(0);
5202 c = abc_setlocal(c, i);
5203 c = code_append(c, code_dup(state->method->scope_code));
5204 c = code_append(c, (yyvsp[(8) - (9)].code));
5218 /* Line 1464 of skeleton.m4 */
5219 #line 2462 "parser.y"
5220 {PASS12 new_state();state->exception_name=0;}
5229 /* Line 1464 of skeleton.m4 */
5230 #line 2462 "parser.y"
5232 (yyvsp[(4) - (5)].code) = var_block((yyvsp[(4) - (5)].code));
5233 if(!(yyvsp[(4) - (5)].code)) {
5234 (yyval.exception)=0;
5236 NEW(abc_exception_t, e)
5237 e->exc_type = 0; //all exceptions
5238 e->var_name = 0; //no name
5241 e->to = code_append(e->to, (yyvsp[(4) - (5)].code));
5242 (yyval.exception) = e;
5254 /* Line 1464 of skeleton.m4 */
5255 #line 2478 "parser.y"
5256 {(yyval.catch_list).l=list_new();(yyval.catch_list).finally=0;list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));}
5265 /* Line 1464 of skeleton.m4 */
5266 #line 2479 "parser.y"
5267 {(yyval.catch_list)=(yyvsp[(1) - (2)].catch_list);list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));}
5276 /* Line 1464 of skeleton.m4 */
5277 #line 2480 "parser.y"
5278 {(yyval.catch_list)=(yyvsp[(1) - (1)].catch_list);}
5287 /* Line 1464 of skeleton.m4 */
5288 #line 2481 "parser.y"
5290 (yyval.catch_list) = (yyvsp[(1) - (2)].catch_list);
5291 (yyval.catch_list).finally = 0;
5292 if((yyvsp[(2) - (2)].exception)) {
5293 list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));
5294 (yyval.catch_list).finally = (yyvsp[(2) - (2)].exception)->to;(yyvsp[(2) - (2)].exception)->to=0;
5305 /* Line 1464 of skeleton.m4 */
5306 #line 2489 "parser.y"
5308 (yyval.catch_list).l=list_new();
5309 (yyval.catch_list).finally = 0;
5310 if((yyvsp[(1) - (1)].exception)) {
5311 list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));
5312 (yyval.catch_list).finally = (yyvsp[(1) - (1)].exception)->to;(yyvsp[(1) - (1)].exception)->to=0;
5323 /* Line 1464 of skeleton.m4 */
5324 #line 2498 "parser.y"
5325 {PASS12 new_state();
5326 state->method->has_exceptions=1;
5327 state->method->late_binding=1;//for invariant scope_code
5337 /* Line 1464 of skeleton.m4 */
5338 #line 2501 "parser.y"
5340 code_t*out = abc_nop(0);
5342 code_t*start = abc_nop(0);
5343 (yyval.code) = code_append(start, (yyvsp[(4) - (6)].code));
5344 if(!is_break_or_jump((yyvsp[(4) - (6)].code))) {
5345 (yyval.code) = abc_jump((yyval.code), out);
5347 code_t*end = (yyval.code) = abc_nop((yyval.code));
5350 if((yyvsp[(6) - (6)].catch_list).finally)
5351 tmp = new_variable("__finally__", 0, 0, 0);
5353 abc_exception_list_t*l = (yyvsp[(6) - (6)].catch_list).l;
5356 abc_exception_t*e = l->abc_exception;
5358 (yyval.code) = code_append((yyval.code), e->target);
5359 (yyval.code) = abc_jump((yyval.code), out);
5361 parserassert((ptroff_t)(yyvsp[(6) - (6)].catch_list).finally);
5363 e->target = (yyval.code) = abc_nop((yyval.code));
5364 (yyval.code) = code_append((yyval.code), code_dup(state->method->scope_code));
5365 (yyval.code) = abc___rethrow__((yyval.code));
5373 (yyval.code) = code_append((yyval.code), out);
5375 (yyval.code) = insert_finally((yyval.code), (yyvsp[(6) - (6)].catch_list).finally, tmp);
5377 list_concat(state->method->exceptions, (yyvsp[(6) - (6)].catch_list).l);
5379 (yyval.code) = var_block((yyval.code));
5390 /* Line 1464 of skeleton.m4 */
5391 #line 2547 "parser.y"
5393 (yyval.code)=(yyvsp[(2) - (2)].value).c;
5394 (yyval.code)=abc_throw((yyval.code));
5404 /* Line 1464 of skeleton.m4 */
5405 #line 2551 "parser.y"
5407 if(!state->exception_name)
5408 syntaxerror("re-throw only possible within a catch block");
5409 variable_t*v = find_variable(state, state->exception_name);
5410 (yyval.code)=code_new();
5411 (yyval.code)=abc_getlocal((yyval.code), v->index);
5412 (yyval.code)=abc_throw((yyval.code));
5422 /* Line 1464 of skeleton.m4 */
5423 #line 2562 "parser.y"
5426 if(state->method->has_exceptions) {
5427 int v = alloc_local();
5428 state->method->scope_code = abc_getlocal(state->method->scope_code, v);
5429 state->method->scope_code = abc_pushwith(state->method->scope_code);
5430 (yyval.value_list).number = v;
5432 (yyval.value_list).cc = (yyvsp[(3) - (4)].value).c;
5442 /* Line 1464 of skeleton.m4 */
5443 #line 2572 "parser.y"
5445 /* remove getlocal;pushwith from scope code again */
5446 state->method->scope_code = code_cutlast(code_cutlast(state->method->scope_code));
5448 (yyval.code) = (yyvsp[(1) - (2)].value_list).cc;
5449 if(state->method->has_exceptions) {
5450 (yyval.code) = abc_dup((yyval.code));
5451 (yyval.code) = abc_setlocal((yyval.code), (yyvsp[(1) - (2)].value_list).number);
5453 (yyval.code) = abc_pushwith((yyval.code));
5454 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (2)].code));
5455 (yyval.code) = abc_popscope((yyval.code));
5466 /* Line 1464 of skeleton.m4 */
5467 #line 2590 "parser.y"
5468 {PASS12 (yyval.id)="package";}
5477 /* Line 1464 of skeleton.m4 */
5478 #line 2591 "parser.y"
5479 {PASS12 (yyval.id)=(yyvsp[(1) - (1)].id);}
5488 /* Line 1464 of skeleton.m4 */
5489 #line 2593 "parser.y"
5490 {PASS12 (yyval.id) = concat3((yyvsp[(1) - (3)].id),".",(yyvsp[(3) - (3)].id));free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;}
5499 /* Line 1464 of skeleton.m4 */
5500 #line 2594 "parser.y"
5501 {PASS12 (yyval.id)=strdup((yyvsp[(1) - (1)].id));}
5510 /* Line 1464 of skeleton.m4 */
5511 #line 2596 "parser.y"
5512 {PASS12 startpackage((yyvsp[(2) - (3)].id));free((yyvsp[(2) - (3)].id));(yyvsp[(2) - (3)].id)=0;}
5521 /* Line 1464 of skeleton.m4 */
5522 #line 2597 "parser.y"
5523 {PASS12 endpackage();(yyval.code)=0;}
5532 /* Line 1464 of skeleton.m4 */
5533 #line 2598 "parser.y"
5534 {PASS12 startpackage("");}
5543 /* Line 1464 of skeleton.m4 */
5544 #line 2599 "parser.y"
5545 {PASS12 endpackage();(yyval.code)=0;}
5554 /* Line 1464 of skeleton.m4 */
5555 #line 2621 "parser.y"
5558 slotinfo_t*s = registry_find((yyvsp[(2) - (2)].classinfo)->package, (yyvsp[(2) - (2)].classinfo)->name);
5559 if(!s && as3_pass==1) {// || !(s->flags&FLAG_BUILTIN)) {
5560 as3_schedule_class((yyvsp[(2) - (2)].classinfo)->package, (yyvsp[(2) - (2)].classinfo)->name);
5562 classinfo_t*c = (yyvsp[(2) - (2)].classinfo);
5564 syntaxerror("Couldn't import class\n");
5565 state_has_imports();
5566 dict_put(state->imports, c->name, c);
5567 import_toplevel(c->package);
5578 /* Line 1464 of skeleton.m4 */
5579 #line 2635 "parser.y"
5582 if(strncmp("flash.", (yyvsp[(2) - (4)].id), 6) && as3_pass==1) {
5583 as3_schedule_package((yyvsp[(2) - (4)].id));
5587 i->package = (yyvsp[(2) - (4)].id);
5588 state_has_imports();
5589 list_append(state->wildcard_imports, i);
5590 import_toplevel(i->package);
5601 /* Line 1464 of skeleton.m4 */
5602 #line 2651 "parser.y"
5603 {PASS12 (yyval.flags).flags=0;(yyval.flags).ns=0;}
5612 /* Line 1464 of skeleton.m4 */
5613 #line 2652 "parser.y"
5614 {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
5623 /* Line 1464 of skeleton.m4 */
5624 #line 2653 "parser.y"
5625 {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
5634 /* Line 1464 of skeleton.m4 */
5635 #line 2654 "parser.y"
5638 (yyval.flags).flags=(yyvsp[(1) - (2)].flags).flags|(yyvsp[(2) - (2)].flags).flags;
5639 if((yyvsp[(1) - (2)].flags).ns && (yyvsp[(2) - (2)].flags).ns) syntaxerror("only one namespace allowed in one declaration");
5640 (yyval.flags).ns=(yyvsp[(1) - (2)].flags).ns?(yyvsp[(1) - (2)].flags).ns:(yyvsp[(2) - (2)].flags).ns;
5651 /* Line 1464 of skeleton.m4 */
5652 #line 2661 "parser.y"
5653 {PASS12 (yyval.flags).flags=FLAG_PUBLIC;(yyval.flags).ns=0;}
5662 /* Line 1464 of skeleton.m4 */
5663 #line 2662 "parser.y"
5664 {PASS12 (yyval.flags).flags=FLAG_PRIVATE;(yyval.flags).ns=0;}
5673 /* Line 1464 of skeleton.m4 */
5674 #line 2663 "parser.y"
5675 {PASS12 (yyval.flags).flags=FLAG_PROTECTED;(yyval.flags).ns=0;}
5684 /* Line 1464 of skeleton.m4 */
5685 #line 2664 "parser.y"
5686 {PASS12 (yyval.flags).flags=FLAG_STATIC;(yyval.flags).ns=0;}
5695 /* Line 1464 of skeleton.m4 */
5696 #line 2665 "parser.y"
5697 {PASS12 (yyval.flags).flags=FLAG_DYNAMIC;(yyval.flags).ns=0;}
5706 /* Line 1464 of skeleton.m4 */
5707 #line 2666 "parser.y"
5708 {PASS12 (yyval.flags).flags=FLAG_FINAL;(yyval.flags).ns=0;}
5717 /* Line 1464 of skeleton.m4 */
5718 #line 2667 "parser.y"
5719 {PASS12 (yyval.flags).flags=FLAG_OVERRIDE;(yyval.flags).ns=0;}
5728 /* Line 1464 of skeleton.m4 */
5729 #line 2668 "parser.y"
5730 {PASS12 (yyval.flags).flags=FLAG_NATIVE;(yyval.flags).ns=0;}
5739 /* Line 1464 of skeleton.m4 */
5740 #line 2669 "parser.y"
5741 {PASS12 (yyval.flags).flags=FLAG_PACKAGEINTERNAL;(yyval.flags).ns=0;}
5750 /* Line 1464 of skeleton.m4 */
5751 #line 2670 "parser.y"
5752 {PASS12 (yyval.flags).flags=FLAG_NAMESPACE;
5753 (yyval.flags).ns=(yyvsp[(1) - (1)].id);
5763 /* Line 1464 of skeleton.m4 */
5764 #line 2674 "parser.y"
5765 {PASS12 (yyval.classinfo)=0;}
5774 /* Line 1464 of skeleton.m4 */
5775 #line 2675 "parser.y"
5776 {PASS12 (yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
5785 /* Line 1464 of skeleton.m4 */
5786 #line 2677 "parser.y"
5787 {PASS12 (yyval.classinfo_list)=list_new();}
5796 /* Line 1464 of skeleton.m4 */
5797 #line 2678 "parser.y"
5798 {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
5807 /* Line 1464 of skeleton.m4 */
5808 #line 2680 "parser.y"
5809 {PASS12 (yyval.classinfo_list)=list_new();}
5818 /* Line 1464 of skeleton.m4 */
5819 #line 2681 "parser.y"
5820 {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
5829 /* Line 1464 of skeleton.m4 */
5830 #line 2685 "parser.y"
5831 {PASS12 startclass(&(yyvsp[(1) - (6)].flags),(yyvsp[(3) - (6)].id),(yyvsp[(4) - (6)].classinfo),(yyvsp[(5) - (6)].classinfo_list));}
5840 /* Line 1464 of skeleton.m4 */
5841 #line 2687 "parser.y"
5842 {PASS12 endclass();(yyval.code)=0;}
5851 /* Line 1464 of skeleton.m4 */
5852 #line 2691 "parser.y"
5853 {PASS12 (yyvsp[(1) - (5)].flags).flags|=FLAG_INTERFACE;
5854 startclass(&(yyvsp[(1) - (5)].flags),(yyvsp[(3) - (5)].id),0,(yyvsp[(4) - (5)].classinfo_list));}
5863 /* Line 1464 of skeleton.m4 */
5864 #line 2694 "parser.y"
5865 {PASS12 endclass();(yyval.code)=0;}
5874 /* Line 1464 of skeleton.m4 */
5875 #line 2703 "parser.y"
5876 {PASS_ALWAYS as3_pass=(yyvsp[(1) - (4)].number_int);}
5885 /* Line 1464 of skeleton.m4 */
5886 #line 2707 "parser.y"
5888 code_t*c = state->cls->static_init->header;
5889 c = code_append(c, (yyvsp[(1) - (1)].code));
5890 state->cls->static_init->header = c;
5900 /* Line 1464 of skeleton.m4 */
5901 #line 2718 "parser.y"
5903 syntaxerror("variable declarations not allowed in interfaces");
5913 /* Line 1464 of skeleton.m4 */
5914 #line 2721 "parser.y"
5917 (yyvsp[(1) - (8)].flags).flags |= FLAG_PUBLIC;
5918 if((yyvsp[(1) - (8)].flags).flags&(FLAG_PRIVATE|FLAG_PACKAGEINTERNAL|FLAG_PROTECTED)) {
5919 syntaxerror("invalid method modifiers: interface methods always need to be public");
5921 startfunction(&(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo));
5922 endfunction(&(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo), 0);
5923 list_deep_free((yyvsp[(6) - (8)].params).list);
5933 /* Line 1464 of skeleton.m4 */
5934 #line 2755 "parser.y"
5935 {PASS12 setslotstate(&(yyvsp[(1) - (2)].flags),(yyvsp[(2) - (2)].token));}
5944 /* Line 1464 of skeleton.m4 */
5945 #line 2755 "parser.y"
5946 {PASS12 (yyval.code)=(yyvsp[(4) - (4)].code);setslotstate(0, 0);}
5955 /* Line 1464 of skeleton.m4 */
5956 #line 2757 "parser.y"
5957 {PASS12 (yyval.code)=0;}
5966 /* Line 1464 of skeleton.m4 */
5967 #line 2758 "parser.y"
5968 {PASS12 (yyval.code)=0;}
5977 /* Line 1464 of skeleton.m4 */
5978 #line 2761 "parser.y"
5981 int flags = slotstate_flags->flags;
5982 namespace_t ns = modifiers2access(slotstate_flags);
5986 varinfo_t* info = 0;
5988 memberinfo_t*i = registry_findmember(state->cls->info, ns.name, (yyvsp[(1) - (3)].id), 1);
5990 check_override(i, flags);
5992 info = varinfo_register_onclass(state->cls->info, ns.access, ns.name, (yyvsp[(1) - (3)].id));
5994 slotinfo_t*i = registry_find(state->package, (yyvsp[(1) - (3)].id));
5996 syntaxerror("package %s already contains '%s'", state->package, (yyvsp[(1) - (3)].id));
5998 if(ns.name && ns.name[0]) {
5999 syntaxerror("namespaces not allowed on package-level variables");
6001 info = varinfo_register_global(ns.access, state->package, (yyvsp[(1) - (3)].id));
6004 info->type = (yyvsp[(2) - (3)].classinfo);
6005 info->flags = flags;
6007 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, info);
6011 varinfo_t*info = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
6014 multiname_t mname = {QNAME, &ns, 0, (yyvsp[(1) - (3)].id)};
6016 trait_list_t**traits;
6020 ns.name = state->package;
6021 traits = &global->init->traits;
6022 code = &global->init->method->body->code;
6023 } else if(flags&FLAG_STATIC) {
6025 traits = &state->cls->abc->static_traits;
6026 code = &state->cls->static_init->header;
6028 // instance variable
6029 traits = &state->cls->abc->traits;
6030 code = &state->cls->init->header;
6034 if((yyvsp[(2) - (3)].classinfo)) {
6035 MULTINAME(m, (yyvsp[(2) - (3)].classinfo));
6036 t = trait_new_member(traits, multiname_clone(&m), multiname_clone(&mname), 0);
6038 t = trait_new_member(traits, 0, multiname_clone(&mname), 0);
6040 info->slot = t->slot_id;
6042 /* initalization code (if needed) */
6044 if((yyvsp[(3) - (3)].value).c && !is_pushundefined((yyvsp[(3) - (3)].value).c)) {
6045 c = abc_getlocal_0(c);
6046 c = code_append(c, (yyvsp[(3) - (3)].value).c);
6047 c = converttype(c, (yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo));
6048 c = abc_setslot(c, t->slot_id);
6051 *code = code_append(*code, c);
6053 if(slotstate_varconst==KW_CONST) {
6054 t->kind= TRAIT_CONST;
6068 /* Line 1464 of skeleton.m4 */
6069 #line 2845 "parser.y"
6070 {(yyval.constant)=0;}
6079 /* Line 1464 of skeleton.m4 */
6080 #line 2846 "parser.y"
6081 {(yyval.constant)=(yyvsp[(2) - (2)].constant);}
6090 /* Line 1464 of skeleton.m4 */
6091 #line 2848 "parser.y"
6092 {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_uint));}
6101 /* Line 1464 of skeleton.m4 */
6102 #line 2849 "parser.y"
6103 {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_int));}
6112 /* Line 1464 of skeleton.m4 */
6113 #line 2850 "parser.y"
6114 {(yyval.constant) = constant_new_uint((yyvsp[(1) - (1)].number_uint));}
6123 /* Line 1464 of skeleton.m4 */
6124 #line 2851 "parser.y"
6125 {(yyval.constant) = constant_new_float((yyvsp[(1) - (1)].number_float));}
6134 /* Line 1464 of skeleton.m4 */
6135 #line 2852 "parser.y"
6136 {(yyval.constant) = constant_new_string2((yyvsp[(1) - (1)].str).str,(yyvsp[(1) - (1)].str).len);free((char*)(yyvsp[(1) - (1)].str).str);}
6145 /* Line 1464 of skeleton.m4 */
6146 #line 2854 "parser.y"
6147 {(yyval.constant) = constant_new_true((yyvsp[(1) - (1)].token));}
6156 /* Line 1464 of skeleton.m4 */
6157 #line 2855 "parser.y"
6158 {(yyval.constant) = constant_new_false((yyvsp[(1) - (1)].token));}
6167 /* Line 1464 of skeleton.m4 */
6168 #line 2856 "parser.y"
6169 {(yyval.constant) = constant_new_null((yyvsp[(1) - (1)].token));}
6178 /* Line 1464 of skeleton.m4 */
6179 #line 2857 "parser.y"
6181 if(!strcmp((yyvsp[(1) - (1)].id), "NaN")) {
6182 (yyval.constant) = constant_new_float(__builtin_nan(""));
6184 as3_warning("Couldn't evaluate constant value of %s", (yyvsp[(1) - (1)].id));
6185 (yyval.constant) = constant_new_null((yyvsp[(1) - (1)].id));
6196 /* Line 1464 of skeleton.m4 */
6197 #line 2869 "parser.y"
6200 memset(&(yyval.params),0,sizeof((yyval.params)));
6210 /* Line 1464 of skeleton.m4 */
6211 #line 2873 "parser.y"
6214 (yyval.params)=(yyvsp[(1) - (1)].params);
6224 /* Line 1464 of skeleton.m4 */
6225 #line 2879 "parser.y"
6228 memset(&(yyval.params),0,sizeof((yyval.params)));
6229 (yyval.params).varargs=1;
6230 list_append((yyval.params).list, (yyvsp[(2) - (2)].param));
6240 /* Line 1464 of skeleton.m4 */
6241 #line 2885 "parser.y"
6244 (yyval.params) =(yyvsp[(1) - (4)].params);
6245 (yyval.params).varargs=1;
6246 list_append((yyval.params).list, (yyvsp[(4) - (4)].param));
6256 /* Line 1464 of skeleton.m4 */
6257 #line 2893 "parser.y"
6260 (yyval.params) = (yyvsp[(1) - (3)].params);
6261 list_append((yyval.params).list, (yyvsp[(3) - (3)].param));
6271 /* Line 1464 of skeleton.m4 */
6272 #line 2898 "parser.y"
6275 memset(&(yyval.params),0,sizeof((yyval.params)));
6276 list_append((yyval.params).list, (yyvsp[(1) - (1)].param));
6286 /* Line 1464 of skeleton.m4 */
6287 #line 2904 "parser.y"
6290 (yyval.param) = rfx_calloc(sizeof(param_t));
6291 (yyval.param)->name=(yyvsp[(1) - (4)].id);
6292 (yyval.param)->type = (yyvsp[(3) - (4)].classinfo);
6294 (yyval.param)->value = (yyvsp[(4) - (4)].constant);
6304 /* Line 1464 of skeleton.m4 */
6305 #line 2912 "parser.y"
6308 (yyval.param) = rfx_calloc(sizeof(param_t));
6309 (yyval.param)->name=(yyvsp[(1) - (2)].id);
6310 (yyval.param)->type = TYPE_ANY;
6312 (yyval.param)->value = (yyvsp[(2) - (2)].constant);
6322 /* Line 1464 of skeleton.m4 */
6323 #line 2922 "parser.y"
6324 {PASS12 (yyval.token)=0;}
6333 /* Line 1464 of skeleton.m4 */
6334 #line 2925 "parser.y"
6335 {PASS12 startfunction(&(yyvsp[(1) - (9)].flags),(yyvsp[(3) - (9)].token),(yyvsp[(4) - (9)].id),&(yyvsp[(6) - (9)].params),(yyvsp[(8) - (9)].classinfo));}
6344 /* Line 1464 of skeleton.m4 */
6345 #line 2926 "parser.y"
6348 endfunction(&(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),0,0);
6350 if(!state->method->info) syntaxerror("internal error");
6352 code_t*c = method_header(state->method);
6353 c = wrap_function(c, 0, (yyvsp[(11) - (12)].code));
6355 endfunction(&(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),(yyvsp[(8) - (12)].classinfo),c);
6357 list_deep_free((yyvsp[(6) - (12)].params).list);
6368 /* Line 1464 of skeleton.m4 */
6369 #line 2942 "parser.y"
6370 {PASS12 (yyval.id)=0;}
6379 /* Line 1464 of skeleton.m4 */
6380 #line 2944 "parser.y"
6381 {PASS12 innerfunction((yyvsp[(2) - (7)].id),&(yyvsp[(4) - (7)].params),(yyvsp[(6) - (7)].classinfo));}
6390 /* Line 1464 of skeleton.m4 */
6391 #line 2945 "parser.y"
6394 endfunction(0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),0,0);
6396 methodinfo_t*f = state->method->info;
6397 if(!f || !f->kind) syntaxerror("internal error");
6399 code_t*c = method_header(state->method);
6400 c = wrap_function(c, 0, (yyvsp[(9) - (10)].code));
6402 int index = state->method->var_index;
6403 endfunction(0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),(yyvsp[(6) - (10)].classinfo),c);
6405 (yyval.value).c = abc_getlocal(0, index);
6406 (yyval.value).t = TYPE_FUNCTION(f);
6408 PASS12 list_deep_free((yyvsp[(4) - (10)].params).list);
6418 /* Line 1464 of skeleton.m4 */
6419 #line 2967 "parser.y"
6421 PASS1 NEW(unresolvedinfo_t,c);
6422 memset(c, 0, sizeof(*c));
6423 c->kind = INFOTYPE_UNRESOLVED;
6424 c->name = (yyvsp[(1) - (1)].id);
6425 c->package = get_package_from_name((yyvsp[(1) - (1)].id));
6427 c->nsset = get_current_imports();
6428 /* make the compiler look for this class in the current directory,
6430 as3_schedule_class_noerror(state->package, (yyvsp[(1) - (1)].id));
6432 (yyval.classinfo) = (classinfo_t*)c;
6434 slotinfo_t*s = find_class((yyvsp[(1) - (1)].id));
6435 if(!s) syntaxerror("Could not find class/method %s (current package: %s)\n", (yyvsp[(1) - (1)].id), state->package);
6436 (yyval.classinfo) = (classinfo_t*)s;
6446 /* Line 1464 of skeleton.m4 */
6447 #line 2986 "parser.y"
6449 PASS1 NEW(unresolvedinfo_t,c);
6450 memset(c, 0, sizeof(*c));
6451 c->kind = INFOTYPE_UNRESOLVED;
6452 c->package = (yyvsp[(1) - (3)].id);
6453 c->name = (yyvsp[(3) - (3)].id);
6454 (yyval.classinfo) = (classinfo_t*)c;
6456 slotinfo_t*s = registry_find((yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
6457 if(!s) syntaxerror("Couldn't find class/method %s.%s\n", (yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
6458 free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;
6459 (yyval.classinfo) = (classinfo_t*)s;
6469 /* Line 1464 of skeleton.m4 */
6470 #line 3003 "parser.y"
6471 {PASS12 (yyval.classinfo_list)=list_new();list_append((yyval.classinfo_list), (yyvsp[(1) - (1)].classinfo));}
6480 /* Line 1464 of skeleton.m4 */
6481 #line 3004 "parser.y"
6482 {PASS12 (yyval.classinfo_list)=(yyvsp[(1) - (3)].classinfo_list);list_append((yyval.classinfo_list),(yyvsp[(3) - (3)].classinfo));}
6491 /* Line 1464 of skeleton.m4 */
6492 #line 3006 "parser.y"
6493 {PASS12 (yyval.classinfo)=(yyvsp[(1) - (1)].classinfo);}
6502 /* Line 1464 of skeleton.m4 */
6503 #line 3007 "parser.y"
6504 {PASS12 (yyval.classinfo)=registry_getanytype();}
6513 /* Line 1464 of skeleton.m4 */
6514 #line 3008 "parser.y"
6515 {PASS12 (yyval.classinfo)=registry_getanytype();}
6524 /* Line 1464 of skeleton.m4 */
6525 #line 3017 "parser.y"
6526 {PASS12 (yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
6535 /* Line 1464 of skeleton.m4 */
6536 #line 3018 "parser.y"
6537 {PASS12 (yyval.classinfo)=0;}
6546 /* Line 1464 of skeleton.m4 */
6547 #line 3022 "parser.y"
6548 {(yyval.value_list).cc=0;(yyval.value_list).number=0;}
6557 /* Line 1464 of skeleton.m4 */
6558 #line 3023 "parser.y"
6559 {(yyval.value_list)=(yyvsp[(2) - (3)].value_list);}
6568 /* Line 1464 of skeleton.m4 */
6569 #line 3025 "parser.y"
6570 {(yyval.value_list).cc=0;(yyval.value_list).number=0;}
6579 /* Line 1464 of skeleton.m4 */
6580 #line 3029 "parser.y"
6581 {(yyval.value_list).number=1;
6582 (yyval.value_list).cc = (yyvsp[(1) - (1)].value).c;
6592 /* Line 1464 of skeleton.m4 */
6593 #line 3033 "parser.y"
6594 {(yyval.value_list) = (yyvsp[(1) - (2)].value_list);}
6603 /* Line 1464 of skeleton.m4 */
6604 #line 3034 "parser.y"
6606 (yyval.value_list).number= (yyvsp[(1) - (2)].value_list).number+1;
6607 (yyval.value_list).cc = code_append((yyvsp[(1) - (2)].value_list).cc, (yyvsp[(2) - (2)].value).c);
6617 /* Line 1464 of skeleton.m4 */
6618 #line 3040 "parser.y"
6620 (yyval.value).c = (yyvsp[(2) - (4)].value).c;
6621 if((yyval.value).c->opcode == OPCODE_COERCE_A) (yyval.value).c = code_cutlast((yyval.value).c);
6623 code_t*paramcode = (yyvsp[(4) - (4)].value_list).cc;
6624 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6625 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6626 (yyval.value).c = code_cutlast((yyval.value).c);
6627 (yyval.value).c = code_append((yyval.value).c, paramcode);
6628 (yyval.value).c = abc_constructprop2((yyval.value).c, name, (yyvsp[(4) - (4)].value_list).number);
6629 multiname_destroy(name);
6630 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
6631 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6632 trait_t*t = traits_find_slotid(state->cls->abc->traits,slot);//FIXME
6633 multiname_t*name = t->name;
6634 (yyval.value).c = code_cutlast((yyval.value).c);
6635 (yyval.value).c = code_append((yyval.value).c, paramcode);
6636 (yyval.value).c = abc_constructprop2((yyval.value).c, name, (yyvsp[(4) - (4)].value_list).number);
6638 (yyval.value).c = code_append((yyval.value).c, paramcode);
6639 (yyval.value).c = abc_construct((yyval.value).c, (yyvsp[(4) - (4)].value_list).number);
6642 (yyval.value).t = TYPE_ANY;
6643 if(TYPE_IS_CLASS((yyvsp[(2) - (4)].value).t) && (yyvsp[(2) - (4)].value).t->data) {
6644 (yyval.value).t = (yyvsp[(2) - (4)].value).t->data;
6646 (yyval.value).c = abc_coerce_a((yyval.value).c);
6647 (yyval.value).t = TYPE_ANY;
6658 /* Line 1464 of skeleton.m4 */
6659 #line 3076 "parser.y"
6662 (yyval.value).c = (yyvsp[(1) - (4)].value).c;
6663 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
6664 (yyval.value).c = code_cutlast((yyval.value).c);
6666 code_t*paramcode = (yyvsp[(3) - (4)].value_list).cc;
6668 (yyval.value).t = TYPE_ANY;
6669 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6670 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6671 (yyval.value).c = code_cutlast((yyval.value).c);
6672 (yyval.value).c = code_append((yyval.value).c, paramcode);
6673 (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).number);
6674 multiname_destroy(name);
6675 } else if((yyval.value).c->opcode == OPCODE_GETSLOT && (yyval.value).c->prev->opcode != OPCODE_GETSCOPEOBJECT) {
6676 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6677 trait_t*t = traits_find_slotid(state->cls->abc->traits,slot);
6678 if(t->kind!=TRAIT_METHOD) {
6679 //ok: flash allows to assign closures to members.
6681 multiname_t*name = t->name;
6682 (yyval.value).c = code_cutlast((yyval.value).c);
6683 (yyval.value).c = code_append((yyval.value).c, paramcode);
6684 //$$.c = abc_callmethod($$.c, t->method, len); //#1051 illegal early access binding
6685 (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).number);
6686 } else if((yyval.value).c->opcode == OPCODE_GETSUPER) {
6687 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6688 (yyval.value).c = code_cutlast((yyval.value).c);
6689 (yyval.value).c = code_append((yyval.value).c, paramcode);
6690 (yyval.value).c = abc_callsuper2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).number);
6691 multiname_destroy(name);
6693 (yyval.value).c = abc_getglobalscope((yyval.value).c);
6694 (yyval.value).c = code_append((yyval.value).c, paramcode);
6695 (yyval.value).c = abc_call((yyval.value).c, (yyvsp[(3) - (4)].value_list).number);
6698 if(TYPE_IS_FUNCTION((yyvsp[(1) - (4)].value).t) && (yyvsp[(1) - (4)].value).t->data) {
6699 (yyval.value).t = ((methodinfo_t*)((yyvsp[(1) - (4)].value).t->data))->return_type;
6701 (yyval.value).c = abc_coerce_a((yyval.value).c);
6702 (yyval.value).t = TYPE_ANY;
6713 /* Line 1464 of skeleton.m4 */
6714 #line 3122 "parser.y"
6716 if(!state->cls) syntaxerror("super() not allowed outside of a class");
6717 if(!state->method) syntaxerror("super() not allowed outside of a function");
6718 if(!state->method->is_constructor) syntaxerror("super() not allowed outside of a constructor");
6720 (yyval.value).c = code_new();
6721 (yyval.value).c = abc_getlocal_0((yyval.value).c);
6723 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value_list).cc);
6725 this is dependent on the control path, check this somewhere else
6726 if(state->method->has_super)
6727 syntaxerror("constructor may call super() only once");
6729 state->method->has_super = 1;
6731 (yyval.value).c = abc_constructsuper((yyval.value).c, (yyvsp[(3) - (4)].value_list).number);
6732 (yyval.value).c = abc_pushundefined((yyval.value).c);
6733 (yyval.value).t = TYPE_ANY;
6743 /* Line 1464 of skeleton.m4 */
6744 #line 3143 "parser.y"
6746 (yyval.value).c = (yyvsp[(2) - (2)].value).c;
6747 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
6748 (yyval.value).c = code_cutlast((yyval.value).c);
6750 multiname_t*name = 0;
6751 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6752 (yyval.value).c->opcode = OPCODE_DELETEPROPERTY;
6753 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
6754 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6755 multiname_t*name = traits_find_slotid(state->cls->abc->traits,slot)->name;
6756 (yyval.value).c = code_cutlast((yyval.value).c);
6757 (yyval.value).c = abc_deleteproperty2((yyval.value).c, name);
6759 (yyval.value).c = abc_getlocal_0((yyval.value).c);
6760 MULTINAME_LATE(m, (yyvsp[(2) - (2)].value).t?(yyvsp[(2) - (2)].value).t->access:ACCESS_PACKAGE, "");
6761 (yyval.value).c = abc_deleteproperty2((yyval.value).c, &m);
6763 (yyval.value).t = TYPE_BOOLEAN;
6773 /* Line 1464 of skeleton.m4 */
6774 #line 3164 "parser.y"
6776 (yyval.code) = abc_returnvoid(0);
6786 /* Line 1464 of skeleton.m4 */
6787 #line 3167 "parser.y"
6789 (yyval.code) = (yyvsp[(2) - (2)].value).c;
6790 (yyval.code) = abc_returnvalue((yyval.code));
6800 /* Line 1464 of skeleton.m4 */
6801 #line 3174 "parser.y"
6802 {(yyval.value)=(yyvsp[(1) - (1)].value);}
6811 /* Line 1464 of skeleton.m4 */
6812 #line 3175 "parser.y"
6813 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6822 /* Line 1464 of skeleton.m4 */
6823 #line 3176 "parser.y"
6825 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
6826 (yyval.value).c = cut_last_push((yyval.value).c);
6827 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
6828 (yyval.value).t = (yyvsp[(3) - (3)].value).t;
6838 /* Line 1464 of skeleton.m4 */
6839 #line 3182 "parser.y"
6841 (yyval.code)=cut_last_push((yyvsp[(1) - (1)].value).c);
6851 /* Line 1464 of skeleton.m4 */
6852 #line 3188 "parser.y"
6853 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6862 /* Line 1464 of skeleton.m4 */
6863 #line 3190 "parser.y"
6864 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6873 /* Line 1464 of skeleton.m4 */
6874 #line 3191 "parser.y"
6875 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6884 /* Line 1464 of skeleton.m4 */
6885 #line 3192 "parser.y"
6886 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6895 /* Line 1464 of skeleton.m4 */
6896 #line 3196 "parser.y"
6898 (yyval.value).c = 0;
6899 namespace_t ns = {ACCESS_PACKAGE, ""};
6900 multiname_t m = {QNAME, &ns, 0, "RegExp"};
6901 if(!(yyvsp[(1) - (1)].regexp).options) {
6902 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
6903 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).pattern);
6904 (yyval.value).c = abc_construct((yyval.value).c, 1);
6906 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
6907 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).pattern);
6908 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).options);
6909 (yyval.value).c = abc_construct((yyval.value).c, 2);
6911 (yyval.value).t = TYPE_REGEXP;
6921 /* Line 1464 of skeleton.m4 */
6922 #line 3213 "parser.y"
6923 {(yyval.value).c = abc_pushbyte(0, (yyvsp[(1) - (1)].number_uint));
6924 //MULTINAME(m, registry_getintclass());
6925 //$$.c = abc_coerce2($$.c, &m); // FIXME
6926 (yyval.value).t = TYPE_INT;
6936 /* Line 1464 of skeleton.m4 */
6937 #line 3218 "parser.y"
6938 {(yyval.value).c = abc_pushshort(0, (yyvsp[(1) - (1)].number_uint));
6939 (yyval.value).t = TYPE_INT;
6949 /* Line 1464 of skeleton.m4 */
6950 #line 3221 "parser.y"
6951 {(yyval.value).c = abc_pushint(0, (yyvsp[(1) - (1)].number_int));
6952 (yyval.value).t = TYPE_INT;
6962 /* Line 1464 of skeleton.m4 */
6963 #line 3224 "parser.y"
6964 {(yyval.value).c = abc_pushuint(0, (yyvsp[(1) - (1)].number_uint));
6965 (yyval.value).t = TYPE_UINT;
6975 /* Line 1464 of skeleton.m4 */
6976 #line 3227 "parser.y"
6977 {(yyval.value).c = abc_pushdouble(0, (yyvsp[(1) - (1)].number_float));
6978 (yyval.value).t = TYPE_FLOAT;
6988 /* Line 1464 of skeleton.m4 */
6989 #line 3230 "parser.y"
6990 {(yyval.value).c = abc_pushstring2(0, &(yyvsp[(1) - (1)].str));free((char*)(yyvsp[(1) - (1)].str).str);
6991 (yyval.value).t = TYPE_STRING;
7001 /* Line 1464 of skeleton.m4 */
7002 #line 3233 "parser.y"
7003 {(yyval.value).c = abc_pushundefined(0);
7004 (yyval.value).t = TYPE_ANY;
7014 /* Line 1464 of skeleton.m4 */
7015 #line 3236 "parser.y"
7016 {(yyval.value).c = abc_pushtrue(0);
7017 (yyval.value).t = TYPE_BOOLEAN;
7027 /* Line 1464 of skeleton.m4 */
7028 #line 3239 "parser.y"
7029 {(yyval.value).c = abc_pushfalse(0);
7030 (yyval.value).t = TYPE_BOOLEAN;
7040 /* Line 1464 of skeleton.m4 */
7041 #line 3242 "parser.y"
7042 {(yyval.value).c = abc_pushnull(0);
7043 (yyval.value).t = TYPE_NULL;
7053 /* Line 1464 of skeleton.m4 */
7054 #line 3246 "parser.y"
7055 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterequals((yyval.value).c);(yyval.value).c=abc_not((yyval.value).c);
7056 (yyval.value).t = TYPE_BOOLEAN;
7066 /* Line 1464 of skeleton.m4 */
7067 #line 3249 "parser.y"
7068 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterthan((yyval.value).c);
7069 (yyval.value).t = TYPE_BOOLEAN;
7079 /* Line 1464 of skeleton.m4 */
7080 #line 3252 "parser.y"
7081 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterthan((yyval.value).c);(yyval.value).c=abc_not((yyval.value).c);
7082 (yyval.value).t = TYPE_BOOLEAN;
7092 /* Line 1464 of skeleton.m4 */
7093 #line 3255 "parser.y"
7094 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterequals((yyval.value).c);
7095 (yyval.value).t = TYPE_BOOLEAN;
7105 /* Line 1464 of skeleton.m4 */
7106 #line 3258 "parser.y"
7107 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_equals((yyval.value).c);
7108 (yyval.value).t = TYPE_BOOLEAN;
7118 /* Line 1464 of skeleton.m4 */
7119 #line 3261 "parser.y"
7120 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_strictequals((yyval.value).c);
7121 (yyval.value).t = TYPE_BOOLEAN;
7131 /* Line 1464 of skeleton.m4 */
7132 #line 3264 "parser.y"
7133 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_strictequals((yyval.value).c);(yyval.value).c = abc_not((yyval.value).c);
7134 (yyval.value).t = TYPE_BOOLEAN;
7144 /* Line 1464 of skeleton.m4 */
7145 #line 3267 "parser.y"
7146 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_equals((yyval.value).c);(yyval.value).c = abc_not((yyval.value).c);
7147 (yyval.value).t = TYPE_BOOLEAN;
7157 /* Line 1464 of skeleton.m4 */
7158 #line 3271 "parser.y"
7159 {(yyval.value).t = join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'O');
7160 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
7161 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(1) - (3)].value).t, (yyval.value).t);
7162 (yyval.value).c = abc_dup((yyval.value).c);
7163 code_t*jmp = (yyval.value).c = abc_iftrue((yyval.value).c, 0);
7164 (yyval.value).c = cut_last_push((yyval.value).c);
7165 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
7166 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (3)].value).t, (yyval.value).t);
7167 code_t*label = (yyval.value).c = abc_label((yyval.value).c);
7168 jmp->branch = label;
7178 /* Line 1464 of skeleton.m4 */
7179 #line 3282 "parser.y"
7181 (yyval.value).t = join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'A');
7182 /*printf("%08x:\n",$1.t);
7183 code_dump($1.c, 0, 0, "", stdout);
7184 printf("%08x:\n",$3.t);
7185 code_dump($3.c, 0, 0, "", stdout);
7186 printf("joining %08x and %08x to %08x\n", $1.t, $3.t, $$.t);*/
7187 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
7188 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(1) - (3)].value).t, (yyval.value).t);
7189 (yyval.value).c = abc_dup((yyval.value).c);
7190 code_t*jmp = (yyval.value).c = abc_iffalse((yyval.value).c, 0);
7191 (yyval.value).c = cut_last_push((yyval.value).c);
7192 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
7193 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (3)].value).t, (yyval.value).t);
7194 code_t*label = (yyval.value).c = abc_label((yyval.value).c);
7195 jmp->branch = label;
7205 /* Line 1464 of skeleton.m4 */
7206 #line 3300 "parser.y"
7207 {(yyval.value).c=(yyvsp[(2) - (2)].value).c;
7208 (yyval.value).c = abc_not((yyval.value).c);
7209 (yyval.value).t = TYPE_BOOLEAN;
7219 /* Line 1464 of skeleton.m4 */
7220 #line 3305 "parser.y"
7221 {(yyval.value).c=(yyvsp[(2) - (2)].value).c;
7222 (yyval.value).c = abc_bitnot((yyval.value).c);
7223 (yyval.value).t = TYPE_INT;
7233 /* Line 1464 of skeleton.m4 */
7234 #line 3310 "parser.y"
7235 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7236 (yyval.value).c = abc_bitand((yyval.value).c);
7237 (yyval.value).t = TYPE_INT;
7247 /* Line 1464 of skeleton.m4 */
7248 #line 3315 "parser.y"
7249 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7250 (yyval.value).c = abc_bitxor((yyval.value).c);
7251 (yyval.value).t = TYPE_INT;
7261 /* Line 1464 of skeleton.m4 */
7262 #line 3320 "parser.y"
7263 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7264 (yyval.value).c = abc_bitor((yyval.value).c);
7265 (yyval.value).t = TYPE_INT;
7275 /* Line 1464 of skeleton.m4 */
7276 #line 3325 "parser.y"
7277 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7278 (yyval.value).c = abc_rshift((yyval.value).c);
7279 (yyval.value).t = TYPE_INT;
7289 /* Line 1464 of skeleton.m4 */
7290 #line 3329 "parser.y"
7291 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7292 (yyval.value).c = abc_urshift((yyval.value).c);
7293 (yyval.value).t = TYPE_INT;
7303 /* Line 1464 of skeleton.m4 */
7304 #line 3333 "parser.y"
7305 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7306 (yyval.value).c = abc_lshift((yyval.value).c);
7307 (yyval.value).t = TYPE_INT;
7317 /* Line 1464 of skeleton.m4 */
7318 #line 3338 "parser.y"
7319 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7320 (yyval.value).c = abc_divide((yyval.value).c);
7321 (yyval.value).t = TYPE_NUMBER;
7331 /* Line 1464 of skeleton.m4 */
7332 #line 3342 "parser.y"
7333 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7334 (yyval.value).c = abc_modulo((yyval.value).c);
7335 (yyval.value).t = TYPE_NUMBER;
7345 /* Line 1464 of skeleton.m4 */
7346 #line 3346 "parser.y"
7347 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7348 if(BOTH_INT((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t)) {
7349 (yyval.value).c = abc_add_i((yyval.value).c);
7350 (yyval.value).t = TYPE_INT;
7352 (yyval.value).c = abc_add((yyval.value).c);
7353 (yyval.value).t = join_types((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t,'+');
7364 /* Line 1464 of skeleton.m4 */
7365 #line 3355 "parser.y"
7366 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7367 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
7368 (yyval.value).c = abc_subtract_i((yyval.value).c);
7369 (yyval.value).t = TYPE_INT;
7371 (yyval.value).c = abc_subtract((yyval.value).c);
7372 (yyval.value).t = TYPE_NUMBER;
7383 /* Line 1464 of skeleton.m4 */
7384 #line 3364 "parser.y"
7385 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7386 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
7387 (yyval.value).c = abc_multiply_i((yyval.value).c);
7388 (yyval.value).t = TYPE_INT;
7390 (yyval.value).c = abc_multiply((yyval.value).c);
7391 (yyval.value).t = TYPE_NUMBER;
7402 /* Line 1464 of skeleton.m4 */
7403 #line 3374 "parser.y"
7404 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7405 (yyval.value).c = abc_in((yyval.value).c);
7406 (yyval.value).t = TYPE_BOOLEAN;
7416 /* Line 1464 of skeleton.m4 */
7417 #line 3379 "parser.y"
7418 {char use_astype=0; // flash player's astype works differently than astypelate
7419 if(use_astype && TYPE_IS_CLASS((yyvsp[(3) - (3)].value).t) && (yyvsp[(3) - (3)].value).t->data) {
7420 MULTINAME(m, (classinfo_t*)((yyvsp[(3) - (3)].value).t->data));
7421 (yyval.value).c = abc_astype2((yyvsp[(1) - (3)].value).c, &m);
7422 (yyval.value).t = (yyvsp[(3) - (3)].value).t->data;
7424 (yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
7425 (yyval.value).c = abc_astypelate((yyval.value).c);
7426 (yyval.value).t = TYPE_ANY;
7437 /* Line 1464 of skeleton.m4 */
7438 #line 3392 "parser.y"
7439 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
7440 (yyval.value).c = abc_instanceof((yyval.value).c);
7441 (yyval.value).t = TYPE_BOOLEAN;
7451 /* Line 1464 of skeleton.m4 */
7452 #line 3397 "parser.y"
7453 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
7454 (yyval.value).c = abc_istypelate((yyval.value).c);
7455 (yyval.value).t = TYPE_BOOLEAN;
7465 /* Line 1464 of skeleton.m4 */
7466 #line 3402 "parser.y"
7468 (yyval.value).c = (yyvsp[(3) - (4)].value).c;
7469 (yyval.value).c = abc_typeof((yyval.value).c);
7470 (yyval.value).t = TYPE_STRING;
7480 /* Line 1464 of skeleton.m4 */
7481 #line 3408 "parser.y"
7483 (yyval.value).c = cut_last_push((yyvsp[(2) - (2)].value).c);
7484 (yyval.value).c = abc_pushundefined((yyval.value).c);
7485 (yyval.value).t = TYPE_ANY;
7495 /* Line 1464 of skeleton.m4 */
7496 #line 3414 "parser.y"
7497 { (yyval.value).c = abc_pushundefined(0);
7498 (yyval.value).t = TYPE_ANY;
7508 /* Line 1464 of skeleton.m4 */
7509 #line 3418 "parser.y"
7510 {(yyval.value)=(yyvsp[(2) - (3)].value);}
7519 /* Line 1464 of skeleton.m4 */
7520 #line 3420 "parser.y"
7522 (yyval.value).c = (yyvsp[(2) - (2)].value).c;
7523 if(IS_INT((yyvsp[(2) - (2)].value).t)) {
7524 (yyval.value).c=abc_negate_i((yyval.value).c);
7525 (yyval.value).t = TYPE_INT;
7527 (yyval.value).c=abc_negate((yyval.value).c);
7528 (yyval.value).t = TYPE_NUMBER;
7539 /* Line 1464 of skeleton.m4 */
7540 #line 3431 "parser.y"
7542 (yyval.value).c = (yyvsp[(1) - (4)].value).c;
7543 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value).c);
7545 MULTINAME_LATE(m, (yyvsp[(1) - (4)].value).t?(yyvsp[(1) - (4)].value).t->access:ACCESS_PACKAGE, "");
7546 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7547 (yyval.value).t = 0; // array elements have unknown type
7557 /* Line 1464 of skeleton.m4 */
7558 #line 3440 "parser.y"
7560 (yyval.value).c = code_new();
7561 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(2) - (3)].value_list).cc);
7562 (yyval.value).c = abc_newarray((yyval.value).c, (yyvsp[(2) - (3)].value_list).number);
7563 (yyval.value).t = registry_getarrayclass();
7573 /* Line 1464 of skeleton.m4 */
7574 #line 3447 "parser.y"
7575 {(yyval.value_list).cc=0;(yyval.value_list).number=0;}
7584 /* Line 1464 of skeleton.m4 */
7585 #line 3448 "parser.y"
7586 {(yyval.value_list)=(yyvsp[(1) - (1)].value_list);}
7595 /* Line 1464 of skeleton.m4 */
7596 #line 3450 "parser.y"
7598 (yyval.value_list).cc = 0;
7599 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(1) - (3)].value).c);
7600 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (3)].value).c);
7601 (yyval.value_list).number = 2;
7611 /* Line 1464 of skeleton.m4 */
7612 #line 3456 "parser.y"
7614 (yyval.value_list).cc = (yyvsp[(1) - (5)].value_list).cc;
7615 (yyval.value_list).number = (yyvsp[(1) - (5)].value_list).number+2;
7616 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (5)].value).c);
7617 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(5) - (5)].value).c);
7627 /* Line 1464 of skeleton.m4 */
7628 #line 3465 "parser.y"
7630 (yyval.value).c = code_new();
7631 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(2) - (3)].value_list).cc);
7632 (yyval.value).c = abc_newobject((yyval.value).c, (yyvsp[(2) - (3)].value_list).number/2);
7633 (yyval.value).t = registry_getobjectclass();
7643 /* Line 1464 of skeleton.m4 */
7644 #line 3472 "parser.y"
7646 code_t*c = (yyvsp[(3) - (3)].value).c;
7647 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
7648 c=abc_multiply_i(c);
7652 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '*'), (yyvsp[(1) - (3)].value).t);
7653 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0, 1);
7654 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7664 /* Line 1464 of skeleton.m4 */
7665 #line 3484 "parser.y"
7667 code_t*c = abc_modulo((yyvsp[(3) - (3)].value).c);
7668 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '%'), (yyvsp[(1) - (3)].value).t);
7669 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0, 1);
7670 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7680 /* Line 1464 of skeleton.m4 */
7681 #line 3490 "parser.y"
7683 code_t*c = abc_lshift((yyvsp[(3) - (3)].value).c);
7684 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '<'), (yyvsp[(1) - (3)].value).t);
7685 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0, 1);
7686 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7696 /* Line 1464 of skeleton.m4 */
7697 #line 3496 "parser.y"
7699 code_t*c = abc_rshift((yyvsp[(3) - (3)].value).c);
7700 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '>'), (yyvsp[(1) - (3)].value).t);
7701 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0, 1);
7702 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7712 /* Line 1464 of skeleton.m4 */
7713 #line 3502 "parser.y"
7715 code_t*c = abc_urshift((yyvsp[(3) - (3)].value).c);
7716 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'U'), (yyvsp[(1) - (3)].value).t);
7717 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0, 1);
7718 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7728 /* Line 1464 of skeleton.m4 */
7729 #line 3508 "parser.y"
7731 code_t*c = abc_divide((yyvsp[(3) - (3)].value).c);
7732 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '/'), (yyvsp[(1) - (3)].value).t);
7733 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0, 1);
7734 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7744 /* Line 1464 of skeleton.m4 */
7745 #line 3514 "parser.y"
7747 code_t*c = abc_bitor((yyvsp[(3) - (3)].value).c);
7748 c=converttype(c, TYPE_INT, (yyvsp[(1) - (3)].value).t);
7749 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0, 1);
7750 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7760 /* Line 1464 of skeleton.m4 */
7761 #line 3520 "parser.y"
7763 code_t*c = abc_bitxor((yyvsp[(3) - (3)].value).c);
7764 c=converttype(c, TYPE_INT, (yyvsp[(1) - (3)].value).t);
7765 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0, 1);
7766 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7776 /* Line 1464 of skeleton.m4 */
7777 #line 3526 "parser.y"
7779 code_t*c = (yyvsp[(3) - (3)].value).c;
7781 if(TYPE_IS_INT((yyvsp[(1) - (3)].value).t)) {
7785 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '+'), (yyvsp[(1) - (3)].value).t);
7788 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0, 1);
7789 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7799 /* Line 1464 of skeleton.m4 */
7800 #line 3539 "parser.y"
7801 { code_t*c = (yyvsp[(3) - (3)].value).c;
7802 if(TYPE_IS_INT((yyvsp[(1) - (3)].value).t)) {
7803 c=abc_subtract_i(c);
7806 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '-'), (yyvsp[(1) - (3)].value).t);
7809 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0, 1);
7810 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7820 /* Line 1464 of skeleton.m4 */
7821 #line 3550 "parser.y"
7823 c = code_append(c, (yyvsp[(3) - (3)].value).c);
7824 c = converttype(c, (yyvsp[(3) - (3)].value).t, (yyvsp[(1) - (3)].value).t);
7825 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 1, 0, 1);
7826 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7836 /* Line 1464 of skeleton.m4 */
7837 #line 3557 "parser.y"
7839 (yyval.value).t = join_types((yyvsp[(3) - (5)].value).t,(yyvsp[(5) - (5)].value).t,'?');
7840 (yyval.value).c = (yyvsp[(1) - (5)].value).c;
7841 code_t*j1 = (yyval.value).c = abc_iffalse((yyval.value).c, 0);
7842 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (5)].value).c);
7843 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (5)].value).t, (yyval.value).t);
7844 code_t*j2 = (yyval.value).c = abc_jump((yyval.value).c, 0);
7845 (yyval.value).c = j1->branch = abc_label((yyval.value).c);
7846 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(5) - (5)].value).c);
7847 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(5) - (5)].value).t, (yyval.value).t);
7848 (yyval.value).c = j2->branch = abc_label((yyval.value).c);
7858 /* Line 1464 of skeleton.m4 */
7859 #line 3570 "parser.y"
7861 classinfo_t*type = (yyvsp[(1) - (2)].value).t;
7862 if(is_getlocal((yyvsp[(1) - (2)].value).c) && (TYPE_IS_INT((yyvsp[(1) - (2)].value).t) || TYPE_IS_NUMBER((yyvsp[(1) - (2)].value).t))) {
7863 int nr = getlocalnr((yyvsp[(1) - (2)].value).c);
7864 code_free((yyvsp[(1) - (2)].value).c);(yyvsp[(1) - (2)].value).c=0;
7865 if(TYPE_IS_INT((yyvsp[(1) - (2)].value).t)) {
7866 (yyval.value).c = abc_getlocal(0, nr);
7867 (yyval.value).c = abc_inclocal_i((yyval.value).c, nr);
7868 } else if(TYPE_IS_NUMBER((yyvsp[(1) - (2)].value).t)) {
7869 (yyval.value).c = abc_getlocal(0, nr);
7870 (yyval.value).c = abc_inclocal((yyval.value).c, nr);
7871 } else syntaxerror("internal error");
7873 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7874 c=abc_increment_i(c);
7880 c=converttype(c, type, (yyvsp[(1) - (2)].value).t);
7881 (yyval.value).c = toreadwrite((yyvsp[(1) - (2)].value).c, c, 0, 1, 1);
7882 (yyval.value).t = (yyvsp[(1) - (2)].value).t;
7893 /* Line 1464 of skeleton.m4 */
7894 #line 3597 "parser.y"
7896 classinfo_t*type = (yyvsp[(1) - (2)].value).t;
7897 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7898 c=abc_decrement_i(c);
7904 c=converttype(c, type, (yyvsp[(1) - (2)].value).t);
7905 (yyval.value).c = toreadwrite((yyvsp[(1) - (2)].value).c, c, 0, 1, 1);
7906 (yyval.value).t = (yyvsp[(1) - (2)].value).t;
7916 /* Line 1464 of skeleton.m4 */
7917 #line 3611 "parser.y"
7919 classinfo_t*type = (yyvsp[(2) - (2)].value).t;
7920 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7921 c=abc_increment_i(c);
7927 c=converttype(c, type, (yyvsp[(2) - (2)].value).t);
7928 (yyval.value).c = toreadwrite((yyvsp[(2) - (2)].value).c, c, 0, 0, 1);
7929 (yyval.value).t = (yyvsp[(2) - (2)].value).t;
7939 /* Line 1464 of skeleton.m4 */
7940 #line 3625 "parser.y"
7942 classinfo_t*type = (yyvsp[(2) - (2)].value).t;
7943 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7944 c=abc_decrement_i(c);
7950 c=converttype(c, type, (yyvsp[(2) - (2)].value).t);
7951 (yyval.value).c = toreadwrite((yyvsp[(2) - (2)].value).c, c, 0, 0, 1);
7952 (yyval.value).t = (yyvsp[(2) - (2)].value).t;
7962 /* Line 1464 of skeleton.m4 */
7963 #line 3640 "parser.y"
7964 { if(!state->cls->info)
7965 syntaxerror("super keyword not allowed outside a class");
7966 classinfo_t*t = state->cls->info->superclass;
7967 if(!t) t = TYPE_OBJECT;
7969 memberinfo_t*f = findmember_nsset(t, (yyvsp[(3) - (3)].id), 1);
7971 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
7972 (yyval.value).c = 0;
7973 (yyval.value).c = abc_getlocal_0((yyval.value).c);
7974 (yyval.value).c = abc_getsuper2((yyval.value).c, &m);
7975 (yyval.value).t = slotinfo_gettype((slotinfo_t*)f);
7985 /* Line 1464 of skeleton.m4 */
7986 #line 3654 "parser.y"
7989 (yyval.value).c = abc_pushundefined(0);
7990 (yyval.value).t = 0;
7991 as3_warning("ignored @ operator");
8001 /* Line 1464 of skeleton.m4 */
8002 #line 3661 "parser.y"
8004 // child attribute TODO
8005 (yyval.value).c = abc_pushundefined(0);
8006 (yyval.value).t = 0;
8007 as3_warning("ignored .@ operator");
8017 /* Line 1464 of skeleton.m4 */
8018 #line 3668 "parser.y"
8020 // namespace declaration TODO
8021 (yyval.value).c = abc_pushundefined(0);
8022 (yyval.value).t = 0;
8023 as3_warning("ignored :: operator");
8033 /* Line 1464 of skeleton.m4 */
8034 #line 3675 "parser.y"
8037 (yyval.value).c = abc_pushundefined(0);
8038 (yyval.value).t = 0;
8039 as3_warning("ignored .. operator");
8049 /* Line 1464 of skeleton.m4 */
8050 #line 3682 "parser.y"
8053 (yyval.value).c = abc_pushundefined(0);
8054 (yyval.value).t = 0;
8055 as3_warning("ignored .() operator");
8065 /* Line 1464 of skeleton.m4 */
8066 #line 3697 "parser.y"
8068 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
8069 classinfo_t*t = (yyvsp[(1) - (3)].value).t;
8071 if(TYPE_IS_CLASS(t) && t->data) {
8076 if(t->subtype==INFOTYPE_UNRESOLVED) {
8077 syntaxerror("syntaxerror: trying to resolve property '%s' on incomplete object '%s'", (yyvsp[(3) - (3)].id), t->name);
8079 memberinfo_t*f = findmember_nsset(t, (yyvsp[(3) - (3)].id), 1);
8081 if(f && !is_static != !(f->flags&FLAG_STATIC))
8083 if(f && f->slot && !noslot) {
8084 (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
8087 as3_warning("Access of undefined property '%s' in %s", (yyvsp[(3) - (3)].id), t->name);
8090 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
8091 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
8093 /* determine type */
8094 (yyval.value).t = slotinfo_gettype((slotinfo_t*)f);
8095 if(!(yyval.value).t)
8096 (yyval.value).c = abc_coerce_a((yyval.value).c);
8097 } else if((yyvsp[(1) - (3)].value).c && (yyvsp[(1) - (3)].value).c->opcode == OPCODE___PUSHPACKAGE__) {
8098 string_t*package = (yyvsp[(1) - (3)].value).c->data[0];
8099 char*package2 = concat3(package->str, ".", (yyvsp[(3) - (3)].id));
8101 slotinfo_t*a = registry_find(package->str, (yyvsp[(3) - (3)].id));
8103 (yyval.value) = push_class(a);
8104 } else if(dict_contains(state->import_toplevel_packages, package2) ||
8105 registry_ispackage(package2)) {
8106 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
8107 (yyval.value).c->data[0] = string_new4(package2);
8108 (yyval.value).t = 0;
8110 syntaxerror("couldn't resolve %s", package2);
8113 /* when resolving a property on an unknown type, we do know the
8114 name of the property (and don't seem to need the package), but
8115 we need to make avm2 try out all access modes */
8116 as3_warning("Resolving %s on unknown type", (yyvsp[(3) - (3)].id));
8117 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(3) - (3)].id)};
8118 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
8119 (yyval.value).c = abc_coerce_a((yyval.value).c);
8120 (yyval.value).t = registry_getanytype();
8131 /* Line 1464 of skeleton.m4 */
8132 #line 3754 "parser.y"
8135 /* Queue unresolved identifiers for checking against the parent
8136 function's variables.
8137 We consider everything which is not a local variable "unresolved".
8138 This encompasses class names, members of the surrounding class
8139 etc. which is *correct* because local variables of the parent function
8142 if(state->method->inner && !find_variable(state, (yyvsp[(1) - (1)].id))) {
8143 unknown_variable((yyvsp[(1) - (1)].id));
8146 /* let the compiler know that it might want to check the current directory/package
8147 for this identifier- maybe there's a file $1.as defining $1. */
8148 as3_schedule_class_noerror(state->package, (yyvsp[(1) - (1)].id));
8151 (yyval.value).t = 0;
8152 (yyval.value).c = 0;
8157 /* look at variables */
8158 if((v = find_variable(state, (yyvsp[(1) - (1)].id)))) {
8159 // $1 is a local variable
8160 (yyval.value).c = abc_getlocal((yyval.value).c, v->index);
8161 (yyval.value).t = v->type;
8164 if((v = find_slot(state, (yyvsp[(1) - (1)].id)))) {
8165 (yyval.value).c = abc_getscopeobject((yyval.value).c, 1);
8166 (yyval.value).c = abc_getslot((yyval.value).c, v->index);
8167 (yyval.value).t = v->type;
8171 int i_am_static = (state->method && state->method->info)?(state->method->info->flags&FLAG_STATIC):FLAG_STATIC;
8173 /* look at current class' members */
8174 if(!state->method->inner &&
8176 (f = findmember_nsset(state->cls->info, (yyvsp[(1) - (1)].id), 1)) &&
8177 (f->flags&FLAG_STATIC) >= i_am_static)
8179 // $1 is a function in this class
8180 int var_is_static = (f->flags&FLAG_STATIC);
8182 if(f->kind == INFOTYPE_METHOD) {
8183 (yyval.value).t = TYPE_FUNCTION(f);
8185 (yyval.value).t = f->type;
8187 if(var_is_static && !i_am_static) {
8188 /* access to a static member from a non-static location.
8189 do this via findpropstrict:
8190 there doesn't seem to be any non-lookup way to access
8191 static properties of a class */
8192 state->method->late_binding = 1;
8193 (yyval.value).t = f->type;
8194 namespace_t ns = {f->access, f->package};
8195 multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
8196 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
8197 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
8199 } else if(f->slot>0) {
8200 (yyval.value).c = abc_getlocal_0((yyval.value).c);
8201 (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
8204 namespace_t ns = {f->access, f->package};
8205 multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
8206 (yyval.value).c = abc_getlocal_0((yyval.value).c);
8207 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
8212 /* look at actual classes, in the current package and imported */
8213 if((a = find_class((yyvsp[(1) - (1)].id)))) {
8214 (yyval.value) = push_class(a);
8218 /* look through package prefixes */
8219 if(dict_contains(state->import_toplevel_packages, (yyvsp[(1) - (1)].id)) ||
8220 registry_ispackage((yyvsp[(1) - (1)].id))) {
8221 (yyval.value).c = abc___pushpackage__((yyval.value).c, (yyvsp[(1) - (1)].id));
8222 (yyval.value).t = 0;
8226 /* unknown object, let the avm2 resolve it */
8228 //as3_softwarning("Couldn't resolve '%s', doing late binding", $1);
8229 as3_warning("Couldn't resolve '%s', doing late binding", (yyvsp[(1) - (1)].id));
8230 state->method->late_binding = 1;
8232 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(1) - (1)].id)};
8234 (yyval.value).t = 0;
8235 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
8236 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
8247 /* Line 1464 of skeleton.m4 */
8248 #line 3863 "parser.y"
8251 NEW(namespace_decl_t,n);
8252 n->name = (yyvsp[(2) - (2)].id);
8253 n->url = (yyvsp[(2) - (2)].id);
8254 (yyval.namespace_decl)=n;
8264 /* Line 1464 of skeleton.m4 */
8265 #line 3870 "parser.y"
8268 NEW(namespace_decl_t,n);
8269 n->name = (yyvsp[(2) - (4)].id);
8270 n->url = (yyvsp[(4) - (4)].id);
8271 (yyval.namespace_decl)=n;
8281 /* Line 1464 of skeleton.m4 */
8282 #line 3877 "parser.y"
8285 NEW(namespace_decl_t,n);
8286 n->name = (yyvsp[(2) - (4)].id);
8287 n->url = (yyvsp[(4) - (4)].str).str;
8288 (yyval.namespace_decl)=n;
8298 /* Line 1464 of skeleton.m4 */
8299 #line 3884 "parser.y"
8302 trie_put(active_namespaces, (yyvsp[(2) - (2)].namespace_decl)->name, (void*)(yyvsp[(2) - (2)].namespace_decl)->url);
8304 namespace_t access = modifiers2access(&(yyvsp[(1) - (2)].flags));
8305 varinfo_t* var = varinfo_register_global(access.access, state->package, (yyvsp[(2) - (2)].namespace_decl)->name);
8306 var->type = TYPE_NAMESPACE;
8308 ns.access = ACCESS_NAMESPACE;
8309 ns.name = (yyvsp[(2) - (2)].namespace_decl)->url;
8310 var->value = constant_new_namespace(&ns);
8322 /* Line 1464 of skeleton.m4 */
8323 #line 3908 "parser.y"
8326 const char*url = (yyvsp[(3) - (3)].classinfo)->name;
8328 varinfo_t*s = (varinfo_t*)(yyvsp[(3) - (3)].classinfo);
8329 if(s->kind == INFOTYPE_UNRESOLVED) {
8330 s = (varinfo_t*)registry_resolve((slotinfo_t*)s);
8332 syntaxerror("Couldn't resolve namespace %s", (yyvsp[(3) - (3)].classinfo)->name);
8335 if(!s || s->kind != INFOTYPE_SLOT)
8336 syntaxerror("%s.%s is not a public namespace (%d)", (yyvsp[(3) - (3)].classinfo)->package, (yyvsp[(3) - (3)].classinfo)->name, s?s->kind:-1);
8337 if(!s->value || !NS_TYPE(s->value->type))
8338 syntaxerror("%s.%s is not a namespace", (yyvsp[(3) - (3)].classinfo)->package, (yyvsp[(3) - (3)].classinfo)->name);
8339 url = s->value->ns->name;
8341 trie_put(active_namespaces, (yyvsp[(3) - (3)].classinfo)->name, (void*)url);
8342 add_active_url(url);
8351 /* Line 1464 of skeleton.m4 */
8352 #line 8353 "parser.tab.c"
8355 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
8359 YY_STACK_PRINT (yyss, yyssp);
8363 /* Now `shift' the result of the reduction. Determine what state
8364 that goes to, based on the state we popped back to and the rule
8365 number reduced by. */
8369 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
8370 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
8371 yystate = yytable[yystate];
8373 yystate = yydefgoto[yyn - YYNTOKENS];
8378 /*------------------------------------.
8379 | yyerrlab -- here on detecting error |
8380 `------------------------------------*/
8382 /* If not already recovering from an error, report this error. */
8386 #if ! YYERROR_VERBOSE
8387 yyerror (YY_("syntax error"));
8390 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
8391 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
8393 YYSIZE_T yyalloc = 2 * yysize;
8394 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
8395 yyalloc = YYSTACK_ALLOC_MAXIMUM;
8396 if (yymsg != yymsgbuf)
8397 YYSTACK_FREE (yymsg);
8398 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
8400 yymsg_alloc = yyalloc;
8404 yymsg_alloc = sizeof yymsgbuf;
8408 if (0 < yysize && yysize <= yymsg_alloc)
8410 (void) yysyntax_error (yymsg, yystate, yychar);
8415 yyerror (YY_("syntax error"));
8417 goto yyexhaustedlab;
8425 if (yyerrstatus == 3)
8427 /* If just tried and failed to reuse lookahead token after an
8428 error, discard it. */
8430 if (yychar <= YYEOF)
8432 /* Return failure if at end of input. */
8433 if (yychar == YYEOF)
8438 yydestruct ("Error: discarding",
8444 /* Else will try to reuse lookahead token after shifting the error
8449 /*---------------------------------------------------.
8450 | yyerrorlab -- error raised explicitly by YYERROR. |
8451 `---------------------------------------------------*/
8454 /* Pacify compilers like GCC when the user code never invokes
8455 YYERROR and the label yyerrorlab therefore never appears in user
8457 if (/*CONSTCOND*/ 0)
8460 /* Do not reclaim the symbols of the rule which action triggered
8464 YY_STACK_PRINT (yyss, yyssp);
8469 /*-------------------------------------------------------------.
8470 | yyerrlab1 -- common code for both syntax error and YYERROR. |
8471 `-------------------------------------------------------------*/
8473 yyerrstatus = 3; /* Each real token shifted decrements this. */
8477 yyn = yypact[yystate];
8478 if (yyn != YYPACT_NINF)
8481 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
8489 /* Pop the current state because it cannot handle the error token. */
8494 yydestruct ("Error: popping",
8495 yystos[yystate], yyvsp);
8498 YY_STACK_PRINT (yyss, yyssp);
8504 /* Shift the error token. */
8505 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
8511 /*-------------------------------------.
8512 | yyacceptlab -- YYACCEPT comes here. |
8513 `-------------------------------------*/
8518 /*-----------------------------------.
8519 | yyabortlab -- YYABORT comes here. |
8520 `-----------------------------------*/
8525 #if !defined(yyoverflow) || YYERROR_VERBOSE
8526 /*-------------------------------------------------.
8527 | yyexhaustedlab -- memory exhaustion comes here. |
8528 `-------------------------------------------------*/
8530 yyerror (YY_("memory exhausted"));
8536 if (yychar != YYEMPTY)
8537 yydestruct ("Cleanup: discarding lookahead",
8539 /* Do not reclaim the symbols of the rule which action triggered
8540 this YYABORT or YYACCEPT. */
8542 YY_STACK_PRINT (yyss, yyssp);
8543 while (yyssp != yyss)
8545 yydestruct ("Cleanup: popping",
8546 yystos[*yyssp], yyvsp);
8551 YYSTACK_FREE (yyss);
8554 if (yymsg != yymsgbuf)
8555 YYSTACK_FREE (yymsg);
8557 /* Make sure YYID is used. */
8558 return YYID (yyresult);