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"
99 /* Line 198 of skeleton.m4 */
100 #line 101 "parser.tab.c"
102 /* Enabling traces. */
107 /* Enabling verbose error messages. */
108 #ifdef YYERROR_VERBOSE
109 # undef YYERROR_VERBOSE
110 # define YYERROR_VERBOSE 1
112 # define YYERROR_VERBOSE 1
115 /* Enabling the token table. */
116 #ifndef YYTOKEN_TABLE
117 # define YYTOKEN_TABLE 0
124 /* Put the tokens into the symbol table, so that GDB and other debuggers
222 below_semicolon = 353,
223 below_assignment = 354,
225 minusminus_prefix = 356,
226 plusplus_prefix = 357,
229 above_identifier = 360,
237 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
239 /* Line 223 of skeleton.m4 */
244 /* Line 223 of skeleton.m4 */
247 enum yytokentype token;
249 classinfo_t*classinfo;
250 classinfo_list_t*classinfo_list;
252 slotinfo_list_t*slotinfo_list;
255 unsigned int number_uint;
259 //typedcode_list_t*value_list;
260 codeandnumber_t value_list;
266 for_start_t for_start;
267 abc_exception_t *exception;
270 namespace_decl_t* namespace_decl;
273 abc_exception_list_t *l;
279 /* Line 223 of skeleton.m4 */
280 #line 281 "parser.tab.c"
282 # define YYSTYPE_IS_TRIVIAL 1
283 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
284 # define YYSTYPE_IS_DECLARED 1
288 /* Copy the second part of user declarations. */
290 /* Line 273 of skeleton.m4 */
294 static int a3_error(char*s)
296 syntaxerror("%s", s);
297 return 0; //make gcc happy
300 static void parsererror(const char*file, int line, const char*f)
302 syntaxerror("internal error in %s, %s:%d", f, file, line);
305 #define parserassert(b) {if(!(b)) parsererror(__FILE__, __LINE__,__func__);}
308 static char* concat2(const char* t1, const char* t2)
312 char*text = malloc(l1+l2+1);
313 memcpy(text , t1, l1);
314 memcpy(text+l1, t2, l2);
318 static char* concat3(const char* t1, const char* t2, const char* t3)
323 char*text = malloc(l1+l2+l3+1);
324 memcpy(text , t1, l1);
325 memcpy(text+l1, t2, l2);
326 memcpy(text+l1+l2, t3, l3);
331 typedef struct _import {
334 DECLARE_LIST(import);
336 DECLARE(methodstate);
337 DECLARE_LIST(methodstate);
339 typedef struct _classstate {
345 methodstate_t*static_init;
347 //code_t*static_init;
349 char has_constructor;
352 struct _methodstate {
362 dict_t*unresolved_variables;
365 char uses_parent_function;
371 int var_index; // for inner methods
372 int slot_index; // for inner methods
373 char is_a_slot; // for inner methods
378 abc_exception_list_t*exceptions;
380 methodstate_list_t*innerfunctions;
383 typedef struct _state {
388 import_list_t*wildcard_imports;
389 dict_t*import_toplevel_packages;
392 namespace_list_t*active_namespace_urls;
394 char has_own_imports;
395 char new_vars; // e.g. transition between two functions
398 methodstate_t*method;
407 typedef struct _global {
411 dict_t*file2token2info;
414 static global_t*global = 0;
415 static state_t* state = 0;
419 #define MULTINAME(m,x) \
423 registry_fill_multiname(&m, &m##_ns, (slotinfo_t*)(x));
425 #define MEMBER_MULTINAME(m,f,n) \
429 if((m##_ns.access = ((slotinfo_t*)(f))->access)==ACCESS_NAMESPACE) \
430 m##_ns.name = ((slotinfo_t*)(f))->package; \
435 m.namespace_set = 0; \
436 m.name = ((slotinfo_t*)(f))->name; \
438 m.type = MULTINAME; \
440 m.namespace_set = &nopackage_namespace_set; \
444 /* warning: list length of namespace set is undefined */
445 #define MULTINAME_LATE(m, access, package) \
446 namespace_t m##_ns = {access, package}; \
447 namespace_set_t m##_nsset; \
448 namespace_list_t m##_l;m##_l.next = 0; \
449 m##_nsset.namespaces = &m##_l; \
450 m##_nsset = m##_nsset; \
451 m##_l.namespace = &m##_ns; \
452 multiname_t m = {MULTINAMEL, 0, &m##_nsset, 0};
454 static namespace_t ns1 = {ACCESS_PRIVATE, ""};
455 static namespace_t ns2 = {ACCESS_PROTECTED, ""};
456 static namespace_t ns3 = {ACCESS_PACKAGEINTERNAL, ""};
457 static namespace_t ns4 = {ACCESS_PACKAGE, ""};
458 static namespace_list_t nl4 = {&ns4,0};
459 static namespace_list_t nl3 = {&ns3,&nl4};
460 static namespace_list_t nl2 = {&ns2,&nl3};
461 static namespace_list_t nl1 = {&ns1,&nl2};
462 static namespace_set_t nopackage_namespace_set = {&nl1};
464 static dict_t*definitions=0;
465 void as3_set_define(const char*c)
468 definitions = dict_new();
469 if(!dict_contains(definitions,c))
470 dict_put(definitions,c,0);
473 static void new_state()
476 state_t*oldstate = state;
478 memcpy(s, state, sizeof(state_t)); //shallow copy
480 s->imports = dict_new();
482 if(!s->import_toplevel_packages) {
483 s->import_toplevel_packages = dict_new();
487 state->has_own_imports = 0;
488 state->vars = dict_new();
489 state->old = oldstate;
492 trie_remember(active_namespaces);
495 state->active_namespace_urls = list_clone(oldstate->active_namespace_urls);
498 static void state_destroy(state_t*state)
500 if(state->has_own_imports) {
501 list_free(state->wildcard_imports);
502 dict_destroy(state->imports);state->imports=0;
504 if(state->imports && (!state->old || state->old->imports!=state->imports)) {
505 dict_destroy(state->imports);state->imports=0;
509 for(t=0;t<state->vars->hashsize;t++) {
510 dictentry_t*e =state->vars->slots[t];
512 free(e->data);e->data=0;
516 dict_destroy(state->vars);state->vars=0;
519 list_free(state->active_namespace_urls)
520 state->active_namespace_urls = 0;
525 static void old_state()
527 trie_rollback(active_namespaces);
529 if(!state || !state->old)
530 syntaxerror("invalid nesting");
531 state_t*leaving = state;
535 if(as3_pass>1 && leaving->method && leaving->method != state->method && !leaving->method->inner) {
536 free(leaving->method);
539 if(as3_pass>1 && leaving->cls && leaving->cls != state->cls) {
544 state_destroy(leaving);
547 static code_t* method_header(methodstate_t*m);
548 static code_t* wrap_function(code_t*c,code_t*header, code_t*body);
549 static void function_initvars(methodstate_t*m, params_t*params, int flags, char var0);
552 static char* internal_filename_package = 0;
553 void initialize_file(char*filename)
556 syntaxerror("invalid call to initialize_file during parsing of another file");
559 active_namespaces = trie_new();
562 state->package = internal_filename_package = strdup(filename);
564 global->token2info = dict_lookup(global->file2token2info,
565 current_filename // use long version
567 if(!global->token2info) {
568 global->token2info = dict_new2(&ptr_type);
569 dict_put(global->file2token2info, current_filename, global->token2info);
573 state->method = rfx_calloc(sizeof(methodstate_t));
574 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
575 state->method->late_binding = 1; // init scripts use getglobalscope, so we need a getlocal0/pushscope
577 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
579 syntaxerror("internal error: skewed tokencount");
580 function_initvars(state->method, 0, 0, 1);
581 global->init = abc_initscript(global->file);
587 if(!state || state->level!=1) {
588 syntaxerror("unexpected end of file in pass %d", as3_pass);
592 dict_del(global->file2token2info, current_filename);
594 code_t*header = method_header(state->method);
595 code_t*c = wrap_function(header, 0, global->init->method->body->code);
596 global->init->method->body->code = c;
597 free(state->method);state->method=0;
600 //free(state->package);state->package=0; // used in registry
601 state_destroy(state);state=0;
604 void initialize_parser()
606 global = rfx_calloc(sizeof(global_t));
607 global->file = abc_file_new();
608 global->file->flags &= ~ABCFILE_LAZY;
609 global->file2token2info = dict_new();
610 global->token2info = 0;
613 void* finish_parser()
615 dict_free_all(global->file2token2info, 1, (void*)dict_destroy);
616 global->token2info=0;
620 typedef struct _variable {
625 methodstate_t*is_inner_method;
628 static variable_t* find_variable(state_t*s, char*name)
632 v = dict_lookup(s->vars, name);
634 if(s->new_vars) break;
639 static variable_t* find_slot(state_t*s, const char*name)
641 if(s->method && s->method->slots)
642 return dict_lookup(s->method->slots, name);
646 static variable_t* find_variable_safe(state_t*s, char*name)
648 variable_t* v = find_variable(s, name);
650 syntaxerror("undefined variable: %s", name);
654 static char variable_exists(char*name)
656 return dict_contains(state->vars, name);
659 static code_t*defaultvalue(code_t*c, classinfo_t*type)
661 if(TYPE_IS_INT(type)) {
662 c = abc_pushbyte(c, 0);
663 } else if(TYPE_IS_UINT(type)) {
664 c = abc_pushuint(c, 0);
665 } else if(TYPE_IS_FLOAT(type)) {
667 } else if(TYPE_IS_BOOLEAN(type)) {
668 c = abc_pushfalse(c);
670 //c = abc_pushundefined(c);
671 syntaxerror("internal error: can't generate default value for * type");
675 c = abc_coerce2(c, &m);
680 static int alloc_local()
682 return state->method->variable_count++;
685 static variable_t* new_variable2(const char*name, classinfo_t*type, char init, char maybeslot)
688 variable_t*v = find_slot(state, name);
694 v->index = alloc_local();
699 dict_put(state->vars, name, v);
703 static int new_variable(const char*name, classinfo_t*type, char init, char maybeslot)
705 return new_variable2(name, type, init, maybeslot)->index;
708 #define TEMPVARNAME "__as3_temp__"
711 variable_t*v = find_variable(state, TEMPVARNAME);
716 i = new_variable(TEMPVARNAME, 0, 0, 0);
721 static code_t* var_block(code_t*body)
727 for(t=0;t<state->vars->hashsize;t++) {
728 dictentry_t*e = state->vars->slots[t];
730 variable_t*v = (variable_t*)e->data;
731 if(v->type && v->init) {
732 c = defaultvalue(c, v->type);
733 c = abc_setlocal(c, v->index);
734 k = abc_kill(k, v->index);
744 if(x->opcode== OPCODE___BREAK__ ||
745 x->opcode== OPCODE___CONTINUE__) {
746 /* link kill code before break/continue */
747 code_t*e = code_dup(k);
748 code_t*s = code_start(e);
760 c = code_append(c, body);
761 c = code_append(c, k);
765 static void unknown_variable(char*name)
767 if(!state->method->unresolved_variables)
768 state->method->unresolved_variables = dict_new();
769 if(!dict_contains(state->method->unresolved_variables, name))
770 dict_put(state->method->unresolved_variables, name, 0);
773 static code_t* add_scope_code(code_t*c, methodstate_t*m, char init)
775 if(m->uses_slots || (m->late_binding && !m->inner)) { //???? especially inner functions need the pushscope
776 c = abc_getlocal_0(c);
777 c = abc_pushscope(c);
780 /* FIXME: this alloc_local() causes variable indexes to be
781 different in pass2 than in pass1 */
782 if(!m->activation_var)
783 m->activation_var = alloc_local();
785 c = abc_newactivation(c);
787 c = abc_pushscope(c);
788 c = abc_setlocal(c, m->activation_var);
790 c = abc_getlocal(c, m->activation_var);
791 c = abc_pushscope(c);
797 static code_t* method_header(methodstate_t*m)
801 c = add_scope_code(c, m, 1);
803 methodstate_list_t*l = m->innerfunctions;
805 parserassert(l->methodstate->abc);
806 if(m->uses_slots && l->methodstate->is_a_slot) {
807 c = abc_getscopeobject(c, 1);
808 c = abc_newfunction(c, l->methodstate->abc);
810 c = abc_setlocal(c, l->methodstate->var_index);
811 c = abc_setslot(c, l->methodstate->slot_index);
813 c = abc_newfunction(c, l->methodstate->abc);
814 c = abc_setlocal(c, l->methodstate->var_index);
816 free(l->methodstate);l->methodstate=0;
820 c = code_append(c, m->header);
823 if(m->is_constructor && !m->has_super) {
824 // call default constructor
825 c = abc_getlocal_0(c);
826 c = abc_constructsuper(c, 0);
830 /* all parameters that are used by inner functions
831 need to be copied from local to slot */
832 parserassert(m->activation_var);
833 DICT_ITERATE_ITEMS(m->slots,char*,name,variable_t*,v) {
834 if(v->is_parameter) {
835 c = abc_getlocal(c, m->activation_var);
836 c = abc_getlocal(c, v->index);
837 c = abc_setslot(c, v->index);
841 list_free(m->innerfunctions);
842 m->innerfunctions = 0;
847 static code_t* wrap_function(code_t*c,code_t*header, code_t*body)
849 c = code_append(c, header);
850 c = code_append(c, var_block(body));
851 /* append return if necessary */
852 if(!c || (c->opcode != OPCODE_RETURNVOID &&
853 c->opcode != OPCODE_RETURNVALUE)) {
854 c = abc_returnvoid(c);
859 static void startpackage(char*name)
862 state->package = strdup(name);
864 static void endpackage()
866 //used e.g. in classinfo_register:
867 //free(state->package);state->package=0;
871 #define FLAG_PUBLIC 256
872 #define FLAG_PROTECTED 512
873 #define FLAG_PRIVATE 1024
874 #define FLAG_PACKAGEINTERNAL 2048
875 #define FLAG_NAMESPACE 4096
877 static namespace_t modifiers2access(modifiers_t*mod)
882 if(mod->flags&FLAG_NAMESPACE) {
883 if(mod->flags&(FLAG_PRIVATE|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
884 syntaxerror("invalid combination of access levels and namespaces");
885 ns.access = ACCESS_NAMESPACE;
887 const char*url = (const char*)trie_lookup(active_namespaces, mod->ns);
889 /* shouldn't happen- the tokenizer only reports something as a namespace
890 if it was already registered */
891 trie_dump(active_namespaces);
892 syntaxerror("unknown namespace: %s", mod->ns);
895 } else if(mod->flags&FLAG_PUBLIC) {
896 if(mod->flags&(FLAG_PRIVATE|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
897 syntaxerror("invalid combination of access levels");
898 ns.access = ACCESS_PACKAGE;
899 } else if(mod->flags&FLAG_PRIVATE) {
900 if(mod->flags&(FLAG_PUBLIC|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
901 syntaxerror("invalid combination of access levels");
902 ns.access = ACCESS_PRIVATE;
903 } else if(mod->flags&FLAG_PROTECTED) {
904 if(mod->flags&(FLAG_PUBLIC|FLAG_PRIVATE|FLAG_PACKAGEINTERNAL))
905 syntaxerror("invalid combination of access levels");
906 ns.access = ACCESS_PROTECTED;
908 ns.access = ACCESS_PACKAGEINTERNAL;
912 static slotinfo_t* find_class(const char*name);
914 static memberinfo_t* findmember_nsset(classinfo_t*cls, const char*name, char recurse)
916 return registry_findmember_nsset(cls, state->active_namespace_urls, name, recurse);
919 static void function_initvars(methodstate_t*m, params_t*params, int flags, char var0)
924 index = new_variable("this", 0, 0, 0);
925 else if(!m->is_global)
926 index = new_variable((flags&FLAG_STATIC)?"class":"this", state->cls?state->cls->info:0, 0, 0);
928 index = new_variable("globalscope", 0, 0, 0);
929 parserassert(!index);
933 /* as variables and slots share the same number, make sure
934 that those variable indices are reserved. It's up to the
935 optimizer to later shuffle the variables down to lower
937 m->variable_count = m->uses_slots;
942 for(p=params->list;p;p=p->next) {
943 variable_t*v = new_variable2(p->param->name, p->param->type, 0, 1);
948 methodstate_list_t*l = m->innerfunctions;
950 methodstate_t*m = l->methodstate;
952 variable_t* v = new_variable2(m->info->name, TYPE_FUNCTION(m->info), 0, 1);
953 m->var_index = v->index;
954 m->slot_index = v->index;
955 v->is_inner_method = m;
961 m->scope_code = add_scope_code(m->scope_code, m, 0);
964 if(as3_pass==2 && m->slots) {
965 /* exchange unresolved identifiers with the actual objects */
966 DICT_ITERATE_ITEMS(m->slots, char*, name, variable_t*, v) {
967 if(v->type && v->type->kind == INFOTYPE_UNRESOLVED) {
968 classinfo_t*type = (classinfo_t*)registry_resolve((slotinfo_t*)v->type);
969 if(!type || type->kind != INFOTYPE_CLASS) {
970 syntaxerror("Couldn't find class %s::%s (%s)", v->type->package, v->type->name, name);
979 char*as3_globalclass=0;
980 static void startclass(modifiers_t* mod, char*classname, classinfo_t*extends, classinfo_list_t*implements)
983 syntaxerror("inner classes now allowed");
988 classinfo_list_t*mlist=0;
990 if(mod->flags&~(FLAG_PACKAGEINTERNAL|FLAG_PUBLIC|FLAG_FINAL|FLAG_DYNAMIC|FLAG_INTERFACE))
991 syntaxerror("invalid modifier(s)");
993 if((mod->flags&(FLAG_PUBLIC|FLAG_PACKAGEINTERNAL)) == (FLAG_PUBLIC|FLAG_PACKAGEINTERNAL))
994 syntaxerror("public and internal not supported at the same time.");
996 //if(!(mod->flags&FLAG_INTERFACE) && !extends) {
997 if(!(mod->flags&FLAG_INTERFACE) && !extends) {
998 // all classes extend object
999 extends = registry_getobjectclass();
1002 /* create the class name, together with the proper attributes */
1006 if(!(mod->flags&FLAG_PUBLIC) && state->package==internal_filename_package) {
1007 access = ACCESS_PRIVATE; package = internal_filename_package;
1008 } else if(!(mod->flags&FLAG_PUBLIC) && state->package!=internal_filename_package) {
1009 access = ACCESS_PACKAGEINTERNAL; package = state->package;
1010 } else if(state->package!=internal_filename_package) {
1011 access = ACCESS_PACKAGE; package = state->package;
1013 syntaxerror("public classes only allowed inside a package");
1017 state->cls = rfx_calloc(sizeof(classstate_t));
1018 state->cls->init = rfx_calloc(sizeof(methodstate_t));
1019 state->cls->static_init = rfx_calloc(sizeof(methodstate_t));
1020 state->cls->static_init->variable_count=1;
1021 /* notice: we make no effort to initialize the top variable (local0) here,
1022 even though it has special meaning. We just rely on the facat
1023 that pass 1 won't do anything with variables */
1025 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->cls);
1027 /* set current method to constructor- all code within the class-level (except
1028 static variable initializations) will be executed during construction time */
1029 state->method = state->cls->init;
1031 if(registry_find(package, classname)) {
1032 syntaxerror("Package \"%s\" already contains a class called \"%s\"", package, classname);
1034 /* build info struct */
1035 int num_interfaces = (list_length(implements));
1036 state->cls->info = classinfo_register(access, package, classname, num_interfaces);
1037 state->cls->info->flags |= mod->flags & (FLAG_DYNAMIC|FLAG_INTERFACE|FLAG_FINAL);
1040 classinfo_list_t*l = implements;
1041 for(l=implements;l;l=l->next) {
1042 state->cls->info->interfaces[pos++] = l->classinfo;
1047 state->cls = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1049 state->method = state->cls->init;
1050 parserassert(state->cls && state->cls->info);
1052 function_initvars(state->cls->init, 0, 0, 1);
1053 function_initvars(state->cls->static_init, 0, 0, 0);
1055 if(extends && (extends->flags & FLAG_FINAL))
1056 syntaxerror("Can't extend final class '%s'", extends->name);
1059 while(state->cls->info->interfaces[pos]) {
1060 if(!(state->cls->info->interfaces[pos]->flags & FLAG_INTERFACE))
1061 syntaxerror("'%s' is not an interface",
1062 state->cls->info->interfaces[pos]->name);
1066 /* fill out interfaces and extends (we couldn't resolve those during the first pass) */
1067 state->cls->info->superclass = extends;
1069 /* generate the abc code for this class */
1070 MULTINAME(classname2,state->cls->info);
1071 multiname_t*extends2 = sig2mname(extends);
1073 state->cls->abc = abc_class_new(global->file, &classname2, extends2);
1074 if(state->cls->info->flags&FLAG_FINAL) abc_class_final(state->cls->abc);
1075 if(!(state->cls->info->flags&FLAG_DYNAMIC)) abc_class_sealed(state->cls->abc);
1076 if(state->cls->info->flags&FLAG_INTERFACE) {
1077 abc_class_interface(state->cls->abc);
1080 abc_class_protectedNS(state->cls->abc, classname);
1082 for(mlist=implements;mlist;mlist=mlist->next) {
1083 MULTINAME(m, mlist->classinfo);
1084 abc_class_add_interface(state->cls->abc, &m);
1087 /* write the construction code for this class to the global init
1089 int slotindex = abc_initscript_addClassTrait(global->init, &classname2, state->cls->abc);
1091 abc_method_body_t*m = global->init->method->body;
1092 __ getglobalscope(m);
1093 classinfo_t*s = extends;
1098 //TODO: take a look at the current scope stack, maybe
1099 // we can re-use something
1104 multiname_t*s2 = sig2mname(s);
1106 multiname_destroy(s2);
1108 __ pushscope(m); count++;
1109 m->code = m->code->prev->prev; // invert
1111 /* continue appending after last op end */
1112 while(m->code && m->code->next) m->code = m->code->next;
1114 /* TODO: if this is one of *our* classes, we can also
1115 do a getglobalscope/getslot <nr> (which references
1116 the init function's slots) */
1118 __ getlex2(m, extends2);
1120 /* notice: we get a Verify Error #1107 if the top elemnt on the scope
1121 stack is not the superclass */
1122 __ pushscope(m);count++;
1125 /* notice: we get a verify error #1107 if the top element on the scope
1126 stack is not the global object */
1128 __ pushscope(m);count++;
1130 __ newclass(m,state->cls->abc);
1134 __ setslot(m, slotindex);
1135 multiname_destroy(extends2);
1137 /* flash.display.MovieClip handling */
1139 if(!as3_globalclass && (mod->flags&FLAG_PUBLIC) && slotinfo_equals((slotinfo_t*)registry_getMovieClip(),(slotinfo_t*)extends)) {
1140 if(state->package && state->package[0]) {
1141 as3_globalclass = concat3(state->package, ".", classname);
1143 as3_globalclass = strdup(classname);
1149 static void endclass()
1152 if(!state->cls->has_constructor && !(state->cls->info->flags&FLAG_INTERFACE)) {
1154 c = abc_getlocal_0(c);
1155 c = abc_constructsuper(c, 0);
1156 state->cls->init->header = code_append(state->cls->init->header, c);
1157 state->cls->has_constructor=1;
1159 if(state->cls->init) {
1160 if(state->cls->info->flags&FLAG_INTERFACE) {
1161 if(state->cls->init->header)
1162 syntaxerror("interface can not have class-level code");
1164 abc_method_t*m = abc_class_getconstructor(state->cls->abc, 0);
1165 code_t*c = method_header(state->cls->init);
1166 m->body->code = wrap_function(c, 0, m->body->code);
1169 if(state->cls->static_init) {
1170 abc_method_t*m = abc_class_getstaticconstructor(state->cls->abc, 0);
1171 code_t*c = method_header(state->cls->static_init);
1172 m->body->code = wrap_function(c, 0, m->body->code);
1179 void check_code_for_break(code_t*c)
1182 if(c->opcode == OPCODE___BREAK__) {
1183 char*name = string_cstr(c->data[0]);
1184 syntaxerror("Unresolved \"break %s\"", name);
1186 if(c->opcode == OPCODE___CONTINUE__) {
1187 char*name = string_cstr(c->data[0]);
1188 syntaxerror("Unresolved \"continue %s\"", name);
1190 if(c->opcode == OPCODE___RETHROW__) {
1191 syntaxerror("Unresolved \"rethrow\"");
1193 if(c->opcode == OPCODE___FALLTHROUGH__) {
1194 syntaxerror("Unresolved \"fallthrough\"");
1196 if(c->opcode == OPCODE___PUSHPACKAGE__) {
1197 char*name = string_cstr(c->data[0]);
1198 syntaxerror("Can't reference a package (%s) as such", name);
1204 static void check_constant_against_type(classinfo_t*t, constant_t*c)
1206 #define xassert(b) if(!(b)) syntaxerror("Invalid default value %s for type '%s'", constant_tostring(c), t->name)
1207 if(TYPE_IS_NUMBER(t)) {
1208 xassert(c->type == CONSTANT_FLOAT
1209 || c->type == CONSTANT_INT
1210 || c->type == CONSTANT_UINT);
1211 } else if(TYPE_IS_UINT(t)) {
1212 xassert(c->type == CONSTANT_UINT ||
1213 (c->type == CONSTANT_INT && c->i>=0));
1214 } else if(TYPE_IS_INT(t)) {
1215 xassert(c->type == CONSTANT_INT);
1216 } else if(TYPE_IS_BOOLEAN(t)) {
1217 xassert(c->type == CONSTANT_TRUE
1218 || c->type == CONSTANT_FALSE);
1222 static void check_override(memberinfo_t*m, int flags)
1226 if(m->parent == state->cls->info)
1227 syntaxerror("class '%s' already contains a method/slot '%s'", m->parent->name, m->name);
1229 syntaxerror("internal error: overriding method %s, which doesn't have parent", m->name);
1230 if(m->access==ACCESS_PRIVATE)
1232 if(m->flags & FLAG_FINAL)
1233 syntaxerror("can't override final member %s", m->name);
1235 /* allow this. it's no issue.
1236 if((m->flags & FLAG_STATIC) && !(flags&FLAG_STATIC))
1237 syntaxerror("can't override static member %s", m->name);*/
1239 if(!(m->flags & FLAG_STATIC) && (flags&FLAG_STATIC))
1240 syntaxerror("can't override non-static member %s with static declaration", m->name);
1242 if(!(flags&FLAG_OVERRIDE) && !(flags&FLAG_STATIC) && !(m->flags&FLAG_STATIC)) {
1243 if(m->parent && !(m->parent->flags&FLAG_INTERFACE)) {
1244 if(m->kind == INFOTYPE_METHOD)
1245 syntaxerror("can't override without explicit 'override' declaration");
1247 syntaxerror("can't override '%s'", m->name);
1252 static methodinfo_t*registerfunction(enum yytokentype getset, modifiers_t*mod, char*name, params_t*params, classinfo_t*return_type, int slot)
1254 methodinfo_t*minfo = 0;
1255 namespace_t ns = modifiers2access(mod);
1258 minfo = methodinfo_register_global(ns.access, state->package, name);
1259 minfo->return_type = 0; // save this for pass 2
1260 } else if(getset != KW_GET && getset != KW_SET) {
1262 memberinfo_t* m = registry_findmember(state->cls->info, ns.name, name, 0);
1264 syntaxerror("class already contains a %s '%s'", infotypename((slotinfo_t*)m), m->name);
1266 minfo = methodinfo_register_onclass(state->cls->info, ns.access, ns.name, name);
1267 minfo->return_type = 0; // save this for pass 2
1268 // getslot on a member slot only returns "undefined", so no need
1269 // to actually store these
1270 //state->minfo->slot = state->method->abc->method->trait->slot_id;
1272 //class getter/setter
1273 int gs = getset==KW_GET?SUBTYPE_GET:SUBTYPE_SET;
1275 if(getset == KW_GET) {
1277 } else if(params->list && params->list->param && !params->list->next) {
1278 type = params->list->param->type;
1280 syntaxerror("setter function needs to take exactly one argument");
1281 // not sure wether to look into superclasses here, too
1282 minfo = (methodinfo_t*)registry_findmember(state->cls->info, ns.name, name, 1);
1284 if(minfo->kind!=INFOTYPE_VAR)
1285 syntaxerror("class already contains a method called '%s'", name);
1286 if(!(minfo->subtype & (SUBTYPE_GETSET)))
1287 syntaxerror("class already contains a field called '%s'", name);
1288 if(minfo->subtype & gs)
1289 syntaxerror("getter/setter for '%s' already defined", name);
1290 /* make a setter or getter into a getset */
1291 minfo->subtype |= gs;
1294 FIXME: this check needs to be done in pass 2
1296 if((!minfo->return_type != !type) ||
1297 (minfo->return_type && type &&
1298 !strcmp(minfo->return_type->name, type->name))) {
1299 syntaxerror("different type in getter and setter: %s and %s",
1300 minfo->return_type?minfo->return_type->name:"*",
1301 type?type->name:"*");
1304 minfo = methodinfo_register_onclass(state->cls->info, ns.access, ns.name, name);
1305 minfo->kind = INFOTYPE_VAR; //hack
1306 minfo->subtype = gs;
1307 minfo->return_type = 0;
1309 /* can't assign a slot as getter and setter might have different slots */
1310 //minfo->slot = slot;
1312 if(mod->flags&FLAG_FINAL) minfo->flags |= FLAG_FINAL;
1313 if(mod->flags&FLAG_STATIC) minfo->flags |= FLAG_STATIC;
1314 if(mod->flags&FLAG_OVERRIDE) minfo->flags |= FLAG_OVERRIDE;
1319 static void innerfunction(char*name, params_t*params, classinfo_t*return_type)
1321 //parserassert(state->method && state->method->info);
1323 methodstate_t*parent_method = state->method;
1326 return_type = 0; // not valid in pass 1
1330 state->new_vars = 1;
1333 state->method = rfx_calloc(sizeof(methodstate_t));
1334 state->method->inner = 1;
1335 state->method->variable_count = 0;
1336 state->method->abc = rfx_calloc(sizeof(abc_method_t));
1338 NEW(methodinfo_t,minfo);
1339 minfo->kind = INFOTYPE_METHOD;
1340 minfo->access = ACCESS_PACKAGEINTERNAL;
1342 state->method->info = minfo;
1345 list_append(parent_method->innerfunctions, state->method);
1347 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
1349 function_initvars(state->method, params, 0, 1);
1353 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1354 state->method->variable_count = 0;
1355 parserassert(state->method);
1357 state->method->info->return_type = return_type;
1358 function_initvars(state->method, params, 0, 1);
1362 static void startfunction(modifiers_t*mod, enum yytokentype getset, char*name,
1363 params_t*params, classinfo_t*return_type)
1365 if(state->method && state->method->info) {
1366 syntaxerror("not able to start another method scope");
1369 state->new_vars = 1;
1372 state->method = rfx_calloc(sizeof(methodstate_t));
1373 state->method->has_super = 0;
1376 state->method->is_constructor = !strcmp(state->cls->info->name,name);
1378 state->method->is_global = 1;
1379 state->method->late_binding = 1; // for global methods, always push local_0 on the scope stack
1381 if(state->method->is_constructor)
1382 name = "__as3_constructor__";
1384 state->method->info = registerfunction(getset, mod, name, params, return_type, 0);
1386 function_initvars(state->method, params, mod->flags, 1);
1388 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
1392 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1393 state->method->variable_count = 0;
1394 parserassert(state->method);
1397 memberinfo_t*m = registry_findmember(state->cls->info, mod->ns, name, 2);
1398 check_override(m, mod->flags);
1402 state->cls->has_constructor |= state->method->is_constructor;
1405 state->method->info->return_type = return_type;
1406 function_initvars(state->method, params, mod->flags, 1);
1410 static abc_method_t* endfunction(modifiers_t*mod, enum yytokentype getset, char*name,
1411 params_t*params, classinfo_t*return_type, code_t*body)
1414 // store inner methods in variables
1415 function_initvars(state->method, 0, 0, 0);
1417 methodstate_list_t*ml = state->method->innerfunctions;
1419 dict_t*xvars = dict_new();
1422 methodstate_t*m = ml->methodstate;
1423 parserassert(m->inner);
1424 if(m->unresolved_variables) {
1425 dict_t*d = m->unresolved_variables;
1427 for(t=0;t<d->hashsize;t++) {
1428 dictentry_t*l = d->slots[t];
1430 /* check parent method's variables */
1432 if((v=find_variable(state, l->key))) {
1433 m->uses_parent_function = 1;
1434 state->method->uses_slots = 1;
1435 dict_put(xvars, l->key, 0);
1442 dict_destroy(m->unresolved_variables);
1443 m->unresolved_variables = 0;
1448 if(state->method->uses_slots) {
1449 state->method->slots = dict_new();
1451 DICT_ITERATE_ITEMS(state->vars, char*, name, variable_t*, v) {
1452 if(!name) syntaxerror("internal error");
1453 if(v->index && dict_contains(xvars, name)) {
1456 if(v->is_inner_method) {
1457 v->is_inner_method->is_a_slot = 1;
1460 dict_put(state->method->slots, name, v);
1463 state->method->uses_slots = i;
1464 dict_destroy(state->vars);state->vars = 0;
1471 /*if(state->method->uses_parent_function){
1472 syntaxerror("accessing variables of parent function from inner functions not supported yet");
1477 multiname_t*type2 = sig2mname(return_type);
1479 if(state->method->inner) {
1480 f = state->method->abc;
1481 abc_method_init(f, global->file, type2, 1);
1482 } else if(state->method->is_constructor) {
1483 f = abc_class_getconstructor(state->cls->abc, type2);
1484 } else if(!state->method->is_global) {
1485 namespace_t mname_ns = modifiers2access(mod);
1486 multiname_t mname = {QNAME, &mname_ns, 0, name};
1488 if(mod->flags&FLAG_STATIC)
1489 f = abc_class_staticmethod(state->cls->abc, type2, &mname);
1491 f = abc_class_method(state->cls->abc, type2, &mname);
1492 slot = f->trait->slot_id;
1494 namespace_t mname_ns = {state->method->info->access, state->package};
1495 multiname_t mname = {QNAME, &mname_ns, 0, name};
1497 f = abc_method_new(global->file, type2, 1);
1498 trait_t*t = trait_new_method(&global->init->traits, multiname_clone(&mname), f);
1499 //abc_code_t*c = global->init->method->body->code;
1501 //flash doesn't seem to allow us to access function slots
1502 //state->method->info->slot = slot;
1504 if(mod && mod->flags&FLAG_OVERRIDE) f->trait->attributes |= TRAIT_ATTR_OVERRIDE;
1505 if(getset == KW_GET) f->trait->kind = TRAIT_GETTER;
1506 if(getset == KW_SET) f->trait->kind = TRAIT_SETTER;
1507 if(params->varargs) f->flags |= METHOD_NEED_REST;
1511 for(p=params->list;p;p=p->next) {
1512 if(params->varargs && !p->next) {
1513 break; //varargs: omit last parameter in function signature
1515 multiname_t*m = sig2mname(p->param->type);
1516 list_append(f->parameters, m);
1517 if(p->param->value) {
1518 check_constant_against_type(p->param->type, p->param->value);
1519 opt=1;list_append(f->optional_parameters, p->param->value);
1521 syntaxerror("non-optional parameter not allowed after optional parameters");
1524 if(state->method->slots) {
1525 DICT_ITERATE_ITEMS(state->method->slots, char*, name, variable_t*, v) {
1527 multiname_t*mname = multiname_new(namespace_new(ACCESS_PACKAGE, ""), name);
1528 multiname_t*type = sig2mname(v->type);
1529 trait_t*t = trait_new_member(&f->body->traits, type, mname, 0);
1530 t->slot_id = v->index;
1535 check_code_for_break(body);
1537 /* Seems this works now.
1538 if(state->method->exceptions && state->method->uses_slots) {
1539 as3_warning("try/catch and activation not supported yet within the same method");
1543 f->body->code = body;
1544 f->body->exceptions = state->method->exceptions;
1545 } else { //interface
1547 syntaxerror("interface methods can't have a method body");
1557 void breakjumpsto(code_t*c, char*name, code_t*jump)
1560 if(c->opcode == OPCODE___BREAK__) {
1561 string_t*name2 = c->data[0];
1562 if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1563 c->opcode = OPCODE_JUMP;
1570 void continuejumpsto(code_t*c, char*name, code_t*jump)
1573 if(c->opcode == OPCODE___CONTINUE__) {
1574 string_t*name2 = c->data[0];
1575 if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1576 c->opcode = OPCODE_JUMP;
1584 #define IS_NUMBER_OR_INT(a) (TYPE_IS_INT((a)) || TYPE_IS_UINT((a)) || TYPE_IS_NUMBER((a)))
1586 code_t*converttype(code_t*c, classinfo_t*from, classinfo_t*to)
1591 return abc_coerce_a(c);
1595 // cast an "any" type to a specific type. subject to
1596 // runtime exceptions
1597 return abc_coerce2(c, &m);
1600 if((TYPE_IS_NUMBER(from) || TYPE_IS_UINT(from) || TYPE_IS_INT(from)) &&
1601 (TYPE_IS_NUMBER(to) || TYPE_IS_UINT(to) || TYPE_IS_INT(to))) {
1602 // allow conversion between number types
1603 if(TYPE_IS_UINT(to))
1604 return abc_convert_u(c);
1605 else if(TYPE_IS_INT(to))
1606 return abc_convert_i(c);
1607 else if(TYPE_IS_NUMBER(to))
1608 return abc_convert_d(c);
1609 return abc_coerce2(c, &m);
1612 if(TYPE_IS_BOOLEAN(to))
1613 return abc_convert_b(c);
1614 if(TYPE_IS_STRING(to))
1615 return abc_convert_s(c);
1616 if(TYPE_IS_OBJECT(to))
1617 return abc_convert_o(c);
1619 classinfo_t*supertype = from;
1621 if(supertype == to) {
1622 // target type is one of from's superclasses
1623 return abc_coerce2(c, &m);
1626 while(supertype->interfaces[t]) {
1627 if(supertype->interfaces[t]==to) {
1628 // target type is one of from's interfaces
1629 return abc_coerce2(c, &m);
1633 supertype = supertype->superclass;
1635 if(TYPE_IS_FUNCTION(from) && TYPE_IS_FUNCTION(to))
1637 if(TYPE_IS_CLASS(from) && TYPE_IS_CLASS(to))
1639 if(TYPE_IS_NULL(from) && !IS_NUMBER_OR_INT(to))
1642 as3_error("can't convert type %s%s%s to %s%s%s",
1643 from->package, from->package[0]?".":"", from->name,
1644 to->package, to->package[0]?".":"", to->name);
1648 /* move to ast.c todo end */
1650 char is_pushundefined(code_t*c)
1652 return (c && !c->prev && !c->next && c->opcode == OPCODE_PUSHUNDEFINED);
1655 static const char* get_package_from_name(const char*name)
1657 /* try explicit imports */
1658 dictentry_t* e = dict_get_slot(state->imports, name);
1660 if(!strcmp(e->key, name)) {
1661 slotinfo_t*c = (slotinfo_t*)e->data;
1662 if(c) return c->package;
1668 static namespace_list_t*get_current_imports()
1670 namespace_list_t*searchlist = 0;
1672 list_append(searchlist, namespace_new_package(state->package));
1674 import_list_t*l = state->wildcard_imports;
1676 namespace_t*ns = namespace_new_package(l->import->package);
1677 list_append(searchlist, ns);
1680 list_append(searchlist, namespace_new_package(""));
1681 list_append(searchlist, namespace_new_package(internal_filename_package));
1685 static slotinfo_t* find_class(const char*name)
1689 c = registry_find(state->package, name);
1692 /* try explicit imports */
1693 dictentry_t* e = dict_get_slot(state->imports, name);
1696 if(!strcmp(e->key, name)) {
1697 c = (slotinfo_t*)e->data;
1703 /* try package.* imports */
1704 import_list_t*l = state->wildcard_imports;
1706 //printf("does package %s contain a class %s?\n", l->import->package, name);
1707 c = registry_find(l->import->package, name);
1712 /* try global package */
1713 c = registry_find("", name);
1716 /* try local "filename" package */
1717 c = registry_find(internal_filename_package, name);
1722 typedcode_t push_class(slotinfo_t*a)
1727 if(a->access == ACCESS_PACKAGEINTERNAL &&
1728 strcmp(a->package, state->package) &&
1729 strcmp(a->package, internal_filename_package)
1731 syntaxerror("Can't access internal %s %s in package '%s' from package '%s'",
1732 infotypename(a), a->name, a->package, state->package);
1735 if(a->kind != INFOTYPE_CLASS) {
1737 x.c = abc_findpropstrict2(x.c, &m);
1738 x.c = abc_getproperty2(x.c, &m);
1739 if(a->kind == INFOTYPE_METHOD) {
1740 methodinfo_t*f = (methodinfo_t*)a;
1741 x.t = TYPE_FUNCTION(f);
1743 varinfo_t*v = (varinfo_t*)a;
1747 classinfo_t*c = (classinfo_t*)a;
1749 x.c = abc_getglobalscope(x.c);
1750 x.c = abc_getslot(x.c, c->slot);
1753 x.c = abc_getlex2(x.c, &m);
1755 x.t = TYPE_CLASS(c);
1761 char is_break_or_jump(code_t*c)
1765 if(c->opcode == OPCODE_JUMP ||
1766 c->opcode == OPCODE___BREAK__ ||
1767 c->opcode == OPCODE___CONTINUE__ ||
1768 c->opcode == OPCODE_THROW ||
1769 c->opcode == OPCODE_RETURNVOID ||
1770 c->opcode == OPCODE_RETURNVALUE) {
1776 #define IS_FINALLY_TARGET(op) \
1777 ((op) == OPCODE___CONTINUE__ || \
1778 (op) == OPCODE___BREAK__ || \
1779 (op) == OPCODE_RETURNVOID || \
1780 (op) == OPCODE_RETURNVALUE || \
1781 (op) == OPCODE___RETHROW__)
1783 static code_t* insert_finally_lookup(code_t*c, code_t*finally, int tempvar)
1785 #define NEED_EXTRA_STACK_ARG
1786 code_t*finally_label = abc_nop(0);
1787 NEW(lookupswitch_t, l);
1793 code_t*prev = i->prev;
1794 if(IS_FINALLY_TARGET(i->opcode)) {
1797 if(i->opcode == OPCODE___RETHROW__ ||
1798 i->opcode == OPCODE_RETURNVALUE) {
1799 if(i->opcode == OPCODE___RETHROW__)
1800 i->opcode = OPCODE_THROW;
1802 p = abc_coerce_a(p);
1803 p = abc_setlocal(p, tempvar);
1805 p = abc_pushbyte(p, count++);
1806 p = abc_jump(p, finally_label);
1807 code_t*target = p = abc_label(p);
1808 #ifdef NEED_EXTRA_STACK_ARG
1812 p = abc_getlocal(p, tempvar);
1815 p->next = i;i->prev = p;
1816 list_append(l->targets, target);
1822 c = abc_pushbyte(c, -1);
1823 c = code_append(c, finally_label);
1824 c = code_append(c, finally);
1826 #ifdef NEED_EXTRA_STACK_ARG
1829 c = abc_lookupswitch(c, l);
1830 c = l->def = abc_label(c);
1831 #ifdef NEED_EXTRA_STACK_ARG
1838 static code_t* insert_finally_simple(code_t*c, code_t*finally, int tempvar)
1842 code_t*prev = i->prev;
1843 if(IS_FINALLY_TARGET(i->opcode)) {
1844 if(i->opcode == OPCODE___RETHROW__)
1845 i->opcode = OPCODE_THROW;
1846 code_t*end = code_dup(finally);
1847 code_t*start = code_start(end);
1848 if(prev) prev->next = start;
1855 return code_append(c, finally);
1858 code_t* insert_finally(code_t*c, code_t*finally, int tempvar)
1864 int num_insertion_points=0;
1866 if(IS_FINALLY_TARGET(i->opcode))
1867 num_insertion_points++;
1874 if(i->branch || i->opcode == OPCODE_LOOKUPSWITCH) {
1879 int simple_version_cost = (1+num_insertion_points)*code_size;
1880 int lookup_version_cost = 4*num_insertion_points + 5;
1882 if(cantdup || simple_version_cost > lookup_version_cost) {
1883 //printf("(use lookup) simple=%d > lookup=%d\n", simple_version_cost, lookup_version_cost);
1884 return insert_finally_lookup(c, finally, tempvar);
1886 //printf("(use simple) simple=%d < lookup=%d\n", simple_version_cost, lookup_version_cost);
1887 return insert_finally_simple(c, finally, tempvar);
1891 #define PASS1 }} if(as3_pass == 1) {{
1892 #define PASS1END }} if(as3_pass == 2) {{
1893 #define PASS2 }} if(as3_pass == 2) {{
1894 #define PASS12 }} if(as3_pass == 1 || as3_pass == 2) {{
1895 #define PASS12END }} if(as3_pass == 2) {{
1896 #define PASS_ALWAYS }} {{
1900 /* Line 273 of skeleton.m4 */
1901 #line 1902 "parser.tab.c"
1902 /* Unqualified %code blocks. */
1904 /* Line 274 of skeleton.m4 */
1905 #line 1967 "parser.y"
1907 char is_subtype_of(classinfo_t*type, classinfo_t*supertype)
1913 /* Line 274 of skeleton.m4 */
1914 #line 2416 "parser.y"
1916 static void state_has_imports()
1918 state->wildcard_imports = list_clone(state->wildcard_imports);
1919 state->imports = dict_clone(state->imports);
1920 state->has_own_imports = 1;
1922 static void import_toplevel(const char*package)
1924 char* s = strdup(package);
1926 dict_put(state->import_toplevel_packages, s, 0);
1927 char*x = strrchr(s, '.');
1936 /* Line 274 of skeleton.m4 */
1937 #line 2549 "parser.y"
1939 static int slotstate_varconst = 0;
1940 static modifiers_t*slotstate_flags = 0;
1941 static void setslotstate(modifiers_t* flags, int varconst)
1943 slotstate_varconst = varconst;
1944 slotstate_flags = flags;
1946 if(flags && flags->flags&FLAG_STATIC) {
1947 state->method = state->cls->static_init;
1949 state->method = state->cls->init;
1952 parserassert(state->method);
1957 /* Line 274 of skeleton.m4 */
1958 #line 3431 "parser.y"
1960 void add_active_url(const char*url)
1964 list_append(state->active_namespace_urls, n);
1969 /* Line 274 of skeleton.m4 */
1970 #line 1971 "parser.tab.c"
1977 typedef YYTYPE_UINT8 yytype_uint8;
1979 typedef unsigned char yytype_uint8;
1983 typedef YYTYPE_INT8 yytype_int8;
1984 #elif (defined __STDC__ || defined __C99__FUNC__ \
1985 || defined __cplusplus || defined _MSC_VER)
1986 typedef signed char yytype_int8;
1988 typedef short int yytype_int8;
1991 #ifdef YYTYPE_UINT16
1992 typedef YYTYPE_UINT16 yytype_uint16;
1994 typedef unsigned short int yytype_uint16;
1998 typedef YYTYPE_INT16 yytype_int16;
2000 typedef short int yytype_int16;
2004 # ifdef __SIZE_TYPE__
2005 # define YYSIZE_T __SIZE_TYPE__
2006 # elif defined size_t
2007 # define YYSIZE_T size_t
2008 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
2009 || defined __cplusplus || defined _MSC_VER)
2010 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
2011 # define YYSIZE_T size_t
2013 # define YYSIZE_T unsigned int
2017 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
2022 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
2023 # define YY_(msgid) dgettext ("bison-runtime", msgid)
2027 # define YY_(msgid) msgid
2031 /* Suppress unused-variable warnings by "using" E. */
2032 #if ! defined lint || defined __GNUC__
2033 # define YYUSE(e) ((void) (e))
2035 # define YYUSE(e) /* empty */
2038 /* Identity function, used to suppress warnings about constant conditions. */
2040 # define YYID(n) (n)
2042 #if (defined __STDC__ || defined __C99__FUNC__ \
2043 || defined __cplusplus || defined _MSC_VER)
2056 #if ! defined yyoverflow || YYERROR_VERBOSE
2058 /* The parser invokes alloca or malloc; define the necessary symbols. */
2060 # ifdef YYSTACK_USE_ALLOCA
2061 # if YYSTACK_USE_ALLOCA
2063 # define YYSTACK_ALLOC __builtin_alloca
2064 # elif defined __BUILTIN_VA_ARG_INCR
2065 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
2067 # define YYSTACK_ALLOC __alloca
2068 # elif defined _MSC_VER
2069 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
2070 # define alloca _alloca
2072 # define YYSTACK_ALLOC alloca
2073 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
2074 || defined __cplusplus || defined _MSC_VER)
2075 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
2077 # define _STDLIB_H 1
2084 # ifdef YYSTACK_ALLOC
2085 /* Pacify GCC's `empty if-body' warning. */
2086 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
2087 # ifndef YYSTACK_ALLOC_MAXIMUM
2088 /* The OS might guarantee only one guard page at the bottom of the stack,
2089 and a page size can be as small as 4096 bytes. So we cannot safely
2090 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
2091 to allow for a few compiler-allocated temporary stack slots. */
2092 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
2095 # define YYSTACK_ALLOC YYMALLOC
2096 # define YYSTACK_FREE YYFREE
2097 # ifndef YYSTACK_ALLOC_MAXIMUM
2098 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
2100 # if (defined __cplusplus && ! defined _STDLIB_H \
2101 && ! ((defined YYMALLOC || defined malloc) \
2102 && (defined YYFREE || defined free)))
2103 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
2105 # define _STDLIB_H 1
2109 # define YYMALLOC malloc
2110 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
2111 || defined __cplusplus || defined _MSC_VER)
2112 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
2116 # define YYFREE free
2117 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
2118 || defined __cplusplus || defined _MSC_VER)
2119 void free (void *); /* INFRINGES ON USER NAME SPACE */
2123 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
2126 #if (! defined yyoverflow \
2127 && (! defined __cplusplus \
2128 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
2130 /* A type that is properly aligned for any stack member. */
2133 yytype_int16 yyss_alloc;
2137 /* The size of the maximum gap between one aligned stack and the next. */
2138 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
2140 /* The size of an array large to enough to hold all stacks, each with
2142 # define YYSTACK_BYTES(N) \
2143 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
2144 + YYSTACK_GAP_MAXIMUM)
2146 /* Copy COUNT objects from FROM to TO. The source and destination do
2149 # if defined __GNUC__ && 1 < __GNUC__
2150 # define YYCOPY(To, From, Count) \
2151 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
2153 # define YYCOPY(To, From, Count) \
2157 for (yyi = 0; yyi < (Count); yyi++) \
2158 (To)[yyi] = (From)[yyi]; \
2164 /* Relocate STACK from its old location to the new one. The
2165 local variables YYSIZE and YYSTACKSIZE give the old and new number of
2166 elements in the stack, and YYPTR gives the new location of the
2167 stack. Advance YYPTR to a properly aligned location for the next
2169 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
2172 YYSIZE_T yynewbytes; \
2173 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
2174 Stack = &yyptr->Stack_alloc; \
2175 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
2176 yyptr += yynewbytes / sizeof (*yyptr); \
2182 /* YYFINAL -- State number of the termination state. */
2184 /* YYLAST -- Last index in YYTABLE. */
2187 /* YYNTOKENS -- Number of terminals. */
2188 #define YYNTOKENS 133
2189 /* YYNNTS -- Number of nonterminals. */
2191 /* YYNRULES -- Number of rules. */
2192 #define YYNRULES 303
2193 /* YYNRULES -- Number of states. */
2194 #define YYNSTATES 517
2196 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
2197 #define YYUNDEFTOK 2
2198 #define YYMAXUTOK 362
2200 #define YYTRANSLATE(YYX) \
2201 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
2203 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
2204 static const yytype_uint8 yytranslate[] =
2206 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2207 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2208 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2209 2, 2, 2, 117, 2, 2, 2, 115, 107, 2,
2210 121, 132, 114, 112, 100, 111, 126, 113, 2, 2,
2211 2, 2, 2, 2, 2, 2, 2, 2, 104, 99,
2212 108, 102, 109, 103, 127, 2, 2, 2, 2, 2,
2213 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2214 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2215 2, 123, 2, 124, 106, 2, 2, 2, 2, 2,
2216 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2217 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2218 2, 2, 2, 125, 105, 131, 116, 2, 2, 2,
2219 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2220 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2221 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2222 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2223 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2224 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2225 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2226 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2227 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2228 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2229 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2230 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2231 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
2232 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
2233 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
2234 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
2235 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
2236 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
2237 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
2238 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
2239 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
2240 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
2241 95, 96, 97, 98, 101, 110, 118, 119, 120, 122,
2246 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
2248 static const yytype_uint16 yyprhs[] =
2250 0, 0, 3, 5, 6, 8, 10, 13, 15, 17,
2251 19, 21, 23, 25, 30, 32, 33, 35, 37, 40,
2252 42, 44, 46, 48, 50, 55, 57, 59, 60, 63,
2253 65, 67, 69, 71, 73, 75, 77, 79, 81, 83,
2254 85, 87, 89, 93, 96, 98, 100, 102, 104, 106,
2255 108, 110, 115, 118, 120, 122, 126, 129, 130, 133,
2256 136, 138, 142, 146, 147, 150, 151, 159, 160, 162,
2257 164, 168, 170, 173, 177, 186, 193, 194, 201, 202,
2258 210, 212, 215, 217, 220, 221, 223, 225, 228, 230,
2259 233, 238, 242, 243, 252, 253, 263, 264, 270, 272,
2260 275, 277, 280, 282, 283, 290, 293, 295, 300, 303,
2261 305, 307, 309, 313, 315, 316, 323, 324, 330, 333,
2262 338, 339, 341, 343, 346, 348, 350, 352, 354, 356,
2263 358, 360, 362, 364, 366, 367, 370, 371, 374, 375,
2264 378, 379, 389, 390, 399, 400, 402, 404, 407, 409,
2265 414, 416, 418, 420, 421, 423, 425, 428, 430, 433,
2266 442, 444, 446, 447, 452, 454, 458, 462, 463, 466,
2267 468, 470, 472, 474, 476, 478, 480, 482, 484, 485,
2268 487, 490, 495, 499, 501, 506, 509, 511, 513, 514,
2269 515, 528, 530, 531, 532, 543, 545, 549, 551, 553,
2270 555, 559, 561, 563, 565, 568, 569, 570, 574, 575,
2271 577, 579, 581, 584, 587, 588, 593, 598, 603, 606,
2272 608, 611, 613, 615, 617, 621, 623, 627, 628, 630,
2273 634, 640, 642, 644, 646, 648, 650, 652, 654, 656,
2274 660, 664, 668, 672, 676, 680, 684, 688, 692, 696,
2275 700, 704, 707, 710, 714, 718, 722, 726, 730, 734,
2276 738, 742, 746, 750, 754, 758, 762, 766, 770, 775,
2277 778, 780, 784, 787, 792, 796, 800, 804, 808, 812,
2278 816, 820, 824, 828, 832, 836, 840, 846, 849, 852,
2279 855, 858, 862, 865, 870, 876, 880, 886, 890, 892,
2283 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
2284 static const yytype_int16 yyrhs[] =
2286 134, 0, -1, 135, -1, -1, 136, -1, 137, -1,
2287 136, 137, -1, 185, -1, 197, -1, 195, -1, 216,
2288 -1, 206, -1, 146, -1, 147, 125, 135, 131, -1,
2289 99, -1, -1, 139, -1, 140, -1, 139, 140, -1,
2290 197, -1, 195, -1, 216, -1, 206, -1, 146, -1,
2291 147, 125, 138, 131, -1, 99, -1, 142, -1, -1,
2292 142, 144, -1, 144, -1, 188, -1, 158, -1, 159,
2293 -1, 160, -1, 162, -1, 170, -1, 153, -1, 182,
2294 -1, 178, -1, 239, -1, 247, -1, 246, -1, 125,
2295 142, 131, -1, 125, 131, -1, 99, -1, 143, -1,
2296 149, -1, 164, -1, 165, -1, 235, -1, 180, -1,
2297 147, 125, 142, 131, -1, 144, 99, -1, 144, -1,
2298 143, -1, 3, 89, 3, -1, 102, 242, -1, -1,
2299 45, 150, -1, 31, 150, -1, 151, -1, 150, 100,
2300 151, -1, 3, 226, 148, -1, -1, 64, 145, -1,
2301 -1, 63, 121, 154, 237, 132, 145, 152, -1, -1,
2302 149, -1, 239, -1, 45, 3, 226, -1, 3, -1,
2303 11, 121, -1, 11, 49, 121, -1, 157, 155, 99,
2304 237, 99, 239, 132, 145, -1, 157, 156, 67, 237,
2305 132, 145, -1, -1, 12, 121, 161, 237, 132, 145,
2306 -1, -1, 13, 163, 145, 12, 121, 237, 132, -1,
2307 65, -1, 65, 3, -1, 29, -1, 29, 3, -1,
2308 -1, 167, -1, 169, -1, 167, 169, -1, 168, -1,
2309 167, 168, -1, 33, 242, 104, 141, -1, 61, 104,
2310 141, -1, -1, 14, 121, 171, 242, 132, 125, 166,
2311 131, -1, -1, 32, 121, 3, 226, 132, 173, 125,
2312 141, 131, -1, -1, 26, 125, 175, 141, 131, -1,
2313 172, -1, 176, 172, -1, 176, -1, 176, 174, -1,
2314 174, -1, -1, 51, 125, 179, 141, 131, 177, -1,
2315 36, 237, -1, 36, -1, 38, 121, 237, 132, -1,
2316 181, 145, -1, 3, -1, 17, -1, 4, -1, 184,
2317 126, 183, -1, 183, -1, -1, 17, 184, 125, 186,
2318 138, 131, -1, -1, 17, 125, 187, 138, 131, -1,
2319 40, 222, -1, 40, 184, 126, 114, -1, -1, 190,
2320 -1, 191, -1, 190, 191, -1, 19, -1, 20, -1,
2321 18, -1, 37, -1, 46, -1, 48, -1, 47, -1,
2322 24, -1, 22, -1, 4, -1, -1, 53, 223, -1,
2323 -1, 53, 224, -1, -1, 15, 224, -1, -1, 189,
2324 30, 3, 192, 194, 125, 196, 199, 131, -1, -1,
2325 189, 43, 3, 193, 125, 198, 202, 131, -1, -1,
2326 200, -1, 201, -1, 200, 201, -1, 99, -1, 147,
2327 125, 199, 131, -1, 206, -1, 216, -1, 143, -1,
2328 -1, 203, -1, 204, -1, 203, 204, -1, 99, -1,
2329 45, 3, -1, 189, 25, 215, 3, 121, 212, 132,
2330 226, -1, 45, -1, 31, -1, -1, 189, 205, 207,
2331 208, -1, 209, -1, 208, 100, 209, -1, 3, 226,
2332 148, -1, -1, 102, 242, -1, 8, -1, 9, -1,
2333 10, -1, 5, -1, 55, -1, 54, -1, 44, -1,
2334 27, -1, 28, -1, -1, 213, -1, 93, 214, -1,
2335 213, 100, 93, 214, -1, 213, 100, 214, -1, 214,
2336 -1, 3, 104, 225, 210, -1, 3, 210, -1, 50,
2337 -1, 34, -1, -1, -1, 189, 25, 215, 3, 121,
2338 212, 132, 226, 125, 217, 141, 131, -1, 3, -1,
2339 -1, -1, 25, 218, 121, 212, 132, 226, 125, 220,
2340 141, 131, -1, 183, -1, 184, 126, 183, -1, 222,
2341 -1, 221, -1, 223, -1, 224, 100, 223, -1, 223,
2342 -1, 114, -1, 35, -1, 104, 225, -1, -1, -1,
2343 121, 228, 132, -1, -1, 229, -1, 230, -1, 236,
2344 -1, 229, 100, -1, 230, 236, -1, -1, 23, 242,
2345 231, 227, -1, 242, 121, 228, 132, -1, 52, 121,
2346 228, 132, -1, 62, 242, -1, 41, -1, 41, 237,
2347 -1, 242, -1, 238, -1, 242, -1, 238, 100, 242,
2348 -1, 242, -1, 239, 100, 242, -1, -1, 241, -1,
2349 236, 104, 236, -1, 241, 100, 236, 104, 236, -1,
2350 219, -1, 243, -1, 232, -1, 234, -1, 233, -1,
2351 244, -1, 211, -1, 6, -1, 123, 228, 124, -1,
2352 69, 240, 131, -1, 242, 108, 242, -1, 242, 109,
2353 242, -1, 242, 74, 242, -1, 242, 75, 242, -1,
2354 242, 70, 242, -1, 242, 71, 242, -1, 242, 73,
2355 242, -1, 242, 72, 242, -1, 242, 87, 242, -1,
2356 242, 88, 242, -1, 117, 242, -1, 116, 242, -1,
2357 242, 107, 242, -1, 242, 106, 242, -1, 242, 105,
2358 242, -1, 242, 96, 242, -1, 242, 95, 242, -1,
2359 242, 94, 242, -1, 242, 113, 242, -1, 242, 115,
2360 242, -1, 242, 112, 242, -1, 242, 111, 242, -1,
2361 242, 114, 242, -1, 242, 67, 242, -1, 242, 68,
2362 242, -1, 242, 39, 242, -1, 242, 66, 242, -1,
2363 42, 121, 242, 132, -1, 35, 242, -1, 35, -1,
2364 121, 238, 132, -1, 111, 242, -1, 242, 123, 242,
2365 124, -1, 242, 79, 242, -1, 242, 78, 242, -1,
2366 242, 85, 242, -1, 242, 84, 242, -1, 242, 86,
2367 242, -1, 242, 77, 242, -1, 242, 76, 242, -1,
2368 242, 83, 242, -1, 242, 80, 242, -1, 242, 81,
2369 242, -1, 242, 82, 242, -1, 242, 102, 242, -1,
2370 242, 103, 242, 104, 242, -1, 242, 91, -1, 242,
2371 90, -1, 91, 242, -1, 90, 242, -1, 52, 126,
2372 3, -1, 127, 3, -1, 242, 126, 127, 3, -1,
2373 242, 126, 3, 89, 3, -1, 242, 92, 3, -1,
2374 242, 126, 121, 242, 132, -1, 242, 126, 3, -1,
2375 3, -1, 16, 3, -1, 16, 3, 102, 3, -1,
2376 16, 3, 102, 5, -1, 189, 245, -1, 21, 16,
2380 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
2381 static const yytype_uint16 yyrline[] =
2383 0, 1882, 1882, 1884, 1884, 1885, 1886, 1888, 1889, 1890,
2384 1891, 1892, 1893, 1894, 1895, 1897, 1897, 1898, 1899, 1901,
2385 1902, 1903, 1904, 1905, 1906, 1907, 1909, 1910, 1912, 1913,
2386 1916, 1917, 1918, 1919, 1920, 1921, 1922, 1923, 1924, 1925,
2387 1926, 1927, 1928, 1929, 1932, 1933, 1934, 1935, 1936, 1937,
2388 1938, 1939, 1943, 1944, 1948, 1955, 1974, 1975, 1977, 1978,
2389 1980, 1981, 1983, 2043, 2044, 2047, 2047, 2066, 2067, 2068,
2390 2073, 2077, 2082, 2083, 2085, 2105, 2153, 2153, 2172, 2172,
2391 2187, 2190, 2193, 2196, 2200, 2201, 2202, 2203, 2204, 2205,
2392 2207, 2218, 2221, 2221, 2252, 2252, 2277, 2277, 2293, 2294,
2393 2295, 2296, 2304, 2313, 2313, 2362, 2366, 2377, 2387, 2404,
2394 2405, 2406, 2408, 2409, 2411, 2411, 2413, 2413, 2436, 2450,
2395 2466, 2467, 2468, 2469, 2476, 2477, 2478, 2479, 2480, 2481,
2396 2482, 2483, 2484, 2485, 2489, 2490, 2492, 2493, 2495, 2496,
2397 2500, 2498, 2506, 2504, 2513, 2514, 2515, 2516, 2517, 2518,
2398 2519, 2520, 2522, 2528, 2529, 2530, 2531, 2532, 2533, 2536,
2399 2568, 2568, 2570, 2570, 2572, 2573, 2575, 2669, 2670, 2678,
2400 2679, 2682, 2683, 2684, 2685, 2686, 2687, 2688, 2703, 2707,
2401 2713, 2719, 2727, 2732, 2738, 2746, 2754, 2755, 2756, 2759,
2402 2758, 2775, 2776, 2778, 2777, 2801, 2820, 2834, 2835, 2837,
2403 2838, 2840, 2841, 2842, 2851, 2852, 2856, 2857, 2859, 2860,
2404 2861, 2863, 2867, 2868, 2873, 2874, 2911, 2958, 2979, 3001,
2405 3004, 3011, 3014, 3017, 3020, 3023, 3026, 3031, 3032, 3034,
2406 3040, 3049, 3050, 3051, 3052, 3053, 3054, 3056, 3061, 3081,
2407 3091, 3100, 3101, 3102, 3103, 3104, 3105, 3106, 3107, 3108,
2408 3109, 3110, 3111, 3112, 3113, 3114, 3115, 3116, 3117, 3118,
2409 3119, 3120, 3121, 3122, 3123, 3124, 3125, 3126, 3127, 3128,
2410 3129, 3130, 3131, 3132, 3133, 3134, 3135, 3136, 3137, 3138,
2411 3139, 3140, 3141, 3142, 3143, 3144, 3145, 3147, 3148, 3149,
2412 3150, 3152, 3167, 3173, 3179, 3185, 3191, 3204, 3262, 3395,
2413 3402, 3409, 3416, 3440
2417 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
2418 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
2419 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
2420 static const char *const yytname[] =
2422 "$end", "error", "$undefined", "T_IDENTIFIER", "T_NAMESPACE",
2423 "T_STRING", "T_REGEXP", "T_EMPTY", "T_INT", "T_UINT", "T_FLOAT",
2424 "\"for\"", "\"while\"", "\"do\"", "\"switch\"", "\"implements\"",
2425 "\"namespace\"", "\"package\"", "\"protected\"", "\"public\"",
2426 "\"private\"", "\"use\"", "\"internal\"", "\"new\"", "\"native\"",
2427 "\"function\"", "\"finally\"", "\"undefined\"", "\"NaN\"",
2428 "\"continue\"", "\"class\"", "\"const\"", "\"catch\"", "\"case\"",
2429 "\"set\"", "\"void\"", "\"throw\"", "\"static\"", "\"with\"",
2430 "\"instanceof\"", "\"import\"", "\"return\"", "\"typeof\"",
2431 "\"interface\"", "\"null\"", "\"var\"", "\"dynamic\"", "\"override\"",
2432 "\"final\"", "\"each\"", "\"get\"", "\"try\"", "\"super\"",
2433 "\"extends\"", "\"false\"", "\"true\"", "\"Boolean\"", "\"uint\"",
2434 "\"int\"", "\"Number\"", "\"String\"", "\"default\"", "\"delete\"",
2435 "\"if\"", "\"else\"", "\"break\"", "\"is\"", "\"in\"", "\"as\"",
2436 "\"{ (dictionary)\"", "\"==\"", "\"===\"", "\"!=\"", "\"!==\"", "\"<=\"",
2437 "\">=\"", "\"|=\"", "\"/=\"", "\"%=\"", "\"*=\"", "\"&=\"", "\"+=\"",
2438 "\"-=\"", "\"^=\"", "\">>=\"", "\"<<=\"", "\">>>=\"", "\"||\"", "\"&&\"",
2439 "\"::\"", "\"--\"", "\"++\"", "\"..\"", "\"...\"", "\"<<\"", "\">>>\"",
2440 "\">>\"", "prec_none", "below_semicolon", "';'", "','",
2441 "below_assignment", "'='", "'?'", "':'", "'|'", "'^'", "'&'", "'<'",
2442 "'>'", "below_minus", "'-'", "'+'", "'/'", "'*'", "'%'", "'~'", "'!'",
2443 "minusminus_prefix", "plusplus_prefix", "below_curly", "'('", "new2",
2444 "'['", "']'", "'{'", "'.'", "'@'", "above_identifier", "below_else",
2445 "above_function", "'}'", "')'", "$accept", "PROGRAM",
2446 "MAYBE_PROGRAM_CODE_LIST", "PROGRAM_CODE_LIST", "PROGRAM_CODE",
2447 "MAYBE_INPACKAGE_CODE_LIST", "INPACKAGE_CODE_LIST", "INPACKAGE_CODE",
2448 "MAYBECODE", "CODE", "CODE_STATEMENT", "CODEPIECE", "CODEBLOCK",
2449 "PACKAGE_INITCODE", "CONDITIONAL_COMPILATION", "MAYBEEXPRESSION",
2450 "VARIABLE_DECLARATION", "VARIABLE_LIST", "ONE_VARIABLE", "MAYBEELSE",
2451 "IF", "$@1", "FOR_INIT", "FOR_IN_INIT", "FOR_START", "FOR", "FOR_IN",
2452 "WHILE", "$@2", "DO_WHILE", "$@3", "BREAK", "CONTINUE",
2453 "MAYBE_CASE_LIST", "CASE_LIST", "CASE", "DEFAULT", "SWITCH", "$@4",
2454 "CATCH", "$@5", "FINALLY", "$@6", "CATCH_LIST", "CATCH_FINALLY_LIST",
2455 "TRY", "$@7", "THROW", "WITH_HEAD", "WITH", "X_IDENTIFIER", "PACKAGE",
2456 "PACKAGE_DECLARATION", "$@8", "$@9", "IMPORT", "MAYBE_MODIFIERS",
2457 "MODIFIER_LIST", "MODIFIER", "EXTENDS", "EXTENDS_LIST",
2458 "IMPLEMENTS_LIST", "CLASS_DECLARATION", "$@10", "INTERFACE_DECLARATION",
2459 "$@11", "MAYBE_CLASS_BODY", "CLASS_BODY", "CLASS_BODY_ITEM",
2460 "MAYBE_INTERFACE_BODY", "INTERFACE_BODY", "IDECLARATION", "VARCONST",
2461 "SLOT_DECLARATION", "$@12", "SLOT_LIST", "ONE_SLOT", "MAYBECONSTANT",
2462 "CONSTANT", "MAYBE_PARAM_LIST", "PARAM_LIST", "PARAM", "GETSET",
2463 "FUNCTION_DECLARATION", "$@13", "MAYBE_IDENTIFIER", "INNERFUNCTION",
2464 "$@14", "CLASS", "PACKAGEANDCLASS", "CLASS_SPEC", "CLASS_SPEC_LIST",
2465 "TYPE", "MAYBETYPE", "MAYBE_PARAM_VALUES", "MAYBE_EXPRESSION_LIST",
2466 "EXPRESSION_LIST", "EXPRESSION_LIST_AND_COMMA", "XX", "NEW",
2467 "FUNCTIONCALL", "DELETE", "RETURN", "NONCOMMAEXPRESSION", "EXPRESSION",
2468 "COMMA_EXPRESSION", "VOIDEXPRESSION", "MAYBE_EXPRPAIR_LIST",
2469 "EXPRPAIR_LIST", "E", "MEMBER", "VAR_READ", "NAMESPACE_ID",
2470 "NAMESPACE_DECLARATION", "USE_NAMESPACE", 0
2475 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
2477 static const yytype_uint16 yytoknum[] =
2479 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
2480 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
2481 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
2482 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
2483 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
2484 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
2485 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
2486 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
2487 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
2488 345, 346, 347, 348, 349, 350, 351, 352, 353, 59,
2489 44, 354, 61, 63, 58, 124, 94, 38, 60, 62,
2490 355, 45, 43, 47, 42, 37, 126, 33, 356, 357,
2491 358, 40, 359, 91, 93, 123, 46, 64, 360, 361,
2496 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
2497 static const yytype_uint8 yyr1[] =
2499 0, 133, 134, 135, 135, 136, 136, 137, 137, 137,
2500 137, 137, 137, 137, 137, 138, 138, 139, 139, 140,
2501 140, 140, 140, 140, 140, 140, 141, 141, 142, 142,
2502 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
2503 143, 143, 143, 143, 144, 144, 144, 144, 144, 144,
2504 144, 144, 145, 145, 146, 147, 148, 148, 149, 149,
2505 150, 150, 151, 152, 152, 154, 153, 155, 155, 155,
2506 156, 156, 157, 157, 158, 159, 161, 160, 163, 162,
2507 164, 164, 165, 165, 166, 166, 166, 166, 167, 167,
2508 168, 169, 171, 170, 173, 172, 175, 174, 176, 176,
2509 177, 177, 177, 179, 178, 180, 180, 181, 182, 183,
2510 183, 183, 184, 184, 186, 185, 187, 185, 188, 188,
2511 189, 189, 190, 190, 191, 191, 191, 191, 191, 191,
2512 191, 191, 191, 191, 192, 192, 193, 193, 194, 194,
2513 196, 195, 198, 197, 199, 199, 200, 200, 201, 201,
2514 201, 201, 201, 202, 202, 203, 203, 204, 204, 204,
2515 205, 205, 207, 206, 208, 208, 209, 210, 210, 211,
2516 211, 211, 211, 211, 211, 211, 211, 211, 212, 212,
2517 212, 212, 213, 213, 214, 214, 215, 215, 215, 217,
2518 216, 218, 218, 220, 219, 221, 222, 223, 223, 224,
2519 224, 225, 225, 225, 226, 226, 227, 227, 228, 228,
2520 228, 229, 230, 229, 231, 232, 233, 233, 234, 235,
2521 235, 236, 237, 238, 238, 239, 239, 240, 240, 241,
2522 241, 242, 242, 242, 242, 242, 242, 242, 242, 242,
2523 242, 242, 242, 242, 242, 242, 242, 242, 242, 242,
2524 242, 242, 242, 242, 242, 242, 242, 242, 242, 242,
2525 242, 242, 242, 242, 242, 242, 242, 242, 242, 242,
2526 242, 242, 242, 242, 242, 242, 242, 242, 242, 242,
2527 242, 242, 242, 242, 242, 242, 242, 242, 242, 242,
2528 242, 242, 242, 242, 242, 242, 242, 243, 244, 245,
2532 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
2533 static const yytype_uint8 yyr2[] =
2535 0, 2, 1, 0, 1, 1, 2, 1, 1, 1,
2536 1, 1, 1, 4, 1, 0, 1, 1, 2, 1,
2537 1, 1, 1, 1, 4, 1, 1, 0, 2, 1,
2538 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2539 1, 1, 3, 2, 1, 1, 1, 1, 1, 1,
2540 1, 4, 2, 1, 1, 3, 2, 0, 2, 2,
2541 1, 3, 3, 0, 2, 0, 7, 0, 1, 1,
2542 3, 1, 2, 3, 8, 6, 0, 6, 0, 7,
2543 1, 2, 1, 2, 0, 1, 1, 2, 1, 2,
2544 4, 3, 0, 8, 0, 9, 0, 5, 1, 2,
2545 1, 2, 1, 0, 6, 2, 1, 4, 2, 1,
2546 1, 1, 3, 1, 0, 6, 0, 5, 2, 4,
2547 0, 1, 1, 2, 1, 1, 1, 1, 1, 1,
2548 1, 1, 1, 1, 0, 2, 0, 2, 0, 2,
2549 0, 9, 0, 8, 0, 1, 1, 2, 1, 4,
2550 1, 1, 1, 0, 1, 1, 2, 1, 2, 8,
2551 1, 1, 0, 4, 1, 3, 3, 0, 2, 1,
2552 1, 1, 1, 1, 1, 1, 1, 1, 0, 1,
2553 2, 4, 3, 1, 4, 2, 1, 1, 0, 0,
2554 12, 1, 0, 0, 10, 1, 3, 1, 1, 1,
2555 3, 1, 1, 1, 2, 0, 0, 3, 0, 1,
2556 1, 1, 2, 2, 0, 4, 4, 4, 2, 1,
2557 2, 1, 1, 1, 3, 1, 3, 0, 1, 3,
2558 5, 1, 1, 1, 1, 1, 1, 1, 1, 3,
2559 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
2560 3, 2, 2, 3, 3, 3, 3, 3, 3, 3,
2561 3, 3, 3, 3, 3, 3, 3, 3, 4, 2,
2562 1, 3, 2, 4, 3, 3, 3, 3, 3, 3,
2563 3, 3, 3, 3, 3, 3, 5, 2, 2, 2,
2564 2, 3, 2, 4, 5, 3, 5, 3, 1, 2,
2568 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
2569 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
2570 means the default is an error. */
2571 static const yytype_uint16 yydefact[] =
2573 120, 298, 133, 172, 238, 169, 170, 171, 0, 0,
2574 78, 0, 0, 126, 124, 125, 0, 132, 0, 131,
2575 192, 176, 177, 270, 127, 0, 0, 0, 175, 128,
2576 130, 129, 0, 0, 174, 173, 0, 0, 227, 0,
2577 0, 14, 0, 0, 0, 0, 208, 120, 0, 0,
2578 2, 120, 5, 54, 12, 0, 36, 67, 31, 32,
2579 33, 34, 35, 38, 120, 37, 7, 30, 0, 121,
2580 122, 9, 8, 11, 237, 10, 231, 233, 235, 234,
2581 39, 225, 232, 236, 41, 40, 0, 0, 72, 76,
2582 120, 92, 109, 111, 110, 116, 113, 0, 0, 298,
2583 214, 191, 0, 269, 0, 0, 118, 0, 103, 208,
2584 0, 218, 65, 0, 0, 228, 221, 290, 289, 272,
2585 252, 251, 0, 223, 0, 209, 210, 211, 82, 0,
2586 106, 219, 0, 80, 44, 43, 120, 45, 29, 0,
2587 46, 47, 48, 50, 0, 49, 292, 1, 6, 120,
2588 298, 0, 68, 0, 0, 69, 53, 108, 0, 188,
2589 0, 161, 0, 160, 162, 302, 123, 0, 0, 0,
2590 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2591 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2592 0, 288, 287, 0, 0, 0, 0, 0, 0, 0,
2593 0, 0, 0, 0, 0, 0, 0, 0, 0, 208,
2594 0, 0, 55, 73, 0, 0, 0, 120, 114, 0,
2595 195, 0, 198, 197, 303, 206, 178, 0, 222, 0,
2596 0, 27, 0, 291, 0, 0, 240, 0, 0, 271,
2597 239, 212, 213, 83, 205, 59, 60, 105, 220, 58,
2598 81, 42, 28, 120, 0, 205, 0, 0, 52, 299,
2599 187, 186, 0, 134, 136, 0, 226, 266, 267, 264,
2600 265, 245, 246, 248, 247, 243, 244, 280, 279, 275,
2601 274, 282, 283, 284, 281, 277, 276, 278, 249, 250,
2602 295, 258, 257, 256, 285, 0, 255, 254, 253, 241,
2603 242, 262, 261, 259, 263, 260, 0, 0, 297, 0,
2604 0, 0, 0, 0, 25, 0, 120, 17, 23, 0,
2605 20, 19, 22, 21, 120, 112, 0, 208, 215, 167,
2606 0, 0, 179, 183, 107, 119, 196, 268, 0, 26,
2607 217, 0, 229, 0, 224, 0, 57, 0, 120, 13,
2608 57, 0, 0, 0, 0, 0, 138, 0, 0, 205,
2609 163, 164, 0, 216, 273, 0, 0, 293, 120, 0,
2610 0, 117, 18, 120, 0, 0, 0, 0, 185, 180,
2611 205, 0, 0, 120, 0, 203, 202, 201, 204, 0,
2612 62, 61, 51, 0, 120, 300, 301, 178, 135, 0,
2613 0, 199, 137, 142, 57, 0, 286, 294, 296, 77,
2614 0, 84, 0, 115, 207, 168, 167, 0, 0, 182,
2615 0, 0, 98, 102, 100, 104, 63, 230, 56, 0,
2616 75, 0, 139, 140, 0, 120, 166, 165, 79, 0,
2617 0, 0, 85, 88, 86, 24, 184, 193, 181, 96,
2618 0, 99, 101, 120, 66, 120, 205, 120, 200, 0,
2619 157, 0, 0, 120, 155, 0, 27, 93, 89, 87,
2620 27, 27, 205, 64, 74, 0, 148, 152, 0, 0,
2621 0, 120, 146, 150, 151, 158, 188, 143, 156, 27,
2622 91, 0, 0, 0, 189, 120, 141, 147, 0, 90,
2623 194, 97, 94, 27, 0, 0, 0, 0, 149, 178,
2624 27, 190, 0, 0, 205, 95, 159
2627 /* YYDEFGOTO[NTERM-NUM]. */
2628 static const yytype_int16 yydefgoto[] =
2630 -1, 49, 50, 51, 52, 315, 316, 317, 338, 339,
2631 137, 138, 157, 318, 139, 390, 140, 249, 246, 454,
2632 56, 234, 153, 154, 57, 58, 59, 60, 214, 61,
2633 90, 141, 142, 441, 442, 443, 444, 62, 216, 422,
2634 506, 423, 471, 424, 425, 63, 231, 143, 64, 65,
2635 220, 221, 66, 324, 217, 67, 144, 69, 70, 356,
2636 358, 400, 320, 457, 321, 435, 480, 481, 482, 462,
2637 463, 464, 164, 322, 265, 360, 361, 378, 74, 331,
2638 332, 333, 262, 323, 503, 102, 76, 470, 222, 223,
2639 387, 402, 388, 346, 328, 124, 125, 126, 225, 77,
2640 78, 79, 145, 127, 227, 228, 80, 114, 115, 81,
2644 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
2646 #define YYPACT_NINF -429
2647 static const yytype_int16 yypact[] =
2649 1661, -24, -429, -429, -429, -429, -429, -429, -10, -55,
2650 -429, -51, 54, -429, -429, -429, 72, -429, 2104, -429,
2651 102, -429, -429, 2159, -429, -6, 123, 7, -429, -429,
2652 -429, -429, -2, -85, -429, -429, 2104, 8, 2104, 2104,
2653 2104, -429, 2104, 2104, 2104, 2104, 2104, 629, 121, 130,
2654 -429, 500, -429, -429, -429, 6, -429, 2034, -429, -429,
2655 -429, -429, -429, -429, 1911, -429, -429, -429, 225, 428,
2656 -429, -429, -429, -429, -429, -429, -429, -429, -429, -429,
2657 32, 2613, -429, -429, -429, -429, 131, 12, -429, -429,
2658 1911, -429, -429, -429, -429, -429, -429, -78, 123, -429,
2659 -47, -429, 14, 119, 2104, 19, -429, 2104, -429, 2104,
2660 133, 119, -429, 35, 71, 43, 2613, 119, 119, 267,
2661 119, 119, -63, 2613, 22, 47, 2104, -429, 145, 177,
2662 2104, 2104, 177, 201, -429, -429, 758, -429, -429, 82,
2663 -429, -429, -429, -429, 196, -429, -429, -429, -429, 1016,
2664 147, 212, -429, 117, 153, 32, 127, -429, 224, 10,
2665 227, -429, 228, -429, -429, -429, -429, 2104, 2104, 2104,
2666 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104,
2667 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104,
2668 2104, -429, -429, 231, 2104, 2104, 2104, 2104, 2104, 2104,
2669 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104,
2670 2104, 17, -429, -429, 2104, 223, 2104, 1145, -429, 123,
2671 110, 111, -429, -429, -429, 118, 15, 114, 157, 64,
2672 2217, 1786, 126, -429, 2104, 2104, -429, 2104, 2104, -429,
2673 -429, -429, -429, -429, 155, 160, -429, -429, -429, 160,
2674 -429, -429, -429, 1911, 138, 155, 2104, 2104, -429, 162,
2675 -429, -429, 259, 219, 220, 275, 2613, 492, 328, 328,
2676 328, 2979, 2979, 2979, 2979, 492, 492, 2613, 2613, 2613,
2677 2613, 2613, 2613, 2613, 2613, 2613, 2613, 2613, 2674, 2735,
2678 -429, -28, -28, -28, 2613, 2430, 2796, 2857, 2918, 492,
2679 492, 267, 267, 119, 119, 119, 148, 2491, 190, 2104,
2680 279, 152, 165, 2288, -429, 156, 1274, -429, -429, 164,
2681 -429, -429, -429, -429, 1145, -429, 123, 2104, -429, 18,
2682 287, 159, 193, -429, -429, -429, 168, -429, 166, 1786,
2683 -429, 163, -429, 194, 2613, 86, 197, 177, 887, -429,
2684 -43, 202, 173, 99, 188, 123, 295, 123, 195, 155,
2685 213, -429, 2104, -429, -429, 312, 2359, -429, 1911, 2104,
2686 198, -429, -429, 1145, 191, 187, 2104, 86, -429, -429,
2687 155, 16, 80, 1911, 2104, -429, -429, -429, -429, 2104,
2688 -429, -429, -429, 2104, 1911, -429, -429, 15, -429, 123,
2689 208, -429, 234, -429, 197, 275, 2613, -429, -429, -429,
2690 204, 13, 206, -429, -429, 2613, 237, 215, 287, -429,
2691 216, 222, -429, -429, 80, -429, 280, -429, 2613, -60,
2692 -429, 214, 234, -429, 123, 229, -429, -429, -429, 2104,
2693 241, 217, 13, -429, -429, -429, -429, -429, -429, -429,
2694 347, -429, -429, 1911, -429, 1911, 155, 1403, -429, 348,
2695 -429, 327, 230, 284, -429, 2552, 1786, -429, -429, -429,
2696 1786, 1786, 155, -429, -429, 239, -429, -429, 240, 236,
2697 235, 1532, -429, -429, -429, -429, 10, -429, -429, 1786,
2698 -429, 238, 246, 221, -429, 1403, -429, -429, 351, -429,
2699 -429, -429, -429, 1786, 247, 258, 243, 253, -429, 15,
2700 1786, -429, 254, 256, 155, -429, -429
2703 /* YYPGOTO[NTERM-NUM]. */
2704 static const yytype_int16 yypgoto[] =
2706 -429, -429, 242, -429, 311, -296, -429, 69, -428, -30,
2707 1, -56, -83, 49, 2, -15, 335, 269, 53, -429,
2708 -429, -429, -429, -429, -429, -429, -429, -429, -429, -429,
2709 -429, -429, -429, -429, -429, -41, -38, -429, -429, -19,
2710 -429, -18, -429, -429, -429, -429, -429, -429, -429, -429,
2711 9, 66, -429, -429, -429, -429, 0, -429, 338, -429,
2712 -429, -429, 50, -429, 56, -429, -87, -429, -72, -429,
2713 -429, -53, -429, 3, -429, -429, 11, -5, -429, -384,
2714 -429, -308, -74, 4, -429, -429, -429, -429, -429, 387,
2715 -92, 26, 37, -243, -429, -95, -429, -429, -429, -429,
2716 -429, -429, -429, -29, -115, 372, -46, -429, -429, -13,
2717 -429, -429, -429, -429, -429
2720 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
2721 positive, shift that token. If negative, reduce the rule which
2722 number is the opposite. If zero, do what YYDEFACT says.
2723 If YYTABLE_NINF, syntax error. */
2724 #define YYTABLE_NINF -155
2725 static const yytype_int16 yytable[] =
2727 68, 53, 55, 73, 75, 100, 224, 215, 156, 113,
2728 103, 155, 350, 431, 232, 247, 248, 136, 329, 329,
2729 308, 96, 379, 111, -70, 116, 117, 118, 374, 119,
2730 120, 121, 123, 116, 156, 96, 109, 238, 490, 87,
2731 167, 110, 491, 492, 260, 193, 439, 218, 219, 54,
2732 71, 68, 53, 55, 73, 75, 72, 92, 93, 389,
2733 261, 499, 191, 192, 193, 86, 89, 92, 93, 239,
2734 91, 94, 455, 419, 440, 507, 210, 412, 97, 211,
2735 252, 94, 513, 204, 205, 206, 207, 208, 98, 92,
2736 93, 123, 105, 209, 230, 210, 116, 242, 211, 311,
2737 54, 71, 395, 94, 396, 101, 420, 72, 330, 418,
2738 448, 88, 421, 116, 306, 104, 404, 123, 123, 341,
2739 376, 385, 377, 108, 146, 512, 92, 93, 107, 112,
2740 147, 149, 167, 213, 212, 226, 233, 417, 309, 235,
2741 94, 351, 352, 237, 310, 229, 240, 241, 243, 68,
2742 53, 55, 73, 75, 266, 267, 268, 269, 270, 271,
2743 272, 273, 274, 275, 276, 277, 278, 279, 280, 281,
2744 282, 283, 284, 285, 286, 287, 288, 289, 335, 95,
2745 244, 291, 292, 293, 294, 295, 296, 297, 298, 299,
2746 300, 301, 302, 303, 304, 305, 116, 307, 54, 71,
2747 386, 123, 236, 313, 250, 72, 342, 253, 343, 191,
2748 192, 193, 158, 475, -71, 255, 256, 68, 53, 319,
2749 257, 123, 116, 348, 116, 344, 258, 259, 325, 493,
2750 263, 264, 375, 2, 290, 312, -113, 326, 336, 327,
2751 209, 158, 210, 123, 123, 211, 334, 13, 14, 15,
2752 159, 17, 158, 19, 410, 160, 161, 238, 340, 345,
2753 347, 159, 354, 398, 353, 401, 24, 161, 162, 349,
2754 163, 516, 355, 357, 459, 29, 30, 31, 359, 365,
2755 363, 163, 367, 252, 368, 409, 369, 371, 2, 373,
2756 329, 380, 252, 381, -112, 383, 366, 382, 384, 389,
2757 426, 393, 13, 14, 15, 394, 17, 401, 19, 397,
2758 399, 430, 156, 405, 116, 407, 68, 53, 319, 414,
2759 403, 24, 413, 411, 68, 53, 319, 156, 460, 459,
2760 29, 30, 31, 433, 434, 336, 438, 445, 156, 376,
2761 447, 449, 458, 450, 453, 466, 456, 429, 467, 406,
2762 472, 485, 486, 502, 505, 427, 123, 191, 192, 193,
2763 -153, 487, 148, 415, 494, 495, 496, 168, 510, 500,
2764 473, 116, 474, 68, 53, 319, 428, 501, 508, 509,
2765 206, 207, 208, 460, 511, 372, 514, 515, 209, 436,
2766 210, 254, 152, 211, -155, -155, -155, 156, 245, 156,
2767 391, 468, 176, 177, 469, 451, 452, 166, 504, 497,
2768 488, 446, 498, 106, 416, -154, 437, 122, 191, 192,
2769 193, 0, 194, 195, 196, 432, 465, 0, 0, 0,
2770 0, 0, 2, 0, 0, 461, 202, 203, 0, 204,
2771 205, 206, 207, 208, 0, 0, 13, 14, 15, 209,
2772 17, 210, 19, 0, 211, 0, 0, 479, 477, 478,
2773 483, 484, 0, 461, 0, 24, 0, 0, 0, 0,
2774 0, 0, 0, 0, 29, 30, 31, 0, 0, 0,
2775 0, 479, 477, 478, 483, 484, 0, 0, 0, 0,
2776 0, 0, 0, 0, 0, 479, 477, 478, 483, 484,
2777 -4, 0, 0, 1, 2, 3, 4, 0, 5, 6,
2778 7, 8, 9, 10, 11, 0, 0, 12, 13, 14,
2779 15, 16, 17, 18, 19, 0, 0, 21, 22, 0,
2780 0, -155, 0, 0, 0, 23, 0, 24, 25, 0,
2781 26, 0, 27, 0, 28, 0, 29, 30, 31, 0,
2782 0, 32, 33, 0, 34, 35, 0, 0, 0, 0,
2783 0, 0, 36, 37, 0, 0, -155, -155, 0, 38,
2784 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2785 0, 0, 191, 192, 193, 0, 194, 195, 196, 0,
2786 39, 40, 0, 0, 0, 0, 0, 0, 0, 41,
2787 -155, -155, 0, 204, 205, 206, 207, 208, 0, 0,
2788 0, 42, 0, 209, 0, 210, 43, 44, 211, 0,
2789 0, 45, 0, 46, 0, 47, 0, 48, 0, 0,
2790 0, -4, 1, 2, 3, 4, 0, 5, 6, 7,
2791 8, 9, 10, 11, 0, 0, 0, 13, 14, 15,
2792 16, 17, 18, 19, 20, 0, 21, 22, 128, 0,
2793 129, 0, 0, 0, 23, 130, 24, 25, 0, 26,
2794 131, 27, 0, 28, 132, 29, 30, 31, 0, 0,
2795 32, 33, 0, 34, 35, 0, 0, 0, 0, 0,
2796 0, 36, 37, 0, 133, 0, 0, 0, 38, 0,
2797 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2798 0, 0, 0, 0, 0, 0, 0, 0, 0, 39,
2799 40, 0, 0, 0, 0, 0, 0, 0, 134, 0,
2800 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2801 42, 0, 0, 0, 0, 43, 44, 0, 0, 0,
2802 45, 0, 46, 0, 47, 0, 48, 0, 0, 0,
2803 135, 1, 2, 3, 4, 0, 5, 6, 7, 8,
2804 9, 10, 11, 0, 0, 0, 13, 14, 15, 16,
2805 17, 18, 19, 20, 0, 21, 22, 128, 0, 129,
2806 0, 0, 0, 23, 130, 24, 25, 0, 26, 131,
2807 27, 0, 28, 132, 29, 30, 31, 0, 0, 32,
2808 33, 0, 34, 35, 0, 0, 0, 0, 0, 0,
2809 36, 37, 0, 133, 0, 0, 0, 38, 0, 0,
2810 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2811 0, 0, 0, 0, 0, 0, 0, 0, 39, 40,
2812 0, 0, 0, 0, 0, 0, 0, 134, 0, 0,
2813 0, 0, 0, 0, 0, 0, 0, 0, 0, 42,
2814 0, 0, 0, 0, 43, 44, 0, 0, 0, 45,
2815 0, 46, 0, 47, 0, 48, 0, 0, 0, 251,
2816 1, 2, 3, 4, 0, 5, 6, 7, 8, 9,
2817 10, 11, 0, 0, 0, 13, 14, 15, 16, 17,
2818 18, 19, 20, 0, 21, 22, 128, 0, 129, 0,
2819 0, 0, 23, 130, 24, 25, 0, 26, 131, 27,
2820 0, 28, 132, 29, 30, 31, 0, 0, 32, 33,
2821 0, 34, 35, 0, 0, 0, 0, 0, 0, 36,
2822 37, 0, 133, 0, 0, 0, 38, 0, 0, 0,
2823 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2824 0, 0, 0, 0, 0, 0, 0, 39, 40, 0,
2825 0, 0, 0, 0, 0, 0, 134, 0, 0, 0,
2826 0, 0, 0, 0, 0, 0, 0, 0, 42, 0,
2827 0, 0, 0, 43, 44, 0, 0, 0, 45, 0,
2828 46, 0, 47, 0, 48, 0, 0, 0, 392, 1,
2829 2, 3, 4, 0, 5, 6, 7, 8, 9, 10,
2830 11, 0, 0, 12, 13, 14, 15, 16, 17, 18,
2831 19, 0, 0, 21, 22, 0, 0, 0, 0, 0,
2832 0, 23, 0, 24, 25, 0, 26, 0, 27, 0,
2833 28, 0, 29, 30, 31, 0, 0, 32, 33, 0,
2834 34, 35, 0, 0, 0, 0, 0, 0, 36, 37,
2835 0, 0, 0, 0, 0, 38, 0, 0, 0, 0,
2836 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2837 0, 0, 0, 0, 0, 0, 39, 40, 0, 0,
2838 0, 0, 0, 0, 0, 41, 0, 0, 0, 0,
2839 0, 0, 0, 0, 0, 0, 0, 42, 0, 0,
2840 0, 0, 43, 44, 0, 0, 0, 45, 0, 46,
2841 0, 47, 0, 48, 0, 0, 0, -3, 1, 2,
2842 3, 4, 0, 5, 6, 7, 8, 9, 10, 11,
2843 0, 0, 0, 13, 14, 15, 16, 17, 18, 19,
2844 0, 0, 21, 22, 0, 0, 0, 0, 0, 0,
2845 23, 0, 24, 25, 0, 26, 0, 27, 0, 28,
2846 0, 29, 30, 31, 0, 0, 32, 33, 0, 34,
2847 35, 0, 0, 0, 0, 0, 0, 36, 37, 0,
2848 0, 0, 0, 0, 38, 0, 0, 0, 0, 0,
2849 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2850 0, 0, 0, 0, 0, 39, 40, 0, 0, 0,
2851 0, 0, 0, 0, 314, 0, 0, 0, 0, 0,
2852 0, 0, 0, 0, 0, 0, 42, 0, 0, 0,
2853 0, 43, 44, 0, 0, 0, 45, 0, 46, 0,
2854 47, 0, 48, 0, 0, 0, -15, 1, 2, 3,
2855 4, 0, 5, 6, 7, 8, 9, 10, 11, 0,
2856 0, 0, 13, 14, 15, 16, 17, 18, 19, 0,
2857 0, 21, 22, 0, 0, 0, 0, 0, 0, 23,
2858 0, 24, 25, 0, 26, 0, 27, 0, 28, 0,
2859 29, 30, 31, 0, 0, 32, 33, 0, 34, 35,
2860 0, 0, 0, 0, 0, 0, 36, 37, 0, 0,
2861 0, 0, 0, 38, 0, 0, 0, 0, 0, 0,
2862 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2863 0, 0, 0, 0, 39, 40, 0, 0, 0, 0,
2864 0, 0, 0, 314, 0, 0, 0, 0, 0, 0,
2865 0, 0, 0, 0, 0, 42, 0, 0, 0, 0,
2866 43, 44, 0, 0, 0, 45, 0, 46, 0, 47,
2867 0, 48, 0, 0, 0, -16, 1, 2, 3, 4,
2868 0, 5, 6, 7, 8, 9, 10, 11, 0, 0,
2869 0, 13, 14, 15, 16, 17, 18, 19, 0, 0,
2870 21, 22, 0, 0, 0, 0, 0, 0, 23, 0,
2871 24, 25, 0, 26, 0, 27, 0, 28, 0, 29,
2872 30, 31, 0, 0, 32, 33, 0, 34, 35, 0,
2873 0, 0, 0, 0, 0, 36, 37, 0, 0, 0,
2874 0, 0, 38, 0, 0, 0, 0, 0, 0, 0,
2875 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2876 0, 0, 0, 39, 40, 0, 0, 0, 0, 0,
2877 0, 0, 476, 0, 0, 0, 0, 0, 0, 0,
2878 0, 0, 0, 0, 42, 0, 0, 0, 0, 43,
2879 44, 0, 0, 0, 45, 0, 46, 0, 47, 0,
2880 48, 0, 0, 0, -144, 1, 2, 3, 4, 0,
2881 5, 6, 7, 8, 9, 10, 11, 0, 0, 0,
2882 13, 14, 15, 16, 17, 18, 19, 0, 0, 21,
2883 22, 0, 0, 0, 0, 0, 0, 23, 0, 24,
2884 25, 0, 26, 0, 27, 0, 28, 0, 29, 30,
2885 31, 0, 0, 32, 33, 0, 34, 35, 0, 0,
2886 0, 0, 0, 0, 36, 37, 0, 0, 0, 0,
2887 0, 38, 0, 0, 0, 0, 0, 0, 0, 0,
2888 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2889 0, 0, 39, 40, 0, 0, 0, 0, 0, 0,
2890 0, 476, 0, 0, 0, 0, 0, 0, 0, 0,
2891 0, 0, 0, 42, 0, 0, 0, 0, 43, 44,
2892 0, 0, 0, 45, 0, 46, 0, 47, 0, 48,
2893 0, -3, 0, -145, 1, 2, 3, 4, 0, 5,
2894 6, 7, 8, 9, 10, 11, 0, 0, 12, 13,
2895 14, 15, 16, 17, 18, 19, 0, 0, 21, 22,
2896 0, 0, 0, 0, 0, 0, 23, 0, 24, 25,
2897 0, 26, 0, 27, 0, 28, 0, 29, 30, 31,
2898 0, 0, 32, 33, 0, 34, 35, 0, 0, 0,
2899 0, 0, 0, 36, 37, 0, 0, 0, 0, 0,
2900 38, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2901 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2902 0, 39, 40, 0, 0, 0, 0, 0, 0, 0,
2903 41, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2904 0, 0, 42, 0, 0, 0, 0, 43, 44, 0,
2905 0, 0, 45, 0, 46, 0, 47, 0, 48, 1,
2906 2, 3, 4, 0, 5, 6, 7, 8, 9, 10,
2907 11, 0, -120, 0, 13, 14, 15, 16, 17, 18,
2908 19, 20, 0, 21, 22, 128, 0, 129, 0, 0,
2909 0, 23, 130, 24, 25, 0, 26, 131, 27, 0,
2910 28, 132, 29, 30, 31, 0, 0, 32, 33, 0,
2911 34, 35, 0, 0, 0, 0, 0, 0, 36, 37,
2912 0, 133, 0, 0, 0, 38, 0, 0, 0, 0,
2913 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2914 0, 0, 0, 0, 0, 0, 39, 40, 0, 0,
2915 0, 0, 0, 0, 0, 134, 0, 0, 0, 0,
2916 0, 0, 0, 0, 0, 0, 0, 42, 0, 0,
2917 0, 0, 43, 44, 0, 0, 0, 45, 0, 46,
2918 0, 47, 0, 48, 1, 2, 3, 4, 0, 5,
2919 6, 7, 8, 9, 10, 11, 0, 0, 0, 13,
2920 14, 15, 16, 17, 18, 19, 20, 0, 21, 22,
2921 128, 0, 129, 0, 0, 0, 23, 130, 24, 25,
2922 0, 26, 131, 27, 0, 28, 132, 29, 30, 31,
2923 0, 0, 32, 33, 0, 34, 35, 0, 0, 0,
2924 0, 0, 0, 36, 37, 0, 133, 0, 0, 0,
2925 38, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2926 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2927 0, 39, 40, 0, 0, 0, 0, 0, 0, 0,
2928 134, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2929 0, 0, 42, 0, 0, 0, 0, 43, 44, 0,
2930 0, 0, 45, 0, 46, 0, 47, 150, 48, 3,
2931 4, 0, 5, 6, 7, 0, 0, 0, 0, 0,
2932 0, 0, 0, 0, 0, 0, 0, 18, 0, 20,
2933 0, 21, 22, 0, 0, 129, 0, 0, 0, 23,
2934 0, 0, 0, 0, 0, 0, 27, 0, 28, 151,
2935 0, 0, 0, 0, 0, 0, 33, 0, 34, 35,
2936 0, 0, 0, 0, 0, 0, 36, 0, 0, 0,
2937 0, 0, 0, 38, 0, 0, 0, 99, 0, 3,
2938 4, 0, 5, 6, 7, 0, 0, 0, 0, 0,
2939 0, 0, 0, 0, 39, 40, 0, 18, 0, 20,
2940 0, 21, 22, 0, 0, 0, 0, 0, 0, 23,
2941 0, 0, 0, 0, 0, 42, 27, 0, 28, 0,
2942 43, 44, 0, 0, 0, 45, 33, 46, 34, 35,
2943 0, 48, 99, 0, 3, 4, 36, 5, 6, 7,
2944 0, 0, 0, 38, 0, 0, 0, 0, 0, 0,
2945 0, 0, 18, 0, 20, 0, 21, 22, 0, 0,
2946 0, 0, 0, 0, 39, 40, 0, 0, 0, 0,
2947 0, 0, 0, 28, 0, 0, 0, 0, 0, 0,
2948 0, 33, 0, 34, 35, 42, 0, 0, 0, 0,
2949 43, 44, 0, 0, 0, 45, 0, 46, 38, 0,
2950 0, 48, 0, 0, 0, 0, 0, 0, 0, 0,
2951 0, 0, 0, 0, 0, 0, 0, 0, 0, 39,
2952 40, 0, 0, 0, 0, 0, 168, 0, 0, 0,
2953 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2954 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2955 45, 0, 46, 169, 170, 171, 48, 172, 173, 174,
2956 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
2957 185, 186, 187, 188, 189, 190, 0, 191, 192, 193,
2958 0, 194, 195, 196, 0, 0, 0, 0, 0, 197,
2959 198, 0, 199, 200, 201, 202, 203, 168, 204, 205,
2960 206, 207, 208, 0, 0, 0, 0, 0, 209, 0,
2961 210, 0, 0, 211, 0, 0, 0, 0, 0, 337,
2962 0, 0, 0, 0, 169, 170, 171, 0, 172, 173,
2963 174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
2964 184, 185, 186, 187, 188, 189, 190, 0, 191, 192,
2965 193, 0, 194, 195, 196, 0, 0, 0, 0, 0,
2966 197, 198, 0, 199, 200, 201, 202, 203, 168, 204,
2967 205, 206, 207, 208, 0, 0, 0, 0, 0, 209,
2968 0, 210, 0, 0, 211, 0, 0, 0, 0, 0,
2969 370, 0, 0, 0, 0, 169, 170, 171, 0, 172,
2970 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
2971 183, 184, 185, 186, 187, 188, 189, 190, 0, 191,
2972 192, 193, 0, 194, 195, 196, 0, 0, 0, 0,
2973 0, 197, 198, 0, 199, 200, 201, 202, 203, 168,
2974 204, 205, 206, 207, 208, 0, 0, 0, 0, 0,
2975 209, 0, 210, 0, 0, 211, 0, 0, 0, 0,
2976 0, 408, 0, 0, 0, 0, 169, 170, 171, 0,
2977 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
2978 182, 183, 184, 185, 186, 187, 188, 189, 190, 0,
2979 191, 192, 193, 0, 194, 195, 196, 0, 0, 0,
2980 168, 0, 197, 198, 362, 199, 200, 201, 202, 203,
2981 0, 204, 205, 206, 207, 208, 0, 0, 0, 0,
2982 0, 209, 0, 210, 0, 0, 211, 169, 170, 171,
2983 0, 172, 173, 174, 175, 176, 177, 178, 179, 180,
2984 181, 182, 183, 184, 185, 186, 187, 188, 189, 190,
2985 0, 191, 192, 193, 0, 194, 195, 196, 0, 0,
2986 0, 168, 0, 197, 198, 0, 199, 200, 201, 202,
2987 203, 0, 204, 205, 206, 207, 208, 0, 0, 0,
2988 0, 0, 209, 0, 210, 364, 0, 211, 169, 170,
2989 171, 0, 172, 173, 174, 175, 176, 177, 178, 179,
2990 180, 181, 182, 183, 184, 185, 186, 187, 188, 189,
2991 190, 0, 191, 192, 193, 0, 194, 195, 196, 0,
2992 0, 0, 168, 0, 197, 198, 489, 199, 200, 201,
2993 202, 203, 0, 204, 205, 206, 207, 208, 0, 0,
2994 0, 0, 0, 209, 0, 210, 0, 0, 211, 169,
2995 170, 171, 0, 172, 173, 174, 175, 176, 177, 178,
2996 179, 180, 181, 182, 183, 184, 185, 186, 187, 188,
2997 189, 190, 0, 191, 192, 193, 0, 194, 195, 196,
2998 0, 0, 0, 168, 0, 197, 198, 0, 199, 200,
2999 201, 202, 203, 0, 204, 205, 206, 207, 208, 0,
3000 0, 0, 0, 0, 209, 0, 210, 0, 0, 211,
3001 169, 170, 171, 0, 172, 173, 174, 175, 176, 177,
3002 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3003 0, 0, 190, 0, 191, 192, 193, 0, 194, 195,
3004 196, 0, 0, 0, 168, 0, 0, 0, 0, 199,
3005 200, 201, 202, 203, 0, 204, 205, 206, 207, 208,
3006 0, 0, 0, 0, 0, 209, 0, 210, 0, 0,
3007 211, 169, 170, 171, 0, 172, 173, 174, 175, 176,
3008 177, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3009 0, 0, 0, 0, 0, 191, 192, 193, 0, 194,
3010 195, 196, 0, 0, 0, 168, 0, 0, 0, 0,
3011 199, 200, 201, 202, 203, 0, 204, 205, 206, 207,
3012 208, 0, 0, 0, 0, 0, 209, 0, 210, 0,
3013 0, 211, 169, 170, 171, 0, 172, 173, 174, 175,
3014 176, 177, 0, 0, 0, 0, 0, 0, 0, 0,
3015 0, 0, 0, 0, 0, 0, 191, 192, 193, 0,
3016 194, 195, 196, 0, 0, 0, 168, 0, 0, 0,
3017 0, 0, 200, 201, 202, 203, 0, 204, 205, 206,
3018 207, 208, 0, 0, 0, 0, 0, 209, 0, 210,
3019 0, 0, 211, 169, 170, 171, 0, 172, 173, 174,
3020 175, 176, 177, 0, 0, 0, 0, 0, 0, 0,
3021 0, 0, 0, 0, 0, 0, 0, 191, 192, 193,
3022 0, 194, 195, 196, 0, 0, 0, 168, 0, 0,
3023 0, 0, 0, 0, 201, 202, 203, 0, 204, 205,
3024 206, 207, 208, 0, 0, 0, 0, 0, 209, 0,
3025 210, 0, 0, 211, 169, 170, 171, 0, 172, 173,
3026 174, 175, 176, 177, 0, 0, 0, 0, 0, 0,
3027 0, 0, 0, 0, 0, 0, 0, 0, 191, 192,
3028 193, 0, 194, 195, 196, 0, 0, 0, 168, 0,
3029 0, 0, 0, 0, 0, -155, 202, 203, 0, 204,
3030 205, 206, 207, 208, 0, 0, 0, 0, 0, 209,
3031 0, 210, 0, 0, 211, 169, 170, 171, 0, -155,
3032 -155, -155, -155, 176, 177, 0, 0, 0, 0, 0,
3033 0, 0, 0, 0, 0, 0, 0, 0, 0, 191,
3034 192, 193, 0, 194, 195, 196, 0, 0, 0, 0,
3035 0, 0, 0, 0, 0, 0, 0, 202, 203, 0,
3036 204, 205, 206, 207, 208, 0, 0, 0, 0, 0,
3037 209, 0, 210, 0, 0, 211
3040 static const yytype_int16 yycheck[] =
3042 0, 0, 0, 0, 0, 18, 98, 90, 64, 38,
3043 23, 57, 255, 397, 109, 130, 131, 47, 3, 3,
3044 3, 12, 330, 36, 67, 38, 39, 40, 324, 42,
3045 43, 44, 45, 46, 90, 26, 121, 100, 466, 49,
3046 100, 126, 470, 471, 34, 92, 33, 125, 126, 0,
3047 0, 51, 51, 51, 51, 51, 0, 3, 4, 102,
3048 50, 489, 90, 91, 92, 89, 121, 3, 4, 132,
3049 121, 17, 132, 381, 61, 503, 123, 373, 12, 126,
3050 136, 17, 510, 111, 112, 113, 114, 115, 16, 3,
3051 4, 104, 26, 121, 107, 123, 109, 126, 126, 214,
3052 51, 51, 3, 17, 5, 3, 26, 51, 93, 93,
3053 418, 121, 32, 126, 209, 121, 359, 130, 131, 234,
3054 102, 35, 104, 125, 3, 509, 3, 4, 121, 121,
3055 0, 125, 100, 121, 3, 121, 3, 380, 121, 104,
3056 17, 256, 257, 100, 127, 126, 124, 100, 3, 149,
3057 149, 149, 149, 149, 167, 168, 169, 170, 171, 172,
3058 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
3059 183, 184, 185, 186, 187, 188, 189, 190, 114, 125,
3060 3, 194, 195, 196, 197, 198, 199, 200, 201, 202,
3061 203, 204, 205, 206, 207, 208, 209, 210, 149, 149,
3062 114, 214, 131, 216, 3, 149, 235, 125, 237, 90,
3063 91, 92, 16, 456, 67, 3, 99, 217, 217, 217,
3064 67, 234, 235, 253, 237, 238, 99, 3, 219, 472,
3065 3, 3, 327, 4, 3, 12, 126, 126, 229, 121,
3066 121, 16, 123, 256, 257, 126, 132, 18, 19, 20,
3067 25, 22, 16, 24, 369, 30, 31, 100, 132, 104,
3068 100, 25, 3, 355, 102, 357, 37, 31, 43, 131,
3069 45, 514, 53, 53, 45, 46, 47, 48, 3, 89,
3070 132, 45, 3, 339, 132, 368, 121, 131, 4, 125,
3071 3, 132, 348, 100, 126, 132, 309, 131, 104, 102,
3072 383, 99, 18, 19, 20, 132, 22, 399, 24, 121,
3073 15, 394, 368, 100, 327, 3, 316, 316, 316, 132,
3074 125, 37, 131, 125, 324, 324, 324, 383, 99, 45,
3075 46, 47, 48, 125, 100, 326, 132, 131, 394, 102,
3076 125, 125, 434, 121, 64, 104, 132, 393, 131, 362,
3077 3, 3, 25, 132, 3, 384, 369, 90, 91, 92,
3078 131, 131, 51, 376, 125, 125, 131, 39, 125, 131,
3079 453, 384, 455, 373, 373, 373, 389, 131, 131, 121,
3080 113, 114, 115, 99, 131, 316, 132, 131, 121, 404,
3081 123, 149, 57, 126, 66, 67, 68, 453, 129, 455,
3082 347, 442, 74, 75, 442, 424, 424, 69, 495, 481,
3083 463, 416, 486, 26, 377, 131, 405, 45, 90, 91,
3084 92, -1, 94, 95, 96, 399, 439, -1, -1, -1,
3085 -1, -1, 4, -1, -1, 435, 108, 109, -1, 111,
3086 112, 113, 114, 115, -1, -1, 18, 19, 20, 121,
3087 22, 123, 24, -1, 126, -1, -1, 457, 457, 457,
3088 457, 457, -1, 463, -1, 37, -1, -1, -1, -1,
3089 -1, -1, -1, -1, 46, 47, 48, -1, -1, -1,
3090 -1, 481, 481, 481, 481, 481, -1, -1, -1, -1,
3091 -1, -1, -1, -1, -1, 495, 495, 495, 495, 495,
3092 0, -1, -1, 3, 4, 5, 6, -1, 8, 9,
3093 10, 11, 12, 13, 14, -1, -1, 17, 18, 19,
3094 20, 21, 22, 23, 24, -1, -1, 27, 28, -1,
3095 -1, 39, -1, -1, -1, 35, -1, 37, 38, -1,
3096 40, -1, 42, -1, 44, -1, 46, 47, 48, -1,
3097 -1, 51, 52, -1, 54, 55, -1, -1, -1, -1,
3098 -1, -1, 62, 63, -1, -1, 74, 75, -1, 69,
3099 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3100 -1, -1, 90, 91, 92, -1, 94, 95, 96, -1,
3101 90, 91, -1, -1, -1, -1, -1, -1, -1, 99,
3102 108, 109, -1, 111, 112, 113, 114, 115, -1, -1,
3103 -1, 111, -1, 121, -1, 123, 116, 117, 126, -1,
3104 -1, 121, -1, 123, -1, 125, -1, 127, -1, -1,
3105 -1, 131, 3, 4, 5, 6, -1, 8, 9, 10,
3106 11, 12, 13, 14, -1, -1, -1, 18, 19, 20,
3107 21, 22, 23, 24, 25, -1, 27, 28, 29, -1,
3108 31, -1, -1, -1, 35, 36, 37, 38, -1, 40,
3109 41, 42, -1, 44, 45, 46, 47, 48, -1, -1,
3110 51, 52, -1, 54, 55, -1, -1, -1, -1, -1,
3111 -1, 62, 63, -1, 65, -1, -1, -1, 69, -1,
3112 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3113 -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
3114 91, -1, -1, -1, -1, -1, -1, -1, 99, -1,
3115 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3116 111, -1, -1, -1, -1, 116, 117, -1, -1, -1,
3117 121, -1, 123, -1, 125, -1, 127, -1, -1, -1,
3118 131, 3, 4, 5, 6, -1, 8, 9, 10, 11,
3119 12, 13, 14, -1, -1, -1, 18, 19, 20, 21,
3120 22, 23, 24, 25, -1, 27, 28, 29, -1, 31,
3121 -1, -1, -1, 35, 36, 37, 38, -1, 40, 41,
3122 42, -1, 44, 45, 46, 47, 48, -1, -1, 51,
3123 52, -1, 54, 55, -1, -1, -1, -1, -1, -1,
3124 62, 63, -1, 65, -1, -1, -1, 69, -1, -1,
3125 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3126 -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
3127 -1, -1, -1, -1, -1, -1, -1, 99, -1, -1,
3128 -1, -1, -1, -1, -1, -1, -1, -1, -1, 111,
3129 -1, -1, -1, -1, 116, 117, -1, -1, -1, 121,
3130 -1, 123, -1, 125, -1, 127, -1, -1, -1, 131,
3131 3, 4, 5, 6, -1, 8, 9, 10, 11, 12,
3132 13, 14, -1, -1, -1, 18, 19, 20, 21, 22,
3133 23, 24, 25, -1, 27, 28, 29, -1, 31, -1,
3134 -1, -1, 35, 36, 37, 38, -1, 40, 41, 42,
3135 -1, 44, 45, 46, 47, 48, -1, -1, 51, 52,
3136 -1, 54, 55, -1, -1, -1, -1, -1, -1, 62,
3137 63, -1, 65, -1, -1, -1, 69, -1, -1, -1,
3138 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3139 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
3140 -1, -1, -1, -1, -1, -1, 99, -1, -1, -1,
3141 -1, -1, -1, -1, -1, -1, -1, -1, 111, -1,
3142 -1, -1, -1, 116, 117, -1, -1, -1, 121, -1,
3143 123, -1, 125, -1, 127, -1, -1, -1, 131, 3,
3144 4, 5, 6, -1, 8, 9, 10, 11, 12, 13,
3145 14, -1, -1, 17, 18, 19, 20, 21, 22, 23,
3146 24, -1, -1, 27, 28, -1, -1, -1, -1, -1,
3147 -1, 35, -1, 37, 38, -1, 40, -1, 42, -1,
3148 44, -1, 46, 47, 48, -1, -1, 51, 52, -1,
3149 54, 55, -1, -1, -1, -1, -1, -1, 62, 63,
3150 -1, -1, -1, -1, -1, 69, -1, -1, -1, -1,
3151 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3152 -1, -1, -1, -1, -1, -1, 90, 91, -1, -1,
3153 -1, -1, -1, -1, -1, 99, -1, -1, -1, -1,
3154 -1, -1, -1, -1, -1, -1, -1, 111, -1, -1,
3155 -1, -1, 116, 117, -1, -1, -1, 121, -1, 123,
3156 -1, 125, -1, 127, -1, -1, -1, 131, 3, 4,
3157 5, 6, -1, 8, 9, 10, 11, 12, 13, 14,
3158 -1, -1, -1, 18, 19, 20, 21, 22, 23, 24,
3159 -1, -1, 27, 28, -1, -1, -1, -1, -1, -1,
3160 35, -1, 37, 38, -1, 40, -1, 42, -1, 44,
3161 -1, 46, 47, 48, -1, -1, 51, 52, -1, 54,
3162 55, -1, -1, -1, -1, -1, -1, 62, 63, -1,
3163 -1, -1, -1, -1, 69, -1, -1, -1, -1, -1,
3164 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3165 -1, -1, -1, -1, -1, 90, 91, -1, -1, -1,
3166 -1, -1, -1, -1, 99, -1, -1, -1, -1, -1,
3167 -1, -1, -1, -1, -1, -1, 111, -1, -1, -1,
3168 -1, 116, 117, -1, -1, -1, 121, -1, 123, -1,
3169 125, -1, 127, -1, -1, -1, 131, 3, 4, 5,
3170 6, -1, 8, 9, 10, 11, 12, 13, 14, -1,
3171 -1, -1, 18, 19, 20, 21, 22, 23, 24, -1,
3172 -1, 27, 28, -1, -1, -1, -1, -1, -1, 35,
3173 -1, 37, 38, -1, 40, -1, 42, -1, 44, -1,
3174 46, 47, 48, -1, -1, 51, 52, -1, 54, 55,
3175 -1, -1, -1, -1, -1, -1, 62, 63, -1, -1,
3176 -1, -1, -1, 69, -1, -1, -1, -1, -1, -1,
3177 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3178 -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
3179 -1, -1, -1, 99, -1, -1, -1, -1, -1, -1,
3180 -1, -1, -1, -1, -1, 111, -1, -1, -1, -1,
3181 116, 117, -1, -1, -1, 121, -1, 123, -1, 125,
3182 -1, 127, -1, -1, -1, 131, 3, 4, 5, 6,
3183 -1, 8, 9, 10, 11, 12, 13, 14, -1, -1,
3184 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
3185 27, 28, -1, -1, -1, -1, -1, -1, 35, -1,
3186 37, 38, -1, 40, -1, 42, -1, 44, -1, 46,
3187 47, 48, -1, -1, 51, 52, -1, 54, 55, -1,
3188 -1, -1, -1, -1, -1, 62, 63, -1, -1, -1,
3189 -1, -1, 69, -1, -1, -1, -1, -1, -1, -1,
3190 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3191 -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
3192 -1, -1, 99, -1, -1, -1, -1, -1, -1, -1,
3193 -1, -1, -1, -1, 111, -1, -1, -1, -1, 116,
3194 117, -1, -1, -1, 121, -1, 123, -1, 125, -1,
3195 127, -1, -1, -1, 131, 3, 4, 5, 6, -1,
3196 8, 9, 10, 11, 12, 13, 14, -1, -1, -1,
3197 18, 19, 20, 21, 22, 23, 24, -1, -1, 27,
3198 28, -1, -1, -1, -1, -1, -1, 35, -1, 37,
3199 38, -1, 40, -1, 42, -1, 44, -1, 46, 47,
3200 48, -1, -1, 51, 52, -1, 54, 55, -1, -1,
3201 -1, -1, -1, -1, 62, 63, -1, -1, -1, -1,
3202 -1, 69, -1, -1, -1, -1, -1, -1, -1, -1,
3203 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3204 -1, -1, 90, 91, -1, -1, -1, -1, -1, -1,
3205 -1, 99, -1, -1, -1, -1, -1, -1, -1, -1,
3206 -1, -1, -1, 111, -1, -1, -1, -1, 116, 117,
3207 -1, -1, -1, 121, -1, 123, -1, 125, -1, 127,
3208 -1, 0, -1, 131, 3, 4, 5, 6, -1, 8,
3209 9, 10, 11, 12, 13, 14, -1, -1, 17, 18,
3210 19, 20, 21, 22, 23, 24, -1, -1, 27, 28,
3211 -1, -1, -1, -1, -1, -1, 35, -1, 37, 38,
3212 -1, 40, -1, 42, -1, 44, -1, 46, 47, 48,
3213 -1, -1, 51, 52, -1, 54, 55, -1, -1, -1,
3214 -1, -1, -1, 62, 63, -1, -1, -1, -1, -1,
3215 69, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3216 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3217 -1, 90, 91, -1, -1, -1, -1, -1, -1, -1,
3218 99, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3219 -1, -1, 111, -1, -1, -1, -1, 116, 117, -1,
3220 -1, -1, 121, -1, 123, -1, 125, -1, 127, 3,
3221 4, 5, 6, -1, 8, 9, 10, 11, 12, 13,
3222 14, -1, 16, -1, 18, 19, 20, 21, 22, 23,
3223 24, 25, -1, 27, 28, 29, -1, 31, -1, -1,
3224 -1, 35, 36, 37, 38, -1, 40, 41, 42, -1,
3225 44, 45, 46, 47, 48, -1, -1, 51, 52, -1,
3226 54, 55, -1, -1, -1, -1, -1, -1, 62, 63,
3227 -1, 65, -1, -1, -1, 69, -1, -1, -1, -1,
3228 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3229 -1, -1, -1, -1, -1, -1, 90, 91, -1, -1,
3230 -1, -1, -1, -1, -1, 99, -1, -1, -1, -1,
3231 -1, -1, -1, -1, -1, -1, -1, 111, -1, -1,
3232 -1, -1, 116, 117, -1, -1, -1, 121, -1, 123,
3233 -1, 125, -1, 127, 3, 4, 5, 6, -1, 8,
3234 9, 10, 11, 12, 13, 14, -1, -1, -1, 18,
3235 19, 20, 21, 22, 23, 24, 25, -1, 27, 28,
3236 29, -1, 31, -1, -1, -1, 35, 36, 37, 38,
3237 -1, 40, 41, 42, -1, 44, 45, 46, 47, 48,
3238 -1, -1, 51, 52, -1, 54, 55, -1, -1, -1,
3239 -1, -1, -1, 62, 63, -1, 65, -1, -1, -1,
3240 69, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3241 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3242 -1, 90, 91, -1, -1, -1, -1, -1, -1, -1,
3243 99, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3244 -1, -1, 111, -1, -1, -1, -1, 116, 117, -1,
3245 -1, -1, 121, -1, 123, -1, 125, 3, 127, 5,
3246 6, -1, 8, 9, 10, -1, -1, -1, -1, -1,
3247 -1, -1, -1, -1, -1, -1, -1, 23, -1, 25,
3248 -1, 27, 28, -1, -1, 31, -1, -1, -1, 35,
3249 -1, -1, -1, -1, -1, -1, 42, -1, 44, 45,
3250 -1, -1, -1, -1, -1, -1, 52, -1, 54, 55,
3251 -1, -1, -1, -1, -1, -1, 62, -1, -1, -1,
3252 -1, -1, -1, 69, -1, -1, -1, 3, -1, 5,
3253 6, -1, 8, 9, 10, -1, -1, -1, -1, -1,
3254 -1, -1, -1, -1, 90, 91, -1, 23, -1, 25,
3255 -1, 27, 28, -1, -1, -1, -1, -1, -1, 35,
3256 -1, -1, -1, -1, -1, 111, 42, -1, 44, -1,
3257 116, 117, -1, -1, -1, 121, 52, 123, 54, 55,
3258 -1, 127, 3, -1, 5, 6, 62, 8, 9, 10,
3259 -1, -1, -1, 69, -1, -1, -1, -1, -1, -1,
3260 -1, -1, 23, -1, 25, -1, 27, 28, -1, -1,
3261 -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
3262 -1, -1, -1, 44, -1, -1, -1, -1, -1, -1,
3263 -1, 52, -1, 54, 55, 111, -1, -1, -1, -1,
3264 116, 117, -1, -1, -1, 121, -1, 123, 69, -1,
3265 -1, 127, -1, -1, -1, -1, -1, -1, -1, -1,
3266 -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
3267 91, -1, -1, -1, -1, -1, 39, -1, -1, -1,
3268 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3269 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3270 121, -1, 123, 66, 67, 68, 127, 70, 71, 72,
3271 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
3272 83, 84, 85, 86, 87, 88, -1, 90, 91, 92,
3273 -1, 94, 95, 96, -1, -1, -1, -1, -1, 102,
3274 103, -1, 105, 106, 107, 108, 109, 39, 111, 112,
3275 113, 114, 115, -1, -1, -1, -1, -1, 121, -1,
3276 123, -1, -1, 126, -1, -1, -1, -1, -1, 132,
3277 -1, -1, -1, -1, 66, 67, 68, -1, 70, 71,
3278 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
3279 82, 83, 84, 85, 86, 87, 88, -1, 90, 91,
3280 92, -1, 94, 95, 96, -1, -1, -1, -1, -1,
3281 102, 103, -1, 105, 106, 107, 108, 109, 39, 111,
3282 112, 113, 114, 115, -1, -1, -1, -1, -1, 121,
3283 -1, 123, -1, -1, 126, -1, -1, -1, -1, -1,
3284 132, -1, -1, -1, -1, 66, 67, 68, -1, 70,
3285 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
3286 81, 82, 83, 84, 85, 86, 87, 88, -1, 90,
3287 91, 92, -1, 94, 95, 96, -1, -1, -1, -1,
3288 -1, 102, 103, -1, 105, 106, 107, 108, 109, 39,
3289 111, 112, 113, 114, 115, -1, -1, -1, -1, -1,
3290 121, -1, 123, -1, -1, 126, -1, -1, -1, -1,
3291 -1, 132, -1, -1, -1, -1, 66, 67, 68, -1,
3292 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
3293 80, 81, 82, 83, 84, 85, 86, 87, 88, -1,
3294 90, 91, 92, -1, 94, 95, 96, -1, -1, -1,
3295 39, -1, 102, 103, 104, 105, 106, 107, 108, 109,
3296 -1, 111, 112, 113, 114, 115, -1, -1, -1, -1,
3297 -1, 121, -1, 123, -1, -1, 126, 66, 67, 68,
3298 -1, 70, 71, 72, 73, 74, 75, 76, 77, 78,
3299 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
3300 -1, 90, 91, 92, -1, 94, 95, 96, -1, -1,
3301 -1, 39, -1, 102, 103, -1, 105, 106, 107, 108,
3302 109, -1, 111, 112, 113, 114, 115, -1, -1, -1,
3303 -1, -1, 121, -1, 123, 124, -1, 126, 66, 67,
3304 68, -1, 70, 71, 72, 73, 74, 75, 76, 77,
3305 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
3306 88, -1, 90, 91, 92, -1, 94, 95, 96, -1,
3307 -1, -1, 39, -1, 102, 103, 104, 105, 106, 107,
3308 108, 109, -1, 111, 112, 113, 114, 115, -1, -1,
3309 -1, -1, -1, 121, -1, 123, -1, -1, 126, 66,
3310 67, 68, -1, 70, 71, 72, 73, 74, 75, 76,
3311 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
3312 87, 88, -1, 90, 91, 92, -1, 94, 95, 96,
3313 -1, -1, -1, 39, -1, 102, 103, -1, 105, 106,
3314 107, 108, 109, -1, 111, 112, 113, 114, 115, -1,
3315 -1, -1, -1, -1, 121, -1, 123, -1, -1, 126,
3316 66, 67, 68, -1, 70, 71, 72, 73, 74, 75,
3317 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3318 -1, -1, 88, -1, 90, 91, 92, -1, 94, 95,
3319 96, -1, -1, -1, 39, -1, -1, -1, -1, 105,
3320 106, 107, 108, 109, -1, 111, 112, 113, 114, 115,
3321 -1, -1, -1, -1, -1, 121, -1, 123, -1, -1,
3322 126, 66, 67, 68, -1, 70, 71, 72, 73, 74,
3323 75, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3324 -1, -1, -1, -1, -1, 90, 91, 92, -1, 94,
3325 95, 96, -1, -1, -1, 39, -1, -1, -1, -1,
3326 105, 106, 107, 108, 109, -1, 111, 112, 113, 114,
3327 115, -1, -1, -1, -1, -1, 121, -1, 123, -1,
3328 -1, 126, 66, 67, 68, -1, 70, 71, 72, 73,
3329 74, 75, -1, -1, -1, -1, -1, -1, -1, -1,
3330 -1, -1, -1, -1, -1, -1, 90, 91, 92, -1,
3331 94, 95, 96, -1, -1, -1, 39, -1, -1, -1,
3332 -1, -1, 106, 107, 108, 109, -1, 111, 112, 113,
3333 114, 115, -1, -1, -1, -1, -1, 121, -1, 123,
3334 -1, -1, 126, 66, 67, 68, -1, 70, 71, 72,
3335 73, 74, 75, -1, -1, -1, -1, -1, -1, -1,
3336 -1, -1, -1, -1, -1, -1, -1, 90, 91, 92,
3337 -1, 94, 95, 96, -1, -1, -1, 39, -1, -1,
3338 -1, -1, -1, -1, 107, 108, 109, -1, 111, 112,
3339 113, 114, 115, -1, -1, -1, -1, -1, 121, -1,
3340 123, -1, -1, 126, 66, 67, 68, -1, 70, 71,
3341 72, 73, 74, 75, -1, -1, -1, -1, -1, -1,
3342 -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
3343 92, -1, 94, 95, 96, -1, -1, -1, 39, -1,
3344 -1, -1, -1, -1, -1, 107, 108, 109, -1, 111,
3345 112, 113, 114, 115, -1, -1, -1, -1, -1, 121,
3346 -1, 123, -1, -1, 126, 66, 67, 68, -1, 70,
3347 71, 72, 73, 74, 75, -1, -1, -1, -1, -1,
3348 -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
3349 91, 92, -1, 94, 95, 96, -1, -1, -1, -1,
3350 -1, -1, -1, -1, -1, -1, -1, 108, 109, -1,
3351 111, 112, 113, 114, 115, -1, -1, -1, -1, -1,
3352 121, -1, 123, -1, -1, 126
3355 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
3356 symbol of state STATE-NUM. */
3357 static const yytype_uint8 yystos[] =
3359 0, 3, 4, 5, 6, 8, 9, 10, 11, 12,
3360 13, 14, 17, 18, 19, 20, 21, 22, 23, 24,
3361 25, 27, 28, 35, 37, 38, 40, 42, 44, 46,
3362 47, 48, 51, 52, 54, 55, 62, 63, 69, 90,
3363 91, 99, 111, 116, 117, 121, 123, 125, 127, 134,
3364 135, 136, 137, 143, 146, 147, 153, 157, 158, 159,
3365 160, 162, 170, 178, 181, 182, 185, 188, 189, 190,
3366 191, 195, 197, 206, 211, 216, 219, 232, 233, 234,
3367 239, 242, 243, 244, 246, 247, 89, 49, 121, 121,
3368 163, 121, 3, 4, 17, 125, 183, 184, 16, 3,
3369 242, 3, 218, 242, 121, 184, 222, 121, 125, 121,
3370 126, 242, 121, 236, 240, 241, 242, 242, 242, 242,
3371 242, 242, 238, 242, 228, 229, 230, 236, 29, 31,
3372 36, 41, 45, 65, 99, 131, 142, 143, 144, 147,
3373 149, 164, 165, 180, 189, 235, 3, 0, 137, 125,
3374 3, 45, 149, 155, 156, 239, 144, 145, 16, 25,
3375 30, 31, 43, 45, 205, 245, 191, 100, 39, 66,
3376 67, 68, 70, 71, 72, 73, 74, 75, 76, 77,
3377 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
3378 88, 90, 91, 92, 94, 95, 96, 102, 103, 105,
3379 106, 107, 108, 109, 111, 112, 113, 114, 115, 121,
3380 123, 126, 3, 121, 161, 145, 171, 187, 125, 126,
3381 183, 184, 221, 222, 223, 231, 121, 237, 238, 126,
3382 242, 179, 228, 3, 154, 104, 131, 100, 100, 132,
3383 124, 100, 236, 3, 3, 150, 151, 237, 237, 150,
3384 3, 131, 144, 125, 135, 3, 99, 67, 99, 3,
3385 34, 50, 215, 3, 3, 207, 242, 242, 242, 242,
3386 242, 242, 242, 242, 242, 242, 242, 242, 242, 242,
3387 242, 242, 242, 242, 242, 242, 242, 242, 242, 242,
3388 3, 242, 242, 242, 242, 242, 242, 242, 242, 242,
3389 242, 242, 242, 242, 242, 242, 228, 242, 3, 121,
3390 127, 237, 12, 242, 99, 138, 139, 140, 146, 147,
3391 195, 197, 206, 216, 186, 183, 126, 121, 227, 3,
3392 93, 212, 213, 214, 132, 114, 183, 132, 141, 142,
3393 132, 237, 236, 236, 242, 104, 226, 100, 142, 131,
3394 226, 237, 237, 102, 3, 53, 192, 53, 193, 3,
3395 208, 209, 104, 132, 124, 89, 242, 3, 132, 121,
3396 132, 131, 140, 125, 138, 228, 102, 104, 210, 214,
3397 132, 100, 131, 132, 104, 35, 114, 223, 225, 102,
3398 148, 151, 131, 99, 132, 3, 5, 121, 223, 15,
3399 194, 223, 224, 125, 226, 100, 242, 3, 132, 145,
3400 237, 125, 138, 131, 132, 242, 225, 226, 93, 214,
3401 26, 32, 172, 174, 176, 177, 145, 236, 242, 239,
3402 145, 212, 224, 125, 100, 198, 148, 209, 132, 33,
3403 61, 166, 167, 168, 169, 131, 210, 125, 214, 125,
3404 121, 172, 174, 64, 152, 132, 132, 196, 223, 45,
3405 99, 189, 202, 203, 204, 242, 104, 131, 168, 169,
3406 220, 175, 3, 145, 145, 226, 99, 143, 147, 189,
3407 199, 200, 201, 206, 216, 3, 25, 131, 204, 104,
3408 141, 141, 141, 226, 125, 125, 131, 201, 215, 141,
3409 131, 131, 132, 217, 199, 3, 173, 141, 131, 121,
3410 125, 131, 212, 141, 132, 131, 226
3413 #define yyerrok (yyerrstatus = 0)
3414 #define yyclearin (yychar = YYEMPTY)
3415 #define YYEMPTY (-2)
3418 #define YYACCEPT goto yyacceptlab
3419 #define YYABORT goto yyabortlab
3420 #define YYERROR goto yyerrorlab
3423 /* Like YYERROR except do call yyerror. This remains here temporarily
3424 to ease the transition to the new meaning of YYERROR, for GCC.
3425 Once GCC version 2 has supplanted version 1, this can go. */
3427 #define YYFAIL goto yyerrlab
3429 #define YYRECOVERING() (!!yyerrstatus)
3431 #define YYBACKUP(Token, Value) \
3433 if (yychar == YYEMPTY && yylen == 1) \
3437 yytoken = YYTRANSLATE (yychar); \
3443 yyerror (YY_("syntax error: cannot back up")); \
3450 #define YYERRCODE 256
3453 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
3454 If N is 0, then set CURRENT to the empty location which ends
3455 the previous symbol: RHS[0] (always defined). */
3457 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
3458 #ifndef YYLLOC_DEFAULT
3459 # define YYLLOC_DEFAULT(Current, Rhs, N) \
3463 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
3464 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
3465 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
3466 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
3470 (Current).first_line = (Current).last_line = \
3471 YYRHSLOC (Rhs, 0).last_line; \
3472 (Current).first_column = (Current).last_column = \
3473 YYRHSLOC (Rhs, 0).last_column; \
3479 /* YY_LOCATION_PRINT -- Print the location on the stream.
3480 This macro was not mandated originally: define only if we know
3481 we won't break user code: when these are the locations we know. */
3483 #ifndef YY_LOCATION_PRINT
3484 # if YYLTYPE_IS_TRIVIAL
3485 # define YY_LOCATION_PRINT(File, Loc) \
3486 fprintf (File, "%d.%d-%d.%d", \
3487 (Loc).first_line, (Loc).first_column, \
3488 (Loc).last_line, (Loc).last_column)
3490 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
3495 /* YYLEX -- calling `yylex' with the right arguments. */
3498 # define YYLEX yylex (YYLEX_PARAM)
3500 # define YYLEX yylex ()
3503 /* Enable debugging if requested. */
3507 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
3508 # define YYFPRINTF fprintf
3511 # define YYDPRINTF(Args) \
3517 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
3521 YYFPRINTF (stderr, "%s ", Title); \
3522 yy_symbol_print (stderr, \
3524 YYFPRINTF (stderr, "\n"); \
3529 /*--------------------------------.
3530 | Print this symbol on YYOUTPUT. |
3531 `--------------------------------*/
3534 #if (defined __STDC__ || defined __C99__FUNC__ \
3535 || defined __cplusplus || defined _MSC_VER)
3537 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
3540 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
3543 YYSTYPE const * const yyvaluep;
3549 if (yytype < YYNTOKENS)
3550 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
3562 /*--------------------------------.
3563 | Print this symbol on YYOUTPUT. |
3564 `--------------------------------*/
3566 #if (defined __STDC__ || defined __C99__FUNC__ \
3567 || defined __cplusplus || defined _MSC_VER)
3569 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
3572 yy_symbol_print (yyoutput, yytype, yyvaluep)
3575 YYSTYPE const * const yyvaluep;
3578 if (yytype < YYNTOKENS)
3579 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
3581 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
3583 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
3584 YYFPRINTF (yyoutput, ")");
3587 /*------------------------------------------------------------------.
3588 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
3590 `------------------------------------------------------------------*/
3592 #if (defined __STDC__ || defined __C99__FUNC__ \
3593 || defined __cplusplus || defined _MSC_VER)
3595 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
3598 yy_stack_print (yybottom, yytop)
3599 yytype_int16 *yybottom;
3600 yytype_int16 *yytop;
3603 YYFPRINTF (stderr, "Stack now");
3604 for (; yybottom <= yytop; yybottom++)
3606 int yybot = *yybottom;
3607 YYFPRINTF (stderr, " %d", yybot);
3609 YYFPRINTF (stderr, "\n");
3612 # define YY_STACK_PRINT(Bottom, Top) \
3615 yy_stack_print ((Bottom), (Top)); \
3619 /*------------------------------------------------.
3620 | Report that the YYRULE is going to be reduced. |
3621 `------------------------------------------------*/
3623 #if (defined __STDC__ || defined __C99__FUNC__ \
3624 || defined __cplusplus || defined _MSC_VER)
3626 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
3629 yy_reduce_print (yyvsp, yyrule)
3634 int yynrhs = yyr2[yyrule];
3636 unsigned long int yylno = yyrline[yyrule];
3637 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
3639 /* The symbols being reduced. */
3640 for (yyi = 0; yyi < yynrhs; yyi++)
3642 YYFPRINTF (stderr, " $%d = ", yyi + 1);
3643 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
3644 &(yyvsp[(yyi + 1) - (yynrhs)])
3646 YYFPRINTF (stderr, "\n");
3650 # define YY_REDUCE_PRINT(Rule) \
3653 yy_reduce_print (yyvsp, Rule); \
3656 /* Nonzero means print parse trace. It is left uninitialized so that
3657 multiple parsers can coexist. */
3659 #else /* !YYDEBUG */
3660 # define YYDPRINTF(Args)
3661 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
3662 # define YY_STACK_PRINT(Bottom, Top)
3663 # define YY_REDUCE_PRINT(Rule)
3664 #endif /* !YYDEBUG */
3667 /* YYINITDEPTH -- initial size of the parser's stacks. */
3669 # define YYINITDEPTH 200
3672 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
3673 if the built-in stack extension method is used).
3675 Do not make this value too large; the results are undefined if
3676 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
3677 evaluated with infinite-precision integer arithmetic. */
3680 # define YYMAXDEPTH 10000
3688 # if defined __GLIBC__ && defined _STRING_H
3689 # define yystrlen strlen
3691 /* Return the length of YYSTR. */
3692 #if (defined __STDC__ || defined __C99__FUNC__ \
3693 || defined __cplusplus || defined _MSC_VER)
3695 yystrlen (const char *yystr)
3703 for (yylen = 0; yystr[yylen]; yylen++)
3711 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
3712 # define yystpcpy stpcpy
3714 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
3716 #if (defined __STDC__ || defined __C99__FUNC__ \
3717 || defined __cplusplus || defined _MSC_VER)
3719 yystpcpy (char *yydest, const char *yysrc)
3722 yystpcpy (yydest, yysrc)
3728 const char *yys = yysrc;
3730 while ((*yyd++ = *yys++) != '\0')
3739 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
3740 quotes and backslashes, so that it's suitable for yyerror. The
3741 heuristic is that double-quoting is unnecessary unless the string
3742 contains an apostrophe, a comma, or backslash (other than
3743 backslash-backslash). YYSTR is taken from yytname. If YYRES is
3744 null, do not copy; instead, return the length of what the result
3747 yytnamerr (char *yyres, const char *yystr)
3752 char const *yyp = yystr;
3759 goto do_not_strip_quotes;
3763 goto do_not_strip_quotes;
3776 do_not_strip_quotes: ;
3780 return yystrlen (yystr);
3782 return yystpcpy (yyres, yystr) - yyres;
3786 /* Copy into YYRESULT an error message about the unexpected token
3787 YYCHAR while in state YYSTATE. Return the number of bytes copied,
3788 including the terminating null byte. If YYRESULT is null, do not
3789 copy anything; just return the number of bytes that would be
3790 copied. As a special case, return 0 if an ordinary "syntax error"
3791 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
3792 size calculation. */
3794 yysyntax_error (char *yyresult, int yystate, int yychar)
3796 int yyn = yypact[yystate];
3798 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
3802 int yytype = YYTRANSLATE (yychar);
3803 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
3804 YYSIZE_T yysize = yysize0;
3806 int yysize_overflow = 0;
3807 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
3808 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
3812 /* This is so xgettext sees the translatable formats that are
3813 constructed on the fly. */
3814 YY_("syntax error, unexpected %s");
3815 YY_("syntax error, unexpected %s, expecting %s");
3816 YY_("syntax error, unexpected %s, expecting %s or %s");
3817 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
3818 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
3822 static char const yyunexpected[] = "syntax error, unexpected %s";
3823 static char const yyexpecting[] = ", expecting %s";
3824 static char const yyor[] = " or %s";
3825 char yyformat[sizeof yyunexpected
3826 + sizeof yyexpecting - 1
3827 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
3828 * (sizeof yyor - 1))];
3829 char const *yyprefix = yyexpecting;
3831 /* Start YYX at -YYN if negative to avoid negative indexes in
3833 int yyxbegin = yyn < 0 ? -yyn : 0;
3835 /* Stay within bounds of both yycheck and yytname. */
3836 int yychecklim = YYLAST - yyn + 1;
3837 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
3840 yyarg[0] = yytname[yytype];
3841 yyfmt = yystpcpy (yyformat, yyunexpected);
3843 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
3844 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
3846 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
3850 yyformat[sizeof yyunexpected - 1] = '\0';
3853 yyarg[yycount++] = yytname[yyx];
3854 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
3855 yysize_overflow |= (yysize1 < yysize);
3857 yyfmt = yystpcpy (yyfmt, yyprefix);
3861 yyf = YY_(yyformat);
3862 yysize1 = yysize + yystrlen (yyf);
3863 yysize_overflow |= (yysize1 < yysize);
3866 if (yysize_overflow)
3867 return YYSIZE_MAXIMUM;
3871 /* Avoid sprintf, as that infringes on the user's name space.
3872 Don't have undefined behavior even if the translation
3873 produced a string with the wrong number of "%s"s. */
3874 char *yyp = yyresult;
3876 while ((*yyp = *yyf) != '\0')
3878 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
3880 yyp += yytnamerr (yyp, yyarg[yyi++]);
3893 #endif /* YYERROR_VERBOSE */
3896 /*-----------------------------------------------.
3897 | Release the memory associated to this symbol. |
3898 `-----------------------------------------------*/
3901 #if (defined __STDC__ || defined __C99__FUNC__ \
3902 || defined __cplusplus || defined _MSC_VER)
3904 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
3907 yydestruct (yymsg, yytype, yyvaluep)
3917 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
3927 /* Prevent warnings from -Wmissing-prototypes. */
3928 #ifdef YYPARSE_PARAM
3929 #if defined __STDC__ || defined __cplusplus
3930 int yyparse (void *YYPARSE_PARAM);
3934 #else /* ! YYPARSE_PARAM */
3935 #if defined __STDC__ || defined __cplusplus
3940 #endif /* ! YYPARSE_PARAM */
3943 /* The lookahead symbol. */
3946 /* The semantic value of the lookahead symbol. */
3949 /* Number of syntax errors so far. */
3954 /*-------------------------.
3955 | yyparse or yypush_parse. |
3956 `-------------------------*/
3958 #ifdef YYPARSE_PARAM
3959 #if (defined __STDC__ || defined __C99__FUNC__ \
3960 || defined __cplusplus || defined _MSC_VER)
3962 yyparse (void *YYPARSE_PARAM)
3965 yyparse (YYPARSE_PARAM)
3966 void *YYPARSE_PARAM;
3968 #else /* ! YYPARSE_PARAM */
3969 #if (defined __STDC__ || defined __C99__FUNC__ \
3970 || defined __cplusplus || defined _MSC_VER)
3983 /* Number of tokens to shift before error messages enabled. */
3986 /* The stacks and their tools:
3987 `yyss': related to states.
3988 `yyvs': related to semantic values.
3990 Refer to the stacks thru separate pointers, to allow yyoverflow
3991 to reallocate them elsewhere. */
3993 /* The state stack. */
3994 yytype_int16 yyssa[YYINITDEPTH];
3996 yytype_int16 *yyssp;
3998 /* The semantic value stack. */
3999 YYSTYPE yyvsa[YYINITDEPTH];
4003 YYSIZE_T yystacksize;
4007 /* Lookahead token as an internal (translated) token number. */
4009 /* The variables used to return semantic value and location from the
4014 /* Buffer for error messages, and its allocated size. */
4016 char *yymsg = yymsgbuf;
4017 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
4020 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
4022 /* The number of symbols on the RHS of the reduced rule.
4023 Keep to zero when no symbol should be popped. */
4029 yystacksize = YYINITDEPTH;
4031 YYDPRINTF ((stderr, "Starting parse\n"));
4036 yychar = YYEMPTY; /* Cause a token to be read. */
4038 /* Initialize stack pointers.
4039 Waste one element of value and location stack
4040 so that they stay on the same level as the state stack.
4041 The wasted elements are never initialized. */
4047 /*------------------------------------------------------------.
4048 | yynewstate -- Push a new state, which is found in yystate. |
4049 `------------------------------------------------------------*/
4051 /* In all cases, when you get here, the value and location stacks
4052 have just been pushed. So pushing a state here evens the stacks. */
4058 if (yyss + yystacksize - 1 <= yyssp)
4060 /* Get the current used size of the three stacks, in elements. */
4061 YYSIZE_T yysize = yyssp - yyss + 1;
4065 /* Give user a chance to reallocate the stack. Use copies of
4066 these so that the &'s don't force the real ones into
4068 YYSTYPE *yyvs1 = yyvs;
4069 yytype_int16 *yyss1 = yyss;
4071 /* Each stack pointer address is followed by the size of the
4072 data in use in that stack, in bytes. This used to be a
4073 conditional around just the two extra args, but that might
4074 be undefined if yyoverflow is a macro. */
4075 yyoverflow (YY_("memory exhausted"),
4076 &yyss1, yysize * sizeof (*yyssp),
4077 &yyvs1, yysize * sizeof (*yyvsp),
4083 #else /* no yyoverflow */
4084 # ifndef YYSTACK_RELOCATE
4085 goto yyexhaustedlab;
4087 /* Extend the stack our own way. */
4088 if (YYMAXDEPTH <= yystacksize)
4089 goto yyexhaustedlab;
4091 if (YYMAXDEPTH < yystacksize)
4092 yystacksize = YYMAXDEPTH;
4095 yytype_int16 *yyss1 = yyss;
4096 union yyalloc *yyptr =
4097 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
4099 goto yyexhaustedlab;
4100 YYSTACK_RELOCATE (yyss_alloc, yyss);
4101 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
4102 # undef YYSTACK_RELOCATE
4104 YYSTACK_FREE (yyss1);
4107 #endif /* no yyoverflow */
4109 yyssp = yyss + yysize - 1;
4110 yyvsp = yyvs + yysize - 1;
4112 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
4113 (unsigned long int) yystacksize));
4115 if (yyss + yystacksize - 1 <= yyssp)
4119 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
4121 if (yystate == YYFINAL)
4131 /* Do appropriate processing given the current state. Read a
4132 lookahead token if we need one and don't already have one. */
4134 /* First try to decide what to do without reference to lookahead token. */
4135 yyn = yypact[yystate];
4136 if (yyn == YYPACT_NINF)
4139 /* Not known => get a lookahead token if don't already have one. */
4141 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
4142 if (yychar == YYEMPTY)
4144 YYDPRINTF ((stderr, "Reading a token: "));
4148 if (yychar <= YYEOF)
4150 yychar = yytoken = YYEOF;
4151 YYDPRINTF ((stderr, "Now at end of input.\n"));
4155 yytoken = YYTRANSLATE (yychar);
4156 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
4159 /* If the proper action on seeing token YYTOKEN is to reduce or to
4160 detect an error, take that action. */
4162 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
4167 if (yyn == 0 || yyn == YYTABLE_NINF)
4173 /* Count tokens shifted since error; after three, turn off error
4178 /* Shift the lookahead token. */
4179 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
4181 /* Discard the shifted token. */
4190 /*-----------------------------------------------------------.
4191 | yydefault -- do the default action for the current state. |
4192 `-----------------------------------------------------------*/
4194 yyn = yydefact[yystate];
4200 /*-----------------------------.
4201 | yyreduce -- Do a reduction. |
4202 `-----------------------------*/
4204 /* yyn is the number of a rule to reduce with. */
4207 /* If YYLEN is nonzero, implement the default value of the action:
4210 Otherwise, the following line sets YYVAL to garbage.
4211 This behavior is undocumented and Bison
4212 users should not rely upon it. Assigning to YYVAL
4213 unconditionally makes the parser a bit smaller, and it avoids a
4214 GCC warning that YYVAL may be used uninitialized. */
4215 yyval = yyvsp[1-yylen];
4218 YY_REDUCE_PRINT (yyn);
4225 /* Line 1464 of skeleton.m4 */
4226 #line 1894 "parser.y"
4227 {PASS_ALWAYS as3_pass=(yyvsp[(1) - (4)].number_int);}
4236 /* Line 1464 of skeleton.m4 */
4237 #line 1906 "parser.y"
4238 {PASS_ALWAYS as3_pass=(yyvsp[(1) - (4)].number_int);}
4247 /* Line 1464 of skeleton.m4 */
4248 #line 1909 "parser.y"
4249 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4258 /* Line 1464 of skeleton.m4 */
4259 #line 1910 "parser.y"
4260 {(yyval.code)=code_new();}
4269 /* Line 1464 of skeleton.m4 */
4270 #line 1912 "parser.y"
4271 {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
4280 /* Line 1464 of skeleton.m4 */
4281 #line 1913 "parser.y"
4282 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4291 /* Line 1464 of skeleton.m4 */
4292 #line 1928 "parser.y"
4293 {(yyval.code)=(yyvsp[(2) - (3)].code);}
4302 /* Line 1464 of skeleton.m4 */
4303 #line 1929 "parser.y"
4313 /* Line 1464 of skeleton.m4 */
4314 #line 1932 "parser.y"
4324 /* Line 1464 of skeleton.m4 */
4325 #line 1939 "parser.y"
4326 {PASS_ALWAYS as3_pass=(yyvsp[(1) - (4)].number_int);}
4335 /* Line 1464 of skeleton.m4 */
4336 #line 1943 "parser.y"
4337 {(yyval.code)=(yyvsp[(1) - (2)].code);}
4346 /* Line 1464 of skeleton.m4 */
4347 #line 1944 "parser.y"
4348 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4357 /* Line 1464 of skeleton.m4 */
4358 #line 1948 "parser.y"
4360 code_t**cc = &global->init->method->body->code;
4361 *cc = code_append(*cc, (yyvsp[(1) - (1)].code));
4371 /* Line 1464 of skeleton.m4 */
4372 #line 1955 "parser.y"
4375 (yyval.number_int)=as3_pass;
4376 char*key = concat3((yyvsp[(1) - (3)].id),"::",(yyvsp[(3) - (3)].id));
4377 if(!definitions || !dict_contains(definitions, key)) {
4390 /* Line 1464 of skeleton.m4 */
4391 #line 1974 "parser.y"
4392 {(yyval.node)=(yyvsp[(2) - (2)].node);}
4401 /* Line 1464 of skeleton.m4 */
4402 #line 1975 "parser.y"
4403 {(yyval.node)=mkdummynode();}
4412 /* Line 1464 of skeleton.m4 */
4413 #line 1977 "parser.y"
4414 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4423 /* Line 1464 of skeleton.m4 */
4424 #line 1978 "parser.y"
4425 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4434 /* Line 1464 of skeleton.m4 */
4435 #line 1980 "parser.y"
4436 {(yyval.code) = (yyvsp[(1) - (1)].code);}
4445 /* Line 1464 of skeleton.m4 */
4446 #line 1981 "parser.y"
4447 {(yyval.code) = code_append((yyvsp[(1) - (3)].code), (yyvsp[(3) - (3)].code));}
4456 /* Line 1464 of skeleton.m4 */
4457 #line 1984 "parser.y"
4460 if(variable_exists((yyvsp[(1) - (3)].id)))
4461 syntaxerror("Variable %s already defined", (yyvsp[(1) - (3)].id));
4463 new_variable((yyvsp[(1) - (3)].id), 0, 1, 0);
4468 if(state->method->uses_slots) {
4469 variable_t* v = find_slot(state, (yyvsp[(1) - (3)].id));
4471 // this variable is stored in a slot
4473 v->type = (yyvsp[(2) - (3)].classinfo);
4479 index = new_variable((yyvsp[(1) - (3)].id), (yyvsp[(2) - (3)].classinfo), 1, 0);
4482 (yyval.code) = slot?abc_getscopeobject(0, 1):0;
4484 typedcode_t v = node_read((yyvsp[(3) - (3)].node));
4485 if(!is_subtype_of(v.t, (yyvsp[(2) - (3)].classinfo))) {
4486 syntaxerror("Can't convert %s to %s", v.t->name, (yyvsp[(2) - (3)].classinfo)->name);
4488 if((yyvsp[(2) - (3)].classinfo)) {
4489 if(v.c->prev || v.c->opcode != OPCODE_PUSHUNDEFINED) {
4490 (yyval.code) = code_append((yyval.code), v.c);
4491 (yyval.code) = converttype((yyval.code), v.t, (yyvsp[(2) - (3)].classinfo));
4494 (yyval.code) = defaultvalue((yyval.code), (yyvsp[(2) - (3)].classinfo));
4497 if(v.c->prev || v.c->opcode != OPCODE_PUSHUNDEFINED) {
4498 (yyval.code) = code_append((yyval.code), v.c);
4499 (yyval.code) = abc_coerce_a((yyval.code));
4501 // don't do anything
4503 code_free((yyval.code));
4509 (yyval.code) = abc_setslot((yyval.code), index);
4511 (yyval.code) = abc_setlocal((yyval.code), index);
4522 /* Line 1464 of skeleton.m4 */
4523 #line 2043 "parser.y"
4524 {(yyval.code) = code_new();}
4533 /* Line 1464 of skeleton.m4 */
4534 #line 2044 "parser.y"
4535 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4544 /* Line 1464 of skeleton.m4 */
4545 #line 2047 "parser.y"
4546 {PASS12 new_state();}
4555 /* Line 1464 of skeleton.m4 */
4556 #line 2047 "parser.y"
4559 (yyval.code) = code_new();
4560 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (7)].value).c);
4561 code_t*myjmp,*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4563 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].code));
4564 if((yyvsp[(7) - (7)].code)) {
4565 myjmp = (yyval.code) = abc_jump((yyval.code), 0);
4567 myif->branch = (yyval.code) = abc_nop((yyval.code));
4568 if((yyvsp[(7) - (7)].code)) {
4569 (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (7)].code));
4570 myjmp->branch = (yyval.code) = abc_nop((yyval.code));
4572 (yyval.code) = var_block((yyval.code));
4583 /* Line 1464 of skeleton.m4 */
4584 #line 2066 "parser.y"
4585 {(yyval.code)=code_new();}
4594 /* Line 1464 of skeleton.m4 */
4595 #line 2073 "parser.y"
4597 PASS1 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable((yyvsp[(2) - (3)].id),0,1,0);
4598 PASS2 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable((yyvsp[(2) - (3)].id),(yyvsp[(3) - (3)].classinfo),1,0);
4608 /* Line 1464 of skeleton.m4 */
4609 #line 2077 "parser.y"
4612 (yyval.id)=(yyvsp[(1) - (1)].id);
4622 /* Line 1464 of skeleton.m4 */
4623 #line 2082 "parser.y"
4624 {PASS12 new_state();(yyval.for_start).name=(yyvsp[(1) - (2)].id);(yyval.for_start).each=0;}
4633 /* Line 1464 of skeleton.m4 */
4634 #line 2083 "parser.y"
4635 {PASS12 new_state();(yyval.for_start).name=(yyvsp[(1) - (3)].id);(yyval.for_start).each=1;}
4644 /* Line 1464 of skeleton.m4 */
4645 #line 2085 "parser.y"
4647 if((yyvsp[(1) - (8)].for_start).each) syntaxerror("invalid syntax: ; not allowed in for each statement");
4648 (yyval.code) = code_new();
4649 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (8)].code));
4650 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4651 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (8)].value).c);
4652 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4653 (yyval.code) = code_append((yyval.code), (yyvsp[(8) - (8)].code));
4654 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4655 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (8)].code));
4656 (yyval.code) = abc_jump((yyval.code), loopstart);
4657 code_t*out = (yyval.code) = abc_nop((yyval.code));
4658 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, out);
4659 continuejumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, cont);
4662 (yyval.code) = var_block((yyval.code));
4673 /* Line 1464 of skeleton.m4 */
4674 #line 2105 "parser.y"
4676 variable_t*var = find_variable(state, (yyvsp[(2) - (6)].id));
4678 syntaxerror("variable %s not known in this scope", (yyvsp[(2) - (6)].id));
4681 char*tmp1name = concat2((yyvsp[(2) - (6)].id), "__tmp1__");
4682 int it = new_variable(tmp1name, TYPE_INT, 0, 0);
4683 char*tmp2name = concat2((yyvsp[(2) - (6)].id), "__array__");
4684 int array = new_variable(tmp1name, 0, 0, 0);
4686 (yyval.code) = code_new();
4687 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
4688 (yyval.code) = abc_coerce_a((yyval.code));
4689 (yyval.code) = abc_setlocal((yyval.code), array);
4690 (yyval.code) = abc_pushbyte((yyval.code), 0);
4691 (yyval.code) = abc_setlocal((yyval.code), it);
4693 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4695 (yyval.code) = abc_hasnext2((yyval.code), array, it);
4696 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4697 (yyval.code) = abc_getlocal((yyval.code), array);
4698 (yyval.code) = abc_getlocal((yyval.code), it);
4699 if(!(yyvsp[(1) - (6)].for_start).each)
4700 (yyval.code) = abc_nextname((yyval.code));
4702 (yyval.code) = abc_nextvalue((yyval.code));
4703 (yyval.code) = converttype((yyval.code), 0, var->type);
4704 (yyval.code) = abc_setlocal((yyval.code), var->index);
4706 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
4707 (yyval.code) = abc_jump((yyval.code), loopstart);
4709 code_t*out = (yyval.code) = abc_nop((yyval.code));
4710 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, out);
4711 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, loopstart);
4715 (yyval.code) = var_block((yyval.code));
4730 /* Line 1464 of skeleton.m4 */
4731 #line 2153 "parser.y"
4732 {PASS12 new_state();}
4741 /* Line 1464 of skeleton.m4 */
4742 #line 2153 "parser.y"
4745 (yyval.code) = code_new();
4747 code_t*myjmp = (yyval.code) = abc_jump((yyval.code), 0);
4748 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4749 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
4750 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4751 myjmp->branch = cont;
4752 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
4753 (yyval.code) = abc_iftrue((yyval.code), loopstart);
4754 code_t*out = (yyval.code) = abc_nop((yyval.code));
4755 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].id), out);
4756 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].id), cont);
4758 (yyval.code) = var_block((yyval.code));
4769 /* Line 1464 of skeleton.m4 */
4770 #line 2172 "parser.y"
4771 {PASS12 new_state();}
4780 /* Line 1464 of skeleton.m4 */
4781 #line 2172 "parser.y"
4783 (yyval.code) = code_new();
4784 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4785 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (7)].code));
4786 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4787 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].value).c);
4788 (yyval.code) = abc_iftrue((yyval.code), loopstart);
4789 code_t*out = (yyval.code) = abc_nop((yyval.code));
4790 breakjumpsto((yyval.code), (yyvsp[(1) - (7)].id), out);
4791 continuejumpsto((yyval.code), (yyvsp[(1) - (7)].id), cont);
4793 (yyval.code) = var_block((yyval.code));
4804 /* Line 1464 of skeleton.m4 */
4805 #line 2187 "parser.y"
4807 (yyval.code) = abc___break__(0, "");
4817 /* Line 1464 of skeleton.m4 */
4818 #line 2190 "parser.y"
4820 (yyval.code) = abc___break__(0, (yyvsp[(2) - (2)].id));
4830 /* Line 1464 of skeleton.m4 */
4831 #line 2193 "parser.y"
4833 (yyval.code) = abc___continue__(0, "");
4843 /* Line 1464 of skeleton.m4 */
4844 #line 2196 "parser.y"
4846 (yyval.code) = abc___continue__(0, (yyvsp[(2) - (2)].id));
4856 /* Line 1464 of skeleton.m4 */
4857 #line 2200 "parser.y"
4867 /* Line 1464 of skeleton.m4 */
4868 #line 2201 "parser.y"
4869 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4878 /* Line 1464 of skeleton.m4 */
4879 #line 2202 "parser.y"
4880 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4889 /* Line 1464 of skeleton.m4 */
4890 #line 2203 "parser.y"
4891 {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
4900 /* Line 1464 of skeleton.m4 */
4901 #line 2204 "parser.y"
4902 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4911 /* Line 1464 of skeleton.m4 */
4912 #line 2205 "parser.y"
4913 {(yyval.code)=code_append((yyval.code),(yyvsp[(2) - (2)].code));}
4922 /* Line 1464 of skeleton.m4 */
4923 #line 2207 "parser.y"
4925 (yyval.code) = abc_getlocal(0, state->switch_var);
4926 (yyval.code) = code_append((yyval.code), node_read((yyvsp[(2) - (4)].node)).c);
4927 code_t*j = (yyval.code) = abc_ifne((yyval.code), 0);
4928 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (4)].code));
4929 if((yyval.code)->opcode != OPCODE___BREAK__) {
4930 (yyval.code) = abc___fallthrough__((yyval.code), "");
4932 code_t*e = (yyval.code) = abc_nop((yyval.code));
4943 /* Line 1464 of skeleton.m4 */
4944 #line 2218 "parser.y"
4946 (yyval.code) = (yyvsp[(3) - (3)].code);
4956 /* Line 1464 of skeleton.m4 */
4957 #line 2221 "parser.y"
4958 {PASS12 new_state();state->switch_var=alloc_local();}
4967 /* Line 1464 of skeleton.m4 */
4968 #line 2221 "parser.y"
4970 (yyval.code) = node_read((yyvsp[(4) - (8)].node)).c;
4971 (yyval.code) = abc_setlocal((yyval.code), state->switch_var);
4972 (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (8)].code));
4974 code_t*out = (yyval.code) = abc_kill((yyval.code), state->switch_var);
4975 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].id), out);
4977 code_t*c = (yyval.code),*lastblock=0;
4979 if(c->opcode == OPCODE_IFNE) {
4980 if(!c->next) syntaxerror("internal error in fallthrough handling");
4982 } else if(c->opcode == OPCODE___FALLTHROUGH__) {
4984 c->opcode = OPCODE_JUMP;
4985 c->branch = lastblock;
4987 /* fall through end of switch */
4988 c->opcode = OPCODE_NOP;
4994 (yyval.code) = var_block((yyval.code));
5005 /* Line 1464 of skeleton.m4 */
5006 #line 2252 "parser.y"
5007 {PASS12 new_state();
5008 state->exception_name=(yyvsp[(3) - (5)].id);
5009 PASS1 new_variable((yyvsp[(3) - (5)].id), 0, 0, 0);
5010 PASS2 new_variable((yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].classinfo), 0, 0);
5020 /* Line 1464 of skeleton.m4 */
5021 #line 2257 "parser.y"
5023 namespace_t name_ns = {ACCESS_PACKAGE, ""};
5024 multiname_t name = {QNAME, &name_ns, 0, (yyvsp[(3) - (9)].id)};
5026 NEW(abc_exception_t, e)
5027 e->exc_type = sig2mname((yyvsp[(4) - (9)].classinfo));
5028 e->var_name = multiname_clone(&name);
5029 (yyval.exception) = e;
5032 int i = find_variable_safe(state, (yyvsp[(3) - (9)].id))->index;
5033 e->target = c = abc_nop(0);
5034 c = abc_setlocal(c, i);
5035 c = code_append(c, code_dup(state->method->scope_code));
5036 c = code_append(c, (yyvsp[(8) - (9)].code));
5050 /* Line 1464 of skeleton.m4 */
5051 #line 2277 "parser.y"
5052 {PASS12 new_state();state->exception_name=0;}
5061 /* Line 1464 of skeleton.m4 */
5062 #line 2277 "parser.y"
5064 (yyvsp[(4) - (5)].code) = var_block((yyvsp[(4) - (5)].code));
5065 if(!(yyvsp[(4) - (5)].code)) {
5066 (yyval.exception)=0;
5068 NEW(abc_exception_t, e)
5069 e->exc_type = 0; //all exceptions
5070 e->var_name = 0; //no name
5073 e->to = code_append(e->to, (yyvsp[(4) - (5)].code));
5074 (yyval.exception) = e;
5086 /* Line 1464 of skeleton.m4 */
5087 #line 2293 "parser.y"
5088 {(yyval.catch_list).l=list_new();(yyval.catch_list).finally=0;list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));}
5097 /* Line 1464 of skeleton.m4 */
5098 #line 2294 "parser.y"
5099 {(yyval.catch_list)=(yyvsp[(1) - (2)].catch_list);list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));}
5108 /* Line 1464 of skeleton.m4 */
5109 #line 2295 "parser.y"
5110 {(yyval.catch_list)=(yyvsp[(1) - (1)].catch_list);}
5119 /* Line 1464 of skeleton.m4 */
5120 #line 2296 "parser.y"
5122 (yyval.catch_list) = (yyvsp[(1) - (2)].catch_list);
5123 (yyval.catch_list).finally = 0;
5124 if((yyvsp[(2) - (2)].exception)) {
5125 list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));
5126 (yyval.catch_list).finally = (yyvsp[(2) - (2)].exception)->to;(yyvsp[(2) - (2)].exception)->to=0;
5137 /* Line 1464 of skeleton.m4 */
5138 #line 2304 "parser.y"
5140 (yyval.catch_list).l=list_new();
5141 (yyval.catch_list).finally = 0;
5142 if((yyvsp[(1) - (1)].exception)) {
5143 list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));
5144 (yyval.catch_list).finally = (yyvsp[(1) - (1)].exception)->to;(yyvsp[(1) - (1)].exception)->to=0;
5155 /* Line 1464 of skeleton.m4 */
5156 #line 2313 "parser.y"
5157 {PASS12 new_state();
5158 state->method->has_exceptions=1;
5159 state->method->late_binding=1;//for invariant scope_code
5169 /* Line 1464 of skeleton.m4 */
5170 #line 2316 "parser.y"
5172 code_t*out = abc_nop(0);
5174 code_t*start = abc_nop(0);
5175 (yyval.code) = code_append(start, (yyvsp[(4) - (6)].code));
5176 if(!is_break_or_jump((yyvsp[(4) - (6)].code))) {
5177 (yyval.code) = abc_jump((yyval.code), out);
5179 code_t*end = (yyval.code) = abc_nop((yyval.code));
5182 if((yyvsp[(6) - (6)].catch_list).finally)
5183 tmp = new_variable("__finally__", 0, 0, 0);
5185 abc_exception_list_t*l = (yyvsp[(6) - (6)].catch_list).l;
5188 abc_exception_t*e = l->abc_exception;
5190 (yyval.code) = code_append((yyval.code), e->target);
5191 (yyval.code) = abc_jump((yyval.code), out);
5193 parserassert((ptroff_t)(yyvsp[(6) - (6)].catch_list).finally);
5195 e->target = (yyval.code) = abc_nop((yyval.code));
5196 (yyval.code) = code_append((yyval.code), code_dup(state->method->scope_code));
5197 (yyval.code) = abc___rethrow__((yyval.code));
5205 (yyval.code) = code_append((yyval.code), out);
5207 (yyval.code) = insert_finally((yyval.code), (yyvsp[(6) - (6)].catch_list).finally, tmp);
5209 list_concat(state->method->exceptions, (yyvsp[(6) - (6)].catch_list).l);
5211 (yyval.code) = var_block((yyval.code));
5222 /* Line 1464 of skeleton.m4 */
5223 #line 2362 "parser.y"
5225 (yyval.code)=(yyvsp[(2) - (2)].value).c;
5226 (yyval.code)=abc_throw((yyval.code));
5236 /* Line 1464 of skeleton.m4 */
5237 #line 2366 "parser.y"
5239 if(!state->exception_name)
5240 syntaxerror("re-throw only possible within a catch block");
5241 variable_t*v = find_variable(state, state->exception_name);
5242 (yyval.code)=code_new();
5243 (yyval.code)=abc_getlocal((yyval.code), v->index);
5244 (yyval.code)=abc_throw((yyval.code));
5254 /* Line 1464 of skeleton.m4 */
5255 #line 2377 "parser.y"
5258 if(state->method->has_exceptions) {
5259 int v = alloc_local();
5260 state->method->scope_code = abc_getlocal(state->method->scope_code, v);
5261 state->method->scope_code = abc_pushwith(state->method->scope_code);
5262 (yyval.value_list).number = v;
5264 (yyval.value_list).cc = (yyvsp[(3) - (4)].value).c;
5274 /* Line 1464 of skeleton.m4 */
5275 #line 2387 "parser.y"
5277 /* remove getlocal;pushwith from scope code again */
5278 state->method->scope_code = code_cutlast(code_cutlast(state->method->scope_code));
5280 (yyval.code) = (yyvsp[(1) - (2)].value_list).cc;
5281 if(state->method->has_exceptions) {
5282 (yyval.code) = abc_dup((yyval.code));
5283 (yyval.code) = abc_setlocal((yyval.code), (yyvsp[(1) - (2)].value_list).number);
5285 (yyval.code) = abc_pushwith((yyval.code));
5286 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (2)].code));
5287 (yyval.code) = abc_popscope((yyval.code));
5298 /* Line 1464 of skeleton.m4 */
5299 #line 2405 "parser.y"
5300 {PASS12 (yyval.id)="package";}
5309 /* Line 1464 of skeleton.m4 */
5310 #line 2406 "parser.y"
5311 {PASS12 (yyval.id)=(yyvsp[(1) - (1)].id);}
5320 /* Line 1464 of skeleton.m4 */
5321 #line 2408 "parser.y"
5322 {PASS12 (yyval.id) = concat3((yyvsp[(1) - (3)].id),".",(yyvsp[(3) - (3)].id));free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;}
5331 /* Line 1464 of skeleton.m4 */
5332 #line 2409 "parser.y"
5333 {PASS12 (yyval.id)=strdup((yyvsp[(1) - (1)].id));}
5342 /* Line 1464 of skeleton.m4 */
5343 #line 2411 "parser.y"
5344 {PASS12 startpackage((yyvsp[(2) - (3)].id));free((yyvsp[(2) - (3)].id));(yyvsp[(2) - (3)].id)=0;}
5353 /* Line 1464 of skeleton.m4 */
5354 #line 2412 "parser.y"
5355 {PASS12 endpackage();(yyval.code)=0;}
5364 /* Line 1464 of skeleton.m4 */
5365 #line 2413 "parser.y"
5366 {PASS12 startpackage("");}
5375 /* Line 1464 of skeleton.m4 */
5376 #line 2414 "parser.y"
5377 {PASS12 endpackage();(yyval.code)=0;}
5386 /* Line 1464 of skeleton.m4 */
5387 #line 2436 "parser.y"
5390 slotinfo_t*s = registry_find((yyvsp[(2) - (2)].classinfo)->package, (yyvsp[(2) - (2)].classinfo)->name);
5391 if(!s && as3_pass==1) {// || !(s->flags&FLAG_BUILTIN)) {
5392 as3_schedule_class((yyvsp[(2) - (2)].classinfo)->package, (yyvsp[(2) - (2)].classinfo)->name);
5394 classinfo_t*c = (yyvsp[(2) - (2)].classinfo);
5396 syntaxerror("Couldn't import class\n");
5397 state_has_imports();
5398 dict_put(state->imports, c->name, c);
5399 import_toplevel(c->package);
5410 /* Line 1464 of skeleton.m4 */
5411 #line 2450 "parser.y"
5414 if(strncmp("flash.", (yyvsp[(2) - (4)].id), 6) && as3_pass==1) {
5415 as3_schedule_package((yyvsp[(2) - (4)].id));
5419 i->package = (yyvsp[(2) - (4)].id);
5420 state_has_imports();
5421 list_append(state->wildcard_imports, i);
5422 import_toplevel(i->package);
5433 /* Line 1464 of skeleton.m4 */
5434 #line 2466 "parser.y"
5435 {PASS12 (yyval.flags).flags=0;(yyval.flags).ns=0;}
5444 /* Line 1464 of skeleton.m4 */
5445 #line 2467 "parser.y"
5446 {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
5455 /* Line 1464 of skeleton.m4 */
5456 #line 2468 "parser.y"
5457 {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
5466 /* Line 1464 of skeleton.m4 */
5467 #line 2469 "parser.y"
5470 (yyval.flags).flags=(yyvsp[(1) - (2)].flags).flags|(yyvsp[(2) - (2)].flags).flags;
5471 if((yyvsp[(1) - (2)].flags).ns && (yyvsp[(2) - (2)].flags).ns) syntaxerror("only one namespace allowed in one declaration");
5472 (yyval.flags).ns=(yyvsp[(1) - (2)].flags).ns?(yyvsp[(1) - (2)].flags).ns:(yyvsp[(2) - (2)].flags).ns;
5483 /* Line 1464 of skeleton.m4 */
5484 #line 2476 "parser.y"
5485 {PASS12 (yyval.flags).flags=FLAG_PUBLIC;(yyval.flags).ns=0;}
5494 /* Line 1464 of skeleton.m4 */
5495 #line 2477 "parser.y"
5496 {PASS12 (yyval.flags).flags=FLAG_PRIVATE;(yyval.flags).ns=0;}
5505 /* Line 1464 of skeleton.m4 */
5506 #line 2478 "parser.y"
5507 {PASS12 (yyval.flags).flags=FLAG_PROTECTED;(yyval.flags).ns=0;}
5516 /* Line 1464 of skeleton.m4 */
5517 #line 2479 "parser.y"
5518 {PASS12 (yyval.flags).flags=FLAG_STATIC;(yyval.flags).ns=0;}
5527 /* Line 1464 of skeleton.m4 */
5528 #line 2480 "parser.y"
5529 {PASS12 (yyval.flags).flags=FLAG_DYNAMIC;(yyval.flags).ns=0;}
5538 /* Line 1464 of skeleton.m4 */
5539 #line 2481 "parser.y"
5540 {PASS12 (yyval.flags).flags=FLAG_FINAL;(yyval.flags).ns=0;}
5549 /* Line 1464 of skeleton.m4 */
5550 #line 2482 "parser.y"
5551 {PASS12 (yyval.flags).flags=FLAG_OVERRIDE;(yyval.flags).ns=0;}
5560 /* Line 1464 of skeleton.m4 */
5561 #line 2483 "parser.y"
5562 {PASS12 (yyval.flags).flags=FLAG_NATIVE;(yyval.flags).ns=0;}
5571 /* Line 1464 of skeleton.m4 */
5572 #line 2484 "parser.y"
5573 {PASS12 (yyval.flags).flags=FLAG_PACKAGEINTERNAL;(yyval.flags).ns=0;}
5582 /* Line 1464 of skeleton.m4 */
5583 #line 2485 "parser.y"
5584 {PASS12 (yyval.flags).flags=FLAG_NAMESPACE;
5585 (yyval.flags).ns=(yyvsp[(1) - (1)].id);
5595 /* Line 1464 of skeleton.m4 */
5596 #line 2489 "parser.y"
5597 {PASS12 (yyval.classinfo)=0;}
5606 /* Line 1464 of skeleton.m4 */
5607 #line 2490 "parser.y"
5608 {PASS12 (yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
5617 /* Line 1464 of skeleton.m4 */
5618 #line 2492 "parser.y"
5619 {PASS12 (yyval.classinfo_list)=list_new();}
5628 /* Line 1464 of skeleton.m4 */
5629 #line 2493 "parser.y"
5630 {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
5639 /* Line 1464 of skeleton.m4 */
5640 #line 2495 "parser.y"
5641 {PASS12 (yyval.classinfo_list)=list_new();}
5650 /* Line 1464 of skeleton.m4 */
5651 #line 2496 "parser.y"
5652 {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
5661 /* Line 1464 of skeleton.m4 */
5662 #line 2500 "parser.y"
5663 {PASS12 startclass(&(yyvsp[(1) - (6)].flags),(yyvsp[(3) - (6)].id),(yyvsp[(4) - (6)].classinfo),(yyvsp[(5) - (6)].classinfo_list));}
5672 /* Line 1464 of skeleton.m4 */
5673 #line 2502 "parser.y"
5674 {PASS12 endclass();(yyval.code)=0;}
5683 /* Line 1464 of skeleton.m4 */
5684 #line 2506 "parser.y"
5685 {PASS12 (yyvsp[(1) - (5)].flags).flags|=FLAG_INTERFACE;
5686 startclass(&(yyvsp[(1) - (5)].flags),(yyvsp[(3) - (5)].id),0,(yyvsp[(4) - (5)].classinfo_list));}
5695 /* Line 1464 of skeleton.m4 */
5696 #line 2509 "parser.y"
5697 {PASS12 endclass();(yyval.code)=0;}
5706 /* Line 1464 of skeleton.m4 */
5707 #line 2518 "parser.y"
5708 {PASS_ALWAYS as3_pass=(yyvsp[(1) - (4)].number_int);}
5717 /* Line 1464 of skeleton.m4 */
5718 #line 2522 "parser.y"
5720 code_t*c = state->cls->static_init->header;
5721 c = code_append(c, (yyvsp[(1) - (1)].code));
5722 state->cls->static_init->header = c;
5732 /* Line 1464 of skeleton.m4 */
5733 #line 2533 "parser.y"
5735 syntaxerror("variable declarations not allowed in interfaces");
5745 /* Line 1464 of skeleton.m4 */
5746 #line 2536 "parser.y"
5749 (yyvsp[(1) - (8)].flags).flags |= FLAG_PUBLIC;
5750 if((yyvsp[(1) - (8)].flags).flags&(FLAG_PRIVATE|FLAG_PACKAGEINTERNAL|FLAG_PROTECTED)) {
5751 syntaxerror("invalid method modifiers: interface methods always need to be public");
5753 startfunction(&(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo));
5754 endfunction(&(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo), 0);
5755 list_deep_free((yyvsp[(6) - (8)].params).list);
5765 /* Line 1464 of skeleton.m4 */
5766 #line 2570 "parser.y"
5767 {PASS12 setslotstate(&(yyvsp[(1) - (2)].flags),(yyvsp[(2) - (2)].token));}
5776 /* Line 1464 of skeleton.m4 */
5777 #line 2570 "parser.y"
5778 {PASS12 (yyval.code)=(yyvsp[(4) - (4)].code);setslotstate(0, 0);}
5787 /* Line 1464 of skeleton.m4 */
5788 #line 2572 "parser.y"
5789 {PASS12 (yyval.code)=0;}
5798 /* Line 1464 of skeleton.m4 */
5799 #line 2573 "parser.y"
5800 {PASS12 (yyval.code)=0;}
5809 /* Line 1464 of skeleton.m4 */
5810 #line 2576 "parser.y"
5813 int flags = slotstate_flags->flags;
5814 namespace_t ns = modifiers2access(slotstate_flags);
5818 varinfo_t* info = 0;
5820 memberinfo_t*i = registry_findmember(state->cls->info, ns.name, (yyvsp[(1) - (3)].id), 1);
5822 check_override(i, flags);
5824 info = varinfo_register_onclass(state->cls->info, ns.access, ns.name, (yyvsp[(1) - (3)].id));
5826 slotinfo_t*i = registry_find(state->package, (yyvsp[(1) - (3)].id));
5828 syntaxerror("package %s already contains '%s'", state->package, (yyvsp[(1) - (3)].id));
5830 if(ns.name && ns.name[0]) {
5831 syntaxerror("namespaces not allowed on package-level variables");
5833 info = varinfo_register_global(ns.access, state->package, (yyvsp[(1) - (3)].id));
5836 info->type = (yyvsp[(2) - (3)].classinfo);
5837 info->flags = flags;
5839 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, info);
5843 varinfo_t*info = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
5846 multiname_t mname = {QNAME, &ns, 0, (yyvsp[(1) - (3)].id)};
5848 trait_list_t**traits;
5852 ns.name = state->package;
5853 traits = &global->init->traits;
5854 code = &global->init->method->body->code;
5855 } else if(flags&FLAG_STATIC) {
5857 traits = &state->cls->abc->static_traits;
5858 code = &state->cls->static_init->header;
5860 // instance variable
5861 traits = &state->cls->abc->traits;
5862 code = &state->cls->init->header;
5866 if((yyvsp[(2) - (3)].classinfo)) {
5867 MULTINAME(m, (yyvsp[(2) - (3)].classinfo));
5868 t = trait_new_member(traits, multiname_clone(&m), multiname_clone(&mname), 0);
5870 t = trait_new_member(traits, 0, multiname_clone(&mname), 0);
5872 info->slot = t->slot_id;
5874 constant_t cval = (yyvsp[(3) - (3)].node)->type->eval((yyvsp[(3) - (3)].node));
5875 if(cval.type!=CONSTANT_UNKNOWN) {
5876 /* compile time constant */
5877 t->value = malloc(sizeof(constant_t));
5878 memcpy(t->value, &cval, sizeof(constant_t));
5879 info->value = constant_clone(t->value);
5881 typedcode_t v = node_read((yyvsp[(3) - (3)].node));
5882 /* initalization code (if needed) */
5884 if(v.c && !is_pushundefined(v.c)) {
5885 c = abc_getlocal_0(c);
5886 c = code_append(c, v.c);
5887 c = converttype(c, v.t, (yyvsp[(2) - (3)].classinfo));
5888 c = abc_setslot(c, t->slot_id);
5890 *code = code_append(*code, c);
5893 if(slotstate_varconst==KW_CONST) {
5894 t->kind= TRAIT_CONST;
5895 info->flags |= FLAG_CONST;
5909 /* Line 1464 of skeleton.m4 */
5910 #line 2669 "parser.y"
5911 {(yyval.constant)=0;}
5920 /* Line 1464 of skeleton.m4 */
5921 #line 2670 "parser.y"
5923 (yyval.constant) = malloc(sizeof(constant_t));
5924 *(yyval.constant) = node_eval((yyvsp[(2) - (2)].node));
5925 if((yyval.constant)->type == CONSTANT_UNKNOWN)
5926 syntaxerror("can't evaluate default parameter value (needs to be a compile-time constant)");
5936 /* Line 1464 of skeleton.m4 */
5937 #line 2678 "parser.y"
5938 {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_int));}
5947 /* Line 1464 of skeleton.m4 */
5948 #line 2679 "parser.y"
5950 (yyval.constant) = constant_new_uint((yyvsp[(1) - (1)].number_uint));
5960 /* Line 1464 of skeleton.m4 */
5961 #line 2682 "parser.y"
5962 {(yyval.constant) = constant_new_float((yyvsp[(1) - (1)].number_float));}
5971 /* Line 1464 of skeleton.m4 */
5972 #line 2683 "parser.y"
5973 {(yyval.constant) = constant_new_string2((yyvsp[(1) - (1)].str).str,(yyvsp[(1) - (1)].str).len);free((char*)(yyvsp[(1) - (1)].str).str);}
5982 /* Line 1464 of skeleton.m4 */
5983 #line 2684 "parser.y"
5984 {(yyval.constant) = constant_new_true((yyvsp[(1) - (1)].token));}
5993 /* Line 1464 of skeleton.m4 */
5994 #line 2685 "parser.y"
5995 {(yyval.constant) = constant_new_false((yyvsp[(1) - (1)].token));}
6004 /* Line 1464 of skeleton.m4 */
6005 #line 2686 "parser.y"
6006 {(yyval.constant) = constant_new_null((yyvsp[(1) - (1)].token));}
6015 /* Line 1464 of skeleton.m4 */
6016 #line 2687 "parser.y"
6017 {(yyval.constant) = constant_new_undefined((yyvsp[(1) - (1)].token));}
6026 /* Line 1464 of skeleton.m4 */
6027 #line 2688 "parser.y"
6028 {(yyval.constant) = constant_new_float(__builtin_nan(""));}
6037 /* Line 1464 of skeleton.m4 */
6038 #line 2703 "parser.y"
6041 memset(&(yyval.params),0,sizeof((yyval.params)));
6051 /* Line 1464 of skeleton.m4 */
6052 #line 2707 "parser.y"
6055 (yyval.params)=(yyvsp[(1) - (1)].params);
6065 /* Line 1464 of skeleton.m4 */
6066 #line 2713 "parser.y"
6069 memset(&(yyval.params),0,sizeof((yyval.params)));
6070 (yyval.params).varargs=1;
6071 list_append((yyval.params).list, (yyvsp[(2) - (2)].param));
6081 /* Line 1464 of skeleton.m4 */
6082 #line 2719 "parser.y"
6085 (yyval.params) =(yyvsp[(1) - (4)].params);
6086 (yyval.params).varargs=1;
6087 list_append((yyval.params).list, (yyvsp[(4) - (4)].param));
6097 /* Line 1464 of skeleton.m4 */
6098 #line 2727 "parser.y"
6101 (yyval.params) = (yyvsp[(1) - (3)].params);
6102 list_append((yyval.params).list, (yyvsp[(3) - (3)].param));
6112 /* Line 1464 of skeleton.m4 */
6113 #line 2732 "parser.y"
6116 memset(&(yyval.params),0,sizeof((yyval.params)));
6117 list_append((yyval.params).list, (yyvsp[(1) - (1)].param));
6127 /* Line 1464 of skeleton.m4 */
6128 #line 2738 "parser.y"
6131 (yyval.param) = rfx_calloc(sizeof(param_t));
6132 (yyval.param)->name=(yyvsp[(1) - (4)].id);
6133 (yyval.param)->type = (yyvsp[(3) - (4)].classinfo);
6135 (yyval.param)->value = (yyvsp[(4) - (4)].constant);
6145 /* Line 1464 of skeleton.m4 */
6146 #line 2746 "parser.y"
6149 (yyval.param) = rfx_calloc(sizeof(param_t));
6150 (yyval.param)->name=(yyvsp[(1) - (2)].id);
6151 (yyval.param)->type = TYPE_ANY;
6153 (yyval.param)->value = (yyvsp[(2) - (2)].constant);
6163 /* Line 1464 of skeleton.m4 */
6164 #line 2756 "parser.y"
6165 {PASS12 (yyval.token)=0;}
6174 /* Line 1464 of skeleton.m4 */
6175 #line 2759 "parser.y"
6176 {PASS12 startfunction(&(yyvsp[(1) - (9)].flags),(yyvsp[(3) - (9)].token),(yyvsp[(4) - (9)].id),&(yyvsp[(6) - (9)].params),(yyvsp[(8) - (9)].classinfo));}
6185 /* Line 1464 of skeleton.m4 */
6186 #line 2760 "parser.y"
6189 endfunction(&(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),0,0);
6191 if(!state->method->info) syntaxerror("internal error");
6193 code_t*c = method_header(state->method);
6194 c = wrap_function(c, 0, (yyvsp[(11) - (12)].code));
6196 endfunction(&(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),(yyvsp[(8) - (12)].classinfo),c);
6198 list_deep_free((yyvsp[(6) - (12)].params).list);
6209 /* Line 1464 of skeleton.m4 */
6210 #line 2776 "parser.y"
6211 {PASS12 (yyval.id)=0;}
6220 /* Line 1464 of skeleton.m4 */
6221 #line 2778 "parser.y"
6222 {PASS12 innerfunction((yyvsp[(2) - (7)].id),&(yyvsp[(4) - (7)].params),(yyvsp[(6) - (7)].classinfo));}
6231 /* Line 1464 of skeleton.m4 */
6232 #line 2779 "parser.y"
6235 endfunction(0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),0,0);
6237 methodinfo_t*f = state->method->info;
6238 if(!f || !f->kind) syntaxerror("internal error");
6240 code_t*c = method_header(state->method);
6241 c = wrap_function(c, 0, (yyvsp[(9) - (10)].code));
6243 int index = state->method->var_index;
6244 endfunction(0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),(yyvsp[(6) - (10)].classinfo),c);
6246 (yyval.value).c = abc_getlocal(0, index);
6247 (yyval.value).t = TYPE_FUNCTION(f);
6249 PASS12 list_deep_free((yyvsp[(4) - (10)].params).list);
6259 /* Line 1464 of skeleton.m4 */
6260 #line 2801 "parser.y"
6262 PASS1 NEW(unresolvedinfo_t,c);
6263 memset(c, 0, sizeof(*c));
6264 c->kind = INFOTYPE_UNRESOLVED;
6265 c->name = (yyvsp[(1) - (1)].id);
6266 c->package = get_package_from_name((yyvsp[(1) - (1)].id));
6268 c->nsset = get_current_imports();
6269 /* make the compiler look for this class in the current directory,
6271 as3_schedule_class_noerror(state->package, (yyvsp[(1) - (1)].id));
6273 (yyval.classinfo) = (classinfo_t*)c;
6275 slotinfo_t*s = find_class((yyvsp[(1) - (1)].id));
6276 if(!s) syntaxerror("Could not find class/method %s (current package: %s)\n", (yyvsp[(1) - (1)].id), state->package);
6277 (yyval.classinfo) = (classinfo_t*)s;
6287 /* Line 1464 of skeleton.m4 */
6288 #line 2820 "parser.y"
6290 PASS1 NEW(unresolvedinfo_t,c);
6291 memset(c, 0, sizeof(*c));
6292 c->kind = INFOTYPE_UNRESOLVED;
6293 c->package = (yyvsp[(1) - (3)].id);
6294 c->name = (yyvsp[(3) - (3)].id);
6295 (yyval.classinfo) = (classinfo_t*)c;
6297 slotinfo_t*s = registry_find((yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
6298 if(!s) syntaxerror("Couldn't find class/method %s.%s\n", (yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
6299 free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;
6300 (yyval.classinfo) = (classinfo_t*)s;
6310 /* Line 1464 of skeleton.m4 */
6311 #line 2837 "parser.y"
6312 {PASS12 (yyval.classinfo_list)=list_new();list_append((yyval.classinfo_list), (yyvsp[(1) - (1)].classinfo));}
6321 /* Line 1464 of skeleton.m4 */
6322 #line 2838 "parser.y"
6323 {PASS12 (yyval.classinfo_list)=(yyvsp[(1) - (3)].classinfo_list);list_append((yyval.classinfo_list),(yyvsp[(3) - (3)].classinfo));}
6332 /* Line 1464 of skeleton.m4 */
6333 #line 2840 "parser.y"
6334 {PASS12 (yyval.classinfo)=(yyvsp[(1) - (1)].classinfo);}
6343 /* Line 1464 of skeleton.m4 */
6344 #line 2841 "parser.y"
6345 {PASS12 (yyval.classinfo)=TYPE_ANY;}
6354 /* Line 1464 of skeleton.m4 */
6355 #line 2842 "parser.y"
6356 {PASS12 (yyval.classinfo)=TYPE_ANY;}
6365 /* Line 1464 of skeleton.m4 */
6366 #line 2851 "parser.y"
6367 {PASS12 (yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
6376 /* Line 1464 of skeleton.m4 */
6377 #line 2852 "parser.y"
6378 {PASS12 (yyval.classinfo)=0;}
6387 /* Line 1464 of skeleton.m4 */
6388 #line 2856 "parser.y"
6389 {(yyval.value_list).cc=0;(yyval.value_list).number=0;}
6398 /* Line 1464 of skeleton.m4 */
6399 #line 2857 "parser.y"
6400 {(yyval.value_list)=(yyvsp[(2) - (3)].value_list);}
6409 /* Line 1464 of skeleton.m4 */
6410 #line 2859 "parser.y"
6411 {(yyval.value_list).cc=0;(yyval.value_list).number=0;}
6420 /* Line 1464 of skeleton.m4 */
6421 #line 2863 "parser.y"
6422 {(yyval.value_list).number=1;
6423 (yyval.value_list).cc = (yyvsp[(1) - (1)].value).c;
6433 /* Line 1464 of skeleton.m4 */
6434 #line 2867 "parser.y"
6435 {(yyval.value_list) = (yyvsp[(1) - (2)].value_list);}
6444 /* Line 1464 of skeleton.m4 */
6445 #line 2868 "parser.y"
6447 (yyval.value_list).number= (yyvsp[(1) - (2)].value_list).number+1;
6448 (yyval.value_list).cc = code_append((yyvsp[(1) - (2)].value_list).cc, (yyvsp[(2) - (2)].value).c);
6458 /* Line 1464 of skeleton.m4 */
6459 #line 2874 "parser.y"
6461 typedcode_t v = node_read((yyvsp[(2) - (4)].node));
6462 (yyval.value).c = v.c;
6463 if((yyval.value).c->opcode == OPCODE_COERCE_A) (yyval.value).c = code_cutlast((yyval.value).c);
6465 code_t*paramcode = (yyvsp[(4) - (4)].value_list).cc;
6466 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6467 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6468 (yyval.value).c = code_cutlast((yyval.value).c);
6469 (yyval.value).c = code_append((yyval.value).c, paramcode);
6470 (yyval.value).c = abc_constructprop2((yyval.value).c, name, (yyvsp[(4) - (4)].value_list).number);
6471 multiname_destroy(name);
6472 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
6473 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6474 trait_t*t = traits_find_slotid(state->cls->abc->traits,slot);//FIXME
6475 multiname_t*name = t->name;
6476 (yyval.value).c = code_cutlast((yyval.value).c);
6477 (yyval.value).c = code_append((yyval.value).c, paramcode);
6478 (yyval.value).c = abc_constructprop2((yyval.value).c, name, (yyvsp[(4) - (4)].value_list).number);
6480 (yyval.value).c = code_append((yyval.value).c, paramcode);
6481 (yyval.value).c = abc_construct((yyval.value).c, (yyvsp[(4) - (4)].value_list).number);
6484 (yyval.value).t = TYPE_ANY;
6485 if(TYPE_IS_CLASS(v.t) && v.t->data) {
6486 (yyval.value).t = v.t->data;
6488 (yyval.value).c = abc_coerce_a((yyval.value).c);
6489 (yyval.value).t = TYPE_ANY;
6500 /* Line 1464 of skeleton.m4 */
6501 #line 2911 "parser.y"
6504 typedcode_t v = node_read((yyvsp[(1) - (4)].node));
6505 (yyval.value).c = v.c;
6506 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
6507 (yyval.value).c = code_cutlast((yyval.value).c);
6509 code_t*paramcode = (yyvsp[(3) - (4)].value_list).cc;
6511 (yyval.value).t = TYPE_ANY;
6512 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6513 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6514 (yyval.value).c = code_cutlast((yyval.value).c);
6515 (yyval.value).c = code_append((yyval.value).c, paramcode);
6516 (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).number);
6517 multiname_destroy(name);
6518 } else if((yyval.value).c->opcode == OPCODE_GETSLOT && (yyval.value).c->prev->opcode != OPCODE_GETSCOPEOBJECT) {
6519 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6520 trait_t*t = traits_find_slotid(state->cls->abc->traits,slot);
6521 if(t->kind!=TRAIT_METHOD) {
6522 //ok: flash allows to assign closures to members.
6524 multiname_t*name = t->name;
6525 (yyval.value).c = code_cutlast((yyval.value).c);
6526 (yyval.value).c = code_append((yyval.value).c, paramcode);
6527 //$$.c = abc_callmethod($$.c, t->method, len); //#1051 illegal early access binding
6528 (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).number);
6529 } else if((yyval.value).c->opcode == OPCODE_GETSUPER) {
6530 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6531 (yyval.value).c = code_cutlast((yyval.value).c);
6532 (yyval.value).c = code_append((yyval.value).c, paramcode);
6533 (yyval.value).c = abc_callsuper2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).number);
6534 multiname_destroy(name);
6536 (yyval.value).c = abc_getglobalscope((yyval.value).c);
6537 (yyval.value).c = code_append((yyval.value).c, paramcode);
6538 (yyval.value).c = abc_call((yyval.value).c, (yyvsp[(3) - (4)].value_list).number);
6541 if(TYPE_IS_FUNCTION(v.t) && v.t->data) {
6542 (yyval.value).t = ((methodinfo_t*)(v.t->data))->return_type;
6544 (yyval.value).c = abc_coerce_a((yyval.value).c);
6545 (yyval.value).t = TYPE_ANY;
6556 /* Line 1464 of skeleton.m4 */
6557 #line 2958 "parser.y"
6559 if(!state->cls) syntaxerror("super() not allowed outside of a class");
6560 if(!state->method) syntaxerror("super() not allowed outside of a function");
6561 if(!state->method->is_constructor) syntaxerror("super() not allowed outside of a constructor");
6563 (yyval.value).c = code_new();
6564 (yyval.value).c = abc_getlocal_0((yyval.value).c);
6566 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value_list).cc);
6568 this is dependent on the control path, check this somewhere else
6569 if(state->method->has_super)
6570 syntaxerror("constructor may call super() only once");
6572 state->method->has_super = 1;
6574 (yyval.value).c = abc_constructsuper((yyval.value).c, (yyvsp[(3) - (4)].value_list).number);
6575 (yyval.value).c = abc_pushundefined((yyval.value).c);
6576 (yyval.value).t = TYPE_ANY;
6586 /* Line 1464 of skeleton.m4 */
6587 #line 2979 "parser.y"
6589 typedcode_t v = node_read((yyvsp[(2) - (2)].node));
6590 (yyval.value).c = v.c;
6591 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
6592 (yyval.value).c = code_cutlast((yyval.value).c);
6594 multiname_t*name = 0;
6595 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6596 (yyval.value).c->opcode = OPCODE_DELETEPROPERTY;
6597 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
6598 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6599 multiname_t*name = traits_find_slotid(state->cls->abc->traits,slot)->name;
6600 (yyval.value).c = code_cutlast((yyval.value).c);
6601 (yyval.value).c = abc_deleteproperty2((yyval.value).c, name);
6603 (yyval.value).c = abc_getlocal_0((yyval.value).c);
6604 MULTINAME_LATE(m, v.t?v.t->access:ACCESS_PACKAGE, "");
6605 (yyval.value).c = abc_deleteproperty2((yyval.value).c, &m);
6607 (yyval.value).t = TYPE_BOOLEAN;
6617 /* Line 1464 of skeleton.m4 */
6618 #line 3001 "parser.y"
6620 (yyval.code) = abc_returnvoid(0);
6630 /* Line 1464 of skeleton.m4 */
6631 #line 3004 "parser.y"
6633 (yyval.code) = (yyvsp[(2) - (2)].value).c;
6634 (yyval.code) = abc_returnvalue((yyval.code));
6644 /* Line 1464 of skeleton.m4 */
6645 #line 3011 "parser.y"
6647 (yyval.value) = node_read((yyvsp[(1) - (1)].node));
6657 /* Line 1464 of skeleton.m4 */
6658 #line 3014 "parser.y"
6660 (yyval.value) = node_read((yyvsp[(1) - (1)].node));
6670 /* Line 1464 of skeleton.m4 */
6671 #line 3017 "parser.y"
6673 (yyval.node) = mkmultinode(&node_comma, (yyvsp[(1) - (1)].node));
6683 /* Line 1464 of skeleton.m4 */
6684 #line 3020 "parser.y"
6686 (yyval.node) = multinode_extend((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
6696 /* Line 1464 of skeleton.m4 */
6697 #line 3023 "parser.y"
6699 (yyval.code) = node_exec((yyvsp[(1) - (1)].node));
6709 /* Line 1464 of skeleton.m4 */
6710 #line 3026 "parser.y"
6712 (yyval.code) = (yyvsp[(1) - (3)].code);
6713 (yyval.code) = code_append((yyval.code), node_exec((yyvsp[(3) - (3)].node)));
6723 /* Line 1464 of skeleton.m4 */
6724 #line 3031 "parser.y"
6725 {(yyval.value_list).cc=0;(yyval.value_list).number=0;}
6734 /* Line 1464 of skeleton.m4 */
6735 #line 3032 "parser.y"
6736 {(yyval.value_list)=(yyvsp[(1) - (1)].value_list);}
6745 /* Line 1464 of skeleton.m4 */
6746 #line 3034 "parser.y"
6748 (yyval.value_list).cc = 0;
6749 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(1) - (3)].value).c);
6750 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (3)].value).c);
6751 (yyval.value_list).number = 2;
6761 /* Line 1464 of skeleton.m4 */
6762 #line 3040 "parser.y"
6764 (yyval.value_list).cc = (yyvsp[(1) - (5)].value_list).cc;
6765 (yyval.value_list).number = (yyvsp[(1) - (5)].value_list).number+2;
6766 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (5)].value).c);
6767 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(5) - (5)].value).c);
6777 /* Line 1464 of skeleton.m4 */
6778 #line 3049 "parser.y"
6779 {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
6788 /* Line 1464 of skeleton.m4 */
6789 #line 3050 "parser.y"
6790 {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
6799 /* Line 1464 of skeleton.m4 */
6800 #line 3051 "parser.y"
6801 {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
6810 /* Line 1464 of skeleton.m4 */
6811 #line 3052 "parser.y"
6812 {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
6821 /* Line 1464 of skeleton.m4 */
6822 #line 3053 "parser.y"
6823 {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
6832 /* Line 1464 of skeleton.m4 */
6833 #line 3054 "parser.y"
6834 {(yyval.node) = (yyvsp[(1) - (1)].node);}
6843 /* Line 1464 of skeleton.m4 */
6844 #line 3056 "parser.y"
6846 (yyval.node) = mkconstnode((yyvsp[(1) - (1)].constant));
6856 /* Line 1464 of skeleton.m4 */
6857 #line 3061 "parser.y"
6861 namespace_t ns = {ACCESS_PACKAGE, ""};
6862 multiname_t m = {QNAME, &ns, 0, "RegExp"};
6863 if(!(yyvsp[(1) - (1)].regexp).options) {
6864 v.c = abc_getlex2(v.c, &m);
6865 v.c = abc_pushstring(v.c, (yyvsp[(1) - (1)].regexp).pattern);
6866 v.c = abc_construct(v.c, 1);
6868 v.c = abc_getlex2(v.c, &m);
6869 v.c = abc_pushstring(v.c, (yyvsp[(1) - (1)].regexp).pattern);
6870 v.c = abc_pushstring(v.c, (yyvsp[(1) - (1)].regexp).options);
6871 v.c = abc_construct(v.c, 2);
6874 (yyval.node) = mkcodenode(v);
6884 /* Line 1464 of skeleton.m4 */
6885 #line 3081 "parser.y"
6889 v.c = code_append(v.c, (yyvsp[(2) - (3)].value_list).cc);
6890 v.c = abc_newarray(v.c, (yyvsp[(2) - (3)].value_list).number);
6891 v.t = registry_getarrayclass();
6892 (yyval.node) = mkcodenode(v);
6902 /* Line 1464 of skeleton.m4 */
6903 #line 3091 "parser.y"
6907 v.c = code_append(v.c, (yyvsp[(2) - (3)].value_list).cc);
6908 v.c = abc_newobject(v.c, (yyvsp[(2) - (3)].value_list).number/2);
6909 v.t = registry_getobjectclass();
6910 (yyval.node) = mkcodenode(v);
6920 /* Line 1464 of skeleton.m4 */
6921 #line 3100 "parser.y"
6922 {(yyval.node) = mknode2(&node_lt,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
6931 /* Line 1464 of skeleton.m4 */
6932 #line 3101 "parser.y"
6933 {(yyval.node) = mknode2(&node_gt,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
6942 /* Line 1464 of skeleton.m4 */
6943 #line 3102 "parser.y"
6944 {(yyval.node) = mknode2(&node_le,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
6953 /* Line 1464 of skeleton.m4 */
6954 #line 3103 "parser.y"
6955 {(yyval.node) = mknode2(&node_ge,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
6964 /* Line 1464 of skeleton.m4 */
6965 #line 3104 "parser.y"
6966 {(yyval.node) = mknode2(&node_eqeq,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
6975 /* Line 1464 of skeleton.m4 */
6976 #line 3105 "parser.y"
6977 {(yyval.node) = mknode2(&node_eqeqeq,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
6986 /* Line 1464 of skeleton.m4 */
6987 #line 3106 "parser.y"
6988 {(yyval.node) = mknode2(&node_noteqeq,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
6997 /* Line 1464 of skeleton.m4 */
6998 #line 3107 "parser.y"
6999 {(yyval.node) = mknode2(&node_noteq,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
7008 /* Line 1464 of skeleton.m4 */
7009 #line 3108 "parser.y"
7010 {(yyval.node) = mknode2(&node_oror,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
7019 /* Line 1464 of skeleton.m4 */
7020 #line 3109 "parser.y"
7021 {(yyval.node) = mknode2(&node_andand,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
7030 /* Line 1464 of skeleton.m4 */
7031 #line 3110 "parser.y"
7032 {(yyval.node) = mknode1(&node_not, (yyvsp[(2) - (2)].node));}
7041 /* Line 1464 of skeleton.m4 */
7042 #line 3111 "parser.y"
7043 {(yyval.node) = mknode1(&node_bitnot, (yyvsp[(2) - (2)].node));}
7052 /* Line 1464 of skeleton.m4 */
7053 #line 3112 "parser.y"
7054 {(yyval.node) = mknode2(&node_bitand, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7063 /* Line 1464 of skeleton.m4 */
7064 #line 3113 "parser.y"
7065 {(yyval.node) = mknode2(&node_bitxor, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7074 /* Line 1464 of skeleton.m4 */
7075 #line 3114 "parser.y"
7076 {(yyval.node) = mknode2(&node_bitor, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7085 /* Line 1464 of skeleton.m4 */
7086 #line 3115 "parser.y"
7087 {(yyval.node) = mknode2(&node_shr, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7096 /* Line 1464 of skeleton.m4 */
7097 #line 3116 "parser.y"
7098 {(yyval.node) = mknode2(&node_ushr, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7107 /* Line 1464 of skeleton.m4 */
7108 #line 3117 "parser.y"
7109 {(yyval.node) = mknode2(&node_shl, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7118 /* Line 1464 of skeleton.m4 */
7119 #line 3118 "parser.y"
7120 {(yyval.node) = mknode2(&node_div, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7129 /* Line 1464 of skeleton.m4 */
7130 #line 3119 "parser.y"
7131 {(yyval.node) = mknode2(&node_mod, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7140 /* Line 1464 of skeleton.m4 */
7141 #line 3120 "parser.y"
7142 {(yyval.node) = mknode2(&node_plus, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7151 /* Line 1464 of skeleton.m4 */
7152 #line 3121 "parser.y"
7153 {(yyval.node) = mknode2(&node_minus, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7162 /* Line 1464 of skeleton.m4 */
7163 #line 3122 "parser.y"
7164 {(yyval.node) = mknode2(&node_multiply, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7173 /* Line 1464 of skeleton.m4 */
7174 #line 3123 "parser.y"
7175 {(yyval.node) = mknode2(&node_in, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7184 /* Line 1464 of skeleton.m4 */
7185 #line 3124 "parser.y"
7186 {(yyval.node) = mknode2(&node_as, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7195 /* Line 1464 of skeleton.m4 */
7196 #line 3125 "parser.y"
7197 {(yyval.node) = mknode2(&node_instanceof, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7206 /* Line 1464 of skeleton.m4 */
7207 #line 3126 "parser.y"
7208 {(yyval.node) = mknode2(&node_is, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7217 /* Line 1464 of skeleton.m4 */
7218 #line 3127 "parser.y"
7219 {(yyval.node) = mknode1(&node_typeof, (yyvsp[(3) - (4)].node));}
7228 /* Line 1464 of skeleton.m4 */
7229 #line 3128 "parser.y"
7230 {(yyval.node) = mknode1(&node_void, (yyvsp[(2) - (2)].node));}
7239 /* Line 1464 of skeleton.m4 */
7240 #line 3129 "parser.y"
7241 { (yyval.node) = mkconstnode(constant_new_undefined());}
7250 /* Line 1464 of skeleton.m4 */
7251 #line 3130 "parser.y"
7252 { (yyval.node)=(yyvsp[(2) - (3)].node);}
7261 /* Line 1464 of skeleton.m4 */
7262 #line 3131 "parser.y"
7263 {(yyval.node) = mknode1(&node_neg, (yyvsp[(2) - (2)].node));}
7272 /* Line 1464 of skeleton.m4 */
7273 #line 3132 "parser.y"
7274 {(yyval.node) = mknode2(&node_arraylookup, (yyvsp[(1) - (4)].node),(yyvsp[(3) - (4)].node));}
7283 /* Line 1464 of skeleton.m4 */
7284 #line 3133 "parser.y"
7285 {(yyval.node) = mknode2(&node_muleq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7294 /* Line 1464 of skeleton.m4 */
7295 #line 3134 "parser.y"
7296 {(yyval.node) = mknode2(&node_modeq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7305 /* Line 1464 of skeleton.m4 */
7306 #line 3135 "parser.y"
7307 {(yyval.node) = mknode2(&node_shleq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7316 /* Line 1464 of skeleton.m4 */
7317 #line 3136 "parser.y"
7318 {(yyval.node) = mknode2(&node_shreq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7327 /* Line 1464 of skeleton.m4 */
7328 #line 3137 "parser.y"
7329 {(yyval.node) = mknode2(&node_ushreq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7338 /* Line 1464 of skeleton.m4 */
7339 #line 3138 "parser.y"
7340 { (yyval.node) = mknode2(&node_diveq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7349 /* Line 1464 of skeleton.m4 */
7350 #line 3139 "parser.y"
7351 { (yyval.node) = mknode2(&node_bitoreq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7360 /* Line 1464 of skeleton.m4 */
7361 #line 3140 "parser.y"
7362 { (yyval.node) = mknode2(&node_bitxoreq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7371 /* Line 1464 of skeleton.m4 */
7372 #line 3141 "parser.y"
7373 { (yyval.node) = mknode2(&node_bitandeq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7382 /* Line 1464 of skeleton.m4 */
7383 #line 3142 "parser.y"
7384 { (yyval.node) = mknode2(&node_pluseq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7393 /* Line 1464 of skeleton.m4 */
7394 #line 3143 "parser.y"
7395 { (yyval.node) = mknode2(&node_minuseq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7404 /* Line 1464 of skeleton.m4 */
7405 #line 3144 "parser.y"
7406 { (yyval.node) = mknode2(&node_assign, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7415 /* Line 1464 of skeleton.m4 */
7416 #line 3145 "parser.y"
7417 { (yyval.node) = mknode3(&node_tenary, (yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].node), (yyvsp[(5) - (5)].node));}
7426 /* Line 1464 of skeleton.m4 */
7427 #line 3147 "parser.y"
7428 { (yyval.node) = mknode1(&node_rplusplus, (yyvsp[(1) - (2)].node));}
7437 /* Line 1464 of skeleton.m4 */
7438 #line 3148 "parser.y"
7439 { (yyval.node) = mknode1(&node_rminusminus, (yyvsp[(1) - (2)].node));}
7448 /* Line 1464 of skeleton.m4 */
7449 #line 3149 "parser.y"
7450 {(yyval.node) = mknode1(&node_lplusplus, (yyvsp[(2) - (2)].node)); }
7459 /* Line 1464 of skeleton.m4 */
7460 #line 3150 "parser.y"
7461 {(yyval.node) = mknode1(&node_lminusminus, (yyvsp[(2) - (2)].node)); }
7470 /* Line 1464 of skeleton.m4 */
7471 #line 3153 "parser.y"
7472 { if(!state->cls->info)
7473 syntaxerror("super keyword not allowed outside a class");
7474 classinfo_t*t = state->cls->info->superclass;
7475 if(!t) t = TYPE_OBJECT;
7476 memberinfo_t*f = findmember_nsset(t, (yyvsp[(3) - (3)].id), 1);
7477 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
7480 v.c = abc_getlocal_0(v.c);
7481 v.c = abc_getsuper2(v.c, &m);
7482 v.t = slotinfo_gettype((slotinfo_t*)f);
7483 (yyval.node) = mkcodenode(v);
7493 /* Line 1464 of skeleton.m4 */
7494 #line 3167 "parser.y"
7497 (yyval.node) = mkdummynode();
7498 as3_warning("ignored @ operator");
7508 /* Line 1464 of skeleton.m4 */
7509 #line 3173 "parser.y"
7511 // child attribute TODO
7512 (yyval.node) = mkdummynode();
7513 as3_warning("ignored .@ operator");
7523 /* Line 1464 of skeleton.m4 */
7524 #line 3179 "parser.y"
7526 // namespace declaration TODO
7527 (yyval.node) = mkdummynode();
7528 as3_warning("ignored :: operator");
7538 /* Line 1464 of skeleton.m4 */
7539 #line 3185 "parser.y"
7542 (yyval.node) = mkdummynode();
7543 as3_warning("ignored .. operator");
7553 /* Line 1464 of skeleton.m4 */
7554 #line 3191 "parser.y"
7557 (yyval.node) = mkdummynode();
7558 as3_warning("ignored .() operator");
7568 /* Line 1464 of skeleton.m4 */
7569 #line 3204 "parser.y"
7571 typedcode_t v1 = node_read((yyvsp[(1) - (3)].node));
7572 (yyval.value).c = v1.c;
7573 classinfo_t*t = v1.t;
7575 if(TYPE_IS_CLASS(t) && t->data) {
7580 if(t->subtype==INFOTYPE_UNRESOLVED) {
7581 syntaxerror("syntaxerror: trying to resolve property '%s' on incomplete object '%s'", (yyvsp[(3) - (3)].id), t->name);
7583 memberinfo_t*f = findmember_nsset(t, (yyvsp[(3) - (3)].id), 1);
7585 if(f && !is_static != !(f->flags&FLAG_STATIC))
7587 if(f && f->slot && !noslot) {
7588 (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
7591 as3_warning("Access of undefined property '%s' in %s", (yyvsp[(3) - (3)].id), t->name);
7594 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
7595 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7597 /* determine type */
7598 (yyval.value).t = slotinfo_gettype((slotinfo_t*)f);
7599 if(!(yyval.value).t)
7600 (yyval.value).c = abc_coerce_a((yyval.value).c);
7601 } else if(v1.c && v1.c->opcode == OPCODE___PUSHPACKAGE__) {
7602 string_t*package = v1.c->data[0];
7603 char*package2 = concat3(package->str, ".", (yyvsp[(3) - (3)].id));
7605 slotinfo_t*a = registry_find(package->str, (yyvsp[(3) - (3)].id));
7607 (yyval.value) = push_class(a);
7608 } else if(dict_contains(state->import_toplevel_packages, package2) ||
7609 registry_ispackage(package2)) {
7610 (yyval.value).c = v1.c;
7611 (yyval.value).c->data[0] = string_new4(package2);
7612 (yyval.value).t = 0;
7614 syntaxerror("couldn't resolve %s", package2);
7617 /* when resolving a property on an unknown type, we do know the
7618 name of the property (and don't seem to need the package), but
7619 we need to make avm2 try out all access modes */
7620 as3_warning("Resolving %s on unknown type", (yyvsp[(3) - (3)].id));
7621 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(3) - (3)].id)};
7622 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7623 (yyval.value).c = abc_coerce_a((yyval.value).c);
7624 (yyval.value).t = TYPE_ANY;
7635 /* Line 1464 of skeleton.m4 */
7636 #line 3262 "parser.y"
7639 /* Queue unresolved identifiers for checking against the parent
7640 function's variables.
7641 We consider everything which is not a local variable "unresolved".
7642 This encompasses class names, members of the surrounding class
7643 etc. which is *correct* because local variables of the parent function
7646 if(state->method->inner && !find_variable(state, (yyvsp[(1) - (1)].id))) {
7647 unknown_variable((yyvsp[(1) - (1)].id));
7650 /* let the compiler know that it might want to check the current directory/package
7651 for this identifier- maybe there's a file $1.as defining $1. */
7652 as3_schedule_class_noerror(state->package, (yyvsp[(1) - (1)].id));
7664 /* look at variables */
7665 if((v = find_variable(state, (yyvsp[(1) - (1)].id)))) {
7666 // $1 is a local variable
7667 o.c = abc_getlocal(o.c, v->index);
7669 (yyval.node) = mkcodenode(o);
7672 if((v = find_slot(state, (yyvsp[(1) - (1)].id)))) {
7673 o.c = abc_getscopeobject(o.c, 1);
7674 o.c = abc_getslot(o.c, v->index);
7676 (yyval.node) = mkcodenode(o);
7680 int i_am_static = (state->method && state->method->info)?(state->method->info->flags&FLAG_STATIC):FLAG_STATIC;
7682 /* look at current class' members */
7683 if(!state->method->inner &&
7685 (f = findmember_nsset(state->cls->info, (yyvsp[(1) - (1)].id), 1)))
7687 // $1 is a member or attribute in this class
7688 int var_is_static = (f->flags&FLAG_STATIC);
7690 if(f->kind == INFOTYPE_VAR && (f->flags&FLAG_CONST)) {
7691 /* if the variable is a constant (and we know what is evaluates to), we
7692 can just use the value itself */
7693 varinfo_t*v = (varinfo_t*)f;
7695 (yyval.node) = mkconstnode(v->value);
7700 if(var_is_static >= i_am_static) {
7701 if(f->kind == INFOTYPE_METHOD) {
7702 o.t = TYPE_FUNCTION(f);
7707 if(var_is_static && !i_am_static) {
7708 /* access to a static member from a non-static location.
7709 do this via findpropstrict:
7710 there doesn't seem to be any non-lookup way to access
7711 static properties of a class */
7712 state->method->late_binding = 1;
7714 namespace_t ns = {f->access, f->package};
7715 multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
7716 o.c = abc_findpropstrict2(o.c, &m);
7717 o.c = abc_getproperty2(o.c, &m);
7718 (yyval.node) = mkcodenode(o);
7720 } else if(f->slot>0) {
7721 o.c = abc_getlocal_0(o.c);
7722 o.c = abc_getslot(o.c, f->slot);
7723 (yyval.node) = mkcodenode(o);
7726 namespace_t ns = {f->access, f->package};
7727 multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
7728 o.c = abc_getlocal_0(o.c);
7729 o.c = abc_getproperty2(o.c, &m);
7730 (yyval.node) = mkcodenode(o);
7736 /* look at actual classes, in the current package and imported */
7737 if((a = find_class((yyvsp[(1) - (1)].id)))) {
7739 (yyval.node) = mkcodenode(o);
7743 /* look through package prefixes */
7744 if(dict_contains(state->import_toplevel_packages, (yyvsp[(1) - (1)].id)) ||
7745 registry_ispackage((yyvsp[(1) - (1)].id))) {
7746 o.c = abc___pushpackage__(o.c, (yyvsp[(1) - (1)].id));
7748 (yyval.node) = mkcodenode(o); //?
7752 /* unknown object, let the avm2 resolve it */
7754 //as3_softwarning("Couldn't resolve '%s', doing late binding", $1);
7755 as3_warning("Couldn't resolve '%s', doing late binding", (yyvsp[(1) - (1)].id));
7756 state->method->late_binding = 1;
7758 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(1) - (1)].id)};
7761 o.c = abc_findpropstrict2(o.c, &m);
7762 o.c = abc_getproperty2(o.c, &m);
7763 (yyval.node) = mkcodenode(o);
7775 /* Line 1464 of skeleton.m4 */
7776 #line 3395 "parser.y"
7779 NEW(namespace_decl_t,n);
7780 n->name = (yyvsp[(2) - (2)].id);
7781 n->url = (yyvsp[(2) - (2)].id);
7782 (yyval.namespace_decl)=n;
7792 /* Line 1464 of skeleton.m4 */
7793 #line 3402 "parser.y"
7796 NEW(namespace_decl_t,n);
7797 n->name = (yyvsp[(2) - (4)].id);
7798 n->url = (yyvsp[(4) - (4)].id);
7799 (yyval.namespace_decl)=n;
7809 /* Line 1464 of skeleton.m4 */
7810 #line 3409 "parser.y"
7813 NEW(namespace_decl_t,n);
7814 n->name = (yyvsp[(2) - (4)].id);
7815 n->url = (yyvsp[(4) - (4)].str).str;
7816 (yyval.namespace_decl)=n;
7826 /* Line 1464 of skeleton.m4 */
7827 #line 3416 "parser.y"
7830 trie_put(active_namespaces, (yyvsp[(2) - (2)].namespace_decl)->name, (void*)(yyvsp[(2) - (2)].namespace_decl)->url);
7832 namespace_t access = modifiers2access(&(yyvsp[(1) - (2)].flags));
7833 varinfo_t* var = varinfo_register_global(access.access, state->package, (yyvsp[(2) - (2)].namespace_decl)->name);
7834 var->type = TYPE_NAMESPACE;
7836 ns.access = ACCESS_NAMESPACE;
7837 ns.name = (yyvsp[(2) - (2)].namespace_decl)->url;
7838 var->value = constant_new_namespace(&ns);
7850 /* Line 1464 of skeleton.m4 */
7851 #line 3440 "parser.y"
7854 const char*url = (yyvsp[(3) - (3)].classinfo)->name;
7856 varinfo_t*s = (varinfo_t*)(yyvsp[(3) - (3)].classinfo);
7857 if(s->kind == INFOTYPE_UNRESOLVED) {
7858 s = (varinfo_t*)registry_resolve((slotinfo_t*)s);
7860 syntaxerror("Couldn't resolve namespace %s", (yyvsp[(3) - (3)].classinfo)->name);
7863 if(!s || s->kind != INFOTYPE_VAR)
7864 syntaxerror("%s.%s is not a public namespace (%d)", (yyvsp[(3) - (3)].classinfo)->package, (yyvsp[(3) - (3)].classinfo)->name, s?s->kind:-1);
7865 if(!s->value || !NS_TYPE(s->value->type))
7866 syntaxerror("%s.%s is not a namespace", (yyvsp[(3) - (3)].classinfo)->package, (yyvsp[(3) - (3)].classinfo)->name);
7867 url = s->value->ns->name;
7869 trie_put(active_namespaces, (yyvsp[(3) - (3)].classinfo)->name, (void*)url);
7870 add_active_url(url);
7879 /* Line 1464 of skeleton.m4 */
7880 #line 7881 "parser.tab.c"
7883 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
7887 YY_STACK_PRINT (yyss, yyssp);
7891 /* Now `shift' the result of the reduction. Determine what state
7892 that goes to, based on the state we popped back to and the rule
7893 number reduced by. */
7897 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
7898 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
7899 yystate = yytable[yystate];
7901 yystate = yydefgoto[yyn - YYNTOKENS];
7906 /*------------------------------------.
7907 | yyerrlab -- here on detecting error |
7908 `------------------------------------*/
7910 /* If not already recovering from an error, report this error. */
7914 #if ! YYERROR_VERBOSE
7915 yyerror (YY_("syntax error"));
7918 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
7919 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
7921 YYSIZE_T yyalloc = 2 * yysize;
7922 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
7923 yyalloc = YYSTACK_ALLOC_MAXIMUM;
7924 if (yymsg != yymsgbuf)
7925 YYSTACK_FREE (yymsg);
7926 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
7928 yymsg_alloc = yyalloc;
7932 yymsg_alloc = sizeof yymsgbuf;
7936 if (0 < yysize && yysize <= yymsg_alloc)
7938 (void) yysyntax_error (yymsg, yystate, yychar);
7943 yyerror (YY_("syntax error"));
7945 goto yyexhaustedlab;
7953 if (yyerrstatus == 3)
7955 /* If just tried and failed to reuse lookahead token after an
7956 error, discard it. */
7958 if (yychar <= YYEOF)
7960 /* Return failure if at end of input. */
7961 if (yychar == YYEOF)
7966 yydestruct ("Error: discarding",
7972 /* Else will try to reuse lookahead token after shifting the error
7977 /*---------------------------------------------------.
7978 | yyerrorlab -- error raised explicitly by YYERROR. |
7979 `---------------------------------------------------*/
7982 /* Pacify compilers like GCC when the user code never invokes
7983 YYERROR and the label yyerrorlab therefore never appears in user
7985 if (/*CONSTCOND*/ 0)
7988 /* Do not reclaim the symbols of the rule which action triggered
7992 YY_STACK_PRINT (yyss, yyssp);
7997 /*-------------------------------------------------------------.
7998 | yyerrlab1 -- common code for both syntax error and YYERROR. |
7999 `-------------------------------------------------------------*/
8001 yyerrstatus = 3; /* Each real token shifted decrements this. */
8005 yyn = yypact[yystate];
8006 if (yyn != YYPACT_NINF)
8009 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
8017 /* Pop the current state because it cannot handle the error token. */
8022 yydestruct ("Error: popping",
8023 yystos[yystate], yyvsp);
8026 YY_STACK_PRINT (yyss, yyssp);
8032 /* Shift the error token. */
8033 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
8039 /*-------------------------------------.
8040 | yyacceptlab -- YYACCEPT comes here. |
8041 `-------------------------------------*/
8046 /*-----------------------------------.
8047 | yyabortlab -- YYABORT comes here. |
8048 `-----------------------------------*/
8053 #if !defined(yyoverflow) || YYERROR_VERBOSE
8054 /*-------------------------------------------------.
8055 | yyexhaustedlab -- memory exhaustion comes here. |
8056 `-------------------------------------------------*/
8058 yyerror (YY_("memory exhausted"));
8064 if (yychar != YYEMPTY)
8065 yydestruct ("Cleanup: discarding lookahead",
8067 /* Do not reclaim the symbols of the rule which action triggered
8068 this YYABORT or YYACCEPT. */
8070 YY_STACK_PRINT (yyss, yyssp);
8071 while (yyssp != yyss)
8073 yydestruct ("Cleanup: popping",
8074 yystos[*yyssp], yyvsp);
8079 YYSTACK_FREE (yyss);
8082 if (yymsg != yymsgbuf)
8083 YYSTACK_FREE (yymsg);
8085 /* Make sure YYID is used. */
8086 return YYID (yyresult);