2 /* A Bison parser, made by GNU Bison 2.4. */
4 /* Skeleton implementation for Bison's Yacc-like parsers in C
6 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
7 Free Software Foundation, Inc.
9 This program is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/>. */
22 /* As a special exception, you may create a larger work that contains
23 part or all of the Bison parser skeleton and distribute that work
24 under terms of your choice, so long as that work isn't itself a
25 parser generator using the skeleton or a modified version thereof
26 as a parser skeleton. Alternatively, if you modify or redistribute
27 the parser skeleton itself, you may (at your option) remove this
28 special exception, which will cause the skeleton and the resulting
29 Bison output files to be licensed under the GNU General Public
30 License without this special exception.
32 This special exception was added by the Free Software Foundation in
33 version 2.2 of Bison. */
35 /* C LALR(1) parser skeleton written by Richard Stallman, by
36 simplifying the original so-called "semantic" parser. */
38 /* All symbols defined below should begin with yy or YY, to avoid
39 infringing on user name space. This should be done even for local
40 variables, as they might otherwise be expanded by user macros.
41 There are some unavoidable exceptions within include files to
42 define necessary library symbols; they are noted "INFRINGES ON
43 USER NAME SPACE" below. */
45 /* Identify Bison output. */
49 #define YYBISON_VERSION "2.4"
52 #define YYSKELETON_NAME "./skeleton.m4"
63 /* Using locations. */
64 #define YYLSP_NEEDED 0
66 /* Substitute the variable and function names. */
67 #define yyparse a3_parse
69 #define yyerror a3_error
70 #define yylval a3_lval
71 #define yychar a3_char
72 #define yydebug a3_debug
73 #define yynerrs a3_nerrs
76 /* Copy the first part of user declarations. */
78 /* Line 198 of skeleton.m4 */
87 #include "tokenizer.h"
97 /* Line 198 of skeleton.m4 */
98 #line 99 "parser.tab.c"
100 /* Enabling traces. */
105 /* Enabling verbose error messages. */
106 #ifdef YYERROR_VERBOSE
107 # undef YYERROR_VERBOSE
108 # define YYERROR_VERBOSE 1
110 # define YYERROR_VERBOSE 1
113 /* Enabling the token table. */
114 #ifndef YYTOKEN_TABLE
115 # define YYTOKEN_TABLE 0
122 /* Put the tokens into the symbol table, so that GDB and other debuggers
220 below_semicolon = 353,
221 below_assignment = 354,
223 minusminus_prefix = 357,
224 plusplus_prefix = 358,
227 above_identifier = 361,
235 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
237 /* Line 223 of skeleton.m4 */
242 /* Line 223 of skeleton.m4 */
245 enum yytokentype token;
247 classinfo_t*classinfo;
248 classinfo_list_t*classinfo_list;
250 slotinfo_list_t*slotinfo_list;
253 unsigned int number_uint;
257 //typedcode_list_t*value_list;
258 codeandnumber_t value_list;
264 for_start_t for_start;
265 abc_exception_t *exception;
268 namespace_decl_t* namespace_decl;
270 abc_exception_list_t *l;
276 /* Line 223 of skeleton.m4 */
277 #line 278 "parser.tab.c"
279 # define YYSTYPE_IS_TRIVIAL 1
280 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
281 # define YYSTYPE_IS_DECLARED 1
285 /* Copy the second part of user declarations. */
287 /* Line 273 of skeleton.m4 */
291 static int a3_error(char*s)
293 syntaxerror("%s", s);
294 return 0; //make gcc happy
298 static char* concat2(const char* t1, const char* t2)
302 char*text = malloc(l1+l2+1);
303 memcpy(text , t1, l1);
304 memcpy(text+l1, t2, l2);
308 static char* concat3(const char* t1, const char* t2, const char* t3)
313 char*text = malloc(l1+l2+l3+1);
314 memcpy(text , t1, l1);
315 memcpy(text+l1, t2, l2);
316 memcpy(text+l1+l2, t3, l3);
321 typedef struct _import {
325 DECLARE_LIST(import);
327 DECLARE(methodstate);
328 DECLARE_LIST(methodstate);
330 typedef struct _classstate {
336 methodstate_t*static_init;
338 //code_t*static_init;
340 char has_constructor;
343 struct _methodstate {
353 dict_t*unresolved_variables;
356 char uses_parent_function;
361 int var_index; // for inner methods
362 int slot_index; // for inner methods
363 char is_a_slot; // for inner methods
368 abc_exception_list_t*exceptions;
370 methodstate_list_t*innerfunctions;
373 typedef struct _state {
378 import_list_t*wildcard_imports;
379 dict_t*import_toplevel_packages;
381 namespace_list_t*active_namespaces;
382 namespace_decl_list_t*new_namespaces;
383 char has_own_imports;
384 char new_vars; // e.g. transition between two functions
387 methodstate_t*method;
396 typedef struct _global {
400 dict_t*file2token2info;
403 static global_t*global = 0;
404 static state_t* state = 0;
408 #define MULTINAME(m,x) \
412 registry_fill_multiname(&m, &m##_ns, (slotinfo_t*)(x));
414 #define MEMBER_MULTINAME(m,f,n) \
418 if((m##_ns.access = ((slotinfo_t*)(f))->access)==ACCESS_NAMESPACE) \
419 m##_ns.name = ((slotinfo_t*)(f))->package; \
424 m.namespace_set = 0; \
425 m.name = ((slotinfo_t*)(f))->name; \
427 m.type = MULTINAME; \
429 m.namespace_set = &nopackage_namespace_set; \
433 /* warning: list length of namespace set is undefined */
434 #define MULTINAME_LATE(m, access, package) \
435 namespace_t m##_ns = {access, package}; \
436 namespace_set_t m##_nsset; \
437 namespace_list_t m##_l;m##_l.next = 0; \
438 m##_nsset.namespaces = &m##_l; \
439 m##_nsset = m##_nsset; \
440 m##_l.namespace = &m##_ns; \
441 multiname_t m = {MULTINAMEL, 0, &m##_nsset, 0};
443 static namespace_t ns1 = {ACCESS_PRIVATE, ""};
444 static namespace_t ns2 = {ACCESS_PROTECTED, ""};
445 static namespace_t ns3 = {ACCESS_PACKAGEINTERNAL, ""};
446 static namespace_t ns4 = {ACCESS_PACKAGE, ""};
447 static namespace_list_t nl4 = {&ns4,0};
448 static namespace_list_t nl3 = {&ns3,&nl4};
449 static namespace_list_t nl2 = {&ns2,&nl3};
450 static namespace_list_t nl1 = {&ns1,&nl2};
451 static namespace_set_t nopackage_namespace_set = {&nl1};
453 static void new_state()
456 state_t*oldstate = state;
458 memcpy(s, state, sizeof(state_t)); //shallow copy
460 s->imports = dict_new();
462 if(!s->import_toplevel_packages) {
463 s->import_toplevel_packages = dict_new();
467 state->has_own_imports = 0;
468 state->new_namespaces = 0;
469 state->vars = dict_new();
470 state->old = oldstate;
473 static void state_has_imports()
475 state->wildcard_imports = list_clone(state->wildcard_imports);
476 state->imports = dict_clone(state->imports);
477 state->has_own_imports = 1;
479 static void import_toplevel(const char*package)
481 char* s = strdup(package);
483 dict_put(state->import_toplevel_packages, s, 0);
484 char*x = strrchr(s, '.');
492 static void state_destroy(state_t*state)
494 if(state->has_own_imports) {
495 list_free(state->wildcard_imports);
496 dict_destroy(state->imports);state->imports=0;
498 if(state->imports && (!state->old || state->old->imports!=state->imports)) {
499 dict_destroy(state->imports);state->imports=0;
503 for(t=0;t<state->vars->hashsize;t++) {
504 dictentry_t*e =state->vars->slots[t];
506 free(e->data);e->data=0;
510 dict_destroy(state->vars);state->vars=0;
516 static void old_state()
518 if(!state || !state->old)
519 syntaxerror("invalid nesting");
520 state_t*leaving = state;
524 namespace_decl_list_t*nl=leaving->new_namespaces;
526 tokenizer_unregister_namespace(nl->namespace_decl->name);
530 if(as3_pass>1 && leaving->method && leaving->method != state->method && !leaving->method->inner) {
531 free(leaving->method);
534 if(as3_pass>1 && leaving->cls && leaving->cls != state->cls) {
539 state_destroy(leaving);
542 static code_t* method_header(methodstate_t*m);
543 static code_t* wrap_function(code_t*c,code_t*header, code_t*body);
544 static void function_initvars(methodstate_t*m, params_t*params, int flags, char var0);
547 static char* internal_filename_package = 0;
548 void initialize_file(char*filename)
551 syntaxerror("invalid call to initialize_file during parsing of another file");
554 state->package = internal_filename_package = strdup(filename);
556 global->token2info = dict_lookup(global->file2token2info,
557 current_filename // use long version
559 if(!global->token2info) {
560 global->token2info = dict_new2(&ptr_type);
561 dict_put(global->file2token2info, current_filename, global->token2info);
565 state->method = rfx_calloc(sizeof(methodstate_t));
566 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
567 state->method->late_binding = 1; // init scripts use getglobalscope, so we need a getlocal0/pushscope
569 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
570 function_initvars(state->method, 0, 0, 1);
571 global->init = abc_initscript(global->file);
577 if(!state || state->level!=1) {
578 syntaxerror("unexpected end of file in pass %d", as3_pass);
582 code_t*header = method_header(state->method);
583 code_t*c = wrap_function(header, 0, global->init->method->body->code);
584 global->init->method->body->code = c;
585 free(state->method);state->method=0;
588 //free(state->package);state->package=0; // used in registry
589 state_destroy(state);state=0;
592 void initialize_parser()
594 global = rfx_calloc(sizeof(global_t));
595 global->file = abc_file_new();
596 global->file->flags &= ~ABCFILE_LAZY;
597 global->file2token2info = dict_new();
598 global->token2info = 0;
601 void* finish_parser()
603 dict_free_all(global->file2token2info, 1, (void*)dict_destroy);
605 global->token2info=0;
611 static void xx_scopetest()
613 /* findpropstrict doesn't just return a scope object- it
614 also makes it "active" somehow. Push local_0 on the
615 scope stack and read it back with findpropstrict, it'll
616 contain properties like "trace". Trying to find the same
617 property on a "vanilla" local_0 yields only a "undefined" */
618 //c = abc_findpropstrict(c, "[package]::trace");
620 /*c = abc_getlocal_0(c);
621 c = abc_findpropstrict(c, "[package]::trace");
623 c = abc_setlocal_1(c);
625 c = abc_pushbyte(c, 0);
626 c = abc_setlocal_2(c);
628 code_t*xx = c = abc_label(c);
629 c = abc_findpropstrict(c, "[package]::trace");
630 c = abc_pushstring(c, "prop:");
631 c = abc_hasnext2(c, 1, 2);
633 c = abc_setlocal_3(c);
634 c = abc_callpropvoid(c, "[package]::trace", 2);
635 c = abc_getlocal_3(c);
637 c = abc_iftrue(c,xx);*/
640 typedef struct _variable {
644 methodstate_t*is_inner_method;
647 static variable_t* find_variable(state_t*s, char*name)
651 v = dict_lookup(s->vars, name);
653 if(s->new_vars) break;
658 static variable_t* find_slot(state_t*s, const char*name)
660 if(s->method && s->method->slots)
661 return dict_lookup(s->method->slots, name);
665 static variable_t* find_variable_safe(state_t*s, char*name)
667 variable_t* v = find_variable(s, name);
669 syntaxerror("undefined variable: %s", name);
672 static char variable_exists(char*name)
674 return dict_contains(state->vars, name);
676 code_t*defaultvalue(code_t*c, classinfo_t*type);
678 static int alloc_local()
680 return state->method->variable_count++;
683 static variable_t* new_variable2(const char*name, classinfo_t*type, char init, char maybeslot)
686 variable_t*v = find_slot(state, name);
692 v->index = alloc_local();
697 dict_put(state->vars, name, v);
701 static int new_variable(const char*name, classinfo_t*type, char init, char maybeslot)
703 return new_variable2(name, type, init, maybeslot)->index;
706 #define TEMPVARNAME "__as3_temp__"
707 static int gettempvar()
709 variable_t*v = find_variable(state, TEMPVARNAME);
712 return new_variable(TEMPVARNAME, 0, 0, 0);
715 code_t* var_block(code_t*body)
721 for(t=0;t<state->vars->hashsize;t++) {
722 dictentry_t*e = state->vars->slots[t];
724 variable_t*v = (variable_t*)e->data;
725 if(v->type && v->init) {
726 c = defaultvalue(c, v->type);
727 c = abc_setlocal(c, v->index);
728 k = abc_kill(k, v->index);
738 if(x->opcode== OPCODE___BREAK__ ||
739 x->opcode== OPCODE___CONTINUE__) {
740 /* link kill code before break/continue */
741 code_t*e = code_dup(k);
742 code_t*s = code_start(e);
754 c = code_append(c, body);
755 c = code_append(c, k);
759 void unknown_variable(char*name)
761 if(!state->method->unresolved_variables)
762 state->method->unresolved_variables = dict_new();
763 if(!dict_contains(state->method->unresolved_variables, name))
764 dict_put(state->method->unresolved_variables, name, 0);
767 #define parserassert(b) {if(!(b)) parsererror(__FILE__, __LINE__,__func__);}
769 static void parsererror(const char*file, int line, const char*f)
771 syntaxerror("internal error in %s, %s:%d", f, file, line);
775 static code_t* add_scope_code(code_t*c, methodstate_t*m)
777 if(m->uses_slots || (m->late_binding && !m->inner)) {
778 c = abc_getlocal_0(c);
779 c = abc_pushscope(c);
782 /* FIXME: does this need to be the same activation object as
783 in the function header? */
784 c = abc_newactivation(c);
785 c = abc_pushscope(c);
790 static code_t* method_header(methodstate_t*m)
794 c = add_scope_code(c, m);
796 methodstate_list_t*l = m->innerfunctions;
798 parserassert(l->methodstate->abc);
799 if(m->uses_slots && l->methodstate->is_a_slot) {
800 c = abc_getscopeobject(c, 1);
801 c = abc_newfunction(c, l->methodstate->abc);
803 c = abc_setlocal(c, l->methodstate->var_index);
804 c = abc_setslot(c, l->methodstate->slot_index);
806 c = abc_newfunction(c, l->methodstate->abc);
807 c = abc_setlocal(c, l->methodstate->var_index);
809 free(l->methodstate);l->methodstate=0;
813 c = code_append(c, m->header);
816 if(m->is_constructor && !m->has_super) {
817 // call default constructor
818 c = abc_getlocal_0(c);
819 c = abc_constructsuper(c, 0);
821 list_free(m->innerfunctions);
822 m->innerfunctions = 0;
827 static code_t* wrap_function(code_t*c,code_t*header, code_t*body)
829 c = code_append(c, header);
830 c = code_append(c, var_block(body));
831 /* append return if necessary */
832 if(!c || (c->opcode != OPCODE_RETURNVOID &&
833 c->opcode != OPCODE_RETURNVALUE)) {
834 c = abc_returnvoid(c);
840 static void startpackage(char*name)
843 /*printf("entering package \"%s\"\n", name);*/
844 state->package = strdup(name);
846 static void endpackage()
848 /*printf("leaving package \"%s\"\n", state->package);*/
850 //used e.g. in classinfo_register:
851 //free(state->package);state->package=0;
856 #define FLAG_PUBLIC 256
857 #define FLAG_PROTECTED 512
858 #define FLAG_PRIVATE 1024
859 #define FLAG_PACKAGEINTERNAL 2048
860 #define FLAG_NAMESPACE 4096
862 static namespace_t modifiers2access(modifiers_t*mod)
867 if(mod->flags&FLAG_NAMESPACE) {
868 if(mod->flags&(FLAG_PRIVATE|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
869 syntaxerror("invalid combination of access levels and namespaces");
870 ns.access = ACCESS_NAMESPACE;
872 } else if(mod->flags&FLAG_PUBLIC) {
873 if(mod->flags&(FLAG_PRIVATE|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
874 syntaxerror("invalid combination of access levels");
875 ns.access = ACCESS_PACKAGE;
876 } else if(mod->flags&FLAG_PRIVATE) {
877 if(mod->flags&(FLAG_PUBLIC|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
878 syntaxerror("invalid combination of access levels");
879 ns.access = ACCESS_PRIVATE;
880 } else if(mod->flags&FLAG_PROTECTED) {
881 if(mod->flags&(FLAG_PUBLIC|FLAG_PRIVATE|FLAG_PACKAGEINTERNAL))
882 syntaxerror("invalid combination of access levels");
883 ns.access = ACCESS_PROTECTED;
885 ns.access = ACCESS_PACKAGEINTERNAL;
889 static slotinfo_t* find_class(const char*name);
891 static void function_initvars(methodstate_t*m, params_t*params, int flags, char var0)
896 index = new_variable("this", 0, 0, 0);
897 else if(!m->is_global)
898 index = new_variable((flags&FLAG_STATIC)?"class":"this", state->cls?state->cls->info:0, 0, 0);
900 index = new_variable("globalscope", 0, 0, 0);
903 parserassert(!index);
907 /* as variables and slots share the same number, make sure
908 that those variable indices are reserved. It's up to the
909 optimizer to later shuffle the variables down to lower
911 m->variable_count = m->uses_slots;
916 for(p=params->list;p;p=p->next) {
917 new_variable(p->param->name, p->param->type, 0, 1);
922 m->scope_code = add_scope_code(m->scope_code, m);
926 methodstate_list_t*l = m->innerfunctions;
928 methodstate_t*m = l->methodstate;
930 variable_t* v = new_variable2(m->info->name, TYPE_FUNCTION(m->info), 0, 1);
931 m->var_index = v->index;
932 m->slot_index = v->index;
933 v->is_inner_method = m;
938 if(as3_pass==2 && m->slots) {
939 /* exchange unresolved identifiers with the actual objects */
940 DICT_ITERATE_ITEMS(m->slots, char*, name, variable_t*, v) {
941 if(v->type && v->type->kind == INFOTYPE_UNRESOLVED) {
942 v->type = (classinfo_t*)registry_resolve((slotinfo_t*)v->type);
943 if(!v->type || v->type->kind != INFOTYPE_CLASS) {
944 syntaxerror("Couldn't find class %s", v->type->name);
952 char*as3_globalclass=0;
953 static void startclass(modifiers_t* mod, char*classname, classinfo_t*extends, classinfo_list_t*implements)
956 syntaxerror("inner classes now allowed");
961 classinfo_list_t*mlist=0;
963 if(mod->flags&~(FLAG_PACKAGEINTERNAL|FLAG_PUBLIC|FLAG_FINAL|FLAG_DYNAMIC|FLAG_INTERFACE))
964 syntaxerror("invalid modifier(s)");
966 if((mod->flags&(FLAG_PUBLIC|FLAG_PACKAGEINTERNAL)) == (FLAG_PUBLIC|FLAG_PACKAGEINTERNAL))
967 syntaxerror("public and internal not supported at the same time.");
969 //if(!(mod->flags&FLAG_INTERFACE) && !extends) {
970 if(!(mod->flags&FLAG_INTERFACE) && !extends) {
971 // all classes extend object
972 extends = registry_getobjectclass();
975 /* create the class name, together with the proper attributes */
979 if(!(mod->flags&FLAG_PUBLIC) && state->package==internal_filename_package) {
980 access = ACCESS_PRIVATE; package = internal_filename_package;
981 } else if(!(mod->flags&FLAG_PUBLIC) && state->package!=internal_filename_package) {
982 access = ACCESS_PACKAGEINTERNAL; package = state->package;
983 } else if(state->package!=internal_filename_package) {
984 access = ACCESS_PACKAGE; package = state->package;
986 syntaxerror("public classes only allowed inside a package");
990 state->cls = rfx_calloc(sizeof(classstate_t));
991 state->cls->init = rfx_calloc(sizeof(methodstate_t));
992 state->cls->static_init = rfx_calloc(sizeof(methodstate_t));
993 /* notice: we make no effort to initialize the top variable (local0) here,
994 even though it has special meaning. We just rely on the facat
995 that pass 1 won't do anything with variables */
997 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->cls);
999 /* set current method to constructor- all code within the class-level (except
1000 static variable initializations) will be executed during construction time */
1001 state->method = state->cls->init;
1003 if(registry_find(package, classname)) {
1004 syntaxerror("Package \"%s\" already contains a class called \"%s\"", package, classname);
1006 /* build info struct */
1007 int num_interfaces = (list_length(implements));
1008 state->cls->info = classinfo_register(access, package, classname, num_interfaces);
1009 state->cls->info->flags |= mod->flags & (FLAG_DYNAMIC|FLAG_INTERFACE|FLAG_FINAL);
1012 classinfo_list_t*l = implements;
1013 for(l=implements;l;l=l->next) {
1014 state->cls->info->interfaces[pos++] = l->classinfo;
1019 state->cls = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1021 state->method = state->cls->init;
1022 parserassert(state->cls && state->cls->info);
1024 function_initvars(state->cls->init, 0, 0, 1);
1025 function_initvars(state->cls->static_init, 0, 0, 0);
1027 if(extends && (extends->flags & FLAG_FINAL))
1028 syntaxerror("Can't extend final class '%s'", extends->name);
1031 while(state->cls->info->interfaces[pos]) {
1032 if(!(state->cls->info->interfaces[pos]->flags & FLAG_INTERFACE))
1033 syntaxerror("'%s' is not an interface",
1034 state->cls->info->interfaces[pos]->name);
1038 /* fill out interfaces and extends (we couldn't resolve those during the first pass) */
1039 state->cls->info->superclass = extends;
1041 /* generate the abc code for this class */
1042 MULTINAME(classname2,state->cls->info);
1043 multiname_t*extends2 = sig2mname(extends);
1045 state->cls->abc = abc_class_new(global->file, &classname2, extends2);
1046 if(state->cls->info->flags&FLAG_FINAL) abc_class_final(state->cls->abc);
1047 if(!(state->cls->info->flags&FLAG_DYNAMIC)) abc_class_sealed(state->cls->abc);
1048 if(state->cls->info->flags&FLAG_INTERFACE) {
1049 abc_class_interface(state->cls->abc);
1052 abc_class_protectedNS(state->cls->abc, classname);
1054 for(mlist=implements;mlist;mlist=mlist->next) {
1055 MULTINAME(m, mlist->classinfo);
1056 abc_class_add_interface(state->cls->abc, &m);
1059 /* write the construction code for this class to the global init
1061 int slotindex = abc_initscript_addClassTrait(global->init, &classname2, state->cls->abc);
1063 abc_method_body_t*m = global->init->method->body;
1064 __ getglobalscope(m);
1065 classinfo_t*s = extends;
1070 //TODO: take a look at the current scope stack, maybe
1071 // we can re-use something
1076 multiname_t*s2 = sig2mname(s);
1078 multiname_destroy(s2);
1080 __ pushscope(m); count++;
1081 m->code = m->code->prev->prev; // invert
1083 /* continue appending after last op end */
1084 while(m->code && m->code->next) m->code = m->code->next;
1086 /* TODO: if this is one of *our* classes, we can also
1087 do a getglobalscope/getslot <nr> (which references
1088 the init function's slots) */
1090 __ getlex2(m, extends2);
1092 /* notice: we get a Verify Error #1107 if the top elemnt on the scope
1093 stack is not the superclass */
1094 __ pushscope(m);count++;
1097 /* notice: we get a verify error #1107 if the top element on the scope
1098 stack is not the global object */
1100 __ pushscope(m);count++;
1102 __ newclass(m,state->cls->abc);
1106 __ setslot(m, slotindex);
1107 multiname_destroy(extends2);
1109 /* flash.display.MovieClip handling */
1111 if(!as3_globalclass && (mod->flags&FLAG_PUBLIC) && slotinfo_equals((slotinfo_t*)registry_getMovieClip(),(slotinfo_t*)extends)) {
1112 if(state->package && state->package[0]) {
1113 as3_globalclass = concat3(state->package, ".", classname);
1115 as3_globalclass = strdup(classname);
1121 static int slotstate_varconst = 0;
1122 static modifiers_t*slotstate_flags = 0;
1123 static void setslotstate(modifiers_t* flags, int varconst)
1125 slotstate_varconst = varconst;
1126 slotstate_flags = flags;
1128 if(flags && flags->flags&FLAG_STATIC) {
1129 state->method = state->cls->static_init;
1131 state->method = state->cls->init;
1134 parserassert(state->method);
1138 static void endclass()
1141 if(!state->cls->has_constructor && !(state->cls->info->flags&FLAG_INTERFACE)) {
1143 c = abc_getlocal_0(c);
1144 c = abc_constructsuper(c, 0);
1145 state->cls->init->header = code_append(state->cls->init->header, c);
1146 state->cls->has_constructor=1;
1148 if(state->cls->init) {
1149 if(state->cls->info->flags&FLAG_INTERFACE) {
1150 if(state->cls->init->header)
1151 syntaxerror("interface can not have class-level code");
1153 abc_method_t*m = abc_class_getconstructor(state->cls->abc, 0);
1154 code_t*c = method_header(state->cls->init);
1155 m->body->code = wrap_function(c, 0, m->body->code);
1158 if(state->cls->static_init) {
1159 abc_method_t*m = abc_class_getstaticconstructor(state->cls->abc, 0);
1160 code_t*c = method_header(state->cls->static_init);
1161 m->body->code = wrap_function(c, 0, m->body->code);
1168 void check_code_for_break(code_t*c)
1171 if(c->opcode == OPCODE___BREAK__) {
1172 char*name = string_cstr(c->data[0]);
1173 syntaxerror("Unresolved \"break %s\"", name);
1175 if(c->opcode == OPCODE___CONTINUE__) {
1176 char*name = string_cstr(c->data[0]);
1177 syntaxerror("Unresolved \"continue %s\"", name);
1179 if(c->opcode == OPCODE___PUSHPACKAGE__) {
1180 char*name = string_cstr(c->data[0]);
1181 syntaxerror("Can't reference a package (%s) as such", name);
1188 static void check_constant_against_type(classinfo_t*t, constant_t*c)
1190 #define xassert(b) if(!(b)) syntaxerror("Invalid default value %s for type '%s'", constant_tostring(c), t->name)
1191 if(TYPE_IS_NUMBER(t)) {
1192 xassert(c->type == CONSTANT_FLOAT
1193 || c->type == CONSTANT_INT
1194 || c->type == CONSTANT_UINT);
1195 } else if(TYPE_IS_UINT(t)) {
1196 xassert(c->type == CONSTANT_UINT ||
1197 (c->type == CONSTANT_INT && c->i>=0));
1198 } else if(TYPE_IS_INT(t)) {
1199 xassert(c->type == CONSTANT_INT);
1200 } else if(TYPE_IS_BOOLEAN(t)) {
1201 xassert(c->type == CONSTANT_TRUE
1202 || c->type == CONSTANT_FALSE);
1206 static void check_override(memberinfo_t*m, int flags)
1210 if(m->parent == state->cls->info)
1211 syntaxerror("class '%s' already contains a method/slot '%s'", m->parent->name, m->name);
1213 syntaxerror("internal error: overriding method %s, which doesn't have parent", m->name);
1214 if(m->access==ACCESS_PRIVATE)
1216 if(m->flags & FLAG_FINAL)
1217 syntaxerror("can't override final member %s", m->name);
1219 /* allow this. it's no issue.
1220 if((m->flags & FLAG_STATIC) && !(flags&FLAG_STATIC))
1221 syntaxerror("can't override static member %s", m->name);*/
1223 if(!(m->flags & FLAG_STATIC) && (flags&FLAG_STATIC))
1224 syntaxerror("can't override non-static member %s with static declaration", m->name);
1226 if(!(flags&FLAG_OVERRIDE) && !(flags&FLAG_STATIC) && !(m->flags&FLAG_STATIC)) {
1227 if(m->parent && !(m->parent->flags&FLAG_INTERFACE)) {
1228 if(m->kind == INFOTYPE_METHOD)
1229 syntaxerror("can't override without explicit 'override' declaration");
1231 syntaxerror("can't override '%s'", m->name);
1236 static methodinfo_t*registerfunction(enum yytokentype getset, modifiers_t*mod, char*name, params_t*params, classinfo_t*return_type, int slot)
1238 methodinfo_t*minfo = 0;
1239 namespace_t ns = modifiers2access(mod);
1242 minfo = methodinfo_register_global(ns.access, state->package, name);
1243 minfo->return_type = 0; // save this for pass 2
1244 } else if(getset != KW_GET && getset != KW_SET) {
1246 memberinfo_t* m = registry_findmember(state->cls->info, ns.name, name, 0);
1248 printf("%s.%s | %s.%s\n",
1249 m->package, m->name,
1251 syntaxerror("class already contains a %s '%s'", infotypename((slotinfo_t*)m), m->name);
1253 minfo = methodinfo_register_onclass(state->cls->info, ns.access, ns.name, name);
1254 minfo->return_type = 0; // save this for pass 2
1255 // getslot on a member slot only returns "undefined", so no need
1256 // to actually store these
1257 //state->minfo->slot = state->method->abc->method->trait->slot_id;
1259 //class getter/setter
1260 int gs = getset==KW_GET?SUBTYPE_GET:SUBTYPE_SET;
1262 if(getset == KW_GET) {
1264 } else if(params->list && params->list->param && !params->list->next) {
1265 type = params->list->param->type;
1267 syntaxerror("setter function needs to take exactly one argument");
1268 // not sure wether to look into superclasses here, too
1269 minfo = (methodinfo_t*)registry_findmember(state->cls->info, ns.name, name, 1);
1271 if(minfo->kind!=INFOTYPE_SLOT)
1272 syntaxerror("class already contains a method called '%s'", name);
1273 if(!(minfo->subtype & (SUBTYPE_GETSET)))
1274 syntaxerror("class already contains a field called '%s'", name);
1275 if(minfo->subtype & gs)
1276 syntaxerror("getter/setter for '%s' already defined", name);
1277 /* make a setter or getter into a getset */
1278 minfo->subtype |= gs;
1281 FIXME: this check needs to be done in pass 2
1283 if((!minfo->return_type != !type) ||
1284 (minfo->return_type && type &&
1285 !strcmp(minfo->return_type->name, type->name))) {
1286 syntaxerror("different type in getter and setter: %s and %s",
1287 minfo->return_type?minfo->return_type->name:"*",
1288 type?type->name:"*");
1291 minfo = methodinfo_register_onclass(state->cls->info, ns.access, ns.name, name);
1292 minfo->kind = INFOTYPE_SLOT; //hack
1293 minfo->subtype = gs;
1294 minfo->return_type = 0;
1296 /* can't assign a slot as getter and setter might have different slots */
1297 //minfo->slot = slot;
1299 if(mod->flags&FLAG_FINAL) minfo->flags |= FLAG_FINAL;
1300 if(mod->flags&FLAG_STATIC) minfo->flags |= FLAG_STATIC;
1301 if(mod->flags&FLAG_OVERRIDE) minfo->flags |= FLAG_OVERRIDE;
1306 static void innerfunction(char*name, params_t*params, classinfo_t*return_type)
1308 //parserassert(state->method && state->method->info);
1310 methodstate_t*parent_method = state->method;
1313 return_type = 0; // not valid in pass 1
1317 state->new_vars = 1;
1320 state->method = rfx_calloc(sizeof(methodstate_t));
1321 state->method->inner = 1;
1322 state->method->variable_count = 0;
1323 state->method->abc = rfx_calloc(sizeof(abc_method_t));
1325 NEW(methodinfo_t,minfo);
1326 minfo->kind = INFOTYPE_METHOD;
1327 minfo->access = ACCESS_PACKAGEINTERNAL;
1329 state->method->info = minfo;
1332 list_append(parent_method->innerfunctions, state->method);
1334 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
1336 function_initvars(state->method, params, 0, 1);
1340 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1341 state->method->variable_count = 0;
1342 parserassert(state->method);
1344 state->method->info->return_type = return_type;
1345 function_initvars(state->method, params, 0, 1);
1349 static void startfunction(modifiers_t*mod, enum yytokentype getset, char*name,
1350 params_t*params, classinfo_t*return_type)
1352 if(state->method && state->method->info) {
1353 syntaxerror("not able to start another method scope");
1356 state->new_vars = 1;
1359 state->method = rfx_calloc(sizeof(methodstate_t));
1360 state->method->has_super = 0;
1363 state->method->is_constructor = !strcmp(state->cls->info->name,name);
1365 state->method->is_global = 1;
1366 state->method->late_binding = 1; // for global methods, always push local_0 on the scope stack
1368 if(state->method->is_constructor)
1369 name = "__as3_constructor__";
1371 state->method->info = registerfunction(getset, mod, name, params, return_type, 0);
1373 function_initvars(state->method, params, mod->flags, 1);
1375 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
1379 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1380 state->method->variable_count = 0;
1381 parserassert(state->method);
1384 memberinfo_t*m = registry_findmember(state->cls->info, mod->ns, name, 2);
1385 check_override(m, mod->flags);
1389 state->cls->has_constructor |= state->method->is_constructor;
1392 state->method->info->return_type = return_type;
1393 function_initvars(state->method, params, mod->flags, 1);
1397 static abc_method_t* endfunction(modifiers_t*mod, enum yytokentype getset, char*name,
1398 params_t*params, classinfo_t*return_type, code_t*body)
1400 int flags = mod?mod->flags:0;
1403 // store inner methods in variables
1404 function_initvars(state->method, 0, 0, 0);
1406 methodstate_list_t*ml = state->method->innerfunctions;
1408 dict_t*xvars = dict_new();
1411 methodstate_t*m = ml->methodstate;
1412 parserassert(m->inner);
1413 if(m->unresolved_variables) {
1414 dict_t*d = m->unresolved_variables;
1416 for(t=0;t<d->hashsize;t++) {
1417 dictentry_t*l = d->slots[t];
1419 /* check parent method's variables */
1421 if((v=find_variable(state, l->key))) {
1422 m->uses_parent_function = 1;
1423 state->method->uses_slots = 1;
1424 dict_put(xvars, l->key, 0);
1431 dict_destroy(m->unresolved_variables);
1432 m->unresolved_variables = 0;
1437 if(state->method->uses_slots) {
1438 state->method->slots = dict_new();
1440 DICT_ITERATE_ITEMS(state->vars, char*, name, variable_t*, v) {
1441 if(!name) syntaxerror("internal error");
1442 if(v->index && dict_contains(xvars, name)) {
1445 if(v->is_inner_method) {
1446 v->is_inner_method->is_a_slot = 1;
1449 dict_put(state->method->slots, name, v);
1452 state->method->uses_slots = i;
1453 dict_destroy(state->vars);state->vars = 0;
1460 /*if(state->method->uses_parent_function){
1461 syntaxerror("accessing variables of parent function from inner functions not supported yet");
1466 multiname_t*type2 = sig2mname(return_type);
1468 if(state->method->inner) {
1469 f = state->method->abc;
1470 abc_method_init(f, global->file, type2, 1);
1471 } else if(state->method->is_constructor) {
1472 f = abc_class_getconstructor(state->cls->abc, type2);
1473 } else if(!state->method->is_global) {
1474 namespace_t mname_ns = {state->method->info->access, ""};
1475 multiname_t mname = {QNAME, &mname_ns, 0, name};
1477 if(flags&FLAG_STATIC)
1478 f = abc_class_staticmethod(state->cls->abc, type2, &mname);
1480 f = abc_class_method(state->cls->abc, type2, &mname);
1481 slot = f->trait->slot_id;
1483 namespace_t mname_ns = {state->method->info->access, state->package};
1484 multiname_t mname = {QNAME, &mname_ns, 0, name};
1486 f = abc_method_new(global->file, type2, 1);
1487 trait_t*t = trait_new_method(&global->init->traits, multiname_clone(&mname), f);
1488 //abc_code_t*c = global->init->method->body->code;
1490 //flash doesn't seem to allow us to access function slots
1491 //state->method->info->slot = slot;
1493 if(flags&FLAG_OVERRIDE) f->trait->attributes |= TRAIT_ATTR_OVERRIDE;
1494 if(getset == KW_GET) f->trait->kind = TRAIT_GETTER;
1495 if(getset == KW_SET) f->trait->kind = TRAIT_SETTER;
1496 if(params->varargs) f->flags |= METHOD_NEED_REST;
1500 for(p=params->list;p;p=p->next) {
1501 if(params->varargs && !p->next) {
1502 break; //varargs: omit last parameter in function signature
1504 multiname_t*m = sig2mname(p->param->type);
1505 list_append(f->parameters, m);
1506 if(p->param->value) {
1507 check_constant_against_type(p->param->type, p->param->value);
1508 opt=1;list_append(f->optional_parameters, p->param->value);
1510 syntaxerror("non-optional parameter not allowed after optional parameters");
1513 if(state->method->slots) {
1514 DICT_ITERATE_ITEMS(state->method->slots, char*, name, variable_t*, v) {
1516 multiname_t*mname = multiname_new(namespace_new(ACCESS_PACKAGE, ""), name);
1517 multiname_t*type = sig2mname(v->type);
1518 trait_t*t = trait_new_member(&f->body->traits, type, mname, 0);
1519 t->slot_id = v->index;
1524 check_code_for_break(body);
1526 /* Seems this works now.
1527 if(state->method->exceptions && state->method->uses_slots) {
1528 as3_warning("try/catch and activation not supported yet within the same method");
1532 f->body->code = body;
1533 f->body->exceptions = state->method->exceptions;
1534 } else { //interface
1536 syntaxerror("interface methods can't have a method body");
1546 char is_subtype_of(classinfo_t*type, classinfo_t*supertype)
1551 void breakjumpsto(code_t*c, char*name, code_t*jump)
1554 if(c->opcode == OPCODE___BREAK__) {
1555 string_t*name2 = c->data[0];
1556 if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1557 c->opcode = OPCODE_JUMP;
1564 void continuejumpsto(code_t*c, char*name, code_t*jump)
1567 if(c->opcode == OPCODE___CONTINUE__) {
1568 string_t*name2 = c->data[0];
1569 if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1570 c->opcode = OPCODE_JUMP;
1578 #define IS_INT(a) (TYPE_IS_INT((a)) || TYPE_IS_UINT((a)))
1579 #define IS_NUMBER_OR_INT(a) (TYPE_IS_INT((a)) || TYPE_IS_UINT((a)) || TYPE_IS_NUMBER((a)))
1580 #define BOTH_INT(a,b) (IS_INT(a) && IS_INT(b))
1582 classinfo_t*join_types(classinfo_t*type1, classinfo_t*type2, char op)
1584 if(!type1 || !type2)
1585 return registry_getanytype();
1586 if(TYPE_IS_ANY(type1) || TYPE_IS_ANY(type2))
1587 return registry_getanytype();
1590 if(IS_NUMBER_OR_INT(type1) && IS_NUMBER_OR_INT(type2)) {
1599 return registry_getanytype();
1601 code_t*converttype(code_t*c, classinfo_t*from, classinfo_t*to)
1606 return abc_coerce_a(c);
1610 // cast an "any" type to a specific type. subject to
1611 // runtime exceptions
1612 return abc_coerce2(c, &m);
1615 if((TYPE_IS_NUMBER(from) || TYPE_IS_UINT(from) || TYPE_IS_INT(from)) &&
1616 (TYPE_IS_NUMBER(to) || TYPE_IS_UINT(to) || TYPE_IS_INT(to))) {
1617 // allow conversion between number types
1618 return abc_coerce2(c, &m);
1620 //printf("%s.%s\n", from.package, from.name);
1621 //printf("%s.%s\n", to.package, to.name);
1623 classinfo_t*supertype = from;
1625 if(supertype == to) {
1626 // target type is one of from's superclasses
1627 return abc_coerce2(c, &m);
1630 while(supertype->interfaces[t]) {
1631 if(supertype->interfaces[t]==to) {
1632 // target type is one of from's interfaces
1633 return abc_coerce2(c, &m);
1637 supertype = supertype->superclass;
1639 if(TYPE_IS_FUNCTION(from) && TYPE_IS_FUNCTION(to))
1641 if(TYPE_IS_CLASS(from) && TYPE_IS_CLASS(to))
1643 if(TYPE_IS_NULL(from) && !IS_NUMBER_OR_INT(to))
1646 as3_error("can't convert type %s%s%s to %s%s%s",
1647 from->package, from->package?".":"", from->name,
1648 to->package, to->package?".":"", to->name);
1652 code_t*defaultvalue(code_t*c, classinfo_t*type)
1654 if(TYPE_IS_INT(type)) {
1655 c = abc_pushbyte(c, 0);
1656 } else if(TYPE_IS_UINT(type)) {
1657 c = abc_pushuint(c, 0);
1658 } else if(TYPE_IS_FLOAT(type)) {
1660 } else if(TYPE_IS_BOOLEAN(type)) {
1661 c = abc_pushfalse(c);
1663 //c = abc_pushundefined(c);
1665 c = abc_pushnull(c);
1667 c = abc_coerce2(c, &m);
1672 char is_pushundefined(code_t*c)
1674 return (c && !c->prev && !c->next && c->opcode == OPCODE_PUSHUNDEFINED);
1677 static const char* get_package_from_name(const char*name)
1679 /* try explicit imports */
1680 dictentry_t* e = dict_get_slot(state->imports, name);
1682 if(!strcmp(e->key, name)) {
1683 slotinfo_t*c = (slotinfo_t*)e->data;
1684 if(c) return c->package;
1690 static namespace_list_t*get_current_imports()
1692 namespace_list_t*searchlist = 0;
1694 list_append(searchlist, namespace_new_package(state->package));
1696 import_list_t*l = state->wildcard_imports;
1698 namespace_t*ns = namespace_new_package(l->import->package);
1699 list_append(searchlist, ns);
1702 list_append(searchlist, namespace_new_package(""));
1703 list_append(searchlist, namespace_new_package(internal_filename_package));
1707 static slotinfo_t* find_class(const char*name)
1711 c = registry_find(state->package, name);
1714 /* try explicit imports */
1715 dictentry_t* e = dict_get_slot(state->imports, name);
1718 if(!strcmp(e->key, name)) {
1719 c = (slotinfo_t*)e->data;
1725 /* try package.* imports */
1726 import_list_t*l = state->wildcard_imports;
1728 //printf("does package %s contain a class %s?\n", l->import->package, name);
1729 c = registry_find(l->import->package, name);
1734 /* try global package */
1735 c = registry_find("", name);
1738 /* try local "filename" package */
1739 c = registry_find(internal_filename_package, name);
1744 typedcode_t push_class(slotinfo_t*a)
1749 if(a->access == ACCESS_PACKAGEINTERNAL &&
1750 strcmp(a->package, state->package) &&
1751 strcmp(a->package, internal_filename_package)
1753 syntaxerror("Can't access internal %s %s in package '%s' from package '%s'",
1754 infotypename(a), a->name, a->package, state->package);
1757 if(a->kind != INFOTYPE_CLASS) {
1759 x.c = abc_findpropstrict2(x.c, &m);
1760 x.c = abc_getproperty2(x.c, &m);
1761 if(a->kind == INFOTYPE_METHOD) {
1762 methodinfo_t*f = (methodinfo_t*)a;
1763 x.t = TYPE_FUNCTION(f);
1765 varinfo_t*v = (varinfo_t*)a;
1769 classinfo_t*c = (classinfo_t*)a;
1771 x.c = abc_getglobalscope(x.c);
1772 x.c = abc_getslot(x.c, c->slot);
1775 x.c = abc_getlex2(x.c, &m);
1777 x.t = TYPE_CLASS(c);
1782 static char is_getlocal(code_t*c)
1784 if(!c || c->prev || c->next)
1786 return(c->opcode == OPCODE_GETLOCAL
1787 || c->opcode == OPCODE_GETLOCAL_0
1788 || c->opcode == OPCODE_GETLOCAL_1
1789 || c->opcode == OPCODE_GETLOCAL_2
1790 || c->opcode == OPCODE_GETLOCAL_3);
1792 static int getlocalnr(code_t*c)
1794 if(c->opcode == OPCODE_GETLOCAL) {return (ptroff_t)c->data[0];}
1795 else if(c->opcode == OPCODE_GETLOCAL_0) {return 0;}
1796 else if(c->opcode == OPCODE_GETLOCAL_1) {return 1;}
1797 else if(c->opcode == OPCODE_GETLOCAL_2) {return 2;}
1798 else if(c->opcode == OPCODE_GETLOCAL_3) {return 3;}
1799 else syntaxerror("Internal error: opcode %02x is not a getlocal call", c->opcode);
1803 static code_t* toreadwrite(code_t*in, code_t*middlepart, char justassign, char readbefore)
1807 [prefix code] [read instruction]
1811 [prefix code] ([dup]) [read instruction] [middlepart] [setvar] [write instruction] [getvar]
1813 if(in && in->opcode == OPCODE_COERCE_A) {
1814 in = code_cutlast(in);
1817 syntaxerror("internal error");
1819 /* chop off read instruction */
1823 prefix = r->prev;r->prev = 0;
1829 char use_temp_var = readbefore;
1831 /* generate the write instruction, and maybe append a dup to the prefix code */
1832 code_t* write = abc_nop(0);
1833 if(r->opcode == OPCODE_GETPROPERTY) {
1834 write->opcode = OPCODE_SETPROPERTY;
1835 multiname_t*m = (multiname_t*)r->data[0];
1836 write->data[0] = multiname_clone(m);
1837 if(m->type == QNAME || m->type == MULTINAME) {
1839 prefix = abc_dup(prefix); // we need the object, too
1842 } else if(m->type == MULTINAMEL) {
1844 /* dupping two values on the stack requires 5 operations and one register-
1845 couldn't adobe just have given us a dup2? */
1846 int temp = gettempvar();
1847 prefix = abc_setlocal(prefix, temp);
1848 prefix = abc_dup(prefix);
1849 prefix = abc_getlocal(prefix, temp);
1850 prefix = abc_swap(prefix);
1851 prefix = abc_getlocal(prefix, temp);
1853 prefix = abc_kill(prefix, temp);
1857 syntaxerror("illegal lvalue: can't assign a value to this expression (not a qname/multiname)");
1859 } else if(r->opcode == OPCODE_GETSLOT) {
1860 write->opcode = OPCODE_SETSLOT;
1861 write->data[0] = r->data[0];
1863 prefix = abc_dup(prefix); // we need the object, too
1866 } else if(r->opcode == OPCODE_GETLOCAL) {
1867 write->opcode = OPCODE_SETLOCAL;
1868 write->data[0] = r->data[0];
1869 } else if(r->opcode == OPCODE_GETLOCAL_0) {
1870 write->opcode = OPCODE_SETLOCAL_0;
1871 } else if(r->opcode == OPCODE_GETLOCAL_1) {
1872 write->opcode = OPCODE_SETLOCAL_1;
1873 } else if(r->opcode == OPCODE_GETLOCAL_2) {
1874 write->opcode = OPCODE_SETLOCAL_2;
1875 } else if(r->opcode == OPCODE_GETLOCAL_3) {
1876 write->opcode = OPCODE_SETLOCAL_3;
1877 } else if(r->opcode == OPCODE_GETSUPER) {
1878 write->opcode = OPCODE_SETSUPER;
1879 multiname_t*m = (multiname_t*)r->data[0];
1880 write->data[0] = multiname_clone(m);
1883 syntaxerror("illegal lvalue: can't assign a value to this expression");
1890 /* with getproperty/getslot, we have to be extra careful not
1891 to execute the read code twice, as it might have side-effects
1892 (e.g. if the property is in fact a setter/getter combination)
1894 So read the value, modify it, and write it again,
1895 using prefix only once and making sure (by using a temporary
1896 register) that the return value is what we just wrote */
1897 temp = gettempvar();
1898 c = code_append(c, prefix);
1899 c = code_append(c, r);
1902 c = abc_setlocal(c, temp);
1904 c = code_append(c, middlepart);
1907 c = abc_setlocal(c, temp);
1909 c = code_append(c, write);
1910 c = abc_getlocal(c, temp);
1911 c = abc_kill(c, temp);
1913 /* if we're allowed to execute the read code twice *and*
1914 the middlepart doesn't modify the code, things are easier.
1916 code_t* r2 = code_dup(r);
1917 //c = code_append(c, prefix);
1918 parserassert(!prefix);
1919 c = code_append(c, r);
1920 c = code_append(c, middlepart);
1921 c = code_append(c, write);
1922 c = code_append(c, r2);
1925 /* even smaller version: overwrite the value without reading
1929 c = code_append(c, prefix);
1932 c = code_append(c, middlepart);
1933 c = code_append(c, write);
1934 c = code_append(c, r);
1937 temp = gettempvar();
1939 c = code_append(c, prefix);
1941 c = code_append(c, middlepart);
1943 c = abc_setlocal(c, temp);
1944 c = code_append(c, write);
1945 c = abc_getlocal(c, temp);
1946 c = abc_kill(c, temp);
1952 char is_break_or_jump(code_t*c)
1956 if(c->opcode == OPCODE_JUMP ||
1957 c->opcode == OPCODE___BREAK__ ||
1958 c->opcode == OPCODE___CONTINUE__ ||
1959 c->opcode == OPCODE_THROW ||
1960 c->opcode == OPCODE_RETURNVOID ||
1961 c->opcode == OPCODE_RETURNVALUE) {
1968 #define IS_FINALLY_TARGET(op) \
1969 ((op) == OPCODE___CONTINUE__ || \
1970 (op) == OPCODE___BREAK__ || \
1971 (op) == OPCODE_RETURNVOID || \
1972 (op) == OPCODE_RETURNVALUE || \
1973 (op) == OPCODE___RETHROW__)
1975 static code_t* insert_finally_lookup(code_t*c, code_t*finally, int tempvar)
1977 #define NEED_EXTRA_STACK_ARG
1978 code_t*finally_label = abc_nop(0);
1979 NEW(lookupswitch_t, l);
1985 code_t*prev = i->prev;
1986 if(IS_FINALLY_TARGET(i->opcode)) {
1989 if(i->opcode == OPCODE___RETHROW__ ||
1990 i->opcode == OPCODE_RETURNVALUE) {
1991 if(i->opcode == OPCODE___RETHROW__)
1992 i->opcode = OPCODE_THROW;
1994 p = abc_coerce_a(p);
1995 p = abc_setlocal(p, tempvar);
1997 p = abc_pushbyte(p, count++);
1998 p = abc_jump(p, finally_label);
1999 code_t*target = p = abc_label(p);
2000 #ifdef NEED_EXTRA_STACK_ARG
2004 p = abc_getlocal(p, tempvar);
2007 p->next = i;i->prev = p;
2008 list_append(l->targets, target);
2014 c = abc_pushbyte(c, -1);
2015 c = code_append(c, finally_label);
2016 c = code_append(c, finally);
2018 #ifdef NEED_EXTRA_STACK_ARG
2021 c = abc_lookupswitch(c, l);
2022 c = l->def = abc_label(c);
2023 #ifdef NEED_EXTRA_STACK_ARG
2030 static code_t* insert_finally_simple(code_t*c, code_t*finally, int tempvar)
2034 code_t*prev = i->prev;
2035 if(IS_FINALLY_TARGET(i->opcode)) {
2036 if(i->opcode == OPCODE___RETHROW__)
2037 i->opcode = OPCODE_THROW;
2038 code_t*end = code_dup(finally);
2039 code_t*start = code_start(end);
2040 if(prev) prev->next = start;
2047 return code_append(c, finally);
2050 code_t* insert_finally(code_t*c, code_t*finally, int tempvar)
2056 int num_insertion_points=0;
2058 if(IS_FINALLY_TARGET(i->opcode))
2059 num_insertion_points++;
2066 if(i->branch || i->opcode == OPCODE_LOOKUPSWITCH) {
2071 int simple_version_cost = (1+num_insertion_points)*code_size;
2072 int lookup_version_cost = 4*num_insertion_points + 5;
2074 if(cantdup || simple_version_cost > lookup_version_cost) {
2075 //printf("(use lookup) simple=%d > lookup=%d\n", simple_version_cost, lookup_version_cost);
2076 return insert_finally_lookup(c, finally, tempvar);
2078 //printf("(use simple) simple=%d < lookup=%d\n", simple_version_cost, lookup_version_cost);
2079 return insert_finally_simple(c, finally, tempvar);
2083 #define PASS1 }} if(as3_pass == 1) {{
2084 #define PASS1END }} if(as3_pass == 2) {{
2085 #define PASS2 }} if(as3_pass == 2) {{
2086 #define PASS12 }} {{
2087 #define PASS12END }} if(as3_pass == 2) {{
2091 /* Line 273 of skeleton.m4 */
2092 #line 2093 "parser.tab.c"
2099 typedef YYTYPE_UINT8 yytype_uint8;
2101 typedef unsigned char yytype_uint8;
2105 typedef YYTYPE_INT8 yytype_int8;
2106 #elif (defined __STDC__ || defined __C99__FUNC__ \
2107 || defined __cplusplus || defined _MSC_VER)
2108 typedef signed char yytype_int8;
2110 typedef short int yytype_int8;
2113 #ifdef YYTYPE_UINT16
2114 typedef YYTYPE_UINT16 yytype_uint16;
2116 typedef unsigned short int yytype_uint16;
2120 typedef YYTYPE_INT16 yytype_int16;
2122 typedef short int yytype_int16;
2126 # ifdef __SIZE_TYPE__
2127 # define YYSIZE_T __SIZE_TYPE__
2128 # elif defined size_t
2129 # define YYSIZE_T size_t
2130 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
2131 || defined __cplusplus || defined _MSC_VER)
2132 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
2133 # define YYSIZE_T size_t
2135 # define YYSIZE_T unsigned int
2139 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
2144 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
2145 # define YY_(msgid) dgettext ("bison-runtime", msgid)
2149 # define YY_(msgid) msgid
2153 /* Suppress unused-variable warnings by "using" E. */
2154 #if ! defined lint || defined __GNUC__
2155 # define YYUSE(e) ((void) (e))
2157 # define YYUSE(e) /* empty */
2160 /* Identity function, used to suppress warnings about constant conditions. */
2162 # define YYID(n) (n)
2164 #if (defined __STDC__ || defined __C99__FUNC__ \
2165 || defined __cplusplus || defined _MSC_VER)
2178 #if ! defined yyoverflow || YYERROR_VERBOSE
2180 /* The parser invokes alloca or malloc; define the necessary symbols. */
2182 # ifdef YYSTACK_USE_ALLOCA
2183 # if YYSTACK_USE_ALLOCA
2185 # define YYSTACK_ALLOC __builtin_alloca
2186 # elif defined __BUILTIN_VA_ARG_INCR
2187 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
2189 # define YYSTACK_ALLOC __alloca
2190 # elif defined _MSC_VER
2191 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
2192 # define alloca _alloca
2194 # define YYSTACK_ALLOC alloca
2195 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
2196 || defined __cplusplus || defined _MSC_VER)
2197 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
2199 # define _STDLIB_H 1
2206 # ifdef YYSTACK_ALLOC
2207 /* Pacify GCC's `empty if-body' warning. */
2208 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
2209 # ifndef YYSTACK_ALLOC_MAXIMUM
2210 /* The OS might guarantee only one guard page at the bottom of the stack,
2211 and a page size can be as small as 4096 bytes. So we cannot safely
2212 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
2213 to allow for a few compiler-allocated temporary stack slots. */
2214 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
2217 # define YYSTACK_ALLOC YYMALLOC
2218 # define YYSTACK_FREE YYFREE
2219 # ifndef YYSTACK_ALLOC_MAXIMUM
2220 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
2222 # if (defined __cplusplus && ! defined _STDLIB_H \
2223 && ! ((defined YYMALLOC || defined malloc) \
2224 && (defined YYFREE || defined free)))
2225 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
2227 # define _STDLIB_H 1
2231 # define YYMALLOC malloc
2232 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
2233 || defined __cplusplus || defined _MSC_VER)
2234 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
2238 # define YYFREE free
2239 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
2240 || defined __cplusplus || defined _MSC_VER)
2241 void free (void *); /* INFRINGES ON USER NAME SPACE */
2245 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
2248 #if (! defined yyoverflow \
2249 && (! defined __cplusplus \
2250 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
2252 /* A type that is properly aligned for any stack member. */
2255 yytype_int16 yyss_alloc;
2259 /* The size of the maximum gap between one aligned stack and the next. */
2260 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
2262 /* The size of an array large to enough to hold all stacks, each with
2264 # define YYSTACK_BYTES(N) \
2265 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
2266 + YYSTACK_GAP_MAXIMUM)
2268 /* Copy COUNT objects from FROM to TO. The source and destination do
2271 # if defined __GNUC__ && 1 < __GNUC__
2272 # define YYCOPY(To, From, Count) \
2273 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
2275 # define YYCOPY(To, From, Count) \
2279 for (yyi = 0; yyi < (Count); yyi++) \
2280 (To)[yyi] = (From)[yyi]; \
2286 /* Relocate STACK from its old location to the new one. The
2287 local variables YYSIZE and YYSTACKSIZE give the old and new number of
2288 elements in the stack, and YYPTR gives the new location of the
2289 stack. Advance YYPTR to a properly aligned location for the next
2291 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
2294 YYSIZE_T yynewbytes; \
2295 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
2296 Stack = &yyptr->Stack_alloc; \
2297 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
2298 yyptr += yynewbytes / sizeof (*yyptr); \
2304 /* YYFINAL -- State number of the termination state. */
2306 /* YYLAST -- Last index in YYTABLE. */
2309 /* YYNTOKENS -- Number of terminals. */
2310 #define YYNTOKENS 134
2311 /* YYNNTS -- Number of nonterminals. */
2313 /* YYNRULES -- Number of rules. */
2314 #define YYNRULES 308
2315 /* YYNRULES -- Number of states. */
2316 #define YYNSTATES 520
2318 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
2319 #define YYUNDEFTOK 2
2320 #define YYMAXUTOK 363
2322 #define YYTRANSLATE(YYX) \
2323 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
2325 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
2326 static const yytype_uint8 yytranslate[] =
2328 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2329 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2330 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2331 2, 2, 2, 118, 2, 2, 2, 116, 108, 2,
2332 122, 133, 115, 113, 100, 112, 127, 114, 2, 2,
2333 2, 2, 2, 2, 2, 2, 2, 2, 105, 99,
2334 109, 102, 110, 104, 128, 2, 2, 2, 2, 2,
2335 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2336 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2337 2, 124, 2, 125, 107, 2, 2, 2, 2, 2,
2338 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2339 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2340 2, 2, 2, 126, 106, 132, 117, 2, 2, 2,
2341 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2342 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2343 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2344 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2345 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2346 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2347 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2348 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2349 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2350 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2351 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2352 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2353 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
2354 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
2355 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
2356 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
2357 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
2358 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
2359 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
2360 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
2361 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
2362 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
2363 95, 96, 97, 98, 101, 103, 111, 119, 120, 121,
2368 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
2370 static const yytype_uint16 yyprhs[] =
2372 0, 0, 3, 5, 6, 8, 10, 13, 15, 17,
2373 19, 21, 23, 25, 30, 32, 33, 35, 37, 40,
2374 42, 44, 46, 48, 50, 55, 57, 59, 60, 63,
2375 65, 67, 69, 71, 73, 75, 77, 79, 81, 83,
2376 85, 87, 89, 93, 96, 98, 100, 102, 104, 106,
2377 108, 110, 115, 118, 120, 122, 126, 129, 130, 133,
2378 136, 138, 142, 146, 147, 150, 151, 159, 160, 162,
2379 164, 168, 170, 173, 177, 186, 193, 194, 201, 202,
2380 210, 212, 215, 217, 220, 221, 223, 225, 228, 230,
2381 233, 238, 242, 243, 252, 253, 263, 264, 270, 272,
2382 275, 277, 280, 282, 283, 290, 293, 295, 300, 303,
2383 305, 307, 311, 313, 314, 321, 322, 328, 331, 336,
2384 337, 339, 341, 344, 346, 348, 350, 352, 354, 356,
2385 358, 360, 362, 364, 365, 368, 369, 372, 373, 376,
2386 377, 387, 388, 397, 398, 400, 402, 405, 407, 412,
2387 414, 416, 418, 419, 421, 423, 426, 428, 431, 440,
2388 442, 444, 445, 450, 452, 456, 460, 461, 464, 466,
2389 468, 470, 472, 474, 476, 478, 480, 482, 483, 485,
2390 488, 493, 497, 499, 504, 507, 509, 511, 512, 513,
2391 526, 528, 529, 530, 541, 543, 547, 549, 551, 553,
2392 557, 559, 561, 563, 566, 567, 568, 572, 573, 575,
2393 577, 579, 582, 585, 586, 591, 596, 601, 604, 606,
2394 609, 611, 613, 617, 619, 621, 623, 625, 627, 629,
2395 631, 633, 635, 637, 639, 641, 643, 645, 647, 649,
2396 651, 653, 657, 661, 665, 669, 673, 677, 681, 685,
2397 689, 693, 696, 699, 703, 707, 711, 715, 719, 723,
2398 727, 731, 735, 739, 743, 747, 751, 755, 759, 764,
2399 767, 769, 773, 776, 781, 785, 786, 788, 792, 798,
2400 802, 806, 810, 814, 818, 822, 826, 830, 834, 838,
2401 842, 846, 852, 855, 858, 861, 864, 868, 871, 876,
2402 882, 886, 892, 896, 898, 901, 906, 911, 914
2405 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
2406 static const yytype_int16 yyrhs[] =
2408 135, 0, -1, 136, -1, -1, 137, -1, 138, -1,
2409 137, 138, -1, 186, -1, 198, -1, 196, -1, 217,
2410 -1, 207, -1, 147, -1, 148, 126, 136, 132, -1,
2411 99, -1, -1, 140, -1, 141, -1, 140, 141, -1,
2412 198, -1, 196, -1, 217, -1, 207, -1, 147, -1,
2413 148, 126, 139, 132, -1, 99, -1, 143, -1, -1,
2414 143, 145, -1, 145, -1, 189, -1, 159, -1, 160,
2415 -1, 161, -1, 163, -1, 171, -1, 154, -1, 183,
2416 -1, 179, -1, 239, -1, 247, -1, 246, -1, 126,
2417 143, 132, -1, 126, 132, -1, 99, -1, 144, -1,
2418 150, -1, 165, -1, 166, -1, 236, -1, 181, -1,
2419 148, 126, 143, 132, -1, 145, 99, -1, 145, -1,
2420 144, -1, 3, 89, 3, -1, 102, 237, -1, -1,
2421 46, 151, -1, 32, 151, -1, 152, -1, 151, 100,
2422 152, -1, 3, 227, 149, -1, -1, 65, 146, -1,
2423 -1, 64, 122, 155, 238, 133, 146, 153, -1, -1,
2424 150, -1, 239, -1, 46, 3, 227, -1, 3, -1,
2425 13, 122, -1, 13, 50, 122, -1, 158, 156, 99,
2426 238, 99, 239, 133, 146, -1, 158, 157, 68, 238,
2427 133, 146, -1, -1, 14, 122, 162, 238, 133, 146,
2428 -1, -1, 15, 164, 146, 14, 122, 238, 133, -1,
2429 66, -1, 66, 3, -1, 30, -1, 30, 3, -1,
2430 -1, 168, -1, 170, -1, 168, 170, -1, 169, -1,
2431 168, 169, -1, 34, 240, 105, 142, -1, 62, 105,
2432 142, -1, -1, 16, 122, 172, 240, 133, 126, 167,
2433 132, -1, -1, 33, 122, 3, 227, 133, 174, 126,
2434 142, 132, -1, -1, 28, 126, 176, 142, 132, -1,
2435 173, -1, 177, 173, -1, 177, -1, 177, 175, -1,
2436 175, -1, -1, 52, 126, 180, 142, 132, 178, -1,
2437 37, 238, -1, 37, -1, 39, 122, 238, 133, -1,
2438 182, 146, -1, 3, -1, 19, -1, 185, 127, 184,
2439 -1, 184, -1, -1, 19, 185, 126, 187, 139, 132,
2440 -1, -1, 19, 126, 188, 139, 132, -1, 41, 223,
2441 -1, 41, 185, 127, 115, -1, -1, 191, -1, 192,
2442 -1, 191, 192, -1, 21, -1, 22, -1, 20, -1,
2443 38, -1, 47, -1, 49, -1, 48, -1, 26, -1,
2444 24, -1, 4, -1, -1, 54, 224, -1, -1, 54,
2445 225, -1, -1, 17, 225, -1, -1, 190, 31, 3,
2446 193, 195, 126, 197, 200, 132, -1, -1, 190, 44,
2447 3, 194, 126, 199, 203, 132, -1, -1, 201, -1,
2448 202, -1, 201, 202, -1, 99, -1, 148, 126, 200,
2449 132, -1, 207, -1, 217, -1, 144, -1, -1, 204,
2450 -1, 205, -1, 204, 205, -1, 99, -1, 46, 3,
2451 -1, 190, 27, 216, 3, 122, 213, 133, 227, -1,
2452 46, -1, 32, -1, -1, 190, 206, 208, 209, -1,
2453 210, -1, 209, 100, 210, -1, 3, 227, 149, -1,
2454 -1, 102, 212, -1, 10, -1, 8, -1, 9, -1,
2455 12, -1, 5, -1, 56, -1, 55, -1, 45, -1,
2456 3, -1, -1, 214, -1, 93, 215, -1, 214, 100,
2457 93, 215, -1, 214, 100, 215, -1, 215, -1, 3,
2458 105, 226, 211, -1, 3, 211, -1, 51, -1, 35,
2459 -1, -1, -1, 190, 27, 216, 3, 122, 213, 133,
2460 227, 126, 218, 142, 132, -1, 3, -1, -1, -1,
2461 27, 219, 122, 213, 133, 227, 126, 221, 142, 132,
2462 -1, 3, -1, 185, 127, 3, -1, 223, -1, 222,
2463 -1, 224, -1, 225, 100, 224, -1, 224, -1, 115,
2464 -1, 36, -1, 105, 226, -1, -1, -1, 122, 229,
2465 133, -1, -1, 230, -1, 231, -1, 237, -1, 230,
2466 100, -1, 231, 237, -1, -1, 25, 240, 232, 228,
2467 -1, 240, 122, 229, 133, -1, 53, 122, 229, 133,
2468 -1, 63, 240, -1, 42, -1, 42, 238, -1, 240,
2469 -1, 240, -1, 238, 100, 240, -1, 238, -1, 220,
2470 -1, 241, -1, 244, -1, 233, -1, 235, -1, 234,
2471 -1, 6, -1, 10, -1, 11, -1, 8, -1, 9,
2472 -1, 12, -1, 5, -1, 29, -1, 56, -1, 55,
2473 -1, 45, -1, 240, 109, 240, -1, 240, 110, 240,
2474 -1, 240, 75, 240, -1, 240, 76, 240, -1, 240,
2475 71, 240, -1, 240, 72, 240, -1, 240, 74, 240,
2476 -1, 240, 73, 240, -1, 240, 87, 240, -1, 240,
2477 88, 240, -1, 118, 240, -1, 117, 240, -1, 240,
2478 108, 240, -1, 240, 107, 240, -1, 240, 106, 240,
2479 -1, 240, 96, 240, -1, 240, 95, 240, -1, 240,
2480 94, 240, -1, 240, 114, 240, -1, 240, 116, 240,
2481 -1, 240, 113, 240, -1, 240, 112, 240, -1, 240,
2482 115, 240, -1, 240, 68, 240, -1, 240, 69, 240,
2483 -1, 240, 40, 240, -1, 240, 67, 240, -1, 43,
2484 122, 240, 133, -1, 36, 240, -1, 36, -1, 122,
2485 238, 133, -1, 112, 240, -1, 240, 124, 240, 125,
2486 -1, 124, 229, 125, -1, -1, 243, -1, 237, 105,
2487 237, -1, 243, 100, 237, 105, 237, -1, 70, 242,
2488 132, -1, 240, 80, 240, -1, 240, 79, 240, -1,
2489 240, 85, 240, -1, 240, 84, 240, -1, 240, 86,
2490 240, -1, 240, 78, 240, -1, 240, 77, 240, -1,
2491 240, 83, 240, -1, 240, 81, 240, -1, 240, 82,
2492 240, -1, 240, 102, 240, -1, 240, 104, 240, 105,
2493 240, -1, 240, 91, -1, 240, 90, -1, 91, 240,
2494 -1, 90, 240, -1, 53, 127, 3, -1, 128, 3,
2495 -1, 240, 127, 128, 3, -1, 240, 127, 3, 89,
2496 3, -1, 240, 92, 3, -1, 240, 127, 122, 240,
2497 133, -1, 240, 127, 3, -1, 3, -1, 18, 3,
2498 -1, 18, 3, 102, 3, -1, 18, 3, 102, 5,
2499 -1, 190, 245, -1, 23, 18, 224, -1
2502 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
2503 static const yytype_uint16 yyrline[] =
2505 0, 2071, 2071, 2073, 2073, 2074, 2075, 2077, 2078, 2079,
2506 2080, 2081, 2082, 2083, 2084, 2086, 2086, 2087, 2088, 2090,
2507 2091, 2092, 2093, 2094, 2095, 2096, 2098, 2099, 2101, 2102,
2508 2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114,
2509 2115, 2116, 2117, 2118, 2121, 2122, 2123, 2124, 2125, 2126,
2510 2127, 2128, 2132, 2133, 2137, 2144, 2148, 2149, 2153, 2154,
2511 2156, 2157, 2159, 2220, 2221, 2224, 2224, 2243, 2244, 2245,
2512 2250, 2254, 2259, 2260, 2262, 2282, 2330, 2330, 2349, 2349,
2513 2364, 2367, 2370, 2373, 2377, 2378, 2379, 2380, 2381, 2382,
2514 2384, 2395, 2398, 2398, 2429, 2429, 2454, 2454, 2470, 2471,
2515 2472, 2473, 2481, 2490, 2490, 2539, 2543, 2554, 2564, 2581,
2516 2582, 2584, 2585, 2587, 2587, 2589, 2589, 2592, 2608, 2625,
2517 2626, 2627, 2628, 2636, 2637, 2638, 2639, 2640, 2641, 2642,
2518 2643, 2644, 2645, 2649, 2650, 2652, 2653, 2655, 2656, 2660,
2519 2658, 2666, 2664, 2673, 2674, 2675, 2676, 2677, 2678, 2679,
2520 2680, 2682, 2688, 2689, 2690, 2691, 2692, 2693, 2696, 2709,
2521 2709, 2711, 2711, 2713, 2714, 2716, 2791, 2792, 2794, 2795,
2522 2796, 2797, 2798, 2800, 2801, 2802, 2803, 2815, 2819, 2825,
2523 2831, 2839, 2844, 2850, 2858, 2866, 2867, 2868, 2871, 2870,
2524 2887, 2888, 2890, 2889, 2913, 2932, 2946, 2947, 2949, 2950,
2525 2952, 2953, 2954, 2963, 2964, 2968, 2969, 2971, 2972, 2973,
2526 2975, 2979, 2980, 2985, 2986, 3022, 3068, 3089, 3110, 3113,
2527 3120, 3121, 3122, 3128, 3134, 3136, 3138, 3140, 3142, 3144,
2528 3146, 3163, 3168, 3171, 3174, 3177, 3180, 3183, 3186, 3189,
2529 3192, 3196, 3199, 3202, 3205, 3208, 3211, 3214, 3217, 3221,
2530 3232, 3250, 3255, 3260, 3265, 3270, 3275, 3279, 3283, 3288,
2531 3292, 3296, 3305, 3314, 3324, 3329, 3341, 3347, 3352, 3358,
2532 3364, 3368, 3370, 3381, 3390, 3397, 3398, 3400, 3406, 3415,
2533 3422, 3434, 3440, 3446, 3452, 3458, 3464, 3470, 3476, 3489,
2534 3500, 3507, 3520, 3547, 3561, 3575, 3589, 3604, 3611, 3618,
2535 3625, 3632, 3643, 3693, 3798, 3805, 3812, 3819, 3826
2539 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
2540 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
2541 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
2542 static const char *const yytname[] =
2544 "$end", "error", "$undefined", "T_IDENTIFIER", "T_NAMESPACE",
2545 "T_STRING", "T_REGEXP", "T_EMPTY", "T_INT", "T_UINT", "T_BYTE",
2546 "T_SHORT", "T_FLOAT", "\"for\"", "\"while\"", "\"do\"", "\"switch\"",
2547 "\"implements\"", "\"namespace\"", "\"package\"", "\"protected\"",
2548 "\"public\"", "\"private\"", "\"use\"", "\"internal\"", "\"new\"",
2549 "\"native\"", "\"function\"", "\"finally\"", "\"undefined\"",
2550 "\"continue\"", "\"class\"", "\"const\"", "\"catch\"", "\"case\"",
2551 "\"set\"", "\"void\"", "\"throw\"", "\"static\"", "\"with\"",
2552 "\"instanceof\"", "\"import\"", "\"return\"", "\"typeof\"",
2553 "\"interface\"", "\"null\"", "\"var\"", "\"dynamic\"", "\"override\"",
2554 "\"final\"", "\"each\"", "\"get\"", "\"try\"", "\"super\"",
2555 "\"extends\"", "\"false\"", "\"true\"", "\"Boolean\"", "\"uint\"",
2556 "\"int\"", "\"Number\"", "\"String\"", "\"default\"", "\"delete\"",
2557 "\"if\"", "\"else\"", "\"break\"", "\"is\"", "\"in\"", "\"as\"",
2558 "\"{ (dictionary)\"", "\"==\"", "\"===\"", "\"!=\"", "\"!==\"", "\"<=\"",
2559 "\">=\"", "\"|=\"", "\"/=\"", "\"%=\"", "\"*=\"", "\"+=\"", "\"-=\"",
2560 "\"^=\"", "\">>=\"", "\"<<=\"", "\">>>=\"", "\"||\"", "\"&&\"", "\"::\"",
2561 "\"--\"", "\"++\"", "\"..\"", "\"...\"", "\"<<\"", "\">>>\"", "\">>\"",
2562 "prec_none", "below_semicolon", "';'", "','", "below_assignment", "'='",
2563 "\"&=\"", "'?'", "':'", "'|'", "'^'", "'&'", "'<'", "'>'", "below_minus",
2564 "'-'", "'+'", "'/'", "'*'", "'%'", "'~'", "'!'", "minusminus_prefix",
2565 "plusplus_prefix", "below_curly", "'('", "new2", "'['", "']'", "'{'",
2566 "'.'", "'@'", "above_identifier", "below_else", "above_function", "'}'",
2567 "')'", "$accept", "PROGRAM", "MAYBE_PROGRAM_CODE_LIST",
2568 "PROGRAM_CODE_LIST", "PROGRAM_CODE", "MAYBE_INPACKAGE_CODE_LIST",
2569 "INPACKAGE_CODE_LIST", "INPACKAGE_CODE", "MAYBECODE", "CODE",
2570 "CODE_STATEMENT", "CODEPIECE", "CODEBLOCK", "PACKAGE_INITCODE",
2571 "CONDITIONAL_COMPILATION", "MAYBEEXPRESSION", "VARIABLE_DECLARATION",
2572 "VARIABLE_LIST", "ONE_VARIABLE", "MAYBEELSE", "IF", "$@1", "FOR_INIT",
2573 "FOR_IN_INIT", "FOR_START", "FOR", "FOR_IN", "WHILE", "$@2", "DO_WHILE",
2574 "$@3", "BREAK", "CONTINUE", "MAYBE_CASE_LIST", "CASE_LIST", "CASE",
2575 "DEFAULT", "SWITCH", "$@4", "CATCH", "$@5", "FINALLY", "$@6",
2576 "CATCH_LIST", "CATCH_FINALLY_LIST", "TRY", "$@7", "THROW", "WITH_HEAD",
2577 "WITH", "X_IDENTIFIER", "PACKAGE", "PACKAGE_DECLARATION", "$@8", "$@9",
2578 "IMPORT", "MAYBE_MODIFIERS", "MODIFIER_LIST", "MODIFIER", "EXTENDS",
2579 "EXTENDS_LIST", "IMPLEMENTS_LIST", "CLASS_DECLARATION", "$@10",
2580 "INTERFACE_DECLARATION", "$@11", "MAYBE_CLASS_BODY", "CLASS_BODY",
2581 "CLASS_BODY_ITEM", "MAYBE_INTERFACE_BODY", "INTERFACE_BODY",
2582 "IDECLARATION", "VARCONST", "SLOT_DECLARATION", "$@12", "SLOT_LIST",
2583 "ONE_SLOT", "MAYBESTATICCONSTANT", "STATICCONSTANT", "MAYBE_PARAM_LIST",
2584 "PARAM_LIST", "PARAM", "GETSET", "FUNCTION_DECLARATION", "$@13",
2585 "MAYBE_IDENTIFIER", "INNERFUNCTION", "$@14", "CLASS", "PACKAGEANDCLASS",
2586 "CLASS_SPEC", "CLASS_SPEC_LIST", "TYPE", "MAYBETYPE",
2587 "MAYBE_PARAM_VALUES", "MAYBE_EXPRESSION_LIST", "EXPRESSION_LIST",
2588 "EXPRESSION_LIST_AND_COMMA", "XX", "NEW", "FUNCTIONCALL", "DELETE",
2589 "RETURN", "NONCOMMAEXPRESSION", "EXPRESSION", "VOIDEXPRESSION", "E",
2590 "CONSTANT", "MAYBE_EXPRPAIR_LIST", "EXPRPAIR_LIST", "VAR_READ",
2591 "NAMESPACE_ID", "NAMESPACE_DECLARATION", "USE_NAMESPACE", 0
2596 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
2598 static const yytype_uint16 yytoknum[] =
2600 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
2601 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
2602 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
2603 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
2604 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
2605 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
2606 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
2607 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
2608 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
2609 345, 346, 347, 348, 349, 350, 351, 352, 353, 59,
2610 44, 354, 61, 355, 63, 58, 124, 94, 38, 60,
2611 62, 356, 45, 43, 47, 42, 37, 126, 33, 357,
2612 358, 359, 40, 360, 91, 93, 123, 46, 64, 361,
2617 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
2618 static const yytype_uint8 yyr1[] =
2620 0, 134, 135, 136, 136, 137, 137, 138, 138, 138,
2621 138, 138, 138, 138, 138, 139, 139, 140, 140, 141,
2622 141, 141, 141, 141, 141, 141, 142, 142, 143, 143,
2623 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
2624 144, 144, 144, 144, 145, 145, 145, 145, 145, 145,
2625 145, 145, 146, 146, 147, 148, 149, 149, 150, 150,
2626 151, 151, 152, 153, 153, 155, 154, 156, 156, 156,
2627 157, 157, 158, 158, 159, 160, 162, 161, 164, 163,
2628 165, 165, 166, 166, 167, 167, 167, 167, 168, 168,
2629 169, 170, 172, 171, 174, 173, 176, 175, 177, 177,
2630 178, 178, 178, 180, 179, 181, 181, 182, 183, 184,
2631 184, 185, 185, 187, 186, 188, 186, 189, 189, 190,
2632 190, 191, 191, 192, 192, 192, 192, 192, 192, 192,
2633 192, 192, 192, 193, 193, 194, 194, 195, 195, 197,
2634 196, 199, 198, 200, 200, 201, 201, 202, 202, 202,
2635 202, 202, 203, 203, 204, 204, 205, 205, 205, 206,
2636 206, 208, 207, 209, 209, 210, 211, 211, 212, 212,
2637 212, 212, 212, 212, 212, 212, 212, 213, 213, 213,
2638 213, 214, 214, 215, 215, 216, 216, 216, 218, 217,
2639 219, 219, 221, 220, 222, 223, 224, 224, 225, 225,
2640 226, 226, 226, 227, 227, 228, 228, 229, 229, 229,
2641 230, 231, 230, 232, 233, 234, 234, 235, 236, 236,
2642 237, 238, 238, 239, 240, 240, 240, 240, 240, 240,
2643 240, 241, 241, 241, 241, 241, 241, 241, 241, 241,
2644 241, 240, 240, 240, 240, 240, 240, 240, 240, 240,
2645 240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
2646 240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
2647 240, 240, 240, 240, 240, 242, 242, 243, 243, 240,
2648 240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
2649 240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
2650 240, 240, 240, 244, 245, 245, 245, 246, 247
2653 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
2654 static const yytype_uint8 yyr2[] =
2656 0, 2, 1, 0, 1, 1, 2, 1, 1, 1,
2657 1, 1, 1, 4, 1, 0, 1, 1, 2, 1,
2658 1, 1, 1, 1, 4, 1, 1, 0, 2, 1,
2659 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2660 1, 1, 3, 2, 1, 1, 1, 1, 1, 1,
2661 1, 4, 2, 1, 1, 3, 2, 0, 2, 2,
2662 1, 3, 3, 0, 2, 0, 7, 0, 1, 1,
2663 3, 1, 2, 3, 8, 6, 0, 6, 0, 7,
2664 1, 2, 1, 2, 0, 1, 1, 2, 1, 2,
2665 4, 3, 0, 8, 0, 9, 0, 5, 1, 2,
2666 1, 2, 1, 0, 6, 2, 1, 4, 2, 1,
2667 1, 3, 1, 0, 6, 0, 5, 2, 4, 0,
2668 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
2669 1, 1, 1, 0, 2, 0, 2, 0, 2, 0,
2670 9, 0, 8, 0, 1, 1, 2, 1, 4, 1,
2671 1, 1, 0, 1, 1, 2, 1, 2, 8, 1,
2672 1, 0, 4, 1, 3, 3, 0, 2, 1, 1,
2673 1, 1, 1, 1, 1, 1, 1, 0, 1, 2,
2674 4, 3, 1, 4, 2, 1, 1, 0, 0, 12,
2675 1, 0, 0, 10, 1, 3, 1, 1, 1, 3,
2676 1, 1, 1, 2, 0, 0, 3, 0, 1, 1,
2677 1, 2, 2, 0, 4, 4, 4, 2, 1, 2,
2678 1, 1, 3, 1, 1, 1, 1, 1, 1, 1,
2679 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2680 1, 3, 3, 3, 3, 3, 3, 3, 3, 3,
2681 3, 2, 2, 3, 3, 3, 3, 3, 3, 3,
2682 3, 3, 3, 3, 3, 3, 3, 3, 4, 2,
2683 1, 3, 2, 4, 3, 0, 1, 3, 5, 3,
2684 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
2685 3, 5, 2, 2, 2, 2, 3, 2, 4, 5,
2686 3, 5, 3, 1, 2, 4, 4, 2, 3
2689 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
2690 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
2691 means the default is an error. */
2692 static const yytype_uint16 yydefact[] =
2694 119, 303, 132, 236, 230, 233, 234, 231, 232, 235,
2695 0, 0, 78, 0, 0, 125, 123, 124, 0, 131,
2696 0, 130, 191, 237, 270, 126, 0, 0, 0, 240,
2697 127, 129, 128, 0, 0, 239, 238, 0, 0, 275,
2698 0, 0, 14, 0, 0, 0, 0, 207, 119, 0,
2699 0, 2, 119, 5, 54, 12, 0, 36, 67, 31,
2700 32, 33, 34, 35, 38, 119, 37, 7, 30, 0,
2701 120, 121, 9, 8, 11, 10, 224, 227, 229, 228,
2702 223, 39, 221, 225, 226, 41, 40, 0, 0, 72,
2703 76, 119, 92, 109, 110, 115, 112, 0, 0, 303,
2704 213, 190, 0, 269, 0, 0, 117, 0, 103, 207,
2705 0, 217, 65, 0, 220, 0, 276, 295, 294, 272,
2706 252, 251, 0, 0, 208, 209, 210, 82, 0, 106,
2707 218, 0, 80, 44, 43, 119, 45, 29, 0, 46,
2708 47, 48, 50, 0, 49, 297, 1, 6, 119, 303,
2709 0, 68, 0, 0, 69, 53, 108, 0, 187, 0,
2710 160, 0, 159, 161, 307, 122, 0, 0, 0, 0,
2711 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2712 0, 0, 0, 0, 0, 0, 0, 0, 0, 293,
2713 292, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2714 0, 0, 0, 0, 0, 0, 0, 207, 0, 0,
2715 55, 73, 0, 0, 0, 119, 113, 0, 194, 0,
2716 197, 196, 308, 205, 177, 0, 0, 0, 27, 0,
2717 296, 0, 0, 279, 0, 271, 274, 211, 212, 83,
2718 204, 59, 60, 105, 219, 58, 81, 42, 28, 119,
2719 0, 204, 0, 0, 52, 304, 186, 185, 0, 133,
2720 135, 0, 222, 266, 267, 264, 265, 245, 246, 248,
2721 247, 243, 244, 286, 285, 281, 280, 288, 289, 287,
2722 283, 282, 284, 249, 250, 300, 258, 257, 256, 290,
2723 0, 255, 254, 253, 241, 242, 262, 261, 259, 263,
2724 260, 0, 0, 302, 0, 0, 0, 0, 0, 25,
2725 0, 119, 17, 23, 0, 20, 19, 22, 21, 119,
2726 111, 0, 207, 214, 166, 0, 0, 178, 182, 107,
2727 195, 118, 268, 0, 26, 216, 0, 277, 0, 0,
2728 57, 0, 119, 13, 57, 0, 0, 0, 0, 0,
2729 137, 0, 0, 204, 162, 163, 0, 215, 273, 0,
2730 0, 298, 119, 0, 0, 116, 18, 119, 0, 0,
2731 0, 0, 184, 179, 204, 0, 0, 119, 0, 202,
2732 201, 200, 203, 0, 62, 61, 51, 0, 119, 305,
2733 306, 177, 134, 0, 0, 198, 136, 141, 57, 0,
2734 291, 299, 301, 77, 0, 84, 0, 114, 206, 176,
2735 172, 169, 170, 168, 171, 175, 174, 173, 167, 166,
2736 0, 0, 181, 0, 0, 98, 102, 100, 104, 63,
2737 278, 56, 0, 75, 0, 138, 139, 0, 119, 165,
2738 164, 79, 0, 0, 0, 85, 88, 86, 24, 183,
2739 192, 180, 96, 0, 99, 101, 119, 66, 119, 204,
2740 119, 199, 0, 156, 0, 0, 119, 154, 0, 27,
2741 93, 89, 87, 27, 27, 204, 64, 74, 0, 147,
2742 151, 0, 0, 0, 119, 145, 149, 150, 157, 187,
2743 142, 155, 27, 91, 0, 0, 0, 188, 119, 140,
2744 146, 0, 90, 193, 97, 94, 27, 0, 0, 0,
2745 0, 148, 177, 27, 189, 0, 0, 204, 95, 158
2748 /* YYDEFGOTO[NTERM-NUM]. */
2749 static const yytype_int16 yydefgoto[] =
2751 -1, 50, 51, 52, 53, 310, 311, 312, 333, 334,
2752 136, 137, 156, 313, 138, 384, 139, 245, 242, 457,
2753 57, 231, 152, 153, 58, 59, 60, 61, 212, 62,
2754 91, 140, 141, 444, 445, 446, 447, 63, 214, 425,
2755 509, 426, 474, 427, 428, 64, 228, 142, 65, 66,
2756 96, 219, 67, 319, 215, 68, 143, 70, 71, 350,
2757 352, 394, 315, 460, 316, 438, 483, 484, 485, 465,
2758 466, 467, 163, 317, 261, 354, 355, 372, 418, 326,
2759 327, 328, 258, 318, 506, 102, 76, 473, 220, 221,
2760 381, 396, 382, 340, 323, 123, 124, 125, 223, 77,
2761 78, 79, 144, 126, 80, 81, 82, 83, 115, 116,
2765 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
2767 #define YYPACT_NINF -388
2768 static const yytype_int16 yypact[] =
2770 1673, -42, -388, -388, -388, -388, -388, -388, -388, -388,
2771 -29, -72, -388, -47, 16, -388, -388, -388, 74, -388,
2772 2093, -388, 64, -388, 2163, -388, -24, 42, 25, -388,
2773 -388, -388, -388, -1, 5, -388, -388, 2093, 56, 2093,
2774 2093, 2093, -388, 2093, 2093, 2093, 2093, 2093, 633, 110,
2775 144, -388, 503, -388, -388, -388, 50, -388, 2023, -388,
2776 -388, -388, -388, -388, -388, 1925, -388, -388, -388, 97,
2777 233, -388, -388, -388, -388, -388, -388, -388, -388, -388,
2778 104, -388, 2568, -388, -388, -388, -388, 196, 84, -388,
2779 -388, 1925, -388, -388, -388, -388, -388, 85, 70, -388,
2780 -59, -388, 91, 237, 2093, 87, -388, 2093, -388, 2093,
2781 225, 237, -388, 130, 2568, 106, 139, 237, 237, 174,
2782 237, 237, -61, 121, 147, 2093, -388, 245, 253, 2093,
2783 2093, 253, 255, -388, -388, 763, -388, -388, 135, -388,
2784 -388, -388, -388, 249, -388, -388, -388, -388, 1023, 195,
2785 265, -388, 170, 202, -388, 173, -388, 270, 72, 271,
2786 -388, 272, -388, -388, -388, -388, 2093, 2093, 2093, 2093,
2787 2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093,
2788 2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093, -388,
2789 -388, 273, 2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093,
2790 2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093, 11,
2791 -388, -388, 2093, 269, 2093, 1153, -388, 42, 157, 158,
2792 -388, -388, -388, 164, 13, -57, 19, 2188, 1799, 160,
2793 -388, 2093, 2093, -388, 2093, -388, -388, -388, -388, -388,
2794 189, 197, -388, 104, 104, 197, -388, -388, -388, 1925,
2795 163, 189, 2093, 2093, -388, 198, -388, -388, 296, 251,
2796 252, 305, 2568, 301, 495, 495, 495, 2934, 2934, 2934,
2797 2934, 301, 301, 2568, 2568, 2568, 2568, 2568, 2568, 2568,
2798 2568, 2568, 2568, 2629, 2690, -388, 118, 118, 118, 2568,
2799 2385, 2751, 2812, 2873, 301, 301, 174, 174, 237, 237,
2800 237, 177, 2446, 226, 2093, 311, -56, 194, 2259, -388,
2801 185, 1283, -388, -388, 192, -388, -388, -388, -388, 1153,
2802 -388, 119, 2093, -388, 100, 320, 191, 230, -388, -388,
2803 157, -388, -388, 193, 1799, -388, -54, -388, 221, 22,
2804 229, 253, 893, -388, -28, 31, -16, 99, 210, 70,
2805 317, 70, 212, 189, 236, -388, 2093, -388, -388, 339,
2806 2322, -388, 1925, 2093, 213, -388, -388, 1153, 214, 217,
2807 54, 22, -388, -388, 189, 15, 112, 1925, 2093, -388,
2808 -388, -388, -388, 2093, -388, -388, -388, 2093, 1925, -388,
2809 -388, 13, -388, 70, 219, -388, 247, -388, 229, 305,
2810 2568, -388, -388, -388, -15, 26, 220, -388, -388, -388,
2811 -388, -388, -388, -388, -388, -388, -388, -388, -388, 261,
2812 227, 320, -388, 240, 250, -388, -388, 112, -388, 286,
2813 -388, -388, 222, -388, 242, 247, -388, 70, 203, -388,
2814 -388, -388, 2093, 274, 246, 26, -388, -388, -388, -388,
2815 -388, -388, -388, 377, -388, -388, 1925, -388, 1925, 189,
2816 1413, -388, 378, -388, 359, 256, 336, -388, 2507, 1799,
2817 -388, -388, -388, 1799, 1799, 189, -388, -388, 263, -388,
2818 -388, 264, 51, 262, 1543, -388, -388, -388, -388, 72,
2819 -388, -388, 1799, -388, 266, 267, 254, -388, 1413, -388,
2820 -388, 397, -388, -388, -388, -388, 1799, 275, 280, 278,
2821 276, -388, 13, 1799, -388, 279, 277, 189, -388, -388
2824 /* YYPGOTO[NTERM-NUM]. */
2825 static const yytype_int16 yypgoto[] =
2827 -388, -388, 257, -388, 354, -296, -388, 107, -387, -31,
2828 1, -55, -85, 29, 2, 21, 362, 293, 81, -388,
2829 -388, -388, -388, -388, -388, -388, -388, -388, -388, -388,
2830 -388, -388, -388, -388, -388, -21, -19, -388, -388, 6,
2831 -388, 7, -388, -388, -388, -388, -388, -388, -388, -388,
2832 -175, 76, -388, -388, -388, -388, 0, -388, 357, -388,
2833 -388, -388, 48, -388, 49, -388, -68, -388, -53, -388,
2834 -388, -30, -388, 3, -388, -388, 33, 18, -388, -376,
2835 -388, -305, -49, 4, -388, -388, -388, -388, -388, 412,
2836 -89, 52, 71, -239, -388, -96, -388, -388, -388, -388,
2837 -388, -388, -388, -34, -9, -50, -13, -388, -388, -388,
2838 -388, -388, -388, -388
2841 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
2842 positive, shift that token. If negative, reduce the rule which
2843 number is the opposite. If zero, do what YYDEFACT says.
2844 If YYTABLE_NINF, syntax error. */
2845 #define YYTABLE_NINF -154
2846 static const yytype_int16 yytable[] =
2848 69, 54, 56, 74, 75, 113, 213, 100, 154, 222,
2849 155, 103, 344, 229, 303, 434, 324, 135, 324, 93,
2850 373, 88, 330, 368, 111, 218, 114, 117, 118, 55,
2851 119, 120, 121, 191, 114, 94, 155, 122, 94, 166,
2852 -70, 94, 320, 166, 166, 93, 166, 87, 72, 73,
2853 90, 320, 69, 54, 56, 74, 75, 409, 379, 410,
2854 442, 94, 411, 412, 413, 208, 414, 101, 209, 157,
2855 422, 406, 235, 218, 383, 92, 329, 362, 158, 377,
2856 248, 55, 493, 160, 166, 166, 494, 495, 443, 94,
2857 97, 238, 98, 89, 227, 225, 114, 162, 104, 415,
2858 72, 73, 389, 105, 390, 502, 325, 256, 421, 416,
2859 417, 301, 114, 145, 398, 157, 451, 388, 441, 510,
2860 243, 244, 330, 257, 158, 108, 516, 109, 159, 160,
2861 387, 166, 110, 304, 331, 420, 515, 380, 94, 305,
2862 423, 161, 95, 162, 146, 424, 320, 107, 69, 54,
2863 56, 74, 75, 262, 263, 264, 265, 266, 267, 268,
2864 269, 270, 271, 272, 273, 274, 275, 276, 277, 278,
2865 279, 280, 281, 282, 283, 284, 148, 55, 112, 286,
2866 287, 288, 289, 290, 291, 292, 293, 294, 295, 296,
2867 297, 298, 299, 300, 114, 302, 72, 73, 337, 210,
2868 338, 308, 370, 306, 166, 371, 211, 2, 189, 190,
2869 191, 216, 217, 224, 226, 69, 54, 314, 342, 114,
2870 478, 114, 336, 15, 16, 17, 369, 19, 230, 21,
2871 202, 203, 204, 205, 206, 232, 496, 2, 233, 234,
2872 207, 25, 208, 345, 346, 209, 236, 237, 239, 462,
2873 30, 31, 32, 15, 16, 17, 240, 19, 246, 21,
2874 392, 249, 395, -71, 189, 190, 191, 157, 251, 252,
2875 253, 25, 254, 255, 259, 260, 285, 403, 519, 248,
2876 30, 31, 32, 307, -109, 321, 322, 248, 204, 205,
2877 206, 360, 429, 335, 339, 343, 207, 341, 208, 348,
2878 347, 209, 463, 433, 395, 349, 351, 155, 353, 114,
2879 357, 69, 54, 314, 361, 359, 363, 365, 367, 69,
2880 54, 314, 155, 324, 374, 376, 378, 189, 190, 191,
2881 375, 383, 391, 155, 393, -152, 399, 432, 397, 405,
2882 2, -154, 401, 400, 430, 436, 407, 437, 461, 431,
2883 408, 456, 448, 450, 404, 458, 15, 16, 17, 207,
2884 19, 208, 21, 370, 209, 114, 452, 69, 54, 314,
2885 114, 476, 453, 477, 25, 459, -154, -154, 470, 469,
2886 475, 488, 462, 30, 31, 32, 489, 505, 490, 497,
2887 498, 189, 190, 191, 499, 192, 193, 194, 503, 504,
2888 508, 155, 512, 155, 513, 250, 147, 511, 514, 518,
2889 -154, -154, 517, 202, 203, 204, 205, 206, 366, 439,
2890 151, 241, 385, 207, 471, 208, 472, 165, 209, 468,
2891 507, 500, 440, 454, 455, 463, 491, 449, 464, 106,
2892 501, 0, 419, 0, 0, 435, 0, 0, 0, 0,
2893 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2894 482, 480, 481, 486, 487, 0, 464, 0, -153, 0,
2895 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2896 0, 0, 0, 0, 482, 480, 481, 486, 487, 0,
2897 0, 0, 0, 0, 0, 0, 0, 0, 482, 480,
2898 481, 486, 487, -4, 0, 0, 1, 2, 3, 4,
2899 0, 5, 6, 7, 8, 9, 10, 11, 12, 13,
2900 0, 0, 14, 15, 16, 17, 18, 19, 20, 21,
2901 0, 0, 23, 0, 0, 167, 0, 0, 0, 24,
2902 0, 25, 26, 0, 27, 0, 28, 0, 29, 0,
2903 30, 31, 32, 0, 0, 33, 34, 0, 35, 36,
2904 0, 0, -154, -154, -154, 0, 37, 38, 0, 0,
2905 175, 176, 0, 39, 0, 0, 0, 0, 0, 0,
2906 0, 0, 0, 0, 0, 189, 190, 191, 0, 192,
2907 193, 194, 0, 40, 41, 0, 0, 0, 0, 0,
2908 0, 0, 42, 0, 200, 201, 0, 202, 203, 204,
2909 205, 206, 0, 0, 0, 43, 0, 207, 0, 208,
2910 44, 45, 209, 0, 0, 46, 0, 47, 0, 48,
2911 0, 49, 0, 0, 0, -4, 1, 2, 3, 4,
2912 0, 5, 6, 7, 8, 9, 10, 11, 12, 13,
2913 0, 0, 0, 15, 16, 17, 18, 19, 20, 21,
2914 22, 0, 23, 127, 0, 128, 0, 0, 0, 24,
2915 129, 25, 26, 0, 27, 130, 28, 0, 29, 131,
2916 30, 31, 32, 0, 0, 33, 34, 0, 35, 36,
2917 0, 0, 0, 0, 0, 0, 37, 38, 0, 132,
2918 0, 0, 0, 39, 0, 0, 0, 0, 0, 0,
2919 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2920 0, 0, 0, 40, 41, 0, 0, 0, 0, 0,
2921 0, 0, 133, 0, 0, 0, 0, 0, 0, 0,
2922 0, 0, 0, 0, 0, 43, 0, 0, 0, 0,
2923 44, 45, 0, 0, 0, 46, 0, 47, 0, 48,
2924 0, 49, 0, 0, 0, 134, 1, 2, 3, 4,
2925 0, 5, 6, 7, 8, 9, 10, 11, 12, 13,
2926 0, 0, 0, 15, 16, 17, 18, 19, 20, 21,
2927 22, 0, 23, 127, 0, 128, 0, 0, 0, 24,
2928 129, 25, 26, 0, 27, 130, 28, 0, 29, 131,
2929 30, 31, 32, 0, 0, 33, 34, 0, 35, 36,
2930 0, 0, 0, 0, 0, 0, 37, 38, 0, 132,
2931 0, 0, 0, 39, 0, 0, 0, 0, 0, 0,
2932 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2933 0, 0, 0, 40, 41, 0, 0, 0, 0, 0,
2934 0, 0, 133, 0, 0, 0, 0, 0, 0, 0,
2935 0, 0, 0, 0, 0, 43, 0, 0, 0, 0,
2936 44, 45, 0, 0, 0, 46, 0, 47, 0, 48,
2937 0, 49, 0, 0, 0, 247, 1, 2, 3, 4,
2938 0, 5, 6, 7, 8, 9, 10, 11, 12, 13,
2939 0, 0, 0, 15, 16, 17, 18, 19, 20, 21,
2940 22, 0, 23, 127, 0, 128, 0, 0, 0, 24,
2941 129, 25, 26, 0, 27, 130, 28, 0, 29, 131,
2942 30, 31, 32, 0, 0, 33, 34, 0, 35, 36,
2943 0, 0, 0, 0, 0, 0, 37, 38, 0, 132,
2944 0, 0, 0, 39, 0, 0, 0, 0, 0, 0,
2945 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2946 0, 0, 0, 40, 41, 0, 0, 0, 0, 0,
2947 0, 0, 133, 0, 0, 0, 0, 0, 0, 0,
2948 0, 0, 0, 0, 0, 43, 0, 0, 0, 0,
2949 44, 45, 0, 0, 0, 46, 0, 47, 0, 48,
2950 0, 49, 0, 0, 0, 386, 1, 2, 3, 4,
2951 0, 5, 6, 7, 8, 9, 10, 11, 12, 13,
2952 0, 0, 14, 15, 16, 17, 18, 19, 20, 21,
2953 0, 0, 23, 0, 0, 0, 0, 0, 0, 24,
2954 0, 25, 26, 0, 27, 0, 28, 0, 29, 0,
2955 30, 31, 32, 0, 0, 33, 34, 0, 35, 36,
2956 0, 0, 0, 0, 0, 0, 37, 38, 0, 0,
2957 0, 0, 0, 39, 0, 0, 0, 0, 0, 0,
2958 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2959 0, 0, 0, 40, 41, 0, 0, 0, 0, 0,
2960 0, 0, 42, 0, 0, 0, 0, 0, 0, 0,
2961 0, 0, 0, 0, 0, 43, 0, 0, 0, 0,
2962 44, 45, 0, 0, 0, 46, 0, 47, 0, 48,
2963 0, 49, 0, 0, 0, -3, 1, 2, 3, 4,
2964 0, 5, 6, 7, 8, 9, 10, 11, 12, 13,
2965 0, 0, 0, 15, 16, 17, 18, 19, 20, 21,
2966 0, 0, 23, 0, 0, 0, 0, 0, 0, 24,
2967 0, 25, 26, 0, 27, 0, 28, 0, 29, 0,
2968 30, 31, 32, 0, 0, 33, 34, 0, 35, 36,
2969 0, 0, 0, 0, 0, 0, 37, 38, 0, 0,
2970 0, 0, 0, 39, 0, 0, 0, 0, 0, 0,
2971 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2972 0, 0, 0, 40, 41, 0, 0, 0, 0, 0,
2973 0, 0, 309, 0, 0, 0, 0, 0, 0, 0,
2974 0, 0, 0, 0, 0, 43, 0, 0, 0, 0,
2975 44, 45, 0, 0, 0, 46, 0, 47, 0, 48,
2976 0, 49, 0, 0, 0, -15, 1, 2, 3, 4,
2977 0, 5, 6, 7, 8, 9, 10, 11, 12, 13,
2978 0, 0, 0, 15, 16, 17, 18, 19, 20, 21,
2979 0, 0, 23, 0, 0, 0, 0, 0, 0, 24,
2980 0, 25, 26, 0, 27, 0, 28, 0, 29, 0,
2981 30, 31, 32, 0, 0, 33, 34, 0, 35, 36,
2982 0, 0, 0, 0, 0, 0, 37, 38, 0, 0,
2983 0, 0, 0, 39, 0, 0, 0, 0, 0, 0,
2984 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2985 0, 0, 0, 40, 41, 0, 0, 0, 0, 0,
2986 0, 0, 309, 0, 0, 0, 0, 0, 0, 0,
2987 0, 0, 0, 0, 0, 43, 0, 0, 0, 0,
2988 44, 45, 0, 0, 0, 46, 0, 47, 0, 48,
2989 0, 49, 0, 0, 0, -16, 1, 2, 3, 4,
2990 0, 5, 6, 7, 8, 9, 10, 11, 12, 13,
2991 0, 0, 0, 15, 16, 17, 18, 19, 20, 21,
2992 0, 0, 23, 0, 0, 0, 0, 0, 0, 24,
2993 0, 25, 26, 0, 27, 0, 28, 0, 29, 0,
2994 30, 31, 32, 0, 0, 33, 34, 0, 35, 36,
2995 0, 0, 0, 0, 0, 0, 37, 38, 0, 0,
2996 0, 0, 0, 39, 0, 0, 0, 0, 0, 0,
2997 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2998 0, 0, 0, 40, 41, 0, 0, 0, 0, 0,
2999 0, 0, 479, 0, 0, 0, 0, 0, 0, 0,
3000 0, 0, 0, 0, 0, 43, 0, 0, 0, 0,
3001 44, 45, 0, 0, 0, 46, 0, 47, 0, 48,
3002 0, 49, 0, 0, 0, -143, 1, 2, 3, 4,
3003 0, 5, 6, 7, 8, 9, 10, 11, 12, 13,
3004 0, 0, 0, 15, 16, 17, 18, 19, 20, 21,
3005 0, 0, 23, 0, 0, 0, 0, 0, 0, 24,
3006 0, 25, 26, 0, 27, 0, 28, 0, 29, 0,
3007 30, 31, 32, 0, 0, 33, 34, 0, 35, 36,
3008 0, 0, 0, 0, 0, 0, 37, 38, 0, 0,
3009 0, 0, 0, 39, 0, 0, 0, 0, 0, 0,
3010 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3011 0, 0, 0, 40, 41, 0, 0, 0, 0, 0,
3012 0, 0, 479, 0, 0, 0, 0, 0, 0, 0,
3013 0, 0, 0, 0, 0, 43, 0, 0, 0, 0,
3014 44, 45, 0, 0, 0, 46, 0, 47, 0, 48,
3015 0, 49, 0, -3, 0, -144, 1, 2, 3, 4,
3016 0, 5, 6, 7, 8, 9, 10, 11, 12, 13,
3017 0, 0, 14, 15, 16, 17, 18, 19, 20, 21,
3018 0, 0, 23, 0, 0, 0, 0, 0, 0, 24,
3019 0, 25, 26, 0, 27, 0, 28, 0, 29, 0,
3020 30, 31, 32, 0, 0, 33, 34, 0, 35, 36,
3021 0, 0, 0, 0, 0, 0, 37, 38, 0, 0,
3022 0, 0, 0, 39, 0, 0, 0, 0, 0, 0,
3023 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3024 0, 0, 0, 40, 41, 0, 0, 0, 0, 0,
3025 0, 0, 42, 0, 0, 0, 0, 0, 0, 0,
3026 0, 0, 0, 0, 0, 43, 0, 0, 0, 0,
3027 44, 45, 0, 0, 0, 46, 0, 47, 0, 48,
3028 0, 49, 1, 2, 3, 4, 0, 5, 6, 7,
3029 8, 9, 10, 11, 12, 13, 0, -119, 0, 15,
3030 16, 17, 18, 19, 20, 21, 22, 0, 23, 127,
3031 0, 128, 0, 0, 0, 24, 129, 25, 26, 0,
3032 27, 130, 28, 0, 29, 131, 30, 31, 32, 0,
3033 0, 33, 34, 0, 35, 36, 0, 0, 0, 0,
3034 0, 0, 37, 38, 0, 132, 0, 0, 0, 39,
3035 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3036 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,
3037 41, 0, 0, 0, 0, 0, 0, 0, 133, 0,
3038 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3039 0, 43, 0, 0, 0, 0, 44, 45, 0, 0,
3040 0, 46, 0, 47, 0, 48, 0, 49, 1, 2,
3041 3, 4, 0, 5, 6, 7, 8, 9, 10, 11,
3042 12, 13, 0, 0, 0, 15, 16, 17, 18, 19,
3043 20, 21, 22, 0, 23, 127, 0, 128, 0, 0,
3044 0, 24, 129, 25, 26, 0, 27, 130, 28, 0,
3045 29, 131, 30, 31, 32, 0, 0, 33, 34, 0,
3046 35, 36, 0, 0, 0, 0, 0, 0, 37, 38,
3047 0, 132, 0, 0, 0, 39, 0, 0, 0, 0,
3048 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3049 0, 0, 0, 0, 0, 40, 41, 0, 0, 0,
3050 0, 0, 0, 0, 133, 0, 149, 0, 3, 4,
3051 0, 5, 6, 7, 8, 9, 0, 43, 0, 0,
3052 0, 0, 44, 45, 0, 0, 0, 46, 20, 47,
3053 22, 48, 23, 49, 0, 128, 0, 0, 0, 24,
3054 0, 0, 0, 0, 0, 0, 28, 0, 29, 150,
3055 0, 0, 0, 0, 0, 0, 34, 0, 35, 36,
3056 0, 0, 0, 0, 0, 0, 37, 0, 0, 0,
3057 0, 0, 0, 39, 0, 0, 99, 0, 3, 4,
3058 0, 5, 6, 7, 8, 9, 0, 0, 0, 0,
3059 0, 0, 0, 40, 41, 0, 0, 0, 20, 0,
3060 22, 0, 23, 0, 0, 0, 0, 0, 0, 24,
3061 0, 0, 0, 0, 0, 43, 28, 0, 29, 0,
3062 44, 45, 0, 0, 0, 46, 34, 47, 35, 36,
3063 0, 49, 0, 0, 0, 0, 37, 0, 0, 0,
3064 0, 0, 0, 39, 0, 0, 99, 0, 3, 4,
3065 0, 5, 6, 7, 8, 9, 0, 0, 0, 0,
3066 0, 0, 0, 40, 41, 0, 0, 0, 20, 0,
3067 22, 0, 23, 0, 0, 0, 0, 0, 0, 0,
3068 0, 0, 0, 0, 0, 43, 0, 0, 29, 0,
3069 44, 45, 0, 0, 0, 46, 34, 47, 35, 36,
3070 0, 49, 0, 0, 0, 0, 0, 0, 167, 0,
3071 0, 0, 0, 39, 0, 0, 0, 0, 0, 0,
3072 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3073 0, 0, 0, 40, 41, 168, 169, 170, 0, 171,
3074 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
3075 182, 183, 184, 185, 186, 187, 188, 0, 189, 190,
3076 191, 0, 192, 193, 194, 46, 0, 47, 0, 0,
3077 195, 49, 196, 0, 197, 198, 199, 200, 201, 167,
3078 202, 203, 204, 205, 206, 0, 0, 0, 0, 0,
3079 207, 0, 208, 0, 0, 209, 0, 0, 0, 0,
3080 0, 332, 0, 0, 0, 0, 168, 169, 170, 0,
3081 171, 172, 173, 174, 175, 176, 177, 178, 179, 180,
3082 181, 182, 183, 184, 185, 186, 187, 188, 0, 189,
3083 190, 191, 0, 192, 193, 194, 0, 0, 0, 0,
3084 0, 195, 167, 196, 0, 197, 198, 199, 200, 201,
3085 0, 202, 203, 204, 205, 206, 0, 0, 0, 0,
3086 0, 207, 0, 208, 0, 0, 209, 0, 0, 168,
3087 169, 170, 364, 171, 172, 173, 174, 175, 176, 177,
3088 178, 179, 180, 181, 182, 183, 184, 185, 186, 187,
3089 188, 0, 189, 190, 191, 0, 192, 193, 194, 0,
3090 0, 0, 0, 0, 195, 167, 196, 0, 197, 198,
3091 199, 200, 201, 0, 202, 203, 204, 205, 206, 0,
3092 0, 0, 0, 0, 207, 0, 208, 0, 0, 209,
3093 0, 0, 168, 169, 170, 402, 171, 172, 173, 174,
3094 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
3095 185, 186, 187, 188, 0, 189, 190, 191, 0, 192,
3096 193, 194, 0, 0, 0, 0, 167, 195, 0, 196,
3097 356, 197, 198, 199, 200, 201, 0, 202, 203, 204,
3098 205, 206, 0, 0, 0, 0, 0, 207, 0, 208,
3099 0, 0, 209, 168, 169, 170, 0, 171, 172, 173,
3100 174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
3101 184, 185, 186, 187, 188, 0, 189, 190, 191, 0,
3102 192, 193, 194, 0, 0, 0, 0, 167, 195, 0,
3103 196, 0, 197, 198, 199, 200, 201, 0, 202, 203,
3104 204, 205, 206, 0, 0, 0, 0, 0, 207, 0,
3105 208, 358, 0, 209, 168, 169, 170, 0, 171, 172,
3106 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
3107 183, 184, 185, 186, 187, 188, 0, 189, 190, 191,
3108 0, 192, 193, 194, 0, 0, 0, 0, 167, 195,
3109 0, 196, 492, 197, 198, 199, 200, 201, 0, 202,
3110 203, 204, 205, 206, 0, 0, 0, 0, 0, 207,
3111 0, 208, 0, 0, 209, 168, 169, 170, 0, 171,
3112 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
3113 182, 183, 184, 185, 186, 187, 188, 0, 189, 190,
3114 191, 0, 192, 193, 194, 0, 0, 0, 0, 167,
3115 195, 0, 196, 0, 197, 198, 199, 200, 201, 0,
3116 202, 203, 204, 205, 206, 0, 0, 0, 0, 0,
3117 207, 0, 208, 0, 0, 209, 168, 169, 170, 0,
3118 171, 172, 173, 174, 175, 176, 0, 0, 0, 0,
3119 0, 0, 0, 0, 0, 0, 0, 188, 0, 189,
3120 190, 191, 0, 192, 193, 194, 0, 0, 0, 0,
3121 167, 0, 0, 0, 0, 197, 198, 199, 200, 201,
3122 0, 202, 203, 204, 205, 206, 0, 0, 0, 0,
3123 0, 207, 0, 208, 0, 0, 209, 168, 169, 170,
3124 0, 171, 172, 173, 174, 175, 176, 0, 0, 0,
3125 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3126 189, 190, 191, 0, 192, 193, 194, 0, 0, 0,
3127 0, 167, 0, 0, 0, 0, 197, 198, 199, 200,
3128 201, 0, 202, 203, 204, 205, 206, 0, 0, 0,
3129 0, 0, 207, 0, 208, 0, 0, 209, 168, 169,
3130 170, 0, 171, 172, 173, 174, 175, 176, 0, 0,
3131 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3132 0, 189, 190, 191, 0, 192, 193, 194, 0, 0,
3133 0, 0, 167, 0, 0, 0, 0, 0, 198, 199,
3134 200, 201, 0, 202, 203, 204, 205, 206, 0, 0,
3135 0, 0, 0, 207, 0, 208, 0, 0, 209, 168,
3136 169, 170, 0, 171, 172, 173, 174, 175, 176, 0,
3137 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3138 0, 0, 189, 190, 191, 0, 192, 193, 194, 0,
3139 0, 0, 0, 167, 0, 0, 0, 0, 0, 0,
3140 199, 200, 201, 0, 202, 203, 204, 205, 206, 0,
3141 0, 0, 0, 0, 207, 0, 208, 0, 0, 209,
3142 168, 169, 170, 0, 171, 172, 173, 174, 175, 176,
3143 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3144 0, 0, 0, 189, 190, 191, 0, 192, 193, 194,
3145 0, 0, 0, 0, 167, 0, 0, 0, 0, 0,
3146 0, -154, 200, 201, 0, 202, 203, 204, 205, 206,
3147 0, 0, 0, 0, 0, 207, 0, 208, 0, 0,
3148 209, 168, 169, 170, 0, -154, -154, -154, -154, 175,
3149 176, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3150 0, 0, 0, 0, 189, 190, 191, 0, 192, 193,
3151 194, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3152 0, 0, 0, 200, 201, 0, 202, 203, 204, 205,
3153 206, 0, 0, 0, 0, 0, 207, 0, 208, 0,
3157 static const yytype_int16 yycheck[] =
3159 0, 0, 0, 0, 0, 39, 91, 20, 58, 98,
3160 65, 24, 251, 109, 3, 391, 3, 48, 3, 3,
3161 325, 50, 3, 319, 37, 3, 39, 40, 41, 0,
3162 43, 44, 45, 92, 47, 19, 91, 46, 19, 100,
3163 68, 19, 217, 100, 100, 3, 100, 89, 0, 0,
3164 122, 226, 52, 52, 52, 52, 52, 3, 36, 5,
3165 34, 19, 8, 9, 10, 124, 12, 3, 127, 18,
3166 375, 367, 133, 3, 102, 122, 133, 133, 27, 133,
3167 135, 52, 469, 32, 100, 100, 473, 474, 62, 19,
3168 14, 125, 18, 122, 107, 104, 109, 46, 122, 45,
3169 52, 52, 3, 27, 5, 492, 93, 35, 93, 55,
3170 56, 207, 125, 3, 353, 18, 421, 133, 133, 506,
3171 129, 130, 3, 51, 27, 126, 513, 122, 31, 32,
3172 99, 100, 127, 122, 115, 374, 512, 115, 19, 128,
3173 28, 44, 126, 46, 0, 33, 321, 122, 148, 148,
3174 148, 148, 148, 166, 167, 168, 169, 170, 171, 172,
3175 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
3176 183, 184, 185, 186, 187, 188, 126, 148, 122, 192,
3177 193, 194, 195, 196, 197, 198, 199, 200, 201, 202,
3178 203, 204, 205, 206, 207, 208, 148, 148, 232, 3,
3179 234, 214, 102, 212, 100, 105, 122, 4, 90, 91,
3180 92, 126, 127, 122, 127, 215, 215, 215, 249, 232,
3181 459, 234, 231, 20, 21, 22, 322, 24, 3, 26,
3182 112, 113, 114, 115, 116, 105, 475, 4, 132, 100,
3183 122, 38, 124, 252, 253, 127, 125, 100, 3, 46,
3184 47, 48, 49, 20, 21, 22, 3, 24, 3, 26,
3185 349, 126, 351, 68, 90, 91, 92, 18, 3, 99,
3186 68, 38, 99, 3, 3, 3, 3, 362, 517, 334,
3187 47, 48, 49, 14, 127, 127, 122, 342, 114, 115,
3188 116, 304, 377, 133, 105, 132, 122, 100, 124, 3,
3189 102, 127, 99, 388, 393, 54, 54, 362, 3, 322,
3190 133, 311, 311, 311, 3, 89, 122, 132, 126, 319,
3191 319, 319, 377, 3, 133, 132, 105, 90, 91, 92,
3192 100, 102, 122, 388, 17, 132, 100, 387, 126, 126,
3193 4, 40, 3, 356, 378, 126, 132, 100, 437, 383,
3194 133, 65, 132, 126, 363, 133, 20, 21, 22, 122,
3195 24, 124, 26, 102, 127, 378, 126, 367, 367, 367,
3196 383, 456, 122, 458, 38, 133, 75, 76, 132, 105,
3197 3, 3, 46, 47, 48, 49, 27, 133, 132, 126,
3198 126, 90, 91, 92, 132, 94, 95, 96, 132, 132,
3199 3, 456, 122, 458, 126, 148, 52, 132, 132, 132,
3200 109, 110, 133, 112, 113, 114, 115, 116, 311, 398,
3201 58, 128, 341, 122, 445, 124, 445, 70, 127, 442,
3202 498, 484, 399, 427, 427, 99, 466, 419, 438, 27,
3203 489, -1, 371, -1, -1, 393, -1, -1, -1, -1,
3204 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3205 460, 460, 460, 460, 460, -1, 466, -1, 132, -1,
3206 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3207 -1, -1, -1, -1, 484, 484, 484, 484, 484, -1,
3208 -1, -1, -1, -1, -1, -1, -1, -1, 498, 498,
3209 498, 498, 498, 0, -1, -1, 3, 4, 5, 6,
3210 -1, 8, 9, 10, 11, 12, 13, 14, 15, 16,
3211 -1, -1, 19, 20, 21, 22, 23, 24, 25, 26,
3212 -1, -1, 29, -1, -1, 40, -1, -1, -1, 36,
3213 -1, 38, 39, -1, 41, -1, 43, -1, 45, -1,
3214 47, 48, 49, -1, -1, 52, 53, -1, 55, 56,
3215 -1, -1, 67, 68, 69, -1, 63, 64, -1, -1,
3216 75, 76, -1, 70, -1, -1, -1, -1, -1, -1,
3217 -1, -1, -1, -1, -1, 90, 91, 92, -1, 94,
3218 95, 96, -1, 90, 91, -1, -1, -1, -1, -1,
3219 -1, -1, 99, -1, 109, 110, -1, 112, 113, 114,
3220 115, 116, -1, -1, -1, 112, -1, 122, -1, 124,
3221 117, 118, 127, -1, -1, 122, -1, 124, -1, 126,
3222 -1, 128, -1, -1, -1, 132, 3, 4, 5, 6,
3223 -1, 8, 9, 10, 11, 12, 13, 14, 15, 16,
3224 -1, -1, -1, 20, 21, 22, 23, 24, 25, 26,
3225 27, -1, 29, 30, -1, 32, -1, -1, -1, 36,
3226 37, 38, 39, -1, 41, 42, 43, -1, 45, 46,
3227 47, 48, 49, -1, -1, 52, 53, -1, 55, 56,
3228 -1, -1, -1, -1, -1, -1, 63, 64, -1, 66,
3229 -1, -1, -1, 70, -1, -1, -1, -1, -1, -1,
3230 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3231 -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
3232 -1, -1, 99, -1, -1, -1, -1, -1, -1, -1,
3233 -1, -1, -1, -1, -1, 112, -1, -1, -1, -1,
3234 117, 118, -1, -1, -1, 122, -1, 124, -1, 126,
3235 -1, 128, -1, -1, -1, 132, 3, 4, 5, 6,
3236 -1, 8, 9, 10, 11, 12, 13, 14, 15, 16,
3237 -1, -1, -1, 20, 21, 22, 23, 24, 25, 26,
3238 27, -1, 29, 30, -1, 32, -1, -1, -1, 36,
3239 37, 38, 39, -1, 41, 42, 43, -1, 45, 46,
3240 47, 48, 49, -1, -1, 52, 53, -1, 55, 56,
3241 -1, -1, -1, -1, -1, -1, 63, 64, -1, 66,
3242 -1, -1, -1, 70, -1, -1, -1, -1, -1, -1,
3243 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3244 -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
3245 -1, -1, 99, -1, -1, -1, -1, -1, -1, -1,
3246 -1, -1, -1, -1, -1, 112, -1, -1, -1, -1,
3247 117, 118, -1, -1, -1, 122, -1, 124, -1, 126,
3248 -1, 128, -1, -1, -1, 132, 3, 4, 5, 6,
3249 -1, 8, 9, 10, 11, 12, 13, 14, 15, 16,
3250 -1, -1, -1, 20, 21, 22, 23, 24, 25, 26,
3251 27, -1, 29, 30, -1, 32, -1, -1, -1, 36,
3252 37, 38, 39, -1, 41, 42, 43, -1, 45, 46,
3253 47, 48, 49, -1, -1, 52, 53, -1, 55, 56,
3254 -1, -1, -1, -1, -1, -1, 63, 64, -1, 66,
3255 -1, -1, -1, 70, -1, -1, -1, -1, -1, -1,
3256 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3257 -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
3258 -1, -1, 99, -1, -1, -1, -1, -1, -1, -1,
3259 -1, -1, -1, -1, -1, 112, -1, -1, -1, -1,
3260 117, 118, -1, -1, -1, 122, -1, 124, -1, 126,
3261 -1, 128, -1, -1, -1, 132, 3, 4, 5, 6,
3262 -1, 8, 9, 10, 11, 12, 13, 14, 15, 16,
3263 -1, -1, 19, 20, 21, 22, 23, 24, 25, 26,
3264 -1, -1, 29, -1, -1, -1, -1, -1, -1, 36,
3265 -1, 38, 39, -1, 41, -1, 43, -1, 45, -1,
3266 47, 48, 49, -1, -1, 52, 53, -1, 55, 56,
3267 -1, -1, -1, -1, -1, -1, 63, 64, -1, -1,
3268 -1, -1, -1, 70, -1, -1, -1, -1, -1, -1,
3269 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3270 -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
3271 -1, -1, 99, -1, -1, -1, -1, -1, -1, -1,
3272 -1, -1, -1, -1, -1, 112, -1, -1, -1, -1,
3273 117, 118, -1, -1, -1, 122, -1, 124, -1, 126,
3274 -1, 128, -1, -1, -1, 132, 3, 4, 5, 6,
3275 -1, 8, 9, 10, 11, 12, 13, 14, 15, 16,
3276 -1, -1, -1, 20, 21, 22, 23, 24, 25, 26,
3277 -1, -1, 29, -1, -1, -1, -1, -1, -1, 36,
3278 -1, 38, 39, -1, 41, -1, 43, -1, 45, -1,
3279 47, 48, 49, -1, -1, 52, 53, -1, 55, 56,
3280 -1, -1, -1, -1, -1, -1, 63, 64, -1, -1,
3281 -1, -1, -1, 70, -1, -1, -1, -1, -1, -1,
3282 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3283 -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
3284 -1, -1, 99, -1, -1, -1, -1, -1, -1, -1,
3285 -1, -1, -1, -1, -1, 112, -1, -1, -1, -1,
3286 117, 118, -1, -1, -1, 122, -1, 124, -1, 126,
3287 -1, 128, -1, -1, -1, 132, 3, 4, 5, 6,
3288 -1, 8, 9, 10, 11, 12, 13, 14, 15, 16,
3289 -1, -1, -1, 20, 21, 22, 23, 24, 25, 26,
3290 -1, -1, 29, -1, -1, -1, -1, -1, -1, 36,
3291 -1, 38, 39, -1, 41, -1, 43, -1, 45, -1,
3292 47, 48, 49, -1, -1, 52, 53, -1, 55, 56,
3293 -1, -1, -1, -1, -1, -1, 63, 64, -1, -1,
3294 -1, -1, -1, 70, -1, -1, -1, -1, -1, -1,
3295 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3296 -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
3297 -1, -1, 99, -1, -1, -1, -1, -1, -1, -1,
3298 -1, -1, -1, -1, -1, 112, -1, -1, -1, -1,
3299 117, 118, -1, -1, -1, 122, -1, 124, -1, 126,
3300 -1, 128, -1, -1, -1, 132, 3, 4, 5, 6,
3301 -1, 8, 9, 10, 11, 12, 13, 14, 15, 16,
3302 -1, -1, -1, 20, 21, 22, 23, 24, 25, 26,
3303 -1, -1, 29, -1, -1, -1, -1, -1, -1, 36,
3304 -1, 38, 39, -1, 41, -1, 43, -1, 45, -1,
3305 47, 48, 49, -1, -1, 52, 53, -1, 55, 56,
3306 -1, -1, -1, -1, -1, -1, 63, 64, -1, -1,
3307 -1, -1, -1, 70, -1, -1, -1, -1, -1, -1,
3308 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3309 -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
3310 -1, -1, 99, -1, -1, -1, -1, -1, -1, -1,
3311 -1, -1, -1, -1, -1, 112, -1, -1, -1, -1,
3312 117, 118, -1, -1, -1, 122, -1, 124, -1, 126,
3313 -1, 128, -1, -1, -1, 132, 3, 4, 5, 6,
3314 -1, 8, 9, 10, 11, 12, 13, 14, 15, 16,
3315 -1, -1, -1, 20, 21, 22, 23, 24, 25, 26,
3316 -1, -1, 29, -1, -1, -1, -1, -1, -1, 36,
3317 -1, 38, 39, -1, 41, -1, 43, -1, 45, -1,
3318 47, 48, 49, -1, -1, 52, 53, -1, 55, 56,
3319 -1, -1, -1, -1, -1, -1, 63, 64, -1, -1,
3320 -1, -1, -1, 70, -1, -1, -1, -1, -1, -1,
3321 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3322 -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
3323 -1, -1, 99, -1, -1, -1, -1, -1, -1, -1,
3324 -1, -1, -1, -1, -1, 112, -1, -1, -1, -1,
3325 117, 118, -1, -1, -1, 122, -1, 124, -1, 126,
3326 -1, 128, -1, 0, -1, 132, 3, 4, 5, 6,
3327 -1, 8, 9, 10, 11, 12, 13, 14, 15, 16,
3328 -1, -1, 19, 20, 21, 22, 23, 24, 25, 26,
3329 -1, -1, 29, -1, -1, -1, -1, -1, -1, 36,
3330 -1, 38, 39, -1, 41, -1, 43, -1, 45, -1,
3331 47, 48, 49, -1, -1, 52, 53, -1, 55, 56,
3332 -1, -1, -1, -1, -1, -1, 63, 64, -1, -1,
3333 -1, -1, -1, 70, -1, -1, -1, -1, -1, -1,
3334 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3335 -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
3336 -1, -1, 99, -1, -1, -1, -1, -1, -1, -1,
3337 -1, -1, -1, -1, -1, 112, -1, -1, -1, -1,
3338 117, 118, -1, -1, -1, 122, -1, 124, -1, 126,
3339 -1, 128, 3, 4, 5, 6, -1, 8, 9, 10,
3340 11, 12, 13, 14, 15, 16, -1, 18, -1, 20,
3341 21, 22, 23, 24, 25, 26, 27, -1, 29, 30,
3342 -1, 32, -1, -1, -1, 36, 37, 38, 39, -1,
3343 41, 42, 43, -1, 45, 46, 47, 48, 49, -1,
3344 -1, 52, 53, -1, 55, 56, -1, -1, -1, -1,
3345 -1, -1, 63, 64, -1, 66, -1, -1, -1, 70,
3346 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3347 -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
3348 91, -1, -1, -1, -1, -1, -1, -1, 99, -1,
3349 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3350 -1, 112, -1, -1, -1, -1, 117, 118, -1, -1,
3351 -1, 122, -1, 124, -1, 126, -1, 128, 3, 4,
3352 5, 6, -1, 8, 9, 10, 11, 12, 13, 14,
3353 15, 16, -1, -1, -1, 20, 21, 22, 23, 24,
3354 25, 26, 27, -1, 29, 30, -1, 32, -1, -1,
3355 -1, 36, 37, 38, 39, -1, 41, 42, 43, -1,
3356 45, 46, 47, 48, 49, -1, -1, 52, 53, -1,
3357 55, 56, -1, -1, -1, -1, -1, -1, 63, 64,
3358 -1, 66, -1, -1, -1, 70, -1, -1, -1, -1,
3359 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3360 -1, -1, -1, -1, -1, 90, 91, -1, -1, -1,
3361 -1, -1, -1, -1, 99, -1, 3, -1, 5, 6,
3362 -1, 8, 9, 10, 11, 12, -1, 112, -1, -1,
3363 -1, -1, 117, 118, -1, -1, -1, 122, 25, 124,
3364 27, 126, 29, 128, -1, 32, -1, -1, -1, 36,
3365 -1, -1, -1, -1, -1, -1, 43, -1, 45, 46,
3366 -1, -1, -1, -1, -1, -1, 53, -1, 55, 56,
3367 -1, -1, -1, -1, -1, -1, 63, -1, -1, -1,
3368 -1, -1, -1, 70, -1, -1, 3, -1, 5, 6,
3369 -1, 8, 9, 10, 11, 12, -1, -1, -1, -1,
3370 -1, -1, -1, 90, 91, -1, -1, -1, 25, -1,
3371 27, -1, 29, -1, -1, -1, -1, -1, -1, 36,
3372 -1, -1, -1, -1, -1, 112, 43, -1, 45, -1,
3373 117, 118, -1, -1, -1, 122, 53, 124, 55, 56,
3374 -1, 128, -1, -1, -1, -1, 63, -1, -1, -1,
3375 -1, -1, -1, 70, -1, -1, 3, -1, 5, 6,
3376 -1, 8, 9, 10, 11, 12, -1, -1, -1, -1,
3377 -1, -1, -1, 90, 91, -1, -1, -1, 25, -1,
3378 27, -1, 29, -1, -1, -1, -1, -1, -1, -1,
3379 -1, -1, -1, -1, -1, 112, -1, -1, 45, -1,
3380 117, 118, -1, -1, -1, 122, 53, 124, 55, 56,
3381 -1, 128, -1, -1, -1, -1, -1, -1, 40, -1,
3382 -1, -1, -1, 70, -1, -1, -1, -1, -1, -1,
3383 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3384 -1, -1, -1, 90, 91, 67, 68, 69, -1, 71,
3385 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
3386 82, 83, 84, 85, 86, 87, 88, -1, 90, 91,
3387 92, -1, 94, 95, 96, 122, -1, 124, -1, -1,
3388 102, 128, 104, -1, 106, 107, 108, 109, 110, 40,
3389 112, 113, 114, 115, 116, -1, -1, -1, -1, -1,
3390 122, -1, 124, -1, -1, 127, -1, -1, -1, -1,
3391 -1, 133, -1, -1, -1, -1, 67, 68, 69, -1,
3392 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
3393 81, 82, 83, 84, 85, 86, 87, 88, -1, 90,
3394 91, 92, -1, 94, 95, 96, -1, -1, -1, -1,
3395 -1, 102, 40, 104, -1, 106, 107, 108, 109, 110,
3396 -1, 112, 113, 114, 115, 116, -1, -1, -1, -1,
3397 -1, 122, -1, 124, -1, -1, 127, -1, -1, 67,
3398 68, 69, 133, 71, 72, 73, 74, 75, 76, 77,
3399 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
3400 88, -1, 90, 91, 92, -1, 94, 95, 96, -1,
3401 -1, -1, -1, -1, 102, 40, 104, -1, 106, 107,
3402 108, 109, 110, -1, 112, 113, 114, 115, 116, -1,
3403 -1, -1, -1, -1, 122, -1, 124, -1, -1, 127,
3404 -1, -1, 67, 68, 69, 133, 71, 72, 73, 74,
3405 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
3406 85, 86, 87, 88, -1, 90, 91, 92, -1, 94,
3407 95, 96, -1, -1, -1, -1, 40, 102, -1, 104,
3408 105, 106, 107, 108, 109, 110, -1, 112, 113, 114,
3409 115, 116, -1, -1, -1, -1, -1, 122, -1, 124,
3410 -1, -1, 127, 67, 68, 69, -1, 71, 72, 73,
3411 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
3412 84, 85, 86, 87, 88, -1, 90, 91, 92, -1,
3413 94, 95, 96, -1, -1, -1, -1, 40, 102, -1,
3414 104, -1, 106, 107, 108, 109, 110, -1, 112, 113,
3415 114, 115, 116, -1, -1, -1, -1, -1, 122, -1,
3416 124, 125, -1, 127, 67, 68, 69, -1, 71, 72,
3417 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
3418 83, 84, 85, 86, 87, 88, -1, 90, 91, 92,
3419 -1, 94, 95, 96, -1, -1, -1, -1, 40, 102,
3420 -1, 104, 105, 106, 107, 108, 109, 110, -1, 112,
3421 113, 114, 115, 116, -1, -1, -1, -1, -1, 122,
3422 -1, 124, -1, -1, 127, 67, 68, 69, -1, 71,
3423 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
3424 82, 83, 84, 85, 86, 87, 88, -1, 90, 91,
3425 92, -1, 94, 95, 96, -1, -1, -1, -1, 40,
3426 102, -1, 104, -1, 106, 107, 108, 109, 110, -1,
3427 112, 113, 114, 115, 116, -1, -1, -1, -1, -1,
3428 122, -1, 124, -1, -1, 127, 67, 68, 69, -1,
3429 71, 72, 73, 74, 75, 76, -1, -1, -1, -1,
3430 -1, -1, -1, -1, -1, -1, -1, 88, -1, 90,
3431 91, 92, -1, 94, 95, 96, -1, -1, -1, -1,
3432 40, -1, -1, -1, -1, 106, 107, 108, 109, 110,
3433 -1, 112, 113, 114, 115, 116, -1, -1, -1, -1,
3434 -1, 122, -1, 124, -1, -1, 127, 67, 68, 69,
3435 -1, 71, 72, 73, 74, 75, 76, -1, -1, -1,
3436 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3437 90, 91, 92, -1, 94, 95, 96, -1, -1, -1,
3438 -1, 40, -1, -1, -1, -1, 106, 107, 108, 109,
3439 110, -1, 112, 113, 114, 115, 116, -1, -1, -1,
3440 -1, -1, 122, -1, 124, -1, -1, 127, 67, 68,
3441 69, -1, 71, 72, 73, 74, 75, 76, -1, -1,
3442 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3443 -1, 90, 91, 92, -1, 94, 95, 96, -1, -1,
3444 -1, -1, 40, -1, -1, -1, -1, -1, 107, 108,
3445 109, 110, -1, 112, 113, 114, 115, 116, -1, -1,
3446 -1, -1, -1, 122, -1, 124, -1, -1, 127, 67,
3447 68, 69, -1, 71, 72, 73, 74, 75, 76, -1,
3448 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3449 -1, -1, 90, 91, 92, -1, 94, 95, 96, -1,
3450 -1, -1, -1, 40, -1, -1, -1, -1, -1, -1,
3451 108, 109, 110, -1, 112, 113, 114, 115, 116, -1,
3452 -1, -1, -1, -1, 122, -1, 124, -1, -1, 127,
3453 67, 68, 69, -1, 71, 72, 73, 74, 75, 76,
3454 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3455 -1, -1, -1, 90, 91, 92, -1, 94, 95, 96,
3456 -1, -1, -1, -1, 40, -1, -1, -1, -1, -1,
3457 -1, 108, 109, 110, -1, 112, 113, 114, 115, 116,
3458 -1, -1, -1, -1, -1, 122, -1, 124, -1, -1,
3459 127, 67, 68, 69, -1, 71, 72, 73, 74, 75,
3460 76, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3461 -1, -1, -1, -1, 90, 91, 92, -1, 94, 95,
3462 96, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3463 -1, -1, -1, 109, 110, -1, 112, 113, 114, 115,
3464 116, -1, -1, -1, -1, -1, 122, -1, 124, -1,
3468 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
3469 symbol of state STATE-NUM. */
3470 static const yytype_uint8 yystos[] =
3472 0, 3, 4, 5, 6, 8, 9, 10, 11, 12,
3473 13, 14, 15, 16, 19, 20, 21, 22, 23, 24,
3474 25, 26, 27, 29, 36, 38, 39, 41, 43, 45,
3475 47, 48, 49, 52, 53, 55, 56, 63, 64, 70,
3476 90, 91, 99, 112, 117, 118, 122, 124, 126, 128,
3477 135, 136, 137, 138, 144, 147, 148, 154, 158, 159,
3478 160, 161, 163, 171, 179, 182, 183, 186, 189, 190,
3479 191, 192, 196, 198, 207, 217, 220, 233, 234, 235,
3480 238, 239, 240, 241, 244, 246, 247, 89, 50, 122,
3481 122, 164, 122, 3, 19, 126, 184, 185, 18, 3,
3482 240, 3, 219, 240, 122, 185, 223, 122, 126, 122,
3483 127, 240, 122, 237, 240, 242, 243, 240, 240, 240,
3484 240, 240, 238, 229, 230, 231, 237, 30, 32, 37,
3485 42, 46, 66, 99, 132, 143, 144, 145, 148, 150,
3486 165, 166, 181, 190, 236, 3, 0, 138, 126, 3,
3487 46, 150, 156, 157, 239, 145, 146, 18, 27, 31,
3488 32, 44, 46, 206, 245, 192, 100, 40, 67, 68,
3489 69, 71, 72, 73, 74, 75, 76, 77, 78, 79,
3490 80, 81, 82, 83, 84, 85, 86, 87, 88, 90,
3491 91, 92, 94, 95, 96, 102, 104, 106, 107, 108,
3492 109, 110, 112, 113, 114, 115, 116, 122, 124, 127,
3493 3, 122, 162, 146, 172, 188, 126, 127, 3, 185,
3494 222, 223, 224, 232, 122, 238, 127, 240, 180, 229,
3495 3, 155, 105, 132, 100, 133, 125, 100, 237, 3,
3496 3, 151, 152, 238, 238, 151, 3, 132, 145, 126,
3497 136, 3, 99, 68, 99, 3, 35, 51, 216, 3,
3498 3, 208, 240, 240, 240, 240, 240, 240, 240, 240,
3499 240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
3500 240, 240, 240, 240, 240, 3, 240, 240, 240, 240,
3501 240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
3502 240, 229, 240, 3, 122, 128, 238, 14, 240, 99,
3503 139, 140, 141, 147, 148, 196, 198, 207, 217, 187,
3504 184, 127, 122, 228, 3, 93, 213, 214, 215, 133,
3505 3, 115, 133, 142, 143, 133, 238, 237, 237, 105,
3506 227, 100, 143, 132, 227, 238, 238, 102, 3, 54,
3507 193, 54, 194, 3, 209, 210, 105, 133, 125, 89,
3508 240, 3, 133, 122, 133, 132, 141, 126, 139, 229,
3509 102, 105, 211, 215, 133, 100, 132, 133, 105, 36,
3510 115, 224, 226, 102, 149, 152, 132, 99, 133, 3,
3511 5, 122, 224, 17, 195, 224, 225, 126, 227, 100,
3512 240, 3, 133, 146, 238, 126, 139, 132, 133, 3,
3513 5, 8, 9, 10, 12, 45, 55, 56, 212, 226,
3514 227, 93, 215, 28, 33, 173, 175, 177, 178, 146,
3515 237, 237, 239, 146, 213, 225, 126, 100, 199, 149,
3516 210, 133, 34, 62, 167, 168, 169, 170, 132, 211,
3517 126, 215, 126, 122, 173, 175, 65, 153, 133, 133,
3518 197, 224, 46, 99, 190, 203, 204, 205, 240, 105,
3519 132, 169, 170, 221, 176, 3, 146, 146, 227, 99,
3520 144, 148, 190, 200, 201, 202, 207, 217, 3, 27,
3521 132, 205, 105, 142, 142, 142, 227, 126, 126, 132,
3522 202, 216, 142, 132, 132, 133, 218, 200, 3, 174,
3523 142, 132, 122, 126, 132, 213, 142, 133, 132, 227
3526 #define yyerrok (yyerrstatus = 0)
3527 #define yyclearin (yychar = YYEMPTY)
3528 #define YYEMPTY (-2)
3531 #define YYACCEPT goto yyacceptlab
3532 #define YYABORT goto yyabortlab
3533 #define YYERROR goto yyerrorlab
3536 /* Like YYERROR except do call yyerror. This remains here temporarily
3537 to ease the transition to the new meaning of YYERROR, for GCC.
3538 Once GCC version 2 has supplanted version 1, this can go. */
3540 #define YYFAIL goto yyerrlab
3542 #define YYRECOVERING() (!!yyerrstatus)
3544 #define YYBACKUP(Token, Value) \
3546 if (yychar == YYEMPTY && yylen == 1) \
3550 yytoken = YYTRANSLATE (yychar); \
3556 yyerror (YY_("syntax error: cannot back up")); \
3563 #define YYERRCODE 256
3566 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
3567 If N is 0, then set CURRENT to the empty location which ends
3568 the previous symbol: RHS[0] (always defined). */
3570 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
3571 #ifndef YYLLOC_DEFAULT
3572 # define YYLLOC_DEFAULT(Current, Rhs, N) \
3576 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
3577 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
3578 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
3579 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
3583 (Current).first_line = (Current).last_line = \
3584 YYRHSLOC (Rhs, 0).last_line; \
3585 (Current).first_column = (Current).last_column = \
3586 YYRHSLOC (Rhs, 0).last_column; \
3592 /* YY_LOCATION_PRINT -- Print the location on the stream.
3593 This macro was not mandated originally: define only if we know
3594 we won't break user code: when these are the locations we know. */
3596 #ifndef YY_LOCATION_PRINT
3597 # if YYLTYPE_IS_TRIVIAL
3598 # define YY_LOCATION_PRINT(File, Loc) \
3599 fprintf (File, "%d.%d-%d.%d", \
3600 (Loc).first_line, (Loc).first_column, \
3601 (Loc).last_line, (Loc).last_column)
3603 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
3608 /* YYLEX -- calling `yylex' with the right arguments. */
3611 # define YYLEX yylex (YYLEX_PARAM)
3613 # define YYLEX yylex ()
3616 /* Enable debugging if requested. */
3620 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
3621 # define YYFPRINTF fprintf
3624 # define YYDPRINTF(Args) \
3630 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
3634 YYFPRINTF (stderr, "%s ", Title); \
3635 yy_symbol_print (stderr, \
3637 YYFPRINTF (stderr, "\n"); \
3642 /*--------------------------------.
3643 | Print this symbol on YYOUTPUT. |
3644 `--------------------------------*/
3647 #if (defined __STDC__ || defined __C99__FUNC__ \
3648 || defined __cplusplus || defined _MSC_VER)
3650 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
3653 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
3656 YYSTYPE const * const yyvaluep;
3662 if (yytype < YYNTOKENS)
3663 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
3675 /*--------------------------------.
3676 | Print this symbol on YYOUTPUT. |
3677 `--------------------------------*/
3679 #if (defined __STDC__ || defined __C99__FUNC__ \
3680 || defined __cplusplus || defined _MSC_VER)
3682 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
3685 yy_symbol_print (yyoutput, yytype, yyvaluep)
3688 YYSTYPE const * const yyvaluep;
3691 if (yytype < YYNTOKENS)
3692 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
3694 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
3696 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
3697 YYFPRINTF (yyoutput, ")");
3700 /*------------------------------------------------------------------.
3701 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
3703 `------------------------------------------------------------------*/
3705 #if (defined __STDC__ || defined __C99__FUNC__ \
3706 || defined __cplusplus || defined _MSC_VER)
3708 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
3711 yy_stack_print (yybottom, yytop)
3712 yytype_int16 *yybottom;
3713 yytype_int16 *yytop;
3716 YYFPRINTF (stderr, "Stack now");
3717 for (; yybottom <= yytop; yybottom++)
3719 int yybot = *yybottom;
3720 YYFPRINTF (stderr, " %d", yybot);
3722 YYFPRINTF (stderr, "\n");
3725 # define YY_STACK_PRINT(Bottom, Top) \
3728 yy_stack_print ((Bottom), (Top)); \
3732 /*------------------------------------------------.
3733 | Report that the YYRULE is going to be reduced. |
3734 `------------------------------------------------*/
3736 #if (defined __STDC__ || defined __C99__FUNC__ \
3737 || defined __cplusplus || defined _MSC_VER)
3739 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
3742 yy_reduce_print (yyvsp, yyrule)
3747 int yynrhs = yyr2[yyrule];
3749 unsigned long int yylno = yyrline[yyrule];
3750 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
3752 /* The symbols being reduced. */
3753 for (yyi = 0; yyi < yynrhs; yyi++)
3755 YYFPRINTF (stderr, " $%d = ", yyi + 1);
3756 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
3757 &(yyvsp[(yyi + 1) - (yynrhs)])
3759 YYFPRINTF (stderr, "\n");
3763 # define YY_REDUCE_PRINT(Rule) \
3766 yy_reduce_print (yyvsp, Rule); \
3769 /* Nonzero means print parse trace. It is left uninitialized so that
3770 multiple parsers can coexist. */
3772 #else /* !YYDEBUG */
3773 # define YYDPRINTF(Args)
3774 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
3775 # define YY_STACK_PRINT(Bottom, Top)
3776 # define YY_REDUCE_PRINT(Rule)
3777 #endif /* !YYDEBUG */
3780 /* YYINITDEPTH -- initial size of the parser's stacks. */
3782 # define YYINITDEPTH 200
3785 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
3786 if the built-in stack extension method is used).
3788 Do not make this value too large; the results are undefined if
3789 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
3790 evaluated with infinite-precision integer arithmetic. */
3793 # define YYMAXDEPTH 10000
3801 # if defined __GLIBC__ && defined _STRING_H
3802 # define yystrlen strlen
3804 /* Return the length of YYSTR. */
3805 #if (defined __STDC__ || defined __C99__FUNC__ \
3806 || defined __cplusplus || defined _MSC_VER)
3808 yystrlen (const char *yystr)
3816 for (yylen = 0; yystr[yylen]; yylen++)
3824 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
3825 # define yystpcpy stpcpy
3827 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
3829 #if (defined __STDC__ || defined __C99__FUNC__ \
3830 || defined __cplusplus || defined _MSC_VER)
3832 yystpcpy (char *yydest, const char *yysrc)
3835 yystpcpy (yydest, yysrc)
3841 const char *yys = yysrc;
3843 while ((*yyd++ = *yys++) != '\0')
3852 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
3853 quotes and backslashes, so that it's suitable for yyerror. The
3854 heuristic is that double-quoting is unnecessary unless the string
3855 contains an apostrophe, a comma, or backslash (other than
3856 backslash-backslash). YYSTR is taken from yytname. If YYRES is
3857 null, do not copy; instead, return the length of what the result
3860 yytnamerr (char *yyres, const char *yystr)
3865 char const *yyp = yystr;
3872 goto do_not_strip_quotes;
3876 goto do_not_strip_quotes;
3889 do_not_strip_quotes: ;
3893 return yystrlen (yystr);
3895 return yystpcpy (yyres, yystr) - yyres;
3899 /* Copy into YYRESULT an error message about the unexpected token
3900 YYCHAR while in state YYSTATE. Return the number of bytes copied,
3901 including the terminating null byte. If YYRESULT is null, do not
3902 copy anything; just return the number of bytes that would be
3903 copied. As a special case, return 0 if an ordinary "syntax error"
3904 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
3905 size calculation. */
3907 yysyntax_error (char *yyresult, int yystate, int yychar)
3909 int yyn = yypact[yystate];
3911 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
3915 int yytype = YYTRANSLATE (yychar);
3916 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
3917 YYSIZE_T yysize = yysize0;
3919 int yysize_overflow = 0;
3920 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
3921 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
3925 /* This is so xgettext sees the translatable formats that are
3926 constructed on the fly. */
3927 YY_("syntax error, unexpected %s");
3928 YY_("syntax error, unexpected %s, expecting %s");
3929 YY_("syntax error, unexpected %s, expecting %s or %s");
3930 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
3931 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
3935 static char const yyunexpected[] = "syntax error, unexpected %s";
3936 static char const yyexpecting[] = ", expecting %s";
3937 static char const yyor[] = " or %s";
3938 char yyformat[sizeof yyunexpected
3939 + sizeof yyexpecting - 1
3940 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
3941 * (sizeof yyor - 1))];
3942 char const *yyprefix = yyexpecting;
3944 /* Start YYX at -YYN if negative to avoid negative indexes in
3946 int yyxbegin = yyn < 0 ? -yyn : 0;
3948 /* Stay within bounds of both yycheck and yytname. */
3949 int yychecklim = YYLAST - yyn + 1;
3950 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
3953 yyarg[0] = yytname[yytype];
3954 yyfmt = yystpcpy (yyformat, yyunexpected);
3956 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
3957 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
3959 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
3963 yyformat[sizeof yyunexpected - 1] = '\0';
3966 yyarg[yycount++] = yytname[yyx];
3967 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
3968 yysize_overflow |= (yysize1 < yysize);
3970 yyfmt = yystpcpy (yyfmt, yyprefix);
3974 yyf = YY_(yyformat);
3975 yysize1 = yysize + yystrlen (yyf);
3976 yysize_overflow |= (yysize1 < yysize);
3979 if (yysize_overflow)
3980 return YYSIZE_MAXIMUM;
3984 /* Avoid sprintf, as that infringes on the user's name space.
3985 Don't have undefined behavior even if the translation
3986 produced a string with the wrong number of "%s"s. */
3987 char *yyp = yyresult;
3989 while ((*yyp = *yyf) != '\0')
3991 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
3993 yyp += yytnamerr (yyp, yyarg[yyi++]);
4006 #endif /* YYERROR_VERBOSE */
4009 /*-----------------------------------------------.
4010 | Release the memory associated to this symbol. |
4011 `-----------------------------------------------*/
4014 #if (defined __STDC__ || defined __C99__FUNC__ \
4015 || defined __cplusplus || defined _MSC_VER)
4017 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
4020 yydestruct (yymsg, yytype, yyvaluep)
4030 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
4040 /* Prevent warnings from -Wmissing-prototypes. */
4041 #ifdef YYPARSE_PARAM
4042 #if defined __STDC__ || defined __cplusplus
4043 int yyparse (void *YYPARSE_PARAM);
4047 #else /* ! YYPARSE_PARAM */
4048 #if defined __STDC__ || defined __cplusplus
4053 #endif /* ! YYPARSE_PARAM */
4056 /* The lookahead symbol. */
4059 /* The semantic value of the lookahead symbol. */
4062 /* Number of syntax errors so far. */
4067 /*-------------------------.
4068 | yyparse or yypush_parse. |
4069 `-------------------------*/
4071 #ifdef YYPARSE_PARAM
4072 #if (defined __STDC__ || defined __C99__FUNC__ \
4073 || defined __cplusplus || defined _MSC_VER)
4075 yyparse (void *YYPARSE_PARAM)
4078 yyparse (YYPARSE_PARAM)
4079 void *YYPARSE_PARAM;
4081 #else /* ! YYPARSE_PARAM */
4082 #if (defined __STDC__ || defined __C99__FUNC__ \
4083 || defined __cplusplus || defined _MSC_VER)
4096 /* Number of tokens to shift before error messages enabled. */
4099 /* The stacks and their tools:
4100 `yyss': related to states.
4101 `yyvs': related to semantic values.
4103 Refer to the stacks thru separate pointers, to allow yyoverflow
4104 to reallocate them elsewhere. */
4106 /* The state stack. */
4107 yytype_int16 yyssa[YYINITDEPTH];
4109 yytype_int16 *yyssp;
4111 /* The semantic value stack. */
4112 YYSTYPE yyvsa[YYINITDEPTH];
4116 YYSIZE_T yystacksize;
4120 /* Lookahead token as an internal (translated) token number. */
4122 /* The variables used to return semantic value and location from the
4127 /* Buffer for error messages, and its allocated size. */
4129 char *yymsg = yymsgbuf;
4130 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
4133 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
4135 /* The number of symbols on the RHS of the reduced rule.
4136 Keep to zero when no symbol should be popped. */
4142 yystacksize = YYINITDEPTH;
4144 YYDPRINTF ((stderr, "Starting parse\n"));
4149 yychar = YYEMPTY; /* Cause a token to be read. */
4151 /* Initialize stack pointers.
4152 Waste one element of value and location stack
4153 so that they stay on the same level as the state stack.
4154 The wasted elements are never initialized. */
4160 /*------------------------------------------------------------.
4161 | yynewstate -- Push a new state, which is found in yystate. |
4162 `------------------------------------------------------------*/
4164 /* In all cases, when you get here, the value and location stacks
4165 have just been pushed. So pushing a state here evens the stacks. */
4171 if (yyss + yystacksize - 1 <= yyssp)
4173 /* Get the current used size of the three stacks, in elements. */
4174 YYSIZE_T yysize = yyssp - yyss + 1;
4178 /* Give user a chance to reallocate the stack. Use copies of
4179 these so that the &'s don't force the real ones into
4181 YYSTYPE *yyvs1 = yyvs;
4182 yytype_int16 *yyss1 = yyss;
4184 /* Each stack pointer address is followed by the size of the
4185 data in use in that stack, in bytes. This used to be a
4186 conditional around just the two extra args, but that might
4187 be undefined if yyoverflow is a macro. */
4188 yyoverflow (YY_("memory exhausted"),
4189 &yyss1, yysize * sizeof (*yyssp),
4190 &yyvs1, yysize * sizeof (*yyvsp),
4196 #else /* no yyoverflow */
4197 # ifndef YYSTACK_RELOCATE
4198 goto yyexhaustedlab;
4200 /* Extend the stack our own way. */
4201 if (YYMAXDEPTH <= yystacksize)
4202 goto yyexhaustedlab;
4204 if (YYMAXDEPTH < yystacksize)
4205 yystacksize = YYMAXDEPTH;
4208 yytype_int16 *yyss1 = yyss;
4209 union yyalloc *yyptr =
4210 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
4212 goto yyexhaustedlab;
4213 YYSTACK_RELOCATE (yyss_alloc, yyss);
4214 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
4215 # undef YYSTACK_RELOCATE
4217 YYSTACK_FREE (yyss1);
4220 #endif /* no yyoverflow */
4222 yyssp = yyss + yysize - 1;
4223 yyvsp = yyvs + yysize - 1;
4225 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
4226 (unsigned long int) yystacksize));
4228 if (yyss + yystacksize - 1 <= yyssp)
4232 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
4234 if (yystate == YYFINAL)
4244 /* Do appropriate processing given the current state. Read a
4245 lookahead token if we need one and don't already have one. */
4247 /* First try to decide what to do without reference to lookahead token. */
4248 yyn = yypact[yystate];
4249 if (yyn == YYPACT_NINF)
4252 /* Not known => get a lookahead token if don't already have one. */
4254 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
4255 if (yychar == YYEMPTY)
4257 YYDPRINTF ((stderr, "Reading a token: "));
4261 if (yychar <= YYEOF)
4263 yychar = yytoken = YYEOF;
4264 YYDPRINTF ((stderr, "Now at end of input.\n"));
4268 yytoken = YYTRANSLATE (yychar);
4269 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
4272 /* If the proper action on seeing token YYTOKEN is to reduce or to
4273 detect an error, take that action. */
4275 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
4280 if (yyn == 0 || yyn == YYTABLE_NINF)
4286 /* Count tokens shifted since error; after three, turn off error
4291 /* Shift the lookahead token. */
4292 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
4294 /* Discard the shifted token. */
4303 /*-----------------------------------------------------------.
4304 | yydefault -- do the default action for the current state. |
4305 `-----------------------------------------------------------*/
4307 yyn = yydefact[yystate];
4313 /*-----------------------------.
4314 | yyreduce -- Do a reduction. |
4315 `-----------------------------*/
4317 /* yyn is the number of a rule to reduce with. */
4320 /* If YYLEN is nonzero, implement the default value of the action:
4323 Otherwise, the following line sets YYVAL to garbage.
4324 This behavior is undocumented and Bison
4325 users should not rely upon it. Assigning to YYVAL
4326 unconditionally makes the parser a bit smaller, and it avoids a
4327 GCC warning that YYVAL may be used uninitialized. */
4328 yyval = yyvsp[1-yylen];
4331 YY_REDUCE_PRINT (yyn);
4338 /* Line 1464 of skeleton.m4 */
4339 #line 2098 "parser.y"
4340 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4349 /* Line 1464 of skeleton.m4 */
4350 #line 2099 "parser.y"
4351 {(yyval.code)=code_new();}
4360 /* Line 1464 of skeleton.m4 */
4361 #line 2101 "parser.y"
4362 {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
4371 /* Line 1464 of skeleton.m4 */
4372 #line 2102 "parser.y"
4373 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4382 /* Line 1464 of skeleton.m4 */
4383 #line 2117 "parser.y"
4384 {(yyval.code)=(yyvsp[(2) - (3)].code);}
4393 /* Line 1464 of skeleton.m4 */
4394 #line 2118 "parser.y"
4404 /* Line 1464 of skeleton.m4 */
4405 #line 2121 "parser.y"
4415 /* Line 1464 of skeleton.m4 */
4416 #line 2128 "parser.y"
4417 {(yyval.code)=(yyvsp[(3) - (4)].code);}
4426 /* Line 1464 of skeleton.m4 */
4427 #line 2132 "parser.y"
4428 {(yyval.code)=(yyvsp[(1) - (2)].code);}
4437 /* Line 1464 of skeleton.m4 */
4438 #line 2133 "parser.y"
4439 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4448 /* Line 1464 of skeleton.m4 */
4449 #line 2137 "parser.y"
4451 code_t**cc = &global->init->method->body->code;
4452 *cc = code_append(*cc, (yyvsp[(1) - (1)].code));
4462 /* Line 1464 of skeleton.m4 */
4463 #line 2148 "parser.y"
4464 {(yyval.value)=(yyvsp[(2) - (2)].value);}
4473 /* Line 1464 of skeleton.m4 */
4474 #line 2149 "parser.y"
4475 {(yyval.value).c=abc_pushundefined(0);
4476 (yyval.value).t=TYPE_ANY;
4486 /* Line 1464 of skeleton.m4 */
4487 #line 2153 "parser.y"
4488 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4497 /* Line 1464 of skeleton.m4 */
4498 #line 2154 "parser.y"
4499 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4508 /* Line 1464 of skeleton.m4 */
4509 #line 2156 "parser.y"
4510 {(yyval.code) = (yyvsp[(1) - (1)].code);}
4519 /* Line 1464 of skeleton.m4 */
4520 #line 2157 "parser.y"
4521 {(yyval.code) = code_append((yyvsp[(1) - (3)].code), (yyvsp[(3) - (3)].code));}
4530 /* Line 1464 of skeleton.m4 */
4531 #line 2160 "parser.y"
4534 if(variable_exists((yyvsp[(1) - (3)].id)))
4535 syntaxerror("Variable %s already defined", (yyvsp[(1) - (3)].id));
4537 new_variable((yyvsp[(1) - (3)].id), 0, 1, 0);
4540 if(!is_subtype_of((yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo))) {
4541 syntaxerror("Can't convert %s to %s", (yyvsp[(3) - (3)].value).t->name,
4542 (yyvsp[(2) - (3)].classinfo)->name);
4547 if(state->method->uses_slots) {
4548 variable_t* v = find_slot(state, (yyvsp[(1) - (3)].id));
4550 // this variable is stored in a slot
4552 v->type = (yyvsp[(2) - (3)].classinfo);
4558 index = new_variable((yyvsp[(1) - (3)].id), (yyvsp[(2) - (3)].classinfo), 1, 0);
4561 (yyval.code) = slot?abc_getscopeobject(0, 1):0;
4563 if((yyvsp[(2) - (3)].classinfo)) {
4564 if((yyvsp[(3) - (3)].value).c->prev || (yyvsp[(3) - (3)].value).c->opcode != OPCODE_PUSHUNDEFINED) {
4565 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (3)].value).c);
4566 (yyval.code) = converttype((yyval.code), (yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo));
4568 code_free((yyvsp[(3) - (3)].value).c);
4569 (yyval.code) = defaultvalue((yyval.code), (yyvsp[(2) - (3)].classinfo));
4572 if((yyvsp[(3) - (3)].value).c->prev || (yyvsp[(3) - (3)].value).c->opcode != OPCODE_PUSHUNDEFINED) {
4573 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (3)].value).c);
4574 (yyval.code) = abc_coerce_a((yyval.code));
4576 // don't do anything
4577 code_free((yyvsp[(3) - (3)].value).c);
4578 code_free((yyval.code));
4584 (yyval.code) = abc_setslot((yyval.code), index);
4586 (yyval.code) = abc_setlocal((yyval.code), index);
4597 /* Line 1464 of skeleton.m4 */
4598 #line 2220 "parser.y"
4599 {(yyval.code) = code_new();}
4608 /* Line 1464 of skeleton.m4 */
4609 #line 2221 "parser.y"
4610 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4619 /* Line 1464 of skeleton.m4 */
4620 #line 2224 "parser.y"
4621 {PASS12 new_state();}
4630 /* Line 1464 of skeleton.m4 */
4631 #line 2224 "parser.y"
4634 (yyval.code) = code_new();
4635 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (7)].value).c);
4636 code_t*myjmp,*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4638 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].code));
4639 if((yyvsp[(7) - (7)].code)) {
4640 myjmp = (yyval.code) = abc_jump((yyval.code), 0);
4642 myif->branch = (yyval.code) = abc_nop((yyval.code));
4643 if((yyvsp[(7) - (7)].code)) {
4644 (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (7)].code));
4645 myjmp->branch = (yyval.code) = abc_nop((yyval.code));
4647 (yyval.code) = var_block((yyval.code));
4658 /* Line 1464 of skeleton.m4 */
4659 #line 2243 "parser.y"
4660 {(yyval.code)=code_new();}
4669 /* Line 1464 of skeleton.m4 */
4670 #line 2250 "parser.y"
4672 PASS1 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable((yyvsp[(2) - (3)].id),0,1,0);
4673 PASS2 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable((yyvsp[(2) - (3)].id),(yyvsp[(3) - (3)].classinfo),1,0);
4683 /* Line 1464 of skeleton.m4 */
4684 #line 2254 "parser.y"
4687 (yyval.id)=(yyvsp[(1) - (1)].id);
4697 /* Line 1464 of skeleton.m4 */
4698 #line 2259 "parser.y"
4699 {PASS12 new_state();(yyval.for_start).name=(yyvsp[(1) - (2)].id);(yyval.for_start).each=0;}
4708 /* Line 1464 of skeleton.m4 */
4709 #line 2260 "parser.y"
4710 {PASS12 new_state();(yyval.for_start).name=(yyvsp[(1) - (3)].id);(yyval.for_start).each=1;}
4719 /* Line 1464 of skeleton.m4 */
4720 #line 2262 "parser.y"
4722 if((yyvsp[(1) - (8)].for_start).each) syntaxerror("invalid syntax: ; not allowed in for each statement");
4723 (yyval.code) = code_new();
4724 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (8)].code));
4725 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4726 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (8)].value).c);
4727 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4728 (yyval.code) = code_append((yyval.code), (yyvsp[(8) - (8)].code));
4729 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4730 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (8)].code));
4731 (yyval.code) = abc_jump((yyval.code), loopstart);
4732 code_t*out = (yyval.code) = abc_nop((yyval.code));
4733 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, out);
4734 continuejumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, cont);
4737 (yyval.code) = var_block((yyval.code));
4748 /* Line 1464 of skeleton.m4 */
4749 #line 2282 "parser.y"
4751 variable_t*var = find_variable(state, (yyvsp[(2) - (6)].id));
4753 syntaxerror("variable %s not known in this scope", (yyvsp[(2) - (6)].id));
4756 char*tmp1name = concat2((yyvsp[(2) - (6)].id), "__tmp1__");
4757 int it = new_variable(tmp1name, TYPE_INT, 0, 0);
4758 char*tmp2name = concat2((yyvsp[(2) - (6)].id), "__array__");
4759 int array = new_variable(tmp1name, 0, 0, 0);
4761 (yyval.code) = code_new();
4762 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
4763 (yyval.code) = abc_coerce_a((yyval.code));
4764 (yyval.code) = abc_setlocal((yyval.code), array);
4765 (yyval.code) = abc_pushbyte((yyval.code), 0);
4766 (yyval.code) = abc_setlocal((yyval.code), it);
4768 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4770 (yyval.code) = abc_hasnext2((yyval.code), array, it);
4771 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4772 (yyval.code) = abc_getlocal((yyval.code), array);
4773 (yyval.code) = abc_getlocal((yyval.code), it);
4774 if(!(yyvsp[(1) - (6)].for_start).each)
4775 (yyval.code) = abc_nextname((yyval.code));
4777 (yyval.code) = abc_nextvalue((yyval.code));
4778 (yyval.code) = converttype((yyval.code), 0, var->type);
4779 (yyval.code) = abc_setlocal((yyval.code), var->index);
4781 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
4782 (yyval.code) = abc_jump((yyval.code), loopstart);
4784 code_t*out = (yyval.code) = abc_nop((yyval.code));
4785 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, out);
4786 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, loopstart);
4790 (yyval.code) = var_block((yyval.code));
4805 /* Line 1464 of skeleton.m4 */
4806 #line 2330 "parser.y"
4807 {PASS12 new_state();}
4816 /* Line 1464 of skeleton.m4 */
4817 #line 2330 "parser.y"
4820 (yyval.code) = code_new();
4822 code_t*myjmp = (yyval.code) = abc_jump((yyval.code), 0);
4823 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4824 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
4825 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4826 myjmp->branch = cont;
4827 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
4828 (yyval.code) = abc_iftrue((yyval.code), loopstart);
4829 code_t*out = (yyval.code) = abc_nop((yyval.code));
4830 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].id), out);
4831 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].id), cont);
4833 (yyval.code) = var_block((yyval.code));
4844 /* Line 1464 of skeleton.m4 */
4845 #line 2349 "parser.y"
4846 {PASS12 new_state();}
4855 /* Line 1464 of skeleton.m4 */
4856 #line 2349 "parser.y"
4858 (yyval.code) = code_new();
4859 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4860 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (7)].code));
4861 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4862 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].value).c);
4863 (yyval.code) = abc_iftrue((yyval.code), loopstart);
4864 code_t*out = (yyval.code) = abc_nop((yyval.code));
4865 breakjumpsto((yyval.code), (yyvsp[(1) - (7)].id), out);
4866 continuejumpsto((yyval.code), (yyvsp[(1) - (7)].id), cont);
4868 (yyval.code) = var_block((yyval.code));
4879 /* Line 1464 of skeleton.m4 */
4880 #line 2364 "parser.y"
4882 (yyval.code) = abc___break__(0, "");
4892 /* Line 1464 of skeleton.m4 */
4893 #line 2367 "parser.y"
4895 (yyval.code) = abc___break__(0, (yyvsp[(2) - (2)].id));
4905 /* Line 1464 of skeleton.m4 */
4906 #line 2370 "parser.y"
4908 (yyval.code) = abc___continue__(0, "");
4918 /* Line 1464 of skeleton.m4 */
4919 #line 2373 "parser.y"
4921 (yyval.code) = abc___continue__(0, (yyvsp[(2) - (2)].id));
4931 /* Line 1464 of skeleton.m4 */
4932 #line 2377 "parser.y"
4942 /* Line 1464 of skeleton.m4 */
4943 #line 2378 "parser.y"
4944 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4953 /* Line 1464 of skeleton.m4 */
4954 #line 2379 "parser.y"
4955 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4964 /* Line 1464 of skeleton.m4 */
4965 #line 2380 "parser.y"
4966 {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
4975 /* Line 1464 of skeleton.m4 */
4976 #line 2381 "parser.y"
4977 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4986 /* Line 1464 of skeleton.m4 */
4987 #line 2382 "parser.y"
4988 {(yyval.code)=code_append((yyval.code),(yyvsp[(2) - (2)].code));}
4997 /* Line 1464 of skeleton.m4 */
4998 #line 2384 "parser.y"
5000 (yyval.code) = abc_getlocal(0, state->switch_var);
5001 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (4)].value).c);
5002 code_t*j = (yyval.code) = abc_ifne((yyval.code), 0);
5003 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (4)].code));
5004 if((yyval.code)->opcode != OPCODE___BREAK__) {
5005 (yyval.code) = abc___fallthrough__((yyval.code), "");
5007 code_t*e = (yyval.code) = abc_nop((yyval.code));
5018 /* Line 1464 of skeleton.m4 */
5019 #line 2395 "parser.y"
5021 (yyval.code) = (yyvsp[(3) - (3)].code);
5031 /* Line 1464 of skeleton.m4 */
5032 #line 2398 "parser.y"
5033 {PASS12 new_state();state->switch_var=alloc_local();}
5042 /* Line 1464 of skeleton.m4 */
5043 #line 2398 "parser.y"
5045 (yyval.code)=(yyvsp[(4) - (8)].value).c;
5046 (yyval.code) = abc_setlocal((yyval.code), state->switch_var);
5047 (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (8)].code));
5049 code_t*out = (yyval.code) = abc_kill((yyval.code), state->switch_var);
5050 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].id), out);
5052 code_t*c = (yyval.code),*lastblock=0;
5054 if(c->opcode == OPCODE_IFNE) {
5055 if(!c->next) syntaxerror("internal error in fallthrough handling");
5057 } else if(c->opcode == OPCODE___FALLTHROUGH__) {
5059 c->opcode = OPCODE_JUMP;
5060 c->branch = lastblock;
5062 /* fall through end of switch */
5063 c->opcode = OPCODE_NOP;
5069 (yyval.code) = var_block((yyval.code));
5080 /* Line 1464 of skeleton.m4 */
5081 #line 2429 "parser.y"
5082 {PASS12 new_state();
5083 state->exception_name=(yyvsp[(3) - (5)].id);
5084 PASS1 new_variable((yyvsp[(3) - (5)].id), 0, 0, 0);
5085 PASS2 new_variable((yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].classinfo), 0, 0);
5095 /* Line 1464 of skeleton.m4 */
5096 #line 2434 "parser.y"
5098 namespace_t name_ns = {ACCESS_PACKAGE, ""};
5099 multiname_t name = {QNAME, &name_ns, 0, (yyvsp[(3) - (9)].id)};
5101 NEW(abc_exception_t, e)
5102 e->exc_type = sig2mname((yyvsp[(4) - (9)].classinfo));
5103 e->var_name = multiname_clone(&name);
5104 (yyval.exception) = e;
5107 int i = find_variable_safe(state, (yyvsp[(3) - (9)].id))->index;
5108 e->target = c = abc_nop(0);
5109 c = abc_setlocal(c, i);
5110 c = code_append(c, code_dup(state->method->scope_code));
5111 c = code_append(c, (yyvsp[(8) - (9)].code));
5125 /* Line 1464 of skeleton.m4 */
5126 #line 2454 "parser.y"
5127 {PASS12 new_state();state->exception_name=0;}
5136 /* Line 1464 of skeleton.m4 */
5137 #line 2454 "parser.y"
5139 (yyvsp[(4) - (5)].code) = var_block((yyvsp[(4) - (5)].code));
5140 if(!(yyvsp[(4) - (5)].code)) {
5141 (yyval.exception)=0;
5143 NEW(abc_exception_t, e)
5144 e->exc_type = 0; //all exceptions
5145 e->var_name = 0; //no name
5148 e->to = code_append(e->to, (yyvsp[(4) - (5)].code));
5149 (yyval.exception) = e;
5161 /* Line 1464 of skeleton.m4 */
5162 #line 2470 "parser.y"
5163 {(yyval.catch_list).l=list_new();(yyval.catch_list).finally=0;list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));}
5172 /* Line 1464 of skeleton.m4 */
5173 #line 2471 "parser.y"
5174 {(yyval.catch_list)=(yyvsp[(1) - (2)].catch_list);list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));}
5183 /* Line 1464 of skeleton.m4 */
5184 #line 2472 "parser.y"
5185 {(yyval.catch_list)=(yyvsp[(1) - (1)].catch_list);}
5194 /* Line 1464 of skeleton.m4 */
5195 #line 2473 "parser.y"
5197 (yyval.catch_list) = (yyvsp[(1) - (2)].catch_list);
5198 (yyval.catch_list).finally = 0;
5199 if((yyvsp[(2) - (2)].exception)) {
5200 list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));
5201 (yyval.catch_list).finally = (yyvsp[(2) - (2)].exception)->to;(yyvsp[(2) - (2)].exception)->to=0;
5212 /* Line 1464 of skeleton.m4 */
5213 #line 2481 "parser.y"
5215 (yyval.catch_list).l=list_new();
5216 (yyval.catch_list).finally = 0;
5217 if((yyvsp[(1) - (1)].exception)) {
5218 list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));
5219 (yyval.catch_list).finally = (yyvsp[(1) - (1)].exception)->to;(yyvsp[(1) - (1)].exception)->to=0;
5230 /* Line 1464 of skeleton.m4 */
5231 #line 2490 "parser.y"
5232 {PASS12 new_state();
5233 state->method->has_exceptions=1;
5234 state->method->late_binding=1;//for invariant scope_code
5244 /* Line 1464 of skeleton.m4 */
5245 #line 2493 "parser.y"
5247 code_t*out = abc_nop(0);
5249 code_t*start = abc_nop(0);
5250 (yyval.code) = code_append(start, (yyvsp[(4) - (6)].code));
5251 if(!is_break_or_jump((yyvsp[(4) - (6)].code))) {
5252 (yyval.code) = abc_jump((yyval.code), out);
5254 code_t*end = (yyval.code) = abc_nop((yyval.code));
5257 if((yyvsp[(6) - (6)].catch_list).finally)
5258 tmp = new_variable("__finally__", 0, 0, 0);
5260 abc_exception_list_t*l = (yyvsp[(6) - (6)].catch_list).l;
5263 abc_exception_t*e = l->abc_exception;
5265 (yyval.code) = code_append((yyval.code), e->target);
5266 (yyval.code) = abc_jump((yyval.code), out);
5268 parserassert((ptroff_t)(yyvsp[(6) - (6)].catch_list).finally);
5270 e->target = (yyval.code) = abc_nop((yyval.code));
5271 (yyval.code) = code_append((yyval.code), code_dup(state->method->scope_code));
5272 (yyval.code) = abc___rethrow__((yyval.code));
5280 (yyval.code) = code_append((yyval.code), out);
5282 (yyval.code) = insert_finally((yyval.code), (yyvsp[(6) - (6)].catch_list).finally, tmp);
5284 list_concat(state->method->exceptions, (yyvsp[(6) - (6)].catch_list).l);
5286 (yyval.code) = var_block((yyval.code));
5297 /* Line 1464 of skeleton.m4 */
5298 #line 2539 "parser.y"
5300 (yyval.code)=(yyvsp[(2) - (2)].value).c;
5301 (yyval.code)=abc_throw((yyval.code));
5311 /* Line 1464 of skeleton.m4 */
5312 #line 2543 "parser.y"
5314 if(!state->exception_name)
5315 syntaxerror("re-throw only possible within a catch block");
5316 variable_t*v = find_variable(state, state->exception_name);
5317 (yyval.code)=code_new();
5318 (yyval.code)=abc_getlocal((yyval.code), v->index);
5319 (yyval.code)=abc_throw((yyval.code));
5329 /* Line 1464 of skeleton.m4 */
5330 #line 2554 "parser.y"
5333 if(state->method->has_exceptions) {
5334 int v = alloc_local();
5335 state->method->scope_code = abc_getlocal(state->method->scope_code, v);
5336 state->method->scope_code = abc_pushwith(state->method->scope_code);
5337 (yyval.value_list).number = v;
5339 (yyval.value_list).cc = (yyvsp[(3) - (4)].value).c;
5349 /* Line 1464 of skeleton.m4 */
5350 #line 2564 "parser.y"
5352 /* remove getlocal;pushwith from scope code again */
5353 state->method->scope_code = code_cutlast(code_cutlast(state->method->scope_code));
5355 (yyval.code) = (yyvsp[(1) - (2)].value_list).cc;
5356 if(state->method->has_exceptions) {
5357 (yyval.code) = abc_dup((yyval.code));
5358 (yyval.code) = abc_setlocal((yyval.code), (yyvsp[(1) - (2)].value_list).number);
5360 (yyval.code) = abc_pushwith((yyval.code));
5361 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (2)].code));
5362 (yyval.code) = abc_popscope((yyval.code));
5373 /* Line 1464 of skeleton.m4 */
5374 #line 2582 "parser.y"
5375 {PASS12 (yyval.id)="package";}
5384 /* Line 1464 of skeleton.m4 */
5385 #line 2584 "parser.y"
5386 {PASS12 (yyval.id) = concat3((yyvsp[(1) - (3)].id),".",(yyvsp[(3) - (3)].id));free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;}
5395 /* Line 1464 of skeleton.m4 */
5396 #line 2585 "parser.y"
5397 {PASS12 (yyval.id)=strdup((yyvsp[(1) - (1)].id));}
5406 /* Line 1464 of skeleton.m4 */
5407 #line 2587 "parser.y"
5408 {PASS12 startpackage((yyvsp[(2) - (3)].id));free((yyvsp[(2) - (3)].id));(yyvsp[(2) - (3)].id)=0;}
5417 /* Line 1464 of skeleton.m4 */
5418 #line 2588 "parser.y"
5419 {PASS12 endpackage();(yyval.code)=0;}
5428 /* Line 1464 of skeleton.m4 */
5429 #line 2589 "parser.y"
5430 {PASS12 startpackage("");}
5439 /* Line 1464 of skeleton.m4 */
5440 #line 2590 "parser.y"
5441 {PASS12 endpackage();(yyval.code)=0;}
5450 /* Line 1464 of skeleton.m4 */
5451 #line 2592 "parser.y"
5454 slotinfo_t*s = registry_find((yyvsp[(2) - (2)].classinfo)->package, (yyvsp[(2) - (2)].classinfo)->name);
5455 if(!s && as3_pass==1) {// || !(s->flags&FLAG_BUILTIN)) {
5456 as3_schedule_class((yyvsp[(2) - (2)].classinfo)->package, (yyvsp[(2) - (2)].classinfo)->name);
5460 classinfo_t*c = (yyvsp[(2) - (2)].classinfo);
5462 syntaxerror("Couldn't import class\n");
5463 state_has_imports();
5464 dict_put(state->imports, c->name, c);
5465 import_toplevel(c->package);
5476 /* Line 1464 of skeleton.m4 */
5477 #line 2608 "parser.y"
5480 if(strncmp("flash.", (yyvsp[(2) - (4)].id), 6) && as3_pass==1) {
5481 as3_schedule_package((yyvsp[(2) - (4)].id));
5486 i->package = (yyvsp[(2) - (4)].id);
5487 state_has_imports();
5488 list_append(state->wildcard_imports, i);
5489 import_toplevel(i->package);
5500 /* Line 1464 of skeleton.m4 */
5501 #line 2625 "parser.y"
5502 {PASS12 (yyval.flags).flags=0;(yyval.flags).ns=0;}
5511 /* Line 1464 of skeleton.m4 */
5512 #line 2626 "parser.y"
5513 {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
5522 /* Line 1464 of skeleton.m4 */
5523 #line 2627 "parser.y"
5524 {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
5533 /* Line 1464 of skeleton.m4 */
5534 #line 2628 "parser.y"
5537 (yyval.flags).flags=(yyvsp[(1) - (2)].flags).flags|(yyvsp[(2) - (2)].flags).flags;
5538 if((yyvsp[(1) - (2)].flags).ns && (yyvsp[(2) - (2)].flags).ns) syntaxerror("only one namespace allowed in one declaration");
5539 (yyval.flags).ns=(yyvsp[(1) - (2)].flags).ns?(yyvsp[(1) - (2)].flags).ns:(yyvsp[(2) - (2)].flags).ns;
5550 /* Line 1464 of skeleton.m4 */
5551 #line 2636 "parser.y"
5552 {PASS12 (yyval.flags).flags=FLAG_PUBLIC;(yyval.flags).ns=0;}
5561 /* Line 1464 of skeleton.m4 */
5562 #line 2637 "parser.y"
5563 {PASS12 (yyval.flags).flags=FLAG_PRIVATE;(yyval.flags).ns=0;}
5572 /* Line 1464 of skeleton.m4 */
5573 #line 2638 "parser.y"
5574 {PASS12 (yyval.flags).flags=FLAG_PROTECTED;(yyval.flags).ns=0;}
5583 /* Line 1464 of skeleton.m4 */
5584 #line 2639 "parser.y"
5585 {PASS12 (yyval.flags).flags=FLAG_STATIC;(yyval.flags).ns=0;}
5594 /* Line 1464 of skeleton.m4 */
5595 #line 2640 "parser.y"
5596 {PASS12 (yyval.flags).flags=FLAG_DYNAMIC;(yyval.flags).ns=0;}
5605 /* Line 1464 of skeleton.m4 */
5606 #line 2641 "parser.y"
5607 {PASS12 (yyval.flags).flags=FLAG_FINAL;(yyval.flags).ns=0;}
5616 /* Line 1464 of skeleton.m4 */
5617 #line 2642 "parser.y"
5618 {PASS12 (yyval.flags).flags=FLAG_OVERRIDE;(yyval.flags).ns=0;}
5627 /* Line 1464 of skeleton.m4 */
5628 #line 2643 "parser.y"
5629 {PASS12 (yyval.flags).flags=FLAG_NATIVE;(yyval.flags).ns=0;}
5638 /* Line 1464 of skeleton.m4 */
5639 #line 2644 "parser.y"
5640 {PASS12 (yyval.flags).flags=FLAG_PACKAGEINTERNAL;(yyval.flags).ns=0;}
5649 /* Line 1464 of skeleton.m4 */
5650 #line 2645 "parser.y"
5651 {PASS12 (yyval.flags).flags=FLAG_NAMESPACE;
5652 (yyval.flags).ns=(yyvsp[(1) - (1)].id);
5662 /* Line 1464 of skeleton.m4 */
5663 #line 2649 "parser.y"
5664 {PASS12 (yyval.classinfo)=0;}
5673 /* Line 1464 of skeleton.m4 */
5674 #line 2650 "parser.y"
5675 {PASS12 (yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
5684 /* Line 1464 of skeleton.m4 */
5685 #line 2652 "parser.y"
5686 {PASS12 (yyval.classinfo_list)=list_new();}
5695 /* Line 1464 of skeleton.m4 */
5696 #line 2653 "parser.y"
5697 {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
5706 /* Line 1464 of skeleton.m4 */
5707 #line 2655 "parser.y"
5708 {PASS12 (yyval.classinfo_list)=list_new();}
5717 /* Line 1464 of skeleton.m4 */
5718 #line 2656 "parser.y"
5719 {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
5728 /* Line 1464 of skeleton.m4 */
5729 #line 2660 "parser.y"
5730 {PASS12 startclass(&(yyvsp[(1) - (6)].flags),(yyvsp[(3) - (6)].id),(yyvsp[(4) - (6)].classinfo),(yyvsp[(5) - (6)].classinfo_list));}
5739 /* Line 1464 of skeleton.m4 */
5740 #line 2662 "parser.y"
5741 {PASS12 endclass();(yyval.code)=0;}
5750 /* Line 1464 of skeleton.m4 */
5751 #line 2666 "parser.y"
5752 {PASS12 (yyvsp[(1) - (5)].flags).flags|=FLAG_INTERFACE;
5753 startclass(&(yyvsp[(1) - (5)].flags),(yyvsp[(3) - (5)].id),0,(yyvsp[(4) - (5)].classinfo_list));}
5762 /* Line 1464 of skeleton.m4 */
5763 #line 2669 "parser.y"
5764 {PASS12 endclass();(yyval.code)=0;}
5773 /* Line 1464 of skeleton.m4 */
5774 #line 2682 "parser.y"
5776 code_t*c = state->cls->static_init->header;
5777 c = code_append(c, (yyvsp[(1) - (1)].code));
5778 state->cls->static_init->header = c;
5788 /* Line 1464 of skeleton.m4 */
5789 #line 2693 "parser.y"
5791 syntaxerror("variable declarations not allowed in interfaces");
5801 /* Line 1464 of skeleton.m4 */
5802 #line 2696 "parser.y"
5805 (yyvsp[(1) - (8)].flags).flags |= FLAG_PUBLIC;
5806 if((yyvsp[(1) - (8)].flags).flags&(FLAG_PRIVATE|FLAG_PACKAGEINTERNAL|FLAG_PROTECTED)) {
5807 syntaxerror("invalid method modifiers: interface methods always need to be public");
5809 startfunction(&(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo));
5810 endfunction(&(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo), 0);
5811 list_deep_free((yyvsp[(6) - (8)].params).list);
5821 /* Line 1464 of skeleton.m4 */
5822 #line 2711 "parser.y"
5823 {setslotstate(&(yyvsp[(1) - (2)].flags),(yyvsp[(2) - (2)].token));}
5832 /* Line 1464 of skeleton.m4 */
5833 #line 2711 "parser.y"
5834 {(yyval.code)=(yyvsp[(4) - (4)].code);setslotstate(0, 0);}
5843 /* Line 1464 of skeleton.m4 */
5844 #line 2713 "parser.y"
5845 {(yyval.code) = (yyvsp[(1) - (1)].code);}
5854 /* Line 1464 of skeleton.m4 */
5855 #line 2714 "parser.y"
5856 {(yyval.code) = code_append((yyvsp[(1) - (3)].code), (yyvsp[(3) - (3)].code));}
5865 /* Line 1464 of skeleton.m4 */
5866 #line 2717 "parser.y"
5868 int flags = slotstate_flags->flags;
5869 namespace_t ns = modifiers2access(slotstate_flags);
5871 varinfo_t* info = 0;
5873 memberinfo_t*i = registry_findmember(state->cls->info, ns.name, (yyvsp[(1) - (3)].id), 1);
5875 check_override(i, flags);
5877 info = varinfo_register_onclass(state->cls->info, ns.access, ns.name, (yyvsp[(1) - (3)].id));
5879 slotinfo_t*i = registry_find(state->package, (yyvsp[(1) - (3)].id));
5881 syntaxerror("package %s already contains '%s'", state->package, (yyvsp[(1) - (3)].id));
5883 if(ns.name && ns.name[0]) {
5884 syntaxerror("namespaces not allowed on package-level variables");
5886 info = varinfo_register_global(ns.access, state->package, (yyvsp[(1) - (3)].id));
5889 info->type = (yyvsp[(2) - (3)].classinfo);
5890 info->flags = flags;
5893 multiname_t mname = {QNAME, &ns, 0, (yyvsp[(1) - (3)].id)};
5895 trait_list_t**traits;
5899 ns.name = state->package;
5900 traits = &global->init->traits;
5901 code = &global->init->method->body->code;
5902 } else if(flags&FLAG_STATIC) {
5904 traits = &state->cls->abc->static_traits;
5905 code = &state->cls->static_init->header;
5907 // instance variable
5908 traits = &state->cls->abc->traits;
5909 code = &state->cls->init->header;
5913 if((yyvsp[(2) - (3)].classinfo)) {
5914 MULTINAME(m, (yyvsp[(2) - (3)].classinfo));
5915 t = trait_new_member(traits, multiname_clone(&m), multiname_clone(&mname), 0);
5917 t = trait_new_member(traits, 0, multiname_clone(&mname), 0);
5919 info->slot = t->slot_id;
5921 /* initalization code (if needed) */
5923 if((yyvsp[(3) - (3)].value).c && !is_pushundefined((yyvsp[(3) - (3)].value).c)) {
5924 c = abc_getlocal_0(c);
5925 c = code_append(c, (yyvsp[(3) - (3)].value).c);
5926 c = converttype(c, (yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo));
5927 c = abc_setslot(c, t->slot_id);
5930 *code = code_append(*code, c);
5932 if(slotstate_varconst==KW_CONST) {
5933 t->kind= TRAIT_CONST;
5946 /* Line 1464 of skeleton.m4 */
5947 #line 2791 "parser.y"
5948 {(yyval.constant)=0;}
5957 /* Line 1464 of skeleton.m4 */
5958 #line 2792 "parser.y"
5959 {(yyval.constant)=(yyvsp[(2) - (2)].constant);}
5968 /* Line 1464 of skeleton.m4 */
5969 #line 2794 "parser.y"
5970 {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_uint));}
5979 /* Line 1464 of skeleton.m4 */
5980 #line 2795 "parser.y"
5981 {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_int));}
5990 /* Line 1464 of skeleton.m4 */
5991 #line 2796 "parser.y"
5992 {(yyval.constant) = constant_new_uint((yyvsp[(1) - (1)].number_uint));}
6001 /* Line 1464 of skeleton.m4 */
6002 #line 2797 "parser.y"
6003 {(yyval.constant) = constant_new_float((yyvsp[(1) - (1)].number_float));}
6012 /* Line 1464 of skeleton.m4 */
6013 #line 2798 "parser.y"
6014 {(yyval.constant) = constant_new_string2((yyvsp[(1) - (1)].str).str,(yyvsp[(1) - (1)].str).len);free((char*)(yyvsp[(1) - (1)].str).str);}
6023 /* Line 1464 of skeleton.m4 */
6024 #line 2800 "parser.y"
6025 {(yyval.constant) = constant_new_true((yyvsp[(1) - (1)].token));}
6034 /* Line 1464 of skeleton.m4 */
6035 #line 2801 "parser.y"
6036 {(yyval.constant) = constant_new_false((yyvsp[(1) - (1)].token));}
6045 /* Line 1464 of skeleton.m4 */
6046 #line 2802 "parser.y"
6047 {(yyval.constant) = constant_new_null((yyvsp[(1) - (1)].token));}
6056 /* Line 1464 of skeleton.m4 */
6057 #line 2803 "parser.y"
6059 if(!strcmp((yyvsp[(1) - (1)].id), "NaN")) {
6060 (yyval.constant) = constant_new_float(__builtin_nan(""));
6062 as3_warning("Couldn't evaluate constant value of %s", (yyvsp[(1) - (1)].id));
6063 (yyval.constant) = constant_new_null((yyvsp[(1) - (1)].id));
6074 /* Line 1464 of skeleton.m4 */
6075 #line 2815 "parser.y"
6078 memset(&(yyval.params),0,sizeof((yyval.params)));
6088 /* Line 1464 of skeleton.m4 */
6089 #line 2819 "parser.y"
6092 (yyval.params)=(yyvsp[(1) - (1)].params);
6102 /* Line 1464 of skeleton.m4 */
6103 #line 2825 "parser.y"
6106 memset(&(yyval.params),0,sizeof((yyval.params)));
6107 (yyval.params).varargs=1;
6108 list_append((yyval.params).list, (yyvsp[(2) - (2)].param));
6118 /* Line 1464 of skeleton.m4 */
6119 #line 2831 "parser.y"
6122 (yyval.params) =(yyvsp[(1) - (4)].params);
6123 (yyval.params).varargs=1;
6124 list_append((yyval.params).list, (yyvsp[(4) - (4)].param));
6134 /* Line 1464 of skeleton.m4 */
6135 #line 2839 "parser.y"
6138 (yyval.params) = (yyvsp[(1) - (3)].params);
6139 list_append((yyval.params).list, (yyvsp[(3) - (3)].param));
6149 /* Line 1464 of skeleton.m4 */
6150 #line 2844 "parser.y"
6153 memset(&(yyval.params),0,sizeof((yyval.params)));
6154 list_append((yyval.params).list, (yyvsp[(1) - (1)].param));
6164 /* Line 1464 of skeleton.m4 */
6165 #line 2850 "parser.y"
6168 (yyval.param) = rfx_calloc(sizeof(param_t));
6169 (yyval.param)->name=(yyvsp[(1) - (4)].id);
6170 (yyval.param)->type = (yyvsp[(3) - (4)].classinfo);
6172 (yyval.param)->value = (yyvsp[(4) - (4)].constant);
6182 /* Line 1464 of skeleton.m4 */
6183 #line 2858 "parser.y"
6186 (yyval.param) = rfx_calloc(sizeof(param_t));
6187 (yyval.param)->name=(yyvsp[(1) - (2)].id);
6188 (yyval.param)->type = TYPE_ANY;
6190 (yyval.param)->value = (yyvsp[(2) - (2)].constant);
6200 /* Line 1464 of skeleton.m4 */
6201 #line 2868 "parser.y"
6202 {PASS12 (yyval.token)=0;}
6211 /* Line 1464 of skeleton.m4 */
6212 #line 2871 "parser.y"
6213 {PASS12 startfunction(&(yyvsp[(1) - (9)].flags),(yyvsp[(3) - (9)].token),(yyvsp[(4) - (9)].id),&(yyvsp[(6) - (9)].params),(yyvsp[(8) - (9)].classinfo));}
6222 /* Line 1464 of skeleton.m4 */
6223 #line 2872 "parser.y"
6226 endfunction(&(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),0,0);
6228 if(!state->method->info) syntaxerror("internal error");
6230 code_t*c = method_header(state->method);
6231 c = wrap_function(c, 0, (yyvsp[(11) - (12)].code));
6233 endfunction(&(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),(yyvsp[(8) - (12)].classinfo),c);
6235 list_deep_free((yyvsp[(6) - (12)].params).list);
6246 /* Line 1464 of skeleton.m4 */
6247 #line 2888 "parser.y"
6248 {PASS12 (yyval.id)=0;}
6257 /* Line 1464 of skeleton.m4 */
6258 #line 2890 "parser.y"
6259 {PASS12 innerfunction((yyvsp[(2) - (7)].id),&(yyvsp[(4) - (7)].params),(yyvsp[(6) - (7)].classinfo));}
6268 /* Line 1464 of skeleton.m4 */
6269 #line 2891 "parser.y"
6272 endfunction(0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),0,0);
6274 methodinfo_t*f = state->method->info;
6275 if(!f || !f->kind) syntaxerror("internal error");
6277 code_t*c = method_header(state->method);
6278 c = wrap_function(c, 0, (yyvsp[(9) - (10)].code));
6280 int index = state->method->var_index;
6281 endfunction(0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),(yyvsp[(6) - (10)].classinfo),c);
6283 (yyval.value).c = abc_getlocal(0, index);
6284 (yyval.value).t = TYPE_FUNCTION(f);
6286 PASS12 list_deep_free((yyvsp[(4) - (10)].params).list);
6296 /* Line 1464 of skeleton.m4 */
6297 #line 2913 "parser.y"
6299 PASS1 NEW(unresolvedinfo_t,c);
6300 memset(c, 0, sizeof(*c));
6301 c->kind = INFOTYPE_UNRESOLVED;
6302 c->name = (yyvsp[(1) - (1)].id);
6303 c->package = get_package_from_name((yyvsp[(1) - (1)].id));
6305 c->nsset = get_current_imports();
6306 /* make the compiler look for this class in the current directory,
6308 as3_schedule_class_noerror(state->package, (yyvsp[(1) - (1)].id));
6310 (yyval.classinfo) = (classinfo_t*)c;
6312 slotinfo_t*s = find_class((yyvsp[(1) - (1)].id));
6313 if(!s) syntaxerror("Could not find class/method %s (current package: %s)\n", (yyvsp[(1) - (1)].id), state->package);
6314 (yyval.classinfo) = (classinfo_t*)s;
6324 /* Line 1464 of skeleton.m4 */
6325 #line 2932 "parser.y"
6327 PASS1 NEW(unresolvedinfo_t,c);
6328 memset(c, 0, sizeof(*c));
6329 c->kind = INFOTYPE_UNRESOLVED;
6330 c->package = (yyvsp[(1) - (3)].id);
6331 c->name = (yyvsp[(3) - (3)].id);
6332 (yyval.classinfo) = (classinfo_t*)c;
6334 slotinfo_t*s = registry_find((yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
6335 if(!s) syntaxerror("Couldn't find class/method %s.%s\n", (yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
6336 free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;
6337 (yyval.classinfo) = (classinfo_t*)s;
6347 /* Line 1464 of skeleton.m4 */
6348 #line 2949 "parser.y"
6349 {PASS12 (yyval.classinfo_list)=list_new();list_append((yyval.classinfo_list), (yyvsp[(1) - (1)].classinfo));}
6358 /* Line 1464 of skeleton.m4 */
6359 #line 2950 "parser.y"
6360 {PASS12 (yyval.classinfo_list)=(yyvsp[(1) - (3)].classinfo_list);list_append((yyval.classinfo_list),(yyvsp[(3) - (3)].classinfo));}
6369 /* Line 1464 of skeleton.m4 */
6370 #line 2952 "parser.y"
6371 {PASS12 (yyval.classinfo)=(yyvsp[(1) - (1)].classinfo);}
6380 /* Line 1464 of skeleton.m4 */
6381 #line 2953 "parser.y"
6382 {PASS12 (yyval.classinfo)=registry_getanytype();}
6391 /* Line 1464 of skeleton.m4 */
6392 #line 2954 "parser.y"
6393 {PASS12 (yyval.classinfo)=registry_getanytype();}
6402 /* Line 1464 of skeleton.m4 */
6403 #line 2963 "parser.y"
6404 {PASS12 (yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
6413 /* Line 1464 of skeleton.m4 */
6414 #line 2964 "parser.y"
6415 {PASS12 (yyval.classinfo)=0;}
6424 /* Line 1464 of skeleton.m4 */
6425 #line 2968 "parser.y"
6426 {(yyval.value_list).cc=0;(yyval.value_list).number=0;}
6435 /* Line 1464 of skeleton.m4 */
6436 #line 2969 "parser.y"
6437 {(yyval.value_list)=(yyvsp[(2) - (3)].value_list);}
6446 /* Line 1464 of skeleton.m4 */
6447 #line 2971 "parser.y"
6448 {(yyval.value_list).cc=0;(yyval.value_list).number=0;}
6457 /* Line 1464 of skeleton.m4 */
6458 #line 2975 "parser.y"
6459 {(yyval.value_list).number=1;
6460 (yyval.value_list).cc = (yyvsp[(1) - (1)].value).c;
6470 /* Line 1464 of skeleton.m4 */
6471 #line 2979 "parser.y"
6472 {(yyval.value_list) = (yyvsp[(1) - (2)].value_list);}
6481 /* Line 1464 of skeleton.m4 */
6482 #line 2980 "parser.y"
6484 (yyval.value_list).number= (yyvsp[(1) - (2)].value_list).number+1;
6485 (yyval.value_list).cc = code_append((yyvsp[(1) - (2)].value_list).cc, (yyvsp[(2) - (2)].value).c);
6495 /* Line 1464 of skeleton.m4 */
6496 #line 2986 "parser.y"
6498 (yyval.value).c = (yyvsp[(2) - (4)].value).c;
6499 if((yyval.value).c->opcode == OPCODE_COERCE_A) (yyval.value).c = code_cutlast((yyval.value).c);
6501 code_t*paramcode = (yyvsp[(4) - (4)].value_list).cc;
6502 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6503 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6504 (yyval.value).c = code_cutlast((yyval.value).c);
6505 (yyval.value).c = code_append((yyval.value).c, paramcode);
6506 (yyval.value).c = abc_constructprop2((yyval.value).c, name, (yyvsp[(4) - (4)].value_list).number);
6507 multiname_destroy(name);
6508 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
6509 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6510 trait_t*t = traits_find_slotid(state->cls->abc->traits,slot);//FIXME
6511 multiname_t*name = t->name;
6512 (yyval.value).c = code_cutlast((yyval.value).c);
6513 (yyval.value).c = code_append((yyval.value).c, paramcode);
6514 (yyval.value).c = abc_constructprop2((yyval.value).c, name, (yyvsp[(4) - (4)].value_list).number);
6516 (yyval.value).c = code_append((yyval.value).c, paramcode);
6517 (yyval.value).c = abc_construct((yyval.value).c, (yyvsp[(4) - (4)].value_list).number);
6520 (yyval.value).t = TYPE_ANY;
6521 if(TYPE_IS_CLASS((yyvsp[(2) - (4)].value).t) && (yyvsp[(2) - (4)].value).t->data) {
6522 (yyval.value).t = (yyvsp[(2) - (4)].value).t->data;
6524 (yyval.value).c = abc_coerce_a((yyval.value).c);
6525 (yyval.value).t = TYPE_ANY;
6536 /* Line 1464 of skeleton.m4 */
6537 #line 3022 "parser.y"
6540 (yyval.value).c = (yyvsp[(1) - (4)].value).c;
6541 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
6542 (yyval.value).c = code_cutlast((yyval.value).c);
6544 code_t*paramcode = (yyvsp[(3) - (4)].value_list).cc;
6546 (yyval.value).t = TYPE_ANY;
6547 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6548 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6549 (yyval.value).c = code_cutlast((yyval.value).c);
6550 (yyval.value).c = code_append((yyval.value).c, paramcode);
6551 (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).number);
6552 multiname_destroy(name);
6553 } else if((yyval.value).c->opcode == OPCODE_GETSLOT && (yyval.value).c->prev->opcode != OPCODE_GETSCOPEOBJECT) {
6554 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6555 trait_t*t = traits_find_slotid(state->cls->abc->traits,slot);
6556 if(t->kind!=TRAIT_METHOD) {
6557 //ok: flash allows to assign closures to members.
6559 multiname_t*name = t->name;
6560 (yyval.value).c = code_cutlast((yyval.value).c);
6561 (yyval.value).c = code_append((yyval.value).c, paramcode);
6562 //$$.c = abc_callmethod($$.c, t->method, len); //#1051 illegal early access binding
6563 (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).number);
6564 } else if((yyval.value).c->opcode == OPCODE_GETSUPER) {
6565 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6566 (yyval.value).c = code_cutlast((yyval.value).c);
6567 (yyval.value).c = code_append((yyval.value).c, paramcode);
6568 (yyval.value).c = abc_callsuper2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).number);
6569 multiname_destroy(name);
6571 (yyval.value).c = abc_getglobalscope((yyval.value).c);
6572 (yyval.value).c = code_append((yyval.value).c, paramcode);
6573 (yyval.value).c = abc_call((yyval.value).c, (yyvsp[(3) - (4)].value_list).number);
6576 if(TYPE_IS_FUNCTION((yyvsp[(1) - (4)].value).t) && (yyvsp[(1) - (4)].value).t->data) {
6577 (yyval.value).t = ((methodinfo_t*)((yyvsp[(1) - (4)].value).t->data))->return_type;
6579 (yyval.value).c = abc_coerce_a((yyval.value).c);
6580 (yyval.value).t = TYPE_ANY;
6591 /* Line 1464 of skeleton.m4 */
6592 #line 3068 "parser.y"
6594 if(!state->cls) syntaxerror("super() not allowed outside of a class");
6595 if(!state->method) syntaxerror("super() not allowed outside of a function");
6596 if(!state->method->is_constructor) syntaxerror("super() not allowed outside of a constructor");
6598 (yyval.value).c = code_new();
6599 (yyval.value).c = abc_getlocal_0((yyval.value).c);
6601 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value_list).cc);
6603 this is dependent on the control path, check this somewhere else
6604 if(state->method->has_super)
6605 syntaxerror("constructor may call super() only once");
6607 state->method->has_super = 1;
6609 (yyval.value).c = abc_constructsuper((yyval.value).c, (yyvsp[(3) - (4)].value_list).number);
6610 (yyval.value).c = abc_pushundefined((yyval.value).c);
6611 (yyval.value).t = TYPE_ANY;
6621 /* Line 1464 of skeleton.m4 */
6622 #line 3089 "parser.y"
6624 (yyval.value).c = (yyvsp[(2) - (2)].value).c;
6625 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
6626 (yyval.value).c = code_cutlast((yyval.value).c);
6628 multiname_t*name = 0;
6629 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6630 (yyval.value).c->opcode = OPCODE_DELETEPROPERTY;
6631 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
6632 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6633 multiname_t*name = traits_find_slotid(state->cls->abc->traits,slot)->name;
6634 (yyval.value).c = code_cutlast((yyval.value).c);
6635 (yyval.value).c = abc_deleteproperty2((yyval.value).c, name);
6637 (yyval.value).c = abc_getlocal_0((yyval.value).c);
6638 MULTINAME_LATE(m, (yyvsp[(2) - (2)].value).t?(yyvsp[(2) - (2)].value).t->access:ACCESS_PACKAGE, "");
6639 (yyval.value).c = abc_deleteproperty2((yyval.value).c, &m);
6641 (yyval.value).t = TYPE_BOOLEAN;
6651 /* Line 1464 of skeleton.m4 */
6652 #line 3110 "parser.y"
6654 (yyval.code) = abc_returnvoid(0);
6664 /* Line 1464 of skeleton.m4 */
6665 #line 3113 "parser.y"
6667 (yyval.code) = (yyvsp[(2) - (2)].value).c;
6668 (yyval.code) = abc_returnvalue((yyval.code));
6678 /* Line 1464 of skeleton.m4 */
6679 #line 3120 "parser.y"
6680 {(yyval.value)=(yyvsp[(1) - (1)].value);}
6689 /* Line 1464 of skeleton.m4 */
6690 #line 3121 "parser.y"
6691 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6700 /* Line 1464 of skeleton.m4 */
6701 #line 3122 "parser.y"
6703 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
6704 (yyval.value).c = cut_last_push((yyval.value).c);
6705 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
6706 (yyval.value).t = (yyvsp[(3) - (3)].value).t;
6716 /* Line 1464 of skeleton.m4 */
6717 #line 3128 "parser.y"
6719 (yyval.code)=cut_last_push((yyvsp[(1) - (1)].value).c);
6729 /* Line 1464 of skeleton.m4 */
6730 #line 3134 "parser.y"
6731 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6740 /* Line 1464 of skeleton.m4 */
6741 #line 3138 "parser.y"
6742 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6751 /* Line 1464 of skeleton.m4 */
6752 #line 3140 "parser.y"
6753 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6762 /* Line 1464 of skeleton.m4 */
6763 #line 3142 "parser.y"
6764 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6773 /* Line 1464 of skeleton.m4 */
6774 #line 3146 "parser.y"
6776 (yyval.value).c = 0;
6777 namespace_t ns = {ACCESS_PACKAGE, ""};
6778 multiname_t m = {QNAME, &ns, 0, "RegExp"};
6779 if(!(yyvsp[(1) - (1)].regexp).options) {
6780 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
6781 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).pattern);
6782 (yyval.value).c = abc_construct((yyval.value).c, 1);
6784 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
6785 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).pattern);
6786 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).options);
6787 (yyval.value).c = abc_construct((yyval.value).c, 2);
6789 (yyval.value).t = TYPE_REGEXP;
6799 /* Line 1464 of skeleton.m4 */
6800 #line 3163 "parser.y"
6801 {(yyval.value).c = abc_pushbyte(0, (yyvsp[(1) - (1)].number_uint));
6802 //MULTINAME(m, registry_getintclass());
6803 //$$.c = abc_coerce2($$.c, &m); // FIXME
6804 (yyval.value).t = TYPE_INT;
6814 /* Line 1464 of skeleton.m4 */
6815 #line 3168 "parser.y"
6816 {(yyval.value).c = abc_pushshort(0, (yyvsp[(1) - (1)].number_uint));
6817 (yyval.value).t = TYPE_INT;
6827 /* Line 1464 of skeleton.m4 */
6828 #line 3171 "parser.y"
6829 {(yyval.value).c = abc_pushint(0, (yyvsp[(1) - (1)].number_int));
6830 (yyval.value).t = TYPE_INT;
6840 /* Line 1464 of skeleton.m4 */
6841 #line 3174 "parser.y"
6842 {(yyval.value).c = abc_pushuint(0, (yyvsp[(1) - (1)].number_uint));
6843 (yyval.value).t = TYPE_UINT;
6853 /* Line 1464 of skeleton.m4 */
6854 #line 3177 "parser.y"
6855 {(yyval.value).c = abc_pushdouble(0, (yyvsp[(1) - (1)].number_float));
6856 (yyval.value).t = TYPE_FLOAT;
6866 /* Line 1464 of skeleton.m4 */
6867 #line 3180 "parser.y"
6868 {(yyval.value).c = abc_pushstring2(0, &(yyvsp[(1) - (1)].str));free((char*)(yyvsp[(1) - (1)].str).str);
6869 (yyval.value).t = TYPE_STRING;
6879 /* Line 1464 of skeleton.m4 */
6880 #line 3183 "parser.y"
6881 {(yyval.value).c = abc_pushundefined(0);
6882 (yyval.value).t = TYPE_ANY;
6892 /* Line 1464 of skeleton.m4 */
6893 #line 3186 "parser.y"
6894 {(yyval.value).c = abc_pushtrue(0);
6895 (yyval.value).t = TYPE_BOOLEAN;
6905 /* Line 1464 of skeleton.m4 */
6906 #line 3189 "parser.y"
6907 {(yyval.value).c = abc_pushfalse(0);
6908 (yyval.value).t = TYPE_BOOLEAN;
6918 /* Line 1464 of skeleton.m4 */
6919 #line 3192 "parser.y"
6920 {(yyval.value).c = abc_pushnull(0);
6921 (yyval.value).t = TYPE_NULL;
6931 /* Line 1464 of skeleton.m4 */
6932 #line 3196 "parser.y"
6933 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterequals((yyval.value).c);(yyval.value).c=abc_not((yyval.value).c);
6934 (yyval.value).t = TYPE_BOOLEAN;
6944 /* Line 1464 of skeleton.m4 */
6945 #line 3199 "parser.y"
6946 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterthan((yyval.value).c);
6947 (yyval.value).t = TYPE_BOOLEAN;
6957 /* Line 1464 of skeleton.m4 */
6958 #line 3202 "parser.y"
6959 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterthan((yyval.value).c);(yyval.value).c=abc_not((yyval.value).c);
6960 (yyval.value).t = TYPE_BOOLEAN;
6970 /* Line 1464 of skeleton.m4 */
6971 #line 3205 "parser.y"
6972 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterequals((yyval.value).c);
6973 (yyval.value).t = TYPE_BOOLEAN;
6983 /* Line 1464 of skeleton.m4 */
6984 #line 3208 "parser.y"
6985 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_equals((yyval.value).c);
6986 (yyval.value).t = TYPE_BOOLEAN;
6996 /* Line 1464 of skeleton.m4 */
6997 #line 3211 "parser.y"
6998 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_strictequals((yyval.value).c);
6999 (yyval.value).t = TYPE_BOOLEAN;
7009 /* Line 1464 of skeleton.m4 */
7010 #line 3214 "parser.y"
7011 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_strictequals((yyval.value).c);(yyval.value).c = abc_not((yyval.value).c);
7012 (yyval.value).t = TYPE_BOOLEAN;
7022 /* Line 1464 of skeleton.m4 */
7023 #line 3217 "parser.y"
7024 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_equals((yyval.value).c);(yyval.value).c = abc_not((yyval.value).c);
7025 (yyval.value).t = TYPE_BOOLEAN;
7035 /* Line 1464 of skeleton.m4 */
7036 #line 3221 "parser.y"
7037 {(yyval.value).t = join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'O');
7038 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
7039 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(1) - (3)].value).t, (yyval.value).t);
7040 (yyval.value).c = abc_dup((yyval.value).c);
7041 code_t*jmp = (yyval.value).c = abc_iftrue((yyval.value).c, 0);
7042 (yyval.value).c = cut_last_push((yyval.value).c);
7043 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
7044 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (3)].value).t, (yyval.value).t);
7045 code_t*label = (yyval.value).c = abc_label((yyval.value).c);
7046 jmp->branch = label;
7056 /* Line 1464 of skeleton.m4 */
7057 #line 3232 "parser.y"
7059 (yyval.value).t = join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'A');
7060 /*printf("%08x:\n",$1.t);
7061 code_dump($1.c, 0, 0, "", stdout);
7062 printf("%08x:\n",$3.t);
7063 code_dump($3.c, 0, 0, "", stdout);
7064 printf("joining %08x and %08x to %08x\n", $1.t, $3.t, $$.t);*/
7065 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
7066 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(1) - (3)].value).t, (yyval.value).t);
7067 (yyval.value).c = abc_dup((yyval.value).c);
7068 code_t*jmp = (yyval.value).c = abc_iffalse((yyval.value).c, 0);
7069 (yyval.value).c = cut_last_push((yyval.value).c);
7070 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
7071 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (3)].value).t, (yyval.value).t);
7072 code_t*label = (yyval.value).c = abc_label((yyval.value).c);
7073 jmp->branch = label;
7083 /* Line 1464 of skeleton.m4 */
7084 #line 3250 "parser.y"
7085 {(yyval.value).c=(yyvsp[(2) - (2)].value).c;
7086 (yyval.value).c = abc_not((yyval.value).c);
7087 (yyval.value).t = TYPE_BOOLEAN;
7097 /* Line 1464 of skeleton.m4 */
7098 #line 3255 "parser.y"
7099 {(yyval.value).c=(yyvsp[(2) - (2)].value).c;
7100 (yyval.value).c = abc_bitnot((yyval.value).c);
7101 (yyval.value).t = TYPE_INT;
7111 /* Line 1464 of skeleton.m4 */
7112 #line 3260 "parser.y"
7113 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7114 (yyval.value).c = abc_bitand((yyval.value).c);
7115 (yyval.value).t = TYPE_INT;
7125 /* Line 1464 of skeleton.m4 */
7126 #line 3265 "parser.y"
7127 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7128 (yyval.value).c = abc_bitxor((yyval.value).c);
7129 (yyval.value).t = TYPE_INT;
7139 /* Line 1464 of skeleton.m4 */
7140 #line 3270 "parser.y"
7141 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7142 (yyval.value).c = abc_bitor((yyval.value).c);
7143 (yyval.value).t = TYPE_INT;
7153 /* Line 1464 of skeleton.m4 */
7154 #line 3275 "parser.y"
7155 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7156 (yyval.value).c = abc_rshift((yyval.value).c);
7157 (yyval.value).t = TYPE_INT;
7167 /* Line 1464 of skeleton.m4 */
7168 #line 3279 "parser.y"
7169 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7170 (yyval.value).c = abc_urshift((yyval.value).c);
7171 (yyval.value).t = TYPE_INT;
7181 /* Line 1464 of skeleton.m4 */
7182 #line 3283 "parser.y"
7183 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7184 (yyval.value).c = abc_lshift((yyval.value).c);
7185 (yyval.value).t = TYPE_INT;
7195 /* Line 1464 of skeleton.m4 */
7196 #line 3288 "parser.y"
7197 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7198 (yyval.value).c = abc_divide((yyval.value).c);
7199 (yyval.value).t = TYPE_NUMBER;
7209 /* Line 1464 of skeleton.m4 */
7210 #line 3292 "parser.y"
7211 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7212 (yyval.value).c = abc_modulo((yyval.value).c);
7213 (yyval.value).t = TYPE_NUMBER;
7223 /* Line 1464 of skeleton.m4 */
7224 #line 3296 "parser.y"
7225 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7226 if(BOTH_INT((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t)) {
7227 (yyval.value).c = abc_add_i((yyval.value).c);
7228 (yyval.value).t = TYPE_INT;
7230 (yyval.value).c = abc_add((yyval.value).c);
7231 (yyval.value).t = join_types((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t,'+');
7242 /* Line 1464 of skeleton.m4 */
7243 #line 3305 "parser.y"
7244 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7245 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
7246 (yyval.value).c = abc_subtract_i((yyval.value).c);
7247 (yyval.value).t = TYPE_INT;
7249 (yyval.value).c = abc_subtract((yyval.value).c);
7250 (yyval.value).t = TYPE_NUMBER;
7261 /* Line 1464 of skeleton.m4 */
7262 #line 3314 "parser.y"
7263 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7264 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
7265 (yyval.value).c = abc_multiply_i((yyval.value).c);
7266 (yyval.value).t = TYPE_INT;
7268 (yyval.value).c = abc_multiply((yyval.value).c);
7269 (yyval.value).t = TYPE_NUMBER;
7280 /* Line 1464 of skeleton.m4 */
7281 #line 3324 "parser.y"
7282 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7283 (yyval.value).c = abc_in((yyval.value).c);
7284 (yyval.value).t = TYPE_BOOLEAN;
7294 /* Line 1464 of skeleton.m4 */
7295 #line 3329 "parser.y"
7296 {char use_astype=0; // flash player's astype works differently than astypelate
7297 if(use_astype && TYPE_IS_CLASS((yyvsp[(3) - (3)].value).t) && (yyvsp[(3) - (3)].value).t->data) {
7298 MULTINAME(m, (classinfo_t*)((yyvsp[(3) - (3)].value).t->data));
7299 (yyval.value).c = abc_astype2((yyvsp[(1) - (3)].value).c, &m);
7300 (yyval.value).t = (yyvsp[(3) - (3)].value).t->data;
7302 (yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
7303 (yyval.value).c = abc_astypelate((yyval.value).c);
7304 (yyval.value).t = TYPE_ANY;
7315 /* Line 1464 of skeleton.m4 */
7316 #line 3342 "parser.y"
7317 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
7318 (yyval.value).c = abc_instanceof((yyval.value).c);
7319 (yyval.value).t = TYPE_BOOLEAN;
7329 /* Line 1464 of skeleton.m4 */
7330 #line 3347 "parser.y"
7331 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
7332 (yyval.value).c = abc_istypelate((yyval.value).c);
7333 (yyval.value).t = TYPE_BOOLEAN;
7343 /* Line 1464 of skeleton.m4 */
7344 #line 3352 "parser.y"
7346 (yyval.value).c = (yyvsp[(3) - (4)].value).c;
7347 (yyval.value).c = abc_typeof((yyval.value).c);
7348 (yyval.value).t = TYPE_STRING;
7358 /* Line 1464 of skeleton.m4 */
7359 #line 3358 "parser.y"
7361 (yyval.value).c = cut_last_push((yyvsp[(2) - (2)].value).c);
7362 (yyval.value).c = abc_pushundefined((yyval.value).c);
7363 (yyval.value).t = TYPE_ANY;
7373 /* Line 1464 of skeleton.m4 */
7374 #line 3364 "parser.y"
7375 { (yyval.value).c = abc_pushundefined(0);
7376 (yyval.value).t = TYPE_ANY;
7386 /* Line 1464 of skeleton.m4 */
7387 #line 3368 "parser.y"
7388 {(yyval.value)=(yyvsp[(2) - (3)].value);}
7397 /* Line 1464 of skeleton.m4 */
7398 #line 3370 "parser.y"
7400 (yyval.value)=(yyvsp[(2) - (2)].value);
7401 if(IS_INT((yyvsp[(2) - (2)].value).t)) {
7402 (yyval.value).c=abc_negate_i((yyval.value).c);
7403 (yyval.value).t = TYPE_INT;
7405 (yyval.value).c=abc_negate((yyval.value).c);
7406 (yyval.value).t = TYPE_NUMBER;
7417 /* Line 1464 of skeleton.m4 */
7418 #line 3381 "parser.y"
7420 (yyval.value).c = (yyvsp[(1) - (4)].value).c;
7421 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value).c);
7423 MULTINAME_LATE(m, (yyvsp[(1) - (4)].value).t?(yyvsp[(1) - (4)].value).t->access:ACCESS_PACKAGE, "");
7424 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7425 (yyval.value).t = 0; // array elements have unknown type
7435 /* Line 1464 of skeleton.m4 */
7436 #line 3390 "parser.y"
7438 (yyval.value).c = code_new();
7439 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(2) - (3)].value_list).cc);
7440 (yyval.value).c = abc_newarray((yyval.value).c, (yyvsp[(2) - (3)].value_list).number);
7441 (yyval.value).t = registry_getarrayclass();
7451 /* Line 1464 of skeleton.m4 */
7452 #line 3397 "parser.y"
7453 {(yyval.value_list).cc=0;(yyval.value_list).number=0;}
7462 /* Line 1464 of skeleton.m4 */
7463 #line 3398 "parser.y"
7464 {(yyval.value_list)=(yyvsp[(1) - (1)].value_list);}
7473 /* Line 1464 of skeleton.m4 */
7474 #line 3400 "parser.y"
7476 (yyval.value_list).cc = 0;
7477 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(1) - (3)].value).c);
7478 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (3)].value).c);
7479 (yyval.value_list).number = 2;
7489 /* Line 1464 of skeleton.m4 */
7490 #line 3406 "parser.y"
7492 (yyval.value_list).cc = (yyvsp[(1) - (5)].value_list).cc;
7493 (yyval.value_list).number = (yyvsp[(1) - (5)].value_list).number+2;
7494 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (5)].value).c);
7495 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(5) - (5)].value).c);
7505 /* Line 1464 of skeleton.m4 */
7506 #line 3415 "parser.y"
7508 (yyval.value).c = code_new();
7509 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(2) - (3)].value_list).cc);
7510 (yyval.value).c = abc_newobject((yyval.value).c, (yyvsp[(2) - (3)].value_list).number/2);
7511 (yyval.value).t = registry_getobjectclass();
7521 /* Line 1464 of skeleton.m4 */
7522 #line 3422 "parser.y"
7524 code_t*c = (yyvsp[(3) - (3)].value).c;
7525 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
7526 c=abc_multiply_i(c);
7530 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '*'), (yyvsp[(1) - (3)].value).t);
7531 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7532 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7542 /* Line 1464 of skeleton.m4 */
7543 #line 3434 "parser.y"
7545 code_t*c = abc_modulo((yyvsp[(3) - (3)].value).c);
7546 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '%'), (yyvsp[(1) - (3)].value).t);
7547 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7548 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7558 /* Line 1464 of skeleton.m4 */
7559 #line 3440 "parser.y"
7561 code_t*c = abc_lshift((yyvsp[(3) - (3)].value).c);
7562 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '<'), (yyvsp[(1) - (3)].value).t);
7563 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7564 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7574 /* Line 1464 of skeleton.m4 */
7575 #line 3446 "parser.y"
7577 code_t*c = abc_rshift((yyvsp[(3) - (3)].value).c);
7578 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '>'), (yyvsp[(1) - (3)].value).t);
7579 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7580 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7590 /* Line 1464 of skeleton.m4 */
7591 #line 3452 "parser.y"
7593 code_t*c = abc_urshift((yyvsp[(3) - (3)].value).c);
7594 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'U'), (yyvsp[(1) - (3)].value).t);
7595 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7596 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7606 /* Line 1464 of skeleton.m4 */
7607 #line 3458 "parser.y"
7609 code_t*c = abc_divide((yyvsp[(3) - (3)].value).c);
7610 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '/'), (yyvsp[(1) - (3)].value).t);
7611 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7612 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7622 /* Line 1464 of skeleton.m4 */
7623 #line 3464 "parser.y"
7625 code_t*c = abc_bitor((yyvsp[(3) - (3)].value).c);
7626 c=converttype(c, TYPE_INT, (yyvsp[(1) - (3)].value).t);
7627 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7628 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7638 /* Line 1464 of skeleton.m4 */
7639 #line 3470 "parser.y"
7641 code_t*c = abc_bitxor((yyvsp[(3) - (3)].value).c);
7642 c=converttype(c, TYPE_INT, (yyvsp[(1) - (3)].value).t);
7643 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7644 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7654 /* Line 1464 of skeleton.m4 */
7655 #line 3476 "parser.y"
7657 code_t*c = (yyvsp[(3) - (3)].value).c;
7659 if(TYPE_IS_INT((yyvsp[(1) - (3)].value).t)) {
7663 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '+'), (yyvsp[(1) - (3)].value).t);
7666 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7667 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7677 /* Line 1464 of skeleton.m4 */
7678 #line 3489 "parser.y"
7679 { code_t*c = (yyvsp[(3) - (3)].value).c;
7680 if(TYPE_IS_INT((yyvsp[(1) - (3)].value).t)) {
7681 c=abc_subtract_i(c);
7684 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '-'), (yyvsp[(1) - (3)].value).t);
7687 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7688 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7698 /* Line 1464 of skeleton.m4 */
7699 #line 3500 "parser.y"
7701 c = code_append(c, (yyvsp[(3) - (3)].value).c);
7702 c = converttype(c, (yyvsp[(3) - (3)].value).t, (yyvsp[(1) - (3)].value).t);
7703 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 1, 0);
7704 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7714 /* Line 1464 of skeleton.m4 */
7715 #line 3507 "parser.y"
7717 (yyval.value).t = join_types((yyvsp[(3) - (5)].value).t,(yyvsp[(5) - (5)].value).t,'?');
7718 (yyval.value).c = (yyvsp[(1) - (5)].value).c;
7719 code_t*j1 = (yyval.value).c = abc_iffalse((yyval.value).c, 0);
7720 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (5)].value).c);
7721 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (5)].value).t, (yyval.value).t);
7722 code_t*j2 = (yyval.value).c = abc_jump((yyval.value).c, 0);
7723 (yyval.value).c = j1->branch = abc_label((yyval.value).c);
7724 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(5) - (5)].value).c);
7725 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(5) - (5)].value).t, (yyval.value).t);
7726 (yyval.value).c = j2->branch = abc_label((yyval.value).c);
7736 /* Line 1464 of skeleton.m4 */
7737 #line 3520 "parser.y"
7739 classinfo_t*type = (yyvsp[(1) - (2)].value).t;
7740 if(is_getlocal((yyvsp[(1) - (2)].value).c) && (TYPE_IS_INT((yyvsp[(1) - (2)].value).t) || TYPE_IS_NUMBER((yyvsp[(1) - (2)].value).t))) {
7741 int nr = getlocalnr((yyvsp[(1) - (2)].value).c);
7742 code_free((yyvsp[(1) - (2)].value).c);(yyvsp[(1) - (2)].value).c=0;
7743 if(TYPE_IS_INT((yyvsp[(1) - (2)].value).t)) {
7744 (yyval.value).c = abc_getlocal(0, nr);
7745 (yyval.value).c = abc_inclocal_i((yyval.value).c, nr);
7746 } else if(TYPE_IS_NUMBER((yyvsp[(1) - (2)].value).t)) {
7747 (yyval.value).c = abc_getlocal(0, nr);
7748 (yyval.value).c = abc_inclocal((yyval.value).c, nr);
7749 } else syntaxerror("internal error");
7751 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7752 c=abc_increment_i(c);
7758 c=converttype(c, type, (yyvsp[(1) - (2)].value).t);
7759 (yyval.value).c = toreadwrite((yyvsp[(1) - (2)].value).c, c, 0, 1);
7760 (yyval.value).t = (yyvsp[(1) - (2)].value).t;
7771 /* Line 1464 of skeleton.m4 */
7772 #line 3547 "parser.y"
7774 classinfo_t*type = (yyvsp[(1) - (2)].value).t;
7775 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7776 c=abc_decrement_i(c);
7782 c=converttype(c, type, (yyvsp[(1) - (2)].value).t);
7783 (yyval.value).c = toreadwrite((yyvsp[(1) - (2)].value).c, c, 0, 1);
7784 (yyval.value).t = (yyvsp[(1) - (2)].value).t;
7794 /* Line 1464 of skeleton.m4 */
7795 #line 3561 "parser.y"
7797 classinfo_t*type = (yyvsp[(2) - (2)].value).t;
7798 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7799 c=abc_increment_i(c);
7805 c=converttype(c, type, (yyvsp[(2) - (2)].value).t);
7806 (yyval.value).c = toreadwrite((yyvsp[(2) - (2)].value).c, c, 0, 0);
7807 (yyval.value).t = (yyvsp[(2) - (2)].value).t;
7817 /* Line 1464 of skeleton.m4 */
7818 #line 3575 "parser.y"
7820 classinfo_t*type = (yyvsp[(2) - (2)].value).t;
7821 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7822 c=abc_decrement_i(c);
7828 c=converttype(c, type, (yyvsp[(2) - (2)].value).t);
7829 (yyval.value).c = toreadwrite((yyvsp[(2) - (2)].value).c, c, 0, 0);
7830 (yyval.value).t = (yyvsp[(2) - (2)].value).t;
7840 /* Line 1464 of skeleton.m4 */
7841 #line 3590 "parser.y"
7842 { if(!state->cls->info)
7843 syntaxerror("super keyword not allowed outside a class");
7844 classinfo_t*t = state->cls->info->superclass;
7845 if(!t) t = TYPE_OBJECT;
7847 memberinfo_t*f = registry_findmember_nsset(t, state->active_namespaces, (yyvsp[(3) - (3)].id), 1);
7849 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
7850 (yyval.value).c = 0;
7851 (yyval.value).c = abc_getlocal_0((yyval.value).c);
7852 (yyval.value).c = abc_getsuper2((yyval.value).c, &m);
7853 (yyval.value).t = slotinfo_gettype((slotinfo_t*)f);
7863 /* Line 1464 of skeleton.m4 */
7864 #line 3604 "parser.y"
7867 (yyval.value).c = abc_pushundefined(0);
7868 (yyval.value).t = 0;
7869 as3_warning("ignored @ operator");
7879 /* Line 1464 of skeleton.m4 */
7880 #line 3611 "parser.y"
7882 // child attribute TODO
7883 (yyval.value).c = abc_pushundefined(0);
7884 (yyval.value).t = 0;
7885 as3_warning("ignored .@ operator");
7895 /* Line 1464 of skeleton.m4 */
7896 #line 3618 "parser.y"
7898 // namespace declaration TODO
7899 (yyval.value).c = abc_pushundefined(0);
7900 (yyval.value).t = 0;
7901 as3_warning("ignored :: operator");
7911 /* Line 1464 of skeleton.m4 */
7912 #line 3625 "parser.y"
7915 (yyval.value).c = abc_pushundefined(0);
7916 (yyval.value).t = 0;
7917 as3_warning("ignored .. operator");
7927 /* Line 1464 of skeleton.m4 */
7928 #line 3632 "parser.y"
7931 (yyval.value).c = abc_pushundefined(0);
7932 (yyval.value).t = 0;
7933 as3_warning("ignored .() operator");
7943 /* Line 1464 of skeleton.m4 */
7944 #line 3643 "parser.y"
7946 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
7947 classinfo_t*t = (yyvsp[(1) - (3)].value).t;
7949 if(TYPE_IS_CLASS(t) && t->data) {
7954 if(t->subtype==INFOTYPE_UNRESOLVED) {
7955 syntaxerror("syntaxerror: trying to resolve property '%s' on incomplete object '%s'", (yyvsp[(3) - (3)].id), t->name);
7957 memberinfo_t*f = registry_findmember_nsset(t, state->active_namespaces, (yyvsp[(3) - (3)].id), 1);
7959 if(f && !is_static != !(f->flags&FLAG_STATIC))
7961 if(f && f->slot && !noslot) {
7962 (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
7964 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
7965 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7967 /* determine type */
7968 (yyval.value).t = slotinfo_gettype((slotinfo_t*)f);
7969 if(!(yyval.value).t)
7970 (yyval.value).c = abc_coerce_a((yyval.value).c);
7971 } else if((yyvsp[(1) - (3)].value).c && (yyvsp[(1) - (3)].value).c->opcode == OPCODE___PUSHPACKAGE__) {
7972 string_t*package = (yyvsp[(1) - (3)].value).c->data[0];
7973 char*package2 = concat3(package->str, ".", (yyvsp[(3) - (3)].id));
7974 if(dict_contains(state->import_toplevel_packages, package2)) {
7975 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
7976 (yyval.value).c->data[0] = string_new4(package2);
7977 (yyval.value).t = 0;
7979 slotinfo_t*a = registry_find(package->str, (yyvsp[(3) - (3)].id));
7981 syntaxerror("couldn't resolve %s", package2);
7982 (yyval.value) = push_class(a);
7985 /* when resolving a property on an unknown type, we do know the
7986 name of the property (and don't seem to need the package), but
7987 we need to make avm2 try out all access modes */
7988 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(3) - (3)].id)};
7989 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7990 (yyval.value).c = abc_coerce_a((yyval.value).c);
7991 (yyval.value).t = registry_getanytype();
8002 /* Line 1464 of skeleton.m4 */
8003 #line 3693 "parser.y"
8006 /* Queue unresolved identifiers for checking against the parent
8007 function's variables.
8008 We consider everything which is not a local variable "unresolved".
8009 This encompasses class names, members of the surrounding class
8010 etc. which is *correct* because local variables of the parent function
8013 if(state->method->inner && !find_variable(state, (yyvsp[(1) - (1)].id))) {
8014 unknown_variable((yyvsp[(1) - (1)].id));
8017 /* let the compiler know that it might check the current directory/package
8018 for this identifier- maybe there's a file $1.as defining $1. */
8019 as3_schedule_class_noerror(state->package, (yyvsp[(1) - (1)].id));
8022 (yyval.value).t = 0;
8023 (yyval.value).c = 0;
8028 /* look at variables */
8029 if((v = find_variable(state, (yyvsp[(1) - (1)].id)))) {
8030 // $1 is a local variable
8031 (yyval.value).c = abc_getlocal((yyval.value).c, v->index);
8032 (yyval.value).t = v->type;
8035 if((v = find_slot(state, (yyvsp[(1) - (1)].id)))) {
8036 (yyval.value).c = abc_getscopeobject((yyval.value).c, 1);
8037 (yyval.value).c = abc_getslot((yyval.value).c, v->index);
8038 (yyval.value).t = v->type;
8042 int i_am_static = (state->method && state->method->info)?(state->method->info->flags&FLAG_STATIC):FLAG_STATIC;
8044 /* look at current class' members */
8045 if(state->cls && (f = registry_findmember_nsset(state->cls->info, state->active_namespaces, (yyvsp[(1) - (1)].id), 1)) &&
8046 (f->flags&FLAG_STATIC) >= i_am_static) {
8047 // $1 is a function in this class
8048 int var_is_static = (f->flags&FLAG_STATIC);
8050 if(f->kind == INFOTYPE_METHOD) {
8051 (yyval.value).t = TYPE_FUNCTION(f);
8053 (yyval.value).t = f->type;
8055 if(var_is_static && !i_am_static) {
8056 /* access to a static member from a non-static location.
8057 do this via findpropstrict:
8058 there doesn't seem to be any non-lookup way to access
8059 static properties of a class */
8060 state->method->late_binding = 1;
8061 (yyval.value).t = f->type;
8062 namespace_t ns = {f->access, ""};
8063 multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
8064 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
8065 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
8067 } else if(f->slot>0) {
8068 (yyval.value).c = abc_getlocal_0((yyval.value).c);
8069 (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
8072 namespace_t ns = {f->access, ""};
8073 multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
8074 (yyval.value).c = abc_getlocal_0((yyval.value).c);
8075 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
8080 /* look at actual classes, in the current package and imported */
8081 if((a = find_class((yyvsp[(1) - (1)].id)))) {
8082 (yyval.value) = push_class(a);
8086 /* look through package prefixes */
8087 if(dict_contains(state->import_toplevel_packages, (yyvsp[(1) - (1)].id))) {
8088 (yyval.value).c = abc___pushpackage__((yyval.value).c, (yyvsp[(1) - (1)].id));
8089 (yyval.value).t = 0;
8093 /* unknown object, let the avm2 resolve it */
8095 //as3_softwarning("Couldn't resolve '%s', doing late binding", $1);
8096 as3_warning("Couldn't resolve '%s', doing late binding", (yyvsp[(1) - (1)].id));
8097 state->method->late_binding = 1;
8099 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(1) - (1)].id)};
8101 (yyval.value).t = 0;
8102 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
8103 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
8114 /* Line 1464 of skeleton.m4 */
8115 #line 3798 "parser.y"
8118 NEW(namespace_decl_t,n);
8119 n->name = (yyvsp[(2) - (2)].id);
8121 (yyval.namespace_decl)=n;
8131 /* Line 1464 of skeleton.m4 */
8132 #line 3805 "parser.y"
8135 NEW(namespace_decl_t,n);
8136 n->name = (yyvsp[(2) - (4)].id);
8137 n->url = (yyvsp[(4) - (4)].id);
8138 (yyval.namespace_decl)=n;
8148 /* Line 1464 of skeleton.m4 */
8149 #line 3812 "parser.y"
8152 NEW(namespace_decl_t,n);
8153 n->name = (yyvsp[(2) - (4)].id);
8154 n->url = (yyvsp[(4) - (4)].str).str;
8155 (yyval.namespace_decl)=n;
8165 /* Line 1464 of skeleton.m4 */
8166 #line 3819 "parser.y"
8169 list_append(state->new_namespaces, (yyvsp[(2) - (2)].namespace_decl));
8170 tokenizer_register_namespace((yyvsp[(2) - (2)].namespace_decl)->name);
8181 /* Line 1464 of skeleton.m4 */
8182 #line 3826 "parser.y"
8185 NEW(namespace_decl_t,n);
8186 n->name = (yyvsp[(3) - (3)].classinfo)->name;
8188 /* FIXME: for pass2, we should now try to figure out what the URL of
8190 list_append(state->new_namespaces, n);
8191 tokenizer_register_namespace((yyvsp[(3) - (3)].classinfo)->name);
8200 /* Line 1464 of skeleton.m4 */
8201 #line 8202 "parser.tab.c"
8204 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
8208 YY_STACK_PRINT (yyss, yyssp);
8212 /* Now `shift' the result of the reduction. Determine what state
8213 that goes to, based on the state we popped back to and the rule
8214 number reduced by. */
8218 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
8219 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
8220 yystate = yytable[yystate];
8222 yystate = yydefgoto[yyn - YYNTOKENS];
8227 /*------------------------------------.
8228 | yyerrlab -- here on detecting error |
8229 `------------------------------------*/
8231 /* If not already recovering from an error, report this error. */
8235 #if ! YYERROR_VERBOSE
8236 yyerror (YY_("syntax error"));
8239 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
8240 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
8242 YYSIZE_T yyalloc = 2 * yysize;
8243 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
8244 yyalloc = YYSTACK_ALLOC_MAXIMUM;
8245 if (yymsg != yymsgbuf)
8246 YYSTACK_FREE (yymsg);
8247 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
8249 yymsg_alloc = yyalloc;
8253 yymsg_alloc = sizeof yymsgbuf;
8257 if (0 < yysize && yysize <= yymsg_alloc)
8259 (void) yysyntax_error (yymsg, yystate, yychar);
8264 yyerror (YY_("syntax error"));
8266 goto yyexhaustedlab;
8274 if (yyerrstatus == 3)
8276 /* If just tried and failed to reuse lookahead token after an
8277 error, discard it. */
8279 if (yychar <= YYEOF)
8281 /* Return failure if at end of input. */
8282 if (yychar == YYEOF)
8287 yydestruct ("Error: discarding",
8293 /* Else will try to reuse lookahead token after shifting the error
8298 /*---------------------------------------------------.
8299 | yyerrorlab -- error raised explicitly by YYERROR. |
8300 `---------------------------------------------------*/
8303 /* Pacify compilers like GCC when the user code never invokes
8304 YYERROR and the label yyerrorlab therefore never appears in user
8306 if (/*CONSTCOND*/ 0)
8309 /* Do not reclaim the symbols of the rule which action triggered
8313 YY_STACK_PRINT (yyss, yyssp);
8318 /*-------------------------------------------------------------.
8319 | yyerrlab1 -- common code for both syntax error and YYERROR. |
8320 `-------------------------------------------------------------*/
8322 yyerrstatus = 3; /* Each real token shifted decrements this. */
8326 yyn = yypact[yystate];
8327 if (yyn != YYPACT_NINF)
8330 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
8338 /* Pop the current state because it cannot handle the error token. */
8343 yydestruct ("Error: popping",
8344 yystos[yystate], yyvsp);
8347 YY_STACK_PRINT (yyss, yyssp);
8353 /* Shift the error token. */
8354 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
8360 /*-------------------------------------.
8361 | yyacceptlab -- YYACCEPT comes here. |
8362 `-------------------------------------*/
8367 /*-----------------------------------.
8368 | yyabortlab -- YYABORT comes here. |
8369 `-----------------------------------*/
8374 #if !defined(yyoverflow) || YYERROR_VERBOSE
8375 /*-------------------------------------------------.
8376 | yyexhaustedlab -- memory exhaustion comes here. |
8377 `-------------------------------------------------*/
8379 yyerror (YY_("memory exhausted"));
8385 if (yychar != YYEMPTY)
8386 yydestruct ("Cleanup: discarding lookahead",
8388 /* Do not reclaim the symbols of the rule which action triggered
8389 this YYABORT or YYACCEPT. */
8391 YY_STACK_PRINT (yyss, yyssp);
8392 while (yyssp != yyss)
8394 yydestruct ("Cleanup: popping",
8395 yystos[*yyssp], yyvsp);
8400 YYSTACK_FREE (yyss);
8403 if (yymsg != yymsgbuf)
8404 YYSTACK_FREE (yymsg);
8406 /* Make sure YYID is used. */
8407 return YYID (yyresult);