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
188 KW_DEFAULT_XML = 318,
225 below_semicolon = 355,
226 below_assignment = 356,
229 minusminus_prefix = 359,
230 plusplus_prefix = 360,
233 above_identifier = 363,
241 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
243 /* Line 223 of skeleton.m4 */
248 /* Line 223 of skeleton.m4 */
251 enum yytokentype token;
253 classinfo_t*classinfo;
254 classinfo_list_t*classinfo_list;
256 slotinfo_list_t*slotinfo_list;
259 unsigned int number_uint;
263 //typedcode_list_t*value_list;
264 codeandnumber_t value_list;
270 for_start_t for_start;
271 abc_exception_t *exception;
274 namespace_decl_t* namespace_decl;
277 abc_exception_list_t *l;
283 /* Line 223 of skeleton.m4 */
284 #line 285 "parser.tab.c"
286 # define YYSTYPE_IS_TRIVIAL 1
287 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
288 # define YYSTYPE_IS_DECLARED 1
292 /* Copy the second part of user declarations. */
294 /* Line 273 of skeleton.m4 */
298 static int a3_error(char*s)
300 syntaxerror("%s", s);
301 return 0; //make gcc happy
304 static void parsererror(const char*file, int line, const char*f)
306 syntaxerror("internal error in %s, %s:%d", f, file, line);
309 #define parserassert(b) {if(!(b)) parsererror(__FILE__, __LINE__,__func__);}
312 static char* concat2(const char* t1, const char* t2)
316 char*text = malloc(l1+l2+1);
317 memcpy(text , t1, l1);
318 memcpy(text+l1, t2, l2);
322 static char* concat3(const char* t1, const char* t2, const char* t3)
327 char*text = malloc(l1+l2+l3+1);
328 memcpy(text , t1, l1);
329 memcpy(text+l1, t2, l2);
330 memcpy(text+l1+l2, t3, l3);
335 typedef struct _import {
338 DECLARE_LIST(import);
340 DECLARE(methodstate);
341 DECLARE_LIST(methodstate);
343 typedef struct _classstate {
349 methodstate_t*static_init;
351 //code_t*static_init;
352 parsedclass_t*dependencies;
354 char has_constructor;
357 struct _methodstate {
368 dict_t*unresolved_variables;
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 void methodstate_destroy(methodstate_t*m)
394 dict_destroy(m->unresolved_variables);
395 m->unresolved_variables = 0;
396 list_free(m->innerfunctions);m->innerfunctions=0;
399 typedef struct _state {
404 import_list_t*wildcard_imports;
405 dict_t*import_toplevel_packages;
408 namespace_list_t*active_namespace_urls;
410 char has_own_imports;
411 char new_vars; // e.g. transition between two functions
412 char xmlfilter; // are we inside a xmlobj..() filter?
415 methodstate_t*method;
422 dict_t*allvars; // also contains variables from sublevels
425 typedef struct _global {
428 parsedclass_list_t*classes;
429 abc_script_t*classinit;
431 abc_script_t*init; //package-level code
434 dict_t*file2token2info;
437 static global_t*global = 0;
438 static state_t* state = 0;
442 /* protected handling here is a big hack: we just assume the protectedns
443 is package:class. the correct approach would be to add the proper
444 namespace to all protected members in the registry, even though that
445 would slow down searching */
446 #define MEMBER_MULTINAME(m,f,n) \
450 m##_ns.access = ((slotinfo_t*)(f))->access; \
451 if(m##_ns.access == ACCESS_NAMESPACE) \
452 m##_ns.name = ((slotinfo_t*)(f))->package; \
453 else if(m##_ns.access == ACCESS_PROTECTED && (f)->parent) \
454 m##_ns.name = concat3((f)->parent->package,":",(f)->parent->name); \
459 m.namespace_set = 0; \
460 m.name = ((slotinfo_t*)(f))->name; \
462 m.type = MULTINAME; \
464 m.namespace_set = &nopackage_namespace_set; \
468 /* warning: list length of namespace set is undefined */
469 #define MULTINAME_LATE(m, access, package) \
470 namespace_t m##_ns = {access, package}; \
471 namespace_set_t m##_nsset; \
472 namespace_list_t m##_l;m##_l.next = 0; \
473 m##_nsset.namespaces = &m##_l; \
474 m##_nsset = m##_nsset; \
475 m##_l.namespace = &m##_ns; \
476 multiname_t m = {MULTINAMEL, 0, &m##_nsset, 0};
478 static namespace_t ns1 = {ACCESS_PRIVATE, ""};
479 static namespace_t ns2 = {ACCESS_PROTECTED, ""};
480 static namespace_t ns3 = {ACCESS_PACKAGEINTERNAL, ""};
481 static namespace_t stdns = {ACCESS_PACKAGE, ""};
482 static namespace_list_t nl4 = {&stdns,0};
483 static namespace_list_t nl3 = {&ns3,&nl4};
484 static namespace_list_t nl2 = {&ns2,&nl3};
485 static namespace_list_t nl1 = {&ns1,&nl2};
486 static namespace_set_t nopackage_namespace_set = {&nl1};
488 static dict_t*definitions=0;
489 void as3_set_define(const char*c)
492 definitions = dict_new();
493 if(!dict_contains(definitions,c))
494 dict_put(definitions,c,0);
497 static void new_state()
500 state_t*oldstate = state;
502 memcpy(s, state, sizeof(state_t)); //shallow copy
504 s->imports = dict_new();
506 if(!s->import_toplevel_packages) {
507 s->import_toplevel_packages = dict_new();
511 state->has_own_imports = 0;
512 state->vars = dict_new();
513 state->old = oldstate;
516 trie_remember(active_namespaces);
519 state->active_namespace_urls = list_clone(oldstate->active_namespace_urls);
522 static void state_destroy(state_t*state)
524 if(state->has_own_imports) {
525 list_free(state->wildcard_imports);
526 dict_destroy(state->imports);state->imports=0;
528 if(state->imports && (!state->old || state->old->imports!=state->imports)) {
529 dict_destroy(state->imports);state->imports=0;
532 dict_destroy(state->vars);state->vars=0;
534 if(state->new_vars && state->allvars) {
535 parserassert(!state->old || state->old->allvars != state->allvars);
536 DICT_ITERATE_DATA(state->allvars, void*, data) {
539 dict_destroy(state->allvars);
542 list_free(state->active_namespace_urls)
543 state->active_namespace_urls = 0;
548 static void old_state()
550 trie_rollback(active_namespaces);
552 if(!state || !state->old)
553 syntaxerror("invalid nesting");
554 state_t*leaving = state;
558 if(as3_pass>1 && leaving->method && leaving->method != state->method && !leaving->method->inner) {
559 methodstate_destroy(leaving->method);leaving->method=0;
561 if(as3_pass>1 && leaving->cls && leaving->cls != state->cls) {
566 state_destroy(leaving);
569 static code_t* method_header(methodstate_t*m);
570 static code_t* wrap_function(code_t*c,code_t*header, code_t*body);
571 static void function_initvars(methodstate_t*m, char has_params, params_t*params, int flags, char var0);
574 static char* internal_filename_package = 0;
575 void initialize_file(char*filename)
578 syntaxerror("invalid call to initialize_file during parsing of another file");
581 active_namespaces = trie_new();
584 state->package = internal_filename_package = strdup(filename);
585 state->allvars = dict_new();
587 global->token2info = dict_lookup(global->file2token2info,
588 current_filename // use long version
590 if(!global->token2info) {
591 global->token2info = dict_new2(&ptr_type);
592 dict_put(global->file2token2info, current_filename, global->token2info);
596 state->method = rfx_calloc(sizeof(methodstate_t));
597 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
598 state->method->late_binding = 1; // init scripts use getglobalscope, so we need a getlocal0/pushscope
600 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
601 state->method->variable_count = 0;
603 syntaxerror("internal error: skewed tokencount");
604 function_initvars(state->method, 0, 0, 0, 1);
611 if(!state || state->level!=1) {
612 syntaxerror("unexpected end of file in pass %d", as3_pass);
616 dict_del(global->file2token2info, current_filename);
617 code_t*header = method_header(state->method);
618 //if(global->init->method->body->code || global->init->traits) {
620 code_t*c = wrap_function(header, 0, global->init->method->body->code);
621 global->init->method->body->code = abc_returnvoid(c);
622 free(state->method);state->method=0;
626 //free(state->package);state->package=0; // used in registry
627 state_destroy(state);state=0;
630 void initialize_parser()
632 global = rfx_calloc(sizeof(global_t));
633 global->file = abc_file_new();
634 global->file->flags &= ~ABCFILE_LAZY;
635 global->file2token2info = dict_new();
636 global->token2info = 0;
637 global->classinit = abc_initscript(global->file);
640 void* finish_parser()
642 dict_free_all(global->file2token2info, 1, (void*)dict_destroy);
643 global->token2info=0;
645 initcode_add_classlist(global->classinit, global->classes);
650 typedef struct _variable {
656 methodstate_t*is_inner_method;
659 static variable_t* find_variable(state_t*s, const char*name)
661 if(s->method->no_variable_scoping) {
662 return dict_lookup(s->allvars, name);
667 v = dict_lookup(s->vars, name);
669 if(s->new_vars) break;
675 static variable_t* find_slot(methodstate_t*m, const char*name)
678 return dict_lookup(m->slots, name);
682 static variable_t* find_variable_safe(state_t*s, char*name)
684 variable_t* v = find_variable(s, name);
686 syntaxerror("undefined variable: %s", name);
690 static char variable_exists(char*name)
692 return dict_contains(state->vars, name);
695 static code_t*defaultvalue(code_t*c, classinfo_t*type)
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)) {
744 syntaxerror("variable %s already defined", name);
746 dict_put(state->vars, name, v);
748 if(method->no_variable_scoping &&
750 dict_contains(state->allvars, name))
752 variable_t*v = dict_lookup(state->allvars, name);
754 syntaxerror("variable %s already defined.", name);
757 dict_put(state->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->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 namespace_t modifiers2access(modifiers_t*mod)
937 if(mod->flags&FLAG_NAMESPACE) {
938 if(mod->flags&(FLAG_PRIVATE|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
939 syntaxerror("invalid combination of access levels and namespaces");
940 ns.access = ACCESS_NAMESPACE;
942 const char*url = (const char*)trie_lookup(active_namespaces, (unsigned char*)mod->ns);
944 /* shouldn't happen- the tokenizer only reports something as a namespace
945 if it was already registered */
946 trie_dump(active_namespaces);
947 syntaxerror("unknown namespace: %s", mod->ns);
950 } else if(mod->flags&FLAG_PUBLIC) {
951 if(mod->flags&(FLAG_PRIVATE|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
952 syntaxerror("invalid combination of access levels");
953 ns.access = ACCESS_PACKAGE;
954 } else if(mod->flags&FLAG_PRIVATE) {
955 if(mod->flags&(FLAG_PUBLIC|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
956 syntaxerror("invalid combination of access levels");
957 ns.access = ACCESS_PRIVATE;
958 } else if(mod->flags&FLAG_PROTECTED) {
959 if(mod->flags&(FLAG_PUBLIC|FLAG_PRIVATE|FLAG_PACKAGEINTERNAL))
960 syntaxerror("invalid combination of access levels");
961 ns.access = ACCESS_PROTECTED;
963 ns.access = ACCESS_PACKAGEINTERNAL;
967 static slotinfo_t* find_class(const char*name);
969 static memberinfo_t* findmember_nsset(classinfo_t*cls, const char*name, char recurse, char is_static)
971 return registry_findmember_nsset(cls, state->active_namespace_urls, name, recurse, is_static);
974 static void innerfunctions2vars(methodstate_t*m)
976 methodstate_list_t*l = m->innerfunctions;
978 methodstate_t*m = l->methodstate;
980 variable_t* v = new_variable2(state->method, m->info->name, TYPE_FUNCTION(m->info), 0, 0);
981 m->var_index = v->index;
983 m->slot_index = m->is_a_slot;
984 v->is_inner_method = m;
989 static void function_initvars(methodstate_t*m, char has_params, params_t*params, int flags, char var0)
994 index = new_variable(m, "this", 0, 0, 0);
995 else if(!m->is_global)
996 index = new_variable(m, (flags&FLAG_STATIC)?"class":"this", state->cls?state->cls->info:0, 0, 0);
998 index = new_variable(m, "globalscope", 0, 0, 0);
1000 DICT_ITERATE_ITEMS(state->vars, char*, name, variable_t*, v) {
1001 printf("%s %d\n", name, v->index);
1004 parserassert(!index);
1009 for(p=params->list;p;p=p->next) {
1010 variable_t*v = new_variable2(m, p->param->name, p->param->type, 0, 1);
1011 v->is_parameter = 1;
1013 if(as3_pass==2 && m->need_arguments) {
1014 /* arguments can never be used by an innerfunction (the inner functions
1015 have their own arguments var), so it's ok to not initialize this until
1016 pass 2. (We don't know whether we need it before, anyway) */
1017 variable_t*v = new_variable2(m, "arguments", TYPE_ARRAY, 0, 0);
1018 m->need_arguments = v->index;
1022 innerfunctions2vars(m);
1025 m->scope_code = add_scope_code(m->scope_code, m, 0);
1027 /* exchange unresolved identifiers with the actual objects */
1028 DICT_ITERATE_ITEMS(m->slots, char*, name, variable_t*, v) {
1029 if(v->type && v->type->kind == INFOTYPE_UNRESOLVED) {
1030 classinfo_t*type = (classinfo_t*)registry_resolve((slotinfo_t*)v->type);
1031 if(!type || type->kind != INFOTYPE_CLASS) {
1032 syntaxerror("Couldn't find class %s::%s (%s)", v->type->package, v->type->name, name);
1042 char*as3_globalclass=0;
1043 static void startclass(modifiers_t* mod, char*classname, classinfo_t*extends, classinfo_list_t*implements)
1046 syntaxerror("inner classes now allowed");
1051 classinfo_list_t*mlist=0;
1053 if(mod->flags&~(FLAG_PACKAGEINTERNAL|FLAG_PUBLIC|FLAG_FINAL|FLAG_DYNAMIC|FLAG_INTERFACE))
1054 syntaxerror("invalid modifier(s)");
1056 if((mod->flags&(FLAG_PUBLIC|FLAG_PACKAGEINTERNAL)) == (FLAG_PUBLIC|FLAG_PACKAGEINTERNAL))
1057 syntaxerror("public and internal not supported at the same time.");
1059 if((mod->flags&(FLAG_PROTECTED|FLAG_STATIC)) == (FLAG_PROTECTED|FLAG_STATIC))
1060 syntaxerror("protected and static not supported at the same time.");
1062 //if(!(mod->flags&FLAG_INTERFACE) && !extends) {
1063 if(!(mod->flags&FLAG_INTERFACE) && !extends) {
1064 // all classes extend object
1065 extends = registry_getobjectclass();
1068 /* create the class name, together with the proper attributes */
1072 if(!(mod->flags&FLAG_PUBLIC) && state->package==internal_filename_package) {
1073 access = ACCESS_PRIVATE; package = internal_filename_package;
1074 } else if(!(mod->flags&FLAG_PUBLIC) && state->package!=internal_filename_package) {
1075 access = ACCESS_PACKAGEINTERNAL; package = state->package;
1076 } else if(state->package!=internal_filename_package) {
1077 access = ACCESS_PACKAGE; package = state->package;
1079 syntaxerror("public classes only allowed inside a package");
1083 state->cls = rfx_calloc(sizeof(classstate_t));
1084 state->cls->init = rfx_calloc(sizeof(methodstate_t));
1085 state->cls->static_init = rfx_calloc(sizeof(methodstate_t));
1086 state->cls->static_init->is_static=FLAG_STATIC;
1087 /* notice: we make no effort to initialize the top variable (local0) here,
1088 even though it has special meaning. We just rely on the fact
1089 that pass 1 won't do anything with variables */
1091 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->cls);
1093 /* set current method to constructor- all code within the class-level (except
1094 static variable initializations) will be executed during construction time */
1095 state->method = state->cls->init;
1097 if(registry_find(package, classname)) {
1098 syntaxerror("Package \"%s\" already contains a class called \"%s\"", package, classname);
1100 /* build info struct */
1101 int num_interfaces = (list_length(implements));
1102 state->cls->info = classinfo_register(access, package, classname, num_interfaces);
1103 state->cls->info->flags |= mod->flags & (FLAG_DYNAMIC|FLAG_INTERFACE|FLAG_FINAL);
1104 state->cls->info->superclass = extends;
1107 classinfo_list_t*l = implements;
1108 for(l=implements;l;l=l->next) {
1109 state->cls->info->interfaces[pos++] = l->classinfo;
1114 state->cls = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1116 parserassert(state->cls && state->cls->info);
1118 state->method = state->cls->static_init;
1120 function_initvars(state->cls->init, 0, 0, 0, 1);
1121 state->cls->static_init->variable_count=1;
1122 function_initvars(state->cls->static_init, 0, 0, 0, 0);
1124 if(extends && (extends->flags & FLAG_FINAL))
1125 syntaxerror("Can't extend final class '%s'", extends->name);
1128 while(state->cls->info->interfaces[pos]) {
1129 if(!(state->cls->info->interfaces[pos]->flags & FLAG_INTERFACE))
1130 syntaxerror("'%s' is not an interface",
1131 state->cls->info->interfaces[pos]->name);
1135 /* generate the abc code for this class */
1136 MULTINAME(classname2,state->cls->info);
1137 multiname_t*extends2 = sig2mname(extends);
1139 /* don't add the class to the class index just yet- that will be done later
1141 state->cls->abc = abc_class_new(0, &classname2, extends2);
1142 state->cls->abc->file = global->file;
1144 multiname_destroy(extends2);
1145 if(state->cls->info->flags&FLAG_FINAL) abc_class_final(state->cls->abc);
1146 if(!(state->cls->info->flags&FLAG_DYNAMIC)) abc_class_sealed(state->cls->abc);
1147 if(state->cls->info->flags&FLAG_INTERFACE) {
1148 abc_class_interface(state->cls->abc);
1151 for(mlist=implements;mlist;mlist=mlist->next) {
1152 MULTINAME(m, mlist->classinfo);
1153 abc_class_add_interface(state->cls->abc, &m);
1156 state->cls->dependencies = parsedclass_new(state->cls->info, state->cls->abc);
1157 list_append(global->classes, state->cls->dependencies);
1159 /* flash.display.MovieClip handling */
1160 if(!as3_globalclass && (mod->flags&FLAG_PUBLIC) && slotinfo_equals((slotinfo_t*)registry_getMovieClip(),(slotinfo_t*)extends)) {
1161 if(state->package && state->package[0]) {
1162 as3_globalclass = concat3(state->package, ".", classname);
1164 as3_globalclass = strdup(classname);
1170 static void endclass()
1173 if(!state->cls->has_constructor && !(state->cls->info->flags&FLAG_INTERFACE)) {
1175 c = abc_getlocal_0(c);
1176 c = abc_constructsuper(c, 0);
1177 state->cls->init->header = code_append(state->cls->init->header, c);
1178 state->cls->has_constructor=1;
1180 if(state->cls->init) {
1181 if(state->cls->info->flags&FLAG_INTERFACE) {
1182 if(state->cls->init->header)
1183 syntaxerror("interface can not have class-level code");
1185 abc_method_t*m = abc_class_getconstructor(state->cls->abc, 0);
1186 code_t*c = method_header(state->cls->init);
1187 m->body->code = wrap_function(c, 0, m->body->code);
1190 if(state->cls->static_init) {
1191 abc_method_t*m = abc_class_getstaticconstructor(state->cls->abc, 0);
1192 code_t*c = method_header(state->cls->static_init);
1193 m->body->code = wrap_function(c, 0, m->body->code);
1196 trait_list_t*trait = state->cls->abc->traits;
1197 /* switch all protected members to the protected ns of this class */
1199 trait_t*t = trait->trait;
1200 if(t->name->ns->access == ACCESS_PROTECTED) {
1201 if(!state->cls->abc->protectedNS) {
1202 char*n = concat3(state->cls->info->package, ":", state->cls->info->name);
1203 state->cls->abc->protectedNS = namespace_new_protected(n);
1204 state->cls->abc->flags |= CLASS_PROTECTED_NS;
1206 t->name->ns->name = strdup(state->cls->abc->protectedNS->name);
1208 trait = trait->next;
1215 void check_code_for_break(code_t*c)
1218 if(c->opcode == OPCODE___BREAK__) {
1219 char*name = string_cstr(c->data[0]);
1220 syntaxerror("Unresolved \"break %s\"", name);
1222 if(c->opcode == OPCODE___CONTINUE__) {
1223 char*name = string_cstr(c->data[0]);
1224 syntaxerror("Unresolved \"continue %s\"", name);
1226 if(c->opcode == OPCODE___RETHROW__) {
1227 syntaxerror("Unresolved \"rethrow\"");
1229 if(c->opcode == OPCODE___FALLTHROUGH__) {
1230 syntaxerror("Unresolved \"fallthrough\"");
1232 if(c->opcode == OPCODE___PUSHPACKAGE__) {
1233 char*name = string_cstr(c->data[0]);
1234 syntaxerror("Can't reference a package (%s) as such", name);
1240 static void check_constant_against_type(classinfo_t*t, constant_t*c)
1242 #define xassert(b) if(!(b)) syntaxerror("Invalid default value %s for type '%s'", constant_tostring(c), t->name)
1243 if(TYPE_IS_NUMBER(t)) {
1244 xassert(c->type == CONSTANT_FLOAT
1245 || c->type == CONSTANT_INT
1246 || c->type == CONSTANT_UINT);
1247 } else if(TYPE_IS_UINT(t)) {
1248 xassert(c->type == CONSTANT_UINT ||
1249 (c->type == CONSTANT_INT && c->i>=0));
1250 } else if(TYPE_IS_INT(t)) {
1251 xassert(c->type == CONSTANT_INT);
1252 } else if(TYPE_IS_BOOLEAN(t)) {
1253 xassert(c->type == CONSTANT_TRUE
1254 || c->type == CONSTANT_FALSE);
1258 static void check_override(memberinfo_t*m, int flags)
1262 if(m->parent == state->cls->info && !((flags^m->flags)&FLAG_STATIC))
1263 syntaxerror("class '%s' already contains a method/slot '%s'", m->parent->name, m->name);
1265 syntaxerror("internal error: overriding method %s, which doesn't have parent", m->name);
1266 if(m->access==ACCESS_PRIVATE)
1268 if(m->flags & FLAG_FINAL)
1269 syntaxerror("can't override final member %s", m->name);
1271 /* allow this. it's no issue.
1272 if((m->flags & FLAG_STATIC) && !(flags&FLAG_STATIC))
1273 syntaxerror("can't override static member %s", m->name);*/
1275 if(!(m->flags & FLAG_STATIC) && (flags&FLAG_STATIC))
1276 syntaxerror("can't override non-static member %s with static declaration", m->name);
1278 if(!(flags&FLAG_OVERRIDE) && !(flags&FLAG_STATIC) && !(m->flags&FLAG_STATIC)) {
1279 if(m->parent && !(m->parent->flags&FLAG_INTERFACE)) {
1280 if(m->kind == INFOTYPE_METHOD)
1281 syntaxerror("can't override without explicit 'override' declaration");
1283 syntaxerror("can't override '%s'", m->name);
1288 static methodinfo_t*registerfunction(enum yytokentype getset, modifiers_t*mod, char*name, params_t*params, classinfo_t*return_type, int slot)
1290 methodinfo_t*minfo = 0;
1291 namespace_t ns = modifiers2access(mod);
1294 minfo = methodinfo_register_global(ns.access, state->package, name);
1295 minfo->return_type = return_type;
1296 } else if(getset != KW_GET && getset != KW_SET) {
1298 memberinfo_t* m = registry_findmember(state->cls->info, ns.name, name, 0, mod->flags&FLAG_STATIC);
1300 syntaxerror("class already contains a %s '%s'", infotypename((slotinfo_t*)m), m->name);
1302 minfo = methodinfo_register_onclass(state->cls->info, ns.access, ns.name, name, mod->flags&FLAG_STATIC);
1303 minfo->return_type = return_type;
1304 // getslot on a member slot only returns "undefined", so no need
1305 // to actually store these
1306 //state->minfo->slot = state->method->abc->method->trait->slot_id;
1308 //class getter/setter
1309 int gs = getset==KW_GET?SUBTYPE_GET:SUBTYPE_SET;
1311 if(getset == KW_GET) {
1313 } else if(params->list && params->list->param && !params->list->next) {
1314 type = params->list->param->type;
1316 syntaxerror("setter function needs to take exactly one argument");
1317 // not sure wether to look into superclasses here, too
1318 minfo = (methodinfo_t*)registry_findmember(state->cls->info, ns.name, name, 1, mod->flags&FLAG_STATIC);
1320 if(minfo->kind!=INFOTYPE_VAR)
1321 syntaxerror("class already contains a method called '%s'", name);
1322 if(!(minfo->subtype & (SUBTYPE_GETSET)))
1323 syntaxerror("class already contains a field called '%s'", name);
1324 if(minfo->subtype & gs)
1325 syntaxerror("getter/setter for '%s' already defined", name);
1326 /* make a setter or getter into a getset */
1327 minfo->subtype |= gs;
1330 FIXME: this check needs to be done in pass 2
1332 if((!minfo->return_type != !type) ||
1333 (minfo->return_type && type &&
1334 !strcmp(minfo->return_type->name, type->name))) {
1335 syntaxerror("different type in getter and setter: %s and %s",
1336 minfo->return_type?minfo->return_type->name:"*",
1337 type?type->name:"*");
1340 minfo = methodinfo_register_onclass(state->cls->info, ns.access, ns.name, name, mod->flags&FLAG_STATIC);
1341 minfo->kind = INFOTYPE_VAR; //hack
1342 minfo->subtype = gs;
1343 minfo->return_type = type;
1346 /* can't assign a slot as getter and setter might have different slots */
1347 //minfo->slot = slot;
1349 if(mod->flags&FLAG_FINAL) minfo->flags |= FLAG_FINAL;
1350 if(mod->flags&FLAG_STATIC) minfo->flags |= FLAG_STATIC;
1351 if(mod->flags&FLAG_OVERRIDE) minfo->flags |= FLAG_OVERRIDE;
1356 static void innerfunction(char*name, params_t*params, classinfo_t*return_type)
1358 //parserassert(state->method && state->method->info);
1360 methodstate_t*parent_method = state->method;
1364 return_type = 0; // not valid in pass 1
1366 v = new_variable2(parent_method, name, 0, 0, 0);
1371 state->new_vars = 1;
1372 state->allvars = dict_new();
1375 state->method = rfx_calloc(sizeof(methodstate_t));
1376 state->method->inner = 1;
1377 state->method->is_static = parent_method->is_static;
1378 state->method->variable_count = 0;
1379 state->method->abc = rfx_calloc(sizeof(abc_method_t));
1381 v->is_inner_method = state->method;
1384 NEW(methodinfo_t,minfo);
1385 minfo->kind = INFOTYPE_METHOD;
1386 minfo->access = ACCESS_PACKAGEINTERNAL;
1388 state->method->info = minfo;
1391 list_append(parent_method->innerfunctions, state->method);
1393 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
1395 function_initvars(state->method, 1, params, 0, 1);
1399 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1400 state->method->variable_count = 0;
1401 parserassert(state->method);
1403 state->method->info->return_type = return_type;
1404 function_initvars(state->method, 1, params, 0, 1);
1408 static void startfunction(modifiers_t*mod, enum yytokentype getset, char*name,
1409 params_t*params, classinfo_t*return_type)
1411 if(state->method && state->method->info) {
1412 syntaxerror("not able to start another method scope");
1415 state->new_vars = 1;
1416 state->allvars = dict_new();
1419 state->method = rfx_calloc(sizeof(methodstate_t));
1420 state->method->has_super = 0;
1421 state->method->is_static = mod->flags&FLAG_STATIC;
1424 state->method->is_constructor = !strcmp(state->cls->info->name,name);
1426 state->method->is_global = 1;
1427 state->method->late_binding = 1; // for global methods, always push local_0 on the scope stack
1429 if(state->method->is_constructor)
1430 name = "__as3_constructor__";
1432 state->method->info = registerfunction(getset, mod, name, params, return_type, 0);
1434 function_initvars(state->method, 1, params, mod->flags, 1);
1436 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
1440 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1441 state->method->variable_count = 0;
1442 parserassert(state->method);
1445 memberinfo_t*m = registry_findmember(state->cls->info, mod->ns, name, 2, mod->flags&FLAG_STATIC);
1446 check_override(m, mod->flags);
1450 state->cls->has_constructor |= state->method->is_constructor;
1453 function_initvars(state->method, 1, params, mod->flags, 1);
1457 static void insert_unresolved(methodstate_t*m, dict_t*xvars, dict_t*allvars)
1459 parserassert(m->inner);
1460 if(m->unresolved_variables) {
1461 dict_t*d = m->unresolved_variables;
1463 DICT_ITERATE_KEY(d, char*, id) {
1464 /* check parent method's variables */
1466 if(dict_contains(allvars, id)) {
1467 m->uses_parent_function = 1;
1468 state->method->uses_slots = 1;
1469 dict_put(xvars, id, 0);
1473 methodstate_list_t*ml = m->innerfunctions;
1475 insert_unresolved(ml->methodstate, xvars, allvars);
1480 static abc_method_t* endfunction(modifiers_t*mod, enum yytokentype getset, char*name,
1481 params_t*params, classinfo_t*return_type, code_t*body)
1484 dict_t*xvars = dict_new();
1486 if(state->method->unresolved_variables) {
1487 DICT_ITERATE_KEY(state->method->unresolved_variables, char*, vname) {
1488 if(!state->method->no_variable_scoping && dict_contains(state->allvars, vname)) {
1489 variable_t*v = dict_lookup(state->allvars, vname);
1490 if(!v->is_inner_method) {
1491 state->method->no_variable_scoping = 1;
1492 as3_warning("function %s uses forward or outer block variable references (%s): switching into compatiblity mode", name, vname);
1498 methodstate_list_t*ml = state->method->innerfunctions;
1500 insert_unresolved(ml->methodstate, xvars, state->allvars);
1504 if(state->method->uses_slots) {
1505 state->method->slots = dict_new();
1507 DICT_ITERATE_ITEMS(state->allvars, char*, name, variable_t*, v) {
1508 if(!name) syntaxerror("internal error");
1509 if(v->index && dict_contains(xvars, name)) {
1510 v->init = v->kill = 0;
1512 if(v->is_inner_method) {
1513 v->is_inner_method->is_a_slot = i;
1516 dict_put(state->method->slots, name, v);
1519 state->method->uses_slots = i;
1520 dict_destroy(state->vars);state->vars = 0;
1521 parserassert(state->new_vars);
1522 dict_destroy(state->allvars);state->allvars = 0;
1529 /*if(state->method->uses_parent_function){
1530 syntaxerror("accessing variables of parent function from inner functions not supported yet");
1535 multiname_t*type2 = sig2mname(return_type);
1537 if(state->method->inner) {
1538 f = state->method->abc;
1539 abc_method_init(f, global->file, type2, 1);
1540 } else if(state->method->is_constructor) {
1541 f = abc_class_getconstructor(state->cls->abc, type2);
1542 } else if(!state->method->is_global) {
1543 namespace_t ns = modifiers2access(mod);
1544 multiname_t mname = {QNAME, &ns, 0, name};
1545 if(mod->flags&FLAG_STATIC)
1546 f = abc_class_staticmethod(state->cls->abc, type2, &mname);
1548 f = abc_class_method(state->cls->abc, type2, &mname);
1549 slot = f->trait->slot_id;
1551 namespace_t mname_ns = {state->method->info->access, state->package};
1552 multiname_t mname = {QNAME, &mname_ns, 0, name};
1554 f = abc_method_new(global->file, type2, 1);
1555 if(!global->init) global->init = abc_initscript(global->file);
1556 trait_t*t = trait_new_method(&global->init->traits, multiname_clone(&mname), f);
1557 //abc_code_t*c = global->init->method->body->code;
1559 //flash doesn't seem to allow us to access function slots
1560 //state->method->info->slot = slot;
1562 if(mod && mod->flags&FLAG_OVERRIDE) f->trait->attributes |= TRAIT_ATTR_OVERRIDE;
1563 if(getset == KW_GET) f->trait->kind = TRAIT_GETTER;
1564 if(getset == KW_SET) f->trait->kind = TRAIT_SETTER;
1565 if(params->varargs) f->flags |= METHOD_NEED_REST;
1566 if(state->method->need_arguments) f->flags |= METHOD_NEED_ARGUMENTS;
1570 for(p=params->list;p;p=p->next) {
1571 if(params->varargs && !p->next) {
1572 break; //varargs: omit last parameter in function signature
1574 multiname_t*m = sig2mname(p->param->type);
1575 list_append(f->parameters, m);
1576 if(p->param->value) {
1577 check_constant_against_type(p->param->type, p->param->value);
1578 opt=1;list_append(f->optional_parameters, p->param->value);
1580 syntaxerror("function %s: non-optional parameter not allowed after optional parameters", name);
1583 if(state->method->slots) {
1584 DICT_ITERATE_ITEMS(state->method->slots, char*, name, variable_t*, v) {
1586 multiname_t*mname = multiname_new(namespace_new(ACCESS_PACKAGE, ""), name);
1587 multiname_t*type = sig2mname(v->type);
1588 trait_t*t = trait_new_member(&f->body->traits, type, mname, 0);
1589 t->slot_id = v->index;
1594 check_code_for_break(body);
1596 /* Seems this works now.
1597 if(state->method->exceptions && state->method->uses_slots) {
1598 as3_warning("try/catch and activation not supported yet within the same method");
1602 f->body->code = body;
1603 f->body->exceptions = state->method->exceptions;
1604 } else { //interface
1606 syntaxerror("interface methods can't have a method body");
1616 void breakjumpsto(code_t*c, char*name, code_t*jump)
1619 if(c->opcode == OPCODE___BREAK__) {
1620 string_t*name2 = c->data[0];
1621 if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1622 c->opcode = OPCODE_JUMP;
1629 void continuejumpsto(code_t*c, char*name, code_t*jump)
1632 if(c->opcode == OPCODE___CONTINUE__) {
1633 string_t*name2 = c->data[0];
1634 if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1635 c->opcode = OPCODE_JUMP;
1643 code_t*converttype(code_t*c, classinfo_t*from, classinfo_t*to)
1648 return abc_coerce_a(c);
1652 // cast an "any" type to a specific type. subject to
1653 // runtime exceptions
1654 return abc_coerce2(c, &m);
1657 if((TYPE_IS_NUMBER(from) || TYPE_IS_UINT(from) || TYPE_IS_INT(from)) &&
1658 (TYPE_IS_NUMBER(to) || TYPE_IS_UINT(to) || TYPE_IS_INT(to))) {
1659 // allow conversion between number types
1660 if(TYPE_IS_UINT(to))
1661 return abc_convert_u(c);
1662 else if(TYPE_IS_INT(to))
1663 return abc_convert_i(c);
1664 else if(TYPE_IS_NUMBER(to))
1665 return abc_convert_d(c);
1666 return abc_coerce2(c, &m);
1669 if(TYPE_IS_XMLLIST(to) && TYPE_IS_XML(from))
1672 if(TYPE_IS_BOOLEAN(to))
1673 return abc_convert_b(c);
1674 if(TYPE_IS_STRING(to))
1675 return abc_convert_s(c);
1676 if(TYPE_IS_OBJECT(to))
1677 return abc_coerce2(c, &m);
1678 if(TYPE_IS_OBJECT(from) && TYPE_IS_XMLLIST(to))
1679 return abc_coerce2(c, &m);
1680 if(TYPE_IS_OBJECT(from) && TYPE_IS_ARRAY(to))
1681 return abc_coerce2(c, &m);
1683 classinfo_t*supertype = from;
1685 if(supertype == to) {
1686 /* target type is one of from's superclasses.
1687 (not sure we need this coerce - as far as the verifier
1688 is concerned, object==object (i think) */
1689 return abc_coerce2(c, &m);
1692 while(supertype->interfaces[t]) {
1693 if(supertype->interfaces[t]==to) {
1694 // target type is one of from's interfaces
1695 return abc_coerce2(c, &m);
1699 supertype = supertype->superclass;
1701 if(TYPE_IS_FUNCTION(from) && TYPE_IS_FUNCTION(to))
1703 if(TYPE_IS_CLASS(from) && TYPE_IS_CLASS(to))
1705 if(TYPE_IS_NULL(from) && !IS_NUMBER_OR_INT(to))
1709 as3_error("can't convert type %s%s%s to %s%s%s",
1710 from->package, from->package[0]?".":"", from->name,
1711 to->package, to->package[0]?".":"", to->name);
1715 code_t* coerce_to_type(code_t*c, classinfo_t*t)
1718 return abc_coerce_a(c);
1719 } else if(TYPE_IS_STRING(t)) {
1720 return abc_coerce_s(c);
1723 return abc_coerce2(c, &m);
1727 char is_pushundefined(code_t*c)
1729 return (c && !c->prev && !c->next && c->opcode == OPCODE_PUSHUNDEFINED);
1732 static const char* get_package_from_name(const char*name)
1734 /* try explicit imports */
1735 dictentry_t* e = dict_get_slot(state->imports, name);
1737 if(!strcmp(e->key, name)) {
1738 slotinfo_t*c = (slotinfo_t*)e->data;
1739 if(c) return c->package;
1745 static namespace_list_t*get_current_imports()
1747 namespace_list_t*searchlist = 0;
1749 list_append(searchlist, namespace_new_package(state->package));
1751 import_list_t*l = state->wildcard_imports;
1753 namespace_t*ns = namespace_new_package(l->import->package);
1754 list_append(searchlist, ns);
1757 list_append(searchlist, namespace_new_package(""));
1758 list_append(searchlist, namespace_new_package(internal_filename_package));
1762 static slotinfo_t* find_class(const char*name)
1766 c = registry_find(state->package, name);
1769 /* try explicit imports */
1770 dictentry_t* e = dict_get_slot(state->imports, name);
1773 if(!strcmp(e->key, name)) {
1774 c = (slotinfo_t*)e->data;
1780 /* try package.* imports */
1781 import_list_t*l = state->wildcard_imports;
1783 //printf("does package %s contain a class %s?\n", l->import->package, name);
1784 c = registry_find(l->import->package, name);
1789 /* try global package */
1790 c = registry_find("", name);
1793 /* try local "filename" package */
1794 c = registry_find(internal_filename_package, name);
1799 typedcode_t push_class(slotinfo_t*a)
1804 if(a->access == ACCESS_PACKAGEINTERNAL &&
1805 strcmp(a->package, state->package) &&
1806 strcmp(a->package, internal_filename_package)
1808 syntaxerror("Can't access internal %s %s in package '%s' from package '%s'",
1809 infotypename(a), a->name, a->package, state->package);
1813 if(a->kind != INFOTYPE_CLASS) {
1815 x.c = abc_findpropstrict2(x.c, &m);
1816 x.c = abc_getproperty2(x.c, &m);
1817 if(a->kind == INFOTYPE_METHOD) {
1818 methodinfo_t*f = (methodinfo_t*)a;
1819 x.t = TYPE_FUNCTION(f);
1821 varinfo_t*v = (varinfo_t*)a;
1826 if(state->cls && state->method == state->cls->static_init) {
1827 /* we're in the static initializer.
1828 record the fact that we're using this class here */
1829 parsedclass_add_dependency(state->cls->dependencies, (classinfo_t*)a);
1831 classinfo_t*c = (classinfo_t*)a;
1833 if(0) { //Error #1026: Slot 1 exceeds slotCount=0 of global
1834 x.c = abc_getglobalscope(x.c);
1835 x.c = abc_getslot(x.c, c->slot);
1838 x.c = abc_getlex2(x.c, &m);
1840 x.t = TYPE_CLASS(c);
1846 char is_break_or_jump(code_t*c)
1850 if(c->opcode == OPCODE_JUMP ||
1851 c->opcode == OPCODE___BREAK__ ||
1852 c->opcode == OPCODE___CONTINUE__ ||
1853 c->opcode == OPCODE_THROW ||
1854 c->opcode == OPCODE_RETURNVOID ||
1855 c->opcode == OPCODE_RETURNVALUE) {
1861 #define IS_FINALLY_TARGET(op) \
1862 ((op) == OPCODE___CONTINUE__ || \
1863 (op) == OPCODE___BREAK__ || \
1864 (op) == OPCODE_RETURNVOID || \
1865 (op) == OPCODE_RETURNVALUE || \
1866 (op) == OPCODE___RETHROW__)
1868 static code_t* insert_finally_lookup(code_t*c, code_t*finally, int tempvar)
1870 #define NEED_EXTRA_STACK_ARG
1871 code_t*finally_label = abc_nop(0);
1872 NEW(lookupswitch_t, l);
1878 code_t*prev = i->prev;
1879 if(IS_FINALLY_TARGET(i->opcode)) {
1882 if(i->opcode == OPCODE___RETHROW__ ||
1883 i->opcode == OPCODE_RETURNVALUE) {
1884 if(i->opcode == OPCODE___RETHROW__)
1885 i->opcode = OPCODE_THROW;
1887 p = abc_coerce_a(p);
1888 p = abc_setlocal(p, tempvar);
1890 p = abc_pushbyte(p, count++);
1891 p = abc_jump(p, finally_label);
1892 code_t*target = p = abc_label(p);
1893 #ifdef NEED_EXTRA_STACK_ARG
1897 p = abc_getlocal(p, tempvar);
1900 p->next = i;i->prev = p;
1901 list_append(l->targets, target);
1907 c = abc_pushbyte(c, -1);
1908 c = code_append(c, finally_label);
1909 c = code_append(c, finally);
1911 #ifdef NEED_EXTRA_STACK_ARG
1914 c = abc_lookupswitch(c, l);
1915 c = l->def = abc_label(c);
1916 #ifdef NEED_EXTRA_STACK_ARG
1923 static code_t* insert_finally_simple(code_t*c, code_t*finally, int tempvar)
1927 code_t*prev = i->prev;
1928 if(IS_FINALLY_TARGET(i->opcode)) {
1929 if(i->opcode == OPCODE___RETHROW__)
1930 i->opcode = OPCODE_THROW;
1931 code_t*end = code_dup(finally);
1932 code_t*start = code_start(end);
1933 if(prev) prev->next = start;
1940 return code_append(c, finally);
1943 code_t* insert_finally(code_t*c, code_t*finally, int tempvar)
1949 int num_insertion_points=0;
1951 if(IS_FINALLY_TARGET(i->opcode))
1952 num_insertion_points++;
1959 if(i->branch || i->opcode == OPCODE_LOOKUPSWITCH) {
1964 int simple_version_cost = (1+num_insertion_points)*code_size;
1965 int lookup_version_cost = 4*num_insertion_points + 5;
1967 if(cantdup || simple_version_cost > lookup_version_cost) {
1968 //printf("(use lookup) simple=%d > lookup=%d\n", simple_version_cost, lookup_version_cost);
1969 return insert_finally_lookup(c, finally, tempvar);
1971 //printf("(use simple) simple=%d < lookup=%d\n", simple_version_cost, lookup_version_cost);
1972 return insert_finally_simple(c, finally, tempvar);
1976 #define PASS1 }} if(as3_pass == 1) {{
1977 #define PASS1END }} if(as3_pass == 2) {{
1978 #define PASS2 }} if(as3_pass == 2) {{
1979 #define PASS12 }} if(as3_pass == 1 || as3_pass == 2) {{
1980 #define PASS12END }} if(as3_pass == 2) {{
1981 #define PASS_ALWAYS }} {{
1985 /* Line 273 of skeleton.m4 */
1986 #line 1987 "parser.tab.c"
1987 /* Unqualified %code blocks. */
1989 /* Line 274 of skeleton.m4 */
1990 #line 2077 "parser.y"
1992 char is_subtype_of(classinfo_t*type, classinfo_t*supertype)
1996 char do_init_variable(char*name)
1998 if(!state->method->no_variable_scoping)
2000 if(!state->new_vars)
2006 /* Line 274 of skeleton.m4 */
2007 #line 2528 "parser.y"
2009 static void state_has_imports()
2011 state->wildcard_imports = list_clone(state->wildcard_imports);
2012 state->imports = dict_clone(state->imports);
2013 state->has_own_imports = 1;
2015 static void import_toplevel(const char*package)
2017 char* s = strdup(package);
2019 dict_put(state->import_toplevel_packages, s, 0);
2020 char*x = strrchr(s, '.');
2029 /* Line 274 of skeleton.m4 */
2030 #line 2667 "parser.y"
2032 static int slotstate_varconst = 0;
2033 static modifiers_t*slotstate_flags = 0;
2034 static void setslotstate(modifiers_t* flags, int varconst)
2036 slotstate_varconst = varconst;
2037 slotstate_flags = flags;
2040 if(flags->flags&FLAG_STATIC) {
2041 state->method = state->cls->static_init;
2043 state->method = state->cls->init;
2046 // reset to "default" state (all in class code is static by default) */
2047 state->method = state->cls->static_init;
2050 parserassert(state->method);
2053 static trait_t* add_abc_slot(modifiers_t* modifiers, const char*name, multiname_t*m, code_t***c)
2055 int flags = modifiers->flags;
2056 namespace_t ns = modifiers2access(modifiers);
2059 multiname_t mname = {QNAME, &ns, 0, name};
2061 trait_list_t**traits;
2065 if(!global->init) global->init = abc_initscript(global->file);
2066 ns.name = state->package;
2067 traits = &global->init->traits;
2068 code = &global->init->method->body->code;
2069 } else if(flags&FLAG_STATIC) {
2071 traits = &state->cls->abc->static_traits;
2072 code = &state->cls->static_init->header;
2074 // instance variable
2075 traits = &state->cls->abc->traits;
2076 code = &state->cls->init->header;
2078 if(ns.access == ACCESS_PROTECTED) {
2079 ns.name = concat3(state->cls->info->package,":",state->cls->info->name);
2085 *m = *multiname_clone(&mname);
2087 return trait_new_member(traits, 0, multiname_clone(&mname), 0);
2091 /* Line 274 of skeleton.m4 */
2092 #line 2847 "parser.y"
2094 static int xml_level = 0;
2097 /* Line 274 of skeleton.m4 */
2098 #line 3513 "parser.y"
2100 node_t* resolve_identifier(const char*name);
2101 node_t* get_descendants(node_t*e,const char*ns,const char*subnode,char multi, char attr)
2103 typedcode_t v = node_read(e);
2106 multiname_t m = {0,0,0,subnode};
2107 namespace_t zero = {ZERONAMESPACE,"*"};
2108 if(!strcmp(ns,"*")) {
2110 m.type = attr?QNAMEA:QNAME;
2112 typedcode_t w = node_read(resolve_identifier(ns));
2113 if(!TYPE_IS_NAMESPACE(w.t)) {
2114 as3_softwarning("%s might not be a namespace", ns);
2116 v.c = code_append(v.c, w.c);
2117 v.c = converttype(v.c, w.t, TYPE_NAMESPACE);
2118 m.type = attr?RTQNAMEA:RTQNAME;
2122 v.c = abc_getproperty2(v.c, &m);
2124 v.c = abc_getdescendants2(v.c, &m);
2127 if(TYPE_IS_XML(v.t)) {
2130 v.c = abc_coerce_a(v.c);
2133 return mkcodenode(v);
2137 /* Line 274 of skeleton.m4 */
2138 #line 3684 "parser.y"
2140 node_t* var_read(variable_t*v)
2143 o.c = abc_getlocal(0, v->index);
2145 return mkcodenode(o);
2148 node_t* resolve_identifier(const char*name)
2158 /* look at variables */
2159 if((v = find_variable(state, name))) {
2160 // name is a local variable
2163 if((v = find_slot(state->method, name))) {
2164 o.c = abc_getscopeobject(o.c, 1);
2165 o.c = abc_getslot(o.c, v->index);
2167 return mkcodenode(o);
2170 int i_am_static = state->method->is_static;
2172 if(!state->method->inner && !state->xmlfilter && state->cls)
2174 /* look at current class' members */
2175 if((f = findmember_nsset(state->cls->info, name, 1, i_am_static)))
2177 // name is a member or attribute in this class
2178 int var_is_static = (f->flags&FLAG_STATIC);
2180 if(f->kind == INFOTYPE_VAR && (f->flags&FLAG_CONST)) {
2181 /* if the variable is a constant (and we know what is evaluates to), we
2182 can just use the value itself */
2183 varinfo_t*v = (varinfo_t*)f;
2185 return mkconstnode(v->value);
2189 if(var_is_static >= i_am_static) {
2190 if(f->kind == INFOTYPE_METHOD) {
2191 o.t = TYPE_FUNCTION(f);
2196 if(var_is_static && !i_am_static) {
2197 /* access to a static member from a non-static location.
2198 do this via findpropstrict:
2199 there doesn't seem to be any non-lookup way to access
2200 static properties of a class */
2201 state->method->late_binding = 1;
2203 namespace_t ns = {f->access, f->package};
2204 multiname_t m = {QNAME, &ns, 0, name};
2205 o.c = abc_findpropstrict2(o.c, &m);
2206 o.c = abc_getproperty2(o.c, &m);
2207 return mkcodenode(o);
2208 } else if(f->slot>0) {
2209 o.c = abc_getlocal_0(o.c);
2210 o.c = abc_getslot(o.c, f->slot);
2211 return mkcodenode(o);
2213 MEMBER_MULTINAME(m, f, name);
2214 o.c = abc_getlocal_0(o.c);
2215 o.c = abc_getproperty2(o.c, &m);
2216 return mkcodenode(o);
2220 /* special case: it's allowed to access non-static constants
2221 from a static context */
2222 if(i_am_static && (f=findmember_nsset(state->cls->info, name, 1, 0))) {
2223 if(f->kind == INFOTYPE_VAR && (f->flags&FLAG_CONST)) {
2224 varinfo_t*v = (varinfo_t*)f;
2226 return mkconstnode(v->value);
2232 /* look at actual classes, in the current package and imported */
2233 if(!state->xmlfilter && (a = find_class(name))) {
2234 if(state->cls && state->cls->info == (classinfo_t*)a && i_am_static) {
2235 o.c = abc_getlocal_0(0);
2236 o.t = TYPE_CLASS((classinfo_t*)a);
2240 return mkcodenode(o);
2243 /* look through package prefixes */
2244 if(!state->xmlfilter &&
2245 (dict_contains(state->import_toplevel_packages, name) ||
2246 registry_ispackage(name))) {
2247 o.c = abc___pushpackage__(o.c, (char*)name);
2249 return mkcodenode(o); //?
2252 /* unknown object, let the avm2 resolve it */
2254 if(!state->method->inner && !state->xmlfilter) {
2255 /* we really should make inner functions aware of the class context */
2256 as3_warning("Couldn't resolve '%s', doing late binding", name);
2258 state->method->late_binding = 1;
2260 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, name};
2263 o.c = abc_findpropstrict2(o.c, &m);
2264 o.c = abc_getproperty2(o.c, &m);
2265 return mkcodenode(o);
2270 /* Line 274 of skeleton.m4 */
2271 #line 3845 "parser.y"
2273 void add_active_url(const char*url)
2277 list_append(state->active_namespace_urls, n);
2282 /* Line 274 of skeleton.m4 */
2283 #line 2284 "parser.tab.c"
2290 typedef YYTYPE_UINT8 yytype_uint8;
2292 typedef unsigned char yytype_uint8;
2296 typedef YYTYPE_INT8 yytype_int8;
2297 #elif (defined __STDC__ || defined __C99__FUNC__ \
2298 || defined __cplusplus || defined _MSC_VER)
2299 typedef signed char yytype_int8;
2301 typedef short int yytype_int8;
2304 #ifdef YYTYPE_UINT16
2305 typedef YYTYPE_UINT16 yytype_uint16;
2307 typedef unsigned short int yytype_uint16;
2311 typedef YYTYPE_INT16 yytype_int16;
2313 typedef short int yytype_int16;
2317 # ifdef __SIZE_TYPE__
2318 # define YYSIZE_T __SIZE_TYPE__
2319 # elif defined size_t
2320 # define YYSIZE_T size_t
2321 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
2322 || defined __cplusplus || defined _MSC_VER)
2323 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
2324 # define YYSIZE_T size_t
2326 # define YYSIZE_T unsigned int
2330 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
2335 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
2336 # define YY_(msgid) dgettext ("bison-runtime", msgid)
2340 # define YY_(msgid) msgid
2344 /* Suppress unused-variable warnings by "using" E. */
2345 #if ! defined lint || defined __GNUC__
2346 # define YYUSE(e) ((void) (e))
2348 # define YYUSE(e) /* empty */
2351 /* Identity function, used to suppress warnings about constant conditions. */
2353 # define YYID(n) (n)
2355 #if (defined __STDC__ || defined __C99__FUNC__ \
2356 || defined __cplusplus || defined _MSC_VER)
2369 #if ! defined yyoverflow || YYERROR_VERBOSE
2371 /* The parser invokes alloca or malloc; define the necessary symbols. */
2373 # ifdef YYSTACK_USE_ALLOCA
2374 # if YYSTACK_USE_ALLOCA
2376 # define YYSTACK_ALLOC __builtin_alloca
2377 # elif defined __BUILTIN_VA_ARG_INCR
2378 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
2380 # define YYSTACK_ALLOC __alloca
2381 # elif defined _MSC_VER
2382 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
2383 # define alloca _alloca
2385 # define YYSTACK_ALLOC alloca
2386 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
2387 || defined __cplusplus || defined _MSC_VER)
2388 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
2390 # define _STDLIB_H 1
2397 # ifdef YYSTACK_ALLOC
2398 /* Pacify GCC's `empty if-body' warning. */
2399 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
2400 # ifndef YYSTACK_ALLOC_MAXIMUM
2401 /* The OS might guarantee only one guard page at the bottom of the stack,
2402 and a page size can be as small as 4096 bytes. So we cannot safely
2403 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
2404 to allow for a few compiler-allocated temporary stack slots. */
2405 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
2408 # define YYSTACK_ALLOC YYMALLOC
2409 # define YYSTACK_FREE YYFREE
2410 # ifndef YYSTACK_ALLOC_MAXIMUM
2411 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
2413 # if (defined __cplusplus && ! defined _STDLIB_H \
2414 && ! ((defined YYMALLOC || defined malloc) \
2415 && (defined YYFREE || defined free)))
2416 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
2418 # define _STDLIB_H 1
2422 # define YYMALLOC malloc
2423 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
2424 || defined __cplusplus || defined _MSC_VER)
2425 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
2429 # define YYFREE free
2430 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
2431 || defined __cplusplus || defined _MSC_VER)
2432 void free (void *); /* INFRINGES ON USER NAME SPACE */
2436 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
2439 #if (! defined yyoverflow \
2440 && (! defined __cplusplus \
2441 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
2443 /* A type that is properly aligned for any stack member. */
2446 yytype_int16 yyss_alloc;
2450 /* The size of the maximum gap between one aligned stack and the next. */
2451 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
2453 /* The size of an array large to enough to hold all stacks, each with
2455 # define YYSTACK_BYTES(N) \
2456 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
2457 + YYSTACK_GAP_MAXIMUM)
2459 /* Copy COUNT objects from FROM to TO. The source and destination do
2462 # if defined __GNUC__ && 1 < __GNUC__
2463 # define YYCOPY(To, From, Count) \
2464 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
2466 # define YYCOPY(To, From, Count) \
2470 for (yyi = 0; yyi < (Count); yyi++) \
2471 (To)[yyi] = (From)[yyi]; \
2477 /* Relocate STACK from its old location to the new one. The
2478 local variables YYSIZE and YYSTACKSIZE give the old and new number of
2479 elements in the stack, and YYPTR gives the new location of the
2480 stack. Advance YYPTR to a properly aligned location for the next
2482 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
2485 YYSIZE_T yynewbytes; \
2486 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
2487 Stack = &yyptr->Stack_alloc; \
2488 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
2489 yyptr += yynewbytes / sizeof (*yyptr); \
2495 /* YYFINAL -- State number of the termination state. */
2497 /* YYLAST -- Last index in YYTABLE. */
2500 /* YYNTOKENS -- Number of terminals. */
2501 #define YYNTOKENS 136
2502 /* YYNNTS -- Number of nonterminals. */
2504 /* YYNRULES -- Number of rules. */
2505 #define YYNRULES 358
2506 /* YYNRULES -- Number of states. */
2507 #define YYNSTATES 612
2509 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
2510 #define YYUNDEFTOK 2
2511 #define YYMAXUTOK 365
2513 #define YYTRANSLATE(YYX) \
2514 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
2516 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
2517 static const yytype_uint8 yytranslate[] =
2519 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2520 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2521 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2522 2, 2, 2, 120, 2, 2, 2, 118, 109, 2,
2523 124, 135, 117, 115, 102, 114, 129, 116, 2, 2,
2524 2, 2, 2, 2, 2, 2, 2, 2, 106, 101,
2525 111, 104, 112, 105, 130, 2, 2, 2, 2, 2,
2526 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2527 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2528 2, 126, 2, 127, 108, 2, 2, 2, 2, 2,
2529 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2530 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2531 2, 2, 2, 128, 107, 134, 119, 2, 2, 2,
2532 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2533 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2534 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2535 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2536 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2537 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2538 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2539 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2540 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2541 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2542 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2543 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2544 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
2545 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
2546 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
2547 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
2548 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
2549 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
2550 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
2551 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
2552 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
2553 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
2554 95, 96, 97, 98, 99, 100, 103, 110, 113, 121,
2555 122, 123, 125, 131, 132, 133
2559 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
2561 static const yytype_uint16 yyprhs[] =
2563 0, 0, 3, 5, 6, 8, 10, 13, 15, 17,
2564 19, 21, 23, 25, 30, 32, 33, 35, 37, 40,
2565 42, 44, 46, 48, 50, 55, 60, 62, 64, 65,
2566 68, 70, 72, 74, 76, 78, 80, 82, 84, 86,
2567 88, 90, 92, 94, 96, 100, 103, 105, 107, 109,
2568 111, 113, 115, 117, 122, 125, 127, 129, 130, 134,
2569 137, 138, 141, 144, 146, 150, 154, 155, 158, 159,
2570 162, 169, 170, 172, 174, 178, 180, 183, 187, 196,
2571 203, 209, 216, 218, 221, 223, 226, 227, 229, 231,
2572 234, 236, 239, 244, 248, 249, 258, 259, 269, 270,
2573 276, 278, 281, 283, 286, 288, 289, 296, 299, 301,
2574 306, 309, 311, 313, 315, 317, 319, 323, 325, 326,
2575 333, 334, 340, 343, 346, 351, 352, 354, 356, 359,
2576 361, 363, 365, 367, 369, 371, 373, 375, 377, 379,
2577 380, 383, 384, 387, 388, 391, 392, 402, 403, 412,
2578 413, 415, 417, 420, 422, 427, 429, 431, 433, 434,
2579 436, 438, 441, 443, 446, 455, 457, 459, 460, 465,
2580 467, 471, 475, 476, 479, 481, 483, 485, 487, 489,
2581 491, 493, 495, 497, 499, 501, 503, 504, 505, 510,
2582 511, 516, 517, 520, 523, 526, 529, 533, 535, 537,
2583 538, 540, 547, 558, 570, 572, 575, 577, 581, 585,
2584 589, 593, 594, 596, 599, 604, 608, 610, 615, 618,
2585 620, 622, 623, 624, 637, 639, 640, 641, 652, 654,
2586 658, 660, 662, 664, 668, 670, 672, 674, 677, 678,
2587 679, 683, 684, 686, 688, 690, 693, 696, 697, 702,
2588 707, 712, 715, 717, 720, 722, 724, 726, 730, 732,
2589 736, 737, 739, 741, 743, 745, 747, 749, 753, 759,
2590 761, 763, 765, 767, 769, 771, 773, 775, 777, 779,
2591 783, 787, 791, 795, 799, 803, 807, 811, 815, 819,
2592 823, 827, 830, 833, 837, 841, 845, 849, 853, 857,
2593 861, 865, 869, 873, 877, 881, 885, 889, 893, 896,
2594 899, 901, 905, 908, 913, 917, 921, 925, 929, 933,
2595 937, 941, 945, 949, 953, 957, 961, 967, 970, 973,
2596 976, 979, 983, 986, 987, 994, 996, 998, 1000, 1002,
2597 1004, 1010, 1014, 1020, 1026, 1031, 1038, 1043, 1050, 1057,
2598 1064, 1068, 1070, 1072, 1075, 1080, 1085, 1088, 1093
2601 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
2602 static const yytype_int16 yyrhs[] =
2604 137, 0, -1, 138, -1, -1, 139, -1, 140, -1,
2605 139, 140, -1, 188, -1, 200, -1, 198, -1, 234,
2606 -1, 209, -1, 149, -1, 151, 128, 138, 134, -1,
2607 101, -1, -1, 142, -1, 143, -1, 142, 143, -1,
2608 200, -1, 198, -1, 234, -1, 209, -1, 149, -1,
2609 151, 128, 141, 134, -1, 126, 150, 261, 127, -1,
2610 101, -1, 145, -1, -1, 145, 147, -1, 147, -1,
2611 269, -1, 191, -1, 163, -1, 164, -1, 165, -1,
2612 166, -1, 173, -1, 159, -1, 185, -1, 181, -1,
2613 257, -1, 270, -1, 268, -1, 128, 145, 134, -1,
2614 128, 134, -1, 101, -1, 146, -1, 153, -1, 167,
2615 -1, 168, -1, 253, -1, 183, -1, 151, 128, 145,
2616 134, -1, 147, 101, -1, 147, -1, 146, -1, -1,
2617 3, 91, 3, -1, 104, 261, -1, -1, 46, 154,
2618 -1, 32, 154, -1, 155, -1, 154, 102, 155, -1,
2619 3, 244, 152, -1, -1, 157, 148, -1, -1, 66,
2620 156, -1, 65, 124, 255, 135, 156, 158, -1, -1,
2621 153, -1, 257, -1, 46, 3, 244, -1, 3, -1,
2622 11, 124, -1, 11, 50, 124, -1, 162, 160, 101,
2623 255, 101, 257, 135, 156, -1, 162, 161, 69, 255,
2624 135, 156, -1, 12, 124, 255, 135, 156, -1, 13,
2625 156, 12, 124, 255, 135, -1, 67, -1, 67, 3,
2626 -1, 30, -1, 30, 3, -1, -1, 170, -1, 172,
2627 -1, 170, 172, -1, 171, -1, 170, 171, -1, 34,
2628 261, 106, 144, -1, 62, 106, 144, -1, -1, 14,
2629 124, 174, 261, 135, 128, 169, 134, -1, -1, 33,
2630 124, 3, 244, 135, 176, 128, 144, 134, -1, -1,
2631 27, 128, 178, 144, 134, -1, 175, -1, 179, 175,
2632 -1, 179, -1, 179, 177, -1, 177, -1, -1, 52,
2633 128, 182, 144, 134, 180, -1, 37, 255, -1, 37,
2634 -1, 39, 124, 255, 135, -1, 184, 148, -1, 3,
2635 -1, 17, -1, 16, -1, 29, -1, 4, -1, 187,
2636 129, 186, -1, 186, -1, -1, 17, 187, 128, 189,
2637 141, 134, -1, -1, 17, 128, 190, 141, 134, -1,
2638 41, 3, -1, 41, 240, -1, 41, 187, 129, 117,
2639 -1, -1, 193, -1, 194, -1, 193, 194, -1, 20,
2640 -1, 21, -1, 18, -1, 38, -1, 47, -1, 49,
2641 -1, 48, -1, 25, -1, 23, -1, 4, -1, -1,
2642 54, 241, -1, -1, 54, 242, -1, -1, 15, 242,
2643 -1, -1, 192, 31, 3, 195, 197, 128, 199, 202,
2644 134, -1, -1, 192, 44, 3, 196, 128, 201, 205,
2645 134, -1, -1, 203, -1, 204, -1, 203, 204, -1,
2646 101, -1, 151, 128, 202, 134, -1, 209, -1, 234,
2647 -1, 146, -1, -1, 206, -1, 207, -1, 206, 207,
2648 -1, 101, -1, 46, 3, -1, 192, 26, 233, 3,
2649 124, 230, 135, 244, -1, 46, -1, 32, -1, -1,
2650 192, 208, 210, 211, -1, 212, -1, 211, 102, 212,
2651 -1, 3, 244, 152, -1, -1, 104, 261, -1, 8,
2652 -1, 9, -1, 10, -1, 5, -1, 56, -1, 55,
2653 -1, 45, -1, 28, -1, 29, -1, 227, -1, 111,
2654 -1, 112, -1, -1, -1, 128, 261, 220, 134, -1,
2655 -1, 128, 261, 222, 134, -1, -1, 223, 219, -1,
2656 223, 5, -1, 223, 112, -1, 227, 223, -1, 224,
2657 227, 223, -1, 3, -1, 221, -1, -1, 228, -1,
2658 216, 225, 226, 116, 218, 112, -1, 216, 225, 226,
2659 217, 223, 111, 116, 225, 218, 112, -1, 216, 225,
2660 226, 217, 223, 224, 111, 116, 225, 218, 112, -1,
2661 229, -1, 228, 229, -1, 221, -1, 221, 104, 5,
2662 -1, 221, 104, 221, -1, 3, 104, 221, -1, 3,
2663 104, 5, -1, -1, 231, -1, 95, 232, -1, 231,
2664 102, 95, 232, -1, 231, 102, 232, -1, 232, -1,
2665 3, 106, 243, 213, -1, 3, 213, -1, 51, -1,
2666 35, -1, -1, -1, 192, 26, 233, 3, 124, 230,
2667 135, 244, 128, 235, 144, 134, -1, 3, -1, -1,
2668 -1, 26, 236, 124, 230, 135, 244, 128, 238, 144,
2669 134, -1, 186, -1, 187, 129, 186, -1, 240, -1,
2670 239, -1, 241, -1, 242, 102, 241, -1, 241, -1,
2671 117, -1, 36, -1, 106, 243, -1, -1, -1, 124,
2672 246, 135, -1, -1, 247, -1, 248, -1, 254, -1,
2673 247, 102, -1, 248, 254, -1, -1, 24, 261, 249,
2674 245, -1, 261, 124, 246, 135, -1, 53, 124, 246,
2675 135, -1, 64, 261, -1, 42, -1, 42, 255, -1,
2676 261, -1, 256, -1, 261, -1, 256, 102, 261, -1,
2677 261, -1, 257, 102, 261, -1, -1, 260, -1, 3,
2678 -1, 5, -1, 8, -1, 9, -1, 10, -1, 259,
2679 106, 254, -1, 260, 102, 259, 106, 254, -1, 237,
2680 -1, 265, -1, 250, -1, 252, -1, 251, -1, 266,
2681 -1, 214, -1, 215, -1, 6, -1, 19, -1, 126,
2682 246, 127, -1, 71, 258, 134, -1, 261, 111, 261,
2683 -1, 261, 112, 261, -1, 261, 76, 261, -1, 261,
2684 77, 261, -1, 261, 72, 261, -1, 261, 73, 261,
2685 -1, 261, 75, 261, -1, 261, 74, 261, -1, 261,
2686 89, 261, -1, 261, 90, 261, -1, 120, 261, -1,
2687 119, 261, -1, 261, 109, 261, -1, 261, 108, 261,
2688 -1, 261, 107, 261, -1, 261, 98, 261, -1, 261,
2689 97, 261, -1, 261, 96, 261, -1, 261, 116, 261,
2690 -1, 261, 118, 261, -1, 261, 115, 261, -1, 261,
2691 114, 261, -1, 261, 117, 261, -1, 261, 69, 261,
2692 -1, 261, 70, 261, -1, 261, 40, 261, -1, 261,
2693 68, 261, -1, 43, 261, -1, 36, 261, -1, 36,
2694 -1, 124, 256, 135, -1, 114, 261, -1, 261, 126,
2695 261, 127, -1, 261, 81, 261, -1, 261, 80, 261,
2696 -1, 261, 87, 261, -1, 261, 86, 261, -1, 261,
2697 88, 261, -1, 261, 79, 261, -1, 261, 78, 261,
2698 -1, 261, 85, 261, -1, 261, 82, 261, -1, 261,
2699 83, 261, -1, 261, 84, 261, -1, 261, 104, 261,
2700 -1, 261, 105, 261, 106, 261, -1, 261, 93, -1,
2701 261, 92, -1, 93, 261, -1, 92, 261, -1, 53,
2702 129, 3, -1, 130, 3, -1, -1, 261, 129, 124,
2703 262, 261, 135, -1, 3, -1, 117, -1, 4, -1,
2704 186, -1, 117, -1, 261, 129, 263, 91, 264, -1,
2705 261, 94, 264, -1, 261, 94, 263, 91, 264, -1,
2706 261, 129, 126, 261, 127, -1, 261, 129, 130, 264,
2707 -1, 261, 129, 130, 263, 91, 264, -1, 261, 94,
2708 130, 264, -1, 261, 94, 130, 263, 91, 264, -1,
2709 261, 129, 130, 126, 261, 127, -1, 261, 94, 130,
2710 126, 261, 127, -1, 261, 129, 264, -1, 4, -1,
2711 3, -1, 16, 3, -1, 16, 3, 104, 3, -1,
2712 16, 3, 104, 5, -1, 192, 267, -1, 63, 16,
2713 104, 261, -1, 22, 16, 241, -1
2716 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
2717 static const yytype_uint16 yyrline[] =
2719 0, 1968, 1968, 1970, 1970, 1971, 1972, 1974, 1975, 1976,
2720 1977, 1978, 1979, 1980, 1981, 1983, 1983, 1984, 1985, 1987,
2721 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1999,
2722 2002, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013,
2723 2014, 2015, 2016, 2017, 2018, 2019, 2022, 2023, 2024, 2025,
2724 2026, 2027, 2028, 2029, 2041, 2042, 2046, 2057, 2065, 2092,
2725 2093, 2095, 2096, 2098, 2099, 2101, 2162, 2162, 2166, 2167,
2726 2170, 2186, 2187, 2188, 2193, 2197, 2202, 2203, 2205, 2225,
2727 2269, 2285, 2297, 2300, 2303, 2306, 2310, 2311, 2312, 2313,
2728 2314, 2315, 2317, 2328, 2331, 2331, 2362, 2362, 2387, 2387,
2729 2403, 2404, 2405, 2406, 2414, 2423, 2423, 2472, 2476, 2487,
2730 2497, 2514, 2515, 2516, 2517, 2518, 2520, 2521, 2523, 2523,
2731 2525, 2525, 2549, 2557, 2568, 2584, 2585, 2586, 2587, 2594,
2732 2595, 2596, 2597, 2598, 2599, 2600, 2601, 2602, 2603, 2607,
2733 2608, 2610, 2611, 2613, 2614, 2618, 2616, 2624, 2622, 2631,
2734 2632, 2633, 2634, 2635, 2636, 2637, 2638, 2640, 2646, 2647,
2735 2648, 2649, 2650, 2651, 2654, 2727, 2727, 2729, 2729, 2731,
2736 2732, 2734, 2818, 2819, 2828, 2829, 2832, 2833, 2834, 2835,
2737 2836, 2837, 2838, 2851, 2862, 2863, 2864, 2866, 2866, 2869,
2738 2869, 2872, 2873, 2876, 2881, 2884, 2887, 2890, 2893, 2897,
2739 2900, 2904, 2908, 2913, 2919, 2922, 2925, 2928, 2933, 2936,
2740 2939, 2949, 2953, 2959, 2965, 2973, 2978, 2984, 2992, 3000,
2741 3001, 3002, 3005, 3004, 3021, 3022, 3024, 3023, 3047, 3066,
2742 3080, 3081, 3083, 3084, 3086, 3087, 3088, 3097, 3098, 3102,
2743 3103, 3105, 3106, 3107, 3109, 3113, 3114, 3119, 3120, 3167,
2744 3217, 3238, 3260, 3263, 3270, 3273, 3276, 3279, 3282, 3285,
2745 3290, 3291, 3293, 3294, 3295, 3296, 3297, 3299, 3305, 3314,
2746 3315, 3316, 3317, 3318, 3319, 3321, 3325, 3330, 3348, 3359,
2747 3369, 3378, 3379, 3380, 3381, 3382, 3383, 3384, 3385, 3386,
2748 3387, 3388, 3389, 3390, 3391, 3392, 3393, 3394, 3395, 3396,
2749 3397, 3398, 3399, 3400, 3401, 3402, 3403, 3404, 3405, 3406,
2750 3407, 3408, 3409, 3410, 3411, 3412, 3413, 3414, 3415, 3416,
2751 3417, 3418, 3419, 3420, 3421, 3422, 3423, 3425, 3426, 3427,
2752 3428, 3430, 3445, 3453, 3453, 3507, 3508, 3509, 3510, 3511,
2753 3551, 3554, 3561, 3564, 3575, 3583, 3587, 3594, 3598, 3608,
2754 3619, 3816, 3820, 3854, 3861, 3868, 3875, 3897, 3904
2758 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
2759 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
2760 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
2761 static const char *const yytname[] =
2763 "$end", "error", "$undefined", "T_IDENTIFIER", "T_NAMESPACE",
2764 "T_STRING", "T_REGEXP", "T_EMPTY", "T_INT", "T_UINT", "T_FLOAT",
2765 "\"for\"", "\"while\"", "\"do\"", "\"switch\"", "\"implements\"",
2766 "\"namespace\"", "\"package\"", "\"protected\"", "\"arguments\"",
2767 "\"public\"", "\"private\"", "\"use\"", "\"internal\"", "\"new\"",
2768 "\"native\"", "\"function\"", "\"finally\"", "\"undefined\"", "\"NaN\"",
2769 "\"continue\"", "\"class\"", "\"const\"", "\"catch\"", "\"case\"",
2770 "\"set\"", "\"void\"", "\"throw\"", "\"static\"", "\"with\"",
2771 "\"instanceof\"", "\"import\"", "\"return\"", "\"typeof\"",
2772 "\"interface\"", "\"null\"", "\"var\"", "\"dynamic\"", "\"override\"",
2773 "\"final\"", "\"each\"", "\"get\"", "\"try\"", "\"super\"",
2774 "\"extends\"", "\"false\"", "\"true\"", "\"Boolean\"", "\"uint\"",
2775 "\"int\"", "\"Number\"", "\"String\"", "\"default\"", "\"default xml\"",
2776 "\"delete\"", "\"if\"", "\"else\"", "\"break\"", "\"is\"", "\"in\"",
2777 "\"as\"", "\"{ (dictionary)\"", "\"==\"", "\"===\"", "\"!=\"", "\"!==\"",
2778 "\"<=\"", "\">=\"", "\"|=\"", "\"/=\"", "\"%=\"", "\"*=\"", "\"&=\"",
2779 "\"+=\"", "\"-=\"", "\"^=\"", "\">>=\"", "\"<<=\"", "\">>>=\"", "\"||\"",
2780 "\"&&\"", "\"::\"", "\"--\"", "\"++\"", "\"..\"", "\"...\"", "\"<<\"",
2781 "\">>>\"", "\">>\"", "prec_none", "below_semicolon", "';'", "','",
2782 "below_assignment", "'='", "'?'", "':'", "'|'", "'^'", "'&'", "below_lt",
2783 "'<'", "'>'", "below_minus", "'-'", "'+'", "'/'", "'*'", "'%'", "'~'",
2784 "'!'", "minusminus_prefix", "plusplus_prefix", "below_curly", "'('",
2785 "new2", "'['", "']'", "'{'", "'.'", "'@'", "above_identifier",
2786 "below_else", "above_function", "'}'", "')'", "$accept", "PROGRAM",
2787 "MAYBE_PROGRAM_CODE_LIST", "PROGRAM_CODE_LIST", "PROGRAM_CODE",
2788 "MAYBE_INPACKAGE_CODE_LIST", "INPACKAGE_CODE_LIST", "INPACKAGE_CODE",
2789 "MAYBECODE", "CODE", "CODE_STATEMENT", "CODEPIECE", "CODEBLOCK",
2790 "PACKAGE_INITCODE", "EMBED_START", "CONDITIONAL_COMPILATION",
2791 "MAYBEEXPRESSION", "VARIABLE_DECLARATION", "VARIABLE_LIST",
2792 "ONE_VARIABLE", "IF_CODEBLOCK", "$@1", "MAYBEELSE", "IF", "FOR_INIT",
2793 "FOR_IN_INIT", "FOR_START", "FOR", "FOR_IN", "WHILE", "DO_WHILE",
2794 "BREAK", "CONTINUE", "MAYBE_CASE_LIST", "CASE_LIST", "CASE", "DEFAULT",
2795 "SWITCH", "$@2", "CATCH", "$@3", "FINALLY", "$@4", "CATCH_LIST",
2796 "CATCH_FINALLY_LIST", "TRY", "$@5", "THROW", "WITH_HEAD", "WITH",
2797 "X_IDENTIFIER", "PACKAGE", "PACKAGE_DECLARATION", "$@6", "$@7", "IMPORT",
2798 "MAYBE_MODIFIERS", "MODIFIER_LIST", "MODIFIER", "EXTENDS",
2799 "EXTENDS_LIST", "IMPLEMENTS_LIST", "CLASS_DECLARATION", "$@8",
2800 "INTERFACE_DECLARATION", "$@9", "MAYBE_CLASS_BODY", "CLASS_BODY",
2801 "CLASS_BODY_ITEM", "MAYBE_INTERFACE_BODY", "INTERFACE_BODY",
2802 "IDECLARATION", "VARCONST", "SLOT_DECLARATION", "$@10", "SLOT_LIST",
2803 "ONE_SLOT", "MAYBECONSTANT", "CONSTANT", "XML", "OPEN", "CLOSE",
2804 "CLOSE2", "XMLEXPR1", "$@11", "XMLEXPR2", "$@12", "XMLTEXT", "XML2",
2805 "XML_ID_OR_EXPR", "MAYBE_XMLATTRIBUTES", "XMLNODE", "XMLATTRIBUTES",
2806 "XMLATTRIBUTE", "MAYBE_PARAM_LIST", "PARAM_LIST", "PARAM", "GETSET",
2807 "FUNCTION_DECLARATION", "$@13", "MAYBE_IDENTIFIER", "INNERFUNCTION",
2808 "$@14", "CLASS", "PACKAGEANDCLASS", "CLASS_SPEC", "CLASS_SPEC_LIST",
2809 "TYPE", "MAYBETYPE", "MAYBE_PARAM_VALUES", "MAYBE_EXPRESSION_LIST",
2810 "EXPRESSION_LIST", "EXPRESSION_LIST_AND_COMMA", "XX", "NEW",
2811 "FUNCTIONCALL", "DELETE", "RETURN", "NONCOMMAEXPRESSION", "EXPRESSION",
2812 "COMMA_EXPRESSION", "VOIDEXPRESSION", "MAYBE_DICT_EXPRPAIR_LIST",
2813 "DICTLH", "DICT_EXPRPAIR_LIST", "E", "$@15", "ID_OR_NS", "SUBNODE",
2814 "MEMBER", "VAR_READ", "NAMESPACE_ID", "NAMESPACE_DECLARATION",
2815 "DEFAULT_NAMESPACE", "USE_NAMESPACE", 0
2820 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
2822 static const yytype_uint16 yytoknum[] =
2824 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
2825 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
2826 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
2827 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
2828 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
2829 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
2830 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
2831 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
2832 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
2833 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
2834 355, 59, 44, 356, 61, 63, 58, 124, 94, 38,
2835 357, 60, 62, 358, 45, 43, 47, 42, 37, 126,
2836 33, 359, 360, 361, 40, 362, 91, 93, 123, 46,
2837 64, 363, 364, 365, 125, 41
2841 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
2842 static const yytype_uint16 yyr1[] =
2844 0, 136, 137, 138, 138, 139, 139, 140, 140, 140,
2845 140, 140, 140, 140, 140, 141, 141, 142, 142, 143,
2846 143, 143, 143, 143, 143, 143, 143, 144, 144, 145,
2847 145, 146, 146, 146, 146, 146, 146, 146, 146, 146,
2848 146, 146, 146, 146, 146, 146, 147, 147, 147, 147,
2849 147, 147, 147, 147, 148, 148, 149, 150, 151, 152,
2850 152, 153, 153, 154, 154, 155, 157, 156, 158, 158,
2851 159, 160, 160, 160, 161, 161, 162, 162, 163, 164,
2852 165, 166, 167, 167, 168, 168, 169, 169, 169, 169,
2853 170, 170, 171, 172, 174, 173, 176, 175, 178, 177,
2854 179, 179, 180, 180, 180, 182, 181, 183, 183, 184,
2855 185, 186, 186, 186, 186, 186, 187, 187, 189, 188,
2856 190, 188, 191, 191, 191, 192, 192, 193, 193, 194,
2857 194, 194, 194, 194, 194, 194, 194, 194, 194, 195,
2858 195, 196, 196, 197, 197, 199, 198, 201, 200, 202,
2859 202, 203, 203, 204, 204, 204, 204, 204, 205, 205,
2860 206, 206, 207, 207, 207, 208, 208, 210, 209, 211,
2861 211, 212, 213, 213, 214, 214, 214, 214, 214, 214,
2862 214, 214, 214, 215, 216, 217, 218, 220, 219, 222,
2863 221, 223, 223, 223, 223, 224, 224, 225, 225, 226,
2864 226, 227, 227, 227, 228, 228, 229, 229, 229, 229,
2865 229, 230, 230, 230, 230, 231, 231, 232, 232, 233,
2866 233, 233, 235, 234, 236, 236, 238, 237, 239, 240,
2867 241, 241, 242, 242, 243, 243, 243, 244, 244, 245,
2868 245, 246, 246, 246, 247, 248, 247, 249, 250, 251,
2869 251, 252, 253, 253, 254, 255, 256, 256, 257, 257,
2870 258, 258, 259, 259, 259, 259, 259, 260, 260, 261,
2871 261, 261, 261, 261, 261, 261, 261, 261, 261, 261,
2872 261, 261, 261, 261, 261, 261, 261, 261, 261, 261,
2873 261, 261, 261, 261, 261, 261, 261, 261, 261, 261,
2874 261, 261, 261, 261, 261, 261, 261, 261, 261, 261,
2875 261, 261, 261, 261, 261, 261, 261, 261, 261, 261,
2876 261, 261, 261, 261, 261, 261, 261, 261, 261, 261,
2877 261, 261, 261, 262, 261, 263, 263, 263, 264, 264,
2878 261, 261, 261, 261, 261, 261, 261, 261, 261, 261,
2879 265, 266, 266, 267, 267, 267, 268, 269, 270
2882 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
2883 static const yytype_uint8 yyr2[] =
2885 0, 2, 1, 0, 1, 1, 2, 1, 1, 1,
2886 1, 1, 1, 4, 1, 0, 1, 1, 2, 1,
2887 1, 1, 1, 1, 4, 4, 1, 1, 0, 2,
2888 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2889 1, 1, 1, 1, 3, 2, 1, 1, 1, 1,
2890 1, 1, 1, 4, 2, 1, 1, 0, 3, 2,
2891 0, 2, 2, 1, 3, 3, 0, 2, 0, 2,
2892 6, 0, 1, 1, 3, 1, 2, 3, 8, 6,
2893 5, 6, 1, 2, 1, 2, 0, 1, 1, 2,
2894 1, 2, 4, 3, 0, 8, 0, 9, 0, 5,
2895 1, 2, 1, 2, 1, 0, 6, 2, 1, 4,
2896 2, 1, 1, 1, 1, 1, 3, 1, 0, 6,
2897 0, 5, 2, 2, 4, 0, 1, 1, 2, 1,
2898 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
2899 2, 0, 2, 0, 2, 0, 9, 0, 8, 0,
2900 1, 1, 2, 1, 4, 1, 1, 1, 0, 1,
2901 1, 2, 1, 2, 8, 1, 1, 0, 4, 1,
2902 3, 3, 0, 2, 1, 1, 1, 1, 1, 1,
2903 1, 1, 1, 1, 1, 1, 0, 0, 4, 0,
2904 4, 0, 2, 2, 2, 2, 3, 1, 1, 0,
2905 1, 6, 10, 11, 1, 2, 1, 3, 3, 3,
2906 3, 0, 1, 2, 4, 3, 1, 4, 2, 1,
2907 1, 0, 0, 12, 1, 0, 0, 10, 1, 3,
2908 1, 1, 1, 3, 1, 1, 1, 2, 0, 0,
2909 3, 0, 1, 1, 1, 2, 2, 0, 4, 4,
2910 4, 2, 1, 2, 1, 1, 1, 3, 1, 3,
2911 0, 1, 1, 1, 1, 1, 1, 3, 5, 1,
2912 1, 1, 1, 1, 1, 1, 1, 1, 1, 3,
2913 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
2914 3, 2, 2, 3, 3, 3, 3, 3, 3, 3,
2915 3, 3, 3, 3, 3, 3, 3, 3, 2, 2,
2916 1, 3, 2, 4, 3, 3, 3, 3, 3, 3,
2917 3, 3, 3, 3, 3, 3, 5, 2, 2, 2,
2918 2, 3, 2, 0, 6, 1, 1, 1, 1, 1,
2919 5, 3, 5, 5, 4, 6, 4, 6, 6, 6,
2920 3, 1, 1, 2, 4, 4, 2, 4, 3
2923 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
2924 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
2925 means the default is an error. */
2926 static const yytype_uint16 yydefact[] =
2928 125, 352, 351, 177, 277, 174, 175, 176, 0, 0,
2929 66, 0, 0, 131, 278, 129, 130, 0, 137, 0,
2930 136, 225, 181, 182, 310, 132, 0, 0, 0, 180,
2931 133, 135, 134, 0, 0, 179, 178, 0, 0, 0,
2932 260, 0, 0, 14, 184, 0, 0, 0, 0, 241,
2933 125, 0, 0, 2, 125, 5, 56, 12, 0, 38,
2934 71, 33, 34, 35, 36, 37, 40, 125, 39, 7,
2935 32, 0, 126, 127, 9, 8, 11, 275, 276, 0,
2936 183, 10, 269, 271, 273, 272, 41, 258, 270, 274,
2937 43, 31, 42, 0, 0, 76, 0, 0, 125, 94,
2938 111, 115, 113, 112, 114, 120, 117, 0, 0, 352,
2939 351, 247, 224, 0, 309, 0, 122, 0, 123, 308,
2940 105, 241, 0, 0, 251, 0, 262, 263, 264, 265,
2941 266, 0, 0, 261, 330, 329, 312, 292, 291, 0,
2942 256, 0, 242, 243, 244, 254, 84, 0, 108, 252,
2943 0, 82, 46, 45, 125, 47, 30, 0, 48, 49,
2944 50, 52, 0, 51, 332, 1, 6, 125, 352, 0,
2945 72, 0, 0, 73, 55, 110, 0, 221, 0, 166,
2946 0, 165, 167, 356, 138, 128, 197, 0, 198, 199,
2947 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2948 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2949 0, 0, 0, 0, 328, 327, 0, 0, 0, 0,
2950 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2951 0, 0, 241, 0, 0, 58, 77, 0, 255, 0,
2952 67, 0, 125, 118, 0, 228, 0, 231, 230, 358,
2953 239, 211, 0, 0, 28, 0, 331, 0, 0, 280,
2954 0, 0, 0, 311, 279, 245, 246, 85, 238, 62,
2955 63, 107, 253, 61, 83, 44, 29, 125, 0, 238,
2956 0, 0, 54, 353, 220, 219, 0, 139, 141, 0,
2957 189, 0, 206, 0, 200, 204, 259, 306, 307, 304,
2958 305, 285, 286, 288, 287, 283, 284, 320, 319, 315,
2959 314, 322, 323, 324, 321, 317, 316, 318, 289, 290,
2960 111, 115, 339, 0, 338, 0, 341, 298, 297, 296,
2961 325, 0, 295, 294, 293, 281, 282, 302, 301, 299,
2962 303, 300, 0, 0, 333, 0, 0, 0, 350, 66,
2963 0, 0, 26, 57, 0, 125, 17, 23, 0, 20,
2964 19, 22, 21, 125, 116, 0, 241, 248, 172, 0,
2965 0, 212, 216, 109, 124, 229, 0, 27, 250, 357,
2966 66, 267, 0, 257, 0, 60, 0, 125, 13, 60,
2967 0, 0, 0, 0, 0, 143, 0, 0, 238, 168,
2968 169, 0, 0, 0, 185, 186, 191, 205, 0, 0,
2969 346, 0, 0, 249, 313, 0, 0, 0, 0, 344,
2970 0, 80, 0, 0, 0, 121, 18, 125, 0, 0,
2971 0, 0, 218, 213, 238, 0, 0, 68, 0, 236,
2972 235, 234, 237, 0, 65, 64, 53, 0, 66, 354,
2973 355, 211, 140, 0, 0, 232, 142, 147, 60, 0,
2974 190, 210, 209, 207, 208, 0, 0, 0, 0, 339,
2975 342, 326, 0, 343, 0, 0, 340, 81, 86, 0,
2976 0, 119, 240, 173, 172, 0, 0, 215, 0, 0,
2977 100, 104, 102, 106, 66, 70, 268, 59, 0, 79,
2978 0, 144, 145, 0, 125, 171, 170, 201, 193, 184,
2979 194, 0, 192, 0, 191, 349, 347, 334, 348, 345,
2980 0, 0, 0, 87, 90, 88, 25, 24, 217, 226,
2981 214, 98, 0, 101, 103, 69, 66, 238, 125, 233,
2982 0, 162, 0, 0, 125, 160, 0, 187, 184, 191,
2983 195, 0, 28, 95, 91, 89, 28, 28, 238, 78,
2984 0, 153, 157, 0, 0, 0, 125, 151, 155, 156,
2985 163, 221, 148, 161, 186, 0, 0, 196, 28, 93,
2986 0, 0, 0, 222, 125, 146, 152, 0, 0, 188,
2987 186, 92, 227, 99, 96, 28, 0, 0, 202, 0,
2988 0, 0, 154, 211, 203, 28, 223, 0, 0, 238,
2992 /* YYDEFGOTO[NTERM-NUM]. */
2993 static const yytype_int16 yydefgoto[] =
2995 -1, 52, 53, 54, 55, 354, 355, 356, 376, 377,
2996 155, 156, 175, 357, 424, 157, 444, 158, 273, 270,
2997 97, 98, 495, 59, 171, 172, 60, 61, 62, 63,
2998 64, 159, 160, 522, 523, 524, 525, 65, 241, 490,
2999 600, 491, 557, 492, 493, 66, 254, 161, 67, 68,
3000 324, 246, 69, 363, 242, 70, 162, 72, 73, 395,
3001 397, 454, 359, 538, 360, 504, 565, 566, 567, 543,
3002 544, 545, 182, 361, 289, 399, 400, 432, 77, 78,
3003 79, 406, 465, 512, 575, 188, 401, 466, 513, 189,
3004 293, 80, 294, 295, 370, 371, 372, 286, 362, 595,
3005 113, 82, 556, 247, 248, 441, 456, 442, 385, 367,
3006 141, 142, 143, 250, 83, 84, 85, 163, 144, 237,
3007 238, 86, 131, 132, 133, 87, 415, 325, 326, 88,
3011 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
3013 #define YYPACT_NINF -501
3014 static const yytype_int16 yypact[] =
3016 1777, -27, 777, -501, -501, -501, -501, -501, -25, -48,
3017 -501, -47, 258, -501, -501, -501, -501, 73, -501, 2113,
3018 -501, 107, -501, -501, 2170, -501, -8, 363, 2113, -501,
3019 -501, -501, -501, -9, -17, -501, -501, 117, 2113, 35,
3020 153, 2113, 2113, -501, -501, 2113, 2113, 2113, 2113, 2113,
3021 721, 135, 141, -501, 589, -501, -501, -501, 23, -501,
3022 434, -501, -501, -501, -501, -501, -501, 2033, -501, -501,
3023 -501, 362, 453, -501, -501, -501, -501, -501, -501, 14,
3024 -501, -501, -501, -501, -501, -501, 74, 2865, -501, -501,
3025 -501, -501, -501, 174, 100, -501, 2113, 223, 2033, -501,
3026 -501, -501, -501, -501, -501, -501, -501, 98, 418, -501,
3027 -501, -34, -501, 112, -24, 2113, 110, 122, -501, -24,
3028 -501, 2113, 255, 156, -24, 2113, -501, -501, -501, -501,
3029 -501, 129, 158, 163, -24, -24, 818, -24, -24, -55,
3030 2803, 139, 168, 2113, -501, 2803, 268, 275, 2113, 2113,
3031 275, 282, -501, -501, 853, -501, -501, 165, -501, -501,
3032 -501, -501, 279, -501, -501, -501, -501, 1117, 222, 296,
3033 -501, 203, 237, 74, 206, -501, 310, 27, 311, -501,
3034 312, -501, -501, -501, -501, -501, -501, 2113, -501, 15,
3035 2113, 2113, 2113, 2113, 2113, 2113, 2113, 2113, 2113, 2113,
3036 2113, 2113, 2113, 2113, 2113, 2113, 2113, 2113, 2113, 2113,
3037 2113, 2113, 2113, 2113, -501, -501, 36, 2113, 2113, 2113,
3038 2113, 2113, 2113, 2113, 2113, 2113, 2113, 2113, 2113, 2113,
3039 2113, 2113, 2113, 2113, 123, -501, -501, 181, 215, 195,
3040 -501, 2113, 1249, -501, 418, 192, 194, -501, -501, -501,
3041 207, 25, 197, 344, 1905, 199, -501, 2113, 201, -501,
3042 2113, 153, 2113, -501, -501, -501, -501, -501, 236, 238,
3043 -501, -501, -501, 238, -501, -501, -501, 2033, 209, 236,
3044 2113, 2113, -501, 241, -501, -501, 343, 295, 298, 347,
3045 2803, 249, 265, 38, 15, -501, 2803, 1109, 581, 581,
3046 581, 3237, 3237, 3237, 3237, 1109, 1109, 2803, 2803, 2803,
3047 2803, 2803, 2803, 2803, 2803, 2803, 2803, 2803, 2927, 2989,
3048 271, 283, 284, 273, -501, 285, -501, 713, 713, 713,
3049 2803, 2369, 3051, 3113, 3175, 1109, 1109, 818, 818, -24,
3050 -24, -24, 224, 2431, -501, 2113, 293, 291, -501, -501,
3051 2113, 2229, -501, 243, 257, 1381, -501, -501, 270, -501,
3052 -501, -501, -501, 1249, -501, 418, 2113, -501, 68, 380,
3053 267, 302, -501, -501, -501, 278, 277, 1905, -501, 2803,
3054 -501, -501, 303, 2803, 308, 309, 275, 985, -501, -19,
3055 314, 281, 220, 299, 418, 402, 418, 292, 236, 328,
3056 -501, 307, 18, 19, -501, -501, -501, -501, 2113, 341,
3057 -501, 368, 2113, -501, -501, 2113, 2493, 2113, 342, -501,
3058 368, -501, 301, 317, 2113, -501, -501, 1249, 315, 313,
3059 2113, 308, -501, -501, 236, 28, 48, 384, 2113, -501,
3060 -501, -501, -501, 2113, -501, -501, -501, 2113, -501, -501,
3061 -501, 25, -501, 418, 323, -501, 350, -501, 309, 347,
3062 -501, -501, -501, -501, -501, 352, 37, 2555, 368, -501,
3063 -501, 2803, 2299, -501, 2617, 368, -501, -501, 49, 2679,
3064 320, -501, -501, 2803, 351, 331, 380, -501, 337, 332,
3065 -501, -501, 48, -501, -501, -501, -501, 2803, -29, -501,
3066 333, 350, -501, 418, 234, -501, -501, -501, -501, 353,
3067 -501, 2113, -501, 356, -501, -501, -501, -501, -501, -501,
3068 2113, 366, 348, 49, -501, -501, -501, -501, -501, -501,
3069 -501, -501, 472, -501, -501, -501, -501, 236, 1513, -501,
3070 478, -501, 457, 354, 280, -501, 14, 2803, 370, -501,
3071 17, 2741, 1905, -501, -501, -501, 1905, 1905, 236, -501,
3072 364, -501, -501, 365, 72, 360, 1645, -501, -501, -501,
3073 -501, 27, -501, -501, -501, 361, 14, 17, 1905, -501,
3074 369, 372, 349, -501, 1513, -501, -501, 494, 395, -501,
3075 -501, -501, -501, -501, -501, 1905, 375, 386, -501, 399,
3076 385, 378, -501, 25, -501, 1905, -501, 379, 381, 236,
3080 /* YYPGOTO[NTERM-NUM]. */
3081 static const yytype_int16 yypgoto[] =
3083 -501, -501, 355, -501, 462, -331, -501, 162, -470, -36,
3084 1, -57, 420, 61, -501, 2, 62, 459, 374, 137,
3085 -334, -501, -501, -501, -501, -501, -501, -501, -501, -501,
3086 -501, -501, -501, -501, -501, 5, 6, -501, -501, 32,
3087 -501, 33, -501, -501, -501, -501, -501, -501, -501, -501,
3088 -7, 39, -501, -501, -501, -501, 0, -501, 458, -501,
3089 -501, -501, 63, -501, 67, -501, -53, -501, -33, -501,
3090 -501, -10, -501, 3, -501, -501, 76, 52, -501, -501,
3091 -501, -501, -500, -501, -501, -170, -501, -455, -501, -497,
3092 -501, -422, -501, 252, -430, -501, -342, -39, 4, -501,
3093 -501, -501, -501, -501, 510, -102, 90, 116, -270, -501,
3094 -110, -501, -501, -501, -501, -501, -501, -501, -130, -77,
3095 501, -52, -501, 289, -501, -12, -501, -191, -189, -501,
3096 -501, -501, -501, -501, -501
3099 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
3100 positive, shift that token. If negative, reduce the rule which
3101 number is the opposite. If zero, do what YYDEFACT says.
3102 If YYTABLE_NINF, syntax error. */
3103 #define YYTABLE_NINF -338
3104 static const yytype_int16 yytable[] =
3106 71, 56, 58, 76, 81, 106, 249, 111, 173, 389,
3107 174, 255, 114, 266, 154, 421, 119, 186, 291, 292,
3108 106, 500, 508, 461, 463, 94, 124, 433, 368, 134,
3109 135, 368, 428, 136, 137, 138, 140, 145, 252, 320,
3110 321, 174, 508, 347, 514, 348, 437, 262, 258, 574,
3111 -74, 107, 102, 103, 71, 56, 58, 76, 81, 550,
3112 216, 57, 284, 74, 93, 104, 117, 75, 214, 215,
3113 216, 271, 272, 190, 588, 488, 96, 99, 285, 590,
3114 263, 489, 579, 520, 140, 443, 580, 581, 176, 108,
3115 599, 549, 233, 487, 577, 234, 480, 276, 177, 95,
3116 232, 245, 233, 140, 179, 234, 536, 121, 591, 145,
3117 112, 521, 122, 140, 499, 57, 115, 74, 181, 120,
3118 369, 75, 342, 486, 292, 601, 320, 321, 458, 510,
3119 381, 145, 409, 123, 410, 608, 140, 140, 164, 102,
3120 103, 165, 187, 187, 530, 511, 187, 187, 509, 510,
3121 404, 167, 104, 322, 405, 418, 126, 419, 127, 125,
3122 535, 128, 129, 130, 485, 511, 323, 71, 56, 58,
3123 76, 81, 430, 607, 431, 290, 190, 235, 296, 297,
3124 298, 299, 300, 301, 302, 303, 304, 305, 306, 307,
3125 308, 309, 310, 311, 312, 313, 314, 315, 316, 317,
3126 318, 319, 559, 390, 391, 327, 328, 329, 330, 331,
3127 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
3128 145, 343, 470, 449, 236, 450, 243, 244, 57, 351,
3129 74, 476, 462, 464, 75, 239, 251, 364, 184, -111,
3130 322, 387, 71, 56, 358, 379, 375, 344, 145, 345,
3131 383, 253, 13, 346, 15, 16, 429, 18, 256, 20,
3132 257, 100, 101, 259, 260, 261, 264, 560, 140, 140,
3133 265, 267, 25, 422, 102, 103, 320, 321, 268, 516,
3134 540, 30, 31, 32, 184, 274, 519, 104, 582, 102,
3135 103, -75, 452, 277, 455, 176, 320, 321, 13, 279,
3136 15, 16, 104, 18, 280, 20, 281, 282, 496, 102,
3137 103, 100, 101, 283, 287, 288, 349, 262, 25, 350,
3138 276, -117, 104, 365, 102, 103, 540, 30, 31, 32,
3139 276, 366, 373, 416, 378, 541, 380, 104, 140, 611,
3140 386, 145, 384, 388, 439, 392, 393, 100, 101, 394,
3141 398, 455, 396, 402, 145, 71, 56, 358, 375, 413,
3142 102, 103, -335, 71, 56, 358, 116, 101, -158, 403,
3143 -241, 100, 101, 104, -337, -336, 411, 245, 176, 102,
3144 103, 541, 420, 368, 102, 103, 105, 245, 177, 245,
3145 322, 425, 104, 178, 179, 498, 467, 104, 427, 408,
3146 471, 539, 434, 472, 435, 474, 180, -116, 181, 438,
3147 322, 436, 479, 443, -159, 447, 448, 453, 483, 417,
3148 457, 100, 101, 451, 245, 440, 145, 71, 56, 358,
3149 459, 497, 468, 475, 102, 103, 477, 168, 110, 3,
3150 4, 460, 5, 6, 7, 478, 245, 104, 482, 481,
3151 494, 502, 503, 14, 527, 430, 532, 184, 19, 529,
3152 21, 374, 22, 23, 507, 531, 147, 548, 537, 546,
3153 24, 13, 552, 15, 16, 558, 18, 28, 20, 29,
3154 169, 570, 553, 571, 594, 469, 576, 34, 572, 35,
3155 36, 25, 583, 584, 585, 589, 245, 597, 38, 547,
3156 30, 31, 32, 592, 542, 40, 593, 598, 551, 602,
3157 603, 604, 606, 605, 609, 610, 166, 426, 240, 170,
3158 505, 269, 278, 445, 533, 534, 41, 42, 554, 555,
3159 185, 596, 587, 586, 573, 506, 528, 118, 564, 562,
3160 563, 568, 569, 501, 542, 44, 407, 484, 45, 139,
3161 382, 0, 0, 46, 47, 0, 0, 0, 48, 0,
3162 49, 0, 0, 0, 51, 0, 564, 562, 563, 568,
3163 569, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3164 0, 0, 0, 0, 564, 562, 563, 568, 569, -4,
3165 0, 0, 1, 2, 3, 4, 0, 5, 6, 7,
3166 8, 9, 10, 11, 0, 0, 12, 13, 14, 15,
3167 16, 17, 18, 19, 20, 0, 0, 22, 23, 0,
3168 0, 191, 0, 0, 0, 24, 0, 25, 26, 0,
3169 27, 0, 28, 0, 29, 0, 30, 31, 32, 0,
3170 0, 33, 34, 0, 35, 36, 0, 0, 0, -338,
3171 -338, -338, 37, 38, 39, 0, 0, 199, 200, 0,
3172 40, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3173 0, 0, 0, 214, 215, 216, 0, 217, 218, 219,
3174 0, 41, 42, 0, 0, 0, 0, 0, 0, 0,
3175 43, 0, 225, 226, 0, 227, 228, 229, 230, 231,
3176 44, 0, 0, 45, 0, 232, 0, 233, 46, 47,
3177 234, 0, 0, 48, 0, 49, 0, 50, 0, 51,
3178 0, 0, 0, -4, 1, 2, 3, 4, 0, 5,
3179 6, 7, 8, 9, 10, 11, 0, 0, 0, 13,
3180 14, 15, 16, 17, 18, 19, 20, 21, 0, 22,
3181 23, 146, 0, 147, 0, 0, 0, 24, 148, 25,
3182 26, 0, 27, 149, 28, 0, 29, 150, 30, 31,
3183 32, 0, 0, 33, 34, 0, 35, 36, 0, 0,
3184 0, -138, 0, 0, 37, 38, 39, 0, 151, 0,
3185 0, 0, 40, -138, 0, -138, 0, -138, -138, 0,
3186 -138, 0, -138, -138, 0, 214, 215, 216, -138, -138,
3187 0, 0, 0, 41, 42, -138, 0, 0, 0, 0,
3188 0, -138, 152, -138, -138, -138, -138, 227, 228, 229,
3189 230, 231, 44, 0, 0, 45, 0, 232, 0, 233,
3190 46, 47, 234, 0, 0, 48, 0, 49, 0, 50,
3191 0, 51, 0, 0, 0, 153, 1, 2, 3, 4,
3192 0, 5, 6, 7, 8, 9, 10, 11, 0, 0,
3193 0, 13, 14, 15, 16, 17, 18, 19, 20, 21,
3194 0, 22, 23, 146, 0, 147, 0, 0, 0, 24,
3195 148, 25, 26, 0, 27, 149, 28, 0, 29, 150,
3196 30, 31, 32, 0, 0, 33, 34, 0, 35, 36,
3197 214, 215, 216, 0, 0, 0, 37, 38, 39, 0,
3198 151, 0, 0, 0, 40, 0, 0, 0, 0, 0,
3199 0, 0, 0, 0, 229, 230, 231, 0, 0, 0,
3200 0, 0, 232, 0, 233, 41, 42, 234, 0, 0,
3201 0, 0, 0, 0, 152, 0, 0, 0, 0, 0,
3202 0, 0, 0, 0, 44, 0, 0, 45, 0, 0,
3203 0, 0, 46, 47, 0, 0, 0, 48, 0, 49,
3204 0, 50, 0, 51, 0, 0, 0, 275, 1, 2,
3205 3, 4, 0, 5, 6, 7, 8, 9, 10, 11,
3206 0, 0, 0, 13, 14, 15, 16, 17, 18, 19,
3207 20, 21, 0, 22, 23, 146, 0, 147, 0, 0,
3208 0, 24, 148, 25, 26, 0, 27, 149, 28, 0,
3209 29, 150, 30, 31, 32, 0, 0, 33, 34, 0,
3210 35, 36, 0, 0, 0, 0, 0, 0, 37, 38,
3211 39, 0, 151, 0, 0, 0, 40, 0, 0, 0,
3212 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3213 0, 0, 0, 0, 0, 0, 0, 41, 42, 0,
3214 0, 0, 0, 0, 0, 0, 152, 0, 0, 0,
3215 0, 0, 0, 0, 0, 0, 44, 0, 0, 45,
3216 0, 0, 0, 0, 46, 47, 0, 0, 0, 48,
3217 0, 49, 0, 50, 0, 51, 0, 0, 0, 446,
3218 1, 2, 3, 4, 0, 5, 6, 7, 8, 9,
3219 10, 11, 0, 0, 12, 13, 14, 15, 16, 17,
3220 18, 19, 20, 0, 0, 22, 23, 0, 0, -338,
3221 0, 0, 0, 24, 0, 25, 26, 0, 27, 0,
3222 28, 0, 29, 0, 30, 31, 32, 0, 0, 33,
3223 34, 0, 35, 36, 0, 0, 0, 0, 0, 0,
3224 37, 38, 39, 0, 0, -338, -338, 0, 40, 0,
3225 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3226 0, 214, 215, 216, 0, 217, 218, 219, 0, 41,
3227 42, 0, 0, 0, 0, 0, 0, 0, 43, 0,
3228 -338, -338, 0, 227, 228, 229, 230, 231, 44, 0,
3229 0, 45, 0, 232, 0, 233, 46, 47, 234, 0,
3230 0, 48, 0, 49, 0, 50, 0, 51, 0, 0,
3231 0, -3, 1, 2, 3, 4, 0, 5, 6, 7,
3232 8, 9, 10, 11, 0, 0, 0, 13, 14, 15,
3233 16, 17, 18, 19, 20, 0, 0, 22, 23, 0,
3234 0, 0, 0, 0, 0, 24, 0, 25, 26, 0,
3235 27, 0, 28, 0, 29, 0, 30, 31, 32, 0,
3236 0, 33, 34, 0, 35, 36, 0, 0, 0, 0,
3237 0, 0, 37, 38, 39, 0, 0, 0, 0, 0,
3238 40, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3239 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3240 0, 41, 42, 0, 0, 0, 0, 0, 0, 0,
3241 352, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3242 44, 0, 0, 45, 0, 0, 0, 0, 46, 47,
3243 0, 0, 0, 48, 0, 353, 0, 50, 0, 51,
3244 0, 0, 0, -15, 1, 2, 3, 4, 0, 5,
3245 6, 7, 8, 9, 10, 11, 0, 0, 0, 13,
3246 14, 15, 16, 17, 18, 19, 20, 0, 0, 22,
3247 23, 0, 0, 0, 0, 0, 0, 24, 0, 25,
3248 26, 0, 27, 0, 28, 0, 29, 0, 30, 31,
3249 32, 0, 0, 33, 34, 0, 35, 36, 0, 0,
3250 0, 0, 0, 0, 37, 38, 39, 0, 0, 0,
3251 0, 0, 40, 0, 0, 0, 0, 0, 0, 0,
3252 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3253 0, 0, 0, 41, 42, 0, 0, 0, 0, 0,
3254 0, 0, 352, 0, 0, 0, 0, 0, 0, 0,
3255 0, 0, 44, 0, 0, 45, 0, 0, 0, 0,
3256 46, 47, 0, 0, 0, 48, 0, 353, 0, 50,
3257 0, 51, 0, 0, 0, -16, 1, 2, 3, 4,
3258 0, 5, 6, 7, 8, 9, 10, 11, 0, 0,
3259 0, 13, 14, 15, 16, 17, 18, 19, 20, 0,
3260 0, 22, 23, 0, 0, 0, 0, 0, 0, 24,
3261 0, 25, 26, 0, 27, 0, 28, 0, 29, 0,
3262 30, 31, 32, 0, 0, 33, 34, 0, 35, 36,
3263 0, 0, 0, 0, 0, 0, 37, 38, 39, 0,
3264 0, 0, 0, 0, 40, 0, 0, 0, 0, 0,
3265 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3266 0, 0, 0, 0, 0, 41, 42, 0, 0, 0,
3267 0, 0, 0, 0, 561, 0, 0, 0, 0, 0,
3268 0, 0, 0, 0, 44, 0, 0, 45, 0, 0,
3269 0, 0, 46, 47, 0, 0, 0, 48, 0, 49,
3270 0, 50, 0, 51, 0, 0, 0, -149, 1, 2,
3271 3, 4, 0, 5, 6, 7, 8, 9, 10, 11,
3272 0, 0, 0, 13, 14, 15, 16, 17, 18, 19,
3273 20, 0, 0, 22, 23, 0, 0, 0, 0, 0,
3274 0, 24, 0, 25, 26, 0, 27, 0, 28, 0,
3275 29, 0, 30, 31, 32, 0, 0, 33, 34, 0,
3276 35, 36, 0, 0, 0, 0, 0, 0, 37, 38,
3277 39, 0, 0, 0, 0, 0, 40, 0, 0, 0,
3278 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3279 0, 0, 0, 0, 0, 0, 0, 41, 42, 0,
3280 0, 0, 0, 0, 0, 0, 561, 0, 0, 0,
3281 0, 0, 0, 0, 0, 0, 44, 0, 0, 45,
3282 0, 0, 0, 0, 46, 47, 0, 0, 0, 48,
3283 0, 49, 0, 50, 0, 51, 0, -3, 0, -150,
3284 1, 2, 3, 4, 0, 5, 6, 7, 8, 9,
3285 10, 11, 0, 0, 12, 13, 14, 15, 16, 17,
3286 18, 19, 20, 0, 0, 22, 23, 0, 0, 0,
3287 0, 0, 0, 24, 0, 25, 26, 0, 27, 0,
3288 28, 0, 29, 0, 30, 31, 32, 0, 0, 33,
3289 34, 0, 35, 36, 0, 0, 0, 0, 0, 0,
3290 37, 38, 39, 0, 0, 0, 0, 0, 40, 0,
3291 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3292 0, 0, 0, 0, 0, 0, 0, 0, 0, 41,
3293 42, 0, 0, 0, 0, 0, 0, 0, 43, 0,
3294 0, 0, 0, 0, 0, 0, 0, 0, 44, 0,
3295 0, 45, 0, 0, 0, 0, 46, 47, 0, 0,
3296 0, 48, 0, 49, 0, 50, 0, 51, 1, 2,
3297 3, 4, 0, 5, 6, 7, 8, 9, 10, 11,
3298 0, -125, 0, 13, 14, 15, 16, 17, 18, 19,
3299 20, 21, 0, 22, 23, 146, 0, 147, 0, 0,
3300 0, 24, 148, 25, 26, 0, 27, 149, 28, 0,
3301 29, 150, 30, 31, 32, 0, 0, 33, 34, 0,
3302 35, 36, 0, 0, 0, 0, 0, 0, 37, 38,
3303 39, 0, 151, 0, 0, 0, 40, 0, 0, 0,
3304 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3305 0, 0, 0, 0, 0, 0, 0, 41, 42, 0,
3306 0, 0, 0, 0, 0, 0, 152, 0, 0, 0,
3307 0, 0, 0, 0, 0, 0, 44, 0, 0, 45,
3308 0, 0, 0, 0, 46, 47, 0, 0, 0, 48,
3309 0, 49, 0, 50, 0, 51, 1, 2, 3, 4,
3310 0, 5, 6, 7, 8, 9, 10, 11, 0, 0,
3311 0, 13, 14, 15, 16, 17, 18, 19, 20, 21,
3312 0, 22, 23, 146, 0, 147, 0, 0, 0, 24,
3313 148, 25, 26, 0, 27, 149, 28, 0, 29, 150,
3314 30, 31, 32, 0, 0, 33, 34, 0, 35, 36,
3315 0, 0, 0, 0, 0, 0, 37, 38, 39, 0,
3316 151, 0, 0, 0, 40, 0, 0, 0, 0, 0,
3317 0, 0, 0, 0, 0, 0, 109, 110, 3, 4,
3318 0, 5, 6, 7, 0, 41, 42, 0, 0, 0,
3319 0, 0, 14, 0, 152, 0, 0, 19, 0, 21,
3320 0, 22, 23, 0, 44, 0, 0, 45, 0, 24,
3321 0, 0, 46, 47, 0, 0, 28, 48, 29, 49,
3322 0, 50, 0, 51, 0, 0, 34, 0, 35, 36,
3323 0, 0, 0, 109, 110, 3, 4, 38, 5, 6,
3324 7, 0, 0, 0, 40, 0, 0, 0, 0, 14,
3325 0, 0, 0, 0, 19, 0, 21, 0, 22, 23,
3326 0, 0, 0, 0, 0, 41, 42, 0, 0, 0,
3327 0, 0, 0, 0, 0, 29, 0, 0, 0, 0,
3328 0, 0, 0, 34, 44, 35, 36, 45, 0, 0,
3329 0, 0, 46, 47, 0, 0, 0, 48, 0, 49,
3330 0, 40, 0, 51, 0, 0, 0, 0, 0, 0,
3331 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3332 0, 0, 41, 42, 0, 0, 0, 0, 0, 191,
3333 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3334 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3335 0, 0, 0, 0, 48, 0, 49, 192, 193, 194,
3336 51, 195, 196, 197, 198, 199, 200, 201, 202, 203,
3337 204, 205, 206, 207, 208, 209, 210, 211, 212, 213,
3338 0, 214, 215, 216, 0, 217, 218, 219, 0, 0,
3339 0, 0, 0, 220, 221, 0, 222, 223, 224, 191,
3340 225, 226, 0, 227, 228, 229, 230, 231, 0, 0,
3341 0, 0, 0, 232, 0, 233, 0, 0, 234, 0,
3342 0, 0, 0, 0, 423, 0, 0, 192, 193, 194,
3343 0, 195, 196, 197, 198, 199, 200, 201, 202, 203,
3344 204, 205, 206, 207, 208, 209, 210, 211, 212, 213,
3345 0, 214, 215, 216, 0, 217, 218, 219, 0, 0,
3346 0, 0, 0, 220, 221, 0, 222, 223, 224, 191,
3347 225, 226, 0, 227, 228, 229, 230, 231, 0, 0,
3348 0, 0, 0, 232, 0, 233, 0, 0, 234, 0,
3349 0, 0, 0, 0, 517, 0, 0, 192, 193, 194,
3350 0, 195, 196, 197, 198, 199, 200, 201, 202, 203,
3351 204, 205, 206, 207, 208, 209, 210, 211, 212, 213,
3352 0, 214, 215, 216, 0, 217, 218, 219, 0, 0,
3353 0, 191, 0, 220, 221, 412, 222, 223, 224, 0,
3354 225, 226, 0, 227, 228, 229, 230, 231, 0, 0,
3355 0, 0, 0, 232, 0, 233, 0, 0, 234, 192,
3356 193, 194, 0, 195, 196, 197, 198, 199, 200, 201,
3357 202, 203, 204, 205, 206, 207, 208, 209, 210, 211,
3358 212, 213, 0, 214, 215, 216, 0, 217, 218, 219,
3359 0, 0, 0, 191, 0, 220, 221, 0, 222, 223,
3360 224, 0, 225, 226, 0, 227, 228, 229, 230, 231,
3361 0, 0, 0, 0, 0, 232, 0, 233, 414, 0,
3362 234, 192, 193, 194, 0, 195, 196, 197, 198, 199,
3363 200, 201, 202, 203, 204, 205, 206, 207, 208, 209,
3364 210, 211, 212, 213, 0, 214, 215, 216, 0, 217,
3365 218, 219, 0, 0, 0, 191, 0, 220, 221, 0,
3366 222, 223, 224, 0, 225, 226, 0, 227, 228, 229,
3367 230, 231, 0, 0, 0, 0, 0, 232, 0, 233,
3368 473, 0, 234, 192, 193, 194, 0, 195, 196, 197,
3369 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
3370 208, 209, 210, 211, 212, 213, 0, 214, 215, 216,
3371 0, 217, 218, 219, 0, 0, 0, 191, 0, 220,
3372 221, 0, 222, 223, 224, 0, 225, 226, 0, 227,
3373 228, 229, 230, 231, 0, 0, 0, 0, 0, 232,
3374 0, 233, 515, 0, 234, 192, 193, 194, 0, 195,
3375 196, 197, 198, 199, 200, 201, 202, 203, 204, 205,
3376 206, 207, 208, 209, 210, 211, 212, 213, 0, 214,
3377 215, 216, 0, 217, 218, 219, 0, 0, 0, 191,
3378 0, 220, 221, 0, 222, 223, 224, 0, 225, 226,
3379 0, 227, 228, 229, 230, 231, 0, 0, 0, 0,
3380 0, 232, 0, 233, 518, 0, 234, 192, 193, 194,
3381 0, 195, 196, 197, 198, 199, 200, 201, 202, 203,
3382 204, 205, 206, 207, 208, 209, 210, 211, 212, 213,
3383 0, 214, 215, 216, 0, 217, 218, 219, 0, 0,
3384 0, 191, 0, 220, 221, 0, 222, 223, 224, 0,
3385 225, 226, 0, 227, 228, 229, 230, 231, 0, 0,
3386 0, 0, 0, 232, 0, 233, 526, 0, 234, 192,
3387 193, 194, 0, 195, 196, 197, 198, 199, 200, 201,
3388 202, 203, 204, 205, 206, 207, 208, 209, 210, 211,
3389 212, 213, 0, 214, 215, 216, 0, 217, 218, 219,
3390 0, 0, 0, 191, 0, 220, 221, 578, 222, 223,
3391 224, 0, 225, 226, 0, 227, 228, 229, 230, 231,
3392 0, 0, 0, 0, 0, 232, 0, 233, 0, 0,
3393 234, 192, 193, 194, 0, 195, 196, 197, 198, 199,
3394 200, 201, 202, 203, 204, 205, 206, 207, 208, 209,
3395 210, 211, 212, 213, 0, 214, 215, 216, 0, 217,
3396 218, 219, 0, 0, 0, 191, 0, 220, 221, 0,
3397 222, 223, 224, 0, 225, 226, 0, 227, 228, 229,
3398 230, 231, 0, 0, 0, 0, 0, 232, 0, 233,
3399 0, 0, 234, 192, 193, 194, 0, 195, 196, 197,
3400 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
3401 208, 209, 210, 211, 212, 213, 0, 214, 215, 216,
3402 0, 217, 218, 219, 0, 0, 0, 191, 0, 220,
3403 221, 0, 222, 223, 224, 0, 0, 226, 0, 227,
3404 228, 229, 230, 231, 0, 0, 0, 0, 0, 232,
3405 0, 233, 0, 0, 234, 192, 193, 194, 0, 195,
3406 196, 197, 198, 199, 200, 0, 0, 0, 0, 0,
3407 0, 0, 0, 0, 0, 0, 0, 213, 0, 214,
3408 215, 216, 0, 217, 218, 219, 0, 0, 0, 191,
3409 0, 0, 0, 0, 222, 223, 224, 0, 225, 226,
3410 0, 227, 228, 229, 230, 231, 0, 0, 0, 0,
3411 0, 232, 0, 233, 0, 0, 234, 192, 193, 194,
3412 0, 195, 196, 197, 198, 199, 200, 0, 0, 0,
3413 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3414 0, 214, 215, 216, 0, 217, 218, 219, 0, 0,
3415 0, 191, 0, 0, 0, 0, 222, 223, 224, 0,
3416 225, 226, 0, 227, 228, 229, 230, 231, 0, 0,
3417 0, 0, 0, 232, 0, 233, 0, 0, 234, 192,
3418 193, 194, 0, 195, 196, 197, 198, 199, 200, 0,
3419 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3420 0, 0, 0, 214, 215, 216, 0, 217, 218, 219,
3421 0, 0, 0, 191, 0, 0, 0, 0, 0, 223,
3422 224, 0, 225, 226, 0, 227, 228, 229, 230, 231,
3423 0, 0, 0, 0, 0, 232, 0, 233, 0, 0,
3424 234, 192, 193, 194, 0, 195, 196, 197, 198, 199,
3425 200, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3426 0, 0, 0, 0, 0, 214, 215, 216, 0, 217,
3427 218, 219, 0, 0, 0, 191, 0, 0, 0, 0,
3428 0, 0, 224, 0, 225, 226, 0, 227, 228, 229,
3429 230, 231, 0, 0, 0, 0, 0, 232, 0, 233,
3430 0, 0, 234, 192, 193, 194, 0, 195, 196, 197,
3431 198, 199, 200, 0, 0, 0, 0, 0, 0, 0,
3432 0, 0, 0, 0, 0, 0, 0, 214, 215, 216,
3433 0, 217, 218, 219, 0, 0, 0, 191, 0, 0,
3434 0, 0, 0, 0, -338, 0, 225, 226, 0, 227,
3435 228, 229, 230, 231, 0, 0, 0, 0, 0, 232,
3436 0, 233, 0, 0, 234, 192, 193, 194, 0, -338,
3437 -338, -338, -338, 199, 200, 0, 0, 0, 0, 0,
3438 0, 0, 0, 0, 0, 0, 0, 0, 0, 214,
3439 215, 216, 0, 217, 218, 219, 0, 0, 0, 0,
3440 0, 0, 0, 0, 0, 0, 0, 0, 225, 226,
3441 0, 227, 228, 229, 230, 231, 0, 0, 0, 0,
3442 0, 232, 0, 233, 0, 0, 234
3445 static const yytype_int16 yycheck[] =
3447 0, 0, 0, 0, 0, 12, 108, 19, 60, 279,
3448 67, 121, 24, 143, 50, 349, 28, 3, 3, 189,
3449 27, 451, 5, 5, 5, 50, 38, 369, 3, 41,
3450 42, 3, 363, 45, 46, 47, 48, 49, 115, 3,
3451 4, 98, 5, 234, 466, 234, 380, 102, 125, 546,
3452 69, 12, 16, 17, 54, 54, 54, 54, 54, 514,
3453 94, 0, 35, 0, 91, 29, 27, 0, 92, 93,
3454 94, 148, 149, 102, 574, 27, 124, 124, 51, 576,
3455 135, 33, 552, 34, 96, 104, 556, 557, 16, 16,
3456 590, 513, 126, 435, 549, 129, 427, 154, 26, 124,
3457 124, 108, 126, 115, 32, 129, 135, 124, 578, 121,
3458 3, 62, 129, 125, 448, 54, 124, 54, 46, 128,
3459 95, 54, 232, 95, 294, 595, 3, 4, 398, 112,
3460 260, 143, 323, 16, 323, 605, 148, 149, 3, 16,
3461 17, 0, 128, 128, 486, 128, 128, 128, 111, 112,
3462 112, 128, 29, 117, 116, 346, 3, 346, 5, 124,
3463 494, 8, 9, 10, 434, 128, 130, 167, 167, 167,
3464 167, 167, 104, 603, 106, 187, 102, 3, 190, 191,
3465 192, 193, 194, 195, 196, 197, 198, 199, 200, 201,
3466 202, 203, 204, 205, 206, 207, 208, 209, 210, 211,
3467 212, 213, 536, 280, 281, 217, 218, 219, 220, 221,
3468 222, 223, 224, 225, 226, 227, 228, 229, 230, 231,
3469 232, 233, 411, 3, 124, 5, 128, 129, 167, 241,
3470 167, 420, 402, 403, 167, 12, 124, 244, 4, 129,
3471 117, 277, 242, 242, 242, 257, 253, 124, 260, 126,
3472 262, 129, 18, 130, 20, 21, 366, 23, 3, 25,
3473 104, 3, 4, 134, 106, 102, 127, 537, 280, 281,
3474 102, 3, 38, 350, 16, 17, 3, 4, 3, 468,
3475 46, 47, 48, 49, 4, 3, 475, 29, 558, 16,
3476 17, 69, 394, 128, 396, 16, 3, 4, 18, 3,
3477 20, 21, 29, 23, 101, 25, 69, 101, 438, 16,
3478 17, 3, 4, 3, 3, 3, 135, 102, 38, 124,
3479 377, 129, 29, 129, 16, 17, 46, 47, 48, 49,
3480 387, 124, 135, 345, 135, 101, 135, 29, 350, 609,
3481 102, 353, 106, 134, 36, 104, 3, 3, 4, 54,
3482 3, 453, 54, 104, 366, 355, 355, 355, 365, 135,
3483 16, 17, 91, 363, 363, 363, 3, 4, 134, 104,
3484 127, 3, 4, 29, 91, 91, 91, 384, 16, 16,
3485 17, 101, 91, 3, 16, 17, 128, 394, 26, 396,
3486 117, 134, 29, 31, 32, 447, 408, 29, 128, 126,
3487 412, 503, 135, 415, 102, 417, 44, 129, 46, 106,
3488 117, 134, 424, 104, 134, 101, 135, 15, 430, 126,
3489 128, 3, 4, 124, 431, 117, 438, 427, 427, 427,
3490 102, 443, 91, 91, 16, 17, 135, 3, 4, 5,
3491 6, 134, 8, 9, 10, 128, 453, 29, 135, 134,
3492 66, 128, 102, 19, 134, 104, 124, 4, 24, 128,
3493 26, 117, 28, 29, 112, 128, 32, 111, 135, 116,
3494 36, 18, 106, 20, 21, 3, 23, 43, 25, 45,
3495 46, 3, 134, 26, 135, 117, 116, 53, 134, 55,
3496 56, 38, 128, 128, 134, 134, 503, 3, 64, 511,
3497 47, 48, 49, 134, 504, 71, 134, 112, 520, 134,
3498 124, 112, 134, 128, 135, 134, 54, 355, 98, 60,
3499 458, 147, 167, 386, 492, 492, 92, 93, 523, 523,
3500 72, 584, 571, 566, 544, 459, 484, 27, 538, 538,
3501 538, 538, 538, 453, 544, 111, 294, 431, 114, 48,
3502 261, -1, -1, 119, 120, -1, -1, -1, 124, -1,
3503 126, -1, -1, -1, 130, -1, 566, 566, 566, 566,
3504 566, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3505 -1, -1, -1, -1, 584, 584, 584, 584, 584, 0,
3506 -1, -1, 3, 4, 5, 6, -1, 8, 9, 10,
3507 11, 12, 13, 14, -1, -1, 17, 18, 19, 20,
3508 21, 22, 23, 24, 25, -1, -1, 28, 29, -1,
3509 -1, 40, -1, -1, -1, 36, -1, 38, 39, -1,
3510 41, -1, 43, -1, 45, -1, 47, 48, 49, -1,
3511 -1, 52, 53, -1, 55, 56, -1, -1, -1, 68,
3512 69, 70, 63, 64, 65, -1, -1, 76, 77, -1,
3513 71, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3514 -1, -1, -1, 92, 93, 94, -1, 96, 97, 98,
3515 -1, 92, 93, -1, -1, -1, -1, -1, -1, -1,
3516 101, -1, 111, 112, -1, 114, 115, 116, 117, 118,
3517 111, -1, -1, 114, -1, 124, -1, 126, 119, 120,
3518 129, -1, -1, 124, -1, 126, -1, 128, -1, 130,
3519 -1, -1, -1, 134, 3, 4, 5, 6, -1, 8,
3520 9, 10, 11, 12, 13, 14, -1, -1, -1, 18,
3521 19, 20, 21, 22, 23, 24, 25, 26, -1, 28,
3522 29, 30, -1, 32, -1, -1, -1, 36, 37, 38,
3523 39, -1, 41, 42, 43, -1, 45, 46, 47, 48,
3524 49, -1, -1, 52, 53, -1, 55, 56, -1, -1,
3525 -1, 4, -1, -1, 63, 64, 65, -1, 67, -1,
3526 -1, -1, 71, 16, -1, 18, -1, 20, 21, -1,
3527 23, -1, 25, 26, -1, 92, 93, 94, 31, 32,
3528 -1, -1, -1, 92, 93, 38, -1, -1, -1, -1,
3529 -1, 44, 101, 46, 47, 48, 49, 114, 115, 116,
3530 117, 118, 111, -1, -1, 114, -1, 124, -1, 126,
3531 119, 120, 129, -1, -1, 124, -1, 126, -1, 128,
3532 -1, 130, -1, -1, -1, 134, 3, 4, 5, 6,
3533 -1, 8, 9, 10, 11, 12, 13, 14, -1, -1,
3534 -1, 18, 19, 20, 21, 22, 23, 24, 25, 26,
3535 -1, 28, 29, 30, -1, 32, -1, -1, -1, 36,
3536 37, 38, 39, -1, 41, 42, 43, -1, 45, 46,
3537 47, 48, 49, -1, -1, 52, 53, -1, 55, 56,
3538 92, 93, 94, -1, -1, -1, 63, 64, 65, -1,
3539 67, -1, -1, -1, 71, -1, -1, -1, -1, -1,
3540 -1, -1, -1, -1, 116, 117, 118, -1, -1, -1,
3541 -1, -1, 124, -1, 126, 92, 93, 129, -1, -1,
3542 -1, -1, -1, -1, 101, -1, -1, -1, -1, -1,
3543 -1, -1, -1, -1, 111, -1, -1, 114, -1, -1,
3544 -1, -1, 119, 120, -1, -1, -1, 124, -1, 126,
3545 -1, 128, -1, 130, -1, -1, -1, 134, 3, 4,
3546 5, 6, -1, 8, 9, 10, 11, 12, 13, 14,
3547 -1, -1, -1, 18, 19, 20, 21, 22, 23, 24,
3548 25, 26, -1, 28, 29, 30, -1, 32, -1, -1,
3549 -1, 36, 37, 38, 39, -1, 41, 42, 43, -1,
3550 45, 46, 47, 48, 49, -1, -1, 52, 53, -1,
3551 55, 56, -1, -1, -1, -1, -1, -1, 63, 64,
3552 65, -1, 67, -1, -1, -1, 71, -1, -1, -1,
3553 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3554 -1, -1, -1, -1, -1, -1, -1, 92, 93, -1,
3555 -1, -1, -1, -1, -1, -1, 101, -1, -1, -1,
3556 -1, -1, -1, -1, -1, -1, 111, -1, -1, 114,
3557 -1, -1, -1, -1, 119, 120, -1, -1, -1, 124,
3558 -1, 126, -1, 128, -1, 130, -1, -1, -1, 134,
3559 3, 4, 5, 6, -1, 8, 9, 10, 11, 12,
3560 13, 14, -1, -1, 17, 18, 19, 20, 21, 22,
3561 23, 24, 25, -1, -1, 28, 29, -1, -1, 40,
3562 -1, -1, -1, 36, -1, 38, 39, -1, 41, -1,
3563 43, -1, 45, -1, 47, 48, 49, -1, -1, 52,
3564 53, -1, 55, 56, -1, -1, -1, -1, -1, -1,
3565 63, 64, 65, -1, -1, 76, 77, -1, 71, -1,
3566 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3567 -1, 92, 93, 94, -1, 96, 97, 98, -1, 92,
3568 93, -1, -1, -1, -1, -1, -1, -1, 101, -1,
3569 111, 112, -1, 114, 115, 116, 117, 118, 111, -1,
3570 -1, 114, -1, 124, -1, 126, 119, 120, 129, -1,
3571 -1, 124, -1, 126, -1, 128, -1, 130, -1, -1,
3572 -1, 134, 3, 4, 5, 6, -1, 8, 9, 10,
3573 11, 12, 13, 14, -1, -1, -1, 18, 19, 20,
3574 21, 22, 23, 24, 25, -1, -1, 28, 29, -1,
3575 -1, -1, -1, -1, -1, 36, -1, 38, 39, -1,
3576 41, -1, 43, -1, 45, -1, 47, 48, 49, -1,
3577 -1, 52, 53, -1, 55, 56, -1, -1, -1, -1,
3578 -1, -1, 63, 64, 65, -1, -1, -1, -1, -1,
3579 71, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3580 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3581 -1, 92, 93, -1, -1, -1, -1, -1, -1, -1,
3582 101, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3583 111, -1, -1, 114, -1, -1, -1, -1, 119, 120,
3584 -1, -1, -1, 124, -1, 126, -1, 128, -1, 130,
3585 -1, -1, -1, 134, 3, 4, 5, 6, -1, 8,
3586 9, 10, 11, 12, 13, 14, -1, -1, -1, 18,
3587 19, 20, 21, 22, 23, 24, 25, -1, -1, 28,
3588 29, -1, -1, -1, -1, -1, -1, 36, -1, 38,
3589 39, -1, 41, -1, 43, -1, 45, -1, 47, 48,
3590 49, -1, -1, 52, 53, -1, 55, 56, -1, -1,
3591 -1, -1, -1, -1, 63, 64, 65, -1, -1, -1,
3592 -1, -1, 71, -1, -1, -1, -1, -1, -1, -1,
3593 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3594 -1, -1, -1, 92, 93, -1, -1, -1, -1, -1,
3595 -1, -1, 101, -1, -1, -1, -1, -1, -1, -1,
3596 -1, -1, 111, -1, -1, 114, -1, -1, -1, -1,
3597 119, 120, -1, -1, -1, 124, -1, 126, -1, 128,
3598 -1, 130, -1, -1, -1, 134, 3, 4, 5, 6,
3599 -1, 8, 9, 10, 11, 12, 13, 14, -1, -1,
3600 -1, 18, 19, 20, 21, 22, 23, 24, 25, -1,
3601 -1, 28, 29, -1, -1, -1, -1, -1, -1, 36,
3602 -1, 38, 39, -1, 41, -1, 43, -1, 45, -1,
3603 47, 48, 49, -1, -1, 52, 53, -1, 55, 56,
3604 -1, -1, -1, -1, -1, -1, 63, 64, 65, -1,
3605 -1, -1, -1, -1, 71, -1, -1, -1, -1, -1,
3606 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3607 -1, -1, -1, -1, -1, 92, 93, -1, -1, -1,
3608 -1, -1, -1, -1, 101, -1, -1, -1, -1, -1,
3609 -1, -1, -1, -1, 111, -1, -1, 114, -1, -1,
3610 -1, -1, 119, 120, -1, -1, -1, 124, -1, 126,
3611 -1, 128, -1, 130, -1, -1, -1, 134, 3, 4,
3612 5, 6, -1, 8, 9, 10, 11, 12, 13, 14,
3613 -1, -1, -1, 18, 19, 20, 21, 22, 23, 24,
3614 25, -1, -1, 28, 29, -1, -1, -1, -1, -1,
3615 -1, 36, -1, 38, 39, -1, 41, -1, 43, -1,
3616 45, -1, 47, 48, 49, -1, -1, 52, 53, -1,
3617 55, 56, -1, -1, -1, -1, -1, -1, 63, 64,
3618 65, -1, -1, -1, -1, -1, 71, -1, -1, -1,
3619 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3620 -1, -1, -1, -1, -1, -1, -1, 92, 93, -1,
3621 -1, -1, -1, -1, -1, -1, 101, -1, -1, -1,
3622 -1, -1, -1, -1, -1, -1, 111, -1, -1, 114,
3623 -1, -1, -1, -1, 119, 120, -1, -1, -1, 124,
3624 -1, 126, -1, 128, -1, 130, -1, 0, -1, 134,
3625 3, 4, 5, 6, -1, 8, 9, 10, 11, 12,
3626 13, 14, -1, -1, 17, 18, 19, 20, 21, 22,
3627 23, 24, 25, -1, -1, 28, 29, -1, -1, -1,
3628 -1, -1, -1, 36, -1, 38, 39, -1, 41, -1,
3629 43, -1, 45, -1, 47, 48, 49, -1, -1, 52,
3630 53, -1, 55, 56, -1, -1, -1, -1, -1, -1,
3631 63, 64, 65, -1, -1, -1, -1, -1, 71, -1,
3632 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3633 -1, -1, -1, -1, -1, -1, -1, -1, -1, 92,
3634 93, -1, -1, -1, -1, -1, -1, -1, 101, -1,
3635 -1, -1, -1, -1, -1, -1, -1, -1, 111, -1,
3636 -1, 114, -1, -1, -1, -1, 119, 120, -1, -1,
3637 -1, 124, -1, 126, -1, 128, -1, 130, 3, 4,
3638 5, 6, -1, 8, 9, 10, 11, 12, 13, 14,
3639 -1, 16, -1, 18, 19, 20, 21, 22, 23, 24,
3640 25, 26, -1, 28, 29, 30, -1, 32, -1, -1,
3641 -1, 36, 37, 38, 39, -1, 41, 42, 43, -1,
3642 45, 46, 47, 48, 49, -1, -1, 52, 53, -1,
3643 55, 56, -1, -1, -1, -1, -1, -1, 63, 64,
3644 65, -1, 67, -1, -1, -1, 71, -1, -1, -1,
3645 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3646 -1, -1, -1, -1, -1, -1, -1, 92, 93, -1,
3647 -1, -1, -1, -1, -1, -1, 101, -1, -1, -1,
3648 -1, -1, -1, -1, -1, -1, 111, -1, -1, 114,
3649 -1, -1, -1, -1, 119, 120, -1, -1, -1, 124,
3650 -1, 126, -1, 128, -1, 130, 3, 4, 5, 6,
3651 -1, 8, 9, 10, 11, 12, 13, 14, -1, -1,
3652 -1, 18, 19, 20, 21, 22, 23, 24, 25, 26,
3653 -1, 28, 29, 30, -1, 32, -1, -1, -1, 36,
3654 37, 38, 39, -1, 41, 42, 43, -1, 45, 46,
3655 47, 48, 49, -1, -1, 52, 53, -1, 55, 56,
3656 -1, -1, -1, -1, -1, -1, 63, 64, 65, -1,
3657 67, -1, -1, -1, 71, -1, -1, -1, -1, -1,
3658 -1, -1, -1, -1, -1, -1, 3, 4, 5, 6,
3659 -1, 8, 9, 10, -1, 92, 93, -1, -1, -1,
3660 -1, -1, 19, -1, 101, -1, -1, 24, -1, 26,
3661 -1, 28, 29, -1, 111, -1, -1, 114, -1, 36,
3662 -1, -1, 119, 120, -1, -1, 43, 124, 45, 126,
3663 -1, 128, -1, 130, -1, -1, 53, -1, 55, 56,
3664 -1, -1, -1, 3, 4, 5, 6, 64, 8, 9,
3665 10, -1, -1, -1, 71, -1, -1, -1, -1, 19,
3666 -1, -1, -1, -1, 24, -1, 26, -1, 28, 29,
3667 -1, -1, -1, -1, -1, 92, 93, -1, -1, -1,
3668 -1, -1, -1, -1, -1, 45, -1, -1, -1, -1,
3669 -1, -1, -1, 53, 111, 55, 56, 114, -1, -1,
3670 -1, -1, 119, 120, -1, -1, -1, 124, -1, 126,
3671 -1, 71, -1, 130, -1, -1, -1, -1, -1, -1,
3672 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3673 -1, -1, 92, 93, -1, -1, -1, -1, -1, 40,
3674 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3675 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3676 -1, -1, -1, -1, 124, -1, 126, 68, 69, 70,
3677 130, 72, 73, 74, 75, 76, 77, 78, 79, 80,
3678 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
3679 -1, 92, 93, 94, -1, 96, 97, 98, -1, -1,
3680 -1, -1, -1, 104, 105, -1, 107, 108, 109, 40,
3681 111, 112, -1, 114, 115, 116, 117, 118, -1, -1,
3682 -1, -1, -1, 124, -1, 126, -1, -1, 129, -1,
3683 -1, -1, -1, -1, 135, -1, -1, 68, 69, 70,
3684 -1, 72, 73, 74, 75, 76, 77, 78, 79, 80,
3685 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
3686 -1, 92, 93, 94, -1, 96, 97, 98, -1, -1,
3687 -1, -1, -1, 104, 105, -1, 107, 108, 109, 40,
3688 111, 112, -1, 114, 115, 116, 117, 118, -1, -1,
3689 -1, -1, -1, 124, -1, 126, -1, -1, 129, -1,
3690 -1, -1, -1, -1, 135, -1, -1, 68, 69, 70,
3691 -1, 72, 73, 74, 75, 76, 77, 78, 79, 80,
3692 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
3693 -1, 92, 93, 94, -1, 96, 97, 98, -1, -1,
3694 -1, 40, -1, 104, 105, 106, 107, 108, 109, -1,
3695 111, 112, -1, 114, 115, 116, 117, 118, -1, -1,
3696 -1, -1, -1, 124, -1, 126, -1, -1, 129, 68,
3697 69, 70, -1, 72, 73, 74, 75, 76, 77, 78,
3698 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
3699 89, 90, -1, 92, 93, 94, -1, 96, 97, 98,
3700 -1, -1, -1, 40, -1, 104, 105, -1, 107, 108,
3701 109, -1, 111, 112, -1, 114, 115, 116, 117, 118,
3702 -1, -1, -1, -1, -1, 124, -1, 126, 127, -1,
3703 129, 68, 69, 70, -1, 72, 73, 74, 75, 76,
3704 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
3705 87, 88, 89, 90, -1, 92, 93, 94, -1, 96,
3706 97, 98, -1, -1, -1, 40, -1, 104, 105, -1,
3707 107, 108, 109, -1, 111, 112, -1, 114, 115, 116,
3708 117, 118, -1, -1, -1, -1, -1, 124, -1, 126,
3709 127, -1, 129, 68, 69, 70, -1, 72, 73, 74,
3710 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
3711 85, 86, 87, 88, 89, 90, -1, 92, 93, 94,
3712 -1, 96, 97, 98, -1, -1, -1, 40, -1, 104,
3713 105, -1, 107, 108, 109, -1, 111, 112, -1, 114,
3714 115, 116, 117, 118, -1, -1, -1, -1, -1, 124,
3715 -1, 126, 127, -1, 129, 68, 69, 70, -1, 72,
3716 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
3717 83, 84, 85, 86, 87, 88, 89, 90, -1, 92,
3718 93, 94, -1, 96, 97, 98, -1, -1, -1, 40,
3719 -1, 104, 105, -1, 107, 108, 109, -1, 111, 112,
3720 -1, 114, 115, 116, 117, 118, -1, -1, -1, -1,
3721 -1, 124, -1, 126, 127, -1, 129, 68, 69, 70,
3722 -1, 72, 73, 74, 75, 76, 77, 78, 79, 80,
3723 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
3724 -1, 92, 93, 94, -1, 96, 97, 98, -1, -1,
3725 -1, 40, -1, 104, 105, -1, 107, 108, 109, -1,
3726 111, 112, -1, 114, 115, 116, 117, 118, -1, -1,
3727 -1, -1, -1, 124, -1, 126, 127, -1, 129, 68,
3728 69, 70, -1, 72, 73, 74, 75, 76, 77, 78,
3729 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
3730 89, 90, -1, 92, 93, 94, -1, 96, 97, 98,
3731 -1, -1, -1, 40, -1, 104, 105, 106, 107, 108,
3732 109, -1, 111, 112, -1, 114, 115, 116, 117, 118,
3733 -1, -1, -1, -1, -1, 124, -1, 126, -1, -1,
3734 129, 68, 69, 70, -1, 72, 73, 74, 75, 76,
3735 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
3736 87, 88, 89, 90, -1, 92, 93, 94, -1, 96,
3737 97, 98, -1, -1, -1, 40, -1, 104, 105, -1,
3738 107, 108, 109, -1, 111, 112, -1, 114, 115, 116,
3739 117, 118, -1, -1, -1, -1, -1, 124, -1, 126,
3740 -1, -1, 129, 68, 69, 70, -1, 72, 73, 74,
3741 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
3742 85, 86, 87, 88, 89, 90, -1, 92, 93, 94,
3743 -1, 96, 97, 98, -1, -1, -1, 40, -1, 104,
3744 105, -1, 107, 108, 109, -1, -1, 112, -1, 114,
3745 115, 116, 117, 118, -1, -1, -1, -1, -1, 124,
3746 -1, 126, -1, -1, 129, 68, 69, 70, -1, 72,
3747 73, 74, 75, 76, 77, -1, -1, -1, -1, -1,
3748 -1, -1, -1, -1, -1, -1, -1, 90, -1, 92,
3749 93, 94, -1, 96, 97, 98, -1, -1, -1, 40,
3750 -1, -1, -1, -1, 107, 108, 109, -1, 111, 112,
3751 -1, 114, 115, 116, 117, 118, -1, -1, -1, -1,
3752 -1, 124, -1, 126, -1, -1, 129, 68, 69, 70,
3753 -1, 72, 73, 74, 75, 76, 77, -1, -1, -1,
3754 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3755 -1, 92, 93, 94, -1, 96, 97, 98, -1, -1,
3756 -1, 40, -1, -1, -1, -1, 107, 108, 109, -1,
3757 111, 112, -1, 114, 115, 116, 117, 118, -1, -1,
3758 -1, -1, -1, 124, -1, 126, -1, -1, 129, 68,
3759 69, 70, -1, 72, 73, 74, 75, 76, 77, -1,
3760 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3761 -1, -1, -1, 92, 93, 94, -1, 96, 97, 98,
3762 -1, -1, -1, 40, -1, -1, -1, -1, -1, 108,
3763 109, -1, 111, 112, -1, 114, 115, 116, 117, 118,
3764 -1, -1, -1, -1, -1, 124, -1, 126, -1, -1,
3765 129, 68, 69, 70, -1, 72, 73, 74, 75, 76,
3766 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3767 -1, -1, -1, -1, -1, 92, 93, 94, -1, 96,
3768 97, 98, -1, -1, -1, 40, -1, -1, -1, -1,
3769 -1, -1, 109, -1, 111, 112, -1, 114, 115, 116,
3770 117, 118, -1, -1, -1, -1, -1, 124, -1, 126,
3771 -1, -1, 129, 68, 69, 70, -1, 72, 73, 74,
3772 75, 76, 77, -1, -1, -1, -1, -1, -1, -1,
3773 -1, -1, -1, -1, -1, -1, -1, 92, 93, 94,
3774 -1, 96, 97, 98, -1, -1, -1, 40, -1, -1,
3775 -1, -1, -1, -1, 109, -1, 111, 112, -1, 114,
3776 115, 116, 117, 118, -1, -1, -1, -1, -1, 124,
3777 -1, 126, -1, -1, 129, 68, 69, 70, -1, 72,
3778 73, 74, 75, 76, 77, -1, -1, -1, -1, -1,
3779 -1, -1, -1, -1, -1, -1, -1, -1, -1, 92,
3780 93, 94, -1, 96, 97, 98, -1, -1, -1, -1,
3781 -1, -1, -1, -1, -1, -1, -1, -1, 111, 112,
3782 -1, 114, 115, 116, 117, 118, -1, -1, -1, -1,
3783 -1, 124, -1, 126, -1, -1, 129
3786 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
3787 symbol of state STATE-NUM. */
3788 static const yytype_uint16 yystos[] =
3790 0, 3, 4, 5, 6, 8, 9, 10, 11, 12,
3791 13, 14, 17, 18, 19, 20, 21, 22, 23, 24,
3792 25, 26, 28, 29, 36, 38, 39, 41, 43, 45,
3793 47, 48, 49, 52, 53, 55, 56, 63, 64, 65,
3794 71, 92, 93, 101, 111, 114, 119, 120, 124, 126,
3795 128, 130, 137, 138, 139, 140, 146, 149, 151, 159,
3796 162, 163, 164, 165, 166, 173, 181, 184, 185, 188,
3797 191, 192, 193, 194, 198, 200, 209, 214, 215, 216,
3798 227, 234, 237, 250, 251, 252, 257, 261, 265, 266,
3799 268, 269, 270, 91, 50, 124, 124, 156, 157, 124,
3800 3, 4, 16, 17, 29, 128, 186, 187, 16, 3,
3801 4, 261, 3, 236, 261, 124, 3, 187, 240, 261,
3802 128, 124, 129, 16, 261, 124, 3, 5, 8, 9,
3803 10, 258, 259, 260, 261, 261, 261, 261, 261, 256,
3804 261, 246, 247, 248, 254, 261, 30, 32, 37, 42,
3805 46, 67, 101, 134, 145, 146, 147, 151, 153, 167,
3806 168, 183, 192, 253, 3, 0, 140, 128, 3, 46,
3807 153, 160, 161, 257, 147, 148, 16, 26, 31, 32,
3808 44, 46, 208, 267, 4, 194, 3, 128, 221, 225,
3809 102, 40, 68, 69, 70, 72, 73, 74, 75, 76,
3810 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
3811 87, 88, 89, 90, 92, 93, 94, 96, 97, 98,
3812 104, 105, 107, 108, 109, 111, 112, 114, 115, 116,
3813 117, 118, 124, 126, 129, 3, 124, 255, 256, 12,
3814 148, 174, 190, 128, 129, 186, 187, 239, 240, 241,
3815 249, 124, 255, 129, 182, 246, 3, 104, 255, 134,
3816 106, 102, 102, 135, 127, 102, 254, 3, 3, 154,
3817 155, 255, 255, 154, 3, 134, 147, 128, 138, 3,
3818 101, 69, 101, 3, 35, 51, 233, 3, 3, 210,
3819 261, 3, 221, 226, 228, 229, 261, 261, 261, 261,
3820 261, 261, 261, 261, 261, 261, 261, 261, 261, 261,
3821 261, 261, 261, 261, 261, 261, 261, 261, 261, 261,
3822 3, 4, 117, 130, 186, 263, 264, 261, 261, 261,
3823 261, 261, 261, 261, 261, 261, 261, 261, 261, 261,
3824 261, 261, 246, 261, 124, 126, 130, 263, 264, 135,
3825 124, 261, 101, 126, 141, 142, 143, 149, 151, 198,
3826 200, 209, 234, 189, 186, 129, 124, 245, 3, 95,
3827 230, 231, 232, 135, 117, 186, 144, 145, 135, 261,
3828 135, 254, 259, 261, 106, 244, 102, 145, 134, 244,
3829 255, 255, 104, 3, 54, 195, 54, 196, 3, 211,
3830 212, 222, 104, 104, 112, 116, 217, 229, 126, 263,
3831 264, 91, 106, 135, 127, 262, 261, 126, 263, 264,
3832 91, 156, 255, 135, 150, 134, 143, 128, 141, 246,
3833 104, 106, 213, 232, 135, 102, 134, 156, 106, 36,
3834 117, 241, 243, 104, 152, 155, 134, 101, 135, 3,
3835 5, 124, 241, 15, 197, 241, 242, 128, 244, 102,
3836 134, 5, 221, 5, 221, 218, 223, 261, 91, 117,
3837 264, 261, 261, 127, 261, 91, 264, 135, 128, 261,
3838 141, 134, 135, 261, 243, 244, 95, 232, 27, 33,
3839 175, 177, 179, 180, 66, 158, 254, 261, 257, 156,
3840 230, 242, 128, 102, 201, 152, 212, 112, 5, 111,
3841 112, 128, 219, 224, 227, 127, 264, 135, 127, 264,
3842 34, 62, 169, 170, 171, 172, 127, 134, 213, 128,
3843 232, 128, 124, 175, 177, 156, 135, 135, 199, 241,
3844 46, 101, 192, 205, 206, 207, 116, 261, 111, 227,
3845 223, 261, 106, 134, 171, 172, 238, 178, 3, 156,
3846 244, 101, 146, 151, 192, 202, 203, 204, 209, 234,
3847 3, 26, 134, 207, 225, 220, 116, 223, 106, 144,
3848 144, 144, 244, 128, 128, 134, 204, 233, 218, 134,
3849 225, 144, 134, 134, 135, 235, 202, 3, 112, 218,
3850 176, 144, 134, 124, 112, 128, 134, 230, 144, 135,
3854 #define yyerrok (yyerrstatus = 0)
3855 #define yyclearin (yychar = YYEMPTY)
3856 #define YYEMPTY (-2)
3859 #define YYACCEPT goto yyacceptlab
3860 #define YYABORT goto yyabortlab
3861 #define YYERROR goto yyerrorlab
3864 /* Like YYERROR except do call yyerror. This remains here temporarily
3865 to ease the transition to the new meaning of YYERROR, for GCC.
3866 Once GCC version 2 has supplanted version 1, this can go. */
3868 #define YYFAIL goto yyerrlab
3870 #define YYRECOVERING() (!!yyerrstatus)
3872 #define YYBACKUP(Token, Value) \
3874 if (yychar == YYEMPTY && yylen == 1) \
3878 yytoken = YYTRANSLATE (yychar); \
3884 yyerror (YY_("syntax error: cannot back up")); \
3891 #define YYERRCODE 256
3894 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
3895 If N is 0, then set CURRENT to the empty location which ends
3896 the previous symbol: RHS[0] (always defined). */
3898 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
3899 #ifndef YYLLOC_DEFAULT
3900 # define YYLLOC_DEFAULT(Current, Rhs, N) \
3904 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
3905 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
3906 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
3907 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
3911 (Current).first_line = (Current).last_line = \
3912 YYRHSLOC (Rhs, 0).last_line; \
3913 (Current).first_column = (Current).last_column = \
3914 YYRHSLOC (Rhs, 0).last_column; \
3920 /* YY_LOCATION_PRINT -- Print the location on the stream.
3921 This macro was not mandated originally: define only if we know
3922 we won't break user code: when these are the locations we know. */
3924 #ifndef YY_LOCATION_PRINT
3925 # if YYLTYPE_IS_TRIVIAL
3926 # define YY_LOCATION_PRINT(File, Loc) \
3927 fprintf (File, "%d.%d-%d.%d", \
3928 (Loc).first_line, (Loc).first_column, \
3929 (Loc).last_line, (Loc).last_column)
3931 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
3936 /* YYLEX -- calling `yylex' with the right arguments. */
3939 # define YYLEX yylex (YYLEX_PARAM)
3941 # define YYLEX yylex ()
3944 /* Enable debugging if requested. */
3948 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
3949 # define YYFPRINTF fprintf
3952 # define YYDPRINTF(Args) \
3958 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
3962 YYFPRINTF (stderr, "%s ", Title); \
3963 yy_symbol_print (stderr, \
3965 YYFPRINTF (stderr, "\n"); \
3970 /*--------------------------------.
3971 | Print this symbol on YYOUTPUT. |
3972 `--------------------------------*/
3975 #if (defined __STDC__ || defined __C99__FUNC__ \
3976 || defined __cplusplus || defined _MSC_VER)
3978 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
3981 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
3984 YYSTYPE const * const yyvaluep;
3990 if (yytype < YYNTOKENS)
3991 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
4003 /*--------------------------------.
4004 | Print this symbol on YYOUTPUT. |
4005 `--------------------------------*/
4007 #if (defined __STDC__ || defined __C99__FUNC__ \
4008 || defined __cplusplus || defined _MSC_VER)
4010 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
4013 yy_symbol_print (yyoutput, yytype, yyvaluep)
4016 YYSTYPE const * const yyvaluep;
4019 if (yytype < YYNTOKENS)
4020 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
4022 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
4024 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
4025 YYFPRINTF (yyoutput, ")");
4028 /*------------------------------------------------------------------.
4029 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
4031 `------------------------------------------------------------------*/
4033 #if (defined __STDC__ || defined __C99__FUNC__ \
4034 || defined __cplusplus || defined _MSC_VER)
4036 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
4039 yy_stack_print (yybottom, yytop)
4040 yytype_int16 *yybottom;
4041 yytype_int16 *yytop;
4044 YYFPRINTF (stderr, "Stack now");
4045 for (; yybottom <= yytop; yybottom++)
4047 int yybot = *yybottom;
4048 YYFPRINTF (stderr, " %d", yybot);
4050 YYFPRINTF (stderr, "\n");
4053 # define YY_STACK_PRINT(Bottom, Top) \
4056 yy_stack_print ((Bottom), (Top)); \
4060 /*------------------------------------------------.
4061 | Report that the YYRULE is going to be reduced. |
4062 `------------------------------------------------*/
4064 #if (defined __STDC__ || defined __C99__FUNC__ \
4065 || defined __cplusplus || defined _MSC_VER)
4067 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
4070 yy_reduce_print (yyvsp, yyrule)
4075 int yynrhs = yyr2[yyrule];
4077 unsigned long int yylno = yyrline[yyrule];
4078 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
4080 /* The symbols being reduced. */
4081 for (yyi = 0; yyi < yynrhs; yyi++)
4083 YYFPRINTF (stderr, " $%d = ", yyi + 1);
4084 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
4085 &(yyvsp[(yyi + 1) - (yynrhs)])
4087 YYFPRINTF (stderr, "\n");
4091 # define YY_REDUCE_PRINT(Rule) \
4094 yy_reduce_print (yyvsp, Rule); \
4097 /* Nonzero means print parse trace. It is left uninitialized so that
4098 multiple parsers can coexist. */
4100 #else /* !YYDEBUG */
4101 # define YYDPRINTF(Args)
4102 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
4103 # define YY_STACK_PRINT(Bottom, Top)
4104 # define YY_REDUCE_PRINT(Rule)
4105 #endif /* !YYDEBUG */
4108 /* YYINITDEPTH -- initial size of the parser's stacks. */
4110 # define YYINITDEPTH 200
4113 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
4114 if the built-in stack extension method is used).
4116 Do not make this value too large; the results are undefined if
4117 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
4118 evaluated with infinite-precision integer arithmetic. */
4121 # define YYMAXDEPTH 10000
4129 # if defined __GLIBC__ && defined _STRING_H
4130 # define yystrlen strlen
4132 /* Return the length of YYSTR. */
4133 #if (defined __STDC__ || defined __C99__FUNC__ \
4134 || defined __cplusplus || defined _MSC_VER)
4136 yystrlen (const char *yystr)
4144 for (yylen = 0; yystr[yylen]; yylen++)
4152 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
4153 # define yystpcpy stpcpy
4155 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
4157 #if (defined __STDC__ || defined __C99__FUNC__ \
4158 || defined __cplusplus || defined _MSC_VER)
4160 yystpcpy (char *yydest, const char *yysrc)
4163 yystpcpy (yydest, yysrc)
4169 const char *yys = yysrc;
4171 while ((*yyd++ = *yys++) != '\0')
4180 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
4181 quotes and backslashes, so that it's suitable for yyerror. The
4182 heuristic is that double-quoting is unnecessary unless the string
4183 contains an apostrophe, a comma, or backslash (other than
4184 backslash-backslash). YYSTR is taken from yytname. If YYRES is
4185 null, do not copy; instead, return the length of what the result
4188 yytnamerr (char *yyres, const char *yystr)
4193 char const *yyp = yystr;
4200 goto do_not_strip_quotes;
4204 goto do_not_strip_quotes;
4217 do_not_strip_quotes: ;
4221 return yystrlen (yystr);
4223 return yystpcpy (yyres, yystr) - yyres;
4227 /* Copy into YYRESULT an error message about the unexpected token
4228 YYCHAR while in state YYSTATE. Return the number of bytes copied,
4229 including the terminating null byte. If YYRESULT is null, do not
4230 copy anything; just return the number of bytes that would be
4231 copied. As a special case, return 0 if an ordinary "syntax error"
4232 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
4233 size calculation. */
4235 yysyntax_error (char *yyresult, int yystate, int yychar)
4237 int yyn = yypact[yystate];
4239 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
4243 int yytype = YYTRANSLATE (yychar);
4244 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
4245 YYSIZE_T yysize = yysize0;
4247 int yysize_overflow = 0;
4248 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
4249 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
4253 /* This is so xgettext sees the translatable formats that are
4254 constructed on the fly. */
4255 YY_("syntax error, unexpected %s");
4256 YY_("syntax error, unexpected %s, expecting %s");
4257 YY_("syntax error, unexpected %s, expecting %s or %s");
4258 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
4259 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
4263 static char const yyunexpected[] = "syntax error, unexpected %s";
4264 static char const yyexpecting[] = ", expecting %s";
4265 static char const yyor[] = " or %s";
4266 char yyformat[sizeof yyunexpected
4267 + sizeof yyexpecting - 1
4268 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
4269 * (sizeof yyor - 1))];
4270 char const *yyprefix = yyexpecting;
4272 /* Start YYX at -YYN if negative to avoid negative indexes in
4274 int yyxbegin = yyn < 0 ? -yyn : 0;
4276 /* Stay within bounds of both yycheck and yytname. */
4277 int yychecklim = YYLAST - yyn + 1;
4278 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
4281 yyarg[0] = yytname[yytype];
4282 yyfmt = yystpcpy (yyformat, yyunexpected);
4284 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
4285 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
4287 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
4291 yyformat[sizeof yyunexpected - 1] = '\0';
4294 yyarg[yycount++] = yytname[yyx];
4295 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
4296 yysize_overflow |= (yysize1 < yysize);
4298 yyfmt = yystpcpy (yyfmt, yyprefix);
4302 yyf = YY_(yyformat);
4303 yysize1 = yysize + yystrlen (yyf);
4304 yysize_overflow |= (yysize1 < yysize);
4307 if (yysize_overflow)
4308 return YYSIZE_MAXIMUM;
4312 /* Avoid sprintf, as that infringes on the user's name space.
4313 Don't have undefined behavior even if the translation
4314 produced a string with the wrong number of "%s"s. */
4315 char *yyp = yyresult;
4317 while ((*yyp = *yyf) != '\0')
4319 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
4321 yyp += yytnamerr (yyp, yyarg[yyi++]);
4334 #endif /* YYERROR_VERBOSE */
4337 /*-----------------------------------------------.
4338 | Release the memory associated to this symbol. |
4339 `-----------------------------------------------*/
4342 #if (defined __STDC__ || defined __C99__FUNC__ \
4343 || defined __cplusplus || defined _MSC_VER)
4345 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
4348 yydestruct (yymsg, yytype, yyvaluep)
4358 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
4368 /* Prevent warnings from -Wmissing-prototypes. */
4369 #ifdef YYPARSE_PARAM
4370 #if defined __STDC__ || defined __cplusplus
4371 int yyparse (void *YYPARSE_PARAM);
4375 #else /* ! YYPARSE_PARAM */
4376 #if defined __STDC__ || defined __cplusplus
4381 #endif /* ! YYPARSE_PARAM */
4384 /* The lookahead symbol. */
4387 /* The semantic value of the lookahead symbol. */
4390 /* Number of syntax errors so far. */
4395 /*-------------------------.
4396 | yyparse or yypush_parse. |
4397 `-------------------------*/
4399 #ifdef YYPARSE_PARAM
4400 #if (defined __STDC__ || defined __C99__FUNC__ \
4401 || defined __cplusplus || defined _MSC_VER)
4403 yyparse (void *YYPARSE_PARAM)
4406 yyparse (YYPARSE_PARAM)
4407 void *YYPARSE_PARAM;
4409 #else /* ! YYPARSE_PARAM */
4410 #if (defined __STDC__ || defined __C99__FUNC__ \
4411 || defined __cplusplus || defined _MSC_VER)
4424 /* Number of tokens to shift before error messages enabled. */
4427 /* The stacks and their tools:
4428 `yyss': related to states.
4429 `yyvs': related to semantic values.
4431 Refer to the stacks thru separate pointers, to allow yyoverflow
4432 to reallocate them elsewhere. */
4434 /* The state stack. */
4435 yytype_int16 yyssa[YYINITDEPTH];
4437 yytype_int16 *yyssp;
4439 /* The semantic value stack. */
4440 YYSTYPE yyvsa[YYINITDEPTH];
4444 YYSIZE_T yystacksize;
4448 /* Lookahead token as an internal (translated) token number. */
4450 /* The variables used to return semantic value and location from the
4455 /* Buffer for error messages, and its allocated size. */
4457 char *yymsg = yymsgbuf;
4458 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
4461 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
4463 /* The number of symbols on the RHS of the reduced rule.
4464 Keep to zero when no symbol should be popped. */
4470 yystacksize = YYINITDEPTH;
4472 YYDPRINTF ((stderr, "Starting parse\n"));
4477 yychar = YYEMPTY; /* Cause a token to be read. */
4479 /* Initialize stack pointers.
4480 Waste one element of value and location stack
4481 so that they stay on the same level as the state stack.
4482 The wasted elements are never initialized. */
4488 /*------------------------------------------------------------.
4489 | yynewstate -- Push a new state, which is found in yystate. |
4490 `------------------------------------------------------------*/
4492 /* In all cases, when you get here, the value and location stacks
4493 have just been pushed. So pushing a state here evens the stacks. */
4499 if (yyss + yystacksize - 1 <= yyssp)
4501 /* Get the current used size of the three stacks, in elements. */
4502 YYSIZE_T yysize = yyssp - yyss + 1;
4506 /* Give user a chance to reallocate the stack. Use copies of
4507 these so that the &'s don't force the real ones into
4509 YYSTYPE *yyvs1 = yyvs;
4510 yytype_int16 *yyss1 = yyss;
4512 /* Each stack pointer address is followed by the size of the
4513 data in use in that stack, in bytes. This used to be a
4514 conditional around just the two extra args, but that might
4515 be undefined if yyoverflow is a macro. */
4516 yyoverflow (YY_("memory exhausted"),
4517 &yyss1, yysize * sizeof (*yyssp),
4518 &yyvs1, yysize * sizeof (*yyvsp),
4524 #else /* no yyoverflow */
4525 # ifndef YYSTACK_RELOCATE
4526 goto yyexhaustedlab;
4528 /* Extend the stack our own way. */
4529 if (YYMAXDEPTH <= yystacksize)
4530 goto yyexhaustedlab;
4532 if (YYMAXDEPTH < yystacksize)
4533 yystacksize = YYMAXDEPTH;
4536 yytype_int16 *yyss1 = yyss;
4537 union yyalloc *yyptr =
4538 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
4540 goto yyexhaustedlab;
4541 YYSTACK_RELOCATE (yyss_alloc, yyss);
4542 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
4543 # undef YYSTACK_RELOCATE
4545 YYSTACK_FREE (yyss1);
4548 #endif /* no yyoverflow */
4550 yyssp = yyss + yysize - 1;
4551 yyvsp = yyvs + yysize - 1;
4553 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
4554 (unsigned long int) yystacksize));
4556 if (yyss + yystacksize - 1 <= yyssp)
4560 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
4562 if (yystate == YYFINAL)
4572 /* Do appropriate processing given the current state. Read a
4573 lookahead token if we need one and don't already have one. */
4575 /* First try to decide what to do without reference to lookahead token. */
4576 yyn = yypact[yystate];
4577 if (yyn == YYPACT_NINF)
4580 /* Not known => get a lookahead token if don't already have one. */
4582 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
4583 if (yychar == YYEMPTY)
4585 YYDPRINTF ((stderr, "Reading a token: "));
4589 if (yychar <= YYEOF)
4591 yychar = yytoken = YYEOF;
4592 YYDPRINTF ((stderr, "Now at end of input.\n"));
4596 yytoken = YYTRANSLATE (yychar);
4597 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
4600 /* If the proper action on seeing token YYTOKEN is to reduce or to
4601 detect an error, take that action. */
4603 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
4608 if (yyn == 0 || yyn == YYTABLE_NINF)
4614 /* Count tokens shifted since error; after three, turn off error
4619 /* Shift the lookahead token. */
4620 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
4622 /* Discard the shifted token. */
4631 /*-----------------------------------------------------------.
4632 | yydefault -- do the default action for the current state. |
4633 `-----------------------------------------------------------*/
4635 yyn = yydefact[yystate];
4641 /*-----------------------------.
4642 | yyreduce -- Do a reduction. |
4643 `-----------------------------*/
4645 /* yyn is the number of a rule to reduce with. */
4648 /* If YYLEN is nonzero, implement the default value of the action:
4651 Otherwise, the following line sets YYVAL to garbage.
4652 This behavior is undocumented and Bison
4653 users should not rely upon it. Assigning to YYVAL
4654 unconditionally makes the parser a bit smaller, and it avoids a
4655 GCC warning that YYVAL may be used uninitialized. */
4656 yyval = yyvsp[1-yylen];
4659 YY_REDUCE_PRINT (yyn);
4666 /* Line 1464 of skeleton.m4 */
4667 #line 1980 "parser.y"
4668 {PASS_ALWAYS as3_pass=(yyvsp[(1) - (4)].number_int);}
4677 /* Line 1464 of skeleton.m4 */
4678 #line 1992 "parser.y"
4679 {PASS_ALWAYS as3_pass=(yyvsp[(1) - (4)].number_int);}
4688 /* Line 1464 of skeleton.m4 */
4689 #line 1993 "parser.y"
4690 {PASS_ALWAYS as3_pass=(yyvsp[(2) - (4)].number_int);PASS1 as3_warning("embed command ignored");}
4699 /* Line 1464 of skeleton.m4 */
4700 #line 1996 "parser.y"
4701 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4710 /* Line 1464 of skeleton.m4 */
4711 #line 1997 "parser.y"
4712 {(yyval.code)=code_new();}
4721 /* Line 1464 of skeleton.m4 */
4722 #line 1999 "parser.y"
4724 (yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));
4734 /* Line 1464 of skeleton.m4 */
4735 #line 2002 "parser.y"
4736 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4745 /* Line 1464 of skeleton.m4 */
4746 #line 2018 "parser.y"
4747 {(yyval.code)=(yyvsp[(2) - (3)].code);}
4756 /* Line 1464 of skeleton.m4 */
4757 #line 2019 "parser.y"
4767 /* Line 1464 of skeleton.m4 */
4768 #line 2022 "parser.y"
4778 /* Line 1464 of skeleton.m4 */
4779 #line 2029 "parser.y"
4783 (yyval.code) = (yyvsp[(3) - (4)].code);
4787 as3_pass=(yyvsp[(1) - (4)].number_int);
4797 /* Line 1464 of skeleton.m4 */
4798 #line 2041 "parser.y"
4799 {(yyval.code)=(yyvsp[(1) - (2)].code);}
4808 /* Line 1464 of skeleton.m4 */
4809 #line 2042 "parser.y"
4810 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4819 /* Line 1464 of skeleton.m4 */
4820 #line 2046 "parser.y"
4822 if((yyvsp[(1) - (1)].code)) {
4824 global->init = abc_initscript(global->file);
4825 code_t**cc = &global->init->method->body->code;
4826 *cc = code_append(*cc, (yyvsp[(1) - (1)].code));
4837 /* Line 1464 of skeleton.m4 */
4838 #line 2057 "parser.y"
4841 (yyval.number_int) = as3_pass;
4852 /* Line 1464 of skeleton.m4 */
4853 #line 2065 "parser.y"
4856 (yyval.number_int)=as3_pass;
4857 char*key = concat3((yyvsp[(1) - (3)].id),"::",(yyvsp[(3) - (3)].id));
4858 if(!definitions || !dict_contains(definitions, key)) {
4871 /* Line 1464 of skeleton.m4 */
4872 #line 2092 "parser.y"
4873 {(yyval.node)=(yyvsp[(2) - (2)].node);}
4882 /* Line 1464 of skeleton.m4 */
4883 #line 2093 "parser.y"
4884 {(yyval.node)=mkdummynode();}
4893 /* Line 1464 of skeleton.m4 */
4894 #line 2095 "parser.y"
4895 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4904 /* Line 1464 of skeleton.m4 */
4905 #line 2096 "parser.y"
4906 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4915 /* Line 1464 of skeleton.m4 */
4916 #line 2098 "parser.y"
4917 {(yyval.code) = (yyvsp[(1) - (1)].code);}
4926 /* Line 1464 of skeleton.m4 */
4927 #line 2099 "parser.y"
4928 {(yyval.code) = code_append((yyvsp[(1) - (3)].code), (yyvsp[(3) - (3)].code));}
4937 /* Line 1464 of skeleton.m4 */
4938 #line 2102 "parser.y"
4941 if(variable_exists((yyvsp[(1) - (3)].id)))
4942 syntaxerror("Variable %s already defined", (yyvsp[(1) - (3)].id));
4944 new_variable(state->method, (yyvsp[(1) - (3)].id), 0, 1, 0);
4950 if(state->method->uses_slots) {
4951 v = find_slot(state->method, (yyvsp[(1) - (3)].id));
4953 // this variable is stored in a slot
4955 v->type = (yyvsp[(2) - (3)].classinfo);
4960 v = new_variable2(state->method, (yyvsp[(1) - (3)].id), (yyvsp[(2) - (3)].classinfo), 1, 0);
4963 (yyval.code) = slot?abc_getscopeobject(0, 1):0;
4965 typedcode_t val = node_read((yyvsp[(3) - (3)].node));
4966 if(!is_subtype_of(val.t, (yyvsp[(2) - (3)].classinfo))) {
4967 syntaxerror("Can't convert %s to %s", val.t->name, (yyvsp[(2) - (3)].classinfo)->name);
4969 if((yyvsp[(2) - (3)].classinfo)) {
4970 if(val.c->prev || val.c->opcode != OPCODE_PUSHUNDEFINED) {
4971 (yyval.code) = code_append((yyval.code), val.c);
4972 (yyval.code) = converttype((yyval.code), val.t, (yyvsp[(2) - (3)].classinfo));
4975 (yyval.code) = defaultvalue((yyval.code), (yyvsp[(2) - (3)].classinfo));
4978 if(val.c->prev || val.c->opcode != OPCODE_PUSHUNDEFINED) {
4979 (yyval.code) = code_append((yyval.code), val.c);
4980 (yyval.code) = abc_coerce_a((yyval.code));
4982 // don't do anything
4984 code_free((yyval.code));
4990 (yyval.code) = abc_setslot((yyval.code), v->index);
4992 (yyval.code) = abc_setlocal((yyval.code), v->index);
4993 v->init = do_init_variable((yyvsp[(1) - (3)].id));
5004 /* Line 1464 of skeleton.m4 */
5005 #line 2162 "parser.y"
5006 {PASS12 new_state();}
5015 /* Line 1464 of skeleton.m4 */
5016 #line 2162 "parser.y"
5018 (yyval.code) = var_block((yyvsp[(2) - (2)].code), state->vars);
5029 /* Line 1464 of skeleton.m4 */
5030 #line 2166 "parser.y"
5031 {(yyval.code) = code_new();}
5040 /* Line 1464 of skeleton.m4 */
5041 #line 2167 "parser.y"
5042 {(yyval.code)=(yyvsp[(2) - (2)].code);}
5051 /* Line 1464 of skeleton.m4 */
5052 #line 2170 "parser.y"
5054 (yyval.code) = code_new();
5055 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (6)].value).c);
5056 code_t*myjmp,*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
5058 (yyval.code) = code_append((yyval.code), (yyvsp[(5) - (6)].code));
5059 if((yyvsp[(6) - (6)].code)) {
5060 myjmp = (yyval.code) = abc_jump((yyval.code), 0);
5062 myif->branch = (yyval.code) = abc_nop((yyval.code));
5063 if((yyvsp[(6) - (6)].code)) {
5064 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
5065 myjmp->branch = (yyval.code) = abc_nop((yyval.code));
5076 /* Line 1464 of skeleton.m4 */
5077 #line 2186 "parser.y"
5078 {(yyval.code)=code_new();}
5087 /* Line 1464 of skeleton.m4 */
5088 #line 2193 "parser.y"
5090 PASS1 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable(state->method, (yyvsp[(2) - (3)].id),0,1,0);
5091 PASS2 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable(state->method, (yyvsp[(2) - (3)].id),(yyvsp[(3) - (3)].classinfo),1,0);
5101 /* Line 1464 of skeleton.m4 */
5102 #line 2197 "parser.y"
5105 (yyval.id)=(yyvsp[(1) - (1)].id);
5115 /* Line 1464 of skeleton.m4 */
5116 #line 2202 "parser.y"
5117 {PASS12 new_state();(yyval.for_start).name=(yyvsp[(1) - (2)].id);(yyval.for_start).each=0;}
5126 /* Line 1464 of skeleton.m4 */
5127 #line 2203 "parser.y"
5128 {PASS12 new_state();(yyval.for_start).name=(yyvsp[(1) - (3)].id);(yyval.for_start).each=1;}
5137 /* Line 1464 of skeleton.m4 */
5138 #line 2205 "parser.y"
5140 if((yyvsp[(1) - (8)].for_start).each) syntaxerror("invalid syntax: ; not allowed in for each statement");
5141 (yyval.code) = code_new();
5142 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (8)].code));
5143 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
5144 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (8)].value).c);
5145 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
5146 (yyval.code) = code_append((yyval.code), (yyvsp[(8) - (8)].code));
5147 code_t*cont = (yyval.code) = abc_nop((yyval.code));
5148 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (8)].code));
5149 (yyval.code) = abc_jump((yyval.code), loopstart);
5150 code_t*out = (yyval.code) = abc_nop((yyval.code));
5151 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, out);
5152 continuejumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, cont);
5155 (yyval.code) = var_block((yyval.code), state->vars);
5166 /* Line 1464 of skeleton.m4 */
5167 #line 2225 "parser.y"
5169 node_t*n = resolve_identifier((yyvsp[(2) - (6)].id));
5170 typedcode_t w = node_write(n);
5172 int it = alloc_local();
5173 int array = alloc_local();
5175 (yyval.code) = code_new();
5176 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
5177 (yyval.code) = abc_coerce_a((yyval.code));
5178 (yyval.code) = abc_setlocal((yyval.code), array);
5179 (yyval.code) = abc_pushbyte((yyval.code), 0);
5180 (yyval.code) = abc_setlocal((yyval.code), it);
5182 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
5184 (yyval.code) = abc_hasnext2((yyval.code), array, it);
5185 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
5186 (yyval.code) = abc_getlocal((yyval.code), array);
5187 (yyval.code) = abc_getlocal((yyval.code), it);
5188 if(!(yyvsp[(1) - (6)].for_start).each)
5189 (yyval.code) = abc_nextname((yyval.code));
5191 (yyval.code) = abc_nextvalue((yyval.code));
5193 (yyval.code) = converttype((yyval.code), 0, w.t);
5194 (yyval.code) = code_append((yyval.code), w.c);
5196 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
5197 (yyval.code) = abc_jump((yyval.code), loopstart);
5199 code_t*out = (yyval.code) = abc_nop((yyval.code));
5200 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, out);
5201 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, loopstart);
5205 (yyval.code) = abc_kill((yyval.code), it);
5206 (yyval.code) = abc_kill((yyval.code), array);
5208 (yyval.code) = var_block((yyval.code), state->vars);
5219 /* Line 1464 of skeleton.m4 */
5220 #line 2269 "parser.y"
5223 (yyval.code) = code_new();
5225 code_t*myjmp = (yyval.code) = abc_jump((yyval.code), 0);
5226 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
5227 (yyval.code) = code_append((yyval.code), (yyvsp[(5) - (5)].code));
5228 code_t*cont = (yyval.code) = abc_nop((yyval.code));
5229 myjmp->branch = cont;
5230 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (5)].value).c);
5231 (yyval.code) = abc_iftrue((yyval.code), loopstart);
5232 code_t*out = (yyval.code) = abc_nop((yyval.code));
5233 breakjumpsto((yyval.code), (yyvsp[(1) - (5)].id), out);
5234 continuejumpsto((yyval.code), (yyvsp[(1) - (5)].id), cont);
5244 /* Line 1464 of skeleton.m4 */
5245 #line 2285 "parser.y"
5247 (yyval.code) = code_new();
5248 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
5249 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (6)].code));
5250 code_t*cont = (yyval.code) = abc_nop((yyval.code));
5251 (yyval.code) = code_append((yyval.code), (yyvsp[(5) - (6)].value).c);
5252 (yyval.code) = abc_iftrue((yyval.code), loopstart);
5253 code_t*out = (yyval.code) = abc_nop((yyval.code));
5254 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].id), out);
5255 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].id), cont);
5265 /* Line 1464 of skeleton.m4 */
5266 #line 2297 "parser.y"
5268 (yyval.code) = abc___break__(0, "");
5278 /* Line 1464 of skeleton.m4 */
5279 #line 2300 "parser.y"
5281 (yyval.code) = abc___break__(0, (yyvsp[(2) - (2)].id));
5291 /* Line 1464 of skeleton.m4 */
5292 #line 2303 "parser.y"
5294 (yyval.code) = abc___continue__(0, "");
5304 /* Line 1464 of skeleton.m4 */
5305 #line 2306 "parser.y"
5307 (yyval.code) = abc___continue__(0, (yyvsp[(2) - (2)].id));
5317 /* Line 1464 of skeleton.m4 */
5318 #line 2310 "parser.y"
5328 /* Line 1464 of skeleton.m4 */
5329 #line 2311 "parser.y"
5330 {(yyval.code)=(yyvsp[(1) - (1)].code);}
5339 /* Line 1464 of skeleton.m4 */
5340 #line 2312 "parser.y"
5341 {(yyval.code)=(yyvsp[(1) - (1)].code);}
5350 /* Line 1464 of skeleton.m4 */
5351 #line 2313 "parser.y"
5352 {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
5361 /* Line 1464 of skeleton.m4 */
5362 #line 2314 "parser.y"
5363 {(yyval.code)=(yyvsp[(1) - (1)].code);}
5372 /* Line 1464 of skeleton.m4 */
5373 #line 2315 "parser.y"
5374 {(yyval.code)=code_append((yyval.code),(yyvsp[(2) - (2)].code));}
5383 /* Line 1464 of skeleton.m4 */
5384 #line 2317 "parser.y"
5386 (yyval.code) = abc_getlocal(0, state->switch_var);
5387 (yyval.code) = code_append((yyval.code), node_read((yyvsp[(2) - (4)].node)).c);
5388 code_t*j = (yyval.code) = abc_ifne((yyval.code), 0);
5389 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (4)].code));
5390 if((yyval.code)->opcode != OPCODE___BREAK__) {
5391 (yyval.code) = abc___fallthrough__((yyval.code), "");
5393 code_t*e = (yyval.code) = abc_nop((yyval.code));
5404 /* Line 1464 of skeleton.m4 */
5405 #line 2328 "parser.y"
5407 (yyval.code) = (yyvsp[(3) - (3)].code);
5417 /* Line 1464 of skeleton.m4 */
5418 #line 2331 "parser.y"
5419 {PASS12 new_state();state->switch_var=alloc_local();}
5428 /* Line 1464 of skeleton.m4 */
5429 #line 2331 "parser.y"
5431 (yyval.code) = node_read((yyvsp[(4) - (8)].node)).c;
5432 (yyval.code) = abc_setlocal((yyval.code), state->switch_var);
5433 (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (8)].code));
5435 code_t*out = (yyval.code) = abc_kill((yyval.code), state->switch_var);
5436 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].id), out);
5438 code_t*c = (yyval.code),*lastblock=0;
5440 if(c->opcode == OPCODE_IFNE) {
5441 if(!c->next) syntaxerror("internal error in fallthrough handling");
5443 } else if(c->opcode == OPCODE___FALLTHROUGH__) {
5445 c->opcode = OPCODE_JUMP;
5446 c->branch = lastblock;
5448 /* fall through end of switch */
5449 c->opcode = OPCODE_NOP;
5455 (yyval.code) = var_block((yyval.code), state->vars);
5466 /* Line 1464 of skeleton.m4 */
5467 #line 2362 "parser.y"
5468 {PASS12 new_state();
5469 state->exception_name=(yyvsp[(3) - (5)].id);
5470 PASS1 new_variable(state->method, (yyvsp[(3) - (5)].id), 0, 0, 0);
5471 PASS2 new_variable(state->method, (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].classinfo), 0, 0);
5481 /* Line 1464 of skeleton.m4 */
5482 #line 2367 "parser.y"
5484 namespace_t name_ns = {ACCESS_PACKAGE, ""};
5485 multiname_t name = {QNAME, &name_ns, 0, (yyvsp[(3) - (9)].id)};
5487 NEW(abc_exception_t, e)
5488 e->exc_type = sig2mname((yyvsp[(4) - (9)].classinfo));
5489 e->var_name = multiname_clone(&name);
5490 (yyval.exception) = e;
5493 int i = find_variable_safe(state, (yyvsp[(3) - (9)].id))->index;
5494 e->target = c = abc_nop(0);
5495 c = abc_setlocal(c, i);
5496 c = code_append(c, code_dup(state->method->scope_code));
5497 c = code_append(c, (yyvsp[(8) - (9)].code));
5500 c = var_block(c, state->vars);
5511 /* Line 1464 of skeleton.m4 */
5512 #line 2387 "parser.y"
5513 {PASS12 new_state();state->exception_name=0;}
5522 /* Line 1464 of skeleton.m4 */
5523 #line 2387 "parser.y"
5525 (yyvsp[(4) - (5)].code) = var_block((yyvsp[(4) - (5)].code), state->vars);
5526 if(!(yyvsp[(4) - (5)].code)) {
5527 (yyval.exception)=0;
5529 NEW(abc_exception_t, e)
5530 e->exc_type = 0; //all exceptions
5531 e->var_name = 0; //no name
5534 e->to = code_append(e->to, (yyvsp[(4) - (5)].code));
5535 (yyval.exception) = e;
5547 /* Line 1464 of skeleton.m4 */
5548 #line 2403 "parser.y"
5549 {(yyval.catch_list).l=list_new();(yyval.catch_list).finally=0;list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));}
5558 /* Line 1464 of skeleton.m4 */
5559 #line 2404 "parser.y"
5560 {(yyval.catch_list)=(yyvsp[(1) - (2)].catch_list);list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));}
5569 /* Line 1464 of skeleton.m4 */
5570 #line 2405 "parser.y"
5571 {(yyval.catch_list)=(yyvsp[(1) - (1)].catch_list);}
5580 /* Line 1464 of skeleton.m4 */
5581 #line 2406 "parser.y"
5583 (yyval.catch_list) = (yyvsp[(1) - (2)].catch_list);
5584 (yyval.catch_list).finally = 0;
5585 if((yyvsp[(2) - (2)].exception)) {
5586 list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));
5587 (yyval.catch_list).finally = (yyvsp[(2) - (2)].exception)->to;(yyvsp[(2) - (2)].exception)->to=0;
5598 /* Line 1464 of skeleton.m4 */
5599 #line 2414 "parser.y"
5601 (yyval.catch_list).l=list_new();
5602 (yyval.catch_list).finally = 0;
5603 if((yyvsp[(1) - (1)].exception)) {
5604 list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));
5605 (yyval.catch_list).finally = (yyvsp[(1) - (1)].exception)->to;(yyvsp[(1) - (1)].exception)->to=0;
5616 /* Line 1464 of skeleton.m4 */
5617 #line 2423 "parser.y"
5618 {PASS12 new_state();
5619 state->method->has_exceptions=1;
5620 state->method->late_binding=1;//for invariant scope_code
5630 /* Line 1464 of skeleton.m4 */
5631 #line 2426 "parser.y"
5633 code_t*out = abc_nop(0);
5635 code_t*start = abc_nop(0);
5636 (yyval.code) = code_append(start, (yyvsp[(4) - (6)].code));
5637 if(!is_break_or_jump((yyvsp[(4) - (6)].code))) {
5638 (yyval.code) = abc_jump((yyval.code), out);
5640 code_t*end = (yyval.code) = abc_nop((yyval.code));
5643 if((yyvsp[(6) - (6)].catch_list).finally)
5644 tmp = alloc_local();
5646 abc_exception_list_t*l = (yyvsp[(6) - (6)].catch_list).l;
5649 abc_exception_t*e = l->abc_exception;
5651 (yyval.code) = code_append((yyval.code), e->target);
5652 (yyval.code) = abc_jump((yyval.code), out);
5654 parserassert((ptroff_t)(yyvsp[(6) - (6)].catch_list).finally);
5656 e->target = (yyval.code) = abc_nop((yyval.code));
5657 (yyval.code) = code_append((yyval.code), code_dup(state->method->scope_code));
5658 (yyval.code) = abc___rethrow__((yyval.code));
5666 (yyval.code) = code_append((yyval.code), out);
5668 (yyval.code) = insert_finally((yyval.code), (yyvsp[(6) - (6)].catch_list).finally, tmp);
5670 list_concat(state->method->exceptions, (yyvsp[(6) - (6)].catch_list).l);
5672 (yyval.code) = var_block((yyval.code), state->vars);
5683 /* Line 1464 of skeleton.m4 */
5684 #line 2472 "parser.y"
5686 (yyval.code)=(yyvsp[(2) - (2)].value).c;
5687 (yyval.code)=abc_throw((yyval.code));
5697 /* Line 1464 of skeleton.m4 */
5698 #line 2476 "parser.y"
5700 if(!state->exception_name)
5701 syntaxerror("re-throw only possible within a catch block");
5702 variable_t*v = find_variable(state, state->exception_name);
5703 (yyval.code)=code_new();
5704 (yyval.code)=abc_getlocal((yyval.code), v->index);
5705 (yyval.code)=abc_throw((yyval.code));
5715 /* Line 1464 of skeleton.m4 */
5716 #line 2487 "parser.y"
5719 if(state->method->has_exceptions) {
5720 int v = alloc_local();
5721 state->method->scope_code = abc_getlocal(state->method->scope_code, v);
5722 state->method->scope_code = abc_pushwith(state->method->scope_code);
5723 (yyval.value_list).number = v;
5725 (yyval.value_list).cc = (yyvsp[(3) - (4)].value).c;
5735 /* Line 1464 of skeleton.m4 */
5736 #line 2497 "parser.y"
5738 /* remove getlocal;pushwith from scope code again */
5739 state->method->scope_code = code_cutlast(code_cutlast(state->method->scope_code));
5741 (yyval.code) = (yyvsp[(1) - (2)].value_list).cc;
5742 if(state->method->has_exceptions) {
5743 (yyval.code) = abc_dup((yyval.code));
5744 (yyval.code) = abc_setlocal((yyval.code), (yyvsp[(1) - (2)].value_list).number);
5746 (yyval.code) = abc_pushwith((yyval.code));
5747 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (2)].code));
5748 (yyval.code) = abc_popscope((yyval.code));
5759 /* Line 1464 of skeleton.m4 */
5760 #line 2515 "parser.y"
5761 {PASS12 (yyval.id)="package";}
5770 /* Line 1464 of skeleton.m4 */
5771 #line 2516 "parser.y"
5772 {PASS12 (yyval.id)="namespace";}
5781 /* Line 1464 of skeleton.m4 */
5782 #line 2517 "parser.y"
5783 {PASS12 (yyval.id)="NaN";}
5792 /* Line 1464 of skeleton.m4 */
5793 #line 2518 "parser.y"
5794 {PASS12 (yyval.id)=(yyvsp[(1) - (1)].id);}
5803 /* Line 1464 of skeleton.m4 */
5804 #line 2520 "parser.y"
5805 {PASS12 (yyval.id) = concat3((yyvsp[(1) - (3)].id),".",(yyvsp[(3) - (3)].id));free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;}
5814 /* Line 1464 of skeleton.m4 */
5815 #line 2521 "parser.y"
5816 {PASS12 (yyval.id)=strdup((yyvsp[(1) - (1)].id));}
5825 /* Line 1464 of skeleton.m4 */
5826 #line 2523 "parser.y"
5827 {PASS12 startpackage((yyvsp[(2) - (3)].id));free((yyvsp[(2) - (3)].id));(yyvsp[(2) - (3)].id)=0;}
5836 /* Line 1464 of skeleton.m4 */
5837 #line 2524 "parser.y"
5838 {PASS12 endpackage();(yyval.code)=0;}
5847 /* Line 1464 of skeleton.m4 */
5848 #line 2525 "parser.y"
5849 {PASS12 startpackage("");}
5858 /* Line 1464 of skeleton.m4 */
5859 #line 2526 "parser.y"
5860 {PASS12 endpackage();(yyval.code)=0;}
5869 /* Line 1464 of skeleton.m4 */
5870 #line 2549 "parser.y"
5873 slotinfo_t*s = registry_find(state->package, (yyvsp[(2) - (2)].id));
5874 if(!s && as3_pass==1) {as3_schedule_class(state->package, (yyvsp[(2) - (2)].id));}
5875 state_has_imports();
5876 dict_put(state->imports, state->package, (yyvsp[(2) - (2)].id));
5887 /* Line 1464 of skeleton.m4 */
5888 #line 2557 "parser.y"
5891 slotinfo_t*s = registry_find((yyvsp[(2) - (2)].classinfo)->package, (yyvsp[(2) - (2)].classinfo)->name);
5892 if(!s && as3_pass==1) {// || !(s->flags&FLAG_BUILTIN)) {
5893 as3_schedule_class((yyvsp[(2) - (2)].classinfo)->package, (yyvsp[(2) - (2)].classinfo)->name);
5895 state_has_imports();
5896 dict_put(state->imports, (yyvsp[(2) - (2)].classinfo)->name, (yyvsp[(2) - (2)].classinfo));
5897 import_toplevel((yyvsp[(2) - (2)].classinfo)->package);
5908 /* Line 1464 of skeleton.m4 */
5909 #line 2568 "parser.y"
5912 if(strncmp("flash.", (yyvsp[(2) - (4)].id), 6) && as3_pass==1) {
5913 as3_schedule_package((yyvsp[(2) - (4)].id));
5917 i->package = (yyvsp[(2) - (4)].id);
5918 state_has_imports();
5919 list_append(state->wildcard_imports, i);
5920 import_toplevel(i->package);
5931 /* Line 1464 of skeleton.m4 */
5932 #line 2584 "parser.y"
5933 {PASS12 (yyval.flags).flags=0;(yyval.flags).ns=0;}
5942 /* Line 1464 of skeleton.m4 */
5943 #line 2585 "parser.y"
5944 {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
5953 /* Line 1464 of skeleton.m4 */
5954 #line 2586 "parser.y"
5955 {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
5964 /* Line 1464 of skeleton.m4 */
5965 #line 2587 "parser.y"
5968 (yyval.flags).flags=(yyvsp[(1) - (2)].flags).flags|(yyvsp[(2) - (2)].flags).flags;
5969 if((yyvsp[(1) - (2)].flags).ns && (yyvsp[(2) - (2)].flags).ns) syntaxerror("only one namespace allowed in one declaration");
5970 (yyval.flags).ns=(yyvsp[(1) - (2)].flags).ns?(yyvsp[(1) - (2)].flags).ns:(yyvsp[(2) - (2)].flags).ns;
5981 /* Line 1464 of skeleton.m4 */
5982 #line 2594 "parser.y"
5983 {PASS12 (yyval.flags).flags=FLAG_PUBLIC;(yyval.flags).ns=0;}
5992 /* Line 1464 of skeleton.m4 */
5993 #line 2595 "parser.y"
5994 {PASS12 (yyval.flags).flags=FLAG_PRIVATE;(yyval.flags).ns=0;}
6003 /* Line 1464 of skeleton.m4 */
6004 #line 2596 "parser.y"
6005 {PASS12 (yyval.flags).flags=FLAG_PROTECTED;(yyval.flags).ns=0;}
6014 /* Line 1464 of skeleton.m4 */
6015 #line 2597 "parser.y"
6016 {PASS12 (yyval.flags).flags=FLAG_STATIC;(yyval.flags).ns=0;}
6025 /* Line 1464 of skeleton.m4 */
6026 #line 2598 "parser.y"
6027 {PASS12 (yyval.flags).flags=FLAG_DYNAMIC;(yyval.flags).ns=0;}
6036 /* Line 1464 of skeleton.m4 */
6037 #line 2599 "parser.y"
6038 {PASS12 (yyval.flags).flags=FLAG_FINAL;(yyval.flags).ns=0;}
6047 /* Line 1464 of skeleton.m4 */
6048 #line 2600 "parser.y"
6049 {PASS12 (yyval.flags).flags=FLAG_OVERRIDE;(yyval.flags).ns=0;}
6058 /* Line 1464 of skeleton.m4 */
6059 #line 2601 "parser.y"
6060 {PASS12 (yyval.flags).flags=FLAG_NATIVE;(yyval.flags).ns=0;}
6069 /* Line 1464 of skeleton.m4 */
6070 #line 2602 "parser.y"
6071 {PASS12 (yyval.flags).flags=FLAG_PACKAGEINTERNAL;(yyval.flags).ns=0;}
6080 /* Line 1464 of skeleton.m4 */
6081 #line 2603 "parser.y"
6082 {PASS12 (yyval.flags).flags=FLAG_NAMESPACE;
6083 (yyval.flags).ns=(yyvsp[(1) - (1)].id);
6093 /* Line 1464 of skeleton.m4 */
6094 #line 2607 "parser.y"
6095 {PASS12 (yyval.classinfo)=0;}
6104 /* Line 1464 of skeleton.m4 */
6105 #line 2608 "parser.y"
6106 {PASS12 (yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
6115 /* Line 1464 of skeleton.m4 */
6116 #line 2610 "parser.y"
6117 {PASS12 (yyval.classinfo_list)=list_new();}
6126 /* Line 1464 of skeleton.m4 */
6127 #line 2611 "parser.y"
6128 {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
6137 /* Line 1464 of skeleton.m4 */
6138 #line 2613 "parser.y"
6139 {PASS12 (yyval.classinfo_list)=list_new();}
6148 /* Line 1464 of skeleton.m4 */
6149 #line 2614 "parser.y"
6150 {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
6159 /* Line 1464 of skeleton.m4 */
6160 #line 2618 "parser.y"
6161 {PASS12 startclass(&(yyvsp[(1) - (6)].flags),(yyvsp[(3) - (6)].id),(yyvsp[(4) - (6)].classinfo),(yyvsp[(5) - (6)].classinfo_list));}
6170 /* Line 1464 of skeleton.m4 */
6171 #line 2620 "parser.y"
6172 {PASS12 endclass();(yyval.code)=0;}
6181 /* Line 1464 of skeleton.m4 */
6182 #line 2624 "parser.y"
6183 {PASS12 (yyvsp[(1) - (5)].flags).flags|=FLAG_INTERFACE;
6184 startclass(&(yyvsp[(1) - (5)].flags),(yyvsp[(3) - (5)].id),0,(yyvsp[(4) - (5)].classinfo_list));}
6193 /* Line 1464 of skeleton.m4 */
6194 #line 2627 "parser.y"
6195 {PASS12 endclass();(yyval.code)=0;}
6204 /* Line 1464 of skeleton.m4 */
6205 #line 2636 "parser.y"
6206 {PASS_ALWAYS as3_pass=(yyvsp[(1) - (4)].number_int);}
6215 /* Line 1464 of skeleton.m4 */
6216 #line 2640 "parser.y"
6218 code_t*c = state->cls->static_init->header;
6219 c = code_append(c, (yyvsp[(1) - (1)].code));
6220 state->cls->static_init->header = c;
6230 /* Line 1464 of skeleton.m4 */
6231 #line 2651 "parser.y"
6233 syntaxerror("variable declarations not allowed in interfaces");
6243 /* Line 1464 of skeleton.m4 */
6244 #line 2654 "parser.y"
6247 (yyvsp[(1) - (8)].flags).flags |= FLAG_PUBLIC;
6248 if((yyvsp[(1) - (8)].flags).flags&(FLAG_PRIVATE|FLAG_PACKAGEINTERNAL|FLAG_PROTECTED)) {
6249 syntaxerror("invalid method modifiers: interface methods always need to be public");
6251 startfunction(&(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo));
6252 endfunction(&(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo), 0);
6253 list_deep_free((yyvsp[(6) - (8)].params).list);
6263 /* Line 1464 of skeleton.m4 */
6264 #line 2729 "parser.y"
6265 {PASS12 setslotstate(&(yyvsp[(1) - (2)].flags),(yyvsp[(2) - (2)].token));}
6274 /* Line 1464 of skeleton.m4 */
6275 #line 2729 "parser.y"
6276 {PASS12 (yyval.code)=(yyvsp[(4) - (4)].code);setslotstate(0, 0);}
6285 /* Line 1464 of skeleton.m4 */
6286 #line 2731 "parser.y"
6287 {PASS12 (yyval.code)=0;}
6296 /* Line 1464 of skeleton.m4 */
6297 #line 2732 "parser.y"
6298 {PASS12 (yyval.code)=0;}
6307 /* Line 1464 of skeleton.m4 */
6308 #line 2735 "parser.y"
6311 int flags = slotstate_flags->flags;
6312 namespace_t ns = modifiers2access(slotstate_flags);
6316 varinfo_t* info = 0;
6318 memberinfo_t*i = registry_findmember(state->cls->info, ns.name, (yyvsp[(1) - (3)].id), 1, slotstate_flags->flags&FLAG_STATIC);
6320 check_override(i, flags);
6322 info = varinfo_register_onclass(state->cls->info, ns.access, ns.name, (yyvsp[(1) - (3)].id), slotstate_flags->flags&FLAG_STATIC);
6324 slotinfo_t*i = registry_find(state->package, (yyvsp[(1) - (3)].id));
6326 syntaxerror("package %s already contains '%s'", state->package, (yyvsp[(1) - (3)].id));
6328 if(ns.name && ns.name[0]) {
6329 syntaxerror("namespaces not allowed on package-level variables");
6331 info = varinfo_register_global(ns.access, state->package, (yyvsp[(1) - (3)].id));
6334 info->type = (yyvsp[(2) - (3)].classinfo);
6335 info->flags = flags;
6337 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, info);
6341 varinfo_t*info = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
6345 trait_t*t = add_abc_slot(slotstate_flags, (yyvsp[(1) - (3)].id), &mname, &code);
6347 if((yyvsp[(2) - (3)].classinfo)) {
6348 MULTINAME(m, (yyvsp[(2) - (3)].classinfo));
6349 t->type_name = multiname_clone(&m);
6351 info->slot = t->slot_id;
6353 /* workaround for "VerifyError: Error #1053: Illegal override of ::test2 in C1"
6354 FIXME: is there a way to use slots and still don't have conflicting overrides?
6356 info->slot = t->slot_id = 0;
6358 constant_t cval = (yyvsp[(3) - (3)].node)->type->eval((yyvsp[(3) - (3)].node));
6359 if(cval.type!=CONSTANT_UNKNOWN) {
6360 /* compile time constant */
6361 t->value = malloc(sizeof(constant_t));
6362 memcpy(t->value, &cval, sizeof(constant_t));
6363 info->value = constant_clone(t->value);
6365 typedcode_t v = node_read((yyvsp[(3) - (3)].node));
6366 /* initalization code (if needed) */
6368 if(v.c && !is_pushundefined(v.c)) {
6369 c = abc_getlocal_0(c);
6370 c = code_append(c, v.c);
6371 c = converttype(c, v.t, (yyvsp[(2) - (3)].classinfo));
6373 c = abc_initproperty2(c, &mname);
6375 c = abc_setslot(c, t->slot_id);
6378 *code = code_append(*code, c);
6381 if(slotstate_varconst==KW_CONST) {
6382 t->kind= TRAIT_CONST;
6383 info->flags |= FLAG_CONST;
6397 /* Line 1464 of skeleton.m4 */
6398 #line 2818 "parser.y"
6399 {(yyval.constant)=0;}
6408 /* Line 1464 of skeleton.m4 */
6409 #line 2819 "parser.y"
6411 (yyval.constant) = malloc(sizeof(constant_t));
6412 *(yyval.constant) = node_eval((yyvsp[(2) - (2)].node));
6413 if((yyval.constant)->type == CONSTANT_UNKNOWN) {
6414 syntaxerror("can't evaluate default parameter value (needs to be a compile-time constant)");
6425 /* Line 1464 of skeleton.m4 */
6426 #line 2828 "parser.y"
6427 {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_int));}
6436 /* Line 1464 of skeleton.m4 */
6437 #line 2829 "parser.y"
6439 (yyval.constant) = constant_new_uint((yyvsp[(1) - (1)].number_uint));
6449 /* Line 1464 of skeleton.m4 */
6450 #line 2832 "parser.y"
6451 {(yyval.constant) = constant_new_float((yyvsp[(1) - (1)].number_float));}
6460 /* Line 1464 of skeleton.m4 */
6461 #line 2833 "parser.y"
6462 {(yyval.constant) = constant_new_string2((yyvsp[(1) - (1)].str).str,(yyvsp[(1) - (1)].str).len);free((char*)(yyvsp[(1) - (1)].str).str);}
6471 /* Line 1464 of skeleton.m4 */
6472 #line 2834 "parser.y"
6473 {(yyval.constant) = constant_new_true((yyvsp[(1) - (1)].token));}
6482 /* Line 1464 of skeleton.m4 */
6483 #line 2835 "parser.y"
6484 {(yyval.constant) = constant_new_false((yyvsp[(1) - (1)].token));}
6493 /* Line 1464 of skeleton.m4 */
6494 #line 2836 "parser.y"
6495 {(yyval.constant) = constant_new_null((yyvsp[(1) - (1)].token));}
6504 /* Line 1464 of skeleton.m4 */
6505 #line 2837 "parser.y"
6506 {(yyval.constant) = constant_new_undefined((yyvsp[(1) - (1)].token));}
6515 /* Line 1464 of skeleton.m4 */
6516 #line 2838 "parser.y"
6517 {(yyval.constant) = constant_new_float(__builtin_nan(""));}
6526 /* Line 1464 of skeleton.m4 */
6527 #line 2851 "parser.y"
6529 multiname_t m = {QNAME, &stdns, 0, "XML"};
6532 v.c = abc_getlex2(v.c, &m);
6533 v.c = code_append(v.c, node_read((yyvsp[(1) - (1)].node)).c);
6534 v.c = abc_construct(v.c, 1);
6536 (yyval.node) = mkcodenode(v);
6546 /* Line 1464 of skeleton.m4 */
6547 #line 2862 "parser.y"
6548 {PASS_ALWAYS if(!xml_level++) tokenizer_begin_xml();}
6557 /* Line 1464 of skeleton.m4 */
6558 #line 2863 "parser.y"
6559 {PASS_ALWAYS tokenizer_begin_xmltext();}
6568 /* Line 1464 of skeleton.m4 */
6569 #line 2864 "parser.y"
6570 {PASS_ALWAYS if(!--xml_level) tokenizer_end_xml(); else tokenizer_begin_xmltext();}
6579 /* Line 1464 of skeleton.m4 */
6580 #line 2866 "parser.y"
6581 {PASS_ALWAYS tokenizer_begin_xmltext();}
6590 /* Line 1464 of skeleton.m4 */
6591 #line 2866 "parser.y"
6593 (yyval.node) = (yyvsp[(2) - (4)].node);
6603 /* Line 1464 of skeleton.m4 */
6604 #line 2869 "parser.y"
6605 {PASS_ALWAYS tokenizer_begin_xml();}
6614 /* Line 1464 of skeleton.m4 */
6615 #line 2869 "parser.y"
6617 (yyval.node) = (yyvsp[(2) - (4)].node);
6627 /* Line 1464 of skeleton.m4 */
6628 #line 2872 "parser.y"
6629 {(yyval.node)=mkstringnode("");}
6638 /* Line 1464 of skeleton.m4 */
6639 #line 2873 "parser.y"
6641 (yyval.node) = mkaddnode((yyvsp[(1) - (2)].node),(yyvsp[(2) - (2)].node));
6651 /* Line 1464 of skeleton.m4 */
6652 #line 2876 "parser.y"
6654 char* str = string_cstr(&(yyvsp[(2) - (2)].str));
6655 (yyval.node) = mkaddnode((yyvsp[(1) - (2)].node),mkstringnode(str));
6666 /* Line 1464 of skeleton.m4 */
6667 #line 2881 "parser.y"
6669 (yyval.node) = mkaddnode((yyvsp[(1) - (2)].node), mkstringnode(">"));
6679 /* Line 1464 of skeleton.m4 */
6680 #line 2884 "parser.y"
6682 (yyval.node) = mkaddnode((yyvsp[(1) - (2)].node),(yyvsp[(2) - (2)].node));
6692 /* Line 1464 of skeleton.m4 */
6693 #line 2887 "parser.y"
6695 (yyval.node) = mkaddnode((yyvsp[(1) - (3)].node), mkaddnode((yyvsp[(2) - (3)].node),(yyvsp[(3) - (3)].node)));
6705 /* Line 1464 of skeleton.m4 */
6706 #line 2890 "parser.y"
6708 (yyval.node) = mkstringnode((yyvsp[(1) - (1)].id));
6718 /* Line 1464 of skeleton.m4 */
6719 #line 2893 "parser.y"
6721 (yyval.node) = (yyvsp[(1) - (1)].node);
6731 /* Line 1464 of skeleton.m4 */
6732 #line 2897 "parser.y"
6734 (yyval.node) = mkstringnode("");
6744 /* Line 1464 of skeleton.m4 */
6745 #line 2900 "parser.y"
6747 (yyval.node) = mkaddnode(mkstringnode(" "),(yyvsp[(1) - (1)].node));
6757 /* Line 1464 of skeleton.m4 */
6758 #line 2904 "parser.y"
6760 //$$ = allocprintf("<%s%s/>", $2, $3, $5, $8);
6761 (yyval.node) = mkaddnode(mkaddnode(mkaddnode(mkstringnode("<"),(yyvsp[(2) - (6)].node)),(yyvsp[(3) - (6)].node)),mkstringnode("/>"));
6771 /* Line 1464 of skeleton.m4 */
6772 #line 2908 "parser.y"
6774 //$$ = allocprintf("<%s%s>%s</%s>", $2, $3, $5, $8);
6775 (yyval.node) = mkaddnode(mkaddnode(mkaddnode(mkaddnode(mkaddnode(mkaddnode(mkaddnode(
6776 mkstringnode("<"),(yyvsp[(2) - (10)].node)),(yyvsp[(3) - (10)].node)),mkstringnode(">")),(yyvsp[(5) - (10)].node)),mkstringnode("</")),(yyvsp[(8) - (10)].node)),mkstringnode(">"));
6786 /* Line 1464 of skeleton.m4 */
6787 #line 2913 "parser.y"
6789 //$$ = allocprintf("<%s%s>%s%s</%s>", $2, $3, $5, $6, $9);
6790 (yyval.node) = mkaddnode(mkaddnode(mkaddnode(mkaddnode(mkaddnode(mkaddnode(mkaddnode(mkaddnode(
6791 mkstringnode("<"),(yyvsp[(2) - (11)].node)),(yyvsp[(3) - (11)].node)),mkstringnode(">")),(yyvsp[(5) - (11)].node)),(yyvsp[(6) - (11)].node)),mkstringnode("</")),(yyvsp[(9) - (11)].node)),mkstringnode(">"));
6801 /* Line 1464 of skeleton.m4 */
6802 #line 2919 "parser.y"
6804 (yyval.node) = (yyvsp[(1) - (1)].node);
6814 /* Line 1464 of skeleton.m4 */
6815 #line 2922 "parser.y"
6817 (yyval.node) = mkaddnode((yyvsp[(1) - (2)].node), mkaddnode(mkstringnode(" "),(yyvsp[(2) - (2)].node)));
6827 /* Line 1464 of skeleton.m4 */
6828 #line 2925 "parser.y"
6830 (yyval.node) = (yyvsp[(1) - (1)].node);
6840 /* Line 1464 of skeleton.m4 */
6841 #line 2928 "parser.y"
6843 char* str = string_cstr(&(yyvsp[(3) - (3)].str));
6844 (yyval.node) = mkaddnode((yyvsp[(1) - (3)].node), mkstringnode(concat2("=",str)));
6855 /* Line 1464 of skeleton.m4 */
6856 #line 2933 "parser.y"
6858 (yyval.node) = mkaddnode((yyvsp[(1) - (3)].node), mkaddnode(mkstringnode("=\""), mkaddnode((yyvsp[(3) - (3)].node), mkstringnode("\""))));
6868 /* Line 1464 of skeleton.m4 */
6869 #line 2936 "parser.y"
6871 (yyval.node) = mkaddnode(mkaddnode(mkstringnode(concat2((yyvsp[(1) - (3)].id),"=\"")), (yyvsp[(3) - (3)].node)), mkstringnode("\""));
6881 /* Line 1464 of skeleton.m4 */
6882 #line 2939 "parser.y"
6884 char* str = string_cstr(&(yyvsp[(3) - (3)].str));
6885 (yyval.node)=mkstringnode(allocprintf("%s=%s", (yyvsp[(1) - (3)].id),str));
6887 free((yyvsp[(1) - (3)].id));free((char*)(yyvsp[(3) - (3)].str).str);
6897 /* Line 1464 of skeleton.m4 */
6898 #line 2949 "parser.y"
6901 memset(&(yyval.params),0,sizeof((yyval.params)));
6911 /* Line 1464 of skeleton.m4 */
6912 #line 2953 "parser.y"
6915 (yyval.params)=(yyvsp[(1) - (1)].params);
6925 /* Line 1464 of skeleton.m4 */
6926 #line 2959 "parser.y"
6929 memset(&(yyval.params),0,sizeof((yyval.params)));
6930 (yyval.params).varargs=1;
6931 list_append((yyval.params).list, (yyvsp[(2) - (2)].param));
6941 /* Line 1464 of skeleton.m4 */
6942 #line 2965 "parser.y"
6945 (yyval.params) =(yyvsp[(1) - (4)].params);
6946 (yyval.params).varargs=1;
6947 list_append((yyval.params).list, (yyvsp[(4) - (4)].param));
6957 /* Line 1464 of skeleton.m4 */
6958 #line 2973 "parser.y"
6961 (yyval.params) = (yyvsp[(1) - (3)].params);
6962 list_append((yyval.params).list, (yyvsp[(3) - (3)].param));
6972 /* Line 1464 of skeleton.m4 */
6973 #line 2978 "parser.y"
6976 memset(&(yyval.params),0,sizeof((yyval.params)));
6977 list_append((yyval.params).list, (yyvsp[(1) - (1)].param));
6987 /* Line 1464 of skeleton.m4 */
6988 #line 2984 "parser.y"
6991 (yyval.param) = rfx_calloc(sizeof(param_t));
6992 (yyval.param)->name=(yyvsp[(1) - (4)].id);
6993 (yyval.param)->type = (yyvsp[(3) - (4)].classinfo);
6995 (yyval.param)->value = (yyvsp[(4) - (4)].constant);
7005 /* Line 1464 of skeleton.m4 */
7006 #line 2992 "parser.y"
7009 (yyval.param) = rfx_calloc(sizeof(param_t));
7010 (yyval.param)->name=(yyvsp[(1) - (2)].id);
7011 (yyval.param)->type = TYPE_ANY;
7013 (yyval.param)->value = (yyvsp[(2) - (2)].constant);
7023 /* Line 1464 of skeleton.m4 */
7024 #line 3002 "parser.y"
7025 {PASS12 (yyval.token)=0;}
7034 /* Line 1464 of skeleton.m4 */
7035 #line 3005 "parser.y"
7036 {PASS12 startfunction(&(yyvsp[(1) - (9)].flags),(yyvsp[(3) - (9)].token),(yyvsp[(4) - (9)].id),&(yyvsp[(6) - (9)].params),(yyvsp[(8) - (9)].classinfo));}
7045 /* Line 1464 of skeleton.m4 */
7046 #line 3006 "parser.y"
7049 endfunction(&(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),0,0);
7051 if(!state->method->info) syntaxerror("internal error");
7053 code_t*c = method_header(state->method);
7054 c = wrap_function(c, 0, (yyvsp[(11) - (12)].code));
7056 endfunction(&(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),(yyvsp[(8) - (12)].classinfo),c);
7058 list_deep_free((yyvsp[(6) - (12)].params).list);
7069 /* Line 1464 of skeleton.m4 */
7070 #line 3022 "parser.y"
7071 {PASS12 (yyval.id)=0;}
7080 /* Line 1464 of skeleton.m4 */
7081 #line 3024 "parser.y"
7082 {PASS12 innerfunction((yyvsp[(2) - (7)].id),&(yyvsp[(4) - (7)].params),(yyvsp[(6) - (7)].classinfo));}
7091 /* Line 1464 of skeleton.m4 */
7092 #line 3025 "parser.y"
7095 endfunction(0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),0,0);
7097 methodinfo_t*f = state->method->info;
7098 if(!f || !f->kind) syntaxerror("internal error");
7100 code_t*c = method_header(state->method);
7101 c = wrap_function(c, 0, (yyvsp[(9) - (10)].code));
7103 int index = state->method->var_index;
7104 endfunction(0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),(yyvsp[(6) - (10)].classinfo),c);
7106 (yyval.value).c = abc_getlocal(0, index);
7107 (yyval.value).t = TYPE_FUNCTION(f);
7109 PASS12 list_deep_free((yyvsp[(4) - (10)].params).list);
7119 /* Line 1464 of skeleton.m4 */
7120 #line 3047 "parser.y"
7122 PASS1 NEW(unresolvedinfo_t,c);
7123 memset(c, 0, sizeof(*c));
7124 c->kind = INFOTYPE_UNRESOLVED;
7125 c->name = (yyvsp[(1) - (1)].id);
7126 c->package = get_package_from_name((yyvsp[(1) - (1)].id));
7128 c->nsset = get_current_imports();
7129 /* make the compiler look for this class in the current directory,
7131 as3_schedule_class_noerror(state->package, (yyvsp[(1) - (1)].id));
7133 (yyval.classinfo) = (classinfo_t*)c;
7135 slotinfo_t*s = find_class((yyvsp[(1) - (1)].id));
7136 if(!s) syntaxerror("Could not find class/method %s (current package: %s)\n", (yyvsp[(1) - (1)].id), state->package);
7137 (yyval.classinfo) = (classinfo_t*)s;
7147 /* Line 1464 of skeleton.m4 */
7148 #line 3066 "parser.y"
7150 PASS1 NEW(unresolvedinfo_t,c);
7151 memset(c, 0, sizeof(*c));
7152 c->kind = INFOTYPE_UNRESOLVED;
7153 c->package = (yyvsp[(1) - (3)].id);
7154 c->name = (yyvsp[(3) - (3)].id);
7155 (yyval.classinfo) = (classinfo_t*)c;
7157 slotinfo_t*s = registry_find((yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
7158 if(!s) syntaxerror("Couldn't find class/method %s.%s\n", (yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
7159 free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;
7160 (yyval.classinfo) = (classinfo_t*)s;
7170 /* Line 1464 of skeleton.m4 */
7171 #line 3083 "parser.y"
7172 {PASS12 (yyval.classinfo_list)=list_new();list_append((yyval.classinfo_list), (yyvsp[(1) - (1)].classinfo));}
7181 /* Line 1464 of skeleton.m4 */
7182 #line 3084 "parser.y"
7183 {PASS12 (yyval.classinfo_list)=(yyvsp[(1) - (3)].classinfo_list);list_append((yyval.classinfo_list),(yyvsp[(3) - (3)].classinfo));}
7192 /* Line 1464 of skeleton.m4 */
7193 #line 3086 "parser.y"
7194 {PASS12 (yyval.classinfo)=(yyvsp[(1) - (1)].classinfo);}
7203 /* Line 1464 of skeleton.m4 */
7204 #line 3087 "parser.y"
7205 {PASS12 (yyval.classinfo)=TYPE_ANY;}
7214 /* Line 1464 of skeleton.m4 */
7215 #line 3088 "parser.y"
7216 {PASS12 (yyval.classinfo)=TYPE_VOID;}
7225 /* Line 1464 of skeleton.m4 */
7226 #line 3097 "parser.y"
7227 {PASS12 (yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
7236 /* Line 1464 of skeleton.m4 */
7237 #line 3098 "parser.y"
7238 {PASS12 (yyval.classinfo)=0;}
7247 /* Line 1464 of skeleton.m4 */
7248 #line 3102 "parser.y"
7249 {(yyval.value_list).cc=0;(yyval.value_list).number=0;}
7258 /* Line 1464 of skeleton.m4 */
7259 #line 3103 "parser.y"
7260 {(yyval.value_list)=(yyvsp[(2) - (3)].value_list);}
7269 /* Line 1464 of skeleton.m4 */
7270 #line 3105 "parser.y"
7271 {(yyval.value_list).cc=0;(yyval.value_list).number=0;}
7280 /* Line 1464 of skeleton.m4 */
7281 #line 3109 "parser.y"
7282 {(yyval.value_list).number=1;
7283 (yyval.value_list).cc = (yyvsp[(1) - (1)].value).c;
7293 /* Line 1464 of skeleton.m4 */
7294 #line 3113 "parser.y"
7295 {(yyval.value_list) = (yyvsp[(1) - (2)].value_list);}
7304 /* Line 1464 of skeleton.m4 */
7305 #line 3114 "parser.y"
7307 (yyval.value_list).number= (yyvsp[(1) - (2)].value_list).number+1;
7308 (yyval.value_list).cc = code_append((yyvsp[(1) - (2)].value_list).cc, (yyvsp[(2) - (2)].value).c);
7318 /* Line 1464 of skeleton.m4 */
7319 #line 3120 "parser.y"
7321 typedcode_t v = node_read((yyvsp[(2) - (4)].node));
7322 (yyval.value).c = v.c;
7323 if((yyval.value).c->opcode == OPCODE_COERCE_A) (yyval.value).c = code_cutlast((yyval.value).c);
7325 code_t*paramcode = (yyvsp[(4) - (4)].value_list).cc;
7326 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
7327 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
7328 (yyval.value).c = code_cutlast((yyval.value).c);
7329 (yyval.value).c = code_append((yyval.value).c, paramcode);
7330 (yyval.value).c = abc_constructprop2((yyval.value).c, name, (yyvsp[(4) - (4)].value_list).number);
7331 multiname_destroy(name);
7332 } else if(is_getlocal((yyval.value).c)) {
7333 (yyval.value).c = code_append((yyval.value).c, paramcode);
7334 (yyval.value).c = abc_construct((yyval.value).c, (yyvsp[(4) - (4)].value_list).number);
7335 } else if(TYPE_IS_CLASS(v.t) && v.t->data) {
7336 code_free((yyval.value).c);
7337 classinfo_t*c = v.t->data;
7339 (yyval.value).c = abc_findpropstrict2(0, &m);
7340 (yyval.value).c = code_append((yyval.value).c, paramcode);
7341 (yyval.value).c = abc_constructprop2((yyval.value).c, &m, (yyvsp[(4) - (4)].value_list).number);
7342 /*} else if($$.c->opcode == OPCODE_GETSLOT) {
7343 int slot = (int)(ptroff_t)$$.c->data[0];
7344 trait_t*t = traits_find_slotid(state->cls->abc->traits,slot);//FIXME
7345 multiname_t*name = t->name;
7346 $$.c = code_cutlast($$.c);
7347 $$.c = code_append($$.c, paramcode);
7348 $$.c = abc_constructprop2($$.c, name, $4.number);*/
7350 (yyval.value).c = code_append((yyval.value).c, paramcode);
7351 (yyval.value).c = abc_construct((yyval.value).c, (yyvsp[(4) - (4)].value_list).number);
7354 (yyval.value).t = TYPE_ANY;
7355 if(TYPE_IS_CLASS(v.t) && v.t->data) {
7356 (yyval.value).t = v.t->data;
7358 (yyval.value).c = abc_coerce_a((yyval.value).c);
7359 (yyval.value).t = TYPE_ANY;
7370 /* Line 1464 of skeleton.m4 */
7371 #line 3167 "parser.y"
7374 typedcode_t v = node_read((yyvsp[(1) - (4)].node));
7375 (yyval.value).c = v.c;
7376 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
7377 (yyval.value).c = code_cutlast((yyval.value).c);
7379 code_t*paramcode = (yyvsp[(3) - (4)].value_list).cc;
7381 (yyval.value).t = TYPE_ANY;
7382 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
7383 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
7384 (yyval.value).c = code_cutlast((yyval.value).c);
7385 (yyval.value).c = code_append((yyval.value).c, paramcode);
7386 (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).number);
7387 multiname_destroy(name);
7388 /* } else if($$.c->opcode == OPCODE_GETSLOT && $$.c->prev->opcode != OPCODE_GETSCOPEOBJECT) {
7389 int slot = (int)(ptroff_t)$$.c->data[0];
7390 trait_t*t = traits_find_slotid(state->cls->abc->traits,slot);
7391 if(t->kind!=TRAIT_METHOD) {
7392 //ok: flash allows to assign closures to members.
7394 multiname_t*name = t->name;
7395 $$.c = code_cutlast($$.c);
7396 $$.c = code_append($$.c, paramcode);
7397 //$$.c = abc_callmethod($$.c, t->method, len); //#1051 illegal early access binding
7398 $$.c = abc_callproperty2($$.c, name, $3.number);*/
7399 } else if((yyval.value).c->opcode == OPCODE_GETSUPER) {
7400 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
7401 (yyval.value).c = code_cutlast((yyval.value).c);
7402 (yyval.value).c = code_append((yyval.value).c, paramcode);
7403 (yyval.value).c = abc_callsuper2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).number);
7404 multiname_destroy(name);
7406 (yyval.value).c = abc_getglobalscope((yyval.value).c);
7407 (yyval.value).c = code_append((yyval.value).c, paramcode);
7408 (yyval.value).c = abc_call((yyval.value).c, (yyvsp[(3) - (4)].value_list).number);
7411 if(TYPE_IS_FUNCTION(v.t) && v.t->data) {
7412 (yyval.value).t = ((methodinfo_t*)(v.t->data))->return_type;
7413 } else if(TYPE_IS_CLASS(v.t) && v.t->data) {
7414 // calling a class is like a typecast
7415 (yyval.value).t = (classinfo_t*)v.t->data;
7417 (yyval.value).t = TYPE_ANY;
7418 (yyval.value).c = abc_coerce_a((yyval.value).c);
7429 /* Line 1464 of skeleton.m4 */
7430 #line 3217 "parser.y"
7432 if(!state->cls) syntaxerror("super() not allowed outside of a class");
7433 if(!state->method) syntaxerror("super() not allowed outside of a function");
7434 if(!state->method->is_constructor) syntaxerror("super() not allowed outside of a constructor");
7436 (yyval.value).c = code_new();
7437 (yyval.value).c = abc_getlocal_0((yyval.value).c);
7439 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value_list).cc);
7441 this is dependent on the control path, check this somewhere else
7442 if(state->method->has_super)
7443 syntaxerror("constructor may call super() only once");
7445 state->method->has_super = 1;
7447 (yyval.value).c = abc_constructsuper((yyval.value).c, (yyvsp[(3) - (4)].value_list).number);
7448 (yyval.value).c = abc_pushundefined((yyval.value).c);
7449 (yyval.value).t = TYPE_ANY;
7459 /* Line 1464 of skeleton.m4 */
7460 #line 3238 "parser.y"
7462 typedcode_t v = node_read((yyvsp[(2) - (2)].node));
7463 (yyval.value).c = v.c;
7464 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
7465 (yyval.value).c = code_cutlast((yyval.value).c);
7467 multiname_t*name = 0;
7468 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
7469 (yyval.value).c->opcode = OPCODE_DELETEPROPERTY;
7470 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
7471 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
7472 multiname_t*name = traits_find_slotid(state->cls->abc->traits,slot)->name;
7473 (yyval.value).c = code_cutlast((yyval.value).c);
7474 (yyval.value).c = abc_deleteproperty2((yyval.value).c, name);
7476 (yyval.value).c = abc_getlocal_0((yyval.value).c);
7477 MULTINAME_LATE(m, v.t?v.t->access:ACCESS_PACKAGE, "");
7478 (yyval.value).c = abc_deleteproperty2((yyval.value).c, &m);
7480 (yyval.value).t = TYPE_BOOLEAN;
7490 /* Line 1464 of skeleton.m4 */
7491 #line 3260 "parser.y"
7493 (yyval.code) = abc_returnvoid(0);
7503 /* Line 1464 of skeleton.m4 */
7504 #line 3263 "parser.y"
7506 (yyval.code) = (yyvsp[(2) - (2)].value).c;
7507 (yyval.code) = abc_returnvalue((yyval.code));
7517 /* Line 1464 of skeleton.m4 */
7518 #line 3270 "parser.y"
7520 (yyval.value) = node_read((yyvsp[(1) - (1)].node));
7530 /* Line 1464 of skeleton.m4 */
7531 #line 3273 "parser.y"
7533 (yyval.value) = node_read((yyvsp[(1) - (1)].node));
7543 /* Line 1464 of skeleton.m4 */
7544 #line 3276 "parser.y"
7546 (yyval.node) = mkmultinode(&node_comma, (yyvsp[(1) - (1)].node));
7556 /* Line 1464 of skeleton.m4 */
7557 #line 3279 "parser.y"
7559 (yyval.node) = multinode_extend((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
7569 /* Line 1464 of skeleton.m4 */
7570 #line 3282 "parser.y"
7572 (yyval.code) = node_exec((yyvsp[(1) - (1)].node));
7582 /* Line 1464 of skeleton.m4 */
7583 #line 3285 "parser.y"
7585 (yyval.code) = (yyvsp[(1) - (3)].code);
7586 (yyval.code) = code_append((yyval.code), node_exec((yyvsp[(3) - (3)].node)));
7596 /* Line 1464 of skeleton.m4 */
7597 #line 3290 "parser.y"
7598 {(yyval.value_list).cc=0;(yyval.value_list).number=0;}
7607 /* Line 1464 of skeleton.m4 */
7608 #line 3291 "parser.y"
7609 {(yyval.value_list)=(yyvsp[(1) - (1)].value_list);}
7618 /* Line 1464 of skeleton.m4 */
7619 #line 3293 "parser.y"
7620 {(yyval.code)=abc_pushstring(0,(yyvsp[(1) - (1)].id));}
7629 /* Line 1464 of skeleton.m4 */
7630 #line 3294 "parser.y"
7631 {(yyval.code)=abc_pushstring2(0,&(yyvsp[(1) - (1)].str));}
7640 /* Line 1464 of skeleton.m4 */
7641 #line 3295 "parser.y"
7642 {syntaxerror("dictionary keys must be strings");}
7651 /* Line 1464 of skeleton.m4 */
7652 #line 3296 "parser.y"
7653 {syntaxerror("dictionary keys must be strings");}
7662 /* Line 1464 of skeleton.m4 */
7663 #line 3297 "parser.y"
7664 {syntaxerror("dictionary keys must be strings");}
7673 /* Line 1464 of skeleton.m4 */
7674 #line 3299 "parser.y"
7676 (yyval.value_list).cc = 0;
7677 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(1) - (3)].code));
7678 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (3)].value).c);
7679 (yyval.value_list).number = 2;
7689 /* Line 1464 of skeleton.m4 */
7690 #line 3305 "parser.y"
7692 (yyval.value_list).cc = (yyvsp[(1) - (5)].value_list).cc;
7693 (yyval.value_list).number = (yyvsp[(1) - (5)].value_list).number+2;
7694 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (5)].code));
7695 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(5) - (5)].value).c);
7705 /* Line 1464 of skeleton.m4 */
7706 #line 3314 "parser.y"
7707 {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
7716 /* Line 1464 of skeleton.m4 */
7717 #line 3315 "parser.y"
7718 {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
7727 /* Line 1464 of skeleton.m4 */
7728 #line 3316 "parser.y"
7729 {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
7738 /* Line 1464 of skeleton.m4 */
7739 #line 3317 "parser.y"
7740 {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
7749 /* Line 1464 of skeleton.m4 */
7750 #line 3318 "parser.y"
7751 {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
7760 /* Line 1464 of skeleton.m4 */
7761 #line 3319 "parser.y"
7762 {(yyval.node) = (yyvsp[(1) - (1)].node);}
7771 /* Line 1464 of skeleton.m4 */
7772 #line 3321 "parser.y"
7774 (yyval.node) = mkconstnode((yyvsp[(1) - (1)].constant));
7784 /* Line 1464 of skeleton.m4 */
7785 #line 3325 "parser.y"
7787 (yyval.node) = (yyvsp[(1) - (1)].node);
7797 /* Line 1464 of skeleton.m4 */
7798 #line 3330 "parser.y"
7802 multiname_t m = {QNAME, &stdns, 0, "RegExp"};
7803 if(!(yyvsp[(1) - (1)].regexp).options) {
7804 v.c = abc_getlex2(v.c, &m);
7805 v.c = abc_pushstring(v.c, (yyvsp[(1) - (1)].regexp).pattern);
7806 v.c = abc_construct(v.c, 1);
7808 v.c = abc_getlex2(v.c, &m);
7809 v.c = abc_pushstring(v.c, (yyvsp[(1) - (1)].regexp).pattern);
7810 v.c = abc_pushstring(v.c, (yyvsp[(1) - (1)].regexp).options);
7811 v.c = abc_construct(v.c, 2);
7814 (yyval.node) = mkcodenode(v);
7824 /* Line 1464 of skeleton.m4 */
7825 #line 3348 "parser.y"
7828 state->method->need_arguments = 1;
7831 v.c = abc_getlocal(0, state->method->need_arguments);
7833 (yyval.node) = mkcodenode(v);
7843 /* Line 1464 of skeleton.m4 */
7844 #line 3359 "parser.y"
7848 v.c = code_append(v.c, (yyvsp[(2) - (3)].value_list).cc);
7849 v.c = abc_newarray(v.c, (yyvsp[(2) - (3)].value_list).number);
7850 v.t = registry_getarrayclass();
7851 (yyval.node) = mkcodenode(v);
7861 /* Line 1464 of skeleton.m4 */
7862 #line 3369 "parser.y"
7866 v.c = code_append(v.c, (yyvsp[(2) - (3)].value_list).cc);
7867 v.c = abc_newobject(v.c, (yyvsp[(2) - (3)].value_list).number/2);
7868 v.t = registry_getobjectclass();
7869 (yyval.node) = mkcodenode(v);
7879 /* Line 1464 of skeleton.m4 */
7880 #line 3378 "parser.y"
7881 {(yyval.node) = mknode2(&node_lt,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
7890 /* Line 1464 of skeleton.m4 */
7891 #line 3379 "parser.y"
7892 {(yyval.node) = mknode2(&node_gt,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
7901 /* Line 1464 of skeleton.m4 */
7902 #line 3380 "parser.y"
7903 {(yyval.node) = mknode2(&node_le,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
7912 /* Line 1464 of skeleton.m4 */
7913 #line 3381 "parser.y"
7914 {(yyval.node) = mknode2(&node_ge,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
7923 /* Line 1464 of skeleton.m4 */
7924 #line 3382 "parser.y"
7925 {(yyval.node) = mknode2(&node_eqeq,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
7934 /* Line 1464 of skeleton.m4 */
7935 #line 3383 "parser.y"
7936 {(yyval.node) = mknode2(&node_eqeqeq,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
7945 /* Line 1464 of skeleton.m4 */
7946 #line 3384 "parser.y"
7947 {(yyval.node) = mknode2(&node_noteqeq,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
7956 /* Line 1464 of skeleton.m4 */
7957 #line 3385 "parser.y"
7958 {(yyval.node) = mknode2(&node_noteq,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
7967 /* Line 1464 of skeleton.m4 */
7968 #line 3386 "parser.y"
7969 {(yyval.node) = mknode2(&node_oror,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
7978 /* Line 1464 of skeleton.m4 */
7979 #line 3387 "parser.y"
7980 {(yyval.node) = mknode2(&node_andand,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
7989 /* Line 1464 of skeleton.m4 */
7990 #line 3388 "parser.y"
7991 {(yyval.node) = mknode1(&node_not, (yyvsp[(2) - (2)].node));}
8000 /* Line 1464 of skeleton.m4 */
8001 #line 3389 "parser.y"
8002 {(yyval.node) = mknode1(&node_bitnot, (yyvsp[(2) - (2)].node));}
8011 /* Line 1464 of skeleton.m4 */
8012 #line 3390 "parser.y"
8013 {(yyval.node) = mknode2(&node_bitand, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8022 /* Line 1464 of skeleton.m4 */
8023 #line 3391 "parser.y"
8024 {(yyval.node) = mknode2(&node_bitxor, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8033 /* Line 1464 of skeleton.m4 */
8034 #line 3392 "parser.y"
8035 {(yyval.node) = mknode2(&node_bitor, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8044 /* Line 1464 of skeleton.m4 */
8045 #line 3393 "parser.y"
8046 {(yyval.node) = mknode2(&node_shr, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8055 /* Line 1464 of skeleton.m4 */
8056 #line 3394 "parser.y"
8057 {(yyval.node) = mknode2(&node_ushr, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8066 /* Line 1464 of skeleton.m4 */
8067 #line 3395 "parser.y"
8068 {(yyval.node) = mknode2(&node_shl, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8077 /* Line 1464 of skeleton.m4 */
8078 #line 3396 "parser.y"
8079 {(yyval.node) = mknode2(&node_div, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8088 /* Line 1464 of skeleton.m4 */
8089 #line 3397 "parser.y"
8090 {(yyval.node) = mknode2(&node_mod, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8099 /* Line 1464 of skeleton.m4 */
8100 #line 3398 "parser.y"
8101 {(yyval.node) = mknode2(&node_plus, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8110 /* Line 1464 of skeleton.m4 */
8111 #line 3399 "parser.y"
8112 {(yyval.node) = mknode2(&node_minus, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8121 /* Line 1464 of skeleton.m4 */
8122 #line 3400 "parser.y"
8123 {(yyval.node) = mknode2(&node_multiply, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8132 /* Line 1464 of skeleton.m4 */
8133 #line 3401 "parser.y"
8134 {(yyval.node) = mknode2(&node_in, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8143 /* Line 1464 of skeleton.m4 */
8144 #line 3402 "parser.y"
8145 {(yyval.node) = mknode2(&node_as, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8154 /* Line 1464 of skeleton.m4 */
8155 #line 3403 "parser.y"
8156 {(yyval.node) = mknode2(&node_instanceof, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8165 /* Line 1464 of skeleton.m4 */
8166 #line 3404 "parser.y"
8167 {(yyval.node) = mknode2(&node_is, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8176 /* Line 1464 of skeleton.m4 */
8177 #line 3405 "parser.y"
8178 {(yyval.node) = mknode1(&node_typeof, (yyvsp[(2) - (2)].node));}
8187 /* Line 1464 of skeleton.m4 */
8188 #line 3406 "parser.y"
8189 {(yyval.node) = mknode1(&node_void, (yyvsp[(2) - (2)].node));}
8198 /* Line 1464 of skeleton.m4 */
8199 #line 3407 "parser.y"
8200 { (yyval.node) = mkconstnode(constant_new_undefined());}
8209 /* Line 1464 of skeleton.m4 */
8210 #line 3408 "parser.y"
8211 { (yyval.node)=(yyvsp[(2) - (3)].node);}
8220 /* Line 1464 of skeleton.m4 */
8221 #line 3409 "parser.y"
8222 {(yyval.node) = mknode1(&node_neg, (yyvsp[(2) - (2)].node));}
8231 /* Line 1464 of skeleton.m4 */
8232 #line 3410 "parser.y"
8233 {(yyval.node) = mknode2(&node_arraylookup, (yyvsp[(1) - (4)].node),(yyvsp[(3) - (4)].node));}
8242 /* Line 1464 of skeleton.m4 */
8243 #line 3411 "parser.y"
8244 {(yyval.node) = mknode2(&node_muleq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8253 /* Line 1464 of skeleton.m4 */
8254 #line 3412 "parser.y"
8255 {(yyval.node) = mknode2(&node_modeq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8264 /* Line 1464 of skeleton.m4 */
8265 #line 3413 "parser.y"
8266 {(yyval.node) = mknode2(&node_shleq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8275 /* Line 1464 of skeleton.m4 */
8276 #line 3414 "parser.y"
8277 {(yyval.node) = mknode2(&node_shreq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8286 /* Line 1464 of skeleton.m4 */
8287 #line 3415 "parser.y"
8288 {(yyval.node) = mknode2(&node_ushreq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8297 /* Line 1464 of skeleton.m4 */
8298 #line 3416 "parser.y"
8299 { (yyval.node) = mknode2(&node_diveq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8308 /* Line 1464 of skeleton.m4 */
8309 #line 3417 "parser.y"
8310 { (yyval.node) = mknode2(&node_bitoreq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8319 /* Line 1464 of skeleton.m4 */
8320 #line 3418 "parser.y"
8321 { (yyval.node) = mknode2(&node_bitxoreq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8330 /* Line 1464 of skeleton.m4 */
8331 #line 3419 "parser.y"
8332 { (yyval.node) = mknode2(&node_bitandeq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8341 /* Line 1464 of skeleton.m4 */
8342 #line 3420 "parser.y"
8343 { (yyval.node) = mknode2(&node_pluseq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8352 /* Line 1464 of skeleton.m4 */
8353 #line 3421 "parser.y"
8354 { (yyval.node) = mknode2(&node_minuseq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8363 /* Line 1464 of skeleton.m4 */
8364 #line 3422 "parser.y"
8365 { (yyval.node) = mknode2(&node_assign, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
8374 /* Line 1464 of skeleton.m4 */
8375 #line 3423 "parser.y"
8376 { (yyval.node) = mknode3(&node_tenary, (yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].node), (yyvsp[(5) - (5)].node));}
8385 /* Line 1464 of skeleton.m4 */
8386 #line 3425 "parser.y"
8387 { (yyval.node) = mknode1(&node_rplusplus, (yyvsp[(1) - (2)].node));}
8396 /* Line 1464 of skeleton.m4 */
8397 #line 3426 "parser.y"
8398 { (yyval.node) = mknode1(&node_rminusminus, (yyvsp[(1) - (2)].node));}
8407 /* Line 1464 of skeleton.m4 */
8408 #line 3427 "parser.y"
8409 {(yyval.node) = mknode1(&node_lplusplus, (yyvsp[(2) - (2)].node)); }
8418 /* Line 1464 of skeleton.m4 */
8419 #line 3428 "parser.y"
8420 {(yyval.node) = mknode1(&node_lminusminus, (yyvsp[(2) - (2)].node)); }
8429 /* Line 1464 of skeleton.m4 */
8430 #line 3431 "parser.y"
8431 { if(!state->cls->info)
8432 syntaxerror("super keyword not allowed outside a class");
8433 classinfo_t*t = state->cls->info->superclass;
8434 if(!t) t = TYPE_OBJECT;
8435 memberinfo_t*f = findmember_nsset(t, (yyvsp[(3) - (3)].id), 1, 0);
8436 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
8439 v.c = abc_getlocal_0(v.c);
8440 v.c = abc_getsuper2(v.c, &m);
8441 v.t = slotinfo_gettype((slotinfo_t*)f);
8442 (yyval.node) = mkcodenode(v);
8452 /* Line 1464 of skeleton.m4 */
8453 #line 3445 "parser.y"
8456 multiname_t m = {MULTINAMEA, 0, &nopackage_namespace_set, (yyvsp[(2) - (2)].id)};
8457 v.c = abc_getlex2(0, &m);
8459 (yyval.node) = mkcodenode(v);
8469 /* Line 1464 of skeleton.m4 */
8470 #line 3453 "parser.y"
8471 {PASS12 new_state();state->xmlfilter=1;}
8480 /* Line 1464 of skeleton.m4 */
8481 #line 3453 "parser.y"
8485 typedcode_t v = node_read((yyvsp[(1) - (6)].node));
8486 typedcode_t w = node_read((yyvsp[(5) - (6)].node));
8488 int index = alloc_local();
8489 int result = alloc_local();
8490 int tmp = alloc_local();
8491 int xml = alloc_local();
8493 c = code_append(c, v.c);
8494 c = abc_checkfilter(c);
8495 c = abc_coerce_a(c); //hasnext2 converts to *
8496 c = abc_setlocal(c, xml);
8497 multiname_t m = {QNAME, &stdns, 0, "XMLList"};
8498 c = abc_getlex2(c, &m);
8499 c = abc_construct(c, 0);
8500 c = abc_setlocal(c, result);
8501 c = abc_pushbyte(c, 0);
8502 c = abc_setlocal(c, index);
8503 code_t*jmp = c = abc_jump(c, 0);
8504 code_t*loop = c = abc_label(c);
8505 c = abc_getlocal(c, xml);
8506 c = abc_getlocal(c, index);
8507 c = abc_nextvalue(c);
8509 c = abc_setlocal(c, tmp);
8510 c = abc_pushwith(c);
8511 c = code_append(c, w.c);
8512 c = abc_popscope(c);
8513 code_t*b = c = abc_iffalse(c, 0);
8514 c = abc_getlocal(c, result);
8515 c = abc_getlocal(c, index);
8516 c = abc_getlocal(c, tmp);
8517 multiname_t m2 = {MULTINAMEL, 0, &nopackage_namespace_set, 0};
8518 c = abc_setproperty2(c, &m2);
8519 c = b->branch = jmp->branch = abc_nop(c);
8520 c = abc_kill(c, tmp);
8521 c = abc_hasnext2(c, xml, index);
8522 c = abc_iftrue(c, loop);
8523 c = abc_getlocal(c, result);
8524 c = abc_kill(c, xml);
8525 c = abc_kill(c, result);
8526 c = abc_kill(c, index);
8528 c = var_block(c, state->vars);
8533 (yyval.node) = mkcodenode(r);
8543 /* Line 1464 of skeleton.m4 */
8544 #line 3507 "parser.y"
8545 {(yyval.id)=(yyvsp[(1) - (1)].id);}
8554 /* Line 1464 of skeleton.m4 */
8555 #line 3508 "parser.y"
8565 /* Line 1464 of skeleton.m4 */
8566 #line 3509 "parser.y"
8567 {(yyval.id)=(char*)(yyvsp[(1) - (1)].id);}
8576 /* Line 1464 of skeleton.m4 */
8577 #line 3511 "parser.y"
8587 /* Line 1464 of skeleton.m4 */
8588 #line 3551 "parser.y"
8590 (yyval.node) = get_descendants((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(5) - (5)].id), 0, 0);
8600 /* Line 1464 of skeleton.m4 */
8601 #line 3554 "parser.y"
8603 typedcode_t v = node_read((yyvsp[(1) - (3)].node));
8604 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(3) - (3)].id)};
8605 v.c = abc_getdescendants2(v.c, &m);
8607 (yyval.node) = mkcodenode(v);
8617 /* Line 1464 of skeleton.m4 */
8618 #line 3561 "parser.y"
8620 (yyval.node) = get_descendants((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(5) - (5)].id), 1, 0);
8630 /* Line 1464 of skeleton.m4 */
8631 #line 3564 "parser.y"
8633 typedcode_t v = node_read((yyvsp[(1) - (5)].node));
8634 typedcode_t w = node_read((yyvsp[(4) - (5)].node));
8635 multiname_t m = {MULTINAMEL, 0, &nopackage_namespace_set, 0};
8636 v.c = code_append(v.c, w.c);
8637 v.c = converttype(w.c, w.t, TYPE_STRING);
8638 v.c = abc_getproperty2(v.c, &m);
8640 (yyval.node) = mkcodenode(v);
8650 /* Line 1464 of skeleton.m4 */
8651 #line 3575 "parser.y"
8653 typedcode_t v = node_read((yyvsp[(1) - (4)].node));
8654 multiname_t m = {MULTINAMEA, 0, &nopackage_namespace_set, (yyvsp[(4) - (4)].id)};
8655 v.c = abc_getproperty2(v.c, &m);
8657 (yyval.node) = mkcodenode(v);
8667 /* Line 1464 of skeleton.m4 */
8668 #line 3583 "parser.y"
8670 (yyval.node) = get_descendants((yyvsp[(1) - (6)].node), (yyvsp[(4) - (6)].id), (yyvsp[(6) - (6)].id), 0, 1);
8680 /* Line 1464 of skeleton.m4 */
8681 #line 3587 "parser.y"
8683 typedcode_t v = node_read((yyvsp[(1) - (4)].node));
8684 multiname_t m = {MULTINAMEA, 0, &nopackage_namespace_set, (yyvsp[(4) - (4)].id)};
8685 v.c = abc_getdescendants2(v.c, &m);
8687 (yyval.node) = mkcodenode(v);
8697 /* Line 1464 of skeleton.m4 */
8698 #line 3594 "parser.y"
8700 (yyval.node) = get_descendants((yyvsp[(1) - (6)].node), (yyvsp[(4) - (6)].id), (yyvsp[(6) - (6)].id), 1, 1);
8710 /* Line 1464 of skeleton.m4 */
8711 #line 3598 "parser.y"
8713 typedcode_t v = node_read((yyvsp[(1) - (6)].node));
8714 typedcode_t w = node_read((yyvsp[(5) - (6)].node));
8715 multiname_t m = {MULTINAMELA, 0, &nopackage_namespace_set, 0};
8716 v.c = code_append(v.c, w.c);
8717 v.c = converttype(w.c, w.t, TYPE_STRING);
8718 v.c = abc_getproperty2(v.c, &m);
8720 (yyval.node) = mkcodenode(v);
8730 /* Line 1464 of skeleton.m4 */
8731 #line 3608 "parser.y"
8733 typedcode_t v = node_read((yyvsp[(1) - (6)].node));
8734 typedcode_t w = node_read((yyvsp[(5) - (6)].node));
8735 multiname_t m = {MULTINAMELA, 0, &nopackage_namespace_set, 0};
8736 v.c = code_append(v.c, w.c);
8737 v.c = converttype(w.c, w.t, TYPE_STRING);
8738 v.c = abc_getdescendants2(v.c, &m);
8740 (yyval.node) = mkcodenode(v);
8750 /* Line 1464 of skeleton.m4 */
8751 #line 3619 "parser.y"
8753 typedcode_t v1 = node_read((yyvsp[(1) - (3)].node));
8754 (yyval.value).c = v1.c;
8755 classinfo_t*t = v1.t;
8757 if(TYPE_IS_CLASS(t) && t->data) {
8761 if(TYPE_IS_XML(t) && !findmember_nsset(t, (yyvsp[(3) - (3)].id), 1, is_static)) {
8762 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(3) - (3)].id)};
8763 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
8764 (yyval.value).c = abc_coerce_a((yyval.value).c);
8765 (yyval.value).t = TYPE_XMLLIST;
8767 if(t->subtype==INFOTYPE_UNRESOLVED) {
8768 syntaxerror("syntaxerror: trying to resolve property '%s' on incomplete object '%s'", (yyvsp[(3) - (3)].id), t->name);
8770 memberinfo_t*f = findmember_nsset(t, (yyvsp[(3) - (3)].id), 1, is_static);
8772 if(f && !is_static != !(f->flags&FLAG_STATIC))
8774 if(f && f->slot && !noslot) {
8775 (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
8778 if(!TYPE_IS_XMLLIST(t)) {
8779 as3_softwarning("Access of undefined property '%s' in %s", (yyvsp[(3) - (3)].id), t->name);
8782 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
8783 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
8785 /* determine type */
8786 (yyval.value).t = slotinfo_gettype((slotinfo_t*)f);
8787 if(!(yyval.value).t)
8788 (yyval.value).c = abc_coerce_a((yyval.value).c);
8790 } else if(v1.c && v1.c->opcode == OPCODE___PUSHPACKAGE__) {
8791 string_t*package = v1.c->data[0];
8792 char*package2 = concat3(package->str, ".", (yyvsp[(3) - (3)].id));
8794 slotinfo_t*a = registry_find(package->str, (yyvsp[(3) - (3)].id));
8796 (yyval.value) = push_class(a);
8797 } else if(dict_contains(state->import_toplevel_packages, package2) ||
8798 registry_ispackage(package2)) {
8799 (yyval.value).c = v1.c;
8800 (yyval.value).c->data[0] = string_new4(package2);
8801 (yyval.value).t = 0;
8803 syntaxerror("couldn't resolve %s", package2);
8806 /* when resolving a property on an unknown type, we do know the
8807 name of the property (and don't seem to need the package), but
8808 we need to make avm2 try out all access modes */
8809 as3_softwarning("Resolving %s on unknown type", (yyvsp[(3) - (3)].id));
8810 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(3) - (3)].id)};
8811 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
8812 (yyval.value).c = abc_coerce_a((yyval.value).c);
8813 (yyval.value).t = TYPE_ANY;
8824 /* Line 1464 of skeleton.m4 */
8825 #line 3816 "parser.y"
8828 (yyval.node) = resolve_identifier((yyvsp[(1) - (1)].id));
8838 /* Line 1464 of skeleton.m4 */
8839 #line 3820 "parser.y"
8842 /* Queue unresolved identifiers for checking against the parent
8843 function's variables.
8844 We consider everything which is not a local variable "unresolved".
8845 This encompasses class names, members of the surrounding class
8846 etc. which is *correct* because local variables of the parent function
8850 if(!find_variable(state, (yyvsp[(1) - (1)].id))) {
8851 unknown_variable((yyvsp[(1) - (1)].id));
8852 /* let the compiler know that it might want to check the current directory/package
8853 for this identifier- maybe there's a file $1.as defining $1. */
8854 as3_schedule_class_noerror(state->package, (yyvsp[(1) - (1)].id));
8860 (yyval.node) = resolve_identifier((yyvsp[(1) - (1)].id));
8870 /* Line 1464 of skeleton.m4 */
8871 #line 3854 "parser.y"
8874 NEW(namespace_decl_t,n);
8875 n->name = (yyvsp[(2) - (2)].id);
8876 n->url = (yyvsp[(2) - (2)].id);
8877 (yyval.namespace_decl)=n;
8887 /* Line 1464 of skeleton.m4 */
8888 #line 3861 "parser.y"
8891 NEW(namespace_decl_t,n);
8892 n->name = (yyvsp[(2) - (4)].id);
8893 n->url = (yyvsp[(4) - (4)].id);
8894 (yyval.namespace_decl)=n;
8904 /* Line 1464 of skeleton.m4 */
8905 #line 3868 "parser.y"
8908 NEW(namespace_decl_t,n);
8909 n->name = (yyvsp[(2) - (4)].id);
8910 n->url = (yyvsp[(4) - (4)].str).str;
8911 (yyval.namespace_decl)=n;
8921 /* Line 1464 of skeleton.m4 */
8922 #line 3875 "parser.y"
8925 trie_put(active_namespaces, (unsigned char*)(yyvsp[(2) - (2)].namespace_decl)->name, (void*)(yyvsp[(2) - (2)].namespace_decl)->url);
8927 namespace_t access = modifiers2access(&(yyvsp[(1) - (2)].flags));
8928 varinfo_t* var = varinfo_register_global(access.access, state->package, (yyvsp[(2) - (2)].namespace_decl)->name);
8929 var->type = TYPE_NAMESPACE;
8931 ns.access = ACCESS_NAMESPACE;
8932 ns.name = (yyvsp[(2) - (2)].namespace_decl)->url;
8933 var->value = constant_new_namespace(&ns);
8936 MULTINAME(m, TYPE_NAMESPACE);
8937 trait_t*t = add_abc_slot(&(yyvsp[(1) - (2)].flags), (yyvsp[(2) - (2)].namespace_decl)->name, 0, 0);
8938 t->value = var->value;
8939 t->type_name = multiname_clone(&m);
8952 /* Line 1464 of skeleton.m4 */
8953 #line 3898 "parser.y"
8956 (yyval.code) = code_append((yyval.code), node_read((yyvsp[(4) - (4)].node)).c);
8957 (yyval.code) = abc_dxnslate((yyval.code));
8967 /* Line 1464 of skeleton.m4 */
8968 #line 3904 "parser.y"
8971 const char*url = (yyvsp[(3) - (3)].classinfo)->name;
8973 varinfo_t*s = (varinfo_t*)(yyvsp[(3) - (3)].classinfo);
8974 if(s->kind == INFOTYPE_UNRESOLVED) {
8975 s = (varinfo_t*)registry_resolve((slotinfo_t*)s);
8977 syntaxerror("Couldn't resolve namespace %s", (yyvsp[(3) - (3)].classinfo)->name);
8980 if(!s || s->kind != INFOTYPE_VAR)
8981 syntaxerror("%s.%s is not a public namespace (%d)", (yyvsp[(3) - (3)].classinfo)->package, (yyvsp[(3) - (3)].classinfo)->name, s?s->kind:-1);
8982 if(!s->value || !NS_TYPE(s->value->type))
8983 syntaxerror("%s.%s is not a namespace", (yyvsp[(3) - (3)].classinfo)->package, (yyvsp[(3) - (3)].classinfo)->name);
8984 url = s->value->ns->name;
8986 trie_put(active_namespaces, (unsigned char*)(yyvsp[(3) - (3)].classinfo)->name, (void*)url);
8987 add_active_url(url);
8996 /* Line 1464 of skeleton.m4 */
8997 #line 8998 "parser.tab.c"
9000 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
9004 YY_STACK_PRINT (yyss, yyssp);
9008 /* Now `shift' the result of the reduction. Determine what state
9009 that goes to, based on the state we popped back to and the rule
9010 number reduced by. */
9014 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
9015 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
9016 yystate = yytable[yystate];
9018 yystate = yydefgoto[yyn - YYNTOKENS];
9023 /*------------------------------------.
9024 | yyerrlab -- here on detecting error |
9025 `------------------------------------*/
9027 /* If not already recovering from an error, report this error. */
9031 #if ! YYERROR_VERBOSE
9032 yyerror (YY_("syntax error"));
9035 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
9036 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
9038 YYSIZE_T yyalloc = 2 * yysize;
9039 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
9040 yyalloc = YYSTACK_ALLOC_MAXIMUM;
9041 if (yymsg != yymsgbuf)
9042 YYSTACK_FREE (yymsg);
9043 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
9045 yymsg_alloc = yyalloc;
9049 yymsg_alloc = sizeof yymsgbuf;
9053 if (0 < yysize && yysize <= yymsg_alloc)
9055 (void) yysyntax_error (yymsg, yystate, yychar);
9060 yyerror (YY_("syntax error"));
9062 goto yyexhaustedlab;
9070 if (yyerrstatus == 3)
9072 /* If just tried and failed to reuse lookahead token after an
9073 error, discard it. */
9075 if (yychar <= YYEOF)
9077 /* Return failure if at end of input. */
9078 if (yychar == YYEOF)
9083 yydestruct ("Error: discarding",
9089 /* Else will try to reuse lookahead token after shifting the error
9094 /*---------------------------------------------------.
9095 | yyerrorlab -- error raised explicitly by YYERROR. |
9096 `---------------------------------------------------*/
9099 /* Pacify compilers like GCC when the user code never invokes
9100 YYERROR and the label yyerrorlab therefore never appears in user
9102 if (/*CONSTCOND*/ 0)
9105 /* Do not reclaim the symbols of the rule which action triggered
9109 YY_STACK_PRINT (yyss, yyssp);
9114 /*-------------------------------------------------------------.
9115 | yyerrlab1 -- common code for both syntax error and YYERROR. |
9116 `-------------------------------------------------------------*/
9118 yyerrstatus = 3; /* Each real token shifted decrements this. */
9122 yyn = yypact[yystate];
9123 if (yyn != YYPACT_NINF)
9126 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
9134 /* Pop the current state because it cannot handle the error token. */
9139 yydestruct ("Error: popping",
9140 yystos[yystate], yyvsp);
9143 YY_STACK_PRINT (yyss, yyssp);
9149 /* Shift the error token. */
9150 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
9156 /*-------------------------------------.
9157 | yyacceptlab -- YYACCEPT comes here. |
9158 `-------------------------------------*/
9163 /*-----------------------------------.
9164 | yyabortlab -- YYABORT comes here. |
9165 `-----------------------------------*/
9170 #if !defined(yyoverflow) || YYERROR_VERBOSE
9171 /*-------------------------------------------------.
9172 | yyexhaustedlab -- memory exhaustion comes here. |
9173 `-------------------------------------------------*/
9175 yyerror (YY_("memory exhausted"));
9181 if (yychar != YYEMPTY)
9182 yydestruct ("Cleanup: discarding lookahead",
9184 /* Do not reclaim the symbols of the rule which action triggered
9185 this YYABORT or YYACCEPT. */
9187 YY_STACK_PRINT (yyss, yyssp);
9188 while (yyssp != yyss)
9190 yydestruct ("Cleanup: popping",
9191 yystos[*yyssp], yyvsp);
9196 YYSTACK_FREE (yyss);
9199 if (yymsg != yymsgbuf)
9200 YYSTACK_FREE (yymsg);
9202 /* Make sure YYID is used. */
9203 return YYID (yyresult);