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"
100 /* Line 198 of skeleton.m4 */
101 #line 102 "parser.tab.c"
103 /* Enabling traces. */
108 /* Enabling verbose error messages. */
109 #ifdef YYERROR_VERBOSE
110 # undef YYERROR_VERBOSE
111 # define YYERROR_VERBOSE 1
113 # define YYERROR_VERBOSE 1
116 /* Enabling the token table. */
117 #ifndef YYTOKEN_TABLE
118 # define YYTOKEN_TABLE 0
125 /* Put the tokens into the symbol table, so that GDB and other debuggers
223 below_semicolon = 353,
224 below_assignment = 354,
226 minusminus_prefix = 356,
227 plusplus_prefix = 357,
230 above_identifier = 360,
238 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
240 /* Line 223 of skeleton.m4 */
245 /* Line 223 of skeleton.m4 */
248 enum yytokentype token;
250 classinfo_t*classinfo;
251 classinfo_list_t*classinfo_list;
253 slotinfo_list_t*slotinfo_list;
256 unsigned int number_uint;
260 //typedcode_list_t*value_list;
261 codeandnumber_t value_list;
267 for_start_t for_start;
268 abc_exception_t *exception;
271 namespace_decl_t* namespace_decl;
274 abc_exception_list_t *l;
280 /* Line 223 of skeleton.m4 */
281 #line 282 "parser.tab.c"
283 # define YYSTYPE_IS_TRIVIAL 1
284 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
285 # define YYSTYPE_IS_DECLARED 1
289 /* Copy the second part of user declarations. */
291 /* Line 273 of skeleton.m4 */
295 static int a3_error(char*s)
297 syntaxerror("%s", s);
298 return 0; //make gcc happy
301 static void parsererror(const char*file, int line, const char*f)
303 syntaxerror("internal error in %s, %s:%d", f, file, line);
306 #define parserassert(b) {if(!(b)) parsererror(__FILE__, __LINE__,__func__);}
309 static char* concat2(const char* t1, const char* t2)
313 char*text = malloc(l1+l2+1);
314 memcpy(text , t1, l1);
315 memcpy(text+l1, t2, l2);
319 static char* concat3(const char* t1, const char* t2, const char* t3)
324 char*text = malloc(l1+l2+l3+1);
325 memcpy(text , t1, l1);
326 memcpy(text+l1, t2, l2);
327 memcpy(text+l1+l2, t3, l3);
332 typedef struct _import {
335 DECLARE_LIST(import);
337 DECLARE(methodstate);
338 DECLARE_LIST(methodstate);
340 typedef struct _classstate {
346 methodstate_t*static_init;
348 //code_t*static_init;
350 char has_constructor;
353 struct _methodstate {
363 dict_t*unresolved_variables;
366 char uses_parent_function;
372 int var_index; // for inner methods
373 int slot_index; // for inner methods
374 char is_a_slot; // for inner methods
379 abc_exception_list_t*exceptions;
381 methodstate_list_t*innerfunctions;
384 typedef struct _state {
389 import_list_t*wildcard_imports;
390 dict_t*import_toplevel_packages;
393 namespace_list_t*active_namespace_urls;
395 char has_own_imports;
396 char new_vars; // e.g. transition between two functions
399 methodstate_t*method;
406 dict_t*allvars; // also contains variables from sublevels
409 typedef struct _global {
412 parsedclass_list_t*classes;
413 abc_script_t*classinit;
415 abc_script_t*init; //package-level code
418 dict_t*file2token2info;
421 static global_t*global = 0;
422 static state_t* state = 0;
426 #define MEMBER_MULTINAME(m,f,n) \
430 if((m##_ns.access = ((slotinfo_t*)(f))->access)==ACCESS_NAMESPACE) \
431 m##_ns.name = ((slotinfo_t*)(f))->package; \
436 m.namespace_set = 0; \
437 m.name = ((slotinfo_t*)(f))->name; \
439 m.type = MULTINAME; \
441 m.namespace_set = &nopackage_namespace_set; \
445 /* warning: list length of namespace set is undefined */
446 #define MULTINAME_LATE(m, access, package) \
447 namespace_t m##_ns = {access, package}; \
448 namespace_set_t m##_nsset; \
449 namespace_list_t m##_l;m##_l.next = 0; \
450 m##_nsset.namespaces = &m##_l; \
451 m##_nsset = m##_nsset; \
452 m##_l.namespace = &m##_ns; \
453 multiname_t m = {MULTINAMEL, 0, &m##_nsset, 0};
455 static namespace_t ns1 = {ACCESS_PRIVATE, ""};
456 static namespace_t ns2 = {ACCESS_PROTECTED, ""};
457 static namespace_t ns3 = {ACCESS_PACKAGEINTERNAL, ""};
458 static namespace_t ns4 = {ACCESS_PACKAGE, ""};
459 static namespace_list_t nl4 = {&ns4,0};
460 static namespace_list_t nl3 = {&ns3,&nl4};
461 static namespace_list_t nl2 = {&ns2,&nl3};
462 static namespace_list_t nl1 = {&ns1,&nl2};
463 static namespace_set_t nopackage_namespace_set = {&nl1};
465 static dict_t*definitions=0;
466 void as3_set_define(const char*c)
469 definitions = dict_new();
470 if(!dict_contains(definitions,c))
471 dict_put(definitions,c,0);
474 static void new_state()
477 state_t*oldstate = state;
479 memcpy(s, state, sizeof(state_t)); //shallow copy
481 s->imports = dict_new();
483 if(!s->import_toplevel_packages) {
484 s->import_toplevel_packages = dict_new();
488 state->has_own_imports = 0;
489 state->vars = dict_new();
490 state->old = oldstate;
493 trie_remember(active_namespaces);
496 state->active_namespace_urls = list_clone(oldstate->active_namespace_urls);
499 static void state_destroy(state_t*state)
501 if(state->has_own_imports) {
502 list_free(state->wildcard_imports);
503 dict_destroy(state->imports);state->imports=0;
505 if(state->imports && (!state->old || state->old->imports!=state->imports)) {
506 dict_destroy(state->imports);state->imports=0;
509 dict_destroy(state->vars);state->vars=0;
511 if(state->new_vars && state->allvars) {
512 parserassert(!state->old || state->old->allvars != state->allvars);
513 DICT_ITERATE_DATA(state->allvars, void*, data) {
516 dict_destroy(state->allvars);
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);
563 state->allvars = dict_new();
565 global->token2info = dict_lookup(global->file2token2info,
566 current_filename // use long version
568 if(!global->token2info) {
569 global->token2info = dict_new2(&ptr_type);
570 dict_put(global->file2token2info, current_filename, global->token2info);
574 state->method = rfx_calloc(sizeof(methodstate_t));
575 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
576 state->method->late_binding = 1; // init scripts use getglobalscope, so we need a getlocal0/pushscope
578 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
580 syntaxerror("internal error: skewed tokencount");
581 function_initvars(state->method, 0, 0, 1);
582 global->classinit = abc_initscript(global->file);
583 global->init = abc_initscript(global->file);
589 if(!state || state->level!=1) {
590 syntaxerror("unexpected end of file in pass %d", as3_pass);
594 dict_del(global->file2token2info, current_filename);
596 code_t*header = method_header(state->method);
597 code_t*c = wrap_function(header, 0, global->init->method->body->code);
598 global->init->method->body->code = c;
599 free(state->method);state->method=0;
602 //free(state->package);state->package=0; // used in registry
603 state_destroy(state);state=0;
606 void initialize_parser()
608 global = rfx_calloc(sizeof(global_t));
609 global->file = abc_file_new();
610 global->file->flags &= ~ABCFILE_LAZY;
611 global->file2token2info = dict_new();
612 global->token2info = 0;
615 void* finish_parser()
617 dict_free_all(global->file2token2info, 1, (void*)dict_destroy);
618 global->token2info=0;
620 initcode_add_classlist(global->classinit, global->classes);
625 typedef struct _variable {
630 methodstate_t*is_inner_method;
633 static variable_t* find_variable(state_t*s, char*name)
638 v = dict_lookup(s->vars, name);
640 if(s->new_vars) break;
643 return dict_lookup(top->allvars, name);
645 static variable_t* find_slot(state_t*s, const char*name)
647 if(s->method && s->method->slots)
648 return dict_lookup(s->method->slots, name);
652 static variable_t* find_variable_safe(state_t*s, char*name)
654 variable_t* v = find_variable(s, name);
656 syntaxerror("undefined variable: %s", name);
660 static char variable_exists(char*name)
662 return dict_contains(state->vars, name);
665 static code_t*defaultvalue(code_t*c, classinfo_t*type)
667 if(TYPE_IS_INT(type)) {
668 c = abc_pushbyte(c, 0);
669 } else if(TYPE_IS_UINT(type)) {
670 c = abc_pushuint(c, 0);
671 } else if(TYPE_IS_FLOAT(type)) {
673 } else if(TYPE_IS_BOOLEAN(type)) {
674 c = abc_pushfalse(c);
676 //c = abc_pushundefined(c);
677 syntaxerror("internal error: can't generate default value for * type");
681 c = abc_coerce2(c, &m);
686 static int alloc_local()
688 return state->method->variable_count++;
691 static variable_t* new_variable2(const char*name, classinfo_t*type, char init, char maybeslot)
694 variable_t*v = find_slot(state, name);
700 v->index = alloc_local();
705 dict_put(state->vars, name, v);
706 dict_put(state->allvars, name, v);
711 static int new_variable(const char*name, classinfo_t*type, char init, char maybeslot)
713 return new_variable2(name, type, init, maybeslot)->index;
716 #define TEMPVARNAME "__as3_temp__"
719 variable_t*v = find_variable(state, TEMPVARNAME);
724 i = new_variable(TEMPVARNAME, 0, 0, 0);
729 static code_t* var_block(code_t*body)
735 for(t=0;t<state->vars->hashsize;t++) {
736 dictentry_t*e = state->vars->slots[t];
738 variable_t*v = (variable_t*)e->data;
739 if(v->type && v->init) {
740 c = defaultvalue(c, v->type);
741 c = abc_setlocal(c, v->index);
742 k = abc_kill(k, v->index);
752 if(x->opcode== OPCODE___BREAK__ ||
753 x->opcode== OPCODE___CONTINUE__) {
754 /* link kill code before break/continue */
755 code_t*e = code_dup(k);
756 code_t*s = code_start(e);
768 c = code_append(c, body);
769 c = code_append(c, k);
773 static void unknown_variable(char*name)
775 if(!state->method->unresolved_variables)
776 state->method->unresolved_variables = dict_new();
777 if(!dict_contains(state->method->unresolved_variables, name))
778 dict_put(state->method->unresolved_variables, name, 0);
781 static code_t* add_scope_code(code_t*c, methodstate_t*m, char init)
783 if(m->uses_slots || (m->late_binding && !m->inner)) { //???? especially inner functions need the pushscope
784 c = abc_getlocal_0(c);
785 c = abc_pushscope(c);
788 /* FIXME: this alloc_local() causes variable indexes to be
789 different in pass2 than in pass1 */
790 if(!m->activation_var)
791 m->activation_var = alloc_local();
793 c = abc_newactivation(c);
795 c = abc_pushscope(c);
796 c = abc_setlocal(c, m->activation_var);
798 c = abc_getlocal(c, m->activation_var);
799 c = abc_pushscope(c);
805 static code_t* method_header(methodstate_t*m)
809 c = add_scope_code(c, m, 1);
811 methodstate_list_t*l = m->innerfunctions;
813 parserassert(l->methodstate->abc);
814 if(m->uses_slots && l->methodstate->is_a_slot) {
815 c = abc_getscopeobject(c, 1);
816 c = abc_newfunction(c, l->methodstate->abc);
818 c = abc_setlocal(c, l->methodstate->var_index);
819 c = abc_setslot(c, l->methodstate->slot_index);
821 c = abc_newfunction(c, l->methodstate->abc);
822 c = abc_setlocal(c, l->methodstate->var_index);
824 free(l->methodstate);l->methodstate=0;
828 c = code_append(c, m->header);
831 if(m->is_constructor && !m->has_super) {
832 // call default constructor
833 c = abc_getlocal_0(c);
834 c = abc_constructsuper(c, 0);
838 /* all parameters that are used by inner functions
839 need to be copied from local to slot */
840 parserassert(m->activation_var);
841 DICT_ITERATE_ITEMS(m->slots,char*,name,variable_t*,v) {
842 if(v->is_parameter) {
843 c = abc_getlocal(c, m->activation_var);
844 c = abc_getlocal(c, v->index);
845 c = abc_setslot(c, v->index);
849 list_free(m->innerfunctions);
850 m->innerfunctions = 0;
855 static code_t* wrap_function(code_t*c,code_t*header, code_t*body)
857 c = code_append(c, header);
858 c = code_append(c, var_block(body));
859 /* append return if necessary */
860 if(!c || (c->opcode != OPCODE_RETURNVOID &&
861 c->opcode != OPCODE_RETURNVALUE)) {
862 c = abc_returnvoid(c);
867 static void startpackage(char*name)
870 state->package = strdup(name);
872 static void endpackage()
874 //used e.g. in classinfo_register:
875 //free(state->package);state->package=0;
879 #define FLAG_PUBLIC 256
880 #define FLAG_PROTECTED 512
881 #define FLAG_PRIVATE 1024
882 #define FLAG_PACKAGEINTERNAL 2048
883 #define FLAG_NAMESPACE 4096
885 static namespace_t modifiers2access(modifiers_t*mod)
890 if(mod->flags&FLAG_NAMESPACE) {
891 if(mod->flags&(FLAG_PRIVATE|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
892 syntaxerror("invalid combination of access levels and namespaces");
893 ns.access = ACCESS_NAMESPACE;
895 const char*url = (const char*)trie_lookup(active_namespaces, mod->ns);
897 /* shouldn't happen- the tokenizer only reports something as a namespace
898 if it was already registered */
899 trie_dump(active_namespaces);
900 syntaxerror("unknown namespace: %s", mod->ns);
903 } else if(mod->flags&FLAG_PUBLIC) {
904 if(mod->flags&(FLAG_PRIVATE|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
905 syntaxerror("invalid combination of access levels");
906 ns.access = ACCESS_PACKAGE;
907 } else if(mod->flags&FLAG_PRIVATE) {
908 if(mod->flags&(FLAG_PUBLIC|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
909 syntaxerror("invalid combination of access levels");
910 ns.access = ACCESS_PRIVATE;
911 } else if(mod->flags&FLAG_PROTECTED) {
912 if(mod->flags&(FLAG_PUBLIC|FLAG_PRIVATE|FLAG_PACKAGEINTERNAL))
913 syntaxerror("invalid combination of access levels");
914 ns.access = ACCESS_PROTECTED;
916 ns.access = ACCESS_PACKAGEINTERNAL;
920 static slotinfo_t* find_class(const char*name);
922 static memberinfo_t* findmember_nsset(classinfo_t*cls, const char*name, char recurse)
924 return registry_findmember_nsset(cls, state->active_namespace_urls, name, recurse);
927 static void function_initvars(methodstate_t*m, params_t*params, int flags, char var0)
932 index = new_variable("this", 0, 0, 0);
933 else if(!m->is_global)
934 index = new_variable((flags&FLAG_STATIC)?"class":"this", state->cls?state->cls->info:0, 0, 0);
936 index = new_variable("globalscope", 0, 0, 0);
937 parserassert(!index);
941 /* as variables and slots share the same number, make sure
942 that those variable indices are reserved. It's up to the
943 optimizer to later shuffle the variables down to lower
945 m->variable_count = m->uses_slots;
950 for(p=params->list;p;p=p->next) {
951 variable_t*v = new_variable2(p->param->name, p->param->type, 0, 1);
956 methodstate_list_t*l = m->innerfunctions;
958 methodstate_t*m = l->methodstate;
960 variable_t* v = new_variable2(m->info->name, TYPE_FUNCTION(m->info), 0, 1);
961 m->var_index = v->index;
962 m->slot_index = v->index;
963 v->is_inner_method = m;
969 m->scope_code = add_scope_code(m->scope_code, m, 0);
972 if(as3_pass==2 && m->slots) {
973 /* exchange unresolved identifiers with the actual objects */
974 DICT_ITERATE_ITEMS(m->slots, char*, name, variable_t*, v) {
975 if(v->type && v->type->kind == INFOTYPE_UNRESOLVED) {
976 classinfo_t*type = (classinfo_t*)registry_resolve((slotinfo_t*)v->type);
977 if(!type || type->kind != INFOTYPE_CLASS) {
978 syntaxerror("Couldn't find class %s::%s (%s)", v->type->package, v->type->name, name);
987 char*as3_globalclass=0;
988 static void startclass(modifiers_t* mod, char*classname, classinfo_t*extends, classinfo_list_t*implements)
991 syntaxerror("inner classes now allowed");
996 classinfo_list_t*mlist=0;
998 if(mod->flags&~(FLAG_PACKAGEINTERNAL|FLAG_PUBLIC|FLAG_FINAL|FLAG_DYNAMIC|FLAG_INTERFACE))
999 syntaxerror("invalid modifier(s)");
1001 if((mod->flags&(FLAG_PUBLIC|FLAG_PACKAGEINTERNAL)) == (FLAG_PUBLIC|FLAG_PACKAGEINTERNAL))
1002 syntaxerror("public and internal not supported at the same time.");
1004 //if(!(mod->flags&FLAG_INTERFACE) && !extends) {
1005 if(!(mod->flags&FLAG_INTERFACE) && !extends) {
1006 // all classes extend object
1007 extends = registry_getobjectclass();
1010 /* create the class name, together with the proper attributes */
1014 if(!(mod->flags&FLAG_PUBLIC) && state->package==internal_filename_package) {
1015 access = ACCESS_PRIVATE; package = internal_filename_package;
1016 } else if(!(mod->flags&FLAG_PUBLIC) && state->package!=internal_filename_package) {
1017 access = ACCESS_PACKAGEINTERNAL; package = state->package;
1018 } else if(state->package!=internal_filename_package) {
1019 access = ACCESS_PACKAGE; package = state->package;
1021 syntaxerror("public classes only allowed inside a package");
1025 state->cls = rfx_calloc(sizeof(classstate_t));
1026 state->cls->init = rfx_calloc(sizeof(methodstate_t));
1027 state->cls->static_init = rfx_calloc(sizeof(methodstate_t));
1028 state->cls->static_init->variable_count=1;
1029 /* notice: we make no effort to initialize the top variable (local0) here,
1030 even though it has special meaning. We just rely on the facat
1031 that pass 1 won't do anything with variables */
1033 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->cls);
1035 /* set current method to constructor- all code within the class-level (except
1036 static variable initializations) will be executed during construction time */
1037 state->method = state->cls->init;
1039 if(registry_find(package, classname)) {
1040 syntaxerror("Package \"%s\" already contains a class called \"%s\"", package, classname);
1042 /* build info struct */
1043 int num_interfaces = (list_length(implements));
1044 state->cls->info = classinfo_register(access, package, classname, num_interfaces);
1045 state->cls->info->flags |= mod->flags & (FLAG_DYNAMIC|FLAG_INTERFACE|FLAG_FINAL);
1046 state->cls->info->superclass = extends;
1049 classinfo_list_t*l = implements;
1050 for(l=implements;l;l=l->next) {
1051 state->cls->info->interfaces[pos++] = l->classinfo;
1056 state->cls = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1058 state->method = state->cls->init;
1059 parserassert(state->cls && state->cls->info);
1061 function_initvars(state->cls->init, 0, 0, 1);
1062 function_initvars(state->cls->static_init, 0, 0, 0);
1064 if(extends && (extends->flags & FLAG_FINAL))
1065 syntaxerror("Can't extend final class '%s'", extends->name);
1068 while(state->cls->info->interfaces[pos]) {
1069 if(!(state->cls->info->interfaces[pos]->flags & FLAG_INTERFACE))
1070 syntaxerror("'%s' is not an interface",
1071 state->cls->info->interfaces[pos]->name);
1075 /* generate the abc code for this class */
1076 MULTINAME(classname2,state->cls->info);
1077 multiname_t*extends2 = sig2mname(extends);
1078 state->cls->abc = abc_class_new(global->file, &classname2, extends2);
1079 multiname_destroy(extends2);
1081 if(state->cls->info->flags&FLAG_FINAL) abc_class_final(state->cls->abc);
1082 if(!(state->cls->info->flags&FLAG_DYNAMIC)) abc_class_sealed(state->cls->abc);
1083 if(state->cls->info->flags&FLAG_INTERFACE) {
1084 abc_class_interface(state->cls->abc);
1087 abc_class_protectedNS(state->cls->abc, classname);
1089 for(mlist=implements;mlist;mlist=mlist->next) {
1090 MULTINAME(m, mlist->classinfo);
1091 abc_class_add_interface(state->cls->abc, &m);
1094 NEW(parsedclass_t,p);
1095 p->cls = state->cls->info;
1096 p->abc = state->cls->abc;
1097 list_append(global->classes, p);
1099 /* flash.display.MovieClip handling */
1100 if(!as3_globalclass && (mod->flags&FLAG_PUBLIC) && slotinfo_equals((slotinfo_t*)registry_getMovieClip(),(slotinfo_t*)extends)) {
1101 if(state->package && state->package[0]) {
1102 as3_globalclass = concat3(state->package, ".", classname);
1104 as3_globalclass = strdup(classname);
1110 static void endclass()
1113 if(!state->cls->has_constructor && !(state->cls->info->flags&FLAG_INTERFACE)) {
1115 c = abc_getlocal_0(c);
1116 c = abc_constructsuper(c, 0);
1117 state->cls->init->header = code_append(state->cls->init->header, c);
1118 state->cls->has_constructor=1;
1120 if(state->cls->init) {
1121 if(state->cls->info->flags&FLAG_INTERFACE) {
1122 if(state->cls->init->header)
1123 syntaxerror("interface can not have class-level code");
1125 abc_method_t*m = abc_class_getconstructor(state->cls->abc, 0);
1126 code_t*c = method_header(state->cls->init);
1127 m->body->code = wrap_function(c, 0, m->body->code);
1130 if(state->cls->static_init) {
1131 abc_method_t*m = abc_class_getstaticconstructor(state->cls->abc, 0);
1132 code_t*c = method_header(state->cls->static_init);
1133 m->body->code = wrap_function(c, 0, m->body->code);
1140 void check_code_for_break(code_t*c)
1143 if(c->opcode == OPCODE___BREAK__) {
1144 char*name = string_cstr(c->data[0]);
1145 syntaxerror("Unresolved \"break %s\"", name);
1147 if(c->opcode == OPCODE___CONTINUE__) {
1148 char*name = string_cstr(c->data[0]);
1149 syntaxerror("Unresolved \"continue %s\"", name);
1151 if(c->opcode == OPCODE___RETHROW__) {
1152 syntaxerror("Unresolved \"rethrow\"");
1154 if(c->opcode == OPCODE___FALLTHROUGH__) {
1155 syntaxerror("Unresolved \"fallthrough\"");
1157 if(c->opcode == OPCODE___PUSHPACKAGE__) {
1158 char*name = string_cstr(c->data[0]);
1159 syntaxerror("Can't reference a package (%s) as such", name);
1165 static void check_constant_against_type(classinfo_t*t, constant_t*c)
1167 #define xassert(b) if(!(b)) syntaxerror("Invalid default value %s for type '%s'", constant_tostring(c), t->name)
1168 if(TYPE_IS_NUMBER(t)) {
1169 xassert(c->type == CONSTANT_FLOAT
1170 || c->type == CONSTANT_INT
1171 || c->type == CONSTANT_UINT);
1172 } else if(TYPE_IS_UINT(t)) {
1173 xassert(c->type == CONSTANT_UINT ||
1174 (c->type == CONSTANT_INT && c->i>=0));
1175 } else if(TYPE_IS_INT(t)) {
1176 xassert(c->type == CONSTANT_INT);
1177 } else if(TYPE_IS_BOOLEAN(t)) {
1178 xassert(c->type == CONSTANT_TRUE
1179 || c->type == CONSTANT_FALSE);
1183 static void check_override(memberinfo_t*m, int flags)
1187 if(m->parent == state->cls->info)
1188 syntaxerror("class '%s' already contains a method/slot '%s'", m->parent->name, m->name);
1190 syntaxerror("internal error: overriding method %s, which doesn't have parent", m->name);
1191 if(m->access==ACCESS_PRIVATE)
1193 if(m->flags & FLAG_FINAL)
1194 syntaxerror("can't override final member %s", m->name);
1196 /* allow this. it's no issue.
1197 if((m->flags & FLAG_STATIC) && !(flags&FLAG_STATIC))
1198 syntaxerror("can't override static member %s", m->name);*/
1200 if(!(m->flags & FLAG_STATIC) && (flags&FLAG_STATIC))
1201 syntaxerror("can't override non-static member %s with static declaration", m->name);
1203 if(!(flags&FLAG_OVERRIDE) && !(flags&FLAG_STATIC) && !(m->flags&FLAG_STATIC)) {
1204 if(m->parent && !(m->parent->flags&FLAG_INTERFACE)) {
1205 if(m->kind == INFOTYPE_METHOD)
1206 syntaxerror("can't override without explicit 'override' declaration");
1208 syntaxerror("can't override '%s'", m->name);
1213 static methodinfo_t*registerfunction(enum yytokentype getset, modifiers_t*mod, char*name, params_t*params, classinfo_t*return_type, int slot)
1215 methodinfo_t*minfo = 0;
1216 namespace_t ns = modifiers2access(mod);
1219 minfo = methodinfo_register_global(ns.access, state->package, name);
1220 minfo->return_type = return_type;
1221 } else if(getset != KW_GET && getset != KW_SET) {
1223 memberinfo_t* m = registry_findmember(state->cls->info, ns.name, name, 0);
1225 syntaxerror("class already contains a %s '%s'", infotypename((slotinfo_t*)m), m->name);
1227 minfo = methodinfo_register_onclass(state->cls->info, ns.access, ns.name, name);
1228 minfo->return_type = return_type;
1229 // getslot on a member slot only returns "undefined", so no need
1230 // to actually store these
1231 //state->minfo->slot = state->method->abc->method->trait->slot_id;
1233 //class getter/setter
1234 int gs = getset==KW_GET?SUBTYPE_GET:SUBTYPE_SET;
1236 if(getset == KW_GET) {
1238 } else if(params->list && params->list->param && !params->list->next) {
1239 type = params->list->param->type;
1241 syntaxerror("setter function needs to take exactly one argument");
1242 // not sure wether to look into superclasses here, too
1243 minfo = (methodinfo_t*)registry_findmember(state->cls->info, ns.name, name, 1);
1245 if(minfo->kind!=INFOTYPE_VAR)
1246 syntaxerror("class already contains a method called '%s'", name);
1247 if(!(minfo->subtype & (SUBTYPE_GETSET)))
1248 syntaxerror("class already contains a field called '%s'", name);
1249 if(minfo->subtype & gs)
1250 syntaxerror("getter/setter for '%s' already defined", name);
1251 /* make a setter or getter into a getset */
1252 minfo->subtype |= gs;
1255 FIXME: this check needs to be done in pass 2
1257 if((!minfo->return_type != !type) ||
1258 (minfo->return_type && type &&
1259 !strcmp(minfo->return_type->name, type->name))) {
1260 syntaxerror("different type in getter and setter: %s and %s",
1261 minfo->return_type?minfo->return_type->name:"*",
1262 type?type->name:"*");
1265 minfo = methodinfo_register_onclass(state->cls->info, ns.access, ns.name, name);
1266 minfo->kind = INFOTYPE_VAR; //hack
1267 minfo->subtype = gs;
1268 minfo->return_type = return_type;
1271 /* can't assign a slot as getter and setter might have different slots */
1272 //minfo->slot = slot;
1274 if(mod->flags&FLAG_FINAL) minfo->flags |= FLAG_FINAL;
1275 if(mod->flags&FLAG_STATIC) minfo->flags |= FLAG_STATIC;
1276 if(mod->flags&FLAG_OVERRIDE) minfo->flags |= FLAG_OVERRIDE;
1281 static void innerfunction(char*name, params_t*params, classinfo_t*return_type)
1283 //parserassert(state->method && state->method->info);
1285 methodstate_t*parent_method = state->method;
1288 return_type = 0; // not valid in pass 1
1292 state->new_vars = 1;
1293 state->allvars = dict_new();
1296 state->method = rfx_calloc(sizeof(methodstate_t));
1297 state->method->inner = 1;
1298 state->method->variable_count = 0;
1299 state->method->abc = rfx_calloc(sizeof(abc_method_t));
1301 NEW(methodinfo_t,minfo);
1302 minfo->kind = INFOTYPE_METHOD;
1303 minfo->access = ACCESS_PACKAGEINTERNAL;
1305 state->method->info = minfo;
1308 list_append(parent_method->innerfunctions, state->method);
1310 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
1312 function_initvars(state->method, params, 0, 1);
1316 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1317 state->method->variable_count = 0;
1318 parserassert(state->method);
1320 state->method->info->return_type = return_type;
1321 function_initvars(state->method, params, 0, 1);
1325 static void startfunction(modifiers_t*mod, enum yytokentype getset, char*name,
1326 params_t*params, classinfo_t*return_type)
1328 if(state->method && state->method->info) {
1329 syntaxerror("not able to start another method scope");
1332 state->new_vars = 1;
1333 state->allvars = dict_new();
1336 state->method = rfx_calloc(sizeof(methodstate_t));
1337 state->method->has_super = 0;
1340 state->method->is_constructor = !strcmp(state->cls->info->name,name);
1342 state->method->is_global = 1;
1343 state->method->late_binding = 1; // for global methods, always push local_0 on the scope stack
1345 if(state->method->is_constructor)
1346 name = "__as3_constructor__";
1348 state->method->info = registerfunction(getset, mod, name, params, return_type, 0);
1350 function_initvars(state->method, params, mod->flags, 1);
1352 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
1356 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1357 state->method->variable_count = 0;
1358 parserassert(state->method);
1361 memberinfo_t*m = registry_findmember(state->cls->info, mod->ns, name, 2);
1362 check_override(m, mod->flags);
1366 state->cls->has_constructor |= state->method->is_constructor;
1369 function_initvars(state->method, params, mod->flags, 1);
1373 static abc_method_t* endfunction(modifiers_t*mod, enum yytokentype getset, char*name,
1374 params_t*params, classinfo_t*return_type, code_t*body)
1377 // store inner methods in variables
1378 function_initvars(state->method, 0, 0, 0);
1380 methodstate_list_t*ml = state->method->innerfunctions;
1382 dict_t*xvars = dict_new();
1385 methodstate_t*m = ml->methodstate;
1386 parserassert(m->inner);
1387 if(m->unresolved_variables) {
1388 dict_t*d = m->unresolved_variables;
1390 for(t=0;t<d->hashsize;t++) {
1391 dictentry_t*l = d->slots[t];
1393 /* check parent method's variables */
1395 if((v=find_variable(state, l->key))) {
1396 m->uses_parent_function = 1;
1397 state->method->uses_slots = 1;
1398 dict_put(xvars, l->key, 0);
1405 dict_destroy(m->unresolved_variables);
1406 m->unresolved_variables = 0;
1411 if(state->method->uses_slots) {
1412 state->method->slots = dict_new();
1414 DICT_ITERATE_ITEMS(state->vars, char*, name, variable_t*, v) {
1415 if(!name) syntaxerror("internal error");
1416 if(v->index && dict_contains(xvars, name)) {
1419 if(v->is_inner_method) {
1420 v->is_inner_method->is_a_slot = 1;
1423 dict_put(state->method->slots, name, v);
1426 state->method->uses_slots = i;
1427 dict_destroy(state->vars);state->vars = 0;
1428 parserassert(state->new_vars);
1429 dict_destroy(state->allvars);state->allvars = 0;
1436 /*if(state->method->uses_parent_function){
1437 syntaxerror("accessing variables of parent function from inner functions not supported yet");
1442 multiname_t*type2 = sig2mname(return_type);
1444 if(state->method->inner) {
1445 f = state->method->abc;
1446 abc_method_init(f, global->file, type2, 1);
1447 } else if(state->method->is_constructor) {
1448 f = abc_class_getconstructor(state->cls->abc, type2);
1449 } else if(!state->method->is_global) {
1450 namespace_t mname_ns = modifiers2access(mod);
1451 multiname_t mname = {QNAME, &mname_ns, 0, name};
1453 if(mod->flags&FLAG_STATIC)
1454 f = abc_class_staticmethod(state->cls->abc, type2, &mname);
1456 f = abc_class_method(state->cls->abc, type2, &mname);
1457 slot = f->trait->slot_id;
1459 namespace_t mname_ns = {state->method->info->access, state->package};
1460 multiname_t mname = {QNAME, &mname_ns, 0, name};
1462 f = abc_method_new(global->file, type2, 1);
1463 trait_t*t = trait_new_method(&global->init->traits, multiname_clone(&mname), f);
1464 //abc_code_t*c = global->init->method->body->code;
1466 //flash doesn't seem to allow us to access function slots
1467 //state->method->info->slot = slot;
1469 if(mod && mod->flags&FLAG_OVERRIDE) f->trait->attributes |= TRAIT_ATTR_OVERRIDE;
1470 if(getset == KW_GET) f->trait->kind = TRAIT_GETTER;
1471 if(getset == KW_SET) f->trait->kind = TRAIT_SETTER;
1472 if(params->varargs) f->flags |= METHOD_NEED_REST;
1476 for(p=params->list;p;p=p->next) {
1477 if(params->varargs && !p->next) {
1478 break; //varargs: omit last parameter in function signature
1480 multiname_t*m = sig2mname(p->param->type);
1481 list_append(f->parameters, m);
1482 if(p->param->value) {
1483 check_constant_against_type(p->param->type, p->param->value);
1484 opt=1;list_append(f->optional_parameters, p->param->value);
1486 syntaxerror("non-optional parameter not allowed after optional parameters");
1489 if(state->method->slots) {
1490 DICT_ITERATE_ITEMS(state->method->slots, char*, name, variable_t*, v) {
1492 multiname_t*mname = multiname_new(namespace_new(ACCESS_PACKAGE, ""), name);
1493 multiname_t*type = sig2mname(v->type);
1494 trait_t*t = trait_new_member(&f->body->traits, type, mname, 0);
1495 t->slot_id = v->index;
1500 check_code_for_break(body);
1502 /* Seems this works now.
1503 if(state->method->exceptions && state->method->uses_slots) {
1504 as3_warning("try/catch and activation not supported yet within the same method");
1508 f->body->code = body;
1509 f->body->exceptions = state->method->exceptions;
1510 } else { //interface
1512 syntaxerror("interface methods can't have a method body");
1522 void breakjumpsto(code_t*c, char*name, code_t*jump)
1525 if(c->opcode == OPCODE___BREAK__) {
1526 string_t*name2 = c->data[0];
1527 if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1528 c->opcode = OPCODE_JUMP;
1535 void continuejumpsto(code_t*c, char*name, code_t*jump)
1538 if(c->opcode == OPCODE___CONTINUE__) {
1539 string_t*name2 = c->data[0];
1540 if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1541 c->opcode = OPCODE_JUMP;
1549 #define IS_NUMBER_OR_INT(a) (TYPE_IS_INT((a)) || TYPE_IS_UINT((a)) || TYPE_IS_NUMBER((a)))
1551 code_t*converttype(code_t*c, classinfo_t*from, classinfo_t*to)
1556 return abc_coerce_a(c);
1560 // cast an "any" type to a specific type. subject to
1561 // runtime exceptions
1562 return abc_coerce2(c, &m);
1565 if((TYPE_IS_NUMBER(from) || TYPE_IS_UINT(from) || TYPE_IS_INT(from)) &&
1566 (TYPE_IS_NUMBER(to) || TYPE_IS_UINT(to) || TYPE_IS_INT(to))) {
1567 // allow conversion between number types
1568 if(TYPE_IS_UINT(to))
1569 return abc_convert_u(c);
1570 else if(TYPE_IS_INT(to))
1571 return abc_convert_i(c);
1572 else if(TYPE_IS_NUMBER(to))
1573 return abc_convert_d(c);
1574 return abc_coerce2(c, &m);
1577 if(TYPE_IS_BOOLEAN(to))
1578 return abc_convert_b(c);
1579 if(TYPE_IS_STRING(to))
1580 return abc_convert_s(c);
1581 if(TYPE_IS_OBJECT(to))
1582 return abc_convert_o(c);
1584 classinfo_t*supertype = from;
1586 if(supertype == to) {
1587 // target type is one of from's superclasses
1588 return abc_coerce2(c, &m);
1591 while(supertype->interfaces[t]) {
1592 if(supertype->interfaces[t]==to) {
1593 // target type is one of from's interfaces
1594 return abc_coerce2(c, &m);
1598 supertype = supertype->superclass;
1600 if(TYPE_IS_FUNCTION(from) && TYPE_IS_FUNCTION(to))
1602 if(TYPE_IS_CLASS(from) && TYPE_IS_CLASS(to))
1604 if(TYPE_IS_NULL(from) && !IS_NUMBER_OR_INT(to))
1607 as3_error("can't convert type %s%s%s to %s%s%s",
1608 from->package, from->package[0]?".":"", from->name,
1609 to->package, to->package[0]?".":"", to->name);
1613 /* move to ast.c todo end */
1615 char is_pushundefined(code_t*c)
1617 return (c && !c->prev && !c->next && c->opcode == OPCODE_PUSHUNDEFINED);
1620 static const char* get_package_from_name(const char*name)
1622 /* try explicit imports */
1623 dictentry_t* e = dict_get_slot(state->imports, name);
1625 if(!strcmp(e->key, name)) {
1626 slotinfo_t*c = (slotinfo_t*)e->data;
1627 if(c) return c->package;
1633 static namespace_list_t*get_current_imports()
1635 namespace_list_t*searchlist = 0;
1637 list_append(searchlist, namespace_new_package(state->package));
1639 import_list_t*l = state->wildcard_imports;
1641 namespace_t*ns = namespace_new_package(l->import->package);
1642 list_append(searchlist, ns);
1645 list_append(searchlist, namespace_new_package(""));
1646 list_append(searchlist, namespace_new_package(internal_filename_package));
1650 static slotinfo_t* find_class(const char*name)
1654 c = registry_find(state->package, name);
1657 /* try explicit imports */
1658 dictentry_t* e = dict_get_slot(state->imports, name);
1661 if(!strcmp(e->key, name)) {
1662 c = (slotinfo_t*)e->data;
1668 /* try package.* imports */
1669 import_list_t*l = state->wildcard_imports;
1671 //printf("does package %s contain a class %s?\n", l->import->package, name);
1672 c = registry_find(l->import->package, name);
1677 /* try global package */
1678 c = registry_find("", name);
1681 /* try local "filename" package */
1682 c = registry_find(internal_filename_package, name);
1687 typedcode_t push_class(slotinfo_t*a)
1692 if(a->access == ACCESS_PACKAGEINTERNAL &&
1693 strcmp(a->package, state->package) &&
1694 strcmp(a->package, internal_filename_package)
1696 syntaxerror("Can't access internal %s %s in package '%s' from package '%s'",
1697 infotypename(a), a->name, a->package, state->package);
1700 if(a->kind != INFOTYPE_CLASS) {
1702 x.c = abc_findpropstrict2(x.c, &m);
1703 x.c = abc_getproperty2(x.c, &m);
1704 if(a->kind == INFOTYPE_METHOD) {
1705 methodinfo_t*f = (methodinfo_t*)a;
1706 x.t = TYPE_FUNCTION(f);
1708 varinfo_t*v = (varinfo_t*)a;
1712 classinfo_t*c = (classinfo_t*)a;
1714 x.c = abc_getglobalscope(x.c);
1715 x.c = abc_getslot(x.c, c->slot);
1718 x.c = abc_getlex2(x.c, &m);
1720 x.t = TYPE_CLASS(c);
1726 char is_break_or_jump(code_t*c)
1730 if(c->opcode == OPCODE_JUMP ||
1731 c->opcode == OPCODE___BREAK__ ||
1732 c->opcode == OPCODE___CONTINUE__ ||
1733 c->opcode == OPCODE_THROW ||
1734 c->opcode == OPCODE_RETURNVOID ||
1735 c->opcode == OPCODE_RETURNVALUE) {
1741 #define IS_FINALLY_TARGET(op) \
1742 ((op) == OPCODE___CONTINUE__ || \
1743 (op) == OPCODE___BREAK__ || \
1744 (op) == OPCODE_RETURNVOID || \
1745 (op) == OPCODE_RETURNVALUE || \
1746 (op) == OPCODE___RETHROW__)
1748 static code_t* insert_finally_lookup(code_t*c, code_t*finally, int tempvar)
1750 #define NEED_EXTRA_STACK_ARG
1751 code_t*finally_label = abc_nop(0);
1752 NEW(lookupswitch_t, l);
1758 code_t*prev = i->prev;
1759 if(IS_FINALLY_TARGET(i->opcode)) {
1762 if(i->opcode == OPCODE___RETHROW__ ||
1763 i->opcode == OPCODE_RETURNVALUE) {
1764 if(i->opcode == OPCODE___RETHROW__)
1765 i->opcode = OPCODE_THROW;
1767 p = abc_coerce_a(p);
1768 p = abc_setlocal(p, tempvar);
1770 p = abc_pushbyte(p, count++);
1771 p = abc_jump(p, finally_label);
1772 code_t*target = p = abc_label(p);
1773 #ifdef NEED_EXTRA_STACK_ARG
1777 p = abc_getlocal(p, tempvar);
1780 p->next = i;i->prev = p;
1781 list_append(l->targets, target);
1787 c = abc_pushbyte(c, -1);
1788 c = code_append(c, finally_label);
1789 c = code_append(c, finally);
1791 #ifdef NEED_EXTRA_STACK_ARG
1794 c = abc_lookupswitch(c, l);
1795 c = l->def = abc_label(c);
1796 #ifdef NEED_EXTRA_STACK_ARG
1803 static code_t* insert_finally_simple(code_t*c, code_t*finally, int tempvar)
1807 code_t*prev = i->prev;
1808 if(IS_FINALLY_TARGET(i->opcode)) {
1809 if(i->opcode == OPCODE___RETHROW__)
1810 i->opcode = OPCODE_THROW;
1811 code_t*end = code_dup(finally);
1812 code_t*start = code_start(end);
1813 if(prev) prev->next = start;
1820 return code_append(c, finally);
1823 code_t* insert_finally(code_t*c, code_t*finally, int tempvar)
1829 int num_insertion_points=0;
1831 if(IS_FINALLY_TARGET(i->opcode))
1832 num_insertion_points++;
1839 if(i->branch || i->opcode == OPCODE_LOOKUPSWITCH) {
1844 int simple_version_cost = (1+num_insertion_points)*code_size;
1845 int lookup_version_cost = 4*num_insertion_points + 5;
1847 if(cantdup || simple_version_cost > lookup_version_cost) {
1848 //printf("(use lookup) simple=%d > lookup=%d\n", simple_version_cost, lookup_version_cost);
1849 return insert_finally_lookup(c, finally, tempvar);
1851 //printf("(use simple) simple=%d < lookup=%d\n", simple_version_cost, lookup_version_cost);
1852 return insert_finally_simple(c, finally, tempvar);
1856 #define PASS1 }} if(as3_pass == 1) {{
1857 #define PASS1END }} if(as3_pass == 2) {{
1858 #define PASS2 }} if(as3_pass == 2) {{
1859 #define PASS12 }} if(as3_pass == 1 || as3_pass == 2) {{
1860 #define PASS12END }} if(as3_pass == 2) {{
1861 #define PASS_ALWAYS }} {{
1865 /* Line 273 of skeleton.m4 */
1866 #line 1867 "parser.tab.c"
1867 /* Unqualified %code blocks. */
1869 /* Line 274 of skeleton.m4 */
1870 #line 1944 "parser.y"
1872 char is_subtype_of(classinfo_t*type, classinfo_t*supertype)
1878 /* Line 274 of skeleton.m4 */
1879 #line 2393 "parser.y"
1881 static void state_has_imports()
1883 state->wildcard_imports = list_clone(state->wildcard_imports);
1884 state->imports = dict_clone(state->imports);
1885 state->has_own_imports = 1;
1887 static void import_toplevel(const char*package)
1889 char* s = strdup(package);
1891 dict_put(state->import_toplevel_packages, s, 0);
1892 char*x = strrchr(s, '.');
1901 /* Line 274 of skeleton.m4 */
1902 #line 2526 "parser.y"
1904 static int slotstate_varconst = 0;
1905 static modifiers_t*slotstate_flags = 0;
1906 static void setslotstate(modifiers_t* flags, int varconst)
1908 slotstate_varconst = varconst;
1909 slotstate_flags = flags;
1911 if(flags && flags->flags&FLAG_STATIC) {
1912 state->method = state->cls->static_init;
1914 state->method = state->cls->init;
1917 parserassert(state->method);
1922 /* Line 274 of skeleton.m4 */
1923 #line 3414 "parser.y"
1925 void add_active_url(const char*url)
1929 list_append(state->active_namespace_urls, n);
1934 /* Line 274 of skeleton.m4 */
1935 #line 1936 "parser.tab.c"
1942 typedef YYTYPE_UINT8 yytype_uint8;
1944 typedef unsigned char yytype_uint8;
1948 typedef YYTYPE_INT8 yytype_int8;
1949 #elif (defined __STDC__ || defined __C99__FUNC__ \
1950 || defined __cplusplus || defined _MSC_VER)
1951 typedef signed char yytype_int8;
1953 typedef short int yytype_int8;
1956 #ifdef YYTYPE_UINT16
1957 typedef YYTYPE_UINT16 yytype_uint16;
1959 typedef unsigned short int yytype_uint16;
1963 typedef YYTYPE_INT16 yytype_int16;
1965 typedef short int yytype_int16;
1969 # ifdef __SIZE_TYPE__
1970 # define YYSIZE_T __SIZE_TYPE__
1971 # elif defined size_t
1972 # define YYSIZE_T size_t
1973 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
1974 || defined __cplusplus || defined _MSC_VER)
1975 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
1976 # define YYSIZE_T size_t
1978 # define YYSIZE_T unsigned int
1982 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
1987 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
1988 # define YY_(msgid) dgettext ("bison-runtime", msgid)
1992 # define YY_(msgid) msgid
1996 /* Suppress unused-variable warnings by "using" E. */
1997 #if ! defined lint || defined __GNUC__
1998 # define YYUSE(e) ((void) (e))
2000 # define YYUSE(e) /* empty */
2003 /* Identity function, used to suppress warnings about constant conditions. */
2005 # define YYID(n) (n)
2007 #if (defined __STDC__ || defined __C99__FUNC__ \
2008 || defined __cplusplus || defined _MSC_VER)
2021 #if ! defined yyoverflow || YYERROR_VERBOSE
2023 /* The parser invokes alloca or malloc; define the necessary symbols. */
2025 # ifdef YYSTACK_USE_ALLOCA
2026 # if YYSTACK_USE_ALLOCA
2028 # define YYSTACK_ALLOC __builtin_alloca
2029 # elif defined __BUILTIN_VA_ARG_INCR
2030 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
2032 # define YYSTACK_ALLOC __alloca
2033 # elif defined _MSC_VER
2034 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
2035 # define alloca _alloca
2037 # define YYSTACK_ALLOC alloca
2038 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
2039 || defined __cplusplus || defined _MSC_VER)
2040 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
2042 # define _STDLIB_H 1
2049 # ifdef YYSTACK_ALLOC
2050 /* Pacify GCC's `empty if-body' warning. */
2051 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
2052 # ifndef YYSTACK_ALLOC_MAXIMUM
2053 /* The OS might guarantee only one guard page at the bottom of the stack,
2054 and a page size can be as small as 4096 bytes. So we cannot safely
2055 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
2056 to allow for a few compiler-allocated temporary stack slots. */
2057 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
2060 # define YYSTACK_ALLOC YYMALLOC
2061 # define YYSTACK_FREE YYFREE
2062 # ifndef YYSTACK_ALLOC_MAXIMUM
2063 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
2065 # if (defined __cplusplus && ! defined _STDLIB_H \
2066 && ! ((defined YYMALLOC || defined malloc) \
2067 && (defined YYFREE || defined free)))
2068 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
2070 # define _STDLIB_H 1
2074 # define YYMALLOC malloc
2075 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
2076 || defined __cplusplus || defined _MSC_VER)
2077 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
2081 # define YYFREE free
2082 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
2083 || defined __cplusplus || defined _MSC_VER)
2084 void free (void *); /* INFRINGES ON USER NAME SPACE */
2088 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
2091 #if (! defined yyoverflow \
2092 && (! defined __cplusplus \
2093 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
2095 /* A type that is properly aligned for any stack member. */
2098 yytype_int16 yyss_alloc;
2102 /* The size of the maximum gap between one aligned stack and the next. */
2103 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
2105 /* The size of an array large to enough to hold all stacks, each with
2107 # define YYSTACK_BYTES(N) \
2108 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
2109 + YYSTACK_GAP_MAXIMUM)
2111 /* Copy COUNT objects from FROM to TO. The source and destination do
2114 # if defined __GNUC__ && 1 < __GNUC__
2115 # define YYCOPY(To, From, Count) \
2116 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
2118 # define YYCOPY(To, From, Count) \
2122 for (yyi = 0; yyi < (Count); yyi++) \
2123 (To)[yyi] = (From)[yyi]; \
2129 /* Relocate STACK from its old location to the new one. The
2130 local variables YYSIZE and YYSTACKSIZE give the old and new number of
2131 elements in the stack, and YYPTR gives the new location of the
2132 stack. Advance YYPTR to a properly aligned location for the next
2134 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
2137 YYSIZE_T yynewbytes; \
2138 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
2139 Stack = &yyptr->Stack_alloc; \
2140 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
2141 yyptr += yynewbytes / sizeof (*yyptr); \
2147 /* YYFINAL -- State number of the termination state. */
2149 /* YYLAST -- Last index in YYTABLE. */
2152 /* YYNTOKENS -- Number of terminals. */
2153 #define YYNTOKENS 133
2154 /* YYNNTS -- Number of nonterminals. */
2156 /* YYNRULES -- Number of rules. */
2157 #define YYNRULES 305
2158 /* YYNRULES -- Number of states. */
2159 #define YYNSTATES 519
2161 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
2162 #define YYUNDEFTOK 2
2163 #define YYMAXUTOK 362
2165 #define YYTRANSLATE(YYX) \
2166 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
2168 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
2169 static const yytype_uint8 yytranslate[] =
2171 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2172 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2173 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2174 2, 2, 2, 117, 2, 2, 2, 115, 107, 2,
2175 121, 132, 114, 112, 100, 111, 126, 113, 2, 2,
2176 2, 2, 2, 2, 2, 2, 2, 2, 104, 99,
2177 108, 102, 109, 103, 127, 2, 2, 2, 2, 2,
2178 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2179 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2180 2, 123, 2, 124, 106, 2, 2, 2, 2, 2,
2181 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2182 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2183 2, 2, 2, 125, 105, 131, 116, 2, 2, 2,
2184 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2185 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2186 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2187 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2188 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2189 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2190 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2191 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2192 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2193 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2194 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2195 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2196 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
2197 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
2198 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
2199 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
2200 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
2201 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
2202 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
2203 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
2204 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
2205 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
2206 95, 96, 97, 98, 101, 110, 118, 119, 120, 122,
2211 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
2213 static const yytype_uint16 yyprhs[] =
2215 0, 0, 3, 5, 6, 8, 10, 13, 15, 17,
2216 19, 21, 23, 25, 30, 32, 33, 35, 37, 40,
2217 42, 44, 46, 48, 50, 55, 57, 59, 60, 63,
2218 65, 67, 69, 71, 73, 75, 77, 79, 81, 83,
2219 85, 87, 89, 93, 96, 98, 100, 102, 104, 106,
2220 108, 110, 115, 118, 120, 122, 126, 129, 130, 133,
2221 136, 138, 142, 146, 147, 150, 151, 159, 160, 162,
2222 164, 168, 170, 173, 177, 186, 193, 194, 201, 202,
2223 210, 212, 215, 217, 220, 221, 223, 225, 228, 230,
2224 233, 238, 242, 243, 252, 253, 263, 264, 270, 272,
2225 275, 277, 280, 282, 283, 290, 293, 295, 300, 303,
2226 305, 307, 309, 313, 315, 316, 323, 324, 330, 333,
2227 338, 339, 341, 343, 346, 348, 350, 352, 354, 356,
2228 358, 360, 362, 364, 366, 367, 370, 371, 374, 375,
2229 378, 379, 389, 390, 399, 400, 402, 404, 407, 409,
2230 414, 416, 418, 420, 421, 423, 425, 428, 430, 433,
2231 442, 444, 446, 447, 452, 454, 458, 462, 463, 466,
2232 468, 470, 472, 474, 476, 478, 480, 482, 484, 485,
2233 487, 490, 495, 499, 501, 506, 509, 511, 513, 514,
2234 515, 528, 530, 531, 532, 543, 545, 549, 551, 553,
2235 555, 559, 561, 563, 565, 568, 569, 570, 574, 575,
2236 577, 579, 581, 584, 587, 588, 593, 598, 603, 606,
2237 608, 611, 613, 615, 617, 621, 623, 627, 628, 630,
2238 632, 634, 638, 644, 646, 648, 650, 652, 654, 656,
2239 658, 660, 664, 668, 672, 676, 680, 684, 688, 692,
2240 696, 700, 704, 708, 711, 714, 718, 722, 726, 730,
2241 734, 738, 742, 746, 750, 754, 758, 762, 766, 770,
2242 774, 779, 782, 784, 788, 791, 796, 800, 804, 808,
2243 812, 816, 820, 824, 828, 832, 836, 840, 844, 850,
2244 853, 856, 859, 862, 866, 869, 874, 880, 884, 890,
2245 894, 896, 899, 904, 909, 912
2248 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
2249 static const yytype_int16 yyrhs[] =
2251 134, 0, -1, 135, -1, -1, 136, -1, 137, -1,
2252 136, 137, -1, 185, -1, 197, -1, 195, -1, 216,
2253 -1, 206, -1, 146, -1, 147, 125, 135, 131, -1,
2254 99, -1, -1, 139, -1, 140, -1, 139, 140, -1,
2255 197, -1, 195, -1, 216, -1, 206, -1, 146, -1,
2256 147, 125, 138, 131, -1, 99, -1, 142, -1, -1,
2257 142, 144, -1, 144, -1, 188, -1, 158, -1, 159,
2258 -1, 160, -1, 162, -1, 170, -1, 153, -1, 182,
2259 -1, 178, -1, 239, -1, 248, -1, 247, -1, 125,
2260 142, 131, -1, 125, 131, -1, 99, -1, 143, -1,
2261 149, -1, 164, -1, 165, -1, 235, -1, 180, -1,
2262 147, 125, 142, 131, -1, 144, 99, -1, 144, -1,
2263 143, -1, 3, 89, 3, -1, 102, 243, -1, -1,
2264 45, 150, -1, 31, 150, -1, 151, -1, 150, 100,
2265 151, -1, 3, 226, 148, -1, -1, 64, 145, -1,
2266 -1, 63, 121, 154, 237, 132, 145, 152, -1, -1,
2267 149, -1, 239, -1, 45, 3, 226, -1, 3, -1,
2268 11, 121, -1, 11, 49, 121, -1, 157, 155, 99,
2269 237, 99, 239, 132, 145, -1, 157, 156, 67, 237,
2270 132, 145, -1, -1, 12, 121, 161, 237, 132, 145,
2271 -1, -1, 13, 163, 145, 12, 121, 237, 132, -1,
2272 65, -1, 65, 3, -1, 29, -1, 29, 3, -1,
2273 -1, 167, -1, 169, -1, 167, 169, -1, 168, -1,
2274 167, 168, -1, 33, 243, 104, 141, -1, 61, 104,
2275 141, -1, -1, 14, 121, 171, 243, 132, 125, 166,
2276 131, -1, -1, 32, 121, 3, 226, 132, 173, 125,
2277 141, 131, -1, -1, 26, 125, 175, 141, 131, -1,
2278 172, -1, 176, 172, -1, 176, -1, 176, 174, -1,
2279 174, -1, -1, 51, 125, 179, 141, 131, 177, -1,
2280 36, 237, -1, 36, -1, 38, 121, 237, 132, -1,
2281 181, 145, -1, 3, -1, 17, -1, 4, -1, 184,
2282 126, 183, -1, 183, -1, -1, 17, 184, 125, 186,
2283 138, 131, -1, -1, 17, 125, 187, 138, 131, -1,
2284 40, 222, -1, 40, 184, 126, 114, -1, -1, 190,
2285 -1, 191, -1, 190, 191, -1, 19, -1, 20, -1,
2286 18, -1, 37, -1, 46, -1, 48, -1, 47, -1,
2287 24, -1, 22, -1, 4, -1, -1, 53, 223, -1,
2288 -1, 53, 224, -1, -1, 15, 224, -1, -1, 189,
2289 30, 3, 192, 194, 125, 196, 199, 131, -1, -1,
2290 189, 43, 3, 193, 125, 198, 202, 131, -1, -1,
2291 200, -1, 201, -1, 200, 201, -1, 99, -1, 147,
2292 125, 199, 131, -1, 206, -1, 216, -1, 143, -1,
2293 -1, 203, -1, 204, -1, 203, 204, -1, 99, -1,
2294 45, 3, -1, 189, 25, 215, 3, 121, 212, 132,
2295 226, -1, 45, -1, 31, -1, -1, 189, 205, 207,
2296 208, -1, 209, -1, 208, 100, 209, -1, 3, 226,
2297 148, -1, -1, 102, 243, -1, 8, -1, 9, -1,
2298 10, -1, 5, -1, 55, -1, 54, -1, 44, -1,
2299 27, -1, 28, -1, -1, 213, -1, 93, 214, -1,
2300 213, 100, 93, 214, -1, 213, 100, 214, -1, 214,
2301 -1, 3, 104, 225, 210, -1, 3, 210, -1, 50,
2302 -1, 34, -1, -1, -1, 189, 25, 215, 3, 121,
2303 212, 132, 226, 125, 217, 141, 131, -1, 3, -1,
2304 -1, -1, 25, 218, 121, 212, 132, 226, 125, 220,
2305 141, 131, -1, 183, -1, 184, 126, 183, -1, 222,
2306 -1, 221, -1, 223, -1, 224, 100, 223, -1, 223,
2307 -1, 114, -1, 35, -1, 104, 225, -1, -1, -1,
2308 121, 228, 132, -1, -1, 229, -1, 230, -1, 236,
2309 -1, 229, 100, -1, 230, 236, -1, -1, 23, 243,
2310 231, 227, -1, 243, 121, 228, 132, -1, 52, 121,
2311 228, 132, -1, 62, 243, -1, 41, -1, 41, 237,
2312 -1, 243, -1, 238, -1, 243, -1, 238, 100, 243,
2313 -1, 243, -1, 239, 100, 243, -1, -1, 242, -1,
2314 3, -1, 5, -1, 241, 104, 236, -1, 242, 100,
2315 241, 104, 236, -1, 219, -1, 244, -1, 232, -1,
2316 234, -1, 233, -1, 245, -1, 211, -1, 6, -1,
2317 123, 228, 124, -1, 69, 240, 131, -1, 243, 108,
2318 243, -1, 243, 109, 243, -1, 243, 74, 243, -1,
2319 243, 75, 243, -1, 243, 70, 243, -1, 243, 71,
2320 243, -1, 243, 73, 243, -1, 243, 72, 243, -1,
2321 243, 87, 243, -1, 243, 88, 243, -1, 117, 243,
2322 -1, 116, 243, -1, 243, 107, 243, -1, 243, 106,
2323 243, -1, 243, 105, 243, -1, 243, 96, 243, -1,
2324 243, 95, 243, -1, 243, 94, 243, -1, 243, 113,
2325 243, -1, 243, 115, 243, -1, 243, 112, 243, -1,
2326 243, 111, 243, -1, 243, 114, 243, -1, 243, 67,
2327 243, -1, 243, 68, 243, -1, 243, 39, 243, -1,
2328 243, 66, 243, -1, 42, 121, 243, 132, -1, 35,
2329 243, -1, 35, -1, 121, 238, 132, -1, 111, 243,
2330 -1, 243, 123, 243, 124, -1, 243, 79, 243, -1,
2331 243, 78, 243, -1, 243, 85, 243, -1, 243, 84,
2332 243, -1, 243, 86, 243, -1, 243, 77, 243, -1,
2333 243, 76, 243, -1, 243, 83, 243, -1, 243, 80,
2334 243, -1, 243, 81, 243, -1, 243, 82, 243, -1,
2335 243, 102, 243, -1, 243, 103, 243, 104, 243, -1,
2336 243, 91, -1, 243, 90, -1, 91, 243, -1, 90,
2337 243, -1, 52, 126, 3, -1, 127, 3, -1, 243,
2338 126, 127, 3, -1, 243, 126, 3, 89, 3, -1,
2339 243, 92, 3, -1, 243, 126, 121, 243, 132, -1,
2340 243, 126, 3, -1, 3, -1, 16, 3, -1, 16,
2341 3, 102, 3, -1, 16, 3, 102, 5, -1, 189,
2342 246, -1, 21, 16, 223, -1
2345 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
2346 static const yytype_uint16 yyrline[] =
2348 0, 1849, 1849, 1851, 1851, 1852, 1853, 1855, 1856, 1857,
2349 1858, 1859, 1860, 1861, 1862, 1864, 1864, 1865, 1866, 1868,
2350 1869, 1870, 1871, 1872, 1873, 1874, 1876, 1877, 1879, 1882,
2351 1885, 1886, 1887, 1888, 1889, 1890, 1891, 1892, 1893, 1894,
2352 1895, 1896, 1897, 1898, 1901, 1902, 1903, 1904, 1905, 1906,
2353 1907, 1908, 1920, 1921, 1925, 1932, 1951, 1952, 1954, 1955,
2354 1957, 1958, 1960, 2020, 2021, 2024, 2024, 2043, 2044, 2045,
2355 2050, 2054, 2059, 2060, 2062, 2082, 2130, 2130, 2149, 2149,
2356 2164, 2167, 2170, 2173, 2177, 2178, 2179, 2180, 2181, 2182,
2357 2184, 2195, 2198, 2198, 2229, 2229, 2254, 2254, 2270, 2271,
2358 2272, 2273, 2281, 2290, 2290, 2339, 2343, 2354, 2364, 2381,
2359 2382, 2383, 2385, 2386, 2388, 2388, 2390, 2390, 2413, 2427,
2360 2443, 2444, 2445, 2446, 2453, 2454, 2455, 2456, 2457, 2458,
2361 2459, 2460, 2461, 2462, 2466, 2467, 2469, 2470, 2472, 2473,
2362 2477, 2475, 2483, 2481, 2490, 2491, 2492, 2493, 2494, 2495,
2363 2496, 2497, 2499, 2505, 2506, 2507, 2508, 2509, 2510, 2513,
2364 2545, 2545, 2547, 2547, 2549, 2550, 2552, 2646, 2647, 2655,
2365 2656, 2659, 2660, 2661, 2662, 2663, 2664, 2665, 2680, 2684,
2366 2690, 2696, 2704, 2709, 2715, 2723, 2731, 2732, 2733, 2736,
2367 2735, 2752, 2753, 2755, 2754, 2778, 2797, 2811, 2812, 2814,
2368 2815, 2817, 2818, 2819, 2828, 2829, 2833, 2834, 2836, 2837,
2369 2838, 2840, 2844, 2845, 2850, 2851, 2888, 2938, 2959, 2981,
2370 2984, 2991, 2994, 2997, 3000, 3003, 3006, 3011, 3012, 3014,
2371 3015, 3017, 3023, 3032, 3033, 3034, 3035, 3036, 3037, 3039,
2372 3044, 3064, 3074, 3083, 3084, 3085, 3086, 3087, 3088, 3089,
2373 3090, 3091, 3092, 3093, 3094, 3095, 3096, 3097, 3098, 3099,
2374 3100, 3101, 3102, 3103, 3104, 3105, 3106, 3107, 3108, 3109,
2375 3110, 3111, 3112, 3113, 3114, 3115, 3116, 3117, 3118, 3119,
2376 3120, 3121, 3122, 3123, 3124, 3125, 3126, 3127, 3128, 3130,
2377 3131, 3132, 3133, 3135, 3150, 3156, 3162, 3168, 3174, 3187,
2378 3245, 3378, 3385, 3392, 3399, 3423
2382 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
2383 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
2384 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
2385 static const char *const yytname[] =
2387 "$end", "error", "$undefined", "T_IDENTIFIER", "T_NAMESPACE",
2388 "T_STRING", "T_REGEXP", "T_EMPTY", "T_INT", "T_UINT", "T_FLOAT",
2389 "\"for\"", "\"while\"", "\"do\"", "\"switch\"", "\"implements\"",
2390 "\"namespace\"", "\"package\"", "\"protected\"", "\"public\"",
2391 "\"private\"", "\"use\"", "\"internal\"", "\"new\"", "\"native\"",
2392 "\"function\"", "\"finally\"", "\"undefined\"", "\"NaN\"",
2393 "\"continue\"", "\"class\"", "\"const\"", "\"catch\"", "\"case\"",
2394 "\"set\"", "\"void\"", "\"throw\"", "\"static\"", "\"with\"",
2395 "\"instanceof\"", "\"import\"", "\"return\"", "\"typeof\"",
2396 "\"interface\"", "\"null\"", "\"var\"", "\"dynamic\"", "\"override\"",
2397 "\"final\"", "\"each\"", "\"get\"", "\"try\"", "\"super\"",
2398 "\"extends\"", "\"false\"", "\"true\"", "\"Boolean\"", "\"uint\"",
2399 "\"int\"", "\"Number\"", "\"String\"", "\"default\"", "\"delete\"",
2400 "\"if\"", "\"else\"", "\"break\"", "\"is\"", "\"in\"", "\"as\"",
2401 "\"{ (dictionary)\"", "\"==\"", "\"===\"", "\"!=\"", "\"!==\"", "\"<=\"",
2402 "\">=\"", "\"|=\"", "\"/=\"", "\"%=\"", "\"*=\"", "\"&=\"", "\"+=\"",
2403 "\"-=\"", "\"^=\"", "\">>=\"", "\"<<=\"", "\">>>=\"", "\"||\"", "\"&&\"",
2404 "\"::\"", "\"--\"", "\"++\"", "\"..\"", "\"...\"", "\"<<\"", "\">>>\"",
2405 "\">>\"", "prec_none", "below_semicolon", "';'", "','",
2406 "below_assignment", "'='", "'?'", "':'", "'|'", "'^'", "'&'", "'<'",
2407 "'>'", "below_minus", "'-'", "'+'", "'/'", "'*'", "'%'", "'~'", "'!'",
2408 "minusminus_prefix", "plusplus_prefix", "below_curly", "'('", "new2",
2409 "'['", "']'", "'{'", "'.'", "'@'", "above_identifier", "below_else",
2410 "above_function", "'}'", "')'", "$accept", "PROGRAM",
2411 "MAYBE_PROGRAM_CODE_LIST", "PROGRAM_CODE_LIST", "PROGRAM_CODE",
2412 "MAYBE_INPACKAGE_CODE_LIST", "INPACKAGE_CODE_LIST", "INPACKAGE_CODE",
2413 "MAYBECODE", "CODE", "CODE_STATEMENT", "CODEPIECE", "CODEBLOCK",
2414 "PACKAGE_INITCODE", "CONDITIONAL_COMPILATION", "MAYBEEXPRESSION",
2415 "VARIABLE_DECLARATION", "VARIABLE_LIST", "ONE_VARIABLE", "MAYBEELSE",
2416 "IF", "$@1", "FOR_INIT", "FOR_IN_INIT", "FOR_START", "FOR", "FOR_IN",
2417 "WHILE", "$@2", "DO_WHILE", "$@3", "BREAK", "CONTINUE",
2418 "MAYBE_CASE_LIST", "CASE_LIST", "CASE", "DEFAULT", "SWITCH", "$@4",
2419 "CATCH", "$@5", "FINALLY", "$@6", "CATCH_LIST", "CATCH_FINALLY_LIST",
2420 "TRY", "$@7", "THROW", "WITH_HEAD", "WITH", "X_IDENTIFIER", "PACKAGE",
2421 "PACKAGE_DECLARATION", "$@8", "$@9", "IMPORT", "MAYBE_MODIFIERS",
2422 "MODIFIER_LIST", "MODIFIER", "EXTENDS", "EXTENDS_LIST",
2423 "IMPLEMENTS_LIST", "CLASS_DECLARATION", "$@10", "INTERFACE_DECLARATION",
2424 "$@11", "MAYBE_CLASS_BODY", "CLASS_BODY", "CLASS_BODY_ITEM",
2425 "MAYBE_INTERFACE_BODY", "INTERFACE_BODY", "IDECLARATION", "VARCONST",
2426 "SLOT_DECLARATION", "$@12", "SLOT_LIST", "ONE_SLOT", "MAYBECONSTANT",
2427 "CONSTANT", "MAYBE_PARAM_LIST", "PARAM_LIST", "PARAM", "GETSET",
2428 "FUNCTION_DECLARATION", "$@13", "MAYBE_IDENTIFIER", "INNERFUNCTION",
2429 "$@14", "CLASS", "PACKAGEANDCLASS", "CLASS_SPEC", "CLASS_SPEC_LIST",
2430 "TYPE", "MAYBETYPE", "MAYBE_PARAM_VALUES", "MAYBE_EXPRESSION_LIST",
2431 "EXPRESSION_LIST", "EXPRESSION_LIST_AND_COMMA", "XX", "NEW",
2432 "FUNCTIONCALL", "DELETE", "RETURN", "NONCOMMAEXPRESSION", "EXPRESSION",
2433 "COMMA_EXPRESSION", "VOIDEXPRESSION", "MAYBE_DICT_EXPRPAIR_LIST",
2434 "DICTLH", "DICT_EXPRPAIR_LIST", "E", "MEMBER", "VAR_READ",
2435 "NAMESPACE_ID", "NAMESPACE_DECLARATION", "USE_NAMESPACE", 0
2440 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
2442 static const yytype_uint16 yytoknum[] =
2444 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
2445 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
2446 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
2447 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
2448 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
2449 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
2450 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
2451 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
2452 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
2453 345, 346, 347, 348, 349, 350, 351, 352, 353, 59,
2454 44, 354, 61, 63, 58, 124, 94, 38, 60, 62,
2455 355, 45, 43, 47, 42, 37, 126, 33, 356, 357,
2456 358, 40, 359, 91, 93, 123, 46, 64, 360, 361,
2461 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
2462 static const yytype_uint8 yyr1[] =
2464 0, 133, 134, 135, 135, 136, 136, 137, 137, 137,
2465 137, 137, 137, 137, 137, 138, 138, 139, 139, 140,
2466 140, 140, 140, 140, 140, 140, 141, 141, 142, 142,
2467 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
2468 143, 143, 143, 143, 144, 144, 144, 144, 144, 144,
2469 144, 144, 145, 145, 146, 147, 148, 148, 149, 149,
2470 150, 150, 151, 152, 152, 154, 153, 155, 155, 155,
2471 156, 156, 157, 157, 158, 159, 161, 160, 163, 162,
2472 164, 164, 165, 165, 166, 166, 166, 166, 167, 167,
2473 168, 169, 171, 170, 173, 172, 175, 174, 176, 176,
2474 177, 177, 177, 179, 178, 180, 180, 181, 182, 183,
2475 183, 183, 184, 184, 186, 185, 187, 185, 188, 188,
2476 189, 189, 190, 190, 191, 191, 191, 191, 191, 191,
2477 191, 191, 191, 191, 192, 192, 193, 193, 194, 194,
2478 196, 195, 198, 197, 199, 199, 200, 200, 201, 201,
2479 201, 201, 201, 202, 202, 203, 203, 204, 204, 204,
2480 205, 205, 207, 206, 208, 208, 209, 210, 210, 211,
2481 211, 211, 211, 211, 211, 211, 211, 211, 212, 212,
2482 212, 212, 213, 213, 214, 214, 215, 215, 215, 217,
2483 216, 218, 218, 220, 219, 221, 222, 223, 223, 224,
2484 224, 225, 225, 225, 226, 226, 227, 227, 228, 228,
2485 228, 229, 230, 229, 231, 232, 233, 233, 234, 235,
2486 235, 236, 237, 238, 238, 239, 239, 240, 240, 241,
2487 241, 242, 242, 243, 243, 243, 243, 243, 243, 243,
2488 243, 243, 243, 243, 243, 243, 243, 243, 243, 243,
2489 243, 243, 243, 243, 243, 243, 243, 243, 243, 243,
2490 243, 243, 243, 243, 243, 243, 243, 243, 243, 243,
2491 243, 243, 243, 243, 243, 243, 243, 243, 243, 243,
2492 243, 243, 243, 243, 243, 243, 243, 243, 243, 243,
2493 243, 243, 243, 243, 243, 243, 243, 243, 243, 244,
2494 245, 246, 246, 246, 247, 248
2497 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
2498 static const yytype_uint8 yyr2[] =
2500 0, 2, 1, 0, 1, 1, 2, 1, 1, 1,
2501 1, 1, 1, 4, 1, 0, 1, 1, 2, 1,
2502 1, 1, 1, 1, 4, 1, 1, 0, 2, 1,
2503 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2504 1, 1, 3, 2, 1, 1, 1, 1, 1, 1,
2505 1, 4, 2, 1, 1, 3, 2, 0, 2, 2,
2506 1, 3, 3, 0, 2, 0, 7, 0, 1, 1,
2507 3, 1, 2, 3, 8, 6, 0, 6, 0, 7,
2508 1, 2, 1, 2, 0, 1, 1, 2, 1, 2,
2509 4, 3, 0, 8, 0, 9, 0, 5, 1, 2,
2510 1, 2, 1, 0, 6, 2, 1, 4, 2, 1,
2511 1, 1, 3, 1, 0, 6, 0, 5, 2, 4,
2512 0, 1, 1, 2, 1, 1, 1, 1, 1, 1,
2513 1, 1, 1, 1, 0, 2, 0, 2, 0, 2,
2514 0, 9, 0, 8, 0, 1, 1, 2, 1, 4,
2515 1, 1, 1, 0, 1, 1, 2, 1, 2, 8,
2516 1, 1, 0, 4, 1, 3, 3, 0, 2, 1,
2517 1, 1, 1, 1, 1, 1, 1, 1, 0, 1,
2518 2, 4, 3, 1, 4, 2, 1, 1, 0, 0,
2519 12, 1, 0, 0, 10, 1, 3, 1, 1, 1,
2520 3, 1, 1, 1, 2, 0, 0, 3, 0, 1,
2521 1, 1, 2, 2, 0, 4, 4, 4, 2, 1,
2522 2, 1, 1, 1, 3, 1, 3, 0, 1, 1,
2523 1, 3, 5, 1, 1, 1, 1, 1, 1, 1,
2524 1, 3, 3, 3, 3, 3, 3, 3, 3, 3,
2525 3, 3, 3, 2, 2, 3, 3, 3, 3, 3,
2526 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
2527 4, 2, 1, 3, 2, 4, 3, 3, 3, 3,
2528 3, 3, 3, 3, 3, 3, 3, 3, 5, 2,
2529 2, 2, 2, 3, 2, 4, 5, 3, 5, 3,
2533 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
2534 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
2535 means the default is an error. */
2536 static const yytype_uint16 yydefact[] =
2538 120, 300, 133, 172, 240, 169, 170, 171, 0, 0,
2539 78, 0, 0, 126, 124, 125, 0, 132, 0, 131,
2540 192, 176, 177, 272, 127, 0, 0, 0, 175, 128,
2541 130, 129, 0, 0, 174, 173, 0, 0, 227, 0,
2542 0, 14, 0, 0, 0, 0, 208, 120, 0, 0,
2543 2, 120, 5, 54, 12, 0, 36, 67, 31, 32,
2544 33, 34, 35, 38, 120, 37, 7, 30, 0, 121,
2545 122, 9, 8, 11, 239, 10, 233, 235, 237, 236,
2546 39, 225, 234, 238, 41, 40, 0, 0, 72, 76,
2547 120, 92, 109, 111, 110, 116, 113, 0, 0, 300,
2548 214, 191, 0, 271, 0, 0, 118, 0, 103, 208,
2549 0, 218, 65, 229, 230, 0, 0, 228, 292, 291,
2550 274, 254, 253, 0, 223, 0, 209, 210, 211, 221,
2551 82, 0, 106, 219, 0, 80, 44, 43, 120, 45,
2552 29, 0, 46, 47, 48, 50, 0, 49, 294, 1,
2553 6, 120, 300, 0, 68, 0, 0, 69, 53, 108,
2554 0, 188, 0, 161, 0, 160, 162, 304, 123, 0,
2555 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2556 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2557 0, 0, 0, 290, 289, 0, 0, 0, 0, 0,
2558 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2559 0, 208, 0, 0, 55, 73, 0, 0, 0, 120,
2560 114, 0, 195, 0, 198, 197, 305, 206, 178, 0,
2561 222, 0, 0, 27, 0, 293, 0, 242, 0, 0,
2562 0, 273, 241, 212, 213, 83, 205, 59, 60, 105,
2563 220, 58, 81, 42, 28, 120, 0, 205, 0, 0,
2564 52, 301, 187, 186, 0, 134, 136, 0, 226, 268,
2565 269, 266, 267, 247, 248, 250, 249, 245, 246, 282,
2566 281, 277, 276, 284, 285, 286, 283, 279, 278, 280,
2567 251, 252, 297, 260, 259, 258, 287, 0, 257, 256,
2568 255, 243, 244, 264, 263, 261, 265, 262, 0, 0,
2569 299, 0, 0, 0, 0, 0, 25, 0, 120, 17,
2570 23, 0, 20, 19, 22, 21, 120, 112, 0, 208,
2571 215, 167, 0, 0, 179, 183, 107, 119, 196, 270,
2572 0, 26, 217, 0, 231, 0, 224, 0, 57, 0,
2573 120, 13, 57, 0, 0, 0, 0, 0, 138, 0,
2574 0, 205, 163, 164, 0, 216, 275, 0, 0, 295,
2575 120, 0, 0, 117, 18, 120, 0, 0, 0, 0,
2576 185, 180, 205, 0, 0, 120, 0, 203, 202, 201,
2577 204, 0, 62, 61, 51, 0, 120, 302, 303, 178,
2578 135, 0, 0, 199, 137, 142, 57, 0, 288, 296,
2579 298, 77, 0, 84, 0, 115, 207, 168, 167, 0,
2580 0, 182, 0, 0, 98, 102, 100, 104, 63, 232,
2581 56, 0, 75, 0, 139, 140, 0, 120, 166, 165,
2582 79, 0, 0, 0, 85, 88, 86, 24, 184, 193,
2583 181, 96, 0, 99, 101, 120, 66, 120, 205, 120,
2584 200, 0, 157, 0, 0, 120, 155, 0, 27, 93,
2585 89, 87, 27, 27, 205, 64, 74, 0, 148, 152,
2586 0, 0, 0, 120, 146, 150, 151, 158, 188, 143,
2587 156, 27, 91, 0, 0, 0, 189, 120, 141, 147,
2588 0, 90, 194, 97, 94, 27, 0, 0, 0, 0,
2589 149, 178, 27, 190, 0, 0, 205, 95, 159
2592 /* YYDEFGOTO[NTERM-NUM]. */
2593 static const yytype_int16 yydefgoto[] =
2595 -1, 49, 50, 51, 52, 317, 318, 319, 340, 341,
2596 139, 140, 159, 320, 141, 392, 142, 251, 248, 456,
2597 56, 236, 155, 156, 57, 58, 59, 60, 216, 61,
2598 90, 143, 144, 443, 444, 445, 446, 62, 218, 424,
2599 508, 425, 473, 426, 427, 63, 233, 145, 64, 65,
2600 222, 223, 66, 326, 219, 67, 146, 69, 70, 358,
2601 360, 402, 322, 459, 323, 437, 482, 483, 484, 464,
2602 465, 466, 166, 324, 267, 362, 363, 380, 74, 333,
2603 334, 335, 264, 325, 505, 102, 76, 472, 224, 225,
2604 389, 404, 390, 348, 330, 125, 126, 127, 227, 77,
2605 78, 79, 147, 128, 229, 230, 80, 115, 116, 117,
2606 81, 82, 83, 167, 84, 85
2609 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
2611 #define YYPACT_NINF -400
2612 static const yytype_int16 yypact[] =
2614 1663, -67, -400, -400, -400, -400, -400, -400, -10, -17,
2615 -400, -16, 21, -400, -400, -400, 92, -400, 2106, -400,
2616 62, -400, -400, 2161, -400, 5, 125, 13, -400, -400,
2617 -400, -400, -3, -60, -400, -400, 2106, 22, 90, 2106,
2618 2106, -400, 2106, 2106, 2106, 2106, 2106, 631, 122, 137,
2619 -400, 502, -400, -400, -400, 19, -400, 2036, -400, -400,
2620 -400, -400, -400, -400, 1913, -400, -400, -400, 186, 40,
2621 -400, -400, -400, -400, -400, -400, -400, -400, -400, -400,
2622 38, 2615, -400, -400, -400, -400, 142, 26, -400, -400,
2623 1913, -400, -400, -400, -400, -400, -400, -84, 125, -400,
2624 -2, -400, 27, -45, 2106, 23, -400, 2106, -400, 2106,
2625 147, -45, -400, -400, -400, 51, 76, 104, -45, -45,
2626 356, -45, -45, -57, 2615, 82, 108, 2106, -400, 2615,
2627 207, 210, 2106, 2106, 210, 211, -400, -400, 760, -400,
2628 -400, 93, -400, -400, -400, -400, 199, -400, -400, -400,
2629 -400, 1018, 155, 221, -400, 134, 167, 38, 138, -400,
2630 235, 33, 236, -400, 239, -400, -400, -400, -400, 2106,
2631 2106, 2106, 2106, 2106, 2106, 2106, 2106, 2106, 2106, 2106,
2632 2106, 2106, 2106, 2106, 2106, 2106, 2106, 2106, 2106, 2106,
2633 2106, 2106, 2106, -400, -400, 240, 2106, 2106, 2106, 2106,
2634 2106, 2106, 2106, 2106, 2106, 2106, 2106, 2106, 2106, 2106,
2635 2106, 2106, 2106, 14, -400, -400, 2106, 232, 2106, 1147,
2636 -400, 125, 130, 131, -400, -400, -400, 127, 16, 126,
2637 154, 95, 2219, 1788, 132, -400, 2106, -400, 2106, 90,
2638 2106, -400, -400, -400, -400, -400, 156, 159, -400, -400,
2639 -400, 159, -400, -400, -400, 1913, 135, 156, 2106, 2106,
2640 -400, 160, -400, -400, 260, 219, 220, 266, 2615, 494,
2641 330, 330, 330, 2981, 2981, 2981, 2981, 494, 494, 2615,
2642 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615,
2643 2676, 2737, -400, 269, 269, 269, 2615, 2432, 2798, 2859,
2644 2920, 494, 494, 356, 356, -45, -45, -45, 143, 2493,
2645 185, 2106, 277, 149, 161, 2290, -400, 152, 1276, -400,
2646 -400, 163, -400, -400, -400, -400, 1147, -400, 125, 2106,
2647 -400, 28, 281, 157, 191, -400, -400, -400, 166, -400,
2648 162, 1788, -400, 164, -400, 182, 2615, 67, 193, 210,
2649 889, -400, -30, 198, 168, 128, 178, 125, 288, 125,
2650 176, 156, 212, -400, 2106, -400, -400, 304, 2361, -400,
2651 1913, 2106, 190, -400, -400, 1147, 180, 189, 2106, 67,
2652 -400, -400, 156, 17, 31, 1913, 2106, -400, -400, -400,
2653 -400, 2106, -400, -400, -400, 2106, 1913, -400, -400, 16,
2654 -400, 125, 192, -400, 222, -400, 193, 266, 2615, -400,
2655 -400, -400, 203, 7, 194, -400, -400, 2615, 234, 213,
2656 281, -400, 214, 224, -400, -400, 31, -400, 278, -400,
2657 2615, -52, -400, 209, 222, -400, 125, 231, -400, -400,
2658 -400, 2106, 242, 217, 7, -400, -400, -400, -400, -400,
2659 -400, -400, 321, -400, -400, 1913, -400, 1913, 156, 1405,
2660 -400, 340, -400, 324, 223, 286, -400, 2554, 1788, -400,
2661 -400, -400, 1788, 1788, 156, -400, -400, 225, -400, -400,
2662 227, 216, 226, 1534, -400, -400, -400, -400, 33, -400,
2663 -400, 1788, -400, 233, 237, 238, -400, 1405, -400, -400,
2664 350, -400, -400, -400, -400, 1788, 248, 245, 230, 255,
2665 -400, 16, 1788, -400, 256, 258, 156, -400, -400
2668 /* YYPGOTO[NTERM-NUM]. */
2669 static const yytype_int16 yypgoto[] =
2671 -400, -400, 205, -400, 312, -290, -400, 53, -399, -29,
2672 1, -56, -83, 49, 2, -39, 334, 262, 45, -400,
2673 -400, -400, -400, -400, -400, -400, -400, -400, -400, -400,
2674 -400, -400, -400, -400, -400, -44, -42, -400, -400, -23,
2675 -400, -20, -400, -400, -400, -400, -400, -400, -400, -400,
2676 9, 77, -400, -400, -400, -400, 0, -400, 318, -400,
2677 -400, -400, 50, -400, 56, -400, -90, -400, -75, -400,
2678 -400, -55, -400, 3, -400, -400, 6, -9, -400, -384,
2679 -400, -304, -77, 4, -400, -400, -400, -400, -400, 386,
2680 -92, 15, 35, -246, -400, -93, -400, -400, -400, -400,
2681 -400, -400, -400, -115, -119, 370, -48, -400, 179, -400,
2682 -13, -400, -400, -400, -400, -400
2685 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
2686 positive, shift that token. If negative, reduce the rule which
2687 number is the opposite. If zero, do what YYDEFACT says.
2688 If YYTABLE_NINF, syntax error. */
2689 #define YYTABLE_NINF -155
2690 static const yytype_int16 yytable[] =
2692 68, 53, 55, 73, 75, 100, 226, 217, 158, 157,
2693 103, 352, 244, 249, 250, 433, 234, 310, 138, 331,
2694 331, 96, 86, 111, 92, 93, 118, 119, 381, 120,
2695 121, 122, 124, 129, 158, 96, 376, -70, 94, 87,
2696 441, 220, 221, 240, 2, 193, 194, 195, 169, 54,
2697 71, 68, 53, 55, 73, 75, 72, 422, 13, 14,
2698 15, 109, 17, 423, 19, 101, 110, 262, 442, 492,
2699 92, 93, 391, 493, 494, 241, 211, 24, 212, 421,
2700 457, 213, 254, 263, 94, 414, 29, 30, 31, 97,
2701 195, 124, 501, 113, 232, 114, 129, 313, 92, 93,
2702 54, 71, 387, 105, 89, 91, 509, 72, 98, 332,
2703 420, 88, 94, 515, 129, 406, 450, 343, 308, 124,
2704 124, 212, 108, 344, 213, 148, 104, 514, 92, 93,
2705 378, 397, 379, 398, 107, 311, 419, 149, 169, 353,
2706 354, 312, 94, 112, 151, 214, 95, 215, 228, 231,
2707 235, 68, 53, 55, 73, 75, 268, 269, 270, 271,
2708 272, 273, 274, 275, 276, 277, 278, 279, 280, 281,
2709 282, 283, 284, 285, 286, 287, 288, 289, 290, 291,
2710 238, 388, 237, 293, 294, 295, 296, 297, 298, 299,
2711 300, 301, 302, 303, 304, 305, 306, 307, 129, 309,
2712 54, 71, 160, 124, 239, 315, 242, 72, 243, 337,
2713 245, 161, 477, 246, 252, 160, 162, 163, 255, 68,
2714 53, 321, -71, 124, 257, 129, 350, 346, 495, 164,
2715 327, 165, 160, 258, 259, 2, 377, 260, 261, 265,
2716 338, 161, 266, 292, 314, 124, 124, 163, 329, 13,
2717 14, 15, 412, 17, 240, 19, -113, 328, 336, 349,
2718 347, 165, 355, 356, 342, 400, 351, 403, 24, 361,
2719 518, 429, 357, 359, 367, 365, 461, 29, 30, 31,
2720 369, 370, 371, 373, 331, 254, 386, 411, 375, 382,
2721 2, 383, -112, 384, 254, 391, 385, 395, 368, 399,
2722 396, 405, 428, 401, 13, 14, 15, 409, 17, 403,
2723 19, 415, 407, 432, 158, 413, 129, 435, 68, 53,
2724 321, 416, 436, 24, 474, 447, 68, 53, 321, 158,
2725 462, 461, 29, 30, 31, 440, 378, 338, 449, 451,
2726 158, 458, 455, 487, 460, 452, 468, 431, 469, 488,
2727 496, 408, 497, 507, 489, 512, 256, 498, 124, 193,
2728 194, 195, -153, 150, 502, 417, 511, 438, 503, 170,
2729 504, 374, 475, 129, 476, 68, 53, 321, 430, 510,
2730 206, 207, 208, 209, 210, 462, 513, 168, 516, 517,
2731 211, 154, 212, 247, 393, 213, -155, -155, -155, 158,
2732 470, 158, 471, 453, 178, 179, 454, 506, 499, 448,
2733 490, 500, 106, 439, 418, 123, 434, -154, 345, 0,
2734 193, 194, 195, 0, 196, 197, 198, 0, 467, 0,
2735 0, 0, 0, 0, 0, 0, 0, 463, 204, 205,
2736 0, 206, 207, 208, 209, 210, 193, 194, 195, 0,
2737 0, 211, 0, 212, 0, 0, 213, 0, 0, 481,
2738 479, 480, 485, 486, 0, 463, 0, 0, 0, 208,
2739 209, 210, 0, 0, 0, 0, 0, 211, 0, 212,
2740 0, 0, 213, 481, 479, 480, 485, 486, 0, 0,
2741 0, 0, 0, 0, 0, 0, 0, 481, 479, 480,
2742 485, 486, -4, 0, 0, 1, 2, 3, 4, 0,
2743 5, 6, 7, 8, 9, 10, 11, 0, 0, 12,
2744 13, 14, 15, 16, 17, 18, 19, 0, 0, 21,
2745 22, 0, 0, -155, 0, 0, 0, 23, 0, 24,
2746 25, 0, 26, 0, 27, 0, 28, 0, 29, 30,
2747 31, 0, 0, 32, 33, 0, 34, 35, 0, 0,
2748 0, 0, 0, 0, 36, 37, 0, 0, -155, -155,
2749 0, 38, 0, 0, 0, 0, 0, 0, 0, 0,
2750 0, 0, 0, 0, 193, 194, 195, 0, 196, 197,
2751 198, 0, 39, 40, 0, 0, 0, 0, 0, 0,
2752 0, 41, -155, -155, 0, 206, 207, 208, 209, 210,
2753 0, 0, 0, 42, 0, 211, 0, 212, 43, 44,
2754 213, 0, 0, 45, 0, 46, 0, 47, 0, 48,
2755 0, 0, 0, -4, 1, 2, 3, 4, 0, 5,
2756 6, 7, 8, 9, 10, 11, 0, 0, 0, 13,
2757 14, 15, 16, 17, 18, 19, 20, 0, 21, 22,
2758 130, 0, 131, 0, 0, 0, 23, 132, 24, 25,
2759 0, 26, 133, 27, 0, 28, 134, 29, 30, 31,
2760 0, 0, 32, 33, 0, 34, 35, 0, 0, 0,
2761 0, 0, 0, 36, 37, 0, 135, 0, 0, 0,
2762 38, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2763 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2764 0, 39, 40, 0, 0, 0, 0, 0, 0, 0,
2765 136, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2766 0, 0, 42, 0, 0, 0, 0, 43, 44, 0,
2767 0, 0, 45, 0, 46, 0, 47, 0, 48, 0,
2768 0, 0, 137, 1, 2, 3, 4, 0, 5, 6,
2769 7, 8, 9, 10, 11, 0, 0, 0, 13, 14,
2770 15, 16, 17, 18, 19, 20, 0, 21, 22, 130,
2771 0, 131, 0, 0, 0, 23, 132, 24, 25, 0,
2772 26, 133, 27, 0, 28, 134, 29, 30, 31, 0,
2773 0, 32, 33, 0, 34, 35, 0, 0, 0, 0,
2774 0, 0, 36, 37, 0, 135, 0, 0, 0, 38,
2775 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2776 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2777 39, 40, 0, 0, 0, 0, 0, 0, 0, 136,
2778 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2779 0, 42, 0, 0, 0, 0, 43, 44, 0, 0,
2780 0, 45, 0, 46, 0, 47, 0, 48, 0, 0,
2781 0, 253, 1, 2, 3, 4, 0, 5, 6, 7,
2782 8, 9, 10, 11, 0, 0, 0, 13, 14, 15,
2783 16, 17, 18, 19, 20, 0, 21, 22, 130, 0,
2784 131, 0, 0, 0, 23, 132, 24, 25, 0, 26,
2785 133, 27, 0, 28, 134, 29, 30, 31, 0, 0,
2786 32, 33, 0, 34, 35, 0, 0, 0, 0, 0,
2787 0, 36, 37, 0, 135, 0, 0, 0, 38, 0,
2788 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2789 0, 0, 0, 0, 0, 0, 0, 0, 0, 39,
2790 40, 0, 0, 0, 0, 0, 0, 0, 136, 0,
2791 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2792 42, 0, 0, 0, 0, 43, 44, 0, 0, 0,
2793 45, 0, 46, 0, 47, 0, 48, 0, 0, 0,
2794 394, 1, 2, 3, 4, 0, 5, 6, 7, 8,
2795 9, 10, 11, 0, 0, 12, 13, 14, 15, 16,
2796 17, 18, 19, 0, 0, 21, 22, 0, 0, 0,
2797 0, 0, 0, 23, 0, 24, 25, 0, 26, 0,
2798 27, 0, 28, 0, 29, 30, 31, 0, 0, 32,
2799 33, 0, 34, 35, 0, 0, 0, 0, 0, 0,
2800 36, 37, 0, 0, 0, 0, 0, 38, 0, 0,
2801 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2802 0, 0, 0, 0, 0, 0, 0, 0, 39, 40,
2803 0, 0, 0, 0, 0, 0, 0, 41, 0, 0,
2804 0, 0, 0, 0, 0, 0, 0, 0, 0, 42,
2805 0, 0, 0, 0, 43, 44, 0, 0, 0, 45,
2806 0, 46, 0, 47, 0, 48, 0, 0, 0, -3,
2807 1, 2, 3, 4, 0, 5, 6, 7, 8, 9,
2808 10, 11, 0, 0, 0, 13, 14, 15, 16, 17,
2809 18, 19, 0, 0, 21, 22, 0, 0, 0, 0,
2810 0, 0, 23, 0, 24, 25, 0, 26, 0, 27,
2811 0, 28, 0, 29, 30, 31, 0, 0, 32, 33,
2812 0, 34, 35, 0, 0, 0, 0, 0, 0, 36,
2813 37, 0, 0, 0, 0, 0, 38, 0, 0, 0,
2814 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2815 0, 0, 0, 0, 0, 0, 0, 39, 40, 0,
2816 0, 0, 0, 0, 0, 0, 316, 0, 0, 0,
2817 0, 0, 0, 0, 0, 0, 0, 0, 42, 0,
2818 0, 0, 0, 43, 44, 0, 0, 0, 45, 0,
2819 46, 0, 47, 0, 48, 0, 0, 0, -15, 1,
2820 2, 3, 4, 0, 5, 6, 7, 8, 9, 10,
2821 11, 0, 0, 0, 13, 14, 15, 16, 17, 18,
2822 19, 0, 0, 21, 22, 0, 0, 0, 0, 0,
2823 0, 23, 0, 24, 25, 0, 26, 0, 27, 0,
2824 28, 0, 29, 30, 31, 0, 0, 32, 33, 0,
2825 34, 35, 0, 0, 0, 0, 0, 0, 36, 37,
2826 0, 0, 0, 0, 0, 38, 0, 0, 0, 0,
2827 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2828 0, 0, 0, 0, 0, 0, 39, 40, 0, 0,
2829 0, 0, 0, 0, 0, 316, 0, 0, 0, 0,
2830 0, 0, 0, 0, 0, 0, 0, 42, 0, 0,
2831 0, 0, 43, 44, 0, 0, 0, 45, 0, 46,
2832 0, 47, 0, 48, 0, 0, 0, -16, 1, 2,
2833 3, 4, 0, 5, 6, 7, 8, 9, 10, 11,
2834 0, 0, 0, 13, 14, 15, 16, 17, 18, 19,
2835 0, 0, 21, 22, 0, 0, 0, 0, 0, 0,
2836 23, 0, 24, 25, 0, 26, 0, 27, 0, 28,
2837 0, 29, 30, 31, 0, 0, 32, 33, 0, 34,
2838 35, 0, 0, 0, 0, 0, 0, 36, 37, 0,
2839 0, 0, 0, 0, 38, 0, 0, 0, 0, 0,
2840 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2841 0, 0, 0, 0, 0, 39, 40, 0, 0, 0,
2842 0, 0, 0, 0, 478, 0, 0, 0, 0, 0,
2843 0, 0, 0, 0, 0, 0, 42, 0, 0, 0,
2844 0, 43, 44, 0, 0, 0, 45, 0, 46, 0,
2845 47, 0, 48, 0, 0, 0, -144, 1, 2, 3,
2846 4, 0, 5, 6, 7, 8, 9, 10, 11, 0,
2847 0, 0, 13, 14, 15, 16, 17, 18, 19, 0,
2848 0, 21, 22, 0, 0, 0, 0, 0, 0, 23,
2849 0, 24, 25, 0, 26, 0, 27, 0, 28, 0,
2850 29, 30, 31, 0, 0, 32, 33, 0, 34, 35,
2851 0, 0, 0, 0, 0, 0, 36, 37, 0, 0,
2852 0, 0, 0, 38, 0, 0, 0, 0, 0, 0,
2853 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2854 0, 0, 0, 0, 39, 40, 0, 0, 0, 0,
2855 0, 0, 0, 478, 0, 0, 0, 0, 0, 0,
2856 0, 0, 0, 0, 0, 42, 0, 0, 0, 0,
2857 43, 44, 0, 0, 0, 45, 0, 46, 0, 47,
2858 0, 48, 0, -3, 0, -145, 1, 2, 3, 4,
2859 0, 5, 6, 7, 8, 9, 10, 11, 0, 0,
2860 12, 13, 14, 15, 16, 17, 18, 19, 0, 0,
2861 21, 22, 0, 0, 0, 0, 0, 0, 23, 0,
2862 24, 25, 0, 26, 0, 27, 0, 28, 0, 29,
2863 30, 31, 0, 0, 32, 33, 0, 34, 35, 0,
2864 0, 0, 0, 0, 0, 36, 37, 0, 0, 0,
2865 0, 0, 38, 0, 0, 0, 0, 0, 0, 0,
2866 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2867 0, 0, 0, 39, 40, 0, 0, 0, 0, 0,
2868 0, 0, 41, 0, 0, 0, 0, 0, 0, 0,
2869 0, 0, 0, 0, 42, 0, 0, 0, 0, 43,
2870 44, 0, 0, 0, 45, 0, 46, 0, 47, 0,
2871 48, 1, 2, 3, 4, 0, 5, 6, 7, 8,
2872 9, 10, 11, 0, -120, 0, 13, 14, 15, 16,
2873 17, 18, 19, 20, 0, 21, 22, 130, 0, 131,
2874 0, 0, 0, 23, 132, 24, 25, 0, 26, 133,
2875 27, 0, 28, 134, 29, 30, 31, 0, 0, 32,
2876 33, 0, 34, 35, 0, 0, 0, 0, 0, 0,
2877 36, 37, 0, 135, 0, 0, 0, 38, 0, 0,
2878 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2879 0, 0, 0, 0, 0, 0, 0, 0, 39, 40,
2880 0, 0, 0, 0, 0, 0, 0, 136, 0, 0,
2881 0, 0, 0, 0, 0, 0, 0, 0, 0, 42,
2882 0, 0, 0, 0, 43, 44, 0, 0, 0, 45,
2883 0, 46, 0, 47, 0, 48, 1, 2, 3, 4,
2884 0, 5, 6, 7, 8, 9, 10, 11, 0, 0,
2885 0, 13, 14, 15, 16, 17, 18, 19, 20, 0,
2886 21, 22, 130, 0, 131, 0, 0, 0, 23, 132,
2887 24, 25, 0, 26, 133, 27, 0, 28, 134, 29,
2888 30, 31, 0, 0, 32, 33, 0, 34, 35, 0,
2889 0, 0, 0, 0, 0, 36, 37, 0, 135, 0,
2890 0, 0, 38, 0, 0, 0, 0, 0, 0, 0,
2891 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2892 0, 0, 0, 39, 40, 0, 0, 0, 0, 0,
2893 0, 0, 136, 0, 0, 0, 0, 0, 0, 0,
2894 0, 0, 0, 0, 42, 0, 0, 0, 0, 43,
2895 44, 0, 0, 0, 45, 0, 46, 0, 47, 152,
2896 48, 3, 4, 0, 5, 6, 7, 0, 0, 0,
2897 0, 0, 0, 0, 0, 0, 0, 0, 0, 18,
2898 0, 20, 0, 21, 22, 0, 0, 131, 0, 0,
2899 0, 23, 0, 0, 0, 0, 0, 0, 27, 0,
2900 28, 153, 0, 0, 0, 0, 0, 0, 33, 0,
2901 34, 35, 0, 0, 0, 0, 0, 0, 36, 0,
2902 0, 0, 0, 0, 0, 38, 0, 0, 0, 99,
2903 0, 3, 4, 0, 5, 6, 7, 0, 0, 0,
2904 0, 0, 0, 0, 0, 0, 39, 40, 0, 18,
2905 0, 20, 0, 21, 22, 0, 0, 0, 0, 0,
2906 0, 23, 0, 0, 0, 0, 0, 42, 27, 0,
2907 28, 0, 43, 44, 0, 0, 0, 45, 33, 46,
2908 34, 35, 0, 48, 99, 0, 3, 4, 36, 5,
2909 6, 7, 0, 0, 0, 38, 0, 0, 0, 0,
2910 0, 0, 0, 0, 18, 0, 20, 0, 21, 22,
2911 0, 0, 0, 0, 0, 0, 39, 40, 0, 0,
2912 0, 0, 0, 0, 0, 28, 0, 0, 0, 0,
2913 0, 0, 0, 33, 0, 34, 35, 42, 0, 0,
2914 0, 0, 43, 44, 0, 0, 0, 45, 0, 46,
2915 38, 0, 0, 48, 0, 0, 0, 0, 0, 0,
2916 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2917 0, 39, 40, 0, 0, 0, 0, 0, 170, 0,
2918 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2919 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2920 0, 0, 45, 0, 46, 171, 172, 173, 48, 174,
2921 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
2922 185, 186, 187, 188, 189, 190, 191, 192, 0, 193,
2923 194, 195, 0, 196, 197, 198, 0, 0, 0, 0,
2924 0, 199, 200, 0, 201, 202, 203, 204, 205, 170,
2925 206, 207, 208, 209, 210, 0, 0, 0, 0, 0,
2926 211, 0, 212, 0, 0, 213, 0, 0, 0, 0,
2927 0, 339, 0, 0, 0, 0, 171, 172, 173, 0,
2928 174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
2929 184, 185, 186, 187, 188, 189, 190, 191, 192, 0,
2930 193, 194, 195, 0, 196, 197, 198, 0, 0, 0,
2931 0, 0, 199, 200, 0, 201, 202, 203, 204, 205,
2932 170, 206, 207, 208, 209, 210, 0, 0, 0, 0,
2933 0, 211, 0, 212, 0, 0, 213, 0, 0, 0,
2934 0, 0, 372, 0, 0, 0, 0, 171, 172, 173,
2935 0, 174, 175, 176, 177, 178, 179, 180, 181, 182,
2936 183, 184, 185, 186, 187, 188, 189, 190, 191, 192,
2937 0, 193, 194, 195, 0, 196, 197, 198, 0, 0,
2938 0, 0, 0, 199, 200, 0, 201, 202, 203, 204,
2939 205, 170, 206, 207, 208, 209, 210, 0, 0, 0,
2940 0, 0, 211, 0, 212, 0, 0, 213, 0, 0,
2941 0, 0, 0, 410, 0, 0, 0, 0, 171, 172,
2942 173, 0, 174, 175, 176, 177, 178, 179, 180, 181,
2943 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
2944 192, 0, 193, 194, 195, 0, 196, 197, 198, 0,
2945 0, 0, 170, 0, 199, 200, 364, 201, 202, 203,
2946 204, 205, 0, 206, 207, 208, 209, 210, 0, 0,
2947 0, 0, 0, 211, 0, 212, 0, 0, 213, 171,
2948 172, 173, 0, 174, 175, 176, 177, 178, 179, 180,
2949 181, 182, 183, 184, 185, 186, 187, 188, 189, 190,
2950 191, 192, 0, 193, 194, 195, 0, 196, 197, 198,
2951 0, 0, 0, 170, 0, 199, 200, 0, 201, 202,
2952 203, 204, 205, 0, 206, 207, 208, 209, 210, 0,
2953 0, 0, 0, 0, 211, 0, 212, 366, 0, 213,
2954 171, 172, 173, 0, 174, 175, 176, 177, 178, 179,
2955 180, 181, 182, 183, 184, 185, 186, 187, 188, 189,
2956 190, 191, 192, 0, 193, 194, 195, 0, 196, 197,
2957 198, 0, 0, 0, 170, 0, 199, 200, 491, 201,
2958 202, 203, 204, 205, 0, 206, 207, 208, 209, 210,
2959 0, 0, 0, 0, 0, 211, 0, 212, 0, 0,
2960 213, 171, 172, 173, 0, 174, 175, 176, 177, 178,
2961 179, 180, 181, 182, 183, 184, 185, 186, 187, 188,
2962 189, 190, 191, 192, 0, 193, 194, 195, 0, 196,
2963 197, 198, 0, 0, 0, 170, 0, 199, 200, 0,
2964 201, 202, 203, 204, 205, 0, 206, 207, 208, 209,
2965 210, 0, 0, 0, 0, 0, 211, 0, 212, 0,
2966 0, 213, 171, 172, 173, 0, 174, 175, 176, 177,
2967 178, 179, 0, 0, 0, 0, 0, 0, 0, 0,
2968 0, 0, 0, 0, 192, 0, 193, 194, 195, 0,
2969 196, 197, 198, 0, 0, 0, 170, 0, 0, 0,
2970 0, 201, 202, 203, 204, 205, 0, 206, 207, 208,
2971 209, 210, 0, 0, 0, 0, 0, 211, 0, 212,
2972 0, 0, 213, 171, 172, 173, 0, 174, 175, 176,
2973 177, 178, 179, 0, 0, 0, 0, 0, 0, 0,
2974 0, 0, 0, 0, 0, 0, 0, 193, 194, 195,
2975 0, 196, 197, 198, 0, 0, 0, 170, 0, 0,
2976 0, 0, 201, 202, 203, 204, 205, 0, 206, 207,
2977 208, 209, 210, 0, 0, 0, 0, 0, 211, 0,
2978 212, 0, 0, 213, 171, 172, 173, 0, 174, 175,
2979 176, 177, 178, 179, 0, 0, 0, 0, 0, 0,
2980 0, 0, 0, 0, 0, 0, 0, 0, 193, 194,
2981 195, 0, 196, 197, 198, 0, 0, 0, 170, 0,
2982 0, 0, 0, 0, 202, 203, 204, 205, 0, 206,
2983 207, 208, 209, 210, 0, 0, 0, 0, 0, 211,
2984 0, 212, 0, 0, 213, 171, 172, 173, 0, 174,
2985 175, 176, 177, 178, 179, 0, 0, 0, 0, 0,
2986 0, 0, 0, 0, 0, 0, 0, 0, 0, 193,
2987 194, 195, 0, 196, 197, 198, 0, 0, 0, 170,
2988 0, 0, 0, 0, 0, 0, 203, 204, 205, 0,
2989 206, 207, 208, 209, 210, 0, 0, 0, 0, 0,
2990 211, 0, 212, 0, 0, 213, 171, 172, 173, 0,
2991 174, 175, 176, 177, 178, 179, 0, 0, 0, 0,
2992 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2993 193, 194, 195, 0, 196, 197, 198, 0, 0, 0,
2994 170, 0, 0, 0, 0, 0, 0, -155, 204, 205,
2995 0, 206, 207, 208, 209, 210, 0, 0, 0, 0,
2996 0, 211, 0, 212, 0, 0, 213, 171, 172, 173,
2997 0, -155, -155, -155, -155, 178, 179, 0, 0, 0,
2998 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2999 0, 193, 194, 195, 0, 196, 197, 198, 0, 0,
3000 0, 0, 0, 0, 0, 0, 0, 0, 0, 204,
3001 205, 0, 206, 207, 208, 209, 210, 0, 0, 0,
3002 0, 0, 211, 0, 212, 0, 0, 213
3005 static const yytype_int16 yycheck[] =
3007 0, 0, 0, 0, 0, 18, 98, 90, 64, 57,
3008 23, 257, 127, 132, 133, 399, 109, 3, 47, 3,
3009 3, 12, 89, 36, 3, 4, 39, 40, 332, 42,
3010 43, 44, 45, 46, 90, 26, 326, 67, 17, 49,
3011 33, 125, 126, 100, 4, 90, 91, 92, 100, 0,
3012 0, 51, 51, 51, 51, 51, 0, 26, 18, 19,
3013 20, 121, 22, 32, 24, 3, 126, 34, 61, 468,
3014 3, 4, 102, 472, 473, 132, 121, 37, 123, 383,
3015 132, 126, 138, 50, 17, 375, 46, 47, 48, 12,
3016 92, 104, 491, 3, 107, 5, 109, 216, 3, 4,
3017 51, 51, 35, 26, 121, 121, 505, 51, 16, 93,
3018 93, 121, 17, 512, 127, 361, 420, 236, 211, 132,
3019 133, 123, 125, 238, 126, 3, 121, 511, 3, 4,
3020 102, 3, 104, 5, 121, 121, 382, 0, 100, 258,
3021 259, 127, 17, 121, 125, 3, 125, 121, 121, 126,
3022 3, 151, 151, 151, 151, 151, 169, 170, 171, 172,
3023 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
3024 183, 184, 185, 186, 187, 188, 189, 190, 191, 192,
3025 104, 114, 131, 196, 197, 198, 199, 200, 201, 202,
3026 203, 204, 205, 206, 207, 208, 209, 210, 211, 212,
3027 151, 151, 16, 216, 100, 218, 124, 151, 100, 114,
3028 3, 25, 458, 3, 3, 16, 30, 31, 125, 219,
3029 219, 219, 67, 236, 3, 238, 255, 240, 474, 43,
3030 221, 45, 16, 99, 67, 4, 329, 99, 3, 3,
3031 231, 25, 3, 3, 12, 258, 259, 31, 121, 18,
3032 19, 20, 371, 22, 100, 24, 126, 126, 132, 100,
3033 104, 45, 102, 3, 132, 357, 131, 359, 37, 3,
3034 516, 386, 53, 53, 89, 132, 45, 46, 47, 48,
3035 3, 132, 121, 131, 3, 341, 104, 370, 125, 132,
3036 4, 100, 126, 131, 350, 102, 132, 99, 311, 121,
3037 132, 125, 385, 15, 18, 19, 20, 3, 22, 401,
3038 24, 131, 100, 396, 370, 125, 329, 125, 318, 318,
3039 318, 132, 100, 37, 3, 131, 326, 326, 326, 385,
3040 99, 45, 46, 47, 48, 132, 102, 328, 125, 125,
3041 396, 132, 64, 3, 436, 121, 104, 395, 131, 25,
3042 125, 364, 125, 3, 131, 125, 151, 131, 371, 90,
3043 91, 92, 131, 51, 131, 378, 121, 406, 131, 39,
3044 132, 318, 455, 386, 457, 375, 375, 375, 391, 131,
3045 111, 112, 113, 114, 115, 99, 131, 69, 132, 131,
3046 121, 57, 123, 131, 349, 126, 66, 67, 68, 455,
3047 444, 457, 444, 426, 74, 75, 426, 497, 483, 418,
3048 465, 488, 26, 407, 379, 45, 401, 131, 239, -1,
3049 90, 91, 92, -1, 94, 95, 96, -1, 441, -1,
3050 -1, -1, -1, -1, -1, -1, -1, 437, 108, 109,
3051 -1, 111, 112, 113, 114, 115, 90, 91, 92, -1,
3052 -1, 121, -1, 123, -1, -1, 126, -1, -1, 459,
3053 459, 459, 459, 459, -1, 465, -1, -1, -1, 113,
3054 114, 115, -1, -1, -1, -1, -1, 121, -1, 123,
3055 -1, -1, 126, 483, 483, 483, 483, 483, -1, -1,
3056 -1, -1, -1, -1, -1, -1, -1, 497, 497, 497,
3057 497, 497, 0, -1, -1, 3, 4, 5, 6, -1,
3058 8, 9, 10, 11, 12, 13, 14, -1, -1, 17,
3059 18, 19, 20, 21, 22, 23, 24, -1, -1, 27,
3060 28, -1, -1, 39, -1, -1, -1, 35, -1, 37,
3061 38, -1, 40, -1, 42, -1, 44, -1, 46, 47,
3062 48, -1, -1, 51, 52, -1, 54, 55, -1, -1,
3063 -1, -1, -1, -1, 62, 63, -1, -1, 74, 75,
3064 -1, 69, -1, -1, -1, -1, -1, -1, -1, -1,
3065 -1, -1, -1, -1, 90, 91, 92, -1, 94, 95,
3066 96, -1, 90, 91, -1, -1, -1, -1, -1, -1,
3067 -1, 99, 108, 109, -1, 111, 112, 113, 114, 115,
3068 -1, -1, -1, 111, -1, 121, -1, 123, 116, 117,
3069 126, -1, -1, 121, -1, 123, -1, 125, -1, 127,
3070 -1, -1, -1, 131, 3, 4, 5, 6, -1, 8,
3071 9, 10, 11, 12, 13, 14, -1, -1, -1, 18,
3072 19, 20, 21, 22, 23, 24, 25, -1, 27, 28,
3073 29, -1, 31, -1, -1, -1, 35, 36, 37, 38,
3074 -1, 40, 41, 42, -1, 44, 45, 46, 47, 48,
3075 -1, -1, 51, 52, -1, 54, 55, -1, -1, -1,
3076 -1, -1, -1, 62, 63, -1, 65, -1, -1, -1,
3077 69, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3078 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3079 -1, 90, 91, -1, -1, -1, -1, -1, -1, -1,
3080 99, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3081 -1, -1, 111, -1, -1, -1, -1, 116, 117, -1,
3082 -1, -1, 121, -1, 123, -1, 125, -1, 127, -1,
3083 -1, -1, 131, 3, 4, 5, 6, -1, 8, 9,
3084 10, 11, 12, 13, 14, -1, -1, -1, 18, 19,
3085 20, 21, 22, 23, 24, 25, -1, 27, 28, 29,
3086 -1, 31, -1, -1, -1, 35, 36, 37, 38, -1,
3087 40, 41, 42, -1, 44, 45, 46, 47, 48, -1,
3088 -1, 51, 52, -1, 54, 55, -1, -1, -1, -1,
3089 -1, -1, 62, 63, -1, 65, -1, -1, -1, 69,
3090 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3091 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3092 90, 91, -1, -1, -1, -1, -1, -1, -1, 99,
3093 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3094 -1, 111, -1, -1, -1, -1, 116, 117, -1, -1,
3095 -1, 121, -1, 123, -1, 125, -1, 127, -1, -1,
3096 -1, 131, 3, 4, 5, 6, -1, 8, 9, 10,
3097 11, 12, 13, 14, -1, -1, -1, 18, 19, 20,
3098 21, 22, 23, 24, 25, -1, 27, 28, 29, -1,
3099 31, -1, -1, -1, 35, 36, 37, 38, -1, 40,
3100 41, 42, -1, 44, 45, 46, 47, 48, -1, -1,
3101 51, 52, -1, 54, 55, -1, -1, -1, -1, -1,
3102 -1, 62, 63, -1, 65, -1, -1, -1, 69, -1,
3103 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3104 -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
3105 91, -1, -1, -1, -1, -1, -1, -1, 99, -1,
3106 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3107 111, -1, -1, -1, -1, 116, 117, -1, -1, -1,
3108 121, -1, 123, -1, 125, -1, 127, -1, -1, -1,
3109 131, 3, 4, 5, 6, -1, 8, 9, 10, 11,
3110 12, 13, 14, -1, -1, 17, 18, 19, 20, 21,
3111 22, 23, 24, -1, -1, 27, 28, -1, -1, -1,
3112 -1, -1, -1, 35, -1, 37, 38, -1, 40, -1,
3113 42, -1, 44, -1, 46, 47, 48, -1, -1, 51,
3114 52, -1, 54, 55, -1, -1, -1, -1, -1, -1,
3115 62, 63, -1, -1, -1, -1, -1, 69, -1, -1,
3116 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3117 -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
3118 -1, -1, -1, -1, -1, -1, -1, 99, -1, -1,
3119 -1, -1, -1, -1, -1, -1, -1, -1, -1, 111,
3120 -1, -1, -1, -1, 116, 117, -1, -1, -1, 121,
3121 -1, 123, -1, 125, -1, 127, -1, -1, -1, 131,
3122 3, 4, 5, 6, -1, 8, 9, 10, 11, 12,
3123 13, 14, -1, -1, -1, 18, 19, 20, 21, 22,
3124 23, 24, -1, -1, 27, 28, -1, -1, -1, -1,
3125 -1, -1, 35, -1, 37, 38, -1, 40, -1, 42,
3126 -1, 44, -1, 46, 47, 48, -1, -1, 51, 52,
3127 -1, 54, 55, -1, -1, -1, -1, -1, -1, 62,
3128 63, -1, -1, -1, -1, -1, 69, -1, -1, -1,
3129 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3130 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
3131 -1, -1, -1, -1, -1, -1, 99, -1, -1, -1,
3132 -1, -1, -1, -1, -1, -1, -1, -1, 111, -1,
3133 -1, -1, -1, 116, 117, -1, -1, -1, 121, -1,
3134 123, -1, 125, -1, 127, -1, -1, -1, 131, 3,
3135 4, 5, 6, -1, 8, 9, 10, 11, 12, 13,
3136 14, -1, -1, -1, 18, 19, 20, 21, 22, 23,
3137 24, -1, -1, 27, 28, -1, -1, -1, -1, -1,
3138 -1, 35, -1, 37, 38, -1, 40, -1, 42, -1,
3139 44, -1, 46, 47, 48, -1, -1, 51, 52, -1,
3140 54, 55, -1, -1, -1, -1, -1, -1, 62, 63,
3141 -1, -1, -1, -1, -1, 69, -1, -1, -1, -1,
3142 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3143 -1, -1, -1, -1, -1, -1, 90, 91, -1, -1,
3144 -1, -1, -1, -1, -1, 99, -1, -1, -1, -1,
3145 -1, -1, -1, -1, -1, -1, -1, 111, -1, -1,
3146 -1, -1, 116, 117, -1, -1, -1, 121, -1, 123,
3147 -1, 125, -1, 127, -1, -1, -1, 131, 3, 4,
3148 5, 6, -1, 8, 9, 10, 11, 12, 13, 14,
3149 -1, -1, -1, 18, 19, 20, 21, 22, 23, 24,
3150 -1, -1, 27, 28, -1, -1, -1, -1, -1, -1,
3151 35, -1, 37, 38, -1, 40, -1, 42, -1, 44,
3152 -1, 46, 47, 48, -1, -1, 51, 52, -1, 54,
3153 55, -1, -1, -1, -1, -1, -1, 62, 63, -1,
3154 -1, -1, -1, -1, 69, -1, -1, -1, -1, -1,
3155 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3156 -1, -1, -1, -1, -1, 90, 91, -1, -1, -1,
3157 -1, -1, -1, -1, 99, -1, -1, -1, -1, -1,
3158 -1, -1, -1, -1, -1, -1, 111, -1, -1, -1,
3159 -1, 116, 117, -1, -1, -1, 121, -1, 123, -1,
3160 125, -1, 127, -1, -1, -1, 131, 3, 4, 5,
3161 6, -1, 8, 9, 10, 11, 12, 13, 14, -1,
3162 -1, -1, 18, 19, 20, 21, 22, 23, 24, -1,
3163 -1, 27, 28, -1, -1, -1, -1, -1, -1, 35,
3164 -1, 37, 38, -1, 40, -1, 42, -1, 44, -1,
3165 46, 47, 48, -1, -1, 51, 52, -1, 54, 55,
3166 -1, -1, -1, -1, -1, -1, 62, 63, -1, -1,
3167 -1, -1, -1, 69, -1, -1, -1, -1, -1, -1,
3168 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3169 -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
3170 -1, -1, -1, 99, -1, -1, -1, -1, -1, -1,
3171 -1, -1, -1, -1, -1, 111, -1, -1, -1, -1,
3172 116, 117, -1, -1, -1, 121, -1, 123, -1, 125,
3173 -1, 127, -1, 0, -1, 131, 3, 4, 5, 6,
3174 -1, 8, 9, 10, 11, 12, 13, 14, -1, -1,
3175 17, 18, 19, 20, 21, 22, 23, 24, -1, -1,
3176 27, 28, -1, -1, -1, -1, -1, -1, 35, -1,
3177 37, 38, -1, 40, -1, 42, -1, 44, -1, 46,
3178 47, 48, -1, -1, 51, 52, -1, 54, 55, -1,
3179 -1, -1, -1, -1, -1, 62, 63, -1, -1, -1,
3180 -1, -1, 69, -1, -1, -1, -1, -1, -1, -1,
3181 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3182 -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
3183 -1, -1, 99, -1, -1, -1, -1, -1, -1, -1,
3184 -1, -1, -1, -1, 111, -1, -1, -1, -1, 116,
3185 117, -1, -1, -1, 121, -1, 123, -1, 125, -1,
3186 127, 3, 4, 5, 6, -1, 8, 9, 10, 11,
3187 12, 13, 14, -1, 16, -1, 18, 19, 20, 21,
3188 22, 23, 24, 25, -1, 27, 28, 29, -1, 31,
3189 -1, -1, -1, 35, 36, 37, 38, -1, 40, 41,
3190 42, -1, 44, 45, 46, 47, 48, -1, -1, 51,
3191 52, -1, 54, 55, -1, -1, -1, -1, -1, -1,
3192 62, 63, -1, 65, -1, -1, -1, 69, -1, -1,
3193 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3194 -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
3195 -1, -1, -1, -1, -1, -1, -1, 99, -1, -1,
3196 -1, -1, -1, -1, -1, -1, -1, -1, -1, 111,
3197 -1, -1, -1, -1, 116, 117, -1, -1, -1, 121,
3198 -1, 123, -1, 125, -1, 127, 3, 4, 5, 6,
3199 -1, 8, 9, 10, 11, 12, 13, 14, -1, -1,
3200 -1, 18, 19, 20, 21, 22, 23, 24, 25, -1,
3201 27, 28, 29, -1, 31, -1, -1, -1, 35, 36,
3202 37, 38, -1, 40, 41, 42, -1, 44, 45, 46,
3203 47, 48, -1, -1, 51, 52, -1, 54, 55, -1,
3204 -1, -1, -1, -1, -1, 62, 63, -1, 65, -1,
3205 -1, -1, 69, -1, -1, -1, -1, -1, -1, -1,
3206 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3207 -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
3208 -1, -1, 99, -1, -1, -1, -1, -1, -1, -1,
3209 -1, -1, -1, -1, 111, -1, -1, -1, -1, 116,
3210 117, -1, -1, -1, 121, -1, 123, -1, 125, 3,
3211 127, 5, 6, -1, 8, 9, 10, -1, -1, -1,
3212 -1, -1, -1, -1, -1, -1, -1, -1, -1, 23,
3213 -1, 25, -1, 27, 28, -1, -1, 31, -1, -1,
3214 -1, 35, -1, -1, -1, -1, -1, -1, 42, -1,
3215 44, 45, -1, -1, -1, -1, -1, -1, 52, -1,
3216 54, 55, -1, -1, -1, -1, -1, -1, 62, -1,
3217 -1, -1, -1, -1, -1, 69, -1, -1, -1, 3,
3218 -1, 5, 6, -1, 8, 9, 10, -1, -1, -1,
3219 -1, -1, -1, -1, -1, -1, 90, 91, -1, 23,
3220 -1, 25, -1, 27, 28, -1, -1, -1, -1, -1,
3221 -1, 35, -1, -1, -1, -1, -1, 111, 42, -1,
3222 44, -1, 116, 117, -1, -1, -1, 121, 52, 123,
3223 54, 55, -1, 127, 3, -1, 5, 6, 62, 8,
3224 9, 10, -1, -1, -1, 69, -1, -1, -1, -1,
3225 -1, -1, -1, -1, 23, -1, 25, -1, 27, 28,
3226 -1, -1, -1, -1, -1, -1, 90, 91, -1, -1,
3227 -1, -1, -1, -1, -1, 44, -1, -1, -1, -1,
3228 -1, -1, -1, 52, -1, 54, 55, 111, -1, -1,
3229 -1, -1, 116, 117, -1, -1, -1, 121, -1, 123,
3230 69, -1, -1, 127, -1, -1, -1, -1, -1, -1,
3231 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3232 -1, 90, 91, -1, -1, -1, -1, -1, 39, -1,
3233 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3234 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3235 -1, -1, 121, -1, 123, 66, 67, 68, 127, 70,
3236 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
3237 81, 82, 83, 84, 85, 86, 87, 88, -1, 90,
3238 91, 92, -1, 94, 95, 96, -1, -1, -1, -1,
3239 -1, 102, 103, -1, 105, 106, 107, 108, 109, 39,
3240 111, 112, 113, 114, 115, -1, -1, -1, -1, -1,
3241 121, -1, 123, -1, -1, 126, -1, -1, -1, -1,
3242 -1, 132, -1, -1, -1, -1, 66, 67, 68, -1,
3243 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
3244 80, 81, 82, 83, 84, 85, 86, 87, 88, -1,
3245 90, 91, 92, -1, 94, 95, 96, -1, -1, -1,
3246 -1, -1, 102, 103, -1, 105, 106, 107, 108, 109,
3247 39, 111, 112, 113, 114, 115, -1, -1, -1, -1,
3248 -1, 121, -1, 123, -1, -1, 126, -1, -1, -1,
3249 -1, -1, 132, -1, -1, -1, -1, 66, 67, 68,
3250 -1, 70, 71, 72, 73, 74, 75, 76, 77, 78,
3251 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
3252 -1, 90, 91, 92, -1, 94, 95, 96, -1, -1,
3253 -1, -1, -1, 102, 103, -1, 105, 106, 107, 108,
3254 109, 39, 111, 112, 113, 114, 115, -1, -1, -1,
3255 -1, -1, 121, -1, 123, -1, -1, 126, -1, -1,
3256 -1, -1, -1, 132, -1, -1, -1, -1, 66, 67,
3257 68, -1, 70, 71, 72, 73, 74, 75, 76, 77,
3258 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
3259 88, -1, 90, 91, 92, -1, 94, 95, 96, -1,
3260 -1, -1, 39, -1, 102, 103, 104, 105, 106, 107,
3261 108, 109, -1, 111, 112, 113, 114, 115, -1, -1,
3262 -1, -1, -1, 121, -1, 123, -1, -1, 126, 66,
3263 67, 68, -1, 70, 71, 72, 73, 74, 75, 76,
3264 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
3265 87, 88, -1, 90, 91, 92, -1, 94, 95, 96,
3266 -1, -1, -1, 39, -1, 102, 103, -1, 105, 106,
3267 107, 108, 109, -1, 111, 112, 113, 114, 115, -1,
3268 -1, -1, -1, -1, 121, -1, 123, 124, -1, 126,
3269 66, 67, 68, -1, 70, 71, 72, 73, 74, 75,
3270 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
3271 86, 87, 88, -1, 90, 91, 92, -1, 94, 95,
3272 96, -1, -1, -1, 39, -1, 102, 103, 104, 105,
3273 106, 107, 108, 109, -1, 111, 112, 113, 114, 115,
3274 -1, -1, -1, -1, -1, 121, -1, 123, -1, -1,
3275 126, 66, 67, 68, -1, 70, 71, 72, 73, 74,
3276 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
3277 85, 86, 87, 88, -1, 90, 91, 92, -1, 94,
3278 95, 96, -1, -1, -1, 39, -1, 102, 103, -1,
3279 105, 106, 107, 108, 109, -1, 111, 112, 113, 114,
3280 115, -1, -1, -1, -1, -1, 121, -1, 123, -1,
3281 -1, 126, 66, 67, 68, -1, 70, 71, 72, 73,
3282 74, 75, -1, -1, -1, -1, -1, -1, -1, -1,
3283 -1, -1, -1, -1, 88, -1, 90, 91, 92, -1,
3284 94, 95, 96, -1, -1, -1, 39, -1, -1, -1,
3285 -1, 105, 106, 107, 108, 109, -1, 111, 112, 113,
3286 114, 115, -1, -1, -1, -1, -1, 121, -1, 123,
3287 -1, -1, 126, 66, 67, 68, -1, 70, 71, 72,
3288 73, 74, 75, -1, -1, -1, -1, -1, -1, -1,
3289 -1, -1, -1, -1, -1, -1, -1, 90, 91, 92,
3290 -1, 94, 95, 96, -1, -1, -1, 39, -1, -1,
3291 -1, -1, 105, 106, 107, 108, 109, -1, 111, 112,
3292 113, 114, 115, -1, -1, -1, -1, -1, 121, -1,
3293 123, -1, -1, 126, 66, 67, 68, -1, 70, 71,
3294 72, 73, 74, 75, -1, -1, -1, -1, -1, -1,
3295 -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
3296 92, -1, 94, 95, 96, -1, -1, -1, 39, -1,
3297 -1, -1, -1, -1, 106, 107, 108, 109, -1, 111,
3298 112, 113, 114, 115, -1, -1, -1, -1, -1, 121,
3299 -1, 123, -1, -1, 126, 66, 67, 68, -1, 70,
3300 71, 72, 73, 74, 75, -1, -1, -1, -1, -1,
3301 -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
3302 91, 92, -1, 94, 95, 96, -1, -1, -1, 39,
3303 -1, -1, -1, -1, -1, -1, 107, 108, 109, -1,
3304 111, 112, 113, 114, 115, -1, -1, -1, -1, -1,
3305 121, -1, 123, -1, -1, 126, 66, 67, 68, -1,
3306 70, 71, 72, 73, 74, 75, -1, -1, -1, -1,
3307 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3308 90, 91, 92, -1, 94, 95, 96, -1, -1, -1,
3309 39, -1, -1, -1, -1, -1, -1, 107, 108, 109,
3310 -1, 111, 112, 113, 114, 115, -1, -1, -1, -1,
3311 -1, 121, -1, 123, -1, -1, 126, 66, 67, 68,
3312 -1, 70, 71, 72, 73, 74, 75, -1, -1, -1,
3313 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3314 -1, 90, 91, 92, -1, 94, 95, 96, -1, -1,
3315 -1, -1, -1, -1, -1, -1, -1, -1, -1, 108,
3316 109, -1, 111, 112, 113, 114, 115, -1, -1, -1,
3317 -1, -1, 121, -1, 123, -1, -1, 126
3320 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
3321 symbol of state STATE-NUM. */
3322 static const yytype_uint8 yystos[] =
3324 0, 3, 4, 5, 6, 8, 9, 10, 11, 12,
3325 13, 14, 17, 18, 19, 20, 21, 22, 23, 24,
3326 25, 27, 28, 35, 37, 38, 40, 42, 44, 46,
3327 47, 48, 51, 52, 54, 55, 62, 63, 69, 90,
3328 91, 99, 111, 116, 117, 121, 123, 125, 127, 134,
3329 135, 136, 137, 143, 146, 147, 153, 157, 158, 159,
3330 160, 162, 170, 178, 181, 182, 185, 188, 189, 190,
3331 191, 195, 197, 206, 211, 216, 219, 232, 233, 234,
3332 239, 243, 244, 245, 247, 248, 89, 49, 121, 121,
3333 163, 121, 3, 4, 17, 125, 183, 184, 16, 3,
3334 243, 3, 218, 243, 121, 184, 222, 121, 125, 121,
3335 126, 243, 121, 3, 5, 240, 241, 242, 243, 243,
3336 243, 243, 243, 238, 243, 228, 229, 230, 236, 243,
3337 29, 31, 36, 41, 45, 65, 99, 131, 142, 143,
3338 144, 147, 149, 164, 165, 180, 189, 235, 3, 0,
3339 137, 125, 3, 45, 149, 155, 156, 239, 144, 145,
3340 16, 25, 30, 31, 43, 45, 205, 246, 191, 100,
3341 39, 66, 67, 68, 70, 71, 72, 73, 74, 75,
3342 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
3343 86, 87, 88, 90, 91, 92, 94, 95, 96, 102,
3344 103, 105, 106, 107, 108, 109, 111, 112, 113, 114,
3345 115, 121, 123, 126, 3, 121, 161, 145, 171, 187,
3346 125, 126, 183, 184, 221, 222, 223, 231, 121, 237,
3347 238, 126, 243, 179, 228, 3, 154, 131, 104, 100,
3348 100, 132, 124, 100, 236, 3, 3, 150, 151, 237,
3349 237, 150, 3, 131, 144, 125, 135, 3, 99, 67,
3350 99, 3, 34, 50, 215, 3, 3, 207, 243, 243,
3351 243, 243, 243, 243, 243, 243, 243, 243, 243, 243,
3352 243, 243, 243, 243, 243, 243, 243, 243, 243, 243,
3353 243, 243, 3, 243, 243, 243, 243, 243, 243, 243,
3354 243, 243, 243, 243, 243, 243, 243, 243, 228, 243,
3355 3, 121, 127, 237, 12, 243, 99, 138, 139, 140,
3356 146, 147, 195, 197, 206, 216, 186, 183, 126, 121,
3357 227, 3, 93, 212, 213, 214, 132, 114, 183, 132,
3358 141, 142, 132, 237, 236, 241, 243, 104, 226, 100,
3359 142, 131, 226, 237, 237, 102, 3, 53, 192, 53,
3360 193, 3, 208, 209, 104, 132, 124, 89, 243, 3,
3361 132, 121, 132, 131, 140, 125, 138, 228, 102, 104,
3362 210, 214, 132, 100, 131, 132, 104, 35, 114, 223,
3363 225, 102, 148, 151, 131, 99, 132, 3, 5, 121,
3364 223, 15, 194, 223, 224, 125, 226, 100, 243, 3,
3365 132, 145, 237, 125, 138, 131, 132, 243, 225, 226,
3366 93, 214, 26, 32, 172, 174, 176, 177, 145, 236,
3367 243, 239, 145, 212, 224, 125, 100, 198, 148, 209,
3368 132, 33, 61, 166, 167, 168, 169, 131, 210, 125,
3369 214, 125, 121, 172, 174, 64, 152, 132, 132, 196,
3370 223, 45, 99, 189, 202, 203, 204, 243, 104, 131,
3371 168, 169, 220, 175, 3, 145, 145, 226, 99, 143,
3372 147, 189, 199, 200, 201, 206, 216, 3, 25, 131,
3373 204, 104, 141, 141, 141, 226, 125, 125, 131, 201,
3374 215, 141, 131, 131, 132, 217, 199, 3, 173, 141,
3375 131, 121, 125, 131, 212, 141, 132, 131, 226
3378 #define yyerrok (yyerrstatus = 0)
3379 #define yyclearin (yychar = YYEMPTY)
3380 #define YYEMPTY (-2)
3383 #define YYACCEPT goto yyacceptlab
3384 #define YYABORT goto yyabortlab
3385 #define YYERROR goto yyerrorlab
3388 /* Like YYERROR except do call yyerror. This remains here temporarily
3389 to ease the transition to the new meaning of YYERROR, for GCC.
3390 Once GCC version 2 has supplanted version 1, this can go. */
3392 #define YYFAIL goto yyerrlab
3394 #define YYRECOVERING() (!!yyerrstatus)
3396 #define YYBACKUP(Token, Value) \
3398 if (yychar == YYEMPTY && yylen == 1) \
3402 yytoken = YYTRANSLATE (yychar); \
3408 yyerror (YY_("syntax error: cannot back up")); \
3415 #define YYERRCODE 256
3418 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
3419 If N is 0, then set CURRENT to the empty location which ends
3420 the previous symbol: RHS[0] (always defined). */
3422 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
3423 #ifndef YYLLOC_DEFAULT
3424 # define YYLLOC_DEFAULT(Current, Rhs, N) \
3428 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
3429 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
3430 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
3431 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
3435 (Current).first_line = (Current).last_line = \
3436 YYRHSLOC (Rhs, 0).last_line; \
3437 (Current).first_column = (Current).last_column = \
3438 YYRHSLOC (Rhs, 0).last_column; \
3444 /* YY_LOCATION_PRINT -- Print the location on the stream.
3445 This macro was not mandated originally: define only if we know
3446 we won't break user code: when these are the locations we know. */
3448 #ifndef YY_LOCATION_PRINT
3449 # if YYLTYPE_IS_TRIVIAL
3450 # define YY_LOCATION_PRINT(File, Loc) \
3451 fprintf (File, "%d.%d-%d.%d", \
3452 (Loc).first_line, (Loc).first_column, \
3453 (Loc).last_line, (Loc).last_column)
3455 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
3460 /* YYLEX -- calling `yylex' with the right arguments. */
3463 # define YYLEX yylex (YYLEX_PARAM)
3465 # define YYLEX yylex ()
3468 /* Enable debugging if requested. */
3472 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
3473 # define YYFPRINTF fprintf
3476 # define YYDPRINTF(Args) \
3482 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
3486 YYFPRINTF (stderr, "%s ", Title); \
3487 yy_symbol_print (stderr, \
3489 YYFPRINTF (stderr, "\n"); \
3494 /*--------------------------------.
3495 | Print this symbol on YYOUTPUT. |
3496 `--------------------------------*/
3499 #if (defined __STDC__ || defined __C99__FUNC__ \
3500 || defined __cplusplus || defined _MSC_VER)
3502 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
3505 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
3508 YYSTYPE const * const yyvaluep;
3514 if (yytype < YYNTOKENS)
3515 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
3527 /*--------------------------------.
3528 | Print this symbol on YYOUTPUT. |
3529 `--------------------------------*/
3531 #if (defined __STDC__ || defined __C99__FUNC__ \
3532 || defined __cplusplus || defined _MSC_VER)
3534 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
3537 yy_symbol_print (yyoutput, yytype, yyvaluep)
3540 YYSTYPE const * const yyvaluep;
3543 if (yytype < YYNTOKENS)
3544 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
3546 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
3548 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
3549 YYFPRINTF (yyoutput, ")");
3552 /*------------------------------------------------------------------.
3553 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
3555 `------------------------------------------------------------------*/
3557 #if (defined __STDC__ || defined __C99__FUNC__ \
3558 || defined __cplusplus || defined _MSC_VER)
3560 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
3563 yy_stack_print (yybottom, yytop)
3564 yytype_int16 *yybottom;
3565 yytype_int16 *yytop;
3568 YYFPRINTF (stderr, "Stack now");
3569 for (; yybottom <= yytop; yybottom++)
3571 int yybot = *yybottom;
3572 YYFPRINTF (stderr, " %d", yybot);
3574 YYFPRINTF (stderr, "\n");
3577 # define YY_STACK_PRINT(Bottom, Top) \
3580 yy_stack_print ((Bottom), (Top)); \
3584 /*------------------------------------------------.
3585 | Report that the YYRULE is going to be reduced. |
3586 `------------------------------------------------*/
3588 #if (defined __STDC__ || defined __C99__FUNC__ \
3589 || defined __cplusplus || defined _MSC_VER)
3591 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
3594 yy_reduce_print (yyvsp, yyrule)
3599 int yynrhs = yyr2[yyrule];
3601 unsigned long int yylno = yyrline[yyrule];
3602 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
3604 /* The symbols being reduced. */
3605 for (yyi = 0; yyi < yynrhs; yyi++)
3607 YYFPRINTF (stderr, " $%d = ", yyi + 1);
3608 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
3609 &(yyvsp[(yyi + 1) - (yynrhs)])
3611 YYFPRINTF (stderr, "\n");
3615 # define YY_REDUCE_PRINT(Rule) \
3618 yy_reduce_print (yyvsp, Rule); \
3621 /* Nonzero means print parse trace. It is left uninitialized so that
3622 multiple parsers can coexist. */
3624 #else /* !YYDEBUG */
3625 # define YYDPRINTF(Args)
3626 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
3627 # define YY_STACK_PRINT(Bottom, Top)
3628 # define YY_REDUCE_PRINT(Rule)
3629 #endif /* !YYDEBUG */
3632 /* YYINITDEPTH -- initial size of the parser's stacks. */
3634 # define YYINITDEPTH 200
3637 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
3638 if the built-in stack extension method is used).
3640 Do not make this value too large; the results are undefined if
3641 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
3642 evaluated with infinite-precision integer arithmetic. */
3645 # define YYMAXDEPTH 10000
3653 # if defined __GLIBC__ && defined _STRING_H
3654 # define yystrlen strlen
3656 /* Return the length of YYSTR. */
3657 #if (defined __STDC__ || defined __C99__FUNC__ \
3658 || defined __cplusplus || defined _MSC_VER)
3660 yystrlen (const char *yystr)
3668 for (yylen = 0; yystr[yylen]; yylen++)
3676 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
3677 # define yystpcpy stpcpy
3679 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
3681 #if (defined __STDC__ || defined __C99__FUNC__ \
3682 || defined __cplusplus || defined _MSC_VER)
3684 yystpcpy (char *yydest, const char *yysrc)
3687 yystpcpy (yydest, yysrc)
3693 const char *yys = yysrc;
3695 while ((*yyd++ = *yys++) != '\0')
3704 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
3705 quotes and backslashes, so that it's suitable for yyerror. The
3706 heuristic is that double-quoting is unnecessary unless the string
3707 contains an apostrophe, a comma, or backslash (other than
3708 backslash-backslash). YYSTR is taken from yytname. If YYRES is
3709 null, do not copy; instead, return the length of what the result
3712 yytnamerr (char *yyres, const char *yystr)
3717 char const *yyp = yystr;
3724 goto do_not_strip_quotes;
3728 goto do_not_strip_quotes;
3741 do_not_strip_quotes: ;
3745 return yystrlen (yystr);
3747 return yystpcpy (yyres, yystr) - yyres;
3751 /* Copy into YYRESULT an error message about the unexpected token
3752 YYCHAR while in state YYSTATE. Return the number of bytes copied,
3753 including the terminating null byte. If YYRESULT is null, do not
3754 copy anything; just return the number of bytes that would be
3755 copied. As a special case, return 0 if an ordinary "syntax error"
3756 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
3757 size calculation. */
3759 yysyntax_error (char *yyresult, int yystate, int yychar)
3761 int yyn = yypact[yystate];
3763 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
3767 int yytype = YYTRANSLATE (yychar);
3768 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
3769 YYSIZE_T yysize = yysize0;
3771 int yysize_overflow = 0;
3772 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
3773 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
3777 /* This is so xgettext sees the translatable formats that are
3778 constructed on the fly. */
3779 YY_("syntax error, unexpected %s");
3780 YY_("syntax error, unexpected %s, expecting %s");
3781 YY_("syntax error, unexpected %s, expecting %s or %s");
3782 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
3783 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
3787 static char const yyunexpected[] = "syntax error, unexpected %s";
3788 static char const yyexpecting[] = ", expecting %s";
3789 static char const yyor[] = " or %s";
3790 char yyformat[sizeof yyunexpected
3791 + sizeof yyexpecting - 1
3792 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
3793 * (sizeof yyor - 1))];
3794 char const *yyprefix = yyexpecting;
3796 /* Start YYX at -YYN if negative to avoid negative indexes in
3798 int yyxbegin = yyn < 0 ? -yyn : 0;
3800 /* Stay within bounds of both yycheck and yytname. */
3801 int yychecklim = YYLAST - yyn + 1;
3802 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
3805 yyarg[0] = yytname[yytype];
3806 yyfmt = yystpcpy (yyformat, yyunexpected);
3808 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
3809 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
3811 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
3815 yyformat[sizeof yyunexpected - 1] = '\0';
3818 yyarg[yycount++] = yytname[yyx];
3819 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
3820 yysize_overflow |= (yysize1 < yysize);
3822 yyfmt = yystpcpy (yyfmt, yyprefix);
3826 yyf = YY_(yyformat);
3827 yysize1 = yysize + yystrlen (yyf);
3828 yysize_overflow |= (yysize1 < yysize);
3831 if (yysize_overflow)
3832 return YYSIZE_MAXIMUM;
3836 /* Avoid sprintf, as that infringes on the user's name space.
3837 Don't have undefined behavior even if the translation
3838 produced a string with the wrong number of "%s"s. */
3839 char *yyp = yyresult;
3841 while ((*yyp = *yyf) != '\0')
3843 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
3845 yyp += yytnamerr (yyp, yyarg[yyi++]);
3858 #endif /* YYERROR_VERBOSE */
3861 /*-----------------------------------------------.
3862 | Release the memory associated to this symbol. |
3863 `-----------------------------------------------*/
3866 #if (defined __STDC__ || defined __C99__FUNC__ \
3867 || defined __cplusplus || defined _MSC_VER)
3869 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
3872 yydestruct (yymsg, yytype, yyvaluep)
3882 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
3892 /* Prevent warnings from -Wmissing-prototypes. */
3893 #ifdef YYPARSE_PARAM
3894 #if defined __STDC__ || defined __cplusplus
3895 int yyparse (void *YYPARSE_PARAM);
3899 #else /* ! YYPARSE_PARAM */
3900 #if defined __STDC__ || defined __cplusplus
3905 #endif /* ! YYPARSE_PARAM */
3908 /* The lookahead symbol. */
3911 /* The semantic value of the lookahead symbol. */
3914 /* Number of syntax errors so far. */
3919 /*-------------------------.
3920 | yyparse or yypush_parse. |
3921 `-------------------------*/
3923 #ifdef YYPARSE_PARAM
3924 #if (defined __STDC__ || defined __C99__FUNC__ \
3925 || defined __cplusplus || defined _MSC_VER)
3927 yyparse (void *YYPARSE_PARAM)
3930 yyparse (YYPARSE_PARAM)
3931 void *YYPARSE_PARAM;
3933 #else /* ! YYPARSE_PARAM */
3934 #if (defined __STDC__ || defined __C99__FUNC__ \
3935 || defined __cplusplus || defined _MSC_VER)
3948 /* Number of tokens to shift before error messages enabled. */
3951 /* The stacks and their tools:
3952 `yyss': related to states.
3953 `yyvs': related to semantic values.
3955 Refer to the stacks thru separate pointers, to allow yyoverflow
3956 to reallocate them elsewhere. */
3958 /* The state stack. */
3959 yytype_int16 yyssa[YYINITDEPTH];
3961 yytype_int16 *yyssp;
3963 /* The semantic value stack. */
3964 YYSTYPE yyvsa[YYINITDEPTH];
3968 YYSIZE_T yystacksize;
3972 /* Lookahead token as an internal (translated) token number. */
3974 /* The variables used to return semantic value and location from the
3979 /* Buffer for error messages, and its allocated size. */
3981 char *yymsg = yymsgbuf;
3982 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
3985 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
3987 /* The number of symbols on the RHS of the reduced rule.
3988 Keep to zero when no symbol should be popped. */
3994 yystacksize = YYINITDEPTH;
3996 YYDPRINTF ((stderr, "Starting parse\n"));
4001 yychar = YYEMPTY; /* Cause a token to be read. */
4003 /* Initialize stack pointers.
4004 Waste one element of value and location stack
4005 so that they stay on the same level as the state stack.
4006 The wasted elements are never initialized. */
4012 /*------------------------------------------------------------.
4013 | yynewstate -- Push a new state, which is found in yystate. |
4014 `------------------------------------------------------------*/
4016 /* In all cases, when you get here, the value and location stacks
4017 have just been pushed. So pushing a state here evens the stacks. */
4023 if (yyss + yystacksize - 1 <= yyssp)
4025 /* Get the current used size of the three stacks, in elements. */
4026 YYSIZE_T yysize = yyssp - yyss + 1;
4030 /* Give user a chance to reallocate the stack. Use copies of
4031 these so that the &'s don't force the real ones into
4033 YYSTYPE *yyvs1 = yyvs;
4034 yytype_int16 *yyss1 = yyss;
4036 /* Each stack pointer address is followed by the size of the
4037 data in use in that stack, in bytes. This used to be a
4038 conditional around just the two extra args, but that might
4039 be undefined if yyoverflow is a macro. */
4040 yyoverflow (YY_("memory exhausted"),
4041 &yyss1, yysize * sizeof (*yyssp),
4042 &yyvs1, yysize * sizeof (*yyvsp),
4048 #else /* no yyoverflow */
4049 # ifndef YYSTACK_RELOCATE
4050 goto yyexhaustedlab;
4052 /* Extend the stack our own way. */
4053 if (YYMAXDEPTH <= yystacksize)
4054 goto yyexhaustedlab;
4056 if (YYMAXDEPTH < yystacksize)
4057 yystacksize = YYMAXDEPTH;
4060 yytype_int16 *yyss1 = yyss;
4061 union yyalloc *yyptr =
4062 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
4064 goto yyexhaustedlab;
4065 YYSTACK_RELOCATE (yyss_alloc, yyss);
4066 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
4067 # undef YYSTACK_RELOCATE
4069 YYSTACK_FREE (yyss1);
4072 #endif /* no yyoverflow */
4074 yyssp = yyss + yysize - 1;
4075 yyvsp = yyvs + yysize - 1;
4077 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
4078 (unsigned long int) yystacksize));
4080 if (yyss + yystacksize - 1 <= yyssp)
4084 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
4086 if (yystate == YYFINAL)
4096 /* Do appropriate processing given the current state. Read a
4097 lookahead token if we need one and don't already have one. */
4099 /* First try to decide what to do without reference to lookahead token. */
4100 yyn = yypact[yystate];
4101 if (yyn == YYPACT_NINF)
4104 /* Not known => get a lookahead token if don't already have one. */
4106 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
4107 if (yychar == YYEMPTY)
4109 YYDPRINTF ((stderr, "Reading a token: "));
4113 if (yychar <= YYEOF)
4115 yychar = yytoken = YYEOF;
4116 YYDPRINTF ((stderr, "Now at end of input.\n"));
4120 yytoken = YYTRANSLATE (yychar);
4121 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
4124 /* If the proper action on seeing token YYTOKEN is to reduce or to
4125 detect an error, take that action. */
4127 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
4132 if (yyn == 0 || yyn == YYTABLE_NINF)
4138 /* Count tokens shifted since error; after three, turn off error
4143 /* Shift the lookahead token. */
4144 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
4146 /* Discard the shifted token. */
4155 /*-----------------------------------------------------------.
4156 | yydefault -- do the default action for the current state. |
4157 `-----------------------------------------------------------*/
4159 yyn = yydefact[yystate];
4165 /*-----------------------------.
4166 | yyreduce -- Do a reduction. |
4167 `-----------------------------*/
4169 /* yyn is the number of a rule to reduce with. */
4172 /* If YYLEN is nonzero, implement the default value of the action:
4175 Otherwise, the following line sets YYVAL to garbage.
4176 This behavior is undocumented and Bison
4177 users should not rely upon it. Assigning to YYVAL
4178 unconditionally makes the parser a bit smaller, and it avoids a
4179 GCC warning that YYVAL may be used uninitialized. */
4180 yyval = yyvsp[1-yylen];
4183 YY_REDUCE_PRINT (yyn);
4190 /* Line 1464 of skeleton.m4 */
4191 #line 1861 "parser.y"
4192 {PASS_ALWAYS as3_pass=(yyvsp[(1) - (4)].number_int);}
4201 /* Line 1464 of skeleton.m4 */
4202 #line 1873 "parser.y"
4203 {PASS_ALWAYS as3_pass=(yyvsp[(1) - (4)].number_int);}
4212 /* Line 1464 of skeleton.m4 */
4213 #line 1876 "parser.y"
4214 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4223 /* Line 1464 of skeleton.m4 */
4224 #line 1877 "parser.y"
4225 {(yyval.code)=code_new();}
4234 /* Line 1464 of skeleton.m4 */
4235 #line 1879 "parser.y"
4237 (yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));
4247 /* Line 1464 of skeleton.m4 */
4248 #line 1882 "parser.y"
4249 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4258 /* Line 1464 of skeleton.m4 */
4259 #line 1897 "parser.y"
4260 {(yyval.code)=(yyvsp[(2) - (3)].code);}
4269 /* Line 1464 of skeleton.m4 */
4270 #line 1898 "parser.y"
4280 /* Line 1464 of skeleton.m4 */
4281 #line 1901 "parser.y"
4291 /* Line 1464 of skeleton.m4 */
4292 #line 1908 "parser.y"
4296 (yyval.code) = (yyvsp[(3) - (4)].code);
4300 as3_pass=(yyvsp[(1) - (4)].number_int);
4310 /* Line 1464 of skeleton.m4 */
4311 #line 1920 "parser.y"
4312 {(yyval.code)=(yyvsp[(1) - (2)].code);}
4321 /* Line 1464 of skeleton.m4 */
4322 #line 1921 "parser.y"
4323 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4332 /* Line 1464 of skeleton.m4 */
4333 #line 1925 "parser.y"
4335 code_t**cc = &global->init->method->body->code;
4336 *cc = code_append(*cc, (yyvsp[(1) - (1)].code));
4346 /* Line 1464 of skeleton.m4 */
4347 #line 1932 "parser.y"
4350 (yyval.number_int)=as3_pass;
4351 char*key = concat3((yyvsp[(1) - (3)].id),"::",(yyvsp[(3) - (3)].id));
4352 if(!definitions || !dict_contains(definitions, key)) {
4365 /* Line 1464 of skeleton.m4 */
4366 #line 1951 "parser.y"
4367 {(yyval.node)=(yyvsp[(2) - (2)].node);}
4376 /* Line 1464 of skeleton.m4 */
4377 #line 1952 "parser.y"
4378 {(yyval.node)=mkdummynode();}
4387 /* Line 1464 of skeleton.m4 */
4388 #line 1954 "parser.y"
4389 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4398 /* Line 1464 of skeleton.m4 */
4399 #line 1955 "parser.y"
4400 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4409 /* Line 1464 of skeleton.m4 */
4410 #line 1957 "parser.y"
4411 {(yyval.code) = (yyvsp[(1) - (1)].code);}
4420 /* Line 1464 of skeleton.m4 */
4421 #line 1958 "parser.y"
4422 {(yyval.code) = code_append((yyvsp[(1) - (3)].code), (yyvsp[(3) - (3)].code));}
4431 /* Line 1464 of skeleton.m4 */
4432 #line 1961 "parser.y"
4435 if(variable_exists((yyvsp[(1) - (3)].id)))
4436 syntaxerror("Variable %s already defined", (yyvsp[(1) - (3)].id));
4438 new_variable((yyvsp[(1) - (3)].id), 0, 1, 0);
4443 if(state->method->uses_slots) {
4444 variable_t* v = find_slot(state, (yyvsp[(1) - (3)].id));
4446 // this variable is stored in a slot
4448 v->type = (yyvsp[(2) - (3)].classinfo);
4454 index = new_variable((yyvsp[(1) - (3)].id), (yyvsp[(2) - (3)].classinfo), 1, 0);
4457 (yyval.code) = slot?abc_getscopeobject(0, 1):0;
4459 typedcode_t v = node_read((yyvsp[(3) - (3)].node));
4460 if(!is_subtype_of(v.t, (yyvsp[(2) - (3)].classinfo))) {
4461 syntaxerror("Can't convert %s to %s", v.t->name, (yyvsp[(2) - (3)].classinfo)->name);
4463 if((yyvsp[(2) - (3)].classinfo)) {
4464 if(v.c->prev || v.c->opcode != OPCODE_PUSHUNDEFINED) {
4465 (yyval.code) = code_append((yyval.code), v.c);
4466 (yyval.code) = converttype((yyval.code), v.t, (yyvsp[(2) - (3)].classinfo));
4469 (yyval.code) = defaultvalue((yyval.code), (yyvsp[(2) - (3)].classinfo));
4472 if(v.c->prev || v.c->opcode != OPCODE_PUSHUNDEFINED) {
4473 (yyval.code) = code_append((yyval.code), v.c);
4474 (yyval.code) = abc_coerce_a((yyval.code));
4476 // don't do anything
4478 code_free((yyval.code));
4484 (yyval.code) = abc_setslot((yyval.code), index);
4486 (yyval.code) = abc_setlocal((yyval.code), index);
4497 /* Line 1464 of skeleton.m4 */
4498 #line 2020 "parser.y"
4499 {(yyval.code) = code_new();}
4508 /* Line 1464 of skeleton.m4 */
4509 #line 2021 "parser.y"
4510 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4519 /* Line 1464 of skeleton.m4 */
4520 #line 2024 "parser.y"
4521 {PASS12 new_state();}
4530 /* Line 1464 of skeleton.m4 */
4531 #line 2024 "parser.y"
4534 (yyval.code) = code_new();
4535 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (7)].value).c);
4536 code_t*myjmp,*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4538 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].code));
4539 if((yyvsp[(7) - (7)].code)) {
4540 myjmp = (yyval.code) = abc_jump((yyval.code), 0);
4542 myif->branch = (yyval.code) = abc_nop((yyval.code));
4543 if((yyvsp[(7) - (7)].code)) {
4544 (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (7)].code));
4545 myjmp->branch = (yyval.code) = abc_nop((yyval.code));
4547 (yyval.code) = var_block((yyval.code));
4558 /* Line 1464 of skeleton.m4 */
4559 #line 2043 "parser.y"
4560 {(yyval.code)=code_new();}
4569 /* Line 1464 of skeleton.m4 */
4570 #line 2050 "parser.y"
4572 PASS1 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable((yyvsp[(2) - (3)].id),0,1,0);
4573 PASS2 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable((yyvsp[(2) - (3)].id),(yyvsp[(3) - (3)].classinfo),1,0);
4583 /* Line 1464 of skeleton.m4 */
4584 #line 2054 "parser.y"
4587 (yyval.id)=(yyvsp[(1) - (1)].id);
4597 /* Line 1464 of skeleton.m4 */
4598 #line 2059 "parser.y"
4599 {PASS12 new_state();(yyval.for_start).name=(yyvsp[(1) - (2)].id);(yyval.for_start).each=0;}
4608 /* Line 1464 of skeleton.m4 */
4609 #line 2060 "parser.y"
4610 {PASS12 new_state();(yyval.for_start).name=(yyvsp[(1) - (3)].id);(yyval.for_start).each=1;}
4619 /* Line 1464 of skeleton.m4 */
4620 #line 2062 "parser.y"
4622 if((yyvsp[(1) - (8)].for_start).each) syntaxerror("invalid syntax: ; not allowed in for each statement");
4623 (yyval.code) = code_new();
4624 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (8)].code));
4625 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4626 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (8)].value).c);
4627 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4628 (yyval.code) = code_append((yyval.code), (yyvsp[(8) - (8)].code));
4629 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4630 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (8)].code));
4631 (yyval.code) = abc_jump((yyval.code), loopstart);
4632 code_t*out = (yyval.code) = abc_nop((yyval.code));
4633 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, out);
4634 continuejumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, cont);
4637 (yyval.code) = var_block((yyval.code));
4648 /* Line 1464 of skeleton.m4 */
4649 #line 2082 "parser.y"
4651 variable_t*var = find_variable(state, (yyvsp[(2) - (6)].id));
4653 syntaxerror("variable %s not known in this scope", (yyvsp[(2) - (6)].id));
4656 char*tmp1name = concat2((yyvsp[(2) - (6)].id), "__tmp1__");
4657 int it = new_variable(tmp1name, TYPE_INT, 0, 0);
4658 char*tmp2name = concat2((yyvsp[(2) - (6)].id), "__array__");
4659 int array = new_variable(tmp1name, 0, 0, 0);
4661 (yyval.code) = code_new();
4662 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
4663 (yyval.code) = abc_coerce_a((yyval.code));
4664 (yyval.code) = abc_setlocal((yyval.code), array);
4665 (yyval.code) = abc_pushbyte((yyval.code), 0);
4666 (yyval.code) = abc_setlocal((yyval.code), it);
4668 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4670 (yyval.code) = abc_hasnext2((yyval.code), array, it);
4671 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4672 (yyval.code) = abc_getlocal((yyval.code), array);
4673 (yyval.code) = abc_getlocal((yyval.code), it);
4674 if(!(yyvsp[(1) - (6)].for_start).each)
4675 (yyval.code) = abc_nextname((yyval.code));
4677 (yyval.code) = abc_nextvalue((yyval.code));
4678 (yyval.code) = converttype((yyval.code), 0, var->type);
4679 (yyval.code) = abc_setlocal((yyval.code), var->index);
4681 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
4682 (yyval.code) = abc_jump((yyval.code), loopstart);
4684 code_t*out = (yyval.code) = abc_nop((yyval.code));
4685 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, out);
4686 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, loopstart);
4690 (yyval.code) = var_block((yyval.code));
4705 /* Line 1464 of skeleton.m4 */
4706 #line 2130 "parser.y"
4707 {PASS12 new_state();}
4716 /* Line 1464 of skeleton.m4 */
4717 #line 2130 "parser.y"
4720 (yyval.code) = code_new();
4722 code_t*myjmp = (yyval.code) = abc_jump((yyval.code), 0);
4723 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4724 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
4725 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4726 myjmp->branch = cont;
4727 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
4728 (yyval.code) = abc_iftrue((yyval.code), loopstart);
4729 code_t*out = (yyval.code) = abc_nop((yyval.code));
4730 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].id), out);
4731 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].id), cont);
4733 (yyval.code) = var_block((yyval.code));
4744 /* Line 1464 of skeleton.m4 */
4745 #line 2149 "parser.y"
4746 {PASS12 new_state();}
4755 /* Line 1464 of skeleton.m4 */
4756 #line 2149 "parser.y"
4758 (yyval.code) = code_new();
4759 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4760 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (7)].code));
4761 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4762 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].value).c);
4763 (yyval.code) = abc_iftrue((yyval.code), loopstart);
4764 code_t*out = (yyval.code) = abc_nop((yyval.code));
4765 breakjumpsto((yyval.code), (yyvsp[(1) - (7)].id), out);
4766 continuejumpsto((yyval.code), (yyvsp[(1) - (7)].id), cont);
4768 (yyval.code) = var_block((yyval.code));
4779 /* Line 1464 of skeleton.m4 */
4780 #line 2164 "parser.y"
4782 (yyval.code) = abc___break__(0, "");
4792 /* Line 1464 of skeleton.m4 */
4793 #line 2167 "parser.y"
4795 (yyval.code) = abc___break__(0, (yyvsp[(2) - (2)].id));
4805 /* Line 1464 of skeleton.m4 */
4806 #line 2170 "parser.y"
4808 (yyval.code) = abc___continue__(0, "");
4818 /* Line 1464 of skeleton.m4 */
4819 #line 2173 "parser.y"
4821 (yyval.code) = abc___continue__(0, (yyvsp[(2) - (2)].id));
4831 /* Line 1464 of skeleton.m4 */
4832 #line 2177 "parser.y"
4842 /* Line 1464 of skeleton.m4 */
4843 #line 2178 "parser.y"
4844 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4853 /* Line 1464 of skeleton.m4 */
4854 #line 2179 "parser.y"
4855 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4864 /* Line 1464 of skeleton.m4 */
4865 #line 2180 "parser.y"
4866 {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
4875 /* Line 1464 of skeleton.m4 */
4876 #line 2181 "parser.y"
4877 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4886 /* Line 1464 of skeleton.m4 */
4887 #line 2182 "parser.y"
4888 {(yyval.code)=code_append((yyval.code),(yyvsp[(2) - (2)].code));}
4897 /* Line 1464 of skeleton.m4 */
4898 #line 2184 "parser.y"
4900 (yyval.code) = abc_getlocal(0, state->switch_var);
4901 (yyval.code) = code_append((yyval.code), node_read((yyvsp[(2) - (4)].node)).c);
4902 code_t*j = (yyval.code) = abc_ifne((yyval.code), 0);
4903 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (4)].code));
4904 if((yyval.code)->opcode != OPCODE___BREAK__) {
4905 (yyval.code) = abc___fallthrough__((yyval.code), "");
4907 code_t*e = (yyval.code) = abc_nop((yyval.code));
4918 /* Line 1464 of skeleton.m4 */
4919 #line 2195 "parser.y"
4921 (yyval.code) = (yyvsp[(3) - (3)].code);
4931 /* Line 1464 of skeleton.m4 */
4932 #line 2198 "parser.y"
4933 {PASS12 new_state();state->switch_var=alloc_local();}
4942 /* Line 1464 of skeleton.m4 */
4943 #line 2198 "parser.y"
4945 (yyval.code) = node_read((yyvsp[(4) - (8)].node)).c;
4946 (yyval.code) = abc_setlocal((yyval.code), state->switch_var);
4947 (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (8)].code));
4949 code_t*out = (yyval.code) = abc_kill((yyval.code), state->switch_var);
4950 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].id), out);
4952 code_t*c = (yyval.code),*lastblock=0;
4954 if(c->opcode == OPCODE_IFNE) {
4955 if(!c->next) syntaxerror("internal error in fallthrough handling");
4957 } else if(c->opcode == OPCODE___FALLTHROUGH__) {
4959 c->opcode = OPCODE_JUMP;
4960 c->branch = lastblock;
4962 /* fall through end of switch */
4963 c->opcode = OPCODE_NOP;
4969 (yyval.code) = var_block((yyval.code));
4980 /* Line 1464 of skeleton.m4 */
4981 #line 2229 "parser.y"
4982 {PASS12 new_state();
4983 state->exception_name=(yyvsp[(3) - (5)].id);
4984 PASS1 new_variable((yyvsp[(3) - (5)].id), 0, 0, 0);
4985 PASS2 new_variable((yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].classinfo), 0, 0);
4995 /* Line 1464 of skeleton.m4 */
4996 #line 2234 "parser.y"
4998 namespace_t name_ns = {ACCESS_PACKAGE, ""};
4999 multiname_t name = {QNAME, &name_ns, 0, (yyvsp[(3) - (9)].id)};
5001 NEW(abc_exception_t, e)
5002 e->exc_type = sig2mname((yyvsp[(4) - (9)].classinfo));
5003 e->var_name = multiname_clone(&name);
5004 (yyval.exception) = e;
5007 int i = find_variable_safe(state, (yyvsp[(3) - (9)].id))->index;
5008 e->target = c = abc_nop(0);
5009 c = abc_setlocal(c, i);
5010 c = code_append(c, code_dup(state->method->scope_code));
5011 c = code_append(c, (yyvsp[(8) - (9)].code));
5025 /* Line 1464 of skeleton.m4 */
5026 #line 2254 "parser.y"
5027 {PASS12 new_state();state->exception_name=0;}
5036 /* Line 1464 of skeleton.m4 */
5037 #line 2254 "parser.y"
5039 (yyvsp[(4) - (5)].code) = var_block((yyvsp[(4) - (5)].code));
5040 if(!(yyvsp[(4) - (5)].code)) {
5041 (yyval.exception)=0;
5043 NEW(abc_exception_t, e)
5044 e->exc_type = 0; //all exceptions
5045 e->var_name = 0; //no name
5048 e->to = code_append(e->to, (yyvsp[(4) - (5)].code));
5049 (yyval.exception) = e;
5061 /* Line 1464 of skeleton.m4 */
5062 #line 2270 "parser.y"
5063 {(yyval.catch_list).l=list_new();(yyval.catch_list).finally=0;list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));}
5072 /* Line 1464 of skeleton.m4 */
5073 #line 2271 "parser.y"
5074 {(yyval.catch_list)=(yyvsp[(1) - (2)].catch_list);list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));}
5083 /* Line 1464 of skeleton.m4 */
5084 #line 2272 "parser.y"
5085 {(yyval.catch_list)=(yyvsp[(1) - (1)].catch_list);}
5094 /* Line 1464 of skeleton.m4 */
5095 #line 2273 "parser.y"
5097 (yyval.catch_list) = (yyvsp[(1) - (2)].catch_list);
5098 (yyval.catch_list).finally = 0;
5099 if((yyvsp[(2) - (2)].exception)) {
5100 list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));
5101 (yyval.catch_list).finally = (yyvsp[(2) - (2)].exception)->to;(yyvsp[(2) - (2)].exception)->to=0;
5112 /* Line 1464 of skeleton.m4 */
5113 #line 2281 "parser.y"
5115 (yyval.catch_list).l=list_new();
5116 (yyval.catch_list).finally = 0;
5117 if((yyvsp[(1) - (1)].exception)) {
5118 list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));
5119 (yyval.catch_list).finally = (yyvsp[(1) - (1)].exception)->to;(yyvsp[(1) - (1)].exception)->to=0;
5130 /* Line 1464 of skeleton.m4 */
5131 #line 2290 "parser.y"
5132 {PASS12 new_state();
5133 state->method->has_exceptions=1;
5134 state->method->late_binding=1;//for invariant scope_code
5144 /* Line 1464 of skeleton.m4 */
5145 #line 2293 "parser.y"
5147 code_t*out = abc_nop(0);
5149 code_t*start = abc_nop(0);
5150 (yyval.code) = code_append(start, (yyvsp[(4) - (6)].code));
5151 if(!is_break_or_jump((yyvsp[(4) - (6)].code))) {
5152 (yyval.code) = abc_jump((yyval.code), out);
5154 code_t*end = (yyval.code) = abc_nop((yyval.code));
5157 if((yyvsp[(6) - (6)].catch_list).finally)
5158 tmp = new_variable("__finally__", 0, 0, 0);
5160 abc_exception_list_t*l = (yyvsp[(6) - (6)].catch_list).l;
5163 abc_exception_t*e = l->abc_exception;
5165 (yyval.code) = code_append((yyval.code), e->target);
5166 (yyval.code) = abc_jump((yyval.code), out);
5168 parserassert((ptroff_t)(yyvsp[(6) - (6)].catch_list).finally);
5170 e->target = (yyval.code) = abc_nop((yyval.code));
5171 (yyval.code) = code_append((yyval.code), code_dup(state->method->scope_code));
5172 (yyval.code) = abc___rethrow__((yyval.code));
5180 (yyval.code) = code_append((yyval.code), out);
5182 (yyval.code) = insert_finally((yyval.code), (yyvsp[(6) - (6)].catch_list).finally, tmp);
5184 list_concat(state->method->exceptions, (yyvsp[(6) - (6)].catch_list).l);
5186 (yyval.code) = var_block((yyval.code));
5197 /* Line 1464 of skeleton.m4 */
5198 #line 2339 "parser.y"
5200 (yyval.code)=(yyvsp[(2) - (2)].value).c;
5201 (yyval.code)=abc_throw((yyval.code));
5211 /* Line 1464 of skeleton.m4 */
5212 #line 2343 "parser.y"
5214 if(!state->exception_name)
5215 syntaxerror("re-throw only possible within a catch block");
5216 variable_t*v = find_variable(state, state->exception_name);
5217 (yyval.code)=code_new();
5218 (yyval.code)=abc_getlocal((yyval.code), v->index);
5219 (yyval.code)=abc_throw((yyval.code));
5229 /* Line 1464 of skeleton.m4 */
5230 #line 2354 "parser.y"
5233 if(state->method->has_exceptions) {
5234 int v = alloc_local();
5235 state->method->scope_code = abc_getlocal(state->method->scope_code, v);
5236 state->method->scope_code = abc_pushwith(state->method->scope_code);
5237 (yyval.value_list).number = v;
5239 (yyval.value_list).cc = (yyvsp[(3) - (4)].value).c;
5249 /* Line 1464 of skeleton.m4 */
5250 #line 2364 "parser.y"
5252 /* remove getlocal;pushwith from scope code again */
5253 state->method->scope_code = code_cutlast(code_cutlast(state->method->scope_code));
5255 (yyval.code) = (yyvsp[(1) - (2)].value_list).cc;
5256 if(state->method->has_exceptions) {
5257 (yyval.code) = abc_dup((yyval.code));
5258 (yyval.code) = abc_setlocal((yyval.code), (yyvsp[(1) - (2)].value_list).number);
5260 (yyval.code) = abc_pushwith((yyval.code));
5261 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (2)].code));
5262 (yyval.code) = abc_popscope((yyval.code));
5273 /* Line 1464 of skeleton.m4 */
5274 #line 2382 "parser.y"
5275 {PASS12 (yyval.id)="package";}
5284 /* Line 1464 of skeleton.m4 */
5285 #line 2383 "parser.y"
5286 {PASS12 (yyval.id)=(yyvsp[(1) - (1)].id);}
5295 /* Line 1464 of skeleton.m4 */
5296 #line 2385 "parser.y"
5297 {PASS12 (yyval.id) = concat3((yyvsp[(1) - (3)].id),".",(yyvsp[(3) - (3)].id));free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;}
5306 /* Line 1464 of skeleton.m4 */
5307 #line 2386 "parser.y"
5308 {PASS12 (yyval.id)=strdup((yyvsp[(1) - (1)].id));}
5317 /* Line 1464 of skeleton.m4 */
5318 #line 2388 "parser.y"
5319 {PASS12 startpackage((yyvsp[(2) - (3)].id));free((yyvsp[(2) - (3)].id));(yyvsp[(2) - (3)].id)=0;}
5328 /* Line 1464 of skeleton.m4 */
5329 #line 2389 "parser.y"
5330 {PASS12 endpackage();(yyval.code)=0;}
5339 /* Line 1464 of skeleton.m4 */
5340 #line 2390 "parser.y"
5341 {PASS12 startpackage("");}
5350 /* Line 1464 of skeleton.m4 */
5351 #line 2391 "parser.y"
5352 {PASS12 endpackage();(yyval.code)=0;}
5361 /* Line 1464 of skeleton.m4 */
5362 #line 2413 "parser.y"
5365 slotinfo_t*s = registry_find((yyvsp[(2) - (2)].classinfo)->package, (yyvsp[(2) - (2)].classinfo)->name);
5366 if(!s && as3_pass==1) {// || !(s->flags&FLAG_BUILTIN)) {
5367 as3_schedule_class((yyvsp[(2) - (2)].classinfo)->package, (yyvsp[(2) - (2)].classinfo)->name);
5369 classinfo_t*c = (yyvsp[(2) - (2)].classinfo);
5371 syntaxerror("Couldn't import class\n");
5372 state_has_imports();
5373 dict_put(state->imports, c->name, c);
5374 import_toplevel(c->package);
5385 /* Line 1464 of skeleton.m4 */
5386 #line 2427 "parser.y"
5389 if(strncmp("flash.", (yyvsp[(2) - (4)].id), 6) && as3_pass==1) {
5390 as3_schedule_package((yyvsp[(2) - (4)].id));
5394 i->package = (yyvsp[(2) - (4)].id);
5395 state_has_imports();
5396 list_append(state->wildcard_imports, i);
5397 import_toplevel(i->package);
5408 /* Line 1464 of skeleton.m4 */
5409 #line 2443 "parser.y"
5410 {PASS12 (yyval.flags).flags=0;(yyval.flags).ns=0;}
5419 /* Line 1464 of skeleton.m4 */
5420 #line 2444 "parser.y"
5421 {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
5430 /* Line 1464 of skeleton.m4 */
5431 #line 2445 "parser.y"
5432 {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
5441 /* Line 1464 of skeleton.m4 */
5442 #line 2446 "parser.y"
5445 (yyval.flags).flags=(yyvsp[(1) - (2)].flags).flags|(yyvsp[(2) - (2)].flags).flags;
5446 if((yyvsp[(1) - (2)].flags).ns && (yyvsp[(2) - (2)].flags).ns) syntaxerror("only one namespace allowed in one declaration");
5447 (yyval.flags).ns=(yyvsp[(1) - (2)].flags).ns?(yyvsp[(1) - (2)].flags).ns:(yyvsp[(2) - (2)].flags).ns;
5458 /* Line 1464 of skeleton.m4 */
5459 #line 2453 "parser.y"
5460 {PASS12 (yyval.flags).flags=FLAG_PUBLIC;(yyval.flags).ns=0;}
5469 /* Line 1464 of skeleton.m4 */
5470 #line 2454 "parser.y"
5471 {PASS12 (yyval.flags).flags=FLAG_PRIVATE;(yyval.flags).ns=0;}
5480 /* Line 1464 of skeleton.m4 */
5481 #line 2455 "parser.y"
5482 {PASS12 (yyval.flags).flags=FLAG_PROTECTED;(yyval.flags).ns=0;}
5491 /* Line 1464 of skeleton.m4 */
5492 #line 2456 "parser.y"
5493 {PASS12 (yyval.flags).flags=FLAG_STATIC;(yyval.flags).ns=0;}
5502 /* Line 1464 of skeleton.m4 */
5503 #line 2457 "parser.y"
5504 {PASS12 (yyval.flags).flags=FLAG_DYNAMIC;(yyval.flags).ns=0;}
5513 /* Line 1464 of skeleton.m4 */
5514 #line 2458 "parser.y"
5515 {PASS12 (yyval.flags).flags=FLAG_FINAL;(yyval.flags).ns=0;}
5524 /* Line 1464 of skeleton.m4 */
5525 #line 2459 "parser.y"
5526 {PASS12 (yyval.flags).flags=FLAG_OVERRIDE;(yyval.flags).ns=0;}
5535 /* Line 1464 of skeleton.m4 */
5536 #line 2460 "parser.y"
5537 {PASS12 (yyval.flags).flags=FLAG_NATIVE;(yyval.flags).ns=0;}
5546 /* Line 1464 of skeleton.m4 */
5547 #line 2461 "parser.y"
5548 {PASS12 (yyval.flags).flags=FLAG_PACKAGEINTERNAL;(yyval.flags).ns=0;}
5557 /* Line 1464 of skeleton.m4 */
5558 #line 2462 "parser.y"
5559 {PASS12 (yyval.flags).flags=FLAG_NAMESPACE;
5560 (yyval.flags).ns=(yyvsp[(1) - (1)].id);
5570 /* Line 1464 of skeleton.m4 */
5571 #line 2466 "parser.y"
5572 {PASS12 (yyval.classinfo)=0;}
5581 /* Line 1464 of skeleton.m4 */
5582 #line 2467 "parser.y"
5583 {PASS12 (yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
5592 /* Line 1464 of skeleton.m4 */
5593 #line 2469 "parser.y"
5594 {PASS12 (yyval.classinfo_list)=list_new();}
5603 /* Line 1464 of skeleton.m4 */
5604 #line 2470 "parser.y"
5605 {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
5614 /* Line 1464 of skeleton.m4 */
5615 #line 2472 "parser.y"
5616 {PASS12 (yyval.classinfo_list)=list_new();}
5625 /* Line 1464 of skeleton.m4 */
5626 #line 2473 "parser.y"
5627 {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
5636 /* Line 1464 of skeleton.m4 */
5637 #line 2477 "parser.y"
5638 {PASS12 startclass(&(yyvsp[(1) - (6)].flags),(yyvsp[(3) - (6)].id),(yyvsp[(4) - (6)].classinfo),(yyvsp[(5) - (6)].classinfo_list));}
5647 /* Line 1464 of skeleton.m4 */
5648 #line 2479 "parser.y"
5649 {PASS12 endclass();(yyval.code)=0;}
5658 /* Line 1464 of skeleton.m4 */
5659 #line 2483 "parser.y"
5660 {PASS12 (yyvsp[(1) - (5)].flags).flags|=FLAG_INTERFACE;
5661 startclass(&(yyvsp[(1) - (5)].flags),(yyvsp[(3) - (5)].id),0,(yyvsp[(4) - (5)].classinfo_list));}
5670 /* Line 1464 of skeleton.m4 */
5671 #line 2486 "parser.y"
5672 {PASS12 endclass();(yyval.code)=0;}
5681 /* Line 1464 of skeleton.m4 */
5682 #line 2495 "parser.y"
5683 {PASS_ALWAYS as3_pass=(yyvsp[(1) - (4)].number_int);}
5692 /* Line 1464 of skeleton.m4 */
5693 #line 2499 "parser.y"
5695 code_t*c = state->cls->static_init->header;
5696 c = code_append(c, (yyvsp[(1) - (1)].code));
5697 state->cls->static_init->header = c;
5707 /* Line 1464 of skeleton.m4 */
5708 #line 2510 "parser.y"
5710 syntaxerror("variable declarations not allowed in interfaces");
5720 /* Line 1464 of skeleton.m4 */
5721 #line 2513 "parser.y"
5724 (yyvsp[(1) - (8)].flags).flags |= FLAG_PUBLIC;
5725 if((yyvsp[(1) - (8)].flags).flags&(FLAG_PRIVATE|FLAG_PACKAGEINTERNAL|FLAG_PROTECTED)) {
5726 syntaxerror("invalid method modifiers: interface methods always need to be public");
5728 startfunction(&(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo));
5729 endfunction(&(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo), 0);
5730 list_deep_free((yyvsp[(6) - (8)].params).list);
5740 /* Line 1464 of skeleton.m4 */
5741 #line 2547 "parser.y"
5742 {PASS12 setslotstate(&(yyvsp[(1) - (2)].flags),(yyvsp[(2) - (2)].token));}
5751 /* Line 1464 of skeleton.m4 */
5752 #line 2547 "parser.y"
5753 {PASS12 (yyval.code)=(yyvsp[(4) - (4)].code);setslotstate(0, 0);}
5762 /* Line 1464 of skeleton.m4 */
5763 #line 2549 "parser.y"
5764 {PASS12 (yyval.code)=0;}
5773 /* Line 1464 of skeleton.m4 */
5774 #line 2550 "parser.y"
5775 {PASS12 (yyval.code)=0;}
5784 /* Line 1464 of skeleton.m4 */
5785 #line 2553 "parser.y"
5788 int flags = slotstate_flags->flags;
5789 namespace_t ns = modifiers2access(slotstate_flags);
5793 varinfo_t* info = 0;
5795 memberinfo_t*i = registry_findmember(state->cls->info, ns.name, (yyvsp[(1) - (3)].id), 1);
5797 check_override(i, flags);
5799 info = varinfo_register_onclass(state->cls->info, ns.access, ns.name, (yyvsp[(1) - (3)].id));
5801 slotinfo_t*i = registry_find(state->package, (yyvsp[(1) - (3)].id));
5803 syntaxerror("package %s already contains '%s'", state->package, (yyvsp[(1) - (3)].id));
5805 if(ns.name && ns.name[0]) {
5806 syntaxerror("namespaces not allowed on package-level variables");
5808 info = varinfo_register_global(ns.access, state->package, (yyvsp[(1) - (3)].id));
5811 info->type = (yyvsp[(2) - (3)].classinfo);
5812 info->flags = flags;
5814 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, info);
5818 varinfo_t*info = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
5821 multiname_t mname = {QNAME, &ns, 0, (yyvsp[(1) - (3)].id)};
5823 trait_list_t**traits;
5827 ns.name = state->package;
5828 traits = &global->init->traits;
5829 code = &global->init->method->body->code;
5830 } else if(flags&FLAG_STATIC) {
5832 traits = &state->cls->abc->static_traits;
5833 code = &state->cls->static_init->header;
5835 // instance variable
5836 traits = &state->cls->abc->traits;
5837 code = &state->cls->init->header;
5841 if((yyvsp[(2) - (3)].classinfo)) {
5842 MULTINAME(m, (yyvsp[(2) - (3)].classinfo));
5843 t = trait_new_member(traits, multiname_clone(&m), multiname_clone(&mname), 0);
5845 t = trait_new_member(traits, 0, multiname_clone(&mname), 0);
5847 info->slot = t->slot_id;
5849 constant_t cval = (yyvsp[(3) - (3)].node)->type->eval((yyvsp[(3) - (3)].node));
5850 if(cval.type!=CONSTANT_UNKNOWN) {
5851 /* compile time constant */
5852 t->value = malloc(sizeof(constant_t));
5853 memcpy(t->value, &cval, sizeof(constant_t));
5854 info->value = constant_clone(t->value);
5856 typedcode_t v = node_read((yyvsp[(3) - (3)].node));
5857 /* initalization code (if needed) */
5859 if(v.c && !is_pushundefined(v.c)) {
5860 c = abc_getlocal_0(c);
5861 c = code_append(c, v.c);
5862 c = converttype(c, v.t, (yyvsp[(2) - (3)].classinfo));
5863 c = abc_setslot(c, t->slot_id);
5865 *code = code_append(*code, c);
5868 if(slotstate_varconst==KW_CONST) {
5869 t->kind= TRAIT_CONST;
5870 info->flags |= FLAG_CONST;
5884 /* Line 1464 of skeleton.m4 */
5885 #line 2646 "parser.y"
5886 {(yyval.constant)=0;}
5895 /* Line 1464 of skeleton.m4 */
5896 #line 2647 "parser.y"
5898 (yyval.constant) = malloc(sizeof(constant_t));
5899 *(yyval.constant) = node_eval((yyvsp[(2) - (2)].node));
5900 if((yyval.constant)->type == CONSTANT_UNKNOWN)
5901 syntaxerror("can't evaluate default parameter value (needs to be a compile-time constant)");
5911 /* Line 1464 of skeleton.m4 */
5912 #line 2655 "parser.y"
5913 {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_int));}
5922 /* Line 1464 of skeleton.m4 */
5923 #line 2656 "parser.y"
5925 (yyval.constant) = constant_new_uint((yyvsp[(1) - (1)].number_uint));
5935 /* Line 1464 of skeleton.m4 */
5936 #line 2659 "parser.y"
5937 {(yyval.constant) = constant_new_float((yyvsp[(1) - (1)].number_float));}
5946 /* Line 1464 of skeleton.m4 */
5947 #line 2660 "parser.y"
5948 {(yyval.constant) = constant_new_string2((yyvsp[(1) - (1)].str).str,(yyvsp[(1) - (1)].str).len);free((char*)(yyvsp[(1) - (1)].str).str);}
5957 /* Line 1464 of skeleton.m4 */
5958 #line 2661 "parser.y"
5959 {(yyval.constant) = constant_new_true((yyvsp[(1) - (1)].token));}
5968 /* Line 1464 of skeleton.m4 */
5969 #line 2662 "parser.y"
5970 {(yyval.constant) = constant_new_false((yyvsp[(1) - (1)].token));}
5979 /* Line 1464 of skeleton.m4 */
5980 #line 2663 "parser.y"
5981 {(yyval.constant) = constant_new_null((yyvsp[(1) - (1)].token));}
5990 /* Line 1464 of skeleton.m4 */
5991 #line 2664 "parser.y"
5992 {(yyval.constant) = constant_new_undefined((yyvsp[(1) - (1)].token));}
6001 /* Line 1464 of skeleton.m4 */
6002 #line 2665 "parser.y"
6003 {(yyval.constant) = constant_new_float(__builtin_nan(""));}
6012 /* Line 1464 of skeleton.m4 */
6013 #line 2680 "parser.y"
6016 memset(&(yyval.params),0,sizeof((yyval.params)));
6026 /* Line 1464 of skeleton.m4 */
6027 #line 2684 "parser.y"
6030 (yyval.params)=(yyvsp[(1) - (1)].params);
6040 /* Line 1464 of skeleton.m4 */
6041 #line 2690 "parser.y"
6044 memset(&(yyval.params),0,sizeof((yyval.params)));
6045 (yyval.params).varargs=1;
6046 list_append((yyval.params).list, (yyvsp[(2) - (2)].param));
6056 /* Line 1464 of skeleton.m4 */
6057 #line 2696 "parser.y"
6060 (yyval.params) =(yyvsp[(1) - (4)].params);
6061 (yyval.params).varargs=1;
6062 list_append((yyval.params).list, (yyvsp[(4) - (4)].param));
6072 /* Line 1464 of skeleton.m4 */
6073 #line 2704 "parser.y"
6076 (yyval.params) = (yyvsp[(1) - (3)].params);
6077 list_append((yyval.params).list, (yyvsp[(3) - (3)].param));
6087 /* Line 1464 of skeleton.m4 */
6088 #line 2709 "parser.y"
6091 memset(&(yyval.params),0,sizeof((yyval.params)));
6092 list_append((yyval.params).list, (yyvsp[(1) - (1)].param));
6102 /* Line 1464 of skeleton.m4 */
6103 #line 2715 "parser.y"
6106 (yyval.param) = rfx_calloc(sizeof(param_t));
6107 (yyval.param)->name=(yyvsp[(1) - (4)].id);
6108 (yyval.param)->type = (yyvsp[(3) - (4)].classinfo);
6110 (yyval.param)->value = (yyvsp[(4) - (4)].constant);
6120 /* Line 1464 of skeleton.m4 */
6121 #line 2723 "parser.y"
6124 (yyval.param) = rfx_calloc(sizeof(param_t));
6125 (yyval.param)->name=(yyvsp[(1) - (2)].id);
6126 (yyval.param)->type = TYPE_ANY;
6128 (yyval.param)->value = (yyvsp[(2) - (2)].constant);
6138 /* Line 1464 of skeleton.m4 */
6139 #line 2733 "parser.y"
6140 {PASS12 (yyval.token)=0;}
6149 /* Line 1464 of skeleton.m4 */
6150 #line 2736 "parser.y"
6151 {PASS12 startfunction(&(yyvsp[(1) - (9)].flags),(yyvsp[(3) - (9)].token),(yyvsp[(4) - (9)].id),&(yyvsp[(6) - (9)].params),(yyvsp[(8) - (9)].classinfo));}
6160 /* Line 1464 of skeleton.m4 */
6161 #line 2737 "parser.y"
6164 endfunction(&(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),0,0);
6166 if(!state->method->info) syntaxerror("internal error");
6168 code_t*c = method_header(state->method);
6169 c = wrap_function(c, 0, (yyvsp[(11) - (12)].code));
6171 endfunction(&(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),(yyvsp[(8) - (12)].classinfo),c);
6173 list_deep_free((yyvsp[(6) - (12)].params).list);
6184 /* Line 1464 of skeleton.m4 */
6185 #line 2753 "parser.y"
6186 {PASS12 (yyval.id)=0;}
6195 /* Line 1464 of skeleton.m4 */
6196 #line 2755 "parser.y"
6197 {PASS12 innerfunction((yyvsp[(2) - (7)].id),&(yyvsp[(4) - (7)].params),(yyvsp[(6) - (7)].classinfo));}
6206 /* Line 1464 of skeleton.m4 */
6207 #line 2756 "parser.y"
6210 endfunction(0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),0,0);
6212 methodinfo_t*f = state->method->info;
6213 if(!f || !f->kind) syntaxerror("internal error");
6215 code_t*c = method_header(state->method);
6216 c = wrap_function(c, 0, (yyvsp[(9) - (10)].code));
6218 int index = state->method->var_index;
6219 endfunction(0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),(yyvsp[(6) - (10)].classinfo),c);
6221 (yyval.value).c = abc_getlocal(0, index);
6222 (yyval.value).t = TYPE_FUNCTION(f);
6224 PASS12 list_deep_free((yyvsp[(4) - (10)].params).list);
6234 /* Line 1464 of skeleton.m4 */
6235 #line 2778 "parser.y"
6237 PASS1 NEW(unresolvedinfo_t,c);
6238 memset(c, 0, sizeof(*c));
6239 c->kind = INFOTYPE_UNRESOLVED;
6240 c->name = (yyvsp[(1) - (1)].id);
6241 c->package = get_package_from_name((yyvsp[(1) - (1)].id));
6243 c->nsset = get_current_imports();
6244 /* make the compiler look for this class in the current directory,
6246 as3_schedule_class_noerror(state->package, (yyvsp[(1) - (1)].id));
6248 (yyval.classinfo) = (classinfo_t*)c;
6250 slotinfo_t*s = find_class((yyvsp[(1) - (1)].id));
6251 if(!s) syntaxerror("Could not find class/method %s (current package: %s)\n", (yyvsp[(1) - (1)].id), state->package);
6252 (yyval.classinfo) = (classinfo_t*)s;
6262 /* Line 1464 of skeleton.m4 */
6263 #line 2797 "parser.y"
6265 PASS1 NEW(unresolvedinfo_t,c);
6266 memset(c, 0, sizeof(*c));
6267 c->kind = INFOTYPE_UNRESOLVED;
6268 c->package = (yyvsp[(1) - (3)].id);
6269 c->name = (yyvsp[(3) - (3)].id);
6270 (yyval.classinfo) = (classinfo_t*)c;
6272 slotinfo_t*s = registry_find((yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
6273 if(!s) syntaxerror("Couldn't find class/method %s.%s\n", (yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
6274 free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;
6275 (yyval.classinfo) = (classinfo_t*)s;
6285 /* Line 1464 of skeleton.m4 */
6286 #line 2814 "parser.y"
6287 {PASS12 (yyval.classinfo_list)=list_new();list_append((yyval.classinfo_list), (yyvsp[(1) - (1)].classinfo));}
6296 /* Line 1464 of skeleton.m4 */
6297 #line 2815 "parser.y"
6298 {PASS12 (yyval.classinfo_list)=(yyvsp[(1) - (3)].classinfo_list);list_append((yyval.classinfo_list),(yyvsp[(3) - (3)].classinfo));}
6307 /* Line 1464 of skeleton.m4 */
6308 #line 2817 "parser.y"
6309 {PASS12 (yyval.classinfo)=(yyvsp[(1) - (1)].classinfo);}
6318 /* Line 1464 of skeleton.m4 */
6319 #line 2818 "parser.y"
6320 {PASS12 (yyval.classinfo)=TYPE_ANY;}
6329 /* Line 1464 of skeleton.m4 */
6330 #line 2819 "parser.y"
6331 {PASS12 (yyval.classinfo)=TYPE_ANY;}
6340 /* Line 1464 of skeleton.m4 */
6341 #line 2828 "parser.y"
6342 {PASS12 (yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
6351 /* Line 1464 of skeleton.m4 */
6352 #line 2829 "parser.y"
6353 {PASS12 (yyval.classinfo)=0;}
6362 /* Line 1464 of skeleton.m4 */
6363 #line 2833 "parser.y"
6364 {(yyval.value_list).cc=0;(yyval.value_list).number=0;}
6373 /* Line 1464 of skeleton.m4 */
6374 #line 2834 "parser.y"
6375 {(yyval.value_list)=(yyvsp[(2) - (3)].value_list);}
6384 /* Line 1464 of skeleton.m4 */
6385 #line 2836 "parser.y"
6386 {(yyval.value_list).cc=0;(yyval.value_list).number=0;}
6395 /* Line 1464 of skeleton.m4 */
6396 #line 2840 "parser.y"
6397 {(yyval.value_list).number=1;
6398 (yyval.value_list).cc = (yyvsp[(1) - (1)].value).c;
6408 /* Line 1464 of skeleton.m4 */
6409 #line 2844 "parser.y"
6410 {(yyval.value_list) = (yyvsp[(1) - (2)].value_list);}
6419 /* Line 1464 of skeleton.m4 */
6420 #line 2845 "parser.y"
6422 (yyval.value_list).number= (yyvsp[(1) - (2)].value_list).number+1;
6423 (yyval.value_list).cc = code_append((yyvsp[(1) - (2)].value_list).cc, (yyvsp[(2) - (2)].value).c);
6433 /* Line 1464 of skeleton.m4 */
6434 #line 2851 "parser.y"
6436 typedcode_t v = node_read((yyvsp[(2) - (4)].node));
6437 (yyval.value).c = v.c;
6438 if((yyval.value).c->opcode == OPCODE_COERCE_A) (yyval.value).c = code_cutlast((yyval.value).c);
6440 code_t*paramcode = (yyvsp[(4) - (4)].value_list).cc;
6441 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6442 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6443 (yyval.value).c = code_cutlast((yyval.value).c);
6444 (yyval.value).c = code_append((yyval.value).c, paramcode);
6445 (yyval.value).c = abc_constructprop2((yyval.value).c, name, (yyvsp[(4) - (4)].value_list).number);
6446 multiname_destroy(name);
6447 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
6448 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6449 trait_t*t = traits_find_slotid(state->cls->abc->traits,slot);//FIXME
6450 multiname_t*name = t->name;
6451 (yyval.value).c = code_cutlast((yyval.value).c);
6452 (yyval.value).c = code_append((yyval.value).c, paramcode);
6453 (yyval.value).c = abc_constructprop2((yyval.value).c, name, (yyvsp[(4) - (4)].value_list).number);
6455 (yyval.value).c = code_append((yyval.value).c, paramcode);
6456 (yyval.value).c = abc_construct((yyval.value).c, (yyvsp[(4) - (4)].value_list).number);
6459 (yyval.value).t = TYPE_ANY;
6460 if(TYPE_IS_CLASS(v.t) && v.t->data) {
6461 (yyval.value).t = v.t->data;
6463 (yyval.value).c = abc_coerce_a((yyval.value).c);
6464 (yyval.value).t = TYPE_ANY;
6475 /* Line 1464 of skeleton.m4 */
6476 #line 2888 "parser.y"
6479 typedcode_t v = node_read((yyvsp[(1) - (4)].node));
6480 (yyval.value).c = v.c;
6481 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
6482 (yyval.value).c = code_cutlast((yyval.value).c);
6484 code_t*paramcode = (yyvsp[(3) - (4)].value_list).cc;
6486 (yyval.value).t = TYPE_ANY;
6487 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6488 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6489 (yyval.value).c = code_cutlast((yyval.value).c);
6490 (yyval.value).c = code_append((yyval.value).c, paramcode);
6491 (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).number);
6492 multiname_destroy(name);
6493 } else if((yyval.value).c->opcode == OPCODE_GETSLOT && (yyval.value).c->prev->opcode != OPCODE_GETSCOPEOBJECT) {
6494 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6495 trait_t*t = traits_find_slotid(state->cls->abc->traits,slot);
6496 if(t->kind!=TRAIT_METHOD) {
6497 //ok: flash allows to assign closures to members.
6499 multiname_t*name = t->name;
6500 (yyval.value).c = code_cutlast((yyval.value).c);
6501 (yyval.value).c = code_append((yyval.value).c, paramcode);
6502 //$$.c = abc_callmethod($$.c, t->method, len); //#1051 illegal early access binding
6503 (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).number);
6504 } else if((yyval.value).c->opcode == OPCODE_GETSUPER) {
6505 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6506 (yyval.value).c = code_cutlast((yyval.value).c);
6507 (yyval.value).c = code_append((yyval.value).c, paramcode);
6508 (yyval.value).c = abc_callsuper2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).number);
6509 multiname_destroy(name);
6511 (yyval.value).c = abc_getglobalscope((yyval.value).c);
6512 (yyval.value).c = code_append((yyval.value).c, paramcode);
6513 (yyval.value).c = abc_call((yyval.value).c, (yyvsp[(3) - (4)].value_list).number);
6516 if(TYPE_IS_FUNCTION(v.t) && v.t->data) {
6517 (yyval.value).t = ((methodinfo_t*)(v.t->data))->return_type;
6518 } else if(TYPE_IS_CLASS(v.t) && v.t->data) {
6519 // calling a class is like a typecast
6520 (yyval.value).t = (classinfo_t*)v.t->data;
6522 (yyval.value).c = abc_coerce_a((yyval.value).c);
6523 (yyval.value).t = TYPE_ANY;
6534 /* Line 1464 of skeleton.m4 */
6535 #line 2938 "parser.y"
6537 if(!state->cls) syntaxerror("super() not allowed outside of a class");
6538 if(!state->method) syntaxerror("super() not allowed outside of a function");
6539 if(!state->method->is_constructor) syntaxerror("super() not allowed outside of a constructor");
6541 (yyval.value).c = code_new();
6542 (yyval.value).c = abc_getlocal_0((yyval.value).c);
6544 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value_list).cc);
6546 this is dependent on the control path, check this somewhere else
6547 if(state->method->has_super)
6548 syntaxerror("constructor may call super() only once");
6550 state->method->has_super = 1;
6552 (yyval.value).c = abc_constructsuper((yyval.value).c, (yyvsp[(3) - (4)].value_list).number);
6553 (yyval.value).c = abc_pushundefined((yyval.value).c);
6554 (yyval.value).t = TYPE_ANY;
6564 /* Line 1464 of skeleton.m4 */
6565 #line 2959 "parser.y"
6567 typedcode_t v = node_read((yyvsp[(2) - (2)].node));
6568 (yyval.value).c = v.c;
6569 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
6570 (yyval.value).c = code_cutlast((yyval.value).c);
6572 multiname_t*name = 0;
6573 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6574 (yyval.value).c->opcode = OPCODE_DELETEPROPERTY;
6575 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
6576 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6577 multiname_t*name = traits_find_slotid(state->cls->abc->traits,slot)->name;
6578 (yyval.value).c = code_cutlast((yyval.value).c);
6579 (yyval.value).c = abc_deleteproperty2((yyval.value).c, name);
6581 (yyval.value).c = abc_getlocal_0((yyval.value).c);
6582 MULTINAME_LATE(m, v.t?v.t->access:ACCESS_PACKAGE, "");
6583 (yyval.value).c = abc_deleteproperty2((yyval.value).c, &m);
6585 (yyval.value).t = TYPE_BOOLEAN;
6595 /* Line 1464 of skeleton.m4 */
6596 #line 2981 "parser.y"
6598 (yyval.code) = abc_returnvoid(0);
6608 /* Line 1464 of skeleton.m4 */
6609 #line 2984 "parser.y"
6611 (yyval.code) = (yyvsp[(2) - (2)].value).c;
6612 (yyval.code) = abc_returnvalue((yyval.code));
6622 /* Line 1464 of skeleton.m4 */
6623 #line 2991 "parser.y"
6625 (yyval.value) = node_read((yyvsp[(1) - (1)].node));
6635 /* Line 1464 of skeleton.m4 */
6636 #line 2994 "parser.y"
6638 (yyval.value) = node_read((yyvsp[(1) - (1)].node));
6648 /* Line 1464 of skeleton.m4 */
6649 #line 2997 "parser.y"
6651 (yyval.node) = mkmultinode(&node_comma, (yyvsp[(1) - (1)].node));
6661 /* Line 1464 of skeleton.m4 */
6662 #line 3000 "parser.y"
6664 (yyval.node) = multinode_extend((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
6674 /* Line 1464 of skeleton.m4 */
6675 #line 3003 "parser.y"
6677 (yyval.code) = node_exec((yyvsp[(1) - (1)].node));
6687 /* Line 1464 of skeleton.m4 */
6688 #line 3006 "parser.y"
6690 (yyval.code) = (yyvsp[(1) - (3)].code);
6691 (yyval.code) = code_append((yyval.code), node_exec((yyvsp[(3) - (3)].node)));
6701 /* Line 1464 of skeleton.m4 */
6702 #line 3011 "parser.y"
6703 {(yyval.value_list).cc=0;(yyval.value_list).number=0;}
6712 /* Line 1464 of skeleton.m4 */
6713 #line 3012 "parser.y"
6714 {(yyval.value_list)=(yyvsp[(1) - (1)].value_list);}
6723 /* Line 1464 of skeleton.m4 */
6724 #line 3014 "parser.y"
6725 {(yyval.code)=abc_pushstring(0,(yyvsp[(1) - (1)].id));}
6734 /* Line 1464 of skeleton.m4 */
6735 #line 3015 "parser.y"
6736 {(yyval.code)=abc_pushstring2(0,&(yyvsp[(1) - (1)].str));}
6745 /* Line 1464 of skeleton.m4 */
6746 #line 3017 "parser.y"
6748 (yyval.value_list).cc = 0;
6749 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(1) - (3)].code));
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 3023 "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)].code));
6767 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(5) - (5)].value).c);
6777 /* Line 1464 of skeleton.m4 */
6778 #line 3032 "parser.y"
6779 {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
6788 /* Line 1464 of skeleton.m4 */
6789 #line 3033 "parser.y"
6790 {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
6799 /* Line 1464 of skeleton.m4 */
6800 #line 3034 "parser.y"
6801 {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
6810 /* Line 1464 of skeleton.m4 */
6811 #line 3035 "parser.y"
6812 {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
6821 /* Line 1464 of skeleton.m4 */
6822 #line 3036 "parser.y"
6823 {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
6832 /* Line 1464 of skeleton.m4 */
6833 #line 3037 "parser.y"
6834 {(yyval.node) = (yyvsp[(1) - (1)].node);}
6843 /* Line 1464 of skeleton.m4 */
6844 #line 3039 "parser.y"
6846 (yyval.node) = mkconstnode((yyvsp[(1) - (1)].constant));
6856 /* Line 1464 of skeleton.m4 */
6857 #line 3044 "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 3064 "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 3074 "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 3083 "parser.y"
6922 {(yyval.node) = mknode2(&node_lt,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
6931 /* Line 1464 of skeleton.m4 */
6932 #line 3084 "parser.y"
6933 {(yyval.node) = mknode2(&node_gt,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
6942 /* Line 1464 of skeleton.m4 */
6943 #line 3085 "parser.y"
6944 {(yyval.node) = mknode2(&node_le,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
6953 /* Line 1464 of skeleton.m4 */
6954 #line 3086 "parser.y"
6955 {(yyval.node) = mknode2(&node_ge,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
6964 /* Line 1464 of skeleton.m4 */
6965 #line 3087 "parser.y"
6966 {(yyval.node) = mknode2(&node_eqeq,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
6975 /* Line 1464 of skeleton.m4 */
6976 #line 3088 "parser.y"
6977 {(yyval.node) = mknode2(&node_eqeqeq,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
6986 /* Line 1464 of skeleton.m4 */
6987 #line 3089 "parser.y"
6988 {(yyval.node) = mknode2(&node_noteqeq,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
6997 /* Line 1464 of skeleton.m4 */
6998 #line 3090 "parser.y"
6999 {(yyval.node) = mknode2(&node_noteq,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
7008 /* Line 1464 of skeleton.m4 */
7009 #line 3091 "parser.y"
7010 {(yyval.node) = mknode2(&node_oror,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
7019 /* Line 1464 of skeleton.m4 */
7020 #line 3092 "parser.y"
7021 {(yyval.node) = mknode2(&node_andand,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
7030 /* Line 1464 of skeleton.m4 */
7031 #line 3093 "parser.y"
7032 {(yyval.node) = mknode1(&node_not, (yyvsp[(2) - (2)].node));}
7041 /* Line 1464 of skeleton.m4 */
7042 #line 3094 "parser.y"
7043 {(yyval.node) = mknode1(&node_bitnot, (yyvsp[(2) - (2)].node));}
7052 /* Line 1464 of skeleton.m4 */
7053 #line 3095 "parser.y"
7054 {(yyval.node) = mknode2(&node_bitand, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7063 /* Line 1464 of skeleton.m4 */
7064 #line 3096 "parser.y"
7065 {(yyval.node) = mknode2(&node_bitxor, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7074 /* Line 1464 of skeleton.m4 */
7075 #line 3097 "parser.y"
7076 {(yyval.node) = mknode2(&node_bitor, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7085 /* Line 1464 of skeleton.m4 */
7086 #line 3098 "parser.y"
7087 {(yyval.node) = mknode2(&node_shr, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7096 /* Line 1464 of skeleton.m4 */
7097 #line 3099 "parser.y"
7098 {(yyval.node) = mknode2(&node_ushr, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7107 /* Line 1464 of skeleton.m4 */
7108 #line 3100 "parser.y"
7109 {(yyval.node) = mknode2(&node_shl, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7118 /* Line 1464 of skeleton.m4 */
7119 #line 3101 "parser.y"
7120 {(yyval.node) = mknode2(&node_div, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7129 /* Line 1464 of skeleton.m4 */
7130 #line 3102 "parser.y"
7131 {(yyval.node) = mknode2(&node_mod, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7140 /* Line 1464 of skeleton.m4 */
7141 #line 3103 "parser.y"
7142 {(yyval.node) = mknode2(&node_plus, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7151 /* Line 1464 of skeleton.m4 */
7152 #line 3104 "parser.y"
7153 {(yyval.node) = mknode2(&node_minus, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7162 /* Line 1464 of skeleton.m4 */
7163 #line 3105 "parser.y"
7164 {(yyval.node) = mknode2(&node_multiply, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7173 /* Line 1464 of skeleton.m4 */
7174 #line 3106 "parser.y"
7175 {(yyval.node) = mknode2(&node_in, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7184 /* Line 1464 of skeleton.m4 */
7185 #line 3107 "parser.y"
7186 {(yyval.node) = mknode2(&node_as, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7195 /* Line 1464 of skeleton.m4 */
7196 #line 3108 "parser.y"
7197 {(yyval.node) = mknode2(&node_instanceof, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7206 /* Line 1464 of skeleton.m4 */
7207 #line 3109 "parser.y"
7208 {(yyval.node) = mknode2(&node_is, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7217 /* Line 1464 of skeleton.m4 */
7218 #line 3110 "parser.y"
7219 {(yyval.node) = mknode1(&node_typeof, (yyvsp[(3) - (4)].node));}
7228 /* Line 1464 of skeleton.m4 */
7229 #line 3111 "parser.y"
7230 {(yyval.node) = mknode1(&node_void, (yyvsp[(2) - (2)].node));}
7239 /* Line 1464 of skeleton.m4 */
7240 #line 3112 "parser.y"
7241 { (yyval.node) = mkconstnode(constant_new_undefined());}
7250 /* Line 1464 of skeleton.m4 */
7251 #line 3113 "parser.y"
7252 { (yyval.node)=(yyvsp[(2) - (3)].node);}
7261 /* Line 1464 of skeleton.m4 */
7262 #line 3114 "parser.y"
7263 {(yyval.node) = mknode1(&node_neg, (yyvsp[(2) - (2)].node));}
7272 /* Line 1464 of skeleton.m4 */
7273 #line 3115 "parser.y"
7274 {(yyval.node) = mknode2(&node_arraylookup, (yyvsp[(1) - (4)].node),(yyvsp[(3) - (4)].node));}
7283 /* Line 1464 of skeleton.m4 */
7284 #line 3116 "parser.y"
7285 {(yyval.node) = mknode2(&node_muleq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7294 /* Line 1464 of skeleton.m4 */
7295 #line 3117 "parser.y"
7296 {(yyval.node) = mknode2(&node_modeq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7305 /* Line 1464 of skeleton.m4 */
7306 #line 3118 "parser.y"
7307 {(yyval.node) = mknode2(&node_shleq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7316 /* Line 1464 of skeleton.m4 */
7317 #line 3119 "parser.y"
7318 {(yyval.node) = mknode2(&node_shreq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7327 /* Line 1464 of skeleton.m4 */
7328 #line 3120 "parser.y"
7329 {(yyval.node) = mknode2(&node_ushreq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7338 /* Line 1464 of skeleton.m4 */
7339 #line 3121 "parser.y"
7340 { (yyval.node) = mknode2(&node_diveq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7349 /* Line 1464 of skeleton.m4 */
7350 #line 3122 "parser.y"
7351 { (yyval.node) = mknode2(&node_bitoreq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7360 /* Line 1464 of skeleton.m4 */
7361 #line 3123 "parser.y"
7362 { (yyval.node) = mknode2(&node_bitxoreq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7371 /* Line 1464 of skeleton.m4 */
7372 #line 3124 "parser.y"
7373 { (yyval.node) = mknode2(&node_bitandeq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7382 /* Line 1464 of skeleton.m4 */
7383 #line 3125 "parser.y"
7384 { (yyval.node) = mknode2(&node_pluseq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7393 /* Line 1464 of skeleton.m4 */
7394 #line 3126 "parser.y"
7395 { (yyval.node) = mknode2(&node_minuseq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7404 /* Line 1464 of skeleton.m4 */
7405 #line 3127 "parser.y"
7406 { (yyval.node) = mknode2(&node_assign, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7415 /* Line 1464 of skeleton.m4 */
7416 #line 3128 "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 3130 "parser.y"
7428 { (yyval.node) = mknode1(&node_rplusplus, (yyvsp[(1) - (2)].node));}
7437 /* Line 1464 of skeleton.m4 */
7438 #line 3131 "parser.y"
7439 { (yyval.node) = mknode1(&node_rminusminus, (yyvsp[(1) - (2)].node));}
7448 /* Line 1464 of skeleton.m4 */
7449 #line 3132 "parser.y"
7450 {(yyval.node) = mknode1(&node_lplusplus, (yyvsp[(2) - (2)].node)); }
7459 /* Line 1464 of skeleton.m4 */
7460 #line 3133 "parser.y"
7461 {(yyval.node) = mknode1(&node_lminusminus, (yyvsp[(2) - (2)].node)); }
7470 /* Line 1464 of skeleton.m4 */
7471 #line 3136 "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 3150 "parser.y"
7497 (yyval.node) = mkdummynode();
7498 as3_warning("ignored @ operator");
7508 /* Line 1464 of skeleton.m4 */
7509 #line 3156 "parser.y"
7511 // child attribute TODO
7512 (yyval.node) = mkdummynode();
7513 as3_warning("ignored .@ operator");
7523 /* Line 1464 of skeleton.m4 */
7524 #line 3162 "parser.y"
7526 // namespace declaration TODO
7527 (yyval.node) = mkdummynode();
7528 as3_warning("ignored :: operator");
7538 /* Line 1464 of skeleton.m4 */
7539 #line 3168 "parser.y"
7542 (yyval.node) = mkdummynode();
7543 as3_warning("ignored .. operator");
7553 /* Line 1464 of skeleton.m4 */
7554 #line 3174 "parser.y"
7557 (yyval.node) = mkdummynode();
7558 as3_warning("ignored .() operator");
7568 /* Line 1464 of skeleton.m4 */
7569 #line 3187 "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_softwarning("Access of undefined property '%s' in %s", (yyvsp[(3) - (3)].id), t->name);
7593 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
7594 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7596 /* determine type */
7597 (yyval.value).t = slotinfo_gettype((slotinfo_t*)f);
7598 if(!(yyval.value).t)
7599 (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 3245 "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 3378 "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 3385 "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 3392 "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 3399 "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 3423 "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);