2 /* A Bison parser, made by GNU Bison 2.4.1. */
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.1"
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
187 KW_DEFAULT_XML = 317,
224 below_semicolon = 354,
225 below_assignment = 355,
228 minusminus_prefix = 358,
229 plusplus_prefix = 359,
232 above_identifier = 362,
240 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
242 /* Line 223 of skeleton.m4 */
247 /* Line 223 of skeleton.m4 */
250 enum yytokentype token;
252 classinfo_t*classinfo;
253 classinfo_list_t*classinfo_list;
255 slotinfo_list_t*slotinfo_list;
258 unsigned int number_uint;
262 //typedcode_list_t*value_list;
263 codeandnumber_t value_list;
269 for_start_t for_start;
270 abc_exception_t *exception;
273 namespace_decl_t* namespace_decl;
276 abc_exception_list_t *l;
282 /* Line 223 of skeleton.m4 */
283 #line 284 "parser.tab.c"
285 # define YYSTYPE_IS_TRIVIAL 1
286 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
287 # define YYSTYPE_IS_DECLARED 1
291 /* Copy the second part of user declarations. */
293 /* Line 273 of skeleton.m4 */
297 static int a3_error(char*s)
299 syntaxerror("%s", s);
300 return 0; //make gcc happy
303 static void parsererror(const char*file, int line, const char*f)
305 syntaxerror("internal error in %s, %s:%d", f, file, line);
308 #define parserassert(b) {if(!(b)) parsererror(__FILE__, __LINE__,__func__);}
311 static char* concat2(const char* t1, const char* t2)
315 char*text = malloc(l1+l2+1);
316 memcpy(text , t1, l1);
317 memcpy(text+l1, t2, l2);
321 static char* concat3(const char* t1, const char* t2, const char* t3)
326 char*text = malloc(l1+l2+l3+1);
327 memcpy(text , t1, l1);
328 memcpy(text+l1, t2, l2);
329 memcpy(text+l1+l2, t3, l3);
334 typedef struct _import {
337 DECLARE_LIST(import);
339 DECLARE(methodstate);
340 DECLARE_LIST(methodstate);
342 typedef struct _classstate {
348 methodstate_t*static_init;
350 //code_t*static_init;
351 parsedclass_t*dependencies;
353 char has_constructor;
356 struct _methodstate {
367 dict_t*unresolved_variables;
368 dict_t*allvars; // all variables (in all sublevels, but not for inner functions)
371 char uses_parent_function;
372 char no_variable_scoping;
380 int var_index; // for inner methods
381 int slot_index; // for inner methods
382 char is_a_slot; // for inner methods
387 abc_exception_list_t*exceptions;
389 methodstate_list_t*innerfunctions;
392 methodstate_t*methodstate_new()
394 NEW(methodstate_t,m);
395 m->allvars = dict_new();
398 void methodstate_destroy(methodstate_t*m)
400 dict_destroy(m->unresolved_variables); m->unresolved_variables = 0;
401 list_free(m->innerfunctions);m->innerfunctions=0;
404 DICT_ITERATE_DATA(m->allvars, void*, data) {free(data);}
409 typedef struct _state {
414 import_list_t*wildcard_imports;
415 dict_t*import_toplevel_packages;
419 namespace_list_t*active_namespace_urls;
421 char has_own_imports;
422 char new_vars; // e.g. transition between two functions
423 char xmlfilter; // are we inside a xmlobj..() filter?
426 methodstate_t*method;
435 typedef struct _global {
438 parsedclass_list_t*classes;
439 abc_script_t*classinit;
441 abc_script_t*init; //package-level code
444 dict_t*file2token2info;
447 static global_t*global = 0;
448 static state_t* state = 0;
452 /* protected handling here is a big hack: we just assume the protectedns
453 is package:class. the correct approach would be to add the proper
454 namespace to all protected members in the registry, even though that
455 would slow down searching */
456 #define MEMBER_MULTINAME(m,f,n) \
460 m##_ns.access = ((slotinfo_t*)(f))->access; \
461 if(m##_ns.access == ACCESS_NAMESPACE) \
462 m##_ns.name = ((slotinfo_t*)(f))->package; \
463 else if(m##_ns.access == ACCESS_PROTECTED && (f)->parent) \
464 m##_ns.name = concat3((f)->parent->package,":",(f)->parent->name); \
469 m.namespace_set = 0; \
470 m.name = ((slotinfo_t*)(f))->name; \
472 m.type = MULTINAME; \
474 m.namespace_set = &nopackage_namespace_set; \
478 /* warning: list length of namespace set is undefined */
479 #define MULTINAME_LATE(m, access, package) \
480 namespace_t m##_ns = {access, package}; \
481 namespace_set_t m##_nsset; \
482 namespace_list_t m##_l;m##_l.next = 0; \
483 m##_nsset.namespaces = &m##_l; \
484 m##_nsset = m##_nsset; \
485 m##_l.namespace = &m##_ns; \
486 multiname_t m = {MULTINAMEL, 0, &m##_nsset, 0};
488 static namespace_t ns1 = {ACCESS_PRIVATE, ""};
489 static namespace_t ns2 = {ACCESS_PROTECTED, ""};
490 static namespace_t ns3 = {ACCESS_PACKAGEINTERNAL, ""};
491 static namespace_t stdns = {ACCESS_PACKAGE, ""};
492 static namespace_list_t nl4 = {&stdns,0};
493 static namespace_list_t nl3 = {&ns3,&nl4};
494 static namespace_list_t nl2 = {&ns2,&nl3};
495 static namespace_list_t nl1 = {&ns1,&nl2};
496 static namespace_set_t nopackage_namespace_set = {&nl1};
498 static dict_t*definitions=0;
499 void as3_set_define(const char*c)
502 definitions = dict_new();
503 if(!dict_contains(definitions,c))
504 dict_put(definitions,c,0);
507 static void new_state()
510 state_t*oldstate = state;
512 memcpy(s, state, sizeof(state_t)); //shallow copy
514 s->imports = dict_new();
516 if(!s->import_toplevel_packages) {
517 s->import_toplevel_packages = dict_new();
521 state->has_own_imports = 0;
522 state->vars = dict_new();
523 state->old = oldstate;
526 state->namespaces = dict_new();
529 state->active_namespace_urls = list_clone(oldstate->active_namespace_urls);
532 static void state_destroy(state_t*state)
534 if(state->has_own_imports) {
535 list_free(state->wildcard_imports);
536 dict_destroy(state->imports);state->imports=0;
538 if(state->imports && (!state->old || state->old->imports!=state->imports)) {
539 dict_destroy(state->imports);state->imports=0;
542 dict_destroy(state->vars);state->vars=0;
545 list_free(state->active_namespace_urls)
546 state->active_namespace_urls = 0;
551 static void old_state()
553 if(!state || !state->old)
554 syntaxerror("invalid nesting");
555 state_t*leaving = state;
559 if(as3_pass>1 && leaving->method && leaving->method != state->method && !leaving->method->inner) {
560 methodstate_destroy(leaving->method);leaving->method=0;
562 if(as3_pass>1 && leaving->cls && leaving->cls != state->cls) {
567 state_destroy(leaving);
570 static code_t* method_header(methodstate_t*m);
571 static code_t* wrap_function(code_t*c,code_t*header, code_t*body);
572 static void function_initvars(methodstate_t*m, char has_params, params_t*params, int flags, char var0);
575 static char* internal_filename_package = 0;
576 void initialize_file(char*filename)
579 syntaxerror("invalid call to initialize_file during parsing of another file");
583 state->package = internal_filename_package = strdup(filename);
585 global->token2info = dict_lookup(global->file2token2info,
586 current_filename // use long version
588 if(!global->token2info) {
589 global->token2info = dict_new2(&ptr_type);
590 dict_put(global->file2token2info, current_filename, global->token2info);
594 state->method = rfx_calloc(sizeof(methodstate_t));
595 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
596 state->method->late_binding = 1; // init scripts use getglobalscope, so we need a getlocal0/pushscope
597 state->method->allvars = dict_new();
599 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
600 state->method->variable_count = 0;
602 syntaxerror("internal error: skewed tokencount");
603 function_initvars(state->method, 0, 0, 0, 1);
610 if(!state || state->level!=1) {
611 syntaxerror("unexpected end of file in pass %d", as3_pass);
615 dict_del(global->file2token2info, current_filename);
616 code_t*header = method_header(state->method);
617 //if(global->init->method->body->code || global->init->traits) {
619 code_t*c = wrap_function(header, 0, global->init->method->body->code);
620 global->init->method->body->code = abc_returnvoid(c);
621 free(state->method);state->method=0;
625 //free(state->package);state->package=0; // used in registry
626 state_destroy(state);state=0;
629 void initialize_parser()
631 global = rfx_calloc(sizeof(global_t));
632 global->file = abc_file_new();
633 global->file->flags &= ~ABCFILE_LAZY;
634 global->file2token2info = dict_new();
635 global->token2info = 0;
636 global->classinit = abc_initscript(global->file);
639 void* finish_parser()
641 dict_free_all(global->file2token2info, 1, (void*)dict_destroy);
642 global->token2info=0;
644 initcode_add_classlist(global->classinit, global->classes);
649 typedef struct _variable {
655 methodstate_t*is_inner_method;
658 static variable_t* find_variable(state_t*s, const char*name)
660 if(s->method->no_variable_scoping) {
661 return dict_lookup(s->method->allvars, name);
666 v = dict_lookup(s->vars, name);
668 if(s->new_vars) break;
674 static variable_t* find_slot(methodstate_t*m, const char*name)
677 return dict_lookup(m->slots, name);
681 static variable_t* find_variable_safe(state_t*s, char*name)
683 variable_t* v = find_variable(s, name);
685 syntaxerror("undefined variable: %s", name);
689 static char variable_exists(char*name)
691 return dict_contains(state->vars, name);
694 static code_t*defaultvalue(code_t*c, classinfo_t*type)
696 parserassert(!type || type->kind!=INFOTYPE_UNRESOLVED);
697 if(TYPE_IS_INT(type)) {
698 c = abc_pushbyte(c, 0);
699 } else if(TYPE_IS_UINT(type)) {
700 c = abc_pushuint(c, 0);
701 } else if(TYPE_IS_FLOAT(type)) {
703 } else if(TYPE_IS_BOOLEAN(type)) {
704 c = abc_pushfalse(c);
705 } else if(TYPE_IS_STRING(type)) {
709 //c = abc_pushundefined(c);
710 syntaxerror("internal error: can't generate default value for * type");
714 c = abc_coerce2(c, &m);
719 static int alloc_local()
721 return state->method->variable_count++;
724 static variable_t* new_variable2(methodstate_t*method, const char*name, classinfo_t*type, char init, char maybeslot)
727 variable_t*v = find_slot(method, name);
735 v->index = alloc_local();
737 v->init = v->kill = init;
740 if(!method->no_variable_scoping)
742 if(dict_contains(state->vars, name)) {
743 syntaxerror("variable %s already defined", name);
745 dict_put(state->vars, name, v);
747 if(method->no_variable_scoping &&
749 dict_contains(state->method->allvars, name))
751 variable_t*v = dict_lookup(state->method->allvars, name);
752 if(v->type != type && (!v->type || v->type->kind!=INFOTYPE_UNRESOLVED)) {
753 syntaxerror("variable %s already defined.", name);
757 dict_put(state->method->allvars, name, v);
762 static int new_variable(methodstate_t*method, const char*name, classinfo_t*type, char init, char maybeslot)
764 return new_variable2(method, name, type, init, maybeslot)->index;
767 #define TEMPVARNAME "__as3_temp__"
770 variable_t*v = find_variable(state, TEMPVARNAME);
775 i = new_variable(state->method, TEMPVARNAME, 0, 0, 0);
780 static code_t* var_block(code_t*body, dict_t*vars)
785 DICT_ITERATE_DATA(vars, variable_t*, v) {
786 if(v->type && v->init) {
787 c = defaultvalue(c, v->type);
788 c = abc_setlocal(c, v->index);
790 if(v->type && v->kill) {
791 k = abc_kill(k, v->index);
798 if(x->opcode== OPCODE___BREAK__ ||
799 x->opcode== OPCODE___CONTINUE__) {
800 /* link kill code before break/continue */
801 code_t*e = code_dup(k);
802 code_t*s = code_start(e);
814 c = code_append(c, body);
815 c = code_append(c, k);
819 static void unknown_variable(char*name)
821 if(!state->method->unresolved_variables)
822 state->method->unresolved_variables = dict_new();
823 if(!dict_contains(state->method->unresolved_variables, name))
824 dict_put(state->method->unresolved_variables, name, 0);
827 static code_t* add_scope_code(code_t*c, methodstate_t*m, char init)
829 if(m->uses_slots || m->innerfunctions || (m->late_binding && !m->inner)) {
830 c = abc_getlocal_0(c);
831 c = abc_pushscope(c);
834 /* FIXME: this alloc_local() causes variable indexes to be
835 different in pass2 than in pass1 */
836 if(!m->activation_var) {
837 m->activation_var = alloc_local();
840 c = abc_newactivation(c);
842 c = abc_pushscope(c);
843 c = abc_setlocal(c, m->activation_var);
845 c = abc_getlocal(c, m->activation_var);
846 c = abc_pushscope(c);
852 static code_t* method_header(methodstate_t*m)
856 c = add_scope_code(c, m, 1);
858 methodstate_list_t*l = m->innerfunctions;
860 parserassert(l->methodstate->abc);
861 if(m->uses_slots && l->methodstate->is_a_slot) {
862 c = abc_getscopeobject(c, 1);
863 c = abc_newfunction(c, l->methodstate->abc);
865 c = abc_setlocal(c, l->methodstate->var_index);
866 c = abc_setslot(c, l->methodstate->slot_index);
868 c = abc_newfunction(c, l->methodstate->abc);
869 c = abc_setlocal(c, l->methodstate->var_index);
871 free(l->methodstate);l->methodstate=0;
875 c = code_append(c, m->header);
878 if(m->is_constructor && !m->has_super) {
879 // call default constructor
880 c = abc_getlocal_0(c);
881 c = abc_constructsuper(c, 0);
885 /* all parameters that are used by inner functions
886 need to be copied from local to slot */
887 parserassert(m->activation_var);
888 DICT_ITERATE_ITEMS(m->slots,char*,name,variable_t*,v) {
889 if(v->is_parameter) {
890 c = abc_getlocal(c, m->activation_var);
891 c = abc_getlocal(c, v->index);
892 c = abc_setslot(c, v->index);
896 list_free(m->innerfunctions);
897 m->innerfunctions = 0;
902 static code_t* wrap_function(code_t*c,code_t*header, code_t*body)
904 c = code_append(c, header);
905 c = code_append(c, var_block(body, state->method->no_variable_scoping?state->method->allvars:state->vars));
906 /* append return if necessary */
907 if(!c || (c->opcode != OPCODE_RETURNVOID &&
908 c->opcode != OPCODE_RETURNVALUE)) {
909 c = abc_returnvoid(c);
914 static void startpackage(char*name)
917 state->package = strdup(name);
919 static void endpackage()
921 //used e.g. in classinfo_register:
922 //free(state->package);state->package=0;
926 #define FLAG_PUBLIC 256
927 #define FLAG_PROTECTED 512
928 #define FLAG_PRIVATE 1024
929 #define FLAG_PACKAGEINTERNAL 2048
930 #define FLAG_NAMESPACE 4096
932 static slotinfo_t* find_class(const char*name);
934 const char* lookup_namespace(const char*name)
938 const char*url = dict_lookup(s->namespaces, name);
944 registry_find(state->package, name);
945 if(( a = (varinfo_t*)find_class(name) )) {
946 if(a->kind == INFOTYPE_VAR) {
947 if(!a->value || !NS_TYPE(a->value->type))
948 syntaxerror("%s.%s is not a namespace", a->package, a->name);
949 return a->value->ns->name;
955 static namespace_t modifiers2access(modifiers_t*mod)
960 if(mod->flags&FLAG_NAMESPACE) {
961 if(mod->flags&(FLAG_PRIVATE|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
962 syntaxerror("invalid combination of access levels and namespaces");
963 ns.access = ACCESS_NAMESPACE;
964 const char*url = lookup_namespace(mod->ns);
967 syntaxerror("unknown namespace: %s (pass %d)", mod->ns, as3_pass);
973 } else if(mod->flags&FLAG_PUBLIC) {
974 if(mod->flags&(FLAG_PRIVATE|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
975 syntaxerror("invalid combination of access levels");
976 ns.access = ACCESS_PACKAGE;
977 } else if(mod->flags&FLAG_PRIVATE) {
978 if(mod->flags&(FLAG_PUBLIC|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
979 syntaxerror("invalid combination of access levels");
980 ns.access = ACCESS_PRIVATE;
981 } else if(mod->flags&FLAG_PROTECTED) {
982 if(mod->flags&(FLAG_PUBLIC|FLAG_PRIVATE|FLAG_PACKAGEINTERNAL))
983 syntaxerror("invalid combination of access levels");
984 ns.access = ACCESS_PROTECTED;
986 ns.access = ACCESS_PACKAGEINTERNAL;
991 static memberinfo_t* findmember_nsset(classinfo_t*cls, const char*name, char recurse, char is_static)
993 return registry_findmember_nsset(cls, state->active_namespace_urls, name, recurse, is_static);
996 static void innerfunctions2vars(methodstate_t*m)
998 methodstate_list_t*l = m->innerfunctions;
1000 methodstate_t*m = l->methodstate;
1002 variable_t* v = new_variable2(state->method, m->info->name, TYPE_FUNCTION(m->info), 0, 0);
1003 m->var_index = v->index;
1005 m->slot_index = m->is_a_slot;
1006 v->is_inner_method = m;
1011 static void function_initvars(methodstate_t*m, char has_params, params_t*params, int flags, char var0)
1016 index = new_variable(m, "this", 0, 0, 0);
1017 else if(!m->is_global)
1018 index = new_variable(m, (flags&FLAG_STATIC)?"class":"this", state->cls?state->cls->info:0, 0, 0);
1020 index = new_variable(m, "globalscope", 0, 0, 0);
1022 DICT_ITERATE_ITEMS(state->vars, char*, name, variable_t*, v) {
1023 printf("%s %d\n", name, v->index);
1026 parserassert(!index);
1031 for(p=params->list;p;p=p->next) {
1032 variable_t*v = new_variable2(m, p->param->name, p->param->type, 0, 1);
1033 v->is_parameter = 1;
1035 if(as3_pass==2 && m->need_arguments) {
1036 /* arguments can never be used by an innerfunction (the inner functions
1037 have their own arguments var), so it's ok to not initialize this until
1038 pass 2. (We don't know whether we need it before, anyway) */
1039 variable_t*v = new_variable2(m, "arguments", TYPE_ARRAY, 0, 0);
1040 m->need_arguments = v->index;
1044 innerfunctions2vars(m);
1047 m->scope_code = add_scope_code(m->scope_code, m, 0);
1049 /* exchange unresolved identifiers with the actual objects */
1050 DICT_ITERATE_ITEMS(m->slots, char*, name, variable_t*, v1) {
1051 if(v1->type && v1->type->kind == INFOTYPE_UNRESOLVED) {
1052 classinfo_t*type = (classinfo_t*)registry_resolve((slotinfo_t*)v1->type);
1053 if(!type || type->kind != INFOTYPE_CLASS) {
1054 syntaxerror("Couldn't find class %s::%s (%s)", v1->type->package, v1->type->name, name);
1061 DICT_ITERATE_ITEMS(m->allvars, char*, name2, variable_t*, v2) {
1062 if(v2->type && v2->type->kind == INFOTYPE_UNRESOLVED) {
1063 classinfo_t*type = (classinfo_t*)registry_resolve((slotinfo_t*)v2->type);
1064 if(!type || type->kind != INFOTYPE_CLASS) {
1065 syntaxerror("Couldn't find class %s::%s (%s)", v2->type->package, v2->type->name, name2);
1075 char*as3_globalclass=0;
1076 static void startclass(modifiers_t* mod, char*classname, classinfo_t*extends, classinfo_list_t*implements)
1079 syntaxerror("inner classes now allowed");
1084 classinfo_list_t*mlist=0;
1086 if(mod->flags&~(FLAG_PACKAGEINTERNAL|FLAG_PUBLIC|FLAG_FINAL|FLAG_DYNAMIC|FLAG_INTERFACE))
1087 syntaxerror("invalid modifier(s)");
1089 if((mod->flags&(FLAG_PUBLIC|FLAG_PACKAGEINTERNAL)) == (FLAG_PUBLIC|FLAG_PACKAGEINTERNAL))
1090 syntaxerror("public and internal not supported at the same time.");
1092 if((mod->flags&(FLAG_PROTECTED|FLAG_STATIC)) == (FLAG_PROTECTED|FLAG_STATIC))
1093 syntaxerror("protected and static not supported at the same time.");
1095 //if(!(mod->flags&FLAG_INTERFACE) && !extends) {
1096 if(!(mod->flags&FLAG_INTERFACE) && !extends) {
1097 // all classes extend object
1098 extends = registry_getobjectclass();
1101 /* create the class name, together with the proper attributes */
1105 if(!(mod->flags&FLAG_PUBLIC) && state->package==internal_filename_package) {
1106 access = ACCESS_PRIVATE; package = internal_filename_package;
1107 } else if(!(mod->flags&FLAG_PUBLIC) && state->package!=internal_filename_package) {
1108 access = ACCESS_PACKAGEINTERNAL; package = state->package;
1109 } else if(state->package!=internal_filename_package) {
1110 access = ACCESS_PACKAGE; package = state->package;
1112 syntaxerror("public classes only allowed inside a package");
1116 state->cls = rfx_calloc(sizeof(classstate_t));
1117 state->cls->init = methodstate_new();
1118 state->cls->static_init = methodstate_new();
1119 state->cls->static_init->is_static=FLAG_STATIC;
1120 /* notice: we make no effort to initialize the top variable (local0) here,
1121 even though it has special meaning. We just rely on the fact
1122 that pass 1 won't do anything with variables */
1124 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->cls);
1126 /* set current method to constructor- all code within the class-level (except
1127 static variable initializations) will be executed during construction time */
1128 state->method = state->cls->init;
1130 if(registry_find(package, classname)) {
1131 syntaxerror("Package \"%s\" already contains a class called \"%s\"", package, classname);
1133 /* build info struct */
1134 int num_interfaces = (list_length(implements));
1135 state->cls->info = classinfo_register(access, package, classname, num_interfaces);
1136 state->cls->info->flags |= mod->flags & (FLAG_DYNAMIC|FLAG_INTERFACE|FLAG_FINAL);
1137 state->cls->info->superclass = extends;
1140 classinfo_list_t*l = implements;
1141 for(l=implements;l;l=l->next) {
1142 state->cls->info->interfaces[pos++] = l->classinfo;
1147 state->cls = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1149 parserassert(state->cls && state->cls->info);
1151 state->method = state->cls->static_init;
1153 function_initvars(state->cls->init, 0, 0, 0, 1);
1154 state->cls->static_init->variable_count=1;
1155 function_initvars(state->cls->static_init, 0, 0, 0, 0);
1157 if(extends && (extends->flags & FLAG_FINAL))
1158 syntaxerror("Can't extend final class '%s'", extends->name);
1161 while(state->cls->info->interfaces[pos]) {
1162 if(!(state->cls->info->interfaces[pos]->flags & FLAG_INTERFACE))
1163 syntaxerror("'%s' is not an interface",
1164 state->cls->info->interfaces[pos]->name);
1168 /* generate the abc code for this class */
1169 MULTINAME(classname2,state->cls->info);
1170 multiname_t*extends2 = sig2mname(extends);
1172 /* don't add the class to the class index just yet- that will be done later
1174 state->cls->abc = abc_class_new(0, &classname2, extends2);
1175 state->cls->abc->file = global->file;
1177 multiname_destroy(extends2);
1178 if(state->cls->info->flags&FLAG_FINAL) abc_class_final(state->cls->abc);
1179 if(!(state->cls->info->flags&FLAG_DYNAMIC)) abc_class_sealed(state->cls->abc);
1180 if(state->cls->info->flags&FLAG_INTERFACE) {
1181 abc_class_interface(state->cls->abc);
1184 for(mlist=implements;mlist;mlist=mlist->next) {
1185 MULTINAME(m, mlist->classinfo);
1186 abc_class_add_interface(state->cls->abc, &m);
1189 state->cls->dependencies = parsedclass_new(state->cls->info, state->cls->abc);
1190 list_append(global->classes, state->cls->dependencies);
1192 /* flash.display.MovieClip handling */
1193 if(!as3_globalclass && (mod->flags&FLAG_PUBLIC) && slotinfo_equals((slotinfo_t*)registry_getMovieClip(),(slotinfo_t*)extends)) {
1194 if(state->package && state->package[0]) {
1195 as3_globalclass = concat3(state->package, ".", classname);
1197 as3_globalclass = strdup(classname);
1203 static void endclass()
1206 if(!state->cls->has_constructor && !(state->cls->info->flags&FLAG_INTERFACE)) {
1208 c = abc_getlocal_0(c);
1209 c = abc_constructsuper(c, 0);
1210 state->cls->init->header = code_append(state->cls->init->header, c);
1211 state->cls->has_constructor=1;
1213 if(state->cls->init) {
1214 if(state->cls->info->flags&FLAG_INTERFACE) {
1215 if(state->cls->init->header)
1216 syntaxerror("interface can not have class-level code");
1218 abc_method_t*m = abc_class_getconstructor(state->cls->abc, 0);
1219 code_t*c = method_header(state->cls->init);
1220 m->body->code = wrap_function(c, 0, m->body->code);
1223 if(state->cls->static_init) {
1224 abc_method_t*m = abc_class_getstaticconstructor(state->cls->abc, 0);
1225 code_t*c = method_header(state->cls->static_init);
1226 m->body->code = wrap_function(c, 0, m->body->code);
1229 trait_list_t*trait = state->cls->abc->traits;
1230 /* switch all protected members to the protected ns of this class */
1232 trait_t*t = trait->trait;
1233 if(t->name->ns->access == ACCESS_PROTECTED) {
1234 if(!state->cls->abc->protectedNS) {
1235 char*n = concat3(state->cls->info->package, ":", state->cls->info->name);
1236 state->cls->abc->protectedNS = namespace_new_protected(n);
1237 state->cls->abc->flags |= CLASS_PROTECTED_NS;
1239 t->name->ns->name = strdup(state->cls->abc->protectedNS->name);
1241 trait = trait->next;
1248 void check_code_for_break(code_t*c)
1251 if(c->opcode == OPCODE___BREAK__) {
1252 char*name = string_cstr(c->data[0]);
1253 syntaxerror("Unresolved \"break %s\"", name);
1255 if(c->opcode == OPCODE___CONTINUE__) {
1256 char*name = string_cstr(c->data[0]);
1257 syntaxerror("Unresolved \"continue %s\"", name);
1259 if(c->opcode == OPCODE___RETHROW__) {
1260 syntaxerror("Unresolved \"rethrow\"");
1262 if(c->opcode == OPCODE___FALLTHROUGH__) {
1263 syntaxerror("Unresolved \"fallthrough\"");
1265 if(c->opcode == OPCODE___PUSHPACKAGE__) {
1266 char*name = string_cstr(c->data[0]);
1267 syntaxerror("Can't reference a package (%s) as such", name);
1273 static void check_constant_against_type(classinfo_t*t, constant_t*c)
1275 #define xassert(b) if(!(b)) syntaxerror("Invalid default value %s for type '%s'", constant_tostring(c), t->name)
1276 if(TYPE_IS_NUMBER(t)) {
1277 xassert(c->type == CONSTANT_FLOAT
1278 || c->type == CONSTANT_INT
1279 || c->type == CONSTANT_UINT);
1280 } else if(TYPE_IS_UINT(t)) {
1281 xassert(c->type == CONSTANT_UINT ||
1282 (c->type == CONSTANT_INT && c->i>=0));
1283 } else if(TYPE_IS_INT(t)) {
1284 xassert(c->type == CONSTANT_INT);
1285 } else if(TYPE_IS_BOOLEAN(t)) {
1286 xassert(c->type == CONSTANT_TRUE
1287 || c->type == CONSTANT_FALSE);
1291 static void check_override(memberinfo_t*m, int flags)
1295 if(m->parent == state->cls->info && !((flags^m->flags)&FLAG_STATIC))
1296 syntaxerror("class '%s' already contains a method/slot '%s'", m->parent->name, m->name);
1298 syntaxerror("internal error: overriding method %s, which doesn't have parent", m->name);
1299 if(m->access==ACCESS_PRIVATE)
1301 if(m->flags & FLAG_FINAL)
1302 syntaxerror("can't override final member %s", m->name);
1304 /* allow this. it's no issue.
1305 if((m->flags & FLAG_STATIC) && !(flags&FLAG_STATIC))
1306 syntaxerror("can't override static member %s", m->name);*/
1308 if(!(m->flags & FLAG_STATIC) && (flags&FLAG_STATIC))
1309 syntaxerror("can't override non-static member %s with static declaration", m->name);
1311 if(!(flags&FLAG_OVERRIDE) && !(flags&FLAG_STATIC) && !(m->flags&FLAG_STATIC)) {
1312 if(m->parent && !(m->parent->flags&FLAG_INTERFACE)) {
1313 if(m->kind == INFOTYPE_METHOD)
1314 syntaxerror("can't override without explicit 'override' declaration");
1316 syntaxerror("can't override '%s'", m->name);
1321 static methodinfo_t*registerfunction(enum yytokentype getset, modifiers_t*mod, char*name, params_t*params, classinfo_t*return_type, int slot)
1323 methodinfo_t*minfo = 0;
1324 namespace_t ns = modifiers2access(mod);
1327 minfo = methodinfo_register_global(ns.access, state->package, name);
1328 minfo->return_type = return_type;
1329 } else if(getset != KW_GET && getset != KW_SET) {
1331 memberinfo_t* m = registry_findmember(state->cls->info, ns.name, name, 0, mod->flags&FLAG_STATIC);
1333 syntaxerror("class already contains a %s '%s'", infotypename((slotinfo_t*)m), m->name);
1335 minfo = methodinfo_register_onclass(state->cls->info, ns.access, ns.name, name, mod->flags&FLAG_STATIC);
1336 minfo->return_type = return_type;
1337 // getslot on a member slot only returns "undefined", so no need
1338 // to actually store these
1339 //state->minfo->slot = state->method->abc->method->trait->slot_id;
1341 //class getter/setter
1342 int gs = getset==KW_GET?SUBTYPE_GET:SUBTYPE_SET;
1344 if(getset == KW_GET) {
1346 } else if(params->list && params->list->param && !params->list->next) {
1347 type = params->list->param->type;
1349 syntaxerror("setter function needs to take exactly one argument");
1350 // not sure wether to look into superclasses here, too
1351 minfo = (methodinfo_t*)registry_findmember(state->cls->info, ns.name, name, 1, mod->flags&FLAG_STATIC);
1353 if(minfo->kind!=INFOTYPE_VAR)
1354 syntaxerror("class already contains a method called '%s'", name);
1355 if(!(minfo->subtype & (SUBTYPE_GETSET)))
1356 syntaxerror("class already contains a field called '%s'", name);
1357 if(minfo->subtype & gs)
1358 syntaxerror("getter/setter for '%s' already defined", name);
1359 /* make a setter or getter into a getset */
1360 minfo->subtype |= gs;
1363 FIXME: this check needs to be done in pass 2
1365 if((!minfo->return_type != !type) ||
1366 (minfo->return_type && type &&
1367 !strcmp(minfo->return_type->name, type->name))) {
1368 syntaxerror("different type in getter and setter: %s and %s",
1369 minfo->return_type?minfo->return_type->name:"*",
1370 type?type->name:"*");
1373 minfo = methodinfo_register_onclass(state->cls->info, ns.access, ns.name, name, mod->flags&FLAG_STATIC);
1374 minfo->kind = INFOTYPE_VAR; //hack
1375 minfo->subtype = gs;
1376 minfo->return_type = type;
1379 /* can't assign a slot as getter and setter might have different slots */
1380 //minfo->slot = slot;
1382 if(mod->flags&FLAG_FINAL) minfo->flags |= FLAG_FINAL;
1383 if(mod->flags&FLAG_STATIC) minfo->flags |= FLAG_STATIC;
1384 if(mod->flags&FLAG_OVERRIDE) minfo->flags |= FLAG_OVERRIDE;
1389 static void innerfunction(char*name, params_t*params, classinfo_t*return_type)
1391 //parserassert(state->method && state->method->info);
1393 methodstate_t*parent_method = state->method;
1397 return_type = 0; // not valid in pass 1
1399 v = new_variable2(parent_method, name, 0, 0, 0);
1404 state->new_vars = 1;
1407 state->method = methodstate_new();
1408 state->method->inner = 1;
1409 state->method->is_static = parent_method->is_static;
1410 state->method->variable_count = 0;
1411 state->method->abc = rfx_calloc(sizeof(abc_method_t));
1413 v->is_inner_method = state->method;
1416 NEW(methodinfo_t,minfo);
1417 minfo->kind = INFOTYPE_METHOD;
1418 minfo->access = ACCESS_PACKAGEINTERNAL;
1420 state->method->info = minfo;
1423 list_append(parent_method->innerfunctions, state->method);
1425 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
1427 function_initvars(state->method, 1, params, 0, 1);
1431 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1432 state->method->variable_count = 0;
1433 parserassert(state->method);
1435 state->method->info->return_type = return_type;
1436 function_initvars(state->method, 1, params, 0, 1);
1440 static void startfunction(modifiers_t*mod, enum yytokentype getset, char*name,
1441 params_t*params, classinfo_t*return_type)
1443 if(state->method && state->method->info) {
1444 syntaxerror("not able to start another method scope");
1447 state->new_vars = 1;
1450 state->method = methodstate_new();
1451 state->method->has_super = 0;
1452 state->method->is_static = mod->flags&FLAG_STATIC;
1455 state->method->is_constructor = !strcmp(state->cls->info->name,name);
1457 state->method->is_global = 1;
1458 state->method->late_binding = 1; // for global methods, always push local_0 on the scope stack
1460 if(state->method->is_constructor)
1461 name = "__as3_constructor__";
1463 state->method->info = registerfunction(getset, mod, name, params, return_type, 0);
1465 function_initvars(state->method, 1, params, mod->flags, 1);
1467 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
1471 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1472 state->method->variable_count = 0;
1473 parserassert(state->method);
1476 memberinfo_t*m = registry_findmember(state->cls->info, mod->ns, name, 2, mod->flags&FLAG_STATIC);
1477 check_override(m, mod->flags);
1481 state->cls->has_constructor |= state->method->is_constructor;
1484 function_initvars(state->method, 1, params, mod->flags, 1);
1488 static void insert_unresolved(methodstate_t*m, dict_t*xvars, dict_t*allvars)
1490 parserassert(m->inner);
1491 if(m->unresolved_variables) {
1492 dict_t*d = m->unresolved_variables;
1494 DICT_ITERATE_KEY(d, char*, id) {
1495 /* check parent method's variables */
1497 if(dict_contains(allvars, id)) {
1498 m->uses_parent_function = 1;
1499 state->method->uses_slots = 1;
1500 dict_put(xvars, id, 0);
1504 methodstate_list_t*ml = m->innerfunctions;
1506 insert_unresolved(ml->methodstate, xvars, allvars);
1511 static abc_method_t* endfunction(modifiers_t*mod, enum yytokentype getset, char*name,
1512 params_t*params, classinfo_t*return_type, code_t*body)
1515 dict_t*xvars = dict_new();
1517 if(state->method->unresolved_variables) {
1518 DICT_ITERATE_KEY(state->method->unresolved_variables, char*, vname) {
1519 if(!state->method->no_variable_scoping && dict_contains(state->method->allvars, vname)) {
1520 variable_t*v = dict_lookup(state->method->allvars, vname);
1521 if(!v->is_inner_method) {
1522 state->method->no_variable_scoping = 1;
1523 as3_warning("function %s uses forward or outer block variable references (%s): switching into compatibility mode", name, vname);
1529 methodstate_list_t*ml = state->method->innerfunctions;
1531 insert_unresolved(ml->methodstate, xvars, state->method->allvars);
1535 if(state->method->uses_slots) {
1536 state->method->slots = dict_new();
1538 DICT_ITERATE_ITEMS(state->method->allvars, char*, name, variable_t*, v) {
1539 if(!name) syntaxerror("internal error");
1540 if(v->index && dict_contains(xvars, name)) {
1541 v->init = v->kill = 0;
1543 if(v->is_inner_method) {
1544 v->is_inner_method->is_a_slot = i;
1547 dict_put(state->method->slots, name, v);
1550 state->method->uses_slots = i;
1551 dict_destroy(state->vars);state->vars = 0;
1552 parserassert(state->new_vars);
1559 /*if(state->method->uses_parent_function){
1560 syntaxerror("accessing variables of parent function from inner functions not supported yet");
1565 multiname_t*type2 = sig2mname(return_type);
1567 if(state->method->inner) {
1568 f = state->method->abc;
1569 abc_method_init(f, global->file, type2, 1);
1570 } else if(state->method->is_constructor) {
1571 f = abc_class_getconstructor(state->cls->abc, type2);
1572 } else if(!state->method->is_global) {
1573 namespace_t ns = modifiers2access(mod);
1574 multiname_t mname = {QNAME, &ns, 0, name};
1575 if(mod->flags&FLAG_STATIC)
1576 f = abc_class_staticmethod(state->cls->abc, type2, &mname);
1578 f = abc_class_method(state->cls->abc, type2, &mname);
1579 slot = f->trait->slot_id;
1581 namespace_t mname_ns = {state->method->info->access, state->package};
1582 multiname_t mname = {QNAME, &mname_ns, 0, name};
1584 f = abc_method_new(global->file, type2, 1);
1585 if(!global->init) global->init = abc_initscript(global->file);
1586 trait_t*t = trait_new_method(&global->init->traits, multiname_clone(&mname), f);
1587 //abc_code_t*c = global->init->method->body->code;
1589 //flash doesn't seem to allow us to access function slots
1590 //state->method->info->slot = slot;
1592 if(mod && mod->flags&FLAG_OVERRIDE) f->trait->attributes |= TRAIT_ATTR_OVERRIDE;
1593 if(getset == KW_GET) f->trait->kind = TRAIT_GETTER;
1594 if(getset == KW_SET) f->trait->kind = TRAIT_SETTER;
1595 if(params->varargs) f->flags |= METHOD_NEED_REST;
1596 if(state->method->need_arguments) f->flags |= METHOD_NEED_ARGUMENTS;
1600 for(p=params->list;p;p=p->next) {
1601 if(params->varargs && !p->next) {
1602 break; //varargs: omit last parameter in function signature
1604 multiname_t*m = sig2mname(p->param->type);
1605 list_append(f->parameters, m);
1606 if(p->param->value) {
1607 check_constant_against_type(p->param->type, p->param->value);
1608 opt=1;list_append(f->optional_parameters, p->param->value);
1610 syntaxerror("function %s: non-optional parameter not allowed after optional parameters", name);
1613 if(state->method->slots) {
1614 DICT_ITERATE_ITEMS(state->method->slots, char*, name, variable_t*, v) {
1616 multiname_t*mname = multiname_new(namespace_new(ACCESS_PACKAGE, ""), name);
1617 multiname_t*type = sig2mname(v->type);
1618 trait_t*t = trait_new_member(&f->body->traits, type, mname, 0);
1619 t->slot_id = v->index;
1624 check_code_for_break(body);
1626 /* Seems this works now.
1627 if(state->method->exceptions && state->method->uses_slots) {
1628 as3_warning("try/catch and activation not supported yet within the same method");
1632 f->body->code = body;
1633 f->body->exceptions = state->method->exceptions;
1634 } else { //interface
1636 syntaxerror("interface methods can't have a method body");
1646 void breakjumpsto(code_t*c, char*name, code_t*jump)
1649 if(c->opcode == OPCODE___BREAK__) {
1650 string_t*name2 = c->data[0];
1651 if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1652 c->opcode = OPCODE_JUMP;
1659 void continuejumpsto(code_t*c, char*name, code_t*jump)
1662 if(c->opcode == OPCODE___CONTINUE__) {
1663 string_t*name2 = c->data[0];
1664 if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1665 c->opcode = OPCODE_JUMP;
1673 code_t*converttype(code_t*c, classinfo_t*from, classinfo_t*to)
1678 return abc_coerce_a(c);
1682 // cast an "any" type to a specific type. subject to
1683 // runtime exceptions
1684 return abc_coerce2(c, &m);
1687 if((TYPE_IS_NUMBER(from) || TYPE_IS_UINT(from) || TYPE_IS_INT(from)) &&
1688 (TYPE_IS_NUMBER(to) || TYPE_IS_UINT(to) || TYPE_IS_INT(to))) {
1689 // allow conversion between number types
1690 if(TYPE_IS_UINT(to))
1691 return abc_convert_u(c);
1692 else if(TYPE_IS_INT(to))
1693 return abc_convert_i(c);
1694 else if(TYPE_IS_NUMBER(to))
1695 return abc_convert_d(c);
1696 return abc_coerce2(c, &m);
1699 if(TYPE_IS_XMLLIST(to) && TYPE_IS_XML(from))
1702 if(TYPE_IS_BOOLEAN(to))
1703 return abc_convert_b(c);
1704 if(TYPE_IS_STRING(to))
1705 return abc_convert_s(c);
1706 if(TYPE_IS_OBJECT(to))
1707 return abc_coerce2(c, &m);
1708 if(TYPE_IS_OBJECT(from) && TYPE_IS_XMLLIST(to))
1709 return abc_coerce2(c, &m);
1710 if(TYPE_IS_OBJECT(from) && TYPE_IS_ARRAY(to))
1711 return abc_coerce2(c, &m);
1713 classinfo_t*supertype = from;
1715 if(supertype == to) {
1716 /* target type is one of from's superclasses.
1717 (not sure we need this coerce - as far as the verifier
1718 is concerned, object==object (i think) */
1719 return abc_coerce2(c, &m);
1722 while(supertype->interfaces[t]) {
1723 if(supertype->interfaces[t]==to) {
1724 // target type is one of from's interfaces
1725 return abc_coerce2(c, &m);
1729 supertype = supertype->superclass;
1731 if(TYPE_IS_FUNCTION(from) && TYPE_IS_FUNCTION(to))
1733 if(TYPE_IS_CLASS(from) && TYPE_IS_CLASS(to))
1735 if(TYPE_IS_NULL(from) && !IS_NUMBER_OR_INT(to))
1739 as3_error("can't convert type %s%s%s to %s%s%s",
1740 from->package, from->package[0]?".":"", from->name,
1741 to->package, to->package[0]?".":"", to->name);
1745 code_t* coerce_to_type(code_t*c, classinfo_t*t)
1748 return abc_coerce_a(c);
1749 } else if(TYPE_IS_STRING(t)) {
1750 return abc_coerce_s(c);
1753 return abc_coerce2(c, &m);
1757 char is_pushundefined(code_t*c)
1759 return (c && !c->prev && !c->next && c->opcode == OPCODE_PUSHUNDEFINED);
1762 static const char* get_package_from_name(const char*name)
1764 /* try explicit imports */
1765 dictentry_t* e = dict_get_slot(state->imports, name);
1767 if(!strcmp(e->key, name)) {
1768 slotinfo_t*c = (slotinfo_t*)e->data;
1769 if(c) return c->package;
1775 static namespace_list_t*get_current_imports()
1777 namespace_list_t*searchlist = 0;
1779 list_append(searchlist, namespace_new_package(state->package));
1781 import_list_t*l = state->wildcard_imports;
1783 namespace_t*ns = namespace_new_package(l->import->package);
1784 list_append(searchlist, ns);
1787 list_append(searchlist, namespace_new_package(""));
1788 list_append(searchlist, namespace_new_package(internal_filename_package));
1792 static slotinfo_t* find_class(const char*name)
1796 c = registry_find(state->package, name);
1799 /* try explicit imports */
1800 dictentry_t* e = dict_get_slot(state->imports, name);
1803 if(!strcmp(e->key, name)) {
1804 c = (slotinfo_t*)e->data;
1810 /* try package.* imports */
1811 import_list_t*l = state->wildcard_imports;
1813 //printf("does package %s contain a class %s?\n", l->import->package, name);
1814 c = registry_find(l->import->package, name);
1819 /* try global package */
1820 c = registry_find("", name);
1823 /* try local "filename" package */
1824 c = registry_find(internal_filename_package, name);
1829 typedcode_t push_class(slotinfo_t*a)
1834 if(a->access == ACCESS_PACKAGEINTERNAL &&
1835 strcmp(a->package, state->package) &&
1836 strcmp(a->package, internal_filename_package)
1838 syntaxerror("Can't access internal %s %s in package '%s' from package '%s'",
1839 infotypename(a), a->name, a->package, state->package);
1843 if(a->kind != INFOTYPE_CLASS) {
1845 x.c = abc_findpropstrict2(x.c, &m);
1846 x.c = abc_getproperty2(x.c, &m);
1847 if(a->kind == INFOTYPE_METHOD) {
1848 methodinfo_t*f = (methodinfo_t*)a;
1849 x.t = TYPE_FUNCTION(f);
1851 varinfo_t*v = (varinfo_t*)a;
1856 if(state->cls && state->method == state->cls->static_init) {
1857 /* we're in the static initializer.
1858 record the fact that we're using this class here */
1859 parsedclass_add_dependency(state->cls->dependencies, (classinfo_t*)a);
1861 classinfo_t*c = (classinfo_t*)a;
1863 if(0) { //Error #1026: Slot 1 exceeds slotCount=0 of global
1864 x.c = abc_getglobalscope(x.c);
1865 x.c = abc_getslot(x.c, c->slot);
1868 x.c = abc_getlex2(x.c, &m);
1870 x.t = TYPE_CLASS(c);
1876 char is_break_or_jump(code_t*c)
1880 if(c->opcode == OPCODE_JUMP ||
1881 c->opcode == OPCODE___BREAK__ ||
1882 c->opcode == OPCODE___CONTINUE__ ||
1883 c->opcode == OPCODE_THROW ||
1884 c->opcode == OPCODE_RETURNVOID ||
1885 c->opcode == OPCODE_RETURNVALUE) {
1891 #define IS_FINALLY_TARGET(op) \
1892 ((op) == OPCODE___CONTINUE__ || \
1893 (op) == OPCODE___BREAK__ || \
1894 (op) == OPCODE_RETURNVOID || \
1895 (op) == OPCODE_RETURNVALUE || \
1896 (op) == OPCODE___RETHROW__)
1898 static code_t* insert_finally_lookup(code_t*c, code_t*finally, int tempvar)
1900 #define NEED_EXTRA_STACK_ARG
1901 code_t*finally_label = abc_nop(0);
1902 NEW(lookupswitch_t, l);
1908 code_t*prev = i->prev;
1909 if(IS_FINALLY_TARGET(i->opcode)) {
1912 if(i->opcode == OPCODE___RETHROW__ ||
1913 i->opcode == OPCODE_RETURNVALUE) {
1914 if(i->opcode == OPCODE___RETHROW__)
1915 i->opcode = OPCODE_THROW;
1917 p = abc_coerce_a(p);
1918 p = abc_setlocal(p, tempvar);
1920 p = abc_pushbyte(p, count++);
1921 p = abc_jump(p, finally_label);
1922 code_t*target = p = abc_label(p);
1923 #ifdef NEED_EXTRA_STACK_ARG
1927 p = abc_getlocal(p, tempvar);
1930 p->next = i;i->prev = p;
1931 list_append(l->targets, target);
1937 c = abc_pushbyte(c, -1);
1938 c = code_append(c, finally_label);
1939 c = code_append(c, finally);
1941 #ifdef NEED_EXTRA_STACK_ARG
1944 c = abc_lookupswitch(c, l);
1945 c = l->def = abc_label(c);
1946 #ifdef NEED_EXTRA_STACK_ARG
1953 static code_t* insert_finally_simple(code_t*c, code_t*finally, int tempvar)
1957 code_t*prev = i->prev;
1958 if(IS_FINALLY_TARGET(i->opcode)) {
1959 if(i->opcode == OPCODE___RETHROW__)
1960 i->opcode = OPCODE_THROW;
1961 code_t*end = code_dup(finally);
1962 code_t*start = code_start(end);
1963 if(prev) prev->next = start;
1970 return code_append(c, finally);
1973 code_t* insert_finally(code_t*c, code_t*finally, int tempvar)
1979 int num_insertion_points=0;
1981 if(IS_FINALLY_TARGET(i->opcode))
1982 num_insertion_points++;
1989 if(i->branch || i->opcode == OPCODE_LOOKUPSWITCH) {
1994 int simple_version_cost = (1+num_insertion_points)*code_size;
1995 int lookup_version_cost = 4*num_insertion_points + 5;
1997 if(cantdup || simple_version_cost > lookup_version_cost) {
1998 //printf("(use lookup) simple=%d > lookup=%d\n", simple_version_cost, lookup_version_cost);
1999 return insert_finally_lookup(c, finally, tempvar);
2001 //printf("(use simple) simple=%d < lookup=%d\n", simple_version_cost, lookup_version_cost);
2002 return insert_finally_simple(c, finally, tempvar);
2006 #define PASS1 }} if(as3_pass == 1) {{
2007 #define PASS1END }} if(as3_pass == 2) {{
2008 #define PASS2 }} if(as3_pass == 2) {{
2009 #define PASS12 }} if(as3_pass == 1 || as3_pass == 2) {{
2010 #define PASS12END }} if(as3_pass == 2) {{
2011 #define PASS_ALWAYS }} {{
2015 /* Line 273 of skeleton.m4 */
2016 #line 2017 "parser.tab.c"
2017 /* Unqualified %code blocks. */
2019 /* Line 274 of skeleton.m4 */
2020 #line 2107 "parser.y"
2022 char is_subtype_of(classinfo_t*type, classinfo_t*supertype)
2026 char do_init_variable(char*name)
2028 if(!state->method->no_variable_scoping)
2030 if(!state->new_vars)
2036 /* Line 274 of skeleton.m4 */
2037 #line 2557 "parser.y"
2039 static void state_has_imports()
2041 state->wildcard_imports = list_clone(state->wildcard_imports);
2042 state->imports = dict_clone(state->imports);
2043 state->has_own_imports = 1;
2045 static void import_toplevel(const char*package)
2047 char* s = strdup(package);
2049 dict_put(state->import_toplevel_packages, s, 0);
2050 char*x = strrchr(s, '.');
2059 /* Line 274 of skeleton.m4 */
2060 #line 2700 "parser.y"
2062 static int slotstate_varconst = 0;
2063 static modifiers_t*slotstate_flags = 0;
2064 static void setslotstate(modifiers_t* flags, int varconst)
2066 slotstate_varconst = varconst;
2067 slotstate_flags = flags;
2070 if(flags->flags&FLAG_STATIC) {
2071 state->method = state->cls->static_init;
2073 state->method = state->cls->init;
2076 // reset to "default" state (all in class code is static by default) */
2077 state->method = state->cls->static_init;
2080 parserassert(state->method);
2083 static trait_t* add_abc_slot(modifiers_t* modifiers, const char*name, multiname_t*m, code_t***c)
2085 int flags = modifiers->flags;
2086 namespace_t ns = modifiers2access(modifiers);
2089 multiname_t mname = {QNAME, &ns, 0, name};
2091 trait_list_t**traits;
2095 if(!global->init) global->init = abc_initscript(global->file);
2096 ns.name = state->package;
2097 traits = &global->init->traits;
2098 code = &global->init->method->body->code;
2099 } else if(flags&FLAG_STATIC) {
2101 traits = &state->cls->abc->static_traits;
2102 code = &state->cls->static_init->header;
2104 // instance variable
2105 traits = &state->cls->abc->traits;
2106 code = &state->cls->init->header;
2108 if(ns.access == ACCESS_PROTECTED) {
2109 ns.name = concat3(state->cls->info->package,":",state->cls->info->name);
2115 *m = *multiname_clone(&mname);
2117 return trait_new_member(traits, 0, multiname_clone(&mname), 0);
2121 /* Line 274 of skeleton.m4 */
2122 #line 2874 "parser.y"
2124 static int xml_level = 0;
2127 /* Line 274 of skeleton.m4 */
2128 #line 3539 "parser.y"
2130 node_t* resolve_identifier(const char*name);
2131 node_t* get_descendants(node_t*e,const char*ns,const char*subnode,char multi, char attr)
2133 typedcode_t v = node_read(e);
2136 multiname_t m = {0,0,0,subnode};
2137 namespace_t zero = {ZERONAMESPACE,"*"};
2138 if(!strcmp(ns,"*")) {
2140 m.type = attr?QNAMEA:QNAME;
2142 typedcode_t w = node_read(resolve_identifier(ns));
2143 if(!TYPE_IS_NAMESPACE(w.t)) {
2144 as3_softwarning("%s might not be a namespace", ns);
2146 v.c = code_append(v.c, w.c);
2147 v.c = converttype(v.c, w.t, TYPE_NAMESPACE);
2148 m.type = attr?RTQNAMEA:RTQNAME;
2152 v.c = abc_getproperty2(v.c, &m);
2154 v.c = abc_getdescendants2(v.c, &m);
2157 if(TYPE_IS_XML(v.t)) {
2160 v.c = abc_coerce_a(v.c);
2163 return mkcodenode(v);
2167 /* Line 274 of skeleton.m4 */
2168 #line 3710 "parser.y"
2170 node_t* var_read(variable_t*v)
2173 o.c = abc_getlocal(0, v->index);
2175 return mkcodenode(o);
2178 node_t* resolve_identifier(const char*name)
2188 /* look at variables */
2189 if((v = find_variable(state, name))) {
2190 // name is a local variable
2193 if((v = find_slot(state->method, name))) {
2194 o.c = abc_getscopeobject(o.c, 1);
2195 o.c = abc_getslot(o.c, v->index);
2197 return mkcodenode(o);
2200 int i_am_static = state->method->is_static;
2202 if(!state->method->inner && !state->xmlfilter && state->cls)
2204 /* look at current class' members */
2205 if((f = findmember_nsset(state->cls->info, name, 1, i_am_static)))
2207 // name is a member or attribute in this class
2208 int var_is_static = (f->flags&FLAG_STATIC);
2210 if(f->kind == INFOTYPE_VAR && (f->flags&FLAG_CONST)) {
2211 /* if the variable is a constant (and we know what is evaluates to), we
2212 can just use the value itself */
2213 varinfo_t*v = (varinfo_t*)f;
2215 return mkconstnode(v->value);
2219 if(var_is_static >= i_am_static) {
2220 if(f->kind == INFOTYPE_METHOD) {
2221 o.t = TYPE_FUNCTION(f);
2226 if(var_is_static && !i_am_static) {
2227 /* access to a static member from a non-static location.
2228 do this via findpropstrict:
2229 there doesn't seem to be any non-lookup way to access
2230 static properties of a class */
2231 state->method->late_binding = 1;
2233 namespace_t ns = {f->access, f->package};
2234 multiname_t m = {QNAME, &ns, 0, name};
2235 o.c = abc_findpropstrict2(o.c, &m);
2236 o.c = abc_getproperty2(o.c, &m);
2237 return mkcodenode(o);
2238 } else if(f->slot>0) {
2239 o.c = abc_getlocal_0(o.c);
2240 o.c = abc_getslot(o.c, f->slot);
2241 return mkcodenode(o);
2243 MEMBER_MULTINAME(m, f, name);
2244 o.c = abc_getlocal_0(o.c);
2245 o.c = abc_getproperty2(o.c, &m);
2246 return mkcodenode(o);
2250 /* special case: it's allowed to access non-static constants
2251 from a static context */
2252 if(i_am_static && (f=findmember_nsset(state->cls->info, name, 1, 0))) {
2253 if(f->kind == INFOTYPE_VAR && (f->flags&FLAG_CONST)) {
2254 varinfo_t*v = (varinfo_t*)f;
2256 return mkconstnode(v->value);
2262 /* look at actual classes, in the current package and imported */
2263 if(!state->xmlfilter && (a = find_class(name))) {
2264 if(state->cls && state->cls->info == (classinfo_t*)a && i_am_static) {
2265 o.c = abc_getlocal_0(0);
2266 o.t = TYPE_CLASS((classinfo_t*)a);
2270 return mkcodenode(o);
2273 /* look through package prefixes */
2274 if(!state->xmlfilter &&
2275 (dict_contains(state->import_toplevel_packages, name) ||
2276 registry_ispackage(name))) {
2277 o.c = abc___pushpackage__(o.c, (char*)name);
2279 return mkcodenode(o); //?
2282 /* unknown object, let the avm2 resolve it */
2284 if(!state->method->inner && !state->xmlfilter) {
2285 /* we really should make inner functions aware of the class context */
2286 as3_warning("Couldn't resolve '%s', doing late binding", name);
2288 state->method->late_binding = 1;
2290 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, name};
2293 o.c = abc_findpropstrict2(o.c, &m);
2294 o.c = abc_getproperty2(o.c, &m);
2295 return mkcodenode(o);
2300 /* Line 274 of skeleton.m4 */
2301 #line 3866 "parser.y"
2303 void add_active_url(const char*url)
2307 list_append(state->active_namespace_urls, n);
2312 /* Line 274 of skeleton.m4 */
2313 #line 2314 "parser.tab.c"
2320 typedef YYTYPE_UINT8 yytype_uint8;
2322 typedef unsigned char yytype_uint8;
2326 typedef YYTYPE_INT8 yytype_int8;
2327 #elif (defined __STDC__ || defined __C99__FUNC__ \
2328 || defined __cplusplus || defined _MSC_VER)
2329 typedef signed char yytype_int8;
2331 typedef short int yytype_int8;
2334 #ifdef YYTYPE_UINT16
2335 typedef YYTYPE_UINT16 yytype_uint16;
2337 typedef unsigned short int yytype_uint16;
2341 typedef YYTYPE_INT16 yytype_int16;
2343 typedef short int yytype_int16;
2347 # ifdef __SIZE_TYPE__
2348 # define YYSIZE_T __SIZE_TYPE__
2349 # elif defined size_t
2350 # define YYSIZE_T size_t
2351 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
2352 || defined __cplusplus || defined _MSC_VER)
2353 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
2354 # define YYSIZE_T size_t
2356 # define YYSIZE_T unsigned int
2360 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
2365 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
2366 # define YY_(msgid) dgettext ("bison-runtime", msgid)
2370 # define YY_(msgid) msgid
2374 /* Suppress unused-variable warnings by "using" E. */
2375 #if ! defined lint || defined __GNUC__
2376 # define YYUSE(e) ((void) (e))
2378 # define YYUSE(e) /* empty */
2381 /* Identity function, used to suppress warnings about constant conditions. */
2383 # define YYID(n) (n)
2385 #if (defined __STDC__ || defined __C99__FUNC__ \
2386 || defined __cplusplus || defined _MSC_VER)
2399 #if ! defined yyoverflow || YYERROR_VERBOSE
2401 /* The parser invokes alloca or malloc; define the necessary symbols. */
2403 # ifdef YYSTACK_USE_ALLOCA
2404 # if YYSTACK_USE_ALLOCA
2406 # define YYSTACK_ALLOC __builtin_alloca
2407 # elif defined __BUILTIN_VA_ARG_INCR
2408 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
2410 # define YYSTACK_ALLOC __alloca
2411 # elif defined _MSC_VER
2412 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
2413 # define alloca _alloca
2415 # define YYSTACK_ALLOC alloca
2416 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
2417 || defined __cplusplus || defined _MSC_VER)
2418 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
2420 # define _STDLIB_H 1
2427 # ifdef YYSTACK_ALLOC
2428 /* Pacify GCC's `empty if-body' warning. */
2429 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
2430 # ifndef YYSTACK_ALLOC_MAXIMUM
2431 /* The OS might guarantee only one guard page at the bottom of the stack,
2432 and a page size can be as small as 4096 bytes. So we cannot safely
2433 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
2434 to allow for a few compiler-allocated temporary stack slots. */
2435 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
2438 # define YYSTACK_ALLOC YYMALLOC
2439 # define YYSTACK_FREE YYFREE
2440 # ifndef YYSTACK_ALLOC_MAXIMUM
2441 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
2443 # if (defined __cplusplus && ! defined _STDLIB_H \
2444 && ! ((defined YYMALLOC || defined malloc) \
2445 && (defined YYFREE || defined free)))
2446 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
2448 # define _STDLIB_H 1
2452 # define YYMALLOC malloc
2453 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
2454 || defined __cplusplus || defined _MSC_VER)
2455 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
2459 # define YYFREE free
2460 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
2461 || defined __cplusplus || defined _MSC_VER)
2462 void free (void *); /* INFRINGES ON USER NAME SPACE */
2466 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
2469 #if (! defined yyoverflow \
2470 && (! defined __cplusplus \
2471 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
2473 /* A type that is properly aligned for any stack member. */
2476 yytype_int16 yyss_alloc;
2480 /* The size of the maximum gap between one aligned stack and the next. */
2481 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
2483 /* The size of an array large to enough to hold all stacks, each with
2485 # define YYSTACK_BYTES(N) \
2486 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
2487 + YYSTACK_GAP_MAXIMUM)
2489 /* Copy COUNT objects from FROM to TO. The source and destination do
2492 # if defined __GNUC__ && 1 < __GNUC__
2493 # define YYCOPY(To, From, Count) \
2494 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
2496 # define YYCOPY(To, From, Count) \
2500 for (yyi = 0; yyi < (Count); yyi++) \
2501 (To)[yyi] = (From)[yyi]; \
2507 /* Relocate STACK from its old location to the new one. The
2508 local variables YYSIZE and YYSTACKSIZE give the old and new number of
2509 elements in the stack, and YYPTR gives the new location of the
2510 stack. Advance YYPTR to a properly aligned location for the next
2512 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
2515 YYSIZE_T yynewbytes; \
2516 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
2517 Stack = &yyptr->Stack_alloc; \
2518 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
2519 yyptr += yynewbytes / sizeof (*yyptr); \
2525 /* YYFINAL -- State number of the termination state. */
2527 /* YYLAST -- Last index in YYTABLE. */
2530 /* YYNTOKENS -- Number of terminals. */
2531 #define YYNTOKENS 135
2532 /* YYNNTS -- Number of nonterminals. */
2534 /* YYNRULES -- Number of rules. */
2535 #define YYNRULES 356
2536 /* YYNRULES -- Number of states. */
2537 #define YYNSTATES 612
2539 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
2540 #define YYUNDEFTOK 2
2541 #define YYMAXUTOK 364
2543 #define YYTRANSLATE(YYX) \
2544 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
2546 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
2547 static const yytype_uint8 yytranslate[] =
2549 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2550 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2551 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2552 2, 2, 2, 119, 2, 2, 2, 117, 108, 2,
2553 123, 134, 116, 114, 101, 113, 128, 115, 2, 2,
2554 2, 2, 2, 2, 2, 2, 2, 2, 105, 100,
2555 110, 103, 111, 104, 129, 2, 2, 2, 2, 2,
2556 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2557 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2558 2, 125, 2, 126, 107, 2, 2, 2, 2, 2,
2559 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2560 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2561 2, 2, 2, 127, 106, 133, 118, 2, 2, 2,
2562 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2563 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2564 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2565 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2566 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2567 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2568 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2569 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2570 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2571 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2572 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2573 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2574 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
2575 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
2576 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
2577 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
2578 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
2579 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
2580 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
2581 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
2582 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
2583 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
2584 95, 96, 97, 98, 99, 102, 109, 112, 120, 121,
2585 122, 124, 130, 131, 132
2589 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
2591 static const yytype_uint16 yyprhs[] =
2593 0, 0, 3, 5, 6, 8, 10, 13, 15, 17,
2594 19, 21, 23, 25, 30, 32, 33, 35, 37, 40,
2595 42, 44, 46, 48, 50, 55, 60, 62, 64, 65,
2596 68, 70, 72, 74, 76, 78, 80, 82, 84, 86,
2597 88, 90, 92, 94, 96, 100, 103, 105, 107, 109,
2598 111, 113, 115, 117, 122, 125, 127, 129, 130, 134,
2599 137, 138, 141, 144, 146, 150, 154, 155, 158, 159,
2600 162, 169, 170, 172, 174, 178, 180, 183, 187, 196,
2601 203, 209, 216, 218, 221, 223, 226, 227, 229, 231,
2602 234, 236, 239, 244, 248, 249, 258, 259, 269, 270,
2603 276, 278, 281, 283, 286, 288, 289, 296, 299, 301,
2604 306, 309, 311, 313, 315, 317, 321, 323, 324, 331,
2605 332, 338, 341, 344, 349, 350, 352, 354, 357, 359,
2606 361, 363, 365, 367, 369, 371, 373, 375, 377, 378,
2607 381, 382, 385, 386, 389, 390, 400, 401, 410, 411,
2608 413, 415, 418, 420, 425, 427, 429, 434, 436, 437,
2609 439, 441, 444, 446, 449, 458, 460, 462, 463, 468,
2610 470, 474, 478, 479, 482, 484, 486, 488, 490, 492,
2611 494, 496, 498, 500, 502, 504, 506, 507, 508, 513,
2612 514, 519, 520, 523, 526, 529, 532, 536, 538, 540,
2613 541, 543, 550, 561, 573, 575, 578, 580, 584, 588,
2614 592, 596, 597, 599, 602, 607, 611, 613, 618, 621,
2615 623, 625, 626, 627, 640, 642, 643, 644, 655, 657,
2616 661, 663, 665, 667, 671, 673, 675, 677, 680, 681,
2617 682, 686, 687, 689, 691, 693, 696, 699, 700, 705,
2618 710, 715, 718, 720, 723, 725, 727, 729, 733, 735,
2619 739, 740, 742, 744, 746, 748, 750, 752, 756, 762,
2620 764, 766, 768, 770, 772, 774, 776, 778, 780, 782,
2621 786, 790, 794, 798, 802, 806, 810, 814, 818, 822,
2622 826, 830, 833, 836, 840, 844, 848, 852, 856, 860,
2623 864, 868, 872, 876, 880, 884, 888, 892, 896, 899,
2624 902, 904, 908, 911, 916, 920, 924, 928, 932, 936,
2625 940, 944, 948, 952, 956, 960, 964, 970, 973, 976,
2626 979, 982, 986, 989, 990, 997, 999, 1001, 1003, 1005,
2627 1011, 1015, 1021, 1027, 1032, 1039, 1044, 1051, 1058, 1065,
2628 1069, 1071, 1074, 1079, 1084, 1087, 1092
2631 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
2632 static const yytype_int16 yyrhs[] =
2634 136, 0, -1, 137, -1, -1, 138, -1, 139, -1,
2635 138, 139, -1, 187, -1, 199, -1, 197, -1, 233,
2636 -1, 208, -1, 148, -1, 150, 127, 137, 133, -1,
2637 100, -1, -1, 141, -1, 142, -1, 141, 142, -1,
2638 199, -1, 197, -1, 233, -1, 208, -1, 148, -1,
2639 150, 127, 140, 133, -1, 125, 149, 260, 126, -1,
2640 100, -1, 144, -1, -1, 144, 146, -1, 146, -1,
2641 268, -1, 190, -1, 162, -1, 163, -1, 164, -1,
2642 165, -1, 172, -1, 158, -1, 184, -1, 180, -1,
2643 256, -1, 269, -1, 267, -1, 127, 144, 133, -1,
2644 127, 133, -1, 100, -1, 145, -1, 152, -1, 166,
2645 -1, 167, -1, 252, -1, 182, -1, 150, 127, 144,
2646 133, -1, 146, 100, -1, 146, -1, 145, -1, -1,
2647 3, 90, 3, -1, 103, 260, -1, -1, 45, 153,
2648 -1, 31, 153, -1, 154, -1, 153, 101, 154, -1,
2649 3, 243, 151, -1, -1, 156, 147, -1, -1, 65,
2650 155, -1, 64, 123, 254, 134, 155, 157, -1, -1,
2651 152, -1, 256, -1, 45, 3, 243, -1, 3, -1,
2652 10, 123, -1, 10, 49, 123, -1, 161, 159, 100,
2653 254, 100, 256, 134, 155, -1, 161, 160, 68, 254,
2654 134, 155, -1, 11, 123, 254, 134, 155, -1, 12,
2655 155, 11, 123, 254, 134, -1, 66, -1, 66, 3,
2656 -1, 29, -1, 29, 3, -1, -1, 169, -1, 171,
2657 -1, 169, 171, -1, 170, -1, 169, 170, -1, 33,
2658 260, 105, 143, -1, 61, 105, 143, -1, -1, 13,
2659 123, 173, 260, 134, 127, 168, 133, -1, -1, 32,
2660 123, 3, 243, 134, 175, 127, 143, 133, -1, -1,
2661 26, 127, 177, 143, 133, -1, 174, -1, 178, 174,
2662 -1, 178, -1, 178, 176, -1, 176, -1, -1, 51,
2663 127, 181, 143, 133, 179, -1, 36, 254, -1, 36,
2664 -1, 38, 123, 254, 134, -1, 183, 147, -1, 3,
2665 -1, 16, -1, 15, -1, 28, -1, 186, 128, 185,
2666 -1, 185, -1, -1, 16, 186, 127, 188, 140, 133,
2667 -1, -1, 16, 127, 189, 140, 133, -1, 40, 3,
2668 -1, 40, 239, -1, 40, 186, 128, 116, -1, -1,
2669 192, -1, 193, -1, 192, 193, -1, 19, -1, 20,
2670 -1, 17, -1, 37, -1, 46, -1, 48, -1, 47,
2671 -1, 24, -1, 22, -1, 3, -1, -1, 53, 240,
2672 -1, -1, 53, 241, -1, -1, 14, 241, -1, -1,
2673 191, 30, 3, 194, 196, 127, 198, 201, 133, -1,
2674 -1, 191, 43, 3, 195, 127, 200, 204, 133, -1,
2675 -1, 202, -1, 203, -1, 202, 203, -1, 100, -1,
2676 150, 127, 201, 133, -1, 208, -1, 233, -1, 125,
2677 149, 260, 126, -1, 145, -1, -1, 205, -1, 206,
2678 -1, 205, 206, -1, 100, -1, 45, 3, -1, 191,
2679 25, 232, 3, 123, 229, 134, 243, -1, 45, -1,
2680 31, -1, -1, 191, 207, 209, 210, -1, 211, -1,
2681 210, 101, 211, -1, 3, 243, 151, -1, -1, 103,
2682 260, -1, 7, -1, 8, -1, 9, -1, 4, -1,
2683 55, -1, 54, -1, 44, -1, 27, -1, 28, -1,
2684 226, -1, 110, -1, 111, -1, -1, -1, 127, 260,
2685 219, 133, -1, -1, 127, 260, 221, 133, -1, -1,
2686 222, 218, -1, 222, 4, -1, 222, 111, -1, 226,
2687 222, -1, 223, 226, 222, -1, 3, -1, 220, -1,
2688 -1, 227, -1, 215, 224, 225, 115, 217, 111, -1,
2689 215, 224, 225, 216, 222, 110, 115, 224, 217, 111,
2690 -1, 215, 224, 225, 216, 222, 223, 110, 115, 224,
2691 217, 111, -1, 228, -1, 227, 228, -1, 220, -1,
2692 220, 103, 4, -1, 220, 103, 220, -1, 3, 103,
2693 220, -1, 3, 103, 4, -1, -1, 230, -1, 94,
2694 231, -1, 230, 101, 94, 231, -1, 230, 101, 231,
2695 -1, 231, -1, 3, 105, 242, 212, -1, 3, 212,
2696 -1, 50, -1, 34, -1, -1, -1, 191, 25, 232,
2697 3, 123, 229, 134, 243, 127, 234, 143, 133, -1,
2698 3, -1, -1, -1, 25, 235, 123, 229, 134, 243,
2699 127, 237, 143, 133, -1, 185, -1, 186, 128, 185,
2700 -1, 239, -1, 238, -1, 240, -1, 241, 101, 240,
2701 -1, 240, -1, 116, -1, 35, -1, 105, 242, -1,
2702 -1, -1, 123, 245, 134, -1, -1, 246, -1, 247,
2703 -1, 253, -1, 246, 101, -1, 247, 253, -1, -1,
2704 23, 260, 248, 244, -1, 260, 123, 245, 134, -1,
2705 52, 123, 245, 134, -1, 63, 260, -1, 41, -1,
2706 41, 254, -1, 260, -1, 255, -1, 260, -1, 255,
2707 101, 260, -1, 260, -1, 256, 101, 260, -1, -1,
2708 259, -1, 3, -1, 4, -1, 7, -1, 8, -1,
2709 9, -1, 258, 105, 253, -1, 259, 101, 258, 105,
2710 253, -1, 236, -1, 264, -1, 249, -1, 251, -1,
2711 250, -1, 265, -1, 213, -1, 214, -1, 5, -1,
2712 18, -1, 125, 245, 126, -1, 70, 257, 133, -1,
2713 260, 110, 260, -1, 260, 111, 260, -1, 260, 75,
2714 260, -1, 260, 76, 260, -1, 260, 71, 260, -1,
2715 260, 72, 260, -1, 260, 74, 260, -1, 260, 73,
2716 260, -1, 260, 88, 260, -1, 260, 89, 260, -1,
2717 119, 260, -1, 118, 260, -1, 260, 108, 260, -1,
2718 260, 107, 260, -1, 260, 106, 260, -1, 260, 97,
2719 260, -1, 260, 96, 260, -1, 260, 95, 260, -1,
2720 260, 115, 260, -1, 260, 117, 260, -1, 260, 114,
2721 260, -1, 260, 113, 260, -1, 260, 116, 260, -1,
2722 260, 68, 260, -1, 260, 69, 260, -1, 260, 39,
2723 260, -1, 260, 67, 260, -1, 42, 260, -1, 35,
2724 260, -1, 35, -1, 123, 255, 134, -1, 113, 260,
2725 -1, 260, 125, 260, 126, -1, 260, 80, 260, -1,
2726 260, 79, 260, -1, 260, 86, 260, -1, 260, 85,
2727 260, -1, 260, 87, 260, -1, 260, 78, 260, -1,
2728 260, 77, 260, -1, 260, 84, 260, -1, 260, 81,
2729 260, -1, 260, 82, 260, -1, 260, 83, 260, -1,
2730 260, 103, 260, -1, 260, 104, 260, 105, 260, -1,
2731 260, 92, -1, 260, 91, -1, 92, 260, -1, 91,
2732 260, -1, 52, 128, 3, -1, 129, 3, -1, -1,
2733 260, 128, 123, 261, 260, 134, -1, 3, -1, 116,
2734 -1, 185, -1, 116, -1, 260, 128, 262, 90, 263,
2735 -1, 260, 93, 263, -1, 260, 93, 262, 90, 263,
2736 -1, 260, 128, 125, 260, 126, -1, 260, 128, 129,
2737 263, -1, 260, 128, 129, 262, 90, 263, -1, 260,
2738 93, 129, 263, -1, 260, 93, 129, 262, 90, 263,
2739 -1, 260, 128, 129, 125, 260, 126, -1, 260, 93,
2740 129, 125, 260, 126, -1, 260, 128, 263, -1, 3,
2741 -1, 15, 3, -1, 15, 3, 103, 3, -1, 15,
2742 3, 103, 4, -1, 191, 266, -1, 62, 15, 103,
2743 260, -1, 21, 15, 240, -1
2746 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
2747 static const yytype_uint16 yyrline[] =
2749 0, 1998, 1998, 2000, 2000, 2001, 2002, 2004, 2005, 2006,
2750 2007, 2008, 2009, 2010, 2011, 2013, 2013, 2014, 2015, 2017,
2751 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2026, 2027, 2029,
2752 2032, 2035, 2036, 2037, 2038, 2039, 2040, 2041, 2042, 2043,
2753 2044, 2045, 2046, 2047, 2048, 2049, 2052, 2053, 2054, 2055,
2754 2056, 2057, 2058, 2059, 2071, 2072, 2076, 2087, 2095, 2122,
2755 2123, 2125, 2126, 2128, 2129, 2131, 2192, 2192, 2196, 2197,
2756 2200, 2216, 2217, 2218, 2223, 2227, 2232, 2233, 2235, 2255,
2757 2299, 2315, 2327, 2330, 2333, 2336, 2340, 2341, 2342, 2343,
2758 2344, 2345, 2347, 2358, 2361, 2361, 2392, 2392, 2417, 2417,
2759 2433, 2434, 2435, 2436, 2444, 2453, 2453, 2502, 2506, 2517,
2760 2527, 2544, 2545, 2546, 2547, 2549, 2550, 2552, 2552, 2554,
2761 2554, 2578, 2586, 2600, 2616, 2617, 2618, 2619, 2626, 2627,
2762 2628, 2629, 2630, 2631, 2632, 2633, 2634, 2635, 2639, 2640,
2763 2642, 2643, 2645, 2646, 2650, 2648, 2656, 2654, 2663, 2664,
2764 2665, 2666, 2667, 2668, 2669, 2670, 2671, 2673, 2679, 2680,
2765 2681, 2682, 2683, 2684, 2687, 2760, 2760, 2762, 2762, 2764,
2766 2765, 2767, 2851, 2852, 2860, 2861, 2864, 2865, 2866, 2867,
2767 2868, 2869, 2870, 2878, 2889, 2890, 2891, 2893, 2893, 2896,
2768 2896, 2899, 2900, 2903, 2908, 2911, 2914, 2917, 2920, 2924,
2769 2927, 2931, 2935, 2940, 2946, 2949, 2952, 2955, 2960, 2963,
2770 2966, 2976, 2980, 2986, 2992, 3000, 3005, 3011, 3019, 3027,
2771 3028, 3029, 3032, 3031, 3048, 3049, 3051, 3050, 3074, 3093,
2772 3107, 3108, 3110, 3111, 3113, 3114, 3115, 3124, 3125, 3129,
2773 3130, 3132, 3133, 3134, 3136, 3140, 3141, 3146, 3147, 3194,
2774 3244, 3265, 3287, 3290, 3297, 3300, 3303, 3306, 3309, 3312,
2775 3317, 3318, 3320, 3321, 3322, 3323, 3324, 3326, 3332, 3341,
2776 3342, 3343, 3344, 3345, 3346, 3348, 3352, 3357, 3375, 3386,
2777 3396, 3405, 3406, 3407, 3408, 3409, 3410, 3411, 3412, 3413,
2778 3414, 3415, 3416, 3417, 3418, 3419, 3420, 3421, 3422, 3423,
2779 3424, 3425, 3426, 3427, 3428, 3429, 3430, 3431, 3432, 3433,
2780 3434, 3435, 3436, 3437, 3438, 3439, 3440, 3441, 3442, 3443,
2781 3444, 3445, 3446, 3447, 3448, 3449, 3450, 3452, 3453, 3454,
2782 3455, 3457, 3472, 3480, 3480, 3534, 3535, 3536, 3537, 3577,
2783 3580, 3587, 3590, 3601, 3609, 3613, 3620, 3624, 3634, 3645,
2784 3841, 3875, 3882, 3889, 3896, 3918, 3925
2788 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
2789 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
2790 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
2791 static const char *const yytname[] =
2793 "$end", "error", "$undefined", "T_IDENTIFIER", "T_STRING", "T_REGEXP",
2794 "T_EMPTY", "T_INT", "T_UINT", "T_FLOAT", "\"for\"", "\"while\"",
2795 "\"do\"", "\"switch\"", "\"implements\"", "\"namespace\"", "\"package\"",
2796 "\"protected\"", "\"arguments\"", "\"public\"", "\"private\"", "\"use\"",
2797 "\"internal\"", "\"new\"", "\"native\"", "\"function\"", "\"finally\"",
2798 "\"undefined\"", "\"NaN\"", "\"continue\"", "\"class\"", "\"const\"",
2799 "\"catch\"", "\"case\"", "\"set\"", "\"void\"", "\"throw\"",
2800 "\"static\"", "\"with\"", "\"instanceof\"", "\"import\"", "\"return\"",
2801 "\"typeof\"", "\"interface\"", "\"null\"", "\"var\"", "\"dynamic\"",
2802 "\"override\"", "\"final\"", "\"each\"", "\"get\"", "\"try\"",
2803 "\"super\"", "\"extends\"", "\"false\"", "\"true\"", "\"Boolean\"",
2804 "\"uint\"", "\"int\"", "\"Number\"", "\"String\"", "\"default\"",
2805 "\"default xml\"", "\"delete\"", "\"if\"", "\"else\"", "\"break\"",
2806 "\"is\"", "\"in\"", "\"as\"", "\"{ (dictionary)\"", "\"==\"", "\"===\"",
2807 "\"!=\"", "\"!==\"", "\"<=\"", "\">=\"", "\"|=\"", "\"/=\"", "\"%=\"",
2808 "\"*=\"", "\"&=\"", "\"+=\"", "\"-=\"", "\"^=\"", "\">>=\"", "\"<<=\"",
2809 "\">>>=\"", "\"||\"", "\"&&\"", "\"::\"", "\"--\"", "\"++\"", "\"..\"",
2810 "\"...\"", "\"<<\"", "\">>>\"", "\">>\"", "prec_none", "below_semicolon",
2811 "';'", "','", "below_assignment", "'='", "'?'", "':'", "'|'", "'^'",
2812 "'&'", "below_lt", "'<'", "'>'", "below_minus", "'-'", "'+'", "'/'",
2813 "'*'", "'%'", "'~'", "'!'", "minusminus_prefix", "plusplus_prefix",
2814 "below_curly", "'('", "new2", "'['", "']'", "'{'", "'.'", "'@'",
2815 "above_identifier", "below_else", "above_function", "'}'", "')'",
2816 "$accept", "PROGRAM", "MAYBE_PROGRAM_CODE_LIST", "PROGRAM_CODE_LIST",
2817 "PROGRAM_CODE", "MAYBE_INPACKAGE_CODE_LIST", "INPACKAGE_CODE_LIST",
2818 "INPACKAGE_CODE", "MAYBECODE", "CODE", "CODE_STATEMENT", "CODEPIECE",
2819 "CODEBLOCK", "PACKAGE_INITCODE", "EMBED_START",
2820 "CONDITIONAL_COMPILATION", "MAYBEEXPRESSION", "VARIABLE_DECLARATION",
2821 "VARIABLE_LIST", "ONE_VARIABLE", "IF_CODEBLOCK", "$@1", "MAYBEELSE",
2822 "IF", "FOR_INIT", "FOR_IN_INIT", "FOR_START", "FOR", "FOR_IN", "WHILE",
2823 "DO_WHILE", "BREAK", "CONTINUE", "MAYBE_CASE_LIST", "CASE_LIST", "CASE",
2824 "DEFAULT", "SWITCH", "$@2", "CATCH", "$@3", "FINALLY", "$@4",
2825 "CATCH_LIST", "CATCH_FINALLY_LIST", "TRY", "$@5", "THROW", "WITH_HEAD",
2826 "WITH", "X_IDENTIFIER", "PACKAGE", "PACKAGE_DECLARATION", "$@6", "$@7",
2827 "IMPORT", "MAYBE_MODIFIERS", "MODIFIER_LIST", "MODIFIER", "EXTENDS",
2828 "EXTENDS_LIST", "IMPLEMENTS_LIST", "CLASS_DECLARATION", "$@8",
2829 "INTERFACE_DECLARATION", "$@9", "MAYBE_CLASS_BODY", "CLASS_BODY",
2830 "CLASS_BODY_ITEM", "MAYBE_INTERFACE_BODY", "INTERFACE_BODY",
2831 "IDECLARATION", "VARCONST", "SLOT_DECLARATION", "$@10", "SLOT_LIST",
2832 "ONE_SLOT", "MAYBECONSTANT", "CONSTANT", "XML", "OPEN", "CLOSE",
2833 "CLOSE2", "XMLEXPR1", "$@11", "XMLEXPR2", "$@12", "XMLTEXT", "XML2",
2834 "XML_ID_OR_EXPR", "MAYBE_XMLATTRIBUTES", "XMLNODE", "XMLATTRIBUTES",
2835 "XMLATTRIBUTE", "MAYBE_PARAM_LIST", "PARAM_LIST", "PARAM", "GETSET",
2836 "FUNCTION_DECLARATION", "$@13", "MAYBE_IDENTIFIER", "INNERFUNCTION",
2837 "$@14", "CLASS", "PACKAGEANDCLASS", "CLASS_SPEC", "CLASS_SPEC_LIST",
2838 "TYPE", "MAYBETYPE", "MAYBE_PARAM_VALUES", "MAYBE_EXPRESSION_LIST",
2839 "EXPRESSION_LIST", "EXPRESSION_LIST_AND_COMMA", "XX", "NEW",
2840 "FUNCTIONCALL", "DELETE", "RETURN", "NONCOMMAEXPRESSION", "EXPRESSION",
2841 "COMMA_EXPRESSION", "VOIDEXPRESSION", "MAYBE_DICT_EXPRPAIR_LIST",
2842 "DICTLH", "DICT_EXPRPAIR_LIST", "E", "$@15", "ID_OR_NS", "SUBNODE",
2843 "MEMBER", "VAR_READ", "NAMESPACE_ID", "NAMESPACE_DECLARATION",
2844 "DEFAULT_NAMESPACE", "USE_NAMESPACE", 0
2849 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
2851 static const yytype_uint16 yytoknum[] =
2853 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
2854 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
2855 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
2856 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
2857 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
2858 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
2859 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
2860 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
2861 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
2862 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
2863 59, 44, 355, 61, 63, 58, 124, 94, 38, 356,
2864 60, 62, 357, 45, 43, 47, 42, 37, 126, 33,
2865 358, 359, 360, 40, 361, 91, 93, 123, 46, 64,
2866 362, 363, 364, 125, 41
2870 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
2871 static const yytype_uint16 yyr1[] =
2873 0, 135, 136, 137, 137, 138, 138, 139, 139, 139,
2874 139, 139, 139, 139, 139, 140, 140, 141, 141, 142,
2875 142, 142, 142, 142, 142, 142, 142, 143, 143, 144,
2876 144, 145, 145, 145, 145, 145, 145, 145, 145, 145,
2877 145, 145, 145, 145, 145, 145, 146, 146, 146, 146,
2878 146, 146, 146, 146, 147, 147, 148, 149, 150, 151,
2879 151, 152, 152, 153, 153, 154, 156, 155, 157, 157,
2880 158, 159, 159, 159, 160, 160, 161, 161, 162, 163,
2881 164, 165, 166, 166, 167, 167, 168, 168, 168, 168,
2882 169, 169, 170, 171, 173, 172, 175, 174, 177, 176,
2883 178, 178, 179, 179, 179, 181, 180, 182, 182, 183,
2884 184, 185, 185, 185, 185, 186, 186, 188, 187, 189,
2885 187, 190, 190, 190, 191, 191, 192, 192, 193, 193,
2886 193, 193, 193, 193, 193, 193, 193, 193, 194, 194,
2887 195, 195, 196, 196, 198, 197, 200, 199, 201, 201,
2888 202, 202, 203, 203, 203, 203, 203, 203, 204, 204,
2889 205, 205, 206, 206, 206, 207, 207, 209, 208, 210,
2890 210, 211, 212, 212, 213, 213, 213, 213, 213, 213,
2891 213, 213, 213, 214, 215, 216, 217, 219, 218, 221,
2892 220, 222, 222, 222, 222, 223, 223, 224, 224, 225,
2893 225, 226, 226, 226, 227, 227, 228, 228, 228, 228,
2894 228, 229, 229, 229, 229, 230, 230, 231, 231, 232,
2895 232, 232, 234, 233, 235, 235, 237, 236, 238, 239,
2896 240, 240, 241, 241, 242, 242, 242, 243, 243, 244,
2897 244, 245, 245, 245, 246, 247, 246, 248, 249, 250,
2898 250, 251, 252, 252, 253, 254, 255, 255, 256, 256,
2899 257, 257, 258, 258, 258, 258, 258, 259, 259, 260,
2900 260, 260, 260, 260, 260, 260, 260, 260, 260, 260,
2901 260, 260, 260, 260, 260, 260, 260, 260, 260, 260,
2902 260, 260, 260, 260, 260, 260, 260, 260, 260, 260,
2903 260, 260, 260, 260, 260, 260, 260, 260, 260, 260,
2904 260, 260, 260, 260, 260, 260, 260, 260, 260, 260,
2905 260, 260, 260, 260, 260, 260, 260, 260, 260, 260,
2906 260, 260, 260, 261, 260, 262, 262, 263, 263, 260,
2907 260, 260, 260, 260, 260, 260, 260, 260, 260, 264,
2908 265, 266, 266, 266, 267, 268, 269
2911 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
2912 static const yytype_uint8 yyr2[] =
2914 0, 2, 1, 0, 1, 1, 2, 1, 1, 1,
2915 1, 1, 1, 4, 1, 0, 1, 1, 2, 1,
2916 1, 1, 1, 1, 4, 4, 1, 1, 0, 2,
2917 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2918 1, 1, 1, 1, 3, 2, 1, 1, 1, 1,
2919 1, 1, 1, 4, 2, 1, 1, 0, 3, 2,
2920 0, 2, 2, 1, 3, 3, 0, 2, 0, 2,
2921 6, 0, 1, 1, 3, 1, 2, 3, 8, 6,
2922 5, 6, 1, 2, 1, 2, 0, 1, 1, 2,
2923 1, 2, 4, 3, 0, 8, 0, 9, 0, 5,
2924 1, 2, 1, 2, 1, 0, 6, 2, 1, 4,
2925 2, 1, 1, 1, 1, 3, 1, 0, 6, 0,
2926 5, 2, 2, 4, 0, 1, 1, 2, 1, 1,
2927 1, 1, 1, 1, 1, 1, 1, 1, 0, 2,
2928 0, 2, 0, 2, 0, 9, 0, 8, 0, 1,
2929 1, 2, 1, 4, 1, 1, 4, 1, 0, 1,
2930 1, 2, 1, 2, 8, 1, 1, 0, 4, 1,
2931 3, 3, 0, 2, 1, 1, 1, 1, 1, 1,
2932 1, 1, 1, 1, 1, 1, 0, 0, 4, 0,
2933 4, 0, 2, 2, 2, 2, 3, 1, 1, 0,
2934 1, 6, 10, 11, 1, 2, 1, 3, 3, 3,
2935 3, 0, 1, 2, 4, 3, 1, 4, 2, 1,
2936 1, 0, 0, 12, 1, 0, 0, 10, 1, 3,
2937 1, 1, 1, 3, 1, 1, 1, 2, 0, 0,
2938 3, 0, 1, 1, 1, 2, 2, 0, 4, 4,
2939 4, 2, 1, 2, 1, 1, 1, 3, 1, 3,
2940 0, 1, 1, 1, 1, 1, 1, 3, 5, 1,
2941 1, 1, 1, 1, 1, 1, 1, 1, 1, 3,
2942 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
2943 3, 2, 2, 3, 3, 3, 3, 3, 3, 3,
2944 3, 3, 3, 3, 3, 3, 3, 3, 2, 2,
2945 1, 3, 2, 4, 3, 3, 3, 3, 3, 3,
2946 3, 3, 3, 3, 3, 3, 5, 2, 2, 2,
2947 2, 3, 2, 0, 6, 1, 1, 1, 1, 5,
2948 3, 5, 5, 4, 6, 4, 6, 6, 6, 3,
2952 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
2953 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
2954 means the default is an error. */
2955 static const yytype_uint16 yydefact[] =
2957 124, 350, 177, 277, 174, 175, 176, 0, 0, 66,
2958 0, 0, 130, 278, 128, 129, 0, 136, 0, 135,
2959 225, 181, 182, 310, 131, 0, 0, 0, 180, 132,
2960 134, 133, 0, 0, 179, 178, 0, 0, 0, 260,
2961 0, 0, 14, 184, 0, 0, 0, 0, 241, 124,
2962 0, 0, 2, 124, 5, 56, 12, 0, 38, 71,
2963 33, 34, 35, 36, 37, 40, 124, 39, 7, 32,
2964 0, 125, 126, 9, 8, 11, 275, 276, 0, 183,
2965 10, 269, 271, 273, 272, 41, 258, 270, 274, 43,
2966 31, 42, 0, 0, 76, 0, 0, 124, 94, 111,
2967 113, 112, 114, 119, 116, 0, 0, 350, 247, 224,
2968 0, 309, 0, 121, 0, 122, 308, 105, 241, 0,
2969 0, 251, 0, 262, 263, 264, 265, 266, 0, 0,
2970 261, 330, 329, 312, 292, 291, 0, 256, 0, 242,
2971 243, 244, 254, 84, 0, 108, 252, 0, 82, 46,
2972 45, 124, 47, 30, 0, 48, 49, 50, 52, 0,
2973 51, 332, 1, 6, 124, 350, 0, 72, 0, 0,
2974 73, 55, 110, 0, 221, 0, 166, 0, 165, 167,
2975 354, 137, 127, 197, 0, 198, 199, 0, 0, 0,
2976 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2977 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2978 0, 328, 327, 0, 0, 0, 0, 0, 0, 0,
2979 0, 0, 0, 0, 0, 0, 0, 0, 0, 241,
2980 0, 0, 58, 77, 0, 255, 0, 67, 0, 124,
2981 117, 0, 228, 0, 231, 230, 356, 239, 211, 0,
2982 0, 28, 0, 331, 0, 0, 280, 0, 0, 0,
2983 311, 279, 245, 246, 85, 238, 62, 63, 107, 253,
2984 61, 83, 44, 29, 124, 0, 238, 0, 0, 54,
2985 351, 220, 219, 0, 138, 140, 0, 189, 0, 206,
2986 0, 200, 204, 259, 306, 307, 304, 305, 285, 286,
2987 288, 287, 283, 284, 320, 319, 315, 314, 322, 323,
2988 324, 321, 317, 316, 318, 289, 290, 111, 338, 0,
2989 337, 0, 340, 298, 297, 296, 325, 0, 295, 294,
2990 293, 281, 282, 302, 301, 299, 303, 300, 0, 0,
2991 333, 0, 0, 0, 349, 66, 0, 0, 26, 57,
2992 0, 124, 17, 23, 0, 20, 19, 22, 21, 124,
2993 115, 0, 241, 248, 172, 0, 0, 212, 216, 109,
2994 123, 229, 0, 27, 250, 355, 66, 267, 0, 257,
2995 0, 60, 0, 124, 13, 60, 0, 0, 0, 0,
2996 0, 142, 0, 0, 238, 168, 169, 0, 0, 0,
2997 185, 186, 191, 205, 0, 0, 345, 0, 0, 249,
2998 313, 0, 0, 0, 0, 343, 0, 80, 0, 0,
2999 0, 120, 18, 124, 0, 0, 0, 0, 218, 213,
3000 238, 0, 0, 68, 0, 236, 235, 234, 237, 0,
3001 65, 64, 53, 0, 66, 352, 353, 211, 139, 0,
3002 0, 232, 141, 146, 60, 0, 190, 210, 209, 207,
3003 208, 0, 0, 0, 0, 338, 341, 326, 0, 342,
3004 0, 0, 339, 81, 86, 0, 0, 118, 240, 173,
3005 172, 0, 0, 215, 0, 0, 100, 104, 102, 106,
3006 66, 70, 268, 59, 0, 79, 0, 143, 144, 0,
3007 124, 171, 170, 201, 193, 184, 194, 0, 192, 0,
3008 191, 348, 346, 334, 347, 344, 0, 0, 0, 87,
3009 90, 88, 25, 24, 217, 226, 214, 98, 0, 101,
3010 103, 69, 66, 238, 124, 233, 0, 162, 0, 0,
3011 124, 160, 0, 187, 184, 191, 195, 0, 28, 95,
3012 91, 89, 28, 28, 238, 78, 0, 152, 57, 157,
3013 0, 0, 0, 124, 150, 154, 155, 163, 221, 147,
3014 161, 186, 0, 0, 196, 28, 93, 0, 0, 0,
3015 222, 0, 124, 145, 151, 0, 0, 188, 186, 92,
3016 227, 99, 96, 28, 0, 0, 0, 202, 0, 0,
3017 0, 156, 153, 211, 203, 28, 223, 0, 0, 238,
3021 /* YYDEFGOTO[NTERM-NUM]. */
3022 static const yytype_int16 yydefgoto[] =
3024 -1, 51, 52, 53, 54, 350, 351, 352, 372, 373,
3025 152, 153, 172, 353, 420, 154, 440, 155, 270, 267,
3026 96, 97, 491, 58, 168, 169, 59, 60, 61, 62,
3027 63, 156, 157, 518, 519, 520, 521, 64, 238, 486,
3028 599, 487, 553, 488, 489, 65, 251, 158, 66, 67,
3029 320, 243, 68, 359, 239, 69, 159, 71, 72, 391,
3030 393, 450, 355, 534, 356, 500, 562, 563, 564, 539,
3031 540, 541, 179, 357, 286, 395, 396, 428, 76, 77,
3032 78, 402, 461, 508, 572, 185, 397, 462, 509, 186,
3033 290, 79, 291, 292, 366, 367, 368, 283, 358, 593,
3034 110, 81, 552, 244, 245, 437, 452, 438, 381, 363,
3035 138, 139, 140, 247, 82, 83, 84, 160, 141, 234,
3036 235, 85, 128, 129, 130, 86, 411, 321, 322, 87,
3040 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
3042 #define YYPACT_NINF -508
3043 static const yytype_int16 yypact[] =
3045 1734, 1659, -508, -508, -508, -508, -508, -3, -45, -508,
3046 -10, 93, -508, -508, -508, -508, 51, -508, 2068, -508,
3047 84, -508, -508, 2125, -508, -5, 73, 2068, -508, -508,
3048 -508, -508, 8, -49, -508, -508, 121, 2068, 22, 381,
3049 2068, 2068, -508, -508, 2068, 2068, 2068, 2068, 2068, 714,
3050 144, 155, -508, 587, -508, -508, -508, 32, -508, 429,
3051 -508, -508, -508, -508, -508, -508, 1988, -508, -508, -508,
3052 126, 469, -508, -508, -508, -508, -508, -508, 15, -508,
3053 -508, -508, -508, -508, -508, 131, 2882, -508, -508, -508,
3054 -508, -508, 219, 111, -508, 2068, 224, 1988, -508, -508,
3055 -508, -508, -508, -508, -508, -23, 279, -508, -55, -508,
3056 115, -43, 2068, 116, 118, -508, -43, -508, 2068, 240,
3057 145, -43, 2068, -508, -508, -508, -508, -508, 125, 154,
3058 148, -43, -43, 386, -43, -43, -39, 2820, 135, 163,
3059 2068, -508, 2820, 264, 265, 2068, 2068, 265, 274, -508,
3060 -508, 841, -508, -508, 161, -508, -508, -508, -508, 275,
3061 -508, -508, -508, -508, 1095, 225, 297, -508, 201, 235,
3062 131, 205, -508, 305, 90, 307, -508, 308, -508, -508,
3063 -508, -508, -508, -508, 2068, -508, 16, 2068, 2068, 2068,
3064 2068, 2068, 2068, 2068, 2068, 2068, 2068, 2068, 2068, 2068,
3065 2068, 2068, 2068, 2068, 2068, 2068, 2068, 2068, 2068, 2068,
3066 2068, -508, -508, 44, 2068, 2068, 2068, 2068, 2068, 2068,
3067 2068, 2068, 2068, 2068, 2068, 2068, 2068, 2068, 2068, 2068,
3068 2068, 146, -508, -508, 179, 217, 198, -508, 2068, 1222,
3069 -508, 279, 194, 199, -508, -508, -508, 207, 23, 197,
3070 342, 1861, 202, -508, 2068, 204, -508, 2068, 381, 2068,
3071 -508, -508, -508, -508, -508, 223, 234, -508, -508, -508,
3072 234, -508, -508, -508, 1988, 211, 223, 2068, 2068, -508,
3073 236, -508, -508, 343, 296, 301, 353, 2820, 259, 260,
3074 -4, 16, -508, 2820, 1087, 579, 579, 579, 3254, 3254,
3075 3254, 3254, 1087, 1087, 2820, 2820, 2820, 2820, 2820, 2820,
3076 2820, 2820, 2820, 2820, 2820, 2944, 3006, 282, 285, 257,
3077 -508, 286, -508, 679, 679, 679, 2820, 2324, 3068, 3130,
3078 3192, 1087, 1087, 386, 386, -43, -43, -43, 230, 2386,
3079 -508, 2068, 281, 289, -508, -508, 2068, 2184, -508, 243,
3080 238, 1349, -508, -508, 254, -508, -508, -508, -508, 1222,
3081 -508, 279, 2068, -508, 47, 380, 252, 293, -508, -508,
3082 -508, 272, 269, 1861, -508, 2820, -508, -508, 299, 2820,
3083 271, 304, 265, 968, -508, -26, 309, 276, 122, 288,
3084 279, 398, 279, 290, 223, 312, -508, 283, 12, 17,
3085 -508, -508, -508, -508, 2068, 325, -508, 352, 2068, -508,
3086 -508, 2068, 2448, 2068, 328, -508, 352, -508, 287, 292,
3087 2068, -508, -508, 1222, 298, 310, 2068, 271, -508, -508,
3088 223, 38, 67, 355, 2068, -508, -508, -508, -508, 2068,
3089 -508, -508, -508, 2068, -508, -508, -508, 23, -508, 279,
3090 302, -508, 329, -508, 304, 353, -508, -508, -508, -508,
3091 -508, 315, 19, 2510, 352, -508, -508, 2820, 2254, -508,
3092 2572, 352, -508, -508, 42, 2634, 306, -508, -508, 2820,
3093 332, 314, 380, -508, 316, 319, -508, -508, 67, -508,
3094 -508, -508, -508, 2820, -36, -508, 311, 329, -508, 279,
3095 233, -508, -508, -508, -508, 331, -508, 2068, -508, 338,
3096 -508, -508, -508, -508, -508, -508, 2068, 344, 317, 42,
3097 -508, -508, -508, -508, -508, -508, -508, -508, 448, -508,
3098 -508, -508, -508, 223, 1476, -508, 450, -508, 430, 326,
3099 295, -508, 15, 2820, 346, -508, 26, 2696, 1861, -508,
3100 -508, -508, 1861, 1861, 223, -508, 336, -508, 243, -508,
3101 339, 206, 334, 1603, -508, -508, -508, -508, 90, -508,
3102 -508, -508, 337, 15, 26, 1861, -508, 347, 349, 335,
3103 -508, 2068, 1476, -508, -508, 462, 364, -508, -508, -508,
3104 -508, -508, -508, 1861, 2758, 354, 362, -508, 365, 363,
3105 361, -508, -508, 23, -508, 1861, -508, 371, 374, 223,
3109 /* YYPGOTO[NTERM-NUM]. */
3110 static const yytype_int16 yypgoto[] =
3112 -508, -508, 333, -508, 443, -339, -508, 147, -228, -41,
3113 1, -57, 411, 37, -48, 2, 59, 459, 375, 140,
3114 -332, -508, -508, -508, -508, -508, -508, -508, -508, -508,
3115 -508, -508, -508, -508, -508, 5, 6, -508, -508, 35,
3116 -508, 39, -508, -508, -508, -508, -508, -508, -508, -508,
3117 13, 41, -508, -508, -508, -508, 0, -508, 455, -508,
3118 -508, -508, 61, -508, 63, -508, -53, -508, -35, -508,
3119 -508, -9, -508, 3, -508, -508, 75, 52, -508, -508,
3120 -508, -508, -507, -508, -508, -169, -508, -459, -508, -471,
3121 -508, -440, -508, 242, -433, -508, -334, -27, 4, -508,
3122 -508, -508, -508, -508, 517, -101, 95, 123, -231, -508,
3123 -106, -508, -508, -508, -508, -508, -508, -508, -130, -54,
3124 498, -52, -508, 291, -508, -12, -508, -204, -188, -508,
3125 -508, -508, -508, -508, -508
3128 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
3129 positive, shift that token. If negative, reduce the rule which
3130 number is the opposite. If zero, do what YYDEFACT says.
3131 If YYTABLE_NINF, syntax error. */
3132 #define YYTABLE_NINF -337
3133 static const yytype_int16 yytable[] =
3135 70, 55, 57, 75, 80, 246, 108, 170, 151, 171,
3136 263, 111, 252, 417, 496, 116, 457, 289, 183, 288,
3137 424, 459, 510, 504, 104, 121, 364, 343, 131, 132,
3138 504, 429, 133, 134, 135, 137, 142, 56, 213, 104,
3139 171, 364, -74, 344, 433, 385, 93, 317, 211, 212,
3140 213, 546, 105, 70, 55, 57, 75, 80, 249, 100,
3141 101, 73, 259, 74, 586, 187, 106, 114, 255, 545,
3142 230, 571, 102, 231, 118, 516, 113, 439, 95, 119,
3143 229, 598, 230, 137, 476, 231, 574, 109, 100, 101,
3144 56, 268, 269, 484, 273, 260, 99, 483, 532, 485,
3145 137, 102, 588, 517, 240, 241, 142, 400, 100, 101,
3146 137, 401, 495, 98, 73, 405, 74, 365, 112, 242,
3147 94, 102, 289, 338, 281, 445, 446, 377, 142, 505,
3148 506, 406, 482, 137, 137, 117, 120, 506, 414, 184,
3149 282, 173, 184, 184, 184, 122, 507, 161, 526, 317,
3150 426, 174, 427, 507, 415, 162, 175, 176, 531, 164,
3151 318, 100, 101, 454, 70, 55, 57, 75, 80, 177,
3152 607, 178, 287, 319, 102, 293, 294, 295, 296, 297,
3153 298, 299, 300, 301, 302, 303, 304, 305, 306, 307,
3154 308, 309, 310, 311, 312, 313, 314, 315, 316, 481,
3155 555, 56, 323, 324, 325, 326, 327, 328, 329, 330,
3156 331, 332, 333, 334, 335, 336, 337, 142, 339, 466,
3157 103, 173, 232, 386, 387, 73, 347, 74, 472, 458,
3158 460, 174, 187, 383, 233, 236, 181, 176, 248, 70,
3159 55, 354, 375, 253, -111, 142, 250, 379, 254, 258,
3160 12, 178, 14, 15, 360, 17, 425, 19, 256, 257,
3161 317, 261, 318, 371, 262, 137, 137, 264, 265, 340,
3162 24, 341, 100, 101, 99, 342, 512, 271, 536, 29,
3163 30, 31, 99, 515, 317, 102, 100, 101, 274, 448,
3164 173, 451, 418, -75, 100, 101, 100, 101, 181, 102,
3165 276, 277, 556, 278, 492, 279, 435, 102, 280, 102,
3166 284, 285, 12, 345, 14, 15, 273, 17, 259, 19,
3167 576, 346, -116, 579, 577, 578, 273, 361, 380, 412,
3168 362, 369, 24, 537, 137, 382, 374, 142, 376, 388,
3169 536, 29, 30, 31, 384, 99, 389, 589, 451, 390,
3170 142, 70, 55, 354, 392, 99, 394, 100, 101, 70,
3171 55, 354, 398, 399, 409, 600, -158, 100, 101, -241,
3172 102, 421, -335, 318, 371, -336, 407, 608, 611, 416,
3173 102, 423, 404, 364, 123, 124, 430, 436, 125, 126,
3174 127, 494, 463, 242, 431, 537, 467, 318, 535, 468,
3175 -115, 470, 432, 242, 434, 242, 413, 439, 475, 443,
3176 444, 447, 449, 455, 479, 464, 456, 453, 471, 474,
3177 490, 473, 142, 70, 55, 354, 503, 493, -159, 498,
3178 499, 477, 165, 2, 3, 426, 4, 5, 6, 523,
3179 242, 525, 528, 527, 478, 533, 542, 13, 544, 548,
3180 549, 554, 18, 567, 20, 568, 21, 22, 370, 569,
3181 144, 573, 242, 580, 23, 596, 582, 583, 465, 592,
3182 587, 27, 181, 28, 166, 597, 604, 211, 212, 213,
3183 590, 33, 591, 34, 35, 603, 12, 602, 14, 15,
3184 605, 17, 37, 19, 606, 543, 163, 275, 422, 39,
3185 538, 226, 227, 228, 547, 609, 24, 610, 237, 229,
3186 581, 230, 242, 501, 231, 29, 30, 31, 167, 266,
3187 40, 41, 441, 529, 550, 551, 182, 530, 584, 595,
3188 502, 570, 524, 403, 561, 559, 560, 565, 566, 43,
3189 538, 585, 44, 115, 497, 136, 142, 45, 46, 378,
3190 480, 0, 47, 0, 48, 0, 0, 0, 50, 0,
3191 0, 0, 0, 561, 559, 560, 565, 566, 0, 594,
3192 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3193 0, 0, 561, 559, 560, 565, 566, -4, 0, 0,
3194 1, 2, 3, 0, 4, 5, 6, 7, 8, 9,
3195 10, 0, 0, 11, 12, 13, 14, 15, 16, 17,
3196 18, 19, 0, 0, 21, 22, 0, 0, 188, 0,
3197 0, 0, 23, 0, 24, 25, 0, 26, 0, 27,
3198 0, 28, 0, 29, 30, 31, 0, 0, 32, 33,
3199 0, 34, 35, 0, 0, 0, -337, -337, -337, 36,
3200 37, 38, 0, 0, 196, 197, 0, 39, 0, 0,
3201 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3202 211, 212, 213, 0, 214, 215, 216, 0, 40, 41,
3203 0, 0, 0, 0, 0, 0, 0, 42, 0, 222,
3204 223, 0, 224, 225, 226, 227, 228, 43, 0, 0,
3205 44, 0, 229, 0, 230, 45, 46, 231, 0, 0,
3206 47, 0, 48, 0, 49, 0, 50, 1, 2, 3,
3207 -4, 4, 5, 6, 7, 8, 9, 10, 0, 0,
3208 0, 12, 13, 14, 15, 16, 17, 18, 19, 20,
3209 0, 21, 22, 143, 0, 144, 0, 0, 0, 23,
3210 145, 24, 25, 0, 26, 146, 27, 0, 28, 147,
3211 29, 30, 31, 0, 0, 32, 33, 0, 34, 35,
3212 211, 212, 213, 0, 0, 0, 36, 37, 38, 0,
3213 148, 0, 0, 0, 39, 0, 0, 0, 0, 0,
3214 0, 0, 224, 225, 226, 227, 228, 0, 0, 0,
3215 0, 0, 229, 0, 230, 40, 41, 231, 0, 0,
3216 0, 0, 0, 0, 149, 0, 0, 0, 0, 0,
3217 0, 0, 0, 0, 43, 0, 0, 44, 0, 0,
3218 0, 0, 45, 46, 0, 0, 0, 47, 0, 48,
3219 0, 49, 0, 50, 1, 2, 3, 150, 4, 5,
3220 6, 7, 8, 9, 10, 0, 0, 0, 12, 13,
3221 14, 15, 16, 17, 18, 19, 20, 0, 21, 22,
3222 143, 0, 144, 0, 0, 0, 23, 145, 24, 25,
3223 0, 26, 146, 27, 0, 28, 147, 29, 30, 31,
3224 0, 0, 32, 33, 0, 34, 35, 0, 0, 0,
3225 0, 0, 0, 36, 37, 38, 0, 148, 0, 0,
3226 0, 39, 0, 0, 0, 0, 0, 0, 0, 0,
3227 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3228 0, 0, 40, 41, 0, 0, 0, 0, 0, 0,
3229 0, 149, 0, 0, 0, 0, 0, 0, 0, 0,
3230 0, 43, 0, 0, 44, 0, 0, 0, 0, 45,
3231 46, 0, 0, 0, 47, 0, 48, 0, 49, 0,
3232 50, 1, 2, 3, 272, 4, 5, 6, 7, 8,
3233 9, 10, 0, 0, 0, 12, 13, 14, 15, 16,
3234 17, 18, 19, 20, 0, 21, 22, 143, 0, 144,
3235 0, 0, 0, 23, 145, 24, 25, 0, 26, 146,
3236 27, 0, 28, 147, 29, 30, 31, 0, 0, 32,
3237 33, 0, 34, 35, 0, 0, 0, 0, 0, 0,
3238 36, 37, 38, 0, 148, 0, 0, 0, 39, 0,
3239 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3240 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,
3241 41, 0, 0, 0, 0, 0, 0, 0, 149, 0,
3242 0, 0, 0, 0, 0, 0, 0, 0, 43, 0,
3243 0, 44, 0, 0, 0, 0, 45, 46, 0, 0,
3244 0, 47, 0, 48, 0, 49, 0, 50, 1, 2,
3245 3, 442, 4, 5, 6, 7, 8, 9, 10, 0,
3246 0, 11, 12, 13, 14, 15, 16, 17, 18, 19,
3247 0, 0, 21, 22, 0, 0, -337, 0, 0, 0,
3248 23, 0, 24, 25, 0, 26, 0, 27, 0, 28,
3249 0, 29, 30, 31, 0, 0, 32, 33, 0, 34,
3250 35, 0, 0, 0, 0, 0, 0, 36, 37, 38,
3251 0, 0, -337, -337, 0, 39, 0, 0, 0, 0,
3252 0, 0, 0, 0, 0, 0, 0, 0, 211, 212,
3253 213, 0, 214, 215, 216, 0, 40, 41, 0, 0,
3254 0, 0, 0, 0, 0, 42, 0, -337, -337, 0,
3255 224, 225, 226, 227, 228, 43, 0, 0, 44, 0,
3256 229, 0, 230, 45, 46, 231, 0, 0, 47, 0,
3257 48, 0, 49, 0, 50, 1, 2, 3, -3, 4,
3258 5, 6, 7, 8, 9, 10, 0, 0, 0, 12,
3259 13, 14, 15, 16, 17, 18, 19, 0, 0, 21,
3260 22, 0, 0, 0, 0, 0, 0, 23, 0, 24,
3261 25, 0, 26, 0, 27, 0, 28, 0, 29, 30,
3262 31, 0, 0, 32, 33, 0, 34, 35, 0, 0,
3263 0, 0, 0, 0, 36, 37, 38, 0, 0, 0,
3264 0, 0, 39, 0, 0, 0, 0, 0, 0, 0,
3265 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3266 0, 0, 0, 40, 41, 0, 0, 0, 0, 0,
3267 0, 0, 348, 0, 0, 0, 0, 0, 0, 0,
3268 0, 0, 43, 0, 0, 44, 0, 0, 0, 0,
3269 45, 46, 0, 0, 0, 47, 0, 349, 0, 49,
3270 0, 50, 1, 2, 3, -15, 4, 5, 6, 7,
3271 8, 9, 10, 0, 0, 0, 12, 13, 14, 15,
3272 16, 17, 18, 19, 0, 0, 21, 22, 0, 0,
3273 0, 0, 0, 0, 23, 0, 24, 25, 0, 26,
3274 0, 27, 0, 28, 0, 29, 30, 31, 0, 0,
3275 32, 33, 0, 34, 35, 0, 0, 0, 0, 0,
3276 0, 36, 37, 38, 0, 0, 0, 0, 0, 39,
3277 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3278 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3279 40, 41, 0, 0, 0, 0, 0, 0, 0, 348,
3280 0, 0, 0, 0, 0, 0, 0, 0, 0, 43,
3281 0, 0, 44, 0, 0, 0, 0, 45, 46, 0,
3282 0, 0, 47, 0, 349, 0, 49, 0, 50, 1,
3283 2, 3, -16, 4, 5, 6, 7, 8, 9, 10,
3284 0, 0, 0, 12, 13, 14, 15, 16, 17, 18,
3285 19, 0, 0, 21, 22, 0, 0, 0, 0, 0,
3286 0, 23, 0, 24, 25, 0, 26, 0, 27, 0,
3287 28, 0, 29, 30, 31, 0, 0, 32, 33, 0,
3288 34, 35, 0, 0, 0, 0, 0, 0, 36, 37,
3289 38, 0, 0, 0, 0, 0, 39, 0, 0, 0,
3290 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3291 0, 0, 0, 0, 0, 0, 0, 40, 41, 0,
3292 0, 0, 0, 0, 0, 0, 557, 0, 0, 0,
3293 0, 0, 0, 0, 0, 0, 43, 0, 0, 44,
3294 0, 0, 0, 0, 45, 46, 0, 0, 0, 47,
3295 0, 558, 0, 49, 0, 50, 1, 2, 3, -148,
3296 4, 5, 6, 7, 8, 9, 10, 0, 0, 0,
3297 12, 13, 14, 15, 16, 17, 18, 19, 0, 0,
3298 21, 22, 0, 0, 0, 0, 0, 0, 23, 0,
3299 24, 25, 0, 26, 0, 27, 0, 28, 0, 29,
3300 30, 31, 0, 0, 32, 33, 0, 34, 35, 0,
3301 0, 0, -137, 0, 0, 36, 37, 38, 0, 0,
3302 0, 0, 0, 39, -137, 0, -137, 0, -137, -137,
3303 0, -137, 0, -137, -137, 0, 0, 0, 0, -137,
3304 -137, 0, 0, 0, 40, 41, -137, 0, 0, 0,
3305 0, 0, -137, 557, -137, -137, -137, -137, 0, 0,
3306 0, 0, 0, 43, 0, 0, 44, 0, 0, 0,
3307 0, 45, 46, 0, 0, 0, 47, 0, 558, 0,
3308 49, 0, 50, 0, -3, 0, -149, 1, 2, 3,
3309 0, 4, 5, 6, 7, 8, 9, 10, 0, 92,
3310 11, 12, 13, 14, 15, 16, 17, 18, 19, 0,
3311 0, 21, 22, 0, 0, 0, 0, 0, 0, 23,
3312 0, 24, 25, 0, 26, 0, 27, 0, 28, 0,
3313 29, 30, 31, 0, 0, 32, 33, 0, 34, 35,
3314 0, 0, 0, 0, 0, 0, 36, 37, 38, 0,
3315 0, 0, 0, 0, 39, 0, 0, 0, 0, 0,
3316 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3317 0, 0, 0, 0, 0, 40, 41, 0, 0, 0,
3318 0, 0, 0, 0, 42, 0, 0, 0, 0, 0,
3319 0, 0, 0, 0, 43, 0, 0, 44, 0, 0,
3320 0, 0, 45, 46, 0, 0, 0, 47, 0, 48,
3321 0, 49, 0, 50, 1, 2, 3, 0, 4, 5,
3322 6, 7, 8, 9, 10, 0, -124, 0, 12, 13,
3323 14, 15, 16, 17, 18, 19, 20, 0, 21, 22,
3324 143, 0, 144, 0, 0, 0, 23, 145, 24, 25,
3325 0, 26, 146, 27, 0, 28, 147, 29, 30, 31,
3326 0, 0, 32, 33, 0, 34, 35, 0, 0, 0,
3327 0, 0, 0, 36, 37, 38, 0, 148, 0, 0,
3328 0, 39, 0, 0, 0, 0, 0, 0, 0, 0,
3329 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3330 0, 0, 40, 41, 0, 0, 0, 0, 0, 0,
3331 0, 149, 0, 0, 0, 0, 0, 0, 0, 0,
3332 0, 43, 0, 0, 44, 0, 0, 0, 0, 45,
3333 46, 0, 0, 0, 47, 0, 48, 0, 49, 0,
3334 50, 1, 2, 3, 0, 4, 5, 6, 7, 8,
3335 9, 10, 0, 0, 0, 12, 13, 14, 15, 16,
3336 17, 18, 19, 20, 0, 21, 22, 143, 0, 144,
3337 0, 0, 0, 23, 145, 24, 25, 0, 26, 146,
3338 27, 0, 28, 147, 29, 30, 31, 0, 0, 32,
3339 33, 0, 34, 35, 0, 0, 0, 0, 0, 0,
3340 36, 37, 38, 0, 148, 0, 0, 0, 39, 0,
3341 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3342 0, 107, 2, 3, 0, 4, 5, 6, 0, 40,
3343 41, 0, 0, 0, 0, 0, 13, 0, 149, 0,
3344 0, 18, 0, 20, 0, 21, 22, 0, 43, 0,
3345 0, 44, 0, 23, 0, 0, 45, 46, 0, 0,
3346 27, 47, 28, 48, 0, 49, 0, 50, 0, 0,
3347 33, 0, 34, 35, 0, 0, 0, 0, 107, 2,
3348 3, 37, 4, 5, 6, 0, 0, 0, 39, 0,
3349 0, 0, 0, 13, 0, 0, 0, 0, 18, 0,
3350 20, 0, 21, 22, 0, 0, 0, 0, 0, 40,
3351 41, 0, 0, 0, 0, 0, 0, 0, 0, 28,
3352 0, 0, 0, 0, 0, 0, 0, 33, 43, 34,
3353 35, 44, 0, 0, 0, 0, 45, 46, 0, 0,
3354 0, 47, 0, 48, 0, 39, 0, 50, 0, 0,
3355 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3356 0, 0, 0, 0, 0, 0, 40, 41, 0, 0,
3357 0, 0, 0, 188, 0, 0, 0, 0, 0, 0,
3358 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3359 0, 0, 0, 0, 0, 0, 0, 0, 47, 0,
3360 48, 189, 190, 191, 50, 192, 193, 194, 195, 196,
3361 197, 198, 199, 200, 201, 202, 203, 204, 205, 206,
3362 207, 208, 209, 210, 0, 211, 212, 213, 0, 214,
3363 215, 216, 0, 0, 0, 0, 0, 217, 218, 0,
3364 219, 220, 221, 188, 222, 223, 0, 224, 225, 226,
3365 227, 228, 0, 0, 0, 0, 0, 229, 0, 230,
3366 0, 0, 231, 0, 0, 0, 0, 0, 419, 0,
3367 0, 189, 190, 191, 0, 192, 193, 194, 195, 196,
3368 197, 198, 199, 200, 201, 202, 203, 204, 205, 206,
3369 207, 208, 209, 210, 0, 211, 212, 213, 0, 214,
3370 215, 216, 0, 0, 0, 0, 0, 217, 218, 0,
3371 219, 220, 221, 188, 222, 223, 0, 224, 225, 226,
3372 227, 228, 0, 0, 0, 0, 0, 229, 0, 230,
3373 0, 0, 231, 0, 0, 0, 0, 0, 513, 0,
3374 0, 189, 190, 191, 0, 192, 193, 194, 195, 196,
3375 197, 198, 199, 200, 201, 202, 203, 204, 205, 206,
3376 207, 208, 209, 210, 0, 211, 212, 213, 0, 214,
3377 215, 216, 0, 0, 0, 188, 0, 217, 218, 408,
3378 219, 220, 221, 0, 222, 223, 0, 224, 225, 226,
3379 227, 228, 0, 0, 0, 0, 0, 229, 0, 230,
3380 0, 0, 231, 189, 190, 191, 0, 192, 193, 194,
3381 195, 196, 197, 198, 199, 200, 201, 202, 203, 204,
3382 205, 206, 207, 208, 209, 210, 0, 211, 212, 213,
3383 0, 214, 215, 216, 0, 0, 0, 188, 0, 217,
3384 218, 0, 219, 220, 221, 0, 222, 223, 0, 224,
3385 225, 226, 227, 228, 0, 0, 0, 0, 0, 229,
3386 0, 230, 410, 0, 231, 189, 190, 191, 0, 192,
3387 193, 194, 195, 196, 197, 198, 199, 200, 201, 202,
3388 203, 204, 205, 206, 207, 208, 209, 210, 0, 211,
3389 212, 213, 0, 214, 215, 216, 0, 0, 0, 188,
3390 0, 217, 218, 0, 219, 220, 221, 0, 222, 223,
3391 0, 224, 225, 226, 227, 228, 0, 0, 0, 0,
3392 0, 229, 0, 230, 469, 0, 231, 189, 190, 191,
3393 0, 192, 193, 194, 195, 196, 197, 198, 199, 200,
3394 201, 202, 203, 204, 205, 206, 207, 208, 209, 210,
3395 0, 211, 212, 213, 0, 214, 215, 216, 0, 0,
3396 0, 188, 0, 217, 218, 0, 219, 220, 221, 0,
3397 222, 223, 0, 224, 225, 226, 227, 228, 0, 0,
3398 0, 0, 0, 229, 0, 230, 511, 0, 231, 189,
3399 190, 191, 0, 192, 193, 194, 195, 196, 197, 198,
3400 199, 200, 201, 202, 203, 204, 205, 206, 207, 208,
3401 209, 210, 0, 211, 212, 213, 0, 214, 215, 216,
3402 0, 0, 0, 188, 0, 217, 218, 0, 219, 220,
3403 221, 0, 222, 223, 0, 224, 225, 226, 227, 228,
3404 0, 0, 0, 0, 0, 229, 0, 230, 514, 0,
3405 231, 189, 190, 191, 0, 192, 193, 194, 195, 196,
3406 197, 198, 199, 200, 201, 202, 203, 204, 205, 206,
3407 207, 208, 209, 210, 0, 211, 212, 213, 0, 214,
3408 215, 216, 0, 0, 0, 188, 0, 217, 218, 0,
3409 219, 220, 221, 0, 222, 223, 0, 224, 225, 226,
3410 227, 228, 0, 0, 0, 0, 0, 229, 0, 230,
3411 522, 0, 231, 189, 190, 191, 0, 192, 193, 194,
3412 195, 196, 197, 198, 199, 200, 201, 202, 203, 204,
3413 205, 206, 207, 208, 209, 210, 0, 211, 212, 213,
3414 0, 214, 215, 216, 0, 0, 0, 188, 0, 217,
3415 218, 575, 219, 220, 221, 0, 222, 223, 0, 224,
3416 225, 226, 227, 228, 0, 0, 0, 0, 0, 229,
3417 0, 230, 0, 0, 231, 189, 190, 191, 0, 192,
3418 193, 194, 195, 196, 197, 198, 199, 200, 201, 202,
3419 203, 204, 205, 206, 207, 208, 209, 210, 0, 211,
3420 212, 213, 0, 214, 215, 216, 0, 0, 0, 188,
3421 0, 217, 218, 0, 219, 220, 221, 0, 222, 223,
3422 0, 224, 225, 226, 227, 228, 0, 0, 0, 0,
3423 0, 229, 0, 230, 601, 0, 231, 189, 190, 191,
3424 0, 192, 193, 194, 195, 196, 197, 198, 199, 200,
3425 201, 202, 203, 204, 205, 206, 207, 208, 209, 210,
3426 0, 211, 212, 213, 0, 214, 215, 216, 0, 0,
3427 0, 188, 0, 217, 218, 0, 219, 220, 221, 0,
3428 222, 223, 0, 224, 225, 226, 227, 228, 0, 0,
3429 0, 0, 0, 229, 0, 230, 0, 0, 231, 189,
3430 190, 191, 0, 192, 193, 194, 195, 196, 197, 198,
3431 199, 200, 201, 202, 203, 204, 205, 206, 207, 208,
3432 209, 210, 0, 211, 212, 213, 0, 214, 215, 216,
3433 0, 0, 0, 188, 0, 217, 218, 0, 219, 220,
3434 221, 0, 0, 223, 0, 224, 225, 226, 227, 228,
3435 0, 0, 0, 0, 0, 229, 0, 230, 0, 0,
3436 231, 189, 190, 191, 0, 192, 193, 194, 195, 196,
3437 197, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3438 0, 0, 0, 210, 0, 211, 212, 213, 0, 214,
3439 215, 216, 0, 0, 0, 188, 0, 0, 0, 0,
3440 219, 220, 221, 0, 222, 223, 0, 224, 225, 226,
3441 227, 228, 0, 0, 0, 0, 0, 229, 0, 230,
3442 0, 0, 231, 189, 190, 191, 0, 192, 193, 194,
3443 195, 196, 197, 0, 0, 0, 0, 0, 0, 0,
3444 0, 0, 0, 0, 0, 0, 0, 211, 212, 213,
3445 0, 214, 215, 216, 0, 0, 0, 188, 0, 0,
3446 0, 0, 219, 220, 221, 0, 222, 223, 0, 224,
3447 225, 226, 227, 228, 0, 0, 0, 0, 0, 229,
3448 0, 230, 0, 0, 231, 189, 190, 191, 0, 192,
3449 193, 194, 195, 196, 197, 0, 0, 0, 0, 0,
3450 0, 0, 0, 0, 0, 0, 0, 0, 0, 211,
3451 212, 213, 0, 214, 215, 216, 0, 0, 0, 188,
3452 0, 0, 0, 0, 0, 220, 221, 0, 222, 223,
3453 0, 224, 225, 226, 227, 228, 0, 0, 0, 0,
3454 0, 229, 0, 230, 0, 0, 231, 189, 190, 191,
3455 0, 192, 193, 194, 195, 196, 197, 0, 0, 0,
3456 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3457 0, 211, 212, 213, 0, 214, 215, 216, 0, 0,
3458 0, 188, 0, 0, 0, 0, 0, 0, 221, 0,
3459 222, 223, 0, 224, 225, 226, 227, 228, 0, 0,
3460 0, 0, 0, 229, 0, 230, 0, 0, 231, 189,
3461 190, 191, 0, 192, 193, 194, 195, 196, 197, 0,
3462 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3463 0, 0, 0, 211, 212, 213, 0, 214, 215, 216,
3464 0, 0, 0, 188, 0, 0, 0, 0, 0, 0,
3465 -337, 0, 222, 223, 0, 224, 225, 226, 227, 228,
3466 0, 0, 0, 0, 0, 229, 0, 230, 0, 0,
3467 231, 189, 190, 191, 0, -337, -337, -337, -337, 196,
3468 197, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3469 0, 0, 0, 0, 0, 211, 212, 213, 0, 214,
3470 215, 216, 0, 0, 0, 0, 0, 0, 0, 0,
3471 0, 0, 0, 0, 222, 223, 0, 224, 225, 226,
3472 227, 228, 0, 0, 0, 0, 0, 229, 0, 230,
3476 static const yytype_int16 yycheck[] =
3478 0, 0, 0, 0, 0, 106, 18, 59, 49, 66,
3479 140, 23, 118, 345, 447, 27, 4, 186, 3, 3,
3480 359, 4, 462, 4, 11, 37, 3, 231, 40, 41,
3481 4, 365, 44, 45, 46, 47, 48, 0, 93, 26,
3482 97, 3, 68, 231, 376, 276, 49, 3, 91, 92,
3483 93, 510, 11, 53, 53, 53, 53, 53, 112, 15,
3484 16, 0, 101, 0, 571, 101, 15, 26, 122, 509,
3485 125, 542, 28, 128, 123, 33, 3, 103, 123, 128,
3486 123, 588, 125, 95, 423, 128, 545, 3, 15, 16,
3487 53, 145, 146, 26, 151, 134, 3, 431, 134, 32,
3488 112, 28, 573, 61, 127, 128, 118, 111, 15, 16,
3489 122, 115, 444, 123, 53, 319, 53, 94, 123, 106,
3490 123, 28, 291, 229, 34, 3, 4, 257, 140, 110,
3491 111, 319, 94, 145, 146, 127, 15, 111, 342, 127,
3492 50, 15, 127, 127, 127, 123, 127, 3, 482, 3,
3493 103, 25, 105, 127, 342, 0, 30, 31, 490, 127,
3494 116, 15, 16, 394, 164, 164, 164, 164, 164, 43,
3495 603, 45, 184, 129, 28, 187, 188, 189, 190, 191,
3496 192, 193, 194, 195, 196, 197, 198, 199, 200, 201,
3497 202, 203, 204, 205, 206, 207, 208, 209, 210, 430,
3498 532, 164, 214, 215, 216, 217, 218, 219, 220, 221,
3499 222, 223, 224, 225, 226, 227, 228, 229, 230, 407,
3500 127, 15, 3, 277, 278, 164, 238, 164, 416, 398,
3501 399, 25, 101, 274, 123, 11, 3, 31, 123, 239,
3502 239, 239, 254, 3, 128, 257, 128, 259, 103, 101,
3503 17, 45, 19, 20, 241, 22, 362, 24, 133, 105,
3504 3, 126, 116, 250, 101, 277, 278, 3, 3, 123,
3505 37, 125, 15, 16, 3, 129, 464, 3, 45, 46,
3506 47, 48, 3, 471, 3, 28, 15, 16, 127, 390,
3507 15, 392, 346, 68, 15, 16, 15, 16, 3, 28,
3508 3, 100, 533, 68, 434, 100, 35, 28, 3, 28,
3509 3, 3, 17, 134, 19, 20, 373, 22, 101, 24,
3510 548, 123, 128, 554, 552, 553, 383, 128, 105, 341,
3511 123, 134, 37, 100, 346, 101, 134, 349, 134, 103,
3512 45, 46, 47, 48, 133, 3, 3, 575, 449, 53,
3513 362, 351, 351, 351, 53, 3, 3, 15, 16, 359,
3514 359, 359, 103, 103, 134, 593, 133, 15, 16, 126,
3515 28, 133, 90, 116, 361, 90, 90, 605, 609, 90,
3516 28, 127, 125, 3, 3, 4, 134, 116, 7, 8,
3517 9, 443, 404, 380, 101, 100, 408, 116, 499, 411,
3518 128, 413, 133, 390, 105, 392, 125, 103, 420, 100,
3519 134, 123, 14, 101, 426, 90, 133, 127, 90, 127,
3520 65, 134, 434, 423, 423, 423, 111, 439, 133, 127,
3521 101, 133, 3, 4, 5, 103, 7, 8, 9, 133,
3522 427, 127, 123, 127, 134, 134, 115, 18, 110, 105,
3523 133, 3, 23, 3, 25, 25, 27, 28, 116, 133,
3524 31, 115, 449, 127, 35, 3, 127, 133, 116, 134,
3525 133, 42, 3, 44, 45, 111, 111, 91, 92, 93,
3526 133, 52, 133, 54, 55, 123, 17, 133, 19, 20,
3527 127, 22, 63, 24, 133, 507, 53, 164, 351, 70,
3528 500, 115, 116, 117, 516, 134, 37, 133, 97, 123,
3529 558, 125, 499, 454, 128, 46, 47, 48, 59, 144,
3530 91, 92, 382, 488, 519, 519, 71, 488, 563, 582,
3531 455, 540, 480, 291, 534, 534, 534, 534, 534, 110,
3532 540, 568, 113, 26, 449, 47, 558, 118, 119, 258,
3533 427, -1, 123, -1, 125, -1, -1, -1, 129, -1,
3534 -1, -1, -1, 563, 563, 563, 563, 563, -1, 581,
3535 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3536 -1, -1, 582, 582, 582, 582, 582, 0, -1, -1,
3537 3, 4, 5, -1, 7, 8, 9, 10, 11, 12,
3538 13, -1, -1, 16, 17, 18, 19, 20, 21, 22,
3539 23, 24, -1, -1, 27, 28, -1, -1, 39, -1,
3540 -1, -1, 35, -1, 37, 38, -1, 40, -1, 42,
3541 -1, 44, -1, 46, 47, 48, -1, -1, 51, 52,
3542 -1, 54, 55, -1, -1, -1, 67, 68, 69, 62,
3543 63, 64, -1, -1, 75, 76, -1, 70, -1, -1,
3544 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3545 91, 92, 93, -1, 95, 96, 97, -1, 91, 92,
3546 -1, -1, -1, -1, -1, -1, -1, 100, -1, 110,
3547 111, -1, 113, 114, 115, 116, 117, 110, -1, -1,
3548 113, -1, 123, -1, 125, 118, 119, 128, -1, -1,
3549 123, -1, 125, -1, 127, -1, 129, 3, 4, 5,
3550 133, 7, 8, 9, 10, 11, 12, 13, -1, -1,
3551 -1, 17, 18, 19, 20, 21, 22, 23, 24, 25,
3552 -1, 27, 28, 29, -1, 31, -1, -1, -1, 35,
3553 36, 37, 38, -1, 40, 41, 42, -1, 44, 45,
3554 46, 47, 48, -1, -1, 51, 52, -1, 54, 55,
3555 91, 92, 93, -1, -1, -1, 62, 63, 64, -1,
3556 66, -1, -1, -1, 70, -1, -1, -1, -1, -1,
3557 -1, -1, 113, 114, 115, 116, 117, -1, -1, -1,
3558 -1, -1, 123, -1, 125, 91, 92, 128, -1, -1,
3559 -1, -1, -1, -1, 100, -1, -1, -1, -1, -1,
3560 -1, -1, -1, -1, 110, -1, -1, 113, -1, -1,
3561 -1, -1, 118, 119, -1, -1, -1, 123, -1, 125,
3562 -1, 127, -1, 129, 3, 4, 5, 133, 7, 8,
3563 9, 10, 11, 12, 13, -1, -1, -1, 17, 18,
3564 19, 20, 21, 22, 23, 24, 25, -1, 27, 28,
3565 29, -1, 31, -1, -1, -1, 35, 36, 37, 38,
3566 -1, 40, 41, 42, -1, 44, 45, 46, 47, 48,
3567 -1, -1, 51, 52, -1, 54, 55, -1, -1, -1,
3568 -1, -1, -1, 62, 63, 64, -1, 66, -1, -1,
3569 -1, 70, -1, -1, -1, -1, -1, -1, -1, -1,
3570 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3571 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
3572 -1, 100, -1, -1, -1, -1, -1, -1, -1, -1,
3573 -1, 110, -1, -1, 113, -1, -1, -1, -1, 118,
3574 119, -1, -1, -1, 123, -1, 125, -1, 127, -1,
3575 129, 3, 4, 5, 133, 7, 8, 9, 10, 11,
3576 12, 13, -1, -1, -1, 17, 18, 19, 20, 21,
3577 22, 23, 24, 25, -1, 27, 28, 29, -1, 31,
3578 -1, -1, -1, 35, 36, 37, 38, -1, 40, 41,
3579 42, -1, 44, 45, 46, 47, 48, -1, -1, 51,
3580 52, -1, 54, 55, -1, -1, -1, -1, -1, -1,
3581 62, 63, 64, -1, 66, -1, -1, -1, 70, -1,
3582 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3583 -1, -1, -1, -1, -1, -1, -1, -1, -1, 91,
3584 92, -1, -1, -1, -1, -1, -1, -1, 100, -1,
3585 -1, -1, -1, -1, -1, -1, -1, -1, 110, -1,
3586 -1, 113, -1, -1, -1, -1, 118, 119, -1, -1,
3587 -1, 123, -1, 125, -1, 127, -1, 129, 3, 4,
3588 5, 133, 7, 8, 9, 10, 11, 12, 13, -1,
3589 -1, 16, 17, 18, 19, 20, 21, 22, 23, 24,
3590 -1, -1, 27, 28, -1, -1, 39, -1, -1, -1,
3591 35, -1, 37, 38, -1, 40, -1, 42, -1, 44,
3592 -1, 46, 47, 48, -1, -1, 51, 52, -1, 54,
3593 55, -1, -1, -1, -1, -1, -1, 62, 63, 64,
3594 -1, -1, 75, 76, -1, 70, -1, -1, -1, -1,
3595 -1, -1, -1, -1, -1, -1, -1, -1, 91, 92,
3596 93, -1, 95, 96, 97, -1, 91, 92, -1, -1,
3597 -1, -1, -1, -1, -1, 100, -1, 110, 111, -1,
3598 113, 114, 115, 116, 117, 110, -1, -1, 113, -1,
3599 123, -1, 125, 118, 119, 128, -1, -1, 123, -1,
3600 125, -1, 127, -1, 129, 3, 4, 5, 133, 7,
3601 8, 9, 10, 11, 12, 13, -1, -1, -1, 17,
3602 18, 19, 20, 21, 22, 23, 24, -1, -1, 27,
3603 28, -1, -1, -1, -1, -1, -1, 35, -1, 37,
3604 38, -1, 40, -1, 42, -1, 44, -1, 46, 47,
3605 48, -1, -1, 51, 52, -1, 54, 55, -1, -1,
3606 -1, -1, -1, -1, 62, 63, 64, -1, -1, -1,
3607 -1, -1, 70, -1, -1, -1, -1, -1, -1, -1,
3608 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3609 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
3610 -1, -1, 100, -1, -1, -1, -1, -1, -1, -1,
3611 -1, -1, 110, -1, -1, 113, -1, -1, -1, -1,
3612 118, 119, -1, -1, -1, 123, -1, 125, -1, 127,
3613 -1, 129, 3, 4, 5, 133, 7, 8, 9, 10,
3614 11, 12, 13, -1, -1, -1, 17, 18, 19, 20,
3615 21, 22, 23, 24, -1, -1, 27, 28, -1, -1,
3616 -1, -1, -1, -1, 35, -1, 37, 38, -1, 40,
3617 -1, 42, -1, 44, -1, 46, 47, 48, -1, -1,
3618 51, 52, -1, 54, 55, -1, -1, -1, -1, -1,
3619 -1, 62, 63, 64, -1, -1, -1, -1, -1, 70,
3620 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3621 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3622 91, 92, -1, -1, -1, -1, -1, -1, -1, 100,
3623 -1, -1, -1, -1, -1, -1, -1, -1, -1, 110,
3624 -1, -1, 113, -1, -1, -1, -1, 118, 119, -1,
3625 -1, -1, 123, -1, 125, -1, 127, -1, 129, 3,
3626 4, 5, 133, 7, 8, 9, 10, 11, 12, 13,
3627 -1, -1, -1, 17, 18, 19, 20, 21, 22, 23,
3628 24, -1, -1, 27, 28, -1, -1, -1, -1, -1,
3629 -1, 35, -1, 37, 38, -1, 40, -1, 42, -1,
3630 44, -1, 46, 47, 48, -1, -1, 51, 52, -1,
3631 54, 55, -1, -1, -1, -1, -1, -1, 62, 63,
3632 64, -1, -1, -1, -1, -1, 70, -1, -1, -1,
3633 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3634 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
3635 -1, -1, -1, -1, -1, -1, 100, -1, -1, -1,
3636 -1, -1, -1, -1, -1, -1, 110, -1, -1, 113,
3637 -1, -1, -1, -1, 118, 119, -1, -1, -1, 123,
3638 -1, 125, -1, 127, -1, 129, 3, 4, 5, 133,
3639 7, 8, 9, 10, 11, 12, 13, -1, -1, -1,
3640 17, 18, 19, 20, 21, 22, 23, 24, -1, -1,
3641 27, 28, -1, -1, -1, -1, -1, -1, 35, -1,
3642 37, 38, -1, 40, -1, 42, -1, 44, -1, 46,
3643 47, 48, -1, -1, 51, 52, -1, 54, 55, -1,
3644 -1, -1, 3, -1, -1, 62, 63, 64, -1, -1,
3645 -1, -1, -1, 70, 15, -1, 17, -1, 19, 20,
3646 -1, 22, -1, 24, 25, -1, -1, -1, -1, 30,
3647 31, -1, -1, -1, 91, 92, 37, -1, -1, -1,
3648 -1, -1, 43, 100, 45, 46, 47, 48, -1, -1,
3649 -1, -1, -1, 110, -1, -1, 113, -1, -1, -1,
3650 -1, 118, 119, -1, -1, -1, 123, -1, 125, -1,
3651 127, -1, 129, -1, 0, -1, 133, 3, 4, 5,
3652 -1, 7, 8, 9, 10, 11, 12, 13, -1, 90,
3653 16, 17, 18, 19, 20, 21, 22, 23, 24, -1,
3654 -1, 27, 28, -1, -1, -1, -1, -1, -1, 35,
3655 -1, 37, 38, -1, 40, -1, 42, -1, 44, -1,
3656 46, 47, 48, -1, -1, 51, 52, -1, 54, 55,
3657 -1, -1, -1, -1, -1, -1, 62, 63, 64, -1,
3658 -1, -1, -1, -1, 70, -1, -1, -1, -1, -1,
3659 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3660 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
3661 -1, -1, -1, -1, 100, -1, -1, -1, -1, -1,
3662 -1, -1, -1, -1, 110, -1, -1, 113, -1, -1,
3663 -1, -1, 118, 119, -1, -1, -1, 123, -1, 125,
3664 -1, 127, -1, 129, 3, 4, 5, -1, 7, 8,
3665 9, 10, 11, 12, 13, -1, 15, -1, 17, 18,
3666 19, 20, 21, 22, 23, 24, 25, -1, 27, 28,
3667 29, -1, 31, -1, -1, -1, 35, 36, 37, 38,
3668 -1, 40, 41, 42, -1, 44, 45, 46, 47, 48,
3669 -1, -1, 51, 52, -1, 54, 55, -1, -1, -1,
3670 -1, -1, -1, 62, 63, 64, -1, 66, -1, -1,
3671 -1, 70, -1, -1, -1, -1, -1, -1, -1, -1,
3672 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3673 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
3674 -1, 100, -1, -1, -1, -1, -1, -1, -1, -1,
3675 -1, 110, -1, -1, 113, -1, -1, -1, -1, 118,
3676 119, -1, -1, -1, 123, -1, 125, -1, 127, -1,
3677 129, 3, 4, 5, -1, 7, 8, 9, 10, 11,
3678 12, 13, -1, -1, -1, 17, 18, 19, 20, 21,
3679 22, 23, 24, 25, -1, 27, 28, 29, -1, 31,
3680 -1, -1, -1, 35, 36, 37, 38, -1, 40, 41,
3681 42, -1, 44, 45, 46, 47, 48, -1, -1, 51,
3682 52, -1, 54, 55, -1, -1, -1, -1, -1, -1,
3683 62, 63, 64, -1, 66, -1, -1, -1, 70, -1,
3684 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3685 -1, 3, 4, 5, -1, 7, 8, 9, -1, 91,
3686 92, -1, -1, -1, -1, -1, 18, -1, 100, -1,
3687 -1, 23, -1, 25, -1, 27, 28, -1, 110, -1,
3688 -1, 113, -1, 35, -1, -1, 118, 119, -1, -1,
3689 42, 123, 44, 125, -1, 127, -1, 129, -1, -1,
3690 52, -1, 54, 55, -1, -1, -1, -1, 3, 4,
3691 5, 63, 7, 8, 9, -1, -1, -1, 70, -1,
3692 -1, -1, -1, 18, -1, -1, -1, -1, 23, -1,
3693 25, -1, 27, 28, -1, -1, -1, -1, -1, 91,
3694 92, -1, -1, -1, -1, -1, -1, -1, -1, 44,
3695 -1, -1, -1, -1, -1, -1, -1, 52, 110, 54,
3696 55, 113, -1, -1, -1, -1, 118, 119, -1, -1,
3697 -1, 123, -1, 125, -1, 70, -1, 129, -1, -1,
3698 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3699 -1, -1, -1, -1, -1, -1, 91, 92, -1, -1,
3700 -1, -1, -1, 39, -1, -1, -1, -1, -1, -1,
3701 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3702 -1, -1, -1, -1, -1, -1, -1, -1, 123, -1,
3703 125, 67, 68, 69, 129, 71, 72, 73, 74, 75,
3704 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
3705 86, 87, 88, 89, -1, 91, 92, 93, -1, 95,
3706 96, 97, -1, -1, -1, -1, -1, 103, 104, -1,
3707 106, 107, 108, 39, 110, 111, -1, 113, 114, 115,
3708 116, 117, -1, -1, -1, -1, -1, 123, -1, 125,
3709 -1, -1, 128, -1, -1, -1, -1, -1, 134, -1,
3710 -1, 67, 68, 69, -1, 71, 72, 73, 74, 75,
3711 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
3712 86, 87, 88, 89, -1, 91, 92, 93, -1, 95,
3713 96, 97, -1, -1, -1, -1, -1, 103, 104, -1,
3714 106, 107, 108, 39, 110, 111, -1, 113, 114, 115,
3715 116, 117, -1, -1, -1, -1, -1, 123, -1, 125,
3716 -1, -1, 128, -1, -1, -1, -1, -1, 134, -1,
3717 -1, 67, 68, 69, -1, 71, 72, 73, 74, 75,
3718 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
3719 86, 87, 88, 89, -1, 91, 92, 93, -1, 95,
3720 96, 97, -1, -1, -1, 39, -1, 103, 104, 105,
3721 106, 107, 108, -1, 110, 111, -1, 113, 114, 115,
3722 116, 117, -1, -1, -1, -1, -1, 123, -1, 125,
3723 -1, -1, 128, 67, 68, 69, -1, 71, 72, 73,
3724 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
3725 84, 85, 86, 87, 88, 89, -1, 91, 92, 93,
3726 -1, 95, 96, 97, -1, -1, -1, 39, -1, 103,
3727 104, -1, 106, 107, 108, -1, 110, 111, -1, 113,
3728 114, 115, 116, 117, -1, -1, -1, -1, -1, 123,
3729 -1, 125, 126, -1, 128, 67, 68, 69, -1, 71,
3730 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
3731 82, 83, 84, 85, 86, 87, 88, 89, -1, 91,
3732 92, 93, -1, 95, 96, 97, -1, -1, -1, 39,
3733 -1, 103, 104, -1, 106, 107, 108, -1, 110, 111,
3734 -1, 113, 114, 115, 116, 117, -1, -1, -1, -1,
3735 -1, 123, -1, 125, 126, -1, 128, 67, 68, 69,
3736 -1, 71, 72, 73, 74, 75, 76, 77, 78, 79,
3737 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
3738 -1, 91, 92, 93, -1, 95, 96, 97, -1, -1,
3739 -1, 39, -1, 103, 104, -1, 106, 107, 108, -1,
3740 110, 111, -1, 113, 114, 115, 116, 117, -1, -1,
3741 -1, -1, -1, 123, -1, 125, 126, -1, 128, 67,
3742 68, 69, -1, 71, 72, 73, 74, 75, 76, 77,
3743 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
3744 88, 89, -1, 91, 92, 93, -1, 95, 96, 97,
3745 -1, -1, -1, 39, -1, 103, 104, -1, 106, 107,
3746 108, -1, 110, 111, -1, 113, 114, 115, 116, 117,
3747 -1, -1, -1, -1, -1, 123, -1, 125, 126, -1,
3748 128, 67, 68, 69, -1, 71, 72, 73, 74, 75,
3749 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
3750 86, 87, 88, 89, -1, 91, 92, 93, -1, 95,
3751 96, 97, -1, -1, -1, 39, -1, 103, 104, -1,
3752 106, 107, 108, -1, 110, 111, -1, 113, 114, 115,
3753 116, 117, -1, -1, -1, -1, -1, 123, -1, 125,
3754 126, -1, 128, 67, 68, 69, -1, 71, 72, 73,
3755 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
3756 84, 85, 86, 87, 88, 89, -1, 91, 92, 93,
3757 -1, 95, 96, 97, -1, -1, -1, 39, -1, 103,
3758 104, 105, 106, 107, 108, -1, 110, 111, -1, 113,
3759 114, 115, 116, 117, -1, -1, -1, -1, -1, 123,
3760 -1, 125, -1, -1, 128, 67, 68, 69, -1, 71,
3761 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
3762 82, 83, 84, 85, 86, 87, 88, 89, -1, 91,
3763 92, 93, -1, 95, 96, 97, -1, -1, -1, 39,
3764 -1, 103, 104, -1, 106, 107, 108, -1, 110, 111,
3765 -1, 113, 114, 115, 116, 117, -1, -1, -1, -1,
3766 -1, 123, -1, 125, 126, -1, 128, 67, 68, 69,
3767 -1, 71, 72, 73, 74, 75, 76, 77, 78, 79,
3768 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
3769 -1, 91, 92, 93, -1, 95, 96, 97, -1, -1,
3770 -1, 39, -1, 103, 104, -1, 106, 107, 108, -1,
3771 110, 111, -1, 113, 114, 115, 116, 117, -1, -1,
3772 -1, -1, -1, 123, -1, 125, -1, -1, 128, 67,
3773 68, 69, -1, 71, 72, 73, 74, 75, 76, 77,
3774 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
3775 88, 89, -1, 91, 92, 93, -1, 95, 96, 97,
3776 -1, -1, -1, 39, -1, 103, 104, -1, 106, 107,
3777 108, -1, -1, 111, -1, 113, 114, 115, 116, 117,
3778 -1, -1, -1, -1, -1, 123, -1, 125, -1, -1,
3779 128, 67, 68, 69, -1, 71, 72, 73, 74, 75,
3780 76, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3781 -1, -1, -1, 89, -1, 91, 92, 93, -1, 95,
3782 96, 97, -1, -1, -1, 39, -1, -1, -1, -1,
3783 106, 107, 108, -1, 110, 111, -1, 113, 114, 115,
3784 116, 117, -1, -1, -1, -1, -1, 123, -1, 125,
3785 -1, -1, 128, 67, 68, 69, -1, 71, 72, 73,
3786 74, 75, 76, -1, -1, -1, -1, -1, -1, -1,
3787 -1, -1, -1, -1, -1, -1, -1, 91, 92, 93,
3788 -1, 95, 96, 97, -1, -1, -1, 39, -1, -1,
3789 -1, -1, 106, 107, 108, -1, 110, 111, -1, 113,
3790 114, 115, 116, 117, -1, -1, -1, -1, -1, 123,
3791 -1, 125, -1, -1, 128, 67, 68, 69, -1, 71,
3792 72, 73, 74, 75, 76, -1, -1, -1, -1, -1,
3793 -1, -1, -1, -1, -1, -1, -1, -1, -1, 91,
3794 92, 93, -1, 95, 96, 97, -1, -1, -1, 39,
3795 -1, -1, -1, -1, -1, 107, 108, -1, 110, 111,
3796 -1, 113, 114, 115, 116, 117, -1, -1, -1, -1,
3797 -1, 123, -1, 125, -1, -1, 128, 67, 68, 69,
3798 -1, 71, 72, 73, 74, 75, 76, -1, -1, -1,
3799 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3800 -1, 91, 92, 93, -1, 95, 96, 97, -1, -1,
3801 -1, 39, -1, -1, -1, -1, -1, -1, 108, -1,
3802 110, 111, -1, 113, 114, 115, 116, 117, -1, -1,
3803 -1, -1, -1, 123, -1, 125, -1, -1, 128, 67,
3804 68, 69, -1, 71, 72, 73, 74, 75, 76, -1,
3805 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3806 -1, -1, -1, 91, 92, 93, -1, 95, 96, 97,
3807 -1, -1, -1, 39, -1, -1, -1, -1, -1, -1,
3808 108, -1, 110, 111, -1, 113, 114, 115, 116, 117,
3809 -1, -1, -1, -1, -1, 123, -1, 125, -1, -1,
3810 128, 67, 68, 69, -1, 71, 72, 73, 74, 75,
3811 76, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3812 -1, -1, -1, -1, -1, 91, 92, 93, -1, 95,
3813 96, 97, -1, -1, -1, -1, -1, -1, -1, -1,
3814 -1, -1, -1, -1, 110, 111, -1, 113, 114, 115,
3815 116, 117, -1, -1, -1, -1, -1, 123, -1, 125,
3819 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
3820 symbol of state STATE-NUM. */
3821 static const yytype_uint16 yystos[] =
3823 0, 3, 4, 5, 7, 8, 9, 10, 11, 12,
3824 13, 16, 17, 18, 19, 20, 21, 22, 23, 24,
3825 25, 27, 28, 35, 37, 38, 40, 42, 44, 46,
3826 47, 48, 51, 52, 54, 55, 62, 63, 64, 70,
3827 91, 92, 100, 110, 113, 118, 119, 123, 125, 127,
3828 129, 136, 137, 138, 139, 145, 148, 150, 158, 161,
3829 162, 163, 164, 165, 172, 180, 183, 184, 187, 190,
3830 191, 192, 193, 197, 199, 208, 213, 214, 215, 226,
3831 233, 236, 249, 250, 251, 256, 260, 264, 265, 267,
3832 268, 269, 90, 49, 123, 123, 155, 156, 123, 3,
3833 15, 16, 28, 127, 185, 186, 15, 3, 260, 3,
3834 235, 260, 123, 3, 186, 239, 260, 127, 123, 128,
3835 15, 260, 123, 3, 4, 7, 8, 9, 257, 258,
3836 259, 260, 260, 260, 260, 260, 255, 260, 245, 246,
3837 247, 253, 260, 29, 31, 36, 41, 45, 66, 100,
3838 133, 144, 145, 146, 150, 152, 166, 167, 182, 191,
3839 252, 3, 0, 139, 127, 3, 45, 152, 159, 160,
3840 256, 146, 147, 15, 25, 30, 31, 43, 45, 207,
3841 266, 3, 193, 3, 127, 220, 224, 101, 39, 67,
3842 68, 69, 71, 72, 73, 74, 75, 76, 77, 78,
3843 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
3844 89, 91, 92, 93, 95, 96, 97, 103, 104, 106,
3845 107, 108, 110, 111, 113, 114, 115, 116, 117, 123,
3846 125, 128, 3, 123, 254, 255, 11, 147, 173, 189,
3847 127, 128, 185, 186, 238, 239, 240, 248, 123, 254,
3848 128, 181, 245, 3, 103, 254, 133, 105, 101, 101,
3849 134, 126, 101, 253, 3, 3, 153, 154, 254, 254,
3850 153, 3, 133, 146, 127, 137, 3, 100, 68, 100,
3851 3, 34, 50, 232, 3, 3, 209, 260, 3, 220,
3852 225, 227, 228, 260, 260, 260, 260, 260, 260, 260,
3853 260, 260, 260, 260, 260, 260, 260, 260, 260, 260,
3854 260, 260, 260, 260, 260, 260, 260, 3, 116, 129,
3855 185, 262, 263, 260, 260, 260, 260, 260, 260, 260,
3856 260, 260, 260, 260, 260, 260, 260, 260, 245, 260,
3857 123, 125, 129, 262, 263, 134, 123, 260, 100, 125,
3858 140, 141, 142, 148, 150, 197, 199, 208, 233, 188,
3859 185, 128, 123, 244, 3, 94, 229, 230, 231, 134,
3860 116, 185, 143, 144, 134, 260, 134, 253, 258, 260,
3861 105, 243, 101, 144, 133, 243, 254, 254, 103, 3,
3862 53, 194, 53, 195, 3, 210, 211, 221, 103, 103,
3863 111, 115, 216, 228, 125, 262, 263, 90, 105, 134,
3864 126, 261, 260, 125, 262, 263, 90, 155, 254, 134,
3865 149, 133, 142, 127, 140, 245, 103, 105, 212, 231,
3866 134, 101, 133, 155, 105, 35, 116, 240, 242, 103,
3867 151, 154, 133, 100, 134, 3, 4, 123, 240, 14,
3868 196, 240, 241, 127, 243, 101, 133, 4, 220, 4,
3869 220, 217, 222, 260, 90, 116, 263, 260, 260, 126,
3870 260, 90, 263, 134, 127, 260, 140, 133, 134, 260,
3871 242, 243, 94, 231, 26, 32, 174, 176, 178, 179,
3872 65, 157, 253, 260, 256, 155, 229, 241, 127, 101,
3873 200, 151, 211, 111, 4, 110, 111, 127, 218, 223,
3874 226, 126, 263, 134, 126, 263, 33, 61, 168, 169,
3875 170, 171, 126, 133, 212, 127, 231, 127, 123, 174,
3876 176, 155, 134, 134, 198, 240, 45, 100, 191, 204,
3877 205, 206, 115, 260, 110, 226, 222, 260, 105, 133,
3878 170, 171, 237, 177, 3, 155, 243, 100, 125, 145,
3879 150, 191, 201, 202, 203, 208, 233, 3, 25, 133,
3880 206, 224, 219, 115, 222, 105, 143, 143, 143, 243,
3881 127, 149, 127, 133, 203, 232, 217, 133, 224, 143,
3882 133, 133, 134, 234, 260, 201, 3, 111, 217, 175,
3883 143, 126, 133, 123, 111, 127, 133, 229, 143, 134,
3887 #define yyerrok (yyerrstatus = 0)
3888 #define yyclearin (yychar = YYEMPTY)
3889 #define YYEMPTY (-2)
3892 #define YYACCEPT goto yyacceptlab
3893 #define YYABORT goto yyabortlab
3894 #define YYERROR goto yyerrorlab
3897 /* Like YYERROR except do call yyerror. This remains here temporarily
3898 to ease the transition to the new meaning of YYERROR, for GCC.
3899 Once GCC version 2 has supplanted version 1, this can go. */
3901 #define YYFAIL goto yyerrlab
3903 #define YYRECOVERING() (!!yyerrstatus)
3905 #define YYBACKUP(Token, Value) \
3907 if (yychar == YYEMPTY && yylen == 1) \
3911 yytoken = YYTRANSLATE (yychar); \
3917 yyerror (YY_("syntax error: cannot back up")); \
3924 #define YYERRCODE 256
3927 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
3928 If N is 0, then set CURRENT to the empty location which ends
3929 the previous symbol: RHS[0] (always defined). */
3931 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
3932 #ifndef YYLLOC_DEFAULT
3933 # define YYLLOC_DEFAULT(Current, Rhs, N) \
3937 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
3938 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
3939 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
3940 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
3944 (Current).first_line = (Current).last_line = \
3945 YYRHSLOC (Rhs, 0).last_line; \
3946 (Current).first_column = (Current).last_column = \
3947 YYRHSLOC (Rhs, 0).last_column; \
3953 /* YY_LOCATION_PRINT -- Print the location on the stream.
3954 This macro was not mandated originally: define only if we know
3955 we won't break user code: when these are the locations we know. */
3957 #ifndef YY_LOCATION_PRINT
3958 # if YYLTYPE_IS_TRIVIAL
3959 # define YY_LOCATION_PRINT(File, Loc) \
3960 fprintf (File, "%d.%d-%d.%d", \
3961 (Loc).first_line, (Loc).first_column, \
3962 (Loc).last_line, (Loc).last_column)
3964 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
3969 /* YYLEX -- calling `yylex' with the right arguments. */
3972 # define YYLEX yylex (YYLEX_PARAM)
3974 # define YYLEX yylex ()
3977 /* Enable debugging if requested. */
3981 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
3982 # define YYFPRINTF fprintf
3985 # define YYDPRINTF(Args) \
3991 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
3995 YYFPRINTF (stderr, "%s ", Title); \
3996 yy_symbol_print (stderr, \
3998 YYFPRINTF (stderr, "\n"); \
4003 /*--------------------------------.
4004 | Print this symbol on YYOUTPUT. |
4005 `--------------------------------*/
4008 #if (defined __STDC__ || defined __C99__FUNC__ \
4009 || defined __cplusplus || defined _MSC_VER)
4011 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
4014 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
4017 YYSTYPE const * const yyvaluep;
4023 if (yytype < YYNTOKENS)
4024 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
4036 /*--------------------------------.
4037 | Print this symbol on YYOUTPUT. |
4038 `--------------------------------*/
4040 #if (defined __STDC__ || defined __C99__FUNC__ \
4041 || defined __cplusplus || defined _MSC_VER)
4043 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
4046 yy_symbol_print (yyoutput, yytype, yyvaluep)
4049 YYSTYPE const * const yyvaluep;
4052 if (yytype < YYNTOKENS)
4053 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
4055 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
4057 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
4058 YYFPRINTF (yyoutput, ")");
4061 /*------------------------------------------------------------------.
4062 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
4064 `------------------------------------------------------------------*/
4066 #if (defined __STDC__ || defined __C99__FUNC__ \
4067 || defined __cplusplus || defined _MSC_VER)
4069 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
4072 yy_stack_print (yybottom, yytop)
4073 yytype_int16 *yybottom;
4074 yytype_int16 *yytop;
4077 YYFPRINTF (stderr, "Stack now");
4078 for (; yybottom <= yytop; yybottom++)
4080 int yybot = *yybottom;
4081 YYFPRINTF (stderr, " %d", yybot);
4083 YYFPRINTF (stderr, "\n");
4086 # define YY_STACK_PRINT(Bottom, Top) \
4089 yy_stack_print ((Bottom), (Top)); \
4093 /*------------------------------------------------.
4094 | Report that the YYRULE is going to be reduced. |
4095 `------------------------------------------------*/
4097 #if (defined __STDC__ || defined __C99__FUNC__ \
4098 || defined __cplusplus || defined _MSC_VER)
4100 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
4103 yy_reduce_print (yyvsp, yyrule)
4108 int yynrhs = yyr2[yyrule];
4110 unsigned long int yylno = yyrline[yyrule];
4111 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
4113 /* The symbols being reduced. */
4114 for (yyi = 0; yyi < yynrhs; yyi++)
4116 YYFPRINTF (stderr, " $%d = ", yyi + 1);
4117 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
4118 &(yyvsp[(yyi + 1) - (yynrhs)])
4120 YYFPRINTF (stderr, "\n");
4124 # define YY_REDUCE_PRINT(Rule) \
4127 yy_reduce_print (yyvsp, Rule); \
4130 /* Nonzero means print parse trace. It is left uninitialized so that
4131 multiple parsers can coexist. */
4133 #else /* !YYDEBUG */
4134 # define YYDPRINTF(Args)
4135 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
4136 # define YY_STACK_PRINT(Bottom, Top)
4137 # define YY_REDUCE_PRINT(Rule)
4138 #endif /* !YYDEBUG */
4141 /* YYINITDEPTH -- initial size of the parser's stacks. */
4143 # define YYINITDEPTH 200
4146 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
4147 if the built-in stack extension method is used).
4149 Do not make this value too large; the results are undefined if
4150 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
4151 evaluated with infinite-precision integer arithmetic. */
4154 # define YYMAXDEPTH 10000
4162 # if defined __GLIBC__ && defined _STRING_H
4163 # define yystrlen strlen
4165 /* Return the length of YYSTR. */
4166 #if (defined __STDC__ || defined __C99__FUNC__ \
4167 || defined __cplusplus || defined _MSC_VER)
4169 yystrlen (const char *yystr)
4177 for (yylen = 0; yystr[yylen]; yylen++)
4185 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
4186 # define yystpcpy stpcpy
4188 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
4190 #if (defined __STDC__ || defined __C99__FUNC__ \
4191 || defined __cplusplus || defined _MSC_VER)
4193 yystpcpy (char *yydest, const char *yysrc)
4196 yystpcpy (yydest, yysrc)
4202 const char *yys = yysrc;
4204 while ((*yyd++ = *yys++) != '\0')
4213 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
4214 quotes and backslashes, so that it's suitable for yyerror. The
4215 heuristic is that double-quoting is unnecessary unless the string
4216 contains an apostrophe, a comma, or backslash (other than
4217 backslash-backslash). YYSTR is taken from yytname. If YYRES is
4218 null, do not copy; instead, return the length of what the result
4221 yytnamerr (char *yyres, const char *yystr)
4226 char const *yyp = yystr;
4233 goto do_not_strip_quotes;
4237 goto do_not_strip_quotes;
4250 do_not_strip_quotes: ;
4254 return yystrlen (yystr);
4256 return yystpcpy (yyres, yystr) - yyres;
4260 /* Copy into YYRESULT an error message about the unexpected token
4261 YYCHAR while in state YYSTATE. Return the number of bytes copied,
4262 including the terminating null byte. If YYRESULT is null, do not
4263 copy anything; just return the number of bytes that would be
4264 copied. As a special case, return 0 if an ordinary "syntax error"
4265 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
4266 size calculation. */
4268 yysyntax_error (char *yyresult, int yystate, int yychar)
4270 int yyn = yypact[yystate];
4272 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
4276 int yytype = YYTRANSLATE (yychar);
4277 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
4278 YYSIZE_T yysize = yysize0;
4280 int yysize_overflow = 0;
4281 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
4282 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
4286 /* This is so xgettext sees the translatable formats that are
4287 constructed on the fly. */
4288 YY_("syntax error, unexpected %s");
4289 YY_("syntax error, unexpected %s, expecting %s");
4290 YY_("syntax error, unexpected %s, expecting %s or %s");
4291 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
4292 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
4296 static char const yyunexpected[] = "syntax error, unexpected %s";
4297 static char const yyexpecting[] = ", expecting %s";
4298 static char const yyor[] = " or %s";
4299 char yyformat[sizeof yyunexpected
4300 + sizeof yyexpecting - 1
4301 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
4302 * (sizeof yyor - 1))];
4303 char const *yyprefix = yyexpecting;
4305 /* Start YYX at -YYN if negative to avoid negative indexes in
4307 int yyxbegin = yyn < 0 ? -yyn : 0;
4309 /* Stay within bounds of both yycheck and yytname. */
4310 int yychecklim = YYLAST - yyn + 1;
4311 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
4314 yyarg[0] = yytname[yytype];
4315 yyfmt = yystpcpy (yyformat, yyunexpected);
4317 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
4318 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
4320 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
4324 yyformat[sizeof yyunexpected - 1] = '\0';
4327 yyarg[yycount++] = yytname[yyx];
4328 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
4329 yysize_overflow |= (yysize1 < yysize);
4331 yyfmt = yystpcpy (yyfmt, yyprefix);
4335 yyf = YY_(yyformat);
4336 yysize1 = yysize + yystrlen (yyf);
4337 yysize_overflow |= (yysize1 < yysize);
4340 if (yysize_overflow)
4341 return YYSIZE_MAXIMUM;
4345 /* Avoid sprintf, as that infringes on the user's name space.
4346 Don't have undefined behavior even if the translation
4347 produced a string with the wrong number of "%s"s. */
4348 char *yyp = yyresult;
4350 while ((*yyp = *yyf) != '\0')
4352 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
4354 yyp += yytnamerr (yyp, yyarg[yyi++]);
4367 #endif /* YYERROR_VERBOSE */
4370 /*-----------------------------------------------.
4371 | Release the memory associated to this symbol. |
4372 `-----------------------------------------------*/
4375 #if (defined __STDC__ || defined __C99__FUNC__ \
4376 || defined __cplusplus || defined _MSC_VER)
4378 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
4381 yydestruct (yymsg, yytype, yyvaluep)
4391 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
4401 /* Prevent warnings from -Wmissing-prototypes. */
4402 #ifdef YYPARSE_PARAM
4403 #if defined __STDC__ || defined __cplusplus
4404 int yyparse (void *YYPARSE_PARAM);
4408 #else /* ! YYPARSE_PARAM */
4409 #if defined __STDC__ || defined __cplusplus
4414 #endif /* ! YYPARSE_PARAM */
4417 /* The lookahead symbol. */
4420 /* The semantic value of the lookahead symbol. */
4423 /* Number of syntax errors so far. */
4428 /*-------------------------.
4429 | yyparse or yypush_parse. |
4430 `-------------------------*/
4432 #ifdef YYPARSE_PARAM
4433 #if (defined __STDC__ || defined __C99__FUNC__ \
4434 || defined __cplusplus || defined _MSC_VER)
4436 yyparse (void *YYPARSE_PARAM)
4439 yyparse (YYPARSE_PARAM)
4440 void *YYPARSE_PARAM;
4442 #else /* ! YYPARSE_PARAM */
4443 #if (defined __STDC__ || defined __C99__FUNC__ \
4444 || defined __cplusplus || defined _MSC_VER)
4457 /* Number of tokens to shift before error messages enabled. */
4460 /* The stacks and their tools:
4461 `yyss': related to states.
4462 `yyvs': related to semantic values.
4464 Refer to the stacks thru separate pointers, to allow yyoverflow
4465 to reallocate them elsewhere. */
4467 /* The state stack. */
4468 yytype_int16 yyssa[YYINITDEPTH];
4470 yytype_int16 *yyssp;
4472 /* The semantic value stack. */
4473 YYSTYPE yyvsa[YYINITDEPTH];
4477 YYSIZE_T yystacksize;
4481 /* Lookahead token as an internal (translated) token number. */
4483 /* The variables used to return semantic value and location from the
4488 /* Buffer for error messages, and its allocated size. */
4490 char *yymsg = yymsgbuf;
4491 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
4494 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
4496 /* The number of symbols on the RHS of the reduced rule.
4497 Keep to zero when no symbol should be popped. */
4503 yystacksize = YYINITDEPTH;
4505 YYDPRINTF ((stderr, "Starting parse\n"));
4510 yychar = YYEMPTY; /* Cause a token to be read. */
4512 /* Initialize stack pointers.
4513 Waste one element of value and location stack
4514 so that they stay on the same level as the state stack.
4515 The wasted elements are never initialized. */
4521 /*------------------------------------------------------------.
4522 | yynewstate -- Push a new state, which is found in yystate. |
4523 `------------------------------------------------------------*/
4525 /* In all cases, when you get here, the value and location stacks
4526 have just been pushed. So pushing a state here evens the stacks. */
4532 if (yyss + yystacksize - 1 <= yyssp)
4534 /* Get the current used size of the three stacks, in elements. */
4535 YYSIZE_T yysize = yyssp - yyss + 1;
4539 /* Give user a chance to reallocate the stack. Use copies of
4540 these so that the &'s don't force the real ones into
4542 YYSTYPE *yyvs1 = yyvs;
4543 yytype_int16 *yyss1 = yyss;
4545 /* Each stack pointer address is followed by the size of the
4546 data in use in that stack, in bytes. This used to be a
4547 conditional around just the two extra args, but that might
4548 be undefined if yyoverflow is a macro. */
4549 yyoverflow (YY_("memory exhausted"),
4550 &yyss1, yysize * sizeof (*yyssp),
4551 &yyvs1, yysize * sizeof (*yyvsp),
4557 #else /* no yyoverflow */
4558 # ifndef YYSTACK_RELOCATE
4559 goto yyexhaustedlab;
4561 /* Extend the stack our own way. */
4562 if (YYMAXDEPTH <= yystacksize)
4563 goto yyexhaustedlab;
4565 if (YYMAXDEPTH < yystacksize)
4566 yystacksize = YYMAXDEPTH;
4569 yytype_int16 *yyss1 = yyss;
4570 union yyalloc *yyptr =
4571 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
4573 goto yyexhaustedlab;
4574 YYSTACK_RELOCATE (yyss_alloc, yyss);
4575 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
4576 # undef YYSTACK_RELOCATE
4578 YYSTACK_FREE (yyss1);
4581 #endif /* no yyoverflow */
4583 yyssp = yyss + yysize - 1;
4584 yyvsp = yyvs + yysize - 1;
4586 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
4587 (unsigned long int) yystacksize));
4589 if (yyss + yystacksize - 1 <= yyssp)
4593 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
4595 if (yystate == YYFINAL)
4605 /* Do appropriate processing given the current state. Read a
4606 lookahead token if we need one and don't already have one. */
4608 /* First try to decide what to do without reference to lookahead token. */
4609 yyn = yypact[yystate];
4610 if (yyn == YYPACT_NINF)
4613 /* Not known => get a lookahead token if don't already have one. */
4615 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
4616 if (yychar == YYEMPTY)
4618 YYDPRINTF ((stderr, "Reading a token: "));
4622 if (yychar <= YYEOF)
4624 yychar = yytoken = YYEOF;
4625 YYDPRINTF ((stderr, "Now at end of input.\n"));
4629 yytoken = YYTRANSLATE (yychar);
4630 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
4633 /* If the proper action on seeing token YYTOKEN is to reduce or to
4634 detect an error, take that action. */
4636 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
4641 if (yyn == 0 || yyn == YYTABLE_NINF)
4647 /* Count tokens shifted since error; after three, turn off error
4652 /* Shift the lookahead token. */
4653 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
4655 /* Discard the shifted token. */
4664 /*-----------------------------------------------------------.
4665 | yydefault -- do the default action for the current state. |
4666 `-----------------------------------------------------------*/
4668 yyn = yydefact[yystate];
4674 /*-----------------------------.
4675 | yyreduce -- Do a reduction. |
4676 `-----------------------------*/
4678 /* yyn is the number of a rule to reduce with. */
4681 /* If YYLEN is nonzero, implement the default value of the action:
4684 Otherwise, the following line sets YYVAL to garbage.
4685 This behavior is undocumented and Bison
4686 users should not rely upon it. Assigning to YYVAL
4687 unconditionally makes the parser a bit smaller, and it avoids a
4688 GCC warning that YYVAL may be used uninitialized. */
4689 yyval = yyvsp[1-yylen];
4692 YY_REDUCE_PRINT (yyn);
4699 /* Line 1464 of skeleton.m4 */
4700 #line 2010 "parser.y"
4701 {PASS_ALWAYS as3_pass=(yyvsp[(1) - (4)].number_int);}
4710 /* Line 1464 of skeleton.m4 */
4711 #line 2022 "parser.y"
4712 {PASS_ALWAYS as3_pass=(yyvsp[(1) - (4)].number_int);}
4721 /* Line 1464 of skeleton.m4 */
4722 #line 2023 "parser.y"
4723 {PASS_ALWAYS as3_pass=(yyvsp[(2) - (4)].number_int);PASS1 as3_warning("embed command ignored");}
4732 /* Line 1464 of skeleton.m4 */
4733 #line 2026 "parser.y"
4734 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4743 /* Line 1464 of skeleton.m4 */
4744 #line 2027 "parser.y"
4745 {(yyval.code)=code_new();}
4754 /* Line 1464 of skeleton.m4 */
4755 #line 2029 "parser.y"
4757 (yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));
4767 /* Line 1464 of skeleton.m4 */
4768 #line 2032 "parser.y"
4769 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4778 /* Line 1464 of skeleton.m4 */
4779 #line 2048 "parser.y"
4780 {(yyval.code)=(yyvsp[(2) - (3)].code);}
4789 /* Line 1464 of skeleton.m4 */
4790 #line 2049 "parser.y"
4800 /* Line 1464 of skeleton.m4 */
4801 #line 2052 "parser.y"
4811 /* Line 1464 of skeleton.m4 */
4812 #line 2059 "parser.y"
4816 (yyval.code) = (yyvsp[(3) - (4)].code);
4820 as3_pass=(yyvsp[(1) - (4)].number_int);
4830 /* Line 1464 of skeleton.m4 */
4831 #line 2071 "parser.y"
4832 {(yyval.code)=(yyvsp[(1) - (2)].code);}
4841 /* Line 1464 of skeleton.m4 */
4842 #line 2072 "parser.y"
4843 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4852 /* Line 1464 of skeleton.m4 */
4853 #line 2076 "parser.y"
4855 if((yyvsp[(1) - (1)].code)) {
4857 global->init = abc_initscript(global->file);
4858 code_t**cc = &global->init->method->body->code;
4859 *cc = code_append(*cc, (yyvsp[(1) - (1)].code));
4870 /* Line 1464 of skeleton.m4 */
4871 #line 2087 "parser.y"
4874 (yyval.number_int) = as3_pass;
4885 /* Line 1464 of skeleton.m4 */
4886 #line 2095 "parser.y"
4889 (yyval.number_int)=as3_pass;
4890 char*key = concat3((yyvsp[(1) - (3)].id),"::",(yyvsp[(3) - (3)].id));
4891 if(!definitions || !dict_contains(definitions, key)) {
4904 /* Line 1464 of skeleton.m4 */
4905 #line 2122 "parser.y"
4906 {(yyval.node)=(yyvsp[(2) - (2)].node);}
4915 /* Line 1464 of skeleton.m4 */
4916 #line 2123 "parser.y"
4917 {(yyval.node)=mkdummynode();}
4926 /* Line 1464 of skeleton.m4 */
4927 #line 2125 "parser.y"
4928 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4937 /* Line 1464 of skeleton.m4 */
4938 #line 2126 "parser.y"
4939 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4948 /* Line 1464 of skeleton.m4 */
4949 #line 2128 "parser.y"
4950 {(yyval.code) = (yyvsp[(1) - (1)].code);}
4959 /* Line 1464 of skeleton.m4 */
4960 #line 2129 "parser.y"
4961 {(yyval.code) = code_append((yyvsp[(1) - (3)].code), (yyvsp[(3) - (3)].code));}
4970 /* Line 1464 of skeleton.m4 */
4971 #line 2132 "parser.y"
4974 if(variable_exists((yyvsp[(1) - (3)].id)))
4975 syntaxerror("Variable %s already defined", (yyvsp[(1) - (3)].id));
4977 new_variable(state->method, (yyvsp[(1) - (3)].id), (yyvsp[(2) - (3)].classinfo), 1, 0);
4983 if(state->method->uses_slots) {
4984 v = find_slot(state->method, (yyvsp[(1) - (3)].id));
4986 // this variable is stored in a slot
4988 v->type = (yyvsp[(2) - (3)].classinfo);
4993 v = new_variable2(state->method, (yyvsp[(1) - (3)].id), (yyvsp[(2) - (3)].classinfo), 1, 0);
4996 (yyval.code) = slot?abc_getscopeobject(0, 1):0;
4998 typedcode_t val = node_read((yyvsp[(3) - (3)].node));
4999 if(!is_subtype_of(val.t, (yyvsp[(2) - (3)].classinfo))) {
5000 syntaxerror("Can't convert %s to %s", val.t->name, (yyvsp[(2) - (3)].classinfo)->name);
5002 if((yyvsp[(2) - (3)].classinfo)) {
5003 if(val.c->prev || val.c->opcode != OPCODE_PUSHUNDEFINED) {
5004 (yyval.code) = code_append((yyval.code), val.c);
5005 (yyval.code) = converttype((yyval.code), val.t, (yyvsp[(2) - (3)].classinfo));
5008 (yyval.code) = defaultvalue((yyval.code), (yyvsp[(2) - (3)].classinfo));
5011 if(val.c->prev || val.c->opcode != OPCODE_PUSHUNDEFINED) {
5012 (yyval.code) = code_append((yyval.code), val.c);
5013 (yyval.code) = abc_coerce_a((yyval.code));
5015 // don't do anything
5017 code_free((yyval.code));
5023 (yyval.code) = abc_setslot((yyval.code), v->index);
5025 (yyval.code) = abc_setlocal((yyval.code), v->index);
5026 v->init = do_init_variable((yyvsp[(1) - (3)].id));
5037 /* Line 1464 of skeleton.m4 */
5038 #line 2192 "parser.y"
5039 {PASS12 new_state();}
5048 /* Line 1464 of skeleton.m4 */
5049 #line 2192 "parser.y"
5051 (yyval.code) = var_block((yyvsp[(2) - (2)].code), state->vars);
5062 /* Line 1464 of skeleton.m4 */
5063 #line 2196 "parser.y"
5064 {(yyval.code) = code_new();}
5073 /* Line 1464 of skeleton.m4 */
5074 #line 2197 "parser.y"
5075 {(yyval.code)=(yyvsp[(2) - (2)].code);}
5084 /* Line 1464 of skeleton.m4 */
5085 #line 2200 "parser.y"
5087 (yyval.code) = code_new();
5088 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (6)].value).c);
5089 code_t*myjmp,*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
5091 (yyval.code) = code_append((yyval.code), (yyvsp[(5) - (6)].code));
5092 if((yyvsp[(6) - (6)].code)) {
5093 myjmp = (yyval.code) = abc_jump((yyval.code), 0);
5095 myif->branch = (yyval.code) = abc_nop((yyval.code));
5096 if((yyvsp[(6) - (6)].code)) {
5097 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
5098 myjmp->branch = (yyval.code) = abc_nop((yyval.code));
5109 /* Line 1464 of skeleton.m4 */
5110 #line 2216 "parser.y"
5111 {(yyval.code)=code_new();}
5120 /* Line 1464 of skeleton.m4 */
5121 #line 2223 "parser.y"
5123 PASS1 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable(state->method, (yyvsp[(2) - (3)].id),0,1,0);
5124 PASS2 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable(state->method, (yyvsp[(2) - (3)].id),(yyvsp[(3) - (3)].classinfo),1,0);
5134 /* Line 1464 of skeleton.m4 */
5135 #line 2227 "parser.y"
5138 (yyval.id)=(yyvsp[(1) - (1)].id);
5148 /* Line 1464 of skeleton.m4 */
5149 #line 2232 "parser.y"
5150 {PASS12 new_state();(yyval.for_start).name=(yyvsp[(1) - (2)].id);(yyval.for_start).each=0;}
5159 /* Line 1464 of skeleton.m4 */
5160 #line 2233 "parser.y"
5161 {PASS12 new_state();(yyval.for_start).name=(yyvsp[(1) - (3)].id);(yyval.for_start).each=1;}
5170 /* Line 1464 of skeleton.m4 */
5171 #line 2235 "parser.y"
5173 if((yyvsp[(1) - (8)].for_start).each) syntaxerror("invalid syntax: ; not allowed in for each statement");
5174 (yyval.code) = code_new();
5175 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (8)].code));
5176 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
5177 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (8)].value).c);
5178 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
5179 (yyval.code) = code_append((yyval.code), (yyvsp[(8) - (8)].code));
5180 code_t*cont = (yyval.code) = abc_nop((yyval.code));
5181 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (8)].code));
5182 (yyval.code) = abc_jump((yyval.code), loopstart);
5183 code_t*out = (yyval.code) = abc_nop((yyval.code));
5184 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, out);
5185 continuejumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, cont);
5188 (yyval.code) = var_block((yyval.code), state->vars);
5199 /* Line 1464 of skeleton.m4 */
5200 #line 2255 "parser.y"
5202 node_t*n = resolve_identifier((yyvsp[(2) - (6)].id));
5203 typedcode_t w = node_write(n);
5205 int it = alloc_local();
5206 int array = alloc_local();
5208 (yyval.code) = code_new();
5209 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
5210 (yyval.code) = abc_coerce_a((yyval.code));
5211 (yyval.code) = abc_setlocal((yyval.code), array);
5212 (yyval.code) = abc_pushbyte((yyval.code), 0);
5213 (yyval.code) = abc_setlocal((yyval.code), it);
5215 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
5217 (yyval.code) = abc_hasnext2((yyval.code), array, it);
5218 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
5219 (yyval.code) = abc_getlocal((yyval.code), array);
5220 (yyval.code) = abc_getlocal((yyval.code), it);
5221 if(!(yyvsp[(1) - (6)].for_start).each)
5222 (yyval.code) = abc_nextname((yyval.code));
5224 (yyval.code) = abc_nextvalue((yyval.code));
5226 (yyval.code) = converttype((yyval.code), 0, w.t);
5227 (yyval.code) = code_append((yyval.code), w.c);
5229 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
5230 (yyval.code) = abc_jump((yyval.code), loopstart);
5232 code_t*out = (yyval.code) = abc_nop((yyval.code));
5233 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, out);
5234 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, loopstart);
5238 (yyval.code) = abc_kill((yyval.code), it);
5239 (yyval.code) = abc_kill((yyval.code), array);
5241 (yyval.code) = var_block((yyval.code), state->vars);
5252 /* Line 1464 of skeleton.m4 */
5253 #line 2299 "parser.y"
5256 (yyval.code) = code_new();
5258 code_t*myjmp = (yyval.code) = abc_jump((yyval.code), 0);
5259 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
5260 (yyval.code) = code_append((yyval.code), (yyvsp[(5) - (5)].code));
5261 code_t*cont = (yyval.code) = abc_nop((yyval.code));
5262 myjmp->branch = cont;
5263 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (5)].value).c);
5264 (yyval.code) = abc_iftrue((yyval.code), loopstart);
5265 code_t*out = (yyval.code) = abc_nop((yyval.code));
5266 breakjumpsto((yyval.code), (yyvsp[(1) - (5)].id), out);
5267 continuejumpsto((yyval.code), (yyvsp[(1) - (5)].id), cont);
5277 /* Line 1464 of skeleton.m4 */
5278 #line 2315 "parser.y"
5280 (yyval.code) = code_new();
5281 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
5282 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (6)].code));
5283 code_t*cont = (yyval.code) = abc_nop((yyval.code));
5284 (yyval.code) = code_append((yyval.code), (yyvsp[(5) - (6)].value).c);
5285 (yyval.code) = abc_iftrue((yyval.code), loopstart);
5286 code_t*out = (yyval.code) = abc_nop((yyval.code));
5287 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].id), out);
5288 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].id), cont);
5298 /* Line 1464 of skeleton.m4 */
5299 #line 2327 "parser.y"
5301 (yyval.code) = abc___break__(0, "");
5311 /* Line 1464 of skeleton.m4 */
5312 #line 2330 "parser.y"
5314 (yyval.code) = abc___break__(0, (yyvsp[(2) - (2)].id));
5324 /* Line 1464 of skeleton.m4 */
5325 #line 2333 "parser.y"
5327 (yyval.code) = abc___continue__(0, "");
5337 /* Line 1464 of skeleton.m4 */
5338 #line 2336 "parser.y"
5340 (yyval.code) = abc___continue__(0, (yyvsp[(2) - (2)].id));
5350 /* Line 1464 of skeleton.m4 */
5351 #line 2340 "parser.y"
5361 /* Line 1464 of skeleton.m4 */
5362 #line 2341 "parser.y"
5363 {(yyval.code)=(yyvsp[(1) - (1)].code);}
5372 /* Line 1464 of skeleton.m4 */
5373 #line 2342 "parser.y"
5374 {(yyval.code)=(yyvsp[(1) - (1)].code);}
5383 /* Line 1464 of skeleton.m4 */
5384 #line 2343 "parser.y"
5385 {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
5394 /* Line 1464 of skeleton.m4 */
5395 #line 2344 "parser.y"
5396 {(yyval.code)=(yyvsp[(1) - (1)].code);}
5405 /* Line 1464 of skeleton.m4 */
5406 #line 2345 "parser.y"
5407 {(yyval.code)=code_append((yyval.code),(yyvsp[(2) - (2)].code));}
5416 /* Line 1464 of skeleton.m4 */
5417 #line 2347 "parser.y"
5419 (yyval.code) = abc_getlocal(0, state->switch_var);
5420 (yyval.code) = code_append((yyval.code), node_read((yyvsp[(2) - (4)].node)).c);
5421 code_t*j = (yyval.code) = abc_ifne((yyval.code), 0);
5422 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (4)].code));
5423 if((yyval.code)->opcode != OPCODE___BREAK__) {
5424 (yyval.code) = abc___fallthrough__((yyval.code), "");
5426 code_t*e = (yyval.code) = abc_nop((yyval.code));
5437 /* Line 1464 of skeleton.m4 */
5438 #line 2358 "parser.y"
5440 (yyval.code) = (yyvsp[(3) - (3)].code);
5450 /* Line 1464 of skeleton.m4 */
5451 #line 2361 "parser.y"
5452 {PASS12 new_state();state->switch_var=alloc_local();}
5461 /* Line 1464 of skeleton.m4 */
5462 #line 2361 "parser.y"
5464 (yyval.code) = node_read((yyvsp[(4) - (8)].node)).c;
5465 (yyval.code) = abc_setlocal((yyval.code), state->switch_var);
5466 (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (8)].code));
5468 code_t*out = (yyval.code) = abc_kill((yyval.code), state->switch_var);
5469 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].id), out);
5471 code_t*c = (yyval.code),*lastblock=0;
5473 if(c->opcode == OPCODE_IFNE) {
5474 if(!c->next) syntaxerror("internal error in fallthrough handling");
5476 } else if(c->opcode == OPCODE___FALLTHROUGH__) {
5478 c->opcode = OPCODE_JUMP;
5479 c->branch = lastblock;
5481 /* fall through end of switch */
5482 c->opcode = OPCODE_NOP;
5488 (yyval.code) = var_block((yyval.code), state->vars);
5499 /* Line 1464 of skeleton.m4 */
5500 #line 2392 "parser.y"
5501 {PASS12 new_state();
5502 state->exception_name=(yyvsp[(3) - (5)].id);
5503 PASS1 new_variable(state->method, (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].classinfo), 0, 0);
5504 PASS2 new_variable(state->method, (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].classinfo), 0, 0);
5514 /* Line 1464 of skeleton.m4 */
5515 #line 2397 "parser.y"
5517 namespace_t name_ns = {ACCESS_PACKAGE, ""};
5518 multiname_t name = {QNAME, &name_ns, 0, (yyvsp[(3) - (9)].id)};
5520 NEW(abc_exception_t, e)
5521 e->exc_type = sig2mname((yyvsp[(4) - (9)].classinfo));
5522 e->var_name = multiname_clone(&name);
5523 (yyval.exception) = e;
5526 int i = find_variable_safe(state, (yyvsp[(3) - (9)].id))->index;
5527 e->target = c = abc_nop(0);
5528 c = abc_setlocal(c, i);
5529 c = code_append(c, code_dup(state->method->scope_code));
5530 c = code_append(c, (yyvsp[(8) - (9)].code));
5533 c = var_block(c, state->vars);
5544 /* Line 1464 of skeleton.m4 */
5545 #line 2417 "parser.y"
5546 {PASS12 new_state();state->exception_name=0;}
5555 /* Line 1464 of skeleton.m4 */
5556 #line 2417 "parser.y"
5558 (yyvsp[(4) - (5)].code) = var_block((yyvsp[(4) - (5)].code), state->vars);
5559 if(!(yyvsp[(4) - (5)].code)) {
5560 (yyval.exception)=0;
5562 NEW(abc_exception_t, e)
5563 e->exc_type = 0; //all exceptions
5564 e->var_name = 0; //no name
5567 e->to = code_append(e->to, (yyvsp[(4) - (5)].code));
5568 (yyval.exception) = e;
5580 /* Line 1464 of skeleton.m4 */
5581 #line 2433 "parser.y"
5582 {(yyval.catch_list).l=list_new();(yyval.catch_list).finally=0;list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));}
5591 /* Line 1464 of skeleton.m4 */
5592 #line 2434 "parser.y"
5593 {(yyval.catch_list)=(yyvsp[(1) - (2)].catch_list);list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));}
5602 /* Line 1464 of skeleton.m4 */
5603 #line 2435 "parser.y"
5604 {(yyval.catch_list)=(yyvsp[(1) - (1)].catch_list);}
5613 /* Line 1464 of skeleton.m4 */
5614 #line 2436 "parser.y"
5616 (yyval.catch_list) = (yyvsp[(1) - (2)].catch_list);
5617 (yyval.catch_list).finally = 0;
5618 if((yyvsp[(2) - (2)].exception)) {
5619 list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));
5620 (yyval.catch_list).finally = (yyvsp[(2) - (2)].exception)->to;(yyvsp[(2) - (2)].exception)->to=0;
5631 /* Line 1464 of skeleton.m4 */
5632 #line 2444 "parser.y"
5634 (yyval.catch_list).l=list_new();
5635 (yyval.catch_list).finally = 0;
5636 if((yyvsp[(1) - (1)].exception)) {
5637 list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));
5638 (yyval.catch_list).finally = (yyvsp[(1) - (1)].exception)->to;(yyvsp[(1) - (1)].exception)->to=0;
5649 /* Line 1464 of skeleton.m4 */
5650 #line 2453 "parser.y"
5651 {PASS12 new_state();
5652 state->method->has_exceptions=1;
5653 state->method->late_binding=1;//for invariant scope_code
5663 /* Line 1464 of skeleton.m4 */
5664 #line 2456 "parser.y"
5666 code_t*out = abc_nop(0);
5668 code_t*start = abc_nop(0);
5669 (yyval.code) = code_append(start, (yyvsp[(4) - (6)].code));
5670 if(!is_break_or_jump((yyvsp[(4) - (6)].code))) {
5671 (yyval.code) = abc_jump((yyval.code), out);
5673 code_t*end = (yyval.code) = abc_nop((yyval.code));
5676 if((yyvsp[(6) - (6)].catch_list).finally)
5677 tmp = alloc_local();
5679 abc_exception_list_t*l = (yyvsp[(6) - (6)].catch_list).l;
5682 abc_exception_t*e = l->abc_exception;
5684 (yyval.code) = code_append((yyval.code), e->target);
5685 (yyval.code) = abc_jump((yyval.code), out);
5687 parserassert((ptroff_t)(yyvsp[(6) - (6)].catch_list).finally);
5689 e->target = (yyval.code) = abc_nop((yyval.code));
5690 (yyval.code) = code_append((yyval.code), code_dup(state->method->scope_code));
5691 (yyval.code) = abc___rethrow__((yyval.code));
5699 (yyval.code) = code_append((yyval.code), out);
5701 (yyval.code) = insert_finally((yyval.code), (yyvsp[(6) - (6)].catch_list).finally, tmp);
5703 list_concat(state->method->exceptions, (yyvsp[(6) - (6)].catch_list).l);
5705 (yyval.code) = var_block((yyval.code), state->vars);
5716 /* Line 1464 of skeleton.m4 */
5717 #line 2502 "parser.y"
5719 (yyval.code)=(yyvsp[(2) - (2)].value).c;
5720 (yyval.code)=abc_throw((yyval.code));
5730 /* Line 1464 of skeleton.m4 */
5731 #line 2506 "parser.y"
5733 if(!state->exception_name)
5734 syntaxerror("re-throw only possible within a catch block");
5735 variable_t*v = find_variable(state, state->exception_name);
5736 (yyval.code)=code_new();
5737 (yyval.code)=abc_getlocal((yyval.code), v->index);
5738 (yyval.code)=abc_throw((yyval.code));
5748 /* Line 1464 of skeleton.m4 */
5749 #line 2517 "parser.y"
5752 if(state->method->has_exceptions) {
5753 int v = alloc_local();
5754 state->method->scope_code = abc_getlocal(state->method->scope_code, v);
5755 state->method->scope_code = abc_pushwith(state->method->scope_code);
5756 (yyval.value_list).number = v;
5758 (yyval.value_list).cc = (yyvsp[(3) - (4)].value).c;
5768 /* Line 1464 of skeleton.m4 */
5769 #line 2527 "parser.y"
5771 /* remove getlocal;pushwith from scope code again */
5772 state->method->scope_code = code_cutlast(code_cutlast(state->method->scope_code));
5774 (yyval.code) = (yyvsp[(1) - (2)].value_list).cc;
5775 if(state->method->has_exceptions) {
5776 (yyval.code) = abc_dup((yyval.code));
5777 (yyval.code) = abc_setlocal((yyval.code), (yyvsp[(1) - (2)].value_list).number);
5779 (yyval.code) = abc_pushwith((yyval.code));
5780 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (2)].code));
5781 (yyval.code) = abc_popscope((yyval.code));
5792 /* Line 1464 of skeleton.m4 */
5793 #line 2545 "parser.y"
5794 {PASS12 (yyval.id)="package";}
5803 /* Line 1464 of skeleton.m4 */
5804 #line 2546 "parser.y"
5805 {PASS12 (yyval.id)="namespace";}
5814 /* Line 1464 of skeleton.m4 */
5815 #line 2547 "parser.y"
5816 {PASS12 (yyval.id)="NaN";}
5825 /* Line 1464 of skeleton.m4 */
5826 #line 2549 "parser.y"
5827 {PASS12 (yyval.id) = concat3((yyvsp[(1) - (3)].id),".",(yyvsp[(3) - (3)].id));free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;}
5836 /* Line 1464 of skeleton.m4 */
5837 #line 2550 "parser.y"
5838 {PASS12 (yyval.id)=strdup((yyvsp[(1) - (1)].id));}
5847 /* Line 1464 of skeleton.m4 */
5848 #line 2552 "parser.y"
5849 {PASS12 startpackage((yyvsp[(2) - (3)].id));free((yyvsp[(2) - (3)].id));(yyvsp[(2) - (3)].id)=0;}
5858 /* Line 1464 of skeleton.m4 */
5859 #line 2553 "parser.y"
5860 {PASS12 endpackage();(yyval.code)=0;}
5869 /* Line 1464 of skeleton.m4 */
5870 #line 2554 "parser.y"
5871 {PASS12 startpackage("");}
5880 /* Line 1464 of skeleton.m4 */
5881 #line 2555 "parser.y"
5882 {PASS12 endpackage();(yyval.code)=0;}
5891 /* Line 1464 of skeleton.m4 */
5892 #line 2578 "parser.y"
5895 slotinfo_t*s = registry_find(state->package, (yyvsp[(2) - (2)].id));
5896 if(!s && as3_pass==1) {as3_schedule_class(state->package, (yyvsp[(2) - (2)].id));}
5897 state_has_imports();
5898 dict_put(state->imports, state->package, (yyvsp[(2) - (2)].id));
5909 /* Line 1464 of skeleton.m4 */
5910 #line 2586 "parser.y"
5913 slotinfo_t*s = registry_find((yyvsp[(2) - (2)].classinfo)->package, (yyvsp[(2) - (2)].classinfo)->name);
5914 if(!s && as3_pass==1) {// || !(s->flags&FLAG_BUILTIN)) {
5915 as3_schedule_class((yyvsp[(2) - (2)].classinfo)->package, (yyvsp[(2) - (2)].classinfo)->name);
5917 /*if(s && s->kind == INFOTYPE_VAR && TYPE_IS_NAMESPACE(s->type)) {
5918 trie_put(active_namespaces, (unsigned char*)$2->name, 0);
5920 state_has_imports();
5921 dict_put(state->imports, (yyvsp[(2) - (2)].classinfo)->name, (yyvsp[(2) - (2)].classinfo));
5922 import_toplevel((yyvsp[(2) - (2)].classinfo)->package);
5933 /* Line 1464 of skeleton.m4 */
5934 #line 2600 "parser.y"
5937 if(strncmp("flash.", (yyvsp[(2) - (4)].id), 6) && as3_pass==1) {
5938 as3_schedule_package((yyvsp[(2) - (4)].id));
5942 i->package = (yyvsp[(2) - (4)].id);
5943 state_has_imports();
5944 list_append(state->wildcard_imports, i);
5945 import_toplevel(i->package);
5956 /* Line 1464 of skeleton.m4 */
5957 #line 2616 "parser.y"
5958 {PASS12 (yyval.flags).flags=0;(yyval.flags).ns=0;}
5967 /* Line 1464 of skeleton.m4 */
5968 #line 2617 "parser.y"
5969 {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
5978 /* Line 1464 of skeleton.m4 */
5979 #line 2618 "parser.y"
5980 {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
5989 /* Line 1464 of skeleton.m4 */
5990 #line 2619 "parser.y"
5993 (yyval.flags).flags=(yyvsp[(1) - (2)].flags).flags|(yyvsp[(2) - (2)].flags).flags;
5994 if((yyvsp[(1) - (2)].flags).ns && (yyvsp[(2) - (2)].flags).ns) syntaxerror("only one namespace allowed in one declaration");
5995 (yyval.flags).ns=(yyvsp[(1) - (2)].flags).ns?(yyvsp[(1) - (2)].flags).ns:(yyvsp[(2) - (2)].flags).ns;
6006 /* Line 1464 of skeleton.m4 */
6007 #line 2626 "parser.y"
6008 {PASS12 (yyval.flags).flags=FLAG_PUBLIC;(yyval.flags).ns=0;}
6017 /* Line 1464 of skeleton.m4 */
6018 #line 2627 "parser.y"
6019 {PASS12 (yyval.flags).flags=FLAG_PRIVATE;(yyval.flags).ns=0;}
6028 /* Line 1464 of skeleton.m4 */
6029 #line 2628 "parser.y"
6030 {PASS12 (yyval.flags).flags=FLAG_PROTECTED;(yyval.flags).ns=0;}
6039 /* Line 1464 of skeleton.m4 */
6040 #line 2629 "parser.y"
6041 {PASS12 (yyval.flags).flags=FLAG_STATIC;(yyval.flags).ns=0;}
6050 /* Line 1464 of skeleton.m4 */
6051 #line 2630 "parser.y"
6052 {PASS12 (yyval.flags).flags=FLAG_DYNAMIC;(yyval.flags).ns=0;}
6061 /* Line 1464 of skeleton.m4 */
6062 #line 2631 "parser.y"
6063 {PASS12 (yyval.flags).flags=FLAG_FINAL;(yyval.flags).ns=0;}
6072 /* Line 1464 of skeleton.m4 */
6073 #line 2632 "parser.y"
6074 {PASS12 (yyval.flags).flags=FLAG_OVERRIDE;(yyval.flags).ns=0;}
6083 /* Line 1464 of skeleton.m4 */
6084 #line 2633 "parser.y"
6085 {PASS12 (yyval.flags).flags=FLAG_NATIVE;(yyval.flags).ns=0;}
6094 /* Line 1464 of skeleton.m4 */
6095 #line 2634 "parser.y"
6096 {PASS12 (yyval.flags).flags=FLAG_PACKAGEINTERNAL;(yyval.flags).ns=0;}
6105 /* Line 1464 of skeleton.m4 */
6106 #line 2635 "parser.y"
6107 {PASS12 (yyval.flags).flags=FLAG_NAMESPACE;
6108 (yyval.flags).ns=(yyvsp[(1) - (1)].id);
6118 /* Line 1464 of skeleton.m4 */
6119 #line 2639 "parser.y"
6120 {PASS12 (yyval.classinfo)=0;}
6129 /* Line 1464 of skeleton.m4 */
6130 #line 2640 "parser.y"
6131 {PASS12 (yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
6140 /* Line 1464 of skeleton.m4 */
6141 #line 2642 "parser.y"
6142 {PASS12 (yyval.classinfo_list)=list_new();}
6151 /* Line 1464 of skeleton.m4 */
6152 #line 2643 "parser.y"
6153 {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
6162 /* Line 1464 of skeleton.m4 */
6163 #line 2645 "parser.y"
6164 {PASS12 (yyval.classinfo_list)=list_new();}
6173 /* Line 1464 of skeleton.m4 */
6174 #line 2646 "parser.y"
6175 {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
6184 /* Line 1464 of skeleton.m4 */
6185 #line 2650 "parser.y"
6186 {PASS12 startclass(&(yyvsp[(1) - (6)].flags),(yyvsp[(3) - (6)].id),(yyvsp[(4) - (6)].classinfo),(yyvsp[(5) - (6)].classinfo_list));}
6195 /* Line 1464 of skeleton.m4 */
6196 #line 2652 "parser.y"
6197 {PASS12 endclass();(yyval.code)=0;}
6206 /* Line 1464 of skeleton.m4 */
6207 #line 2656 "parser.y"
6208 {PASS12 (yyvsp[(1) - (5)].flags).flags|=FLAG_INTERFACE;
6209 startclass(&(yyvsp[(1) - (5)].flags),(yyvsp[(3) - (5)].id),0,(yyvsp[(4) - (5)].classinfo_list));}
6218 /* Line 1464 of skeleton.m4 */
6219 #line 2659 "parser.y"
6220 {PASS12 endclass();(yyval.code)=0;}
6229 /* Line 1464 of skeleton.m4 */
6230 #line 2668 "parser.y"
6231 {PASS_ALWAYS as3_pass=(yyvsp[(1) - (4)].number_int);}
6240 /* Line 1464 of skeleton.m4 */
6241 #line 2671 "parser.y"
6242 {PASS_ALWAYS as3_pass=(yyvsp[(2) - (4)].number_int);PASS1 as3_warning("embed command ignored");}
6251 /* Line 1464 of skeleton.m4 */
6252 #line 2673 "parser.y"
6254 code_t*c = state->cls->static_init->header;
6255 c = code_append(c, (yyvsp[(1) - (1)].code));
6256 state->cls->static_init->header = c;
6266 /* Line 1464 of skeleton.m4 */
6267 #line 2684 "parser.y"
6269 syntaxerror("variable declarations not allowed in interfaces");
6279 /* Line 1464 of skeleton.m4 */
6280 #line 2687 "parser.y"
6283 (yyvsp[(1) - (8)].flags).flags |= FLAG_PUBLIC;
6284 if((yyvsp[(1) - (8)].flags).flags&(FLAG_PRIVATE|FLAG_PACKAGEINTERNAL|FLAG_PROTECTED)) {
6285 syntaxerror("invalid method modifiers: interface methods always need to be public");
6287 startfunction(&(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo));
6288 endfunction(&(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo), 0);
6289 list_deep_free((yyvsp[(6) - (8)].params).list);
6299 /* Line 1464 of skeleton.m4 */
6300 #line 2762 "parser.y"
6301 {PASS12 setslotstate(&(yyvsp[(1) - (2)].flags),(yyvsp[(2) - (2)].token));}
6310 /* Line 1464 of skeleton.m4 */
6311 #line 2762 "parser.y"
6312 {PASS12 (yyval.code)=(yyvsp[(4) - (4)].code);setslotstate(0, 0);}
6321 /* Line 1464 of skeleton.m4 */
6322 #line 2764 "parser.y"
6323 {PASS12 (yyval.code)=0;}
6332 /* Line 1464 of skeleton.m4 */
6333 #line 2765 "parser.y"
6334 {PASS12 (yyval.code)=0;}
6343 /* Line 1464 of skeleton.m4 */
6344 #line 2768 "parser.y"
6347 int flags = slotstate_flags->flags;
6348 namespace_t ns = modifiers2access(slotstate_flags);
6352 varinfo_t* info = 0;
6354 memberinfo_t*i = registry_findmember(state->cls->info, ns.name, (yyvsp[(1) - (3)].id), 1, slotstate_flags->flags&FLAG_STATIC);
6356 check_override(i, flags);
6358 info = varinfo_register_onclass(state->cls->info, ns.access, ns.name, (yyvsp[(1) - (3)].id), slotstate_flags->flags&FLAG_STATIC);
6360 slotinfo_t*i = registry_find(state->package, (yyvsp[(1) - (3)].id));
6362 syntaxerror("package %s already contains '%s'", state->package, (yyvsp[(1) - (3)].id));
6364 if(ns.name && ns.name[0]) {
6365 syntaxerror("namespaces not allowed on package-level variables");
6367 info = varinfo_register_global(ns.access, state->package, (yyvsp[(1) - (3)].id));
6370 info->type = (yyvsp[(2) - (3)].classinfo);
6371 info->flags = flags;
6373 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, info);
6377 varinfo_t*info = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
6381 trait_t*t = add_abc_slot(slotstate_flags, (yyvsp[(1) - (3)].id), &mname, &code);
6383 if((yyvsp[(2) - (3)].classinfo)) {
6384 MULTINAME(m, (yyvsp[(2) - (3)].classinfo));
6385 t->type_name = multiname_clone(&m);
6387 info->slot = t->slot_id;
6389 /* workaround for "VerifyError: Error #1053: Illegal override of ::test2 in C1"
6390 FIXME: is there a way to use slots and still don't have conflicting overrides?
6392 info->slot = t->slot_id = 0;
6394 constant_t cval = (yyvsp[(3) - (3)].node)->type->eval((yyvsp[(3) - (3)].node));
6395 if(cval.type!=CONSTANT_UNKNOWN) {
6396 /* compile time constant */
6397 t->value = malloc(sizeof(constant_t));
6398 memcpy(t->value, &cval, sizeof(constant_t));
6399 info->value = constant_clone(t->value);
6401 typedcode_t v = node_read((yyvsp[(3) - (3)].node));
6402 /* initalization code (if needed) */
6404 if(v.c && !is_pushundefined(v.c)) {
6405 c = abc_getlocal_0(c);
6406 c = code_append(c, v.c);
6407 c = converttype(c, v.t, (yyvsp[(2) - (3)].classinfo));
6409 c = abc_initproperty2(c, &mname);
6411 c = abc_setslot(c, t->slot_id);
6414 *code = code_append(*code, c);
6417 if(slotstate_varconst==KW_CONST) {
6418 t->kind= TRAIT_CONST;
6419 info->flags |= FLAG_CONST;
6433 /* Line 1464 of skeleton.m4 */
6434 #line 2851 "parser.y"
6435 {(yyval.constant)=0;}
6444 /* Line 1464 of skeleton.m4 */
6445 #line 2852 "parser.y"
6447 (yyval.constant) = malloc(sizeof(constant_t));
6448 *(yyval.constant) = node_eval((yyvsp[(2) - (2)].node));
6449 if((yyval.constant)->type == CONSTANT_UNKNOWN) {
6450 syntaxerror("can't evaluate default parameter value (needs to be a compile-time constant)");
6461 /* Line 1464 of skeleton.m4 */
6462 #line 2860 "parser.y"
6463 {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_int));}
6472 /* Line 1464 of skeleton.m4 */
6473 #line 2861 "parser.y"
6475 (yyval.constant) = constant_new_uint((yyvsp[(1) - (1)].number_uint));
6485 /* Line 1464 of skeleton.m4 */
6486 #line 2864 "parser.y"
6487 {(yyval.constant) = constant_new_float((yyvsp[(1) - (1)].number_float));}
6496 /* Line 1464 of skeleton.m4 */
6497 #line 2865 "parser.y"
6498 {(yyval.constant) = constant_new_string2((yyvsp[(1) - (1)].str).str,(yyvsp[(1) - (1)].str).len);free((char*)(yyvsp[(1) - (1)].str).str);}
6507 /* Line 1464 of skeleton.m4 */
6508 #line 2866 "parser.y"
6509 {(yyval.constant) = constant_new_true((yyvsp[(1) - (1)].token));}
6518 /* Line 1464 of skeleton.m4 */
6519 #line 2867 "parser.y"
6520 {(yyval.constant) = constant_new_false((yyvsp[(1) - (1)].token));}
6529 /* Line 1464 of skeleton.m4 */
6530 #line 2868 "parser.y"
6531 {(yyval.constant) = constant_new_null((yyvsp[(1) - (1)].token));}
6540 /* Line 1464 of skeleton.m4 */
6541 #line 2869 "parser.y"
6542 {(yyval.constant) = constant_new_undefined((yyvsp[(1) - (1)].token));}
6551 /* Line 1464 of skeleton.m4 */
6552 #line 2870 "parser.y"
6553 {(yyval.constant) = constant_new_float(__builtin_nan(""));}
6562 /* Line 1464 of skeleton.m4 */
6563 #line 2878 "parser.y"
6565 multiname_t m = {QNAME, &stdns, 0, "XML"};
6568 v.c = abc_getlex2(v.c, &m);
6569 v.c = code_append(v.c, node_read((yyvsp[(1) - (1)].node)).c);
6570 v.c = abc_construct(v.c, 1);
6572 (yyval.node) = mkcodenode(v);
6582 /* Line 1464 of skeleton.m4 */
6583 #line 2889 "parser.y"
6584 {PASS_ALWAYS if(!xml_level++) tokenizer_begin_xml();}
6593 /* Line 1464 of skeleton.m4 */
6594 #line 2890 "parser.y"
6595 {PASS_ALWAYS tokenizer_begin_xmltext();}
6604 /* Line 1464 of skeleton.m4 */
6605 #line 2891 "parser.y"
6606 {PASS_ALWAYS if(!--xml_level) tokenizer_end_xml(); else tokenizer_begin_xmltext();}
6615 /* Line 1464 of skeleton.m4 */
6616 #line 2893 "parser.y"
6617 {PASS_ALWAYS tokenizer_begin_xmltext();}
6626 /* Line 1464 of skeleton.m4 */
6627 #line 2893 "parser.y"
6629 (yyval.node) = (yyvsp[(2) - (4)].node);
6639 /* Line 1464 of skeleton.m4 */
6640 #line 2896 "parser.y"
6641 {PASS_ALWAYS tokenizer_begin_xml();}
6650 /* Line 1464 of skeleton.m4 */
6651 #line 2896 "parser.y"
6653 (yyval.node) = (yyvsp[(2) - (4)].node);
6663 /* Line 1464 of skeleton.m4 */
6664 #line 2899 "parser.y"
6665 {(yyval.node)=mkstringnode("");}
6674 /* Line 1464 of skeleton.m4 */
6675 #line 2900 "parser.y"
6677 (yyval.node) = mkaddnode((yyvsp[(1) - (2)].node),(yyvsp[(2) - (2)].node));
6687 /* Line 1464 of skeleton.m4 */
6688 #line 2903 "parser.y"
6690 char* str = string_cstr(&(yyvsp[(2) - (2)].str));
6691 (yyval.node) = mkaddnode((yyvsp[(1) - (2)].node),mkstringnode(str));
6702 /* Line 1464 of skeleton.m4 */
6703 #line 2908 "parser.y"
6705 (yyval.node) = mkaddnode((yyvsp[(1) - (2)].node), mkstringnode(">"));
6715 /* Line 1464 of skeleton.m4 */
6716 #line 2911 "parser.y"
6718 (yyval.node) = mkaddnode((yyvsp[(1) - (2)].node),(yyvsp[(2) - (2)].node));
6728 /* Line 1464 of skeleton.m4 */
6729 #line 2914 "parser.y"
6731 (yyval.node) = mkaddnode((yyvsp[(1) - (3)].node), mkaddnode((yyvsp[(2) - (3)].node),(yyvsp[(3) - (3)].node)));
6741 /* Line 1464 of skeleton.m4 */
6742 #line 2917 "parser.y"
6744 (yyval.node) = mkstringnode((yyvsp[(1) - (1)].id));
6754 /* Line 1464 of skeleton.m4 */
6755 #line 2920 "parser.y"
6757 (yyval.node) = (yyvsp[(1) - (1)].node);
6767 /* Line 1464 of skeleton.m4 */
6768 #line 2924 "parser.y"
6770 (yyval.node) = mkstringnode("");
6780 /* Line 1464 of skeleton.m4 */
6781 #line 2927 "parser.y"
6783 (yyval.node) = mkaddnode(mkstringnode(" "),(yyvsp[(1) - (1)].node));
6793 /* Line 1464 of skeleton.m4 */
6794 #line 2931 "parser.y"
6796 //$$ = allocprintf("<%s%s/>", $2, $3, $5, $8);
6797 (yyval.node) = mkaddnode(mkaddnode(mkaddnode(mkstringnode("<"),(yyvsp[(2) - (6)].node)),(yyvsp[(3) - (6)].node)),mkstringnode("/>"));
6807 /* Line 1464 of skeleton.m4 */
6808 #line 2935 "parser.y"
6810 //$$ = allocprintf("<%s%s>%s</%s>", $2, $3, $5, $8);
6811 (yyval.node) = mkaddnode(mkaddnode(mkaddnode(mkaddnode(mkaddnode(mkaddnode(mkaddnode(
6812 mkstringnode("<"),(yyvsp[(2) - (10)].node)),(yyvsp[(3) - (10)].node)),mkstringnode(">")),(yyvsp[(5) - (10)].node)),mkstringnode("</")),(yyvsp[(8) - (10)].node)),mkstringnode(">"));
6822 /* Line 1464 of skeleton.m4 */
6823 #line 2940 "parser.y"
6825 //$$ = allocprintf("<%s%s>%s%s</%s>", $2, $3, $5, $6, $9);
6826 (yyval.node) = mkaddnode(mkaddnode(mkaddnode(mkaddnode(mkaddnode(mkaddnode(mkaddnode(mkaddnode(
6827 mkstringnode("<"),(yyvsp[(2) - (11)].node)),(yyvsp[(3) - (11)].node)),mkstringnode(">")),(yyvsp[(5) - (11)].node)),(yyvsp[(6) - (11)].node)),mkstringnode("</")),(yyvsp[(9) - (11)].node)),mkstringnode(">"));
6837 /* Line 1464 of skeleton.m4 */
6838 #line 2946 "parser.y"
6840 (yyval.node) = (yyvsp[(1) - (1)].node);
6850 /* Line 1464 of skeleton.m4 */
6851 #line 2949 "parser.y"
6853 (yyval.node) = mkaddnode((yyvsp[(1) - (2)].node), mkaddnode(mkstringnode(" "),(yyvsp[(2) - (2)].node)));
6863 /* Line 1464 of skeleton.m4 */
6864 #line 2952 "parser.y"
6866 (yyval.node) = (yyvsp[(1) - (1)].node);
6876 /* Line 1464 of skeleton.m4 */
6877 #line 2955 "parser.y"
6879 char* str = string_cstr(&(yyvsp[(3) - (3)].str));
6880 (yyval.node) = mkaddnode((yyvsp[(1) - (3)].node), mkstringnode(concat2("=",str)));
6891 /* Line 1464 of skeleton.m4 */
6892 #line 2960 "parser.y"
6894 (yyval.node) = mkaddnode((yyvsp[(1) - (3)].node), mkaddnode(mkstringnode("=\""), mkaddnode((yyvsp[(3) - (3)].node), mkstringnode("\""))));
6904 /* Line 1464 of skeleton.m4 */
6905 #line 2963 "parser.y"
6907 (yyval.node) = mkaddnode(mkaddnode(mkstringnode(concat2((yyvsp[(1) - (3)].id),"=\"")), (yyvsp[(3) - (3)].node)), mkstringnode("\""));
6917 /* Line 1464 of skeleton.m4 */
6918 #line 2966 "parser.y"
6920 char* str = string_cstr(&(yyvsp[(3) - (3)].str));
6921 (yyval.node)=mkstringnode(allocprintf("%s=%s", (yyvsp[(1) - (3)].id),str));
6923 free((yyvsp[(1) - (3)].id));free((char*)(yyvsp[(3) - (3)].str).str);
6933 /* Line 1464 of skeleton.m4 */
6934 #line 2976 "parser.y"
6937 memset(&(yyval.params),0,sizeof((yyval.params)));
6947 /* Line 1464 of skeleton.m4 */
6948 #line 2980 "parser.y"
6951 (yyval.params)=(yyvsp[(1) - (1)].params);
6961 /* Line 1464 of skeleton.m4 */
6962 #line 2986 "parser.y"
6965 memset(&(yyval.params),0,sizeof((yyval.params)));
6966 (yyval.params).varargs=1;
6967 list_append((yyval.params).list, (yyvsp[(2) - (2)].param));
6977 /* Line 1464 of skeleton.m4 */
6978 #line 2992 "parser.y"
6981 (yyval.params) =(yyvsp[(1) - (4)].params);
6982 (yyval.params).varargs=1;
6983 list_append((yyval.params).list, (yyvsp[(4) - (4)].param));
6993 /* Line 1464 of skeleton.m4 */
6994 #line 3000 "parser.y"
6997 (yyval.params) = (yyvsp[(1) - (3)].params);
6998 list_append((yyval.params).list, (yyvsp[(3) - (3)].param));
7008 /* Line 1464 of skeleton.m4 */
7009 #line 3005 "parser.y"
7012 memset(&(yyval.params),0,sizeof((yyval.params)));
7013 list_append((yyval.params).list, (yyvsp[(1) - (1)].param));
7023 /* Line 1464 of skeleton.m4 */
7024 #line 3011 "parser.y"
7027 (yyval.param) = rfx_calloc(sizeof(param_t));
7028 (yyval.param)->name=(yyvsp[(1) - (4)].id);
7029 (yyval.param)->type = (yyvsp[(3) - (4)].classinfo);
7031 (yyval.param)->value = (yyvsp[(4) - (4)].constant);
7041 /* Line 1464 of skeleton.m4 */
7042 #line 3019 "parser.y"
7045 (yyval.param) = rfx_calloc(sizeof(param_t));
7046 (yyval.param)->name=(yyvsp[(1) - (2)].id);
7047 (yyval.param)->type = TYPE_ANY;
7049 (yyval.param)->value = (yyvsp[(2) - (2)].constant);
7059 /* Line 1464 of skeleton.m4 */
7060 #line 3029 "parser.y"
7061 {PASS12 (yyval.token)=0;}
7070 /* Line 1464 of skeleton.m4 */
7071 #line 3032 "parser.y"
7072 {PASS12 startfunction(&(yyvsp[(1) - (9)].flags),(yyvsp[(3) - (9)].token),(yyvsp[(4) - (9)].id),&(yyvsp[(6) - (9)].params),(yyvsp[(8) - (9)].classinfo));}
7081 /* Line 1464 of skeleton.m4 */
7082 #line 3033 "parser.y"
7085 endfunction(&(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),0,0);
7087 if(!state->method->info) syntaxerror("internal error");
7089 code_t*c = method_header(state->method);
7090 c = wrap_function(c, 0, (yyvsp[(11) - (12)].code));
7092 endfunction(&(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),(yyvsp[(8) - (12)].classinfo),c);
7094 list_deep_free((yyvsp[(6) - (12)].params).list);
7105 /* Line 1464 of skeleton.m4 */
7106 #line 3049 "parser.y"
7107 {PASS12 (yyval.id)=0;}
7116 /* Line 1464 of skeleton.m4 */
7117 #line 3051 "parser.y"
7118 {PASS12 innerfunction((yyvsp[(2) - (7)].id),&(yyvsp[(4) - (7)].params),(yyvsp[(6) - (7)].classinfo));}
7127 /* Line 1464 of skeleton.m4 */
7128 #line 3052 "parser.y"
7131 endfunction(0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),0,0);
7133 methodinfo_t*f = state->method->info;
7134 if(!f || !f->kind) syntaxerror("internal error");
7136 code_t*c = method_header(state->method);
7137 c = wrap_function(c, 0, (yyvsp[(9) - (10)].code));
7139 int index = state->method->var_index;
7140 endfunction(0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),(yyvsp[(6) - (10)].classinfo),c);
7142 (yyval.value).c = abc_getlocal(0, index);
7143 (yyval.value).t = TYPE_FUNCTION(f);
7145 PASS12 list_deep_free((yyvsp[(4) - (10)].params).list);
7155 /* Line 1464 of skeleton.m4 */
7156 #line 3074 "parser.y"
7158 PASS1 NEW(unresolvedinfo_t,c);
7159 memset(c, 0, sizeof(*c));
7160 c->kind = INFOTYPE_UNRESOLVED;
7161 c->name = (yyvsp[(1) - (1)].id);
7162 c->package = get_package_from_name((yyvsp[(1) - (1)].id));
7164 c->nsset = get_current_imports();
7165 /* make the compiler look for this class in the current directory,
7167 as3_schedule_class_noerror(state->package, (yyvsp[(1) - (1)].id));
7169 (yyval.classinfo) = (classinfo_t*)c;
7171 slotinfo_t*s = find_class((yyvsp[(1) - (1)].id));
7172 if(!s) syntaxerror("Could not find class/method %s (current package: %s)\n", (yyvsp[(1) - (1)].id), state->package);
7173 (yyval.classinfo) = (classinfo_t*)s;
7183 /* Line 1464 of skeleton.m4 */
7184 #line 3093 "parser.y"
7186 PASS1 NEW(unresolvedinfo_t,c);
7187 memset(c, 0, sizeof(*c));
7188 c->kind = INFOTYPE_UNRESOLVED;
7189 c->package = (yyvsp[(1) - (3)].id);
7190 c->name = (yyvsp[(3) - (3)].id);
7191 (yyval.classinfo) = (classinfo_t*)c;
7193 slotinfo_t*s = registry_find((yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
7194 if(!s) syntaxerror("Couldn't find class/method %s.%s\n", (yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
7195 free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;
7196 (yyval.classinfo) = (classinfo_t*)s;
7206 /* Line 1464 of skeleton.m4 */
7207 #line 3110 "parser.y"
7208 {PASS12 (yyval.classinfo_list)=list_new();list_append((yyval.classinfo_list), (yyvsp[(1) - (1)].classinfo));}
7217 /* Line 1464 of skeleton.m4 */
7218 #line 3111 "parser.y"
7219 {PASS12 (yyval.classinfo_list)=(yyvsp[(1) - (3)].classinfo_list);list_append((yyval.classinfo_list),(yyvsp[(3) - (3)].classinfo));}
7228 /* Line 1464 of skeleton.m4 */
7229 #line 3113 "parser.y"
7230 {PASS12 (yyval.classinfo)=(yyvsp[(1) - (1)].classinfo);}
7239 /* Line 1464 of skeleton.m4 */
7240 #line 3114 "parser.y"
7241 {PASS12 (yyval.classinfo)=TYPE_ANY;}
7250 /* Line 1464 of skeleton.m4 */
7251 #line 3115 "parser.y"
7252 {PASS12 (yyval.classinfo)=TYPE_VOID;}
7261 /* Line 1464 of skeleton.m4 */
7262 #line 3124 "parser.y"
7263 {PASS12 (yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
7272 /* Line 1464 of skeleton.m4 */
7273 #line 3125 "parser.y"
7274 {PASS12 (yyval.classinfo)=0;}
7283 /* Line 1464 of skeleton.m4 */
7284 #line 3129 "parser.y"
7285 {(yyval.value_list).cc=0;(yyval.value_list).number=0;}
7294 /* Line 1464 of skeleton.m4 */
7295 #line 3130 "parser.y"
7296 {(yyval.value_list)=(yyvsp[(2) - (3)].value_list);}
7305 /* Line 1464 of skeleton.m4 */
7306 #line 3132 "parser.y"
7307 {(yyval.value_list).cc=0;(yyval.value_list).number=0;}
7316 /* Line 1464 of skeleton.m4 */
7317 #line 3136 "parser.y"
7318 {(yyval.value_list).number=1;
7319 (yyval.value_list).cc = (yyvsp[(1) - (1)].value).c;
7329 /* Line 1464 of skeleton.m4 */
7330 #line 3140 "parser.y"
7331 {(yyval.value_list) = (yyvsp[(1) - (2)].value_list);}
7340 /* Line 1464 of skeleton.m4 */
7341 #line 3141 "parser.y"
7343 (yyval.value_list).number= (yyvsp[(1) - (2)].value_list).number+1;
7344 (yyval.value_list).cc = code_append((yyvsp[(1) - (2)].value_list).cc, (yyvsp[(2) - (2)].value).c);
7354 /* Line 1464 of skeleton.m4 */
7355 #line 3147 "parser.y"
7357 typedcode_t v = node_read((yyvsp[(2) - (4)].node));
7358 (yyval.value).c = v.c;
7359 if((yyval.value).c->opcode == OPCODE_COERCE_A) (yyval.value).c = code_cutlast((yyval.value).c);
7361 code_t*paramcode = (yyvsp[(4) - (4)].value_list).cc;
7362 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
7363 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
7364 (yyval.value).c = code_cutlast((yyval.value).c);
7365 (yyval.value).c = code_append((yyval.value).c, paramcode);
7366 (yyval.value).c = abc_constructprop2((yyval.value).c, name, (yyvsp[(4) - (4)].value_list).number);
7367 multiname_destroy(name);
7368 } else if(is_getlocal((yyval.value).c)) {
7369 (yyval.value).c = code_append((yyval.value).c, paramcode);
7370 (yyval.value).c = abc_construct((yyval.value).c, (yyvsp[(4) - (4)].value_list).number);
7371 } else if(TYPE_IS_CLASS(v.t) && v.t->data) {
7372 code_free((yyval.value).c);
7373 classinfo_t*c = v.t->data;
7375 (yyval.value).c = abc_findpropstrict2(0, &m);
7376 (yyval.value).c = code_append((yyval.value).c, paramcode);
7377 (yyval.value).c = abc_constructprop2((yyval.value).c, &m, (yyvsp[(4) - (4)].value_list).number);
7378 /*} else if($$.c->opcode == OPCODE_GETSLOT) {
7379 int slot = (int)(ptroff_t)$$.c->data[0];
7380 trait_t*t = traits_find_slotid(state->cls->abc->traits,slot);//FIXME
7381 multiname_t*name = t->name;
7382 $$.c = code_cutlast($$.c);
7383 $$.c = code_append($$.c, paramcode);
7384 $$.c = abc_constructprop2($$.c, name, $4.number);*/
7386 (yyval.value).c = code_append((yyval.value).c, paramcode);
7387 (yyval.value).c = abc_construct((yyval.value).c, (yyvsp[(4) - (4)].value_list).number);
7390 (yyval.value).t = TYPE_ANY;
7391 if(TYPE_IS_CLASS(v.t) && v.t->data) {
7392 (yyval.value).t = v.t->data;
7394 (yyval.value).c = abc_coerce_a((yyval.value).c);
7395 (yyval.value).t = TYPE_ANY;
7406 /* Line 1464 of skeleton.m4 */
7407 #line 3194 "parser.y"
7410 typedcode_t v = node_read((yyvsp[(1) - (4)].node));
7411 (yyval.value).c = v.c;
7412 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
7413 (yyval.value).c = code_cutlast((yyval.value).c);
7415 code_t*paramcode = (yyvsp[(3) - (4)].value_list).cc;
7417 (yyval.value).t = TYPE_ANY;
7418 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
7419 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
7420 (yyval.value).c = code_cutlast((yyval.value).c);
7421 (yyval.value).c = code_append((yyval.value).c, paramcode);
7422 (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).number);
7423 multiname_destroy(name);
7424 /* } else if($$.c->opcode == OPCODE_GETSLOT && $$.c->prev->opcode != OPCODE_GETSCOPEOBJECT) {
7425 int slot = (int)(ptroff_t)$$.c->data[0];
7426 trait_t*t = traits_find_slotid(state->cls->abc->traits,slot);
7427 if(t->kind!=TRAIT_METHOD) {
7428 //ok: flash allows to assign closures to members.
7430 multiname_t*name = t->name;
7431 $$.c = code_cutlast($$.c);
7432 $$.c = code_append($$.c, paramcode);
7433 //$$.c = abc_callmethod($$.c, t->method, len); //#1051 illegal early access binding
7434 $$.c = abc_callproperty2($$.c, name, $3.number);*/
7435 } else if((yyval.value).c->opcode == OPCODE_GETSUPER) {
7436 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
7437 (yyval.value).c = code_cutlast((yyval.value).c);
7438 (yyval.value).c = code_append((yyval.value).c, paramcode);
7439 (yyval.value).c = abc_callsuper2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).number);
7440 multiname_destroy(name);
7442 (yyval.value).c = abc_getglobalscope((yyval.value).c);
7443 (yyval.value).c = code_append((yyval.value).c, paramcode);
7444 (yyval.value).c = abc_call((yyval.value).c, (yyvsp[(3) - (4)].value_list).number);
7447 if(TYPE_IS_FUNCTION(v.t) && v.t->data) {
7448 (yyval.value).t = ((methodinfo_t*)(v.t->data))->return_type;
7449 } else if(TYPE_IS_CLASS(v.t) && v.t->data) {
7450 // calling a class is like a typecast
7451 (yyval.value).t = (classinfo_t*)v.t->data;
7453 (yyval.value).t = TYPE_ANY;
7454 (yyval.value).c = abc_coerce_a((yyval.value).c);
7465 /* Line 1464 of skeleton.m4 */
7466 #line 3244 "parser.y"
7468 if(!state->cls) syntaxerror("super() not allowed outside of a class");
7469 if(!state->method) syntaxerror("super() not allowed outside of a function");
7470 if(!state->method->is_constructor) syntaxerror("super() not allowed outside of a constructor");
7472 (yyval.value).c = code_new();
7473 (yyval.value).c = abc_getlocal_0((yyval.value).c);
7475 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value_list).cc);
7477 this is dependent on the control path, check this somewhere else
7478 if(state->method->has_super)
7479 syntaxerror("constructor may call super() only once");
7481 state->method->has_super = 1;
7483 (yyval.value).c = abc_constructsuper((yyval.value).c, (yyvsp[(3) - (4)].value_list).number);
7484 (yyval.value).c = abc_pushundefined((yyval.value).c);
7485 (yyval.value).t = TYPE_ANY;
7495 /* Line 1464 of skeleton.m4 */
7496 #line 3265 "parser.y"
7498 typedcode_t v = node_read((yyvsp[(2) - (2)].node));
7499 (yyval.value).c = v.c;
7500 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
7501 (yyval.value).c = code_cutlast((yyval.value).c);
7503 multiname_t*name = 0;
7504 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
7505 (yyval.value).c->opcode = OPCODE_DELETEPROPERTY;
7506 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
7507 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
7508 multiname_t*name = traits_find_slotid(state->cls->abc->traits,slot)->name;
7509 (yyval.value).c = code_cutlast((yyval.value).c);
7510 (yyval.value).c = abc_deleteproperty2((yyval.value).c, name);
7512 (yyval.value).c = abc_getlocal_0((yyval.value).c);
7513 MULTINAME_LATE(m, v.t?v.t->access:ACCESS_PACKAGE, "");
7514 (yyval.value).c = abc_deleteproperty2((yyval.value).c, &m);
7516 (yyval.value).t = TYPE_BOOLEAN;
7526 /* Line 1464 of skeleton.m4 */
7527 #line 3287 "parser.y"
7529 (yyval.code) = abc_returnvoid(0);
7539 /* Line 1464 of skeleton.m4 */
7540 #line 3290 "parser.y"
7542 (yyval.code) = (yyvsp[(2) - (2)].value).c;
7543 (yyval.code) = abc_returnvalue((yyval.code));
7553 /* Line 1464 of skeleton.m4 */
7554 #line 3297 "parser.y"
7556 (yyval.value) = node_read((yyvsp[(1) - (1)].node));
7566 /* Line 1464 of skeleton.m4 */
7567 #line 3300 "parser.y"
7569 (yyval.value) = node_read((yyvsp[(1) - (1)].node));
7579 /* Line 1464 of skeleton.m4 */
7580 #line 3303 "parser.y"
7582 (yyval.node) = mkmultinode(&node_comma, (yyvsp[(1) - (1)].node));
7592 /* Line 1464 of skeleton.m4 */
7593 #line 3306 "parser.y"
7595 (yyval.node) = multinode_extend((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
7605 /* Line 1464 of skeleton.m4 */
7606 #line 3309 "parser.y"
7608 (yyval.code) = node_exec((yyvsp[(1) - (1)].node));
7618 /* Line 1464 of skeleton.m4 */
7619 #line 3312 "parser.y"
7621 (yyval.code) = (yyvsp[(1) - (3)].code);
7622 (yyval.code) = code_append((yyval.code), node_exec((yyvsp[(3) - (3)].node)));
7632 /* Line 1464 of skeleton.m4 */
7633 #line 3317 "parser.y"
7634 {(yyval.value_list).cc=0;(yyval.value_list).number=0;}
7643 /* Line 1464 of skeleton.m4 */
7644 #line 3318 "parser.y"
7645 {(yyval.value_list)=(yyvsp[(1) - (1)].value_list);}
7654 /* Line 1464 of skeleton.m4 */
7655 #line 3320 "parser.y"
7656 {(yyval.code)=abc_pushstring(0,(yyvsp[(1) - (1)].id));}
7665 /* Line 1464 of skeleton.m4 */
7666 #line 3321 "parser.y"
7667 {(yyval.code)=abc_pushstring2(0,&(yyvsp[(1) - (1)].str));}
7676 /* Line 1464 of skeleton.m4 */
7677 #line 3322 "parser.y"
7678 {syntaxerror("dictionary keys must be strings");}
7687 /* Line 1464 of skeleton.m4 */
7688 #line 3323 "parser.y"
7689 {syntaxerror("dictionary keys must be strings");}
7698 /* Line 1464 of skeleton.m4 */
7699 #line 3324 "parser.y"
7700 {syntaxerror("dictionary keys must be strings");}
7709 /* Line 1464 of skeleton.m4 */
7710 #line 3326 "parser.y"
7712 (yyval.value_list).cc = 0;
7713 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(1) - (3)].code));
7714 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (3)].value).c);
7715 (yyval.value_list).number = 2;
7725 /* Line 1464 of skeleton.m4 */
7726 #line 3332 "parser.y"
7728 (yyval.value_list).cc = (yyvsp[(1) - (5)].value_list).cc;
7729 (yyval.value_list).number = (yyvsp[(1) - (5)].value_list).number+2;
7730 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (5)].code));
7731 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(5) - (5)].value).c);
7741 /* Line 1464 of skeleton.m4 */
7742 #line 3341 "parser.y"
7743 {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
7752 /* Line 1464 of skeleton.m4 */
7753 #line 3342 "parser.y"
7754 {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
7763 /* Line 1464 of skeleton.m4 */
7764 #line 3343 "parser.y"
7765 {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
7774 /* Line 1464 of skeleton.m4 */
7775 #line 3344 "parser.y"
7776 {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
7785 /* Line 1464 of skeleton.m4 */
7786 #line 3345 "parser.y"
7787 {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
7796 /* Line 1464 of skeleton.m4 */
7797 #line 3346 "parser.y"
7798 {(yyval.node) = (yyvsp[(1) - (1)].node);}
7807 /* Line 1464 of skeleton.m4 */
7808 #line 3348 "parser.y"
7810 (yyval.node) = mkconstnode((yyvsp[(1) - (1)].constant));
7820 /* Line 1464 of skeleton.m4 */
7821 #line 3352 "parser.y"
7823 (yyval.node) = (yyvsp[(1) - (1)].node);
7833 /* Line 1464 of skeleton.m4 */
7834 #line 3357 "parser.y"
7838 multiname_t m = {QNAME, &stdns, 0, "RegExp"};
7839 if(!(yyvsp[(1) - (1)].regexp).options) {
7840 v.c = abc_getlex2(v.c, &m);
7841 v.c = abc_pushstring(v.c, (yyvsp[(1) - (1)].regexp).pattern);
7842 v.c = abc_construct(v.c, 1);
7844 v.c = abc_getlex2(v.c, &m);
7845 v.c = abc_pushstring(v.c, (yyvsp[(1) - (1)].regexp).pattern);
7846 v.c = abc_pushstring(v.c, (yyvsp[(1) - (1)].regexp).options);
7847 v.c = abc_construct(v.c, 2);
7850 (yyval.node) = mkcodenode(v);
7860 /* Line 1464 of skeleton.m4 */
7861 #line 3375 "parser.y"
7864 state->method->need_arguments = 1;
7867 v.c = abc_getlocal(0, state->method->need_arguments);
7869 (yyval.node) = mkcodenode(v);
7879 /* Line 1464 of skeleton.m4 */
7880 #line 3386 "parser.y"
7884 v.c = code_append(v.c, (yyvsp[(2) - (3)].value_list).cc);
7885 v.c = abc_newarray(v.c, (yyvsp[(2) - (3)].value_list).number);
7886 v.t = registry_getarrayclass();
7887 (yyval.node) = mkcodenode(v);
7897 /* Line 1464 of skeleton.m4 */
7898 #line 3396 "parser.y"
7902 v.c = code_append(v.c, (yyvsp[(2) - (3)].value_list).cc);
7903 v.c = abc_newobject(v.c, (yyvsp[(2) - (3)].value_list).number/2);
7904 v.t = registry_getobjectclass();
7905 (yyval.node) = mkcodenode(v);
7915 /* Line 1464 of skeleton.m4 */
7916 #line 3405 "parser.y"
7917 {(yyval.node) = mknode2(&node_lt,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
7926 /* Line 1464 of skeleton.m4 */
7927 #line 3406 "parser.y"
7928 {(yyval.node) = mknode2(&node_gt,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
7937 /* Line 1464 of skeleton.m4 */
7938 #line 3407 "parser.y"
7939 {(yyval.node) = mknode2(&node_le,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
7948 /* Line 1464 of skeleton.m4 */
7949 #line 3408 "parser.y"
7950 {(yyval.node) = mknode2(&node_ge,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
7959 /* Line 1464 of skeleton.m4 */
7960 #line 3409 "parser.y"
7961 {(yyval.node) = mknode2(&node_eqeq,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
7970 /* Line 1464 of skeleton.m4 */
7971 #line 3410 "parser.y"
7972 {(yyval.node) = mknode2(&node_eqeqeq,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
7981 /* Line 1464 of skeleton.m4 */
7982 #line 3411 "parser.y"
7983 {(yyval.node) = mknode2(&node_noteqeq,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
7992 /* Line 1464 of skeleton.m4 */
7993 #line 3412 "parser.y"
7994 {(yyval.node) = mknode2(&node_noteq,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
8003 /* Line 1464 of skeleton.m4 */
8004 #line 3413 "parser.y"
8005 {(yyval.node) = mknode2(&node_oror,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
8014 /* Line 1464 of skeleton.m4 */
8015 #line 3414 "parser.y"
8016 {(yyval.node) = mknode2(&node_andand,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
8025 /* Line 1464 of skeleton.m4 */
8026 #line 3415 "parser.y"
8027 {(yyval.node) = mknode1(&node_not, (yyvsp[(2) - (2)].node));}
8036 /* Line 1464 of skeleton.m4 */
8037 #line 3416 "parser.y"
8038 {(yyval.node) = mknode1(&node_bitnot, (yyvsp[(2) - (2)].node));}
8047 /* Line 1464 of skeleton.m4 */
8048 #line 3417 "parser.y"
8049 {(yyval.node) = mknode2(&node_bitand, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8058 /* Line 1464 of skeleton.m4 */
8059 #line 3418 "parser.y"
8060 {(yyval.node) = mknode2(&node_bitxor, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8069 /* Line 1464 of skeleton.m4 */
8070 #line 3419 "parser.y"
8071 {(yyval.node) = mknode2(&node_bitor, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8080 /* Line 1464 of skeleton.m4 */
8081 #line 3420 "parser.y"
8082 {(yyval.node) = mknode2(&node_shr, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8091 /* Line 1464 of skeleton.m4 */
8092 #line 3421 "parser.y"
8093 {(yyval.node) = mknode2(&node_ushr, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8102 /* Line 1464 of skeleton.m4 */
8103 #line 3422 "parser.y"
8104 {(yyval.node) = mknode2(&node_shl, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8113 /* Line 1464 of skeleton.m4 */
8114 #line 3423 "parser.y"
8115 {(yyval.node) = mknode2(&node_div, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8124 /* Line 1464 of skeleton.m4 */
8125 #line 3424 "parser.y"
8126 {(yyval.node) = mknode2(&node_mod, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8135 /* Line 1464 of skeleton.m4 */
8136 #line 3425 "parser.y"
8137 {(yyval.node) = mknode2(&node_plus, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8146 /* Line 1464 of skeleton.m4 */
8147 #line 3426 "parser.y"
8148 {(yyval.node) = mknode2(&node_minus, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8157 /* Line 1464 of skeleton.m4 */
8158 #line 3427 "parser.y"
8159 {(yyval.node) = mknode2(&node_multiply, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8168 /* Line 1464 of skeleton.m4 */
8169 #line 3428 "parser.y"
8170 {(yyval.node) = mknode2(&node_in, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8179 /* Line 1464 of skeleton.m4 */
8180 #line 3429 "parser.y"
8181 {(yyval.node) = mknode2(&node_as, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8190 /* Line 1464 of skeleton.m4 */
8191 #line 3430 "parser.y"
8192 {(yyval.node) = mknode2(&node_instanceof, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8201 /* Line 1464 of skeleton.m4 */
8202 #line 3431 "parser.y"
8203 {(yyval.node) = mknode2(&node_is, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8212 /* Line 1464 of skeleton.m4 */
8213 #line 3432 "parser.y"
8214 {(yyval.node) = mknode1(&node_typeof, (yyvsp[(2) - (2)].node));}
8223 /* Line 1464 of skeleton.m4 */
8224 #line 3433 "parser.y"
8225 {(yyval.node) = mknode1(&node_void, (yyvsp[(2) - (2)].node));}
8234 /* Line 1464 of skeleton.m4 */
8235 #line 3434 "parser.y"
8236 { (yyval.node) = mkconstnode(constant_new_undefined());}
8245 /* Line 1464 of skeleton.m4 */
8246 #line 3435 "parser.y"
8247 { (yyval.node)=(yyvsp[(2) - (3)].node);}
8256 /* Line 1464 of skeleton.m4 */
8257 #line 3436 "parser.y"
8258 {(yyval.node) = mknode1(&node_neg, (yyvsp[(2) - (2)].node));}
8267 /* Line 1464 of skeleton.m4 */
8268 #line 3437 "parser.y"
8269 {(yyval.node) = mknode2(&node_arraylookup, (yyvsp[(1) - (4)].node),(yyvsp[(3) - (4)].node));}
8278 /* Line 1464 of skeleton.m4 */
8279 #line 3438 "parser.y"
8280 {(yyval.node) = mknode2(&node_muleq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8289 /* Line 1464 of skeleton.m4 */
8290 #line 3439 "parser.y"
8291 {(yyval.node) = mknode2(&node_modeq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8300 /* Line 1464 of skeleton.m4 */
8301 #line 3440 "parser.y"
8302 {(yyval.node) = mknode2(&node_shleq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8311 /* Line 1464 of skeleton.m4 */
8312 #line 3441 "parser.y"
8313 {(yyval.node) = mknode2(&node_shreq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8322 /* Line 1464 of skeleton.m4 */
8323 #line 3442 "parser.y"
8324 {(yyval.node) = mknode2(&node_ushreq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8333 /* Line 1464 of skeleton.m4 */
8334 #line 3443 "parser.y"
8335 { (yyval.node) = mknode2(&node_diveq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8344 /* Line 1464 of skeleton.m4 */
8345 #line 3444 "parser.y"
8346 { (yyval.node) = mknode2(&node_bitoreq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8355 /* Line 1464 of skeleton.m4 */
8356 #line 3445 "parser.y"
8357 { (yyval.node) = mknode2(&node_bitxoreq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8366 /* Line 1464 of skeleton.m4 */
8367 #line 3446 "parser.y"
8368 { (yyval.node) = mknode2(&node_bitandeq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8377 /* Line 1464 of skeleton.m4 */
8378 #line 3447 "parser.y"
8379 { (yyval.node) = mknode2(&node_pluseq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8388 /* Line 1464 of skeleton.m4 */
8389 #line 3448 "parser.y"
8390 { (yyval.node) = mknode2(&node_minuseq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8399 /* Line 1464 of skeleton.m4 */
8400 #line 3449 "parser.y"
8401 { (yyval.node) = mknode2(&node_assign, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8410 /* Line 1464 of skeleton.m4 */
8411 #line 3450 "parser.y"
8412 { (yyval.node) = mknode3(&node_tenary, (yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].node), (yyvsp[(5) - (5)].node));}
8421 /* Line 1464 of skeleton.m4 */
8422 #line 3452 "parser.y"
8423 { (yyval.node) = mknode1(&node_rplusplus, (yyvsp[(1) - (2)].node));}
8432 /* Line 1464 of skeleton.m4 */
8433 #line 3453 "parser.y"
8434 { (yyval.node) = mknode1(&node_rminusminus, (yyvsp[(1) - (2)].node));}
8443 /* Line 1464 of skeleton.m4 */
8444 #line 3454 "parser.y"
8445 {(yyval.node) = mknode1(&node_lplusplus, (yyvsp[(2) - (2)].node)); }
8454 /* Line 1464 of skeleton.m4 */
8455 #line 3455 "parser.y"
8456 {(yyval.node) = mknode1(&node_lminusminus, (yyvsp[(2) - (2)].node)); }
8465 /* Line 1464 of skeleton.m4 */
8466 #line 3458 "parser.y"
8467 { if(!state->cls->info)
8468 syntaxerror("super keyword not allowed outside a class");
8469 classinfo_t*t = state->cls->info->superclass;
8470 if(!t) t = TYPE_OBJECT;
8471 memberinfo_t*f = findmember_nsset(t, (yyvsp[(3) - (3)].id), 1, 0);
8472 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
8475 v.c = abc_getlocal_0(v.c);
8476 v.c = abc_getsuper2(v.c, &m);
8477 v.t = slotinfo_gettype((slotinfo_t*)f);
8478 (yyval.node) = mkcodenode(v);
8488 /* Line 1464 of skeleton.m4 */
8489 #line 3472 "parser.y"
8492 multiname_t m = {MULTINAMEA, 0, &nopackage_namespace_set, (yyvsp[(2) - (2)].id)};
8493 v.c = abc_getlex2(0, &m);
8495 (yyval.node) = mkcodenode(v);
8505 /* Line 1464 of skeleton.m4 */
8506 #line 3480 "parser.y"
8507 {PASS12 new_state();state->xmlfilter=1;}
8516 /* Line 1464 of skeleton.m4 */
8517 #line 3480 "parser.y"
8521 typedcode_t v = node_read((yyvsp[(1) - (6)].node));
8522 typedcode_t w = node_read((yyvsp[(5) - (6)].node));
8524 int index = alloc_local();
8525 int result = alloc_local();
8526 int tmp = alloc_local();
8527 int xml = alloc_local();
8529 c = code_append(c, v.c);
8530 c = abc_checkfilter(c);
8531 c = abc_coerce_a(c); //hasnext2 converts to *
8532 c = abc_setlocal(c, xml);
8533 multiname_t m = {QNAME, &stdns, 0, "XMLList"};
8534 c = abc_getlex2(c, &m);
8535 c = abc_construct(c, 0);
8536 c = abc_setlocal(c, result);
8537 c = abc_pushbyte(c, 0);
8538 c = abc_setlocal(c, index);
8539 code_t*jmp = c = abc_jump(c, 0);
8540 code_t*loop = c = abc_label(c);
8541 c = abc_getlocal(c, xml);
8542 c = abc_getlocal(c, index);
8543 c = abc_nextvalue(c);
8545 c = abc_setlocal(c, tmp);
8546 c = abc_pushwith(c);
8547 c = code_append(c, w.c);
8548 c = abc_popscope(c);
8549 code_t*b = c = abc_iffalse(c, 0);
8550 c = abc_getlocal(c, result);
8551 c = abc_getlocal(c, index);
8552 c = abc_getlocal(c, tmp);
8553 multiname_t m2 = {MULTINAMEL, 0, &nopackage_namespace_set, 0};
8554 c = abc_setproperty2(c, &m2);
8555 c = b->branch = jmp->branch = abc_nop(c);
8556 c = abc_kill(c, tmp);
8557 c = abc_hasnext2(c, xml, index);
8558 c = abc_iftrue(c, loop);
8559 c = abc_getlocal(c, result);
8560 c = abc_kill(c, xml);
8561 c = abc_kill(c, result);
8562 c = abc_kill(c, index);
8564 c = var_block(c, state->vars);
8569 (yyval.node) = mkcodenode(r);
8579 /* Line 1464 of skeleton.m4 */
8580 #line 3534 "parser.y"
8581 {(yyval.id)=(yyvsp[(1) - (1)].id);}
8590 /* Line 1464 of skeleton.m4 */
8591 #line 3535 "parser.y"
8601 /* Line 1464 of skeleton.m4 */
8602 #line 3537 "parser.y"
8612 /* Line 1464 of skeleton.m4 */
8613 #line 3577 "parser.y"
8615 (yyval.node) = get_descendants((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(5) - (5)].id), 0, 0);
8625 /* Line 1464 of skeleton.m4 */
8626 #line 3580 "parser.y"
8628 typedcode_t v = node_read((yyvsp[(1) - (3)].node));
8629 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(3) - (3)].id)};
8630 v.c = abc_getdescendants2(v.c, &m);
8632 (yyval.node) = mkcodenode(v);
8642 /* Line 1464 of skeleton.m4 */
8643 #line 3587 "parser.y"
8645 (yyval.node) = get_descendants((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(5) - (5)].id), 1, 0);
8655 /* Line 1464 of skeleton.m4 */
8656 #line 3590 "parser.y"
8658 typedcode_t v = node_read((yyvsp[(1) - (5)].node));
8659 typedcode_t w = node_read((yyvsp[(4) - (5)].node));
8660 multiname_t m = {MULTINAMEL, 0, &nopackage_namespace_set, 0};
8661 v.c = code_append(v.c, w.c);
8662 v.c = converttype(w.c, w.t, TYPE_STRING);
8663 v.c = abc_getproperty2(v.c, &m);
8665 (yyval.node) = mkcodenode(v);
8675 /* Line 1464 of skeleton.m4 */
8676 #line 3601 "parser.y"
8678 typedcode_t v = node_read((yyvsp[(1) - (4)].node));
8679 multiname_t m = {MULTINAMEA, 0, &nopackage_namespace_set, (yyvsp[(4) - (4)].id)};
8680 v.c = abc_getproperty2(v.c, &m);
8682 (yyval.node) = mkcodenode(v);
8692 /* Line 1464 of skeleton.m4 */
8693 #line 3609 "parser.y"
8695 (yyval.node) = get_descendants((yyvsp[(1) - (6)].node), (yyvsp[(4) - (6)].id), (yyvsp[(6) - (6)].id), 0, 1);
8705 /* Line 1464 of skeleton.m4 */
8706 #line 3613 "parser.y"
8708 typedcode_t v = node_read((yyvsp[(1) - (4)].node));
8709 multiname_t m = {MULTINAMEA, 0, &nopackage_namespace_set, (yyvsp[(4) - (4)].id)};
8710 v.c = abc_getdescendants2(v.c, &m);
8712 (yyval.node) = mkcodenode(v);
8722 /* Line 1464 of skeleton.m4 */
8723 #line 3620 "parser.y"
8725 (yyval.node) = get_descendants((yyvsp[(1) - (6)].node), (yyvsp[(4) - (6)].id), (yyvsp[(6) - (6)].id), 1, 1);
8735 /* Line 1464 of skeleton.m4 */
8736 #line 3624 "parser.y"
8738 typedcode_t v = node_read((yyvsp[(1) - (6)].node));
8739 typedcode_t w = node_read((yyvsp[(5) - (6)].node));
8740 multiname_t m = {MULTINAMELA, 0, &nopackage_namespace_set, 0};
8741 v.c = code_append(v.c, w.c);
8742 v.c = converttype(w.c, w.t, TYPE_STRING);
8743 v.c = abc_getproperty2(v.c, &m);
8745 (yyval.node) = mkcodenode(v);
8755 /* Line 1464 of skeleton.m4 */
8756 #line 3634 "parser.y"
8758 typedcode_t v = node_read((yyvsp[(1) - (6)].node));
8759 typedcode_t w = node_read((yyvsp[(5) - (6)].node));
8760 multiname_t m = {MULTINAMELA, 0, &nopackage_namespace_set, 0};
8761 v.c = code_append(v.c, w.c);
8762 v.c = converttype(w.c, w.t, TYPE_STRING);
8763 v.c = abc_getdescendants2(v.c, &m);
8765 (yyval.node) = mkcodenode(v);
8775 /* Line 1464 of skeleton.m4 */
8776 #line 3645 "parser.y"
8778 typedcode_t v1 = node_read((yyvsp[(1) - (3)].node));
8779 (yyval.value).c = v1.c;
8780 classinfo_t*t = v1.t;
8782 if(TYPE_IS_CLASS(t) && t->data) {
8786 if(TYPE_IS_XML(t) && !findmember_nsset(t, (yyvsp[(3) - (3)].id), 1, is_static)) {
8787 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(3) - (3)].id)};
8788 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
8789 (yyval.value).c = abc_coerce_a((yyval.value).c);
8790 (yyval.value).t = TYPE_XMLLIST;
8792 if(t->subtype==INFOTYPE_UNRESOLVED) {
8793 syntaxerror("syntaxerror: trying to resolve property '%s' on incomplete object '%s'", (yyvsp[(3) - (3)].id), t->name);
8795 memberinfo_t*f = findmember_nsset(t, (yyvsp[(3) - (3)].id), 1, is_static);
8797 if(f && !is_static != !(f->flags&FLAG_STATIC))
8799 if(f && f->slot && !noslot) {
8800 (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
8803 if(!TYPE_IS_XMLLIST(t)) {
8804 as3_softwarning("Access of undefined property '%s' in %s", (yyvsp[(3) - (3)].id), t->name);
8807 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
8808 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
8810 /* determine type */
8811 (yyval.value).t = slotinfo_gettype((slotinfo_t*)f);
8812 if(!(yyval.value).t)
8813 (yyval.value).c = abc_coerce_a((yyval.value).c);
8815 } else if(v1.c && v1.c->opcode == OPCODE___PUSHPACKAGE__) {
8816 string_t*package = v1.c->data[0];
8817 char*package2 = concat3(package->str, ".", (yyvsp[(3) - (3)].id));
8819 slotinfo_t*a = registry_find(package->str, (yyvsp[(3) - (3)].id));
8821 (yyval.value) = push_class(a);
8822 } else if(dict_contains(state->import_toplevel_packages, package2) ||
8823 registry_ispackage(package2)) {
8824 (yyval.value).c = v1.c;
8825 (yyval.value).c->data[0] = string_new4(package2);
8826 (yyval.value).t = 0;
8828 syntaxerror("couldn't resolve %s", package2);
8831 /* when resolving a property on an unknown type, we do know the
8832 name of the property (and don't seem to need the package), but
8833 we need to make avm2 try out all access modes */
8834 as3_softwarning("Resolving %s on unknown type", (yyvsp[(3) - (3)].id));
8835 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(3) - (3)].id)};
8836 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
8837 (yyval.value).c = abc_coerce_a((yyval.value).c);
8838 (yyval.value).t = TYPE_ANY;
8849 /* Line 1464 of skeleton.m4 */
8850 #line 3841 "parser.y"
8853 /* Queue unresolved identifiers for checking against the parent
8854 function's variables.
8855 We consider everything which is not a local variable "unresolved".
8856 This encompasses class names, members of the surrounding class
8857 etc. which is *correct* because local variables of the parent function
8861 if(!find_variable(state, (yyvsp[(1) - (1)].id))) {
8862 unknown_variable((yyvsp[(1) - (1)].id));
8863 /* let the compiler know that it might want to check the current directory/package
8864 for this identifier- maybe there's a file $1.as defining $1. */
8865 as3_schedule_class_noerror(state->package, (yyvsp[(1) - (1)].id));
8871 (yyval.node) = resolve_identifier((yyvsp[(1) - (1)].id));
8881 /* Line 1464 of skeleton.m4 */
8882 #line 3875 "parser.y"
8885 NEW(namespace_decl_t,n);
8886 n->name = (yyvsp[(2) - (2)].id);
8887 n->url = (yyvsp[(2) - (2)].id);
8888 (yyval.namespace_decl)=n;
8898 /* Line 1464 of skeleton.m4 */
8899 #line 3882 "parser.y"
8902 NEW(namespace_decl_t,n);
8903 n->name = (yyvsp[(2) - (4)].id);
8904 n->url = (yyvsp[(4) - (4)].id);
8905 (yyval.namespace_decl)=n;
8915 /* Line 1464 of skeleton.m4 */
8916 #line 3889 "parser.y"
8919 NEW(namespace_decl_t,n);
8920 n->name = (yyvsp[(2) - (4)].id);
8921 n->url = (yyvsp[(4) - (4)].str).str;
8922 (yyval.namespace_decl)=n;
8932 /* Line 1464 of skeleton.m4 */
8933 #line 3896 "parser.y"
8936 dict_put(state->namespaces, (unsigned char*)(yyvsp[(2) - (2)].namespace_decl)->name, (void*)(yyvsp[(2) - (2)].namespace_decl)->url);
8938 namespace_t access = modifiers2access(&(yyvsp[(1) - (2)].flags));
8939 varinfo_t* var = varinfo_register_global(access.access, state->package, (yyvsp[(2) - (2)].namespace_decl)->name);
8940 var->type = TYPE_NAMESPACE;
8942 ns.access = ACCESS_NAMESPACE;
8943 ns.name = (yyvsp[(2) - (2)].namespace_decl)->url;
8944 var->value = constant_new_namespace(&ns);
8947 MULTINAME(m, TYPE_NAMESPACE);
8948 trait_t*t = add_abc_slot(&(yyvsp[(1) - (2)].flags), (yyvsp[(2) - (2)].namespace_decl)->name, 0, 0);
8949 t->value = var->value;
8950 t->type_name = multiname_clone(&m);
8963 /* Line 1464 of skeleton.m4 */
8964 #line 3919 "parser.y"
8967 (yyval.code) = code_append((yyval.code), node_read((yyvsp[(4) - (4)].node)).c);
8968 (yyval.code) = abc_dxnslate((yyval.code));
8978 /* Line 1464 of skeleton.m4 */
8979 #line 3925 "parser.y"
8983 varinfo_t*s = (varinfo_t*)(yyvsp[(3) - (3)].classinfo);
8984 if(s->kind == INFOTYPE_UNRESOLVED) {
8985 s = (varinfo_t*)registry_resolve((slotinfo_t*)s);
8987 syntaxerror("Couldn't resolve namespace %s", (yyvsp[(3) - (3)].classinfo)->name);
8990 if(!s || s->kind != INFOTYPE_VAR)
8991 syntaxerror("%s.%s is not a public namespace (%d)", (yyvsp[(3) - (3)].classinfo)->package, (yyvsp[(3) - (3)].classinfo)->name, s?s->kind:-1);
8992 if(!s->value || !NS_TYPE(s->value->type))
8993 syntaxerror("%s.%s is not a namespace", (yyvsp[(3) - (3)].classinfo)->package, (yyvsp[(3) - (3)].classinfo)->name);
8995 const char*url = s->value->ns->name;
8996 dict_put(state->namespaces, (unsigned char*)(yyvsp[(3) - (3)].classinfo)->name, (void*)url);
8997 add_active_url(url);
9006 /* Line 1464 of skeleton.m4 */
9007 #line 9008 "parser.tab.c"
9010 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
9014 YY_STACK_PRINT (yyss, yyssp);
9018 /* Now `shift' the result of the reduction. Determine what state
9019 that goes to, based on the state we popped back to and the rule
9020 number reduced by. */
9024 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
9025 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
9026 yystate = yytable[yystate];
9028 yystate = yydefgoto[yyn - YYNTOKENS];
9033 /*------------------------------------.
9034 | yyerrlab -- here on detecting error |
9035 `------------------------------------*/
9037 /* If not already recovering from an error, report this error. */
9041 #if ! YYERROR_VERBOSE
9042 yyerror (YY_("syntax error"));
9045 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
9046 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
9048 YYSIZE_T yyalloc = 2 * yysize;
9049 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
9050 yyalloc = YYSTACK_ALLOC_MAXIMUM;
9051 if (yymsg != yymsgbuf)
9052 YYSTACK_FREE (yymsg);
9053 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
9055 yymsg_alloc = yyalloc;
9059 yymsg_alloc = sizeof yymsgbuf;
9063 if (0 < yysize && yysize <= yymsg_alloc)
9065 (void) yysyntax_error (yymsg, yystate, yychar);
9070 yyerror (YY_("syntax error"));
9072 goto yyexhaustedlab;
9080 if (yyerrstatus == 3)
9082 /* If just tried and failed to reuse lookahead token after an
9083 error, discard it. */
9085 if (yychar <= YYEOF)
9087 /* Return failure if at end of input. */
9088 if (yychar == YYEOF)
9093 yydestruct ("Error: discarding",
9099 /* Else will try to reuse lookahead token after shifting the error
9104 /*---------------------------------------------------.
9105 | yyerrorlab -- error raised explicitly by YYERROR. |
9106 `---------------------------------------------------*/
9109 /* Pacify compilers like GCC when the user code never invokes
9110 YYERROR and the label yyerrorlab therefore never appears in user
9112 if (/*CONSTCOND*/ 0)
9115 /* Do not reclaim the symbols of the rule which action triggered
9119 YY_STACK_PRINT (yyss, yyssp);
9124 /*-------------------------------------------------------------.
9125 | yyerrlab1 -- common code for both syntax error and YYERROR. |
9126 `-------------------------------------------------------------*/
9128 yyerrstatus = 3; /* Each real token shifted decrements this. */
9132 yyn = yypact[yystate];
9133 if (yyn != YYPACT_NINF)
9136 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
9144 /* Pop the current state because it cannot handle the error token. */
9149 yydestruct ("Error: popping",
9150 yystos[yystate], yyvsp);
9153 YY_STACK_PRINT (yyss, yyssp);
9159 /* Shift the error token. */
9160 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
9166 /*-------------------------------------.
9167 | yyacceptlab -- YYACCEPT comes here. |
9168 `-------------------------------------*/
9173 /*-----------------------------------.
9174 | yyabortlab -- YYABORT comes here. |
9175 `-----------------------------------*/
9180 #if !defined(yyoverflow) || YYERROR_VERBOSE
9181 /*-------------------------------------------------.
9182 | yyexhaustedlab -- memory exhaustion comes here. |
9183 `-------------------------------------------------*/
9185 yyerror (YY_("memory exhausted"));
9191 if (yychar != YYEMPTY)
9192 yydestruct ("Cleanup: discarding lookahead",
9194 /* Do not reclaim the symbols of the rule which action triggered
9195 this YYABORT or YYACCEPT. */
9197 YY_STACK_PRINT (yyss, yyssp);
9198 while (yyssp != yyss)
9200 yydestruct ("Cleanup: popping",
9201 yystos[*yyssp], yyvsp);
9206 YYSTACK_FREE (yyss);
9209 if (yymsg != yymsgbuf)
9210 YYSTACK_FREE (yymsg);
9212 /* Make sure YYID is used. */
9213 return YYID (yyresult);