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;
382 char has_own_imports;
383 char new_vars; // e.g. transition between two functions
386 methodstate_t*method;
395 typedef struct _global {
399 dict_t*file2token2info;
402 static global_t*global = 0;
403 static state_t* state = 0;
407 #define MULTINAME(m,x) \
411 registry_fill_multiname(&m, &m##_ns, (slotinfo_t*)(x));
413 #define MEMBER_MULTINAME(m,f,n) \
417 if((m##_ns.access = ((slotinfo_t*)(f))->access)==ACCESS_NAMESPACE) \
418 m##_ns.name = ((slotinfo_t*)(f))->package; \
423 m.namespace_set = 0; \
424 m.name = ((slotinfo_t*)(f))->name; \
426 m.type = MULTINAME; \
428 m.namespace_set = &nopackage_namespace_set; \
432 /* warning: list length of namespace set is undefined */
433 #define MULTINAME_LATE(m, access, package) \
434 namespace_t m##_ns = {access, package}; \
435 namespace_set_t m##_nsset; \
436 namespace_list_t m##_l;m##_l.next = 0; \
437 m##_nsset.namespaces = &m##_l; \
438 m##_nsset = m##_nsset; \
439 m##_l.namespace = &m##_ns; \
440 multiname_t m = {MULTINAMEL, 0, &m##_nsset, 0};
442 static namespace_t ns1 = {ACCESS_PRIVATE, ""};
443 static namespace_t ns2 = {ACCESS_PROTECTED, ""};
444 static namespace_t ns3 = {ACCESS_PACKAGEINTERNAL, ""};
445 static namespace_t ns4 = {ACCESS_PACKAGE, ""};
446 static namespace_list_t nl4 = {&ns4,0};
447 static namespace_list_t nl3 = {&ns3,&nl4};
448 static namespace_list_t nl2 = {&ns2,&nl3};
449 static namespace_list_t nl1 = {&ns1,&nl2};
450 static namespace_set_t nopackage_namespace_set = {&nl1};
452 static void new_state()
455 state_t*oldstate = state;
457 memcpy(s, state, sizeof(state_t)); //shallow copy
459 s->imports = dict_new();
461 if(!s->import_toplevel_packages) {
462 s->import_toplevel_packages = dict_new();
466 state->has_own_imports = 0;
467 state->vars = dict_new();
468 state->old = oldstate;
471 trie_remember(active_namespaces);
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 trie_rollback(active_namespaces);
520 if(!state || !state->old)
521 syntaxerror("invalid nesting");
522 state_t*leaving = state;
526 if(as3_pass>1 && leaving->method && leaving->method != state->method && !leaving->method->inner) {
527 free(leaving->method);
530 if(as3_pass>1 && leaving->cls && leaving->cls != state->cls) {
535 state_destroy(leaving);
538 static code_t* method_header(methodstate_t*m);
539 static code_t* wrap_function(code_t*c,code_t*header, code_t*body);
540 static void function_initvars(methodstate_t*m, params_t*params, int flags, char var0);
543 static char* internal_filename_package = 0;
544 void initialize_file(char*filename)
547 syntaxerror("invalid call to initialize_file during parsing of another file");
550 active_namespaces = trie_new();
553 state->package = internal_filename_package = strdup(filename);
555 global->token2info = dict_lookup(global->file2token2info,
556 current_filename // use long version
558 if(!global->token2info) {
559 global->token2info = dict_new2(&ptr_type);
560 dict_put(global->file2token2info, current_filename, global->token2info);
564 state->method = rfx_calloc(sizeof(methodstate_t));
565 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
566 state->method->late_binding = 1; // init scripts use getglobalscope, so we need a getlocal0/pushscope
568 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
569 function_initvars(state->method, 0, 0, 1);
570 global->init = abc_initscript(global->file);
576 if(!state || state->level!=1) {
577 syntaxerror("unexpected end of file in pass %d", as3_pass);
581 code_t*header = method_header(state->method);
582 code_t*c = wrap_function(header, 0, global->init->method->body->code);
583 global->init->method->body->code = c;
584 free(state->method);state->method=0;
587 //free(state->package);state->package=0; // used in registry
588 state_destroy(state);state=0;
591 void initialize_parser()
593 global = rfx_calloc(sizeof(global_t));
594 global->file = abc_file_new();
595 global->file->flags &= ~ABCFILE_LAZY;
596 global->file2token2info = dict_new();
597 global->token2info = 0;
600 void* finish_parser()
602 dict_free_all(global->file2token2info, 1, (void*)dict_destroy);
604 global->token2info=0;
610 static void xx_scopetest()
612 /* findpropstrict doesn't just return a scope object- it
613 also makes it "active" somehow. Push local_0 on the
614 scope stack and read it back with findpropstrict, it'll
615 contain properties like "trace". Trying to find the same
616 property on a "vanilla" local_0 yields only a "undefined" */
617 //c = abc_findpropstrict(c, "[package]::trace");
619 /*c = abc_getlocal_0(c);
620 c = abc_findpropstrict(c, "[package]::trace");
622 c = abc_setlocal_1(c);
624 c = abc_pushbyte(c, 0);
625 c = abc_setlocal_2(c);
627 code_t*xx = c = abc_label(c);
628 c = abc_findpropstrict(c, "[package]::trace");
629 c = abc_pushstring(c, "prop:");
630 c = abc_hasnext2(c, 1, 2);
632 c = abc_setlocal_3(c);
633 c = abc_callpropvoid(c, "[package]::trace", 2);
634 c = abc_getlocal_3(c);
636 c = abc_iftrue(c,xx);*/
639 typedef struct _variable {
643 methodstate_t*is_inner_method;
646 static variable_t* find_variable(state_t*s, char*name)
650 v = dict_lookup(s->vars, name);
652 if(s->new_vars) break;
657 static variable_t* find_slot(state_t*s, const char*name)
659 if(s->method && s->method->slots)
660 return dict_lookup(s->method->slots, name);
664 static variable_t* find_variable_safe(state_t*s, char*name)
666 variable_t* v = find_variable(s, name);
668 syntaxerror("undefined variable: %s", name);
671 static char variable_exists(char*name)
673 return dict_contains(state->vars, name);
675 code_t*defaultvalue(code_t*c, classinfo_t*type);
677 static int alloc_local()
679 return state->method->variable_count++;
682 static variable_t* new_variable2(const char*name, classinfo_t*type, char init, char maybeslot)
685 variable_t*v = find_slot(state, name);
691 v->index = alloc_local();
696 dict_put(state->vars, name, v);
700 static int new_variable(const char*name, classinfo_t*type, char init, char maybeslot)
702 return new_variable2(name, type, init, maybeslot)->index;
705 #define TEMPVARNAME "__as3_temp__"
706 static int gettempvar()
708 variable_t*v = find_variable(state, TEMPVARNAME);
711 return new_variable(TEMPVARNAME, 0, 0, 0);
714 code_t* var_block(code_t*body)
720 for(t=0;t<state->vars->hashsize;t++) {
721 dictentry_t*e = state->vars->slots[t];
723 variable_t*v = (variable_t*)e->data;
724 if(v->type && v->init) {
725 c = defaultvalue(c, v->type);
726 c = abc_setlocal(c, v->index);
727 k = abc_kill(k, v->index);
737 if(x->opcode== OPCODE___BREAK__ ||
738 x->opcode== OPCODE___CONTINUE__) {
739 /* link kill code before break/continue */
740 code_t*e = code_dup(k);
741 code_t*s = code_start(e);
753 c = code_append(c, body);
754 c = code_append(c, k);
758 void unknown_variable(char*name)
760 if(!state->method->unresolved_variables)
761 state->method->unresolved_variables = dict_new();
762 if(!dict_contains(state->method->unresolved_variables, name))
763 dict_put(state->method->unresolved_variables, name, 0);
766 #define parserassert(b) {if(!(b)) parsererror(__FILE__, __LINE__,__func__);}
768 static void parsererror(const char*file, int line, const char*f)
770 syntaxerror("internal error in %s, %s:%d", f, file, line);
774 static code_t* add_scope_code(code_t*c, methodstate_t*m)
776 if(m->uses_slots || (m->late_binding && !m->inner)) {
777 c = abc_getlocal_0(c);
778 c = abc_pushscope(c);
781 /* FIXME: does this need to be the same activation object as
782 in the function header? */
783 c = abc_newactivation(c);
784 c = abc_pushscope(c);
789 static code_t* method_header(methodstate_t*m)
793 c = add_scope_code(c, m);
795 methodstate_list_t*l = m->innerfunctions;
797 parserassert(l->methodstate->abc);
798 if(m->uses_slots && l->methodstate->is_a_slot) {
799 c = abc_getscopeobject(c, 1);
800 c = abc_newfunction(c, l->methodstate->abc);
802 c = abc_setlocal(c, l->methodstate->var_index);
803 c = abc_setslot(c, l->methodstate->slot_index);
805 c = abc_newfunction(c, l->methodstate->abc);
806 c = abc_setlocal(c, l->methodstate->var_index);
808 free(l->methodstate);l->methodstate=0;
812 c = code_append(c, m->header);
815 if(m->is_constructor && !m->has_super) {
816 // call default constructor
817 c = abc_getlocal_0(c);
818 c = abc_constructsuper(c, 0);
820 list_free(m->innerfunctions);
821 m->innerfunctions = 0;
826 static code_t* wrap_function(code_t*c,code_t*header, code_t*body)
828 c = code_append(c, header);
829 c = code_append(c, var_block(body));
830 /* append return if necessary */
831 if(!c || (c->opcode != OPCODE_RETURNVOID &&
832 c->opcode != OPCODE_RETURNVALUE)) {
833 c = abc_returnvoid(c);
839 static void startpackage(char*name)
842 /*printf("entering package \"%s\"\n", name);*/
843 state->package = strdup(name);
845 static void endpackage()
847 /*printf("leaving package \"%s\"\n", state->package);*/
849 //used e.g. in classinfo_register:
850 //free(state->package);state->package=0;
855 #define FLAG_PUBLIC 256
856 #define FLAG_PROTECTED 512
857 #define FLAG_PRIVATE 1024
858 #define FLAG_PACKAGEINTERNAL 2048
859 #define FLAG_NAMESPACE 4096
861 static namespace_t modifiers2access(modifiers_t*mod)
866 if(mod->flags&FLAG_NAMESPACE) {
867 if(mod->flags&(FLAG_PRIVATE|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
868 syntaxerror("invalid combination of access levels and namespaces");
869 ns.access = ACCESS_NAMESPACE;
871 const char*url = (const char*)trie_lookup(active_namespaces, mod->ns);
873 /* shouldn't happen- the tokenizer only reports something as a namespace
874 if it was already registered */
875 syntaxerror("unknown namespace: %s", mod->ns);
878 } else if(mod->flags&FLAG_PUBLIC) {
879 if(mod->flags&(FLAG_PRIVATE|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
880 syntaxerror("invalid combination of access levels");
881 ns.access = ACCESS_PACKAGE;
882 } else if(mod->flags&FLAG_PRIVATE) {
883 if(mod->flags&(FLAG_PUBLIC|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
884 syntaxerror("invalid combination of access levels");
885 ns.access = ACCESS_PRIVATE;
886 } else if(mod->flags&FLAG_PROTECTED) {
887 if(mod->flags&(FLAG_PUBLIC|FLAG_PRIVATE|FLAG_PACKAGEINTERNAL))
888 syntaxerror("invalid combination of access levels");
889 ns.access = ACCESS_PROTECTED;
891 ns.access = ACCESS_PACKAGEINTERNAL;
895 static slotinfo_t* find_class(const char*name);
897 memberinfo_t* findmember_nsset(classinfo_t*cls, const char*name, char recurse)
899 /* FIXME- we need to loop through namespaces here */
900 return registry_findmember(cls, "", name, recurse);
903 static void function_initvars(methodstate_t*m, params_t*params, int flags, char var0)
908 index = new_variable("this", 0, 0, 0);
909 else if(!m->is_global)
910 index = new_variable((flags&FLAG_STATIC)?"class":"this", state->cls?state->cls->info:0, 0, 0);
912 index = new_variable("globalscope", 0, 0, 0);
915 parserassert(!index);
919 /* as variables and slots share the same number, make sure
920 that those variable indices are reserved. It's up to the
921 optimizer to later shuffle the variables down to lower
923 m->variable_count = m->uses_slots;
928 for(p=params->list;p;p=p->next) {
929 new_variable(p->param->name, p->param->type, 0, 1);
934 m->scope_code = add_scope_code(m->scope_code, m);
938 methodstate_list_t*l = m->innerfunctions;
940 methodstate_t*m = l->methodstate;
942 variable_t* v = new_variable2(m->info->name, TYPE_FUNCTION(m->info), 0, 1);
943 m->var_index = v->index;
944 m->slot_index = v->index;
945 v->is_inner_method = m;
950 if(as3_pass==2 && m->slots) {
951 /* exchange unresolved identifiers with the actual objects */
952 DICT_ITERATE_ITEMS(m->slots, char*, name, variable_t*, v) {
953 if(v->type && v->type->kind == INFOTYPE_UNRESOLVED) {
954 v->type = (classinfo_t*)registry_resolve((slotinfo_t*)v->type);
955 if(!v->type || v->type->kind != INFOTYPE_CLASS) {
956 syntaxerror("Couldn't find class %s", v->type->name);
964 char*as3_globalclass=0;
965 static void startclass(modifiers_t* mod, char*classname, classinfo_t*extends, classinfo_list_t*implements)
968 syntaxerror("inner classes now allowed");
973 classinfo_list_t*mlist=0;
975 if(mod->flags&~(FLAG_PACKAGEINTERNAL|FLAG_PUBLIC|FLAG_FINAL|FLAG_DYNAMIC|FLAG_INTERFACE))
976 syntaxerror("invalid modifier(s)");
978 if((mod->flags&(FLAG_PUBLIC|FLAG_PACKAGEINTERNAL)) == (FLAG_PUBLIC|FLAG_PACKAGEINTERNAL))
979 syntaxerror("public and internal not supported at the same time.");
981 //if(!(mod->flags&FLAG_INTERFACE) && !extends) {
982 if(!(mod->flags&FLAG_INTERFACE) && !extends) {
983 // all classes extend object
984 extends = registry_getobjectclass();
987 /* create the class name, together with the proper attributes */
991 if(!(mod->flags&FLAG_PUBLIC) && state->package==internal_filename_package) {
992 access = ACCESS_PRIVATE; package = internal_filename_package;
993 } else if(!(mod->flags&FLAG_PUBLIC) && state->package!=internal_filename_package) {
994 access = ACCESS_PACKAGEINTERNAL; package = state->package;
995 } else if(state->package!=internal_filename_package) {
996 access = ACCESS_PACKAGE; package = state->package;
998 syntaxerror("public classes only allowed inside a package");
1002 state->cls = rfx_calloc(sizeof(classstate_t));
1003 state->cls->init = rfx_calloc(sizeof(methodstate_t));
1004 state->cls->static_init = rfx_calloc(sizeof(methodstate_t));
1005 /* notice: we make no effort to initialize the top variable (local0) here,
1006 even though it has special meaning. We just rely on the facat
1007 that pass 1 won't do anything with variables */
1009 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->cls);
1011 /* set current method to constructor- all code within the class-level (except
1012 static variable initializations) will be executed during construction time */
1013 state->method = state->cls->init;
1015 if(registry_find(package, classname)) {
1016 syntaxerror("Package \"%s\" already contains a class called \"%s\"", package, classname);
1018 /* build info struct */
1019 int num_interfaces = (list_length(implements));
1020 state->cls->info = classinfo_register(access, package, classname, num_interfaces);
1021 state->cls->info->flags |= mod->flags & (FLAG_DYNAMIC|FLAG_INTERFACE|FLAG_FINAL);
1024 classinfo_list_t*l = implements;
1025 for(l=implements;l;l=l->next) {
1026 state->cls->info->interfaces[pos++] = l->classinfo;
1031 state->cls = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1033 state->method = state->cls->init;
1034 parserassert(state->cls && state->cls->info);
1036 function_initvars(state->cls->init, 0, 0, 1);
1037 function_initvars(state->cls->static_init, 0, 0, 0);
1039 if(extends && (extends->flags & FLAG_FINAL))
1040 syntaxerror("Can't extend final class '%s'", extends->name);
1043 while(state->cls->info->interfaces[pos]) {
1044 if(!(state->cls->info->interfaces[pos]->flags & FLAG_INTERFACE))
1045 syntaxerror("'%s' is not an interface",
1046 state->cls->info->interfaces[pos]->name);
1050 /* fill out interfaces and extends (we couldn't resolve those during the first pass) */
1051 state->cls->info->superclass = extends;
1053 /* generate the abc code for this class */
1054 MULTINAME(classname2,state->cls->info);
1055 multiname_t*extends2 = sig2mname(extends);
1057 state->cls->abc = abc_class_new(global->file, &classname2, extends2);
1058 if(state->cls->info->flags&FLAG_FINAL) abc_class_final(state->cls->abc);
1059 if(!(state->cls->info->flags&FLAG_DYNAMIC)) abc_class_sealed(state->cls->abc);
1060 if(state->cls->info->flags&FLAG_INTERFACE) {
1061 abc_class_interface(state->cls->abc);
1064 abc_class_protectedNS(state->cls->abc, classname);
1066 for(mlist=implements;mlist;mlist=mlist->next) {
1067 MULTINAME(m, mlist->classinfo);
1068 abc_class_add_interface(state->cls->abc, &m);
1071 /* write the construction code for this class to the global init
1073 int slotindex = abc_initscript_addClassTrait(global->init, &classname2, state->cls->abc);
1075 abc_method_body_t*m = global->init->method->body;
1076 __ getglobalscope(m);
1077 classinfo_t*s = extends;
1082 //TODO: take a look at the current scope stack, maybe
1083 // we can re-use something
1088 multiname_t*s2 = sig2mname(s);
1090 multiname_destroy(s2);
1092 __ pushscope(m); count++;
1093 m->code = m->code->prev->prev; // invert
1095 /* continue appending after last op end */
1096 while(m->code && m->code->next) m->code = m->code->next;
1098 /* TODO: if this is one of *our* classes, we can also
1099 do a getglobalscope/getslot <nr> (which references
1100 the init function's slots) */
1102 __ getlex2(m, extends2);
1104 /* notice: we get a Verify Error #1107 if the top elemnt on the scope
1105 stack is not the superclass */
1106 __ pushscope(m);count++;
1109 /* notice: we get a verify error #1107 if the top element on the scope
1110 stack is not the global object */
1112 __ pushscope(m);count++;
1114 __ newclass(m,state->cls->abc);
1118 __ setslot(m, slotindex);
1119 multiname_destroy(extends2);
1121 /* flash.display.MovieClip handling */
1123 if(!as3_globalclass && (mod->flags&FLAG_PUBLIC) && slotinfo_equals((slotinfo_t*)registry_getMovieClip(),(slotinfo_t*)extends)) {
1124 if(state->package && state->package[0]) {
1125 as3_globalclass = concat3(state->package, ".", classname);
1127 as3_globalclass = strdup(classname);
1133 static int slotstate_varconst = 0;
1134 static modifiers_t*slotstate_flags = 0;
1135 static void setslotstate(modifiers_t* flags, int varconst)
1137 slotstate_varconst = varconst;
1138 slotstate_flags = flags;
1140 if(flags && flags->flags&FLAG_STATIC) {
1141 state->method = state->cls->static_init;
1143 state->method = state->cls->init;
1146 parserassert(state->method);
1150 static void endclass()
1153 if(!state->cls->has_constructor && !(state->cls->info->flags&FLAG_INTERFACE)) {
1155 c = abc_getlocal_0(c);
1156 c = abc_constructsuper(c, 0);
1157 state->cls->init->header = code_append(state->cls->init->header, c);
1158 state->cls->has_constructor=1;
1160 if(state->cls->init) {
1161 if(state->cls->info->flags&FLAG_INTERFACE) {
1162 if(state->cls->init->header)
1163 syntaxerror("interface can not have class-level code");
1165 abc_method_t*m = abc_class_getconstructor(state->cls->abc, 0);
1166 code_t*c = method_header(state->cls->init);
1167 m->body->code = wrap_function(c, 0, m->body->code);
1170 if(state->cls->static_init) {
1171 abc_method_t*m = abc_class_getstaticconstructor(state->cls->abc, 0);
1172 code_t*c = method_header(state->cls->static_init);
1173 m->body->code = wrap_function(c, 0, m->body->code);
1180 void check_code_for_break(code_t*c)
1183 if(c->opcode == OPCODE___BREAK__) {
1184 char*name = string_cstr(c->data[0]);
1185 syntaxerror("Unresolved \"break %s\"", name);
1187 if(c->opcode == OPCODE___CONTINUE__) {
1188 char*name = string_cstr(c->data[0]);
1189 syntaxerror("Unresolved \"continue %s\"", name);
1191 if(c->opcode == OPCODE___PUSHPACKAGE__) {
1192 char*name = string_cstr(c->data[0]);
1193 syntaxerror("Can't reference a package (%s) as such", name);
1200 static void check_constant_against_type(classinfo_t*t, constant_t*c)
1203 #define xassert(b) if(!(b)) syntaxerror("Invalid default value %s for type '%s'", constant_tostring(c), t->name)
1204 if(TYPE_IS_NUMBER(t)) {
1205 xassert(c->type == CONSTANT_FLOAT
1206 || c->type == CONSTANT_INT
1207 || c->type == CONSTANT_UINT);
1208 } else if(TYPE_IS_UINT(t)) {
1209 xassert(c->type == CONSTANT_UINT ||
1210 (c->type == CONSTANT_INT && c->i>=0));
1211 } else if(TYPE_IS_INT(t)) {
1212 xassert(c->type == CONSTANT_INT);
1213 } else if(TYPE_IS_BOOLEAN(t)) {
1214 xassert(c->type == CONSTANT_TRUE
1215 || c->type == CONSTANT_FALSE);
1219 static void check_override(memberinfo_t*m, int flags)
1223 if(m->parent == state->cls->info)
1224 syntaxerror("class '%s' already contains a method/slot '%s'", m->parent->name, m->name);
1226 syntaxerror("internal error: overriding method %s, which doesn't have parent", m->name);
1227 if(m->access==ACCESS_PRIVATE)
1229 if(m->flags & FLAG_FINAL)
1230 syntaxerror("can't override final member %s", m->name);
1232 /* allow this. it's no issue.
1233 if((m->flags & FLAG_STATIC) && !(flags&FLAG_STATIC))
1234 syntaxerror("can't override static member %s", m->name);*/
1236 if(!(m->flags & FLAG_STATIC) && (flags&FLAG_STATIC))
1237 syntaxerror("can't override non-static member %s with static declaration", m->name);
1239 if(!(flags&FLAG_OVERRIDE) && !(flags&FLAG_STATIC) && !(m->flags&FLAG_STATIC)) {
1240 if(m->parent && !(m->parent->flags&FLAG_INTERFACE)) {
1241 if(m->kind == INFOTYPE_METHOD)
1242 syntaxerror("can't override without explicit 'override' declaration");
1244 syntaxerror("can't override '%s'", m->name);
1249 static methodinfo_t*registerfunction(enum yytokentype getset, modifiers_t*mod, char*name, params_t*params, classinfo_t*return_type, int slot)
1251 methodinfo_t*minfo = 0;
1252 namespace_t ns = modifiers2access(mod);
1255 minfo = methodinfo_register_global(ns.access, state->package, name);
1256 minfo->return_type = 0; // save this for pass 2
1257 } else if(getset != KW_GET && getset != KW_SET) {
1259 memberinfo_t* m = registry_findmember(state->cls->info, ns.name, name, 0);
1261 printf("%s.%s | %s.%s\n",
1262 m->package, m->name,
1264 syntaxerror("class already contains a %s '%s'", infotypename((slotinfo_t*)m), m->name);
1266 minfo = methodinfo_register_onclass(state->cls->info, ns.access, ns.name, name);
1267 minfo->return_type = 0; // save this for pass 2
1268 // getslot on a member slot only returns "undefined", so no need
1269 // to actually store these
1270 //state->minfo->slot = state->method->abc->method->trait->slot_id;
1272 //class getter/setter
1273 int gs = getset==KW_GET?SUBTYPE_GET:SUBTYPE_SET;
1275 if(getset == KW_GET) {
1277 } else if(params->list && params->list->param && !params->list->next) {
1278 type = params->list->param->type;
1280 syntaxerror("setter function needs to take exactly one argument");
1281 // not sure wether to look into superclasses here, too
1282 minfo = (methodinfo_t*)registry_findmember(state->cls->info, ns.name, name, 1);
1284 if(minfo->kind!=INFOTYPE_SLOT)
1285 syntaxerror("class already contains a method called '%s'", name);
1286 if(!(minfo->subtype & (SUBTYPE_GETSET)))
1287 syntaxerror("class already contains a field called '%s'", name);
1288 if(minfo->subtype & gs)
1289 syntaxerror("getter/setter for '%s' already defined", name);
1290 /* make a setter or getter into a getset */
1291 minfo->subtype |= gs;
1294 FIXME: this check needs to be done in pass 2
1296 if((!minfo->return_type != !type) ||
1297 (minfo->return_type && type &&
1298 !strcmp(minfo->return_type->name, type->name))) {
1299 syntaxerror("different type in getter and setter: %s and %s",
1300 minfo->return_type?minfo->return_type->name:"*",
1301 type?type->name:"*");
1304 minfo = methodinfo_register_onclass(state->cls->info, ns.access, ns.name, name);
1305 minfo->kind = INFOTYPE_SLOT; //hack
1306 minfo->subtype = gs;
1307 minfo->return_type = 0;
1309 /* can't assign a slot as getter and setter might have different slots */
1310 //minfo->slot = slot;
1312 if(mod->flags&FLAG_FINAL) minfo->flags |= FLAG_FINAL;
1313 if(mod->flags&FLAG_STATIC) minfo->flags |= FLAG_STATIC;
1314 if(mod->flags&FLAG_OVERRIDE) minfo->flags |= FLAG_OVERRIDE;
1319 static void innerfunction(char*name, params_t*params, classinfo_t*return_type)
1321 //parserassert(state->method && state->method->info);
1323 methodstate_t*parent_method = state->method;
1326 return_type = 0; // not valid in pass 1
1330 state->new_vars = 1;
1333 state->method = rfx_calloc(sizeof(methodstate_t));
1334 state->method->inner = 1;
1335 state->method->variable_count = 0;
1336 state->method->abc = rfx_calloc(sizeof(abc_method_t));
1338 NEW(methodinfo_t,minfo);
1339 minfo->kind = INFOTYPE_METHOD;
1340 minfo->access = ACCESS_PACKAGEINTERNAL;
1342 state->method->info = minfo;
1345 list_append(parent_method->innerfunctions, state->method);
1347 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
1349 function_initvars(state->method, params, 0, 1);
1353 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1354 state->method->variable_count = 0;
1355 parserassert(state->method);
1357 state->method->info->return_type = return_type;
1358 function_initvars(state->method, params, 0, 1);
1362 static void startfunction(modifiers_t*mod, enum yytokentype getset, char*name,
1363 params_t*params, classinfo_t*return_type)
1365 if(state->method && state->method->info) {
1366 syntaxerror("not able to start another method scope");
1369 state->new_vars = 1;
1372 state->method = rfx_calloc(sizeof(methodstate_t));
1373 state->method->has_super = 0;
1376 state->method->is_constructor = !strcmp(state->cls->info->name,name);
1378 state->method->is_global = 1;
1379 state->method->late_binding = 1; // for global methods, always push local_0 on the scope stack
1381 if(state->method->is_constructor)
1382 name = "__as3_constructor__";
1384 state->method->info = registerfunction(getset, mod, name, params, return_type, 0);
1386 function_initvars(state->method, params, mod->flags, 1);
1388 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
1392 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1393 state->method->variable_count = 0;
1394 parserassert(state->method);
1397 memberinfo_t*m = registry_findmember(state->cls->info, mod->ns, name, 2);
1398 check_override(m, mod->flags);
1402 state->cls->has_constructor |= state->method->is_constructor;
1405 state->method->info->return_type = return_type;
1406 function_initvars(state->method, params, mod->flags, 1);
1410 static abc_method_t* endfunction(modifiers_t*mod, enum yytokentype getset, char*name,
1411 params_t*params, classinfo_t*return_type, code_t*body)
1414 // store inner methods in variables
1415 function_initvars(state->method, 0, 0, 0);
1417 methodstate_list_t*ml = state->method->innerfunctions;
1419 dict_t*xvars = dict_new();
1422 methodstate_t*m = ml->methodstate;
1423 parserassert(m->inner);
1424 if(m->unresolved_variables) {
1425 dict_t*d = m->unresolved_variables;
1427 for(t=0;t<d->hashsize;t++) {
1428 dictentry_t*l = d->slots[t];
1430 /* check parent method's variables */
1432 if((v=find_variable(state, l->key))) {
1433 m->uses_parent_function = 1;
1434 state->method->uses_slots = 1;
1435 dict_put(xvars, l->key, 0);
1442 dict_destroy(m->unresolved_variables);
1443 m->unresolved_variables = 0;
1448 if(state->method->uses_slots) {
1449 state->method->slots = dict_new();
1451 DICT_ITERATE_ITEMS(state->vars, char*, name, variable_t*, v) {
1452 if(!name) syntaxerror("internal error");
1453 if(v->index && dict_contains(xvars, name)) {
1456 if(v->is_inner_method) {
1457 v->is_inner_method->is_a_slot = 1;
1460 dict_put(state->method->slots, name, v);
1463 state->method->uses_slots = i;
1464 dict_destroy(state->vars);state->vars = 0;
1471 /*if(state->method->uses_parent_function){
1472 syntaxerror("accessing variables of parent function from inner functions not supported yet");
1477 multiname_t*type2 = sig2mname(return_type);
1479 if(state->method->inner) {
1480 f = state->method->abc;
1481 abc_method_init(f, global->file, type2, 1);
1482 } else if(state->method->is_constructor) {
1483 f = abc_class_getconstructor(state->cls->abc, type2);
1484 } else if(!state->method->is_global) {
1485 namespace_t mname_ns = modifiers2access(mod);
1486 multiname_t mname = {QNAME, &mname_ns, 0, name};
1488 if(mod->flags&FLAG_STATIC)
1489 f = abc_class_staticmethod(state->cls->abc, type2, &mname);
1491 f = abc_class_method(state->cls->abc, type2, &mname);
1492 slot = f->trait->slot_id;
1494 namespace_t mname_ns = {state->method->info->access, state->package};
1495 multiname_t mname = {QNAME, &mname_ns, 0, name};
1497 f = abc_method_new(global->file, type2, 1);
1498 trait_t*t = trait_new_method(&global->init->traits, multiname_clone(&mname), f);
1499 //abc_code_t*c = global->init->method->body->code;
1501 //flash doesn't seem to allow us to access function slots
1502 //state->method->info->slot = slot;
1504 if(mod && mod->flags&FLAG_OVERRIDE) f->trait->attributes |= TRAIT_ATTR_OVERRIDE;
1505 if(getset == KW_GET) f->trait->kind = TRAIT_GETTER;
1506 if(getset == KW_SET) f->trait->kind = TRAIT_SETTER;
1507 if(params->varargs) f->flags |= METHOD_NEED_REST;
1511 for(p=params->list;p;p=p->next) {
1512 if(params->varargs && !p->next) {
1513 break; //varargs: omit last parameter in function signature
1515 multiname_t*m = sig2mname(p->param->type);
1516 list_append(f->parameters, m);
1517 if(p->param->value) {
1518 check_constant_against_type(p->param->type, p->param->value);
1519 opt=1;list_append(f->optional_parameters, p->param->value);
1521 syntaxerror("non-optional parameter not allowed after optional parameters");
1524 if(state->method->slots) {
1525 DICT_ITERATE_ITEMS(state->method->slots, char*, name, variable_t*, v) {
1527 multiname_t*mname = multiname_new(namespace_new(ACCESS_PACKAGE, ""), name);
1528 multiname_t*type = sig2mname(v->type);
1529 trait_t*t = trait_new_member(&f->body->traits, type, mname, 0);
1530 t->slot_id = v->index;
1535 check_code_for_break(body);
1537 /* Seems this works now.
1538 if(state->method->exceptions && state->method->uses_slots) {
1539 as3_warning("try/catch and activation not supported yet within the same method");
1543 f->body->code = body;
1544 f->body->exceptions = state->method->exceptions;
1545 } else { //interface
1547 syntaxerror("interface methods can't have a method body");
1557 char is_subtype_of(classinfo_t*type, classinfo_t*supertype)
1562 void breakjumpsto(code_t*c, char*name, code_t*jump)
1565 if(c->opcode == OPCODE___BREAK__) {
1566 string_t*name2 = c->data[0];
1567 if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1568 c->opcode = OPCODE_JUMP;
1575 void continuejumpsto(code_t*c, char*name, code_t*jump)
1578 if(c->opcode == OPCODE___CONTINUE__) {
1579 string_t*name2 = c->data[0];
1580 if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1581 c->opcode = OPCODE_JUMP;
1589 #define IS_INT(a) (TYPE_IS_INT((a)) || TYPE_IS_UINT((a)))
1590 #define IS_NUMBER_OR_INT(a) (TYPE_IS_INT((a)) || TYPE_IS_UINT((a)) || TYPE_IS_NUMBER((a)))
1591 #define BOTH_INT(a,b) (IS_INT(a) && IS_INT(b))
1593 classinfo_t*join_types(classinfo_t*type1, classinfo_t*type2, char op)
1595 if(!type1 || !type2)
1596 return registry_getanytype();
1597 if(TYPE_IS_ANY(type1) || TYPE_IS_ANY(type2))
1598 return registry_getanytype();
1601 if(IS_NUMBER_OR_INT(type1) && IS_NUMBER_OR_INT(type2)) {
1610 return registry_getanytype();
1612 code_t*converttype(code_t*c, classinfo_t*from, classinfo_t*to)
1617 return abc_coerce_a(c);
1621 // cast an "any" type to a specific type. subject to
1622 // runtime exceptions
1623 return abc_coerce2(c, &m);
1626 if((TYPE_IS_NUMBER(from) || TYPE_IS_UINT(from) || TYPE_IS_INT(from)) &&
1627 (TYPE_IS_NUMBER(to) || TYPE_IS_UINT(to) || TYPE_IS_INT(to))) {
1628 // allow conversion between number types
1629 return abc_coerce2(c, &m);
1631 //printf("%s.%s\n", from.package, from.name);
1632 //printf("%s.%s\n", to.package, to.name);
1634 classinfo_t*supertype = from;
1636 if(supertype == to) {
1637 // target type is one of from's superclasses
1638 return abc_coerce2(c, &m);
1641 while(supertype->interfaces[t]) {
1642 if(supertype->interfaces[t]==to) {
1643 // target type is one of from's interfaces
1644 return abc_coerce2(c, &m);
1648 supertype = supertype->superclass;
1650 if(TYPE_IS_FUNCTION(from) && TYPE_IS_FUNCTION(to))
1652 if(TYPE_IS_CLASS(from) && TYPE_IS_CLASS(to))
1654 if(TYPE_IS_NULL(from) && !IS_NUMBER_OR_INT(to))
1657 as3_error("can't convert type %s%s%s to %s%s%s",
1658 from->package, from->package?".":"", from->name,
1659 to->package, to->package?".":"", to->name);
1663 code_t*defaultvalue(code_t*c, classinfo_t*type)
1665 if(TYPE_IS_INT(type)) {
1666 c = abc_pushbyte(c, 0);
1667 } else if(TYPE_IS_UINT(type)) {
1668 c = abc_pushuint(c, 0);
1669 } else if(TYPE_IS_FLOAT(type)) {
1671 } else if(TYPE_IS_BOOLEAN(type)) {
1672 c = abc_pushfalse(c);
1674 //c = abc_pushundefined(c);
1676 c = abc_pushnull(c);
1678 c = abc_coerce2(c, &m);
1683 char is_pushundefined(code_t*c)
1685 return (c && !c->prev && !c->next && c->opcode == OPCODE_PUSHUNDEFINED);
1688 static const char* get_package_from_name(const char*name)
1690 /* try explicit imports */
1691 dictentry_t* e = dict_get_slot(state->imports, name);
1693 if(!strcmp(e->key, name)) {
1694 slotinfo_t*c = (slotinfo_t*)e->data;
1695 if(c) return c->package;
1701 static namespace_list_t*get_current_imports()
1703 namespace_list_t*searchlist = 0;
1705 list_append(searchlist, namespace_new_package(state->package));
1707 import_list_t*l = state->wildcard_imports;
1709 namespace_t*ns = namespace_new_package(l->import->package);
1710 list_append(searchlist, ns);
1713 list_append(searchlist, namespace_new_package(""));
1714 list_append(searchlist, namespace_new_package(internal_filename_package));
1718 static slotinfo_t* find_class(const char*name)
1722 c = registry_find(state->package, name);
1725 /* try explicit imports */
1726 dictentry_t* e = dict_get_slot(state->imports, name);
1729 if(!strcmp(e->key, name)) {
1730 c = (slotinfo_t*)e->data;
1736 /* try package.* imports */
1737 import_list_t*l = state->wildcard_imports;
1739 //printf("does package %s contain a class %s?\n", l->import->package, name);
1740 c = registry_find(l->import->package, name);
1745 /* try global package */
1746 c = registry_find("", name);
1749 /* try local "filename" package */
1750 c = registry_find(internal_filename_package, name);
1755 typedcode_t push_class(slotinfo_t*a)
1760 if(a->access == ACCESS_PACKAGEINTERNAL &&
1761 strcmp(a->package, state->package) &&
1762 strcmp(a->package, internal_filename_package)
1764 syntaxerror("Can't access internal %s %s in package '%s' from package '%s'",
1765 infotypename(a), a->name, a->package, state->package);
1768 if(a->kind != INFOTYPE_CLASS) {
1770 x.c = abc_findpropstrict2(x.c, &m);
1771 x.c = abc_getproperty2(x.c, &m);
1772 if(a->kind == INFOTYPE_METHOD) {
1773 methodinfo_t*f = (methodinfo_t*)a;
1774 x.t = TYPE_FUNCTION(f);
1776 varinfo_t*v = (varinfo_t*)a;
1780 classinfo_t*c = (classinfo_t*)a;
1782 x.c = abc_getglobalscope(x.c);
1783 x.c = abc_getslot(x.c, c->slot);
1786 x.c = abc_getlex2(x.c, &m);
1788 x.t = TYPE_CLASS(c);
1793 static char is_getlocal(code_t*c)
1795 if(!c || c->prev || c->next)
1797 return(c->opcode == OPCODE_GETLOCAL
1798 || c->opcode == OPCODE_GETLOCAL_0
1799 || c->opcode == OPCODE_GETLOCAL_1
1800 || c->opcode == OPCODE_GETLOCAL_2
1801 || c->opcode == OPCODE_GETLOCAL_3);
1803 static int getlocalnr(code_t*c)
1805 if(c->opcode == OPCODE_GETLOCAL) {return (ptroff_t)c->data[0];}
1806 else if(c->opcode == OPCODE_GETLOCAL_0) {return 0;}
1807 else if(c->opcode == OPCODE_GETLOCAL_1) {return 1;}
1808 else if(c->opcode == OPCODE_GETLOCAL_2) {return 2;}
1809 else if(c->opcode == OPCODE_GETLOCAL_3) {return 3;}
1810 else syntaxerror("Internal error: opcode %02x is not a getlocal call", c->opcode);
1814 static code_t* toreadwrite(code_t*in, code_t*middlepart, char justassign, char readbefore)
1818 [prefix code] [read instruction]
1822 [prefix code] ([dup]) [read instruction] [middlepart] [setvar] [write instruction] [getvar]
1824 if(in && in->opcode == OPCODE_COERCE_A) {
1825 in = code_cutlast(in);
1828 syntaxerror("internal error");
1830 /* chop off read instruction */
1834 prefix = r->prev;r->prev = 0;
1840 char use_temp_var = readbefore;
1842 /* generate the write instruction, and maybe append a dup to the prefix code */
1843 code_t* write = abc_nop(0);
1844 if(r->opcode == OPCODE_GETPROPERTY) {
1845 write->opcode = OPCODE_SETPROPERTY;
1846 multiname_t*m = (multiname_t*)r->data[0];
1847 write->data[0] = multiname_clone(m);
1848 if(m->type == QNAME || m->type == MULTINAME) {
1850 prefix = abc_dup(prefix); // we need the object, too
1853 } else if(m->type == MULTINAMEL) {
1855 /* dupping two values on the stack requires 5 operations and one register-
1856 couldn't adobe just have given us a dup2? */
1857 int temp = gettempvar();
1858 prefix = abc_setlocal(prefix, temp);
1859 prefix = abc_dup(prefix);
1860 prefix = abc_getlocal(prefix, temp);
1861 prefix = abc_swap(prefix);
1862 prefix = abc_getlocal(prefix, temp);
1864 prefix = abc_kill(prefix, temp);
1868 syntaxerror("illegal lvalue: can't assign a value to this expression (not a qname/multiname)");
1870 } else if(r->opcode == OPCODE_GETSLOT) {
1871 write->opcode = OPCODE_SETSLOT;
1872 write->data[0] = r->data[0];
1874 prefix = abc_dup(prefix); // we need the object, too
1877 } else if(r->opcode == OPCODE_GETLOCAL) {
1878 write->opcode = OPCODE_SETLOCAL;
1879 write->data[0] = r->data[0];
1880 } else if(r->opcode == OPCODE_GETLOCAL_0) {
1881 write->opcode = OPCODE_SETLOCAL_0;
1882 } else if(r->opcode == OPCODE_GETLOCAL_1) {
1883 write->opcode = OPCODE_SETLOCAL_1;
1884 } else if(r->opcode == OPCODE_GETLOCAL_2) {
1885 write->opcode = OPCODE_SETLOCAL_2;
1886 } else if(r->opcode == OPCODE_GETLOCAL_3) {
1887 write->opcode = OPCODE_SETLOCAL_3;
1888 } else if(r->opcode == OPCODE_GETSUPER) {
1889 write->opcode = OPCODE_SETSUPER;
1890 multiname_t*m = (multiname_t*)r->data[0];
1891 write->data[0] = multiname_clone(m);
1894 syntaxerror("illegal lvalue: can't assign a value to this expression");
1901 /* with getproperty/getslot, we have to be extra careful not
1902 to execute the read code twice, as it might have side-effects
1903 (e.g. if the property is in fact a setter/getter combination)
1905 So read the value, modify it, and write it again,
1906 using prefix only once and making sure (by using a temporary
1907 register) that the return value is what we just wrote */
1908 temp = gettempvar();
1909 c = code_append(c, prefix);
1910 c = code_append(c, r);
1913 c = abc_setlocal(c, temp);
1915 c = code_append(c, middlepart);
1918 c = abc_setlocal(c, temp);
1920 c = code_append(c, write);
1921 c = abc_getlocal(c, temp);
1922 c = abc_kill(c, temp);
1924 /* if we're allowed to execute the read code twice *and*
1925 the middlepart doesn't modify the code, things are easier.
1927 code_t* r2 = code_dup(r);
1928 //c = code_append(c, prefix);
1929 parserassert(!prefix);
1930 c = code_append(c, r);
1931 c = code_append(c, middlepart);
1932 c = code_append(c, write);
1933 c = code_append(c, r2);
1936 /* even smaller version: overwrite the value without reading
1940 c = code_append(c, prefix);
1943 c = code_append(c, middlepart);
1944 c = code_append(c, write);
1945 c = code_append(c, r);
1948 temp = gettempvar();
1950 c = code_append(c, prefix);
1952 c = code_append(c, middlepart);
1954 c = abc_setlocal(c, temp);
1955 c = code_append(c, write);
1956 c = abc_getlocal(c, temp);
1957 c = abc_kill(c, temp);
1963 char is_break_or_jump(code_t*c)
1967 if(c->opcode == OPCODE_JUMP ||
1968 c->opcode == OPCODE___BREAK__ ||
1969 c->opcode == OPCODE___CONTINUE__ ||
1970 c->opcode == OPCODE_THROW ||
1971 c->opcode == OPCODE_RETURNVOID ||
1972 c->opcode == OPCODE_RETURNVALUE) {
1978 #define IS_FINALLY_TARGET(op) \
1979 ((op) == OPCODE___CONTINUE__ || \
1980 (op) == OPCODE___BREAK__ || \
1981 (op) == OPCODE_RETURNVOID || \
1982 (op) == OPCODE_RETURNVALUE || \
1983 (op) == OPCODE___RETHROW__)
1985 static code_t* insert_finally_lookup(code_t*c, code_t*finally, int tempvar)
1987 #define NEED_EXTRA_STACK_ARG
1988 code_t*finally_label = abc_nop(0);
1989 NEW(lookupswitch_t, l);
1995 code_t*prev = i->prev;
1996 if(IS_FINALLY_TARGET(i->opcode)) {
1999 if(i->opcode == OPCODE___RETHROW__ ||
2000 i->opcode == OPCODE_RETURNVALUE) {
2001 if(i->opcode == OPCODE___RETHROW__)
2002 i->opcode = OPCODE_THROW;
2004 p = abc_coerce_a(p);
2005 p = abc_setlocal(p, tempvar);
2007 p = abc_pushbyte(p, count++);
2008 p = abc_jump(p, finally_label);
2009 code_t*target = p = abc_label(p);
2010 #ifdef NEED_EXTRA_STACK_ARG
2014 p = abc_getlocal(p, tempvar);
2017 p->next = i;i->prev = p;
2018 list_append(l->targets, target);
2024 c = abc_pushbyte(c, -1);
2025 c = code_append(c, finally_label);
2026 c = code_append(c, finally);
2028 #ifdef NEED_EXTRA_STACK_ARG
2031 c = abc_lookupswitch(c, l);
2032 c = l->def = abc_label(c);
2033 #ifdef NEED_EXTRA_STACK_ARG
2040 static code_t* insert_finally_simple(code_t*c, code_t*finally, int tempvar)
2044 code_t*prev = i->prev;
2045 if(IS_FINALLY_TARGET(i->opcode)) {
2046 if(i->opcode == OPCODE___RETHROW__)
2047 i->opcode = OPCODE_THROW;
2048 code_t*end = code_dup(finally);
2049 code_t*start = code_start(end);
2050 if(prev) prev->next = start;
2057 return code_append(c, finally);
2060 code_t* insert_finally(code_t*c, code_t*finally, int tempvar)
2066 int num_insertion_points=0;
2068 if(IS_FINALLY_TARGET(i->opcode))
2069 num_insertion_points++;
2076 if(i->branch || i->opcode == OPCODE_LOOKUPSWITCH) {
2081 int simple_version_cost = (1+num_insertion_points)*code_size;
2082 int lookup_version_cost = 4*num_insertion_points + 5;
2084 if(cantdup || simple_version_cost > lookup_version_cost) {
2085 //printf("(use lookup) simple=%d > lookup=%d\n", simple_version_cost, lookup_version_cost);
2086 return insert_finally_lookup(c, finally, tempvar);
2088 //printf("(use simple) simple=%d < lookup=%d\n", simple_version_cost, lookup_version_cost);
2089 return insert_finally_simple(c, finally, tempvar);
2093 #define PASS1 }} if(as3_pass == 1) {{
2094 #define PASS1END }} if(as3_pass == 2) {{
2095 #define PASS2 }} if(as3_pass == 2) {{
2096 #define PASS12 }} {{
2097 #define PASS12END }} if(as3_pass == 2) {{
2101 /* Line 273 of skeleton.m4 */
2102 #line 2103 "parser.tab.c"
2109 typedef YYTYPE_UINT8 yytype_uint8;
2111 typedef unsigned char yytype_uint8;
2115 typedef YYTYPE_INT8 yytype_int8;
2116 #elif (defined __STDC__ || defined __C99__FUNC__ \
2117 || defined __cplusplus || defined _MSC_VER)
2118 typedef signed char yytype_int8;
2120 typedef short int yytype_int8;
2123 #ifdef YYTYPE_UINT16
2124 typedef YYTYPE_UINT16 yytype_uint16;
2126 typedef unsigned short int yytype_uint16;
2130 typedef YYTYPE_INT16 yytype_int16;
2132 typedef short int yytype_int16;
2136 # ifdef __SIZE_TYPE__
2137 # define YYSIZE_T __SIZE_TYPE__
2138 # elif defined size_t
2139 # define YYSIZE_T size_t
2140 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
2141 || defined __cplusplus || defined _MSC_VER)
2142 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
2143 # define YYSIZE_T size_t
2145 # define YYSIZE_T unsigned int
2149 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
2154 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
2155 # define YY_(msgid) dgettext ("bison-runtime", msgid)
2159 # define YY_(msgid) msgid
2163 /* Suppress unused-variable warnings by "using" E. */
2164 #if ! defined lint || defined __GNUC__
2165 # define YYUSE(e) ((void) (e))
2167 # define YYUSE(e) /* empty */
2170 /* Identity function, used to suppress warnings about constant conditions. */
2172 # define YYID(n) (n)
2174 #if (defined __STDC__ || defined __C99__FUNC__ \
2175 || defined __cplusplus || defined _MSC_VER)
2188 #if ! defined yyoverflow || YYERROR_VERBOSE
2190 /* The parser invokes alloca or malloc; define the necessary symbols. */
2192 # ifdef YYSTACK_USE_ALLOCA
2193 # if YYSTACK_USE_ALLOCA
2195 # define YYSTACK_ALLOC __builtin_alloca
2196 # elif defined __BUILTIN_VA_ARG_INCR
2197 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
2199 # define YYSTACK_ALLOC __alloca
2200 # elif defined _MSC_VER
2201 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
2202 # define alloca _alloca
2204 # define YYSTACK_ALLOC alloca
2205 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
2206 || defined __cplusplus || defined _MSC_VER)
2207 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
2209 # define _STDLIB_H 1
2216 # ifdef YYSTACK_ALLOC
2217 /* Pacify GCC's `empty if-body' warning. */
2218 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
2219 # ifndef YYSTACK_ALLOC_MAXIMUM
2220 /* The OS might guarantee only one guard page at the bottom of the stack,
2221 and a page size can be as small as 4096 bytes. So we cannot safely
2222 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
2223 to allow for a few compiler-allocated temporary stack slots. */
2224 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
2227 # define YYSTACK_ALLOC YYMALLOC
2228 # define YYSTACK_FREE YYFREE
2229 # ifndef YYSTACK_ALLOC_MAXIMUM
2230 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
2232 # if (defined __cplusplus && ! defined _STDLIB_H \
2233 && ! ((defined YYMALLOC || defined malloc) \
2234 && (defined YYFREE || defined free)))
2235 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
2237 # define _STDLIB_H 1
2241 # define YYMALLOC malloc
2242 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
2243 || defined __cplusplus || defined _MSC_VER)
2244 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
2248 # define YYFREE free
2249 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
2250 || defined __cplusplus || defined _MSC_VER)
2251 void free (void *); /* INFRINGES ON USER NAME SPACE */
2255 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
2258 #if (! defined yyoverflow \
2259 && (! defined __cplusplus \
2260 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
2262 /* A type that is properly aligned for any stack member. */
2265 yytype_int16 yyss_alloc;
2269 /* The size of the maximum gap between one aligned stack and the next. */
2270 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
2272 /* The size of an array large to enough to hold all stacks, each with
2274 # define YYSTACK_BYTES(N) \
2275 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
2276 + YYSTACK_GAP_MAXIMUM)
2278 /* Copy COUNT objects from FROM to TO. The source and destination do
2281 # if defined __GNUC__ && 1 < __GNUC__
2282 # define YYCOPY(To, From, Count) \
2283 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
2285 # define YYCOPY(To, From, Count) \
2289 for (yyi = 0; yyi < (Count); yyi++) \
2290 (To)[yyi] = (From)[yyi]; \
2296 /* Relocate STACK from its old location to the new one. The
2297 local variables YYSIZE and YYSTACKSIZE give the old and new number of
2298 elements in the stack, and YYPTR gives the new location of the
2299 stack. Advance YYPTR to a properly aligned location for the next
2301 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
2304 YYSIZE_T yynewbytes; \
2305 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
2306 Stack = &yyptr->Stack_alloc; \
2307 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
2308 yyptr += yynewbytes / sizeof (*yyptr); \
2314 /* YYFINAL -- State number of the termination state. */
2316 /* YYLAST -- Last index in YYTABLE. */
2319 /* YYNTOKENS -- Number of terminals. */
2320 #define YYNTOKENS 134
2321 /* YYNNTS -- Number of nonterminals. */
2323 /* YYNRULES -- Number of rules. */
2324 #define YYNRULES 309
2325 /* YYNRULES -- Number of states. */
2326 #define YYNSTATES 521
2328 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
2329 #define YYUNDEFTOK 2
2330 #define YYMAXUTOK 363
2332 #define YYTRANSLATE(YYX) \
2333 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
2335 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
2336 static const yytype_uint8 yytranslate[] =
2338 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2339 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2340 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2341 2, 2, 2, 118, 2, 2, 2, 116, 108, 2,
2342 122, 133, 115, 113, 100, 112, 127, 114, 2, 2,
2343 2, 2, 2, 2, 2, 2, 2, 2, 105, 99,
2344 109, 102, 110, 104, 128, 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, 124, 2, 125, 107, 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, 126, 106, 132, 117, 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, 2, 2, 2, 2,
2354 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2355 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2356 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2357 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2358 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2359 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2360 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2361 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2362 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2363 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
2364 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
2365 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
2366 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
2367 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
2368 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
2369 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
2370 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
2371 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
2372 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
2373 95, 96, 97, 98, 101, 103, 111, 119, 120, 121,
2378 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
2380 static const yytype_uint16 yyprhs[] =
2382 0, 0, 3, 5, 6, 8, 10, 13, 15, 17,
2383 19, 21, 23, 25, 30, 32, 33, 35, 37, 40,
2384 42, 44, 46, 48, 50, 55, 57, 59, 60, 63,
2385 65, 67, 69, 71, 73, 75, 77, 79, 81, 83,
2386 85, 87, 89, 93, 96, 98, 100, 102, 104, 106,
2387 108, 110, 115, 118, 120, 122, 126, 129, 130, 133,
2388 136, 138, 142, 146, 147, 150, 151, 159, 160, 162,
2389 164, 168, 170, 173, 177, 186, 193, 194, 201, 202,
2390 210, 212, 215, 217, 220, 221, 223, 225, 228, 230,
2391 233, 238, 242, 243, 252, 253, 263, 264, 270, 272,
2392 275, 277, 280, 282, 283, 290, 293, 295, 300, 303,
2393 305, 307, 309, 313, 315, 316, 323, 324, 330, 333,
2394 338, 339, 341, 343, 346, 348, 350, 352, 354, 356,
2395 358, 360, 362, 364, 366, 367, 370, 371, 374, 375,
2396 378, 379, 389, 390, 399, 400, 402, 404, 407, 409,
2397 414, 416, 418, 420, 421, 423, 425, 428, 430, 433,
2398 442, 444, 446, 447, 452, 454, 458, 462, 463, 466,
2399 468, 470, 472, 474, 476, 478, 480, 482, 484, 485,
2400 487, 490, 495, 499, 501, 506, 509, 511, 513, 514,
2401 515, 528, 530, 531, 532, 543, 545, 549, 551, 553,
2402 555, 559, 561, 563, 565, 568, 569, 570, 574, 575,
2403 577, 579, 581, 584, 587, 588, 593, 598, 603, 606,
2404 608, 611, 613, 615, 619, 621, 623, 625, 627, 629,
2405 631, 633, 635, 637, 639, 641, 643, 645, 647, 649,
2406 651, 653, 655, 659, 663, 667, 671, 675, 679, 683,
2407 687, 691, 695, 698, 701, 705, 709, 713, 717, 721,
2408 725, 729, 733, 737, 741, 745, 749, 753, 757, 761,
2409 766, 769, 771, 775, 778, 783, 787, 788, 790, 794,
2410 800, 804, 808, 812, 816, 820, 824, 828, 832, 836,
2411 840, 844, 848, 854, 857, 860, 863, 866, 870, 873,
2412 878, 884, 888, 894, 898, 900, 903, 908, 913, 916
2415 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
2416 static const yytype_int16 yyrhs[] =
2418 135, 0, -1, 136, -1, -1, 137, -1, 138, -1,
2419 137, 138, -1, 186, -1, 198, -1, 196, -1, 217,
2420 -1, 207, -1, 147, -1, 148, 126, 136, 132, -1,
2421 99, -1, -1, 140, -1, 141, -1, 140, 141, -1,
2422 198, -1, 196, -1, 217, -1, 207, -1, 147, -1,
2423 148, 126, 139, 132, -1, 99, -1, 143, -1, -1,
2424 143, 145, -1, 145, -1, 189, -1, 159, -1, 160,
2425 -1, 161, -1, 163, -1, 171, -1, 154, -1, 183,
2426 -1, 179, -1, 239, -1, 247, -1, 246, -1, 126,
2427 143, 132, -1, 126, 132, -1, 99, -1, 144, -1,
2428 150, -1, 165, -1, 166, -1, 236, -1, 181, -1,
2429 148, 126, 143, 132, -1, 145, 99, -1, 145, -1,
2430 144, -1, 3, 89, 3, -1, 102, 237, -1, -1,
2431 46, 151, -1, 32, 151, -1, 152, -1, 151, 100,
2432 152, -1, 3, 227, 149, -1, -1, 65, 146, -1,
2433 -1, 64, 122, 155, 238, 133, 146, 153, -1, -1,
2434 150, -1, 239, -1, 46, 3, 227, -1, 3, -1,
2435 13, 122, -1, 13, 50, 122, -1, 158, 156, 99,
2436 238, 99, 239, 133, 146, -1, 158, 157, 68, 238,
2437 133, 146, -1, -1, 14, 122, 162, 238, 133, 146,
2438 -1, -1, 15, 164, 146, 14, 122, 238, 133, -1,
2439 66, -1, 66, 3, -1, 30, -1, 30, 3, -1,
2440 -1, 168, -1, 170, -1, 168, 170, -1, 169, -1,
2441 168, 169, -1, 34, 240, 105, 142, -1, 62, 105,
2442 142, -1, -1, 16, 122, 172, 240, 133, 126, 167,
2443 132, -1, -1, 33, 122, 3, 227, 133, 174, 126,
2444 142, 132, -1, -1, 28, 126, 176, 142, 132, -1,
2445 173, -1, 177, 173, -1, 177, -1, 177, 175, -1,
2446 175, -1, -1, 52, 126, 180, 142, 132, 178, -1,
2447 37, 238, -1, 37, -1, 39, 122, 238, 133, -1,
2448 182, 146, -1, 3, -1, 19, -1, 4, -1, 185,
2449 127, 184, -1, 184, -1, -1, 19, 185, 126, 187,
2450 139, 132, -1, -1, 19, 126, 188, 139, 132, -1,
2451 41, 223, -1, 41, 185, 127, 115, -1, -1, 191,
2452 -1, 192, -1, 191, 192, -1, 21, -1, 22, -1,
2453 20, -1, 38, -1, 47, -1, 49, -1, 48, -1,
2454 26, -1, 24, -1, 4, -1, -1, 54, 224, -1,
2455 -1, 54, 225, -1, -1, 17, 225, -1, -1, 190,
2456 31, 3, 193, 195, 126, 197, 200, 132, -1, -1,
2457 190, 44, 3, 194, 126, 199, 203, 132, -1, -1,
2458 201, -1, 202, -1, 201, 202, -1, 99, -1, 148,
2459 126, 200, 132, -1, 207, -1, 217, -1, 144, -1,
2460 -1, 204, -1, 205, -1, 204, 205, -1, 99, -1,
2461 46, 3, -1, 190, 27, 216, 3, 122, 213, 133,
2462 227, -1, 46, -1, 32, -1, -1, 190, 206, 208,
2463 209, -1, 210, -1, 209, 100, 210, -1, 3, 227,
2464 149, -1, -1, 102, 212, -1, 10, -1, 8, -1,
2465 9, -1, 12, -1, 5, -1, 56, -1, 55, -1,
2466 45, -1, 3, -1, -1, 214, -1, 93, 215, -1,
2467 214, 100, 93, 215, -1, 214, 100, 215, -1, 215,
2468 -1, 3, 105, 226, 211, -1, 3, 211, -1, 51,
2469 -1, 35, -1, -1, -1, 190, 27, 216, 3, 122,
2470 213, 133, 227, 126, 218, 142, 132, -1, 3, -1,
2471 -1, -1, 27, 219, 122, 213, 133, 227, 126, 221,
2472 142, 132, -1, 184, -1, 185, 127, 184, -1, 223,
2473 -1, 222, -1, 224, -1, 225, 100, 224, -1, 224,
2474 -1, 115, -1, 36, -1, 105, 226, -1, -1, -1,
2475 122, 229, 133, -1, -1, 230, -1, 231, -1, 237,
2476 -1, 230, 100, -1, 231, 237, -1, -1, 25, 240,
2477 232, 228, -1, 240, 122, 229, 133, -1, 53, 122,
2478 229, 133, -1, 63, 240, -1, 42, -1, 42, 238,
2479 -1, 240, -1, 240, -1, 238, 100, 240, -1, 238,
2480 -1, 220, -1, 241, -1, 244, -1, 233, -1, 235,
2481 -1, 234, -1, 6, -1, 10, -1, 11, -1, 8,
2482 -1, 9, -1, 12, -1, 5, -1, 29, -1, 56,
2483 -1, 55, -1, 45, -1, 240, 109, 240, -1, 240,
2484 110, 240, -1, 240, 75, 240, -1, 240, 76, 240,
2485 -1, 240, 71, 240, -1, 240, 72, 240, -1, 240,
2486 74, 240, -1, 240, 73, 240, -1, 240, 87, 240,
2487 -1, 240, 88, 240, -1, 118, 240, -1, 117, 240,
2488 -1, 240, 108, 240, -1, 240, 107, 240, -1, 240,
2489 106, 240, -1, 240, 96, 240, -1, 240, 95, 240,
2490 -1, 240, 94, 240, -1, 240, 114, 240, -1, 240,
2491 116, 240, -1, 240, 113, 240, -1, 240, 112, 240,
2492 -1, 240, 115, 240, -1, 240, 68, 240, -1, 240,
2493 69, 240, -1, 240, 40, 240, -1, 240, 67, 240,
2494 -1, 43, 122, 240, 133, -1, 36, 240, -1, 36,
2495 -1, 122, 238, 133, -1, 112, 240, -1, 240, 124,
2496 240, 125, -1, 124, 229, 125, -1, -1, 243, -1,
2497 237, 105, 237, -1, 243, 100, 237, 105, 237, -1,
2498 70, 242, 132, -1, 240, 80, 240, -1, 240, 79,
2499 240, -1, 240, 85, 240, -1, 240, 84, 240, -1,
2500 240, 86, 240, -1, 240, 78, 240, -1, 240, 77,
2501 240, -1, 240, 83, 240, -1, 240, 81, 240, -1,
2502 240, 82, 240, -1, 240, 102, 240, -1, 240, 104,
2503 240, 105, 240, -1, 240, 91, -1, 240, 90, -1,
2504 91, 240, -1, 90, 240, -1, 53, 127, 3, -1,
2505 128, 3, -1, 240, 127, 128, 3, -1, 240, 127,
2506 3, 89, 3, -1, 240, 92, 3, -1, 240, 127,
2507 122, 240, 133, -1, 240, 127, 3, -1, 3, -1,
2508 18, 3, -1, 18, 3, 102, 3, -1, 18, 3,
2509 102, 5, -1, 190, 245, -1, 23, 18, 224, -1
2512 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
2513 static const yytype_uint16 yyrline[] =
2515 0, 2081, 2081, 2083, 2083, 2084, 2085, 2087, 2088, 2089,
2516 2090, 2091, 2092, 2093, 2094, 2096, 2096, 2097, 2098, 2100,
2517 2101, 2102, 2103, 2104, 2105, 2106, 2108, 2109, 2111, 2112,
2518 2115, 2116, 2117, 2118, 2119, 2120, 2121, 2122, 2123, 2124,
2519 2125, 2126, 2127, 2128, 2131, 2132, 2133, 2134, 2135, 2136,
2520 2137, 2138, 2142, 2143, 2147, 2154, 2158, 2159, 2163, 2164,
2521 2166, 2167, 2169, 2230, 2231, 2234, 2234, 2253, 2254, 2255,
2522 2260, 2264, 2269, 2270, 2272, 2292, 2340, 2340, 2359, 2359,
2523 2374, 2377, 2380, 2383, 2387, 2388, 2389, 2390, 2391, 2392,
2524 2394, 2405, 2408, 2408, 2439, 2439, 2464, 2464, 2480, 2481,
2525 2482, 2483, 2491, 2500, 2500, 2549, 2553, 2564, 2574, 2591,
2526 2592, 2593, 2595, 2596, 2598, 2598, 2600, 2600, 2603, 2619,
2527 2636, 2637, 2638, 2639, 2646, 2647, 2648, 2649, 2650, 2651,
2528 2652, 2653, 2654, 2655, 2659, 2660, 2662, 2663, 2665, 2666,
2529 2670, 2668, 2676, 2674, 2683, 2684, 2685, 2686, 2687, 2688,
2530 2689, 2690, 2692, 2698, 2699, 2700, 2701, 2702, 2703, 2706,
2531 2719, 2719, 2721, 2721, 2723, 2724, 2726, 2801, 2802, 2804,
2532 2805, 2806, 2807, 2808, 2810, 2811, 2812, 2813, 2825, 2829,
2533 2835, 2841, 2849, 2854, 2860, 2868, 2876, 2877, 2878, 2881,
2534 2880, 2897, 2898, 2900, 2899, 2923, 2942, 2956, 2957, 2959,
2535 2960, 2962, 2963, 2964, 2973, 2974, 2978, 2979, 2981, 2982,
2536 2983, 2985, 2989, 2990, 2995, 2996, 3032, 3078, 3099, 3120,
2537 3123, 3130, 3131, 3132, 3138, 3144, 3146, 3148, 3150, 3152,
2538 3154, 3156, 3173, 3178, 3181, 3184, 3187, 3190, 3193, 3196,
2539 3199, 3202, 3206, 3209, 3212, 3215, 3218, 3221, 3224, 3227,
2540 3231, 3242, 3260, 3265, 3270, 3275, 3280, 3285, 3289, 3293,
2541 3298, 3302, 3306, 3315, 3324, 3334, 3339, 3351, 3357, 3362,
2542 3368, 3374, 3378, 3380, 3391, 3400, 3407, 3408, 3410, 3416,
2543 3425, 3432, 3444, 3450, 3456, 3462, 3468, 3474, 3480, 3486,
2544 3499, 3510, 3517, 3530, 3557, 3571, 3585, 3599, 3614, 3621,
2545 3628, 3635, 3642, 3653, 3703, 3808, 3815, 3822, 3829, 3844
2549 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
2550 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
2551 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
2552 static const char *const yytname[] =
2554 "$end", "error", "$undefined", "T_IDENTIFIER", "T_NAMESPACE",
2555 "T_STRING", "T_REGEXP", "T_EMPTY", "T_INT", "T_UINT", "T_BYTE",
2556 "T_SHORT", "T_FLOAT", "\"for\"", "\"while\"", "\"do\"", "\"switch\"",
2557 "\"implements\"", "\"namespace\"", "\"package\"", "\"protected\"",
2558 "\"public\"", "\"private\"", "\"use\"", "\"internal\"", "\"new\"",
2559 "\"native\"", "\"function\"", "\"finally\"", "\"undefined\"",
2560 "\"continue\"", "\"class\"", "\"const\"", "\"catch\"", "\"case\"",
2561 "\"set\"", "\"void\"", "\"throw\"", "\"static\"", "\"with\"",
2562 "\"instanceof\"", "\"import\"", "\"return\"", "\"typeof\"",
2563 "\"interface\"", "\"null\"", "\"var\"", "\"dynamic\"", "\"override\"",
2564 "\"final\"", "\"each\"", "\"get\"", "\"try\"", "\"super\"",
2565 "\"extends\"", "\"false\"", "\"true\"", "\"Boolean\"", "\"uint\"",
2566 "\"int\"", "\"Number\"", "\"String\"", "\"default\"", "\"delete\"",
2567 "\"if\"", "\"else\"", "\"break\"", "\"is\"", "\"in\"", "\"as\"",
2568 "\"{ (dictionary)\"", "\"==\"", "\"===\"", "\"!=\"", "\"!==\"", "\"<=\"",
2569 "\">=\"", "\"|=\"", "\"/=\"", "\"%=\"", "\"*=\"", "\"+=\"", "\"-=\"",
2570 "\"^=\"", "\">>=\"", "\"<<=\"", "\">>>=\"", "\"||\"", "\"&&\"", "\"::\"",
2571 "\"--\"", "\"++\"", "\"..\"", "\"...\"", "\"<<\"", "\">>>\"", "\">>\"",
2572 "prec_none", "below_semicolon", "';'", "','", "below_assignment", "'='",
2573 "\"&=\"", "'?'", "':'", "'|'", "'^'", "'&'", "'<'", "'>'", "below_minus",
2574 "'-'", "'+'", "'/'", "'*'", "'%'", "'~'", "'!'", "minusminus_prefix",
2575 "plusplus_prefix", "below_curly", "'('", "new2", "'['", "']'", "'{'",
2576 "'.'", "'@'", "above_identifier", "below_else", "above_function", "'}'",
2577 "')'", "$accept", "PROGRAM", "MAYBE_PROGRAM_CODE_LIST",
2578 "PROGRAM_CODE_LIST", "PROGRAM_CODE", "MAYBE_INPACKAGE_CODE_LIST",
2579 "INPACKAGE_CODE_LIST", "INPACKAGE_CODE", "MAYBECODE", "CODE",
2580 "CODE_STATEMENT", "CODEPIECE", "CODEBLOCK", "PACKAGE_INITCODE",
2581 "CONDITIONAL_COMPILATION", "MAYBEEXPRESSION", "VARIABLE_DECLARATION",
2582 "VARIABLE_LIST", "ONE_VARIABLE", "MAYBEELSE", "IF", "$@1", "FOR_INIT",
2583 "FOR_IN_INIT", "FOR_START", "FOR", "FOR_IN", "WHILE", "$@2", "DO_WHILE",
2584 "$@3", "BREAK", "CONTINUE", "MAYBE_CASE_LIST", "CASE_LIST", "CASE",
2585 "DEFAULT", "SWITCH", "$@4", "CATCH", "$@5", "FINALLY", "$@6",
2586 "CATCH_LIST", "CATCH_FINALLY_LIST", "TRY", "$@7", "THROW", "WITH_HEAD",
2587 "WITH", "X_IDENTIFIER", "PACKAGE", "PACKAGE_DECLARATION", "$@8", "$@9",
2588 "IMPORT", "MAYBE_MODIFIERS", "MODIFIER_LIST", "MODIFIER", "EXTENDS",
2589 "EXTENDS_LIST", "IMPLEMENTS_LIST", "CLASS_DECLARATION", "$@10",
2590 "INTERFACE_DECLARATION", "$@11", "MAYBE_CLASS_BODY", "CLASS_BODY",
2591 "CLASS_BODY_ITEM", "MAYBE_INTERFACE_BODY", "INTERFACE_BODY",
2592 "IDECLARATION", "VARCONST", "SLOT_DECLARATION", "$@12", "SLOT_LIST",
2593 "ONE_SLOT", "MAYBESTATICCONSTANT", "STATICCONSTANT", "MAYBE_PARAM_LIST",
2594 "PARAM_LIST", "PARAM", "GETSET", "FUNCTION_DECLARATION", "$@13",
2595 "MAYBE_IDENTIFIER", "INNERFUNCTION", "$@14", "CLASS", "PACKAGEANDCLASS",
2596 "CLASS_SPEC", "CLASS_SPEC_LIST", "TYPE", "MAYBETYPE",
2597 "MAYBE_PARAM_VALUES", "MAYBE_EXPRESSION_LIST", "EXPRESSION_LIST",
2598 "EXPRESSION_LIST_AND_COMMA", "XX", "NEW", "FUNCTIONCALL", "DELETE",
2599 "RETURN", "NONCOMMAEXPRESSION", "EXPRESSION", "VOIDEXPRESSION", "E",
2600 "CONSTANT", "MAYBE_EXPRPAIR_LIST", "EXPRPAIR_LIST", "VAR_READ",
2601 "NAMESPACE_ID", "NAMESPACE_DECLARATION", "USE_NAMESPACE", 0
2606 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
2608 static const yytype_uint16 yytoknum[] =
2610 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
2611 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
2612 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
2613 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
2614 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
2615 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
2616 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
2617 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
2618 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
2619 345, 346, 347, 348, 349, 350, 351, 352, 353, 59,
2620 44, 354, 61, 355, 63, 58, 124, 94, 38, 60,
2621 62, 356, 45, 43, 47, 42, 37, 126, 33, 357,
2622 358, 359, 40, 360, 91, 93, 123, 46, 64, 361,
2627 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
2628 static const yytype_uint8 yyr1[] =
2630 0, 134, 135, 136, 136, 137, 137, 138, 138, 138,
2631 138, 138, 138, 138, 138, 139, 139, 140, 140, 141,
2632 141, 141, 141, 141, 141, 141, 142, 142, 143, 143,
2633 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
2634 144, 144, 144, 144, 145, 145, 145, 145, 145, 145,
2635 145, 145, 146, 146, 147, 148, 149, 149, 150, 150,
2636 151, 151, 152, 153, 153, 155, 154, 156, 156, 156,
2637 157, 157, 158, 158, 159, 160, 162, 161, 164, 163,
2638 165, 165, 166, 166, 167, 167, 167, 167, 168, 168,
2639 169, 170, 172, 171, 174, 173, 176, 175, 177, 177,
2640 178, 178, 178, 180, 179, 181, 181, 182, 183, 184,
2641 184, 184, 185, 185, 187, 186, 188, 186, 189, 189,
2642 190, 190, 191, 191, 192, 192, 192, 192, 192, 192,
2643 192, 192, 192, 192, 193, 193, 194, 194, 195, 195,
2644 197, 196, 199, 198, 200, 200, 201, 201, 202, 202,
2645 202, 202, 202, 203, 203, 204, 204, 205, 205, 205,
2646 206, 206, 208, 207, 209, 209, 210, 211, 211, 212,
2647 212, 212, 212, 212, 212, 212, 212, 212, 213, 213,
2648 213, 213, 214, 214, 215, 215, 216, 216, 216, 218,
2649 217, 219, 219, 221, 220, 222, 223, 224, 224, 225,
2650 225, 226, 226, 226, 227, 227, 228, 228, 229, 229,
2651 229, 230, 231, 230, 232, 233, 234, 234, 235, 236,
2652 236, 237, 238, 238, 239, 240, 240, 240, 240, 240,
2653 240, 240, 241, 241, 241, 241, 241, 241, 241, 241,
2654 241, 241, 240, 240, 240, 240, 240, 240, 240, 240,
2655 240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
2656 240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
2657 240, 240, 240, 240, 240, 240, 242, 242, 243, 243,
2658 240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
2659 240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
2660 240, 240, 240, 240, 244, 245, 245, 245, 246, 247
2663 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
2664 static const yytype_uint8 yyr2[] =
2666 0, 2, 1, 0, 1, 1, 2, 1, 1, 1,
2667 1, 1, 1, 4, 1, 0, 1, 1, 2, 1,
2668 1, 1, 1, 1, 4, 1, 1, 0, 2, 1,
2669 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2670 1, 1, 3, 2, 1, 1, 1, 1, 1, 1,
2671 1, 4, 2, 1, 1, 3, 2, 0, 2, 2,
2672 1, 3, 3, 0, 2, 0, 7, 0, 1, 1,
2673 3, 1, 2, 3, 8, 6, 0, 6, 0, 7,
2674 1, 2, 1, 2, 0, 1, 1, 2, 1, 2,
2675 4, 3, 0, 8, 0, 9, 0, 5, 1, 2,
2676 1, 2, 1, 0, 6, 2, 1, 4, 2, 1,
2677 1, 1, 3, 1, 0, 6, 0, 5, 2, 4,
2678 0, 1, 1, 2, 1, 1, 1, 1, 1, 1,
2679 1, 1, 1, 1, 0, 2, 0, 2, 0, 2,
2680 0, 9, 0, 8, 0, 1, 1, 2, 1, 4,
2681 1, 1, 1, 0, 1, 1, 2, 1, 2, 8,
2682 1, 1, 0, 4, 1, 3, 3, 0, 2, 1,
2683 1, 1, 1, 1, 1, 1, 1, 1, 0, 1,
2684 2, 4, 3, 1, 4, 2, 1, 1, 0, 0,
2685 12, 1, 0, 0, 10, 1, 3, 1, 1, 1,
2686 3, 1, 1, 1, 2, 0, 0, 3, 0, 1,
2687 1, 1, 2, 2, 0, 4, 4, 4, 2, 1,
2688 2, 1, 1, 3, 1, 1, 1, 1, 1, 1,
2689 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2690 1, 1, 3, 3, 3, 3, 3, 3, 3, 3,
2691 3, 3, 2, 2, 3, 3, 3, 3, 3, 3,
2692 3, 3, 3, 3, 3, 3, 3, 3, 3, 4,
2693 2, 1, 3, 2, 4, 3, 0, 1, 3, 5,
2694 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
2695 3, 3, 5, 2, 2, 2, 2, 3, 2, 4,
2696 5, 3, 5, 3, 1, 2, 4, 4, 2, 3
2699 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
2700 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
2701 means the default is an error. */
2702 static const yytype_uint16 yydefact[] =
2704 120, 304, 133, 237, 231, 234, 235, 232, 233, 236,
2705 0, 0, 78, 0, 0, 126, 124, 125, 0, 132,
2706 0, 131, 192, 238, 271, 127, 0, 0, 0, 241,
2707 128, 130, 129, 0, 0, 240, 239, 0, 0, 276,
2708 0, 0, 14, 0, 0, 0, 0, 208, 120, 0,
2709 0, 2, 120, 5, 54, 12, 0, 36, 67, 31,
2710 32, 33, 34, 35, 38, 120, 37, 7, 30, 0,
2711 121, 122, 9, 8, 11, 10, 225, 228, 230, 229,
2712 224, 39, 222, 226, 227, 41, 40, 0, 0, 72,
2713 76, 120, 92, 109, 111, 110, 116, 113, 0, 0,
2714 304, 214, 191, 0, 270, 0, 0, 118, 0, 103,
2715 208, 0, 218, 65, 0, 221, 0, 277, 296, 295,
2716 273, 253, 252, 0, 0, 209, 210, 211, 82, 0,
2717 106, 219, 0, 80, 44, 43, 120, 45, 29, 0,
2718 46, 47, 48, 50, 0, 49, 298, 1, 6, 120,
2719 304, 0, 68, 0, 0, 69, 53, 108, 0, 188,
2720 0, 161, 0, 160, 162, 308, 123, 0, 0, 0,
2721 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2722 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2723 294, 293, 0, 0, 0, 0, 0, 0, 0, 0,
2724 0, 0, 0, 0, 0, 0, 0, 0, 208, 0,
2725 0, 55, 73, 0, 0, 0, 120, 114, 0, 195,
2726 0, 198, 197, 309, 206, 178, 0, 0, 0, 27,
2727 0, 297, 0, 0, 280, 0, 272, 275, 212, 213,
2728 83, 205, 59, 60, 105, 220, 58, 81, 42, 28,
2729 120, 0, 205, 0, 0, 52, 305, 187, 186, 0,
2730 134, 136, 0, 223, 267, 268, 265, 266, 246, 247,
2731 249, 248, 244, 245, 287, 286, 282, 281, 289, 290,
2732 288, 284, 283, 285, 250, 251, 301, 259, 258, 257,
2733 291, 0, 256, 255, 254, 242, 243, 263, 262, 260,
2734 264, 261, 0, 0, 303, 0, 0, 0, 0, 0,
2735 25, 0, 120, 17, 23, 0, 20, 19, 22, 21,
2736 120, 112, 0, 208, 215, 167, 0, 0, 179, 183,
2737 107, 119, 196, 269, 0, 26, 217, 0, 278, 0,
2738 0, 57, 0, 120, 13, 57, 0, 0, 0, 0,
2739 0, 138, 0, 0, 205, 163, 164, 0, 216, 274,
2740 0, 0, 299, 120, 0, 0, 117, 18, 120, 0,
2741 0, 0, 0, 185, 180, 205, 0, 0, 120, 0,
2742 203, 202, 201, 204, 0, 62, 61, 51, 0, 120,
2743 306, 307, 178, 135, 0, 0, 199, 137, 142, 57,
2744 0, 292, 300, 302, 77, 0, 84, 0, 115, 207,
2745 177, 173, 170, 171, 169, 172, 176, 175, 174, 168,
2746 167, 0, 0, 182, 0, 0, 98, 102, 100, 104,
2747 63, 279, 56, 0, 75, 0, 139, 140, 0, 120,
2748 166, 165, 79, 0, 0, 0, 85, 88, 86, 24,
2749 184, 193, 181, 96, 0, 99, 101, 120, 66, 120,
2750 205, 120, 200, 0, 157, 0, 0, 120, 155, 0,
2751 27, 93, 89, 87, 27, 27, 205, 64, 74, 0,
2752 148, 152, 0, 0, 0, 120, 146, 150, 151, 158,
2753 188, 143, 156, 27, 91, 0, 0, 0, 189, 120,
2754 141, 147, 0, 90, 194, 97, 94, 27, 0, 0,
2755 0, 0, 149, 178, 27, 190, 0, 0, 205, 95,
2759 /* YYDEFGOTO[NTERM-NUM]. */
2760 static const yytype_int16 yydefgoto[] =
2762 -1, 50, 51, 52, 53, 311, 312, 313, 334, 335,
2763 137, 138, 157, 314, 139, 385, 140, 246, 243, 458,
2764 57, 232, 153, 154, 58, 59, 60, 61, 213, 62,
2765 91, 141, 142, 445, 446, 447, 448, 63, 215, 426,
2766 510, 427, 475, 428, 429, 64, 229, 143, 65, 66,
2767 219, 220, 67, 320, 216, 68, 144, 70, 71, 351,
2768 353, 395, 316, 461, 317, 439, 484, 485, 486, 466,
2769 467, 468, 164, 318, 262, 355, 356, 373, 419, 327,
2770 328, 329, 259, 319, 507, 103, 76, 474, 221, 222,
2771 382, 397, 383, 341, 324, 124, 125, 126, 224, 77,
2772 78, 79, 145, 127, 80, 81, 82, 83, 116, 117,
2776 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
2778 #define YYPACT_NINF -403
2779 static const yytype_int16 yypact[] =
2781 1674, -70, -403, -403, -403, -403, -403, -403, -403, -403,
2782 -15, -72, -403, -52, 19, -403, -403, -403, 80, -403,
2783 2094, -403, 99, -403, 2164, -403, -16, 42, -5, -403,
2784 -403, -403, -403, -1, 5, -403, -403, 2094, 13, 2094,
2785 2094, 2094, -403, 2094, 2094, 2094, 2094, 2094, 634, 123,
2786 128, -403, 504, -403, -403, -403, 8, -403, 2024, -403,
2787 -403, -403, -403, -403, -403, 1926, -403, -403, -403, 240,
2788 361, -403, -403, -403, -403, -403, -403, -403, -403, -403,
2789 38, -403, 2569, -403, -403, -403, -403, 137, 20, -403,
2790 -403, 1926, -403, -403, -403, -403, -403, -403, -87, 42,
2791 -403, -67, -403, 21, -48, 2094, 79, -403, 2094, -403,
2792 2094, 138, -48, -403, 43, 2569, 76, 107, -48, -48,
2793 604, -48, -48, -29, 84, 110, 2094, -403, 210, 211,
2794 2094, 2094, 211, 212, -403, -403, 764, -403, -403, 85,
2795 -403, -403, -403, -403, 209, -403, -403, -403, -403, 1024,
2796 158, 232, -403, 139, 171, -403, 141, -403, 238, 12,
2797 239, -403, 247, -403, -403, -403, -403, 2094, 2094, 2094,
2798 2094, 2094, 2094, 2094, 2094, 2094, 2094, 2094, 2094, 2094,
2799 2094, 2094, 2094, 2094, 2094, 2094, 2094, 2094, 2094, 2094,
2800 -403, -403, 249, 2094, 2094, 2094, 2094, 2094, 2094, 2094,
2801 2094, 2094, 2094, 2094, 2094, 2094, 2094, 2094, 2094, 2094,
2802 11, -403, -403, 2094, 229, 2094, 1154, -403, 42, 133,
2803 135, -403, -403, -403, 142, 15, -10, 90, 2189, 1800,
2804 130, -403, 2094, 2094, -403, 2094, -403, -403, -403, -403,
2805 -403, 161, 169, -403, 38, 38, 169, -403, -403, -403,
2806 1926, 149, 161, 2094, 2094, -403, 168, -403, -403, 280,
2807 231, 233, 286, 2569, 1016, 496, 496, 496, 322, 322,
2808 322, 322, 1016, 1016, 2569, 2569, 2569, 2569, 2569, 2569,
2809 2569, 2569, 2569, 2569, 2630, 2691, -403, 368, 368, 368,
2810 2569, 2386, 2752, 2813, 2874, 1016, 1016, 604, 604, -48,
2811 -48, -48, 157, 2447, 202, 2094, 291, 14, 173, 2260,
2812 -403, 165, 1284, -403, -403, 172, -403, -403, -403, -403,
2813 1154, -403, 42, 2094, -403, -43, 296, 167, 201, -403,
2814 -403, -403, 175, -403, 174, 1800, -403, 44, -403, 200,
2815 63, 207, 211, 894, -403, -27, -11, 46, 113, 189,
2816 42, 298, 42, 190, 161, 217, -403, 2094, -403, -403,
2817 315, 2323, -403, 1926, 2094, 193, -403, -403, 1154, 192,
2818 194, 75, 63, -403, -403, 161, 26, 96, 1926, 2094,
2819 -403, -403, -403, -403, 2094, -403, -403, -403, 2094, 1926,
2820 -403, -403, 15, -403, 42, 199, -403, 230, -403, 207,
2821 286, 2569, -403, -403, -403, 103, 24, 197, -403, -403,
2822 -403, -403, -403, -403, -403, -403, -403, -403, -403, -403,
2823 234, 205, 296, -403, 206, 213, -403, -403, 96, -403,
2824 268, -403, -403, 204, -403, 215, 230, -403, 42, 208,
2825 -403, -403, -403, 2094, 236, 214, 24, -403, -403, -403,
2826 -403, -403, -403, -403, 335, -403, -403, 1926, -403, 1926,
2827 161, 1414, -403, 339, -403, 316, 219, 227, -403, 2508,
2828 1800, -403, -403, -403, 1800, 1800, 161, -403, -403, 223,
2829 -403, -403, 226, 250, 221, 1544, -403, -403, -403, -403,
2830 12, -403, -403, 1800, -403, 222, 224, 225, -403, 1414,
2831 -403, -403, 354, -403, -403, -403, -403, 1800, 228, 241,
2832 235, 243, -403, 15, 1800, -403, 244, 246, 161, -403,
2836 /* YYPGOTO[NTERM-NUM]. */
2837 static const yytype_int16 yypgoto[] =
2839 -403, -403, 218, -403, 312, -299, -403, 61, -402, -31,
2840 1, -55, -85, 48, 2, -23, 321, 251, 58, -403,
2841 -403, -403, -403, -403, -403, -403, -403, -403, -403, -403,
2842 -403, -403, -403, -403, -403, -62, -60, -403, -403, -40,
2843 -403, -36, -403, -403, -403, -403, -403, -403, -403, -403,
2844 6, 50, -403, -403, -403, -403, 0, -403, 331, -403,
2845 -403, -403, 49, -403, 51, -403, -96, -403, -80, -403,
2846 -403, -61, -403, 3, -403, -403, 7, 9, -403, -376,
2847 -403, -311, -79, 4, -403, -403, -403, -403, -403, 388,
2848 -91, 25, 52, -239, -403, -98, -403, -403, -403, -403,
2849 -403, -403, -403, -34, -9, -49, -13, -403, -403, -403,
2850 -403, -403, -403, -403
2853 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
2854 positive, shift that token. If negative, reduce the rule which
2855 number is the opposite. If zero, do what YYDEFACT says.
2856 If YYTABLE_NINF, syntax error. */
2857 #define YYTABLE_NINF -155
2858 static const yytype_int16 yytable[] =
2860 69, 54, 56, 74, 75, 114, 214, 101, 223, 155,
2861 156, 104, 230, 345, 304, 374, 435, 136, 325, 87,
2862 97, 369, 93, 94, 112, 192, 115, 118, 119, 325,
2863 120, 121, 122, 97, 115, 88, 156, 123, 95, 217,
2864 218, -70, 190, 191, 192, 93, 94, 257, 55, 72,
2865 90, 73, 69, 54, 56, 74, 75, 209, 443, 371,
2866 210, 95, 372, 258, 98, 423, 93, 94, 494, 407,
2867 92, 167, 495, 496, 208, 384, 209, 106, 410, 210,
2868 411, 249, 95, 412, 413, 414, 444, 415, 388, 167,
2869 167, 503, 239, 93, 94, 228, 226, 115, 99, 380,
2870 55, 72, 102, 73, 236, 511, 105, 89, 326, 95,
2871 302, 452, 517, 115, 167, 399, 390, 108, 391, 422,
2872 416, 244, 245, 330, 424, 109, 146, 110, 147, 425,
2873 417, 418, 111, 305, 149, 113, 421, 516, 167, 306,
2874 211, 231, 212, 225, 167, 96, 167, 363, 233, 69,
2875 54, 56, 74, 75, 263, 264, 265, 266, 267, 268,
2876 269, 270, 271, 272, 273, 274, 275, 276, 277, 278,
2877 279, 280, 281, 282, 283, 284, 285, 378, 381, 389,
2878 287, 288, 289, 290, 291, 292, 293, 294, 295, 296,
2879 297, 298, 299, 300, 301, 115, 303, 55, 72, 338,
2880 73, 339, 309, 167, 307, 331, 227, 235, 234, 237,
2881 238, 250, 2, 240, 241, 247, 69, 54, 315, 343,
2882 115, 479, 115, 337, 321, 370, -71, 158, 15, 16,
2883 17, 2, 19, 332, 21, 252, 442, 497, 253, 254,
2884 255, 256, 260, 308, 346, 347, 25, 15, 16, 17,
2885 261, 19, 286, 21, 463, 30, 31, 32, 158, 393,
2886 -113, 396, 322, 336, 323, 25, 340, 159, 158, 342,
2887 348, 160, 161, 463, 30, 31, 32, 159, 404, 520,
2888 249, 344, 161, 349, 162, 350, 163, 352, 249, 354,
2889 358, 360, 361, 430, 362, 364, 163, 366, 368, 325,
2890 375, 376, -112, 396, 434, 379, 377, 464, 156, 384,
2891 115, 392, 69, 54, 315, 394, 398, 400, 402, 406,
2892 69, 54, 315, 156, 408, 437, 464, 409, 332, 449,
2893 438, 451, 453, 457, 156, 454, 371, 459, 476, 433,
2894 -153, 470, 489, 490, 401, 431, 471, 462, 460, 498,
2895 432, 491, 499, 500, 504, 405, 505, 509, 506, -154,
2896 512, 514, 168, 513, 148, 2, 115, 251, 69, 54,
2897 315, 115, 477, 367, 478, 515, 440, 518, 519, 152,
2898 242, 15, 16, 17, 472, 19, 473, 21, 455, 169,
2899 170, 171, 456, -155, -155, -155, -155, 176, 177, 25,
2900 386, 166, 156, 508, 156, 501, 492, 441, 30, 31,
2901 32, 502, 190, 191, 192, 107, 193, 194, 195, 436,
2902 0, 0, 0, 0, 420, 0, 0, 0, 0, 450,
2903 469, 201, 202, 0, 203, 204, 205, 206, 207, 465,
2904 0, 0, 0, 0, 208, 0, 209, 0, 0, 210,
2905 0, 0, 0, 0, 0, 0, 0, 0, 190, 191,
2906 192, 483, 481, 482, 487, 488, 0, 465, 0, 0,
2907 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2908 203, 204, 205, 206, 207, 483, 481, 482, 487, 488,
2909 208, 0, 209, 0, 0, 210, 0, 0, 0, 483,
2910 481, 482, 487, 488, -4, 0, 0, 1, 2, 3,
2911 4, 0, 5, 6, 7, 8, 9, 10, 11, 12,
2912 13, 0, 0, 14, 15, 16, 17, 18, 19, 20,
2913 21, 0, 0, 23, 0, 0, 168, 0, 0, 0,
2914 24, 0, 25, 26, 0, 27, 0, 28, 0, 29,
2915 0, 30, 31, 32, 0, 0, 33, 34, 0, 35,
2916 36, 0, 0, -155, -155, -155, 0, 37, 38, 0,
2917 0, 176, 177, 0, 39, 0, 0, 0, 0, 0,
2918 0, 0, 0, 0, 0, 0, 190, 191, 192, 0,
2919 193, 194, 195, 0, 40, 41, 0, 0, 0, 0,
2920 0, 0, 0, 42, 0, 201, 202, 0, 203, 204,
2921 205, 206, 207, 0, 0, 0, 43, 0, 208, 0,
2922 209, 44, 45, 210, 0, 0, 46, 0, 47, 0,
2923 48, 0, 49, 0, 0, 0, -4, 1, 2, 3,
2924 4, 0, 5, 6, 7, 8, 9, 10, 11, 12,
2925 13, 0, 0, 0, 15, 16, 17, 18, 19, 20,
2926 21, 22, 0, 23, 128, 0, 129, 0, 0, 0,
2927 24, 130, 25, 26, 0, 27, 131, 28, 0, 29,
2928 132, 30, 31, 32, 0, 0, 33, 34, 0, 35,
2929 36, 0, 0, 0, 190, 191, 192, 37, 38, 0,
2930 133, 0, 0, 0, 39, 0, 0, 0, 0, 0,
2931 0, 0, 0, 0, 0, 0, 0, 0, 205, 206,
2932 207, 0, 0, 0, 40, 41, 208, 0, 209, 0,
2933 0, 210, 0, 134, 0, 0, 0, 0, 0, 0,
2934 0, 0, 0, 0, 0, 0, 43, 0, 0, 0,
2935 0, 44, 45, 0, 0, 0, 46, 0, 47, 0,
2936 48, 0, 49, 0, 0, 0, 135, 1, 2, 3,
2937 4, 0, 5, 6, 7, 8, 9, 10, 11, 12,
2938 13, 0, 0, 0, 15, 16, 17, 18, 19, 20,
2939 21, 22, 0, 23, 128, 0, 129, 0, 0, 0,
2940 24, 130, 25, 26, 0, 27, 131, 28, 0, 29,
2941 132, 30, 31, 32, 0, 0, 33, 34, 0, 35,
2942 36, 0, 0, 0, 0, 0, 0, 37, 38, 0,
2943 133, 0, 0, 0, 39, 0, 0, 0, 0, 0,
2944 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2945 0, 0, 0, 0, 40, 41, 0, 0, 0, 0,
2946 0, 0, 0, 134, 0, 0, 0, 0, 0, 0,
2947 0, 0, 0, 0, 0, 0, 43, 0, 0, 0,
2948 0, 44, 45, 0, 0, 0, 46, 0, 47, 0,
2949 48, 0, 49, 0, 0, 0, 248, 1, 2, 3,
2950 4, 0, 5, 6, 7, 8, 9, 10, 11, 12,
2951 13, 0, 0, 0, 15, 16, 17, 18, 19, 20,
2952 21, 22, 0, 23, 128, 0, 129, 0, 0, 0,
2953 24, 130, 25, 26, 0, 27, 131, 28, 0, 29,
2954 132, 30, 31, 32, 0, 0, 33, 34, 0, 35,
2955 36, 0, 0, 0, 0, 0, 0, 37, 38, 0,
2956 133, 0, 0, 0, 39, 0, 0, 0, 0, 0,
2957 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2958 0, 0, 0, 0, 40, 41, 0, 0, 0, 0,
2959 0, 0, 0, 134, 0, 0, 0, 0, 0, 0,
2960 0, 0, 0, 0, 0, 0, 43, 0, 0, 0,
2961 0, 44, 45, 0, 0, 0, 46, 0, 47, 0,
2962 48, 0, 49, 0, 0, 0, 387, 1, 2, 3,
2963 4, 0, 5, 6, 7, 8, 9, 10, 11, 12,
2964 13, 0, 0, 14, 15, 16, 17, 18, 19, 20,
2965 21, 0, 0, 23, 0, 0, -155, 0, 0, 0,
2966 24, 0, 25, 26, 0, 27, 0, 28, 0, 29,
2967 0, 30, 31, 32, 0, 0, 33, 34, 0, 35,
2968 36, 0, 0, 0, 0, 0, 0, 37, 38, 0,
2969 0, -155, -155, 0, 39, 0, 0, 0, 0, 0,
2970 0, 0, 0, 0, 0, 0, 190, 191, 192, 0,
2971 193, 194, 195, 0, 40, 41, 0, 0, 0, 0,
2972 0, 0, 0, 42, 0, -155, -155, 0, 203, 204,
2973 205, 206, 207, 0, 0, 0, 43, 0, 208, 0,
2974 209, 44, 45, 210, 0, 0, 46, 0, 47, 0,
2975 48, 0, 49, 0, 0, 0, -3, 1, 2, 3,
2976 4, 0, 5, 6, 7, 8, 9, 10, 11, 12,
2977 13, 0, 0, 0, 15, 16, 17, 18, 19, 20,
2978 21, 0, 0, 23, 0, 0, 0, 0, 0, 0,
2979 24, 0, 25, 26, 0, 27, 0, 28, 0, 29,
2980 0, 30, 31, 32, 0, 0, 33, 34, 0, 35,
2981 36, 0, 0, 0, 0, 0, 0, 37, 38, 0,
2982 0, 0, 0, 0, 39, 0, 0, 0, 0, 0,
2983 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2984 0, 0, 0, 0, 40, 41, 0, 0, 0, 0,
2985 0, 0, 0, 310, 0, 0, 0, 0, 0, 0,
2986 0, 0, 0, 0, 0, 0, 43, 0, 0, 0,
2987 0, 44, 45, 0, 0, 0, 46, 0, 47, 0,
2988 48, 0, 49, 0, 0, 0, -15, 1, 2, 3,
2989 4, 0, 5, 6, 7, 8, 9, 10, 11, 12,
2990 13, 0, 0, 0, 15, 16, 17, 18, 19, 20,
2991 21, 0, 0, 23, 0, 0, 0, 0, 0, 0,
2992 24, 0, 25, 26, 0, 27, 0, 28, 0, 29,
2993 0, 30, 31, 32, 0, 0, 33, 34, 0, 35,
2994 36, 0, 0, 0, 0, 0, 0, 37, 38, 0,
2995 0, 0, 0, 0, 39, 0, 0, 0, 0, 0,
2996 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2997 0, 0, 0, 0, 40, 41, 0, 0, 0, 0,
2998 0, 0, 0, 310, 0, 0, 0, 0, 0, 0,
2999 0, 0, 0, 0, 0, 0, 43, 0, 0, 0,
3000 0, 44, 45, 0, 0, 0, 46, 0, 47, 0,
3001 48, 0, 49, 0, 0, 0, -16, 1, 2, 3,
3002 4, 0, 5, 6, 7, 8, 9, 10, 11, 12,
3003 13, 0, 0, 0, 15, 16, 17, 18, 19, 20,
3004 21, 0, 0, 23, 0, 0, 0, 0, 0, 0,
3005 24, 0, 25, 26, 0, 27, 0, 28, 0, 29,
3006 0, 30, 31, 32, 0, 0, 33, 34, 0, 35,
3007 36, 0, 0, 0, 0, 0, 0, 37, 38, 0,
3008 0, 0, 0, 0, 39, 0, 0, 0, 0, 0,
3009 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3010 0, 0, 0, 0, 40, 41, 0, 0, 0, 0,
3011 0, 0, 0, 480, 0, 0, 0, 0, 0, 0,
3012 0, 0, 0, 0, 0, 0, 43, 0, 0, 0,
3013 0, 44, 45, 0, 0, 0, 46, 0, 47, 0,
3014 48, 0, 49, 0, 0, 0, -144, 1, 2, 3,
3015 4, 0, 5, 6, 7, 8, 9, 10, 11, 12,
3016 13, 0, 0, 0, 15, 16, 17, 18, 19, 20,
3017 21, 0, 0, 23, 0, 0, 0, 0, 0, 0,
3018 24, 0, 25, 26, 0, 27, 0, 28, 0, 29,
3019 0, 30, 31, 32, 0, 0, 33, 34, 0, 35,
3020 36, 0, 0, 0, 0, 0, 0, 37, 38, 0,
3021 0, 0, 0, 0, 39, 0, 0, 0, 0, 0,
3022 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3023 0, 0, 0, 0, 40, 41, 0, 0, 0, 0,
3024 0, 0, 0, 480, 0, 0, 0, 0, 0, 0,
3025 0, 0, 0, 0, 0, 0, 43, 0, 0, 0,
3026 0, 44, 45, 0, 0, 0, 46, 0, 47, 0,
3027 48, 0, 49, 0, -3, 0, -145, 1, 2, 3,
3028 4, 0, 5, 6, 7, 8, 9, 10, 11, 12,
3029 13, 0, 0, 14, 15, 16, 17, 18, 19, 20,
3030 21, 0, 0, 23, 0, 0, 0, 0, 0, 0,
3031 24, 0, 25, 26, 0, 27, 0, 28, 0, 29,
3032 0, 30, 31, 32, 0, 0, 33, 34, 0, 35,
3033 36, 0, 0, 0, 0, 0, 0, 37, 38, 0,
3034 0, 0, 0, 0, 39, 0, 0, 0, 0, 0,
3035 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3036 0, 0, 0, 0, 40, 41, 0, 0, 0, 0,
3037 0, 0, 0, 42, 0, 0, 0, 0, 0, 0,
3038 0, 0, 0, 0, 0, 0, 43, 0, 0, 0,
3039 0, 44, 45, 0, 0, 0, 46, 0, 47, 0,
3040 48, 0, 49, 1, 2, 3, 4, 0, 5, 6,
3041 7, 8, 9, 10, 11, 12, 13, 0, -120, 0,
3042 15, 16, 17, 18, 19, 20, 21, 22, 0, 23,
3043 128, 0, 129, 0, 0, 0, 24, 130, 25, 26,
3044 0, 27, 131, 28, 0, 29, 132, 30, 31, 32,
3045 0, 0, 33, 34, 0, 35, 36, 0, 0, 0,
3046 0, 0, 0, 37, 38, 0, 133, 0, 0, 0,
3047 39, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3048 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3049 40, 41, 0, 0, 0, 0, 0, 0, 0, 134,
3050 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3051 0, 0, 43, 0, 0, 0, 0, 44, 45, 0,
3052 0, 0, 46, 0, 47, 0, 48, 0, 49, 1,
3053 2, 3, 4, 0, 5, 6, 7, 8, 9, 10,
3054 11, 12, 13, 0, 0, 0, 15, 16, 17, 18,
3055 19, 20, 21, 22, 0, 23, 128, 0, 129, 0,
3056 0, 0, 24, 130, 25, 26, 0, 27, 131, 28,
3057 0, 29, 132, 30, 31, 32, 0, 0, 33, 34,
3058 0, 35, 36, 0, 0, 0, 0, 0, 0, 37,
3059 38, 0, 133, 0, 0, 0, 39, 0, 0, 0,
3060 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3061 0, 0, 0, 0, 0, 0, 40, 41, 0, 0,
3062 0, 0, 0, 0, 0, 134, 0, 150, 0, 3,
3063 4, 0, 5, 6, 7, 8, 9, 0, 43, 0,
3064 0, 0, 0, 44, 45, 0, 0, 0, 46, 20,
3065 47, 22, 48, 23, 49, 0, 129, 0, 0, 0,
3066 24, 0, 0, 0, 0, 0, 0, 28, 0, 29,
3067 151, 0, 0, 0, 0, 0, 0, 34, 0, 35,
3068 36, 0, 0, 0, 0, 0, 0, 37, 0, 0,
3069 0, 0, 0, 0, 39, 0, 0, 100, 0, 3,
3070 4, 0, 5, 6, 7, 8, 9, 0, 0, 0,
3071 0, 0, 0, 0, 40, 41, 0, 0, 0, 20,
3072 0, 22, 0, 23, 0, 0, 0, 0, 0, 0,
3073 24, 0, 0, 0, 0, 0, 43, 28, 0, 29,
3074 0, 44, 45, 0, 0, 0, 46, 34, 47, 35,
3075 36, 0, 49, 0, 0, 0, 0, 37, 0, 0,
3076 0, 0, 0, 0, 39, 0, 0, 100, 0, 3,
3077 4, 0, 5, 6, 7, 8, 9, 0, 0, 0,
3078 0, 0, 0, 0, 40, 41, 0, 0, 0, 20,
3079 0, 22, 0, 23, 0, 0, 0, 0, 0, 0,
3080 0, 0, 0, 0, 0, 0, 43, 0, 0, 29,
3081 0, 44, 45, 0, 0, 0, 46, 34, 47, 35,
3082 36, 0, 49, 0, 0, 0, 0, 0, 0, 168,
3083 0, 0, 0, 0, 39, 0, 0, 0, 0, 0,
3084 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3085 0, 0, 0, 0, 40, 41, 169, 170, 171, 0,
3086 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
3087 182, 183, 184, 185, 186, 187, 188, 189, 0, 190,
3088 191, 192, 0, 193, 194, 195, 46, 0, 47, 0,
3089 0, 196, 49, 197, 0, 198, 199, 200, 201, 202,
3090 168, 203, 204, 205, 206, 207, 0, 0, 0, 0,
3091 0, 208, 0, 209, 0, 0, 210, 0, 0, 0,
3092 0, 0, 333, 0, 0, 0, 0, 169, 170, 171,
3093 0, 172, 173, 174, 175, 176, 177, 178, 179, 180,
3094 181, 182, 183, 184, 185, 186, 187, 188, 189, 0,
3095 190, 191, 192, 0, 193, 194, 195, 0, 0, 0,
3096 0, 0, 196, 168, 197, 0, 198, 199, 200, 201,
3097 202, 0, 203, 204, 205, 206, 207, 0, 0, 0,
3098 0, 0, 208, 0, 209, 0, 0, 210, 0, 0,
3099 169, 170, 171, 365, 172, 173, 174, 175, 176, 177,
3100 178, 179, 180, 181, 182, 183, 184, 185, 186, 187,
3101 188, 189, 0, 190, 191, 192, 0, 193, 194, 195,
3102 0, 0, 0, 0, 0, 196, 168, 197, 0, 198,
3103 199, 200, 201, 202, 0, 203, 204, 205, 206, 207,
3104 0, 0, 0, 0, 0, 208, 0, 209, 0, 0,
3105 210, 0, 0, 169, 170, 171, 403, 172, 173, 174,
3106 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
3107 185, 186, 187, 188, 189, 0, 190, 191, 192, 0,
3108 193, 194, 195, 0, 0, 0, 0, 168, 196, 0,
3109 197, 357, 198, 199, 200, 201, 202, 0, 203, 204,
3110 205, 206, 207, 0, 0, 0, 0, 0, 208, 0,
3111 209, 0, 0, 210, 169, 170, 171, 0, 172, 173,
3112 174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
3113 184, 185, 186, 187, 188, 189, 0, 190, 191, 192,
3114 0, 193, 194, 195, 0, 0, 0, 0, 168, 196,
3115 0, 197, 0, 198, 199, 200, 201, 202, 0, 203,
3116 204, 205, 206, 207, 0, 0, 0, 0, 0, 208,
3117 0, 209, 359, 0, 210, 169, 170, 171, 0, 172,
3118 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
3119 183, 184, 185, 186, 187, 188, 189, 0, 190, 191,
3120 192, 0, 193, 194, 195, 0, 0, 0, 0, 168,
3121 196, 0, 197, 493, 198, 199, 200, 201, 202, 0,
3122 203, 204, 205, 206, 207, 0, 0, 0, 0, 0,
3123 208, 0, 209, 0, 0, 210, 169, 170, 171, 0,
3124 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
3125 182, 183, 184, 185, 186, 187, 188, 189, 0, 190,
3126 191, 192, 0, 193, 194, 195, 0, 0, 0, 0,
3127 168, 196, 0, 197, 0, 198, 199, 200, 201, 202,
3128 0, 203, 204, 205, 206, 207, 0, 0, 0, 0,
3129 0, 208, 0, 209, 0, 0, 210, 169, 170, 171,
3130 0, 172, 173, 174, 175, 176, 177, 0, 0, 0,
3131 0, 0, 0, 0, 0, 0, 0, 0, 189, 0,
3132 190, 191, 192, 0, 193, 194, 195, 0, 0, 0,
3133 0, 168, 0, 0, 0, 0, 198, 199, 200, 201,
3134 202, 0, 203, 204, 205, 206, 207, 0, 0, 0,
3135 0, 0, 208, 0, 209, 0, 0, 210, 169, 170,
3136 171, 0, 172, 173, 174, 175, 176, 177, 0, 0,
3137 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3138 0, 190, 191, 192, 0, 193, 194, 195, 0, 0,
3139 0, 0, 168, 0, 0, 0, 0, 198, 199, 200,
3140 201, 202, 0, 203, 204, 205, 206, 207, 0, 0,
3141 0, 0, 0, 208, 0, 209, 0, 0, 210, 169,
3142 170, 171, 0, 172, 173, 174, 175, 176, 177, 0,
3143 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3144 0, 0, 190, 191, 192, 0, 193, 194, 195, 0,
3145 0, 0, 0, 168, 0, 0, 0, 0, 0, 199,
3146 200, 201, 202, 0, 203, 204, 205, 206, 207, 0,
3147 0, 0, 0, 0, 208, 0, 209, 0, 0, 210,
3148 169, 170, 171, 0, 172, 173, 174, 175, 176, 177,
3149 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3150 0, 0, 0, 190, 191, 192, 0, 193, 194, 195,
3151 0, 0, 0, 0, 168, 0, 0, 0, 0, 0,
3152 0, 200, 201, 202, 0, 203, 204, 205, 206, 207,
3153 0, 0, 0, 0, 0, 208, 0, 209, 0, 0,
3154 210, 169, 170, 171, 0, 172, 173, 174, 175, 176,
3155 177, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3156 0, 0, 0, 0, 190, 191, 192, 0, 193, 194,
3157 195, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3158 0, 0, -155, 201, 202, 0, 203, 204, 205, 206,
3159 207, 0, 0, 0, 0, 0, 208, 0, 209, 0,
3163 static const yytype_int16 yycheck[] =
3165 0, 0, 0, 0, 0, 39, 91, 20, 99, 58,
3166 65, 24, 110, 252, 3, 326, 392, 48, 3, 89,
3167 14, 320, 3, 4, 37, 92, 39, 40, 41, 3,
3168 43, 44, 45, 27, 47, 50, 91, 46, 19, 126,
3169 127, 68, 90, 91, 92, 3, 4, 35, 0, 0,
3170 122, 0, 52, 52, 52, 52, 52, 124, 34, 102,
3171 127, 19, 105, 51, 14, 376, 3, 4, 470, 368,
3172 122, 100, 474, 475, 122, 102, 124, 27, 3, 127,
3173 5, 136, 19, 8, 9, 10, 62, 12, 99, 100,
3174 100, 493, 126, 3, 4, 108, 105, 110, 18, 36,
3175 52, 52, 3, 52, 133, 507, 122, 122, 93, 19,
3176 208, 422, 514, 126, 100, 354, 3, 122, 5, 93,
3177 45, 130, 131, 133, 28, 126, 3, 122, 0, 33,
3178 55, 56, 127, 122, 126, 122, 375, 513, 100, 128,
3179 3, 3, 122, 122, 100, 126, 100, 133, 105, 149,
3180 149, 149, 149, 149, 167, 168, 169, 170, 171, 172,
3181 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
3182 183, 184, 185, 186, 187, 188, 189, 133, 115, 133,
3183 193, 194, 195, 196, 197, 198, 199, 200, 201, 202,
3184 203, 204, 205, 206, 207, 208, 209, 149, 149, 233,
3185 149, 235, 215, 100, 213, 115, 127, 100, 132, 125,
3186 100, 126, 4, 3, 3, 3, 216, 216, 216, 250,
3187 233, 460, 235, 232, 218, 323, 68, 18, 20, 21,
3188 22, 4, 24, 227, 26, 3, 133, 476, 99, 68,
3189 99, 3, 3, 14, 253, 254, 38, 20, 21, 22,
3190 3, 24, 3, 26, 46, 47, 48, 49, 18, 350,
3191 127, 352, 127, 133, 122, 38, 105, 27, 18, 100,
3192 102, 31, 32, 46, 47, 48, 49, 27, 363, 518,
3193 335, 132, 32, 3, 44, 54, 46, 54, 343, 3,
3194 133, 89, 305, 378, 3, 122, 46, 132, 126, 3,
3195 133, 100, 127, 394, 389, 105, 132, 99, 363, 102,
3196 323, 122, 312, 312, 312, 17, 126, 100, 3, 126,
3197 320, 320, 320, 378, 132, 126, 99, 133, 322, 132,
3198 100, 126, 126, 65, 389, 122, 102, 133, 3, 388,
3199 132, 105, 3, 27, 357, 379, 132, 438, 133, 126,
3200 384, 132, 126, 132, 132, 364, 132, 3, 133, 132,
3201 132, 126, 40, 122, 52, 4, 379, 149, 368, 368,
3202 368, 384, 457, 312, 459, 132, 399, 133, 132, 58,
3203 129, 20, 21, 22, 446, 24, 446, 26, 428, 67,
3204 68, 69, 428, 71, 72, 73, 74, 75, 76, 38,
3205 342, 70, 457, 499, 459, 485, 467, 400, 47, 48,
3206 49, 490, 90, 91, 92, 27, 94, 95, 96, 394,
3207 -1, -1, -1, -1, 372, -1, -1, -1, -1, 420,
3208 443, 109, 110, -1, 112, 113, 114, 115, 116, 439,
3209 -1, -1, -1, -1, 122, -1, 124, -1, -1, 127,
3210 -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
3211 92, 461, 461, 461, 461, 461, -1, 467, -1, -1,
3212 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3213 112, 113, 114, 115, 116, 485, 485, 485, 485, 485,
3214 122, -1, 124, -1, -1, 127, -1, -1, -1, 499,
3215 499, 499, 499, 499, 0, -1, -1, 3, 4, 5,
3216 6, -1, 8, 9, 10, 11, 12, 13, 14, 15,
3217 16, -1, -1, 19, 20, 21, 22, 23, 24, 25,
3218 26, -1, -1, 29, -1, -1, 40, -1, -1, -1,
3219 36, -1, 38, 39, -1, 41, -1, 43, -1, 45,
3220 -1, 47, 48, 49, -1, -1, 52, 53, -1, 55,
3221 56, -1, -1, 67, 68, 69, -1, 63, 64, -1,
3222 -1, 75, 76, -1, 70, -1, -1, -1, -1, -1,
3223 -1, -1, -1, -1, -1, -1, 90, 91, 92, -1,
3224 94, 95, 96, -1, 90, 91, -1, -1, -1, -1,
3225 -1, -1, -1, 99, -1, 109, 110, -1, 112, 113,
3226 114, 115, 116, -1, -1, -1, 112, -1, 122, -1,
3227 124, 117, 118, 127, -1, -1, 122, -1, 124, -1,
3228 126, -1, 128, -1, -1, -1, 132, 3, 4, 5,
3229 6, -1, 8, 9, 10, 11, 12, 13, 14, 15,
3230 16, -1, -1, -1, 20, 21, 22, 23, 24, 25,
3231 26, 27, -1, 29, 30, -1, 32, -1, -1, -1,
3232 36, 37, 38, 39, -1, 41, 42, 43, -1, 45,
3233 46, 47, 48, 49, -1, -1, 52, 53, -1, 55,
3234 56, -1, -1, -1, 90, 91, 92, 63, 64, -1,
3235 66, -1, -1, -1, 70, -1, -1, -1, -1, -1,
3236 -1, -1, -1, -1, -1, -1, -1, -1, 114, 115,
3237 116, -1, -1, -1, 90, 91, 122, -1, 124, -1,
3238 -1, 127, -1, 99, -1, -1, -1, -1, -1, -1,
3239 -1, -1, -1, -1, -1, -1, 112, -1, -1, -1,
3240 -1, 117, 118, -1, -1, -1, 122, -1, 124, -1,
3241 126, -1, 128, -1, -1, -1, 132, 3, 4, 5,
3242 6, -1, 8, 9, 10, 11, 12, 13, 14, 15,
3243 16, -1, -1, -1, 20, 21, 22, 23, 24, 25,
3244 26, 27, -1, 29, 30, -1, 32, -1, -1, -1,
3245 36, 37, 38, 39, -1, 41, 42, 43, -1, 45,
3246 46, 47, 48, 49, -1, -1, 52, 53, -1, 55,
3247 56, -1, -1, -1, -1, -1, -1, 63, 64, -1,
3248 66, -1, -1, -1, 70, -1, -1, -1, -1, -1,
3249 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3250 -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
3251 -1, -1, -1, 99, -1, -1, -1, -1, -1, -1,
3252 -1, -1, -1, -1, -1, -1, 112, -1, -1, -1,
3253 -1, 117, 118, -1, -1, -1, 122, -1, 124, -1,
3254 126, -1, 128, -1, -1, -1, 132, 3, 4, 5,
3255 6, -1, 8, 9, 10, 11, 12, 13, 14, 15,
3256 16, -1, -1, -1, 20, 21, 22, 23, 24, 25,
3257 26, 27, -1, 29, 30, -1, 32, -1, -1, -1,
3258 36, 37, 38, 39, -1, 41, 42, 43, -1, 45,
3259 46, 47, 48, 49, -1, -1, 52, 53, -1, 55,
3260 56, -1, -1, -1, -1, -1, -1, 63, 64, -1,
3261 66, -1, -1, -1, 70, -1, -1, -1, -1, -1,
3262 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3263 -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
3264 -1, -1, -1, 99, -1, -1, -1, -1, -1, -1,
3265 -1, -1, -1, -1, -1, -1, 112, -1, -1, -1,
3266 -1, 117, 118, -1, -1, -1, 122, -1, 124, -1,
3267 126, -1, 128, -1, -1, -1, 132, 3, 4, 5,
3268 6, -1, 8, 9, 10, 11, 12, 13, 14, 15,
3269 16, -1, -1, 19, 20, 21, 22, 23, 24, 25,
3270 26, -1, -1, 29, -1, -1, 40, -1, -1, -1,
3271 36, -1, 38, 39, -1, 41, -1, 43, -1, 45,
3272 -1, 47, 48, 49, -1, -1, 52, 53, -1, 55,
3273 56, -1, -1, -1, -1, -1, -1, 63, 64, -1,
3274 -1, 75, 76, -1, 70, -1, -1, -1, -1, -1,
3275 -1, -1, -1, -1, -1, -1, 90, 91, 92, -1,
3276 94, 95, 96, -1, 90, 91, -1, -1, -1, -1,
3277 -1, -1, -1, 99, -1, 109, 110, -1, 112, 113,
3278 114, 115, 116, -1, -1, -1, 112, -1, 122, -1,
3279 124, 117, 118, 127, -1, -1, 122, -1, 124, -1,
3280 126, -1, 128, -1, -1, -1, 132, 3, 4, 5,
3281 6, -1, 8, 9, 10, 11, 12, 13, 14, 15,
3282 16, -1, -1, -1, 20, 21, 22, 23, 24, 25,
3283 26, -1, -1, 29, -1, -1, -1, -1, -1, -1,
3284 36, -1, 38, 39, -1, 41, -1, 43, -1, 45,
3285 -1, 47, 48, 49, -1, -1, 52, 53, -1, 55,
3286 56, -1, -1, -1, -1, -1, -1, 63, 64, -1,
3287 -1, -1, -1, -1, 70, -1, -1, -1, -1, -1,
3288 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3289 -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
3290 -1, -1, -1, 99, -1, -1, -1, -1, -1, -1,
3291 -1, -1, -1, -1, -1, -1, 112, -1, -1, -1,
3292 -1, 117, 118, -1, -1, -1, 122, -1, 124, -1,
3293 126, -1, 128, -1, -1, -1, 132, 3, 4, 5,
3294 6, -1, 8, 9, 10, 11, 12, 13, 14, 15,
3295 16, -1, -1, -1, 20, 21, 22, 23, 24, 25,
3296 26, -1, -1, 29, -1, -1, -1, -1, -1, -1,
3297 36, -1, 38, 39, -1, 41, -1, 43, -1, 45,
3298 -1, 47, 48, 49, -1, -1, 52, 53, -1, 55,
3299 56, -1, -1, -1, -1, -1, -1, 63, 64, -1,
3300 -1, -1, -1, -1, 70, -1, -1, -1, -1, -1,
3301 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3302 -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
3303 -1, -1, -1, 99, -1, -1, -1, -1, -1, -1,
3304 -1, -1, -1, -1, -1, -1, 112, -1, -1, -1,
3305 -1, 117, 118, -1, -1, -1, 122, -1, 124, -1,
3306 126, -1, 128, -1, -1, -1, 132, 3, 4, 5,
3307 6, -1, 8, 9, 10, 11, 12, 13, 14, 15,
3308 16, -1, -1, -1, 20, 21, 22, 23, 24, 25,
3309 26, -1, -1, 29, -1, -1, -1, -1, -1, -1,
3310 36, -1, 38, 39, -1, 41, -1, 43, -1, 45,
3311 -1, 47, 48, 49, -1, -1, 52, 53, -1, 55,
3312 56, -1, -1, -1, -1, -1, -1, 63, 64, -1,
3313 -1, -1, -1, -1, 70, -1, -1, -1, -1, -1,
3314 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3315 -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
3316 -1, -1, -1, 99, -1, -1, -1, -1, -1, -1,
3317 -1, -1, -1, -1, -1, -1, 112, -1, -1, -1,
3318 -1, 117, 118, -1, -1, -1, 122, -1, 124, -1,
3319 126, -1, 128, -1, -1, -1, 132, 3, 4, 5,
3320 6, -1, 8, 9, 10, 11, 12, 13, 14, 15,
3321 16, -1, -1, -1, 20, 21, 22, 23, 24, 25,
3322 26, -1, -1, 29, -1, -1, -1, -1, -1, -1,
3323 36, -1, 38, 39, -1, 41, -1, 43, -1, 45,
3324 -1, 47, 48, 49, -1, -1, 52, 53, -1, 55,
3325 56, -1, -1, -1, -1, -1, -1, 63, 64, -1,
3326 -1, -1, -1, -1, 70, -1, -1, -1, -1, -1,
3327 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3328 -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
3329 -1, -1, -1, 99, -1, -1, -1, -1, -1, -1,
3330 -1, -1, -1, -1, -1, -1, 112, -1, -1, -1,
3331 -1, 117, 118, -1, -1, -1, 122, -1, 124, -1,
3332 126, -1, 128, -1, 0, -1, 132, 3, 4, 5,
3333 6, -1, 8, 9, 10, 11, 12, 13, 14, 15,
3334 16, -1, -1, 19, 20, 21, 22, 23, 24, 25,
3335 26, -1, -1, 29, -1, -1, -1, -1, -1, -1,
3336 36, -1, 38, 39, -1, 41, -1, 43, -1, 45,
3337 -1, 47, 48, 49, -1, -1, 52, 53, -1, 55,
3338 56, -1, -1, -1, -1, -1, -1, 63, 64, -1,
3339 -1, -1, -1, -1, 70, -1, -1, -1, -1, -1,
3340 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3341 -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
3342 -1, -1, -1, 99, -1, -1, -1, -1, -1, -1,
3343 -1, -1, -1, -1, -1, -1, 112, -1, -1, -1,
3344 -1, 117, 118, -1, -1, -1, 122, -1, 124, -1,
3345 126, -1, 128, 3, 4, 5, 6, -1, 8, 9,
3346 10, 11, 12, 13, 14, 15, 16, -1, 18, -1,
3347 20, 21, 22, 23, 24, 25, 26, 27, -1, 29,
3348 30, -1, 32, -1, -1, -1, 36, 37, 38, 39,
3349 -1, 41, 42, 43, -1, 45, 46, 47, 48, 49,
3350 -1, -1, 52, 53, -1, 55, 56, -1, -1, -1,
3351 -1, -1, -1, 63, 64, -1, 66, -1, -1, -1,
3352 70, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3353 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3354 90, 91, -1, -1, -1, -1, -1, -1, -1, 99,
3355 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3356 -1, -1, 112, -1, -1, -1, -1, 117, 118, -1,
3357 -1, -1, 122, -1, 124, -1, 126, -1, 128, 3,
3358 4, 5, 6, -1, 8, 9, 10, 11, 12, 13,
3359 14, 15, 16, -1, -1, -1, 20, 21, 22, 23,
3360 24, 25, 26, 27, -1, 29, 30, -1, 32, -1,
3361 -1, -1, 36, 37, 38, 39, -1, 41, 42, 43,
3362 -1, 45, 46, 47, 48, 49, -1, -1, 52, 53,
3363 -1, 55, 56, -1, -1, -1, -1, -1, -1, 63,
3364 64, -1, 66, -1, -1, -1, 70, -1, -1, -1,
3365 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3366 -1, -1, -1, -1, -1, -1, 90, 91, -1, -1,
3367 -1, -1, -1, -1, -1, 99, -1, 3, -1, 5,
3368 6, -1, 8, 9, 10, 11, 12, -1, 112, -1,
3369 -1, -1, -1, 117, 118, -1, -1, -1, 122, 25,
3370 124, 27, 126, 29, 128, -1, 32, -1, -1, -1,
3371 36, -1, -1, -1, -1, -1, -1, 43, -1, 45,
3372 46, -1, -1, -1, -1, -1, -1, 53, -1, 55,
3373 56, -1, -1, -1, -1, -1, -1, 63, -1, -1,
3374 -1, -1, -1, -1, 70, -1, -1, 3, -1, 5,
3375 6, -1, 8, 9, 10, 11, 12, -1, -1, -1,
3376 -1, -1, -1, -1, 90, 91, -1, -1, -1, 25,
3377 -1, 27, -1, 29, -1, -1, -1, -1, -1, -1,
3378 36, -1, -1, -1, -1, -1, 112, 43, -1, 45,
3379 -1, 117, 118, -1, -1, -1, 122, 53, 124, 55,
3380 56, -1, 128, -1, -1, -1, -1, 63, -1, -1,
3381 -1, -1, -1, -1, 70, -1, -1, 3, -1, 5,
3382 6, -1, 8, 9, 10, 11, 12, -1, -1, -1,
3383 -1, -1, -1, -1, 90, 91, -1, -1, -1, 25,
3384 -1, 27, -1, 29, -1, -1, -1, -1, -1, -1,
3385 -1, -1, -1, -1, -1, -1, 112, -1, -1, 45,
3386 -1, 117, 118, -1, -1, -1, 122, 53, 124, 55,
3387 56, -1, 128, -1, -1, -1, -1, -1, -1, 40,
3388 -1, -1, -1, -1, 70, -1, -1, -1, -1, -1,
3389 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3390 -1, -1, -1, -1, 90, 91, 67, 68, 69, -1,
3391 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
3392 81, 82, 83, 84, 85, 86, 87, 88, -1, 90,
3393 91, 92, -1, 94, 95, 96, 122, -1, 124, -1,
3394 -1, 102, 128, 104, -1, 106, 107, 108, 109, 110,
3395 40, 112, 113, 114, 115, 116, -1, -1, -1, -1,
3396 -1, 122, -1, 124, -1, -1, 127, -1, -1, -1,
3397 -1, -1, 133, -1, -1, -1, -1, 67, 68, 69,
3398 -1, 71, 72, 73, 74, 75, 76, 77, 78, 79,
3399 80, 81, 82, 83, 84, 85, 86, 87, 88, -1,
3400 90, 91, 92, -1, 94, 95, 96, -1, -1, -1,
3401 -1, -1, 102, 40, 104, -1, 106, 107, 108, 109,
3402 110, -1, 112, 113, 114, 115, 116, -1, -1, -1,
3403 -1, -1, 122, -1, 124, -1, -1, 127, -1, -1,
3404 67, 68, 69, 133, 71, 72, 73, 74, 75, 76,
3405 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
3406 87, 88, -1, 90, 91, 92, -1, 94, 95, 96,
3407 -1, -1, -1, -1, -1, 102, 40, 104, -1, 106,
3408 107, 108, 109, 110, -1, 112, 113, 114, 115, 116,
3409 -1, -1, -1, -1, -1, 122, -1, 124, -1, -1,
3410 127, -1, -1, 67, 68, 69, 133, 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, 105, 106, 107, 108, 109, 110, -1, 112, 113,
3415 114, 115, 116, -1, -1, -1, -1, -1, 122, -1,
3416 124, -1, -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, -1, 106, 107, 108, 109, 110, -1, 112,
3421 113, 114, 115, 116, -1, -1, -1, -1, -1, 122,
3422 -1, 124, 125, -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, 105, 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, 77, 78, 79, 80,
3430 81, 82, 83, 84, 85, 86, 87, 88, -1, 90,
3431 91, 92, -1, 94, 95, 96, -1, -1, -1, -1,
3432 40, 102, -1, 104, -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, 88, -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, 106, 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, 107,
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, 108, 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, 4, 19, 126, 184, 185, 18,
3482 3, 240, 3, 219, 240, 122, 185, 223, 122, 126,
3483 122, 127, 240, 122, 237, 240, 242, 243, 240, 240,
3484 240, 240, 240, 238, 229, 230, 231, 237, 30, 32,
3485 37, 42, 46, 66, 99, 132, 143, 144, 145, 148,
3486 150, 165, 166, 181, 190, 236, 3, 0, 138, 126,
3487 3, 46, 150, 156, 157, 239, 145, 146, 18, 27,
3488 31, 32, 44, 46, 206, 245, 192, 100, 40, 67,
3489 68, 69, 71, 72, 73, 74, 75, 76, 77, 78,
3490 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
3491 90, 91, 92, 94, 95, 96, 102, 104, 106, 107,
3492 108, 109, 110, 112, 113, 114, 115, 116, 122, 124,
3493 127, 3, 122, 162, 146, 172, 188, 126, 127, 184,
3494 185, 222, 223, 224, 232, 122, 238, 127, 240, 180,
3495 229, 3, 155, 105, 132, 100, 133, 125, 100, 237,
3496 3, 3, 151, 152, 238, 238, 151, 3, 132, 145,
3497 126, 136, 3, 99, 68, 99, 3, 35, 51, 216,
3498 3, 3, 208, 240, 240, 240, 240, 240, 240, 240,
3499 240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
3500 240, 240, 240, 240, 240, 240, 3, 240, 240, 240,
3501 240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
3502 240, 240, 229, 240, 3, 122, 128, 238, 14, 240,
3503 99, 139, 140, 141, 147, 148, 196, 198, 207, 217,
3504 187, 184, 127, 122, 228, 3, 93, 213, 214, 215,
3505 133, 115, 184, 133, 142, 143, 133, 238, 237, 237,
3506 105, 227, 100, 143, 132, 227, 238, 238, 102, 3,
3507 54, 193, 54, 194, 3, 209, 210, 105, 133, 125,
3508 89, 240, 3, 133, 122, 133, 132, 141, 126, 139,
3509 229, 102, 105, 211, 215, 133, 100, 132, 133, 105,
3510 36, 115, 224, 226, 102, 149, 152, 132, 99, 133,
3511 3, 5, 122, 224, 17, 195, 224, 225, 126, 227,
3512 100, 240, 3, 133, 146, 238, 126, 139, 132, 133,
3513 3, 5, 8, 9, 10, 12, 45, 55, 56, 212,
3514 226, 227, 93, 215, 28, 33, 173, 175, 177, 178,
3515 146, 237, 237, 239, 146, 213, 225, 126, 100, 199,
3516 149, 210, 133, 34, 62, 167, 168, 169, 170, 132,
3517 211, 126, 215, 126, 122, 173, 175, 65, 153, 133,
3518 133, 197, 224, 46, 99, 190, 203, 204, 205, 240,
3519 105, 132, 169, 170, 221, 176, 3, 146, 146, 227,
3520 99, 144, 148, 190, 200, 201, 202, 207, 217, 3,
3521 27, 132, 205, 105, 142, 142, 142, 227, 126, 126,
3522 132, 202, 216, 142, 132, 132, 133, 218, 200, 3,
3523 174, 142, 132, 122, 126, 132, 213, 142, 133, 132,
3527 #define yyerrok (yyerrstatus = 0)
3528 #define yyclearin (yychar = YYEMPTY)
3529 #define YYEMPTY (-2)
3532 #define YYACCEPT goto yyacceptlab
3533 #define YYABORT goto yyabortlab
3534 #define YYERROR goto yyerrorlab
3537 /* Like YYERROR except do call yyerror. This remains here temporarily
3538 to ease the transition to the new meaning of YYERROR, for GCC.
3539 Once GCC version 2 has supplanted version 1, this can go. */
3541 #define YYFAIL goto yyerrlab
3543 #define YYRECOVERING() (!!yyerrstatus)
3545 #define YYBACKUP(Token, Value) \
3547 if (yychar == YYEMPTY && yylen == 1) \
3551 yytoken = YYTRANSLATE (yychar); \
3557 yyerror (YY_("syntax error: cannot back up")); \
3564 #define YYERRCODE 256
3567 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
3568 If N is 0, then set CURRENT to the empty location which ends
3569 the previous symbol: RHS[0] (always defined). */
3571 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
3572 #ifndef YYLLOC_DEFAULT
3573 # define YYLLOC_DEFAULT(Current, Rhs, N) \
3577 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
3578 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
3579 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
3580 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
3584 (Current).first_line = (Current).last_line = \
3585 YYRHSLOC (Rhs, 0).last_line; \
3586 (Current).first_column = (Current).last_column = \
3587 YYRHSLOC (Rhs, 0).last_column; \
3593 /* YY_LOCATION_PRINT -- Print the location on the stream.
3594 This macro was not mandated originally: define only if we know
3595 we won't break user code: when these are the locations we know. */
3597 #ifndef YY_LOCATION_PRINT
3598 # if YYLTYPE_IS_TRIVIAL
3599 # define YY_LOCATION_PRINT(File, Loc) \
3600 fprintf (File, "%d.%d-%d.%d", \
3601 (Loc).first_line, (Loc).first_column, \
3602 (Loc).last_line, (Loc).last_column)
3604 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
3609 /* YYLEX -- calling `yylex' with the right arguments. */
3612 # define YYLEX yylex (YYLEX_PARAM)
3614 # define YYLEX yylex ()
3617 /* Enable debugging if requested. */
3621 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
3622 # define YYFPRINTF fprintf
3625 # define YYDPRINTF(Args) \
3631 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
3635 YYFPRINTF (stderr, "%s ", Title); \
3636 yy_symbol_print (stderr, \
3638 YYFPRINTF (stderr, "\n"); \
3643 /*--------------------------------.
3644 | Print this symbol on YYOUTPUT. |
3645 `--------------------------------*/
3648 #if (defined __STDC__ || defined __C99__FUNC__ \
3649 || defined __cplusplus || defined _MSC_VER)
3651 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
3654 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
3657 YYSTYPE const * const yyvaluep;
3663 if (yytype < YYNTOKENS)
3664 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
3676 /*--------------------------------.
3677 | Print this symbol on YYOUTPUT. |
3678 `--------------------------------*/
3680 #if (defined __STDC__ || defined __C99__FUNC__ \
3681 || defined __cplusplus || defined _MSC_VER)
3683 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
3686 yy_symbol_print (yyoutput, yytype, yyvaluep)
3689 YYSTYPE const * const yyvaluep;
3692 if (yytype < YYNTOKENS)
3693 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
3695 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
3697 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
3698 YYFPRINTF (yyoutput, ")");
3701 /*------------------------------------------------------------------.
3702 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
3704 `------------------------------------------------------------------*/
3706 #if (defined __STDC__ || defined __C99__FUNC__ \
3707 || defined __cplusplus || defined _MSC_VER)
3709 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
3712 yy_stack_print (yybottom, yytop)
3713 yytype_int16 *yybottom;
3714 yytype_int16 *yytop;
3717 YYFPRINTF (stderr, "Stack now");
3718 for (; yybottom <= yytop; yybottom++)
3720 int yybot = *yybottom;
3721 YYFPRINTF (stderr, " %d", yybot);
3723 YYFPRINTF (stderr, "\n");
3726 # define YY_STACK_PRINT(Bottom, Top) \
3729 yy_stack_print ((Bottom), (Top)); \
3733 /*------------------------------------------------.
3734 | Report that the YYRULE is going to be reduced. |
3735 `------------------------------------------------*/
3737 #if (defined __STDC__ || defined __C99__FUNC__ \
3738 || defined __cplusplus || defined _MSC_VER)
3740 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
3743 yy_reduce_print (yyvsp, yyrule)
3748 int yynrhs = yyr2[yyrule];
3750 unsigned long int yylno = yyrline[yyrule];
3751 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
3753 /* The symbols being reduced. */
3754 for (yyi = 0; yyi < yynrhs; yyi++)
3756 YYFPRINTF (stderr, " $%d = ", yyi + 1);
3757 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
3758 &(yyvsp[(yyi + 1) - (yynrhs)])
3760 YYFPRINTF (stderr, "\n");
3764 # define YY_REDUCE_PRINT(Rule) \
3767 yy_reduce_print (yyvsp, Rule); \
3770 /* Nonzero means print parse trace. It is left uninitialized so that
3771 multiple parsers can coexist. */
3773 #else /* !YYDEBUG */
3774 # define YYDPRINTF(Args)
3775 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
3776 # define YY_STACK_PRINT(Bottom, Top)
3777 # define YY_REDUCE_PRINT(Rule)
3778 #endif /* !YYDEBUG */
3781 /* YYINITDEPTH -- initial size of the parser's stacks. */
3783 # define YYINITDEPTH 200
3786 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
3787 if the built-in stack extension method is used).
3789 Do not make this value too large; the results are undefined if
3790 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
3791 evaluated with infinite-precision integer arithmetic. */
3794 # define YYMAXDEPTH 10000
3802 # if defined __GLIBC__ && defined _STRING_H
3803 # define yystrlen strlen
3805 /* Return the length of YYSTR. */
3806 #if (defined __STDC__ || defined __C99__FUNC__ \
3807 || defined __cplusplus || defined _MSC_VER)
3809 yystrlen (const char *yystr)
3817 for (yylen = 0; yystr[yylen]; yylen++)
3825 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
3826 # define yystpcpy stpcpy
3828 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
3830 #if (defined __STDC__ || defined __C99__FUNC__ \
3831 || defined __cplusplus || defined _MSC_VER)
3833 yystpcpy (char *yydest, const char *yysrc)
3836 yystpcpy (yydest, yysrc)
3842 const char *yys = yysrc;
3844 while ((*yyd++ = *yys++) != '\0')
3853 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
3854 quotes and backslashes, so that it's suitable for yyerror. The
3855 heuristic is that double-quoting is unnecessary unless the string
3856 contains an apostrophe, a comma, or backslash (other than
3857 backslash-backslash). YYSTR is taken from yytname. If YYRES is
3858 null, do not copy; instead, return the length of what the result
3861 yytnamerr (char *yyres, const char *yystr)
3866 char const *yyp = yystr;
3873 goto do_not_strip_quotes;
3877 goto do_not_strip_quotes;
3890 do_not_strip_quotes: ;
3894 return yystrlen (yystr);
3896 return yystpcpy (yyres, yystr) - yyres;
3900 /* Copy into YYRESULT an error message about the unexpected token
3901 YYCHAR while in state YYSTATE. Return the number of bytes copied,
3902 including the terminating null byte. If YYRESULT is null, do not
3903 copy anything; just return the number of bytes that would be
3904 copied. As a special case, return 0 if an ordinary "syntax error"
3905 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
3906 size calculation. */
3908 yysyntax_error (char *yyresult, int yystate, int yychar)
3910 int yyn = yypact[yystate];
3912 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
3916 int yytype = YYTRANSLATE (yychar);
3917 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
3918 YYSIZE_T yysize = yysize0;
3920 int yysize_overflow = 0;
3921 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
3922 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
3926 /* This is so xgettext sees the translatable formats that are
3927 constructed on the fly. */
3928 YY_("syntax error, unexpected %s");
3929 YY_("syntax error, unexpected %s, expecting %s");
3930 YY_("syntax error, unexpected %s, expecting %s or %s");
3931 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
3932 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
3936 static char const yyunexpected[] = "syntax error, unexpected %s";
3937 static char const yyexpecting[] = ", expecting %s";
3938 static char const yyor[] = " or %s";
3939 char yyformat[sizeof yyunexpected
3940 + sizeof yyexpecting - 1
3941 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
3942 * (sizeof yyor - 1))];
3943 char const *yyprefix = yyexpecting;
3945 /* Start YYX at -YYN if negative to avoid negative indexes in
3947 int yyxbegin = yyn < 0 ? -yyn : 0;
3949 /* Stay within bounds of both yycheck and yytname. */
3950 int yychecklim = YYLAST - yyn + 1;
3951 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
3954 yyarg[0] = yytname[yytype];
3955 yyfmt = yystpcpy (yyformat, yyunexpected);
3957 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
3958 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
3960 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
3964 yyformat[sizeof yyunexpected - 1] = '\0';
3967 yyarg[yycount++] = yytname[yyx];
3968 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
3969 yysize_overflow |= (yysize1 < yysize);
3971 yyfmt = yystpcpy (yyfmt, yyprefix);
3975 yyf = YY_(yyformat);
3976 yysize1 = yysize + yystrlen (yyf);
3977 yysize_overflow |= (yysize1 < yysize);
3980 if (yysize_overflow)
3981 return YYSIZE_MAXIMUM;
3985 /* Avoid sprintf, as that infringes on the user's name space.
3986 Don't have undefined behavior even if the translation
3987 produced a string with the wrong number of "%s"s. */
3988 char *yyp = yyresult;
3990 while ((*yyp = *yyf) != '\0')
3992 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
3994 yyp += yytnamerr (yyp, yyarg[yyi++]);
4007 #endif /* YYERROR_VERBOSE */
4010 /*-----------------------------------------------.
4011 | Release the memory associated to this symbol. |
4012 `-----------------------------------------------*/
4015 #if (defined __STDC__ || defined __C99__FUNC__ \
4016 || defined __cplusplus || defined _MSC_VER)
4018 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
4021 yydestruct (yymsg, yytype, yyvaluep)
4031 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
4041 /* Prevent warnings from -Wmissing-prototypes. */
4042 #ifdef YYPARSE_PARAM
4043 #if defined __STDC__ || defined __cplusplus
4044 int yyparse (void *YYPARSE_PARAM);
4048 #else /* ! YYPARSE_PARAM */
4049 #if defined __STDC__ || defined __cplusplus
4054 #endif /* ! YYPARSE_PARAM */
4057 /* The lookahead symbol. */
4060 /* The semantic value of the lookahead symbol. */
4063 /* Number of syntax errors so far. */
4068 /*-------------------------.
4069 | yyparse or yypush_parse. |
4070 `-------------------------*/
4072 #ifdef YYPARSE_PARAM
4073 #if (defined __STDC__ || defined __C99__FUNC__ \
4074 || defined __cplusplus || defined _MSC_VER)
4076 yyparse (void *YYPARSE_PARAM)
4079 yyparse (YYPARSE_PARAM)
4080 void *YYPARSE_PARAM;
4082 #else /* ! YYPARSE_PARAM */
4083 #if (defined __STDC__ || defined __C99__FUNC__ \
4084 || defined __cplusplus || defined _MSC_VER)
4097 /* Number of tokens to shift before error messages enabled. */
4100 /* The stacks and their tools:
4101 `yyss': related to states.
4102 `yyvs': related to semantic values.
4104 Refer to the stacks thru separate pointers, to allow yyoverflow
4105 to reallocate them elsewhere. */
4107 /* The state stack. */
4108 yytype_int16 yyssa[YYINITDEPTH];
4110 yytype_int16 *yyssp;
4112 /* The semantic value stack. */
4113 YYSTYPE yyvsa[YYINITDEPTH];
4117 YYSIZE_T yystacksize;
4121 /* Lookahead token as an internal (translated) token number. */
4123 /* The variables used to return semantic value and location from the
4128 /* Buffer for error messages, and its allocated size. */
4130 char *yymsg = yymsgbuf;
4131 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
4134 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
4136 /* The number of symbols on the RHS of the reduced rule.
4137 Keep to zero when no symbol should be popped. */
4143 yystacksize = YYINITDEPTH;
4145 YYDPRINTF ((stderr, "Starting parse\n"));
4150 yychar = YYEMPTY; /* Cause a token to be read. */
4152 /* Initialize stack pointers.
4153 Waste one element of value and location stack
4154 so that they stay on the same level as the state stack.
4155 The wasted elements are never initialized. */
4161 /*------------------------------------------------------------.
4162 | yynewstate -- Push a new state, which is found in yystate. |
4163 `------------------------------------------------------------*/
4165 /* In all cases, when you get here, the value and location stacks
4166 have just been pushed. So pushing a state here evens the stacks. */
4172 if (yyss + yystacksize - 1 <= yyssp)
4174 /* Get the current used size of the three stacks, in elements. */
4175 YYSIZE_T yysize = yyssp - yyss + 1;
4179 /* Give user a chance to reallocate the stack. Use copies of
4180 these so that the &'s don't force the real ones into
4182 YYSTYPE *yyvs1 = yyvs;
4183 yytype_int16 *yyss1 = yyss;
4185 /* Each stack pointer address is followed by the size of the
4186 data in use in that stack, in bytes. This used to be a
4187 conditional around just the two extra args, but that might
4188 be undefined if yyoverflow is a macro. */
4189 yyoverflow (YY_("memory exhausted"),
4190 &yyss1, yysize * sizeof (*yyssp),
4191 &yyvs1, yysize * sizeof (*yyvsp),
4197 #else /* no yyoverflow */
4198 # ifndef YYSTACK_RELOCATE
4199 goto yyexhaustedlab;
4201 /* Extend the stack our own way. */
4202 if (YYMAXDEPTH <= yystacksize)
4203 goto yyexhaustedlab;
4205 if (YYMAXDEPTH < yystacksize)
4206 yystacksize = YYMAXDEPTH;
4209 yytype_int16 *yyss1 = yyss;
4210 union yyalloc *yyptr =
4211 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
4213 goto yyexhaustedlab;
4214 YYSTACK_RELOCATE (yyss_alloc, yyss);
4215 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
4216 # undef YYSTACK_RELOCATE
4218 YYSTACK_FREE (yyss1);
4221 #endif /* no yyoverflow */
4223 yyssp = yyss + yysize - 1;
4224 yyvsp = yyvs + yysize - 1;
4226 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
4227 (unsigned long int) yystacksize));
4229 if (yyss + yystacksize - 1 <= yyssp)
4233 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
4235 if (yystate == YYFINAL)
4245 /* Do appropriate processing given the current state. Read a
4246 lookahead token if we need one and don't already have one. */
4248 /* First try to decide what to do without reference to lookahead token. */
4249 yyn = yypact[yystate];
4250 if (yyn == YYPACT_NINF)
4253 /* Not known => get a lookahead token if don't already have one. */
4255 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
4256 if (yychar == YYEMPTY)
4258 YYDPRINTF ((stderr, "Reading a token: "));
4262 if (yychar <= YYEOF)
4264 yychar = yytoken = YYEOF;
4265 YYDPRINTF ((stderr, "Now at end of input.\n"));
4269 yytoken = YYTRANSLATE (yychar);
4270 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
4273 /* If the proper action on seeing token YYTOKEN is to reduce or to
4274 detect an error, take that action. */
4276 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
4281 if (yyn == 0 || yyn == YYTABLE_NINF)
4287 /* Count tokens shifted since error; after three, turn off error
4292 /* Shift the lookahead token. */
4293 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
4295 /* Discard the shifted token. */
4304 /*-----------------------------------------------------------.
4305 | yydefault -- do the default action for the current state. |
4306 `-----------------------------------------------------------*/
4308 yyn = yydefact[yystate];
4314 /*-----------------------------.
4315 | yyreduce -- Do a reduction. |
4316 `-----------------------------*/
4318 /* yyn is the number of a rule to reduce with. */
4321 /* If YYLEN is nonzero, implement the default value of the action:
4324 Otherwise, the following line sets YYVAL to garbage.
4325 This behavior is undocumented and Bison
4326 users should not rely upon it. Assigning to YYVAL
4327 unconditionally makes the parser a bit smaller, and it avoids a
4328 GCC warning that YYVAL may be used uninitialized. */
4329 yyval = yyvsp[1-yylen];
4332 YY_REDUCE_PRINT (yyn);
4339 /* Line 1464 of skeleton.m4 */
4340 #line 2108 "parser.y"
4341 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4350 /* Line 1464 of skeleton.m4 */
4351 #line 2109 "parser.y"
4352 {(yyval.code)=code_new();}
4361 /* Line 1464 of skeleton.m4 */
4362 #line 2111 "parser.y"
4363 {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
4372 /* Line 1464 of skeleton.m4 */
4373 #line 2112 "parser.y"
4374 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4383 /* Line 1464 of skeleton.m4 */
4384 #line 2127 "parser.y"
4385 {(yyval.code)=(yyvsp[(2) - (3)].code);}
4394 /* Line 1464 of skeleton.m4 */
4395 #line 2128 "parser.y"
4405 /* Line 1464 of skeleton.m4 */
4406 #line 2131 "parser.y"
4416 /* Line 1464 of skeleton.m4 */
4417 #line 2138 "parser.y"
4418 {(yyval.code)=(yyvsp[(3) - (4)].code);}
4427 /* Line 1464 of skeleton.m4 */
4428 #line 2142 "parser.y"
4429 {(yyval.code)=(yyvsp[(1) - (2)].code);}
4438 /* Line 1464 of skeleton.m4 */
4439 #line 2143 "parser.y"
4440 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4449 /* Line 1464 of skeleton.m4 */
4450 #line 2147 "parser.y"
4452 code_t**cc = &global->init->method->body->code;
4453 *cc = code_append(*cc, (yyvsp[(1) - (1)].code));
4463 /* Line 1464 of skeleton.m4 */
4464 #line 2158 "parser.y"
4465 {(yyval.value)=(yyvsp[(2) - (2)].value);}
4474 /* Line 1464 of skeleton.m4 */
4475 #line 2159 "parser.y"
4476 {(yyval.value).c=abc_pushundefined(0);
4477 (yyval.value).t=TYPE_ANY;
4487 /* Line 1464 of skeleton.m4 */
4488 #line 2163 "parser.y"
4489 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4498 /* Line 1464 of skeleton.m4 */
4499 #line 2164 "parser.y"
4500 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4509 /* Line 1464 of skeleton.m4 */
4510 #line 2166 "parser.y"
4511 {(yyval.code) = (yyvsp[(1) - (1)].code);}
4520 /* Line 1464 of skeleton.m4 */
4521 #line 2167 "parser.y"
4522 {(yyval.code) = code_append((yyvsp[(1) - (3)].code), (yyvsp[(3) - (3)].code));}
4531 /* Line 1464 of skeleton.m4 */
4532 #line 2170 "parser.y"
4535 if(variable_exists((yyvsp[(1) - (3)].id)))
4536 syntaxerror("Variable %s already defined", (yyvsp[(1) - (3)].id));
4538 new_variable((yyvsp[(1) - (3)].id), 0, 1, 0);
4541 if(!is_subtype_of((yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo))) {
4542 syntaxerror("Can't convert %s to %s", (yyvsp[(3) - (3)].value).t->name,
4543 (yyvsp[(2) - (3)].classinfo)->name);
4548 if(state->method->uses_slots) {
4549 variable_t* v = find_slot(state, (yyvsp[(1) - (3)].id));
4551 // this variable is stored in a slot
4553 v->type = (yyvsp[(2) - (3)].classinfo);
4559 index = new_variable((yyvsp[(1) - (3)].id), (yyvsp[(2) - (3)].classinfo), 1, 0);
4562 (yyval.code) = slot?abc_getscopeobject(0, 1):0;
4564 if((yyvsp[(2) - (3)].classinfo)) {
4565 if((yyvsp[(3) - (3)].value).c->prev || (yyvsp[(3) - (3)].value).c->opcode != OPCODE_PUSHUNDEFINED) {
4566 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (3)].value).c);
4567 (yyval.code) = converttype((yyval.code), (yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo));
4569 code_free((yyvsp[(3) - (3)].value).c);
4570 (yyval.code) = defaultvalue((yyval.code), (yyvsp[(2) - (3)].classinfo));
4573 if((yyvsp[(3) - (3)].value).c->prev || (yyvsp[(3) - (3)].value).c->opcode != OPCODE_PUSHUNDEFINED) {
4574 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (3)].value).c);
4575 (yyval.code) = abc_coerce_a((yyval.code));
4577 // don't do anything
4578 code_free((yyvsp[(3) - (3)].value).c);
4579 code_free((yyval.code));
4585 (yyval.code) = abc_setslot((yyval.code), index);
4587 (yyval.code) = abc_setlocal((yyval.code), index);
4598 /* Line 1464 of skeleton.m4 */
4599 #line 2230 "parser.y"
4600 {(yyval.code) = code_new();}
4609 /* Line 1464 of skeleton.m4 */
4610 #line 2231 "parser.y"
4611 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4620 /* Line 1464 of skeleton.m4 */
4621 #line 2234 "parser.y"
4622 {PASS12 new_state();}
4631 /* Line 1464 of skeleton.m4 */
4632 #line 2234 "parser.y"
4635 (yyval.code) = code_new();
4636 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (7)].value).c);
4637 code_t*myjmp,*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4639 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].code));
4640 if((yyvsp[(7) - (7)].code)) {
4641 myjmp = (yyval.code) = abc_jump((yyval.code), 0);
4643 myif->branch = (yyval.code) = abc_nop((yyval.code));
4644 if((yyvsp[(7) - (7)].code)) {
4645 (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (7)].code));
4646 myjmp->branch = (yyval.code) = abc_nop((yyval.code));
4648 (yyval.code) = var_block((yyval.code));
4659 /* Line 1464 of skeleton.m4 */
4660 #line 2253 "parser.y"
4661 {(yyval.code)=code_new();}
4670 /* Line 1464 of skeleton.m4 */
4671 #line 2260 "parser.y"
4673 PASS1 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable((yyvsp[(2) - (3)].id),0,1,0);
4674 PASS2 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable((yyvsp[(2) - (3)].id),(yyvsp[(3) - (3)].classinfo),1,0);
4684 /* Line 1464 of skeleton.m4 */
4685 #line 2264 "parser.y"
4688 (yyval.id)=(yyvsp[(1) - (1)].id);
4698 /* Line 1464 of skeleton.m4 */
4699 #line 2269 "parser.y"
4700 {PASS12 new_state();(yyval.for_start).name=(yyvsp[(1) - (2)].id);(yyval.for_start).each=0;}
4709 /* Line 1464 of skeleton.m4 */
4710 #line 2270 "parser.y"
4711 {PASS12 new_state();(yyval.for_start).name=(yyvsp[(1) - (3)].id);(yyval.for_start).each=1;}
4720 /* Line 1464 of skeleton.m4 */
4721 #line 2272 "parser.y"
4723 if((yyvsp[(1) - (8)].for_start).each) syntaxerror("invalid syntax: ; not allowed in for each statement");
4724 (yyval.code) = code_new();
4725 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (8)].code));
4726 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4727 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (8)].value).c);
4728 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4729 (yyval.code) = code_append((yyval.code), (yyvsp[(8) - (8)].code));
4730 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4731 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (8)].code));
4732 (yyval.code) = abc_jump((yyval.code), loopstart);
4733 code_t*out = (yyval.code) = abc_nop((yyval.code));
4734 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, out);
4735 continuejumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, cont);
4738 (yyval.code) = var_block((yyval.code));
4749 /* Line 1464 of skeleton.m4 */
4750 #line 2292 "parser.y"
4752 variable_t*var = find_variable(state, (yyvsp[(2) - (6)].id));
4754 syntaxerror("variable %s not known in this scope", (yyvsp[(2) - (6)].id));
4757 char*tmp1name = concat2((yyvsp[(2) - (6)].id), "__tmp1__");
4758 int it = new_variable(tmp1name, TYPE_INT, 0, 0);
4759 char*tmp2name = concat2((yyvsp[(2) - (6)].id), "__array__");
4760 int array = new_variable(tmp1name, 0, 0, 0);
4762 (yyval.code) = code_new();
4763 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
4764 (yyval.code) = abc_coerce_a((yyval.code));
4765 (yyval.code) = abc_setlocal((yyval.code), array);
4766 (yyval.code) = abc_pushbyte((yyval.code), 0);
4767 (yyval.code) = abc_setlocal((yyval.code), it);
4769 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4771 (yyval.code) = abc_hasnext2((yyval.code), array, it);
4772 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4773 (yyval.code) = abc_getlocal((yyval.code), array);
4774 (yyval.code) = abc_getlocal((yyval.code), it);
4775 if(!(yyvsp[(1) - (6)].for_start).each)
4776 (yyval.code) = abc_nextname((yyval.code));
4778 (yyval.code) = abc_nextvalue((yyval.code));
4779 (yyval.code) = converttype((yyval.code), 0, var->type);
4780 (yyval.code) = abc_setlocal((yyval.code), var->index);
4782 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
4783 (yyval.code) = abc_jump((yyval.code), loopstart);
4785 code_t*out = (yyval.code) = abc_nop((yyval.code));
4786 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, out);
4787 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, loopstart);
4791 (yyval.code) = var_block((yyval.code));
4806 /* Line 1464 of skeleton.m4 */
4807 #line 2340 "parser.y"
4808 {PASS12 new_state();}
4817 /* Line 1464 of skeleton.m4 */
4818 #line 2340 "parser.y"
4821 (yyval.code) = code_new();
4823 code_t*myjmp = (yyval.code) = abc_jump((yyval.code), 0);
4824 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4825 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
4826 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4827 myjmp->branch = cont;
4828 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
4829 (yyval.code) = abc_iftrue((yyval.code), loopstart);
4830 code_t*out = (yyval.code) = abc_nop((yyval.code));
4831 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].id), out);
4832 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].id), cont);
4834 (yyval.code) = var_block((yyval.code));
4845 /* Line 1464 of skeleton.m4 */
4846 #line 2359 "parser.y"
4847 {PASS12 new_state();}
4856 /* Line 1464 of skeleton.m4 */
4857 #line 2359 "parser.y"
4859 (yyval.code) = code_new();
4860 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4861 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (7)].code));
4862 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4863 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].value).c);
4864 (yyval.code) = abc_iftrue((yyval.code), loopstart);
4865 code_t*out = (yyval.code) = abc_nop((yyval.code));
4866 breakjumpsto((yyval.code), (yyvsp[(1) - (7)].id), out);
4867 continuejumpsto((yyval.code), (yyvsp[(1) - (7)].id), cont);
4869 (yyval.code) = var_block((yyval.code));
4880 /* Line 1464 of skeleton.m4 */
4881 #line 2374 "parser.y"
4883 (yyval.code) = abc___break__(0, "");
4893 /* Line 1464 of skeleton.m4 */
4894 #line 2377 "parser.y"
4896 (yyval.code) = abc___break__(0, (yyvsp[(2) - (2)].id));
4906 /* Line 1464 of skeleton.m4 */
4907 #line 2380 "parser.y"
4909 (yyval.code) = abc___continue__(0, "");
4919 /* Line 1464 of skeleton.m4 */
4920 #line 2383 "parser.y"
4922 (yyval.code) = abc___continue__(0, (yyvsp[(2) - (2)].id));
4932 /* Line 1464 of skeleton.m4 */
4933 #line 2387 "parser.y"
4943 /* Line 1464 of skeleton.m4 */
4944 #line 2388 "parser.y"
4945 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4954 /* Line 1464 of skeleton.m4 */
4955 #line 2389 "parser.y"
4956 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4965 /* Line 1464 of skeleton.m4 */
4966 #line 2390 "parser.y"
4967 {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
4976 /* Line 1464 of skeleton.m4 */
4977 #line 2391 "parser.y"
4978 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4987 /* Line 1464 of skeleton.m4 */
4988 #line 2392 "parser.y"
4989 {(yyval.code)=code_append((yyval.code),(yyvsp[(2) - (2)].code));}
4998 /* Line 1464 of skeleton.m4 */
4999 #line 2394 "parser.y"
5001 (yyval.code) = abc_getlocal(0, state->switch_var);
5002 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (4)].value).c);
5003 code_t*j = (yyval.code) = abc_ifne((yyval.code), 0);
5004 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (4)].code));
5005 if((yyval.code)->opcode != OPCODE___BREAK__) {
5006 (yyval.code) = abc___fallthrough__((yyval.code), "");
5008 code_t*e = (yyval.code) = abc_nop((yyval.code));
5019 /* Line 1464 of skeleton.m4 */
5020 #line 2405 "parser.y"
5022 (yyval.code) = (yyvsp[(3) - (3)].code);
5032 /* Line 1464 of skeleton.m4 */
5033 #line 2408 "parser.y"
5034 {PASS12 new_state();state->switch_var=alloc_local();}
5043 /* Line 1464 of skeleton.m4 */
5044 #line 2408 "parser.y"
5046 (yyval.code)=(yyvsp[(4) - (8)].value).c;
5047 (yyval.code) = abc_setlocal((yyval.code), state->switch_var);
5048 (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (8)].code));
5050 code_t*out = (yyval.code) = abc_kill((yyval.code), state->switch_var);
5051 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].id), out);
5053 code_t*c = (yyval.code),*lastblock=0;
5055 if(c->opcode == OPCODE_IFNE) {
5056 if(!c->next) syntaxerror("internal error in fallthrough handling");
5058 } else if(c->opcode == OPCODE___FALLTHROUGH__) {
5060 c->opcode = OPCODE_JUMP;
5061 c->branch = lastblock;
5063 /* fall through end of switch */
5064 c->opcode = OPCODE_NOP;
5070 (yyval.code) = var_block((yyval.code));
5081 /* Line 1464 of skeleton.m4 */
5082 #line 2439 "parser.y"
5083 {PASS12 new_state();
5084 state->exception_name=(yyvsp[(3) - (5)].id);
5085 PASS1 new_variable((yyvsp[(3) - (5)].id), 0, 0, 0);
5086 PASS2 new_variable((yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].classinfo), 0, 0);
5096 /* Line 1464 of skeleton.m4 */
5097 #line 2444 "parser.y"
5099 namespace_t name_ns = {ACCESS_PACKAGE, ""};
5100 multiname_t name = {QNAME, &name_ns, 0, (yyvsp[(3) - (9)].id)};
5102 NEW(abc_exception_t, e)
5103 e->exc_type = sig2mname((yyvsp[(4) - (9)].classinfo));
5104 e->var_name = multiname_clone(&name);
5105 (yyval.exception) = e;
5108 int i = find_variable_safe(state, (yyvsp[(3) - (9)].id))->index;
5109 e->target = c = abc_nop(0);
5110 c = abc_setlocal(c, i);
5111 c = code_append(c, code_dup(state->method->scope_code));
5112 c = code_append(c, (yyvsp[(8) - (9)].code));
5126 /* Line 1464 of skeleton.m4 */
5127 #line 2464 "parser.y"
5128 {PASS12 new_state();state->exception_name=0;}
5137 /* Line 1464 of skeleton.m4 */
5138 #line 2464 "parser.y"
5140 (yyvsp[(4) - (5)].code) = var_block((yyvsp[(4) - (5)].code));
5141 if(!(yyvsp[(4) - (5)].code)) {
5142 (yyval.exception)=0;
5144 NEW(abc_exception_t, e)
5145 e->exc_type = 0; //all exceptions
5146 e->var_name = 0; //no name
5149 e->to = code_append(e->to, (yyvsp[(4) - (5)].code));
5150 (yyval.exception) = e;
5162 /* Line 1464 of skeleton.m4 */
5163 #line 2480 "parser.y"
5164 {(yyval.catch_list).l=list_new();(yyval.catch_list).finally=0;list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));}
5173 /* Line 1464 of skeleton.m4 */
5174 #line 2481 "parser.y"
5175 {(yyval.catch_list)=(yyvsp[(1) - (2)].catch_list);list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));}
5184 /* Line 1464 of skeleton.m4 */
5185 #line 2482 "parser.y"
5186 {(yyval.catch_list)=(yyvsp[(1) - (1)].catch_list);}
5195 /* Line 1464 of skeleton.m4 */
5196 #line 2483 "parser.y"
5198 (yyval.catch_list) = (yyvsp[(1) - (2)].catch_list);
5199 (yyval.catch_list).finally = 0;
5200 if((yyvsp[(2) - (2)].exception)) {
5201 list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));
5202 (yyval.catch_list).finally = (yyvsp[(2) - (2)].exception)->to;(yyvsp[(2) - (2)].exception)->to=0;
5213 /* Line 1464 of skeleton.m4 */
5214 #line 2491 "parser.y"
5216 (yyval.catch_list).l=list_new();
5217 (yyval.catch_list).finally = 0;
5218 if((yyvsp[(1) - (1)].exception)) {
5219 list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));
5220 (yyval.catch_list).finally = (yyvsp[(1) - (1)].exception)->to;(yyvsp[(1) - (1)].exception)->to=0;
5231 /* Line 1464 of skeleton.m4 */
5232 #line 2500 "parser.y"
5233 {PASS12 new_state();
5234 state->method->has_exceptions=1;
5235 state->method->late_binding=1;//for invariant scope_code
5245 /* Line 1464 of skeleton.m4 */
5246 #line 2503 "parser.y"
5248 code_t*out = abc_nop(0);
5250 code_t*start = abc_nop(0);
5251 (yyval.code) = code_append(start, (yyvsp[(4) - (6)].code));
5252 if(!is_break_or_jump((yyvsp[(4) - (6)].code))) {
5253 (yyval.code) = abc_jump((yyval.code), out);
5255 code_t*end = (yyval.code) = abc_nop((yyval.code));
5258 if((yyvsp[(6) - (6)].catch_list).finally)
5259 tmp = new_variable("__finally__", 0, 0, 0);
5261 abc_exception_list_t*l = (yyvsp[(6) - (6)].catch_list).l;
5264 abc_exception_t*e = l->abc_exception;
5266 (yyval.code) = code_append((yyval.code), e->target);
5267 (yyval.code) = abc_jump((yyval.code), out);
5269 parserassert((ptroff_t)(yyvsp[(6) - (6)].catch_list).finally);
5271 e->target = (yyval.code) = abc_nop((yyval.code));
5272 (yyval.code) = code_append((yyval.code), code_dup(state->method->scope_code));
5273 (yyval.code) = abc___rethrow__((yyval.code));
5281 (yyval.code) = code_append((yyval.code), out);
5283 (yyval.code) = insert_finally((yyval.code), (yyvsp[(6) - (6)].catch_list).finally, tmp);
5285 list_concat(state->method->exceptions, (yyvsp[(6) - (6)].catch_list).l);
5287 (yyval.code) = var_block((yyval.code));
5298 /* Line 1464 of skeleton.m4 */
5299 #line 2549 "parser.y"
5301 (yyval.code)=(yyvsp[(2) - (2)].value).c;
5302 (yyval.code)=abc_throw((yyval.code));
5312 /* Line 1464 of skeleton.m4 */
5313 #line 2553 "parser.y"
5315 if(!state->exception_name)
5316 syntaxerror("re-throw only possible within a catch block");
5317 variable_t*v = find_variable(state, state->exception_name);
5318 (yyval.code)=code_new();
5319 (yyval.code)=abc_getlocal((yyval.code), v->index);
5320 (yyval.code)=abc_throw((yyval.code));
5330 /* Line 1464 of skeleton.m4 */
5331 #line 2564 "parser.y"
5334 if(state->method->has_exceptions) {
5335 int v = alloc_local();
5336 state->method->scope_code = abc_getlocal(state->method->scope_code, v);
5337 state->method->scope_code = abc_pushwith(state->method->scope_code);
5338 (yyval.value_list).number = v;
5340 (yyval.value_list).cc = (yyvsp[(3) - (4)].value).c;
5350 /* Line 1464 of skeleton.m4 */
5351 #line 2574 "parser.y"
5353 /* remove getlocal;pushwith from scope code again */
5354 state->method->scope_code = code_cutlast(code_cutlast(state->method->scope_code));
5356 (yyval.code) = (yyvsp[(1) - (2)].value_list).cc;
5357 if(state->method->has_exceptions) {
5358 (yyval.code) = abc_dup((yyval.code));
5359 (yyval.code) = abc_setlocal((yyval.code), (yyvsp[(1) - (2)].value_list).number);
5361 (yyval.code) = abc_pushwith((yyval.code));
5362 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (2)].code));
5363 (yyval.code) = abc_popscope((yyval.code));
5374 /* Line 1464 of skeleton.m4 */
5375 #line 2592 "parser.y"
5376 {PASS12 (yyval.id)="package";}
5385 /* Line 1464 of skeleton.m4 */
5386 #line 2593 "parser.y"
5387 {PASS12 (yyval.id)=(yyvsp[(1) - (1)].id);}
5396 /* Line 1464 of skeleton.m4 */
5397 #line 2595 "parser.y"
5398 {PASS12 (yyval.id) = concat3((yyvsp[(1) - (3)].id),".",(yyvsp[(3) - (3)].id));free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;}
5407 /* Line 1464 of skeleton.m4 */
5408 #line 2596 "parser.y"
5409 {PASS12 (yyval.id)=strdup((yyvsp[(1) - (1)].id));}
5418 /* Line 1464 of skeleton.m4 */
5419 #line 2598 "parser.y"
5420 {PASS12 startpackage((yyvsp[(2) - (3)].id));free((yyvsp[(2) - (3)].id));(yyvsp[(2) - (3)].id)=0;}
5429 /* Line 1464 of skeleton.m4 */
5430 #line 2599 "parser.y"
5431 {PASS12 endpackage();(yyval.code)=0;}
5440 /* Line 1464 of skeleton.m4 */
5441 #line 2600 "parser.y"
5442 {PASS12 startpackage("");}
5451 /* Line 1464 of skeleton.m4 */
5452 #line 2601 "parser.y"
5453 {PASS12 endpackage();(yyval.code)=0;}
5462 /* Line 1464 of skeleton.m4 */
5463 #line 2603 "parser.y"
5466 slotinfo_t*s = registry_find((yyvsp[(2) - (2)].classinfo)->package, (yyvsp[(2) - (2)].classinfo)->name);
5467 if(!s && as3_pass==1) {// || !(s->flags&FLAG_BUILTIN)) {
5468 as3_schedule_class((yyvsp[(2) - (2)].classinfo)->package, (yyvsp[(2) - (2)].classinfo)->name);
5472 classinfo_t*c = (yyvsp[(2) - (2)].classinfo);
5474 syntaxerror("Couldn't import class\n");
5475 state_has_imports();
5476 dict_put(state->imports, c->name, c);
5477 import_toplevel(c->package);
5488 /* Line 1464 of skeleton.m4 */
5489 #line 2619 "parser.y"
5492 if(strncmp("flash.", (yyvsp[(2) - (4)].id), 6) && as3_pass==1) {
5493 as3_schedule_package((yyvsp[(2) - (4)].id));
5498 i->package = (yyvsp[(2) - (4)].id);
5499 state_has_imports();
5500 list_append(state->wildcard_imports, i);
5501 import_toplevel(i->package);
5512 /* Line 1464 of skeleton.m4 */
5513 #line 2636 "parser.y"
5514 {PASS12 (yyval.flags).flags=0;(yyval.flags).ns=0;}
5523 /* Line 1464 of skeleton.m4 */
5524 #line 2637 "parser.y"
5525 {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
5534 /* Line 1464 of skeleton.m4 */
5535 #line 2638 "parser.y"
5536 {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
5545 /* Line 1464 of skeleton.m4 */
5546 #line 2639 "parser.y"
5549 (yyval.flags).flags=(yyvsp[(1) - (2)].flags).flags|(yyvsp[(2) - (2)].flags).flags;
5550 if((yyvsp[(1) - (2)].flags).ns && (yyvsp[(2) - (2)].flags).ns) syntaxerror("only one namespace allowed in one declaration");
5551 (yyval.flags).ns=(yyvsp[(1) - (2)].flags).ns?(yyvsp[(1) - (2)].flags).ns:(yyvsp[(2) - (2)].flags).ns;
5562 /* Line 1464 of skeleton.m4 */
5563 #line 2646 "parser.y"
5564 {PASS12 (yyval.flags).flags=FLAG_PUBLIC;(yyval.flags).ns=0;}
5573 /* Line 1464 of skeleton.m4 */
5574 #line 2647 "parser.y"
5575 {PASS12 (yyval.flags).flags=FLAG_PRIVATE;(yyval.flags).ns=0;}
5584 /* Line 1464 of skeleton.m4 */
5585 #line 2648 "parser.y"
5586 {PASS12 (yyval.flags).flags=FLAG_PROTECTED;(yyval.flags).ns=0;}
5595 /* Line 1464 of skeleton.m4 */
5596 #line 2649 "parser.y"
5597 {PASS12 (yyval.flags).flags=FLAG_STATIC;(yyval.flags).ns=0;}
5606 /* Line 1464 of skeleton.m4 */
5607 #line 2650 "parser.y"
5608 {PASS12 (yyval.flags).flags=FLAG_DYNAMIC;(yyval.flags).ns=0;}
5617 /* Line 1464 of skeleton.m4 */
5618 #line 2651 "parser.y"
5619 {PASS12 (yyval.flags).flags=FLAG_FINAL;(yyval.flags).ns=0;}
5628 /* Line 1464 of skeleton.m4 */
5629 #line 2652 "parser.y"
5630 {PASS12 (yyval.flags).flags=FLAG_OVERRIDE;(yyval.flags).ns=0;}
5639 /* Line 1464 of skeleton.m4 */
5640 #line 2653 "parser.y"
5641 {PASS12 (yyval.flags).flags=FLAG_NATIVE;(yyval.flags).ns=0;}
5650 /* Line 1464 of skeleton.m4 */
5651 #line 2654 "parser.y"
5652 {PASS12 (yyval.flags).flags=FLAG_PACKAGEINTERNAL;(yyval.flags).ns=0;}
5661 /* Line 1464 of skeleton.m4 */
5662 #line 2655 "parser.y"
5663 {PASS12 (yyval.flags).flags=FLAG_NAMESPACE;
5664 (yyval.flags).ns=(yyvsp[(1) - (1)].id);
5674 /* Line 1464 of skeleton.m4 */
5675 #line 2659 "parser.y"
5676 {PASS12 (yyval.classinfo)=0;}
5685 /* Line 1464 of skeleton.m4 */
5686 #line 2660 "parser.y"
5687 {PASS12 (yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
5696 /* Line 1464 of skeleton.m4 */
5697 #line 2662 "parser.y"
5698 {PASS12 (yyval.classinfo_list)=list_new();}
5707 /* Line 1464 of skeleton.m4 */
5708 #line 2663 "parser.y"
5709 {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
5718 /* Line 1464 of skeleton.m4 */
5719 #line 2665 "parser.y"
5720 {PASS12 (yyval.classinfo_list)=list_new();}
5729 /* Line 1464 of skeleton.m4 */
5730 #line 2666 "parser.y"
5731 {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
5740 /* Line 1464 of skeleton.m4 */
5741 #line 2670 "parser.y"
5742 {PASS12 startclass(&(yyvsp[(1) - (6)].flags),(yyvsp[(3) - (6)].id),(yyvsp[(4) - (6)].classinfo),(yyvsp[(5) - (6)].classinfo_list));}
5751 /* Line 1464 of skeleton.m4 */
5752 #line 2672 "parser.y"
5753 {PASS12 endclass();(yyval.code)=0;}
5762 /* Line 1464 of skeleton.m4 */
5763 #line 2676 "parser.y"
5764 {PASS12 (yyvsp[(1) - (5)].flags).flags|=FLAG_INTERFACE;
5765 startclass(&(yyvsp[(1) - (5)].flags),(yyvsp[(3) - (5)].id),0,(yyvsp[(4) - (5)].classinfo_list));}
5774 /* Line 1464 of skeleton.m4 */
5775 #line 2679 "parser.y"
5776 {PASS12 endclass();(yyval.code)=0;}
5785 /* Line 1464 of skeleton.m4 */
5786 #line 2692 "parser.y"
5788 code_t*c = state->cls->static_init->header;
5789 c = code_append(c, (yyvsp[(1) - (1)].code));
5790 state->cls->static_init->header = c;
5800 /* Line 1464 of skeleton.m4 */
5801 #line 2703 "parser.y"
5803 syntaxerror("variable declarations not allowed in interfaces");
5813 /* Line 1464 of skeleton.m4 */
5814 #line 2706 "parser.y"
5817 (yyvsp[(1) - (8)].flags).flags |= FLAG_PUBLIC;
5818 if((yyvsp[(1) - (8)].flags).flags&(FLAG_PRIVATE|FLAG_PACKAGEINTERNAL|FLAG_PROTECTED)) {
5819 syntaxerror("invalid method modifiers: interface methods always need to be public");
5821 startfunction(&(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo));
5822 endfunction(&(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo), 0);
5823 list_deep_free((yyvsp[(6) - (8)].params).list);
5833 /* Line 1464 of skeleton.m4 */
5834 #line 2721 "parser.y"
5835 {setslotstate(&(yyvsp[(1) - (2)].flags),(yyvsp[(2) - (2)].token));}
5844 /* Line 1464 of skeleton.m4 */
5845 #line 2721 "parser.y"
5846 {(yyval.code)=(yyvsp[(4) - (4)].code);setslotstate(0, 0);}
5855 /* Line 1464 of skeleton.m4 */
5856 #line 2723 "parser.y"
5857 {(yyval.code) = (yyvsp[(1) - (1)].code);}
5866 /* Line 1464 of skeleton.m4 */
5867 #line 2724 "parser.y"
5868 {(yyval.code) = code_append((yyvsp[(1) - (3)].code), (yyvsp[(3) - (3)].code));}
5877 /* Line 1464 of skeleton.m4 */
5878 #line 2727 "parser.y"
5880 int flags = slotstate_flags->flags;
5881 namespace_t ns = modifiers2access(slotstate_flags);
5883 varinfo_t* info = 0;
5885 memberinfo_t*i = registry_findmember(state->cls->info, ns.name, (yyvsp[(1) - (3)].id), 1);
5887 check_override(i, flags);
5889 info = varinfo_register_onclass(state->cls->info, ns.access, ns.name, (yyvsp[(1) - (3)].id));
5891 slotinfo_t*i = registry_find(state->package, (yyvsp[(1) - (3)].id));
5893 syntaxerror("package %s already contains '%s'", state->package, (yyvsp[(1) - (3)].id));
5895 if(ns.name && ns.name[0]) {
5896 syntaxerror("namespaces not allowed on package-level variables");
5898 info = varinfo_register_global(ns.access, state->package, (yyvsp[(1) - (3)].id));
5901 info->type = (yyvsp[(2) - (3)].classinfo);
5902 info->flags = flags;
5905 multiname_t mname = {QNAME, &ns, 0, (yyvsp[(1) - (3)].id)};
5907 trait_list_t**traits;
5911 ns.name = state->package;
5912 traits = &global->init->traits;
5913 code = &global->init->method->body->code;
5914 } else if(flags&FLAG_STATIC) {
5916 traits = &state->cls->abc->static_traits;
5917 code = &state->cls->static_init->header;
5919 // instance variable
5920 traits = &state->cls->abc->traits;
5921 code = &state->cls->init->header;
5925 if((yyvsp[(2) - (3)].classinfo)) {
5926 MULTINAME(m, (yyvsp[(2) - (3)].classinfo));
5927 t = trait_new_member(traits, multiname_clone(&m), multiname_clone(&mname), 0);
5929 t = trait_new_member(traits, 0, multiname_clone(&mname), 0);
5931 info->slot = t->slot_id;
5933 /* initalization code (if needed) */
5935 if((yyvsp[(3) - (3)].value).c && !is_pushundefined((yyvsp[(3) - (3)].value).c)) {
5936 c = abc_getlocal_0(c);
5937 c = code_append(c, (yyvsp[(3) - (3)].value).c);
5938 c = converttype(c, (yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo));
5939 c = abc_setslot(c, t->slot_id);
5942 *code = code_append(*code, c);
5944 if(slotstate_varconst==KW_CONST) {
5945 t->kind= TRAIT_CONST;
5958 /* Line 1464 of skeleton.m4 */
5959 #line 2801 "parser.y"
5960 {(yyval.constant)=0;}
5969 /* Line 1464 of skeleton.m4 */
5970 #line 2802 "parser.y"
5971 {(yyval.constant)=(yyvsp[(2) - (2)].constant);}
5980 /* Line 1464 of skeleton.m4 */
5981 #line 2804 "parser.y"
5982 {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_uint));}
5991 /* Line 1464 of skeleton.m4 */
5992 #line 2805 "parser.y"
5993 {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_int));}
6002 /* Line 1464 of skeleton.m4 */
6003 #line 2806 "parser.y"
6004 {(yyval.constant) = constant_new_uint((yyvsp[(1) - (1)].number_uint));}
6013 /* Line 1464 of skeleton.m4 */
6014 #line 2807 "parser.y"
6015 {(yyval.constant) = constant_new_float((yyvsp[(1) - (1)].number_float));}
6024 /* Line 1464 of skeleton.m4 */
6025 #line 2808 "parser.y"
6026 {(yyval.constant) = constant_new_string2((yyvsp[(1) - (1)].str).str,(yyvsp[(1) - (1)].str).len);free((char*)(yyvsp[(1) - (1)].str).str);}
6035 /* Line 1464 of skeleton.m4 */
6036 #line 2810 "parser.y"
6037 {(yyval.constant) = constant_new_true((yyvsp[(1) - (1)].token));}
6046 /* Line 1464 of skeleton.m4 */
6047 #line 2811 "parser.y"
6048 {(yyval.constant) = constant_new_false((yyvsp[(1) - (1)].token));}
6057 /* Line 1464 of skeleton.m4 */
6058 #line 2812 "parser.y"
6059 {(yyval.constant) = constant_new_null((yyvsp[(1) - (1)].token));}
6068 /* Line 1464 of skeleton.m4 */
6069 #line 2813 "parser.y"
6071 if(!strcmp((yyvsp[(1) - (1)].id), "NaN")) {
6072 (yyval.constant) = constant_new_float(__builtin_nan(""));
6074 as3_warning("Couldn't evaluate constant value of %s", (yyvsp[(1) - (1)].id));
6075 (yyval.constant) = constant_new_null((yyvsp[(1) - (1)].id));
6086 /* Line 1464 of skeleton.m4 */
6087 #line 2825 "parser.y"
6090 memset(&(yyval.params),0,sizeof((yyval.params)));
6100 /* Line 1464 of skeleton.m4 */
6101 #line 2829 "parser.y"
6104 (yyval.params)=(yyvsp[(1) - (1)].params);
6114 /* Line 1464 of skeleton.m4 */
6115 #line 2835 "parser.y"
6118 memset(&(yyval.params),0,sizeof((yyval.params)));
6119 (yyval.params).varargs=1;
6120 list_append((yyval.params).list, (yyvsp[(2) - (2)].param));
6130 /* Line 1464 of skeleton.m4 */
6131 #line 2841 "parser.y"
6134 (yyval.params) =(yyvsp[(1) - (4)].params);
6135 (yyval.params).varargs=1;
6136 list_append((yyval.params).list, (yyvsp[(4) - (4)].param));
6146 /* Line 1464 of skeleton.m4 */
6147 #line 2849 "parser.y"
6150 (yyval.params) = (yyvsp[(1) - (3)].params);
6151 list_append((yyval.params).list, (yyvsp[(3) - (3)].param));
6161 /* Line 1464 of skeleton.m4 */
6162 #line 2854 "parser.y"
6165 memset(&(yyval.params),0,sizeof((yyval.params)));
6166 list_append((yyval.params).list, (yyvsp[(1) - (1)].param));
6176 /* Line 1464 of skeleton.m4 */
6177 #line 2860 "parser.y"
6180 (yyval.param) = rfx_calloc(sizeof(param_t));
6181 (yyval.param)->name=(yyvsp[(1) - (4)].id);
6182 (yyval.param)->type = (yyvsp[(3) - (4)].classinfo);
6184 (yyval.param)->value = (yyvsp[(4) - (4)].constant);
6194 /* Line 1464 of skeleton.m4 */
6195 #line 2868 "parser.y"
6198 (yyval.param) = rfx_calloc(sizeof(param_t));
6199 (yyval.param)->name=(yyvsp[(1) - (2)].id);
6200 (yyval.param)->type = TYPE_ANY;
6202 (yyval.param)->value = (yyvsp[(2) - (2)].constant);
6212 /* Line 1464 of skeleton.m4 */
6213 #line 2878 "parser.y"
6214 {PASS12 (yyval.token)=0;}
6223 /* Line 1464 of skeleton.m4 */
6224 #line 2881 "parser.y"
6225 {PASS12 startfunction(&(yyvsp[(1) - (9)].flags),(yyvsp[(3) - (9)].token),(yyvsp[(4) - (9)].id),&(yyvsp[(6) - (9)].params),(yyvsp[(8) - (9)].classinfo));}
6234 /* Line 1464 of skeleton.m4 */
6235 #line 2882 "parser.y"
6238 endfunction(&(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),0,0);
6240 if(!state->method->info) syntaxerror("internal error");
6242 code_t*c = method_header(state->method);
6243 c = wrap_function(c, 0, (yyvsp[(11) - (12)].code));
6245 endfunction(&(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),(yyvsp[(8) - (12)].classinfo),c);
6247 list_deep_free((yyvsp[(6) - (12)].params).list);
6258 /* Line 1464 of skeleton.m4 */
6259 #line 2898 "parser.y"
6260 {PASS12 (yyval.id)=0;}
6269 /* Line 1464 of skeleton.m4 */
6270 #line 2900 "parser.y"
6271 {PASS12 innerfunction((yyvsp[(2) - (7)].id),&(yyvsp[(4) - (7)].params),(yyvsp[(6) - (7)].classinfo));}
6280 /* Line 1464 of skeleton.m4 */
6281 #line 2901 "parser.y"
6284 endfunction(0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),0,0);
6286 methodinfo_t*f = state->method->info;
6287 if(!f || !f->kind) syntaxerror("internal error");
6289 code_t*c = method_header(state->method);
6290 c = wrap_function(c, 0, (yyvsp[(9) - (10)].code));
6292 int index = state->method->var_index;
6293 endfunction(0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),(yyvsp[(6) - (10)].classinfo),c);
6295 (yyval.value).c = abc_getlocal(0, index);
6296 (yyval.value).t = TYPE_FUNCTION(f);
6298 PASS12 list_deep_free((yyvsp[(4) - (10)].params).list);
6308 /* Line 1464 of skeleton.m4 */
6309 #line 2923 "parser.y"
6311 PASS1 NEW(unresolvedinfo_t,c);
6312 memset(c, 0, sizeof(*c));
6313 c->kind = INFOTYPE_UNRESOLVED;
6314 c->name = (yyvsp[(1) - (1)].id);
6315 c->package = get_package_from_name((yyvsp[(1) - (1)].id));
6317 c->nsset = get_current_imports();
6318 /* make the compiler look for this class in the current directory,
6320 as3_schedule_class_noerror(state->package, (yyvsp[(1) - (1)].id));
6322 (yyval.classinfo) = (classinfo_t*)c;
6324 slotinfo_t*s = find_class((yyvsp[(1) - (1)].id));
6325 if(!s) syntaxerror("Could not find class/method %s (current package: %s)\n", (yyvsp[(1) - (1)].id), state->package);
6326 (yyval.classinfo) = (classinfo_t*)s;
6336 /* Line 1464 of skeleton.m4 */
6337 #line 2942 "parser.y"
6339 PASS1 NEW(unresolvedinfo_t,c);
6340 memset(c, 0, sizeof(*c));
6341 c->kind = INFOTYPE_UNRESOLVED;
6342 c->package = (yyvsp[(1) - (3)].id);
6343 c->name = (yyvsp[(3) - (3)].id);
6344 (yyval.classinfo) = (classinfo_t*)c;
6346 slotinfo_t*s = registry_find((yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
6347 if(!s) syntaxerror("Couldn't find class/method %s.%s\n", (yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
6348 free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;
6349 (yyval.classinfo) = (classinfo_t*)s;
6359 /* Line 1464 of skeleton.m4 */
6360 #line 2959 "parser.y"
6361 {PASS12 (yyval.classinfo_list)=list_new();list_append((yyval.classinfo_list), (yyvsp[(1) - (1)].classinfo));}
6370 /* Line 1464 of skeleton.m4 */
6371 #line 2960 "parser.y"
6372 {PASS12 (yyval.classinfo_list)=(yyvsp[(1) - (3)].classinfo_list);list_append((yyval.classinfo_list),(yyvsp[(3) - (3)].classinfo));}
6381 /* Line 1464 of skeleton.m4 */
6382 #line 2962 "parser.y"
6383 {PASS12 (yyval.classinfo)=(yyvsp[(1) - (1)].classinfo);}
6392 /* Line 1464 of skeleton.m4 */
6393 #line 2963 "parser.y"
6394 {PASS12 (yyval.classinfo)=registry_getanytype();}
6403 /* Line 1464 of skeleton.m4 */
6404 #line 2964 "parser.y"
6405 {PASS12 (yyval.classinfo)=registry_getanytype();}
6414 /* Line 1464 of skeleton.m4 */
6415 #line 2973 "parser.y"
6416 {PASS12 (yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
6425 /* Line 1464 of skeleton.m4 */
6426 #line 2974 "parser.y"
6427 {PASS12 (yyval.classinfo)=0;}
6436 /* Line 1464 of skeleton.m4 */
6437 #line 2978 "parser.y"
6438 {(yyval.value_list).cc=0;(yyval.value_list).number=0;}
6447 /* Line 1464 of skeleton.m4 */
6448 #line 2979 "parser.y"
6449 {(yyval.value_list)=(yyvsp[(2) - (3)].value_list);}
6458 /* Line 1464 of skeleton.m4 */
6459 #line 2981 "parser.y"
6460 {(yyval.value_list).cc=0;(yyval.value_list).number=0;}
6469 /* Line 1464 of skeleton.m4 */
6470 #line 2985 "parser.y"
6471 {(yyval.value_list).number=1;
6472 (yyval.value_list).cc = (yyvsp[(1) - (1)].value).c;
6482 /* Line 1464 of skeleton.m4 */
6483 #line 2989 "parser.y"
6484 {(yyval.value_list) = (yyvsp[(1) - (2)].value_list);}
6493 /* Line 1464 of skeleton.m4 */
6494 #line 2990 "parser.y"
6496 (yyval.value_list).number= (yyvsp[(1) - (2)].value_list).number+1;
6497 (yyval.value_list).cc = code_append((yyvsp[(1) - (2)].value_list).cc, (yyvsp[(2) - (2)].value).c);
6507 /* Line 1464 of skeleton.m4 */
6508 #line 2996 "parser.y"
6510 (yyval.value).c = (yyvsp[(2) - (4)].value).c;
6511 if((yyval.value).c->opcode == OPCODE_COERCE_A) (yyval.value).c = code_cutlast((yyval.value).c);
6513 code_t*paramcode = (yyvsp[(4) - (4)].value_list).cc;
6514 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6515 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6516 (yyval.value).c = code_cutlast((yyval.value).c);
6517 (yyval.value).c = code_append((yyval.value).c, paramcode);
6518 (yyval.value).c = abc_constructprop2((yyval.value).c, name, (yyvsp[(4) - (4)].value_list).number);
6519 multiname_destroy(name);
6520 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
6521 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6522 trait_t*t = traits_find_slotid(state->cls->abc->traits,slot);//FIXME
6523 multiname_t*name = t->name;
6524 (yyval.value).c = code_cutlast((yyval.value).c);
6525 (yyval.value).c = code_append((yyval.value).c, paramcode);
6526 (yyval.value).c = abc_constructprop2((yyval.value).c, name, (yyvsp[(4) - (4)].value_list).number);
6528 (yyval.value).c = code_append((yyval.value).c, paramcode);
6529 (yyval.value).c = abc_construct((yyval.value).c, (yyvsp[(4) - (4)].value_list).number);
6532 (yyval.value).t = TYPE_ANY;
6533 if(TYPE_IS_CLASS((yyvsp[(2) - (4)].value).t) && (yyvsp[(2) - (4)].value).t->data) {
6534 (yyval.value).t = (yyvsp[(2) - (4)].value).t->data;
6536 (yyval.value).c = abc_coerce_a((yyval.value).c);
6537 (yyval.value).t = TYPE_ANY;
6548 /* Line 1464 of skeleton.m4 */
6549 #line 3032 "parser.y"
6552 (yyval.value).c = (yyvsp[(1) - (4)].value).c;
6553 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
6554 (yyval.value).c = code_cutlast((yyval.value).c);
6556 code_t*paramcode = (yyvsp[(3) - (4)].value_list).cc;
6558 (yyval.value).t = TYPE_ANY;
6559 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6560 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6561 (yyval.value).c = code_cutlast((yyval.value).c);
6562 (yyval.value).c = code_append((yyval.value).c, paramcode);
6563 (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).number);
6564 multiname_destroy(name);
6565 } else if((yyval.value).c->opcode == OPCODE_GETSLOT && (yyval.value).c->prev->opcode != OPCODE_GETSCOPEOBJECT) {
6566 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6567 trait_t*t = traits_find_slotid(state->cls->abc->traits,slot);
6568 if(t->kind!=TRAIT_METHOD) {
6569 //ok: flash allows to assign closures to members.
6571 multiname_t*name = t->name;
6572 (yyval.value).c = code_cutlast((yyval.value).c);
6573 (yyval.value).c = code_append((yyval.value).c, paramcode);
6574 //$$.c = abc_callmethod($$.c, t->method, len); //#1051 illegal early access binding
6575 (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).number);
6576 } else if((yyval.value).c->opcode == OPCODE_GETSUPER) {
6577 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6578 (yyval.value).c = code_cutlast((yyval.value).c);
6579 (yyval.value).c = code_append((yyval.value).c, paramcode);
6580 (yyval.value).c = abc_callsuper2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).number);
6581 multiname_destroy(name);
6583 (yyval.value).c = abc_getglobalscope((yyval.value).c);
6584 (yyval.value).c = code_append((yyval.value).c, paramcode);
6585 (yyval.value).c = abc_call((yyval.value).c, (yyvsp[(3) - (4)].value_list).number);
6588 if(TYPE_IS_FUNCTION((yyvsp[(1) - (4)].value).t) && (yyvsp[(1) - (4)].value).t->data) {
6589 (yyval.value).t = ((methodinfo_t*)((yyvsp[(1) - (4)].value).t->data))->return_type;
6591 (yyval.value).c = abc_coerce_a((yyval.value).c);
6592 (yyval.value).t = TYPE_ANY;
6603 /* Line 1464 of skeleton.m4 */
6604 #line 3078 "parser.y"
6606 if(!state->cls) syntaxerror("super() not allowed outside of a class");
6607 if(!state->method) syntaxerror("super() not allowed outside of a function");
6608 if(!state->method->is_constructor) syntaxerror("super() not allowed outside of a constructor");
6610 (yyval.value).c = code_new();
6611 (yyval.value).c = abc_getlocal_0((yyval.value).c);
6613 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value_list).cc);
6615 this is dependent on the control path, check this somewhere else
6616 if(state->method->has_super)
6617 syntaxerror("constructor may call super() only once");
6619 state->method->has_super = 1;
6621 (yyval.value).c = abc_constructsuper((yyval.value).c, (yyvsp[(3) - (4)].value_list).number);
6622 (yyval.value).c = abc_pushundefined((yyval.value).c);
6623 (yyval.value).t = TYPE_ANY;
6633 /* Line 1464 of skeleton.m4 */
6634 #line 3099 "parser.y"
6636 (yyval.value).c = (yyvsp[(2) - (2)].value).c;
6637 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
6638 (yyval.value).c = code_cutlast((yyval.value).c);
6640 multiname_t*name = 0;
6641 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6642 (yyval.value).c->opcode = OPCODE_DELETEPROPERTY;
6643 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
6644 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6645 multiname_t*name = traits_find_slotid(state->cls->abc->traits,slot)->name;
6646 (yyval.value).c = code_cutlast((yyval.value).c);
6647 (yyval.value).c = abc_deleteproperty2((yyval.value).c, name);
6649 (yyval.value).c = abc_getlocal_0((yyval.value).c);
6650 MULTINAME_LATE(m, (yyvsp[(2) - (2)].value).t?(yyvsp[(2) - (2)].value).t->access:ACCESS_PACKAGE, "");
6651 (yyval.value).c = abc_deleteproperty2((yyval.value).c, &m);
6653 (yyval.value).t = TYPE_BOOLEAN;
6663 /* Line 1464 of skeleton.m4 */
6664 #line 3120 "parser.y"
6666 (yyval.code) = abc_returnvoid(0);
6676 /* Line 1464 of skeleton.m4 */
6677 #line 3123 "parser.y"
6679 (yyval.code) = (yyvsp[(2) - (2)].value).c;
6680 (yyval.code) = abc_returnvalue((yyval.code));
6690 /* Line 1464 of skeleton.m4 */
6691 #line 3130 "parser.y"
6692 {(yyval.value)=(yyvsp[(1) - (1)].value);}
6701 /* Line 1464 of skeleton.m4 */
6702 #line 3131 "parser.y"
6703 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6712 /* Line 1464 of skeleton.m4 */
6713 #line 3132 "parser.y"
6715 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
6716 (yyval.value).c = cut_last_push((yyval.value).c);
6717 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
6718 (yyval.value).t = (yyvsp[(3) - (3)].value).t;
6728 /* Line 1464 of skeleton.m4 */
6729 #line 3138 "parser.y"
6731 (yyval.code)=cut_last_push((yyvsp[(1) - (1)].value).c);
6741 /* Line 1464 of skeleton.m4 */
6742 #line 3144 "parser.y"
6743 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6752 /* Line 1464 of skeleton.m4 */
6753 #line 3148 "parser.y"
6754 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6763 /* Line 1464 of skeleton.m4 */
6764 #line 3150 "parser.y"
6765 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6774 /* Line 1464 of skeleton.m4 */
6775 #line 3152 "parser.y"
6776 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6785 /* Line 1464 of skeleton.m4 */
6786 #line 3156 "parser.y"
6788 (yyval.value).c = 0;
6789 namespace_t ns = {ACCESS_PACKAGE, ""};
6790 multiname_t m = {QNAME, &ns, 0, "RegExp"};
6791 if(!(yyvsp[(1) - (1)].regexp).options) {
6792 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
6793 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).pattern);
6794 (yyval.value).c = abc_construct((yyval.value).c, 1);
6796 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
6797 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).pattern);
6798 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).options);
6799 (yyval.value).c = abc_construct((yyval.value).c, 2);
6801 (yyval.value).t = TYPE_REGEXP;
6811 /* Line 1464 of skeleton.m4 */
6812 #line 3173 "parser.y"
6813 {(yyval.value).c = abc_pushbyte(0, (yyvsp[(1) - (1)].number_uint));
6814 //MULTINAME(m, registry_getintclass());
6815 //$$.c = abc_coerce2($$.c, &m); // FIXME
6816 (yyval.value).t = TYPE_INT;
6826 /* Line 1464 of skeleton.m4 */
6827 #line 3178 "parser.y"
6828 {(yyval.value).c = abc_pushshort(0, (yyvsp[(1) - (1)].number_uint));
6829 (yyval.value).t = TYPE_INT;
6839 /* Line 1464 of skeleton.m4 */
6840 #line 3181 "parser.y"
6841 {(yyval.value).c = abc_pushint(0, (yyvsp[(1) - (1)].number_int));
6842 (yyval.value).t = TYPE_INT;
6852 /* Line 1464 of skeleton.m4 */
6853 #line 3184 "parser.y"
6854 {(yyval.value).c = abc_pushuint(0, (yyvsp[(1) - (1)].number_uint));
6855 (yyval.value).t = TYPE_UINT;
6865 /* Line 1464 of skeleton.m4 */
6866 #line 3187 "parser.y"
6867 {(yyval.value).c = abc_pushdouble(0, (yyvsp[(1) - (1)].number_float));
6868 (yyval.value).t = TYPE_FLOAT;
6878 /* Line 1464 of skeleton.m4 */
6879 #line 3190 "parser.y"
6880 {(yyval.value).c = abc_pushstring2(0, &(yyvsp[(1) - (1)].str));free((char*)(yyvsp[(1) - (1)].str).str);
6881 (yyval.value).t = TYPE_STRING;
6891 /* Line 1464 of skeleton.m4 */
6892 #line 3193 "parser.y"
6893 {(yyval.value).c = abc_pushundefined(0);
6894 (yyval.value).t = TYPE_ANY;
6904 /* Line 1464 of skeleton.m4 */
6905 #line 3196 "parser.y"
6906 {(yyval.value).c = abc_pushtrue(0);
6907 (yyval.value).t = TYPE_BOOLEAN;
6917 /* Line 1464 of skeleton.m4 */
6918 #line 3199 "parser.y"
6919 {(yyval.value).c = abc_pushfalse(0);
6920 (yyval.value).t = TYPE_BOOLEAN;
6930 /* Line 1464 of skeleton.m4 */
6931 #line 3202 "parser.y"
6932 {(yyval.value).c = abc_pushnull(0);
6933 (yyval.value).t = TYPE_NULL;
6943 /* Line 1464 of skeleton.m4 */
6944 #line 3206 "parser.y"
6945 {(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);
6946 (yyval.value).t = TYPE_BOOLEAN;
6956 /* Line 1464 of skeleton.m4 */
6957 #line 3209 "parser.y"
6958 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterthan((yyval.value).c);
6959 (yyval.value).t = TYPE_BOOLEAN;
6969 /* Line 1464 of skeleton.m4 */
6970 #line 3212 "parser.y"
6971 {(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);
6972 (yyval.value).t = TYPE_BOOLEAN;
6982 /* Line 1464 of skeleton.m4 */
6983 #line 3215 "parser.y"
6984 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterequals((yyval.value).c);
6985 (yyval.value).t = TYPE_BOOLEAN;
6995 /* Line 1464 of skeleton.m4 */
6996 #line 3218 "parser.y"
6997 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_equals((yyval.value).c);
6998 (yyval.value).t = TYPE_BOOLEAN;
7008 /* Line 1464 of skeleton.m4 */
7009 #line 3221 "parser.y"
7010 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_strictequals((yyval.value).c);
7011 (yyval.value).t = TYPE_BOOLEAN;
7021 /* Line 1464 of skeleton.m4 */
7022 #line 3224 "parser.y"
7023 {(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);
7024 (yyval.value).t = TYPE_BOOLEAN;
7034 /* Line 1464 of skeleton.m4 */
7035 #line 3227 "parser.y"
7036 {(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);
7037 (yyval.value).t = TYPE_BOOLEAN;
7047 /* Line 1464 of skeleton.m4 */
7048 #line 3231 "parser.y"
7049 {(yyval.value).t = join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'O');
7050 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
7051 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(1) - (3)].value).t, (yyval.value).t);
7052 (yyval.value).c = abc_dup((yyval.value).c);
7053 code_t*jmp = (yyval.value).c = abc_iftrue((yyval.value).c, 0);
7054 (yyval.value).c = cut_last_push((yyval.value).c);
7055 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
7056 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (3)].value).t, (yyval.value).t);
7057 code_t*label = (yyval.value).c = abc_label((yyval.value).c);
7058 jmp->branch = label;
7068 /* Line 1464 of skeleton.m4 */
7069 #line 3242 "parser.y"
7071 (yyval.value).t = join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'A');
7072 /*printf("%08x:\n",$1.t);
7073 code_dump($1.c, 0, 0, "", stdout);
7074 printf("%08x:\n",$3.t);
7075 code_dump($3.c, 0, 0, "", stdout);
7076 printf("joining %08x and %08x to %08x\n", $1.t, $3.t, $$.t);*/
7077 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
7078 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(1) - (3)].value).t, (yyval.value).t);
7079 (yyval.value).c = abc_dup((yyval.value).c);
7080 code_t*jmp = (yyval.value).c = abc_iffalse((yyval.value).c, 0);
7081 (yyval.value).c = cut_last_push((yyval.value).c);
7082 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
7083 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (3)].value).t, (yyval.value).t);
7084 code_t*label = (yyval.value).c = abc_label((yyval.value).c);
7085 jmp->branch = label;
7095 /* Line 1464 of skeleton.m4 */
7096 #line 3260 "parser.y"
7097 {(yyval.value).c=(yyvsp[(2) - (2)].value).c;
7098 (yyval.value).c = abc_not((yyval.value).c);
7099 (yyval.value).t = TYPE_BOOLEAN;
7109 /* Line 1464 of skeleton.m4 */
7110 #line 3265 "parser.y"
7111 {(yyval.value).c=(yyvsp[(2) - (2)].value).c;
7112 (yyval.value).c = abc_bitnot((yyval.value).c);
7113 (yyval.value).t = TYPE_INT;
7123 /* Line 1464 of skeleton.m4 */
7124 #line 3270 "parser.y"
7125 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7126 (yyval.value).c = abc_bitand((yyval.value).c);
7127 (yyval.value).t = TYPE_INT;
7137 /* Line 1464 of skeleton.m4 */
7138 #line 3275 "parser.y"
7139 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7140 (yyval.value).c = abc_bitxor((yyval.value).c);
7141 (yyval.value).t = TYPE_INT;
7151 /* Line 1464 of skeleton.m4 */
7152 #line 3280 "parser.y"
7153 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7154 (yyval.value).c = abc_bitor((yyval.value).c);
7155 (yyval.value).t = TYPE_INT;
7165 /* Line 1464 of skeleton.m4 */
7166 #line 3285 "parser.y"
7167 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7168 (yyval.value).c = abc_rshift((yyval.value).c);
7169 (yyval.value).t = TYPE_INT;
7179 /* Line 1464 of skeleton.m4 */
7180 #line 3289 "parser.y"
7181 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7182 (yyval.value).c = abc_urshift((yyval.value).c);
7183 (yyval.value).t = TYPE_INT;
7193 /* Line 1464 of skeleton.m4 */
7194 #line 3293 "parser.y"
7195 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7196 (yyval.value).c = abc_lshift((yyval.value).c);
7197 (yyval.value).t = TYPE_INT;
7207 /* Line 1464 of skeleton.m4 */
7208 #line 3298 "parser.y"
7209 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7210 (yyval.value).c = abc_divide((yyval.value).c);
7211 (yyval.value).t = TYPE_NUMBER;
7221 /* Line 1464 of skeleton.m4 */
7222 #line 3302 "parser.y"
7223 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7224 (yyval.value).c = abc_modulo((yyval.value).c);
7225 (yyval.value).t = TYPE_NUMBER;
7235 /* Line 1464 of skeleton.m4 */
7236 #line 3306 "parser.y"
7237 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7238 if(BOTH_INT((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t)) {
7239 (yyval.value).c = abc_add_i((yyval.value).c);
7240 (yyval.value).t = TYPE_INT;
7242 (yyval.value).c = abc_add((yyval.value).c);
7243 (yyval.value).t = join_types((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t,'+');
7254 /* Line 1464 of skeleton.m4 */
7255 #line 3315 "parser.y"
7256 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7257 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
7258 (yyval.value).c = abc_subtract_i((yyval.value).c);
7259 (yyval.value).t = TYPE_INT;
7261 (yyval.value).c = abc_subtract((yyval.value).c);
7262 (yyval.value).t = TYPE_NUMBER;
7273 /* Line 1464 of skeleton.m4 */
7274 #line 3324 "parser.y"
7275 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7276 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
7277 (yyval.value).c = abc_multiply_i((yyval.value).c);
7278 (yyval.value).t = TYPE_INT;
7280 (yyval.value).c = abc_multiply((yyval.value).c);
7281 (yyval.value).t = TYPE_NUMBER;
7292 /* Line 1464 of skeleton.m4 */
7293 #line 3334 "parser.y"
7294 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7295 (yyval.value).c = abc_in((yyval.value).c);
7296 (yyval.value).t = TYPE_BOOLEAN;
7306 /* Line 1464 of skeleton.m4 */
7307 #line 3339 "parser.y"
7308 {char use_astype=0; // flash player's astype works differently than astypelate
7309 if(use_astype && TYPE_IS_CLASS((yyvsp[(3) - (3)].value).t) && (yyvsp[(3) - (3)].value).t->data) {
7310 MULTINAME(m, (classinfo_t*)((yyvsp[(3) - (3)].value).t->data));
7311 (yyval.value).c = abc_astype2((yyvsp[(1) - (3)].value).c, &m);
7312 (yyval.value).t = (yyvsp[(3) - (3)].value).t->data;
7314 (yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
7315 (yyval.value).c = abc_astypelate((yyval.value).c);
7316 (yyval.value).t = TYPE_ANY;
7327 /* Line 1464 of skeleton.m4 */
7328 #line 3352 "parser.y"
7329 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
7330 (yyval.value).c = abc_instanceof((yyval.value).c);
7331 (yyval.value).t = TYPE_BOOLEAN;
7341 /* Line 1464 of skeleton.m4 */
7342 #line 3357 "parser.y"
7343 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
7344 (yyval.value).c = abc_istypelate((yyval.value).c);
7345 (yyval.value).t = TYPE_BOOLEAN;
7355 /* Line 1464 of skeleton.m4 */
7356 #line 3362 "parser.y"
7358 (yyval.value).c = (yyvsp[(3) - (4)].value).c;
7359 (yyval.value).c = abc_typeof((yyval.value).c);
7360 (yyval.value).t = TYPE_STRING;
7370 /* Line 1464 of skeleton.m4 */
7371 #line 3368 "parser.y"
7373 (yyval.value).c = cut_last_push((yyvsp[(2) - (2)].value).c);
7374 (yyval.value).c = abc_pushundefined((yyval.value).c);
7375 (yyval.value).t = TYPE_ANY;
7385 /* Line 1464 of skeleton.m4 */
7386 #line 3374 "parser.y"
7387 { (yyval.value).c = abc_pushundefined(0);
7388 (yyval.value).t = TYPE_ANY;
7398 /* Line 1464 of skeleton.m4 */
7399 #line 3378 "parser.y"
7400 {(yyval.value)=(yyvsp[(2) - (3)].value);}
7409 /* Line 1464 of skeleton.m4 */
7410 #line 3380 "parser.y"
7412 (yyval.value)=(yyvsp[(2) - (2)].value);
7413 if(IS_INT((yyvsp[(2) - (2)].value).t)) {
7414 (yyval.value).c=abc_negate_i((yyval.value).c);
7415 (yyval.value).t = TYPE_INT;
7417 (yyval.value).c=abc_negate((yyval.value).c);
7418 (yyval.value).t = TYPE_NUMBER;
7429 /* Line 1464 of skeleton.m4 */
7430 #line 3391 "parser.y"
7432 (yyval.value).c = (yyvsp[(1) - (4)].value).c;
7433 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value).c);
7435 MULTINAME_LATE(m, (yyvsp[(1) - (4)].value).t?(yyvsp[(1) - (4)].value).t->access:ACCESS_PACKAGE, "");
7436 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7437 (yyval.value).t = 0; // array elements have unknown type
7447 /* Line 1464 of skeleton.m4 */
7448 #line 3400 "parser.y"
7450 (yyval.value).c = code_new();
7451 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(2) - (3)].value_list).cc);
7452 (yyval.value).c = abc_newarray((yyval.value).c, (yyvsp[(2) - (3)].value_list).number);
7453 (yyval.value).t = registry_getarrayclass();
7463 /* Line 1464 of skeleton.m4 */
7464 #line 3407 "parser.y"
7465 {(yyval.value_list).cc=0;(yyval.value_list).number=0;}
7474 /* Line 1464 of skeleton.m4 */
7475 #line 3408 "parser.y"
7476 {(yyval.value_list)=(yyvsp[(1) - (1)].value_list);}
7485 /* Line 1464 of skeleton.m4 */
7486 #line 3410 "parser.y"
7488 (yyval.value_list).cc = 0;
7489 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(1) - (3)].value).c);
7490 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (3)].value).c);
7491 (yyval.value_list).number = 2;
7501 /* Line 1464 of skeleton.m4 */
7502 #line 3416 "parser.y"
7504 (yyval.value_list).cc = (yyvsp[(1) - (5)].value_list).cc;
7505 (yyval.value_list).number = (yyvsp[(1) - (5)].value_list).number+2;
7506 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (5)].value).c);
7507 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(5) - (5)].value).c);
7517 /* Line 1464 of skeleton.m4 */
7518 #line 3425 "parser.y"
7520 (yyval.value).c = code_new();
7521 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(2) - (3)].value_list).cc);
7522 (yyval.value).c = abc_newobject((yyval.value).c, (yyvsp[(2) - (3)].value_list).number/2);
7523 (yyval.value).t = registry_getobjectclass();
7533 /* Line 1464 of skeleton.m4 */
7534 #line 3432 "parser.y"
7536 code_t*c = (yyvsp[(3) - (3)].value).c;
7537 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
7538 c=abc_multiply_i(c);
7542 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '*'), (yyvsp[(1) - (3)].value).t);
7543 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7544 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7554 /* Line 1464 of skeleton.m4 */
7555 #line 3444 "parser.y"
7557 code_t*c = abc_modulo((yyvsp[(3) - (3)].value).c);
7558 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '%'), (yyvsp[(1) - (3)].value).t);
7559 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7560 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7570 /* Line 1464 of skeleton.m4 */
7571 #line 3450 "parser.y"
7573 code_t*c = abc_lshift((yyvsp[(3) - (3)].value).c);
7574 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '<'), (yyvsp[(1) - (3)].value).t);
7575 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7576 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7586 /* Line 1464 of skeleton.m4 */
7587 #line 3456 "parser.y"
7589 code_t*c = abc_rshift((yyvsp[(3) - (3)].value).c);
7590 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '>'), (yyvsp[(1) - (3)].value).t);
7591 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7592 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7602 /* Line 1464 of skeleton.m4 */
7603 #line 3462 "parser.y"
7605 code_t*c = abc_urshift((yyvsp[(3) - (3)].value).c);
7606 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'U'), (yyvsp[(1) - (3)].value).t);
7607 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7608 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7618 /* Line 1464 of skeleton.m4 */
7619 #line 3468 "parser.y"
7621 code_t*c = abc_divide((yyvsp[(3) - (3)].value).c);
7622 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '/'), (yyvsp[(1) - (3)].value).t);
7623 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7624 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7634 /* Line 1464 of skeleton.m4 */
7635 #line 3474 "parser.y"
7637 code_t*c = abc_bitor((yyvsp[(3) - (3)].value).c);
7638 c=converttype(c, TYPE_INT, (yyvsp[(1) - (3)].value).t);
7639 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7640 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7650 /* Line 1464 of skeleton.m4 */
7651 #line 3480 "parser.y"
7653 code_t*c = abc_bitxor((yyvsp[(3) - (3)].value).c);
7654 c=converttype(c, TYPE_INT, (yyvsp[(1) - (3)].value).t);
7655 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7656 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7666 /* Line 1464 of skeleton.m4 */
7667 #line 3486 "parser.y"
7669 code_t*c = (yyvsp[(3) - (3)].value).c;
7671 if(TYPE_IS_INT((yyvsp[(1) - (3)].value).t)) {
7675 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '+'), (yyvsp[(1) - (3)].value).t);
7678 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7679 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7689 /* Line 1464 of skeleton.m4 */
7690 #line 3499 "parser.y"
7691 { code_t*c = (yyvsp[(3) - (3)].value).c;
7692 if(TYPE_IS_INT((yyvsp[(1) - (3)].value).t)) {
7693 c=abc_subtract_i(c);
7696 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '-'), (yyvsp[(1) - (3)].value).t);
7699 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7700 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7710 /* Line 1464 of skeleton.m4 */
7711 #line 3510 "parser.y"
7713 c = code_append(c, (yyvsp[(3) - (3)].value).c);
7714 c = converttype(c, (yyvsp[(3) - (3)].value).t, (yyvsp[(1) - (3)].value).t);
7715 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 1, 0);
7716 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7726 /* Line 1464 of skeleton.m4 */
7727 #line 3517 "parser.y"
7729 (yyval.value).t = join_types((yyvsp[(3) - (5)].value).t,(yyvsp[(5) - (5)].value).t,'?');
7730 (yyval.value).c = (yyvsp[(1) - (5)].value).c;
7731 code_t*j1 = (yyval.value).c = abc_iffalse((yyval.value).c, 0);
7732 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (5)].value).c);
7733 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (5)].value).t, (yyval.value).t);
7734 code_t*j2 = (yyval.value).c = abc_jump((yyval.value).c, 0);
7735 (yyval.value).c = j1->branch = abc_label((yyval.value).c);
7736 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(5) - (5)].value).c);
7737 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(5) - (5)].value).t, (yyval.value).t);
7738 (yyval.value).c = j2->branch = abc_label((yyval.value).c);
7748 /* Line 1464 of skeleton.m4 */
7749 #line 3530 "parser.y"
7751 classinfo_t*type = (yyvsp[(1) - (2)].value).t;
7752 if(is_getlocal((yyvsp[(1) - (2)].value).c) && (TYPE_IS_INT((yyvsp[(1) - (2)].value).t) || TYPE_IS_NUMBER((yyvsp[(1) - (2)].value).t))) {
7753 int nr = getlocalnr((yyvsp[(1) - (2)].value).c);
7754 code_free((yyvsp[(1) - (2)].value).c);(yyvsp[(1) - (2)].value).c=0;
7755 if(TYPE_IS_INT((yyvsp[(1) - (2)].value).t)) {
7756 (yyval.value).c = abc_getlocal(0, nr);
7757 (yyval.value).c = abc_inclocal_i((yyval.value).c, nr);
7758 } else if(TYPE_IS_NUMBER((yyvsp[(1) - (2)].value).t)) {
7759 (yyval.value).c = abc_getlocal(0, nr);
7760 (yyval.value).c = abc_inclocal((yyval.value).c, nr);
7761 } else syntaxerror("internal error");
7763 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7764 c=abc_increment_i(c);
7770 c=converttype(c, type, (yyvsp[(1) - (2)].value).t);
7771 (yyval.value).c = toreadwrite((yyvsp[(1) - (2)].value).c, c, 0, 1);
7772 (yyval.value).t = (yyvsp[(1) - (2)].value).t;
7783 /* Line 1464 of skeleton.m4 */
7784 #line 3557 "parser.y"
7786 classinfo_t*type = (yyvsp[(1) - (2)].value).t;
7787 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7788 c=abc_decrement_i(c);
7794 c=converttype(c, type, (yyvsp[(1) - (2)].value).t);
7795 (yyval.value).c = toreadwrite((yyvsp[(1) - (2)].value).c, c, 0, 1);
7796 (yyval.value).t = (yyvsp[(1) - (2)].value).t;
7806 /* Line 1464 of skeleton.m4 */
7807 #line 3571 "parser.y"
7809 classinfo_t*type = (yyvsp[(2) - (2)].value).t;
7810 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7811 c=abc_increment_i(c);
7817 c=converttype(c, type, (yyvsp[(2) - (2)].value).t);
7818 (yyval.value).c = toreadwrite((yyvsp[(2) - (2)].value).c, c, 0, 0);
7819 (yyval.value).t = (yyvsp[(2) - (2)].value).t;
7829 /* Line 1464 of skeleton.m4 */
7830 #line 3585 "parser.y"
7832 classinfo_t*type = (yyvsp[(2) - (2)].value).t;
7833 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7834 c=abc_decrement_i(c);
7840 c=converttype(c, type, (yyvsp[(2) - (2)].value).t);
7841 (yyval.value).c = toreadwrite((yyvsp[(2) - (2)].value).c, c, 0, 0);
7842 (yyval.value).t = (yyvsp[(2) - (2)].value).t;
7852 /* Line 1464 of skeleton.m4 */
7853 #line 3600 "parser.y"
7854 { if(!state->cls->info)
7855 syntaxerror("super keyword not allowed outside a class");
7856 classinfo_t*t = state->cls->info->superclass;
7857 if(!t) t = TYPE_OBJECT;
7859 memberinfo_t*f = findmember_nsset(t, (yyvsp[(3) - (3)].id), 1);
7861 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
7862 (yyval.value).c = 0;
7863 (yyval.value).c = abc_getlocal_0((yyval.value).c);
7864 (yyval.value).c = abc_getsuper2((yyval.value).c, &m);
7865 (yyval.value).t = slotinfo_gettype((slotinfo_t*)f);
7875 /* Line 1464 of skeleton.m4 */
7876 #line 3614 "parser.y"
7879 (yyval.value).c = abc_pushundefined(0);
7880 (yyval.value).t = 0;
7881 as3_warning("ignored @ operator");
7891 /* Line 1464 of skeleton.m4 */
7892 #line 3621 "parser.y"
7894 // child attribute TODO
7895 (yyval.value).c = abc_pushundefined(0);
7896 (yyval.value).t = 0;
7897 as3_warning("ignored .@ operator");
7907 /* Line 1464 of skeleton.m4 */
7908 #line 3628 "parser.y"
7910 // namespace declaration TODO
7911 (yyval.value).c = abc_pushundefined(0);
7912 (yyval.value).t = 0;
7913 as3_warning("ignored :: operator");
7923 /* Line 1464 of skeleton.m4 */
7924 #line 3635 "parser.y"
7927 (yyval.value).c = abc_pushundefined(0);
7928 (yyval.value).t = 0;
7929 as3_warning("ignored .. operator");
7939 /* Line 1464 of skeleton.m4 */
7940 #line 3642 "parser.y"
7943 (yyval.value).c = abc_pushundefined(0);
7944 (yyval.value).t = 0;
7945 as3_warning("ignored .() operator");
7955 /* Line 1464 of skeleton.m4 */
7956 #line 3653 "parser.y"
7958 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
7959 classinfo_t*t = (yyvsp[(1) - (3)].value).t;
7961 if(TYPE_IS_CLASS(t) && t->data) {
7966 if(t->subtype==INFOTYPE_UNRESOLVED) {
7967 syntaxerror("syntaxerror: trying to resolve property '%s' on incomplete object '%s'", (yyvsp[(3) - (3)].id), t->name);
7969 memberinfo_t*f = findmember_nsset(t, (yyvsp[(3) - (3)].id), 1);
7971 if(f && !is_static != !(f->flags&FLAG_STATIC))
7973 if(f && f->slot && !noslot) {
7974 (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
7976 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
7977 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7979 /* determine type */
7980 (yyval.value).t = slotinfo_gettype((slotinfo_t*)f);
7981 if(!(yyval.value).t)
7982 (yyval.value).c = abc_coerce_a((yyval.value).c);
7983 } else if((yyvsp[(1) - (3)].value).c && (yyvsp[(1) - (3)].value).c->opcode == OPCODE___PUSHPACKAGE__) {
7984 string_t*package = (yyvsp[(1) - (3)].value).c->data[0];
7985 char*package2 = concat3(package->str, ".", (yyvsp[(3) - (3)].id));
7986 if(dict_contains(state->import_toplevel_packages, package2)) {
7987 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
7988 (yyval.value).c->data[0] = string_new4(package2);
7989 (yyval.value).t = 0;
7991 slotinfo_t*a = registry_find(package->str, (yyvsp[(3) - (3)].id));
7993 syntaxerror("couldn't resolve %s", package2);
7994 (yyval.value) = push_class(a);
7997 /* when resolving a property on an unknown type, we do know the
7998 name of the property (and don't seem to need the package), but
7999 we need to make avm2 try out all access modes */
8000 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(3) - (3)].id)};
8001 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
8002 (yyval.value).c = abc_coerce_a((yyval.value).c);
8003 (yyval.value).t = registry_getanytype();
8014 /* Line 1464 of skeleton.m4 */
8015 #line 3703 "parser.y"
8018 /* Queue unresolved identifiers for checking against the parent
8019 function's variables.
8020 We consider everything which is not a local variable "unresolved".
8021 This encompasses class names, members of the surrounding class
8022 etc. which is *correct* because local variables of the parent function
8025 if(state->method->inner && !find_variable(state, (yyvsp[(1) - (1)].id))) {
8026 unknown_variable((yyvsp[(1) - (1)].id));
8029 /* let the compiler know that it might check the current directory/package
8030 for this identifier- maybe there's a file $1.as defining $1. */
8031 as3_schedule_class_noerror(state->package, (yyvsp[(1) - (1)].id));
8034 (yyval.value).t = 0;
8035 (yyval.value).c = 0;
8040 /* look at variables */
8041 if((v = find_variable(state, (yyvsp[(1) - (1)].id)))) {
8042 // $1 is a local variable
8043 (yyval.value).c = abc_getlocal((yyval.value).c, v->index);
8044 (yyval.value).t = v->type;
8047 if((v = find_slot(state, (yyvsp[(1) - (1)].id)))) {
8048 (yyval.value).c = abc_getscopeobject((yyval.value).c, 1);
8049 (yyval.value).c = abc_getslot((yyval.value).c, v->index);
8050 (yyval.value).t = v->type;
8054 int i_am_static = (state->method && state->method->info)?(state->method->info->flags&FLAG_STATIC):FLAG_STATIC;
8056 /* look at current class' members */
8057 if(state->cls && (f = findmember_nsset(state->cls->info, (yyvsp[(1) - (1)].id), 1)) &&
8058 (f->flags&FLAG_STATIC) >= i_am_static) {
8059 // $1 is a function in this class
8060 int var_is_static = (f->flags&FLAG_STATIC);
8062 if(f->kind == INFOTYPE_METHOD) {
8063 (yyval.value).t = TYPE_FUNCTION(f);
8065 (yyval.value).t = f->type;
8067 if(var_is_static && !i_am_static) {
8068 /* access to a static member from a non-static location.
8069 do this via findpropstrict:
8070 there doesn't seem to be any non-lookup way to access
8071 static properties of a class */
8072 state->method->late_binding = 1;
8073 (yyval.value).t = f->type;
8074 namespace_t ns = {f->access, ""};
8075 multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
8076 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
8077 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
8079 } else if(f->slot>0) {
8080 (yyval.value).c = abc_getlocal_0((yyval.value).c);
8081 (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
8084 namespace_t ns = {f->access, ""};
8085 multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
8086 (yyval.value).c = abc_getlocal_0((yyval.value).c);
8087 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
8092 /* look at actual classes, in the current package and imported */
8093 if((a = find_class((yyvsp[(1) - (1)].id)))) {
8094 (yyval.value) = push_class(a);
8098 /* look through package prefixes */
8099 if(dict_contains(state->import_toplevel_packages, (yyvsp[(1) - (1)].id))) {
8100 (yyval.value).c = abc___pushpackage__((yyval.value).c, (yyvsp[(1) - (1)].id));
8101 (yyval.value).t = 0;
8105 /* unknown object, let the avm2 resolve it */
8107 //as3_softwarning("Couldn't resolve '%s', doing late binding", $1);
8108 as3_warning("Couldn't resolve '%s', doing late binding", (yyvsp[(1) - (1)].id));
8109 state->method->late_binding = 1;
8111 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(1) - (1)].id)};
8113 (yyval.value).t = 0;
8114 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
8115 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
8126 /* Line 1464 of skeleton.m4 */
8127 #line 3808 "parser.y"
8130 NEW(namespace_decl_t,n);
8131 n->name = (yyvsp[(2) - (2)].id);
8132 n->url = (yyvsp[(2) - (2)].id);
8133 (yyval.namespace_decl)=n;
8143 /* Line 1464 of skeleton.m4 */
8144 #line 3815 "parser.y"
8147 NEW(namespace_decl_t,n);
8148 n->name = (yyvsp[(2) - (4)].id);
8149 n->url = (yyvsp[(4) - (4)].id);
8150 (yyval.namespace_decl)=n;
8160 /* Line 1464 of skeleton.m4 */
8161 #line 3822 "parser.y"
8164 NEW(namespace_decl_t,n);
8165 n->name = (yyvsp[(2) - (4)].id);
8166 n->url = (yyvsp[(4) - (4)].str).str;
8167 (yyval.namespace_decl)=n;
8177 /* Line 1464 of skeleton.m4 */
8178 #line 3829 "parser.y"
8181 trie_put(active_namespaces, (yyvsp[(2) - (2)].namespace_decl)->name, (void*)(yyvsp[(2) - (2)].namespace_decl)->url);
8183 namespace_t access = modifiers2access(&(yyvsp[(1) - (2)].flags));
8184 varinfo_t* var = varinfo_register_global(access.access, state->package, (yyvsp[(2) - (2)].namespace_decl)->name);
8185 var->type = TYPE_NAMESPACE;
8187 ns.access = ACCESS_NAMESPACE;
8188 ns.name = (yyvsp[(2) - (2)].namespace_decl)->url;
8189 var->value = constant_new_namespace(&ns);
8201 /* Line 1464 of skeleton.m4 */
8202 #line 3844 "parser.y"
8206 trie_put(active_namespaces, (yyvsp[(3) - (3)].classinfo)->name, url);
8215 /* Line 1464 of skeleton.m4 */
8216 #line 8217 "parser.tab.c"
8219 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
8223 YY_STACK_PRINT (yyss, yyssp);
8227 /* Now `shift' the result of the reduction. Determine what state
8228 that goes to, based on the state we popped back to and the rule
8229 number reduced by. */
8233 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
8234 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
8235 yystate = yytable[yystate];
8237 yystate = yydefgoto[yyn - YYNTOKENS];
8242 /*------------------------------------.
8243 | yyerrlab -- here on detecting error |
8244 `------------------------------------*/
8246 /* If not already recovering from an error, report this error. */
8250 #if ! YYERROR_VERBOSE
8251 yyerror (YY_("syntax error"));
8254 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
8255 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
8257 YYSIZE_T yyalloc = 2 * yysize;
8258 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
8259 yyalloc = YYSTACK_ALLOC_MAXIMUM;
8260 if (yymsg != yymsgbuf)
8261 YYSTACK_FREE (yymsg);
8262 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
8264 yymsg_alloc = yyalloc;
8268 yymsg_alloc = sizeof yymsgbuf;
8272 if (0 < yysize && yysize <= yymsg_alloc)
8274 (void) yysyntax_error (yymsg, yystate, yychar);
8279 yyerror (YY_("syntax error"));
8281 goto yyexhaustedlab;
8289 if (yyerrstatus == 3)
8291 /* If just tried and failed to reuse lookahead token after an
8292 error, discard it. */
8294 if (yychar <= YYEOF)
8296 /* Return failure if at end of input. */
8297 if (yychar == YYEOF)
8302 yydestruct ("Error: discarding",
8308 /* Else will try to reuse lookahead token after shifting the error
8313 /*---------------------------------------------------.
8314 | yyerrorlab -- error raised explicitly by YYERROR. |
8315 `---------------------------------------------------*/
8318 /* Pacify compilers like GCC when the user code never invokes
8319 YYERROR and the label yyerrorlab therefore never appears in user
8321 if (/*CONSTCOND*/ 0)
8324 /* Do not reclaim the symbols of the rule which action triggered
8328 YY_STACK_PRINT (yyss, yyssp);
8333 /*-------------------------------------------------------------.
8334 | yyerrlab1 -- common code for both syntax error and YYERROR. |
8335 `-------------------------------------------------------------*/
8337 yyerrstatus = 3; /* Each real token shifted decrements this. */
8341 yyn = yypact[yystate];
8342 if (yyn != YYPACT_NINF)
8345 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
8353 /* Pop the current state because it cannot handle the error token. */
8358 yydestruct ("Error: popping",
8359 yystos[yystate], yyvsp);
8362 YY_STACK_PRINT (yyss, yyssp);
8368 /* Shift the error token. */
8369 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
8375 /*-------------------------------------.
8376 | yyacceptlab -- YYACCEPT comes here. |
8377 `-------------------------------------*/
8382 /*-----------------------------------.
8383 | yyabortlab -- YYABORT comes here. |
8384 `-----------------------------------*/
8389 #if !defined(yyoverflow) || YYERROR_VERBOSE
8390 /*-------------------------------------------------.
8391 | yyexhaustedlab -- memory exhaustion comes here. |
8392 `-------------------------------------------------*/
8394 yyerror (YY_("memory exhausted"));
8400 if (yychar != YYEMPTY)
8401 yydestruct ("Cleanup: discarding lookahead",
8403 /* Do not reclaim the symbols of the rule which action triggered
8404 this YYABORT or YYACCEPT. */
8406 YY_STACK_PRINT (yyss, yyssp);
8407 while (yyssp != yyss)
8409 yydestruct ("Cleanup: popping",
8410 yystos[*yyssp], yyvsp);
8415 YYSTACK_FREE (yyss);
8418 if (yymsg != yymsgbuf)
8419 YYSTACK_FREE (yymsg);
8421 /* Make sure YYID is used. */
8422 return YYID (yyresult);