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 namespace_list_t*active_namespaces;
377 char has_own_imports;
378 char new_vars; // e.g. transition between two functions
381 methodstate_t*method;
388 typedef struct _global {
392 dict_t*file2token2info;
395 static global_t*global = 0;
396 static state_t* state = 0;
400 #define MULTINAME(m,x) \
404 registry_fill_multiname(&m, &m##_ns, (slotinfo_t*)(x));
406 #define MEMBER_MULTINAME(m,f,n) \
410 if((m##_ns.access = ((slotinfo_t*)(f))->access)==ACCESS_NAMESPACE) \
411 m##_ns.name = ((slotinfo_t*)(f))->package; \
416 m.namespace_set = 0; \
417 m.name = ((slotinfo_t*)(f))->name; \
419 m.type = MULTINAME; \
421 m.namespace_set = &nopackage_namespace_set; \
425 /* warning: list length of namespace set is undefined */
426 #define MULTINAME_LATE(m, access, package) \
427 namespace_t m##_ns = {access, package}; \
428 namespace_set_t m##_nsset; \
429 namespace_list_t m##_l;m##_l.next = 0; \
430 m##_nsset.namespaces = &m##_l; \
431 m##_nsset = m##_nsset; \
432 m##_l.namespace = &m##_ns; \
433 multiname_t m = {MULTINAMEL, 0, &m##_nsset, 0};
435 static namespace_t ns1 = {ACCESS_PRIVATE, ""};
436 static namespace_t ns2 = {ACCESS_PROTECTED, ""};
437 static namespace_t ns3 = {ACCESS_PACKAGEINTERNAL, ""};
438 static namespace_t ns4 = {ACCESS_PACKAGE, ""};
439 static namespace_list_t nl4 = {&ns4,0};
440 static namespace_list_t nl3 = {&ns3,&nl4};
441 static namespace_list_t nl2 = {&ns2,&nl3};
442 static namespace_list_t nl1 = {&ns1,&nl2};
443 static namespace_set_t nopackage_namespace_set = {&nl1};
445 static void new_state()
448 state_t*oldstate = state;
450 memcpy(s, state, sizeof(state_t)); //shallow copy
452 s->imports = dict_new();
456 state->has_own_imports = 0;
457 state->vars = dict_new();
458 state->old = oldstate;
461 static void state_has_imports()
463 state->wildcard_imports = list_clone(state->wildcard_imports);
464 state->imports = dict_clone(state->imports);
465 state->has_own_imports = 1;
468 static void state_destroy(state_t*state)
470 if(state->has_own_imports) {
471 list_free(state->wildcard_imports);
472 dict_destroy(state->imports);state->imports=0;
474 if(state->imports && (!state->old || state->old->imports!=state->imports)) {
475 dict_destroy(state->imports);state->imports=0;
479 for(t=0;t<state->vars->hashsize;t++) {
480 dictentry_t*e =state->vars->slots[t];
482 free(e->data);e->data=0;
486 dict_destroy(state->vars);state->vars=0;
492 static void old_state()
494 if(!state || !state->old)
495 syntaxerror("invalid nesting");
496 state_t*leaving = state;
500 if(as3_pass>1 && leaving->method && leaving->method != state->method && !leaving->method->inner) {
501 free(leaving->method);
504 if(as3_pass>1 && leaving->cls && leaving->cls != state->cls) {
509 state_destroy(leaving);
512 static code_t* method_header(methodstate_t*m);
513 static code_t* wrap_function(code_t*c,code_t*header, code_t*body);
514 static void function_initvars(methodstate_t*m, params_t*params, int flags, char var0);
517 static char* internal_filename_package = 0;
518 void initialize_file(char*filename)
521 syntaxerror("invalid call to initialize_file during parsing of another file");
524 state->package = internal_filename_package = strdup(filename);
526 global->token2info = dict_lookup(global->file2token2info,
527 current_filename // use long version
529 if(!global->token2info) {
530 global->token2info = dict_new2(&ptr_type);
531 dict_put(global->file2token2info, current_filename, global->token2info);
535 state->method = rfx_calloc(sizeof(methodstate_t));
536 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
538 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
539 function_initvars(state->method, 0, 0, 1);
540 global->init = abc_initscript(global->file);
541 state->method->late_binding = 1; // init scripts use getglobalscope, so we need a getlocal0/pushscope
547 if(!state || state->level!=1) {
548 syntaxerror("unexpected end of file in pass %d", as3_pass);
552 code_t*header = method_header(state->method);
553 code_t*c = wrap_function(header, 0, global->init->method->body->code);
554 global->init->method->body->code = c;
555 free(state->method);state->method=0;
558 //free(state->package);state->package=0; // used in registry
559 state_destroy(state);state=0;
562 void initialize_parser()
564 global = rfx_calloc(sizeof(global_t));
565 global->file = abc_file_new();
566 global->file->flags &= ~ABCFILE_LAZY;
567 global->file2token2info = dict_new();
568 global->token2info = 0;
571 void* finish_parser()
573 dict_free_all(global->file2token2info, 1, (void*)dict_destroy);
575 global->token2info=0;
581 static void xx_scopetest()
583 /* findpropstrict doesn't just return a scope object- it
584 also makes it "active" somehow. Push local_0 on the
585 scope stack and read it back with findpropstrict, it'll
586 contain properties like "trace". Trying to find the same
587 property on a "vanilla" local_0 yields only a "undefined" */
588 //c = abc_findpropstrict(c, "[package]::trace");
590 /*c = abc_getlocal_0(c);
591 c = abc_findpropstrict(c, "[package]::trace");
593 c = abc_setlocal_1(c);
595 c = abc_pushbyte(c, 0);
596 c = abc_setlocal_2(c);
598 code_t*xx = c = abc_label(c);
599 c = abc_findpropstrict(c, "[package]::trace");
600 c = abc_pushstring(c, "prop:");
601 c = abc_hasnext2(c, 1, 2);
603 c = abc_setlocal_3(c);
604 c = abc_callpropvoid(c, "[package]::trace", 2);
605 c = abc_getlocal_3(c);
607 c = abc_iftrue(c,xx);*/
610 typedef struct _variable {
614 methodstate_t*is_inner_method;
617 static variable_t* find_variable(state_t*s, char*name)
621 v = dict_lookup(s->vars, name);
623 if(s->new_vars) break;
628 static variable_t* find_slot(state_t*s, const char*name)
630 if(s->method && s->method->slots)
631 return dict_lookup(s->method->slots, name);
635 static variable_t* find_variable_safe(state_t*s, char*name)
637 variable_t* v = find_variable(s, name);
639 syntaxerror("undefined variable: %s", name);
642 static char variable_exists(char*name)
644 return dict_contains(state->vars, name);
646 code_t*defaultvalue(code_t*c, classinfo_t*type);
648 static variable_t* new_variable2(const char*name, classinfo_t*type, char init, char maybeslot)
651 variable_t*v = find_slot(state, name);
657 v->index = state->method->variable_count++;
661 dict_put(state->vars, name, v);
665 static int new_variable(const char*name, classinfo_t*type, char init, char maybeslot)
667 return new_variable2(name, type, init, maybeslot)->index;
670 #define TEMPVARNAME "__as3_temp__"
671 static int gettempvar()
673 variable_t*v = find_variable(state, TEMPVARNAME);
676 return new_variable(TEMPVARNAME, 0, 0, 0);
679 code_t* var_block(code_t*body)
685 for(t=0;t<state->vars->hashsize;t++) {
686 dictentry_t*e = state->vars->slots[t];
688 variable_t*v = (variable_t*)e->data;
689 if(v->type && v->init) {
690 c = defaultvalue(c, v->type);
691 c = abc_setlocal(c, v->index);
692 k = abc_kill(k, v->index);
702 if(x->opcode== OPCODE___BREAK__ ||
703 x->opcode== OPCODE___CONTINUE__) {
704 /* link kill code before break/continue */
705 code_t*e = code_dup(k);
706 code_t*s = code_start(e);
718 c = code_append(c, body);
719 c = code_append(c, k);
723 void unknown_variable(char*name)
725 if(!state->method->unresolved_variables)
726 state->method->unresolved_variables = dict_new();
727 if(!dict_contains(state->method->unresolved_variables, name))
728 dict_put(state->method->unresolved_variables, name, 0);
731 #define parserassert(b) {if(!(b)) parsererror(__FILE__, __LINE__,__func__);}
733 static void parsererror(const char*file, int line, const char*f)
735 syntaxerror("internal error in %s, %s:%d", f, file, line);
739 static code_t* method_header(methodstate_t*m)
742 if(m->uses_slots || (m->late_binding && !m->inner)) {
743 c = abc_getlocal_0(c);
744 c = abc_pushscope(c);
747 c = abc_newactivation(c);
748 c = abc_pushscope(c);
750 methodstate_list_t*l = m->innerfunctions;
752 parserassert(l->methodstate->abc);
753 if(m->uses_slots && l->methodstate->is_a_slot) {
754 c = abc_getscopeobject(c, 1);
755 c = abc_newfunction(c, l->methodstate->abc);
757 c = abc_setlocal(c, l->methodstate->var_index);
758 c = abc_setslot(c, l->methodstate->slot_index);
760 c = abc_newfunction(c, l->methodstate->abc);
761 c = abc_setlocal(c, l->methodstate->var_index);
763 free(l->methodstate);l->methodstate=0;
767 c = code_append(c, m->header);
770 if(m->is_constructor && !m->has_super) {
771 // call default constructor
772 c = abc_getlocal_0(c);
773 c = abc_constructsuper(c, 0);
775 list_free(m->innerfunctions);
776 m->innerfunctions = 0;
781 static code_t* wrap_function(code_t*c,code_t*header, code_t*body)
783 c = code_append(c, header);
784 c = code_append(c, var_block(body));
785 /* append return if necessary */
786 if(!c || (c->opcode != OPCODE_RETURNVOID &&
787 c->opcode != OPCODE_RETURNVALUE)) {
788 c = abc_returnvoid(c);
794 static void startpackage(char*name)
797 /*printf("entering package \"%s\"\n", name);*/
798 state->package = strdup(name);
800 static void endpackage()
802 /*printf("leaving package \"%s\"\n", state->package);*/
804 //used e.g. in classinfo_register:
805 //free(state->package);state->package=0;
810 #define FLAG_PUBLIC 256
811 #define FLAG_PROTECTED 512
812 #define FLAG_PRIVATE 1024
813 #define FLAG_PACKAGEINTERNAL 2048
814 #define FLAG_NAMESPACE 4096
816 static namespace_t modifiers2access(modifiers_t*mod)
821 if(mod->flags&FLAG_NAMESPACE) {
822 if(mod->flags&(FLAG_PRIVATE|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
823 syntaxerror("invalid combination of access levels and namespaces");
824 ns.access = ACCESS_NAMESPACE;
826 } else if(mod->flags&FLAG_PUBLIC) {
827 if(mod->flags&(FLAG_PRIVATE|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
828 syntaxerror("invalid combination of access levels");
829 ns.access = ACCESS_PACKAGE;
830 } else if(mod->flags&FLAG_PRIVATE) {
831 if(mod->flags&(FLAG_PUBLIC|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
832 syntaxerror("invalid combination of access levels");
833 ns.access = ACCESS_PRIVATE;
834 } else if(mod->flags&FLAG_PROTECTED) {
835 if(mod->flags&(FLAG_PUBLIC|FLAG_PRIVATE|FLAG_PACKAGEINTERNAL))
836 syntaxerror("invalid combination of access levels");
837 ns.access = ACCESS_PROTECTED;
839 ns.access = ACCESS_PACKAGEINTERNAL;
844 static void function_initvars(methodstate_t*m, params_t*params, int flags, char var0)
849 index = new_variable("this", 0, 0, 0);
850 else if(!m->is_global)
851 index = new_variable((flags&FLAG_STATIC)?"class":"this", state->cls?state->cls->info:0, 0, 0);
853 index = new_variable("globalscope", 0, 0, 0);
856 parserassert(!index);
859 /* as variables and slots share the same number, make sure
860 that those variable indices are reserved. It's up to the
861 optimizer to later shuffle the variables down to lower
863 m->variable_count = m->uses_slots;
868 for(p=params->list;p;p=p->next) {
869 new_variable(p->param->name, p->param->type, 0, 1);
873 methodstate_list_t*l = m->innerfunctions;
875 methodstate_t*m = l->methodstate;
876 variable_t* v = new_variable2(m->info->name, TYPE_FUNCTION(m->info), 0, 1);
877 m->var_index = v->index;
878 m->slot_index = v->index;
879 v->is_inner_method = m;
885 char*as3_globalclass=0;
886 static void startclass(modifiers_t* mod, char*classname, classinfo_t*extends, classinfo_list_t*implements)
889 syntaxerror("inner classes now allowed");
893 classinfo_list_t*mlist=0;
895 if(mod->flags&~(FLAG_PACKAGEINTERNAL|FLAG_PUBLIC|FLAG_FINAL|FLAG_DYNAMIC|FLAG_INTERFACE))
896 syntaxerror("invalid modifier(s)");
898 if((mod->flags&(FLAG_PUBLIC|FLAG_PACKAGEINTERNAL)) == (FLAG_PUBLIC|FLAG_PACKAGEINTERNAL))
899 syntaxerror("public and internal not supported at the same time.");
901 /* create the class name, together with the proper attributes */
905 if(!(mod->flags&FLAG_PUBLIC) && state->package==internal_filename_package) {
906 access = ACCESS_PRIVATE; package = internal_filename_package;
907 } else if(!(mod->flags&FLAG_PUBLIC) && state->package!=internal_filename_package) {
908 access = ACCESS_PACKAGEINTERNAL; package = state->package;
909 } else if(state->package!=internal_filename_package) {
910 access = ACCESS_PACKAGE; package = state->package;
912 syntaxerror("public classes only allowed inside a package");
916 state->cls = rfx_calloc(sizeof(classstate_t));
917 state->cls->init = rfx_calloc(sizeof(methodstate_t));
918 state->cls->static_init = rfx_calloc(sizeof(methodstate_t));
919 /* notice: we make no effort to initialize the top variable (local0) here,
920 even though it has special meaning. We just rely on the facat
921 that pass 1 won't do anything with variables */
923 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->cls);
925 /* set current method to constructor- all code within the class-level (except
926 static variable initializations) will be executed during construction time */
927 state->method = state->cls->init;
929 if(registry_find(package, classname)) {
930 syntaxerror("Package \"%s\" already contains a class called \"%s\"", package, classname);
932 /* build info struct */
933 int num_interfaces = (list_length(implements));
934 state->cls->info = classinfo_register(access, package, classname, num_interfaces);
935 state->cls->info->flags |= mod->flags & (FLAG_DYNAMIC|FLAG_INTERFACE|FLAG_FINAL);
939 state->cls = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
941 state->method = state->cls->init;
942 parserassert(state->cls && state->cls->info);
944 function_initvars(state->cls->init, 0, 0, 1);
945 function_initvars(state->cls->static_init, 0, 0, 0);
947 if(extends && (extends->flags & FLAG_FINAL))
948 syntaxerror("Can't extend final class '%s'", extends->name);
950 /* fill out interfaces and extends (we couldn't resolve those during the first pass) */
951 state->cls->info->superclass = extends?extends:TYPE_OBJECT;
953 classinfo_list_t*l = implements;
954 for(l=implements;l;l=l->next) {
955 if(!(l->classinfo->flags & FLAG_INTERFACE))
956 syntaxerror("'%s' is not an interface", l->classinfo->name);
957 state->cls->info->interfaces[pos++] = l->classinfo;
960 /* generate the abc code for this class */
961 MULTINAME(classname2,state->cls->info);
962 multiname_t*extends2 = sig2mname(extends);
964 state->cls->abc = abc_class_new(global->file, &classname2, extends2);
965 if(state->cls->info->flags&FLAG_FINAL) abc_class_final(state->cls->abc);
966 if(!(state->cls->info->flags&FLAG_DYNAMIC)) abc_class_sealed(state->cls->abc);
967 if(state->cls->info->flags&FLAG_INTERFACE) {
968 abc_class_interface(state->cls->abc);
971 abc_class_protectedNS(state->cls->abc, classname);
973 for(mlist=implements;mlist;mlist=mlist->next) {
974 MULTINAME(m, mlist->classinfo);
975 abc_class_add_interface(state->cls->abc, &m);
978 /* write the construction code for this class to the global init
980 int slotindex = abc_initscript_addClassTrait(global->init, &classname2, state->cls->abc);
982 abc_method_body_t*m = global->init->method->body;
983 __ getglobalscope(m);
984 classinfo_t*s = extends;
989 //TODO: take a look at the current scope stack, maybe
990 // we can re-use something
995 multiname_t*s2 = sig2mname(s);
997 multiname_destroy(s2);
999 __ pushscope(m); count++;
1000 m->code = m->code->prev->prev; // invert
1002 /* continue appending after last op end */
1003 while(m->code && m->code->next) m->code = m->code->next;
1005 /* TODO: if this is one of *our* classes, we can also
1006 do a getglobalscope/getslot <nr> (which references
1007 the init function's slots) */
1009 __ getlex2(m, extends2);
1011 /* notice: we get a Verify Error #1107 if the top elemnt on the scope
1012 stack is not the superclass */
1013 __ pushscope(m);count++;
1016 /* notice: we get a verify error #1107 if the top element on the scope
1017 stack is not the global object */
1019 __ pushscope(m);count++;
1021 __ newclass(m,state->cls->abc);
1025 __ setslot(m, slotindex);
1026 multiname_destroy(extends2);
1028 /* flash.display.MovieClip handling */
1030 if(!as3_globalclass && (mod->flags&FLAG_PUBLIC) && slotinfo_equals((slotinfo_t*)registry_getMovieClip(),(slotinfo_t*)extends)) {
1031 if(state->package && state->package[0]) {
1032 as3_globalclass = concat3(state->package, ".", classname);
1034 as3_globalclass = strdup(classname);
1040 static int slotstate_varconst = 0;
1041 static modifiers_t*slotstate_flags = 0;
1042 static void setslotstate(modifiers_t* flags, int varconst)
1044 slotstate_varconst = varconst;
1045 slotstate_flags = flags;
1047 if(flags && flags->flags&FLAG_STATIC) {
1048 state->method = state->cls->static_init;
1050 state->method = state->cls->init;
1053 parserassert(state->method);
1057 static void endclass()
1060 if(!state->cls->has_constructor && !(state->cls->info->flags&FLAG_INTERFACE)) {
1062 c = abc_getlocal_0(c);
1063 c = abc_constructsuper(c, 0);
1064 state->cls->init->header = code_append(state->cls->init->header, c);
1065 state->cls->has_constructor=1;
1067 if(state->cls->init) {
1068 if(state->cls->info->flags&FLAG_INTERFACE) {
1069 if(state->cls->init->header)
1070 syntaxerror("interface can not have class-level code");
1072 abc_method_t*m = abc_class_getconstructor(state->cls->abc, 0);
1073 code_t*c = method_header(state->cls->init);
1074 m->body->code = wrap_function(c, 0, m->body->code);
1077 if(state->cls->static_init) {
1078 abc_method_t*m = abc_class_getstaticconstructor(state->cls->abc, 0);
1079 code_t*c = method_header(state->cls->static_init);
1080 m->body->code = wrap_function(c, 0, m->body->code);
1087 void check_code_for_break(code_t*c)
1090 if(c->opcode == OPCODE___BREAK__) {
1091 char*name = string_cstr(c->data[0]);
1092 syntaxerror("Unresolved \"break %s\"", name);
1094 if(c->opcode == OPCODE___CONTINUE__) {
1095 char*name = string_cstr(c->data[0]);
1096 syntaxerror("Unresolved \"continue %s\"", name);
1103 static void check_constant_against_type(classinfo_t*t, constant_t*c)
1105 #define xassert(b) if(!(b)) syntaxerror("Invalid default value %s for type '%s'", constant_tostring(c), t->name)
1106 if(TYPE_IS_NUMBER(t)) {
1107 xassert(c->type == CONSTANT_FLOAT
1108 || c->type == CONSTANT_INT
1109 || c->type == CONSTANT_UINT);
1110 } else if(TYPE_IS_UINT(t)) {
1111 xassert(c->type == CONSTANT_UINT ||
1112 (c->type == CONSTANT_INT && c->i>=0));
1113 } else if(TYPE_IS_INT(t)) {
1114 xassert(c->type == CONSTANT_INT);
1115 } else if(TYPE_IS_BOOLEAN(t)) {
1116 xassert(c->type == CONSTANT_TRUE
1117 || c->type == CONSTANT_FALSE);
1121 static void check_override(memberinfo_t*m, int flags)
1125 if(m->parent == state->cls->info)
1126 syntaxerror("class '%s' already contains a method/slot '%s'", m->parent->name, m->name);
1128 syntaxerror("internal error: overriding method %s, which doesn't have parent", m->name);
1129 if(m->access==ACCESS_PRIVATE)
1131 if(m->flags & FLAG_FINAL)
1132 syntaxerror("can't override final member %s", m->name);
1133 if((m->flags & FLAG_STATIC) && !(flags&FLAG_STATIC))
1134 syntaxerror("can't override static member %s", m->name);
1135 if(!(m->flags & FLAG_STATIC) && (flags&FLAG_STATIC))
1136 syntaxerror("can't override non-static member %s with static declaration", m->name);
1138 if(!(flags&FLAG_OVERRIDE)) {
1139 if(m->parent && !(m->parent->flags&FLAG_INTERFACE)) {
1140 if(m->kind == INFOTYPE_METHOD)
1141 syntaxerror("can't override without explicit 'override' declaration");
1143 syntaxerror("can't override '%s'", m->name);
1148 static methodinfo_t*registerfunction(enum yytokentype getset, modifiers_t*mod, char*name, params_t*params, classinfo_t*return_type, int slot)
1150 methodinfo_t*minfo = 0;
1151 namespace_t ns = modifiers2access(mod);
1154 minfo = methodinfo_register_global(ns.access, state->package, name);
1155 minfo->return_type = 0; // save this for pass 2
1156 } else if(getset != KW_GET && getset != KW_SET) {
1158 memberinfo_t* m = registry_findmember(state->cls->info, ns.name, name, 0);
1160 printf("%s.%s | %s.%s\n",
1161 m->package, m->name,
1163 syntaxerror("class already contains a %s '%s'", infotypename((slotinfo_t*)m), m->name);
1165 minfo = methodinfo_register_onclass(state->cls->info, ns.access, ns.name, name);
1166 minfo->return_type = 0; // save this for pass 2
1167 // getslot on a member slot only returns "undefined", so no need
1168 // to actually store these
1169 //state->minfo->slot = state->method->abc->method->trait->slot_id;
1171 //class getter/setter
1172 int gs = getset==KW_GET?SUBTYPE_GET:SUBTYPE_SET;
1174 if(getset == KW_GET) {
1176 } else if(params->list && params->list->param && !params->list->next) {
1177 type = params->list->param->type;
1179 syntaxerror("setter function needs to take exactly one argument");
1180 // not sure wether to look into superclasses here, too
1181 minfo = (methodinfo_t*)registry_findmember(state->cls->info, ns.name, name, 1);
1183 if(minfo->kind!=INFOTYPE_SLOT)
1184 syntaxerror("class already contains a method called '%s'", name);
1185 if(!(minfo->subtype & (SUBTYPE_GETSET)))
1186 syntaxerror("class already contains a field called '%s'", name);
1187 if(minfo->subtype & gs)
1188 syntaxerror("getter/setter for '%s' already defined", name);
1189 /* make a setter or getter into a getset */
1190 minfo->subtype |= gs;
1193 FIXME: this check needs to be done in pass 2
1195 if((!minfo->return_type != !type) ||
1196 (minfo->return_type && type &&
1197 !strcmp(minfo->return_type->name, type->name))) {
1198 syntaxerror("different type in getter and setter: %s and %s",
1199 minfo->return_type?minfo->return_type->name:"*",
1200 type?type->name:"*");
1203 minfo = methodinfo_register_onclass(state->cls->info, ns.access, ns.name, name);
1204 minfo->kind = INFOTYPE_SLOT; //hack
1205 minfo->subtype = gs;
1206 minfo->return_type = 0;
1208 /* can't assign a slot as getter and setter might have different slots */
1209 //minfo->slot = slot;
1211 if(mod->flags&FLAG_FINAL) minfo->flags |= FLAG_FINAL;
1212 if(mod->flags&FLAG_STATIC) minfo->flags |= FLAG_STATIC;
1213 if(mod->flags&FLAG_OVERRIDE) minfo->flags |= FLAG_OVERRIDE;
1218 static void innerfunction(char*name, params_t*params, classinfo_t*return_type)
1220 //parserassert(state->method && state->method->info);
1222 methodstate_t*parent_method = state->method;
1225 return_type = 0; // not valid in pass 1
1229 state->new_vars = 1;
1232 state->method = rfx_calloc(sizeof(methodstate_t));
1233 state->method->inner = 1;
1234 state->method->variable_count = 0;
1235 state->method->abc = rfx_calloc(sizeof(abc_method_t));
1237 NEW(methodinfo_t,minfo);
1238 minfo->kind = INFOTYPE_METHOD;
1239 minfo->access = ACCESS_PACKAGEINTERNAL;
1241 state->method->info = minfo;
1244 list_append(parent_method->innerfunctions, state->method);
1246 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
1248 function_initvars(state->method, params, 0, 1);
1252 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1253 state->method->variable_count = 0;
1254 parserassert(state->method);
1256 state->method->info->return_type = return_type;
1257 function_initvars(state->method, params, 0, 1);
1261 static void startfunction(modifiers_t*mod, enum yytokentype getset, char*name,
1262 params_t*params, classinfo_t*return_type)
1264 if(state->method && state->method->info) {
1265 syntaxerror("not able to start another method scope");
1268 state->new_vars = 1;
1271 state->method = rfx_calloc(sizeof(methodstate_t));
1272 state->method->has_super = 0;
1275 state->method->is_constructor = !strcmp(state->cls->info->name,name);
1277 state->method->is_global = 1;
1278 state->method->late_binding = 1; // for global methods, always push local_0 on the scope stack
1280 if(state->method->is_constructor)
1281 name = "__as3_constructor__";
1283 state->method->info = registerfunction(getset, mod, name, params, return_type, 0);
1285 function_initvars(state->method, params, mod->flags, 1);
1287 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
1291 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1292 state->method->variable_count = 0;
1293 parserassert(state->method);
1296 memberinfo_t*m = registry_findmember(state->cls->info, mod->ns, name, 2);
1297 check_override(m, mod->flags);
1301 state->cls->has_constructor |= state->method->is_constructor;
1304 state->method->info->return_type = return_type;
1305 function_initvars(state->method, params, mod->flags, 1);
1309 static abc_method_t* endfunction(modifiers_t*mod, enum yytokentype getset, char*name,
1310 params_t*params, classinfo_t*return_type, code_t*body)
1312 int flags = mod?mod->flags:0;
1315 // store inner methods in variables
1316 function_initvars(state->method, 0, 0, 0);
1318 methodstate_list_t*ml = state->method->innerfunctions;
1319 dict_t*xvars = dict_new();
1321 methodstate_t*m = ml->methodstate;
1322 parserassert(m->inner);
1323 if(m->unresolved_variables) {
1324 dict_t*d = m->unresolved_variables;
1326 for(t=0;t<d->hashsize;t++) {
1327 dictentry_t*l = d->slots[t];
1329 /* check parent method's variables */
1330 if(find_variable(state, l->key)) {
1331 m->uses_parent_function = 1;
1332 state->method->uses_slots = 1;
1333 dict_put(xvars, l->key, 0);
1340 dict_destroy(m->unresolved_variables);
1341 m->unresolved_variables = 0;
1345 if(state->method->uses_slots) {
1346 state->method->slots = dict_new();
1348 DICT_ITERATE_ITEMS(state->vars, char*, name, variable_t*, v) {
1349 if(v->index && dict_contains(xvars, name)) {
1352 if(v->is_inner_method) {
1353 v->is_inner_method->is_a_slot = 1;
1356 dict_put(state->method->slots, name, v);
1359 state->method->uses_slots = i;
1360 dict_destroy(state->vars);state->vars = 0;
1362 dict_destroy(xvars);
1369 /*if(state->method->uses_parent_function){
1370 syntaxerror("accessing variables of parent function from inner functions not supported yet");
1375 multiname_t*type2 = sig2mname(return_type);
1377 if(state->method->inner) {
1378 f = state->method->abc;
1379 abc_method_init(f, global->file, type2, 1);
1380 } else if(state->method->is_constructor) {
1381 f = abc_class_getconstructor(state->cls->abc, type2);
1382 } else if(!state->method->is_global) {
1383 namespace_t mname_ns = {state->method->info->access, ""};
1384 multiname_t mname = {QNAME, &mname_ns, 0, name};
1386 if(flags&FLAG_STATIC)
1387 f = abc_class_staticmethod(state->cls->abc, type2, &mname);
1389 f = abc_class_method(state->cls->abc, type2, &mname);
1390 slot = f->trait->slot_id;
1392 namespace_t mname_ns = {state->method->info->access, state->package};
1393 multiname_t mname = {QNAME, &mname_ns, 0, name};
1395 f = abc_method_new(global->file, type2, 1);
1396 trait_t*t = trait_new_method(&global->init->traits, multiname_clone(&mname), f);
1397 //abc_code_t*c = global->init->method->body->code;
1399 //flash doesn't seem to allow us to access function slots
1400 //state->method->info->slot = slot;
1402 if(flags&FLAG_OVERRIDE) f->trait->attributes |= TRAIT_ATTR_OVERRIDE;
1403 if(getset == KW_GET) f->trait->kind = TRAIT_GETTER;
1404 if(getset == KW_SET) f->trait->kind = TRAIT_SETTER;
1405 if(params->varargs) f->flags |= METHOD_NEED_REST;
1409 for(p=params->list;p;p=p->next) {
1410 if(params->varargs && !p->next) {
1411 break; //varargs: omit last parameter in function signature
1413 multiname_t*m = sig2mname(p->param->type);
1414 list_append(f->parameters, m);
1415 if(p->param->value) {
1416 check_constant_against_type(p->param->type, p->param->value);
1417 opt=1;list_append(f->optional_parameters, p->param->value);
1419 syntaxerror("non-optional parameter not allowed after optional parameters");
1422 if(state->method->slots) {
1423 DICT_ITERATE_ITEMS(state->method->slots, char*, name, variable_t*, v) {
1425 multiname_t*mname = multiname_new(namespace_new(ACCESS_PACKAGE, ""), name);
1426 multiname_t*type = sig2mname(v->type);
1427 trait_t*t = trait_new_member(&f->body->traits, type, mname, 0);
1428 t->slot_id = v->index;
1433 check_code_for_break(body);
1435 if(state->method->exceptions &&
1436 (state->method->late_binding || state->method->uses_slots))
1437 syntaxerror("try/catch and activation or late binding not supported yet within the same method");
1440 f->body->code = body;
1441 f->body->exceptions = state->method->exceptions;
1442 } else { //interface
1444 syntaxerror("interface methods can't have a method body");
1454 char is_subtype_of(classinfo_t*type, classinfo_t*supertype)
1459 void breakjumpsto(code_t*c, char*name, code_t*jump)
1462 if(c->opcode == OPCODE___BREAK__) {
1463 string_t*name2 = c->data[0];
1464 if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1465 c->opcode = OPCODE_JUMP;
1472 void continuejumpsto(code_t*c, char*name, code_t*jump)
1475 if(c->opcode == OPCODE___CONTINUE__) {
1476 string_t*name2 = c->data[0];
1477 if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1478 c->opcode = OPCODE_JUMP;
1486 #define IS_INT(a) (TYPE_IS_INT((a)) || TYPE_IS_UINT((a)))
1487 #define IS_NUMBER_OR_INT(a) (TYPE_IS_INT((a)) || TYPE_IS_UINT((a)) || TYPE_IS_NUMBER((a)))
1488 #define BOTH_INT(a,b) (IS_INT(a) && IS_INT(b))
1490 classinfo_t*join_types(classinfo_t*type1, classinfo_t*type2, char op)
1492 if(!type1 || !type2)
1493 return registry_getanytype();
1494 if(TYPE_IS_ANY(type1) || TYPE_IS_ANY(type2))
1495 return registry_getanytype();
1498 if(IS_NUMBER_OR_INT(type1) && IS_NUMBER_OR_INT(type2)) {
1507 return registry_getanytype();
1509 code_t*converttype(code_t*c, classinfo_t*from, classinfo_t*to)
1514 return abc_coerce_a(c);
1518 // cast an "any" type to a specific type. subject to
1519 // runtime exceptions
1520 return abc_coerce2(c, &m);
1523 if((TYPE_IS_NUMBER(from) || TYPE_IS_UINT(from) || TYPE_IS_INT(from)) &&
1524 (TYPE_IS_NUMBER(to) || TYPE_IS_UINT(to) || TYPE_IS_INT(to))) {
1525 // allow conversion between number types
1526 return abc_coerce2(c, &m);
1528 //printf("%s.%s\n", from.package, from.name);
1529 //printf("%s.%s\n", to.package, to.name);
1531 classinfo_t*supertype = from;
1533 if(supertype == to) {
1534 // target type is one of from's superclasses
1535 return abc_coerce2(c, &m);
1538 while(supertype->interfaces[t]) {
1539 if(supertype->interfaces[t]==to) {
1540 // target type is one of from's interfaces
1541 return abc_coerce2(c, &m);
1545 supertype = supertype->superclass;
1547 if(TYPE_IS_FUNCTION(from) && TYPE_IS_FUNCTION(to))
1549 if(TYPE_IS_CLASS(from) && TYPE_IS_CLASS(to))
1551 if(TYPE_IS_NULL(from) && !IS_NUMBER_OR_INT(to))
1554 as3_error("can't convert type %s%s%s to %s%s%s",
1555 from->package, from->package?".":"", from->name,
1556 to->package, to->package?".":"", to->name);
1560 code_t*defaultvalue(code_t*c, classinfo_t*type)
1562 if(TYPE_IS_INT(type)) {
1563 c = abc_pushbyte(c, 0);
1564 } else if(TYPE_IS_UINT(type)) {
1565 c = abc_pushuint(c, 0);
1566 } else if(TYPE_IS_FLOAT(type)) {
1568 } else if(TYPE_IS_BOOLEAN(type)) {
1569 c = abc_pushfalse(c);
1571 //c = abc_pushundefined(c);
1573 c = abc_pushnull(c);
1575 c = abc_coerce2(c, &m);
1580 char is_pushundefined(code_t*c)
1582 return (c && !c->prev && !c->next && c->opcode == OPCODE_PUSHUNDEFINED);
1585 static slotinfo_t* find_class(char*name)
1589 c = registry_find(state->package, name);
1592 /* try explicit imports */
1593 dictentry_t* e = dict_get_slot(state->imports, name);
1596 if(!strcmp(e->key, name)) {
1597 c = (slotinfo_t*)e->data;
1603 /* try package.* imports */
1604 import_list_t*l = state->wildcard_imports;
1606 //printf("does package %s contain a class %s?\n", l->import->package, name);
1607 c = registry_find(l->import->package, name);
1612 /* try global package */
1613 c = registry_find("", name);
1616 /* try local "filename" package */
1617 c = registry_find(internal_filename_package, name);
1623 static char is_getlocal(code_t*c)
1625 if(!c || c->prev || c->next)
1627 return(c->opcode == OPCODE_GETLOCAL
1628 || c->opcode == OPCODE_GETLOCAL_0
1629 || c->opcode == OPCODE_GETLOCAL_1
1630 || c->opcode == OPCODE_GETLOCAL_2
1631 || c->opcode == OPCODE_GETLOCAL_3);
1633 static int getlocalnr(code_t*c)
1635 if(c->opcode == OPCODE_GETLOCAL) {return (ptroff_t)c->data[0];}
1636 else if(c->opcode == OPCODE_GETLOCAL_0) {return 0;}
1637 else if(c->opcode == OPCODE_GETLOCAL_1) {return 1;}
1638 else if(c->opcode == OPCODE_GETLOCAL_2) {return 2;}
1639 else if(c->opcode == OPCODE_GETLOCAL_3) {return 3;}
1640 else syntaxerror("Internal error: opcode %02x is not a getlocal call", c->opcode);
1644 static code_t* toreadwrite(code_t*in, code_t*middlepart, char justassign, char readbefore)
1648 [prefix code] [read instruction]
1652 [prefix code] ([dup]) [read instruction] [middlepart] [setvar] [write instruction] [getvar]
1654 if(in && in->opcode == OPCODE_COERCE_A) {
1655 in = code_cutlast(in);
1658 syntaxerror("internal error");
1660 /* chop off read instruction */
1664 prefix = r->prev;r->prev = 0;
1670 char use_temp_var = readbefore;
1672 /* generate the write instruction, and maybe append a dup to the prefix code */
1673 code_t* write = abc_nop(0);
1674 if(r->opcode == OPCODE_GETPROPERTY) {
1675 write->opcode = OPCODE_SETPROPERTY;
1676 multiname_t*m = (multiname_t*)r->data[0];
1677 write->data[0] = multiname_clone(m);
1678 if(m->type == QNAME || m->type == MULTINAME) {
1680 prefix = abc_dup(prefix); // we need the object, too
1683 } else if(m->type == MULTINAMEL) {
1685 /* dupping two values on the stack requires 5 operations and one register-
1686 couldn't adobe just have given us a dup2? */
1687 int temp = gettempvar();
1688 prefix = abc_setlocal(prefix, temp);
1689 prefix = abc_dup(prefix);
1690 prefix = abc_getlocal(prefix, temp);
1691 prefix = abc_swap(prefix);
1692 prefix = abc_getlocal(prefix, temp);
1694 prefix = abc_kill(prefix, temp);
1698 syntaxerror("illegal lvalue: can't assign a value to this expression (not a qname/multiname)");
1700 } else if(r->opcode == OPCODE_GETSLOT) {
1701 write->opcode = OPCODE_SETSLOT;
1702 write->data[0] = r->data[0];
1704 prefix = abc_dup(prefix); // we need the object, too
1707 } else if(r->opcode == OPCODE_GETLOCAL) {
1708 write->opcode = OPCODE_SETLOCAL;
1709 write->data[0] = r->data[0];
1710 } else if(r->opcode == OPCODE_GETLOCAL_0) {
1711 write->opcode = OPCODE_SETLOCAL_0;
1712 } else if(r->opcode == OPCODE_GETLOCAL_1) {
1713 write->opcode = OPCODE_SETLOCAL_1;
1714 } else if(r->opcode == OPCODE_GETLOCAL_2) {
1715 write->opcode = OPCODE_SETLOCAL_2;
1716 } else if(r->opcode == OPCODE_GETLOCAL_3) {
1717 write->opcode = OPCODE_SETLOCAL_3;
1720 syntaxerror("illegal lvalue: can't assign a value to this expression");
1727 /* with getproperty/getslot, we have to be extra careful not
1728 to execute the read code twice, as it might have side-effects
1729 (e.g. if the property is in fact a setter/getter combination)
1731 So read the value, modify it, and write it again,
1732 using prefix only once and making sure (by using a temporary
1733 register) that the return value is what we just wrote */
1734 temp = gettempvar();
1735 c = code_append(c, prefix);
1736 c = code_append(c, r);
1739 c = abc_setlocal(c, temp);
1741 c = code_append(c, middlepart);
1744 c = abc_setlocal(c, temp);
1746 c = code_append(c, write);
1747 c = abc_getlocal(c, temp);
1748 c = abc_kill(c, temp);
1750 /* if we're allowed to execute the read code twice *and*
1751 the middlepart doesn't modify the code, things are easier.
1753 code_t* r2 = code_dup(r);
1754 //c = code_append(c, prefix);
1755 parserassert(!prefix);
1756 c = code_append(c, r);
1757 c = code_append(c, middlepart);
1758 c = code_append(c, write);
1759 c = code_append(c, r2);
1762 /* even smaller version: overwrite the value without reading
1766 c = code_append(c, prefix);
1769 c = code_append(c, middlepart);
1770 c = code_append(c, write);
1771 c = code_append(c, r);
1774 temp = gettempvar();
1776 c = code_append(c, prefix);
1778 c = code_append(c, middlepart);
1780 c = abc_setlocal(c, temp);
1781 c = code_append(c, write);
1782 c = abc_getlocal(c, temp);
1783 c = abc_kill(c, temp);
1789 char is_break_or_jump(code_t*c)
1793 if(c->opcode == OPCODE_JUMP ||
1794 c->opcode == OPCODE___BREAK__ ||
1795 c->opcode == OPCODE___CONTINUE__ ||
1796 c->opcode == OPCODE_THROW ||
1797 c->opcode == OPCODE_RETURNVOID ||
1798 c->opcode == OPCODE_RETURNVALUE) {
1805 #define IS_FINALLY_TARGET(op) \
1806 ((op) == OPCODE___CONTINUE__ || \
1807 (op) == OPCODE___BREAK__ || \
1808 (op) == OPCODE_RETURNVOID || \
1809 (op) == OPCODE_RETURNVALUE || \
1810 (op) == OPCODE___RETHROW__)
1812 static code_t* insert_finally_lookup(code_t*c, code_t*finally, int tempvar)
1814 #define NEED_EXTRA_STACK_ARG
1815 code_t*finally_label = abc_nop(0);
1816 NEW(lookupswitch_t, l);
1822 code_t*prev = i->prev;
1823 if(IS_FINALLY_TARGET(i->opcode)) {
1826 if(i->opcode == OPCODE___RETHROW__ ||
1827 i->opcode == OPCODE_RETURNVALUE) {
1828 if(i->opcode == OPCODE___RETHROW__)
1829 i->opcode = OPCODE_THROW;
1831 p = abc_coerce_a(p);
1832 p = abc_setlocal(p, tempvar);
1834 p = abc_pushbyte(p, count++);
1835 p = abc_jump(p, finally_label);
1836 code_t*target = p = abc_label(p);
1837 #ifdef NEED_EXTRA_STACK_ARG
1841 p = abc_getlocal(p, tempvar);
1844 p->next = i;i->prev = p;
1845 list_append(l->targets, target);
1851 c = abc_pushbyte(c, -1);
1852 c = code_append(c, finally_label);
1853 c = code_append(c, finally);
1855 #ifdef NEED_EXTRA_STACK_ARG
1858 c = abc_lookupswitch(c, l);
1859 c = l->def = abc_label(c);
1860 #ifdef NEED_EXTRA_STACK_ARG
1867 static code_t* insert_finally_simple(code_t*c, code_t*finally, int tempvar)
1871 code_t*prev = i->prev;
1872 if(IS_FINALLY_TARGET(i->opcode)) {
1873 if(i->opcode == OPCODE___RETHROW__)
1874 i->opcode = OPCODE_THROW;
1875 code_t*end = code_dup(finally);
1876 code_t*start = code_start(end);
1877 if(prev) prev->next = start;
1884 return code_append(c, finally);
1887 code_t* insert_finally(code_t*c, code_t*finally, int tempvar)
1893 int num_insertion_points=0;
1895 if(IS_FINALLY_TARGET(i->opcode))
1896 num_insertion_points++;
1903 if(i->branch || i->opcode == OPCODE_LOOKUPSWITCH) {
1908 int simple_version_cost = (1+num_insertion_points)*code_size;
1909 int lookup_version_cost = 4*num_insertion_points + 5;
1911 if(cantdup || simple_version_cost > lookup_version_cost) {
1912 printf("lookup %d > *%d*\n", simple_version_cost, lookup_version_cost);
1913 return insert_finally_lookup(c, finally, tempvar);
1915 printf("simple *%d* < %d\n", simple_version_cost, lookup_version_cost);
1916 return insert_finally_simple(c, finally, tempvar);
1920 #define PASS1 }} if(as3_pass == 1) {{
1921 #define PASS1END }} if(as3_pass == 2) {{
1922 #define PASS2 }} if(as3_pass == 2) {{
1923 #define PASS12 }} {{
1924 #define PASS12END }} if(as3_pass == 2) {{
1928 /* Line 273 of skeleton.m4 */
1929 #line 1930 "parser.tab.c"
1936 typedef YYTYPE_UINT8 yytype_uint8;
1938 typedef unsigned char yytype_uint8;
1942 typedef YYTYPE_INT8 yytype_int8;
1943 #elif (defined __STDC__ || defined __C99__FUNC__ \
1944 || defined __cplusplus || defined _MSC_VER)
1945 typedef signed char yytype_int8;
1947 typedef short int yytype_int8;
1950 #ifdef YYTYPE_UINT16
1951 typedef YYTYPE_UINT16 yytype_uint16;
1953 typedef unsigned short int yytype_uint16;
1957 typedef YYTYPE_INT16 yytype_int16;
1959 typedef short int yytype_int16;
1963 # ifdef __SIZE_TYPE__
1964 # define YYSIZE_T __SIZE_TYPE__
1965 # elif defined size_t
1966 # define YYSIZE_T size_t
1967 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
1968 || defined __cplusplus || defined _MSC_VER)
1969 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
1970 # define YYSIZE_T size_t
1972 # define YYSIZE_T unsigned int
1976 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
1981 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
1982 # define YY_(msgid) dgettext ("bison-runtime", msgid)
1986 # define YY_(msgid) msgid
1990 /* Suppress unused-variable warnings by "using" E. */
1991 #if ! defined lint || defined __GNUC__
1992 # define YYUSE(e) ((void) (e))
1994 # define YYUSE(e) /* empty */
1997 /* Identity function, used to suppress warnings about constant conditions. */
1999 # define YYID(n) (n)
2001 #if (defined __STDC__ || defined __C99__FUNC__ \
2002 || defined __cplusplus || defined _MSC_VER)
2015 #if ! defined yyoverflow || YYERROR_VERBOSE
2017 /* The parser invokes alloca or malloc; define the necessary symbols. */
2019 # ifdef YYSTACK_USE_ALLOCA
2020 # if YYSTACK_USE_ALLOCA
2022 # define YYSTACK_ALLOC __builtin_alloca
2023 # elif defined __BUILTIN_VA_ARG_INCR
2024 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
2026 # define YYSTACK_ALLOC __alloca
2027 # elif defined _MSC_VER
2028 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
2029 # define alloca _alloca
2031 # define YYSTACK_ALLOC alloca
2032 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
2033 || defined __cplusplus || defined _MSC_VER)
2034 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
2036 # define _STDLIB_H 1
2043 # ifdef YYSTACK_ALLOC
2044 /* Pacify GCC's `empty if-body' warning. */
2045 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
2046 # ifndef YYSTACK_ALLOC_MAXIMUM
2047 /* The OS might guarantee only one guard page at the bottom of the stack,
2048 and a page size can be as small as 4096 bytes. So we cannot safely
2049 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
2050 to allow for a few compiler-allocated temporary stack slots. */
2051 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
2054 # define YYSTACK_ALLOC YYMALLOC
2055 # define YYSTACK_FREE YYFREE
2056 # ifndef YYSTACK_ALLOC_MAXIMUM
2057 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
2059 # if (defined __cplusplus && ! defined _STDLIB_H \
2060 && ! ((defined YYMALLOC || defined malloc) \
2061 && (defined YYFREE || defined free)))
2062 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
2064 # define _STDLIB_H 1
2068 # define YYMALLOC malloc
2069 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
2070 || defined __cplusplus || defined _MSC_VER)
2071 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
2075 # define YYFREE free
2076 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
2077 || defined __cplusplus || defined _MSC_VER)
2078 void free (void *); /* INFRINGES ON USER NAME SPACE */
2082 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
2085 #if (! defined yyoverflow \
2086 && (! defined __cplusplus \
2087 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
2089 /* A type that is properly aligned for any stack member. */
2092 yytype_int16 yyss_alloc;
2096 /* The size of the maximum gap between one aligned stack and the next. */
2097 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
2099 /* The size of an array large to enough to hold all stacks, each with
2101 # define YYSTACK_BYTES(N) \
2102 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
2103 + YYSTACK_GAP_MAXIMUM)
2105 /* Copy COUNT objects from FROM to TO. The source and destination do
2108 # if defined __GNUC__ && 1 < __GNUC__
2109 # define YYCOPY(To, From, Count) \
2110 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
2112 # define YYCOPY(To, From, Count) \
2116 for (yyi = 0; yyi < (Count); yyi++) \
2117 (To)[yyi] = (From)[yyi]; \
2123 /* Relocate STACK from its old location to the new one. The
2124 local variables YYSIZE and YYSTACKSIZE give the old and new number of
2125 elements in the stack, and YYPTR gives the new location of the
2126 stack. Advance YYPTR to a properly aligned location for the next
2128 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
2131 YYSIZE_T yynewbytes; \
2132 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
2133 Stack = &yyptr->Stack_alloc; \
2134 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
2135 yyptr += yynewbytes / sizeof (*yyptr); \
2141 /* YYFINAL -- State number of the termination state. */
2143 /* YYLAST -- Last index in YYTABLE. */
2146 /* YYNTOKENS -- Number of terminals. */
2147 #define YYNTOKENS 134
2148 /* YYNNTS -- Number of nonterminals. */
2150 /* YYNRULES -- Number of rules. */
2151 #define YYNRULES 307
2152 /* YYNRULES -- Number of states. */
2153 #define YYNSTATES 519
2155 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
2156 #define YYUNDEFTOK 2
2157 #define YYMAXUTOK 363
2159 #define YYTRANSLATE(YYX) \
2160 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
2162 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
2163 static const yytype_uint8 yytranslate[] =
2165 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2166 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2167 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2168 2, 2, 2, 118, 2, 2, 2, 116, 108, 2,
2169 122, 133, 115, 113, 100, 112, 127, 114, 2, 2,
2170 2, 2, 2, 2, 2, 2, 2, 2, 105, 99,
2171 109, 102, 110, 104, 128, 2, 2, 2, 2, 2,
2172 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2173 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2174 2, 124, 2, 125, 107, 2, 2, 2, 2, 2,
2175 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2176 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2177 2, 2, 2, 126, 106, 132, 117, 2, 2, 2,
2178 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2179 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2180 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2181 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2182 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2183 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2184 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2185 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2186 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2187 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2188 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2189 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2190 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
2191 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
2192 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
2193 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
2194 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
2195 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
2196 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
2197 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
2198 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
2199 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
2200 95, 96, 97, 98, 101, 103, 111, 119, 120, 121,
2205 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
2207 static const yytype_uint16 yyprhs[] =
2209 0, 0, 3, 5, 6, 8, 10, 13, 15, 17,
2210 19, 21, 23, 25, 30, 32, 33, 35, 37, 40,
2211 42, 44, 46, 48, 50, 55, 57, 59, 60, 63,
2212 65, 67, 69, 71, 73, 75, 77, 79, 81, 83,
2213 85, 87, 89, 93, 96, 98, 100, 102, 104, 106,
2214 108, 110, 115, 118, 120, 122, 126, 129, 130, 133,
2215 136, 138, 142, 146, 147, 150, 151, 159, 160, 162,
2216 164, 168, 170, 173, 177, 186, 193, 194, 201, 202,
2217 210, 212, 215, 217, 220, 221, 223, 225, 228, 230,
2218 233, 238, 242, 243, 252, 253, 263, 264, 270, 272,
2219 275, 277, 280, 282, 283, 290, 293, 295, 301, 303,
2220 305, 309, 311, 312, 319, 320, 326, 329, 334, 335,
2221 337, 339, 342, 344, 346, 348, 350, 352, 354, 356,
2222 358, 360, 362, 363, 366, 367, 370, 371, 374, 375,
2223 385, 386, 395, 396, 398, 400, 403, 405, 410, 412,
2224 414, 416, 417, 419, 421, 424, 426, 429, 438, 440,
2225 442, 443, 448, 450, 454, 458, 459, 462, 464, 466,
2226 468, 470, 472, 474, 476, 478, 480, 481, 483, 486,
2227 491, 495, 497, 502, 505, 507, 509, 510, 511, 524,
2228 526, 527, 528, 539, 541, 545, 547, 549, 551, 555,
2229 557, 559, 561, 564, 565, 566, 570, 571, 573, 575,
2230 577, 580, 583, 584, 589, 594, 599, 602, 604, 607,
2231 609, 611, 615, 617, 619, 621, 623, 625, 627, 629,
2232 631, 633, 635, 637, 639, 641, 643, 645, 647, 649,
2233 651, 655, 659, 663, 667, 671, 675, 679, 683, 687,
2234 691, 694, 697, 701, 705, 709, 713, 717, 721, 725,
2235 729, 733, 737, 741, 745, 749, 753, 757, 762, 765,
2236 767, 771, 774, 779, 783, 784, 786, 790, 796, 800,
2237 804, 808, 812, 816, 820, 824, 828, 832, 836, 840,
2238 844, 850, 853, 856, 859, 862, 866, 869, 874, 880,
2239 884, 890, 894, 896, 899, 902, 907, 912
2242 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
2243 static const yytype_int16 yyrhs[] =
2245 135, 0, -1, 136, -1, -1, 137, -1, 138, -1,
2246 137, 138, -1, 185, -1, 197, -1, 195, -1, 216,
2247 -1, 206, -1, 147, -1, 148, 126, 136, 132, -1,
2248 99, -1, -1, 140, -1, 141, -1, 140, 141, -1,
2249 197, -1, 195, -1, 216, -1, 206, -1, 147, -1,
2250 148, 126, 139, 132, -1, 99, -1, 143, -1, -1,
2251 143, 145, -1, 145, -1, 188, -1, 159, -1, 160,
2252 -1, 161, -1, 163, -1, 171, -1, 154, -1, 182,
2253 -1, 179, -1, 238, -1, 246, -1, 245, -1, 126,
2254 143, 132, -1, 126, 132, -1, 99, -1, 144, -1,
2255 150, -1, 165, -1, 166, -1, 235, -1, 181, -1,
2256 148, 126, 143, 132, -1, 145, 99, -1, 145, -1,
2257 144, -1, 3, 89, 3, -1, 102, 236, -1, -1,
2258 46, 151, -1, 32, 151, -1, 152, -1, 151, 100,
2259 152, -1, 3, 226, 149, -1, -1, 65, 146, -1,
2260 -1, 64, 122, 155, 237, 133, 146, 153, -1, -1,
2261 150, -1, 238, -1, 46, 3, 226, -1, 3, -1,
2262 13, 122, -1, 13, 50, 122, -1, 158, 156, 99,
2263 237, 99, 238, 133, 146, -1, 158, 157, 68, 237,
2264 133, 146, -1, -1, 14, 122, 162, 237, 133, 146,
2265 -1, -1, 15, 164, 146, 14, 122, 237, 133, -1,
2266 66, -1, 66, 3, -1, 30, -1, 30, 3, -1,
2267 -1, 168, -1, 170, -1, 168, 170, -1, 169, -1,
2268 168, 169, -1, 34, 239, 105, 142, -1, 62, 105,
2269 142, -1, -1, 16, 122, 172, 239, 133, 126, 167,
2270 132, -1, -1, 33, 122, 3, 226, 133, 174, 126,
2271 142, 132, -1, -1, 28, 126, 176, 142, 132, -1,
2272 173, -1, 177, 173, -1, 177, -1, 177, 175, -1,
2273 175, -1, -1, 52, 126, 180, 142, 132, 178, -1,
2274 37, 237, -1, 37, -1, 39, 122, 237, 133, 146,
2275 -1, 3, -1, 19, -1, 184, 127, 183, -1, 183,
2276 -1, -1, 19, 184, 126, 186, 139, 132, -1, -1,
2277 19, 126, 187, 139, 132, -1, 41, 222, -1, 41,
2278 184, 127, 115, -1, -1, 190, -1, 191, -1, 190,
2279 191, -1, 21, -1, 22, -1, 20, -1, 38, -1,
2280 47, -1, 49, -1, 48, -1, 26, -1, 24, -1,
2281 4, -1, -1, 54, 223, -1, -1, 54, 224, -1,
2282 -1, 17, 224, -1, -1, 189, 31, 3, 192, 194,
2283 126, 196, 199, 132, -1, -1, 189, 44, 3, 193,
2284 126, 198, 202, 132, -1, -1, 200, -1, 201, -1,
2285 200, 201, -1, 99, -1, 148, 126, 199, 132, -1,
2286 206, -1, 216, -1, 144, -1, -1, 203, -1, 204,
2287 -1, 203, 204, -1, 99, -1, 46, 3, -1, 189,
2288 27, 215, 3, 122, 212, 133, 226, -1, 46, -1,
2289 32, -1, -1, 189, 205, 207, 208, -1, 209, -1,
2290 208, 100, 209, -1, 3, 226, 149, -1, -1, 102,
2291 211, -1, 10, -1, 8, -1, 9, -1, 12, -1,
2292 5, -1, 56, -1, 55, -1, 45, -1, 3, -1,
2293 -1, 213, -1, 93, 214, -1, 213, 100, 93, 214,
2294 -1, 213, 100, 214, -1, 214, -1, 3, 105, 225,
2295 210, -1, 3, 210, -1, 51, -1, 35, -1, -1,
2296 -1, 189, 27, 215, 3, 122, 212, 133, 226, 126,
2297 217, 142, 132, -1, 3, -1, -1, -1, 27, 218,
2298 122, 212, 133, 226, 126, 220, 142, 132, -1, 3,
2299 -1, 184, 127, 3, -1, 222, -1, 221, -1, 223,
2300 -1, 224, 100, 223, -1, 223, -1, 115, -1, 36,
2301 -1, 105, 225, -1, -1, -1, 122, 228, 133, -1,
2302 -1, 229, -1, 230, -1, 236, -1, 229, 100, -1,
2303 230, 236, -1, -1, 25, 239, 231, 227, -1, 239,
2304 122, 228, 133, -1, 53, 122, 228, 133, -1, 63,
2305 239, -1, 42, -1, 42, 237, -1, 239, -1, 239,
2306 -1, 237, 100, 239, -1, 237, -1, 219, -1, 240,
2307 -1, 243, -1, 232, -1, 234, -1, 233, -1, 6,
2308 -1, 10, -1, 11, -1, 8, -1, 9, -1, 12,
2309 -1, 5, -1, 29, -1, 56, -1, 55, -1, 45,
2310 -1, 239, 109, 239, -1, 239, 110, 239, -1, 239,
2311 75, 239, -1, 239, 76, 239, -1, 239, 71, 239,
2312 -1, 239, 72, 239, -1, 239, 74, 239, -1, 239,
2313 73, 239, -1, 239, 87, 239, -1, 239, 88, 239,
2314 -1, 118, 239, -1, 117, 239, -1, 239, 108, 239,
2315 -1, 239, 107, 239, -1, 239, 106, 239, -1, 239,
2316 96, 239, -1, 239, 95, 239, -1, 239, 94, 239,
2317 -1, 239, 114, 239, -1, 239, 116, 239, -1, 239,
2318 113, 239, -1, 239, 112, 239, -1, 239, 115, 239,
2319 -1, 239, 68, 239, -1, 239, 69, 239, -1, 239,
2320 40, 239, -1, 239, 67, 239, -1, 43, 122, 239,
2321 133, -1, 36, 239, -1, 36, -1, 122, 237, 133,
2322 -1, 112, 239, -1, 239, 124, 239, 125, -1, 124,
2323 228, 125, -1, -1, 242, -1, 236, 105, 236, -1,
2324 242, 100, 236, 105, 236, -1, 70, 241, 132, -1,
2325 239, 80, 239, -1, 239, 79, 239, -1, 239, 85,
2326 239, -1, 239, 84, 239, -1, 239, 86, 239, -1,
2327 239, 78, 239, -1, 239, 77, 239, -1, 239, 83,
2328 239, -1, 239, 81, 239, -1, 239, 82, 239, -1,
2329 239, 102, 239, -1, 239, 104, 239, 105, 239, -1,
2330 239, 91, -1, 239, 90, -1, 91, 239, -1, 90,
2331 239, -1, 53, 127, 3, -1, 128, 3, -1, 239,
2332 127, 128, 3, -1, 239, 127, 3, 89, 3, -1,
2333 239, 92, 3, -1, 239, 127, 122, 239, 133, -1,
2334 239, 127, 3, -1, 3, -1, 18, 3, -1, 189,
2335 244, -1, 189, 244, 102, 3, -1, 189, 244, 102,
2336 5, -1, 23, 18, 223, -1
2339 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
2340 static const yytype_uint16 yyrline[] =
2342 0, 1907, 1907, 1909, 1909, 1910, 1911, 1913, 1914, 1915,
2343 1916, 1917, 1918, 1919, 1920, 1922, 1922, 1923, 1924, 1926,
2344 1927, 1928, 1929, 1930, 1931, 1932, 1934, 1935, 1937, 1938,
2345 1941, 1942, 1943, 1944, 1945, 1946, 1947, 1948, 1949, 1950,
2346 1951, 1952, 1953, 1954, 1957, 1958, 1959, 1960, 1961, 1962,
2347 1963, 1964, 1968, 1969, 1973, 1980, 1984, 1985, 1989, 1990,
2348 1992, 1993, 1995, 2056, 2057, 2060, 2060, 2079, 2080, 2081,
2349 2086, 2090, 2095, 2096, 2098, 2118, 2162, 2162, 2181, 2181,
2350 2196, 2199, 2202, 2205, 2209, 2210, 2211, 2212, 2213, 2214,
2351 2216, 2227, 2230, 2230, 2259, 2259, 2283, 2283, 2299, 2300,
2352 2301, 2302, 2310, 2319, 2319, 2364, 2368, 2379, 2388, 2389,
2353 2391, 2392, 2394, 2394, 2396, 2396, 2399, 2414, 2430, 2431,
2354 2432, 2433, 2441, 2442, 2443, 2444, 2445, 2446, 2447, 2448,
2355 2449, 2450, 2454, 2455, 2457, 2458, 2460, 2461, 2465, 2463,
2356 2471, 2469, 2478, 2479, 2480, 2481, 2482, 2483, 2484, 2485,
2357 2487, 2493, 2494, 2495, 2496, 2497, 2498, 2501, 2514, 2514,
2358 2516, 2516, 2518, 2519, 2521, 2596, 2597, 2599, 2600, 2601,
2359 2602, 2603, 2605, 2606, 2607, 2608, 2617, 2621, 2627, 2633,
2360 2641, 2646, 2652, 2660, 2668, 2669, 2670, 2673, 2672, 2689,
2361 2690, 2692, 2691, 2715, 2726, 2739, 2740, 2742, 2743, 2745,
2362 2746, 2747, 2756, 2757, 2761, 2762, 2764, 2765, 2766, 2768,
2363 2772, 2773, 2778, 2779, 2815, 2861, 2882, 2903, 2906, 2913,
2364 2914, 2915, 2921, 2927, 2929, 2931, 2933, 2935, 2937, 2939,
2365 2956, 2961, 2964, 2967, 2970, 2973, 2976, 2979, 2982, 2985,
2366 2989, 2992, 2995, 2998, 3001, 3004, 3007, 3010, 3014, 3025,
2367 3043, 3048, 3053, 3058, 3063, 3068, 3072, 3076, 3081, 3085,
2368 3089, 3098, 3107, 3117, 3122, 3134, 3140, 3145, 3151, 3157,
2369 3161, 3163, 3174, 3183, 3190, 3191, 3193, 3199, 3208, 3215,
2370 3227, 3233, 3239, 3245, 3251, 3257, 3263, 3269, 3282, 3293,
2371 3300, 3313, 3340, 3354, 3368, 3382, 3397, 3404, 3411, 3418,
2372 3425, 3436, 3470, 3591, 3597, 3600, 3603, 3606
2376 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
2377 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
2378 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
2379 static const char *const yytname[] =
2381 "$end", "error", "$undefined", "T_IDENTIFIER", "T_NAMESPACE",
2382 "T_STRING", "T_REGEXP", "T_EMPTY", "T_INT", "T_UINT", "T_BYTE",
2383 "T_SHORT", "T_FLOAT", "\"for\"", "\"while\"", "\"do\"", "\"switch\"",
2384 "\"implements\"", "\"namespace\"", "\"package\"", "\"protected\"",
2385 "\"public\"", "\"private\"", "\"use\"", "\"internal\"", "\"new\"",
2386 "\"native\"", "\"function\"", "\"finally\"", "\"undefined\"",
2387 "\"continue\"", "\"class\"", "\"const\"", "\"catch\"", "\"case\"",
2388 "\"set\"", "\"void\"", "\"throw\"", "\"static\"", "\"with\"",
2389 "\"instanceof\"", "\"import\"", "\"return\"", "\"typeof\"",
2390 "\"interface\"", "\"null\"", "\"var\"", "\"dynamic\"", "\"override\"",
2391 "\"final\"", "\"each\"", "\"get\"", "\"try\"", "\"super\"",
2392 "\"extends\"", "\"false\"", "\"true\"", "\"Boolean\"", "\"uint\"",
2393 "\"int\"", "\"Number\"", "\"String\"", "\"default\"", "\"delete\"",
2394 "\"if\"", "\"else\"", "\"break\"", "\"is\"", "\"in\"", "\"as\"",
2395 "\"{ (dictionary)\"", "\"==\"", "\"===\"", "\"!=\"", "\"!==\"", "\"<=\"",
2396 "\">=\"", "\"|=\"", "\"/=\"", "\"%=\"", "\"*=\"", "\"+=\"", "\"-=\"",
2397 "\"^=\"", "\">>=\"", "\"<<=\"", "\">>>=\"", "\"||\"", "\"&&\"", "\"::\"",
2398 "\"--\"", "\"++\"", "\"..\"", "\"...\"", "\"<<\"", "\">>>\"", "\">>\"",
2399 "prec_none", "below_semicolon", "';'", "','", "below_assignment", "'='",
2400 "\"&=\"", "'?'", "':'", "'|'", "'^'", "'&'", "'<'", "'>'", "below_minus",
2401 "'-'", "'+'", "'/'", "'*'", "'%'", "'~'", "'!'", "minusminus_prefix",
2402 "plusplus_prefix", "below_curly", "'('", "new2", "'['", "']'", "'{'",
2403 "'.'", "'@'", "above_identifier", "below_else", "above_function", "'}'",
2404 "')'", "$accept", "PROGRAM", "MAYBE_PROGRAM_CODE_LIST",
2405 "PROGRAM_CODE_LIST", "PROGRAM_CODE", "MAYBE_INPACKAGE_CODE_LIST",
2406 "INPACKAGE_CODE_LIST", "INPACKAGE_CODE", "MAYBECODE", "CODE",
2407 "CODE_STATEMENT", "CODEPIECE", "CODEBLOCK", "PACKAGE_INITCODE",
2408 "CONDITIONAL_COMPILATION", "MAYBEEXPRESSION", "VARIABLE_DECLARATION",
2409 "VARIABLE_LIST", "ONE_VARIABLE", "MAYBEELSE", "IF", "$@1", "FOR_INIT",
2410 "FOR_IN_INIT", "FOR_START", "FOR", "FOR_IN", "WHILE", "$@2", "DO_WHILE",
2411 "$@3", "BREAK", "CONTINUE", "MAYBE_CASE_LIST", "CASE_LIST", "CASE",
2412 "DEFAULT", "SWITCH", "$@4", "CATCH", "$@5", "FINALLY", "$@6",
2413 "CATCH_LIST", "CATCH_FINALLY_LIST", "TRY", "$@7", "THROW", "WITH",
2414 "X_IDENTIFIER", "PACKAGE", "PACKAGE_DECLARATION", "$@8", "$@9", "IMPORT",
2415 "MAYBE_MODIFIERS", "MODIFIER_LIST", "MODIFIER", "EXTENDS",
2416 "EXTENDS_LIST", "IMPLEMENTS_LIST", "CLASS_DECLARATION", "$@10",
2417 "INTERFACE_DECLARATION", "$@11", "MAYBE_CLASS_BODY", "CLASS_BODY",
2418 "CLASS_BODY_ITEM", "MAYBE_INTERFACE_BODY", "INTERFACE_BODY",
2419 "IDECLARATION", "VARCONST", "SLOT_DECLARATION", "$@12", "SLOT_LIST",
2420 "ONE_SLOT", "MAYBESTATICCONSTANT", "STATICCONSTANT", "MAYBE_PARAM_LIST",
2421 "PARAM_LIST", "PARAM", "GETSET", "FUNCTION_DECLARATION", "$@13",
2422 "MAYBE_IDENTIFIER", "INNERFUNCTION", "$@14", "CLASS", "PACKAGEANDCLASS",
2423 "CLASS_SPEC", "CLASS_SPEC_LIST", "TYPE", "MAYBETYPE",
2424 "MAYBE_PARAM_VALUES", "MAYBE_EXPRESSION_LIST", "EXPRESSION_LIST",
2425 "EXPRESSION_LIST_AND_COMMA", "XX", "NEW", "FUNCTIONCALL", "DELETE",
2426 "RETURN", "NONCOMMAEXPRESSION", "EXPRESSION", "VOIDEXPRESSION", "E",
2427 "CONSTANT", "MAYBE_EXPRPAIR_LIST", "EXPRPAIR_LIST", "VAR_READ",
2428 "NAMESPACE_ID", "NAMESPACE_DECLARATION", "USE_NAMESPACE", 0
2433 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
2435 static const yytype_uint16 yytoknum[] =
2437 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
2438 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
2439 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
2440 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
2441 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
2442 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
2443 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
2444 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
2445 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
2446 345, 346, 347, 348, 349, 350, 351, 352, 353, 59,
2447 44, 354, 61, 355, 63, 58, 124, 94, 38, 60,
2448 62, 356, 45, 43, 47, 42, 37, 126, 33, 357,
2449 358, 359, 40, 360, 91, 93, 123, 46, 64, 361,
2454 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
2455 static const yytype_uint8 yyr1[] =
2457 0, 134, 135, 136, 136, 137, 137, 138, 138, 138,
2458 138, 138, 138, 138, 138, 139, 139, 140, 140, 141,
2459 141, 141, 141, 141, 141, 141, 142, 142, 143, 143,
2460 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
2461 144, 144, 144, 144, 145, 145, 145, 145, 145, 145,
2462 145, 145, 146, 146, 147, 148, 149, 149, 150, 150,
2463 151, 151, 152, 153, 153, 155, 154, 156, 156, 156,
2464 157, 157, 158, 158, 159, 160, 162, 161, 164, 163,
2465 165, 165, 166, 166, 167, 167, 167, 167, 168, 168,
2466 169, 170, 172, 171, 174, 173, 176, 175, 177, 177,
2467 178, 178, 178, 180, 179, 181, 181, 182, 183, 183,
2468 184, 184, 186, 185, 187, 185, 188, 188, 189, 189,
2469 190, 190, 191, 191, 191, 191, 191, 191, 191, 191,
2470 191, 191, 192, 192, 193, 193, 194, 194, 196, 195,
2471 198, 197, 199, 199, 200, 200, 201, 201, 201, 201,
2472 201, 202, 202, 203, 203, 204, 204, 204, 205, 205,
2473 207, 206, 208, 208, 209, 210, 210, 211, 211, 211,
2474 211, 211, 211, 211, 211, 211, 212, 212, 212, 212,
2475 213, 213, 214, 214, 215, 215, 215, 217, 216, 218,
2476 218, 220, 219, 221, 222, 223, 223, 224, 224, 225,
2477 225, 225, 226, 226, 227, 227, 228, 228, 228, 229,
2478 230, 229, 231, 232, 233, 233, 234, 235, 235, 236,
2479 237, 237, 238, 239, 239, 239, 239, 239, 239, 239,
2480 240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
2481 239, 239, 239, 239, 239, 239, 239, 239, 239, 239,
2482 239, 239, 239, 239, 239, 239, 239, 239, 239, 239,
2483 239, 239, 239, 239, 239, 239, 239, 239, 239, 239,
2484 239, 239, 239, 239, 241, 241, 242, 242, 239, 239,
2485 239, 239, 239, 239, 239, 239, 239, 239, 239, 239,
2486 239, 239, 239, 239, 239, 239, 239, 239, 239, 239,
2487 239, 239, 243, 244, 245, 245, 245, 246
2490 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
2491 static const yytype_uint8 yyr2[] =
2493 0, 2, 1, 0, 1, 1, 2, 1, 1, 1,
2494 1, 1, 1, 4, 1, 0, 1, 1, 2, 1,
2495 1, 1, 1, 1, 4, 1, 1, 0, 2, 1,
2496 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2497 1, 1, 3, 2, 1, 1, 1, 1, 1, 1,
2498 1, 4, 2, 1, 1, 3, 2, 0, 2, 2,
2499 1, 3, 3, 0, 2, 0, 7, 0, 1, 1,
2500 3, 1, 2, 3, 8, 6, 0, 6, 0, 7,
2501 1, 2, 1, 2, 0, 1, 1, 2, 1, 2,
2502 4, 3, 0, 8, 0, 9, 0, 5, 1, 2,
2503 1, 2, 1, 0, 6, 2, 1, 5, 1, 1,
2504 3, 1, 0, 6, 0, 5, 2, 4, 0, 1,
2505 1, 2, 1, 1, 1, 1, 1, 1, 1, 1,
2506 1, 1, 0, 2, 0, 2, 0, 2, 0, 9,
2507 0, 8, 0, 1, 1, 2, 1, 4, 1, 1,
2508 1, 0, 1, 1, 2, 1, 2, 8, 1, 1,
2509 0, 4, 1, 3, 3, 0, 2, 1, 1, 1,
2510 1, 1, 1, 1, 1, 1, 0, 1, 2, 4,
2511 3, 1, 4, 2, 1, 1, 0, 0, 12, 1,
2512 0, 0, 10, 1, 3, 1, 1, 1, 3, 1,
2513 1, 1, 2, 0, 0, 3, 0, 1, 1, 1,
2514 2, 2, 0, 4, 4, 4, 2, 1, 2, 1,
2515 1, 3, 1, 1, 1, 1, 1, 1, 1, 1,
2516 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2517 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
2518 2, 2, 3, 3, 3, 3, 3, 3, 3, 3,
2519 3, 3, 3, 3, 3, 3, 3, 4, 2, 1,
2520 3, 2, 4, 3, 0, 1, 3, 5, 3, 3,
2521 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
2522 5, 2, 2, 2, 2, 3, 2, 4, 5, 3,
2523 5, 3, 1, 2, 2, 4, 4, 3
2526 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
2527 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
2528 means the default is an error. */
2529 static const yytype_uint16 yydefact[] =
2531 118, 302, 131, 235, 229, 232, 233, 230, 231, 234,
2532 0, 0, 78, 0, 0, 124, 122, 123, 0, 130,
2533 0, 129, 190, 236, 269, 125, 0, 0, 0, 239,
2534 126, 128, 127, 0, 0, 238, 237, 0, 0, 274,
2535 0, 0, 14, 0, 0, 0, 0, 206, 118, 0,
2536 0, 2, 118, 5, 54, 12, 0, 36, 67, 31,
2537 32, 33, 34, 35, 38, 37, 7, 30, 0, 119,
2538 120, 9, 8, 11, 10, 223, 226, 228, 227, 222,
2539 39, 220, 224, 225, 41, 40, 0, 0, 72, 76,
2540 118, 92, 108, 109, 114, 111, 0, 0, 302, 212,
2541 189, 0, 268, 0, 0, 116, 0, 103, 206, 0,
2542 216, 65, 0, 219, 0, 275, 294, 293, 271, 251,
2543 250, 0, 0, 207, 208, 209, 82, 0, 106, 217,
2544 0, 80, 44, 43, 118, 45, 29, 0, 46, 47,
2545 48, 50, 0, 49, 296, 1, 6, 118, 302, 0,
2546 68, 0, 0, 69, 0, 186, 0, 159, 0, 158,
2547 160, 304, 121, 0, 0, 0, 0, 0, 0, 0,
2548 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2549 0, 0, 0, 0, 0, 0, 292, 291, 0, 0,
2550 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2551 0, 0, 0, 0, 206, 0, 0, 55, 73, 0,
2552 53, 0, 0, 118, 112, 0, 193, 0, 196, 195,
2553 307, 204, 176, 0, 0, 0, 27, 0, 295, 0,
2554 0, 278, 0, 270, 273, 210, 211, 83, 203, 59,
2555 60, 105, 218, 58, 81, 42, 28, 118, 0, 203,
2556 0, 0, 303, 185, 184, 0, 132, 134, 0, 0,
2557 221, 265, 266, 263, 264, 244, 245, 247, 246, 242,
2558 243, 285, 284, 280, 279, 287, 288, 286, 282, 281,
2559 283, 248, 249, 299, 257, 256, 255, 289, 0, 254,
2560 253, 252, 240, 241, 261, 260, 258, 262, 259, 0,
2561 0, 301, 0, 0, 0, 52, 0, 0, 25, 0,
2562 118, 17, 23, 0, 20, 19, 22, 21, 118, 110,
2563 0, 206, 213, 165, 0, 0, 177, 181, 118, 194,
2564 117, 267, 0, 26, 215, 0, 276, 0, 0, 57,
2565 0, 118, 13, 57, 0, 0, 0, 0, 136, 0,
2566 0, 203, 161, 162, 305, 306, 0, 214, 272, 0,
2567 0, 297, 118, 0, 0, 115, 18, 118, 0, 0,
2568 0, 0, 183, 178, 203, 0, 107, 0, 118, 0,
2569 201, 200, 199, 202, 0, 62, 61, 51, 0, 118,
2570 176, 133, 0, 0, 197, 135, 140, 57, 0, 290,
2571 298, 300, 77, 0, 84, 0, 113, 205, 175, 171,
2572 168, 169, 167, 170, 174, 173, 172, 166, 165, 0,
2573 0, 180, 0, 0, 98, 102, 100, 104, 63, 277,
2574 56, 0, 75, 0, 137, 138, 0, 118, 164, 163,
2575 79, 0, 0, 0, 85, 88, 86, 24, 182, 191,
2576 179, 96, 0, 99, 101, 118, 66, 118, 203, 118,
2577 198, 0, 155, 0, 0, 118, 153, 0, 27, 93,
2578 89, 87, 27, 27, 203, 64, 74, 0, 146, 150,
2579 0, 0, 0, 118, 144, 148, 149, 156, 186, 141,
2580 154, 27, 91, 0, 0, 0, 187, 118, 139, 145,
2581 0, 90, 192, 97, 94, 27, 0, 0, 0, 0,
2582 147, 176, 27, 188, 0, 0, 203, 95, 157
2585 /* YYDEFGOTO[NTERM-NUM]. */
2586 static const yytype_int16 yydefgoto[] =
2588 -1, 50, 51, 52, 53, 309, 310, 311, 332, 333,
2589 135, 136, 211, 312, 137, 385, 138, 243, 240, 456,
2590 57, 229, 151, 152, 58, 59, 60, 61, 209, 62,
2591 90, 139, 140, 443, 444, 445, 446, 63, 212, 424,
2592 508, 425, 473, 426, 427, 64, 226, 141, 65, 95,
2593 217, 66, 318, 213, 67, 142, 69, 70, 348, 350,
2594 393, 314, 459, 315, 437, 482, 483, 484, 464, 465,
2595 466, 160, 316, 258, 352, 353, 372, 417, 325, 326,
2596 327, 255, 317, 505, 101, 75, 472, 218, 219, 382,
2597 395, 383, 339, 322, 122, 123, 124, 221, 76, 77,
2598 78, 143, 125, 79, 80, 81, 82, 114, 115, 83,
2602 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
2604 #define YYPACT_NINF -426
2605 static const yytype_int16 yypact[] =
2607 1672, 12, -426, -426, -426, -426, -426, -426, -426, -426,
2608 -16, -19, -426, -18, 11, -426, -426, -426, 107, -426,
2609 2092, -426, 132, -426, 350, -426, 58, 25, 79, -426,
2610 -426, -426, -426, 84, -20, -426, -426, 2092, 83, 2092,
2611 2092, 2092, -426, 2092, 2092, 2092, 2092, 2092, 632, 209,
2612 216, -426, 502, -426, -426, -426, 93, -426, 2022, -426,
2613 -426, -426, -426, -426, -426, -426, -426, -426, 356, 248,
2614 -426, -426, -426, -426, -426, -426, -426, -426, -426, 118,
2615 -426, 2522, -426, -426, -426, -426, 218, 105, -426, -426,
2616 1924, -426, -426, -426, -426, -426, -106, 86, -426, -46,
2617 -426, 106, 139, 2092, 108, -426, 2092, -426, 2092, 229,
2618 139, -426, 129, 2522, 104, 138, 139, 139, 294, 139,
2619 139, -75, 115, 141, 2092, -426, 239, 243, 2092, 2092,
2620 243, 244, -426, -426, 762, -426, -426, 123, -426, -426,
2621 -426, -426, 232, -426, -426, -426, -426, 1022, 183, 255,
2622 -426, 165, 197, -426, 264, 92, 270, -426, 273, -426,
2623 -426, 176, -426, 2092, 2092, 2092, 2092, 2092, 2092, 2092,
2624 2092, 2092, 2092, 2092, 2092, 2092, 2092, 2092, 2092, 2092,
2625 2092, 2092, 2092, 2092, 2092, 2092, -426, -426, 280, 2092,
2626 2092, 2092, 2092, 2092, 2092, 2092, 2092, 2092, 2092, 2092,
2627 2092, 2092, 2092, 2092, 2092, 2092, 14, -426, -426, 2092,
2628 185, 271, 2092, 1152, -426, 25, 160, 161, -426, -426,
2629 -426, 167, 20, -12, 19, 2150, 1798, 157, -426, 2092,
2630 2092, -426, 2092, -426, -426, -426, -426, -426, 186, 192,
2631 -426, 118, 118, 192, -426, -426, -426, 1924, 166, 186,
2632 2092, 2092, -426, -426, -426, 296, 246, 252, 304, 149,
2633 2522, 1014, 494, 494, 494, 2888, 2888, 2888, 2888, 1014,
2634 1014, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522,
2635 2522, 2583, 2644, -426, 211, 211, 211, 2522, 2339, 2705,
2636 2766, 2827, 1014, 1014, 294, 294, 139, 139, 139, 175,
2637 2400, 220, 2092, 311, -9, -426, 194, 2213, -426, 189,
2638 1282, -426, -426, 191, -426, -426, -426, -426, 1152, -426,
2639 125, 2092, -426, 97, 312, 195, 222, -426, 1924, 160,
2640 -426, -426, 198, 1798, -426, -1, -426, 224, 38, 235,
2641 243, 892, -426, -26, -35, 8, 212, 86, 314, 86,
2642 213, 186, 240, -426, -426, -426, 2092, -426, -426, 338,
2643 2276, -426, 1924, 2092, 217, -426, -426, 1152, 210, 221,
2644 74, 38, -426, -426, 186, 24, -426, 98, 1924, 2092,
2645 -426, -426, -426, -426, 2092, -426, -426, -426, 2092, 1924,
2646 20, -426, 86, 219, -426, 250, -426, 235, 304, 2522,
2647 -426, -426, -426, 45, 56, 214, -426, -426, -426, -426,
2648 -426, -426, -426, -426, -426, -426, -426, -426, 242, 225,
2649 312, -426, 237, 251, -426, -426, 98, -426, 299, -426,
2650 -426, 245, -426, 247, 250, -426, 86, 47, -426, -426,
2651 -426, 2092, 261, 249, 56, -426, -426, -426, -426, -426,
2652 -426, -426, 379, -426, -426, 1924, -426, 1924, 186, 1412,
2653 -426, 386, -426, 363, 259, 233, -426, 2461, 1798, -426,
2654 -426, -426, 1798, 1798, 186, -426, -426, 266, -426, -426,
2655 267, 193, 262, 1542, -426, -426, -426, -426, 92, -426,
2656 -426, 1798, -426, 265, 269, 263, -426, 1412, -426, -426,
2657 395, -426, -426, -426, -426, 1798, 272, 277, 281, 279,
2658 -426, 20, 1798, -426, 282, 285, 186, -426, -426
2661 /* YYPGOTO[NTERM-NUM]. */
2662 static const yytype_int16 yypgoto[] =
2664 -426, -426, 275, -426, 360, -292, -426, 103, -425, -39,
2665 1, -85, -317, 59, 2, 17, 361, 297, 85, -426,
2666 -426, -426, -426, -426, -426, -426, -426, -426, -426, -426,
2667 -426, -426, -426, -426, -426, -21, -17, -426, -426, 5,
2668 -426, 6, -426, -426, -426, -426, -426, -426, -426, -200,
2669 36, -426, -426, -426, -426, 0, -426, 357, -426, -426,
2670 -426, 60, -426, 62, -426, -69, -426, -54, -426, -426,
2671 -31, -426, 3, -426, -426, 32, 18, -426, -372, -426,
2672 -305, -53, 4, -426, -426, -426, -426, -426, 411, -87,
2673 50, 68, -241, -426, -95, -426, -426, -426, -426, -426,
2674 -426, -426, -32, -6, -52, -8, -426, -426, -426, -426,
2678 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
2679 positive, shift that token. If negative, reduce the rule which
2680 number is the opposite. If zero, do what YYDEFACT says.
2681 If YYTABLE_NINF, syntax error. */
2682 #define YYTABLE_NINF -153
2683 static const yytype_int16 yytable[] =
2685 68, 54, 56, 73, 74, 210, 153, 112, 343, 134,
2686 220, 376, 99, 227, 92, 319, 102, 301, 433, 373,
2687 214, 215, 329, 323, 319, 163, 368, 323, 92, 110,
2688 93, 113, 116, 117, 87, 118, 119, 120, 93, 113,
2689 121, 216, -70, 492, 93, 402, 188, 493, 494, 246,
2690 96, 2, 68, 54, 56, 73, 74, 93, 233, 55,
2691 71, 428, 72, 104, 388, 163, 501, 15, 16, 17,
2692 421, 19, 432, 21, 380, 405, 384, 408, 205, 409,
2693 509, 206, 410, 411, 412, 25, 413, 515, 163, 216,
2694 441, 163, 236, 461, 30, 31, 32, 223, 225, 163,
2695 113, 86, 108, 89, 91, 93, 88, 109, 163, 299,
2696 397, 55, 71, 324, 72, 450, 113, 420, 442, 414,
2697 319, 328, 241, 242, 362, 97, 422, 253, 329, 415,
2698 416, 423, 378, 419, 330, 100, 302, 94, 475, 514,
2699 476, 389, 303, 254, 93, 163, 462, 68, 54, 56,
2700 73, 74, 354, 381, 355, 260, 261, 262, 263, 264,
2701 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
2702 275, 276, 277, 278, 279, 280, 281, 282, 440, -151,
2703 103, 284, 285, 286, 287, 288, 289, 290, 291, 292,
2704 293, 294, 295, 296, 297, 298, 113, 300, 336, 370,
2705 337, 106, 371, 304, 307, 111, 55, 71, 341, 72,
2706 107, 154, 144, 68, 54, 313, 145, 477, 163, 147,
2707 155, 207, 113, 335, 113, 157, 369, 208, 222, 186,
2708 187, 188, 228, 495, 230, 224, 231, 2, 232, 159,
2709 234, 235, 237, 210, 344, 345, 238, 244, 246, 247,
2710 154, -71, 2, 15, 16, 17, 246, 19, 249, 21,
2711 391, 204, 394, 205, 250, 251, 206, 252, 15, 16,
2712 17, 25, 19, 256, 21, 518, 257, 210, 259, 461,
2713 30, 31, 32, 283, 305, 306, 25, -108, 320, 321,
2714 334, 338, 340, 210, 360, 30, 31, 32, 342, 346,
2715 347, 186, 187, 188, 210, 394, 349, 351, 357, 359,
2716 68, 54, 313, 113, 361, 323, 363, 367, 68, 54,
2717 313, 365, 375, 199, 200, 201, 202, 203, 374, 379,
2718 377, 392, 462, 204, 390, 205, 431, 384, 206, 396,
2719 398, 400, 406, 404, 370, 435, 447, 429, 399, 460,
2720 436, 449, 430, 98, 407, 3, 4, 403, 5, 6,
2721 7, 8, 9, 451, 455, -152, 468, 68, 54, 313,
2722 210, 113, 210, 452, 154, 20, 113, 22, 457, 23,
2723 458, 469, 474, 155, 186, 187, 188, 156, 157, 487,
2724 488, 489, 496, 497, 498, 29, 504, 502, 507, 511,
2725 158, 503, 159, 34, 510, 35, 36, 512, 201, 202,
2726 203, 513, 146, 366, 438, 516, 204, 517, 205, 150,
2727 39, 206, 248, 470, 239, 386, 162, 471, 506, 499,
2728 439, 453, 454, 467, 490, 500, 448, 463, 105, 418,
2729 40, 41, 434, 0, 0, 0, 0, 0, 0, 0,
2730 0, 0, 0, 0, 0, 0, 0, 0, 0, 481,
2731 479, 480, 485, 486, 0, 463, 0, 0, 0, 0,
2732 0, 0, 46, 0, 47, 0, 0, 0, 49, 0,
2733 0, 0, 0, 481, 479, 480, 485, 486, 0, 0,
2734 0, 0, 0, 0, 0, 0, 0, 481, 479, 480,
2735 485, 486, -4, 0, 0, 1, 2, 3, 4, 0,
2736 5, 6, 7, 8, 9, 10, 11, 12, 13, 0,
2737 0, 14, 15, 16, 17, 18, 19, 20, 21, 0,
2738 0, 23, 0, 0, 164, 0, 0, 0, 24, 0,
2739 25, 26, 0, 27, 0, 28, 0, 29, 0, 30,
2740 31, 32, 0, 0, 33, 34, 0, 35, 36, 0,
2741 0, -153, -153, -153, 0, 37, 38, 0, 0, 172,
2742 173, 0, 39, 0, 0, 0, 0, 0, 0, 0,
2743 0, 0, 0, 0, 186, 187, 188, 0, 189, 190,
2744 191, 0, 40, 41, 0, 0, 0, 0, 0, 0,
2745 0, 42, 0, 197, 198, 0, 199, 200, 201, 202,
2746 203, 0, 0, 0, 43, 0, 204, 0, 205, 44,
2747 45, 206, 0, 0, 46, 0, 47, 0, 48, 0,
2748 49, 0, 0, 0, -4, 1, 2, 3, 4, 0,
2749 5, 6, 7, 8, 9, 10, 11, 12, 13, 0,
2750 0, 0, 15, 16, 17, 18, 19, 20, 21, 22,
2751 0, 23, 126, 0, 127, 0, 0, 0, 24, 128,
2752 25, 26, 0, 27, 129, 28, 0, 29, 130, 30,
2753 31, 32, 0, 0, 33, 34, 0, 35, 36, 0,
2754 0, 0, 0, 0, 0, 37, 38, 0, 131, 0,
2755 0, 0, 39, 0, 0, 0, 0, 0, 0, 0,
2756 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2757 0, 0, 40, 41, 0, 0, 0, 0, 0, 0,
2758 0, 132, 0, 0, 0, 0, 0, 0, 0, 0,
2759 0, 0, 0, 0, 43, 0, 0, 0, 0, 44,
2760 45, 0, 0, 0, 46, 0, 47, 0, 48, 0,
2761 49, 0, 0, 0, 133, 1, 2, 3, 4, 0,
2762 5, 6, 7, 8, 9, 10, 11, 12, 13, 0,
2763 0, 0, 15, 16, 17, 18, 19, 20, 21, 22,
2764 0, 23, 126, 0, 127, 0, 0, 0, 24, 128,
2765 25, 26, 0, 27, 129, 28, 0, 29, 130, 30,
2766 31, 32, 0, 0, 33, 34, 0, 35, 36, 0,
2767 0, 0, 0, 0, 0, 37, 38, 0, 131, 0,
2768 0, 0, 39, 0, 0, 0, 0, 0, 0, 0,
2769 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2770 0, 0, 40, 41, 0, 0, 0, 0, 0, 0,
2771 0, 132, 0, 0, 0, 0, 0, 0, 0, 0,
2772 0, 0, 0, 0, 43, 0, 0, 0, 0, 44,
2773 45, 0, 0, 0, 46, 0, 47, 0, 48, 0,
2774 49, 0, 0, 0, 245, 1, 2, 3, 4, 0,
2775 5, 6, 7, 8, 9, 10, 11, 12, 13, 0,
2776 0, 0, 15, 16, 17, 18, 19, 20, 21, 22,
2777 0, 23, 126, 0, 127, 0, 0, 0, 24, 128,
2778 25, 26, 0, 27, 129, 28, 0, 29, 130, 30,
2779 31, 32, 0, 0, 33, 34, 0, 35, 36, 0,
2780 0, 0, 0, 0, 0, 37, 38, 0, 131, 0,
2781 0, 0, 39, 0, 0, 0, 0, 0, 0, 0,
2782 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2783 0, 0, 40, 41, 0, 0, 0, 0, 0, 0,
2784 0, 132, 0, 0, 0, 0, 0, 0, 0, 0,
2785 0, 0, 0, 0, 43, 0, 0, 0, 0, 44,
2786 45, 0, 0, 0, 46, 0, 47, 0, 48, 0,
2787 49, 0, 0, 0, 387, 1, 2, 3, 4, 0,
2788 5, 6, 7, 8, 9, 10, 11, 12, 13, 0,
2789 0, 14, 15, 16, 17, 18, 19, 20, 21, 0,
2790 0, 23, 0, 0, -153, 0, 0, 0, 24, 0,
2791 25, 26, 0, 27, 0, 28, 0, 29, 0, 30,
2792 31, 32, 0, 0, 33, 34, 0, 35, 36, 0,
2793 0, 0, 0, 0, 0, 37, 38, 0, 0, -153,
2794 -153, 0, 39, 0, 0, 0, 0, 0, 0, 0,
2795 0, 0, 0, 0, 186, 187, 188, 0, 189, 190,
2796 191, 0, 40, 41, 0, 0, 0, 0, 0, 0,
2797 0, 42, 0, -153, -153, 0, 199, 200, 201, 202,
2798 203, 0, 0, 0, 43, 0, 204, 0, 205, 44,
2799 45, 206, 0, 0, 46, 0, 47, 0, 48, 0,
2800 49, 0, 0, 0, -3, 1, 2, 3, 4, 0,
2801 5, 6, 7, 8, 9, 10, 11, 12, 13, 0,
2802 0, 0, 15, 16, 17, 18, 19, 20, 21, 0,
2803 0, 23, 0, 0, 0, 0, 0, 0, 24, 0,
2804 25, 26, 0, 27, 0, 28, 0, 29, 0, 30,
2805 31, 32, 0, 0, 33, 34, 0, 35, 36, 0,
2806 0, 0, 0, 0, 0, 37, 38, 0, 0, 0,
2807 0, 0, 39, 0, 0, 0, 0, 0, 0, 0,
2808 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2809 0, 0, 40, 41, 0, 0, 0, 0, 0, 0,
2810 0, 308, 0, 0, 0, 0, 0, 0, 0, 0,
2811 0, 0, 0, 0, 43, 0, 0, 0, 0, 44,
2812 45, 0, 0, 0, 46, 0, 47, 0, 48, 0,
2813 49, 0, 0, 0, -15, 1, 2, 3, 4, 0,
2814 5, 6, 7, 8, 9, 10, 11, 12, 13, 0,
2815 0, 0, 15, 16, 17, 18, 19, 20, 21, 0,
2816 0, 23, 0, 0, 0, 0, 0, 0, 24, 0,
2817 25, 26, 0, 27, 0, 28, 0, 29, 0, 30,
2818 31, 32, 0, 0, 33, 34, 0, 35, 36, 0,
2819 0, 0, 0, 0, 0, 37, 38, 0, 0, 0,
2820 0, 0, 39, 0, 0, 0, 0, 0, 0, 0,
2821 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2822 0, 0, 40, 41, 0, 0, 0, 0, 0, 0,
2823 0, 308, 0, 0, 0, 0, 0, 0, 0, 0,
2824 0, 0, 0, 0, 43, 0, 0, 0, 0, 44,
2825 45, 0, 0, 0, 46, 0, 47, 0, 48, 0,
2826 49, 0, 0, 0, -16, 1, 2, 3, 4, 0,
2827 5, 6, 7, 8, 9, 10, 11, 12, 13, 0,
2828 0, 0, 15, 16, 17, 18, 19, 20, 21, 0,
2829 0, 23, 0, 0, 0, 0, 0, 0, 24, 0,
2830 25, 26, 0, 27, 0, 28, 0, 29, 0, 30,
2831 31, 32, 0, 0, 33, 34, 0, 35, 36, 0,
2832 0, 0, 0, 0, 0, 37, 38, 0, 0, 0,
2833 0, 0, 39, 0, 0, 0, 0, 0, 0, 0,
2834 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2835 0, 0, 40, 41, 0, 0, 0, 0, 0, 0,
2836 0, 478, 0, 0, 0, 0, 0, 0, 0, 0,
2837 0, 0, 0, 0, 43, 0, 0, 0, 0, 44,
2838 45, 0, 0, 0, 46, 0, 47, 0, 48, 0,
2839 49, 0, 0, 0, -142, 1, 2, 3, 4, 0,
2840 5, 6, 7, 8, 9, 10, 11, 12, 13, 0,
2841 0, 0, 15, 16, 17, 18, 19, 20, 21, 0,
2842 0, 23, 0, 0, 0, 0, 0, 0, 24, 0,
2843 25, 26, 0, 27, 0, 28, 0, 29, 0, 30,
2844 31, 32, 0, 0, 33, 34, 0, 35, 36, 0,
2845 0, 0, 0, 0, 0, 37, 38, 0, 0, 0,
2846 0, 0, 39, 0, 0, 0, 0, 0, 0, 0,
2847 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2848 0, 0, 40, 41, 0, 0, 0, 0, 0, 0,
2849 0, 478, 0, 0, 0, 0, 0, 0, 0, 0,
2850 0, 0, 0, 0, 43, 0, 0, 0, 0, 44,
2851 45, 0, 0, 0, 46, 0, 47, 0, 48, 0,
2852 49, 0, -3, 0, -143, 1, 2, 3, 4, 0,
2853 5, 6, 7, 8, 9, 10, 11, 12, 13, 0,
2854 0, 14, 15, 16, 17, 18, 19, 20, 21, 0,
2855 0, 23, 0, 0, 0, 0, 0, 0, 24, 0,
2856 25, 26, 0, 27, 0, 28, 0, 29, 0, 30,
2857 31, 32, 0, 0, 33, 34, 0, 35, 36, 0,
2858 0, 0, 0, 0, 0, 37, 38, 0, 0, 0,
2859 0, 0, 39, 0, 0, 0, 0, 0, 0, 0,
2860 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2861 0, 0, 40, 41, 0, 0, 0, 0, 0, 0,
2862 0, 42, 0, 0, 0, 0, 0, 0, 0, 0,
2863 0, 0, 0, 0, 43, 0, 0, 0, 0, 44,
2864 45, 0, 0, 0, 46, 0, 47, 0, 48, 0,
2865 49, 1, 2, 3, 4, 0, 5, 6, 7, 8,
2866 9, 10, 11, 12, 13, 0, -118, 0, 15, 16,
2867 17, 18, 19, 20, 21, 22, 0, 23, 126, 0,
2868 127, 0, 0, 0, 24, 128, 25, 26, 0, 27,
2869 129, 28, 0, 29, 130, 30, 31, 32, 0, 0,
2870 33, 34, 0, 35, 36, 0, 0, 0, 0, 0,
2871 0, 37, 38, 0, 131, 0, 0, 0, 39, 0,
2872 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2873 0, 0, 0, 0, 0, 0, 0, 0, 40, 41,
2874 0, 0, 0, 0, 0, 0, 0, 132, 0, 0,
2875 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2876 43, 0, 0, 0, 0, 44, 45, 0, 0, 0,
2877 46, 0, 47, 0, 48, 0, 49, 1, 2, 3,
2878 4, 0, 5, 6, 7, 8, 9, 10, 11, 12,
2879 13, 0, 0, 0, 15, 16, 17, 18, 19, 20,
2880 21, 22, 0, 23, 126, 0, 127, 0, 0, 0,
2881 24, 128, 25, 26, 0, 27, 129, 28, 0, 29,
2882 130, 30, 31, 32, 0, 0, 33, 34, 0, 35,
2883 36, 0, 0, 0, 0, 0, 0, 37, 38, 0,
2884 131, 0, 0, 0, 39, 0, 0, 0, 0, 0,
2885 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2886 0, 0, 0, 0, 40, 41, 0, 0, 0, 0,
2887 0, 0, 0, 132, 0, 148, 0, 3, 4, 0,
2888 5, 6, 7, 8, 9, 0, 43, 0, 0, 0,
2889 0, 44, 45, 0, 0, 0, 46, 20, 47, 22,
2890 48, 23, 49, 0, 127, 0, 0, 0, 24, 0,
2891 0, 0, 0, 0, 0, 28, 0, 29, 149, 0,
2892 0, 0, 0, 0, 0, 34, 0, 35, 36, 0,
2893 0, 0, 0, 0, 0, 37, 0, 0, 0, 0,
2894 0, 0, 39, 0, 0, 98, 0, 3, 4, 0,
2895 5, 6, 7, 8, 9, 0, 0, 0, 0, 0,
2896 0, 0, 40, 41, 0, 0, 0, 20, 0, 22,
2897 0, 23, 0, 0, 0, 0, 0, 0, 24, 0,
2898 0, 0, 0, 0, 43, 28, 0, 29, 0, 44,
2899 45, 0, 0, 0, 46, 34, 47, 35, 36, 0,
2900 49, 0, 0, 0, 0, 37, 0, 0, 0, 0,
2901 0, 0, 39, 0, 0, 0, 0, 0, 0, 0,
2902 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2903 0, 0, 40, 41, 0, 0, 0, 0, 0, 0,
2904 164, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2905 0, 0, 0, 0, 43, 0, 0, 0, 0, 44,
2906 45, 0, 0, 0, 46, 0, 47, 165, 166, 167,
2907 49, 168, 169, 170, 171, 172, 173, 174, 175, 176,
2908 177, 178, 179, 180, 181, 182, 183, 184, 185, 0,
2909 186, 187, 188, 0, 189, 190, 191, 0, 0, 0,
2910 0, 0, 192, 164, 193, 0, 194, 195, 196, 197,
2911 198, 0, 199, 200, 201, 202, 203, 0, 0, 0,
2912 0, 0, 204, 0, 205, 0, 0, 206, 0, 0,
2913 165, 166, 167, 331, 168, 169, 170, 171, 172, 173,
2914 174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
2915 184, 185, 0, 186, 187, 188, 0, 189, 190, 191,
2916 0, 0, 0, 0, 0, 192, 164, 193, 0, 194,
2917 195, 196, 197, 198, 0, 199, 200, 201, 202, 203,
2918 0, 0, 0, 0, 0, 204, 0, 205, 0, 0,
2919 206, 0, 0, 165, 166, 167, 364, 168, 169, 170,
2920 171, 172, 173, 174, 175, 176, 177, 178, 179, 180,
2921 181, 182, 183, 184, 185, 0, 186, 187, 188, 0,
2922 189, 190, 191, 0, 0, 0, 0, 0, 192, 164,
2923 193, 0, 194, 195, 196, 197, 198, 0, 199, 200,
2924 201, 202, 203, 0, 0, 0, 0, 0, 204, 0,
2925 205, 0, 0, 206, 0, 0, 165, 166, 167, 401,
2926 168, 169, 170, 171, 172, 173, 174, 175, 176, 177,
2927 178, 179, 180, 181, 182, 183, 184, 185, 0, 186,
2928 187, 188, 0, 189, 190, 191, 0, 0, 0, 0,
2929 164, 192, 0, 193, 356, 194, 195, 196, 197, 198,
2930 0, 199, 200, 201, 202, 203, 0, 0, 0, 0,
2931 0, 204, 0, 205, 0, 0, 206, 165, 166, 167,
2932 0, 168, 169, 170, 171, 172, 173, 174, 175, 176,
2933 177, 178, 179, 180, 181, 182, 183, 184, 185, 0,
2934 186, 187, 188, 0, 189, 190, 191, 0, 0, 0,
2935 0, 164, 192, 0, 193, 0, 194, 195, 196, 197,
2936 198, 0, 199, 200, 201, 202, 203, 0, 0, 0,
2937 0, 0, 204, 0, 205, 358, 0, 206, 165, 166,
2938 167, 0, 168, 169, 170, 171, 172, 173, 174, 175,
2939 176, 177, 178, 179, 180, 181, 182, 183, 184, 185,
2940 0, 186, 187, 188, 0, 189, 190, 191, 0, 0,
2941 0, 0, 164, 192, 0, 193, 491, 194, 195, 196,
2942 197, 198, 0, 199, 200, 201, 202, 203, 0, 0,
2943 0, 0, 0, 204, 0, 205, 0, 0, 206, 165,
2944 166, 167, 0, 168, 169, 170, 171, 172, 173, 174,
2945 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
2946 185, 0, 186, 187, 188, 0, 189, 190, 191, 0,
2947 0, 0, 0, 164, 192, 0, 193, 0, 194, 195,
2948 196, 197, 198, 0, 199, 200, 201, 202, 203, 0,
2949 0, 0, 0, 0, 204, 0, 205, 0, 0, 206,
2950 165, 166, 167, 0, 168, 169, 170, 171, 172, 173,
2951 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2952 0, 185, 0, 186, 187, 188, 0, 189, 190, 191,
2953 0, 0, 0, 0, 164, 0, 0, 0, 0, 194,
2954 195, 196, 197, 198, 0, 199, 200, 201, 202, 203,
2955 0, 0, 0, 0, 0, 204, 0, 205, 0, 0,
2956 206, 165, 166, 167, 0, 168, 169, 170, 171, 172,
2957 173, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2958 0, 0, 0, 0, 186, 187, 188, 0, 189, 190,
2959 191, 0, 0, 0, 0, 164, 0, 0, 0, 0,
2960 194, 195, 196, 197, 198, 0, 199, 200, 201, 202,
2961 203, 0, 0, 0, 0, 0, 204, 0, 205, 0,
2962 0, 206, 165, 166, 167, 0, 168, 169, 170, 171,
2963 172, 173, 0, 0, 0, 0, 0, 0, 0, 0,
2964 0, 0, 0, 0, 0, 186, 187, 188, 0, 189,
2965 190, 191, 0, 0, 0, 0, 164, 0, 0, 0,
2966 0, 0, 195, 196, 197, 198, 0, 199, 200, 201,
2967 202, 203, 0, 0, 0, 0, 0, 204, 0, 205,
2968 0, 0, 206, 165, 166, 167, 0, 168, 169, 170,
2969 171, 172, 173, 0, 0, 0, 0, 0, 0, 0,
2970 0, 0, 0, 0, 0, 0, 186, 187, 188, 0,
2971 189, 190, 191, 0, 0, 0, 0, 164, 0, 0,
2972 0, 0, 0, 0, 196, 197, 198, 0, 199, 200,
2973 201, 202, 203, 0, 0, 0, 0, 0, 204, 0,
2974 205, 0, 0, 206, 165, 166, 167, 0, 168, 169,
2975 170, 171, 172, 173, 0, 0, 0, 0, 0, 0,
2976 0, 0, 0, 0, 0, 0, 0, 186, 187, 188,
2977 0, 189, 190, 191, 0, 0, 0, 0, 164, 0,
2978 0, 0, 0, 0, 0, -153, 197, 198, 0, 199,
2979 200, 201, 202, 203, 0, 0, 0, 0, 0, 204,
2980 0, 205, 0, 0, 206, 165, 166, 167, 0, -153,
2981 -153, -153, -153, 172, 173, 0, 0, 0, 0, 0,
2982 0, 0, 0, 0, 0, 0, 0, 0, 186, 187,
2983 188, 0, 189, 190, 191, 0, 0, 0, 0, 0,
2984 0, 0, 0, 0, 0, 0, 0, 197, 198, 0,
2985 199, 200, 201, 202, 203, 0, 0, 0, 0, 0,
2986 204, 0, 205, 0, 0, 206
2989 static const yytype_int16 yycheck[] =
2991 0, 0, 0, 0, 0, 90, 58, 39, 249, 48,
2992 97, 328, 20, 108, 3, 215, 24, 3, 390, 324,
2993 126, 127, 3, 3, 224, 100, 318, 3, 3, 37,
2994 19, 39, 40, 41, 50, 43, 44, 45, 19, 47,
2995 46, 3, 68, 468, 19, 362, 92, 472, 473, 134,
2996 14, 4, 52, 52, 52, 52, 52, 19, 133, 0,
2997 0, 378, 0, 27, 99, 100, 491, 20, 21, 22,
2998 375, 24, 389, 26, 36, 367, 102, 3, 124, 5,
2999 505, 127, 8, 9, 10, 38, 12, 512, 100, 3,
3000 34, 100, 124, 46, 47, 48, 49, 103, 106, 100,
3001 108, 89, 122, 122, 122, 19, 122, 127, 100, 204,
3002 351, 52, 52, 93, 52, 420, 124, 93, 62, 45,
3003 320, 133, 128, 129, 133, 18, 28, 35, 3, 55,
3004 56, 33, 133, 374, 115, 3, 122, 126, 455, 511,
3005 457, 133, 128, 51, 19, 100, 99, 147, 147, 147,
3006 147, 147, 3, 115, 5, 163, 164, 165, 166, 167,
3007 168, 169, 170, 171, 172, 173, 174, 175, 176, 177,
3008 178, 179, 180, 181, 182, 183, 184, 185, 133, 132,
3009 122, 189, 190, 191, 192, 193, 194, 195, 196, 197,
3010 198, 199, 200, 201, 202, 203, 204, 205, 230, 102,
3011 232, 122, 105, 209, 212, 122, 147, 147, 247, 147,
3012 126, 18, 3, 213, 213, 213, 0, 458, 100, 126,
3013 27, 3, 230, 229, 232, 32, 321, 122, 122, 90,
3014 91, 92, 3, 474, 105, 127, 132, 4, 100, 46,
3015 125, 100, 3, 328, 250, 251, 3, 3, 333, 126,
3016 18, 68, 4, 20, 21, 22, 341, 24, 3, 26,
3017 347, 122, 349, 124, 99, 68, 127, 3, 20, 21,
3018 22, 38, 24, 3, 26, 516, 3, 362, 102, 46,
3019 47, 48, 49, 3, 99, 14, 38, 127, 127, 122,
3020 133, 105, 100, 378, 302, 47, 48, 49, 132, 3,
3021 54, 90, 91, 92, 389, 392, 54, 3, 133, 89,
3022 310, 310, 310, 321, 3, 3, 122, 126, 318, 318,
3023 318, 132, 100, 112, 113, 114, 115, 116, 133, 105,
3024 132, 17, 99, 122, 122, 124, 388, 102, 127, 126,
3025 100, 3, 132, 126, 102, 126, 132, 379, 356, 436,
3026 100, 126, 384, 3, 133, 5, 6, 363, 8, 9,
3027 10, 11, 12, 126, 65, 132, 105, 367, 367, 367,
3028 455, 379, 457, 122, 18, 25, 384, 27, 133, 29,
3029 133, 132, 3, 27, 90, 91, 92, 31, 32, 3,
3030 27, 132, 126, 126, 132, 45, 133, 132, 3, 122,
3031 44, 132, 46, 53, 132, 55, 56, 126, 114, 115,
3032 116, 132, 52, 310, 397, 133, 122, 132, 124, 58,
3033 70, 127, 147, 444, 127, 340, 69, 444, 497, 483,
3034 398, 426, 426, 441, 465, 488, 418, 437, 27, 371,
3035 90, 91, 392, -1, -1, -1, -1, -1, -1, -1,
3036 -1, -1, -1, -1, -1, -1, -1, -1, -1, 459,
3037 459, 459, 459, 459, -1, 465, -1, -1, -1, -1,
3038 -1, -1, 122, -1, 124, -1, -1, -1, 128, -1,
3039 -1, -1, -1, 483, 483, 483, 483, 483, -1, -1,
3040 -1, -1, -1, -1, -1, -1, -1, 497, 497, 497,
3041 497, 497, 0, -1, -1, 3, 4, 5, 6, -1,
3042 8, 9, 10, 11, 12, 13, 14, 15, 16, -1,
3043 -1, 19, 20, 21, 22, 23, 24, 25, 26, -1,
3044 -1, 29, -1, -1, 40, -1, -1, -1, 36, -1,
3045 38, 39, -1, 41, -1, 43, -1, 45, -1, 47,
3046 48, 49, -1, -1, 52, 53, -1, 55, 56, -1,
3047 -1, 67, 68, 69, -1, 63, 64, -1, -1, 75,
3048 76, -1, 70, -1, -1, -1, -1, -1, -1, -1,
3049 -1, -1, -1, -1, 90, 91, 92, -1, 94, 95,
3050 96, -1, 90, 91, -1, -1, -1, -1, -1, -1,
3051 -1, 99, -1, 109, 110, -1, 112, 113, 114, 115,
3052 116, -1, -1, -1, 112, -1, 122, -1, 124, 117,
3053 118, 127, -1, -1, 122, -1, 124, -1, 126, -1,
3054 128, -1, -1, -1, 132, 3, 4, 5, 6, -1,
3055 8, 9, 10, 11, 12, 13, 14, 15, 16, -1,
3056 -1, -1, 20, 21, 22, 23, 24, 25, 26, 27,
3057 -1, 29, 30, -1, 32, -1, -1, -1, 36, 37,
3058 38, 39, -1, 41, 42, 43, -1, 45, 46, 47,
3059 48, 49, -1, -1, 52, 53, -1, 55, 56, -1,
3060 -1, -1, -1, -1, -1, 63, 64, -1, 66, -1,
3061 -1, -1, 70, -1, -1, -1, -1, -1, -1, -1,
3062 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3063 -1, -1, 90, 91, -1, -1, -1, -1, -1, -1,
3064 -1, 99, -1, -1, -1, -1, -1, -1, -1, -1,
3065 -1, -1, -1, -1, 112, -1, -1, -1, -1, 117,
3066 118, -1, -1, -1, 122, -1, 124, -1, 126, -1,
3067 128, -1, -1, -1, 132, 3, 4, 5, 6, -1,
3068 8, 9, 10, 11, 12, 13, 14, 15, 16, -1,
3069 -1, -1, 20, 21, 22, 23, 24, 25, 26, 27,
3070 -1, 29, 30, -1, 32, -1, -1, -1, 36, 37,
3071 38, 39, -1, 41, 42, 43, -1, 45, 46, 47,
3072 48, 49, -1, -1, 52, 53, -1, 55, 56, -1,
3073 -1, -1, -1, -1, -1, 63, 64, -1, 66, -1,
3074 -1, -1, 70, -1, -1, -1, -1, -1, -1, -1,
3075 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3076 -1, -1, 90, 91, -1, -1, -1, -1, -1, -1,
3077 -1, 99, -1, -1, -1, -1, -1, -1, -1, -1,
3078 -1, -1, -1, -1, 112, -1, -1, -1, -1, 117,
3079 118, -1, -1, -1, 122, -1, 124, -1, 126, -1,
3080 128, -1, -1, -1, 132, 3, 4, 5, 6, -1,
3081 8, 9, 10, 11, 12, 13, 14, 15, 16, -1,
3082 -1, -1, 20, 21, 22, 23, 24, 25, 26, 27,
3083 -1, 29, 30, -1, 32, -1, -1, -1, 36, 37,
3084 38, 39, -1, 41, 42, 43, -1, 45, 46, 47,
3085 48, 49, -1, -1, 52, 53, -1, 55, 56, -1,
3086 -1, -1, -1, -1, -1, 63, 64, -1, 66, -1,
3087 -1, -1, 70, -1, -1, -1, -1, -1, -1, -1,
3088 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3089 -1, -1, 90, 91, -1, -1, -1, -1, -1, -1,
3090 -1, 99, -1, -1, -1, -1, -1, -1, -1, -1,
3091 -1, -1, -1, -1, 112, -1, -1, -1, -1, 117,
3092 118, -1, -1, -1, 122, -1, 124, -1, 126, -1,
3093 128, -1, -1, -1, 132, 3, 4, 5, 6, -1,
3094 8, 9, 10, 11, 12, 13, 14, 15, 16, -1,
3095 -1, 19, 20, 21, 22, 23, 24, 25, 26, -1,
3096 -1, 29, -1, -1, 40, -1, -1, -1, 36, -1,
3097 38, 39, -1, 41, -1, 43, -1, 45, -1, 47,
3098 48, 49, -1, -1, 52, 53, -1, 55, 56, -1,
3099 -1, -1, -1, -1, -1, 63, 64, -1, -1, 75,
3100 76, -1, 70, -1, -1, -1, -1, -1, -1, -1,
3101 -1, -1, -1, -1, 90, 91, 92, -1, 94, 95,
3102 96, -1, 90, 91, -1, -1, -1, -1, -1, -1,
3103 -1, 99, -1, 109, 110, -1, 112, 113, 114, 115,
3104 116, -1, -1, -1, 112, -1, 122, -1, 124, 117,
3105 118, 127, -1, -1, 122, -1, 124, -1, 126, -1,
3106 128, -1, -1, -1, 132, 3, 4, 5, 6, -1,
3107 8, 9, 10, 11, 12, 13, 14, 15, 16, -1,
3108 -1, -1, 20, 21, 22, 23, 24, 25, 26, -1,
3109 -1, 29, -1, -1, -1, -1, -1, -1, 36, -1,
3110 38, 39, -1, 41, -1, 43, -1, 45, -1, 47,
3111 48, 49, -1, -1, 52, 53, -1, 55, 56, -1,
3112 -1, -1, -1, -1, -1, 63, 64, -1, -1, -1,
3113 -1, -1, 70, -1, -1, -1, -1, -1, -1, -1,
3114 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3115 -1, -1, 90, 91, -1, -1, -1, -1, -1, -1,
3116 -1, 99, -1, -1, -1, -1, -1, -1, -1, -1,
3117 -1, -1, -1, -1, 112, -1, -1, -1, -1, 117,
3118 118, -1, -1, -1, 122, -1, 124, -1, 126, -1,
3119 128, -1, -1, -1, 132, 3, 4, 5, 6, -1,
3120 8, 9, 10, 11, 12, 13, 14, 15, 16, -1,
3121 -1, -1, 20, 21, 22, 23, 24, 25, 26, -1,
3122 -1, 29, -1, -1, -1, -1, -1, -1, 36, -1,
3123 38, 39, -1, 41, -1, 43, -1, 45, -1, 47,
3124 48, 49, -1, -1, 52, 53, -1, 55, 56, -1,
3125 -1, -1, -1, -1, -1, 63, 64, -1, -1, -1,
3126 -1, -1, 70, -1, -1, -1, -1, -1, -1, -1,
3127 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3128 -1, -1, 90, 91, -1, -1, -1, -1, -1, -1,
3129 -1, 99, -1, -1, -1, -1, -1, -1, -1, -1,
3130 -1, -1, -1, -1, 112, -1, -1, -1, -1, 117,
3131 118, -1, -1, -1, 122, -1, 124, -1, 126, -1,
3132 128, -1, -1, -1, 132, 3, 4, 5, 6, -1,
3133 8, 9, 10, 11, 12, 13, 14, 15, 16, -1,
3134 -1, -1, 20, 21, 22, 23, 24, 25, 26, -1,
3135 -1, 29, -1, -1, -1, -1, -1, -1, 36, -1,
3136 38, 39, -1, 41, -1, 43, -1, 45, -1, 47,
3137 48, 49, -1, -1, 52, 53, -1, 55, 56, -1,
3138 -1, -1, -1, -1, -1, 63, 64, -1, -1, -1,
3139 -1, -1, 70, -1, -1, -1, -1, -1, -1, -1,
3140 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3141 -1, -1, 90, 91, -1, -1, -1, -1, -1, -1,
3142 -1, 99, -1, -1, -1, -1, -1, -1, -1, -1,
3143 -1, -1, -1, -1, 112, -1, -1, -1, -1, 117,
3144 118, -1, -1, -1, 122, -1, 124, -1, 126, -1,
3145 128, -1, -1, -1, 132, 3, 4, 5, 6, -1,
3146 8, 9, 10, 11, 12, 13, 14, 15, 16, -1,
3147 -1, -1, 20, 21, 22, 23, 24, 25, 26, -1,
3148 -1, 29, -1, -1, -1, -1, -1, -1, 36, -1,
3149 38, 39, -1, 41, -1, 43, -1, 45, -1, 47,
3150 48, 49, -1, -1, 52, 53, -1, 55, 56, -1,
3151 -1, -1, -1, -1, -1, 63, 64, -1, -1, -1,
3152 -1, -1, 70, -1, -1, -1, -1, -1, -1, -1,
3153 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3154 -1, -1, 90, 91, -1, -1, -1, -1, -1, -1,
3155 -1, 99, -1, -1, -1, -1, -1, -1, -1, -1,
3156 -1, -1, -1, -1, 112, -1, -1, -1, -1, 117,
3157 118, -1, -1, -1, 122, -1, 124, -1, 126, -1,
3158 128, -1, 0, -1, 132, 3, 4, 5, 6, -1,
3159 8, 9, 10, 11, 12, 13, 14, 15, 16, -1,
3160 -1, 19, 20, 21, 22, 23, 24, 25, 26, -1,
3161 -1, 29, -1, -1, -1, -1, -1, -1, 36, -1,
3162 38, 39, -1, 41, -1, 43, -1, 45, -1, 47,
3163 48, 49, -1, -1, 52, 53, -1, 55, 56, -1,
3164 -1, -1, -1, -1, -1, 63, 64, -1, -1, -1,
3165 -1, -1, 70, -1, -1, -1, -1, -1, -1, -1,
3166 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3167 -1, -1, 90, 91, -1, -1, -1, -1, -1, -1,
3168 -1, 99, -1, -1, -1, -1, -1, -1, -1, -1,
3169 -1, -1, -1, -1, 112, -1, -1, -1, -1, 117,
3170 118, -1, -1, -1, 122, -1, 124, -1, 126, -1,
3171 128, 3, 4, 5, 6, -1, 8, 9, 10, 11,
3172 12, 13, 14, 15, 16, -1, 18, -1, 20, 21,
3173 22, 23, 24, 25, 26, 27, -1, 29, 30, -1,
3174 32, -1, -1, -1, 36, 37, 38, 39, -1, 41,
3175 42, 43, -1, 45, 46, 47, 48, 49, -1, -1,
3176 52, 53, -1, 55, 56, -1, -1, -1, -1, -1,
3177 -1, 63, 64, -1, 66, -1, -1, -1, 70, -1,
3178 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3179 -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
3180 -1, -1, -1, -1, -1, -1, -1, 99, -1, -1,
3181 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3182 112, -1, -1, -1, -1, 117, 118, -1, -1, -1,
3183 122, -1, 124, -1, 126, -1, 128, 3, 4, 5,
3184 6, -1, 8, 9, 10, 11, 12, 13, 14, 15,
3185 16, -1, -1, -1, 20, 21, 22, 23, 24, 25,
3186 26, 27, -1, 29, 30, -1, 32, -1, -1, -1,
3187 36, 37, 38, 39, -1, 41, 42, 43, -1, 45,
3188 46, 47, 48, 49, -1, -1, 52, 53, -1, 55,
3189 56, -1, -1, -1, -1, -1, -1, 63, 64, -1,
3190 66, -1, -1, -1, 70, -1, -1, -1, -1, -1,
3191 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3192 -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
3193 -1, -1, -1, 99, -1, 3, -1, 5, 6, -1,
3194 8, 9, 10, 11, 12, -1, 112, -1, -1, -1,
3195 -1, 117, 118, -1, -1, -1, 122, 25, 124, 27,
3196 126, 29, 128, -1, 32, -1, -1, -1, 36, -1,
3197 -1, -1, -1, -1, -1, 43, -1, 45, 46, -1,
3198 -1, -1, -1, -1, -1, 53, -1, 55, 56, -1,
3199 -1, -1, -1, -1, -1, 63, -1, -1, -1, -1,
3200 -1, -1, 70, -1, -1, 3, -1, 5, 6, -1,
3201 8, 9, 10, 11, 12, -1, -1, -1, -1, -1,
3202 -1, -1, 90, 91, -1, -1, -1, 25, -1, 27,
3203 -1, 29, -1, -1, -1, -1, -1, -1, 36, -1,
3204 -1, -1, -1, -1, 112, 43, -1, 45, -1, 117,
3205 118, -1, -1, -1, 122, 53, 124, 55, 56, -1,
3206 128, -1, -1, -1, -1, 63, -1, -1, -1, -1,
3207 -1, -1, 70, -1, -1, -1, -1, -1, -1, -1,
3208 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3209 -1, -1, 90, 91, -1, -1, -1, -1, -1, -1,
3210 40, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3211 -1, -1, -1, -1, 112, -1, -1, -1, -1, 117,
3212 118, -1, -1, -1, 122, -1, 124, 67, 68, 69,
3213 128, 71, 72, 73, 74, 75, 76, 77, 78, 79,
3214 80, 81, 82, 83, 84, 85, 86, 87, 88, -1,
3215 90, 91, 92, -1, 94, 95, 96, -1, -1, -1,
3216 -1, -1, 102, 40, 104, -1, 106, 107, 108, 109,
3217 110, -1, 112, 113, 114, 115, 116, -1, -1, -1,
3218 -1, -1, 122, -1, 124, -1, -1, 127, -1, -1,
3219 67, 68, 69, 133, 71, 72, 73, 74, 75, 76,
3220 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
3221 87, 88, -1, 90, 91, 92, -1, 94, 95, 96,
3222 -1, -1, -1, -1, -1, 102, 40, 104, -1, 106,
3223 107, 108, 109, 110, -1, 112, 113, 114, 115, 116,
3224 -1, -1, -1, -1, -1, 122, -1, 124, -1, -1,
3225 127, -1, -1, 67, 68, 69, 133, 71, 72, 73,
3226 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
3227 84, 85, 86, 87, 88, -1, 90, 91, 92, -1,
3228 94, 95, 96, -1, -1, -1, -1, -1, 102, 40,
3229 104, -1, 106, 107, 108, 109, 110, -1, 112, 113,
3230 114, 115, 116, -1, -1, -1, -1, -1, 122, -1,
3231 124, -1, -1, 127, -1, -1, 67, 68, 69, 133,
3232 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
3233 81, 82, 83, 84, 85, 86, 87, 88, -1, 90,
3234 91, 92, -1, 94, 95, 96, -1, -1, -1, -1,
3235 40, 102, -1, 104, 105, 106, 107, 108, 109, 110,
3236 -1, 112, 113, 114, 115, 116, -1, -1, -1, -1,
3237 -1, 122, -1, 124, -1, -1, 127, 67, 68, 69,
3238 -1, 71, 72, 73, 74, 75, 76, 77, 78, 79,
3239 80, 81, 82, 83, 84, 85, 86, 87, 88, -1,
3240 90, 91, 92, -1, 94, 95, 96, -1, -1, -1,
3241 -1, 40, 102, -1, 104, -1, 106, 107, 108, 109,
3242 110, -1, 112, 113, 114, 115, 116, -1, -1, -1,
3243 -1, -1, 122, -1, 124, 125, -1, 127, 67, 68,
3244 69, -1, 71, 72, 73, 74, 75, 76, 77, 78,
3245 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
3246 -1, 90, 91, 92, -1, 94, 95, 96, -1, -1,
3247 -1, -1, 40, 102, -1, 104, 105, 106, 107, 108,
3248 109, 110, -1, 112, 113, 114, 115, 116, -1, -1,
3249 -1, -1, -1, 122, -1, 124, -1, -1, 127, 67,
3250 68, 69, -1, 71, 72, 73, 74, 75, 76, 77,
3251 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
3252 88, -1, 90, 91, 92, -1, 94, 95, 96, -1,
3253 -1, -1, -1, 40, 102, -1, 104, -1, 106, 107,
3254 108, 109, 110, -1, 112, 113, 114, 115, 116, -1,
3255 -1, -1, -1, -1, 122, -1, 124, -1, -1, 127,
3256 67, 68, 69, -1, 71, 72, 73, 74, 75, 76,
3257 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3258 -1, 88, -1, 90, 91, 92, -1, 94, 95, 96,
3259 -1, -1, -1, -1, 40, -1, -1, -1, -1, 106,
3260 107, 108, 109, 110, -1, 112, 113, 114, 115, 116,
3261 -1, -1, -1, -1, -1, 122, -1, 124, -1, -1,
3262 127, 67, 68, 69, -1, 71, 72, 73, 74, 75,
3263 76, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3264 -1, -1, -1, -1, 90, 91, 92, -1, 94, 95,
3265 96, -1, -1, -1, -1, 40, -1, -1, -1, -1,
3266 106, 107, 108, 109, 110, -1, 112, 113, 114, 115,
3267 116, -1, -1, -1, -1, -1, 122, -1, 124, -1,
3268 -1, 127, 67, 68, 69, -1, 71, 72, 73, 74,
3269 75, 76, -1, -1, -1, -1, -1, -1, -1, -1,
3270 -1, -1, -1, -1, -1, 90, 91, 92, -1, 94,
3271 95, 96, -1, -1, -1, -1, 40, -1, -1, -1,
3272 -1, -1, 107, 108, 109, 110, -1, 112, 113, 114,
3273 115, 116, -1, -1, -1, -1, -1, 122, -1, 124,
3274 -1, -1, 127, 67, 68, 69, -1, 71, 72, 73,
3275 74, 75, 76, -1, -1, -1, -1, -1, -1, -1,
3276 -1, -1, -1, -1, -1, -1, 90, 91, 92, -1,
3277 94, 95, 96, -1, -1, -1, -1, 40, -1, -1,
3278 -1, -1, -1, -1, 108, 109, 110, -1, 112, 113,
3279 114, 115, 116, -1, -1, -1, -1, -1, 122, -1,
3280 124, -1, -1, 127, 67, 68, 69, -1, 71, 72,
3281 73, 74, 75, 76, -1, -1, -1, -1, -1, -1,
3282 -1, -1, -1, -1, -1, -1, -1, 90, 91, 92,
3283 -1, 94, 95, 96, -1, -1, -1, -1, 40, -1,
3284 -1, -1, -1, -1, -1, 108, 109, 110, -1, 112,
3285 113, 114, 115, 116, -1, -1, -1, -1, -1, 122,
3286 -1, 124, -1, -1, 127, 67, 68, 69, -1, 71,
3287 72, 73, 74, 75, 76, -1, -1, -1, -1, -1,
3288 -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
3289 92, -1, 94, 95, 96, -1, -1, -1, -1, -1,
3290 -1, -1, -1, -1, -1, -1, -1, 109, 110, -1,
3291 112, 113, 114, 115, 116, -1, -1, -1, -1, -1,
3292 122, -1, 124, -1, -1, 127
3295 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
3296 symbol of state STATE-NUM. */
3297 static const yytype_uint8 yystos[] =
3299 0, 3, 4, 5, 6, 8, 9, 10, 11, 12,
3300 13, 14, 15, 16, 19, 20, 21, 22, 23, 24,
3301 25, 26, 27, 29, 36, 38, 39, 41, 43, 45,
3302 47, 48, 49, 52, 53, 55, 56, 63, 64, 70,
3303 90, 91, 99, 112, 117, 118, 122, 124, 126, 128,
3304 135, 136, 137, 138, 144, 147, 148, 154, 158, 159,
3305 160, 161, 163, 171, 179, 182, 185, 188, 189, 190,
3306 191, 195, 197, 206, 216, 219, 232, 233, 234, 237,
3307 238, 239, 240, 243, 245, 246, 89, 50, 122, 122,
3308 164, 122, 3, 19, 126, 183, 184, 18, 3, 239,
3309 3, 218, 239, 122, 184, 222, 122, 126, 122, 127,
3310 239, 122, 236, 239, 241, 242, 239, 239, 239, 239,
3311 239, 237, 228, 229, 230, 236, 30, 32, 37, 42,
3312 46, 66, 99, 132, 143, 144, 145, 148, 150, 165,
3313 166, 181, 189, 235, 3, 0, 138, 126, 3, 46,
3314 150, 156, 157, 238, 18, 27, 31, 32, 44, 46,
3315 205, 244, 191, 100, 40, 67, 68, 69, 71, 72,
3316 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
3317 83, 84, 85, 86, 87, 88, 90, 91, 92, 94,
3318 95, 96, 102, 104, 106, 107, 108, 109, 110, 112,
3319 113, 114, 115, 116, 122, 124, 127, 3, 122, 162,
3320 145, 146, 172, 187, 126, 127, 3, 184, 221, 222,
3321 223, 231, 122, 237, 127, 239, 180, 228, 3, 155,
3322 105, 132, 100, 133, 125, 100, 236, 3, 3, 151,
3323 152, 237, 237, 151, 3, 132, 145, 126, 136, 3,
3324 99, 68, 3, 35, 51, 215, 3, 3, 207, 102,
3325 239, 239, 239, 239, 239, 239, 239, 239, 239, 239,
3326 239, 239, 239, 239, 239, 239, 239, 239, 239, 239,
3327 239, 239, 239, 3, 239, 239, 239, 239, 239, 239,
3328 239, 239, 239, 239, 239, 239, 239, 239, 239, 228,
3329 239, 3, 122, 128, 237, 99, 14, 239, 99, 139,
3330 140, 141, 147, 148, 195, 197, 206, 216, 186, 183,
3331 127, 122, 227, 3, 93, 212, 213, 214, 133, 3,
3332 115, 133, 142, 143, 133, 237, 236, 236, 105, 226,
3333 100, 143, 132, 226, 237, 237, 3, 54, 192, 54,
3334 193, 3, 208, 209, 3, 5, 105, 133, 125, 89,
3335 239, 3, 133, 122, 133, 132, 141, 126, 139, 228,
3336 102, 105, 210, 214, 133, 100, 146, 132, 133, 105,
3337 36, 115, 223, 225, 102, 149, 152, 132, 99, 133,
3338 122, 223, 17, 194, 223, 224, 126, 226, 100, 239,
3339 3, 133, 146, 237, 126, 139, 132, 133, 3, 5,
3340 8, 9, 10, 12, 45, 55, 56, 211, 225, 226,
3341 93, 214, 28, 33, 173, 175, 177, 178, 146, 236,
3342 236, 238, 146, 212, 224, 126, 100, 198, 149, 209,
3343 133, 34, 62, 167, 168, 169, 170, 132, 210, 126,
3344 214, 126, 122, 173, 175, 65, 153, 133, 133, 196,
3345 223, 46, 99, 189, 202, 203, 204, 239, 105, 132,
3346 169, 170, 220, 176, 3, 146, 146, 226, 99, 144,
3347 148, 189, 199, 200, 201, 206, 216, 3, 27, 132,
3348 204, 105, 142, 142, 142, 226, 126, 126, 132, 201,
3349 215, 142, 132, 132, 133, 217, 199, 3, 174, 142,
3350 132, 122, 126, 132, 212, 142, 133, 132, 226
3353 #define yyerrok (yyerrstatus = 0)
3354 #define yyclearin (yychar = YYEMPTY)
3355 #define YYEMPTY (-2)
3358 #define YYACCEPT goto yyacceptlab
3359 #define YYABORT goto yyabortlab
3360 #define YYERROR goto yyerrorlab
3363 /* Like YYERROR except do call yyerror. This remains here temporarily
3364 to ease the transition to the new meaning of YYERROR, for GCC.
3365 Once GCC version 2 has supplanted version 1, this can go. */
3367 #define YYFAIL goto yyerrlab
3369 #define YYRECOVERING() (!!yyerrstatus)
3371 #define YYBACKUP(Token, Value) \
3373 if (yychar == YYEMPTY && yylen == 1) \
3377 yytoken = YYTRANSLATE (yychar); \
3383 yyerror (YY_("syntax error: cannot back up")); \
3390 #define YYERRCODE 256
3393 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
3394 If N is 0, then set CURRENT to the empty location which ends
3395 the previous symbol: RHS[0] (always defined). */
3397 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
3398 #ifndef YYLLOC_DEFAULT
3399 # define YYLLOC_DEFAULT(Current, Rhs, N) \
3403 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
3404 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
3405 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
3406 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
3410 (Current).first_line = (Current).last_line = \
3411 YYRHSLOC (Rhs, 0).last_line; \
3412 (Current).first_column = (Current).last_column = \
3413 YYRHSLOC (Rhs, 0).last_column; \
3419 /* YY_LOCATION_PRINT -- Print the location on the stream.
3420 This macro was not mandated originally: define only if we know
3421 we won't break user code: when these are the locations we know. */
3423 #ifndef YY_LOCATION_PRINT
3424 # if YYLTYPE_IS_TRIVIAL
3425 # define YY_LOCATION_PRINT(File, Loc) \
3426 fprintf (File, "%d.%d-%d.%d", \
3427 (Loc).first_line, (Loc).first_column, \
3428 (Loc).last_line, (Loc).last_column)
3430 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
3435 /* YYLEX -- calling `yylex' with the right arguments. */
3438 # define YYLEX yylex (YYLEX_PARAM)
3440 # define YYLEX yylex ()
3443 /* Enable debugging if requested. */
3447 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
3448 # define YYFPRINTF fprintf
3451 # define YYDPRINTF(Args) \
3457 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
3461 YYFPRINTF (stderr, "%s ", Title); \
3462 yy_symbol_print (stderr, \
3464 YYFPRINTF (stderr, "\n"); \
3469 /*--------------------------------.
3470 | Print this symbol on YYOUTPUT. |
3471 `--------------------------------*/
3474 #if (defined __STDC__ || defined __C99__FUNC__ \
3475 || defined __cplusplus || defined _MSC_VER)
3477 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
3480 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
3483 YYSTYPE const * const yyvaluep;
3489 if (yytype < YYNTOKENS)
3490 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
3502 /*--------------------------------.
3503 | Print this symbol on YYOUTPUT. |
3504 `--------------------------------*/
3506 #if (defined __STDC__ || defined __C99__FUNC__ \
3507 || defined __cplusplus || defined _MSC_VER)
3509 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
3512 yy_symbol_print (yyoutput, yytype, yyvaluep)
3515 YYSTYPE const * const yyvaluep;
3518 if (yytype < YYNTOKENS)
3519 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
3521 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
3523 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
3524 YYFPRINTF (yyoutput, ")");
3527 /*------------------------------------------------------------------.
3528 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
3530 `------------------------------------------------------------------*/
3532 #if (defined __STDC__ || defined __C99__FUNC__ \
3533 || defined __cplusplus || defined _MSC_VER)
3535 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
3538 yy_stack_print (yybottom, yytop)
3539 yytype_int16 *yybottom;
3540 yytype_int16 *yytop;
3543 YYFPRINTF (stderr, "Stack now");
3544 for (; yybottom <= yytop; yybottom++)
3546 int yybot = *yybottom;
3547 YYFPRINTF (stderr, " %d", yybot);
3549 YYFPRINTF (stderr, "\n");
3552 # define YY_STACK_PRINT(Bottom, Top) \
3555 yy_stack_print ((Bottom), (Top)); \
3559 /*------------------------------------------------.
3560 | Report that the YYRULE is going to be reduced. |
3561 `------------------------------------------------*/
3563 #if (defined __STDC__ || defined __C99__FUNC__ \
3564 || defined __cplusplus || defined _MSC_VER)
3566 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
3569 yy_reduce_print (yyvsp, yyrule)
3574 int yynrhs = yyr2[yyrule];
3576 unsigned long int yylno = yyrline[yyrule];
3577 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
3579 /* The symbols being reduced. */
3580 for (yyi = 0; yyi < yynrhs; yyi++)
3582 YYFPRINTF (stderr, " $%d = ", yyi + 1);
3583 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
3584 &(yyvsp[(yyi + 1) - (yynrhs)])
3586 YYFPRINTF (stderr, "\n");
3590 # define YY_REDUCE_PRINT(Rule) \
3593 yy_reduce_print (yyvsp, Rule); \
3596 /* Nonzero means print parse trace. It is left uninitialized so that
3597 multiple parsers can coexist. */
3599 #else /* !YYDEBUG */
3600 # define YYDPRINTF(Args)
3601 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
3602 # define YY_STACK_PRINT(Bottom, Top)
3603 # define YY_REDUCE_PRINT(Rule)
3604 #endif /* !YYDEBUG */
3607 /* YYINITDEPTH -- initial size of the parser's stacks. */
3609 # define YYINITDEPTH 200
3612 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
3613 if the built-in stack extension method is used).
3615 Do not make this value too large; the results are undefined if
3616 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
3617 evaluated with infinite-precision integer arithmetic. */
3620 # define YYMAXDEPTH 10000
3628 # if defined __GLIBC__ && defined _STRING_H
3629 # define yystrlen strlen
3631 /* Return the length of YYSTR. */
3632 #if (defined __STDC__ || defined __C99__FUNC__ \
3633 || defined __cplusplus || defined _MSC_VER)
3635 yystrlen (const char *yystr)
3643 for (yylen = 0; yystr[yylen]; yylen++)
3651 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
3652 # define yystpcpy stpcpy
3654 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
3656 #if (defined __STDC__ || defined __C99__FUNC__ \
3657 || defined __cplusplus || defined _MSC_VER)
3659 yystpcpy (char *yydest, const char *yysrc)
3662 yystpcpy (yydest, yysrc)
3668 const char *yys = yysrc;
3670 while ((*yyd++ = *yys++) != '\0')
3679 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
3680 quotes and backslashes, so that it's suitable for yyerror. The
3681 heuristic is that double-quoting is unnecessary unless the string
3682 contains an apostrophe, a comma, or backslash (other than
3683 backslash-backslash). YYSTR is taken from yytname. If YYRES is
3684 null, do not copy; instead, return the length of what the result
3687 yytnamerr (char *yyres, const char *yystr)
3692 char const *yyp = yystr;
3699 goto do_not_strip_quotes;
3703 goto do_not_strip_quotes;
3716 do_not_strip_quotes: ;
3720 return yystrlen (yystr);
3722 return yystpcpy (yyres, yystr) - yyres;
3726 /* Copy into YYRESULT an error message about the unexpected token
3727 YYCHAR while in state YYSTATE. Return the number of bytes copied,
3728 including the terminating null byte. If YYRESULT is null, do not
3729 copy anything; just return the number of bytes that would be
3730 copied. As a special case, return 0 if an ordinary "syntax error"
3731 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
3732 size calculation. */
3734 yysyntax_error (char *yyresult, int yystate, int yychar)
3736 int yyn = yypact[yystate];
3738 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
3742 int yytype = YYTRANSLATE (yychar);
3743 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
3744 YYSIZE_T yysize = yysize0;
3746 int yysize_overflow = 0;
3747 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
3748 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
3752 /* This is so xgettext sees the translatable formats that are
3753 constructed on the fly. */
3754 YY_("syntax error, unexpected %s");
3755 YY_("syntax error, unexpected %s, expecting %s");
3756 YY_("syntax error, unexpected %s, expecting %s or %s");
3757 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
3758 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
3762 static char const yyunexpected[] = "syntax error, unexpected %s";
3763 static char const yyexpecting[] = ", expecting %s";
3764 static char const yyor[] = " or %s";
3765 char yyformat[sizeof yyunexpected
3766 + sizeof yyexpecting - 1
3767 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
3768 * (sizeof yyor - 1))];
3769 char const *yyprefix = yyexpecting;
3771 /* Start YYX at -YYN if negative to avoid negative indexes in
3773 int yyxbegin = yyn < 0 ? -yyn : 0;
3775 /* Stay within bounds of both yycheck and yytname. */
3776 int yychecklim = YYLAST - yyn + 1;
3777 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
3780 yyarg[0] = yytname[yytype];
3781 yyfmt = yystpcpy (yyformat, yyunexpected);
3783 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
3784 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
3786 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
3790 yyformat[sizeof yyunexpected - 1] = '\0';
3793 yyarg[yycount++] = yytname[yyx];
3794 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
3795 yysize_overflow |= (yysize1 < yysize);
3797 yyfmt = yystpcpy (yyfmt, yyprefix);
3801 yyf = YY_(yyformat);
3802 yysize1 = yysize + yystrlen (yyf);
3803 yysize_overflow |= (yysize1 < yysize);
3806 if (yysize_overflow)
3807 return YYSIZE_MAXIMUM;
3811 /* Avoid sprintf, as that infringes on the user's name space.
3812 Don't have undefined behavior even if the translation
3813 produced a string with the wrong number of "%s"s. */
3814 char *yyp = yyresult;
3816 while ((*yyp = *yyf) != '\0')
3818 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
3820 yyp += yytnamerr (yyp, yyarg[yyi++]);
3833 #endif /* YYERROR_VERBOSE */
3836 /*-----------------------------------------------.
3837 | Release the memory associated to this symbol. |
3838 `-----------------------------------------------*/
3841 #if (defined __STDC__ || defined __C99__FUNC__ \
3842 || defined __cplusplus || defined _MSC_VER)
3844 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
3847 yydestruct (yymsg, yytype, yyvaluep)
3857 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
3867 /* Prevent warnings from -Wmissing-prototypes. */
3868 #ifdef YYPARSE_PARAM
3869 #if defined __STDC__ || defined __cplusplus
3870 int yyparse (void *YYPARSE_PARAM);
3874 #else /* ! YYPARSE_PARAM */
3875 #if defined __STDC__ || defined __cplusplus
3880 #endif /* ! YYPARSE_PARAM */
3883 /* The lookahead symbol. */
3886 /* The semantic value of the lookahead symbol. */
3889 /* Number of syntax errors so far. */
3894 /*-------------------------.
3895 | yyparse or yypush_parse. |
3896 `-------------------------*/
3898 #ifdef YYPARSE_PARAM
3899 #if (defined __STDC__ || defined __C99__FUNC__ \
3900 || defined __cplusplus || defined _MSC_VER)
3902 yyparse (void *YYPARSE_PARAM)
3905 yyparse (YYPARSE_PARAM)
3906 void *YYPARSE_PARAM;
3908 #else /* ! YYPARSE_PARAM */
3909 #if (defined __STDC__ || defined __C99__FUNC__ \
3910 || defined __cplusplus || defined _MSC_VER)
3923 /* Number of tokens to shift before error messages enabled. */
3926 /* The stacks and their tools:
3927 `yyss': related to states.
3928 `yyvs': related to semantic values.
3930 Refer to the stacks thru separate pointers, to allow yyoverflow
3931 to reallocate them elsewhere. */
3933 /* The state stack. */
3934 yytype_int16 yyssa[YYINITDEPTH];
3936 yytype_int16 *yyssp;
3938 /* The semantic value stack. */
3939 YYSTYPE yyvsa[YYINITDEPTH];
3943 YYSIZE_T yystacksize;
3947 /* Lookahead token as an internal (translated) token number. */
3949 /* The variables used to return semantic value and location from the
3954 /* Buffer for error messages, and its allocated size. */
3956 char *yymsg = yymsgbuf;
3957 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
3960 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
3962 /* The number of symbols on the RHS of the reduced rule.
3963 Keep to zero when no symbol should be popped. */
3969 yystacksize = YYINITDEPTH;
3971 YYDPRINTF ((stderr, "Starting parse\n"));
3976 yychar = YYEMPTY; /* Cause a token to be read. */
3978 /* Initialize stack pointers.
3979 Waste one element of value and location stack
3980 so that they stay on the same level as the state stack.
3981 The wasted elements are never initialized. */
3987 /*------------------------------------------------------------.
3988 | yynewstate -- Push a new state, which is found in yystate. |
3989 `------------------------------------------------------------*/
3991 /* In all cases, when you get here, the value and location stacks
3992 have just been pushed. So pushing a state here evens the stacks. */
3998 if (yyss + yystacksize - 1 <= yyssp)
4000 /* Get the current used size of the three stacks, in elements. */
4001 YYSIZE_T yysize = yyssp - yyss + 1;
4005 /* Give user a chance to reallocate the stack. Use copies of
4006 these so that the &'s don't force the real ones into
4008 YYSTYPE *yyvs1 = yyvs;
4009 yytype_int16 *yyss1 = yyss;
4011 /* Each stack pointer address is followed by the size of the
4012 data in use in that stack, in bytes. This used to be a
4013 conditional around just the two extra args, but that might
4014 be undefined if yyoverflow is a macro. */
4015 yyoverflow (YY_("memory exhausted"),
4016 &yyss1, yysize * sizeof (*yyssp),
4017 &yyvs1, yysize * sizeof (*yyvsp),
4023 #else /* no yyoverflow */
4024 # ifndef YYSTACK_RELOCATE
4025 goto yyexhaustedlab;
4027 /* Extend the stack our own way. */
4028 if (YYMAXDEPTH <= yystacksize)
4029 goto yyexhaustedlab;
4031 if (YYMAXDEPTH < yystacksize)
4032 yystacksize = YYMAXDEPTH;
4035 yytype_int16 *yyss1 = yyss;
4036 union yyalloc *yyptr =
4037 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
4039 goto yyexhaustedlab;
4040 YYSTACK_RELOCATE (yyss_alloc, yyss);
4041 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
4042 # undef YYSTACK_RELOCATE
4044 YYSTACK_FREE (yyss1);
4047 #endif /* no yyoverflow */
4049 yyssp = yyss + yysize - 1;
4050 yyvsp = yyvs + yysize - 1;
4052 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
4053 (unsigned long int) yystacksize));
4055 if (yyss + yystacksize - 1 <= yyssp)
4059 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
4061 if (yystate == YYFINAL)
4071 /* Do appropriate processing given the current state. Read a
4072 lookahead token if we need one and don't already have one. */
4074 /* First try to decide what to do without reference to lookahead token. */
4075 yyn = yypact[yystate];
4076 if (yyn == YYPACT_NINF)
4079 /* Not known => get a lookahead token if don't already have one. */
4081 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
4082 if (yychar == YYEMPTY)
4084 YYDPRINTF ((stderr, "Reading a token: "));
4088 if (yychar <= YYEOF)
4090 yychar = yytoken = YYEOF;
4091 YYDPRINTF ((stderr, "Now at end of input.\n"));
4095 yytoken = YYTRANSLATE (yychar);
4096 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
4099 /* If the proper action on seeing token YYTOKEN is to reduce or to
4100 detect an error, take that action. */
4102 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
4107 if (yyn == 0 || yyn == YYTABLE_NINF)
4113 /* Count tokens shifted since error; after three, turn off error
4118 /* Shift the lookahead token. */
4119 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
4121 /* Discard the shifted token. */
4130 /*-----------------------------------------------------------.
4131 | yydefault -- do the default action for the current state. |
4132 `-----------------------------------------------------------*/
4134 yyn = yydefact[yystate];
4140 /*-----------------------------.
4141 | yyreduce -- Do a reduction. |
4142 `-----------------------------*/
4144 /* yyn is the number of a rule to reduce with. */
4147 /* If YYLEN is nonzero, implement the default value of the action:
4150 Otherwise, the following line sets YYVAL to garbage.
4151 This behavior is undocumented and Bison
4152 users should not rely upon it. Assigning to YYVAL
4153 unconditionally makes the parser a bit smaller, and it avoids a
4154 GCC warning that YYVAL may be used uninitialized. */
4155 yyval = yyvsp[1-yylen];
4158 YY_REDUCE_PRINT (yyn);
4165 /* Line 1464 of skeleton.m4 */
4166 #line 1934 "parser.y"
4167 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4176 /* Line 1464 of skeleton.m4 */
4177 #line 1935 "parser.y"
4178 {(yyval.code)=code_new();}
4187 /* Line 1464 of skeleton.m4 */
4188 #line 1937 "parser.y"
4189 {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
4198 /* Line 1464 of skeleton.m4 */
4199 #line 1938 "parser.y"
4200 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4209 /* Line 1464 of skeleton.m4 */
4210 #line 1953 "parser.y"
4211 {(yyval.code)=(yyvsp[(2) - (3)].code);}
4220 /* Line 1464 of skeleton.m4 */
4221 #line 1954 "parser.y"
4231 /* Line 1464 of skeleton.m4 */
4232 #line 1957 "parser.y"
4242 /* Line 1464 of skeleton.m4 */
4243 #line 1964 "parser.y"
4244 {(yyval.code)=(yyvsp[(3) - (4)].code);}
4253 /* Line 1464 of skeleton.m4 */
4254 #line 1968 "parser.y"
4255 {(yyval.code)=(yyvsp[(1) - (2)].code);}
4264 /* Line 1464 of skeleton.m4 */
4265 #line 1969 "parser.y"
4266 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4275 /* Line 1464 of skeleton.m4 */
4276 #line 1973 "parser.y"
4278 code_t**cc = &global->init->method->body->code;
4279 *cc = code_append(*cc, (yyvsp[(1) - (1)].code));
4289 /* Line 1464 of skeleton.m4 */
4290 #line 1984 "parser.y"
4291 {(yyval.value)=(yyvsp[(2) - (2)].value);}
4300 /* Line 1464 of skeleton.m4 */
4301 #line 1985 "parser.y"
4302 {(yyval.value).c=abc_pushundefined(0);
4303 (yyval.value).t=TYPE_ANY;
4313 /* Line 1464 of skeleton.m4 */
4314 #line 1989 "parser.y"
4315 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4324 /* Line 1464 of skeleton.m4 */
4325 #line 1990 "parser.y"
4326 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4335 /* Line 1464 of skeleton.m4 */
4336 #line 1992 "parser.y"
4337 {(yyval.code) = (yyvsp[(1) - (1)].code);}
4346 /* Line 1464 of skeleton.m4 */
4347 #line 1993 "parser.y"
4348 {(yyval.code) = code_append((yyvsp[(1) - (3)].code), (yyvsp[(3) - (3)].code));}
4357 /* Line 1464 of skeleton.m4 */
4358 #line 1996 "parser.y"
4361 if(variable_exists((yyvsp[(1) - (3)].id)))
4362 syntaxerror("Variable %s already defined", (yyvsp[(1) - (3)].id));
4364 new_variable((yyvsp[(1) - (3)].id), 0, 1, 0);
4367 if(!is_subtype_of((yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo))) {
4368 syntaxerror("Can't convert %s to %s", (yyvsp[(3) - (3)].value).t->name,
4369 (yyvsp[(2) - (3)].classinfo)->name);
4374 if(state->method->uses_slots) {
4375 variable_t* v = find_slot(state, (yyvsp[(1) - (3)].id));
4377 // this variable is stored in a slot
4379 v->type = (yyvsp[(2) - (3)].classinfo);
4385 index = new_variable((yyvsp[(1) - (3)].id), (yyvsp[(2) - (3)].classinfo), 1, 0);
4388 (yyval.code) = slot?abc_getscopeobject(0, 1):0;
4390 if((yyvsp[(2) - (3)].classinfo)) {
4391 if((yyvsp[(3) - (3)].value).c->prev || (yyvsp[(3) - (3)].value).c->opcode != OPCODE_PUSHUNDEFINED) {
4392 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (3)].value).c);
4393 (yyval.code) = converttype((yyval.code), (yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo));
4395 code_free((yyvsp[(3) - (3)].value).c);
4396 (yyval.code) = defaultvalue((yyval.code), (yyvsp[(2) - (3)].classinfo));
4399 if((yyvsp[(3) - (3)].value).c->prev || (yyvsp[(3) - (3)].value).c->opcode != OPCODE_PUSHUNDEFINED) {
4400 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (3)].value).c);
4401 (yyval.code) = abc_coerce_a((yyval.code));
4403 // don't do anything
4404 code_free((yyvsp[(3) - (3)].value).c);
4405 code_free((yyval.code));
4411 (yyval.code) = abc_setslot((yyval.code), index);
4413 (yyval.code) = abc_setlocal((yyval.code), index);
4424 /* Line 1464 of skeleton.m4 */
4425 #line 2056 "parser.y"
4426 {(yyval.code) = code_new();}
4435 /* Line 1464 of skeleton.m4 */
4436 #line 2057 "parser.y"
4437 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4446 /* Line 1464 of skeleton.m4 */
4447 #line 2060 "parser.y"
4448 {PASS12 new_state();}
4457 /* Line 1464 of skeleton.m4 */
4458 #line 2060 "parser.y"
4461 (yyval.code) = code_new();
4462 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (7)].value).c);
4463 code_t*myjmp,*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4465 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].code));
4466 if((yyvsp[(7) - (7)].code)) {
4467 myjmp = (yyval.code) = abc_jump((yyval.code), 0);
4469 myif->branch = (yyval.code) = abc_nop((yyval.code));
4470 if((yyvsp[(7) - (7)].code)) {
4471 (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (7)].code));
4472 myjmp->branch = (yyval.code) = abc_nop((yyval.code));
4474 (yyval.code) = var_block((yyval.code));
4485 /* Line 1464 of skeleton.m4 */
4486 #line 2079 "parser.y"
4487 {(yyval.code)=code_new();}
4496 /* Line 1464 of skeleton.m4 */
4497 #line 2086 "parser.y"
4499 PASS1 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable((yyvsp[(2) - (3)].id),0,1,0);
4500 PASS2 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable((yyvsp[(2) - (3)].id),(yyvsp[(3) - (3)].classinfo),1,0);
4510 /* Line 1464 of skeleton.m4 */
4511 #line 2090 "parser.y"
4514 (yyval.id)=(yyvsp[(1) - (1)].id);
4524 /* Line 1464 of skeleton.m4 */
4525 #line 2095 "parser.y"
4526 {PASS12 new_state();(yyval.for_start).name=(yyvsp[(1) - (2)].id);(yyval.for_start).each=0;}
4535 /* Line 1464 of skeleton.m4 */
4536 #line 2096 "parser.y"
4537 {PASS12 new_state();(yyval.for_start).name=(yyvsp[(1) - (3)].id);(yyval.for_start).each=1;}
4546 /* Line 1464 of skeleton.m4 */
4547 #line 2098 "parser.y"
4549 if((yyvsp[(1) - (8)].for_start).each) syntaxerror("invalid syntax: ; not allowed in for each statement");
4550 (yyval.code) = code_new();
4551 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (8)].code));
4552 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4553 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (8)].value).c);
4554 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4555 (yyval.code) = code_append((yyval.code), (yyvsp[(8) - (8)].code));
4556 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4557 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (8)].code));
4558 (yyval.code) = abc_jump((yyval.code), loopstart);
4559 code_t*out = (yyval.code) = abc_nop((yyval.code));
4560 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, out);
4561 continuejumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, cont);
4564 (yyval.code) = var_block((yyval.code));
4575 /* Line 1464 of skeleton.m4 */
4576 #line 2118 "parser.y"
4578 variable_t*var = find_variable(state, (yyvsp[(2) - (6)].id));
4579 char*tmp1name = concat2((yyvsp[(2) - (6)].id), "__tmp1__");
4580 int it = new_variable(tmp1name, TYPE_INT, 0, 0);
4581 char*tmp2name = concat2((yyvsp[(2) - (6)].id), "__array__");
4582 int array = new_variable(tmp1name, 0, 0, 0);
4584 (yyval.code) = code_new();
4585 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
4586 (yyval.code) = abc_coerce_a((yyval.code));
4587 (yyval.code) = abc_setlocal((yyval.code), array);
4588 (yyval.code) = abc_pushbyte((yyval.code), 0);
4589 (yyval.code) = abc_setlocal((yyval.code), it);
4591 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4593 (yyval.code) = abc_hasnext2((yyval.code), array, it);
4594 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4595 (yyval.code) = abc_getlocal((yyval.code), array);
4596 (yyval.code) = abc_getlocal((yyval.code), it);
4597 if(!(yyvsp[(1) - (6)].for_start).each)
4598 (yyval.code) = abc_nextname((yyval.code));
4600 (yyval.code) = abc_nextvalue((yyval.code));
4601 (yyval.code) = converttype((yyval.code), 0, var->type);
4602 (yyval.code) = abc_setlocal((yyval.code), var->index);
4604 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
4605 (yyval.code) = abc_jump((yyval.code), loopstart);
4607 code_t*out = (yyval.code) = abc_nop((yyval.code));
4608 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, out);
4609 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, loopstart);
4613 (yyval.code) = var_block((yyval.code));
4628 /* Line 1464 of skeleton.m4 */
4629 #line 2162 "parser.y"
4630 {PASS12 new_state();}
4639 /* Line 1464 of skeleton.m4 */
4640 #line 2162 "parser.y"
4643 (yyval.code) = code_new();
4645 code_t*myjmp = (yyval.code) = abc_jump((yyval.code), 0);
4646 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4647 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
4648 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4649 myjmp->branch = cont;
4650 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
4651 (yyval.code) = abc_iftrue((yyval.code), loopstart);
4652 code_t*out = (yyval.code) = abc_nop((yyval.code));
4653 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].id), out);
4654 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].id), cont);
4656 (yyval.code) = var_block((yyval.code));
4667 /* Line 1464 of skeleton.m4 */
4668 #line 2181 "parser.y"
4669 {PASS12 new_state();}
4678 /* Line 1464 of skeleton.m4 */
4679 #line 2181 "parser.y"
4681 (yyval.code) = code_new();
4682 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4683 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (7)].code));
4684 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4685 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].value).c);
4686 (yyval.code) = abc_iftrue((yyval.code), loopstart);
4687 code_t*out = (yyval.code) = abc_nop((yyval.code));
4688 breakjumpsto((yyval.code), (yyvsp[(1) - (7)].id), out);
4689 continuejumpsto((yyval.code), (yyvsp[(1) - (7)].id), cont);
4691 (yyval.code) = var_block((yyval.code));
4702 /* Line 1464 of skeleton.m4 */
4703 #line 2196 "parser.y"
4705 (yyval.code) = abc___break__(0, "");
4715 /* Line 1464 of skeleton.m4 */
4716 #line 2199 "parser.y"
4718 (yyval.code) = abc___break__(0, (yyvsp[(2) - (2)].id));
4728 /* Line 1464 of skeleton.m4 */
4729 #line 2202 "parser.y"
4731 (yyval.code) = abc___continue__(0, "");
4741 /* Line 1464 of skeleton.m4 */
4742 #line 2205 "parser.y"
4744 (yyval.code) = abc___continue__(0, (yyvsp[(2) - (2)].id));
4754 /* Line 1464 of skeleton.m4 */
4755 #line 2209 "parser.y"
4765 /* Line 1464 of skeleton.m4 */
4766 #line 2210 "parser.y"
4767 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4776 /* Line 1464 of skeleton.m4 */
4777 #line 2211 "parser.y"
4778 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4787 /* Line 1464 of skeleton.m4 */
4788 #line 2212 "parser.y"
4789 {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
4798 /* Line 1464 of skeleton.m4 */
4799 #line 2213 "parser.y"
4800 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4809 /* Line 1464 of skeleton.m4 */
4810 #line 2214 "parser.y"
4811 {(yyval.code)=code_append((yyval.code),(yyvsp[(2) - (2)].code));}
4820 /* Line 1464 of skeleton.m4 */
4821 #line 2216 "parser.y"
4823 (yyval.code) = abc_dup(0);
4824 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (4)].value).c);
4825 code_t*j = (yyval.code) = abc_ifne((yyval.code), 0);
4826 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (4)].code));
4827 if((yyval.code)->opcode != OPCODE___BREAK__) {
4828 (yyval.code) = abc___fallthrough__((yyval.code), "");
4830 code_t*e = (yyval.code) = abc_nop((yyval.code));
4841 /* Line 1464 of skeleton.m4 */
4842 #line 2227 "parser.y"
4844 (yyval.code) = (yyvsp[(3) - (3)].code);
4854 /* Line 1464 of skeleton.m4 */
4855 #line 2230 "parser.y"
4856 {PASS12 new_state();}
4865 /* Line 1464 of skeleton.m4 */
4866 #line 2230 "parser.y"
4868 (yyval.code)=(yyvsp[(4) - (8)].value).c;
4869 (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (8)].code));
4870 code_t*out = (yyval.code) = abc_pop((yyval.code));
4871 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].id), out);
4873 code_t*c = (yyval.code),*lastblock=0;
4875 if(c->opcode == OPCODE_IFNE) {
4876 if(!c->next) syntaxerror("internal error in fallthrough handling");
4878 } else if(c->opcode == OPCODE___FALLTHROUGH__) {
4880 c->opcode = OPCODE_JUMP;
4881 c->branch = lastblock;
4883 /* fall through end of switch */
4884 c->opcode = OPCODE_NOP;
4890 (yyval.code) = var_block((yyval.code));
4901 /* Line 1464 of skeleton.m4 */
4902 #line 2259 "parser.y"
4903 {PASS12 new_state();
4904 state->exception_name=(yyvsp[(3) - (5)].id);
4905 PASS1 new_variable((yyvsp[(3) - (5)].id), 0, 0, 0);
4906 PASS2 new_variable((yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].classinfo), 0, 0);
4916 /* Line 1464 of skeleton.m4 */
4917 #line 2264 "parser.y"
4919 namespace_t name_ns = {ACCESS_PACKAGE, ""};
4920 multiname_t name = {QNAME, &name_ns, 0, (yyvsp[(3) - (9)].id)};
4922 NEW(abc_exception_t, e)
4923 e->exc_type = sig2mname((yyvsp[(4) - (9)].classinfo));
4924 e->var_name = multiname_clone(&name);
4925 (yyval.exception) = e;
4928 int i = find_variable_safe(state, (yyvsp[(3) - (9)].id))->index;
4929 e->target = c = abc_nop(0);
4930 c = abc_setlocal(c, i);
4931 c = code_append(c, (yyvsp[(8) - (9)].code));
4945 /* Line 1464 of skeleton.m4 */
4946 #line 2283 "parser.y"
4947 {PASS12 new_state();state->exception_name=0;}
4956 /* Line 1464 of skeleton.m4 */
4957 #line 2283 "parser.y"
4959 (yyvsp[(4) - (5)].code) = var_block((yyvsp[(4) - (5)].code));
4960 if(!(yyvsp[(4) - (5)].code)) {
4961 (yyval.exception)=0;
4963 NEW(abc_exception_t, e)
4964 e->exc_type = 0; //all exceptions
4965 e->var_name = 0; //no name
4968 e->to = code_append(e->to, (yyvsp[(4) - (5)].code));
4969 (yyval.exception) = e;
4981 /* Line 1464 of skeleton.m4 */
4982 #line 2299 "parser.y"
4983 {(yyval.catch_list).l=list_new();(yyval.catch_list).finally=0;list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));}
4992 /* Line 1464 of skeleton.m4 */
4993 #line 2300 "parser.y"
4994 {(yyval.catch_list)=(yyvsp[(1) - (2)].catch_list);list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));}
5003 /* Line 1464 of skeleton.m4 */
5004 #line 2301 "parser.y"
5005 {(yyval.catch_list)=(yyvsp[(1) - (1)].catch_list);}
5014 /* Line 1464 of skeleton.m4 */
5015 #line 2302 "parser.y"
5017 (yyval.catch_list) = (yyvsp[(1) - (2)].catch_list);
5018 (yyval.catch_list).finally = 0;
5019 if((yyvsp[(2) - (2)].exception)) {
5020 list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));
5021 (yyval.catch_list).finally = (yyvsp[(2) - (2)].exception)->to;(yyvsp[(2) - (2)].exception)->to=0;
5032 /* Line 1464 of skeleton.m4 */
5033 #line 2310 "parser.y"
5035 (yyval.catch_list).l=list_new();
5036 (yyval.catch_list).finally = 0;
5037 if((yyvsp[(1) - (1)].exception)) {
5038 list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));
5039 (yyval.catch_list).finally = (yyvsp[(1) - (1)].exception)->to;(yyvsp[(1) - (1)].exception)->to=0;
5050 /* Line 1464 of skeleton.m4 */
5051 #line 2319 "parser.y"
5052 {PASS12 new_state();}
5061 /* Line 1464 of skeleton.m4 */
5062 #line 2319 "parser.y"
5064 code_t*out = abc_nop(0);
5066 code_t*start = abc_nop(0);
5067 (yyval.code) = code_append(start, (yyvsp[(4) - (6)].code));
5068 if(!is_break_or_jump((yyvsp[(4) - (6)].code))) {
5069 (yyval.code) = abc_jump((yyval.code), out);
5071 code_t*end = (yyval.code) = abc_nop((yyval.code));
5074 if((yyvsp[(6) - (6)].catch_list).finally)
5075 tmp = new_variable("__finally__", 0, 0, 0);
5077 abc_exception_list_t*l = (yyvsp[(6) - (6)].catch_list).l;
5080 abc_exception_t*e = l->abc_exception;
5082 (yyval.code) = code_append((yyval.code), e->target);
5083 (yyval.code) = abc_jump((yyval.code), out);
5085 parserassert((ptroff_t)(yyvsp[(6) - (6)].catch_list).finally);
5087 e->target = (yyval.code) = abc_nop((yyval.code));
5088 (yyval.code) = abc___rethrow__((yyval.code));
5096 (yyval.code) = code_append((yyval.code), out);
5098 (yyval.code) = insert_finally((yyval.code), (yyvsp[(6) - (6)].catch_list).finally, tmp);
5100 list_concat(state->method->exceptions, (yyvsp[(6) - (6)].catch_list).l);
5102 (yyval.code) = var_block((yyval.code));
5113 /* Line 1464 of skeleton.m4 */
5114 #line 2364 "parser.y"
5116 (yyval.code)=(yyvsp[(2) - (2)].value).c;
5117 (yyval.code)=abc_throw((yyval.code));
5127 /* Line 1464 of skeleton.m4 */
5128 #line 2368 "parser.y"
5130 if(!state->exception_name)
5131 syntaxerror("re-throw only possible within a catch block");
5132 variable_t*v = find_variable(state, state->exception_name);
5133 (yyval.code)=code_new();
5134 (yyval.code)=abc_getlocal((yyval.code), v->index);
5135 (yyval.code)=abc_throw((yyval.code));
5145 /* Line 1464 of skeleton.m4 */
5146 #line 2379 "parser.y"
5148 (yyval.code) = (yyvsp[(3) - (5)].value).c;
5149 (yyval.code) = abc_pushwith((yyval.code));
5150 (yyval.code) = code_append((yyval.code), (yyvsp[(5) - (5)].code));
5151 (yyval.code) = abc_popscope((yyval.code));
5161 /* Line 1464 of skeleton.m4 */
5162 #line 2389 "parser.y"
5163 {PASS12 (yyval.id)="package";}
5172 /* Line 1464 of skeleton.m4 */
5173 #line 2391 "parser.y"
5174 {PASS12 (yyval.id) = concat3((yyvsp[(1) - (3)].id),".",(yyvsp[(3) - (3)].id));free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;}
5183 /* Line 1464 of skeleton.m4 */
5184 #line 2392 "parser.y"
5185 {PASS12 (yyval.id)=strdup((yyvsp[(1) - (1)].id));}
5194 /* Line 1464 of skeleton.m4 */
5195 #line 2394 "parser.y"
5196 {PASS12 startpackage((yyvsp[(2) - (3)].id));free((yyvsp[(2) - (3)].id));(yyvsp[(2) - (3)].id)=0;}
5205 /* Line 1464 of skeleton.m4 */
5206 #line 2395 "parser.y"
5207 {PASS12 endpackage();(yyval.code)=0;}
5216 /* Line 1464 of skeleton.m4 */
5217 #line 2396 "parser.y"
5218 {PASS12 startpackage("");}
5227 /* Line 1464 of skeleton.m4 */
5228 #line 2397 "parser.y"
5229 {PASS12 endpackage();(yyval.code)=0;}
5238 /* Line 1464 of skeleton.m4 */
5239 #line 2399 "parser.y"
5242 slotinfo_t*s = registry_find((yyvsp[(2) - (2)].classinfo)->package, (yyvsp[(2) - (2)].classinfo)->name);
5243 if(!s) {// || !(s->flags&FLAG_BUILTIN)) {
5244 as3_schedule_class((yyvsp[(2) - (2)].classinfo)->package, (yyvsp[(2) - (2)].classinfo)->name);
5248 classinfo_t*c = (yyvsp[(2) - (2)].classinfo);
5250 syntaxerror("Couldn't import class\n");
5251 state_has_imports();
5252 dict_put(state->imports, c->name, c);
5263 /* Line 1464 of skeleton.m4 */
5264 #line 2414 "parser.y"
5267 if(strncmp("flash.", (yyvsp[(2) - (4)].id), 6)) {
5268 as3_schedule_package((yyvsp[(2) - (4)].id));
5273 i->package = (yyvsp[(2) - (4)].id);
5274 state_has_imports();
5275 list_append(state->wildcard_imports, i);
5286 /* Line 1464 of skeleton.m4 */
5287 #line 2430 "parser.y"
5288 {PASS12 (yyval.flags).flags=0;(yyval.flags).ns=0;}
5297 /* Line 1464 of skeleton.m4 */
5298 #line 2431 "parser.y"
5299 {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
5308 /* Line 1464 of skeleton.m4 */
5309 #line 2432 "parser.y"
5310 {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
5319 /* Line 1464 of skeleton.m4 */
5320 #line 2433 "parser.y"
5323 (yyval.flags).flags=(yyvsp[(1) - (2)].flags).flags|(yyvsp[(2) - (2)].flags).flags;
5324 if((yyvsp[(1) - (2)].flags).ns && (yyvsp[(2) - (2)].flags).ns) syntaxerror("only one namespace allowed in one declaration");
5325 (yyval.flags).ns=(yyvsp[(1) - (2)].flags).ns?(yyvsp[(1) - (2)].flags).ns:(yyvsp[(2) - (2)].flags).ns;
5336 /* Line 1464 of skeleton.m4 */
5337 #line 2441 "parser.y"
5338 {PASS12 (yyval.flags).flags=FLAG_PUBLIC;(yyval.flags).ns=0;}
5347 /* Line 1464 of skeleton.m4 */
5348 #line 2442 "parser.y"
5349 {PASS12 (yyval.flags).flags=FLAG_PRIVATE;(yyval.flags).ns=0;}
5358 /* Line 1464 of skeleton.m4 */
5359 #line 2443 "parser.y"
5360 {PASS12 (yyval.flags).flags=FLAG_PROTECTED;(yyval.flags).ns=0;}
5369 /* Line 1464 of skeleton.m4 */
5370 #line 2444 "parser.y"
5371 {PASS12 (yyval.flags).flags=FLAG_STATIC;(yyval.flags).ns=0;}
5380 /* Line 1464 of skeleton.m4 */
5381 #line 2445 "parser.y"
5382 {PASS12 (yyval.flags).flags=FLAG_DYNAMIC;(yyval.flags).ns=0;}
5391 /* Line 1464 of skeleton.m4 */
5392 #line 2446 "parser.y"
5393 {PASS12 (yyval.flags).flags=FLAG_FINAL;(yyval.flags).ns=0;}
5402 /* Line 1464 of skeleton.m4 */
5403 #line 2447 "parser.y"
5404 {PASS12 (yyval.flags).flags=FLAG_OVERRIDE;(yyval.flags).ns=0;}
5413 /* Line 1464 of skeleton.m4 */
5414 #line 2448 "parser.y"
5415 {PASS12 (yyval.flags).flags=FLAG_NATIVE;(yyval.flags).ns=0;}
5424 /* Line 1464 of skeleton.m4 */
5425 #line 2449 "parser.y"
5426 {PASS12 (yyval.flags).flags=FLAG_PACKAGEINTERNAL;(yyval.flags).ns=0;}
5435 /* Line 1464 of skeleton.m4 */
5436 #line 2450 "parser.y"
5437 {PASS12 (yyval.flags).flags=FLAG_NAMESPACE;
5438 (yyval.flags).ns=(yyvsp[(1) - (1)].id);
5448 /* Line 1464 of skeleton.m4 */
5449 #line 2454 "parser.y"
5450 {(yyval.classinfo)=registry_getobjectclass();}
5459 /* Line 1464 of skeleton.m4 */
5460 #line 2455 "parser.y"
5461 {(yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
5470 /* Line 1464 of skeleton.m4 */
5471 #line 2457 "parser.y"
5472 {PASS12 (yyval.classinfo_list)=list_new();}
5481 /* Line 1464 of skeleton.m4 */
5482 #line 2458 "parser.y"
5483 {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
5492 /* Line 1464 of skeleton.m4 */
5493 #line 2460 "parser.y"
5494 {PASS12 (yyval.classinfo_list)=list_new();}
5503 /* Line 1464 of skeleton.m4 */
5504 #line 2461 "parser.y"
5505 {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
5514 /* Line 1464 of skeleton.m4 */
5515 #line 2465 "parser.y"
5516 {PASS12 startclass(&(yyvsp[(1) - (6)].flags),(yyvsp[(3) - (6)].id),(yyvsp[(4) - (6)].classinfo),(yyvsp[(5) - (6)].classinfo_list));}
5525 /* Line 1464 of skeleton.m4 */
5526 #line 2467 "parser.y"
5527 {PASS12 endclass();(yyval.code)=0;}
5536 /* Line 1464 of skeleton.m4 */
5537 #line 2471 "parser.y"
5538 {PASS12 (yyvsp[(1) - (5)].flags).flags|=FLAG_INTERFACE;
5539 startclass(&(yyvsp[(1) - (5)].flags),(yyvsp[(3) - (5)].id),0,(yyvsp[(4) - (5)].classinfo_list));}
5548 /* Line 1464 of skeleton.m4 */
5549 #line 2474 "parser.y"
5550 {PASS12 endclass();(yyval.code)=0;}
5559 /* Line 1464 of skeleton.m4 */
5560 #line 2487 "parser.y"
5562 code_t*c = state->cls->static_init->header;
5563 c = code_append(c, (yyvsp[(1) - (1)].code));
5564 state->cls->static_init->header = c;
5574 /* Line 1464 of skeleton.m4 */
5575 #line 2498 "parser.y"
5577 syntaxerror("variable declarations not allowed in interfaces");
5587 /* Line 1464 of skeleton.m4 */
5588 #line 2501 "parser.y"
5591 (yyvsp[(1) - (8)].flags).flags |= FLAG_PUBLIC;
5592 if((yyvsp[(1) - (8)].flags).flags&(FLAG_PRIVATE|FLAG_PACKAGEINTERNAL|FLAG_PROTECTED)) {
5593 syntaxerror("invalid method modifiers: interface methods always need to be public");
5595 startfunction(&(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo));
5596 endfunction(&(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo), 0);
5597 list_deep_free((yyvsp[(6) - (8)].params).list);
5607 /* Line 1464 of skeleton.m4 */
5608 #line 2516 "parser.y"
5609 {setslotstate(&(yyvsp[(1) - (2)].flags),(yyvsp[(2) - (2)].token));}
5618 /* Line 1464 of skeleton.m4 */
5619 #line 2516 "parser.y"
5620 {(yyval.code)=(yyvsp[(4) - (4)].code);setslotstate(0, 0);}
5629 /* Line 1464 of skeleton.m4 */
5630 #line 2518 "parser.y"
5631 {(yyval.code) = (yyvsp[(1) - (1)].code);}
5640 /* Line 1464 of skeleton.m4 */
5641 #line 2519 "parser.y"
5642 {(yyval.code) = code_append((yyvsp[(1) - (3)].code), (yyvsp[(3) - (3)].code));}
5651 /* Line 1464 of skeleton.m4 */
5652 #line 2522 "parser.y"
5654 int flags = slotstate_flags->flags;
5655 namespace_t ns = modifiers2access(slotstate_flags);
5657 varinfo_t* info = 0;
5659 memberinfo_t*i = registry_findmember(state->cls->info, ns.name, (yyvsp[(1) - (3)].id), 1);
5661 check_override(i, flags);
5663 info = varinfo_register_onclass(state->cls->info, ns.access, ns.name, (yyvsp[(1) - (3)].id));
5665 slotinfo_t*i = registry_find(state->package, (yyvsp[(1) - (3)].id));
5667 syntaxerror("package %s already contains '%s'", state->package, (yyvsp[(1) - (3)].id));
5669 if(ns.name && ns.name[0]) {
5670 syntaxerror("namespaces not allowed on package-level variables");
5672 info = varinfo_register_global(ns.access, state->package, (yyvsp[(1) - (3)].id));
5675 info->type = (yyvsp[(2) - (3)].classinfo);
5676 info->flags = flags;
5679 multiname_t mname = {QNAME, &ns, 0, (yyvsp[(1) - (3)].id)};
5681 trait_list_t**traits;
5685 ns.name = state->package;
5686 traits = &global->init->traits;
5687 code = &global->init->method->body->code;
5688 } else if(flags&FLAG_STATIC) {
5690 traits = &state->cls->abc->static_traits;
5691 code = &state->cls->static_init->header;
5693 // instance variable
5694 traits = &state->cls->abc->traits;
5695 code = &state->cls->init->header;
5699 if((yyvsp[(2) - (3)].classinfo)) {
5700 MULTINAME(m, (yyvsp[(2) - (3)].classinfo));
5701 t = trait_new_member(traits, multiname_clone(&m), multiname_clone(&mname), 0);
5703 t = trait_new_member(traits, 0, multiname_clone(&mname), 0);
5705 info->slot = t->slot_id;
5707 /* initalization code (if needed) */
5709 if((yyvsp[(3) - (3)].value).c && !is_pushundefined((yyvsp[(3) - (3)].value).c)) {
5710 c = abc_getlocal_0(c);
5711 c = code_append(c, (yyvsp[(3) - (3)].value).c);
5712 c = converttype(c, (yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo));
5713 c = abc_setslot(c, t->slot_id);
5716 *code = code_append(*code, c);
5718 if(slotstate_varconst==KW_CONST) {
5719 t->kind= TRAIT_CONST;
5732 /* Line 1464 of skeleton.m4 */
5733 #line 2596 "parser.y"
5734 {(yyval.constant)=0;}
5743 /* Line 1464 of skeleton.m4 */
5744 #line 2597 "parser.y"
5745 {(yyval.constant)=(yyvsp[(2) - (2)].constant);}
5754 /* Line 1464 of skeleton.m4 */
5755 #line 2599 "parser.y"
5756 {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_uint));}
5765 /* Line 1464 of skeleton.m4 */
5766 #line 2600 "parser.y"
5767 {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_int));}
5776 /* Line 1464 of skeleton.m4 */
5777 #line 2601 "parser.y"
5778 {(yyval.constant) = constant_new_uint((yyvsp[(1) - (1)].number_uint));}
5787 /* Line 1464 of skeleton.m4 */
5788 #line 2602 "parser.y"
5789 {(yyval.constant) = constant_new_float((yyvsp[(1) - (1)].number_float));}
5798 /* Line 1464 of skeleton.m4 */
5799 #line 2603 "parser.y"
5800 {(yyval.constant) = constant_new_string2((yyvsp[(1) - (1)].str).str,(yyvsp[(1) - (1)].str).len);free((char*)(yyvsp[(1) - (1)].str).str);}
5809 /* Line 1464 of skeleton.m4 */
5810 #line 2605 "parser.y"
5811 {(yyval.constant) = constant_new_true((yyvsp[(1) - (1)].token));}
5820 /* Line 1464 of skeleton.m4 */
5821 #line 2606 "parser.y"
5822 {(yyval.constant) = constant_new_false((yyvsp[(1) - (1)].token));}
5831 /* Line 1464 of skeleton.m4 */
5832 #line 2607 "parser.y"
5833 {(yyval.constant) = constant_new_null((yyvsp[(1) - (1)].token));}
5842 /* Line 1464 of skeleton.m4 */
5843 #line 2608 "parser.y"
5846 as3_warning("Couldn't evaluate constant value of %s", (yyvsp[(1) - (1)].id));
5847 (yyval.constant) = constant_new_null((yyvsp[(1) - (1)].id));
5857 /* Line 1464 of skeleton.m4 */
5858 #line 2617 "parser.y"
5861 memset(&(yyval.params),0,sizeof((yyval.params)));
5871 /* Line 1464 of skeleton.m4 */
5872 #line 2621 "parser.y"
5875 (yyval.params)=(yyvsp[(1) - (1)].params);
5885 /* Line 1464 of skeleton.m4 */
5886 #line 2627 "parser.y"
5889 memset(&(yyval.params),0,sizeof((yyval.params)));
5890 (yyval.params).varargs=1;
5891 list_append((yyval.params).list, (yyvsp[(2) - (2)].param));
5901 /* Line 1464 of skeleton.m4 */
5902 #line 2633 "parser.y"
5905 (yyval.params) =(yyvsp[(1) - (4)].params);
5906 (yyval.params).varargs=1;
5907 list_append((yyval.params).list, (yyvsp[(4) - (4)].param));
5917 /* Line 1464 of skeleton.m4 */
5918 #line 2641 "parser.y"
5921 (yyval.params) = (yyvsp[(1) - (3)].params);
5922 list_append((yyval.params).list, (yyvsp[(3) - (3)].param));
5932 /* Line 1464 of skeleton.m4 */
5933 #line 2646 "parser.y"
5936 memset(&(yyval.params),0,sizeof((yyval.params)));
5937 list_append((yyval.params).list, (yyvsp[(1) - (1)].param));
5947 /* Line 1464 of skeleton.m4 */
5948 #line 2652 "parser.y"
5951 (yyval.param) = rfx_calloc(sizeof(param_t));
5952 (yyval.param)->name=(yyvsp[(1) - (4)].id);
5953 (yyval.param)->type = (yyvsp[(3) - (4)].classinfo);
5955 (yyval.param)->value = (yyvsp[(4) - (4)].constant);
5965 /* Line 1464 of skeleton.m4 */
5966 #line 2660 "parser.y"
5969 (yyval.param) = rfx_calloc(sizeof(param_t));
5970 (yyval.param)->name=(yyvsp[(1) - (2)].id);
5971 (yyval.param)->type = TYPE_ANY;
5973 (yyval.param)->value = (yyvsp[(2) - (2)].constant);
5983 /* Line 1464 of skeleton.m4 */
5984 #line 2670 "parser.y"
5985 {PASS12 (yyval.token)=0;}
5994 /* Line 1464 of skeleton.m4 */
5995 #line 2673 "parser.y"
5996 {PASS12 startfunction(&(yyvsp[(1) - (9)].flags),(yyvsp[(3) - (9)].token),(yyvsp[(4) - (9)].id),&(yyvsp[(6) - (9)].params),(yyvsp[(8) - (9)].classinfo));}
6005 /* Line 1464 of skeleton.m4 */
6006 #line 2674 "parser.y"
6009 endfunction(&(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),0,0);
6011 if(!state->method->info) syntaxerror("internal error");
6013 code_t*c = method_header(state->method);
6014 c = wrap_function(c, 0, (yyvsp[(11) - (12)].code));
6016 endfunction(&(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),(yyvsp[(8) - (12)].classinfo),c);
6018 list_deep_free((yyvsp[(6) - (12)].params).list);
6029 /* Line 1464 of skeleton.m4 */
6030 #line 2690 "parser.y"
6031 {PASS12 (yyval.id)=0;}
6040 /* Line 1464 of skeleton.m4 */
6041 #line 2692 "parser.y"
6042 {PASS12 innerfunction((yyvsp[(2) - (7)].id),&(yyvsp[(4) - (7)].params),(yyvsp[(6) - (7)].classinfo));}
6051 /* Line 1464 of skeleton.m4 */
6052 #line 2693 "parser.y"
6055 endfunction(0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),0,0);
6057 methodinfo_t*f = state->method->info;
6058 if(!f || !f->kind) syntaxerror("internal error");
6060 code_t*c = method_header(state->method);
6061 c = wrap_function(c, 0, (yyvsp[(9) - (10)].code));
6063 int index = state->method->var_index;
6064 endfunction(0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),(yyvsp[(6) - (10)].classinfo),c);
6066 (yyval.value).c = abc_getlocal(0, index);
6067 (yyval.value).t = TYPE_FUNCTION(f);
6069 PASS12 list_deep_free((yyvsp[(4) - (10)].params).list);
6079 /* Line 1464 of skeleton.m4 */
6080 #line 2715 "parser.y"
6082 PASS1 static slotinfo_t c;
6083 memset(&c, 0, sizeof(c));
6084 c.name = (yyvsp[(1) - (1)].id);
6085 (yyval.classinfo) = (classinfo_t*)&c;
6087 slotinfo_t*s = find_class((yyvsp[(1) - (1)].id));
6088 if(!s) syntaxerror("Could not find class/method %s (current package: %s)\n", (yyvsp[(1) - (1)].id), state->package);
6089 (yyval.classinfo) = (classinfo_t*)s;
6099 /* Line 1464 of skeleton.m4 */
6100 #line 2726 "parser.y"
6102 PASS1 static slotinfo_t c;
6103 memset(&c, 0, sizeof(c));
6104 c.package = (yyvsp[(1) - (3)].id);
6105 c.name = (yyvsp[(3) - (3)].id);
6106 (yyval.classinfo)=(classinfo_t*)&c;
6108 slotinfo_t*s = registry_find((yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
6109 if(!s) syntaxerror("Couldn't find class/method %s.%s\n", (yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
6110 free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;
6111 (yyval.classinfo) = (classinfo_t*)s;
6121 /* Line 1464 of skeleton.m4 */
6122 #line 2742 "parser.y"
6123 {PASS12 (yyval.classinfo_list)=list_new();list_append((yyval.classinfo_list), (yyvsp[(1) - (1)].classinfo));}
6132 /* Line 1464 of skeleton.m4 */
6133 #line 2743 "parser.y"
6134 {PASS12 (yyval.classinfo_list)=(yyvsp[(1) - (3)].classinfo_list);list_append((yyval.classinfo_list),(yyvsp[(3) - (3)].classinfo));}
6143 /* Line 1464 of skeleton.m4 */
6144 #line 2745 "parser.y"
6145 {PASS12 (yyval.classinfo)=(yyvsp[(1) - (1)].classinfo);}
6154 /* Line 1464 of skeleton.m4 */
6155 #line 2746 "parser.y"
6156 {PASS12 (yyval.classinfo)=registry_getanytype();}
6165 /* Line 1464 of skeleton.m4 */
6166 #line 2747 "parser.y"
6167 {PASS12 (yyval.classinfo)=registry_getanytype();}
6176 /* Line 1464 of skeleton.m4 */
6177 #line 2756 "parser.y"
6178 {PASS12 (yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
6187 /* Line 1464 of skeleton.m4 */
6188 #line 2757 "parser.y"
6189 {PASS12 (yyval.classinfo)=0;}
6198 /* Line 1464 of skeleton.m4 */
6199 #line 2761 "parser.y"
6200 {(yyval.value_list).cc=0;(yyval.value_list).len=0;}
6209 /* Line 1464 of skeleton.m4 */
6210 #line 2762 "parser.y"
6211 {(yyval.value_list)=(yyvsp[(2) - (3)].value_list);}
6220 /* Line 1464 of skeleton.m4 */
6221 #line 2764 "parser.y"
6222 {(yyval.value_list).cc=0;(yyval.value_list).len=0;}
6231 /* Line 1464 of skeleton.m4 */
6232 #line 2768 "parser.y"
6233 {(yyval.value_list).len=1;
6234 (yyval.value_list).cc = (yyvsp[(1) - (1)].value).c;
6244 /* Line 1464 of skeleton.m4 */
6245 #line 2772 "parser.y"
6246 {(yyval.value_list) = (yyvsp[(1) - (2)].value_list);}
6255 /* Line 1464 of skeleton.m4 */
6256 #line 2773 "parser.y"
6258 (yyval.value_list).len= (yyvsp[(1) - (2)].value_list).len+1;
6259 (yyval.value_list).cc = code_append((yyvsp[(1) - (2)].value_list).cc, (yyvsp[(2) - (2)].value).c);
6269 /* Line 1464 of skeleton.m4 */
6270 #line 2779 "parser.y"
6272 (yyval.value).c = (yyvsp[(2) - (4)].value).c;
6273 if((yyval.value).c->opcode == OPCODE_COERCE_A) (yyval.value).c = code_cutlast((yyval.value).c);
6275 code_t*paramcode = (yyvsp[(4) - (4)].value_list).cc;
6276 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6277 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6278 (yyval.value).c = code_cutlast((yyval.value).c);
6279 (yyval.value).c = code_append((yyval.value).c, paramcode);
6280 (yyval.value).c = abc_constructprop2((yyval.value).c, name, (yyvsp[(4) - (4)].value_list).len);
6281 multiname_destroy(name);
6282 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
6283 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6284 trait_t*t = traits_find_slotid(state->cls->abc->traits,slot);//FIXME
6285 multiname_t*name = t->name;
6286 (yyval.value).c = code_cutlast((yyval.value).c);
6287 (yyval.value).c = code_append((yyval.value).c, paramcode);
6288 (yyval.value).c = abc_constructprop2((yyval.value).c, name, (yyvsp[(4) - (4)].value_list).len);
6290 (yyval.value).c = code_append((yyval.value).c, paramcode);
6291 (yyval.value).c = abc_construct((yyval.value).c, (yyvsp[(4) - (4)].value_list).len);
6294 (yyval.value).t = TYPE_ANY;
6295 if(TYPE_IS_CLASS((yyvsp[(2) - (4)].value).t) && (yyvsp[(2) - (4)].value).t->data) {
6296 (yyval.value).t = (yyvsp[(2) - (4)].value).t->data;
6298 (yyval.value).c = abc_coerce_a((yyval.value).c);
6299 (yyval.value).t = TYPE_ANY;
6310 /* Line 1464 of skeleton.m4 */
6311 #line 2815 "parser.y"
6314 (yyval.value).c = (yyvsp[(1) - (4)].value).c;
6315 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
6316 (yyval.value).c = code_cutlast((yyval.value).c);
6318 code_t*paramcode = (yyvsp[(3) - (4)].value_list).cc;
6320 (yyval.value).t = TYPE_ANY;
6321 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6322 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6323 (yyval.value).c = code_cutlast((yyval.value).c);
6324 (yyval.value).c = code_append((yyval.value).c, paramcode);
6325 (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).len);
6326 multiname_destroy(name);
6327 } else if((yyval.value).c->opcode == OPCODE_GETSLOT && (yyval.value).c->prev->opcode != OPCODE_GETSCOPEOBJECT) {
6328 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6329 trait_t*t = traits_find_slotid(state->cls->abc->traits,slot);
6330 if(t->kind!=TRAIT_METHOD) {
6331 //ok: flash allows to assign closures to members.
6333 multiname_t*name = t->name;
6334 (yyval.value).c = code_cutlast((yyval.value).c);
6335 (yyval.value).c = code_append((yyval.value).c, paramcode);
6336 //$$.c = abc_callmethod($$.c, t->method, len); //#1051 illegal early access binding
6337 (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).len);
6338 } else if((yyval.value).c->opcode == OPCODE_GETSUPER) {
6339 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6340 (yyval.value).c = code_cutlast((yyval.value).c);
6341 (yyval.value).c = code_append((yyval.value).c, paramcode);
6342 (yyval.value).c = abc_callsuper2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).len);
6343 multiname_destroy(name);
6345 (yyval.value).c = abc_getglobalscope((yyval.value).c);
6346 (yyval.value).c = code_append((yyval.value).c, paramcode);
6347 (yyval.value).c = abc_call((yyval.value).c, (yyvsp[(3) - (4)].value_list).len);
6350 if(TYPE_IS_FUNCTION((yyvsp[(1) - (4)].value).t) && (yyvsp[(1) - (4)].value).t->data) {
6351 (yyval.value).t = ((methodinfo_t*)((yyvsp[(1) - (4)].value).t->data))->return_type;
6353 (yyval.value).c = abc_coerce_a((yyval.value).c);
6354 (yyval.value).t = TYPE_ANY;
6365 /* Line 1464 of skeleton.m4 */
6366 #line 2861 "parser.y"
6368 if(!state->cls) syntaxerror("super() not allowed outside of a class");
6369 if(!state->method) syntaxerror("super() not allowed outside of a function");
6370 if(!state->method->is_constructor) syntaxerror("super() not allowed outside of a constructor");
6372 (yyval.value).c = code_new();
6373 (yyval.value).c = abc_getlocal_0((yyval.value).c);
6375 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value_list).cc);
6377 this is dependent on the control path, check this somewhere else
6378 if(state->method->has_super)
6379 syntaxerror("constructor may call super() only once");
6381 state->method->has_super = 1;
6383 (yyval.value).c = abc_constructsuper((yyval.value).c, (yyvsp[(3) - (4)].value_list).len);
6384 (yyval.value).c = abc_pushundefined((yyval.value).c);
6385 (yyval.value).t = TYPE_ANY;
6395 /* Line 1464 of skeleton.m4 */
6396 #line 2882 "parser.y"
6398 (yyval.value).c = (yyvsp[(2) - (2)].value).c;
6399 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
6400 (yyval.value).c = code_cutlast((yyval.value).c);
6402 multiname_t*name = 0;
6403 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6404 (yyval.value).c->opcode = OPCODE_DELETEPROPERTY;
6405 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
6406 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6407 multiname_t*name = traits_find_slotid(state->cls->abc->traits,slot)->name;
6408 (yyval.value).c = code_cutlast((yyval.value).c);
6409 (yyval.value).c = abc_deleteproperty2((yyval.value).c, name);
6411 (yyval.value).c = abc_getlocal_0((yyval.value).c);
6412 MULTINAME_LATE(m, (yyvsp[(2) - (2)].value).t?(yyvsp[(2) - (2)].value).t->access:ACCESS_PACKAGE, "");
6413 (yyval.value).c = abc_deleteproperty2((yyval.value).c, &m);
6415 (yyval.value).t = TYPE_BOOLEAN;
6425 /* Line 1464 of skeleton.m4 */
6426 #line 2903 "parser.y"
6428 (yyval.code) = abc_returnvoid(0);
6438 /* Line 1464 of skeleton.m4 */
6439 #line 2906 "parser.y"
6441 (yyval.code) = (yyvsp[(2) - (2)].value).c;
6442 (yyval.code) = abc_returnvalue((yyval.code));
6452 /* Line 1464 of skeleton.m4 */
6453 #line 2913 "parser.y"
6454 {(yyval.value)=(yyvsp[(1) - (1)].value);}
6463 /* Line 1464 of skeleton.m4 */
6464 #line 2914 "parser.y"
6465 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6474 /* Line 1464 of skeleton.m4 */
6475 #line 2915 "parser.y"
6477 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
6478 (yyval.value).c = cut_last_push((yyval.value).c);
6479 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
6480 (yyval.value).t = (yyvsp[(3) - (3)].value).t;
6490 /* Line 1464 of skeleton.m4 */
6491 #line 2921 "parser.y"
6493 (yyval.code)=cut_last_push((yyvsp[(1) - (1)].value).c);
6503 /* Line 1464 of skeleton.m4 */
6504 #line 2927 "parser.y"
6505 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6514 /* Line 1464 of skeleton.m4 */
6515 #line 2931 "parser.y"
6516 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6525 /* Line 1464 of skeleton.m4 */
6526 #line 2933 "parser.y"
6527 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6536 /* Line 1464 of skeleton.m4 */
6537 #line 2935 "parser.y"
6538 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6547 /* Line 1464 of skeleton.m4 */
6548 #line 2939 "parser.y"
6550 (yyval.value).c = 0;
6551 namespace_t ns = {ACCESS_PACKAGE, ""};
6552 multiname_t m = {QNAME, &ns, 0, "RegExp"};
6553 if(!(yyvsp[(1) - (1)].regexp).options) {
6554 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
6555 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).pattern);
6556 (yyval.value).c = abc_construct((yyval.value).c, 1);
6558 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
6559 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).pattern);
6560 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).options);
6561 (yyval.value).c = abc_construct((yyval.value).c, 2);
6563 (yyval.value).t = TYPE_REGEXP;
6573 /* Line 1464 of skeleton.m4 */
6574 #line 2956 "parser.y"
6575 {(yyval.value).c = abc_pushbyte(0, (yyvsp[(1) - (1)].number_uint));
6576 //MULTINAME(m, registry_getintclass());
6577 //$$.c = abc_coerce2($$.c, &m); // FIXME
6578 (yyval.value).t = TYPE_INT;
6588 /* Line 1464 of skeleton.m4 */
6589 #line 2961 "parser.y"
6590 {(yyval.value).c = abc_pushshort(0, (yyvsp[(1) - (1)].number_uint));
6591 (yyval.value).t = TYPE_INT;
6601 /* Line 1464 of skeleton.m4 */
6602 #line 2964 "parser.y"
6603 {(yyval.value).c = abc_pushint(0, (yyvsp[(1) - (1)].number_int));
6604 (yyval.value).t = TYPE_INT;
6614 /* Line 1464 of skeleton.m4 */
6615 #line 2967 "parser.y"
6616 {(yyval.value).c = abc_pushuint(0, (yyvsp[(1) - (1)].number_uint));
6617 (yyval.value).t = TYPE_UINT;
6627 /* Line 1464 of skeleton.m4 */
6628 #line 2970 "parser.y"
6629 {(yyval.value).c = abc_pushdouble(0, (yyvsp[(1) - (1)].number_float));
6630 (yyval.value).t = TYPE_FLOAT;
6640 /* Line 1464 of skeleton.m4 */
6641 #line 2973 "parser.y"
6642 {(yyval.value).c = abc_pushstring2(0, &(yyvsp[(1) - (1)].str));free((char*)(yyvsp[(1) - (1)].str).str);
6643 (yyval.value).t = TYPE_STRING;
6653 /* Line 1464 of skeleton.m4 */
6654 #line 2976 "parser.y"
6655 {(yyval.value).c = abc_pushundefined(0);
6656 (yyval.value).t = TYPE_ANY;
6666 /* Line 1464 of skeleton.m4 */
6667 #line 2979 "parser.y"
6668 {(yyval.value).c = abc_pushtrue(0);
6669 (yyval.value).t = TYPE_BOOLEAN;
6679 /* Line 1464 of skeleton.m4 */
6680 #line 2982 "parser.y"
6681 {(yyval.value).c = abc_pushfalse(0);
6682 (yyval.value).t = TYPE_BOOLEAN;
6692 /* Line 1464 of skeleton.m4 */
6693 #line 2985 "parser.y"
6694 {(yyval.value).c = abc_pushnull(0);
6695 (yyval.value).t = TYPE_NULL;
6705 /* Line 1464 of skeleton.m4 */
6706 #line 2989 "parser.y"
6707 {(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);
6708 (yyval.value).t = TYPE_BOOLEAN;
6718 /* Line 1464 of skeleton.m4 */
6719 #line 2992 "parser.y"
6720 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterthan((yyval.value).c);
6721 (yyval.value).t = TYPE_BOOLEAN;
6731 /* Line 1464 of skeleton.m4 */
6732 #line 2995 "parser.y"
6733 {(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);
6734 (yyval.value).t = TYPE_BOOLEAN;
6744 /* Line 1464 of skeleton.m4 */
6745 #line 2998 "parser.y"
6746 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterequals((yyval.value).c);
6747 (yyval.value).t = TYPE_BOOLEAN;
6757 /* Line 1464 of skeleton.m4 */
6758 #line 3001 "parser.y"
6759 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_equals((yyval.value).c);
6760 (yyval.value).t = TYPE_BOOLEAN;
6770 /* Line 1464 of skeleton.m4 */
6771 #line 3004 "parser.y"
6772 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_strictequals((yyval.value).c);
6773 (yyval.value).t = TYPE_BOOLEAN;
6783 /* Line 1464 of skeleton.m4 */
6784 #line 3007 "parser.y"
6785 {(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);
6786 (yyval.value).t = TYPE_BOOLEAN;
6796 /* Line 1464 of skeleton.m4 */
6797 #line 3010 "parser.y"
6798 {(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);
6799 (yyval.value).t = TYPE_BOOLEAN;
6809 /* Line 1464 of skeleton.m4 */
6810 #line 3014 "parser.y"
6811 {(yyval.value).t = join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'O');
6812 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
6813 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(1) - (3)].value).t, (yyval.value).t);
6814 (yyval.value).c = abc_dup((yyval.value).c);
6815 code_t*jmp = (yyval.value).c = abc_iftrue((yyval.value).c, 0);
6816 (yyval.value).c = cut_last_push((yyval.value).c);
6817 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
6818 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (3)].value).t, (yyval.value).t);
6819 code_t*label = (yyval.value).c = abc_label((yyval.value).c);
6820 jmp->branch = label;
6830 /* Line 1464 of skeleton.m4 */
6831 #line 3025 "parser.y"
6833 (yyval.value).t = join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'A');
6834 /*printf("%08x:\n",$1.t);
6835 code_dump($1.c, 0, 0, "", stdout);
6836 printf("%08x:\n",$3.t);
6837 code_dump($3.c, 0, 0, "", stdout);
6838 printf("joining %08x and %08x to %08x\n", $1.t, $3.t, $$.t);*/
6839 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
6840 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(1) - (3)].value).t, (yyval.value).t);
6841 (yyval.value).c = abc_dup((yyval.value).c);
6842 code_t*jmp = (yyval.value).c = abc_iffalse((yyval.value).c, 0);
6843 (yyval.value).c = cut_last_push((yyval.value).c);
6844 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
6845 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (3)].value).t, (yyval.value).t);
6846 code_t*label = (yyval.value).c = abc_label((yyval.value).c);
6847 jmp->branch = label;
6857 /* Line 1464 of skeleton.m4 */
6858 #line 3043 "parser.y"
6859 {(yyval.value).c=(yyvsp[(2) - (2)].value).c;
6860 (yyval.value).c = abc_not((yyval.value).c);
6861 (yyval.value).t = TYPE_BOOLEAN;
6871 /* Line 1464 of skeleton.m4 */
6872 #line 3048 "parser.y"
6873 {(yyval.value).c=(yyvsp[(2) - (2)].value).c;
6874 (yyval.value).c = abc_bitnot((yyval.value).c);
6875 (yyval.value).t = TYPE_INT;
6885 /* Line 1464 of skeleton.m4 */
6886 #line 3053 "parser.y"
6887 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6888 (yyval.value).c = abc_bitand((yyval.value).c);
6889 (yyval.value).t = TYPE_INT;
6899 /* Line 1464 of skeleton.m4 */
6900 #line 3058 "parser.y"
6901 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6902 (yyval.value).c = abc_bitxor((yyval.value).c);
6903 (yyval.value).t = TYPE_INT;
6913 /* Line 1464 of skeleton.m4 */
6914 #line 3063 "parser.y"
6915 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6916 (yyval.value).c = abc_bitor((yyval.value).c);
6917 (yyval.value).t = TYPE_INT;
6927 /* Line 1464 of skeleton.m4 */
6928 #line 3068 "parser.y"
6929 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6930 (yyval.value).c = abc_rshift((yyval.value).c);
6931 (yyval.value).t = TYPE_INT;
6941 /* Line 1464 of skeleton.m4 */
6942 #line 3072 "parser.y"
6943 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6944 (yyval.value).c = abc_urshift((yyval.value).c);
6945 (yyval.value).t = TYPE_INT;
6955 /* Line 1464 of skeleton.m4 */
6956 #line 3076 "parser.y"
6957 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6958 (yyval.value).c = abc_lshift((yyval.value).c);
6959 (yyval.value).t = TYPE_INT;
6969 /* Line 1464 of skeleton.m4 */
6970 #line 3081 "parser.y"
6971 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6972 (yyval.value).c = abc_divide((yyval.value).c);
6973 (yyval.value).t = TYPE_NUMBER;
6983 /* Line 1464 of skeleton.m4 */
6984 #line 3085 "parser.y"
6985 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6986 (yyval.value).c = abc_modulo((yyval.value).c);
6987 (yyval.value).t = TYPE_NUMBER;
6997 /* Line 1464 of skeleton.m4 */
6998 #line 3089 "parser.y"
6999 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7000 if(BOTH_INT((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t)) {
7001 (yyval.value).c = abc_add_i((yyval.value).c);
7002 (yyval.value).t = TYPE_INT;
7004 (yyval.value).c = abc_add((yyval.value).c);
7005 (yyval.value).t = join_types((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t,'+');
7016 /* Line 1464 of skeleton.m4 */
7017 #line 3098 "parser.y"
7018 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7019 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
7020 (yyval.value).c = abc_subtract_i((yyval.value).c);
7021 (yyval.value).t = TYPE_INT;
7023 (yyval.value).c = abc_subtract((yyval.value).c);
7024 (yyval.value).t = TYPE_NUMBER;
7035 /* Line 1464 of skeleton.m4 */
7036 #line 3107 "parser.y"
7037 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7038 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
7039 (yyval.value).c = abc_multiply_i((yyval.value).c);
7040 (yyval.value).t = TYPE_INT;
7042 (yyval.value).c = abc_multiply((yyval.value).c);
7043 (yyval.value).t = TYPE_NUMBER;
7054 /* Line 1464 of skeleton.m4 */
7055 #line 3117 "parser.y"
7056 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7057 (yyval.value).c = abc_in((yyval.value).c);
7058 (yyval.value).t = TYPE_BOOLEAN;
7068 /* Line 1464 of skeleton.m4 */
7069 #line 3122 "parser.y"
7070 {char use_astype=0; // flash player's astype works differently than astypelate
7071 if(use_astype && TYPE_IS_CLASS((yyvsp[(3) - (3)].value).t) && (yyvsp[(3) - (3)].value).t->data) {
7072 MULTINAME(m, (classinfo_t*)((yyvsp[(3) - (3)].value).t->data));
7073 (yyval.value).c = abc_astype2((yyvsp[(1) - (3)].value).c, &m);
7074 (yyval.value).t = (yyvsp[(3) - (3)].value).t->data;
7076 (yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
7077 (yyval.value).c = abc_astypelate((yyval.value).c);
7078 (yyval.value).t = TYPE_ANY;
7089 /* Line 1464 of skeleton.m4 */
7090 #line 3135 "parser.y"
7091 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
7092 (yyval.value).c = abc_instanceof((yyval.value).c);
7093 (yyval.value).t = TYPE_BOOLEAN;
7103 /* Line 1464 of skeleton.m4 */
7104 #line 3140 "parser.y"
7105 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
7106 (yyval.value).c = abc_istypelate((yyval.value).c);
7107 (yyval.value).t = TYPE_BOOLEAN;
7117 /* Line 1464 of skeleton.m4 */
7118 #line 3145 "parser.y"
7120 (yyval.value).c = (yyvsp[(3) - (4)].value).c;
7121 (yyval.value).c = abc_typeof((yyval.value).c);
7122 (yyval.value).t = TYPE_STRING;
7132 /* Line 1464 of skeleton.m4 */
7133 #line 3151 "parser.y"
7135 (yyval.value).c = cut_last_push((yyvsp[(2) - (2)].value).c);
7136 (yyval.value).c = abc_pushundefined((yyval.value).c);
7137 (yyval.value).t = TYPE_ANY;
7147 /* Line 1464 of skeleton.m4 */
7148 #line 3157 "parser.y"
7149 { (yyval.value).c = abc_pushundefined(0);
7150 (yyval.value).t = TYPE_ANY;
7160 /* Line 1464 of skeleton.m4 */
7161 #line 3161 "parser.y"
7162 {(yyval.value)=(yyvsp[(2) - (3)].value);}
7171 /* Line 1464 of skeleton.m4 */
7172 #line 3163 "parser.y"
7174 (yyval.value)=(yyvsp[(2) - (2)].value);
7175 if(IS_INT((yyvsp[(2) - (2)].value).t)) {
7176 (yyval.value).c=abc_negate_i((yyval.value).c);
7177 (yyval.value).t = TYPE_INT;
7179 (yyval.value).c=abc_negate((yyval.value).c);
7180 (yyval.value).t = TYPE_NUMBER;
7191 /* Line 1464 of skeleton.m4 */
7192 #line 3174 "parser.y"
7194 (yyval.value).c = (yyvsp[(1) - (4)].value).c;
7195 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value).c);
7197 MULTINAME_LATE(m, (yyvsp[(1) - (4)].value).t?(yyvsp[(1) - (4)].value).t->access:ACCESS_PACKAGE, "");
7198 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7199 (yyval.value).t = 0; // array elements have unknown type
7209 /* Line 1464 of skeleton.m4 */
7210 #line 3183 "parser.y"
7212 (yyval.value).c = code_new();
7213 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(2) - (3)].value_list).cc);
7214 (yyval.value).c = abc_newarray((yyval.value).c, (yyvsp[(2) - (3)].value_list).len);
7215 (yyval.value).t = registry_getarrayclass();
7225 /* Line 1464 of skeleton.m4 */
7226 #line 3190 "parser.y"
7227 {(yyval.value_list).cc=0;(yyval.value_list).len=0;}
7236 /* Line 1464 of skeleton.m4 */
7237 #line 3191 "parser.y"
7238 {(yyval.value_list)=(yyvsp[(1) - (1)].value_list);}
7247 /* Line 1464 of skeleton.m4 */
7248 #line 3193 "parser.y"
7250 (yyval.value_list).cc = 0;
7251 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(1) - (3)].value).c);
7252 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (3)].value).c);
7253 (yyval.value_list).len = 2;
7263 /* Line 1464 of skeleton.m4 */
7264 #line 3199 "parser.y"
7266 (yyval.value_list).cc = (yyvsp[(1) - (5)].value_list).cc;
7267 (yyval.value_list).len = (yyvsp[(1) - (5)].value_list).len+2;
7268 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (5)].value).c);
7269 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(5) - (5)].value).c);
7279 /* Line 1464 of skeleton.m4 */
7280 #line 3208 "parser.y"
7282 (yyval.value).c = code_new();
7283 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(2) - (3)].value_list).cc);
7284 (yyval.value).c = abc_newobject((yyval.value).c, (yyvsp[(2) - (3)].value_list).len/2);
7285 (yyval.value).t = registry_getobjectclass();
7295 /* Line 1464 of skeleton.m4 */
7296 #line 3215 "parser.y"
7298 code_t*c = (yyvsp[(3) - (3)].value).c;
7299 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
7300 c=abc_multiply_i(c);
7304 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '*'), (yyvsp[(1) - (3)].value).t);
7305 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7306 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7316 /* Line 1464 of skeleton.m4 */
7317 #line 3227 "parser.y"
7319 code_t*c = abc_modulo((yyvsp[(3) - (3)].value).c);
7320 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '%'), (yyvsp[(1) - (3)].value).t);
7321 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7322 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7332 /* Line 1464 of skeleton.m4 */
7333 #line 3233 "parser.y"
7335 code_t*c = abc_lshift((yyvsp[(3) - (3)].value).c);
7336 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '<'), (yyvsp[(1) - (3)].value).t);
7337 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7338 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7348 /* Line 1464 of skeleton.m4 */
7349 #line 3239 "parser.y"
7351 code_t*c = abc_rshift((yyvsp[(3) - (3)].value).c);
7352 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '>'), (yyvsp[(1) - (3)].value).t);
7353 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7354 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7364 /* Line 1464 of skeleton.m4 */
7365 #line 3245 "parser.y"
7367 code_t*c = abc_urshift((yyvsp[(3) - (3)].value).c);
7368 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'U'), (yyvsp[(1) - (3)].value).t);
7369 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7370 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7380 /* Line 1464 of skeleton.m4 */
7381 #line 3251 "parser.y"
7383 code_t*c = abc_divide((yyvsp[(3) - (3)].value).c);
7384 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '/'), (yyvsp[(1) - (3)].value).t);
7385 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7386 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7396 /* Line 1464 of skeleton.m4 */
7397 #line 3257 "parser.y"
7399 code_t*c = abc_bitor((yyvsp[(3) - (3)].value).c);
7400 c=converttype(c, TYPE_INT, (yyvsp[(1) - (3)].value).t);
7401 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7402 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7412 /* Line 1464 of skeleton.m4 */
7413 #line 3263 "parser.y"
7415 code_t*c = abc_bitxor((yyvsp[(3) - (3)].value).c);
7416 c=converttype(c, TYPE_INT, (yyvsp[(1) - (3)].value).t);
7417 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7418 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7428 /* Line 1464 of skeleton.m4 */
7429 #line 3269 "parser.y"
7431 code_t*c = (yyvsp[(3) - (3)].value).c;
7433 if(TYPE_IS_INT((yyvsp[(1) - (3)].value).t)) {
7437 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '+'), (yyvsp[(1) - (3)].value).t);
7440 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7441 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7451 /* Line 1464 of skeleton.m4 */
7452 #line 3282 "parser.y"
7453 { code_t*c = (yyvsp[(3) - (3)].value).c;
7454 if(TYPE_IS_INT((yyvsp[(1) - (3)].value).t)) {
7455 c=abc_subtract_i(c);
7458 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '-'), (yyvsp[(1) - (3)].value).t);
7461 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7462 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7472 /* Line 1464 of skeleton.m4 */
7473 #line 3293 "parser.y"
7475 c = code_append(c, (yyvsp[(3) - (3)].value).c);
7476 c = converttype(c, (yyvsp[(3) - (3)].value).t, (yyvsp[(1) - (3)].value).t);
7477 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 1, 0);
7478 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7488 /* Line 1464 of skeleton.m4 */
7489 #line 3300 "parser.y"
7491 (yyval.value).t = join_types((yyvsp[(3) - (5)].value).t,(yyvsp[(5) - (5)].value).t,'?');
7492 (yyval.value).c = (yyvsp[(1) - (5)].value).c;
7493 code_t*j1 = (yyval.value).c = abc_iffalse((yyval.value).c, 0);
7494 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (5)].value).c);
7495 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (5)].value).t, (yyval.value).t);
7496 code_t*j2 = (yyval.value).c = abc_jump((yyval.value).c, 0);
7497 (yyval.value).c = j1->branch = abc_label((yyval.value).c);
7498 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(5) - (5)].value).c);
7499 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(5) - (5)].value).t, (yyval.value).t);
7500 (yyval.value).c = j2->branch = abc_label((yyval.value).c);
7510 /* Line 1464 of skeleton.m4 */
7511 #line 3313 "parser.y"
7513 classinfo_t*type = (yyvsp[(1) - (2)].value).t;
7514 if((is_getlocal((yyvsp[(1) - (2)].value).c) && TYPE_IS_INT((yyvsp[(1) - (2)].value).t)) || TYPE_IS_NUMBER((yyvsp[(1) - (2)].value).t)) {
7515 int nr = getlocalnr((yyvsp[(1) - (2)].value).c);
7516 code_free((yyvsp[(1) - (2)].value).c);(yyvsp[(1) - (2)].value).c=0;
7517 if(TYPE_IS_INT((yyvsp[(1) - (2)].value).t)) {
7518 (yyval.value).c = abc_getlocal(0, nr);
7519 (yyval.value).c = abc_inclocal_i((yyval.value).c, nr);
7520 } else if(TYPE_IS_NUMBER((yyvsp[(1) - (2)].value).t)) {
7521 (yyval.value).c = abc_getlocal(0, nr);
7522 (yyval.value).c = abc_inclocal((yyval.value).c, nr);
7523 } else syntaxerror("internal error");
7525 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7526 c=abc_increment_i(c);
7532 c=converttype(c, type, (yyvsp[(1) - (2)].value).t);
7533 (yyval.value).c = toreadwrite((yyvsp[(1) - (2)].value).c, c, 0, 1);
7534 (yyval.value).t = (yyvsp[(1) - (2)].value).t;
7545 /* Line 1464 of skeleton.m4 */
7546 #line 3340 "parser.y"
7548 classinfo_t*type = (yyvsp[(1) - (2)].value).t;
7549 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7550 c=abc_decrement_i(c);
7556 c=converttype(c, type, (yyvsp[(1) - (2)].value).t);
7557 (yyval.value).c = toreadwrite((yyvsp[(1) - (2)].value).c, c, 0, 1);
7558 (yyval.value).t = (yyvsp[(1) - (2)].value).t;
7568 /* Line 1464 of skeleton.m4 */
7569 #line 3354 "parser.y"
7571 classinfo_t*type = (yyvsp[(2) - (2)].value).t;
7572 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7573 c=abc_increment_i(c);
7579 c=converttype(c, type, (yyvsp[(2) - (2)].value).t);
7580 (yyval.value).c = toreadwrite((yyvsp[(2) - (2)].value).c, c, 0, 0);
7581 (yyval.value).t = (yyvsp[(2) - (2)].value).t;
7591 /* Line 1464 of skeleton.m4 */
7592 #line 3368 "parser.y"
7594 classinfo_t*type = (yyvsp[(2) - (2)].value).t;
7595 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7596 c=abc_decrement_i(c);
7602 c=converttype(c, type, (yyvsp[(2) - (2)].value).t);
7603 (yyval.value).c = toreadwrite((yyvsp[(2) - (2)].value).c, c, 0, 0);
7604 (yyval.value).t = (yyvsp[(2) - (2)].value).t;
7614 /* Line 1464 of skeleton.m4 */
7615 #line 3383 "parser.y"
7616 { if(!state->cls->info)
7617 syntaxerror("super keyword not allowed outside a class");
7618 classinfo_t*t = state->cls->info->superclass;
7619 if(!t) t = TYPE_OBJECT;
7621 memberinfo_t*f = registry_findmember_nsset(t, state->active_namespaces, (yyvsp[(3) - (3)].id), 1);
7623 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
7624 (yyval.value).c = 0;
7625 (yyval.value).c = abc_getlocal_0((yyval.value).c);
7626 (yyval.value).c = abc_getsuper2((yyval.value).c, &m);
7627 (yyval.value).t = slotinfo_gettype((slotinfo_t*)f);
7637 /* Line 1464 of skeleton.m4 */
7638 #line 3397 "parser.y"
7641 (yyval.value).c = abc_pushundefined(0);
7642 (yyval.value).t = 0;
7643 as3_warning("ignored @ operator");
7653 /* Line 1464 of skeleton.m4 */
7654 #line 3404 "parser.y"
7656 // child attribute TODO
7657 (yyval.value).c = abc_pushundefined(0);
7658 (yyval.value).t = 0;
7659 as3_warning("ignored .@ operator");
7669 /* Line 1464 of skeleton.m4 */
7670 #line 3411 "parser.y"
7672 // namespace declaration TODO
7673 (yyval.value).c = abc_pushundefined(0);
7674 (yyval.value).t = 0;
7675 as3_warning("ignored :: operator");
7685 /* Line 1464 of skeleton.m4 */
7686 #line 3418 "parser.y"
7689 (yyval.value).c = abc_pushundefined(0);
7690 (yyval.value).t = 0;
7691 as3_warning("ignored .. operator");
7701 /* Line 1464 of skeleton.m4 */
7702 #line 3425 "parser.y"
7705 (yyval.value).c = abc_pushundefined(0);
7706 (yyval.value).t = 0;
7707 as3_warning("ignored .() operator");
7717 /* Line 1464 of skeleton.m4 */
7718 #line 3437 "parser.y"
7719 {(yyval.value).c = (yyvsp[(1) - (3)].value).c;
7720 classinfo_t*t = (yyvsp[(1) - (3)].value).t;
7722 if(TYPE_IS_CLASS(t) && t->data) {
7727 memberinfo_t*f = registry_findmember_nsset(t, state->active_namespaces, (yyvsp[(3) - (3)].id), 1);
7729 if(f && !is_static != !(f->flags&FLAG_STATIC))
7731 if(f && f->slot && !noslot) {
7732 (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
7734 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
7735 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7737 /* determine type */
7738 (yyval.value).t = slotinfo_gettype((slotinfo_t*)f);
7739 if(!(yyval.value).t)
7740 (yyval.value).c = abc_coerce_a((yyval.value).c);
7742 /* when resolving a property on an unknown type, we do know the
7743 name of the property (and don't seem to need the package), but
7744 we need to make avm2 try out all access modes */
7745 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(3) - (3)].id)};
7746 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7747 (yyval.value).c = abc_coerce_a((yyval.value).c);
7748 (yyval.value).t = registry_getanytype();
7759 /* Line 1464 of skeleton.m4 */
7760 #line 3470 "parser.y"
7763 /* Queue unresolved identifiers for checking against the parent
7764 function's variables.
7765 We consider everything which is not a local variable "unresolved".
7766 This encompasses class names, members of the surrounding class
7767 etc. which *correct* because local variables of the parent function
7770 if(state->method->inner && !find_variable(state, (yyvsp[(1) - (1)].id))) {
7771 unknown_variable((yyvsp[(1) - (1)].id));
7775 (yyval.value).t = 0;
7776 (yyval.value).c = 0;
7781 /* look at variables */
7782 if((v = find_variable(state, (yyvsp[(1) - (1)].id)))) {
7783 // $1 is a local variable
7784 (yyval.value).c = abc_getlocal((yyval.value).c, v->index);
7785 (yyval.value).t = v->type;
7788 if((v = find_slot(state, (yyvsp[(1) - (1)].id)))) {
7789 (yyval.value).c = abc_getscopeobject((yyval.value).c, 1);
7790 (yyval.value).c = abc_getslot((yyval.value).c, v->index);
7791 (yyval.value).t = v->type;
7795 int i_am_static = (state->method && state->method->info)?(state->method->info->flags&FLAG_STATIC):FLAG_STATIC;
7797 /* look at current class' members */
7798 if(state->cls && (f = registry_findmember_nsset(state->cls->info, state->active_namespaces, (yyvsp[(1) - (1)].id), 1)) &&
7799 (f->flags&FLAG_STATIC) >= i_am_static) {
7800 // $1 is a function in this class
7801 int var_is_static = (f->flags&FLAG_STATIC);
7803 if(f->kind == INFOTYPE_METHOD) {
7804 (yyval.value).t = TYPE_FUNCTION(f);
7806 (yyval.value).t = f->type;
7808 if(var_is_static && !i_am_static) {
7809 /* access to a static member from a non-static location.
7810 do this via findpropstrict:
7811 there doesn't seem to be any non-lookup way to access
7812 static properties of a class */
7813 state->method->late_binding = 1;
7814 (yyval.value).t = f->type;
7815 namespace_t ns = {f->access, ""};
7816 multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
7817 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
7818 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7820 } else if(f->slot>0) {
7821 (yyval.value).c = abc_getlocal_0((yyval.value).c);
7822 (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
7825 namespace_t ns = {f->access, ""};
7826 multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
7827 (yyval.value).c = abc_getlocal_0((yyval.value).c);
7828 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7833 /* look at actual classes, in the current package and imported */
7834 if((a = find_class((yyvsp[(1) - (1)].id)))) {
7835 if(a->access == ACCESS_PACKAGEINTERNAL &&
7836 strcmp(a->package, state->package) &&
7837 strcmp(a->package, internal_filename_package)
7839 syntaxerror("Can't access internal %s %s in package '%s' from package '%s'",
7840 infotypename(a),(yyvsp[(1) - (1)].id), a->package, state->package);
7842 if(a->kind != INFOTYPE_CLASS) {
7844 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
7845 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7846 if(a->kind == INFOTYPE_METHOD) {
7847 methodinfo_t*f = (methodinfo_t*)a;
7848 (yyval.value).t = TYPE_FUNCTION(f);
7850 varinfo_t*v = (varinfo_t*)a;
7851 (yyval.value).t = v->type;
7854 classinfo_t*c = (classinfo_t*)a;
7856 (yyval.value).c = abc_getglobalscope((yyval.value).c);
7857 (yyval.value).c = abc_getslot((yyval.value).c, c->slot);
7860 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
7862 (yyval.value).t = TYPE_CLASS(c);
7867 /* unknown object, let the avm2 resolve it */
7869 as3_softwarning("Couldn't resolve '%s', doing late binding", (yyvsp[(1) - (1)].id));
7870 state->method->late_binding = 1;
7872 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(1) - (1)].id)};
7874 (yyval.value).t = 0;
7875 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
7876 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7887 /* Line 1464 of skeleton.m4 */
7888 #line 3591 "parser.y"
7891 tokenizer_register_namespace((yyvsp[(2) - (2)].id));
7892 (yyval.id)=(yyvsp[(2) - (2)].id);
7902 /* Line 1464 of skeleton.m4 */
7903 #line 3597 "parser.y"
7915 /* Line 1464 of skeleton.m4 */
7916 #line 3600 "parser.y"
7928 /* Line 1464 of skeleton.m4 */
7929 #line 3603 "parser.y"
7941 /* Line 1464 of skeleton.m4 */
7942 #line 3606 "parser.y"
7945 tokenizer_register_namespace((yyvsp[(3) - (3)].classinfo)->name);
7954 /* Line 1464 of skeleton.m4 */
7955 #line 7956 "parser.tab.c"
7958 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
7962 YY_STACK_PRINT (yyss, yyssp);
7966 /* Now `shift' the result of the reduction. Determine what state
7967 that goes to, based on the state we popped back to and the rule
7968 number reduced by. */
7972 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
7973 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
7974 yystate = yytable[yystate];
7976 yystate = yydefgoto[yyn - YYNTOKENS];
7981 /*------------------------------------.
7982 | yyerrlab -- here on detecting error |
7983 `------------------------------------*/
7985 /* If not already recovering from an error, report this error. */
7989 #if ! YYERROR_VERBOSE
7990 yyerror (YY_("syntax error"));
7993 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
7994 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
7996 YYSIZE_T yyalloc = 2 * yysize;
7997 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
7998 yyalloc = YYSTACK_ALLOC_MAXIMUM;
7999 if (yymsg != yymsgbuf)
8000 YYSTACK_FREE (yymsg);
8001 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
8003 yymsg_alloc = yyalloc;
8007 yymsg_alloc = sizeof yymsgbuf;
8011 if (0 < yysize && yysize <= yymsg_alloc)
8013 (void) yysyntax_error (yymsg, yystate, yychar);
8018 yyerror (YY_("syntax error"));
8020 goto yyexhaustedlab;
8028 if (yyerrstatus == 3)
8030 /* If just tried and failed to reuse lookahead token after an
8031 error, discard it. */
8033 if (yychar <= YYEOF)
8035 /* Return failure if at end of input. */
8036 if (yychar == YYEOF)
8041 yydestruct ("Error: discarding",
8047 /* Else will try to reuse lookahead token after shifting the error
8052 /*---------------------------------------------------.
8053 | yyerrorlab -- error raised explicitly by YYERROR. |
8054 `---------------------------------------------------*/
8057 /* Pacify compilers like GCC when the user code never invokes
8058 YYERROR and the label yyerrorlab therefore never appears in user
8060 if (/*CONSTCOND*/ 0)
8063 /* Do not reclaim the symbols of the rule which action triggered
8067 YY_STACK_PRINT (yyss, yyssp);
8072 /*-------------------------------------------------------------.
8073 | yyerrlab1 -- common code for both syntax error and YYERROR. |
8074 `-------------------------------------------------------------*/
8076 yyerrstatus = 3; /* Each real token shifted decrements this. */
8080 yyn = yypact[yystate];
8081 if (yyn != YYPACT_NINF)
8084 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
8092 /* Pop the current state because it cannot handle the error token. */
8097 yydestruct ("Error: popping",
8098 yystos[yystate], yyvsp);
8101 YY_STACK_PRINT (yyss, yyssp);
8107 /* Shift the error token. */
8108 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
8114 /*-------------------------------------.
8115 | yyacceptlab -- YYACCEPT comes here. |
8116 `-------------------------------------*/
8121 /*-----------------------------------.
8122 | yyabortlab -- YYABORT comes here. |
8123 `-----------------------------------*/
8128 #if !defined(yyoverflow) || YYERROR_VERBOSE
8129 /*-------------------------------------------------.
8130 | yyexhaustedlab -- memory exhaustion comes here. |
8131 `-------------------------------------------------*/
8133 yyerror (YY_("memory exhausted"));
8139 if (yychar != YYEMPTY)
8140 yydestruct ("Cleanup: discarding lookahead",
8142 /* Do not reclaim the symbols of the rule which action triggered
8143 this YYABORT or YYACCEPT. */
8145 YY_STACK_PRINT (yyss, yyssp);
8146 while (yyssp != yyss)
8148 yydestruct ("Cleanup: popping",
8149 yystos[*yyssp], yyvsp);
8154 YYSTACK_FREE (yyss);
8157 if (yymsg != yymsgbuf)
8158 YYSTACK_FREE (yymsg);
8160 /* Make sure YYID is used. */
8161 return YYID (yyresult);