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;
269 abc_exception_list_t *l;
275 /* Line 223 of skeleton.m4 */
276 #line 277 "parser.tab.c"
278 # define YYSTYPE_IS_TRIVIAL 1
279 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
280 # define YYSTYPE_IS_DECLARED 1
284 /* Copy the second part of user declarations. */
286 /* Line 273 of skeleton.m4 */
290 static int a3_error(char*s)
292 syntaxerror("%s", s);
293 return 0; //make gcc happy
297 static char* concat2(const char* t1, const char* t2)
301 char*text = malloc(l1+l2+1);
302 memcpy(text , t1, l1);
303 memcpy(text+l1, t2, l2);
307 static char* concat3(const char* t1, const char* t2, const char* t3)
312 char*text = malloc(l1+l2+l3+1);
313 memcpy(text , t1, l1);
314 memcpy(text+l1, t2, l2);
315 memcpy(text+l1+l2, t3, l3);
320 typedef struct _import {
324 DECLARE_LIST(import);
326 DECLARE(methodstate);
327 DECLARE_LIST(methodstate);
329 typedef struct _classstate {
335 methodstate_t*static_init;
337 //code_t*static_init;
339 char has_constructor;
342 struct _methodstate {
351 dict_t*unresolved_variables;
354 char uses_parent_function;
359 int var_index; // for inner methods
360 int slot_index; // for inner methods
361 char is_a_slot; // for inner methods
364 abc_exception_list_t*exceptions;
366 methodstate_list_t*innerfunctions;
369 typedef struct _state {
374 import_list_t*wildcard_imports;
375 dict_t*import_toplevel_packages;
377 namespace_list_t*active_namespaces;
378 char has_own_imports;
379 char new_vars; // e.g. transition between two functions
382 methodstate_t*method;
389 typedef struct _global {
393 dict_t*file2token2info;
396 static global_t*global = 0;
397 static state_t* state = 0;
401 #define MULTINAME(m,x) \
405 registry_fill_multiname(&m, &m##_ns, (slotinfo_t*)(x));
407 #define MEMBER_MULTINAME(m,f,n) \
411 if((m##_ns.access = ((slotinfo_t*)(f))->access)==ACCESS_NAMESPACE) \
412 m##_ns.name = ((slotinfo_t*)(f))->package; \
417 m.namespace_set = 0; \
418 m.name = ((slotinfo_t*)(f))->name; \
420 m.type = MULTINAME; \
422 m.namespace_set = &nopackage_namespace_set; \
426 /* warning: list length of namespace set is undefined */
427 #define MULTINAME_LATE(m, access, package) \
428 namespace_t m##_ns = {access, package}; \
429 namespace_set_t m##_nsset; \
430 namespace_list_t m##_l;m##_l.next = 0; \
431 m##_nsset.namespaces = &m##_l; \
432 m##_nsset = m##_nsset; \
433 m##_l.namespace = &m##_ns; \
434 multiname_t m = {MULTINAMEL, 0, &m##_nsset, 0};
436 static namespace_t ns1 = {ACCESS_PRIVATE, ""};
437 static namespace_t ns2 = {ACCESS_PROTECTED, ""};
438 static namespace_t ns3 = {ACCESS_PACKAGEINTERNAL, ""};
439 static namespace_t ns4 = {ACCESS_PACKAGE, ""};
440 static namespace_list_t nl4 = {&ns4,0};
441 static namespace_list_t nl3 = {&ns3,&nl4};
442 static namespace_list_t nl2 = {&ns2,&nl3};
443 static namespace_list_t nl1 = {&ns1,&nl2};
444 static namespace_set_t nopackage_namespace_set = {&nl1};
446 static void new_state()
449 state_t*oldstate = state;
451 memcpy(s, state, sizeof(state_t)); //shallow copy
453 s->imports = dict_new();
455 if(!s->import_toplevel_packages) {
456 s->import_toplevel_packages = dict_new();
460 state->has_own_imports = 0;
461 state->vars = dict_new();
462 state->old = oldstate;
465 static void state_has_imports()
467 state->wildcard_imports = list_clone(state->wildcard_imports);
468 state->imports = dict_clone(state->imports);
469 state->has_own_imports = 1;
471 static void import_toplevel(const char*package)
473 char* s = strdup(package);
475 dict_put(state->import_toplevel_packages, s, 0);
476 char*x = strrchr(s, '.');
484 static void state_destroy(state_t*state)
486 if(state->has_own_imports) {
487 list_free(state->wildcard_imports);
488 dict_destroy(state->imports);state->imports=0;
490 if(state->imports && (!state->old || state->old->imports!=state->imports)) {
491 dict_destroy(state->imports);state->imports=0;
495 for(t=0;t<state->vars->hashsize;t++) {
496 dictentry_t*e =state->vars->slots[t];
498 free(e->data);e->data=0;
502 dict_destroy(state->vars);state->vars=0;
508 static void old_state()
510 if(!state || !state->old)
511 syntaxerror("invalid nesting");
512 state_t*leaving = state;
516 if(as3_pass>1 && leaving->method && leaving->method != state->method && !leaving->method->inner) {
517 free(leaving->method);
520 if(as3_pass>1 && leaving->cls && leaving->cls != state->cls) {
525 state_destroy(leaving);
528 static code_t* method_header(methodstate_t*m);
529 static code_t* wrap_function(code_t*c,code_t*header, code_t*body);
530 static void function_initvars(methodstate_t*m, params_t*params, int flags, char var0);
533 static char* internal_filename_package = 0;
534 void initialize_file(char*filename)
537 syntaxerror("invalid call to initialize_file during parsing of another file");
540 state->package = internal_filename_package = strdup(filename);
542 global->token2info = dict_lookup(global->file2token2info,
543 current_filename // use long version
545 if(!global->token2info) {
546 global->token2info = dict_new2(&ptr_type);
547 dict_put(global->file2token2info, current_filename, global->token2info);
551 state->method = rfx_calloc(sizeof(methodstate_t));
552 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
554 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
555 function_initvars(state->method, 0, 0, 1);
556 global->init = abc_initscript(global->file);
557 state->method->late_binding = 1; // init scripts use getglobalscope, so we need a getlocal0/pushscope
563 if(!state || state->level!=1) {
564 syntaxerror("unexpected end of file in pass %d", as3_pass);
568 code_t*header = method_header(state->method);
569 code_t*c = wrap_function(header, 0, global->init->method->body->code);
570 global->init->method->body->code = c;
571 free(state->method);state->method=0;
574 //free(state->package);state->package=0; // used in registry
575 state_destroy(state);state=0;
578 void initialize_parser()
580 global = rfx_calloc(sizeof(global_t));
581 global->file = abc_file_new();
582 global->file->flags &= ~ABCFILE_LAZY;
583 global->file2token2info = dict_new();
584 global->token2info = 0;
587 void* finish_parser()
589 dict_free_all(global->file2token2info, 1, (void*)dict_destroy);
591 global->token2info=0;
597 static void xx_scopetest()
599 /* findpropstrict doesn't just return a scope object- it
600 also makes it "active" somehow. Push local_0 on the
601 scope stack and read it back with findpropstrict, it'll
602 contain properties like "trace". Trying to find the same
603 property on a "vanilla" local_0 yields only a "undefined" */
604 //c = abc_findpropstrict(c, "[package]::trace");
606 /*c = abc_getlocal_0(c);
607 c = abc_findpropstrict(c, "[package]::trace");
609 c = abc_setlocal_1(c);
611 c = abc_pushbyte(c, 0);
612 c = abc_setlocal_2(c);
614 code_t*xx = c = abc_label(c);
615 c = abc_findpropstrict(c, "[package]::trace");
616 c = abc_pushstring(c, "prop:");
617 c = abc_hasnext2(c, 1, 2);
619 c = abc_setlocal_3(c);
620 c = abc_callpropvoid(c, "[package]::trace", 2);
621 c = abc_getlocal_3(c);
623 c = abc_iftrue(c,xx);*/
626 typedef struct _variable {
630 methodstate_t*is_inner_method;
633 static variable_t* find_variable(state_t*s, char*name)
637 v = dict_lookup(s->vars, name);
639 if(s->new_vars) break;
644 static variable_t* find_slot(state_t*s, const char*name)
646 if(s->method && s->method->slots)
647 return dict_lookup(s->method->slots, name);
651 static variable_t* find_variable_safe(state_t*s, char*name)
653 variable_t* v = find_variable(s, name);
655 syntaxerror("undefined variable: %s", name);
658 static char variable_exists(char*name)
660 return dict_contains(state->vars, name);
662 code_t*defaultvalue(code_t*c, classinfo_t*type);
664 static variable_t* new_variable2(const char*name, classinfo_t*type, char init, char maybeslot)
667 variable_t*v = find_slot(state, name);
673 v->index = state->method->variable_count++;
677 dict_put(state->vars, name, v);
681 static int new_variable(const char*name, classinfo_t*type, char init, char maybeslot)
683 return new_variable2(name, type, init, maybeslot)->index;
686 #define TEMPVARNAME "__as3_temp__"
687 static int gettempvar()
689 variable_t*v = find_variable(state, TEMPVARNAME);
692 return new_variable(TEMPVARNAME, 0, 0, 0);
695 code_t* var_block(code_t*body)
701 for(t=0;t<state->vars->hashsize;t++) {
702 dictentry_t*e = state->vars->slots[t];
704 variable_t*v = (variable_t*)e->data;
705 if(v->type && v->init) {
706 c = defaultvalue(c, v->type);
707 c = abc_setlocal(c, v->index);
708 k = abc_kill(k, v->index);
718 if(x->opcode== OPCODE___BREAK__ ||
719 x->opcode== OPCODE___CONTINUE__) {
720 /* link kill code before break/continue */
721 code_t*e = code_dup(k);
722 code_t*s = code_start(e);
734 c = code_append(c, body);
735 c = code_append(c, k);
739 void unknown_variable(char*name)
741 if(!state->method->unresolved_variables)
742 state->method->unresolved_variables = dict_new();
743 if(!dict_contains(state->method->unresolved_variables, name))
744 dict_put(state->method->unresolved_variables, name, 0);
747 #define parserassert(b) {if(!(b)) parsererror(__FILE__, __LINE__,__func__);}
749 static void parsererror(const char*file, int line, const char*f)
751 syntaxerror("internal error in %s, %s:%d", f, file, line);
755 static code_t* method_header(methodstate_t*m)
758 if(m->uses_slots || (m->late_binding && !m->inner)) {
759 c = abc_getlocal_0(c);
760 c = abc_pushscope(c);
763 c = abc_newactivation(c);
764 c = abc_pushscope(c);
766 methodstate_list_t*l = m->innerfunctions;
768 parserassert(l->methodstate->abc);
769 if(m->uses_slots && l->methodstate->is_a_slot) {
770 c = abc_getscopeobject(c, 1);
771 c = abc_newfunction(c, l->methodstate->abc);
773 c = abc_setlocal(c, l->methodstate->var_index);
774 c = abc_setslot(c, l->methodstate->slot_index);
776 c = abc_newfunction(c, l->methodstate->abc);
777 c = abc_setlocal(c, l->methodstate->var_index);
779 free(l->methodstate);l->methodstate=0;
783 c = code_append(c, m->header);
786 if(m->is_constructor && !m->has_super) {
787 // call default constructor
788 c = abc_getlocal_0(c);
789 c = abc_constructsuper(c, 0);
791 list_free(m->innerfunctions);
792 m->innerfunctions = 0;
797 static code_t* wrap_function(code_t*c,code_t*header, code_t*body)
799 c = code_append(c, header);
800 c = code_append(c, var_block(body));
801 /* append return if necessary */
802 if(!c || (c->opcode != OPCODE_RETURNVOID &&
803 c->opcode != OPCODE_RETURNVALUE)) {
804 c = abc_returnvoid(c);
810 static void startpackage(char*name)
813 /*printf("entering package \"%s\"\n", name);*/
814 state->package = strdup(name);
816 static void endpackage()
818 /*printf("leaving package \"%s\"\n", state->package);*/
820 //used e.g. in classinfo_register:
821 //free(state->package);state->package=0;
826 #define FLAG_PUBLIC 256
827 #define FLAG_PROTECTED 512
828 #define FLAG_PRIVATE 1024
829 #define FLAG_PACKAGEINTERNAL 2048
830 #define FLAG_NAMESPACE 4096
832 static namespace_t modifiers2access(modifiers_t*mod)
837 if(mod->flags&FLAG_NAMESPACE) {
838 if(mod->flags&(FLAG_PRIVATE|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
839 syntaxerror("invalid combination of access levels and namespaces");
840 ns.access = ACCESS_NAMESPACE;
842 } else if(mod->flags&FLAG_PUBLIC) {
843 if(mod->flags&(FLAG_PRIVATE|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
844 syntaxerror("invalid combination of access levels");
845 ns.access = ACCESS_PACKAGE;
846 } else if(mod->flags&FLAG_PRIVATE) {
847 if(mod->flags&(FLAG_PUBLIC|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
848 syntaxerror("invalid combination of access levels");
849 ns.access = ACCESS_PRIVATE;
850 } else if(mod->flags&FLAG_PROTECTED) {
851 if(mod->flags&(FLAG_PUBLIC|FLAG_PRIVATE|FLAG_PACKAGEINTERNAL))
852 syntaxerror("invalid combination of access levels");
853 ns.access = ACCESS_PROTECTED;
855 ns.access = ACCESS_PACKAGEINTERNAL;
859 static slotinfo_t* find_class(const char*name);
861 static void function_initvars(methodstate_t*m, params_t*params, int flags, char var0)
866 index = new_variable("this", 0, 0, 0);
867 else if(!m->is_global)
868 index = new_variable((flags&FLAG_STATIC)?"class":"this", state->cls?state->cls->info:0, 0, 0);
870 index = new_variable("globalscope", 0, 0, 0);
873 parserassert(!index);
876 /* as variables and slots share the same number, make sure
877 that those variable indices are reserved. It's up to the
878 optimizer to later shuffle the variables down to lower
880 m->variable_count = m->uses_slots;
881 DICT_ITERATE_ITEMS(m->slots, char*, name, variable_t*, v) {
884 v->type = (classinfo_t*)registry_find(v->type->package, v->type->name);
886 v->type = (classinfo_t*)find_class(v->type->name);
887 if(!v->type || v->type->kind != INFOTYPE_CLASS) {
888 syntaxerror("Couldn't find class %s", v->type->name);
896 for(p=params->list;p;p=p->next) {
897 new_variable(p->param->name, p->param->type, 0, 1);
901 methodstate_list_t*l = m->innerfunctions;
903 methodstate_t*m = l->methodstate;
904 variable_t* v = new_variable2(m->info->name, TYPE_FUNCTION(m->info), 0, 1);
905 m->var_index = v->index;
906 m->slot_index = v->index;
907 v->is_inner_method = m;
913 char*as3_globalclass=0;
914 static void startclass(modifiers_t* mod, char*classname, classinfo_t*extends, classinfo_list_t*implements)
917 syntaxerror("inner classes now allowed");
922 classinfo_list_t*mlist=0;
924 if(mod->flags&~(FLAG_PACKAGEINTERNAL|FLAG_PUBLIC|FLAG_FINAL|FLAG_DYNAMIC|FLAG_INTERFACE))
925 syntaxerror("invalid modifier(s)");
927 if((mod->flags&(FLAG_PUBLIC|FLAG_PACKAGEINTERNAL)) == (FLAG_PUBLIC|FLAG_PACKAGEINTERNAL))
928 syntaxerror("public and internal not supported at the same time.");
930 if(!(mod->flags&FLAG_INTERFACE) && !extends) {
931 // all classes extend object
932 extends = registry_getobjectclass();
935 /* create the class name, together with the proper attributes */
939 if(!(mod->flags&FLAG_PUBLIC) && state->package==internal_filename_package) {
940 access = ACCESS_PRIVATE; package = internal_filename_package;
941 } else if(!(mod->flags&FLAG_PUBLIC) && state->package!=internal_filename_package) {
942 access = ACCESS_PACKAGEINTERNAL; package = state->package;
943 } else if(state->package!=internal_filename_package) {
944 access = ACCESS_PACKAGE; package = state->package;
946 syntaxerror("public classes only allowed inside a package");
950 state->cls = rfx_calloc(sizeof(classstate_t));
951 state->cls->init = rfx_calloc(sizeof(methodstate_t));
952 state->cls->static_init = rfx_calloc(sizeof(methodstate_t));
953 /* notice: we make no effort to initialize the top variable (local0) here,
954 even though it has special meaning. We just rely on the facat
955 that pass 1 won't do anything with variables */
957 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->cls);
959 /* set current method to constructor- all code within the class-level (except
960 static variable initializations) will be executed during construction time */
961 state->method = state->cls->init;
963 if(registry_find(package, classname)) {
964 syntaxerror("Package \"%s\" already contains a class called \"%s\"", package, classname);
966 /* build info struct */
967 int num_interfaces = (list_length(implements));
968 state->cls->info = classinfo_register(access, package, classname, num_interfaces);
969 state->cls->info->flags |= mod->flags & (FLAG_DYNAMIC|FLAG_INTERFACE|FLAG_FINAL);
973 state->cls = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
975 state->method = state->cls->init;
976 parserassert(state->cls && state->cls->info);
978 function_initvars(state->cls->init, 0, 0, 1);
979 function_initvars(state->cls->static_init, 0, 0, 0);
981 if(extends && (extends->flags & FLAG_FINAL))
982 syntaxerror("Can't extend final class '%s'", extends->name);
984 /* fill out interfaces and extends (we couldn't resolve those during the first pass) */
985 state->cls->info->superclass = extends;
987 classinfo_list_t*l = implements;
988 for(l=implements;l;l=l->next) {
989 if(!(l->classinfo->flags & FLAG_INTERFACE))
990 syntaxerror("'%s' is not an interface", l->classinfo->name);
991 state->cls->info->interfaces[pos++] = l->classinfo;
994 /* generate the abc code for this class */
995 MULTINAME(classname2,state->cls->info);
996 multiname_t*extends2 = sig2mname(extends);
998 state->cls->abc = abc_class_new(global->file, &classname2, extends2);
999 if(state->cls->info->flags&FLAG_FINAL) abc_class_final(state->cls->abc);
1000 if(!(state->cls->info->flags&FLAG_DYNAMIC)) abc_class_sealed(state->cls->abc);
1001 if(state->cls->info->flags&FLAG_INTERFACE) {
1002 abc_class_interface(state->cls->abc);
1005 abc_class_protectedNS(state->cls->abc, classname);
1007 for(mlist=implements;mlist;mlist=mlist->next) {
1008 MULTINAME(m, mlist->classinfo);
1009 abc_class_add_interface(state->cls->abc, &m);
1012 /* write the construction code for this class to the global init
1014 int slotindex = abc_initscript_addClassTrait(global->init, &classname2, state->cls->abc);
1016 abc_method_body_t*m = global->init->method->body;
1017 __ getglobalscope(m);
1018 classinfo_t*s = extends;
1023 //TODO: take a look at the current scope stack, maybe
1024 // we can re-use something
1029 multiname_t*s2 = sig2mname(s);
1031 multiname_destroy(s2);
1033 __ pushscope(m); count++;
1034 m->code = m->code->prev->prev; // invert
1036 /* continue appending after last op end */
1037 while(m->code && m->code->next) m->code = m->code->next;
1039 /* TODO: if this is one of *our* classes, we can also
1040 do a getglobalscope/getslot <nr> (which references
1041 the init function's slots) */
1043 __ getlex2(m, extends2);
1045 /* notice: we get a Verify Error #1107 if the top elemnt on the scope
1046 stack is not the superclass */
1047 __ pushscope(m);count++;
1050 /* notice: we get a verify error #1107 if the top element on the scope
1051 stack is not the global object */
1053 __ pushscope(m);count++;
1055 __ newclass(m,state->cls->abc);
1059 __ setslot(m, slotindex);
1060 multiname_destroy(extends2);
1062 /* flash.display.MovieClip handling */
1064 if(!as3_globalclass && (mod->flags&FLAG_PUBLIC) && slotinfo_equals((slotinfo_t*)registry_getMovieClip(),(slotinfo_t*)extends)) {
1065 if(state->package && state->package[0]) {
1066 as3_globalclass = concat3(state->package, ".", classname);
1068 as3_globalclass = strdup(classname);
1074 static int slotstate_varconst = 0;
1075 static modifiers_t*slotstate_flags = 0;
1076 static void setslotstate(modifiers_t* flags, int varconst)
1078 slotstate_varconst = varconst;
1079 slotstate_flags = flags;
1081 if(flags && flags->flags&FLAG_STATIC) {
1082 state->method = state->cls->static_init;
1084 state->method = state->cls->init;
1087 parserassert(state->method);
1091 static void endclass()
1094 if(!state->cls->has_constructor && !(state->cls->info->flags&FLAG_INTERFACE)) {
1096 c = abc_getlocal_0(c);
1097 c = abc_constructsuper(c, 0);
1098 state->cls->init->header = code_append(state->cls->init->header, c);
1099 state->cls->has_constructor=1;
1101 if(state->cls->init) {
1102 if(state->cls->info->flags&FLAG_INTERFACE) {
1103 if(state->cls->init->header)
1104 syntaxerror("interface can not have class-level code");
1106 abc_method_t*m = abc_class_getconstructor(state->cls->abc, 0);
1107 code_t*c = method_header(state->cls->init);
1108 m->body->code = wrap_function(c, 0, m->body->code);
1111 if(state->cls->static_init) {
1112 abc_method_t*m = abc_class_getstaticconstructor(state->cls->abc, 0);
1113 code_t*c = method_header(state->cls->static_init);
1114 m->body->code = wrap_function(c, 0, m->body->code);
1121 void check_code_for_break(code_t*c)
1124 if(c->opcode == OPCODE___BREAK__) {
1125 char*name = string_cstr(c->data[0]);
1126 syntaxerror("Unresolved \"break %s\"", name);
1128 if(c->opcode == OPCODE___CONTINUE__) {
1129 char*name = string_cstr(c->data[0]);
1130 syntaxerror("Unresolved \"continue %s\"", name);
1132 if(c->opcode == OPCODE___PUSHPACKAGE__) {
1133 char*name = string_cstr(c->data[0]);
1134 syntaxerror("Can't reference a package (%s) as such", name);
1141 static void check_constant_against_type(classinfo_t*t, constant_t*c)
1143 #define xassert(b) if(!(b)) syntaxerror("Invalid default value %s for type '%s'", constant_tostring(c), t->name)
1144 if(TYPE_IS_NUMBER(t)) {
1145 xassert(c->type == CONSTANT_FLOAT
1146 || c->type == CONSTANT_INT
1147 || c->type == CONSTANT_UINT);
1148 } else if(TYPE_IS_UINT(t)) {
1149 xassert(c->type == CONSTANT_UINT ||
1150 (c->type == CONSTANT_INT && c->i>=0));
1151 } else if(TYPE_IS_INT(t)) {
1152 xassert(c->type == CONSTANT_INT);
1153 } else if(TYPE_IS_BOOLEAN(t)) {
1154 xassert(c->type == CONSTANT_TRUE
1155 || c->type == CONSTANT_FALSE);
1159 static void check_override(memberinfo_t*m, int flags)
1163 if(m->parent == state->cls->info)
1164 syntaxerror("class '%s' already contains a method/slot '%s'", m->parent->name, m->name);
1166 syntaxerror("internal error: overriding method %s, which doesn't have parent", m->name);
1167 if(m->access==ACCESS_PRIVATE)
1169 if(m->flags & FLAG_FINAL)
1170 syntaxerror("can't override final member %s", m->name);
1172 /* allow this. it's no issue.
1173 if((m->flags & FLAG_STATIC) && !(flags&FLAG_STATIC))
1174 syntaxerror("can't override static member %s", m->name);*/
1176 if(!(m->flags & FLAG_STATIC) && (flags&FLAG_STATIC))
1177 syntaxerror("can't override non-static member %s with static declaration", m->name);
1179 if(!(flags&FLAG_OVERRIDE) && !(flags&FLAG_STATIC) && !(m->flags&FLAG_STATIC)) {
1180 if(m->parent && !(m->parent->flags&FLAG_INTERFACE)) {
1181 if(m->kind == INFOTYPE_METHOD)
1182 syntaxerror("can't override without explicit 'override' declaration");
1184 syntaxerror("can't override '%s'", m->name);
1189 static methodinfo_t*registerfunction(enum yytokentype getset, modifiers_t*mod, char*name, params_t*params, classinfo_t*return_type, int slot)
1191 methodinfo_t*minfo = 0;
1192 namespace_t ns = modifiers2access(mod);
1195 minfo = methodinfo_register_global(ns.access, state->package, name);
1196 minfo->return_type = 0; // save this for pass 2
1197 } else if(getset != KW_GET && getset != KW_SET) {
1199 memberinfo_t* m = registry_findmember(state->cls->info, ns.name, name, 0);
1201 printf("%s.%s | %s.%s\n",
1202 m->package, m->name,
1204 syntaxerror("class already contains a %s '%s'", infotypename((slotinfo_t*)m), m->name);
1206 minfo = methodinfo_register_onclass(state->cls->info, ns.access, ns.name, name);
1207 minfo->return_type = 0; // save this for pass 2
1208 // getslot on a member slot only returns "undefined", so no need
1209 // to actually store these
1210 //state->minfo->slot = state->method->abc->method->trait->slot_id;
1212 //class getter/setter
1213 int gs = getset==KW_GET?SUBTYPE_GET:SUBTYPE_SET;
1215 if(getset == KW_GET) {
1217 } else if(params->list && params->list->param && !params->list->next) {
1218 type = params->list->param->type;
1220 syntaxerror("setter function needs to take exactly one argument");
1221 // not sure wether to look into superclasses here, too
1222 minfo = (methodinfo_t*)registry_findmember(state->cls->info, ns.name, name, 1);
1224 if(minfo->kind!=INFOTYPE_SLOT)
1225 syntaxerror("class already contains a method called '%s'", name);
1226 if(!(minfo->subtype & (SUBTYPE_GETSET)))
1227 syntaxerror("class already contains a field called '%s'", name);
1228 if(minfo->subtype & gs)
1229 syntaxerror("getter/setter for '%s' already defined", name);
1230 /* make a setter or getter into a getset */
1231 minfo->subtype |= gs;
1234 FIXME: this check needs to be done in pass 2
1236 if((!minfo->return_type != !type) ||
1237 (minfo->return_type && type &&
1238 !strcmp(minfo->return_type->name, type->name))) {
1239 syntaxerror("different type in getter and setter: %s and %s",
1240 minfo->return_type?minfo->return_type->name:"*",
1241 type?type->name:"*");
1244 minfo = methodinfo_register_onclass(state->cls->info, ns.access, ns.name, name);
1245 minfo->kind = INFOTYPE_SLOT; //hack
1246 minfo->subtype = gs;
1247 minfo->return_type = 0;
1249 /* can't assign a slot as getter and setter might have different slots */
1250 //minfo->slot = slot;
1252 if(mod->flags&FLAG_FINAL) minfo->flags |= FLAG_FINAL;
1253 if(mod->flags&FLAG_STATIC) minfo->flags |= FLAG_STATIC;
1254 if(mod->flags&FLAG_OVERRIDE) minfo->flags |= FLAG_OVERRIDE;
1259 static void innerfunction(char*name, params_t*params, classinfo_t*return_type)
1261 //parserassert(state->method && state->method->info);
1263 methodstate_t*parent_method = state->method;
1266 return_type = 0; // not valid in pass 1
1270 state->new_vars = 1;
1273 state->method = rfx_calloc(sizeof(methodstate_t));
1274 state->method->inner = 1;
1275 state->method->variable_count = 0;
1276 state->method->abc = rfx_calloc(sizeof(abc_method_t));
1278 NEW(methodinfo_t,minfo);
1279 minfo->kind = INFOTYPE_METHOD;
1280 minfo->access = ACCESS_PACKAGEINTERNAL;
1282 state->method->info = minfo;
1285 list_append(parent_method->innerfunctions, state->method);
1287 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
1289 function_initvars(state->method, params, 0, 1);
1293 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1294 state->method->variable_count = 0;
1295 parserassert(state->method);
1297 state->method->info->return_type = return_type;
1298 function_initvars(state->method, params, 0, 1);
1302 static void startfunction(modifiers_t*mod, enum yytokentype getset, char*name,
1303 params_t*params, classinfo_t*return_type)
1305 if(state->method && state->method->info) {
1306 syntaxerror("not able to start another method scope");
1309 state->new_vars = 1;
1312 state->method = rfx_calloc(sizeof(methodstate_t));
1313 state->method->has_super = 0;
1316 state->method->is_constructor = !strcmp(state->cls->info->name,name);
1318 state->method->is_global = 1;
1319 state->method->late_binding = 1; // for global methods, always push local_0 on the scope stack
1321 if(state->method->is_constructor)
1322 name = "__as3_constructor__";
1324 state->method->info = registerfunction(getset, mod, name, params, return_type, 0);
1326 function_initvars(state->method, params, mod->flags, 1);
1328 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
1332 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1333 state->method->variable_count = 0;
1334 parserassert(state->method);
1337 memberinfo_t*m = registry_findmember(state->cls->info, mod->ns, name, 2);
1338 check_override(m, mod->flags);
1342 state->cls->has_constructor |= state->method->is_constructor;
1345 state->method->info->return_type = return_type;
1346 function_initvars(state->method, params, mod->flags, 1);
1350 static abc_method_t* endfunction(modifiers_t*mod, enum yytokentype getset, char*name,
1351 params_t*params, classinfo_t*return_type, code_t*body)
1353 int flags = mod?mod->flags:0;
1356 // store inner methods in variables
1357 function_initvars(state->method, 0, 0, 0);
1359 methodstate_list_t*ml = state->method->innerfunctions;
1361 dict_t*xvars = dict_new();
1364 methodstate_t*m = ml->methodstate;
1365 parserassert(m->inner);
1366 if(m->unresolved_variables) {
1367 dict_t*d = m->unresolved_variables;
1369 for(t=0;t<d->hashsize;t++) {
1370 dictentry_t*l = d->slots[t];
1372 /* check parent method's variables */
1374 if((v=find_variable(state, l->key))) {
1375 m->uses_parent_function = 1;
1376 state->method->uses_slots = 1;
1377 dict_put(xvars, l->key, 0);
1384 dict_destroy(m->unresolved_variables);
1385 m->unresolved_variables = 0;
1390 if(state->method->uses_slots) {
1391 state->method->slots = dict_new();
1393 DICT_ITERATE_ITEMS(state->vars, char*, name, variable_t*, v) {
1394 if(v->index && dict_contains(xvars, name)) {
1397 if(v->is_inner_method) {
1398 v->is_inner_method->is_a_slot = 1;
1401 dict_put(state->method->slots, name, v);
1404 state->method->uses_slots = i;
1405 dict_destroy(state->vars);state->vars = 0;
1412 /*if(state->method->uses_parent_function){
1413 syntaxerror("accessing variables of parent function from inner functions not supported yet");
1418 multiname_t*type2 = sig2mname(return_type);
1420 if(state->method->inner) {
1421 f = state->method->abc;
1422 abc_method_init(f, global->file, type2, 1);
1423 } else if(state->method->is_constructor) {
1424 f = abc_class_getconstructor(state->cls->abc, type2);
1425 } else if(!state->method->is_global) {
1426 namespace_t mname_ns = {state->method->info->access, ""};
1427 multiname_t mname = {QNAME, &mname_ns, 0, name};
1429 if(flags&FLAG_STATIC)
1430 f = abc_class_staticmethod(state->cls->abc, type2, &mname);
1432 f = abc_class_method(state->cls->abc, type2, &mname);
1433 slot = f->trait->slot_id;
1435 namespace_t mname_ns = {state->method->info->access, state->package};
1436 multiname_t mname = {QNAME, &mname_ns, 0, name};
1438 f = abc_method_new(global->file, type2, 1);
1439 trait_t*t = trait_new_method(&global->init->traits, multiname_clone(&mname), f);
1440 //abc_code_t*c = global->init->method->body->code;
1442 //flash doesn't seem to allow us to access function slots
1443 //state->method->info->slot = slot;
1445 if(flags&FLAG_OVERRIDE) f->trait->attributes |= TRAIT_ATTR_OVERRIDE;
1446 if(getset == KW_GET) f->trait->kind = TRAIT_GETTER;
1447 if(getset == KW_SET) f->trait->kind = TRAIT_SETTER;
1448 if(params->varargs) f->flags |= METHOD_NEED_REST;
1452 for(p=params->list;p;p=p->next) {
1453 if(params->varargs && !p->next) {
1454 break; //varargs: omit last parameter in function signature
1456 multiname_t*m = sig2mname(p->param->type);
1457 list_append(f->parameters, m);
1458 if(p->param->value) {
1459 check_constant_against_type(p->param->type, p->param->value);
1460 opt=1;list_append(f->optional_parameters, p->param->value);
1462 syntaxerror("non-optional parameter not allowed after optional parameters");
1465 if(state->method->slots) {
1466 DICT_ITERATE_ITEMS(state->method->slots, char*, name, variable_t*, v) {
1468 multiname_t*mname = multiname_new(namespace_new(ACCESS_PACKAGE, ""), name);
1469 multiname_t*type = sig2mname(v->type);
1470 trait_t*t = trait_new_member(&f->body->traits, type, mname, 0);
1471 t->slot_id = v->index;
1476 check_code_for_break(body);
1478 if(state->method->exceptions &&
1479 (state->method->late_binding || state->method->uses_slots)) {
1480 //syntaxerror("try/catch and activation or late binding not supported yet within the same method");
1481 as3_warning("try/catch and activation or late binding not supported yet within the same method");
1485 f->body->code = body;
1486 f->body->exceptions = state->method->exceptions;
1487 } else { //interface
1489 syntaxerror("interface methods can't have a method body");
1499 char is_subtype_of(classinfo_t*type, classinfo_t*supertype)
1504 void breakjumpsto(code_t*c, char*name, code_t*jump)
1507 if(c->opcode == OPCODE___BREAK__) {
1508 string_t*name2 = c->data[0];
1509 if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1510 c->opcode = OPCODE_JUMP;
1517 void continuejumpsto(code_t*c, char*name, code_t*jump)
1520 if(c->opcode == OPCODE___CONTINUE__) {
1521 string_t*name2 = c->data[0];
1522 if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1523 c->opcode = OPCODE_JUMP;
1531 #define IS_INT(a) (TYPE_IS_INT((a)) || TYPE_IS_UINT((a)))
1532 #define IS_NUMBER_OR_INT(a) (TYPE_IS_INT((a)) || TYPE_IS_UINT((a)) || TYPE_IS_NUMBER((a)))
1533 #define BOTH_INT(a,b) (IS_INT(a) && IS_INT(b))
1535 classinfo_t*join_types(classinfo_t*type1, classinfo_t*type2, char op)
1537 if(!type1 || !type2)
1538 return registry_getanytype();
1539 if(TYPE_IS_ANY(type1) || TYPE_IS_ANY(type2))
1540 return registry_getanytype();
1543 if(IS_NUMBER_OR_INT(type1) && IS_NUMBER_OR_INT(type2)) {
1552 return registry_getanytype();
1554 code_t*converttype(code_t*c, classinfo_t*from, classinfo_t*to)
1559 return abc_coerce_a(c);
1563 // cast an "any" type to a specific type. subject to
1564 // runtime exceptions
1565 return abc_coerce2(c, &m);
1568 if((TYPE_IS_NUMBER(from) || TYPE_IS_UINT(from) || TYPE_IS_INT(from)) &&
1569 (TYPE_IS_NUMBER(to) || TYPE_IS_UINT(to) || TYPE_IS_INT(to))) {
1570 // allow conversion between number types
1571 return abc_coerce2(c, &m);
1573 //printf("%s.%s\n", from.package, from.name);
1574 //printf("%s.%s\n", to.package, to.name);
1576 classinfo_t*supertype = from;
1578 if(supertype == to) {
1579 // target type is one of from's superclasses
1580 return abc_coerce2(c, &m);
1583 while(supertype->interfaces[t]) {
1584 if(supertype->interfaces[t]==to) {
1585 // target type is one of from's interfaces
1586 return abc_coerce2(c, &m);
1590 supertype = supertype->superclass;
1592 if(TYPE_IS_FUNCTION(from) && TYPE_IS_FUNCTION(to))
1594 if(TYPE_IS_CLASS(from) && TYPE_IS_CLASS(to))
1596 if(TYPE_IS_NULL(from) && !IS_NUMBER_OR_INT(to))
1599 as3_error("can't convert type %s%s%s to %s%s%s",
1600 from->package, from->package?".":"", from->name,
1601 to->package, to->package?".":"", to->name);
1605 code_t*defaultvalue(code_t*c, classinfo_t*type)
1607 if(TYPE_IS_INT(type)) {
1608 c = abc_pushbyte(c, 0);
1609 } else if(TYPE_IS_UINT(type)) {
1610 c = abc_pushuint(c, 0);
1611 } else if(TYPE_IS_FLOAT(type)) {
1613 } else if(TYPE_IS_BOOLEAN(type)) {
1614 c = abc_pushfalse(c);
1616 //c = abc_pushundefined(c);
1618 c = abc_pushnull(c);
1620 c = abc_coerce2(c, &m);
1625 char is_pushundefined(code_t*c)
1627 return (c && !c->prev && !c->next && c->opcode == OPCODE_PUSHUNDEFINED);
1630 static slotinfo_t* find_class(const char*name)
1634 c = registry_find(state->package, name);
1637 /* try explicit imports */
1638 dictentry_t* e = dict_get_slot(state->imports, name);
1641 if(!strcmp(e->key, name)) {
1642 c = (slotinfo_t*)e->data;
1648 /* try package.* imports */
1649 import_list_t*l = state->wildcard_imports;
1651 //printf("does package %s contain a class %s?\n", l->import->package, name);
1652 c = registry_find(l->import->package, name);
1657 /* try global package */
1658 c = registry_find("", name);
1661 /* try local "filename" package */
1662 c = registry_find(internal_filename_package, name);
1667 typedcode_t push_class(slotinfo_t*a)
1672 if(a->access == ACCESS_PACKAGEINTERNAL &&
1673 strcmp(a->package, state->package) &&
1674 strcmp(a->package, internal_filename_package)
1676 syntaxerror("Can't access internal %s %s in package '%s' from package '%s'",
1677 infotypename(a), a->name, a->package, state->package);
1680 if(a->kind != INFOTYPE_CLASS) {
1682 x.c = abc_findpropstrict2(x.c, &m);
1683 x.c = abc_getproperty2(x.c, &m);
1684 if(a->kind == INFOTYPE_METHOD) {
1685 methodinfo_t*f = (methodinfo_t*)a;
1686 x.t = TYPE_FUNCTION(f);
1688 varinfo_t*v = (varinfo_t*)a;
1692 classinfo_t*c = (classinfo_t*)a;
1694 x.c = abc_getglobalscope(x.c);
1695 x.c = abc_getslot(x.c, c->slot);
1698 x.c = abc_getlex2(x.c, &m);
1700 x.t = TYPE_CLASS(c);
1705 static char is_getlocal(code_t*c)
1707 if(!c || c->prev || c->next)
1709 return(c->opcode == OPCODE_GETLOCAL
1710 || c->opcode == OPCODE_GETLOCAL_0
1711 || c->opcode == OPCODE_GETLOCAL_1
1712 || c->opcode == OPCODE_GETLOCAL_2
1713 || c->opcode == OPCODE_GETLOCAL_3);
1715 static int getlocalnr(code_t*c)
1717 if(c->opcode == OPCODE_GETLOCAL) {return (ptroff_t)c->data[0];}
1718 else if(c->opcode == OPCODE_GETLOCAL_0) {return 0;}
1719 else if(c->opcode == OPCODE_GETLOCAL_1) {return 1;}
1720 else if(c->opcode == OPCODE_GETLOCAL_2) {return 2;}
1721 else if(c->opcode == OPCODE_GETLOCAL_3) {return 3;}
1722 else syntaxerror("Internal error: opcode %02x is not a getlocal call", c->opcode);
1726 static code_t* toreadwrite(code_t*in, code_t*middlepart, char justassign, char readbefore)
1730 [prefix code] [read instruction]
1734 [prefix code] ([dup]) [read instruction] [middlepart] [setvar] [write instruction] [getvar]
1736 if(in && in->opcode == OPCODE_COERCE_A) {
1737 in = code_cutlast(in);
1740 syntaxerror("internal error");
1742 /* chop off read instruction */
1746 prefix = r->prev;r->prev = 0;
1752 char use_temp_var = readbefore;
1754 /* generate the write instruction, and maybe append a dup to the prefix code */
1755 code_t* write = abc_nop(0);
1756 if(r->opcode == OPCODE_GETPROPERTY) {
1757 write->opcode = OPCODE_SETPROPERTY;
1758 multiname_t*m = (multiname_t*)r->data[0];
1759 write->data[0] = multiname_clone(m);
1760 if(m->type == QNAME || m->type == MULTINAME) {
1762 prefix = abc_dup(prefix); // we need the object, too
1765 } else if(m->type == MULTINAMEL) {
1767 /* dupping two values on the stack requires 5 operations and one register-
1768 couldn't adobe just have given us a dup2? */
1769 int temp = gettempvar();
1770 prefix = abc_setlocal(prefix, temp);
1771 prefix = abc_dup(prefix);
1772 prefix = abc_getlocal(prefix, temp);
1773 prefix = abc_swap(prefix);
1774 prefix = abc_getlocal(prefix, temp);
1776 prefix = abc_kill(prefix, temp);
1780 syntaxerror("illegal lvalue: can't assign a value to this expression (not a qname/multiname)");
1782 } else if(r->opcode == OPCODE_GETSLOT) {
1783 write->opcode = OPCODE_SETSLOT;
1784 write->data[0] = r->data[0];
1786 prefix = abc_dup(prefix); // we need the object, too
1789 } else if(r->opcode == OPCODE_GETLOCAL) {
1790 write->opcode = OPCODE_SETLOCAL;
1791 write->data[0] = r->data[0];
1792 } else if(r->opcode == OPCODE_GETLOCAL_0) {
1793 write->opcode = OPCODE_SETLOCAL_0;
1794 } else if(r->opcode == OPCODE_GETLOCAL_1) {
1795 write->opcode = OPCODE_SETLOCAL_1;
1796 } else if(r->opcode == OPCODE_GETLOCAL_2) {
1797 write->opcode = OPCODE_SETLOCAL_2;
1798 } else if(r->opcode == OPCODE_GETLOCAL_3) {
1799 write->opcode = OPCODE_SETLOCAL_3;
1800 } else if(r->opcode == OPCODE_GETSUPER) {
1801 write->opcode = OPCODE_SETSUPER;
1802 multiname_t*m = (multiname_t*)r->data[0];
1803 write->data[0] = multiname_clone(m);
1806 syntaxerror("illegal lvalue: can't assign a value to this expression");
1813 /* with getproperty/getslot, we have to be extra careful not
1814 to execute the read code twice, as it might have side-effects
1815 (e.g. if the property is in fact a setter/getter combination)
1817 So read the value, modify it, and write it again,
1818 using prefix only once and making sure (by using a temporary
1819 register) that the return value is what we just wrote */
1820 temp = gettempvar();
1821 c = code_append(c, prefix);
1822 c = code_append(c, r);
1825 c = abc_setlocal(c, temp);
1827 c = code_append(c, middlepart);
1830 c = abc_setlocal(c, temp);
1832 c = code_append(c, write);
1833 c = abc_getlocal(c, temp);
1834 c = abc_kill(c, temp);
1836 /* if we're allowed to execute the read code twice *and*
1837 the middlepart doesn't modify the code, things are easier.
1839 code_t* r2 = code_dup(r);
1840 //c = code_append(c, prefix);
1841 parserassert(!prefix);
1842 c = code_append(c, r);
1843 c = code_append(c, middlepart);
1844 c = code_append(c, write);
1845 c = code_append(c, r2);
1848 /* even smaller version: overwrite the value without reading
1852 c = code_append(c, prefix);
1855 c = code_append(c, middlepart);
1856 c = code_append(c, write);
1857 c = code_append(c, r);
1860 temp = gettempvar();
1862 c = code_append(c, prefix);
1864 c = code_append(c, middlepart);
1866 c = abc_setlocal(c, temp);
1867 c = code_append(c, write);
1868 c = abc_getlocal(c, temp);
1869 c = abc_kill(c, temp);
1875 char is_break_or_jump(code_t*c)
1879 if(c->opcode == OPCODE_JUMP ||
1880 c->opcode == OPCODE___BREAK__ ||
1881 c->opcode == OPCODE___CONTINUE__ ||
1882 c->opcode == OPCODE_THROW ||
1883 c->opcode == OPCODE_RETURNVOID ||
1884 c->opcode == OPCODE_RETURNVALUE) {
1891 #define IS_FINALLY_TARGET(op) \
1892 ((op) == OPCODE___CONTINUE__ || \
1893 (op) == OPCODE___BREAK__ || \
1894 (op) == OPCODE_RETURNVOID || \
1895 (op) == OPCODE_RETURNVALUE || \
1896 (op) == OPCODE___RETHROW__)
1898 static code_t* insert_finally_lookup(code_t*c, code_t*finally, int tempvar)
1900 #define NEED_EXTRA_STACK_ARG
1901 code_t*finally_label = abc_nop(0);
1902 NEW(lookupswitch_t, l);
1908 code_t*prev = i->prev;
1909 if(IS_FINALLY_TARGET(i->opcode)) {
1912 if(i->opcode == OPCODE___RETHROW__ ||
1913 i->opcode == OPCODE_RETURNVALUE) {
1914 if(i->opcode == OPCODE___RETHROW__)
1915 i->opcode = OPCODE_THROW;
1917 p = abc_coerce_a(p);
1918 p = abc_setlocal(p, tempvar);
1920 p = abc_pushbyte(p, count++);
1921 p = abc_jump(p, finally_label);
1922 code_t*target = p = abc_label(p);
1923 #ifdef NEED_EXTRA_STACK_ARG
1927 p = abc_getlocal(p, tempvar);
1930 p->next = i;i->prev = p;
1931 list_append(l->targets, target);
1937 c = abc_pushbyte(c, -1);
1938 c = code_append(c, finally_label);
1939 c = code_append(c, finally);
1941 #ifdef NEED_EXTRA_STACK_ARG
1944 c = abc_lookupswitch(c, l);
1945 c = l->def = abc_label(c);
1946 #ifdef NEED_EXTRA_STACK_ARG
1953 static code_t* insert_finally_simple(code_t*c, code_t*finally, int tempvar)
1957 code_t*prev = i->prev;
1958 if(IS_FINALLY_TARGET(i->opcode)) {
1959 if(i->opcode == OPCODE___RETHROW__)
1960 i->opcode = OPCODE_THROW;
1961 code_t*end = code_dup(finally);
1962 code_t*start = code_start(end);
1963 if(prev) prev->next = start;
1970 return code_append(c, finally);
1973 code_t* insert_finally(code_t*c, code_t*finally, int tempvar)
1979 int num_insertion_points=0;
1981 if(IS_FINALLY_TARGET(i->opcode))
1982 num_insertion_points++;
1989 if(i->branch || i->opcode == OPCODE_LOOKUPSWITCH) {
1994 int simple_version_cost = (1+num_insertion_points)*code_size;
1995 int lookup_version_cost = 4*num_insertion_points + 5;
1997 if(cantdup || simple_version_cost > lookup_version_cost) {
1998 printf("lookup %d > *%d*\n", simple_version_cost, lookup_version_cost);
1999 return insert_finally_lookup(c, finally, tempvar);
2001 printf("simple *%d* < %d\n", simple_version_cost, lookup_version_cost);
2002 return insert_finally_simple(c, finally, tempvar);
2006 #define PASS1 }} if(as3_pass == 1) {{
2007 #define PASS1END }} if(as3_pass == 2) {{
2008 #define PASS2 }} if(as3_pass == 2) {{
2009 #define PASS12 }} {{
2010 #define PASS12END }} if(as3_pass == 2) {{
2014 /* Line 273 of skeleton.m4 */
2015 #line 2016 "parser.tab.c"
2022 typedef YYTYPE_UINT8 yytype_uint8;
2024 typedef unsigned char yytype_uint8;
2028 typedef YYTYPE_INT8 yytype_int8;
2029 #elif (defined __STDC__ || defined __C99__FUNC__ \
2030 || defined __cplusplus || defined _MSC_VER)
2031 typedef signed char yytype_int8;
2033 typedef short int yytype_int8;
2036 #ifdef YYTYPE_UINT16
2037 typedef YYTYPE_UINT16 yytype_uint16;
2039 typedef unsigned short int yytype_uint16;
2043 typedef YYTYPE_INT16 yytype_int16;
2045 typedef short int yytype_int16;
2049 # ifdef __SIZE_TYPE__
2050 # define YYSIZE_T __SIZE_TYPE__
2051 # elif defined size_t
2052 # define YYSIZE_T size_t
2053 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
2054 || defined __cplusplus || defined _MSC_VER)
2055 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
2056 # define YYSIZE_T size_t
2058 # define YYSIZE_T unsigned int
2062 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
2067 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
2068 # define YY_(msgid) dgettext ("bison-runtime", msgid)
2072 # define YY_(msgid) msgid
2076 /* Suppress unused-variable warnings by "using" E. */
2077 #if ! defined lint || defined __GNUC__
2078 # define YYUSE(e) ((void) (e))
2080 # define YYUSE(e) /* empty */
2083 /* Identity function, used to suppress warnings about constant conditions. */
2085 # define YYID(n) (n)
2087 #if (defined __STDC__ || defined __C99__FUNC__ \
2088 || defined __cplusplus || defined _MSC_VER)
2101 #if ! defined yyoverflow || YYERROR_VERBOSE
2103 /* The parser invokes alloca or malloc; define the necessary symbols. */
2105 # ifdef YYSTACK_USE_ALLOCA
2106 # if YYSTACK_USE_ALLOCA
2108 # define YYSTACK_ALLOC __builtin_alloca
2109 # elif defined __BUILTIN_VA_ARG_INCR
2110 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
2112 # define YYSTACK_ALLOC __alloca
2113 # elif defined _MSC_VER
2114 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
2115 # define alloca _alloca
2117 # define YYSTACK_ALLOC alloca
2118 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
2119 || defined __cplusplus || defined _MSC_VER)
2120 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
2122 # define _STDLIB_H 1
2129 # ifdef YYSTACK_ALLOC
2130 /* Pacify GCC's `empty if-body' warning. */
2131 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
2132 # ifndef YYSTACK_ALLOC_MAXIMUM
2133 /* The OS might guarantee only one guard page at the bottom of the stack,
2134 and a page size can be as small as 4096 bytes. So we cannot safely
2135 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
2136 to allow for a few compiler-allocated temporary stack slots. */
2137 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
2140 # define YYSTACK_ALLOC YYMALLOC
2141 # define YYSTACK_FREE YYFREE
2142 # ifndef YYSTACK_ALLOC_MAXIMUM
2143 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
2145 # if (defined __cplusplus && ! defined _STDLIB_H \
2146 && ! ((defined YYMALLOC || defined malloc) \
2147 && (defined YYFREE || defined free)))
2148 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
2150 # define _STDLIB_H 1
2154 # define YYMALLOC malloc
2155 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
2156 || defined __cplusplus || defined _MSC_VER)
2157 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
2161 # define YYFREE free
2162 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
2163 || defined __cplusplus || defined _MSC_VER)
2164 void free (void *); /* INFRINGES ON USER NAME SPACE */
2168 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
2171 #if (! defined yyoverflow \
2172 && (! defined __cplusplus \
2173 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
2175 /* A type that is properly aligned for any stack member. */
2178 yytype_int16 yyss_alloc;
2182 /* The size of the maximum gap between one aligned stack and the next. */
2183 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
2185 /* The size of an array large to enough to hold all stacks, each with
2187 # define YYSTACK_BYTES(N) \
2188 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
2189 + YYSTACK_GAP_MAXIMUM)
2191 /* Copy COUNT objects from FROM to TO. The source and destination do
2194 # if defined __GNUC__ && 1 < __GNUC__
2195 # define YYCOPY(To, From, Count) \
2196 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
2198 # define YYCOPY(To, From, Count) \
2202 for (yyi = 0; yyi < (Count); yyi++) \
2203 (To)[yyi] = (From)[yyi]; \
2209 /* Relocate STACK from its old location to the new one. The
2210 local variables YYSIZE and YYSTACKSIZE give the old and new number of
2211 elements in the stack, and YYPTR gives the new location of the
2212 stack. Advance YYPTR to a properly aligned location for the next
2214 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
2217 YYSIZE_T yynewbytes; \
2218 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
2219 Stack = &yyptr->Stack_alloc; \
2220 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
2221 yyptr += yynewbytes / sizeof (*yyptr); \
2227 /* YYFINAL -- State number of the termination state. */
2229 /* YYLAST -- Last index in YYTABLE. */
2232 /* YYNTOKENS -- Number of terminals. */
2233 #define YYNTOKENS 134
2234 /* YYNNTS -- Number of nonterminals. */
2236 /* YYNRULES -- Number of rules. */
2237 #define YYNRULES 307
2238 /* YYNRULES -- Number of states. */
2239 #define YYNSTATES 519
2241 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
2242 #define YYUNDEFTOK 2
2243 #define YYMAXUTOK 363
2245 #define YYTRANSLATE(YYX) \
2246 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
2248 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
2249 static const yytype_uint8 yytranslate[] =
2251 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2252 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2253 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2254 2, 2, 2, 118, 2, 2, 2, 116, 108, 2,
2255 122, 133, 115, 113, 100, 112, 127, 114, 2, 2,
2256 2, 2, 2, 2, 2, 2, 2, 2, 105, 99,
2257 109, 102, 110, 104, 128, 2, 2, 2, 2, 2,
2258 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2259 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2260 2, 124, 2, 125, 107, 2, 2, 2, 2, 2,
2261 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2262 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2263 2, 2, 2, 126, 106, 132, 117, 2, 2, 2,
2264 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2265 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2266 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2267 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2268 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2269 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2270 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2271 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2272 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2273 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2274 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2275 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2276 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
2277 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
2278 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
2279 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
2280 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
2281 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
2282 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
2283 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
2284 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
2285 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
2286 95, 96, 97, 98, 101, 103, 111, 119, 120, 121,
2291 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
2293 static const yytype_uint16 yyprhs[] =
2295 0, 0, 3, 5, 6, 8, 10, 13, 15, 17,
2296 19, 21, 23, 25, 30, 32, 33, 35, 37, 40,
2297 42, 44, 46, 48, 50, 55, 57, 59, 60, 63,
2298 65, 67, 69, 71, 73, 75, 77, 79, 81, 83,
2299 85, 87, 89, 93, 96, 98, 100, 102, 104, 106,
2300 108, 110, 115, 118, 120, 122, 126, 129, 130, 133,
2301 136, 138, 142, 146, 147, 150, 151, 159, 160, 162,
2302 164, 168, 170, 173, 177, 186, 193, 194, 201, 202,
2303 210, 212, 215, 217, 220, 221, 223, 225, 228, 230,
2304 233, 238, 242, 243, 252, 253, 263, 264, 270, 272,
2305 275, 277, 280, 282, 283, 290, 293, 295, 301, 303,
2306 305, 309, 311, 312, 319, 320, 326, 329, 334, 335,
2307 337, 339, 342, 344, 346, 348, 350, 352, 354, 356,
2308 358, 360, 362, 363, 366, 367, 370, 371, 374, 375,
2309 385, 386, 395, 396, 398, 400, 403, 405, 410, 412,
2310 414, 416, 417, 419, 421, 424, 426, 429, 438, 440,
2311 442, 443, 448, 450, 454, 458, 459, 462, 464, 466,
2312 468, 470, 472, 474, 476, 478, 480, 481, 483, 486,
2313 491, 495, 497, 502, 505, 507, 509, 510, 511, 524,
2314 526, 527, 528, 539, 541, 545, 547, 549, 551, 555,
2315 557, 559, 561, 564, 565, 566, 570, 571, 573, 575,
2316 577, 580, 583, 584, 589, 594, 599, 602, 604, 607,
2317 609, 611, 615, 617, 619, 621, 623, 625, 627, 629,
2318 631, 633, 635, 637, 639, 641, 643, 645, 647, 649,
2319 651, 655, 659, 663, 667, 671, 675, 679, 683, 687,
2320 691, 694, 697, 701, 705, 709, 713, 717, 721, 725,
2321 729, 733, 737, 741, 745, 749, 753, 757, 762, 765,
2322 767, 771, 774, 779, 783, 784, 786, 790, 796, 800,
2323 804, 808, 812, 816, 820, 824, 828, 832, 836, 840,
2324 844, 850, 853, 856, 859, 862, 866, 869, 874, 880,
2325 884, 890, 894, 896, 899, 902, 907, 912
2328 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
2329 static const yytype_int16 yyrhs[] =
2331 135, 0, -1, 136, -1, -1, 137, -1, 138, -1,
2332 137, 138, -1, 185, -1, 197, -1, 195, -1, 216,
2333 -1, 206, -1, 147, -1, 148, 126, 136, 132, -1,
2334 99, -1, -1, 140, -1, 141, -1, 140, 141, -1,
2335 197, -1, 195, -1, 216, -1, 206, -1, 147, -1,
2336 148, 126, 139, 132, -1, 99, -1, 143, -1, -1,
2337 143, 145, -1, 145, -1, 188, -1, 159, -1, 160,
2338 -1, 161, -1, 163, -1, 171, -1, 154, -1, 182,
2339 -1, 179, -1, 238, -1, 246, -1, 245, -1, 126,
2340 143, 132, -1, 126, 132, -1, 99, -1, 144, -1,
2341 150, -1, 165, -1, 166, -1, 235, -1, 181, -1,
2342 148, 126, 143, 132, -1, 145, 99, -1, 145, -1,
2343 144, -1, 3, 89, 3, -1, 102, 236, -1, -1,
2344 46, 151, -1, 32, 151, -1, 152, -1, 151, 100,
2345 152, -1, 3, 226, 149, -1, -1, 65, 146, -1,
2346 -1, 64, 122, 155, 237, 133, 146, 153, -1, -1,
2347 150, -1, 238, -1, 46, 3, 226, -1, 3, -1,
2348 13, 122, -1, 13, 50, 122, -1, 158, 156, 99,
2349 237, 99, 238, 133, 146, -1, 158, 157, 68, 237,
2350 133, 146, -1, -1, 14, 122, 162, 237, 133, 146,
2351 -1, -1, 15, 164, 146, 14, 122, 237, 133, -1,
2352 66, -1, 66, 3, -1, 30, -1, 30, 3, -1,
2353 -1, 168, -1, 170, -1, 168, 170, -1, 169, -1,
2354 168, 169, -1, 34, 239, 105, 142, -1, 62, 105,
2355 142, -1, -1, 16, 122, 172, 239, 133, 126, 167,
2356 132, -1, -1, 33, 122, 3, 226, 133, 174, 126,
2357 142, 132, -1, -1, 28, 126, 176, 142, 132, -1,
2358 173, -1, 177, 173, -1, 177, -1, 177, 175, -1,
2359 175, -1, -1, 52, 126, 180, 142, 132, 178, -1,
2360 37, 237, -1, 37, -1, 39, 122, 237, 133, 146,
2361 -1, 3, -1, 19, -1, 184, 127, 183, -1, 183,
2362 -1, -1, 19, 184, 126, 186, 139, 132, -1, -1,
2363 19, 126, 187, 139, 132, -1, 41, 222, -1, 41,
2364 184, 127, 115, -1, -1, 190, -1, 191, -1, 190,
2365 191, -1, 21, -1, 22, -1, 20, -1, 38, -1,
2366 47, -1, 49, -1, 48, -1, 26, -1, 24, -1,
2367 4, -1, -1, 54, 223, -1, -1, 54, 224, -1,
2368 -1, 17, 224, -1, -1, 189, 31, 3, 192, 194,
2369 126, 196, 199, 132, -1, -1, 189, 44, 3, 193,
2370 126, 198, 202, 132, -1, -1, 200, -1, 201, -1,
2371 200, 201, -1, 99, -1, 148, 126, 199, 132, -1,
2372 206, -1, 216, -1, 144, -1, -1, 203, -1, 204,
2373 -1, 203, 204, -1, 99, -1, 46, 3, -1, 189,
2374 27, 215, 3, 122, 212, 133, 226, -1, 46, -1,
2375 32, -1, -1, 189, 205, 207, 208, -1, 209, -1,
2376 208, 100, 209, -1, 3, 226, 149, -1, -1, 102,
2377 211, -1, 10, -1, 8, -1, 9, -1, 12, -1,
2378 5, -1, 56, -1, 55, -1, 45, -1, 3, -1,
2379 -1, 213, -1, 93, 214, -1, 213, 100, 93, 214,
2380 -1, 213, 100, 214, -1, 214, -1, 3, 105, 225,
2381 210, -1, 3, 210, -1, 51, -1, 35, -1, -1,
2382 -1, 189, 27, 215, 3, 122, 212, 133, 226, 126,
2383 217, 142, 132, -1, 3, -1, -1, -1, 27, 218,
2384 122, 212, 133, 226, 126, 220, 142, 132, -1, 3,
2385 -1, 184, 127, 3, -1, 222, -1, 221, -1, 223,
2386 -1, 224, 100, 223, -1, 223, -1, 115, -1, 36,
2387 -1, 105, 225, -1, -1, -1, 122, 228, 133, -1,
2388 -1, 229, -1, 230, -1, 236, -1, 229, 100, -1,
2389 230, 236, -1, -1, 25, 239, 231, 227, -1, 239,
2390 122, 228, 133, -1, 53, 122, 228, 133, -1, 63,
2391 239, -1, 42, -1, 42, 237, -1, 239, -1, 239,
2392 -1, 237, 100, 239, -1, 237, -1, 219, -1, 240,
2393 -1, 243, -1, 232, -1, 234, -1, 233, -1, 6,
2394 -1, 10, -1, 11, -1, 8, -1, 9, -1, 12,
2395 -1, 5, -1, 29, -1, 56, -1, 55, -1, 45,
2396 -1, 239, 109, 239, -1, 239, 110, 239, -1, 239,
2397 75, 239, -1, 239, 76, 239, -1, 239, 71, 239,
2398 -1, 239, 72, 239, -1, 239, 74, 239, -1, 239,
2399 73, 239, -1, 239, 87, 239, -1, 239, 88, 239,
2400 -1, 118, 239, -1, 117, 239, -1, 239, 108, 239,
2401 -1, 239, 107, 239, -1, 239, 106, 239, -1, 239,
2402 96, 239, -1, 239, 95, 239, -1, 239, 94, 239,
2403 -1, 239, 114, 239, -1, 239, 116, 239, -1, 239,
2404 113, 239, -1, 239, 112, 239, -1, 239, 115, 239,
2405 -1, 239, 68, 239, -1, 239, 69, 239, -1, 239,
2406 40, 239, -1, 239, 67, 239, -1, 43, 122, 239,
2407 133, -1, 36, 239, -1, 36, -1, 122, 237, 133,
2408 -1, 112, 239, -1, 239, 124, 239, 125, -1, 124,
2409 228, 125, -1, -1, 242, -1, 236, 105, 236, -1,
2410 242, 100, 236, 105, 236, -1, 70, 241, 132, -1,
2411 239, 80, 239, -1, 239, 79, 239, -1, 239, 85,
2412 239, -1, 239, 84, 239, -1, 239, 86, 239, -1,
2413 239, 78, 239, -1, 239, 77, 239, -1, 239, 83,
2414 239, -1, 239, 81, 239, -1, 239, 82, 239, -1,
2415 239, 102, 239, -1, 239, 104, 239, 105, 239, -1,
2416 239, 91, -1, 239, 90, -1, 91, 239, -1, 90,
2417 239, -1, 53, 127, 3, -1, 128, 3, -1, 239,
2418 127, 128, 3, -1, 239, 127, 3, 89, 3, -1,
2419 239, 92, 3, -1, 239, 127, 122, 239, 133, -1,
2420 239, 127, 3, -1, 3, -1, 18, 3, -1, 189,
2421 244, -1, 189, 244, 102, 3, -1, 189, 244, 102,
2422 5, -1, 23, 18, 223, -1
2425 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
2426 static const yytype_uint16 yyrline[] =
2428 0, 1993, 1993, 1995, 1995, 1996, 1997, 1999, 2000, 2001,
2429 2002, 2003, 2004, 2005, 2006, 2008, 2008, 2009, 2010, 2012,
2430 2013, 2014, 2015, 2016, 2017, 2018, 2020, 2021, 2023, 2024,
2431 2027, 2028, 2029, 2030, 2031, 2032, 2033, 2034, 2035, 2036,
2432 2037, 2038, 2039, 2040, 2043, 2044, 2045, 2046, 2047, 2048,
2433 2049, 2050, 2054, 2055, 2059, 2066, 2070, 2071, 2075, 2076,
2434 2078, 2079, 2081, 2142, 2143, 2146, 2146, 2165, 2166, 2167,
2435 2172, 2176, 2181, 2182, 2184, 2204, 2252, 2252, 2271, 2271,
2436 2286, 2289, 2292, 2295, 2299, 2300, 2301, 2302, 2303, 2304,
2437 2306, 2317, 2320, 2320, 2349, 2349, 2373, 2373, 2389, 2390,
2438 2391, 2392, 2400, 2409, 2409, 2454, 2458, 2469, 2478, 2479,
2439 2481, 2482, 2484, 2484, 2486, 2486, 2489, 2505, 2522, 2523,
2440 2524, 2525, 2533, 2534, 2535, 2536, 2537, 2538, 2539, 2540,
2441 2541, 2542, 2546, 2547, 2549, 2550, 2552, 2553, 2557, 2555,
2442 2563, 2561, 2570, 2571, 2572, 2573, 2574, 2575, 2576, 2577,
2443 2579, 2585, 2586, 2587, 2588, 2589, 2590, 2593, 2606, 2606,
2444 2608, 2608, 2610, 2611, 2613, 2688, 2689, 2691, 2692, 2693,
2445 2694, 2695, 2697, 2698, 2699, 2700, 2712, 2716, 2722, 2728,
2446 2736, 2741, 2747, 2755, 2763, 2764, 2765, 2768, 2767, 2784,
2447 2785, 2787, 2786, 2810, 2826, 2841, 2842, 2844, 2845, 2847,
2448 2848, 2849, 2858, 2859, 2863, 2864, 2866, 2867, 2868, 2870,
2449 2874, 2875, 2880, 2881, 2917, 2963, 2984, 3005, 3008, 3015,
2450 3016, 3017, 3023, 3029, 3031, 3033, 3035, 3037, 3039, 3041,
2451 3058, 3063, 3066, 3069, 3072, 3075, 3078, 3081, 3084, 3087,
2452 3091, 3094, 3097, 3100, 3103, 3106, 3109, 3112, 3116, 3127,
2453 3145, 3150, 3155, 3160, 3165, 3170, 3174, 3178, 3183, 3187,
2454 3191, 3200, 3209, 3219, 3224, 3236, 3242, 3247, 3253, 3259,
2455 3263, 3265, 3276, 3285, 3292, 3293, 3295, 3301, 3310, 3317,
2456 3329, 3335, 3341, 3347, 3353, 3359, 3365, 3371, 3384, 3395,
2457 3402, 3415, 3442, 3456, 3470, 3484, 3499, 3506, 3513, 3520,
2458 3527, 3538, 3588, 3693, 3699, 3702, 3705, 3708
2462 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
2463 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
2464 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
2465 static const char *const yytname[] =
2467 "$end", "error", "$undefined", "T_IDENTIFIER", "T_NAMESPACE",
2468 "T_STRING", "T_REGEXP", "T_EMPTY", "T_INT", "T_UINT", "T_BYTE",
2469 "T_SHORT", "T_FLOAT", "\"for\"", "\"while\"", "\"do\"", "\"switch\"",
2470 "\"implements\"", "\"namespace\"", "\"package\"", "\"protected\"",
2471 "\"public\"", "\"private\"", "\"use\"", "\"internal\"", "\"new\"",
2472 "\"native\"", "\"function\"", "\"finally\"", "\"undefined\"",
2473 "\"continue\"", "\"class\"", "\"const\"", "\"catch\"", "\"case\"",
2474 "\"set\"", "\"void\"", "\"throw\"", "\"static\"", "\"with\"",
2475 "\"instanceof\"", "\"import\"", "\"return\"", "\"typeof\"",
2476 "\"interface\"", "\"null\"", "\"var\"", "\"dynamic\"", "\"override\"",
2477 "\"final\"", "\"each\"", "\"get\"", "\"try\"", "\"super\"",
2478 "\"extends\"", "\"false\"", "\"true\"", "\"Boolean\"", "\"uint\"",
2479 "\"int\"", "\"Number\"", "\"String\"", "\"default\"", "\"delete\"",
2480 "\"if\"", "\"else\"", "\"break\"", "\"is\"", "\"in\"", "\"as\"",
2481 "\"{ (dictionary)\"", "\"==\"", "\"===\"", "\"!=\"", "\"!==\"", "\"<=\"",
2482 "\">=\"", "\"|=\"", "\"/=\"", "\"%=\"", "\"*=\"", "\"+=\"", "\"-=\"",
2483 "\"^=\"", "\">>=\"", "\"<<=\"", "\">>>=\"", "\"||\"", "\"&&\"", "\"::\"",
2484 "\"--\"", "\"++\"", "\"..\"", "\"...\"", "\"<<\"", "\">>>\"", "\">>\"",
2485 "prec_none", "below_semicolon", "';'", "','", "below_assignment", "'='",
2486 "\"&=\"", "'?'", "':'", "'|'", "'^'", "'&'", "'<'", "'>'", "below_minus",
2487 "'-'", "'+'", "'/'", "'*'", "'%'", "'~'", "'!'", "minusminus_prefix",
2488 "plusplus_prefix", "below_curly", "'('", "new2", "'['", "']'", "'{'",
2489 "'.'", "'@'", "above_identifier", "below_else", "above_function", "'}'",
2490 "')'", "$accept", "PROGRAM", "MAYBE_PROGRAM_CODE_LIST",
2491 "PROGRAM_CODE_LIST", "PROGRAM_CODE", "MAYBE_INPACKAGE_CODE_LIST",
2492 "INPACKAGE_CODE_LIST", "INPACKAGE_CODE", "MAYBECODE", "CODE",
2493 "CODE_STATEMENT", "CODEPIECE", "CODEBLOCK", "PACKAGE_INITCODE",
2494 "CONDITIONAL_COMPILATION", "MAYBEEXPRESSION", "VARIABLE_DECLARATION",
2495 "VARIABLE_LIST", "ONE_VARIABLE", "MAYBEELSE", "IF", "$@1", "FOR_INIT",
2496 "FOR_IN_INIT", "FOR_START", "FOR", "FOR_IN", "WHILE", "$@2", "DO_WHILE",
2497 "$@3", "BREAK", "CONTINUE", "MAYBE_CASE_LIST", "CASE_LIST", "CASE",
2498 "DEFAULT", "SWITCH", "$@4", "CATCH", "$@5", "FINALLY", "$@6",
2499 "CATCH_LIST", "CATCH_FINALLY_LIST", "TRY", "$@7", "THROW", "WITH",
2500 "X_IDENTIFIER", "PACKAGE", "PACKAGE_DECLARATION", "$@8", "$@9", "IMPORT",
2501 "MAYBE_MODIFIERS", "MODIFIER_LIST", "MODIFIER", "EXTENDS",
2502 "EXTENDS_LIST", "IMPLEMENTS_LIST", "CLASS_DECLARATION", "$@10",
2503 "INTERFACE_DECLARATION", "$@11", "MAYBE_CLASS_BODY", "CLASS_BODY",
2504 "CLASS_BODY_ITEM", "MAYBE_INTERFACE_BODY", "INTERFACE_BODY",
2505 "IDECLARATION", "VARCONST", "SLOT_DECLARATION", "$@12", "SLOT_LIST",
2506 "ONE_SLOT", "MAYBESTATICCONSTANT", "STATICCONSTANT", "MAYBE_PARAM_LIST",
2507 "PARAM_LIST", "PARAM", "GETSET", "FUNCTION_DECLARATION", "$@13",
2508 "MAYBE_IDENTIFIER", "INNERFUNCTION", "$@14", "CLASS", "PACKAGEANDCLASS",
2509 "CLASS_SPEC", "CLASS_SPEC_LIST", "TYPE", "MAYBETYPE",
2510 "MAYBE_PARAM_VALUES", "MAYBE_EXPRESSION_LIST", "EXPRESSION_LIST",
2511 "EXPRESSION_LIST_AND_COMMA", "XX", "NEW", "FUNCTIONCALL", "DELETE",
2512 "RETURN", "NONCOMMAEXPRESSION", "EXPRESSION", "VOIDEXPRESSION", "E",
2513 "CONSTANT", "MAYBE_EXPRPAIR_LIST", "EXPRPAIR_LIST", "VAR_READ",
2514 "NAMESPACE_ID", "NAMESPACE_DECLARATION", "USE_NAMESPACE", 0
2519 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
2521 static const yytype_uint16 yytoknum[] =
2523 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
2524 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
2525 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
2526 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
2527 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
2528 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
2529 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
2530 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
2531 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
2532 345, 346, 347, 348, 349, 350, 351, 352, 353, 59,
2533 44, 354, 61, 355, 63, 58, 124, 94, 38, 60,
2534 62, 356, 45, 43, 47, 42, 37, 126, 33, 357,
2535 358, 359, 40, 360, 91, 93, 123, 46, 64, 361,
2540 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
2541 static const yytype_uint8 yyr1[] =
2543 0, 134, 135, 136, 136, 137, 137, 138, 138, 138,
2544 138, 138, 138, 138, 138, 139, 139, 140, 140, 141,
2545 141, 141, 141, 141, 141, 141, 142, 142, 143, 143,
2546 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
2547 144, 144, 144, 144, 145, 145, 145, 145, 145, 145,
2548 145, 145, 146, 146, 147, 148, 149, 149, 150, 150,
2549 151, 151, 152, 153, 153, 155, 154, 156, 156, 156,
2550 157, 157, 158, 158, 159, 160, 162, 161, 164, 163,
2551 165, 165, 166, 166, 167, 167, 167, 167, 168, 168,
2552 169, 170, 172, 171, 174, 173, 176, 175, 177, 177,
2553 178, 178, 178, 180, 179, 181, 181, 182, 183, 183,
2554 184, 184, 186, 185, 187, 185, 188, 188, 189, 189,
2555 190, 190, 191, 191, 191, 191, 191, 191, 191, 191,
2556 191, 191, 192, 192, 193, 193, 194, 194, 196, 195,
2557 198, 197, 199, 199, 200, 200, 201, 201, 201, 201,
2558 201, 202, 202, 203, 203, 204, 204, 204, 205, 205,
2559 207, 206, 208, 208, 209, 210, 210, 211, 211, 211,
2560 211, 211, 211, 211, 211, 211, 212, 212, 212, 212,
2561 213, 213, 214, 214, 215, 215, 215, 217, 216, 218,
2562 218, 220, 219, 221, 222, 223, 223, 224, 224, 225,
2563 225, 225, 226, 226, 227, 227, 228, 228, 228, 229,
2564 230, 229, 231, 232, 233, 233, 234, 235, 235, 236,
2565 237, 237, 238, 239, 239, 239, 239, 239, 239, 239,
2566 240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
2567 239, 239, 239, 239, 239, 239, 239, 239, 239, 239,
2568 239, 239, 239, 239, 239, 239, 239, 239, 239, 239,
2569 239, 239, 239, 239, 239, 239, 239, 239, 239, 239,
2570 239, 239, 239, 239, 241, 241, 242, 242, 239, 239,
2571 239, 239, 239, 239, 239, 239, 239, 239, 239, 239,
2572 239, 239, 239, 239, 239, 239, 239, 239, 239, 239,
2573 239, 239, 243, 244, 245, 245, 245, 246
2576 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
2577 static const yytype_uint8 yyr2[] =
2579 0, 2, 1, 0, 1, 1, 2, 1, 1, 1,
2580 1, 1, 1, 4, 1, 0, 1, 1, 2, 1,
2581 1, 1, 1, 1, 4, 1, 1, 0, 2, 1,
2582 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2583 1, 1, 3, 2, 1, 1, 1, 1, 1, 1,
2584 1, 4, 2, 1, 1, 3, 2, 0, 2, 2,
2585 1, 3, 3, 0, 2, 0, 7, 0, 1, 1,
2586 3, 1, 2, 3, 8, 6, 0, 6, 0, 7,
2587 1, 2, 1, 2, 0, 1, 1, 2, 1, 2,
2588 4, 3, 0, 8, 0, 9, 0, 5, 1, 2,
2589 1, 2, 1, 0, 6, 2, 1, 5, 1, 1,
2590 3, 1, 0, 6, 0, 5, 2, 4, 0, 1,
2591 1, 2, 1, 1, 1, 1, 1, 1, 1, 1,
2592 1, 1, 0, 2, 0, 2, 0, 2, 0, 9,
2593 0, 8, 0, 1, 1, 2, 1, 4, 1, 1,
2594 1, 0, 1, 1, 2, 1, 2, 8, 1, 1,
2595 0, 4, 1, 3, 3, 0, 2, 1, 1, 1,
2596 1, 1, 1, 1, 1, 1, 0, 1, 2, 4,
2597 3, 1, 4, 2, 1, 1, 0, 0, 12, 1,
2598 0, 0, 10, 1, 3, 1, 1, 1, 3, 1,
2599 1, 1, 2, 0, 0, 3, 0, 1, 1, 1,
2600 2, 2, 0, 4, 4, 4, 2, 1, 2, 1,
2601 1, 3, 1, 1, 1, 1, 1, 1, 1, 1,
2602 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2603 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
2604 2, 2, 3, 3, 3, 3, 3, 3, 3, 3,
2605 3, 3, 3, 3, 3, 3, 3, 4, 2, 1,
2606 3, 2, 4, 3, 0, 1, 3, 5, 3, 3,
2607 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
2608 5, 2, 2, 2, 2, 3, 2, 4, 5, 3,
2609 5, 3, 1, 2, 2, 4, 4, 3
2612 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
2613 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
2614 means the default is an error. */
2615 static const yytype_uint16 yydefact[] =
2617 118, 302, 131, 235, 229, 232, 233, 230, 231, 234,
2618 0, 0, 78, 0, 0, 124, 122, 123, 0, 130,
2619 0, 129, 190, 236, 269, 125, 0, 0, 0, 239,
2620 126, 128, 127, 0, 0, 238, 237, 0, 0, 274,
2621 0, 0, 14, 0, 0, 0, 0, 206, 118, 0,
2622 0, 2, 118, 5, 54, 12, 0, 36, 67, 31,
2623 32, 33, 34, 35, 38, 37, 7, 30, 0, 119,
2624 120, 9, 8, 11, 10, 223, 226, 228, 227, 222,
2625 39, 220, 224, 225, 41, 40, 0, 0, 72, 76,
2626 118, 92, 108, 109, 114, 111, 0, 0, 302, 212,
2627 189, 0, 268, 0, 0, 116, 0, 103, 206, 0,
2628 216, 65, 0, 219, 0, 275, 294, 293, 271, 251,
2629 250, 0, 0, 207, 208, 209, 82, 0, 106, 217,
2630 0, 80, 44, 43, 118, 45, 29, 0, 46, 47,
2631 48, 50, 0, 49, 296, 1, 6, 118, 302, 0,
2632 68, 0, 0, 69, 0, 186, 0, 159, 0, 158,
2633 160, 304, 121, 0, 0, 0, 0, 0, 0, 0,
2634 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2635 0, 0, 0, 0, 0, 0, 292, 291, 0, 0,
2636 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2637 0, 0, 0, 0, 206, 0, 0, 55, 73, 0,
2638 53, 0, 0, 118, 112, 0, 193, 0, 196, 195,
2639 307, 204, 176, 0, 0, 0, 27, 0, 295, 0,
2640 0, 278, 0, 270, 273, 210, 211, 83, 203, 59,
2641 60, 105, 218, 58, 81, 42, 28, 118, 0, 203,
2642 0, 0, 303, 185, 184, 0, 132, 134, 0, 0,
2643 221, 265, 266, 263, 264, 244, 245, 247, 246, 242,
2644 243, 285, 284, 280, 279, 287, 288, 286, 282, 281,
2645 283, 248, 249, 299, 257, 256, 255, 289, 0, 254,
2646 253, 252, 240, 241, 261, 260, 258, 262, 259, 0,
2647 0, 301, 0, 0, 0, 52, 0, 0, 25, 0,
2648 118, 17, 23, 0, 20, 19, 22, 21, 118, 110,
2649 0, 206, 213, 165, 0, 0, 177, 181, 118, 194,
2650 117, 267, 0, 26, 215, 0, 276, 0, 0, 57,
2651 0, 118, 13, 57, 0, 0, 0, 0, 136, 0,
2652 0, 203, 161, 162, 305, 306, 0, 214, 272, 0,
2653 0, 297, 118, 0, 0, 115, 18, 118, 0, 0,
2654 0, 0, 183, 178, 203, 0, 107, 0, 118, 0,
2655 201, 200, 199, 202, 0, 62, 61, 51, 0, 118,
2656 176, 133, 0, 0, 197, 135, 140, 57, 0, 290,
2657 298, 300, 77, 0, 84, 0, 113, 205, 175, 171,
2658 168, 169, 167, 170, 174, 173, 172, 166, 165, 0,
2659 0, 180, 0, 0, 98, 102, 100, 104, 63, 277,
2660 56, 0, 75, 0, 137, 138, 0, 118, 164, 163,
2661 79, 0, 0, 0, 85, 88, 86, 24, 182, 191,
2662 179, 96, 0, 99, 101, 118, 66, 118, 203, 118,
2663 198, 0, 155, 0, 0, 118, 153, 0, 27, 93,
2664 89, 87, 27, 27, 203, 64, 74, 0, 146, 150,
2665 0, 0, 0, 118, 144, 148, 149, 156, 186, 141,
2666 154, 27, 91, 0, 0, 0, 187, 118, 139, 145,
2667 0, 90, 192, 97, 94, 27, 0, 0, 0, 0,
2668 147, 176, 27, 188, 0, 0, 203, 95, 157
2671 /* YYDEFGOTO[NTERM-NUM]. */
2672 static const yytype_int16 yydefgoto[] =
2674 -1, 50, 51, 52, 53, 309, 310, 311, 332, 333,
2675 135, 136, 211, 312, 137, 385, 138, 243, 240, 456,
2676 57, 229, 151, 152, 58, 59, 60, 61, 209, 62,
2677 90, 139, 140, 443, 444, 445, 446, 63, 212, 424,
2678 508, 425, 473, 426, 427, 64, 226, 141, 65, 95,
2679 217, 66, 318, 213, 67, 142, 69, 70, 348, 350,
2680 393, 314, 459, 315, 437, 482, 483, 484, 464, 465,
2681 466, 160, 316, 258, 352, 353, 372, 417, 325, 326,
2682 327, 255, 317, 505, 101, 75, 472, 218, 219, 382,
2683 395, 383, 339, 322, 122, 123, 124, 221, 76, 77,
2684 78, 143, 125, 79, 80, 81, 82, 114, 115, 83,
2688 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
2690 #define YYPACT_NINF -426
2691 static const yytype_int16 yypact[] =
2693 1672, 12, -426, -426, -426, -426, -426, -426, -426, -426,
2694 -16, -19, -426, -18, 11, -426, -426, -426, 107, -426,
2695 2092, -426, 132, -426, 350, -426, 58, 25, 79, -426,
2696 -426, -426, -426, 84, -20, -426, -426, 2092, 83, 2092,
2697 2092, 2092, -426, 2092, 2092, 2092, 2092, 2092, 632, 209,
2698 216, -426, 502, -426, -426, -426, 93, -426, 2022, -426,
2699 -426, -426, -426, -426, -426, -426, -426, -426, 356, 248,
2700 -426, -426, -426, -426, -426, -426, -426, -426, -426, 118,
2701 -426, 2522, -426, -426, -426, -426, 218, 105, -426, -426,
2702 1924, -426, -426, -426, -426, -426, -106, 86, -426, -46,
2703 -426, 106, 139, 2092, 108, -426, 2092, -426, 2092, 229,
2704 139, -426, 129, 2522, 104, 138, 139, 139, 294, 139,
2705 139, -75, 115, 141, 2092, -426, 239, 243, 2092, 2092,
2706 243, 244, -426, -426, 762, -426, -426, 123, -426, -426,
2707 -426, -426, 232, -426, -426, -426, -426, 1022, 183, 255,
2708 -426, 165, 197, -426, 264, 92, 270, -426, 273, -426,
2709 -426, 176, -426, 2092, 2092, 2092, 2092, 2092, 2092, 2092,
2710 2092, 2092, 2092, 2092, 2092, 2092, 2092, 2092, 2092, 2092,
2711 2092, 2092, 2092, 2092, 2092, 2092, -426, -426, 280, 2092,
2712 2092, 2092, 2092, 2092, 2092, 2092, 2092, 2092, 2092, 2092,
2713 2092, 2092, 2092, 2092, 2092, 2092, 14, -426, -426, 2092,
2714 185, 271, 2092, 1152, -426, 25, 160, 161, -426, -426,
2715 -426, 167, 20, -12, 19, 2150, 1798, 157, -426, 2092,
2716 2092, -426, 2092, -426, -426, -426, -426, -426, 186, 192,
2717 -426, 118, 118, 192, -426, -426, -426, 1924, 166, 186,
2718 2092, 2092, -426, -426, -426, 296, 246, 252, 304, 149,
2719 2522, 1014, 494, 494, 494, 2888, 2888, 2888, 2888, 1014,
2720 1014, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522,
2721 2522, 2583, 2644, -426, 211, 211, 211, 2522, 2339, 2705,
2722 2766, 2827, 1014, 1014, 294, 294, 139, 139, 139, 175,
2723 2400, 220, 2092, 311, -9, -426, 194, 2213, -426, 189,
2724 1282, -426, -426, 191, -426, -426, -426, -426, 1152, -426,
2725 125, 2092, -426, 97, 312, 195, 222, -426, 1924, 160,
2726 -426, -426, 198, 1798, -426, -1, -426, 224, 38, 235,
2727 243, 892, -426, -26, -35, 8, 212, 86, 314, 86,
2728 213, 186, 240, -426, -426, -426, 2092, -426, -426, 338,
2729 2276, -426, 1924, 2092, 217, -426, -426, 1152, 210, 221,
2730 74, 38, -426, -426, 186, 24, -426, 98, 1924, 2092,
2731 -426, -426, -426, -426, 2092, -426, -426, -426, 2092, 1924,
2732 20, -426, 86, 219, -426, 250, -426, 235, 304, 2522,
2733 -426, -426, -426, 45, 56, 214, -426, -426, -426, -426,
2734 -426, -426, -426, -426, -426, -426, -426, -426, 242, 225,
2735 312, -426, 237, 251, -426, -426, 98, -426, 299, -426,
2736 -426, 245, -426, 247, 250, -426, 86, 47, -426, -426,
2737 -426, 2092, 261, 249, 56, -426, -426, -426, -426, -426,
2738 -426, -426, 379, -426, -426, 1924, -426, 1924, 186, 1412,
2739 -426, 386, -426, 363, 259, 233, -426, 2461, 1798, -426,
2740 -426, -426, 1798, 1798, 186, -426, -426, 266, -426, -426,
2741 267, 193, 262, 1542, -426, -426, -426, -426, 92, -426,
2742 -426, 1798, -426, 265, 269, 263, -426, 1412, -426, -426,
2743 395, -426, -426, -426, -426, 1798, 272, 277, 281, 279,
2744 -426, 20, 1798, -426, 282, 285, 186, -426, -426
2747 /* YYPGOTO[NTERM-NUM]. */
2748 static const yytype_int16 yypgoto[] =
2750 -426, -426, 275, -426, 360, -292, -426, 103, -425, -39,
2751 1, -85, -317, 59, 2, 17, 361, 297, 85, -426,
2752 -426, -426, -426, -426, -426, -426, -426, -426, -426, -426,
2753 -426, -426, -426, -426, -426, -21, -17, -426, -426, 5,
2754 -426, 6, -426, -426, -426, -426, -426, -426, -426, -200,
2755 36, -426, -426, -426, -426, 0, -426, 357, -426, -426,
2756 -426, 60, -426, 62, -426, -69, -426, -54, -426, -426,
2757 -31, -426, 3, -426, -426, 32, 18, -426, -372, -426,
2758 -305, -53, 4, -426, -426, -426, -426, -426, 411, -87,
2759 50, 68, -241, -426, -95, -426, -426, -426, -426, -426,
2760 -426, -426, -32, -6, -52, -8, -426, -426, -426, -426,
2764 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
2765 positive, shift that token. If negative, reduce the rule which
2766 number is the opposite. If zero, do what YYDEFACT says.
2767 If YYTABLE_NINF, syntax error. */
2768 #define YYTABLE_NINF -153
2769 static const yytype_int16 yytable[] =
2771 68, 54, 56, 73, 74, 210, 153, 112, 343, 134,
2772 220, 376, 99, 227, 92, 319, 102, 301, 433, 373,
2773 214, 215, 329, 323, 319, 163, 368, 323, 92, 110,
2774 93, 113, 116, 117, 87, 118, 119, 120, 93, 113,
2775 121, 216, -70, 492, 93, 402, 188, 493, 494, 246,
2776 96, 2, 68, 54, 56, 73, 74, 93, 233, 55,
2777 71, 428, 72, 104, 388, 163, 501, 15, 16, 17,
2778 421, 19, 432, 21, 380, 405, 384, 408, 205, 409,
2779 509, 206, 410, 411, 412, 25, 413, 515, 163, 216,
2780 441, 163, 236, 461, 30, 31, 32, 223, 225, 163,
2781 113, 86, 108, 89, 91, 93, 88, 109, 163, 299,
2782 397, 55, 71, 324, 72, 450, 113, 420, 442, 414,
2783 319, 328, 241, 242, 362, 97, 422, 253, 329, 415,
2784 416, 423, 378, 419, 330, 100, 302, 94, 475, 514,
2785 476, 389, 303, 254, 93, 163, 462, 68, 54, 56,
2786 73, 74, 354, 381, 355, 260, 261, 262, 263, 264,
2787 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
2788 275, 276, 277, 278, 279, 280, 281, 282, 440, -151,
2789 103, 284, 285, 286, 287, 288, 289, 290, 291, 292,
2790 293, 294, 295, 296, 297, 298, 113, 300, 336, 370,
2791 337, 106, 371, 304, 307, 111, 55, 71, 341, 72,
2792 107, 154, 144, 68, 54, 313, 145, 477, 163, 147,
2793 155, 207, 113, 335, 113, 157, 369, 208, 222, 186,
2794 187, 188, 228, 495, 230, 224, 231, 2, 232, 159,
2795 234, 235, 237, 210, 344, 345, 238, 244, 246, 247,
2796 154, -71, 2, 15, 16, 17, 246, 19, 249, 21,
2797 391, 204, 394, 205, 250, 251, 206, 252, 15, 16,
2798 17, 25, 19, 256, 21, 518, 257, 210, 259, 461,
2799 30, 31, 32, 283, 305, 306, 25, -108, 320, 321,
2800 334, 338, 340, 210, 360, 30, 31, 32, 342, 346,
2801 347, 186, 187, 188, 210, 394, 349, 351, 357, 359,
2802 68, 54, 313, 113, 361, 323, 363, 367, 68, 54,
2803 313, 365, 375, 199, 200, 201, 202, 203, 374, 379,
2804 377, 392, 462, 204, 390, 205, 431, 384, 206, 396,
2805 398, 400, 406, 404, 370, 435, 447, 429, 399, 460,
2806 436, 449, 430, 98, 407, 3, 4, 403, 5, 6,
2807 7, 8, 9, 451, 455, -152, 468, 68, 54, 313,
2808 210, 113, 210, 452, 154, 20, 113, 22, 457, 23,
2809 458, 469, 474, 155, 186, 187, 188, 156, 157, 487,
2810 488, 489, 496, 497, 498, 29, 504, 502, 507, 511,
2811 158, 503, 159, 34, 510, 35, 36, 512, 201, 202,
2812 203, 513, 146, 366, 438, 516, 204, 517, 205, 150,
2813 39, 206, 248, 470, 239, 386, 162, 471, 506, 499,
2814 439, 453, 454, 467, 490, 500, 448, 463, 105, 418,
2815 40, 41, 434, 0, 0, 0, 0, 0, 0, 0,
2816 0, 0, 0, 0, 0, 0, 0, 0, 0, 481,
2817 479, 480, 485, 486, 0, 463, 0, 0, 0, 0,
2818 0, 0, 46, 0, 47, 0, 0, 0, 49, 0,
2819 0, 0, 0, 481, 479, 480, 485, 486, 0, 0,
2820 0, 0, 0, 0, 0, 0, 0, 481, 479, 480,
2821 485, 486, -4, 0, 0, 1, 2, 3, 4, 0,
2822 5, 6, 7, 8, 9, 10, 11, 12, 13, 0,
2823 0, 14, 15, 16, 17, 18, 19, 20, 21, 0,
2824 0, 23, 0, 0, 164, 0, 0, 0, 24, 0,
2825 25, 26, 0, 27, 0, 28, 0, 29, 0, 30,
2826 31, 32, 0, 0, 33, 34, 0, 35, 36, 0,
2827 0, -153, -153, -153, 0, 37, 38, 0, 0, 172,
2828 173, 0, 39, 0, 0, 0, 0, 0, 0, 0,
2829 0, 0, 0, 0, 186, 187, 188, 0, 189, 190,
2830 191, 0, 40, 41, 0, 0, 0, 0, 0, 0,
2831 0, 42, 0, 197, 198, 0, 199, 200, 201, 202,
2832 203, 0, 0, 0, 43, 0, 204, 0, 205, 44,
2833 45, 206, 0, 0, 46, 0, 47, 0, 48, 0,
2834 49, 0, 0, 0, -4, 1, 2, 3, 4, 0,
2835 5, 6, 7, 8, 9, 10, 11, 12, 13, 0,
2836 0, 0, 15, 16, 17, 18, 19, 20, 21, 22,
2837 0, 23, 126, 0, 127, 0, 0, 0, 24, 128,
2838 25, 26, 0, 27, 129, 28, 0, 29, 130, 30,
2839 31, 32, 0, 0, 33, 34, 0, 35, 36, 0,
2840 0, 0, 0, 0, 0, 37, 38, 0, 131, 0,
2841 0, 0, 39, 0, 0, 0, 0, 0, 0, 0,
2842 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2843 0, 0, 40, 41, 0, 0, 0, 0, 0, 0,
2844 0, 132, 0, 0, 0, 0, 0, 0, 0, 0,
2845 0, 0, 0, 0, 43, 0, 0, 0, 0, 44,
2846 45, 0, 0, 0, 46, 0, 47, 0, 48, 0,
2847 49, 0, 0, 0, 133, 1, 2, 3, 4, 0,
2848 5, 6, 7, 8, 9, 10, 11, 12, 13, 0,
2849 0, 0, 15, 16, 17, 18, 19, 20, 21, 22,
2850 0, 23, 126, 0, 127, 0, 0, 0, 24, 128,
2851 25, 26, 0, 27, 129, 28, 0, 29, 130, 30,
2852 31, 32, 0, 0, 33, 34, 0, 35, 36, 0,
2853 0, 0, 0, 0, 0, 37, 38, 0, 131, 0,
2854 0, 0, 39, 0, 0, 0, 0, 0, 0, 0,
2855 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2856 0, 0, 40, 41, 0, 0, 0, 0, 0, 0,
2857 0, 132, 0, 0, 0, 0, 0, 0, 0, 0,
2858 0, 0, 0, 0, 43, 0, 0, 0, 0, 44,
2859 45, 0, 0, 0, 46, 0, 47, 0, 48, 0,
2860 49, 0, 0, 0, 245, 1, 2, 3, 4, 0,
2861 5, 6, 7, 8, 9, 10, 11, 12, 13, 0,
2862 0, 0, 15, 16, 17, 18, 19, 20, 21, 22,
2863 0, 23, 126, 0, 127, 0, 0, 0, 24, 128,
2864 25, 26, 0, 27, 129, 28, 0, 29, 130, 30,
2865 31, 32, 0, 0, 33, 34, 0, 35, 36, 0,
2866 0, 0, 0, 0, 0, 37, 38, 0, 131, 0,
2867 0, 0, 39, 0, 0, 0, 0, 0, 0, 0,
2868 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2869 0, 0, 40, 41, 0, 0, 0, 0, 0, 0,
2870 0, 132, 0, 0, 0, 0, 0, 0, 0, 0,
2871 0, 0, 0, 0, 43, 0, 0, 0, 0, 44,
2872 45, 0, 0, 0, 46, 0, 47, 0, 48, 0,
2873 49, 0, 0, 0, 387, 1, 2, 3, 4, 0,
2874 5, 6, 7, 8, 9, 10, 11, 12, 13, 0,
2875 0, 14, 15, 16, 17, 18, 19, 20, 21, 0,
2876 0, 23, 0, 0, -153, 0, 0, 0, 24, 0,
2877 25, 26, 0, 27, 0, 28, 0, 29, 0, 30,
2878 31, 32, 0, 0, 33, 34, 0, 35, 36, 0,
2879 0, 0, 0, 0, 0, 37, 38, 0, 0, -153,
2880 -153, 0, 39, 0, 0, 0, 0, 0, 0, 0,
2881 0, 0, 0, 0, 186, 187, 188, 0, 189, 190,
2882 191, 0, 40, 41, 0, 0, 0, 0, 0, 0,
2883 0, 42, 0, -153, -153, 0, 199, 200, 201, 202,
2884 203, 0, 0, 0, 43, 0, 204, 0, 205, 44,
2885 45, 206, 0, 0, 46, 0, 47, 0, 48, 0,
2886 49, 0, 0, 0, -3, 1, 2, 3, 4, 0,
2887 5, 6, 7, 8, 9, 10, 11, 12, 13, 0,
2888 0, 0, 15, 16, 17, 18, 19, 20, 21, 0,
2889 0, 23, 0, 0, 0, 0, 0, 0, 24, 0,
2890 25, 26, 0, 27, 0, 28, 0, 29, 0, 30,
2891 31, 32, 0, 0, 33, 34, 0, 35, 36, 0,
2892 0, 0, 0, 0, 0, 37, 38, 0, 0, 0,
2893 0, 0, 39, 0, 0, 0, 0, 0, 0, 0,
2894 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2895 0, 0, 40, 41, 0, 0, 0, 0, 0, 0,
2896 0, 308, 0, 0, 0, 0, 0, 0, 0, 0,
2897 0, 0, 0, 0, 43, 0, 0, 0, 0, 44,
2898 45, 0, 0, 0, 46, 0, 47, 0, 48, 0,
2899 49, 0, 0, 0, -15, 1, 2, 3, 4, 0,
2900 5, 6, 7, 8, 9, 10, 11, 12, 13, 0,
2901 0, 0, 15, 16, 17, 18, 19, 20, 21, 0,
2902 0, 23, 0, 0, 0, 0, 0, 0, 24, 0,
2903 25, 26, 0, 27, 0, 28, 0, 29, 0, 30,
2904 31, 32, 0, 0, 33, 34, 0, 35, 36, 0,
2905 0, 0, 0, 0, 0, 37, 38, 0, 0, 0,
2906 0, 0, 39, 0, 0, 0, 0, 0, 0, 0,
2907 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2908 0, 0, 40, 41, 0, 0, 0, 0, 0, 0,
2909 0, 308, 0, 0, 0, 0, 0, 0, 0, 0,
2910 0, 0, 0, 0, 43, 0, 0, 0, 0, 44,
2911 45, 0, 0, 0, 46, 0, 47, 0, 48, 0,
2912 49, 0, 0, 0, -16, 1, 2, 3, 4, 0,
2913 5, 6, 7, 8, 9, 10, 11, 12, 13, 0,
2914 0, 0, 15, 16, 17, 18, 19, 20, 21, 0,
2915 0, 23, 0, 0, 0, 0, 0, 0, 24, 0,
2916 25, 26, 0, 27, 0, 28, 0, 29, 0, 30,
2917 31, 32, 0, 0, 33, 34, 0, 35, 36, 0,
2918 0, 0, 0, 0, 0, 37, 38, 0, 0, 0,
2919 0, 0, 39, 0, 0, 0, 0, 0, 0, 0,
2920 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2921 0, 0, 40, 41, 0, 0, 0, 0, 0, 0,
2922 0, 478, 0, 0, 0, 0, 0, 0, 0, 0,
2923 0, 0, 0, 0, 43, 0, 0, 0, 0, 44,
2924 45, 0, 0, 0, 46, 0, 47, 0, 48, 0,
2925 49, 0, 0, 0, -142, 1, 2, 3, 4, 0,
2926 5, 6, 7, 8, 9, 10, 11, 12, 13, 0,
2927 0, 0, 15, 16, 17, 18, 19, 20, 21, 0,
2928 0, 23, 0, 0, 0, 0, 0, 0, 24, 0,
2929 25, 26, 0, 27, 0, 28, 0, 29, 0, 30,
2930 31, 32, 0, 0, 33, 34, 0, 35, 36, 0,
2931 0, 0, 0, 0, 0, 37, 38, 0, 0, 0,
2932 0, 0, 39, 0, 0, 0, 0, 0, 0, 0,
2933 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2934 0, 0, 40, 41, 0, 0, 0, 0, 0, 0,
2935 0, 478, 0, 0, 0, 0, 0, 0, 0, 0,
2936 0, 0, 0, 0, 43, 0, 0, 0, 0, 44,
2937 45, 0, 0, 0, 46, 0, 47, 0, 48, 0,
2938 49, 0, -3, 0, -143, 1, 2, 3, 4, 0,
2939 5, 6, 7, 8, 9, 10, 11, 12, 13, 0,
2940 0, 14, 15, 16, 17, 18, 19, 20, 21, 0,
2941 0, 23, 0, 0, 0, 0, 0, 0, 24, 0,
2942 25, 26, 0, 27, 0, 28, 0, 29, 0, 30,
2943 31, 32, 0, 0, 33, 34, 0, 35, 36, 0,
2944 0, 0, 0, 0, 0, 37, 38, 0, 0, 0,
2945 0, 0, 39, 0, 0, 0, 0, 0, 0, 0,
2946 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2947 0, 0, 40, 41, 0, 0, 0, 0, 0, 0,
2948 0, 42, 0, 0, 0, 0, 0, 0, 0, 0,
2949 0, 0, 0, 0, 43, 0, 0, 0, 0, 44,
2950 45, 0, 0, 0, 46, 0, 47, 0, 48, 0,
2951 49, 1, 2, 3, 4, 0, 5, 6, 7, 8,
2952 9, 10, 11, 12, 13, 0, -118, 0, 15, 16,
2953 17, 18, 19, 20, 21, 22, 0, 23, 126, 0,
2954 127, 0, 0, 0, 24, 128, 25, 26, 0, 27,
2955 129, 28, 0, 29, 130, 30, 31, 32, 0, 0,
2956 33, 34, 0, 35, 36, 0, 0, 0, 0, 0,
2957 0, 37, 38, 0, 131, 0, 0, 0, 39, 0,
2958 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2959 0, 0, 0, 0, 0, 0, 0, 0, 40, 41,
2960 0, 0, 0, 0, 0, 0, 0, 132, 0, 0,
2961 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2962 43, 0, 0, 0, 0, 44, 45, 0, 0, 0,
2963 46, 0, 47, 0, 48, 0, 49, 1, 2, 3,
2964 4, 0, 5, 6, 7, 8, 9, 10, 11, 12,
2965 13, 0, 0, 0, 15, 16, 17, 18, 19, 20,
2966 21, 22, 0, 23, 126, 0, 127, 0, 0, 0,
2967 24, 128, 25, 26, 0, 27, 129, 28, 0, 29,
2968 130, 30, 31, 32, 0, 0, 33, 34, 0, 35,
2969 36, 0, 0, 0, 0, 0, 0, 37, 38, 0,
2970 131, 0, 0, 0, 39, 0, 0, 0, 0, 0,
2971 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2972 0, 0, 0, 0, 40, 41, 0, 0, 0, 0,
2973 0, 0, 0, 132, 0, 148, 0, 3, 4, 0,
2974 5, 6, 7, 8, 9, 0, 43, 0, 0, 0,
2975 0, 44, 45, 0, 0, 0, 46, 20, 47, 22,
2976 48, 23, 49, 0, 127, 0, 0, 0, 24, 0,
2977 0, 0, 0, 0, 0, 28, 0, 29, 149, 0,
2978 0, 0, 0, 0, 0, 34, 0, 35, 36, 0,
2979 0, 0, 0, 0, 0, 37, 0, 0, 0, 0,
2980 0, 0, 39, 0, 0, 98, 0, 3, 4, 0,
2981 5, 6, 7, 8, 9, 0, 0, 0, 0, 0,
2982 0, 0, 40, 41, 0, 0, 0, 20, 0, 22,
2983 0, 23, 0, 0, 0, 0, 0, 0, 24, 0,
2984 0, 0, 0, 0, 43, 28, 0, 29, 0, 44,
2985 45, 0, 0, 0, 46, 34, 47, 35, 36, 0,
2986 49, 0, 0, 0, 0, 37, 0, 0, 0, 0,
2987 0, 0, 39, 0, 0, 0, 0, 0, 0, 0,
2988 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2989 0, 0, 40, 41, 0, 0, 0, 0, 0, 0,
2990 164, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2991 0, 0, 0, 0, 43, 0, 0, 0, 0, 44,
2992 45, 0, 0, 0, 46, 0, 47, 165, 166, 167,
2993 49, 168, 169, 170, 171, 172, 173, 174, 175, 176,
2994 177, 178, 179, 180, 181, 182, 183, 184, 185, 0,
2995 186, 187, 188, 0, 189, 190, 191, 0, 0, 0,
2996 0, 0, 192, 164, 193, 0, 194, 195, 196, 197,
2997 198, 0, 199, 200, 201, 202, 203, 0, 0, 0,
2998 0, 0, 204, 0, 205, 0, 0, 206, 0, 0,
2999 165, 166, 167, 331, 168, 169, 170, 171, 172, 173,
3000 174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
3001 184, 185, 0, 186, 187, 188, 0, 189, 190, 191,
3002 0, 0, 0, 0, 0, 192, 164, 193, 0, 194,
3003 195, 196, 197, 198, 0, 199, 200, 201, 202, 203,
3004 0, 0, 0, 0, 0, 204, 0, 205, 0, 0,
3005 206, 0, 0, 165, 166, 167, 364, 168, 169, 170,
3006 171, 172, 173, 174, 175, 176, 177, 178, 179, 180,
3007 181, 182, 183, 184, 185, 0, 186, 187, 188, 0,
3008 189, 190, 191, 0, 0, 0, 0, 0, 192, 164,
3009 193, 0, 194, 195, 196, 197, 198, 0, 199, 200,
3010 201, 202, 203, 0, 0, 0, 0, 0, 204, 0,
3011 205, 0, 0, 206, 0, 0, 165, 166, 167, 401,
3012 168, 169, 170, 171, 172, 173, 174, 175, 176, 177,
3013 178, 179, 180, 181, 182, 183, 184, 185, 0, 186,
3014 187, 188, 0, 189, 190, 191, 0, 0, 0, 0,
3015 164, 192, 0, 193, 356, 194, 195, 196, 197, 198,
3016 0, 199, 200, 201, 202, 203, 0, 0, 0, 0,
3017 0, 204, 0, 205, 0, 0, 206, 165, 166, 167,
3018 0, 168, 169, 170, 171, 172, 173, 174, 175, 176,
3019 177, 178, 179, 180, 181, 182, 183, 184, 185, 0,
3020 186, 187, 188, 0, 189, 190, 191, 0, 0, 0,
3021 0, 164, 192, 0, 193, 0, 194, 195, 196, 197,
3022 198, 0, 199, 200, 201, 202, 203, 0, 0, 0,
3023 0, 0, 204, 0, 205, 358, 0, 206, 165, 166,
3024 167, 0, 168, 169, 170, 171, 172, 173, 174, 175,
3025 176, 177, 178, 179, 180, 181, 182, 183, 184, 185,
3026 0, 186, 187, 188, 0, 189, 190, 191, 0, 0,
3027 0, 0, 164, 192, 0, 193, 491, 194, 195, 196,
3028 197, 198, 0, 199, 200, 201, 202, 203, 0, 0,
3029 0, 0, 0, 204, 0, 205, 0, 0, 206, 165,
3030 166, 167, 0, 168, 169, 170, 171, 172, 173, 174,
3031 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
3032 185, 0, 186, 187, 188, 0, 189, 190, 191, 0,
3033 0, 0, 0, 164, 192, 0, 193, 0, 194, 195,
3034 196, 197, 198, 0, 199, 200, 201, 202, 203, 0,
3035 0, 0, 0, 0, 204, 0, 205, 0, 0, 206,
3036 165, 166, 167, 0, 168, 169, 170, 171, 172, 173,
3037 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3038 0, 185, 0, 186, 187, 188, 0, 189, 190, 191,
3039 0, 0, 0, 0, 164, 0, 0, 0, 0, 194,
3040 195, 196, 197, 198, 0, 199, 200, 201, 202, 203,
3041 0, 0, 0, 0, 0, 204, 0, 205, 0, 0,
3042 206, 165, 166, 167, 0, 168, 169, 170, 171, 172,
3043 173, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3044 0, 0, 0, 0, 186, 187, 188, 0, 189, 190,
3045 191, 0, 0, 0, 0, 164, 0, 0, 0, 0,
3046 194, 195, 196, 197, 198, 0, 199, 200, 201, 202,
3047 203, 0, 0, 0, 0, 0, 204, 0, 205, 0,
3048 0, 206, 165, 166, 167, 0, 168, 169, 170, 171,
3049 172, 173, 0, 0, 0, 0, 0, 0, 0, 0,
3050 0, 0, 0, 0, 0, 186, 187, 188, 0, 189,
3051 190, 191, 0, 0, 0, 0, 164, 0, 0, 0,
3052 0, 0, 195, 196, 197, 198, 0, 199, 200, 201,
3053 202, 203, 0, 0, 0, 0, 0, 204, 0, 205,
3054 0, 0, 206, 165, 166, 167, 0, 168, 169, 170,
3055 171, 172, 173, 0, 0, 0, 0, 0, 0, 0,
3056 0, 0, 0, 0, 0, 0, 186, 187, 188, 0,
3057 189, 190, 191, 0, 0, 0, 0, 164, 0, 0,
3058 0, 0, 0, 0, 196, 197, 198, 0, 199, 200,
3059 201, 202, 203, 0, 0, 0, 0, 0, 204, 0,
3060 205, 0, 0, 206, 165, 166, 167, 0, 168, 169,
3061 170, 171, 172, 173, 0, 0, 0, 0, 0, 0,
3062 0, 0, 0, 0, 0, 0, 0, 186, 187, 188,
3063 0, 189, 190, 191, 0, 0, 0, 0, 164, 0,
3064 0, 0, 0, 0, 0, -153, 197, 198, 0, 199,
3065 200, 201, 202, 203, 0, 0, 0, 0, 0, 204,
3066 0, 205, 0, 0, 206, 165, 166, 167, 0, -153,
3067 -153, -153, -153, 172, 173, 0, 0, 0, 0, 0,
3068 0, 0, 0, 0, 0, 0, 0, 0, 186, 187,
3069 188, 0, 189, 190, 191, 0, 0, 0, 0, 0,
3070 0, 0, 0, 0, 0, 0, 0, 197, 198, 0,
3071 199, 200, 201, 202, 203, 0, 0, 0, 0, 0,
3072 204, 0, 205, 0, 0, 206
3075 static const yytype_int16 yycheck[] =
3077 0, 0, 0, 0, 0, 90, 58, 39, 249, 48,
3078 97, 328, 20, 108, 3, 215, 24, 3, 390, 324,
3079 126, 127, 3, 3, 224, 100, 318, 3, 3, 37,
3080 19, 39, 40, 41, 50, 43, 44, 45, 19, 47,
3081 46, 3, 68, 468, 19, 362, 92, 472, 473, 134,
3082 14, 4, 52, 52, 52, 52, 52, 19, 133, 0,
3083 0, 378, 0, 27, 99, 100, 491, 20, 21, 22,
3084 375, 24, 389, 26, 36, 367, 102, 3, 124, 5,
3085 505, 127, 8, 9, 10, 38, 12, 512, 100, 3,
3086 34, 100, 124, 46, 47, 48, 49, 103, 106, 100,
3087 108, 89, 122, 122, 122, 19, 122, 127, 100, 204,
3088 351, 52, 52, 93, 52, 420, 124, 93, 62, 45,
3089 320, 133, 128, 129, 133, 18, 28, 35, 3, 55,
3090 56, 33, 133, 374, 115, 3, 122, 126, 455, 511,
3091 457, 133, 128, 51, 19, 100, 99, 147, 147, 147,
3092 147, 147, 3, 115, 5, 163, 164, 165, 166, 167,
3093 168, 169, 170, 171, 172, 173, 174, 175, 176, 177,
3094 178, 179, 180, 181, 182, 183, 184, 185, 133, 132,
3095 122, 189, 190, 191, 192, 193, 194, 195, 196, 197,
3096 198, 199, 200, 201, 202, 203, 204, 205, 230, 102,
3097 232, 122, 105, 209, 212, 122, 147, 147, 247, 147,
3098 126, 18, 3, 213, 213, 213, 0, 458, 100, 126,
3099 27, 3, 230, 229, 232, 32, 321, 122, 122, 90,
3100 91, 92, 3, 474, 105, 127, 132, 4, 100, 46,
3101 125, 100, 3, 328, 250, 251, 3, 3, 333, 126,
3102 18, 68, 4, 20, 21, 22, 341, 24, 3, 26,
3103 347, 122, 349, 124, 99, 68, 127, 3, 20, 21,
3104 22, 38, 24, 3, 26, 516, 3, 362, 102, 46,
3105 47, 48, 49, 3, 99, 14, 38, 127, 127, 122,
3106 133, 105, 100, 378, 302, 47, 48, 49, 132, 3,
3107 54, 90, 91, 92, 389, 392, 54, 3, 133, 89,
3108 310, 310, 310, 321, 3, 3, 122, 126, 318, 318,
3109 318, 132, 100, 112, 113, 114, 115, 116, 133, 105,
3110 132, 17, 99, 122, 122, 124, 388, 102, 127, 126,
3111 100, 3, 132, 126, 102, 126, 132, 379, 356, 436,
3112 100, 126, 384, 3, 133, 5, 6, 363, 8, 9,
3113 10, 11, 12, 126, 65, 132, 105, 367, 367, 367,
3114 455, 379, 457, 122, 18, 25, 384, 27, 133, 29,
3115 133, 132, 3, 27, 90, 91, 92, 31, 32, 3,
3116 27, 132, 126, 126, 132, 45, 133, 132, 3, 122,
3117 44, 132, 46, 53, 132, 55, 56, 126, 114, 115,
3118 116, 132, 52, 310, 397, 133, 122, 132, 124, 58,
3119 70, 127, 147, 444, 127, 340, 69, 444, 497, 483,
3120 398, 426, 426, 441, 465, 488, 418, 437, 27, 371,
3121 90, 91, 392, -1, -1, -1, -1, -1, -1, -1,
3122 -1, -1, -1, -1, -1, -1, -1, -1, -1, 459,
3123 459, 459, 459, 459, -1, 465, -1, -1, -1, -1,
3124 -1, -1, 122, -1, 124, -1, -1, -1, 128, -1,
3125 -1, -1, -1, 483, 483, 483, 483, 483, -1, -1,
3126 -1, -1, -1, -1, -1, -1, -1, 497, 497, 497,
3127 497, 497, 0, -1, -1, 3, 4, 5, 6, -1,
3128 8, 9, 10, 11, 12, 13, 14, 15, 16, -1,
3129 -1, 19, 20, 21, 22, 23, 24, 25, 26, -1,
3130 -1, 29, -1, -1, 40, -1, -1, -1, 36, -1,
3131 38, 39, -1, 41, -1, 43, -1, 45, -1, 47,
3132 48, 49, -1, -1, 52, 53, -1, 55, 56, -1,
3133 -1, 67, 68, 69, -1, 63, 64, -1, -1, 75,
3134 76, -1, 70, -1, -1, -1, -1, -1, -1, -1,
3135 -1, -1, -1, -1, 90, 91, 92, -1, 94, 95,
3136 96, -1, 90, 91, -1, -1, -1, -1, -1, -1,
3137 -1, 99, -1, 109, 110, -1, 112, 113, 114, 115,
3138 116, -1, -1, -1, 112, -1, 122, -1, 124, 117,
3139 118, 127, -1, -1, 122, -1, 124, -1, 126, -1,
3140 128, -1, -1, -1, 132, 3, 4, 5, 6, -1,
3141 8, 9, 10, 11, 12, 13, 14, 15, 16, -1,
3142 -1, -1, 20, 21, 22, 23, 24, 25, 26, 27,
3143 -1, 29, 30, -1, 32, -1, -1, -1, 36, 37,
3144 38, 39, -1, 41, 42, 43, -1, 45, 46, 47,
3145 48, 49, -1, -1, 52, 53, -1, 55, 56, -1,
3146 -1, -1, -1, -1, -1, 63, 64, -1, 66, -1,
3147 -1, -1, 70, -1, -1, -1, -1, -1, -1, -1,
3148 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3149 -1, -1, 90, 91, -1, -1, -1, -1, -1, -1,
3150 -1, 99, -1, -1, -1, -1, -1, -1, -1, -1,
3151 -1, -1, -1, -1, 112, -1, -1, -1, -1, 117,
3152 118, -1, -1, -1, 122, -1, 124, -1, 126, -1,
3153 128, -1, -1, -1, 132, 3, 4, 5, 6, -1,
3154 8, 9, 10, 11, 12, 13, 14, 15, 16, -1,
3155 -1, -1, 20, 21, 22, 23, 24, 25, 26, 27,
3156 -1, 29, 30, -1, 32, -1, -1, -1, 36, 37,
3157 38, 39, -1, 41, 42, 43, -1, 45, 46, 47,
3158 48, 49, -1, -1, 52, 53, -1, 55, 56, -1,
3159 -1, -1, -1, -1, -1, 63, 64, -1, 66, -1,
3160 -1, -1, 70, -1, -1, -1, -1, -1, -1, -1,
3161 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3162 -1, -1, 90, 91, -1, -1, -1, -1, -1, -1,
3163 -1, 99, -1, -1, -1, -1, -1, -1, -1, -1,
3164 -1, -1, -1, -1, 112, -1, -1, -1, -1, 117,
3165 118, -1, -1, -1, 122, -1, 124, -1, 126, -1,
3166 128, -1, -1, -1, 132, 3, 4, 5, 6, -1,
3167 8, 9, 10, 11, 12, 13, 14, 15, 16, -1,
3168 -1, -1, 20, 21, 22, 23, 24, 25, 26, 27,
3169 -1, 29, 30, -1, 32, -1, -1, -1, 36, 37,
3170 38, 39, -1, 41, 42, 43, -1, 45, 46, 47,
3171 48, 49, -1, -1, 52, 53, -1, 55, 56, -1,
3172 -1, -1, -1, -1, -1, 63, 64, -1, 66, -1,
3173 -1, -1, 70, -1, -1, -1, -1, -1, -1, -1,
3174 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3175 -1, -1, 90, 91, -1, -1, -1, -1, -1, -1,
3176 -1, 99, -1, -1, -1, -1, -1, -1, -1, -1,
3177 -1, -1, -1, -1, 112, -1, -1, -1, -1, 117,
3178 118, -1, -1, -1, 122, -1, 124, -1, 126, -1,
3179 128, -1, -1, -1, 132, 3, 4, 5, 6, -1,
3180 8, 9, 10, 11, 12, 13, 14, 15, 16, -1,
3181 -1, 19, 20, 21, 22, 23, 24, 25, 26, -1,
3182 -1, 29, -1, -1, 40, -1, -1, -1, 36, -1,
3183 38, 39, -1, 41, -1, 43, -1, 45, -1, 47,
3184 48, 49, -1, -1, 52, 53, -1, 55, 56, -1,
3185 -1, -1, -1, -1, -1, 63, 64, -1, -1, 75,
3186 76, -1, 70, -1, -1, -1, -1, -1, -1, -1,
3187 -1, -1, -1, -1, 90, 91, 92, -1, 94, 95,
3188 96, -1, 90, 91, -1, -1, -1, -1, -1, -1,
3189 -1, 99, -1, 109, 110, -1, 112, 113, 114, 115,
3190 116, -1, -1, -1, 112, -1, 122, -1, 124, 117,
3191 118, 127, -1, -1, 122, -1, 124, -1, 126, -1,
3192 128, -1, -1, -1, 132, 3, 4, 5, 6, -1,
3193 8, 9, 10, 11, 12, 13, 14, 15, 16, -1,
3194 -1, -1, 20, 21, 22, 23, 24, 25, 26, -1,
3195 -1, 29, -1, -1, -1, -1, -1, -1, 36, -1,
3196 38, 39, -1, 41, -1, 43, -1, 45, -1, 47,
3197 48, 49, -1, -1, 52, 53, -1, 55, 56, -1,
3198 -1, -1, -1, -1, -1, 63, 64, -1, -1, -1,
3199 -1, -1, 70, -1, -1, -1, -1, -1, -1, -1,
3200 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3201 -1, -1, 90, 91, -1, -1, -1, -1, -1, -1,
3202 -1, 99, -1, -1, -1, -1, -1, -1, -1, -1,
3203 -1, -1, -1, -1, 112, -1, -1, -1, -1, 117,
3204 118, -1, -1, -1, 122, -1, 124, -1, 126, -1,
3205 128, -1, -1, -1, 132, 3, 4, 5, 6, -1,
3206 8, 9, 10, 11, 12, 13, 14, 15, 16, -1,
3207 -1, -1, 20, 21, 22, 23, 24, 25, 26, -1,
3208 -1, 29, -1, -1, -1, -1, -1, -1, 36, -1,
3209 38, 39, -1, 41, -1, 43, -1, 45, -1, 47,
3210 48, 49, -1, -1, 52, 53, -1, 55, 56, -1,
3211 -1, -1, -1, -1, -1, 63, 64, -1, -1, -1,
3212 -1, -1, 70, -1, -1, -1, -1, -1, -1, -1,
3213 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3214 -1, -1, 90, 91, -1, -1, -1, -1, -1, -1,
3215 -1, 99, -1, -1, -1, -1, -1, -1, -1, -1,
3216 -1, -1, -1, -1, 112, -1, -1, -1, -1, 117,
3217 118, -1, -1, -1, 122, -1, 124, -1, 126, -1,
3218 128, -1, -1, -1, 132, 3, 4, 5, 6, -1,
3219 8, 9, 10, 11, 12, 13, 14, 15, 16, -1,
3220 -1, -1, 20, 21, 22, 23, 24, 25, 26, -1,
3221 -1, 29, -1, -1, -1, -1, -1, -1, 36, -1,
3222 38, 39, -1, 41, -1, 43, -1, 45, -1, 47,
3223 48, 49, -1, -1, 52, 53, -1, 55, 56, -1,
3224 -1, -1, -1, -1, -1, 63, 64, -1, -1, -1,
3225 -1, -1, 70, -1, -1, -1, -1, -1, -1, -1,
3226 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3227 -1, -1, 90, 91, -1, -1, -1, -1, -1, -1,
3228 -1, 99, -1, -1, -1, -1, -1, -1, -1, -1,
3229 -1, -1, -1, -1, 112, -1, -1, -1, -1, 117,
3230 118, -1, -1, -1, 122, -1, 124, -1, 126, -1,
3231 128, -1, -1, -1, 132, 3, 4, 5, 6, -1,
3232 8, 9, 10, 11, 12, 13, 14, 15, 16, -1,
3233 -1, -1, 20, 21, 22, 23, 24, 25, 26, -1,
3234 -1, 29, -1, -1, -1, -1, -1, -1, 36, -1,
3235 38, 39, -1, 41, -1, 43, -1, 45, -1, 47,
3236 48, 49, -1, -1, 52, 53, -1, 55, 56, -1,
3237 -1, -1, -1, -1, -1, 63, 64, -1, -1, -1,
3238 -1, -1, 70, -1, -1, -1, -1, -1, -1, -1,
3239 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3240 -1, -1, 90, 91, -1, -1, -1, -1, -1, -1,
3241 -1, 99, -1, -1, -1, -1, -1, -1, -1, -1,
3242 -1, -1, -1, -1, 112, -1, -1, -1, -1, 117,
3243 118, -1, -1, -1, 122, -1, 124, -1, 126, -1,
3244 128, -1, 0, -1, 132, 3, 4, 5, 6, -1,
3245 8, 9, 10, 11, 12, 13, 14, 15, 16, -1,
3246 -1, 19, 20, 21, 22, 23, 24, 25, 26, -1,
3247 -1, 29, -1, -1, -1, -1, -1, -1, 36, -1,
3248 38, 39, -1, 41, -1, 43, -1, 45, -1, 47,
3249 48, 49, -1, -1, 52, 53, -1, 55, 56, -1,
3250 -1, -1, -1, -1, -1, 63, 64, -1, -1, -1,
3251 -1, -1, 70, -1, -1, -1, -1, -1, -1, -1,
3252 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3253 -1, -1, 90, 91, -1, -1, -1, -1, -1, -1,
3254 -1, 99, -1, -1, -1, -1, -1, -1, -1, -1,
3255 -1, -1, -1, -1, 112, -1, -1, -1, -1, 117,
3256 118, -1, -1, -1, 122, -1, 124, -1, 126, -1,
3257 128, 3, 4, 5, 6, -1, 8, 9, 10, 11,
3258 12, 13, 14, 15, 16, -1, 18, -1, 20, 21,
3259 22, 23, 24, 25, 26, 27, -1, 29, 30, -1,
3260 32, -1, -1, -1, 36, 37, 38, 39, -1, 41,
3261 42, 43, -1, 45, 46, 47, 48, 49, -1, -1,
3262 52, 53, -1, 55, 56, -1, -1, -1, -1, -1,
3263 -1, 63, 64, -1, 66, -1, -1, -1, 70, -1,
3264 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3265 -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
3266 -1, -1, -1, -1, -1, -1, -1, 99, -1, -1,
3267 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3268 112, -1, -1, -1, -1, 117, 118, -1, -1, -1,
3269 122, -1, 124, -1, 126, -1, 128, 3, 4, 5,
3270 6, -1, 8, 9, 10, 11, 12, 13, 14, 15,
3271 16, -1, -1, -1, 20, 21, 22, 23, 24, 25,
3272 26, 27, -1, 29, 30, -1, 32, -1, -1, -1,
3273 36, 37, 38, 39, -1, 41, 42, 43, -1, 45,
3274 46, 47, 48, 49, -1, -1, 52, 53, -1, 55,
3275 56, -1, -1, -1, -1, -1, -1, 63, 64, -1,
3276 66, -1, -1, -1, 70, -1, -1, -1, -1, -1,
3277 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3278 -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
3279 -1, -1, -1, 99, -1, 3, -1, 5, 6, -1,
3280 8, 9, 10, 11, 12, -1, 112, -1, -1, -1,
3281 -1, 117, 118, -1, -1, -1, 122, 25, 124, 27,
3282 126, 29, 128, -1, 32, -1, -1, -1, 36, -1,
3283 -1, -1, -1, -1, -1, 43, -1, 45, 46, -1,
3284 -1, -1, -1, -1, -1, 53, -1, 55, 56, -1,
3285 -1, -1, -1, -1, -1, 63, -1, -1, -1, -1,
3286 -1, -1, 70, -1, -1, 3, -1, 5, 6, -1,
3287 8, 9, 10, 11, 12, -1, -1, -1, -1, -1,
3288 -1, -1, 90, 91, -1, -1, -1, 25, -1, 27,
3289 -1, 29, -1, -1, -1, -1, -1, -1, 36, -1,
3290 -1, -1, -1, -1, 112, 43, -1, 45, -1, 117,
3291 118, -1, -1, -1, 122, 53, 124, 55, 56, -1,
3292 128, -1, -1, -1, -1, 63, -1, -1, -1, -1,
3293 -1, -1, 70, -1, -1, -1, -1, -1, -1, -1,
3294 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3295 -1, -1, 90, 91, -1, -1, -1, -1, -1, -1,
3296 40, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3297 -1, -1, -1, -1, 112, -1, -1, -1, -1, 117,
3298 118, -1, -1, -1, 122, -1, 124, 67, 68, 69,
3299 128, 71, 72, 73, 74, 75, 76, 77, 78, 79,
3300 80, 81, 82, 83, 84, 85, 86, 87, 88, -1,
3301 90, 91, 92, -1, 94, 95, 96, -1, -1, -1,
3302 -1, -1, 102, 40, 104, -1, 106, 107, 108, 109,
3303 110, -1, 112, 113, 114, 115, 116, -1, -1, -1,
3304 -1, -1, 122, -1, 124, -1, -1, 127, -1, -1,
3305 67, 68, 69, 133, 71, 72, 73, 74, 75, 76,
3306 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
3307 87, 88, -1, 90, 91, 92, -1, 94, 95, 96,
3308 -1, -1, -1, -1, -1, 102, 40, 104, -1, 106,
3309 107, 108, 109, 110, -1, 112, 113, 114, 115, 116,
3310 -1, -1, -1, -1, -1, 122, -1, 124, -1, -1,
3311 127, -1, -1, 67, 68, 69, 133, 71, 72, 73,
3312 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
3313 84, 85, 86, 87, 88, -1, 90, 91, 92, -1,
3314 94, 95, 96, -1, -1, -1, -1, -1, 102, 40,
3315 104, -1, 106, 107, 108, 109, 110, -1, 112, 113,
3316 114, 115, 116, -1, -1, -1, -1, -1, 122, -1,
3317 124, -1, -1, 127, -1, -1, 67, 68, 69, 133,
3318 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
3319 81, 82, 83, 84, 85, 86, 87, 88, -1, 90,
3320 91, 92, -1, 94, 95, 96, -1, -1, -1, -1,
3321 40, 102, -1, 104, 105, 106, 107, 108, 109, 110,
3322 -1, 112, 113, 114, 115, 116, -1, -1, -1, -1,
3323 -1, 122, -1, 124, -1, -1, 127, 67, 68, 69,
3324 -1, 71, 72, 73, 74, 75, 76, 77, 78, 79,
3325 80, 81, 82, 83, 84, 85, 86, 87, 88, -1,
3326 90, 91, 92, -1, 94, 95, 96, -1, -1, -1,
3327 -1, 40, 102, -1, 104, -1, 106, 107, 108, 109,
3328 110, -1, 112, 113, 114, 115, 116, -1, -1, -1,
3329 -1, -1, 122, -1, 124, 125, -1, 127, 67, 68,
3330 69, -1, 71, 72, 73, 74, 75, 76, 77, 78,
3331 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
3332 -1, 90, 91, 92, -1, 94, 95, 96, -1, -1,
3333 -1, -1, 40, 102, -1, 104, 105, 106, 107, 108,
3334 109, 110, -1, 112, 113, 114, 115, 116, -1, -1,
3335 -1, -1, -1, 122, -1, 124, -1, -1, 127, 67,
3336 68, 69, -1, 71, 72, 73, 74, 75, 76, 77,
3337 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
3338 88, -1, 90, 91, 92, -1, 94, 95, 96, -1,
3339 -1, -1, -1, 40, 102, -1, 104, -1, 106, 107,
3340 108, 109, 110, -1, 112, 113, 114, 115, 116, -1,
3341 -1, -1, -1, -1, 122, -1, 124, -1, -1, 127,
3342 67, 68, 69, -1, 71, 72, 73, 74, 75, 76,
3343 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3344 -1, 88, -1, 90, 91, 92, -1, 94, 95, 96,
3345 -1, -1, -1, -1, 40, -1, -1, -1, -1, 106,
3346 107, 108, 109, 110, -1, 112, 113, 114, 115, 116,
3347 -1, -1, -1, -1, -1, 122, -1, 124, -1, -1,
3348 127, 67, 68, 69, -1, 71, 72, 73, 74, 75,
3349 76, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3350 -1, -1, -1, -1, 90, 91, 92, -1, 94, 95,
3351 96, -1, -1, -1, -1, 40, -1, -1, -1, -1,
3352 106, 107, 108, 109, 110, -1, 112, 113, 114, 115,
3353 116, -1, -1, -1, -1, -1, 122, -1, 124, -1,
3354 -1, 127, 67, 68, 69, -1, 71, 72, 73, 74,
3355 75, 76, -1, -1, -1, -1, -1, -1, -1, -1,
3356 -1, -1, -1, -1, -1, 90, 91, 92, -1, 94,
3357 95, 96, -1, -1, -1, -1, 40, -1, -1, -1,
3358 -1, -1, 107, 108, 109, 110, -1, 112, 113, 114,
3359 115, 116, -1, -1, -1, -1, -1, 122, -1, 124,
3360 -1, -1, 127, 67, 68, 69, -1, 71, 72, 73,
3361 74, 75, 76, -1, -1, -1, -1, -1, -1, -1,
3362 -1, -1, -1, -1, -1, -1, 90, 91, 92, -1,
3363 94, 95, 96, -1, -1, -1, -1, 40, -1, -1,
3364 -1, -1, -1, -1, 108, 109, 110, -1, 112, 113,
3365 114, 115, 116, -1, -1, -1, -1, -1, 122, -1,
3366 124, -1, -1, 127, 67, 68, 69, -1, 71, 72,
3367 73, 74, 75, 76, -1, -1, -1, -1, -1, -1,
3368 -1, -1, -1, -1, -1, -1, -1, 90, 91, 92,
3369 -1, 94, 95, 96, -1, -1, -1, -1, 40, -1,
3370 -1, -1, -1, -1, -1, 108, 109, 110, -1, 112,
3371 113, 114, 115, 116, -1, -1, -1, -1, -1, 122,
3372 -1, 124, -1, -1, 127, 67, 68, 69, -1, 71,
3373 72, 73, 74, 75, 76, -1, -1, -1, -1, -1,
3374 -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
3375 92, -1, 94, 95, 96, -1, -1, -1, -1, -1,
3376 -1, -1, -1, -1, -1, -1, -1, 109, 110, -1,
3377 112, 113, 114, 115, 116, -1, -1, -1, -1, -1,
3378 122, -1, 124, -1, -1, 127
3381 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
3382 symbol of state STATE-NUM. */
3383 static const yytype_uint8 yystos[] =
3385 0, 3, 4, 5, 6, 8, 9, 10, 11, 12,
3386 13, 14, 15, 16, 19, 20, 21, 22, 23, 24,
3387 25, 26, 27, 29, 36, 38, 39, 41, 43, 45,
3388 47, 48, 49, 52, 53, 55, 56, 63, 64, 70,
3389 90, 91, 99, 112, 117, 118, 122, 124, 126, 128,
3390 135, 136, 137, 138, 144, 147, 148, 154, 158, 159,
3391 160, 161, 163, 171, 179, 182, 185, 188, 189, 190,
3392 191, 195, 197, 206, 216, 219, 232, 233, 234, 237,
3393 238, 239, 240, 243, 245, 246, 89, 50, 122, 122,
3394 164, 122, 3, 19, 126, 183, 184, 18, 3, 239,
3395 3, 218, 239, 122, 184, 222, 122, 126, 122, 127,
3396 239, 122, 236, 239, 241, 242, 239, 239, 239, 239,
3397 239, 237, 228, 229, 230, 236, 30, 32, 37, 42,
3398 46, 66, 99, 132, 143, 144, 145, 148, 150, 165,
3399 166, 181, 189, 235, 3, 0, 138, 126, 3, 46,
3400 150, 156, 157, 238, 18, 27, 31, 32, 44, 46,
3401 205, 244, 191, 100, 40, 67, 68, 69, 71, 72,
3402 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
3403 83, 84, 85, 86, 87, 88, 90, 91, 92, 94,
3404 95, 96, 102, 104, 106, 107, 108, 109, 110, 112,
3405 113, 114, 115, 116, 122, 124, 127, 3, 122, 162,
3406 145, 146, 172, 187, 126, 127, 3, 184, 221, 222,
3407 223, 231, 122, 237, 127, 239, 180, 228, 3, 155,
3408 105, 132, 100, 133, 125, 100, 236, 3, 3, 151,
3409 152, 237, 237, 151, 3, 132, 145, 126, 136, 3,
3410 99, 68, 3, 35, 51, 215, 3, 3, 207, 102,
3411 239, 239, 239, 239, 239, 239, 239, 239, 239, 239,
3412 239, 239, 239, 239, 239, 239, 239, 239, 239, 239,
3413 239, 239, 239, 3, 239, 239, 239, 239, 239, 239,
3414 239, 239, 239, 239, 239, 239, 239, 239, 239, 228,
3415 239, 3, 122, 128, 237, 99, 14, 239, 99, 139,
3416 140, 141, 147, 148, 195, 197, 206, 216, 186, 183,
3417 127, 122, 227, 3, 93, 212, 213, 214, 133, 3,
3418 115, 133, 142, 143, 133, 237, 236, 236, 105, 226,
3419 100, 143, 132, 226, 237, 237, 3, 54, 192, 54,
3420 193, 3, 208, 209, 3, 5, 105, 133, 125, 89,
3421 239, 3, 133, 122, 133, 132, 141, 126, 139, 228,
3422 102, 105, 210, 214, 133, 100, 146, 132, 133, 105,
3423 36, 115, 223, 225, 102, 149, 152, 132, 99, 133,
3424 122, 223, 17, 194, 223, 224, 126, 226, 100, 239,
3425 3, 133, 146, 237, 126, 139, 132, 133, 3, 5,
3426 8, 9, 10, 12, 45, 55, 56, 211, 225, 226,
3427 93, 214, 28, 33, 173, 175, 177, 178, 146, 236,
3428 236, 238, 146, 212, 224, 126, 100, 198, 149, 209,
3429 133, 34, 62, 167, 168, 169, 170, 132, 210, 126,
3430 214, 126, 122, 173, 175, 65, 153, 133, 133, 196,
3431 223, 46, 99, 189, 202, 203, 204, 239, 105, 132,
3432 169, 170, 220, 176, 3, 146, 146, 226, 99, 144,
3433 148, 189, 199, 200, 201, 206, 216, 3, 27, 132,
3434 204, 105, 142, 142, 142, 226, 126, 126, 132, 201,
3435 215, 142, 132, 132, 133, 217, 199, 3, 174, 142,
3436 132, 122, 126, 132, 212, 142, 133, 132, 226
3439 #define yyerrok (yyerrstatus = 0)
3440 #define yyclearin (yychar = YYEMPTY)
3441 #define YYEMPTY (-2)
3444 #define YYACCEPT goto yyacceptlab
3445 #define YYABORT goto yyabortlab
3446 #define YYERROR goto yyerrorlab
3449 /* Like YYERROR except do call yyerror. This remains here temporarily
3450 to ease the transition to the new meaning of YYERROR, for GCC.
3451 Once GCC version 2 has supplanted version 1, this can go. */
3453 #define YYFAIL goto yyerrlab
3455 #define YYRECOVERING() (!!yyerrstatus)
3457 #define YYBACKUP(Token, Value) \
3459 if (yychar == YYEMPTY && yylen == 1) \
3463 yytoken = YYTRANSLATE (yychar); \
3469 yyerror (YY_("syntax error: cannot back up")); \
3476 #define YYERRCODE 256
3479 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
3480 If N is 0, then set CURRENT to the empty location which ends
3481 the previous symbol: RHS[0] (always defined). */
3483 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
3484 #ifndef YYLLOC_DEFAULT
3485 # define YYLLOC_DEFAULT(Current, Rhs, N) \
3489 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
3490 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
3491 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
3492 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
3496 (Current).first_line = (Current).last_line = \
3497 YYRHSLOC (Rhs, 0).last_line; \
3498 (Current).first_column = (Current).last_column = \
3499 YYRHSLOC (Rhs, 0).last_column; \
3505 /* YY_LOCATION_PRINT -- Print the location on the stream.
3506 This macro was not mandated originally: define only if we know
3507 we won't break user code: when these are the locations we know. */
3509 #ifndef YY_LOCATION_PRINT
3510 # if YYLTYPE_IS_TRIVIAL
3511 # define YY_LOCATION_PRINT(File, Loc) \
3512 fprintf (File, "%d.%d-%d.%d", \
3513 (Loc).first_line, (Loc).first_column, \
3514 (Loc).last_line, (Loc).last_column)
3516 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
3521 /* YYLEX -- calling `yylex' with the right arguments. */
3524 # define YYLEX yylex (YYLEX_PARAM)
3526 # define YYLEX yylex ()
3529 /* Enable debugging if requested. */
3533 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
3534 # define YYFPRINTF fprintf
3537 # define YYDPRINTF(Args) \
3543 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
3547 YYFPRINTF (stderr, "%s ", Title); \
3548 yy_symbol_print (stderr, \
3550 YYFPRINTF (stderr, "\n"); \
3555 /*--------------------------------.
3556 | Print this symbol on YYOUTPUT. |
3557 `--------------------------------*/
3560 #if (defined __STDC__ || defined __C99__FUNC__ \
3561 || defined __cplusplus || defined _MSC_VER)
3563 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
3566 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
3569 YYSTYPE const * const yyvaluep;
3575 if (yytype < YYNTOKENS)
3576 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
3588 /*--------------------------------.
3589 | Print this symbol on YYOUTPUT. |
3590 `--------------------------------*/
3592 #if (defined __STDC__ || defined __C99__FUNC__ \
3593 || defined __cplusplus || defined _MSC_VER)
3595 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
3598 yy_symbol_print (yyoutput, yytype, yyvaluep)
3601 YYSTYPE const * const yyvaluep;
3604 if (yytype < YYNTOKENS)
3605 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
3607 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
3609 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
3610 YYFPRINTF (yyoutput, ")");
3613 /*------------------------------------------------------------------.
3614 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
3616 `------------------------------------------------------------------*/
3618 #if (defined __STDC__ || defined __C99__FUNC__ \
3619 || defined __cplusplus || defined _MSC_VER)
3621 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
3624 yy_stack_print (yybottom, yytop)
3625 yytype_int16 *yybottom;
3626 yytype_int16 *yytop;
3629 YYFPRINTF (stderr, "Stack now");
3630 for (; yybottom <= yytop; yybottom++)
3632 int yybot = *yybottom;
3633 YYFPRINTF (stderr, " %d", yybot);
3635 YYFPRINTF (stderr, "\n");
3638 # define YY_STACK_PRINT(Bottom, Top) \
3641 yy_stack_print ((Bottom), (Top)); \
3645 /*------------------------------------------------.
3646 | Report that the YYRULE is going to be reduced. |
3647 `------------------------------------------------*/
3649 #if (defined __STDC__ || defined __C99__FUNC__ \
3650 || defined __cplusplus || defined _MSC_VER)
3652 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
3655 yy_reduce_print (yyvsp, yyrule)
3660 int yynrhs = yyr2[yyrule];
3662 unsigned long int yylno = yyrline[yyrule];
3663 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
3665 /* The symbols being reduced. */
3666 for (yyi = 0; yyi < yynrhs; yyi++)
3668 YYFPRINTF (stderr, " $%d = ", yyi + 1);
3669 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
3670 &(yyvsp[(yyi + 1) - (yynrhs)])
3672 YYFPRINTF (stderr, "\n");
3676 # define YY_REDUCE_PRINT(Rule) \
3679 yy_reduce_print (yyvsp, Rule); \
3682 /* Nonzero means print parse trace. It is left uninitialized so that
3683 multiple parsers can coexist. */
3685 #else /* !YYDEBUG */
3686 # define YYDPRINTF(Args)
3687 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
3688 # define YY_STACK_PRINT(Bottom, Top)
3689 # define YY_REDUCE_PRINT(Rule)
3690 #endif /* !YYDEBUG */
3693 /* YYINITDEPTH -- initial size of the parser's stacks. */
3695 # define YYINITDEPTH 200
3698 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
3699 if the built-in stack extension method is used).
3701 Do not make this value too large; the results are undefined if
3702 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
3703 evaluated with infinite-precision integer arithmetic. */
3706 # define YYMAXDEPTH 10000
3714 # if defined __GLIBC__ && defined _STRING_H
3715 # define yystrlen strlen
3717 /* Return the length of YYSTR. */
3718 #if (defined __STDC__ || defined __C99__FUNC__ \
3719 || defined __cplusplus || defined _MSC_VER)
3721 yystrlen (const char *yystr)
3729 for (yylen = 0; yystr[yylen]; yylen++)
3737 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
3738 # define yystpcpy stpcpy
3740 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
3742 #if (defined __STDC__ || defined __C99__FUNC__ \
3743 || defined __cplusplus || defined _MSC_VER)
3745 yystpcpy (char *yydest, const char *yysrc)
3748 yystpcpy (yydest, yysrc)
3754 const char *yys = yysrc;
3756 while ((*yyd++ = *yys++) != '\0')
3765 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
3766 quotes and backslashes, so that it's suitable for yyerror. The
3767 heuristic is that double-quoting is unnecessary unless the string
3768 contains an apostrophe, a comma, or backslash (other than
3769 backslash-backslash). YYSTR is taken from yytname. If YYRES is
3770 null, do not copy; instead, return the length of what the result
3773 yytnamerr (char *yyres, const char *yystr)
3778 char const *yyp = yystr;
3785 goto do_not_strip_quotes;
3789 goto do_not_strip_quotes;
3802 do_not_strip_quotes: ;
3806 return yystrlen (yystr);
3808 return yystpcpy (yyres, yystr) - yyres;
3812 /* Copy into YYRESULT an error message about the unexpected token
3813 YYCHAR while in state YYSTATE. Return the number of bytes copied,
3814 including the terminating null byte. If YYRESULT is null, do not
3815 copy anything; just return the number of bytes that would be
3816 copied. As a special case, return 0 if an ordinary "syntax error"
3817 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
3818 size calculation. */
3820 yysyntax_error (char *yyresult, int yystate, int yychar)
3822 int yyn = yypact[yystate];
3824 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
3828 int yytype = YYTRANSLATE (yychar);
3829 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
3830 YYSIZE_T yysize = yysize0;
3832 int yysize_overflow = 0;
3833 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
3834 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
3838 /* This is so xgettext sees the translatable formats that are
3839 constructed on the fly. */
3840 YY_("syntax error, unexpected %s");
3841 YY_("syntax error, unexpected %s, expecting %s");
3842 YY_("syntax error, unexpected %s, expecting %s or %s");
3843 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
3844 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
3848 static char const yyunexpected[] = "syntax error, unexpected %s";
3849 static char const yyexpecting[] = ", expecting %s";
3850 static char const yyor[] = " or %s";
3851 char yyformat[sizeof yyunexpected
3852 + sizeof yyexpecting - 1
3853 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
3854 * (sizeof yyor - 1))];
3855 char const *yyprefix = yyexpecting;
3857 /* Start YYX at -YYN if negative to avoid negative indexes in
3859 int yyxbegin = yyn < 0 ? -yyn : 0;
3861 /* Stay within bounds of both yycheck and yytname. */
3862 int yychecklim = YYLAST - yyn + 1;
3863 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
3866 yyarg[0] = yytname[yytype];
3867 yyfmt = yystpcpy (yyformat, yyunexpected);
3869 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
3870 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
3872 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
3876 yyformat[sizeof yyunexpected - 1] = '\0';
3879 yyarg[yycount++] = yytname[yyx];
3880 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
3881 yysize_overflow |= (yysize1 < yysize);
3883 yyfmt = yystpcpy (yyfmt, yyprefix);
3887 yyf = YY_(yyformat);
3888 yysize1 = yysize + yystrlen (yyf);
3889 yysize_overflow |= (yysize1 < yysize);
3892 if (yysize_overflow)
3893 return YYSIZE_MAXIMUM;
3897 /* Avoid sprintf, as that infringes on the user's name space.
3898 Don't have undefined behavior even if the translation
3899 produced a string with the wrong number of "%s"s. */
3900 char *yyp = yyresult;
3902 while ((*yyp = *yyf) != '\0')
3904 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
3906 yyp += yytnamerr (yyp, yyarg[yyi++]);
3919 #endif /* YYERROR_VERBOSE */
3922 /*-----------------------------------------------.
3923 | Release the memory associated to this symbol. |
3924 `-----------------------------------------------*/
3927 #if (defined __STDC__ || defined __C99__FUNC__ \
3928 || defined __cplusplus || defined _MSC_VER)
3930 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
3933 yydestruct (yymsg, yytype, yyvaluep)
3943 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
3953 /* Prevent warnings from -Wmissing-prototypes. */
3954 #ifdef YYPARSE_PARAM
3955 #if defined __STDC__ || defined __cplusplus
3956 int yyparse (void *YYPARSE_PARAM);
3960 #else /* ! YYPARSE_PARAM */
3961 #if defined __STDC__ || defined __cplusplus
3966 #endif /* ! YYPARSE_PARAM */
3969 /* The lookahead symbol. */
3972 /* The semantic value of the lookahead symbol. */
3975 /* Number of syntax errors so far. */
3980 /*-------------------------.
3981 | yyparse or yypush_parse. |
3982 `-------------------------*/
3984 #ifdef YYPARSE_PARAM
3985 #if (defined __STDC__ || defined __C99__FUNC__ \
3986 || defined __cplusplus || defined _MSC_VER)
3988 yyparse (void *YYPARSE_PARAM)
3991 yyparse (YYPARSE_PARAM)
3992 void *YYPARSE_PARAM;
3994 #else /* ! YYPARSE_PARAM */
3995 #if (defined __STDC__ || defined __C99__FUNC__ \
3996 || defined __cplusplus || defined _MSC_VER)
4009 /* Number of tokens to shift before error messages enabled. */
4012 /* The stacks and their tools:
4013 `yyss': related to states.
4014 `yyvs': related to semantic values.
4016 Refer to the stacks thru separate pointers, to allow yyoverflow
4017 to reallocate them elsewhere. */
4019 /* The state stack. */
4020 yytype_int16 yyssa[YYINITDEPTH];
4022 yytype_int16 *yyssp;
4024 /* The semantic value stack. */
4025 YYSTYPE yyvsa[YYINITDEPTH];
4029 YYSIZE_T yystacksize;
4033 /* Lookahead token as an internal (translated) token number. */
4035 /* The variables used to return semantic value and location from the
4040 /* Buffer for error messages, and its allocated size. */
4042 char *yymsg = yymsgbuf;
4043 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
4046 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
4048 /* The number of symbols on the RHS of the reduced rule.
4049 Keep to zero when no symbol should be popped. */
4055 yystacksize = YYINITDEPTH;
4057 YYDPRINTF ((stderr, "Starting parse\n"));
4062 yychar = YYEMPTY; /* Cause a token to be read. */
4064 /* Initialize stack pointers.
4065 Waste one element of value and location stack
4066 so that they stay on the same level as the state stack.
4067 The wasted elements are never initialized. */
4073 /*------------------------------------------------------------.
4074 | yynewstate -- Push a new state, which is found in yystate. |
4075 `------------------------------------------------------------*/
4077 /* In all cases, when you get here, the value and location stacks
4078 have just been pushed. So pushing a state here evens the stacks. */
4084 if (yyss + yystacksize - 1 <= yyssp)
4086 /* Get the current used size of the three stacks, in elements. */
4087 YYSIZE_T yysize = yyssp - yyss + 1;
4091 /* Give user a chance to reallocate the stack. Use copies of
4092 these so that the &'s don't force the real ones into
4094 YYSTYPE *yyvs1 = yyvs;
4095 yytype_int16 *yyss1 = yyss;
4097 /* Each stack pointer address is followed by the size of the
4098 data in use in that stack, in bytes. This used to be a
4099 conditional around just the two extra args, but that might
4100 be undefined if yyoverflow is a macro. */
4101 yyoverflow (YY_("memory exhausted"),
4102 &yyss1, yysize * sizeof (*yyssp),
4103 &yyvs1, yysize * sizeof (*yyvsp),
4109 #else /* no yyoverflow */
4110 # ifndef YYSTACK_RELOCATE
4111 goto yyexhaustedlab;
4113 /* Extend the stack our own way. */
4114 if (YYMAXDEPTH <= yystacksize)
4115 goto yyexhaustedlab;
4117 if (YYMAXDEPTH < yystacksize)
4118 yystacksize = YYMAXDEPTH;
4121 yytype_int16 *yyss1 = yyss;
4122 union yyalloc *yyptr =
4123 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
4125 goto yyexhaustedlab;
4126 YYSTACK_RELOCATE (yyss_alloc, yyss);
4127 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
4128 # undef YYSTACK_RELOCATE
4130 YYSTACK_FREE (yyss1);
4133 #endif /* no yyoverflow */
4135 yyssp = yyss + yysize - 1;
4136 yyvsp = yyvs + yysize - 1;
4138 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
4139 (unsigned long int) yystacksize));
4141 if (yyss + yystacksize - 1 <= yyssp)
4145 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
4147 if (yystate == YYFINAL)
4157 /* Do appropriate processing given the current state. Read a
4158 lookahead token if we need one and don't already have one. */
4160 /* First try to decide what to do without reference to lookahead token. */
4161 yyn = yypact[yystate];
4162 if (yyn == YYPACT_NINF)
4165 /* Not known => get a lookahead token if don't already have one. */
4167 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
4168 if (yychar == YYEMPTY)
4170 YYDPRINTF ((stderr, "Reading a token: "));
4174 if (yychar <= YYEOF)
4176 yychar = yytoken = YYEOF;
4177 YYDPRINTF ((stderr, "Now at end of input.\n"));
4181 yytoken = YYTRANSLATE (yychar);
4182 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
4185 /* If the proper action on seeing token YYTOKEN is to reduce or to
4186 detect an error, take that action. */
4188 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
4193 if (yyn == 0 || yyn == YYTABLE_NINF)
4199 /* Count tokens shifted since error; after three, turn off error
4204 /* Shift the lookahead token. */
4205 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
4207 /* Discard the shifted token. */
4216 /*-----------------------------------------------------------.
4217 | yydefault -- do the default action for the current state. |
4218 `-----------------------------------------------------------*/
4220 yyn = yydefact[yystate];
4226 /*-----------------------------.
4227 | yyreduce -- Do a reduction. |
4228 `-----------------------------*/
4230 /* yyn is the number of a rule to reduce with. */
4233 /* If YYLEN is nonzero, implement the default value of the action:
4236 Otherwise, the following line sets YYVAL to garbage.
4237 This behavior is undocumented and Bison
4238 users should not rely upon it. Assigning to YYVAL
4239 unconditionally makes the parser a bit smaller, and it avoids a
4240 GCC warning that YYVAL may be used uninitialized. */
4241 yyval = yyvsp[1-yylen];
4244 YY_REDUCE_PRINT (yyn);
4251 /* Line 1464 of skeleton.m4 */
4252 #line 2020 "parser.y"
4253 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4262 /* Line 1464 of skeleton.m4 */
4263 #line 2021 "parser.y"
4264 {(yyval.code)=code_new();}
4273 /* Line 1464 of skeleton.m4 */
4274 #line 2023 "parser.y"
4275 {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
4284 /* Line 1464 of skeleton.m4 */
4285 #line 2024 "parser.y"
4286 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4295 /* Line 1464 of skeleton.m4 */
4296 #line 2039 "parser.y"
4297 {(yyval.code)=(yyvsp[(2) - (3)].code);}
4306 /* Line 1464 of skeleton.m4 */
4307 #line 2040 "parser.y"
4317 /* Line 1464 of skeleton.m4 */
4318 #line 2043 "parser.y"
4328 /* Line 1464 of skeleton.m4 */
4329 #line 2050 "parser.y"
4330 {(yyval.code)=(yyvsp[(3) - (4)].code);}
4339 /* Line 1464 of skeleton.m4 */
4340 #line 2054 "parser.y"
4341 {(yyval.code)=(yyvsp[(1) - (2)].code);}
4350 /* Line 1464 of skeleton.m4 */
4351 #line 2055 "parser.y"
4352 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4361 /* Line 1464 of skeleton.m4 */
4362 #line 2059 "parser.y"
4364 code_t**cc = &global->init->method->body->code;
4365 *cc = code_append(*cc, (yyvsp[(1) - (1)].code));
4375 /* Line 1464 of skeleton.m4 */
4376 #line 2070 "parser.y"
4377 {(yyval.value)=(yyvsp[(2) - (2)].value);}
4386 /* Line 1464 of skeleton.m4 */
4387 #line 2071 "parser.y"
4388 {(yyval.value).c=abc_pushundefined(0);
4389 (yyval.value).t=TYPE_ANY;
4399 /* Line 1464 of skeleton.m4 */
4400 #line 2075 "parser.y"
4401 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4410 /* Line 1464 of skeleton.m4 */
4411 #line 2076 "parser.y"
4412 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4421 /* Line 1464 of skeleton.m4 */
4422 #line 2078 "parser.y"
4423 {(yyval.code) = (yyvsp[(1) - (1)].code);}
4432 /* Line 1464 of skeleton.m4 */
4433 #line 2079 "parser.y"
4434 {(yyval.code) = code_append((yyvsp[(1) - (3)].code), (yyvsp[(3) - (3)].code));}
4443 /* Line 1464 of skeleton.m4 */
4444 #line 2082 "parser.y"
4447 if(variable_exists((yyvsp[(1) - (3)].id)))
4448 syntaxerror("Variable %s already defined", (yyvsp[(1) - (3)].id));
4450 new_variable((yyvsp[(1) - (3)].id), 0, 1, 0);
4453 if(!is_subtype_of((yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo))) {
4454 syntaxerror("Can't convert %s to %s", (yyvsp[(3) - (3)].value).t->name,
4455 (yyvsp[(2) - (3)].classinfo)->name);
4460 if(state->method->uses_slots) {
4461 variable_t* v = find_slot(state, (yyvsp[(1) - (3)].id));
4463 // this variable is stored in a slot
4465 v->type = (yyvsp[(2) - (3)].classinfo);
4471 index = new_variable((yyvsp[(1) - (3)].id), (yyvsp[(2) - (3)].classinfo), 1, 0);
4474 (yyval.code) = slot?abc_getscopeobject(0, 1):0;
4476 if((yyvsp[(2) - (3)].classinfo)) {
4477 if((yyvsp[(3) - (3)].value).c->prev || (yyvsp[(3) - (3)].value).c->opcode != OPCODE_PUSHUNDEFINED) {
4478 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (3)].value).c);
4479 (yyval.code) = converttype((yyval.code), (yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo));
4481 code_free((yyvsp[(3) - (3)].value).c);
4482 (yyval.code) = defaultvalue((yyval.code), (yyvsp[(2) - (3)].classinfo));
4485 if((yyvsp[(3) - (3)].value).c->prev || (yyvsp[(3) - (3)].value).c->opcode != OPCODE_PUSHUNDEFINED) {
4486 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (3)].value).c);
4487 (yyval.code) = abc_coerce_a((yyval.code));
4489 // don't do anything
4490 code_free((yyvsp[(3) - (3)].value).c);
4491 code_free((yyval.code));
4497 (yyval.code) = abc_setslot((yyval.code), index);
4499 (yyval.code) = abc_setlocal((yyval.code), index);
4510 /* Line 1464 of skeleton.m4 */
4511 #line 2142 "parser.y"
4512 {(yyval.code) = code_new();}
4521 /* Line 1464 of skeleton.m4 */
4522 #line 2143 "parser.y"
4523 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4532 /* Line 1464 of skeleton.m4 */
4533 #line 2146 "parser.y"
4534 {PASS12 new_state();}
4543 /* Line 1464 of skeleton.m4 */
4544 #line 2146 "parser.y"
4547 (yyval.code) = code_new();
4548 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (7)].value).c);
4549 code_t*myjmp,*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4551 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].code));
4552 if((yyvsp[(7) - (7)].code)) {
4553 myjmp = (yyval.code) = abc_jump((yyval.code), 0);
4555 myif->branch = (yyval.code) = abc_nop((yyval.code));
4556 if((yyvsp[(7) - (7)].code)) {
4557 (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (7)].code));
4558 myjmp->branch = (yyval.code) = abc_nop((yyval.code));
4560 (yyval.code) = var_block((yyval.code));
4571 /* Line 1464 of skeleton.m4 */
4572 #line 2165 "parser.y"
4573 {(yyval.code)=code_new();}
4582 /* Line 1464 of skeleton.m4 */
4583 #line 2172 "parser.y"
4585 PASS1 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable((yyvsp[(2) - (3)].id),0,1,0);
4586 PASS2 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable((yyvsp[(2) - (3)].id),(yyvsp[(3) - (3)].classinfo),1,0);
4596 /* Line 1464 of skeleton.m4 */
4597 #line 2176 "parser.y"
4600 (yyval.id)=(yyvsp[(1) - (1)].id);
4610 /* Line 1464 of skeleton.m4 */
4611 #line 2181 "parser.y"
4612 {PASS12 new_state();(yyval.for_start).name=(yyvsp[(1) - (2)].id);(yyval.for_start).each=0;}
4621 /* Line 1464 of skeleton.m4 */
4622 #line 2182 "parser.y"
4623 {PASS12 new_state();(yyval.for_start).name=(yyvsp[(1) - (3)].id);(yyval.for_start).each=1;}
4632 /* Line 1464 of skeleton.m4 */
4633 #line 2184 "parser.y"
4635 if((yyvsp[(1) - (8)].for_start).each) syntaxerror("invalid syntax: ; not allowed in for each statement");
4636 (yyval.code) = code_new();
4637 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (8)].code));
4638 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4639 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (8)].value).c);
4640 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4641 (yyval.code) = code_append((yyval.code), (yyvsp[(8) - (8)].code));
4642 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4643 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (8)].code));
4644 (yyval.code) = abc_jump((yyval.code), loopstart);
4645 code_t*out = (yyval.code) = abc_nop((yyval.code));
4646 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, out);
4647 continuejumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, cont);
4650 (yyval.code) = var_block((yyval.code));
4661 /* Line 1464 of skeleton.m4 */
4662 #line 2204 "parser.y"
4664 variable_t*var = find_variable(state, (yyvsp[(2) - (6)].id));
4666 syntaxerror("variable %s not known in this scope", (yyvsp[(2) - (6)].id));
4669 char*tmp1name = concat2((yyvsp[(2) - (6)].id), "__tmp1__");
4670 int it = new_variable(tmp1name, TYPE_INT, 0, 0);
4671 char*tmp2name = concat2((yyvsp[(2) - (6)].id), "__array__");
4672 int array = new_variable(tmp1name, 0, 0, 0);
4674 (yyval.code) = code_new();
4675 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
4676 (yyval.code) = abc_coerce_a((yyval.code));
4677 (yyval.code) = abc_setlocal((yyval.code), array);
4678 (yyval.code) = abc_pushbyte((yyval.code), 0);
4679 (yyval.code) = abc_setlocal((yyval.code), it);
4681 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4683 (yyval.code) = abc_hasnext2((yyval.code), array, it);
4684 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4685 (yyval.code) = abc_getlocal((yyval.code), array);
4686 (yyval.code) = abc_getlocal((yyval.code), it);
4687 if(!(yyvsp[(1) - (6)].for_start).each)
4688 (yyval.code) = abc_nextname((yyval.code));
4690 (yyval.code) = abc_nextvalue((yyval.code));
4691 (yyval.code) = converttype((yyval.code), 0, var->type);
4692 (yyval.code) = abc_setlocal((yyval.code), var->index);
4694 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
4695 (yyval.code) = abc_jump((yyval.code), loopstart);
4697 code_t*out = (yyval.code) = abc_nop((yyval.code));
4698 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, out);
4699 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, loopstart);
4703 (yyval.code) = var_block((yyval.code));
4718 /* Line 1464 of skeleton.m4 */
4719 #line 2252 "parser.y"
4720 {PASS12 new_state();}
4729 /* Line 1464 of skeleton.m4 */
4730 #line 2252 "parser.y"
4733 (yyval.code) = code_new();
4735 code_t*myjmp = (yyval.code) = abc_jump((yyval.code), 0);
4736 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4737 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
4738 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4739 myjmp->branch = cont;
4740 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
4741 (yyval.code) = abc_iftrue((yyval.code), loopstart);
4742 code_t*out = (yyval.code) = abc_nop((yyval.code));
4743 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].id), out);
4744 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].id), cont);
4746 (yyval.code) = var_block((yyval.code));
4757 /* Line 1464 of skeleton.m4 */
4758 #line 2271 "parser.y"
4759 {PASS12 new_state();}
4768 /* Line 1464 of skeleton.m4 */
4769 #line 2271 "parser.y"
4771 (yyval.code) = code_new();
4772 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4773 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (7)].code));
4774 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4775 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].value).c);
4776 (yyval.code) = abc_iftrue((yyval.code), loopstart);
4777 code_t*out = (yyval.code) = abc_nop((yyval.code));
4778 breakjumpsto((yyval.code), (yyvsp[(1) - (7)].id), out);
4779 continuejumpsto((yyval.code), (yyvsp[(1) - (7)].id), cont);
4781 (yyval.code) = var_block((yyval.code));
4792 /* Line 1464 of skeleton.m4 */
4793 #line 2286 "parser.y"
4795 (yyval.code) = abc___break__(0, "");
4805 /* Line 1464 of skeleton.m4 */
4806 #line 2289 "parser.y"
4808 (yyval.code) = abc___break__(0, (yyvsp[(2) - (2)].id));
4818 /* Line 1464 of skeleton.m4 */
4819 #line 2292 "parser.y"
4821 (yyval.code) = abc___continue__(0, "");
4831 /* Line 1464 of skeleton.m4 */
4832 #line 2295 "parser.y"
4834 (yyval.code) = abc___continue__(0, (yyvsp[(2) - (2)].id));
4844 /* Line 1464 of skeleton.m4 */
4845 #line 2299 "parser.y"
4855 /* Line 1464 of skeleton.m4 */
4856 #line 2300 "parser.y"
4857 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4866 /* Line 1464 of skeleton.m4 */
4867 #line 2301 "parser.y"
4868 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4877 /* Line 1464 of skeleton.m4 */
4878 #line 2302 "parser.y"
4879 {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
4888 /* Line 1464 of skeleton.m4 */
4889 #line 2303 "parser.y"
4890 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4899 /* Line 1464 of skeleton.m4 */
4900 #line 2304 "parser.y"
4901 {(yyval.code)=code_append((yyval.code),(yyvsp[(2) - (2)].code));}
4910 /* Line 1464 of skeleton.m4 */
4911 #line 2306 "parser.y"
4913 (yyval.code) = abc_dup(0);
4914 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (4)].value).c);
4915 code_t*j = (yyval.code) = abc_ifne((yyval.code), 0);
4916 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (4)].code));
4917 if((yyval.code)->opcode != OPCODE___BREAK__) {
4918 (yyval.code) = abc___fallthrough__((yyval.code), "");
4920 code_t*e = (yyval.code) = abc_nop((yyval.code));
4931 /* Line 1464 of skeleton.m4 */
4932 #line 2317 "parser.y"
4934 (yyval.code) = (yyvsp[(3) - (3)].code);
4944 /* Line 1464 of skeleton.m4 */
4945 #line 2320 "parser.y"
4946 {PASS12 new_state();}
4955 /* Line 1464 of skeleton.m4 */
4956 #line 2320 "parser.y"
4958 (yyval.code)=(yyvsp[(4) - (8)].value).c;
4959 (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (8)].code));
4960 code_t*out = (yyval.code) = abc_pop((yyval.code));
4961 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].id), out);
4963 code_t*c = (yyval.code),*lastblock=0;
4965 if(c->opcode == OPCODE_IFNE) {
4966 if(!c->next) syntaxerror("internal error in fallthrough handling");
4968 } else if(c->opcode == OPCODE___FALLTHROUGH__) {
4970 c->opcode = OPCODE_JUMP;
4971 c->branch = lastblock;
4973 /* fall through end of switch */
4974 c->opcode = OPCODE_NOP;
4980 (yyval.code) = var_block((yyval.code));
4991 /* Line 1464 of skeleton.m4 */
4992 #line 2349 "parser.y"
4993 {PASS12 new_state();
4994 state->exception_name=(yyvsp[(3) - (5)].id);
4995 PASS1 new_variable((yyvsp[(3) - (5)].id), 0, 0, 0);
4996 PASS2 new_variable((yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].classinfo), 0, 0);
5006 /* Line 1464 of skeleton.m4 */
5007 #line 2354 "parser.y"
5009 namespace_t name_ns = {ACCESS_PACKAGE, ""};
5010 multiname_t name = {QNAME, &name_ns, 0, (yyvsp[(3) - (9)].id)};
5012 NEW(abc_exception_t, e)
5013 e->exc_type = sig2mname((yyvsp[(4) - (9)].classinfo));
5014 e->var_name = multiname_clone(&name);
5015 (yyval.exception) = e;
5018 int i = find_variable_safe(state, (yyvsp[(3) - (9)].id))->index;
5019 e->target = c = abc_nop(0);
5020 c = abc_setlocal(c, i);
5021 c = code_append(c, (yyvsp[(8) - (9)].code));
5035 /* Line 1464 of skeleton.m4 */
5036 #line 2373 "parser.y"
5037 {PASS12 new_state();state->exception_name=0;}
5046 /* Line 1464 of skeleton.m4 */
5047 #line 2373 "parser.y"
5049 (yyvsp[(4) - (5)].code) = var_block((yyvsp[(4) - (5)].code));
5050 if(!(yyvsp[(4) - (5)].code)) {
5051 (yyval.exception)=0;
5053 NEW(abc_exception_t, e)
5054 e->exc_type = 0; //all exceptions
5055 e->var_name = 0; //no name
5058 e->to = code_append(e->to, (yyvsp[(4) - (5)].code));
5059 (yyval.exception) = e;
5071 /* Line 1464 of skeleton.m4 */
5072 #line 2389 "parser.y"
5073 {(yyval.catch_list).l=list_new();(yyval.catch_list).finally=0;list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));}
5082 /* Line 1464 of skeleton.m4 */
5083 #line 2390 "parser.y"
5084 {(yyval.catch_list)=(yyvsp[(1) - (2)].catch_list);list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));}
5093 /* Line 1464 of skeleton.m4 */
5094 #line 2391 "parser.y"
5095 {(yyval.catch_list)=(yyvsp[(1) - (1)].catch_list);}
5104 /* Line 1464 of skeleton.m4 */
5105 #line 2392 "parser.y"
5107 (yyval.catch_list) = (yyvsp[(1) - (2)].catch_list);
5108 (yyval.catch_list).finally = 0;
5109 if((yyvsp[(2) - (2)].exception)) {
5110 list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));
5111 (yyval.catch_list).finally = (yyvsp[(2) - (2)].exception)->to;(yyvsp[(2) - (2)].exception)->to=0;
5122 /* Line 1464 of skeleton.m4 */
5123 #line 2400 "parser.y"
5125 (yyval.catch_list).l=list_new();
5126 (yyval.catch_list).finally = 0;
5127 if((yyvsp[(1) - (1)].exception)) {
5128 list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));
5129 (yyval.catch_list).finally = (yyvsp[(1) - (1)].exception)->to;(yyvsp[(1) - (1)].exception)->to=0;
5140 /* Line 1464 of skeleton.m4 */
5141 #line 2409 "parser.y"
5142 {PASS12 new_state();}
5151 /* Line 1464 of skeleton.m4 */
5152 #line 2409 "parser.y"
5154 code_t*out = abc_nop(0);
5156 code_t*start = abc_nop(0);
5157 (yyval.code) = code_append(start, (yyvsp[(4) - (6)].code));
5158 if(!is_break_or_jump((yyvsp[(4) - (6)].code))) {
5159 (yyval.code) = abc_jump((yyval.code), out);
5161 code_t*end = (yyval.code) = abc_nop((yyval.code));
5164 if((yyvsp[(6) - (6)].catch_list).finally)
5165 tmp = new_variable("__finally__", 0, 0, 0);
5167 abc_exception_list_t*l = (yyvsp[(6) - (6)].catch_list).l;
5170 abc_exception_t*e = l->abc_exception;
5172 (yyval.code) = code_append((yyval.code), e->target);
5173 (yyval.code) = abc_jump((yyval.code), out);
5175 parserassert((ptroff_t)(yyvsp[(6) - (6)].catch_list).finally);
5177 e->target = (yyval.code) = abc_nop((yyval.code));
5178 (yyval.code) = abc___rethrow__((yyval.code));
5186 (yyval.code) = code_append((yyval.code), out);
5188 (yyval.code) = insert_finally((yyval.code), (yyvsp[(6) - (6)].catch_list).finally, tmp);
5190 list_concat(state->method->exceptions, (yyvsp[(6) - (6)].catch_list).l);
5192 (yyval.code) = var_block((yyval.code));
5203 /* Line 1464 of skeleton.m4 */
5204 #line 2454 "parser.y"
5206 (yyval.code)=(yyvsp[(2) - (2)].value).c;
5207 (yyval.code)=abc_throw((yyval.code));
5217 /* Line 1464 of skeleton.m4 */
5218 #line 2458 "parser.y"
5220 if(!state->exception_name)
5221 syntaxerror("re-throw only possible within a catch block");
5222 variable_t*v = find_variable(state, state->exception_name);
5223 (yyval.code)=code_new();
5224 (yyval.code)=abc_getlocal((yyval.code), v->index);
5225 (yyval.code)=abc_throw((yyval.code));
5235 /* Line 1464 of skeleton.m4 */
5236 #line 2469 "parser.y"
5238 (yyval.code) = (yyvsp[(3) - (5)].value).c;
5239 (yyval.code) = abc_pushwith((yyval.code));
5240 (yyval.code) = code_append((yyval.code), (yyvsp[(5) - (5)].code));
5241 (yyval.code) = abc_popscope((yyval.code));
5251 /* Line 1464 of skeleton.m4 */
5252 #line 2479 "parser.y"
5253 {PASS12 (yyval.id)="package";}
5262 /* Line 1464 of skeleton.m4 */
5263 #line 2481 "parser.y"
5264 {PASS12 (yyval.id) = concat3((yyvsp[(1) - (3)].id),".",(yyvsp[(3) - (3)].id));free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;}
5273 /* Line 1464 of skeleton.m4 */
5274 #line 2482 "parser.y"
5275 {PASS12 (yyval.id)=strdup((yyvsp[(1) - (1)].id));}
5284 /* Line 1464 of skeleton.m4 */
5285 #line 2484 "parser.y"
5286 {PASS12 startpackage((yyvsp[(2) - (3)].id));free((yyvsp[(2) - (3)].id));(yyvsp[(2) - (3)].id)=0;}
5295 /* Line 1464 of skeleton.m4 */
5296 #line 2485 "parser.y"
5297 {PASS12 endpackage();(yyval.code)=0;}
5306 /* Line 1464 of skeleton.m4 */
5307 #line 2486 "parser.y"
5308 {PASS12 startpackage("");}
5317 /* Line 1464 of skeleton.m4 */
5318 #line 2487 "parser.y"
5319 {PASS12 endpackage();(yyval.code)=0;}
5328 /* Line 1464 of skeleton.m4 */
5329 #line 2489 "parser.y"
5332 slotinfo_t*s = registry_find((yyvsp[(2) - (2)].classinfo)->package, (yyvsp[(2) - (2)].classinfo)->name);
5333 if(!s && as3_pass==1) {// || !(s->flags&FLAG_BUILTIN)) {
5334 as3_schedule_class((yyvsp[(2) - (2)].classinfo)->package, (yyvsp[(2) - (2)].classinfo)->name);
5338 classinfo_t*c = (yyvsp[(2) - (2)].classinfo);
5340 syntaxerror("Couldn't import class\n");
5341 state_has_imports();
5342 dict_put(state->imports, c->name, c);
5343 import_toplevel(c->package);
5354 /* Line 1464 of skeleton.m4 */
5355 #line 2505 "parser.y"
5358 if(strncmp("flash.", (yyvsp[(2) - (4)].id), 6) && as3_pass==1) {
5359 as3_schedule_package((yyvsp[(2) - (4)].id));
5364 i->package = (yyvsp[(2) - (4)].id);
5365 state_has_imports();
5366 list_append(state->wildcard_imports, i);
5367 import_toplevel(i->package);
5378 /* Line 1464 of skeleton.m4 */
5379 #line 2522 "parser.y"
5380 {PASS12 (yyval.flags).flags=0;(yyval.flags).ns=0;}
5389 /* Line 1464 of skeleton.m4 */
5390 #line 2523 "parser.y"
5391 {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
5400 /* Line 1464 of skeleton.m4 */
5401 #line 2524 "parser.y"
5402 {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
5411 /* Line 1464 of skeleton.m4 */
5412 #line 2525 "parser.y"
5415 (yyval.flags).flags=(yyvsp[(1) - (2)].flags).flags|(yyvsp[(2) - (2)].flags).flags;
5416 if((yyvsp[(1) - (2)].flags).ns && (yyvsp[(2) - (2)].flags).ns) syntaxerror("only one namespace allowed in one declaration");
5417 (yyval.flags).ns=(yyvsp[(1) - (2)].flags).ns?(yyvsp[(1) - (2)].flags).ns:(yyvsp[(2) - (2)].flags).ns;
5428 /* Line 1464 of skeleton.m4 */
5429 #line 2533 "parser.y"
5430 {PASS12 (yyval.flags).flags=FLAG_PUBLIC;(yyval.flags).ns=0;}
5439 /* Line 1464 of skeleton.m4 */
5440 #line 2534 "parser.y"
5441 {PASS12 (yyval.flags).flags=FLAG_PRIVATE;(yyval.flags).ns=0;}
5450 /* Line 1464 of skeleton.m4 */
5451 #line 2535 "parser.y"
5452 {PASS12 (yyval.flags).flags=FLAG_PROTECTED;(yyval.flags).ns=0;}
5461 /* Line 1464 of skeleton.m4 */
5462 #line 2536 "parser.y"
5463 {PASS12 (yyval.flags).flags=FLAG_STATIC;(yyval.flags).ns=0;}
5472 /* Line 1464 of skeleton.m4 */
5473 #line 2537 "parser.y"
5474 {PASS12 (yyval.flags).flags=FLAG_DYNAMIC;(yyval.flags).ns=0;}
5483 /* Line 1464 of skeleton.m4 */
5484 #line 2538 "parser.y"
5485 {PASS12 (yyval.flags).flags=FLAG_FINAL;(yyval.flags).ns=0;}
5494 /* Line 1464 of skeleton.m4 */
5495 #line 2539 "parser.y"
5496 {PASS12 (yyval.flags).flags=FLAG_OVERRIDE;(yyval.flags).ns=0;}
5505 /* Line 1464 of skeleton.m4 */
5506 #line 2540 "parser.y"
5507 {PASS12 (yyval.flags).flags=FLAG_NATIVE;(yyval.flags).ns=0;}
5516 /* Line 1464 of skeleton.m4 */
5517 #line 2541 "parser.y"
5518 {PASS12 (yyval.flags).flags=FLAG_PACKAGEINTERNAL;(yyval.flags).ns=0;}
5527 /* Line 1464 of skeleton.m4 */
5528 #line 2542 "parser.y"
5529 {PASS12 (yyval.flags).flags=FLAG_NAMESPACE;
5530 (yyval.flags).ns=(yyvsp[(1) - (1)].id);
5540 /* Line 1464 of skeleton.m4 */
5541 #line 2546 "parser.y"
5542 {(yyval.classinfo)=0;}
5551 /* Line 1464 of skeleton.m4 */
5552 #line 2547 "parser.y"
5553 {(yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
5562 /* Line 1464 of skeleton.m4 */
5563 #line 2549 "parser.y"
5564 {PASS12 (yyval.classinfo_list)=list_new();}
5573 /* Line 1464 of skeleton.m4 */
5574 #line 2550 "parser.y"
5575 {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
5584 /* Line 1464 of skeleton.m4 */
5585 #line 2552 "parser.y"
5586 {PASS12 (yyval.classinfo_list)=list_new();}
5595 /* Line 1464 of skeleton.m4 */
5596 #line 2553 "parser.y"
5597 {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
5606 /* Line 1464 of skeleton.m4 */
5607 #line 2557 "parser.y"
5608 {PASS12 startclass(&(yyvsp[(1) - (6)].flags),(yyvsp[(3) - (6)].id),(yyvsp[(4) - (6)].classinfo),(yyvsp[(5) - (6)].classinfo_list));}
5617 /* Line 1464 of skeleton.m4 */
5618 #line 2559 "parser.y"
5619 {PASS12 endclass();(yyval.code)=0;}
5628 /* Line 1464 of skeleton.m4 */
5629 #line 2563 "parser.y"
5630 {PASS12 (yyvsp[(1) - (5)].flags).flags|=FLAG_INTERFACE;
5631 startclass(&(yyvsp[(1) - (5)].flags),(yyvsp[(3) - (5)].id),0,(yyvsp[(4) - (5)].classinfo_list));}
5640 /* Line 1464 of skeleton.m4 */
5641 #line 2566 "parser.y"
5642 {PASS12 endclass();(yyval.code)=0;}
5651 /* Line 1464 of skeleton.m4 */
5652 #line 2579 "parser.y"
5654 code_t*c = state->cls->static_init->header;
5655 c = code_append(c, (yyvsp[(1) - (1)].code));
5656 state->cls->static_init->header = c;
5666 /* Line 1464 of skeleton.m4 */
5667 #line 2590 "parser.y"
5669 syntaxerror("variable declarations not allowed in interfaces");
5679 /* Line 1464 of skeleton.m4 */
5680 #line 2593 "parser.y"
5683 (yyvsp[(1) - (8)].flags).flags |= FLAG_PUBLIC;
5684 if((yyvsp[(1) - (8)].flags).flags&(FLAG_PRIVATE|FLAG_PACKAGEINTERNAL|FLAG_PROTECTED)) {
5685 syntaxerror("invalid method modifiers: interface methods always need to be public");
5687 startfunction(&(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo));
5688 endfunction(&(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo), 0);
5689 list_deep_free((yyvsp[(6) - (8)].params).list);
5699 /* Line 1464 of skeleton.m4 */
5700 #line 2608 "parser.y"
5701 {setslotstate(&(yyvsp[(1) - (2)].flags),(yyvsp[(2) - (2)].token));}
5710 /* Line 1464 of skeleton.m4 */
5711 #line 2608 "parser.y"
5712 {(yyval.code)=(yyvsp[(4) - (4)].code);setslotstate(0, 0);}
5721 /* Line 1464 of skeleton.m4 */
5722 #line 2610 "parser.y"
5723 {(yyval.code) = (yyvsp[(1) - (1)].code);}
5732 /* Line 1464 of skeleton.m4 */
5733 #line 2611 "parser.y"
5734 {(yyval.code) = code_append((yyvsp[(1) - (3)].code), (yyvsp[(3) - (3)].code));}
5743 /* Line 1464 of skeleton.m4 */
5744 #line 2614 "parser.y"
5746 int flags = slotstate_flags->flags;
5747 namespace_t ns = modifiers2access(slotstate_flags);
5749 varinfo_t* info = 0;
5751 memberinfo_t*i = registry_findmember(state->cls->info, ns.name, (yyvsp[(1) - (3)].id), 1);
5753 check_override(i, flags);
5755 info = varinfo_register_onclass(state->cls->info, ns.access, ns.name, (yyvsp[(1) - (3)].id));
5757 slotinfo_t*i = registry_find(state->package, (yyvsp[(1) - (3)].id));
5759 syntaxerror("package %s already contains '%s'", state->package, (yyvsp[(1) - (3)].id));
5761 if(ns.name && ns.name[0]) {
5762 syntaxerror("namespaces not allowed on package-level variables");
5764 info = varinfo_register_global(ns.access, state->package, (yyvsp[(1) - (3)].id));
5767 info->type = (yyvsp[(2) - (3)].classinfo);
5768 info->flags = flags;
5771 multiname_t mname = {QNAME, &ns, 0, (yyvsp[(1) - (3)].id)};
5773 trait_list_t**traits;
5777 ns.name = state->package;
5778 traits = &global->init->traits;
5779 code = &global->init->method->body->code;
5780 } else if(flags&FLAG_STATIC) {
5782 traits = &state->cls->abc->static_traits;
5783 code = &state->cls->static_init->header;
5785 // instance variable
5786 traits = &state->cls->abc->traits;
5787 code = &state->cls->init->header;
5791 if((yyvsp[(2) - (3)].classinfo)) {
5792 MULTINAME(m, (yyvsp[(2) - (3)].classinfo));
5793 t = trait_new_member(traits, multiname_clone(&m), multiname_clone(&mname), 0);
5795 t = trait_new_member(traits, 0, multiname_clone(&mname), 0);
5797 info->slot = t->slot_id;
5799 /* initalization code (if needed) */
5801 if((yyvsp[(3) - (3)].value).c && !is_pushundefined((yyvsp[(3) - (3)].value).c)) {
5802 c = abc_getlocal_0(c);
5803 c = code_append(c, (yyvsp[(3) - (3)].value).c);
5804 c = converttype(c, (yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo));
5805 c = abc_setslot(c, t->slot_id);
5808 *code = code_append(*code, c);
5810 if(slotstate_varconst==KW_CONST) {
5811 t->kind= TRAIT_CONST;
5824 /* Line 1464 of skeleton.m4 */
5825 #line 2688 "parser.y"
5826 {(yyval.constant)=0;}
5835 /* Line 1464 of skeleton.m4 */
5836 #line 2689 "parser.y"
5837 {(yyval.constant)=(yyvsp[(2) - (2)].constant);}
5846 /* Line 1464 of skeleton.m4 */
5847 #line 2691 "parser.y"
5848 {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_uint));}
5857 /* Line 1464 of skeleton.m4 */
5858 #line 2692 "parser.y"
5859 {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_int));}
5868 /* Line 1464 of skeleton.m4 */
5869 #line 2693 "parser.y"
5870 {(yyval.constant) = constant_new_uint((yyvsp[(1) - (1)].number_uint));}
5879 /* Line 1464 of skeleton.m4 */
5880 #line 2694 "parser.y"
5881 {(yyval.constant) = constant_new_float((yyvsp[(1) - (1)].number_float));}
5890 /* Line 1464 of skeleton.m4 */
5891 #line 2695 "parser.y"
5892 {(yyval.constant) = constant_new_string2((yyvsp[(1) - (1)].str).str,(yyvsp[(1) - (1)].str).len);free((char*)(yyvsp[(1) - (1)].str).str);}
5901 /* Line 1464 of skeleton.m4 */
5902 #line 2697 "parser.y"
5903 {(yyval.constant) = constant_new_true((yyvsp[(1) - (1)].token));}
5912 /* Line 1464 of skeleton.m4 */
5913 #line 2698 "parser.y"
5914 {(yyval.constant) = constant_new_false((yyvsp[(1) - (1)].token));}
5923 /* Line 1464 of skeleton.m4 */
5924 #line 2699 "parser.y"
5925 {(yyval.constant) = constant_new_null((yyvsp[(1) - (1)].token));}
5934 /* Line 1464 of skeleton.m4 */
5935 #line 2700 "parser.y"
5937 if(!strcmp((yyvsp[(1) - (1)].id), "NaN")) {
5938 (yyval.constant) = constant_new_float(__builtin_nan(""));
5940 as3_warning("Couldn't evaluate constant value of %s", (yyvsp[(1) - (1)].id));
5941 (yyval.constant) = constant_new_null((yyvsp[(1) - (1)].id));
5952 /* Line 1464 of skeleton.m4 */
5953 #line 2712 "parser.y"
5956 memset(&(yyval.params),0,sizeof((yyval.params)));
5966 /* Line 1464 of skeleton.m4 */
5967 #line 2716 "parser.y"
5970 (yyval.params)=(yyvsp[(1) - (1)].params);
5980 /* Line 1464 of skeleton.m4 */
5981 #line 2722 "parser.y"
5984 memset(&(yyval.params),0,sizeof((yyval.params)));
5985 (yyval.params).varargs=1;
5986 list_append((yyval.params).list, (yyvsp[(2) - (2)].param));
5996 /* Line 1464 of skeleton.m4 */
5997 #line 2728 "parser.y"
6000 (yyval.params) =(yyvsp[(1) - (4)].params);
6001 (yyval.params).varargs=1;
6002 list_append((yyval.params).list, (yyvsp[(4) - (4)].param));
6012 /* Line 1464 of skeleton.m4 */
6013 #line 2736 "parser.y"
6016 (yyval.params) = (yyvsp[(1) - (3)].params);
6017 list_append((yyval.params).list, (yyvsp[(3) - (3)].param));
6027 /* Line 1464 of skeleton.m4 */
6028 #line 2741 "parser.y"
6031 memset(&(yyval.params),0,sizeof((yyval.params)));
6032 list_append((yyval.params).list, (yyvsp[(1) - (1)].param));
6042 /* Line 1464 of skeleton.m4 */
6043 #line 2747 "parser.y"
6046 (yyval.param) = rfx_calloc(sizeof(param_t));
6047 (yyval.param)->name=(yyvsp[(1) - (4)].id);
6048 (yyval.param)->type = (yyvsp[(3) - (4)].classinfo);
6050 (yyval.param)->value = (yyvsp[(4) - (4)].constant);
6060 /* Line 1464 of skeleton.m4 */
6061 #line 2755 "parser.y"
6064 (yyval.param) = rfx_calloc(sizeof(param_t));
6065 (yyval.param)->name=(yyvsp[(1) - (2)].id);
6066 (yyval.param)->type = TYPE_ANY;
6068 (yyval.param)->value = (yyvsp[(2) - (2)].constant);
6078 /* Line 1464 of skeleton.m4 */
6079 #line 2765 "parser.y"
6080 {PASS12 (yyval.token)=0;}
6089 /* Line 1464 of skeleton.m4 */
6090 #line 2768 "parser.y"
6091 {PASS12 startfunction(&(yyvsp[(1) - (9)].flags),(yyvsp[(3) - (9)].token),(yyvsp[(4) - (9)].id),&(yyvsp[(6) - (9)].params),(yyvsp[(8) - (9)].classinfo));}
6100 /* Line 1464 of skeleton.m4 */
6101 #line 2769 "parser.y"
6104 endfunction(&(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),0,0);
6106 if(!state->method->info) syntaxerror("internal error");
6108 code_t*c = method_header(state->method);
6109 c = wrap_function(c, 0, (yyvsp[(11) - (12)].code));
6111 endfunction(&(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),(yyvsp[(8) - (12)].classinfo),c);
6113 list_deep_free((yyvsp[(6) - (12)].params).list);
6124 /* Line 1464 of skeleton.m4 */
6125 #line 2785 "parser.y"
6126 {PASS12 (yyval.id)=0;}
6135 /* Line 1464 of skeleton.m4 */
6136 #line 2787 "parser.y"
6137 {PASS12 innerfunction((yyvsp[(2) - (7)].id),&(yyvsp[(4) - (7)].params),(yyvsp[(6) - (7)].classinfo));}
6146 /* Line 1464 of skeleton.m4 */
6147 #line 2788 "parser.y"
6150 endfunction(0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),0,0);
6152 methodinfo_t*f = state->method->info;
6153 if(!f || !f->kind) syntaxerror("internal error");
6155 code_t*c = method_header(state->method);
6156 c = wrap_function(c, 0, (yyvsp[(9) - (10)].code));
6158 int index = state->method->var_index;
6159 endfunction(0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),(yyvsp[(6) - (10)].classinfo),c);
6161 (yyval.value).c = abc_getlocal(0, index);
6162 (yyval.value).t = TYPE_FUNCTION(f);
6164 PASS12 list_deep_free((yyvsp[(4) - (10)].params).list);
6174 /* Line 1464 of skeleton.m4 */
6175 #line 2810 "parser.y"
6177 PASS1 static classinfo_t c;
6178 memset(&c, 0, sizeof(c));
6179 c.kind = INFOTYPE_CLASS;
6181 c.name = (yyvsp[(1) - (1)].id);
6182 (yyval.classinfo) = &c;
6184 /* let the compiler know that we might be looking for this soon */
6185 as3_schedule_class_noerror(state->package, (yyvsp[(1) - (1)].id));
6187 slotinfo_t*s = find_class((yyvsp[(1) - (1)].id));
6188 if(!s) syntaxerror("Could not find class/method %s (current package: %s)\n", (yyvsp[(1) - (1)].id), state->package);
6189 (yyval.classinfo) = (classinfo_t*)s;
6199 /* Line 1464 of skeleton.m4 */
6200 #line 2826 "parser.y"
6202 PASS1 static classinfo_t c;
6203 memset(&c, 0, sizeof(c));
6204 c.kind = INFOTYPE_CLASS;
6206 c.package = (yyvsp[(1) - (3)].id);
6207 c.name = (yyvsp[(3) - (3)].id);
6208 (yyval.classinfo) = &c;
6210 slotinfo_t*s = registry_find((yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
6211 if(!s) syntaxerror("Couldn't find class/method %s.%s\n", (yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
6212 free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;
6213 (yyval.classinfo) = (classinfo_t*)s;
6223 /* Line 1464 of skeleton.m4 */
6224 #line 2844 "parser.y"
6225 {PASS12 (yyval.classinfo_list)=list_new();list_append((yyval.classinfo_list), (yyvsp[(1) - (1)].classinfo));}
6234 /* Line 1464 of skeleton.m4 */
6235 #line 2845 "parser.y"
6236 {PASS12 (yyval.classinfo_list)=(yyvsp[(1) - (3)].classinfo_list);list_append((yyval.classinfo_list),(yyvsp[(3) - (3)].classinfo));}
6245 /* Line 1464 of skeleton.m4 */
6246 #line 2847 "parser.y"
6247 {PASS12 (yyval.classinfo)=(yyvsp[(1) - (1)].classinfo);}
6256 /* Line 1464 of skeleton.m4 */
6257 #line 2848 "parser.y"
6258 {PASS12 (yyval.classinfo)=registry_getanytype();}
6267 /* Line 1464 of skeleton.m4 */
6268 #line 2849 "parser.y"
6269 {PASS12 (yyval.classinfo)=registry_getanytype();}
6278 /* Line 1464 of skeleton.m4 */
6279 #line 2858 "parser.y"
6280 {PASS12 (yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
6289 /* Line 1464 of skeleton.m4 */
6290 #line 2859 "parser.y"
6291 {PASS12 (yyval.classinfo)=0;}
6300 /* Line 1464 of skeleton.m4 */
6301 #line 2863 "parser.y"
6302 {(yyval.value_list).cc=0;(yyval.value_list).len=0;}
6311 /* Line 1464 of skeleton.m4 */
6312 #line 2864 "parser.y"
6313 {(yyval.value_list)=(yyvsp[(2) - (3)].value_list);}
6322 /* Line 1464 of skeleton.m4 */
6323 #line 2866 "parser.y"
6324 {(yyval.value_list).cc=0;(yyval.value_list).len=0;}
6333 /* Line 1464 of skeleton.m4 */
6334 #line 2870 "parser.y"
6335 {(yyval.value_list).len=1;
6336 (yyval.value_list).cc = (yyvsp[(1) - (1)].value).c;
6346 /* Line 1464 of skeleton.m4 */
6347 #line 2874 "parser.y"
6348 {(yyval.value_list) = (yyvsp[(1) - (2)].value_list);}
6357 /* Line 1464 of skeleton.m4 */
6358 #line 2875 "parser.y"
6360 (yyval.value_list).len= (yyvsp[(1) - (2)].value_list).len+1;
6361 (yyval.value_list).cc = code_append((yyvsp[(1) - (2)].value_list).cc, (yyvsp[(2) - (2)].value).c);
6371 /* Line 1464 of skeleton.m4 */
6372 #line 2881 "parser.y"
6374 (yyval.value).c = (yyvsp[(2) - (4)].value).c;
6375 if((yyval.value).c->opcode == OPCODE_COERCE_A) (yyval.value).c = code_cutlast((yyval.value).c);
6377 code_t*paramcode = (yyvsp[(4) - (4)].value_list).cc;
6378 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6379 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6380 (yyval.value).c = code_cutlast((yyval.value).c);
6381 (yyval.value).c = code_append((yyval.value).c, paramcode);
6382 (yyval.value).c = abc_constructprop2((yyval.value).c, name, (yyvsp[(4) - (4)].value_list).len);
6383 multiname_destroy(name);
6384 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
6385 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6386 trait_t*t = traits_find_slotid(state->cls->abc->traits,slot);//FIXME
6387 multiname_t*name = t->name;
6388 (yyval.value).c = code_cutlast((yyval.value).c);
6389 (yyval.value).c = code_append((yyval.value).c, paramcode);
6390 (yyval.value).c = abc_constructprop2((yyval.value).c, name, (yyvsp[(4) - (4)].value_list).len);
6392 (yyval.value).c = code_append((yyval.value).c, paramcode);
6393 (yyval.value).c = abc_construct((yyval.value).c, (yyvsp[(4) - (4)].value_list).len);
6396 (yyval.value).t = TYPE_ANY;
6397 if(TYPE_IS_CLASS((yyvsp[(2) - (4)].value).t) && (yyvsp[(2) - (4)].value).t->data) {
6398 (yyval.value).t = (yyvsp[(2) - (4)].value).t->data;
6400 (yyval.value).c = abc_coerce_a((yyval.value).c);
6401 (yyval.value).t = TYPE_ANY;
6412 /* Line 1464 of skeleton.m4 */
6413 #line 2917 "parser.y"
6416 (yyval.value).c = (yyvsp[(1) - (4)].value).c;
6417 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
6418 (yyval.value).c = code_cutlast((yyval.value).c);
6420 code_t*paramcode = (yyvsp[(3) - (4)].value_list).cc;
6422 (yyval.value).t = TYPE_ANY;
6423 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6424 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6425 (yyval.value).c = code_cutlast((yyval.value).c);
6426 (yyval.value).c = code_append((yyval.value).c, paramcode);
6427 (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).len);
6428 multiname_destroy(name);
6429 } else if((yyval.value).c->opcode == OPCODE_GETSLOT && (yyval.value).c->prev->opcode != OPCODE_GETSCOPEOBJECT) {
6430 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6431 trait_t*t = traits_find_slotid(state->cls->abc->traits,slot);
6432 if(t->kind!=TRAIT_METHOD) {
6433 //ok: flash allows to assign closures to members.
6435 multiname_t*name = t->name;
6436 (yyval.value).c = code_cutlast((yyval.value).c);
6437 (yyval.value).c = code_append((yyval.value).c, paramcode);
6438 //$$.c = abc_callmethod($$.c, t->method, len); //#1051 illegal early access binding
6439 (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).len);
6440 } else if((yyval.value).c->opcode == OPCODE_GETSUPER) {
6441 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6442 (yyval.value).c = code_cutlast((yyval.value).c);
6443 (yyval.value).c = code_append((yyval.value).c, paramcode);
6444 (yyval.value).c = abc_callsuper2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).len);
6445 multiname_destroy(name);
6447 (yyval.value).c = abc_getglobalscope((yyval.value).c);
6448 (yyval.value).c = code_append((yyval.value).c, paramcode);
6449 (yyval.value).c = abc_call((yyval.value).c, (yyvsp[(3) - (4)].value_list).len);
6452 if(TYPE_IS_FUNCTION((yyvsp[(1) - (4)].value).t) && (yyvsp[(1) - (4)].value).t->data) {
6453 (yyval.value).t = ((methodinfo_t*)((yyvsp[(1) - (4)].value).t->data))->return_type;
6455 (yyval.value).c = abc_coerce_a((yyval.value).c);
6456 (yyval.value).t = TYPE_ANY;
6467 /* Line 1464 of skeleton.m4 */
6468 #line 2963 "parser.y"
6470 if(!state->cls) syntaxerror("super() not allowed outside of a class");
6471 if(!state->method) syntaxerror("super() not allowed outside of a function");
6472 if(!state->method->is_constructor) syntaxerror("super() not allowed outside of a constructor");
6474 (yyval.value).c = code_new();
6475 (yyval.value).c = abc_getlocal_0((yyval.value).c);
6477 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value_list).cc);
6479 this is dependent on the control path, check this somewhere else
6480 if(state->method->has_super)
6481 syntaxerror("constructor may call super() only once");
6483 state->method->has_super = 1;
6485 (yyval.value).c = abc_constructsuper((yyval.value).c, (yyvsp[(3) - (4)].value_list).len);
6486 (yyval.value).c = abc_pushundefined((yyval.value).c);
6487 (yyval.value).t = TYPE_ANY;
6497 /* Line 1464 of skeleton.m4 */
6498 #line 2984 "parser.y"
6500 (yyval.value).c = (yyvsp[(2) - (2)].value).c;
6501 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
6502 (yyval.value).c = code_cutlast((yyval.value).c);
6504 multiname_t*name = 0;
6505 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6506 (yyval.value).c->opcode = OPCODE_DELETEPROPERTY;
6507 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
6508 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6509 multiname_t*name = traits_find_slotid(state->cls->abc->traits,slot)->name;
6510 (yyval.value).c = code_cutlast((yyval.value).c);
6511 (yyval.value).c = abc_deleteproperty2((yyval.value).c, name);
6513 (yyval.value).c = abc_getlocal_0((yyval.value).c);
6514 MULTINAME_LATE(m, (yyvsp[(2) - (2)].value).t?(yyvsp[(2) - (2)].value).t->access:ACCESS_PACKAGE, "");
6515 (yyval.value).c = abc_deleteproperty2((yyval.value).c, &m);
6517 (yyval.value).t = TYPE_BOOLEAN;
6527 /* Line 1464 of skeleton.m4 */
6528 #line 3005 "parser.y"
6530 (yyval.code) = abc_returnvoid(0);
6540 /* Line 1464 of skeleton.m4 */
6541 #line 3008 "parser.y"
6543 (yyval.code) = (yyvsp[(2) - (2)].value).c;
6544 (yyval.code) = abc_returnvalue((yyval.code));
6554 /* Line 1464 of skeleton.m4 */
6555 #line 3015 "parser.y"
6556 {(yyval.value)=(yyvsp[(1) - (1)].value);}
6565 /* Line 1464 of skeleton.m4 */
6566 #line 3016 "parser.y"
6567 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6576 /* Line 1464 of skeleton.m4 */
6577 #line 3017 "parser.y"
6579 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
6580 (yyval.value).c = cut_last_push((yyval.value).c);
6581 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
6582 (yyval.value).t = (yyvsp[(3) - (3)].value).t;
6592 /* Line 1464 of skeleton.m4 */
6593 #line 3023 "parser.y"
6595 (yyval.code)=cut_last_push((yyvsp[(1) - (1)].value).c);
6605 /* Line 1464 of skeleton.m4 */
6606 #line 3029 "parser.y"
6607 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6616 /* Line 1464 of skeleton.m4 */
6617 #line 3033 "parser.y"
6618 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6627 /* Line 1464 of skeleton.m4 */
6628 #line 3035 "parser.y"
6629 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6638 /* Line 1464 of skeleton.m4 */
6639 #line 3037 "parser.y"
6640 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6649 /* Line 1464 of skeleton.m4 */
6650 #line 3041 "parser.y"
6652 (yyval.value).c = 0;
6653 namespace_t ns = {ACCESS_PACKAGE, ""};
6654 multiname_t m = {QNAME, &ns, 0, "RegExp"};
6655 if(!(yyvsp[(1) - (1)].regexp).options) {
6656 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
6657 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).pattern);
6658 (yyval.value).c = abc_construct((yyval.value).c, 1);
6660 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
6661 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).pattern);
6662 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).options);
6663 (yyval.value).c = abc_construct((yyval.value).c, 2);
6665 (yyval.value).t = TYPE_REGEXP;
6675 /* Line 1464 of skeleton.m4 */
6676 #line 3058 "parser.y"
6677 {(yyval.value).c = abc_pushbyte(0, (yyvsp[(1) - (1)].number_uint));
6678 //MULTINAME(m, registry_getintclass());
6679 //$$.c = abc_coerce2($$.c, &m); // FIXME
6680 (yyval.value).t = TYPE_INT;
6690 /* Line 1464 of skeleton.m4 */
6691 #line 3063 "parser.y"
6692 {(yyval.value).c = abc_pushshort(0, (yyvsp[(1) - (1)].number_uint));
6693 (yyval.value).t = TYPE_INT;
6703 /* Line 1464 of skeleton.m4 */
6704 #line 3066 "parser.y"
6705 {(yyval.value).c = abc_pushint(0, (yyvsp[(1) - (1)].number_int));
6706 (yyval.value).t = TYPE_INT;
6716 /* Line 1464 of skeleton.m4 */
6717 #line 3069 "parser.y"
6718 {(yyval.value).c = abc_pushuint(0, (yyvsp[(1) - (1)].number_uint));
6719 (yyval.value).t = TYPE_UINT;
6729 /* Line 1464 of skeleton.m4 */
6730 #line 3072 "parser.y"
6731 {(yyval.value).c = abc_pushdouble(0, (yyvsp[(1) - (1)].number_float));
6732 (yyval.value).t = TYPE_FLOAT;
6742 /* Line 1464 of skeleton.m4 */
6743 #line 3075 "parser.y"
6744 {(yyval.value).c = abc_pushstring2(0, &(yyvsp[(1) - (1)].str));free((char*)(yyvsp[(1) - (1)].str).str);
6745 (yyval.value).t = TYPE_STRING;
6755 /* Line 1464 of skeleton.m4 */
6756 #line 3078 "parser.y"
6757 {(yyval.value).c = abc_pushundefined(0);
6758 (yyval.value).t = TYPE_ANY;
6768 /* Line 1464 of skeleton.m4 */
6769 #line 3081 "parser.y"
6770 {(yyval.value).c = abc_pushtrue(0);
6771 (yyval.value).t = TYPE_BOOLEAN;
6781 /* Line 1464 of skeleton.m4 */
6782 #line 3084 "parser.y"
6783 {(yyval.value).c = abc_pushfalse(0);
6784 (yyval.value).t = TYPE_BOOLEAN;
6794 /* Line 1464 of skeleton.m4 */
6795 #line 3087 "parser.y"
6796 {(yyval.value).c = abc_pushnull(0);
6797 (yyval.value).t = TYPE_NULL;
6807 /* Line 1464 of skeleton.m4 */
6808 #line 3091 "parser.y"
6809 {(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);
6810 (yyval.value).t = TYPE_BOOLEAN;
6820 /* Line 1464 of skeleton.m4 */
6821 #line 3094 "parser.y"
6822 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterthan((yyval.value).c);
6823 (yyval.value).t = TYPE_BOOLEAN;
6833 /* Line 1464 of skeleton.m4 */
6834 #line 3097 "parser.y"
6835 {(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);
6836 (yyval.value).t = TYPE_BOOLEAN;
6846 /* Line 1464 of skeleton.m4 */
6847 #line 3100 "parser.y"
6848 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterequals((yyval.value).c);
6849 (yyval.value).t = TYPE_BOOLEAN;
6859 /* Line 1464 of skeleton.m4 */
6860 #line 3103 "parser.y"
6861 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_equals((yyval.value).c);
6862 (yyval.value).t = TYPE_BOOLEAN;
6872 /* Line 1464 of skeleton.m4 */
6873 #line 3106 "parser.y"
6874 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_strictequals((yyval.value).c);
6875 (yyval.value).t = TYPE_BOOLEAN;
6885 /* Line 1464 of skeleton.m4 */
6886 #line 3109 "parser.y"
6887 {(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);
6888 (yyval.value).t = TYPE_BOOLEAN;
6898 /* Line 1464 of skeleton.m4 */
6899 #line 3112 "parser.y"
6900 {(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);
6901 (yyval.value).t = TYPE_BOOLEAN;
6911 /* Line 1464 of skeleton.m4 */
6912 #line 3116 "parser.y"
6913 {(yyval.value).t = join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'O');
6914 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
6915 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(1) - (3)].value).t, (yyval.value).t);
6916 (yyval.value).c = abc_dup((yyval.value).c);
6917 code_t*jmp = (yyval.value).c = abc_iftrue((yyval.value).c, 0);
6918 (yyval.value).c = cut_last_push((yyval.value).c);
6919 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
6920 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (3)].value).t, (yyval.value).t);
6921 code_t*label = (yyval.value).c = abc_label((yyval.value).c);
6922 jmp->branch = label;
6932 /* Line 1464 of skeleton.m4 */
6933 #line 3127 "parser.y"
6935 (yyval.value).t = join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'A');
6936 /*printf("%08x:\n",$1.t);
6937 code_dump($1.c, 0, 0, "", stdout);
6938 printf("%08x:\n",$3.t);
6939 code_dump($3.c, 0, 0, "", stdout);
6940 printf("joining %08x and %08x to %08x\n", $1.t, $3.t, $$.t);*/
6941 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
6942 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(1) - (3)].value).t, (yyval.value).t);
6943 (yyval.value).c = abc_dup((yyval.value).c);
6944 code_t*jmp = (yyval.value).c = abc_iffalse((yyval.value).c, 0);
6945 (yyval.value).c = cut_last_push((yyval.value).c);
6946 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
6947 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (3)].value).t, (yyval.value).t);
6948 code_t*label = (yyval.value).c = abc_label((yyval.value).c);
6949 jmp->branch = label;
6959 /* Line 1464 of skeleton.m4 */
6960 #line 3145 "parser.y"
6961 {(yyval.value).c=(yyvsp[(2) - (2)].value).c;
6962 (yyval.value).c = abc_not((yyval.value).c);
6963 (yyval.value).t = TYPE_BOOLEAN;
6973 /* Line 1464 of skeleton.m4 */
6974 #line 3150 "parser.y"
6975 {(yyval.value).c=(yyvsp[(2) - (2)].value).c;
6976 (yyval.value).c = abc_bitnot((yyval.value).c);
6977 (yyval.value).t = TYPE_INT;
6987 /* Line 1464 of skeleton.m4 */
6988 #line 3155 "parser.y"
6989 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6990 (yyval.value).c = abc_bitand((yyval.value).c);
6991 (yyval.value).t = TYPE_INT;
7001 /* Line 1464 of skeleton.m4 */
7002 #line 3160 "parser.y"
7003 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7004 (yyval.value).c = abc_bitxor((yyval.value).c);
7005 (yyval.value).t = TYPE_INT;
7015 /* Line 1464 of skeleton.m4 */
7016 #line 3165 "parser.y"
7017 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7018 (yyval.value).c = abc_bitor((yyval.value).c);
7019 (yyval.value).t = TYPE_INT;
7029 /* Line 1464 of skeleton.m4 */
7030 #line 3170 "parser.y"
7031 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7032 (yyval.value).c = abc_rshift((yyval.value).c);
7033 (yyval.value).t = TYPE_INT;
7043 /* Line 1464 of skeleton.m4 */
7044 #line 3174 "parser.y"
7045 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7046 (yyval.value).c = abc_urshift((yyval.value).c);
7047 (yyval.value).t = TYPE_INT;
7057 /* Line 1464 of skeleton.m4 */
7058 #line 3178 "parser.y"
7059 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7060 (yyval.value).c = abc_lshift((yyval.value).c);
7061 (yyval.value).t = TYPE_INT;
7071 /* Line 1464 of skeleton.m4 */
7072 #line 3183 "parser.y"
7073 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7074 (yyval.value).c = abc_divide((yyval.value).c);
7075 (yyval.value).t = TYPE_NUMBER;
7085 /* Line 1464 of skeleton.m4 */
7086 #line 3187 "parser.y"
7087 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7088 (yyval.value).c = abc_modulo((yyval.value).c);
7089 (yyval.value).t = TYPE_NUMBER;
7099 /* Line 1464 of skeleton.m4 */
7100 #line 3191 "parser.y"
7101 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7102 if(BOTH_INT((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t)) {
7103 (yyval.value).c = abc_add_i((yyval.value).c);
7104 (yyval.value).t = TYPE_INT;
7106 (yyval.value).c = abc_add((yyval.value).c);
7107 (yyval.value).t = join_types((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t,'+');
7118 /* Line 1464 of skeleton.m4 */
7119 #line 3200 "parser.y"
7120 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7121 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
7122 (yyval.value).c = abc_subtract_i((yyval.value).c);
7123 (yyval.value).t = TYPE_INT;
7125 (yyval.value).c = abc_subtract((yyval.value).c);
7126 (yyval.value).t = TYPE_NUMBER;
7137 /* Line 1464 of skeleton.m4 */
7138 #line 3209 "parser.y"
7139 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7140 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
7141 (yyval.value).c = abc_multiply_i((yyval.value).c);
7142 (yyval.value).t = TYPE_INT;
7144 (yyval.value).c = abc_multiply((yyval.value).c);
7145 (yyval.value).t = TYPE_NUMBER;
7156 /* Line 1464 of skeleton.m4 */
7157 #line 3219 "parser.y"
7158 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7159 (yyval.value).c = abc_in((yyval.value).c);
7160 (yyval.value).t = TYPE_BOOLEAN;
7170 /* Line 1464 of skeleton.m4 */
7171 #line 3224 "parser.y"
7172 {char use_astype=0; // flash player's astype works differently than astypelate
7173 if(use_astype && TYPE_IS_CLASS((yyvsp[(3) - (3)].value).t) && (yyvsp[(3) - (3)].value).t->data) {
7174 MULTINAME(m, (classinfo_t*)((yyvsp[(3) - (3)].value).t->data));
7175 (yyval.value).c = abc_astype2((yyvsp[(1) - (3)].value).c, &m);
7176 (yyval.value).t = (yyvsp[(3) - (3)].value).t->data;
7178 (yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
7179 (yyval.value).c = abc_astypelate((yyval.value).c);
7180 (yyval.value).t = TYPE_ANY;
7191 /* Line 1464 of skeleton.m4 */
7192 #line 3237 "parser.y"
7193 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
7194 (yyval.value).c = abc_instanceof((yyval.value).c);
7195 (yyval.value).t = TYPE_BOOLEAN;
7205 /* Line 1464 of skeleton.m4 */
7206 #line 3242 "parser.y"
7207 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
7208 (yyval.value).c = abc_istypelate((yyval.value).c);
7209 (yyval.value).t = TYPE_BOOLEAN;
7219 /* Line 1464 of skeleton.m4 */
7220 #line 3247 "parser.y"
7222 (yyval.value).c = (yyvsp[(3) - (4)].value).c;
7223 (yyval.value).c = abc_typeof((yyval.value).c);
7224 (yyval.value).t = TYPE_STRING;
7234 /* Line 1464 of skeleton.m4 */
7235 #line 3253 "parser.y"
7237 (yyval.value).c = cut_last_push((yyvsp[(2) - (2)].value).c);
7238 (yyval.value).c = abc_pushundefined((yyval.value).c);
7239 (yyval.value).t = TYPE_ANY;
7249 /* Line 1464 of skeleton.m4 */
7250 #line 3259 "parser.y"
7251 { (yyval.value).c = abc_pushundefined(0);
7252 (yyval.value).t = TYPE_ANY;
7262 /* Line 1464 of skeleton.m4 */
7263 #line 3263 "parser.y"
7264 {(yyval.value)=(yyvsp[(2) - (3)].value);}
7273 /* Line 1464 of skeleton.m4 */
7274 #line 3265 "parser.y"
7276 (yyval.value)=(yyvsp[(2) - (2)].value);
7277 if(IS_INT((yyvsp[(2) - (2)].value).t)) {
7278 (yyval.value).c=abc_negate_i((yyval.value).c);
7279 (yyval.value).t = TYPE_INT;
7281 (yyval.value).c=abc_negate((yyval.value).c);
7282 (yyval.value).t = TYPE_NUMBER;
7293 /* Line 1464 of skeleton.m4 */
7294 #line 3276 "parser.y"
7296 (yyval.value).c = (yyvsp[(1) - (4)].value).c;
7297 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value).c);
7299 MULTINAME_LATE(m, (yyvsp[(1) - (4)].value).t?(yyvsp[(1) - (4)].value).t->access:ACCESS_PACKAGE, "");
7300 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7301 (yyval.value).t = 0; // array elements have unknown type
7311 /* Line 1464 of skeleton.m4 */
7312 #line 3285 "parser.y"
7314 (yyval.value).c = code_new();
7315 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(2) - (3)].value_list).cc);
7316 (yyval.value).c = abc_newarray((yyval.value).c, (yyvsp[(2) - (3)].value_list).len);
7317 (yyval.value).t = registry_getarrayclass();
7327 /* Line 1464 of skeleton.m4 */
7328 #line 3292 "parser.y"
7329 {(yyval.value_list).cc=0;(yyval.value_list).len=0;}
7338 /* Line 1464 of skeleton.m4 */
7339 #line 3293 "parser.y"
7340 {(yyval.value_list)=(yyvsp[(1) - (1)].value_list);}
7349 /* Line 1464 of skeleton.m4 */
7350 #line 3295 "parser.y"
7352 (yyval.value_list).cc = 0;
7353 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(1) - (3)].value).c);
7354 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (3)].value).c);
7355 (yyval.value_list).len = 2;
7365 /* Line 1464 of skeleton.m4 */
7366 #line 3301 "parser.y"
7368 (yyval.value_list).cc = (yyvsp[(1) - (5)].value_list).cc;
7369 (yyval.value_list).len = (yyvsp[(1) - (5)].value_list).len+2;
7370 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (5)].value).c);
7371 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(5) - (5)].value).c);
7381 /* Line 1464 of skeleton.m4 */
7382 #line 3310 "parser.y"
7384 (yyval.value).c = code_new();
7385 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(2) - (3)].value_list).cc);
7386 (yyval.value).c = abc_newobject((yyval.value).c, (yyvsp[(2) - (3)].value_list).len/2);
7387 (yyval.value).t = registry_getobjectclass();
7397 /* Line 1464 of skeleton.m4 */
7398 #line 3317 "parser.y"
7400 code_t*c = (yyvsp[(3) - (3)].value).c;
7401 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
7402 c=abc_multiply_i(c);
7406 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '*'), (yyvsp[(1) - (3)].value).t);
7407 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7408 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7418 /* Line 1464 of skeleton.m4 */
7419 #line 3329 "parser.y"
7421 code_t*c = abc_modulo((yyvsp[(3) - (3)].value).c);
7422 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '%'), (yyvsp[(1) - (3)].value).t);
7423 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7424 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7434 /* Line 1464 of skeleton.m4 */
7435 #line 3335 "parser.y"
7437 code_t*c = abc_lshift((yyvsp[(3) - (3)].value).c);
7438 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '<'), (yyvsp[(1) - (3)].value).t);
7439 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7440 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7450 /* Line 1464 of skeleton.m4 */
7451 #line 3341 "parser.y"
7453 code_t*c = abc_rshift((yyvsp[(3) - (3)].value).c);
7454 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '>'), (yyvsp[(1) - (3)].value).t);
7455 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7456 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7466 /* Line 1464 of skeleton.m4 */
7467 #line 3347 "parser.y"
7469 code_t*c = abc_urshift((yyvsp[(3) - (3)].value).c);
7470 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'U'), (yyvsp[(1) - (3)].value).t);
7471 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7472 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7482 /* Line 1464 of skeleton.m4 */
7483 #line 3353 "parser.y"
7485 code_t*c = abc_divide((yyvsp[(3) - (3)].value).c);
7486 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '/'), (yyvsp[(1) - (3)].value).t);
7487 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7488 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7498 /* Line 1464 of skeleton.m4 */
7499 #line 3359 "parser.y"
7501 code_t*c = abc_bitor((yyvsp[(3) - (3)].value).c);
7502 c=converttype(c, TYPE_INT, (yyvsp[(1) - (3)].value).t);
7503 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7504 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7514 /* Line 1464 of skeleton.m4 */
7515 #line 3365 "parser.y"
7517 code_t*c = abc_bitxor((yyvsp[(3) - (3)].value).c);
7518 c=converttype(c, TYPE_INT, (yyvsp[(1) - (3)].value).t);
7519 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7520 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7530 /* Line 1464 of skeleton.m4 */
7531 #line 3371 "parser.y"
7533 code_t*c = (yyvsp[(3) - (3)].value).c;
7535 if(TYPE_IS_INT((yyvsp[(1) - (3)].value).t)) {
7539 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '+'), (yyvsp[(1) - (3)].value).t);
7542 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7543 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7553 /* Line 1464 of skeleton.m4 */
7554 #line 3384 "parser.y"
7555 { code_t*c = (yyvsp[(3) - (3)].value).c;
7556 if(TYPE_IS_INT((yyvsp[(1) - (3)].value).t)) {
7557 c=abc_subtract_i(c);
7560 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '-'), (yyvsp[(1) - (3)].value).t);
7563 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7564 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7574 /* Line 1464 of skeleton.m4 */
7575 #line 3395 "parser.y"
7577 c = code_append(c, (yyvsp[(3) - (3)].value).c);
7578 c = converttype(c, (yyvsp[(3) - (3)].value).t, (yyvsp[(1) - (3)].value).t);
7579 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 1, 0);
7580 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7590 /* Line 1464 of skeleton.m4 */
7591 #line 3402 "parser.y"
7593 (yyval.value).t = join_types((yyvsp[(3) - (5)].value).t,(yyvsp[(5) - (5)].value).t,'?');
7594 (yyval.value).c = (yyvsp[(1) - (5)].value).c;
7595 code_t*j1 = (yyval.value).c = abc_iffalse((yyval.value).c, 0);
7596 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (5)].value).c);
7597 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (5)].value).t, (yyval.value).t);
7598 code_t*j2 = (yyval.value).c = abc_jump((yyval.value).c, 0);
7599 (yyval.value).c = j1->branch = abc_label((yyval.value).c);
7600 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(5) - (5)].value).c);
7601 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(5) - (5)].value).t, (yyval.value).t);
7602 (yyval.value).c = j2->branch = abc_label((yyval.value).c);
7612 /* Line 1464 of skeleton.m4 */
7613 #line 3415 "parser.y"
7615 classinfo_t*type = (yyvsp[(1) - (2)].value).t;
7616 if(is_getlocal((yyvsp[(1) - (2)].value).c) && (TYPE_IS_INT((yyvsp[(1) - (2)].value).t) || TYPE_IS_NUMBER((yyvsp[(1) - (2)].value).t))) {
7617 int nr = getlocalnr((yyvsp[(1) - (2)].value).c);
7618 code_free((yyvsp[(1) - (2)].value).c);(yyvsp[(1) - (2)].value).c=0;
7619 if(TYPE_IS_INT((yyvsp[(1) - (2)].value).t)) {
7620 (yyval.value).c = abc_getlocal(0, nr);
7621 (yyval.value).c = abc_inclocal_i((yyval.value).c, nr);
7622 } else if(TYPE_IS_NUMBER((yyvsp[(1) - (2)].value).t)) {
7623 (yyval.value).c = abc_getlocal(0, nr);
7624 (yyval.value).c = abc_inclocal((yyval.value).c, nr);
7625 } else syntaxerror("internal error");
7627 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7628 c=abc_increment_i(c);
7634 c=converttype(c, type, (yyvsp[(1) - (2)].value).t);
7635 (yyval.value).c = toreadwrite((yyvsp[(1) - (2)].value).c, c, 0, 1);
7636 (yyval.value).t = (yyvsp[(1) - (2)].value).t;
7647 /* Line 1464 of skeleton.m4 */
7648 #line 3442 "parser.y"
7650 classinfo_t*type = (yyvsp[(1) - (2)].value).t;
7651 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7652 c=abc_decrement_i(c);
7658 c=converttype(c, type, (yyvsp[(1) - (2)].value).t);
7659 (yyval.value).c = toreadwrite((yyvsp[(1) - (2)].value).c, c, 0, 1);
7660 (yyval.value).t = (yyvsp[(1) - (2)].value).t;
7670 /* Line 1464 of skeleton.m4 */
7671 #line 3456 "parser.y"
7673 classinfo_t*type = (yyvsp[(2) - (2)].value).t;
7674 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7675 c=abc_increment_i(c);
7681 c=converttype(c, type, (yyvsp[(2) - (2)].value).t);
7682 (yyval.value).c = toreadwrite((yyvsp[(2) - (2)].value).c, c, 0, 0);
7683 (yyval.value).t = (yyvsp[(2) - (2)].value).t;
7693 /* Line 1464 of skeleton.m4 */
7694 #line 3470 "parser.y"
7696 classinfo_t*type = (yyvsp[(2) - (2)].value).t;
7697 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7698 c=abc_decrement_i(c);
7704 c=converttype(c, type, (yyvsp[(2) - (2)].value).t);
7705 (yyval.value).c = toreadwrite((yyvsp[(2) - (2)].value).c, c, 0, 0);
7706 (yyval.value).t = (yyvsp[(2) - (2)].value).t;
7716 /* Line 1464 of skeleton.m4 */
7717 #line 3485 "parser.y"
7718 { if(!state->cls->info)
7719 syntaxerror("super keyword not allowed outside a class");
7720 classinfo_t*t = state->cls->info->superclass;
7721 if(!t) t = TYPE_OBJECT;
7723 memberinfo_t*f = registry_findmember_nsset(t, state->active_namespaces, (yyvsp[(3) - (3)].id), 1);
7725 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
7726 (yyval.value).c = 0;
7727 (yyval.value).c = abc_getlocal_0((yyval.value).c);
7728 (yyval.value).c = abc_getsuper2((yyval.value).c, &m);
7729 (yyval.value).t = slotinfo_gettype((slotinfo_t*)f);
7739 /* Line 1464 of skeleton.m4 */
7740 #line 3499 "parser.y"
7743 (yyval.value).c = abc_pushundefined(0);
7744 (yyval.value).t = 0;
7745 as3_warning("ignored @ operator");
7755 /* Line 1464 of skeleton.m4 */
7756 #line 3506 "parser.y"
7758 // child attribute TODO
7759 (yyval.value).c = abc_pushundefined(0);
7760 (yyval.value).t = 0;
7761 as3_warning("ignored .@ operator");
7771 /* Line 1464 of skeleton.m4 */
7772 #line 3513 "parser.y"
7774 // namespace declaration TODO
7775 (yyval.value).c = abc_pushundefined(0);
7776 (yyval.value).t = 0;
7777 as3_warning("ignored :: operator");
7787 /* Line 1464 of skeleton.m4 */
7788 #line 3520 "parser.y"
7791 (yyval.value).c = abc_pushundefined(0);
7792 (yyval.value).t = 0;
7793 as3_warning("ignored .. operator");
7803 /* Line 1464 of skeleton.m4 */
7804 #line 3527 "parser.y"
7807 (yyval.value).c = abc_pushundefined(0);
7808 (yyval.value).t = 0;
7809 as3_warning("ignored .() operator");
7819 /* Line 1464 of skeleton.m4 */
7820 #line 3538 "parser.y"
7822 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
7823 classinfo_t*t = (yyvsp[(1) - (3)].value).t;
7825 if(TYPE_IS_CLASS(t) && t->data) {
7830 if(t->subtype==0xff) {
7831 syntaxerror("syntaxerror: trying to resolve property '%s' on incomplete object '%s'", (yyvsp[(3) - (3)].id), t->name);
7833 memberinfo_t*f = registry_findmember_nsset(t, state->active_namespaces, (yyvsp[(3) - (3)].id), 1);
7835 if(f && !is_static != !(f->flags&FLAG_STATIC))
7837 if(f && f->slot && !noslot) {
7838 (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
7840 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
7841 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7843 /* determine type */
7844 (yyval.value).t = slotinfo_gettype((slotinfo_t*)f);
7845 if(!(yyval.value).t)
7846 (yyval.value).c = abc_coerce_a((yyval.value).c);
7847 } else if((yyvsp[(1) - (3)].value).c && (yyvsp[(1) - (3)].value).c->opcode == OPCODE___PUSHPACKAGE__) {
7848 string_t*package = (yyvsp[(1) - (3)].value).c->data[0];
7849 char*package2 = concat3(package->str, ".", (yyvsp[(3) - (3)].id));
7850 if(dict_contains(state->import_toplevel_packages, package2)) {
7851 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
7852 (yyval.value).c->data[0] = string_new4(package2);
7853 (yyval.value).t = 0;
7855 slotinfo_t*a = registry_find(package->str, (yyvsp[(3) - (3)].id));
7857 syntaxerror("couldn't resolve %s", package2);
7858 (yyval.value) = push_class(a);
7861 /* when resolving a property on an unknown type, we do know the
7862 name of the property (and don't seem to need the package), but
7863 we need to make avm2 try out all access modes */
7864 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(3) - (3)].id)};
7865 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7866 (yyval.value).c = abc_coerce_a((yyval.value).c);
7867 (yyval.value).t = registry_getanytype();
7878 /* Line 1464 of skeleton.m4 */
7879 #line 3588 "parser.y"
7882 /* Queue unresolved identifiers for checking against the parent
7883 function's variables.
7884 We consider everything which is not a local variable "unresolved".
7885 This encompasses class names, members of the surrounding class
7886 etc. which is *correct* because local variables of the parent function
7889 if(state->method->inner && !find_variable(state, (yyvsp[(1) - (1)].id))) {
7890 unknown_variable((yyvsp[(1) - (1)].id));
7893 /* let the compiler know that it might check the current directory/package
7894 for this identifier- maybe there's a file $1.as defining $1. */
7895 as3_schedule_class_noerror(state->package, (yyvsp[(1) - (1)].id));
7898 (yyval.value).t = 0;
7899 (yyval.value).c = 0;
7904 /* look at variables */
7905 if((v = find_variable(state, (yyvsp[(1) - (1)].id)))) {
7906 // $1 is a local variable
7907 (yyval.value).c = abc_getlocal((yyval.value).c, v->index);
7908 (yyval.value).t = v->type;
7911 if((v = find_slot(state, (yyvsp[(1) - (1)].id)))) {
7912 (yyval.value).c = abc_getscopeobject((yyval.value).c, 1);
7913 (yyval.value).c = abc_getslot((yyval.value).c, v->index);
7914 (yyval.value).t = v->type;
7918 int i_am_static = (state->method && state->method->info)?(state->method->info->flags&FLAG_STATIC):FLAG_STATIC;
7920 /* look at current class' members */
7921 if(state->cls && (f = registry_findmember_nsset(state->cls->info, state->active_namespaces, (yyvsp[(1) - (1)].id), 1)) &&
7922 (f->flags&FLAG_STATIC) >= i_am_static) {
7923 // $1 is a function in this class
7924 int var_is_static = (f->flags&FLAG_STATIC);
7926 if(f->kind == INFOTYPE_METHOD) {
7927 (yyval.value).t = TYPE_FUNCTION(f);
7929 (yyval.value).t = f->type;
7931 if(var_is_static && !i_am_static) {
7932 /* access to a static member from a non-static location.
7933 do this via findpropstrict:
7934 there doesn't seem to be any non-lookup way to access
7935 static properties of a class */
7936 state->method->late_binding = 1;
7937 (yyval.value).t = f->type;
7938 namespace_t ns = {f->access, ""};
7939 multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
7940 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
7941 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7943 } else if(f->slot>0) {
7944 (yyval.value).c = abc_getlocal_0((yyval.value).c);
7945 (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
7948 namespace_t ns = {f->access, ""};
7949 multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
7950 (yyval.value).c = abc_getlocal_0((yyval.value).c);
7951 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7956 /* look at actual classes, in the current package and imported */
7957 if((a = find_class((yyvsp[(1) - (1)].id)))) {
7958 (yyval.value) = push_class(a);
7962 /* look through package prefixes */
7963 if(dict_contains(state->import_toplevel_packages, (yyvsp[(1) - (1)].id))) {
7964 (yyval.value).c = abc___pushpackage__((yyval.value).c, (yyvsp[(1) - (1)].id));
7965 (yyval.value).t = 0;
7969 /* unknown object, let the avm2 resolve it */
7971 //as3_softwarning("Couldn't resolve '%s', doing late binding", $1);
7972 as3_warning("Couldn't resolve '%s', doing late binding", (yyvsp[(1) - (1)].id));
7973 state->method->late_binding = 1;
7975 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(1) - (1)].id)};
7977 (yyval.value).t = 0;
7978 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
7979 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7990 /* Line 1464 of skeleton.m4 */
7991 #line 3693 "parser.y"
7994 tokenizer_register_namespace((yyvsp[(2) - (2)].id));
7995 (yyval.id)=(yyvsp[(2) - (2)].id);
8005 /* Line 1464 of skeleton.m4 */
8006 #line 3699 "parser.y"
8018 /* Line 1464 of skeleton.m4 */
8019 #line 3702 "parser.y"
8031 /* Line 1464 of skeleton.m4 */
8032 #line 3705 "parser.y"
8044 /* Line 1464 of skeleton.m4 */
8045 #line 3708 "parser.y"
8048 tokenizer_register_namespace((yyvsp[(3) - (3)].classinfo)->name);
8057 /* Line 1464 of skeleton.m4 */
8058 #line 8059 "parser.tab.c"
8061 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
8065 YY_STACK_PRINT (yyss, yyssp);
8069 /* Now `shift' the result of the reduction. Determine what state
8070 that goes to, based on the state we popped back to and the rule
8071 number reduced by. */
8075 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
8076 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
8077 yystate = yytable[yystate];
8079 yystate = yydefgoto[yyn - YYNTOKENS];
8084 /*------------------------------------.
8085 | yyerrlab -- here on detecting error |
8086 `------------------------------------*/
8088 /* If not already recovering from an error, report this error. */
8092 #if ! YYERROR_VERBOSE
8093 yyerror (YY_("syntax error"));
8096 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
8097 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
8099 YYSIZE_T yyalloc = 2 * yysize;
8100 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
8101 yyalloc = YYSTACK_ALLOC_MAXIMUM;
8102 if (yymsg != yymsgbuf)
8103 YYSTACK_FREE (yymsg);
8104 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
8106 yymsg_alloc = yyalloc;
8110 yymsg_alloc = sizeof yymsgbuf;
8114 if (0 < yysize && yysize <= yymsg_alloc)
8116 (void) yysyntax_error (yymsg, yystate, yychar);
8121 yyerror (YY_("syntax error"));
8123 goto yyexhaustedlab;
8131 if (yyerrstatus == 3)
8133 /* If just tried and failed to reuse lookahead token after an
8134 error, discard it. */
8136 if (yychar <= YYEOF)
8138 /* Return failure if at end of input. */
8139 if (yychar == YYEOF)
8144 yydestruct ("Error: discarding",
8150 /* Else will try to reuse lookahead token after shifting the error
8155 /*---------------------------------------------------.
8156 | yyerrorlab -- error raised explicitly by YYERROR. |
8157 `---------------------------------------------------*/
8160 /* Pacify compilers like GCC when the user code never invokes
8161 YYERROR and the label yyerrorlab therefore never appears in user
8163 if (/*CONSTCOND*/ 0)
8166 /* Do not reclaim the symbols of the rule which action triggered
8170 YY_STACK_PRINT (yyss, yyssp);
8175 /*-------------------------------------------------------------.
8176 | yyerrlab1 -- common code for both syntax error and YYERROR. |
8177 `-------------------------------------------------------------*/
8179 yyerrstatus = 3; /* Each real token shifted decrements this. */
8183 yyn = yypact[yystate];
8184 if (yyn != YYPACT_NINF)
8187 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
8195 /* Pop the current state because it cannot handle the error token. */
8200 yydestruct ("Error: popping",
8201 yystos[yystate], yyvsp);
8204 YY_STACK_PRINT (yyss, yyssp);
8210 /* Shift the error token. */
8211 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
8217 /*-------------------------------------.
8218 | yyacceptlab -- YYACCEPT comes here. |
8219 `-------------------------------------*/
8224 /*-----------------------------------.
8225 | yyabortlab -- YYABORT comes here. |
8226 `-----------------------------------*/
8231 #if !defined(yyoverflow) || YYERROR_VERBOSE
8232 /*-------------------------------------------------.
8233 | yyexhaustedlab -- memory exhaustion comes here. |
8234 `-------------------------------------------------*/
8236 yyerror (YY_("memory exhausted"));
8242 if (yychar != YYEMPTY)
8243 yydestruct ("Cleanup: discarding lookahead",
8245 /* Do not reclaim the symbols of the rule which action triggered
8246 this YYABORT or YYACCEPT. */
8248 YY_STACK_PRINT (yyss, yyssp);
8249 while (yyssp != yyss)
8251 yydestruct ("Cleanup: popping",
8252 yystos[*yyssp], yyvsp);
8257 YYSTACK_FREE (yyss);
8260 if (yymsg != yymsgbuf)
8261 YYSTACK_FREE (yymsg);
8263 /* Make sure YYID is used. */
8264 return YYID (yyresult);