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 void setstaticfunction(int x)
1044 state->method = state->cls->static_init;
1046 state->method = state->cls->init;
1049 parserassert(state->method);
1053 static void endclass()
1056 if(!state->cls->has_constructor && !(state->cls->info->flags&FLAG_INTERFACE)) {
1058 c = abc_getlocal_0(c);
1059 c = abc_constructsuper(c, 0);
1060 state->cls->init->header = code_append(state->cls->init->header, c);
1061 state->cls->has_constructor=1;
1063 if(state->cls->init) {
1064 if(state->cls->info->flags&FLAG_INTERFACE) {
1065 if(state->cls->init->header)
1066 syntaxerror("interface can not have class-level code");
1068 abc_method_t*m = abc_class_getconstructor(state->cls->abc, 0);
1069 code_t*c = method_header(state->cls->init);
1070 m->body->code = wrap_function(c, 0, m->body->code);
1073 if(state->cls->static_init) {
1074 abc_method_t*m = abc_class_getstaticconstructor(state->cls->abc, 0);
1075 code_t*c = method_header(state->cls->static_init);
1076 m->body->code = wrap_function(c, 0, m->body->code);
1083 void check_code_for_break(code_t*c)
1086 if(c->opcode == OPCODE___BREAK__) {
1087 char*name = string_cstr(c->data[0]);
1088 syntaxerror("Unresolved \"break %s\"", name);
1090 if(c->opcode == OPCODE___CONTINUE__) {
1091 char*name = string_cstr(c->data[0]);
1092 syntaxerror("Unresolved \"continue %s\"", name);
1099 static void check_constant_against_type(classinfo_t*t, constant_t*c)
1101 #define xassert(b) if(!(b)) syntaxerror("Invalid default value %s for type '%s'", constant_tostring(c), t->name)
1102 if(TYPE_IS_NUMBER(t)) {
1103 xassert(c->type == CONSTANT_FLOAT
1104 || c->type == CONSTANT_INT
1105 || c->type == CONSTANT_UINT);
1106 } else if(TYPE_IS_UINT(t)) {
1107 xassert(c->type == CONSTANT_UINT ||
1108 (c->type == CONSTANT_INT && c->i>=0));
1109 } else if(TYPE_IS_INT(t)) {
1110 xassert(c->type == CONSTANT_INT);
1111 } else if(TYPE_IS_BOOLEAN(t)) {
1112 xassert(c->type == CONSTANT_TRUE
1113 || c->type == CONSTANT_FALSE);
1117 static void check_override(memberinfo_t*m, int flags)
1121 if(m->parent == state->cls->info)
1122 syntaxerror("class '%s' already contains a method/slot '%s'", m->parent->name, m->name);
1124 syntaxerror("internal error: overriding method %s, which doesn't have parent", m->name);
1125 if(m->access==ACCESS_PRIVATE)
1127 if(m->flags & FLAG_FINAL)
1128 syntaxerror("can't override final member %s", m->name);
1129 if((m->flags & FLAG_STATIC) && !(flags&FLAG_STATIC))
1130 syntaxerror("can't override static member %s", m->name);
1131 if(!(m->flags & FLAG_STATIC) && (flags&FLAG_STATIC))
1132 syntaxerror("can't override non-static member %s with static declaration", m->name);
1134 if(!(flags&FLAG_OVERRIDE)) {
1135 if(m->parent && !(m->parent->flags&FLAG_INTERFACE)) {
1136 if(m->kind == INFOTYPE_METHOD)
1137 syntaxerror("can't override without explicit 'override' declaration");
1139 syntaxerror("can't override '%s'", m->name);
1144 static methodinfo_t*registerfunction(enum yytokentype getset, modifiers_t*mod, char*name, params_t*params, classinfo_t*return_type, int slot)
1146 methodinfo_t*minfo = 0;
1147 namespace_t ns = modifiers2access(mod);
1150 minfo = methodinfo_register_global(ns.access, state->package, name);
1151 minfo->return_type = return_type;
1152 } else if(getset != KW_GET && getset != KW_SET) {
1154 memberinfo_t* m = registry_findmember(state->cls->info, ns.name, name, 0);
1156 printf("%s.%s | %s.%s\n",
1157 m->package, m->name,
1159 syntaxerror("class already contains a %s '%s'", infotypename((slotinfo_t*)m), m->name);
1161 minfo = methodinfo_register_onclass(state->cls->info, ns.access, ns.name, name);
1162 minfo->return_type = return_type;
1163 // getslot on a member slot only returns "undefined", so no need
1164 // to actually store these
1165 //state->minfo->slot = state->method->abc->method->trait->slot_id;
1167 //class getter/setter
1168 int gs = getset==KW_GET?SUBTYPE_GET:SUBTYPE_SET;
1170 if(getset == KW_GET)
1172 else if(params->list && params->list->param)
1173 type = params->list->param->type;
1174 // not sure wether to look into superclasses here, too
1175 minfo = (methodinfo_t*)registry_findmember(state->cls->info, ns.name, name, 1);
1177 if(minfo->kind!=INFOTYPE_SLOT)
1178 syntaxerror("class already contains a method called '%s'", name);
1179 if(!(minfo->subtype & (SUBTYPE_GETSET)))
1180 syntaxerror("class already contains a field called '%s'", name);
1181 if(minfo->subtype & gs)
1182 syntaxerror("getter/setter for '%s' already defined", name);
1183 /* make a setter or getter into a getset */
1184 minfo->subtype |= gs;
1185 if(!minfo->return_type) {
1186 minfo->return_type = type;
1188 if(minfo && minfo->return_type != type)
1189 syntaxerror("different type in getter and setter");
1192 minfo = methodinfo_register_onclass(state->cls->info, ns.access, ns.name, name);
1193 minfo->kind = INFOTYPE_SLOT; //hack
1194 minfo->subtype = gs;
1195 minfo->return_type = type;
1197 /* can't assign a slot as getter and setter might have different slots */
1198 //minfo->slot = slot;
1200 if(mod->flags&FLAG_FINAL) minfo->flags |= FLAG_FINAL;
1201 if(mod->flags&FLAG_STATIC) minfo->flags |= FLAG_STATIC;
1202 if(mod->flags&FLAG_OVERRIDE) minfo->flags |= FLAG_OVERRIDE;
1207 static void innerfunction(char*name, params_t*params, classinfo_t*return_type)
1209 //parserassert(state->method && state->method->info);
1211 methodstate_t*parent_method = state->method;
1214 return_type = 0; // not valid in pass 1
1218 state->new_vars = 1;
1221 state->method = rfx_calloc(sizeof(methodstate_t));
1222 state->method->inner = 1;
1223 state->method->variable_count = 0;
1224 state->method->abc = rfx_calloc(sizeof(abc_method_t));
1226 NEW(methodinfo_t,minfo);
1227 minfo->kind = INFOTYPE_METHOD;
1228 minfo->access = ACCESS_PACKAGEINTERNAL;
1230 state->method->info = minfo;
1233 list_append(parent_method->innerfunctions, state->method);
1235 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
1237 function_initvars(state->method, params, 0, 1);
1241 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1242 state->method->variable_count = 0;
1243 parserassert(state->method);
1245 state->method->info->return_type = return_type;
1246 function_initvars(state->method, params, 0, 1);
1250 static void startfunction(modifiers_t*mod, enum yytokentype getset, char*name,
1251 params_t*params, classinfo_t*return_type)
1253 if(state->method && state->method->info) {
1254 syntaxerror("not able to start another method scope");
1257 state->new_vars = 1;
1260 state->method = rfx_calloc(sizeof(methodstate_t));
1261 state->method->has_super = 0;
1264 state->method->is_constructor = !strcmp(state->cls->info->name,name);
1266 state->method->is_global = 1;
1267 state->method->late_binding = 1; // for global methods, always push local_0 on the scope stack
1269 if(state->method->is_constructor)
1270 name = "__as3_constructor__";
1273 state->method->info = registerfunction(getset, mod, name, params, return_type, 0);
1275 function_initvars(state->method, params, mod->flags, 1);
1277 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
1281 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1282 state->method->variable_count = 0;
1283 parserassert(state->method);
1286 memberinfo_t*m = registry_findmember(state->cls->info, mod->ns, name, 2);
1287 check_override(m, mod->flags);
1291 state->cls->has_constructor |= state->method->is_constructor;
1294 state->method->info->return_type = return_type;
1295 function_initvars(state->method, params, mod->flags, 1);
1299 static abc_method_t* endfunction(modifiers_t*mod, enum yytokentype getset, char*name,
1300 params_t*params, classinfo_t*return_type, code_t*body)
1302 int flags = mod?mod->flags:0;
1305 // store inner methods in variables
1306 function_initvars(state->method, 0, 0, 0);
1308 methodstate_list_t*ml = state->method->innerfunctions;
1309 dict_t*xvars = dict_new();
1311 methodstate_t*m = ml->methodstate;
1312 parserassert(m->inner);
1313 if(m->unresolved_variables) {
1314 dict_t*d = m->unresolved_variables;
1316 for(t=0;t<d->hashsize;t++) {
1317 dictentry_t*l = d->slots[t];
1319 /* check parent method's variables */
1320 if(find_variable(state, l->key)) {
1321 m->uses_parent_function = 1;
1322 state->method->uses_slots = 1;
1323 dict_put(xvars, l->key, 0);
1330 dict_destroy(m->unresolved_variables);
1331 m->unresolved_variables = 0;
1335 if(state->method->uses_slots) {
1336 state->method->slots = dict_new();
1338 DICT_ITERATE_ITEMS(state->vars, char*, name, variable_t*, v) {
1339 if(v->index && dict_contains(xvars, name)) {
1342 if(v->is_inner_method) {
1343 v->is_inner_method->is_a_slot = 1;
1346 dict_put(state->method->slots, name, v);
1349 state->method->uses_slots = i;
1350 dict_destroy(state->vars);state->vars = 0;
1352 dict_destroy(xvars);
1359 /*if(state->method->uses_parent_function){
1360 syntaxerror("accessing variables of parent function from inner functions not supported yet");
1365 multiname_t*type2 = sig2mname(return_type);
1367 if(state->method->inner) {
1368 f = state->method->abc;
1369 abc_method_init(f, global->file, type2, 1);
1370 } else if(state->method->is_constructor) {
1371 f = abc_class_getconstructor(state->cls->abc, type2);
1372 } else if(!state->method->is_global) {
1373 namespace_t mname_ns = {state->method->info->access, ""};
1374 multiname_t mname = {QNAME, &mname_ns, 0, name};
1376 if(flags&FLAG_STATIC)
1377 f = abc_class_staticmethod(state->cls->abc, type2, &mname);
1379 f = abc_class_method(state->cls->abc, type2, &mname);
1380 slot = f->trait->slot_id;
1382 namespace_t mname_ns = {state->method->info->access, state->package};
1383 multiname_t mname = {QNAME, &mname_ns, 0, name};
1385 f = abc_method_new(global->file, type2, 1);
1386 trait_t*t = trait_new_method(&global->init->traits, multiname_clone(&mname), f);
1387 //abc_code_t*c = global->init->method->body->code;
1389 //flash doesn't seem to allow us to access function slots
1390 //state->method->info->slot = slot;
1392 if(flags&FLAG_OVERRIDE) f->trait->attributes |= TRAIT_ATTR_OVERRIDE;
1393 if(getset == KW_GET) f->trait->kind = TRAIT_GETTER;
1394 if(getset == KW_SET) f->trait->kind = TRAIT_SETTER;
1395 if(params->varargs) f->flags |= METHOD_NEED_REST;
1399 for(p=params->list;p;p=p->next) {
1400 if(params->varargs && !p->next) {
1401 break; //varargs: omit last parameter in function signature
1403 multiname_t*m = sig2mname(p->param->type);
1404 list_append(f->parameters, m);
1405 if(p->param->value) {
1406 check_constant_against_type(p->param->type, p->param->value);
1407 opt=1;list_append(f->optional_parameters, p->param->value);
1409 syntaxerror("non-optional parameter not allowed after optional parameters");
1412 if(state->method->slots) {
1413 DICT_ITERATE_ITEMS(state->method->slots, char*, name, variable_t*, v) {
1415 multiname_t*mname = multiname_new(namespace_new(ACCESS_PACKAGE, ""), name);
1416 multiname_t*type = sig2mname(v->type);
1417 trait_t*t = trait_new_member(&f->body->traits, type, mname, 0);
1418 t->slot_id = v->index;
1423 check_code_for_break(body);
1426 f->body->code = body;
1427 f->body->exceptions = state->method->exceptions;
1428 } else { //interface
1430 syntaxerror("interface methods can't have a method body");
1440 char is_subtype_of(classinfo_t*type, classinfo_t*supertype)
1445 void breakjumpsto(code_t*c, char*name, code_t*jump)
1448 if(c->opcode == OPCODE___BREAK__) {
1449 string_t*name2 = c->data[0];
1450 if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1451 c->opcode = OPCODE_JUMP;
1458 void continuejumpsto(code_t*c, char*name, code_t*jump)
1461 if(c->opcode == OPCODE___CONTINUE__) {
1462 string_t*name2 = c->data[0];
1463 if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1464 c->opcode = OPCODE_JUMP;
1472 #define IS_INT(a) (TYPE_IS_INT((a)) || TYPE_IS_UINT((a)))
1473 #define IS_NUMBER_OR_INT(a) (TYPE_IS_INT((a)) || TYPE_IS_UINT((a)) || TYPE_IS_NUMBER((a)))
1474 #define BOTH_INT(a,b) (IS_INT(a) && IS_INT(b))
1476 classinfo_t*join_types(classinfo_t*type1, classinfo_t*type2, char op)
1478 if(!type1 || !type2)
1479 return registry_getanytype();
1480 if(TYPE_IS_ANY(type1) || TYPE_IS_ANY(type2))
1481 return registry_getanytype();
1484 if(IS_NUMBER_OR_INT(type1) && IS_NUMBER_OR_INT(type2)) {
1493 return registry_getanytype();
1495 code_t*converttype(code_t*c, classinfo_t*from, classinfo_t*to)
1500 return abc_coerce_a(c);
1504 // cast an "any" type to a specific type. subject to
1505 // runtime exceptions
1506 return abc_coerce2(c, &m);
1509 if((TYPE_IS_NUMBER(from) || TYPE_IS_UINT(from) || TYPE_IS_INT(from)) &&
1510 (TYPE_IS_NUMBER(to) || TYPE_IS_UINT(to) || TYPE_IS_INT(to))) {
1511 // allow conversion between number types
1512 return abc_coerce2(c, &m);
1514 //printf("%s.%s\n", from.package, from.name);
1515 //printf("%s.%s\n", to.package, to.name);
1517 classinfo_t*supertype = from;
1519 if(supertype == to) {
1520 // target type is one of from's superclasses
1521 return abc_coerce2(c, &m);
1524 while(supertype->interfaces[t]) {
1525 if(supertype->interfaces[t]==to) {
1526 // target type is one of from's interfaces
1527 return abc_coerce2(c, &m);
1531 supertype = supertype->superclass;
1533 if(TYPE_IS_FUNCTION(from) && TYPE_IS_FUNCTION(to))
1535 if(TYPE_IS_CLASS(from) && TYPE_IS_CLASS(to))
1537 if(TYPE_IS_NULL(from) && !IS_NUMBER_OR_INT(to))
1540 as3_error("can't convert type %s%s%s to %s%s%s",
1541 from->package, from->package?".":"", from->name,
1542 to->package, to->package?".":"", to->name);
1546 code_t*defaultvalue(code_t*c, classinfo_t*type)
1548 if(TYPE_IS_INT(type)) {
1549 c = abc_pushbyte(c, 0);
1550 } else if(TYPE_IS_UINT(type)) {
1551 c = abc_pushuint(c, 0);
1552 } else if(TYPE_IS_FLOAT(type)) {
1554 } else if(TYPE_IS_BOOLEAN(type)) {
1555 c = abc_pushfalse(c);
1557 //c = abc_pushundefined(c);
1559 c = abc_pushnull(c);
1561 c = abc_coerce2(c, &m);
1566 char is_pushundefined(code_t*c)
1568 return (c && !c->prev && !c->next && c->opcode == OPCODE_PUSHUNDEFINED);
1571 static slotinfo_t* find_class(char*name)
1575 c = registry_find(state->package, name);
1578 /* try explicit imports */
1579 dictentry_t* e = dict_get_slot(state->imports, name);
1582 if(!strcmp(e->key, name)) {
1583 c = (slotinfo_t*)e->data;
1589 /* try package.* imports */
1590 import_list_t*l = state->wildcard_imports;
1592 //printf("does package %s contain a class %s?\n", l->import->package, name);
1593 c = registry_find(l->import->package, name);
1598 /* try global package */
1599 c = registry_find("", name);
1602 /* try local "filename" package */
1603 c = registry_find(internal_filename_package, name);
1609 static char is_getlocal(code_t*c)
1611 if(!c || c->prev || c->next)
1613 return(c->opcode == OPCODE_GETLOCAL
1614 || c->opcode == OPCODE_GETLOCAL_0
1615 || c->opcode == OPCODE_GETLOCAL_1
1616 || c->opcode == OPCODE_GETLOCAL_2
1617 || c->opcode == OPCODE_GETLOCAL_3);
1619 static int getlocalnr(code_t*c)
1621 if(c->opcode == OPCODE_GETLOCAL) {return (ptroff_t)c->data[0];}
1622 else if(c->opcode == OPCODE_GETLOCAL_0) {return 0;}
1623 else if(c->opcode == OPCODE_GETLOCAL_1) {return 1;}
1624 else if(c->opcode == OPCODE_GETLOCAL_2) {return 2;}
1625 else if(c->opcode == OPCODE_GETLOCAL_3) {return 3;}
1626 else syntaxerror("Internal error: opcode %02x is not a getlocal call", c->opcode);
1630 static code_t* toreadwrite(code_t*in, code_t*middlepart, char justassign, char readbefore)
1634 [prefix code] [read instruction]
1638 [prefix code] ([dup]) [read instruction] [middlepart] [setvar] [write instruction] [getvar]
1640 if(in && in->opcode == OPCODE_COERCE_A) {
1641 in = code_cutlast(in);
1644 syntaxerror("internal error");
1646 /* chop off read instruction */
1650 prefix = r->prev;r->prev = 0;
1656 char use_temp_var = readbefore;
1658 /* generate the write instruction, and maybe append a dup to the prefix code */
1659 code_t* write = abc_nop(0);
1660 if(r->opcode == OPCODE_GETPROPERTY) {
1661 write->opcode = OPCODE_SETPROPERTY;
1662 multiname_t*m = (multiname_t*)r->data[0];
1663 write->data[0] = multiname_clone(m);
1664 if(m->type == QNAME || m->type == MULTINAME) {
1666 prefix = abc_dup(prefix); // we need the object, too
1669 } else if(m->type == MULTINAMEL) {
1671 /* dupping two values on the stack requires 5 operations and one register-
1672 couldn't adobe just have given us a dup2? */
1673 int temp = gettempvar();
1674 prefix = abc_setlocal(prefix, temp);
1675 prefix = abc_dup(prefix);
1676 prefix = abc_getlocal(prefix, temp);
1677 prefix = abc_swap(prefix);
1678 prefix = abc_getlocal(prefix, temp);
1680 prefix = abc_kill(prefix, temp);
1684 syntaxerror("illegal lvalue: can't assign a value to this expression (not a qname/multiname)");
1686 } else if(r->opcode == OPCODE_GETSLOT) {
1687 write->opcode = OPCODE_SETSLOT;
1688 write->data[0] = r->data[0];
1690 prefix = abc_dup(prefix); // we need the object, too
1693 } else if(r->opcode == OPCODE_GETLOCAL) {
1694 write->opcode = OPCODE_SETLOCAL;
1695 write->data[0] = r->data[0];
1696 } else if(r->opcode == OPCODE_GETLOCAL_0) {
1697 write->opcode = OPCODE_SETLOCAL_0;
1698 } else if(r->opcode == OPCODE_GETLOCAL_1) {
1699 write->opcode = OPCODE_SETLOCAL_1;
1700 } else if(r->opcode == OPCODE_GETLOCAL_2) {
1701 write->opcode = OPCODE_SETLOCAL_2;
1702 } else if(r->opcode == OPCODE_GETLOCAL_3) {
1703 write->opcode = OPCODE_SETLOCAL_3;
1706 syntaxerror("illegal lvalue: can't assign a value to this expression");
1713 /* with getproperty/getslot, we have to be extra careful not
1714 to execute the read code twice, as it might have side-effects
1715 (e.g. if the property is in fact a setter/getter combination)
1717 So read the value, modify it, and write it again,
1718 using prefix only once and making sure (by using a temporary
1719 register) that the return value is what we just wrote */
1720 temp = gettempvar();
1721 c = code_append(c, prefix);
1722 c = code_append(c, r);
1725 c = abc_setlocal(c, temp);
1727 c = code_append(c, middlepart);
1730 c = abc_setlocal(c, temp);
1732 c = code_append(c, write);
1733 c = abc_getlocal(c, temp);
1734 c = abc_kill(c, temp);
1736 /* if we're allowed to execute the read code twice *and*
1737 the middlepart doesn't modify the code, things are easier.
1739 code_t* r2 = code_dup(r);
1740 //c = code_append(c, prefix);
1741 parserassert(!prefix);
1742 c = code_append(c, r);
1743 c = code_append(c, middlepart);
1744 c = code_append(c, write);
1745 c = code_append(c, r2);
1748 /* even smaller version: overwrite the value without reading
1752 c = code_append(c, prefix);
1755 c = code_append(c, middlepart);
1756 c = code_append(c, write);
1757 c = code_append(c, r);
1760 temp = gettempvar();
1762 c = code_append(c, prefix);
1764 c = code_append(c, middlepart);
1766 c = abc_setlocal(c, temp);
1767 c = code_append(c, write);
1768 c = abc_getlocal(c, temp);
1769 c = abc_kill(c, temp);
1775 char is_break_or_jump(code_t*c)
1779 if(c->opcode == OPCODE_JUMP ||
1780 c->opcode == OPCODE___BREAK__ ||
1781 c->opcode == OPCODE___CONTINUE__ ||
1782 c->opcode == OPCODE_THROW ||
1783 c->opcode == OPCODE_RETURNVOID ||
1784 c->opcode == OPCODE_RETURNVALUE) {
1791 #define IS_FINALLY_TARGET(op) \
1792 ((op) == OPCODE___CONTINUE__ || \
1793 (op) == OPCODE___BREAK__ || \
1794 (op) == OPCODE_RETURNVOID || \
1795 (op) == OPCODE_RETURNVALUE || \
1796 (op) == OPCODE___RETHROW__)
1798 static code_t* insert_finally_lookup(code_t*c, code_t*finally, int tempvar)
1800 #define NEED_EXTRA_STACK_ARG
1801 code_t*finally_label = abc_nop(0);
1802 NEW(lookupswitch_t, l);
1808 code_t*prev = i->prev;
1809 if(IS_FINALLY_TARGET(i->opcode)) {
1812 if(i->opcode == OPCODE___RETHROW__ ||
1813 i->opcode == OPCODE_RETURNVALUE) {
1814 if(i->opcode == OPCODE___RETHROW__)
1815 i->opcode = OPCODE_THROW;
1817 p = abc_coerce_a(p);
1818 p = abc_setlocal(p, tempvar);
1820 p = abc_pushbyte(p, count++);
1821 p = abc_jump(p, finally_label);
1822 code_t*target = p = abc_label(p);
1823 #ifdef NEED_EXTRA_STACK_ARG
1827 p = abc_getlocal(p, tempvar);
1830 p->next = i;i->prev = p;
1831 list_append(l->targets, target);
1837 c = abc_pushbyte(c, -1);
1838 c = code_append(c, finally_label);
1839 c = code_append(c, finally);
1841 #ifdef NEED_EXTRA_STACK_ARG
1844 c = abc_lookupswitch(c, l);
1845 c = l->def = abc_label(c);
1846 #ifdef NEED_EXTRA_STACK_ARG
1853 static code_t* insert_finally_simple(code_t*c, code_t*finally, int tempvar)
1857 code_t*prev = i->prev;
1858 if(IS_FINALLY_TARGET(i->opcode)) {
1859 if(i->opcode == OPCODE___RETHROW__)
1860 i->opcode = OPCODE_THROW;
1861 code_t*end = code_dup(finally);
1862 code_t*start = code_start(end);
1863 if(prev) prev->next = start;
1870 return code_append(c, finally);
1873 code_t* insert_finally(code_t*c, code_t*finally, int tempvar)
1879 int num_insertion_points=0;
1881 if(IS_FINALLY_TARGET(i->opcode))
1882 num_insertion_points++;
1889 if(i->branch || i->opcode == OPCODE_LOOKUPSWITCH) {
1894 int simple_version_cost = (1+num_insertion_points)*code_size;
1895 int lookup_version_cost = 4*num_insertion_points + 5;
1897 if(cantdup || simple_version_cost > lookup_version_cost) {
1898 printf("lookup %d > *%d*\n", simple_version_cost, lookup_version_cost);
1899 return insert_finally_lookup(c, finally, tempvar);
1901 printf("simple *%d* < %d\n", simple_version_cost, lookup_version_cost);
1902 return insert_finally_simple(c, finally, tempvar);
1906 #define PASS1 }} if(as3_pass == 1) {{
1907 #define PASS1END }} if(as3_pass == 2) {{
1908 #define PASS2 }} if(as3_pass == 2) {{
1909 #define PASS12 }} {{
1910 #define PASS12END }} if(as3_pass == 2) {{
1914 /* Line 273 of skeleton.m4 */
1915 #line 1916 "parser.tab.c"
1922 typedef YYTYPE_UINT8 yytype_uint8;
1924 typedef unsigned char yytype_uint8;
1928 typedef YYTYPE_INT8 yytype_int8;
1929 #elif (defined __STDC__ || defined __C99__FUNC__ \
1930 || defined __cplusplus || defined _MSC_VER)
1931 typedef signed char yytype_int8;
1933 typedef short int yytype_int8;
1936 #ifdef YYTYPE_UINT16
1937 typedef YYTYPE_UINT16 yytype_uint16;
1939 typedef unsigned short int yytype_uint16;
1943 typedef YYTYPE_INT16 yytype_int16;
1945 typedef short int yytype_int16;
1949 # ifdef __SIZE_TYPE__
1950 # define YYSIZE_T __SIZE_TYPE__
1951 # elif defined size_t
1952 # define YYSIZE_T size_t
1953 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
1954 || defined __cplusplus || defined _MSC_VER)
1955 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
1956 # define YYSIZE_T size_t
1958 # define YYSIZE_T unsigned int
1962 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
1967 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
1968 # define YY_(msgid) dgettext ("bison-runtime", msgid)
1972 # define YY_(msgid) msgid
1976 /* Suppress unused-variable warnings by "using" E. */
1977 #if ! defined lint || defined __GNUC__
1978 # define YYUSE(e) ((void) (e))
1980 # define YYUSE(e) /* empty */
1983 /* Identity function, used to suppress warnings about constant conditions. */
1985 # define YYID(n) (n)
1987 #if (defined __STDC__ || defined __C99__FUNC__ \
1988 || defined __cplusplus || defined _MSC_VER)
2001 #if ! defined yyoverflow || YYERROR_VERBOSE
2003 /* The parser invokes alloca or malloc; define the necessary symbols. */
2005 # ifdef YYSTACK_USE_ALLOCA
2006 # if YYSTACK_USE_ALLOCA
2008 # define YYSTACK_ALLOC __builtin_alloca
2009 # elif defined __BUILTIN_VA_ARG_INCR
2010 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
2012 # define YYSTACK_ALLOC __alloca
2013 # elif defined _MSC_VER
2014 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
2015 # define alloca _alloca
2017 # define YYSTACK_ALLOC alloca
2018 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
2019 || defined __cplusplus || defined _MSC_VER)
2020 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
2022 # define _STDLIB_H 1
2029 # ifdef YYSTACK_ALLOC
2030 /* Pacify GCC's `empty if-body' warning. */
2031 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
2032 # ifndef YYSTACK_ALLOC_MAXIMUM
2033 /* The OS might guarantee only one guard page at the bottom of the stack,
2034 and a page size can be as small as 4096 bytes. So we cannot safely
2035 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
2036 to allow for a few compiler-allocated temporary stack slots. */
2037 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
2040 # define YYSTACK_ALLOC YYMALLOC
2041 # define YYSTACK_FREE YYFREE
2042 # ifndef YYSTACK_ALLOC_MAXIMUM
2043 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
2045 # if (defined __cplusplus && ! defined _STDLIB_H \
2046 && ! ((defined YYMALLOC || defined malloc) \
2047 && (defined YYFREE || defined free)))
2048 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
2050 # define _STDLIB_H 1
2054 # define YYMALLOC malloc
2055 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
2056 || defined __cplusplus || defined _MSC_VER)
2057 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
2061 # define YYFREE free
2062 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
2063 || defined __cplusplus || defined _MSC_VER)
2064 void free (void *); /* INFRINGES ON USER NAME SPACE */
2068 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
2071 #if (! defined yyoverflow \
2072 && (! defined __cplusplus \
2073 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
2075 /* A type that is properly aligned for any stack member. */
2078 yytype_int16 yyss_alloc;
2082 /* The size of the maximum gap between one aligned stack and the next. */
2083 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
2085 /* The size of an array large to enough to hold all stacks, each with
2087 # define YYSTACK_BYTES(N) \
2088 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
2089 + YYSTACK_GAP_MAXIMUM)
2091 /* Copy COUNT objects from FROM to TO. The source and destination do
2094 # if defined __GNUC__ && 1 < __GNUC__
2095 # define YYCOPY(To, From, Count) \
2096 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
2098 # define YYCOPY(To, From, Count) \
2102 for (yyi = 0; yyi < (Count); yyi++) \
2103 (To)[yyi] = (From)[yyi]; \
2109 /* Relocate STACK from its old location to the new one. The
2110 local variables YYSIZE and YYSTACKSIZE give the old and new number of
2111 elements in the stack, and YYPTR gives the new location of the
2112 stack. Advance YYPTR to a properly aligned location for the next
2114 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
2117 YYSIZE_T yynewbytes; \
2118 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
2119 Stack = &yyptr->Stack_alloc; \
2120 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
2121 yyptr += yynewbytes / sizeof (*yyptr); \
2127 /* YYFINAL -- State number of the termination state. */
2129 /* YYLAST -- Last index in YYTABLE. */
2132 /* YYNTOKENS -- Number of terminals. */
2133 #define YYNTOKENS 134
2134 /* YYNNTS -- Number of nonterminals. */
2136 /* YYNRULES -- Number of rules. */
2137 #define YYNRULES 304
2138 /* YYNRULES -- Number of states. */
2139 #define YYNSTATES 514
2141 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
2142 #define YYUNDEFTOK 2
2143 #define YYMAXUTOK 363
2145 #define YYTRANSLATE(YYX) \
2146 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
2148 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
2149 static const yytype_uint8 yytranslate[] =
2151 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2152 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2153 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2154 2, 2, 2, 118, 2, 2, 2, 116, 108, 2,
2155 122, 133, 115, 113, 100, 112, 127, 114, 2, 2,
2156 2, 2, 2, 2, 2, 2, 2, 2, 105, 99,
2157 109, 102, 110, 104, 128, 2, 2, 2, 2, 2,
2158 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2159 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2160 2, 124, 2, 125, 107, 2, 2, 2, 2, 2,
2161 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2162 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2163 2, 2, 2, 126, 106, 132, 117, 2, 2, 2,
2164 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2165 2, 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, 2, 2, 2, 2, 2, 2, 2,
2169 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2170 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2171 2, 2, 2, 2, 2, 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, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2175 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2176 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
2177 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
2178 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
2179 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
2180 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
2181 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
2182 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
2183 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
2184 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
2185 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
2186 95, 96, 97, 98, 101, 103, 111, 119, 120, 121,
2191 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
2193 static const yytype_uint16 yyprhs[] =
2195 0, 0, 3, 5, 6, 8, 10, 13, 15, 17,
2196 19, 21, 23, 25, 30, 32, 33, 35, 37, 40,
2197 42, 44, 46, 48, 50, 55, 57, 59, 60, 63,
2198 65, 67, 69, 71, 73, 75, 77, 79, 81, 83,
2199 85, 87, 89, 93, 96, 98, 100, 102, 104, 106,
2200 108, 110, 115, 118, 120, 122, 126, 129, 130, 133,
2201 136, 138, 142, 146, 147, 150, 151, 159, 160, 162,
2202 164, 168, 170, 173, 177, 186, 193, 194, 201, 202,
2203 210, 212, 215, 217, 220, 221, 223, 225, 228, 230,
2204 233, 238, 242, 243, 252, 253, 263, 264, 270, 272,
2205 275, 277, 280, 282, 283, 290, 293, 295, 301, 303,
2206 305, 309, 311, 312, 319, 320, 326, 329, 334, 335,
2207 337, 339, 342, 344, 346, 348, 350, 352, 354, 356,
2208 358, 360, 362, 363, 366, 367, 370, 371, 374, 375,
2209 385, 386, 395, 396, 398, 400, 403, 405, 410, 412,
2210 414, 416, 417, 419, 421, 424, 426, 429, 438, 440,
2211 442, 443, 450, 451, 454, 456, 458, 460, 462, 464,
2212 466, 468, 470, 472, 473, 475, 478, 483, 487, 489,
2213 494, 497, 499, 501, 502, 503, 516, 518, 519, 520,
2214 531, 533, 537, 539, 541, 543, 547, 549, 551, 553,
2215 556, 557, 558, 562, 563, 565, 567, 569, 572, 575,
2216 576, 581, 586, 591, 594, 596, 599, 601, 603, 607,
2217 609, 611, 613, 615, 617, 619, 621, 623, 625, 627,
2218 629, 631, 633, 635, 637, 639, 641, 643, 647, 651,
2219 655, 659, 663, 667, 671, 675, 679, 683, 686, 689,
2220 693, 697, 701, 705, 709, 713, 717, 721, 725, 729,
2221 733, 737, 741, 745, 749, 754, 757, 759, 763, 766,
2222 771, 775, 776, 778, 782, 788, 792, 796, 800, 804,
2223 808, 812, 816, 820, 824, 828, 832, 836, 842, 845,
2224 848, 851, 854, 858, 861, 866, 872, 876, 882, 886,
2225 888, 891, 894, 899, 904
2228 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
2229 static const yytype_int16 yyrhs[] =
2231 135, 0, -1, 136, -1, -1, 137, -1, 138, -1,
2232 137, 138, -1, 185, -1, 197, -1, 195, -1, 214,
2233 -1, 206, -1, 147, -1, 148, 126, 136, 132, -1,
2234 99, -1, -1, 140, -1, 141, -1, 140, 141, -1,
2235 197, -1, 195, -1, 214, -1, 206, -1, 147, -1,
2236 148, 126, 139, 132, -1, 99, -1, 143, -1, -1,
2237 143, 145, -1, 145, -1, 188, -1, 159, -1, 160,
2238 -1, 161, -1, 163, -1, 171, -1, 154, -1, 182,
2239 -1, 179, -1, 236, -1, 244, -1, 243, -1, 126,
2240 143, 132, -1, 126, 132, -1, 99, -1, 144, -1,
2241 150, -1, 165, -1, 166, -1, 233, -1, 181, -1,
2242 148, 126, 143, 132, -1, 145, 99, -1, 145, -1,
2243 144, -1, 3, 89, 3, -1, 102, 234, -1, -1,
2244 46, 151, -1, 32, 151, -1, 152, -1, 151, 100,
2245 152, -1, 3, 224, 149, -1, -1, 65, 146, -1,
2246 -1, 64, 122, 155, 235, 133, 146, 153, -1, -1,
2247 150, -1, 236, -1, 46, 3, 224, -1, 3, -1,
2248 13, 122, -1, 13, 50, 122, -1, 158, 156, 99,
2249 235, 99, 236, 133, 146, -1, 158, 157, 68, 235,
2250 133, 146, -1, -1, 14, 122, 162, 235, 133, 146,
2251 -1, -1, 15, 164, 146, 14, 122, 235, 133, -1,
2252 66, -1, 66, 3, -1, 30, -1, 30, 3, -1,
2253 -1, 168, -1, 170, -1, 168, 170, -1, 169, -1,
2254 168, 169, -1, 34, 237, 105, 142, -1, 62, 105,
2255 142, -1, -1, 16, 122, 172, 237, 133, 126, 167,
2256 132, -1, -1, 33, 122, 3, 224, 133, 174, 126,
2257 142, 132, -1, -1, 28, 126, 176, 142, 132, -1,
2258 173, -1, 177, 173, -1, 177, -1, 177, 175, -1,
2259 175, -1, -1, 52, 126, 180, 142, 132, 178, -1,
2260 37, 235, -1, 37, -1, 39, 122, 235, 133, 146,
2261 -1, 3, -1, 19, -1, 184, 127, 183, -1, 183,
2262 -1, -1, 19, 184, 126, 186, 139, 132, -1, -1,
2263 19, 126, 187, 139, 132, -1, 41, 220, -1, 41,
2264 184, 127, 115, -1, -1, 190, -1, 191, -1, 190,
2265 191, -1, 21, -1, 22, -1, 20, -1, 38, -1,
2266 47, -1, 49, -1, 48, -1, 26, -1, 24, -1,
2267 4, -1, -1, 54, 221, -1, -1, 54, 222, -1,
2268 -1, 17, 222, -1, -1, 189, 31, 3, 192, 194,
2269 126, 196, 199, 132, -1, -1, 189, 44, 3, 193,
2270 126, 198, 202, 132, -1, -1, 200, -1, 201, -1,
2271 200, 201, -1, 99, -1, 148, 126, 199, 132, -1,
2272 206, -1, 214, -1, 144, -1, -1, 203, -1, 204,
2273 -1, 203, 204, -1, 99, -1, 46, 3, -1, 189,
2274 27, 213, 3, 122, 210, 133, 224, -1, 46, -1,
2275 32, -1, -1, 189, 205, 3, 207, 224, 149, -1,
2276 -1, 102, 209, -1, 10, -1, 8, -1, 9, -1,
2277 12, -1, 5, -1, 56, -1, 55, -1, 45, -1,
2278 3, -1, -1, 211, -1, 93, 212, -1, 211, 100,
2279 93, 212, -1, 211, 100, 212, -1, 212, -1, 3,
2280 105, 223, 208, -1, 3, 208, -1, 51, -1, 35,
2281 -1, -1, -1, 189, 27, 213, 3, 122, 210, 133,
2282 224, 126, 215, 142, 132, -1, 3, -1, -1, -1,
2283 27, 216, 122, 210, 133, 224, 126, 218, 142, 132,
2284 -1, 3, -1, 184, 127, 3, -1, 220, -1, 219,
2285 -1, 221, -1, 222, 100, 221, -1, 221, -1, 115,
2286 -1, 36, -1, 105, 223, -1, -1, -1, 122, 226,
2287 133, -1, -1, 227, -1, 228, -1, 234, -1, 227,
2288 100, -1, 228, 234, -1, -1, 25, 237, 229, 225,
2289 -1, 237, 122, 226, 133, -1, 53, 122, 226, 133,
2290 -1, 63, 237, -1, 42, -1, 42, 235, -1, 237,
2291 -1, 237, -1, 235, 100, 237, -1, 235, -1, 217,
2292 -1, 238, -1, 241, -1, 230, -1, 232, -1, 231,
2293 -1, 6, -1, 10, -1, 11, -1, 8, -1, 9,
2294 -1, 12, -1, 5, -1, 29, -1, 56, -1, 55,
2295 -1, 45, -1, 237, 109, 237, -1, 237, 110, 237,
2296 -1, 237, 75, 237, -1, 237, 76, 237, -1, 237,
2297 71, 237, -1, 237, 72, 237, -1, 237, 74, 237,
2298 -1, 237, 73, 237, -1, 237, 87, 237, -1, 237,
2299 88, 237, -1, 118, 237, -1, 117, 237, -1, 237,
2300 108, 237, -1, 237, 107, 237, -1, 237, 106, 237,
2301 -1, 237, 96, 237, -1, 237, 95, 237, -1, 237,
2302 94, 237, -1, 237, 114, 237, -1, 237, 116, 237,
2303 -1, 237, 113, 237, -1, 237, 112, 237, -1, 237,
2304 115, 237, -1, 237, 68, 237, -1, 237, 69, 237,
2305 -1, 237, 40, 237, -1, 237, 67, 237, -1, 43,
2306 122, 237, 133, -1, 36, 237, -1, 36, -1, 122,
2307 235, 133, -1, 112, 237, -1, 237, 124, 237, 125,
2308 -1, 124, 226, 125, -1, -1, 240, -1, 234, 105,
2309 234, -1, 240, 100, 234, 105, 234, -1, 70, 239,
2310 132, -1, 237, 80, 237, -1, 237, 79, 237, -1,
2311 237, 85, 237, -1, 237, 84, 237, -1, 237, 86,
2312 237, -1, 237, 78, 237, -1, 237, 77, 237, -1,
2313 237, 83, 237, -1, 237, 81, 237, -1, 237, 82,
2314 237, -1, 237, 102, 237, -1, 237, 104, 237, 105,
2315 237, -1, 237, 91, -1, 237, 90, -1, 91, 237,
2316 -1, 90, 237, -1, 53, 127, 3, -1, 128, 3,
2317 -1, 237, 127, 128, 3, -1, 237, 127, 3, 89,
2318 3, -1, 237, 92, 3, -1, 237, 127, 122, 237,
2319 133, -1, 237, 127, 3, -1, 3, -1, 18, 3,
2320 -1, 189, 242, -1, 189, 242, 102, 3, -1, 189,
2321 242, 102, 5, -1, 23, 220, -1
2324 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
2325 static const yytype_uint16 yyrline[] =
2327 0, 1893, 1893, 1895, 1895, 1896, 1897, 1899, 1900, 1901,
2328 1902, 1903, 1904, 1905, 1906, 1908, 1908, 1909, 1910, 1912,
2329 1913, 1914, 1915, 1916, 1917, 1918, 1920, 1921, 1923, 1924,
2330 1927, 1928, 1929, 1930, 1931, 1932, 1933, 1934, 1935, 1936,
2331 1937, 1938, 1939, 1940, 1943, 1944, 1945, 1946, 1947, 1948,
2332 1949, 1950, 1954, 1955, 1959, 1966, 1970, 1971, 1975, 1976,
2333 1978, 1979, 1981, 2042, 2043, 2046, 2046, 2065, 2066, 2067,
2334 2072, 2076, 2081, 2082, 2084, 2104, 2148, 2148, 2167, 2167,
2335 2182, 2185, 2188, 2191, 2195, 2196, 2197, 2198, 2199, 2200,
2336 2202, 2213, 2216, 2216, 2245, 2245, 2269, 2269, 2285, 2286,
2337 2287, 2288, 2296, 2305, 2305, 2350, 2354, 2365, 2374, 2375,
2338 2377, 2378, 2380, 2380, 2382, 2382, 2385, 2400, 2416, 2417,
2339 2418, 2419, 2427, 2428, 2429, 2430, 2431, 2432, 2433, 2434,
2340 2435, 2436, 2440, 2441, 2443, 2444, 2446, 2447, 2451, 2449,
2341 2457, 2455, 2464, 2465, 2466, 2467, 2468, 2469, 2470, 2471,
2342 2473, 2479, 2480, 2481, 2482, 2483, 2484, 2487, 2500, 2500,
2343 2502, 2502, 2577, 2578, 2580, 2581, 2582, 2583, 2584, 2586,
2344 2587, 2588, 2589, 2598, 2602, 2608, 2614, 2622, 2627, 2633,
2345 2641, 2649, 2650, 2651, 2654, 2653, 2670, 2671, 2673, 2672,
2346 2696, 2707, 2720, 2721, 2723, 2724, 2726, 2727, 2728, 2737,
2347 2738, 2742, 2743, 2745, 2746, 2747, 2749, 2753, 2754, 2759,
2348 2760, 2796, 2842, 2863, 2884, 2887, 2894, 2895, 2896, 2902,
2349 2908, 2910, 2912, 2914, 2916, 2918, 2920, 2937, 2942, 2945,
2350 2948, 2951, 2954, 2957, 2960, 2963, 2966, 2970, 2973, 2976,
2351 2979, 2982, 2985, 2988, 2991, 2995, 3006, 3024, 3029, 3034,
2352 3039, 3044, 3049, 3053, 3057, 3062, 3066, 3070, 3079, 3088,
2353 3098, 3103, 3115, 3121, 3126, 3132, 3138, 3142, 3144, 3155,
2354 3164, 3171, 3172, 3174, 3180, 3189, 3196, 3208, 3214, 3220,
2355 3226, 3232, 3238, 3244, 3250, 3263, 3274, 3281, 3294, 3321,
2356 3335, 3349, 3363, 3378, 3385, 3392, 3399, 3406, 3417, 3451,
2357 3572, 3578, 3581, 3584, 3587
2361 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
2362 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
2363 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
2364 static const char *const yytname[] =
2366 "$end", "error", "$undefined", "T_IDENTIFIER", "T_NAMESPACE",
2367 "T_STRING", "T_REGEXP", "T_EMPTY", "T_INT", "T_UINT", "T_BYTE",
2368 "T_SHORT", "T_FLOAT", "\"for\"", "\"while\"", "\"do\"", "\"switch\"",
2369 "\"implements\"", "\"namespace\"", "\"package\"", "\"protected\"",
2370 "\"public\"", "\"private\"", "\"use\"", "\"internal\"", "\"new\"",
2371 "\"native\"", "\"function\"", "\"finally\"", "\"undefined\"",
2372 "\"continue\"", "\"class\"", "\"const\"", "\"catch\"", "\"case\"",
2373 "\"set\"", "\"void\"", "\"throw\"", "\"static\"", "\"with\"",
2374 "\"instanceof\"", "\"import\"", "\"return\"", "\"typeof\"",
2375 "\"interface\"", "\"null\"", "\"var\"", "\"dynamic\"", "\"override\"",
2376 "\"final\"", "\"each\"", "\"get\"", "\"try\"", "\"super\"",
2377 "\"extends\"", "\"false\"", "\"true\"", "\"Boolean\"", "\"uint\"",
2378 "\"int\"", "\"Number\"", "\"String\"", "\"default\"", "\"delete\"",
2379 "\"if\"", "\"else\"", "\"break\"", "\"is\"", "\"in\"", "\"as\"",
2380 "\"{ (dictionary)\"", "\"==\"", "\"===\"", "\"!=\"", "\"!==\"", "\"<=\"",
2381 "\">=\"", "\"|=\"", "\"/=\"", "\"%=\"", "\"*=\"", "\"+=\"", "\"-=\"",
2382 "\"^=\"", "\">>=\"", "\"<<=\"", "\">>>=\"", "\"||\"", "\"&&\"", "\"::\"",
2383 "\"--\"", "\"++\"", "\"..\"", "\"...\"", "\"<<\"", "\">>>\"", "\">>\"",
2384 "prec_none", "below_semicolon", "';'", "','", "below_assignment", "'='",
2385 "\"&=\"", "'?'", "':'", "'|'", "'^'", "'&'", "'<'", "'>'", "below_minus",
2386 "'-'", "'+'", "'/'", "'*'", "'%'", "'~'", "'!'", "minusminus_prefix",
2387 "plusplus_prefix", "below_curly", "'('", "new2", "'['", "']'", "'{'",
2388 "'.'", "'@'", "above_identifier", "below_else", "above_function", "'}'",
2389 "')'", "$accept", "PROGRAM", "MAYBE_PROGRAM_CODE_LIST",
2390 "PROGRAM_CODE_LIST", "PROGRAM_CODE", "MAYBE_INPACKAGE_CODE_LIST",
2391 "INPACKAGE_CODE_LIST", "INPACKAGE_CODE", "MAYBECODE", "CODE",
2392 "CODE_STATEMENT", "CODEPIECE", "CODEBLOCK", "PACKAGE_INITCODE",
2393 "CONDITIONAL_COMPILATION", "MAYBEEXPRESSION", "VARIABLE_DECLARATION",
2394 "VARIABLE_LIST", "ONE_VARIABLE", "MAYBEELSE", "IF", "$@1", "FOR_INIT",
2395 "FOR_IN_INIT", "FOR_START", "FOR", "FOR_IN", "WHILE", "$@2", "DO_WHILE",
2396 "$@3", "BREAK", "CONTINUE", "MAYBE_CASE_LIST", "CASE_LIST", "CASE",
2397 "DEFAULT", "SWITCH", "$@4", "CATCH", "$@5", "FINALLY", "$@6",
2398 "CATCH_LIST", "CATCH_FINALLY_LIST", "TRY", "$@7", "THROW", "WITH",
2399 "X_IDENTIFIER", "PACKAGE", "PACKAGE_DECLARATION", "$@8", "$@9", "IMPORT",
2400 "MAYBE_MODIFIERS", "MODIFIER_LIST", "MODIFIER", "EXTENDS",
2401 "EXTENDS_LIST", "IMPLEMENTS_LIST", "CLASS_DECLARATION", "$@10",
2402 "INTERFACE_DECLARATION", "$@11", "MAYBE_CLASS_BODY", "CLASS_BODY",
2403 "CLASS_BODY_ITEM", "MAYBE_INTERFACE_BODY", "INTERFACE_BODY",
2404 "IDECLARATION", "VARCONST", "SLOT_DECLARATION", "$@12",
2405 "MAYBESTATICCONSTANT", "STATICCONSTANT", "MAYBE_PARAM_LIST",
2406 "PARAM_LIST", "PARAM", "GETSET", "FUNCTION_DECLARATION", "$@13",
2407 "MAYBE_IDENTIFIER", "INNERFUNCTION", "$@14", "CLASS", "PACKAGEANDCLASS",
2408 "CLASS_SPEC", "CLASS_SPEC_LIST", "TYPE", "MAYBETYPE",
2409 "MAYBE_PARAM_VALUES", "MAYBE_EXPRESSION_LIST", "EXPRESSION_LIST",
2410 "EXPRESSION_LIST_AND_COMMA", "XX", "NEW", "FUNCTIONCALL", "DELETE",
2411 "RETURN", "NONCOMMAEXPRESSION", "EXPRESSION", "VOIDEXPRESSION", "E",
2412 "CONSTANT", "MAYBE_EXPRPAIR_LIST", "EXPRPAIR_LIST", "VAR_READ",
2413 "NAMESPACE_ID", "NAMESPACE_DECLARATION", "USE_NAMESPACE", 0
2418 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
2420 static const yytype_uint16 yytoknum[] =
2422 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
2423 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
2424 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
2425 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
2426 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
2427 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
2428 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
2429 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
2430 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
2431 345, 346, 347, 348, 349, 350, 351, 352, 353, 59,
2432 44, 354, 61, 355, 63, 58, 124, 94, 38, 60,
2433 62, 356, 45, 43, 47, 42, 37, 126, 33, 357,
2434 358, 359, 40, 360, 91, 93, 123, 46, 64, 361,
2439 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
2440 static const yytype_uint8 yyr1[] =
2442 0, 134, 135, 136, 136, 137, 137, 138, 138, 138,
2443 138, 138, 138, 138, 138, 139, 139, 140, 140, 141,
2444 141, 141, 141, 141, 141, 141, 142, 142, 143, 143,
2445 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
2446 144, 144, 144, 144, 145, 145, 145, 145, 145, 145,
2447 145, 145, 146, 146, 147, 148, 149, 149, 150, 150,
2448 151, 151, 152, 153, 153, 155, 154, 156, 156, 156,
2449 157, 157, 158, 158, 159, 160, 162, 161, 164, 163,
2450 165, 165, 166, 166, 167, 167, 167, 167, 168, 168,
2451 169, 170, 172, 171, 174, 173, 176, 175, 177, 177,
2452 178, 178, 178, 180, 179, 181, 181, 182, 183, 183,
2453 184, 184, 186, 185, 187, 185, 188, 188, 189, 189,
2454 190, 190, 191, 191, 191, 191, 191, 191, 191, 191,
2455 191, 191, 192, 192, 193, 193, 194, 194, 196, 195,
2456 198, 197, 199, 199, 200, 200, 201, 201, 201, 201,
2457 201, 202, 202, 203, 203, 204, 204, 204, 205, 205,
2458 207, 206, 208, 208, 209, 209, 209, 209, 209, 209,
2459 209, 209, 209, 210, 210, 210, 210, 211, 211, 212,
2460 212, 213, 213, 213, 215, 214, 216, 216, 218, 217,
2461 219, 220, 221, 221, 222, 222, 223, 223, 223, 224,
2462 224, 225, 225, 226, 226, 226, 227, 228, 227, 229,
2463 230, 231, 231, 232, 233, 233, 234, 235, 235, 236,
2464 237, 237, 237, 237, 237, 237, 237, 238, 238, 238,
2465 238, 238, 238, 238, 238, 238, 238, 237, 237, 237,
2466 237, 237, 237, 237, 237, 237, 237, 237, 237, 237,
2467 237, 237, 237, 237, 237, 237, 237, 237, 237, 237,
2468 237, 237, 237, 237, 237, 237, 237, 237, 237, 237,
2469 237, 239, 239, 240, 240, 237, 237, 237, 237, 237,
2470 237, 237, 237, 237, 237, 237, 237, 237, 237, 237,
2471 237, 237, 237, 237, 237, 237, 237, 237, 237, 241,
2472 242, 243, 243, 243, 244
2475 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
2476 static const yytype_uint8 yyr2[] =
2478 0, 2, 1, 0, 1, 1, 2, 1, 1, 1,
2479 1, 1, 1, 4, 1, 0, 1, 1, 2, 1,
2480 1, 1, 1, 1, 4, 1, 1, 0, 2, 1,
2481 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2482 1, 1, 3, 2, 1, 1, 1, 1, 1, 1,
2483 1, 4, 2, 1, 1, 3, 2, 0, 2, 2,
2484 1, 3, 3, 0, 2, 0, 7, 0, 1, 1,
2485 3, 1, 2, 3, 8, 6, 0, 6, 0, 7,
2486 1, 2, 1, 2, 0, 1, 1, 2, 1, 2,
2487 4, 3, 0, 8, 0, 9, 0, 5, 1, 2,
2488 1, 2, 1, 0, 6, 2, 1, 5, 1, 1,
2489 3, 1, 0, 6, 0, 5, 2, 4, 0, 1,
2490 1, 2, 1, 1, 1, 1, 1, 1, 1, 1,
2491 1, 1, 0, 2, 0, 2, 0, 2, 0, 9,
2492 0, 8, 0, 1, 1, 2, 1, 4, 1, 1,
2493 1, 0, 1, 1, 2, 1, 2, 8, 1, 1,
2494 0, 6, 0, 2, 1, 1, 1, 1, 1, 1,
2495 1, 1, 1, 0, 1, 2, 4, 3, 1, 4,
2496 2, 1, 1, 0, 0, 12, 1, 0, 0, 10,
2497 1, 3, 1, 1, 1, 3, 1, 1, 1, 2,
2498 0, 0, 3, 0, 1, 1, 1, 2, 2, 0,
2499 4, 4, 4, 2, 1, 2, 1, 1, 3, 1,
2500 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2501 1, 1, 1, 1, 1, 1, 1, 3, 3, 3,
2502 3, 3, 3, 3, 3, 3, 3, 2, 2, 3,
2503 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
2504 3, 3, 3, 3, 4, 2, 1, 3, 2, 4,
2505 3, 0, 1, 3, 5, 3, 3, 3, 3, 3,
2506 3, 3, 3, 3, 3, 3, 3, 5, 2, 2,
2507 2, 2, 3, 2, 4, 5, 3, 5, 3, 1,
2511 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
2512 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
2513 means the default is an error. */
2514 static const yytype_uint16 yydefact[] =
2516 118, 299, 131, 232, 226, 229, 230, 227, 228, 231,
2517 0, 0, 78, 0, 0, 124, 122, 123, 0, 130,
2518 0, 129, 187, 233, 266, 125, 0, 0, 0, 236,
2519 126, 128, 127, 0, 0, 235, 234, 0, 0, 271,
2520 0, 0, 14, 0, 0, 0, 0, 203, 118, 0,
2521 0, 2, 118, 5, 54, 12, 0, 36, 67, 31,
2522 32, 33, 34, 35, 38, 37, 7, 30, 0, 119,
2523 120, 9, 8, 11, 10, 220, 223, 225, 224, 219,
2524 39, 217, 221, 222, 41, 40, 0, 0, 72, 76,
2525 118, 92, 108, 109, 114, 111, 0, 0, 304, 299,
2526 209, 186, 0, 265, 0, 0, 116, 0, 103, 203,
2527 0, 213, 65, 0, 216, 0, 272, 291, 290, 268,
2528 248, 247, 0, 0, 204, 205, 206, 82, 0, 106,
2529 214, 0, 80, 44, 43, 118, 45, 29, 0, 46,
2530 47, 48, 50, 0, 49, 293, 1, 6, 118, 299,
2531 0, 68, 0, 0, 69, 0, 183, 0, 159, 0,
2532 158, 0, 301, 121, 0, 0, 0, 0, 0, 0,
2533 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2534 0, 0, 0, 0, 0, 0, 0, 289, 288, 0,
2535 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2536 0, 0, 0, 0, 0, 203, 0, 0, 55, 73,
2537 0, 53, 0, 0, 118, 112, 0, 0, 201, 173,
2538 0, 0, 0, 27, 0, 292, 0, 0, 275, 0,
2539 267, 270, 207, 208, 83, 200, 59, 60, 105, 215,
2540 58, 81, 42, 28, 118, 0, 200, 0, 0, 300,
2541 182, 181, 0, 132, 134, 160, 0, 218, 262, 263,
2542 260, 261, 241, 242, 244, 243, 239, 240, 282, 281,
2543 277, 276, 284, 285, 283, 279, 278, 280, 245, 246,
2544 296, 254, 253, 252, 286, 0, 251, 250, 249, 237,
2545 238, 258, 257, 255, 259, 256, 0, 0, 298, 0,
2546 0, 0, 52, 0, 0, 25, 0, 118, 17, 23,
2547 0, 20, 19, 22, 21, 118, 110, 191, 203, 210,
2548 162, 0, 0, 174, 178, 118, 117, 264, 0, 26,
2549 212, 0, 273, 0, 0, 57, 0, 118, 13, 57,
2550 0, 0, 0, 0, 136, 0, 0, 200, 302, 303,
2551 0, 211, 269, 0, 0, 294, 118, 0, 0, 115,
2552 18, 118, 0, 0, 0, 0, 180, 175, 200, 0,
2553 107, 0, 118, 0, 190, 198, 197, 193, 192, 196,
2554 199, 0, 62, 61, 51, 0, 118, 173, 133, 0,
2555 0, 194, 135, 140, 57, 287, 295, 297, 77, 0,
2556 84, 0, 113, 202, 172, 168, 165, 166, 164, 167,
2557 171, 170, 169, 163, 162, 0, 0, 177, 0, 0,
2558 98, 102, 100, 104, 63, 274, 56, 0, 75, 0,
2559 137, 138, 0, 118, 161, 79, 0, 0, 0, 85,
2560 88, 86, 24, 179, 188, 176, 96, 0, 99, 101,
2561 118, 66, 118, 200, 118, 195, 0, 155, 0, 0,
2562 118, 153, 0, 27, 93, 89, 87, 27, 27, 200,
2563 64, 74, 0, 146, 150, 0, 0, 0, 118, 144,
2564 148, 149, 156, 183, 141, 154, 27, 91, 0, 0,
2565 0, 184, 118, 139, 145, 0, 90, 189, 97, 94,
2566 27, 0, 0, 0, 0, 147, 173, 27, 185, 0,
2570 /* YYDEFGOTO[NTERM-NUM]. */
2571 static const yytype_int16 yydefgoto[] =
2573 -1, 50, 51, 52, 53, 306, 307, 308, 328, 329,
2574 136, 137, 212, 309, 138, 382, 139, 240, 237, 451,
2575 57, 226, 152, 153, 58, 59, 60, 61, 210, 62,
2576 90, 140, 141, 438, 439, 440, 441, 63, 213, 420,
2577 503, 421, 468, 422, 423, 64, 223, 142, 65, 95,
2578 97, 66, 315, 214, 67, 143, 69, 70, 344, 346,
2579 390, 311, 454, 312, 433, 477, 478, 479, 459, 460,
2580 461, 161, 313, 347, 366, 413, 322, 323, 324, 252,
2581 314, 500, 102, 75, 467, 377, 378, 379, 392, 380,
2582 335, 319, 123, 124, 125, 218, 76, 77, 78, 144,
2583 126, 79, 80, 81, 82, 115, 116, 83, 162, 84,
2587 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
2589 #define YYPACT_NINF -426
2590 static const yytype_int16 yypact[] =
2592 1667, -42, -426, -426, -426, -426, -426, -426, -426, -426,
2593 -37, -73, -426, -27, 11, -426, -426, -426, 71, -426,
2594 2087, -426, 78, -426, 2157, -426, 9, 71, 17, -426,
2595 -426, -426, -426, -2, -4, -426, -426, 2087, 25, 2087,
2596 2087, 2087, -426, 2087, 2087, 2087, 2087, 2087, 627, 138,
2597 143, -426, 497, -426, -426, -426, 27, -426, 2017, -426,
2598 -426, -426, -426, -426, -426, -426, -426, -426, 417, 216,
2599 -426, -426, -426, -426, -426, -426, -426, -426, -426, 55,
2600 -426, 2499, -426, -426, -426, -426, 197, 82, -426, -426,
2601 1919, -426, -426, -426, -426, -426, 19, 75, -426, -426,
2602 -51, -426, 85, -20, 2087, 84, -426, 2087, -426, 2087,
2603 209, -20, -426, 117, 2499, 91, 113, -20, -20, 361,
2604 -20, -20, -56, 99, 126, 2087, -426, 224, 225, 2087,
2605 2087, 225, 226, -426, -426, 757, -426, -426, 104, -426,
2606 -426, -426, -426, 214, -426, -426, -426, -426, 1017, 163,
2607 231, -426, 136, 175, -426, 241, 45, 245, -426, 246,
2608 -426, 247, 149, -426, 2087, 2087, 2087, 2087, 2087, 2087,
2609 2087, 2087, 2087, 2087, 2087, 2087, 2087, 2087, 2087, 2087,
2610 2087, 2087, 2087, 2087, 2087, 2087, 2087, -426, -426, 249,
2611 2087, 2087, 2087, 2087, 2087, 2087, 2087, 2087, 2087, 2087,
2612 2087, 2087, 2087, 2087, 2087, 2087, 2087, 5, -426, -426,
2613 2087, 159, 248, 2087, 1147, -426, 71, 81, 144, 16,
2614 -54, 15, 307, 1793, 127, -426, 2087, 2087, -426, 2087,
2615 -426, -426, -426, -426, -426, 162, 168, -426, 55, 55,
2616 168, -426, -426, -426, 1919, 137, 162, 2087, 2087, -426,
2617 -426, -426, 267, 217, 220, -426, 23, 2499, 1009, 489,
2618 489, 489, 2865, 2865, 2865, 2865, 1009, 1009, 2499, 2499,
2619 2499, 2499, 2499, 2499, 2499, 2499, 2499, 2499, 2560, 2621,
2620 -426, 213, 213, 213, 2499, 2316, 2682, 2743, 2804, 1009,
2621 1009, 361, 361, -20, -20, -20, 145, 2377, 187, 2087,
2622 276, -50, -426, 158, 2182, -426, 153, 1277, -426, -426,
2623 160, -426, -426, -426, -426, 1147, -426, 165, 2087, -426,
2624 -36, 284, 156, 190, -426, 1919, -426, -426, 164, 1793,
2625 -426, -35, -426, 193, 21, 198, 225, 887, -426, -43,
2626 80, -14, 179, 103, 289, 103, 186, 162, -426, -426,
2627 2087, -426, -426, 310, 2253, -426, 1919, 2087, 188, -426,
2628 -426, 1147, 191, 185, 459, 21, -426, -426, 162, 20,
2629 -426, -6, 1919, 2087, 165, -426, -426, -426, -426, -426,
2630 -426, 2087, -426, -426, -426, 2087, 1919, 16, -426, 103,
2631 204, -426, 233, -426, 198, 2499, -426, -426, -426, -13,
2632 29, 192, -426, -426, -426, -426, -426, -426, -426, -426,
2633 -426, -426, -426, -426, 229, 210, 284, -426, 212, 219,
2634 -426, -426, -6, -426, 274, -426, -426, 211, -426, 215,
2635 233, -426, 103, 235, -426, -426, 2087, 238, 218, 29,
2636 -426, -426, -426, -426, -426, -426, -426, 343, -426, -426,
2637 1919, -426, 1919, 162, 1407, -426, 346, -426, 324, 222,
2638 273, -426, 2438, 1793, -426, -426, -426, 1793, 1793, 162,
2639 -426, -426, 232, -426, -426, 234, 108, 223, 1537, -426,
2640 -426, -426, -426, 45, -426, -426, 1793, -426, 227, 237,
2641 244, -426, 1407, -426, -426, 349, -426, -426, -426, -426,
2642 1793, 239, 242, 270, 268, -426, 16, 1793, -426, 271,
2643 275, 162, -426, -426
2646 /* YYPGOTO[NTERM-NUM]. */
2647 static const yytype_int16 yypgoto[] =
2649 -426, -426, 258, -426, 305, -294, -426, 63, -425, -41,
2650 1, -84, -308, 58, 2, 14, 352, 290, 76, -426,
2651 -426, -426, -426, -426, -426, -426, -426, -426, -426, -426,
2652 -426, -426, -426, -426, -426, -15, -12, -426, -426, 8,
2653 -426, 10, -426, -426, -426, -426, -426, -426, -426, -128,
2654 94, -426, -426, -426, -426, 0, -426, 356, -426, -426,
2655 -426, 60, -426, 62, -426, -66, -426, -40, -426, -426,
2656 -24, -426, 3, -426, 28, -426, -372, -426, -301, -46,
2657 4, -426, -426, -426, -426, -426, 98, -251, 50, 100,
2658 -236, -426, -100, -426, -426, -426, -426, -426, -426, -426,
2659 -28, -1, -53, -8, -426, -426, -426, -426, -426, -426,
2663 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
2664 positive, shift that token. If negative, reduce the rule which
2665 number is the opposite. If zero, do what YYDEFACT says.
2666 If YYTABLE_NINF, syntax error. */
2667 #define YYTABLE_NINF -153
2668 static const yytype_int16 yytable[] =
2670 68, 54, 56, 73, 74, 154, 211, 135, 298, 224,
2671 339, 113, 100, 87, 92, 429, 103, 370, 317, 320,
2672 367, 362, 418, 320, 374, -70, 348, 419, 349, 111,
2673 93, 114, 117, 118, 93, 119, 120, 121, 487, 114,
2674 93, 189, 488, 489, 164, 122, 164, 86, 398, 89,
2675 164, 243, 68, 54, 56, 73, 74, 375, 55, 381,
2676 71, 496, 72, 436, 424, 164, 364, 401, 417, 365,
2677 187, 188, 189, 206, 92, 504, 207, 230, 428, 325,
2678 250, 101, 510, 356, 317, 88, 164, 164, 316, 316,
2679 93, 437, 388, 316, 391, 91, 251, 233, 372, 222,
2680 93, 114, 205, 220, 206, 296, 374, 207, 96, 321,
2681 55, 394, 71, 416, 72, 445, 98, 114, 109, 386,
2682 435, 105, 93, 110, 108, 106, 155, 299, 238, 239,
2683 326, 104, 415, 300, 509, 156, 376, 94, 391, 107,
2684 158, 145, 470, 146, 471, 215, 216, 112, 68, 54,
2685 56, 73, 74, 148, 160, 164, 257, 258, 259, 260,
2686 261, 262, 263, 264, 265, 266, 267, 268, 269, 270,
2687 271, 272, 273, 274, 275, 276, 277, 278, 279, 385,
2688 164, 455, 281, 282, 283, 284, 285, 286, 287, 288,
2689 289, 290, 291, 292, 293, 294, 295, 114, 297, 332,
2690 208, 333, 217, 337, 209, 304, 55, 219, 71, 301,
2691 72, 221, 225, 229, 68, 54, 310, 472, 363, 114,
2692 2, 114, 227, 228, 231, 331, 232, 234, 235, 241,
2693 244, -71, 155, 490, 246, 247, 15, 16, 17, 2,
2694 19, 211, 21, 248, 249, 243, 340, 341, 253, 254,
2695 255, 256, 280, 243, 25, 15, 16, 17, 302, 19,
2696 330, 21, 303, 30, 31, 32, 318, 334, 336, 338,
2697 342, 343, 211, 25, 345, 513, 353, 2, 351, 355,
2698 357, 456, 30, 31, 32, 359, 361, 320, 211, 368,
2699 369, 354, -108, 15, 16, 17, 371, 19, 373, 21,
2700 381, 387, 211, 187, 188, 189, 389, 68, 54, 310,
2701 114, 25, 393, 396, 400, 68, 54, 310, 403, 456,
2702 30, 31, 32, 402, 442, 200, 201, 202, 203, 204,
2703 431, 364, 427, 432, 457, 205, 444, 206, 446, 450,
2704 207, 447, 395, 463, 452, 425, 469, 165, 453, 482,
2705 464, 483, 502, 426, 484, 493, 399, 147, 491, 497,
2706 492, 68, 54, 310, 506, 114, 211, -151, 211, 498,
2707 360, 505, 457, 114, 166, 167, 168, 499, 169, 170,
2708 171, 172, 173, 174, 175, 176, 177, 178, 179, 180,
2709 181, 182, 183, 184, 185, 186, 507, 187, 188, 189,
2710 508, 190, 191, 192, 511, -152, 245, 512, 434, 193,
2711 151, 194, 383, 195, 196, 197, 198, 199, 236, 200,
2712 201, 202, 203, 204, 465, 163, 501, 466, 462, 205,
2713 448, 206, 449, 458, 207, 155, 485, 495, 494, 430,
2714 327, 0, 443, 0, 156, 0, 0, 0, 157, 158,
2715 0, 187, 188, 189, 476, 474, 475, 480, 481, 0,
2716 458, 159, 404, 160, 405, 414, 0, 406, 407, 408,
2717 0, 409, 0, 0, 0, 202, 203, 204, 476, 474,
2718 475, 480, 481, 205, 0, 206, 0, 0, 207, 0,
2719 0, 0, 476, 474, 475, 480, 481, -4, 0, 0,
2720 1, 2, 3, 4, 410, 5, 6, 7, 8, 9,
2721 10, 11, 12, 13, 411, 412, 14, 15, 16, 17,
2722 18, 19, 20, 21, 0, 0, 23, 0, 0, 165,
2723 0, 0, 0, 24, 0, 25, 26, 0, 27, 0,
2724 28, 0, 29, 0, 30, 31, 32, 0, 0, 33,
2725 34, 0, 35, 36, 0, 0, -153, -153, -153, 0,
2726 37, 38, 0, 0, 173, 174, 0, 39, 0, 0,
2727 0, 0, 0, 0, 0, 0, 0, 0, 0, 187,
2728 188, 189, 0, 190, 191, 192, 0, 40, 41, 0,
2729 0, 0, 0, 0, 0, 0, 42, 0, 198, 199,
2730 0, 200, 201, 202, 203, 204, 0, 0, 0, 43,
2731 0, 205, 0, 206, 44, 45, 207, 0, 0, 46,
2732 0, 47, 0, 48, 0, 49, 0, 0, 0, -4,
2733 1, 2, 3, 4, 0, 5, 6, 7, 8, 9,
2734 10, 11, 12, 13, 0, 0, 0, 15, 16, 17,
2735 18, 19, 20, 21, 22, 0, 23, 127, 0, 128,
2736 0, 0, 0, 24, 129, 25, 26, 0, 27, 130,
2737 28, 0, 29, 131, 30, 31, 32, 0, 0, 33,
2738 34, 0, 35, 36, 0, 0, 0, 0, 0, 0,
2739 37, 38, 0, 132, 0, 0, 0, 39, 0, 0,
2740 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2741 0, 0, 0, 0, 0, 0, 0, 40, 41, 0,
2742 0, 0, 0, 0, 0, 0, 133, 0, 0, 0,
2743 0, 0, 0, 0, 0, 0, 0, 0, 0, 43,
2744 0, 0, 0, 0, 44, 45, 0, 0, 0, 46,
2745 0, 47, 0, 48, 0, 49, 0, 0, 0, 134,
2746 1, 2, 3, 4, 0, 5, 6, 7, 8, 9,
2747 10, 11, 12, 13, 0, 0, 0, 15, 16, 17,
2748 18, 19, 20, 21, 22, 0, 23, 127, 0, 128,
2749 0, 0, 0, 24, 129, 25, 26, 0, 27, 130,
2750 28, 0, 29, 131, 30, 31, 32, 0, 0, 33,
2751 34, 0, 35, 36, 0, 0, 0, 0, 0, 0,
2752 37, 38, 0, 132, 0, 0, 0, 39, 0, 0,
2753 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2754 0, 0, 0, 0, 0, 0, 0, 40, 41, 0,
2755 0, 0, 0, 0, 0, 0, 133, 0, 0, 0,
2756 0, 0, 0, 0, 0, 0, 0, 0, 0, 43,
2757 0, 0, 0, 0, 44, 45, 0, 0, 0, 46,
2758 0, 47, 0, 48, 0, 49, 0, 0, 0, 242,
2759 1, 2, 3, 4, 0, 5, 6, 7, 8, 9,
2760 10, 11, 12, 13, 0, 0, 0, 15, 16, 17,
2761 18, 19, 20, 21, 22, 0, 23, 127, 0, 128,
2762 0, 0, 0, 24, 129, 25, 26, 0, 27, 130,
2763 28, 0, 29, 131, 30, 31, 32, 0, 0, 33,
2764 34, 0, 35, 36, 0, 0, 0, 0, 0, 0,
2765 37, 38, 0, 132, 0, 0, 0, 39, 0, 0,
2766 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2767 0, 0, 0, 0, 0, 0, 0, 40, 41, 0,
2768 0, 0, 0, 0, 0, 0, 133, 0, 0, 0,
2769 0, 0, 0, 0, 0, 0, 0, 0, 0, 43,
2770 0, 0, 0, 0, 44, 45, 0, 0, 0, 46,
2771 0, 47, 0, 48, 0, 49, 0, 0, 0, 384,
2772 1, 2, 3, 4, 0, 5, 6, 7, 8, 9,
2773 10, 11, 12, 13, 0, 0, 14, 15, 16, 17,
2774 18, 19, 20, 21, 0, 0, 23, 0, 0, -153,
2775 0, 0, 0, 24, 0, 25, 26, 0, 27, 0,
2776 28, 0, 29, 0, 30, 31, 32, 0, 0, 33,
2777 34, 0, 35, 36, 0, 0, 0, 0, 0, 0,
2778 37, 38, 0, 0, -153, -153, 0, 39, 0, 0,
2779 0, 0, 0, 0, 0, 0, 0, 0, 0, 187,
2780 188, 189, 0, 190, 191, 192, 0, 40, 41, 0,
2781 0, 0, 0, 0, 0, 0, 42, 0, -153, -153,
2782 0, 200, 201, 202, 203, 204, 0, 0, 0, 43,
2783 0, 205, 0, 206, 44, 45, 207, 0, 0, 46,
2784 0, 47, 0, 48, 0, 49, 0, 0, 0, -3,
2785 1, 2, 3, 4, 0, 5, 6, 7, 8, 9,
2786 10, 11, 12, 13, 0, 0, 0, 15, 16, 17,
2787 18, 19, 20, 21, 0, 0, 23, 0, 0, 0,
2788 0, 0, 0, 24, 0, 25, 26, 0, 27, 0,
2789 28, 0, 29, 0, 30, 31, 32, 0, 0, 33,
2790 34, 0, 35, 36, 0, 0, 0, 0, 0, 0,
2791 37, 38, 0, 0, 0, 0, 0, 39, 0, 0,
2792 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2793 0, 0, 0, 0, 0, 0, 0, 40, 41, 0,
2794 0, 0, 0, 0, 0, 0, 305, 0, 0, 0,
2795 0, 0, 0, 0, 0, 0, 0, 0, 0, 43,
2796 0, 0, 0, 0, 44, 45, 0, 0, 0, 46,
2797 0, 47, 0, 48, 0, 49, 0, 0, 0, -15,
2798 1, 2, 3, 4, 0, 5, 6, 7, 8, 9,
2799 10, 11, 12, 13, 0, 0, 0, 15, 16, 17,
2800 18, 19, 20, 21, 0, 0, 23, 0, 0, 0,
2801 0, 0, 0, 24, 0, 25, 26, 0, 27, 0,
2802 28, 0, 29, 0, 30, 31, 32, 0, 0, 33,
2803 34, 0, 35, 36, 0, 0, 0, 0, 0, 0,
2804 37, 38, 0, 0, 0, 0, 0, 39, 0, 0,
2805 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2806 0, 0, 0, 0, 0, 0, 0, 40, 41, 0,
2807 0, 0, 0, 0, 0, 0, 305, 0, 0, 0,
2808 0, 0, 0, 0, 0, 0, 0, 0, 0, 43,
2809 0, 0, 0, 0, 44, 45, 0, 0, 0, 46,
2810 0, 47, 0, 48, 0, 49, 0, 0, 0, -16,
2811 1, 2, 3, 4, 0, 5, 6, 7, 8, 9,
2812 10, 11, 12, 13, 0, 0, 0, 15, 16, 17,
2813 18, 19, 20, 21, 0, 0, 23, 0, 0, 0,
2814 0, 0, 0, 24, 0, 25, 26, 0, 27, 0,
2815 28, 0, 29, 0, 30, 31, 32, 0, 0, 33,
2816 34, 0, 35, 36, 0, 0, 0, 0, 0, 0,
2817 37, 38, 0, 0, 0, 0, 0, 39, 0, 0,
2818 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2819 0, 0, 0, 0, 0, 0, 0, 40, 41, 0,
2820 0, 0, 0, 0, 0, 0, 473, 0, 0, 0,
2821 0, 0, 0, 0, 0, 0, 0, 0, 0, 43,
2822 0, 0, 0, 0, 44, 45, 0, 0, 0, 46,
2823 0, 47, 0, 48, 0, 49, 0, 0, 0, -142,
2824 1, 2, 3, 4, 0, 5, 6, 7, 8, 9,
2825 10, 11, 12, 13, 0, 0, 0, 15, 16, 17,
2826 18, 19, 20, 21, 0, 0, 23, 0, 0, 0,
2827 0, 0, 0, 24, 0, 25, 26, 0, 27, 0,
2828 28, 0, 29, 0, 30, 31, 32, 0, 0, 33,
2829 34, 0, 35, 36, 0, 0, 0, 0, 0, 0,
2830 37, 38, 0, 0, 0, 0, 0, 39, 0, 0,
2831 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2832 0, 0, 0, 0, 0, 0, 0, 40, 41, 0,
2833 0, 0, 0, 0, 0, 0, 473, 0, 0, 0,
2834 0, 0, 0, 0, 0, 0, 0, 0, 0, 43,
2835 0, 0, 0, 0, 44, 45, 0, 0, 0, 46,
2836 0, 47, 0, 48, 0, 49, 0, -3, 0, -143,
2837 1, 2, 3, 4, 0, 5, 6, 7, 8, 9,
2838 10, 11, 12, 13, 0, 0, 14, 15, 16, 17,
2839 18, 19, 20, 21, 0, 0, 23, 0, 0, 0,
2840 0, 0, 0, 24, 0, 25, 26, 0, 27, 0,
2841 28, 0, 29, 0, 30, 31, 32, 0, 0, 33,
2842 34, 0, 35, 36, 0, 0, 0, 0, 0, 0,
2843 37, 38, 0, 0, 0, 0, 0, 39, 0, 0,
2844 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2845 0, 0, 0, 0, 0, 0, 0, 40, 41, 0,
2846 0, 0, 0, 0, 0, 0, 42, 0, 0, 0,
2847 0, 0, 0, 0, 0, 0, 0, 0, 0, 43,
2848 0, 0, 0, 0, 44, 45, 0, 0, 0, 46,
2849 0, 47, 0, 48, 0, 49, 1, 2, 3, 4,
2850 0, 5, 6, 7, 8, 9, 10, 11, 12, 13,
2851 0, -118, 0, 15, 16, 17, 18, 19, 20, 21,
2852 22, 0, 23, 127, 0, 128, 0, 0, 0, 24,
2853 129, 25, 26, 0, 27, 130, 28, 0, 29, 131,
2854 30, 31, 32, 0, 0, 33, 34, 0, 35, 36,
2855 0, 0, 0, 0, 0, 0, 37, 38, 0, 132,
2856 0, 0, 0, 39, 0, 0, 0, 0, 0, 0,
2857 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2858 0, 0, 0, 40, 41, 0, 0, 0, 0, 0,
2859 0, 0, 133, 0, 0, 0, 0, 0, 0, 0,
2860 0, 0, 0, 0, 0, 43, 0, 0, 0, 0,
2861 44, 45, 0, 0, 0, 46, 0, 47, 0, 48,
2862 0, 49, 1, 2, 3, 4, 0, 5, 6, 7,
2863 8, 9, 10, 11, 12, 13, 0, 0, 0, 15,
2864 16, 17, 18, 19, 20, 21, 22, 0, 23, 127,
2865 0, 128, 0, 0, 0, 24, 129, 25, 26, 0,
2866 27, 130, 28, 0, 29, 131, 30, 31, 32, 0,
2867 0, 33, 34, 0, 35, 36, 0, 0, 0, 0,
2868 0, 0, 37, 38, 0, 132, 0, 0, 0, 39,
2869 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2870 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,
2871 41, 0, 0, 0, 0, 0, 0, 0, 133, 0,
2872 149, 0, 3, 4, 0, 5, 6, 7, 8, 9,
2873 0, 43, 0, 0, 0, 0, 44, 45, 0, 0,
2874 0, 46, 20, 47, 22, 48, 23, 49, 0, 128,
2875 0, 0, 0, 24, 0, 0, 0, 0, 0, 0,
2876 28, 0, 29, 150, 0, 0, 0, 0, 0, 0,
2877 34, 0, 35, 36, 0, 0, 0, 0, 0, 0,
2878 37, 0, 0, 0, 0, 0, 0, 39, 0, 0,
2879 99, 0, 3, 4, 0, 5, 6, 7, 8, 9,
2880 0, 0, 0, 0, 0, 0, 0, 40, 41, 0,
2881 0, 0, 20, 0, 22, 0, 23, 0, 0, 0,
2882 0, 0, 0, 24, 0, 0, 0, 0, 0, 43,
2883 28, 0, 29, 0, 44, 45, 0, 0, 0, 46,
2884 34, 47, 35, 36, 0, 49, 0, 0, 0, 0,
2885 37, 0, 0, 0, 0, 0, 0, 39, 0, 0,
2886 99, 0, 3, 4, 0, 5, 6, 7, 8, 9,
2887 0, 0, 0, 0, 0, 0, 0, 40, 41, 0,
2888 0, 0, 20, 0, 22, 0, 23, 0, 0, 0,
2889 0, 0, 0, 0, 0, 0, 0, 0, 0, 43,
2890 0, 0, 29, 0, 44, 45, 0, 0, 0, 46,
2891 34, 47, 35, 36, 0, 49, 0, 0, 0, 0,
2892 0, 0, 165, 0, 0, 0, 0, 39, 0, 0,
2893 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2894 0, 0, 0, 0, 0, 0, 0, 40, 41, 166,
2895 167, 168, 0, 169, 170, 171, 172, 173, 174, 175,
2896 176, 177, 178, 179, 180, 181, 182, 183, 184, 185,
2897 186, 0, 187, 188, 189, 0, 190, 191, 192, 46,
2898 0, 47, 0, 0, 193, 49, 194, 0, 195, 196,
2899 197, 198, 199, 165, 200, 201, 202, 203, 204, 0,
2900 0, 0, 0, 0, 205, 0, 206, 0, 0, 207,
2901 0, 0, 0, 0, 0, 358, 0, 0, 0, 0,
2902 166, 167, 168, 0, 169, 170, 171, 172, 173, 174,
2903 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
2904 185, 186, 0, 187, 188, 189, 0, 190, 191, 192,
2905 0, 0, 0, 0, 0, 193, 165, 194, 0, 195,
2906 196, 197, 198, 199, 0, 200, 201, 202, 203, 204,
2907 0, 0, 0, 0, 0, 205, 0, 206, 0, 0,
2908 207, 0, 0, 166, 167, 168, 397, 169, 170, 171,
2909 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
2910 182, 183, 184, 185, 186, 0, 187, 188, 189, 0,
2911 190, 191, 192, 0, 0, 0, 0, 165, 193, 0,
2912 194, 350, 195, 196, 197, 198, 199, 0, 200, 201,
2913 202, 203, 204, 0, 0, 0, 0, 0, 205, 0,
2914 206, 0, 0, 207, 166, 167, 168, 0, 169, 170,
2915 171, 172, 173, 174, 175, 176, 177, 178, 179, 180,
2916 181, 182, 183, 184, 185, 186, 0, 187, 188, 189,
2917 0, 190, 191, 192, 0, 0, 0, 0, 165, 193,
2918 0, 194, 0, 195, 196, 197, 198, 199, 0, 200,
2919 201, 202, 203, 204, 0, 0, 0, 0, 0, 205,
2920 0, 206, 352, 0, 207, 166, 167, 168, 0, 169,
2921 170, 171, 172, 173, 174, 175, 176, 177, 178, 179,
2922 180, 181, 182, 183, 184, 185, 186, 0, 187, 188,
2923 189, 0, 190, 191, 192, 0, 0, 0, 0, 165,
2924 193, 0, 194, 486, 195, 196, 197, 198, 199, 0,
2925 200, 201, 202, 203, 204, 0, 0, 0, 0, 0,
2926 205, 0, 206, 0, 0, 207, 166, 167, 168, 0,
2927 169, 170, 171, 172, 173, 174, 175, 176, 177, 178,
2928 179, 180, 181, 182, 183, 184, 185, 186, 0, 187,
2929 188, 189, 0, 190, 191, 192, 0, 0, 0, 0,
2930 165, 193, 0, 194, 0, 195, 196, 197, 198, 199,
2931 0, 200, 201, 202, 203, 204, 0, 0, 0, 0,
2932 0, 205, 0, 206, 0, 0, 207, 166, 167, 168,
2933 0, 169, 170, 171, 172, 173, 174, 0, 0, 0,
2934 0, 0, 0, 0, 0, 0, 0, 0, 186, 0,
2935 187, 188, 189, 0, 190, 191, 192, 0, 0, 0,
2936 0, 165, 0, 0, 0, 0, 195, 196, 197, 198,
2937 199, 0, 200, 201, 202, 203, 204, 0, 0, 0,
2938 0, 0, 205, 0, 206, 0, 0, 207, 166, 167,
2939 168, 0, 169, 170, 171, 172, 173, 174, 0, 0,
2940 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2941 0, 187, 188, 189, 0, 190, 191, 192, 0, 0,
2942 0, 0, 165, 0, 0, 0, 0, 195, 196, 197,
2943 198, 199, 0, 200, 201, 202, 203, 204, 0, 0,
2944 0, 0, 0, 205, 0, 206, 0, 0, 207, 166,
2945 167, 168, 0, 169, 170, 171, 172, 173, 174, 0,
2946 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2947 0, 0, 187, 188, 189, 0, 190, 191, 192, 0,
2948 0, 0, 0, 165, 0, 0, 0, 0, 0, 196,
2949 197, 198, 199, 0, 200, 201, 202, 203, 204, 0,
2950 0, 0, 0, 0, 205, 0, 206, 0, 0, 207,
2951 166, 167, 168, 0, 169, 170, 171, 172, 173, 174,
2952 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2953 0, 0, 0, 187, 188, 189, 0, 190, 191, 192,
2954 0, 0, 0, 0, 165, 0, 0, 0, 0, 0,
2955 0, 197, 198, 199, 0, 200, 201, 202, 203, 204,
2956 0, 0, 0, 0, 0, 205, 0, 206, 0, 0,
2957 207, 166, 167, 168, 0, 169, 170, 171, 172, 173,
2958 174, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2959 0, 0, 0, 0, 187, 188, 189, 0, 190, 191,
2960 192, 0, 0, 0, 0, 165, 0, 0, 0, 0,
2961 0, 0, -153, 198, 199, 0, 200, 201, 202, 203,
2962 204, 0, 0, 0, 0, 0, 205, 0, 206, 0,
2963 0, 207, 166, 167, 168, 0, -153, -153, -153, -153,
2964 173, 174, 0, 0, 0, 0, 0, 0, 0, 0,
2965 0, 0, 0, 0, 0, 187, 188, 189, 0, 190,
2966 191, 192, 0, 0, 0, 0, 0, 0, 0, 0,
2967 0, 0, 0, 0, 198, 199, 0, 200, 201, 202,
2968 203, 204, 0, 0, 0, 0, 0, 205, 0, 206,
2972 static const yytype_int16 yycheck[] =
2974 0, 0, 0, 0, 0, 58, 90, 48, 3, 109,
2975 246, 39, 20, 50, 3, 387, 24, 325, 3, 3,
2976 321, 315, 28, 3, 3, 68, 3, 33, 5, 37,
2977 19, 39, 40, 41, 19, 43, 44, 45, 463, 47,
2978 19, 92, 467, 468, 100, 46, 100, 89, 356, 122,
2979 100, 135, 52, 52, 52, 52, 52, 36, 0, 102,
2980 0, 486, 0, 34, 372, 100, 102, 361, 369, 105,
2981 90, 91, 92, 124, 3, 500, 127, 133, 386, 133,
2982 35, 3, 507, 133, 3, 122, 100, 100, 216, 217,
2983 19, 62, 343, 221, 345, 122, 51, 125, 133, 107,
2984 19, 109, 122, 104, 124, 205, 3, 127, 14, 93,
2985 52, 347, 52, 93, 52, 416, 18, 125, 122, 133,
2986 133, 27, 19, 127, 126, 27, 18, 122, 129, 130,
2987 115, 122, 368, 128, 506, 27, 115, 126, 389, 122,
2988 32, 3, 450, 0, 452, 126, 127, 122, 148, 148,
2989 148, 148, 148, 126, 46, 100, 164, 165, 166, 167,
2990 168, 169, 170, 171, 172, 173, 174, 175, 176, 177,
2991 178, 179, 180, 181, 182, 183, 184, 185, 186, 99,
2992 100, 432, 190, 191, 192, 193, 194, 195, 196, 197,
2993 198, 199, 200, 201, 202, 203, 204, 205, 206, 227,
2994 3, 229, 127, 244, 122, 213, 148, 122, 148, 210,
2995 148, 127, 3, 100, 214, 214, 214, 453, 318, 227,
2996 4, 229, 105, 132, 125, 226, 100, 3, 3, 3,
2997 126, 68, 18, 469, 3, 99, 20, 21, 22, 4,
2998 24, 325, 26, 68, 3, 329, 247, 248, 3, 3,
2999 3, 102, 3, 337, 38, 20, 21, 22, 99, 24,
3000 133, 26, 14, 47, 48, 49, 122, 105, 100, 132,
3001 3, 54, 356, 38, 54, 511, 89, 4, 133, 3,
3002 122, 46, 47, 48, 49, 132, 126, 3, 372, 133,
3003 100, 299, 127, 20, 21, 22, 132, 24, 105, 26,
3004 102, 122, 386, 90, 91, 92, 17, 307, 307, 307,
3005 318, 38, 126, 3, 126, 315, 315, 315, 133, 46,
3006 47, 48, 49, 132, 132, 112, 113, 114, 115, 116,
3007 126, 102, 385, 100, 99, 122, 126, 124, 126, 65,
3008 127, 122, 350, 105, 133, 373, 3, 40, 133, 3,
3009 132, 27, 3, 381, 132, 132, 357, 52, 126, 132,
3010 126, 361, 361, 361, 122, 373, 450, 132, 452, 132,
3011 307, 132, 99, 381, 67, 68, 69, 133, 71, 72,
3012 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
3013 83, 84, 85, 86, 87, 88, 126, 90, 91, 92,
3014 132, 94, 95, 96, 133, 132, 148, 132, 394, 102,
3015 58, 104, 336, 106, 107, 108, 109, 110, 128, 112,
3016 113, 114, 115, 116, 439, 69, 492, 439, 436, 122,
3017 422, 124, 422, 433, 127, 18, 460, 483, 478, 389,
3018 133, -1, 414, -1, 27, -1, -1, -1, 31, 32,
3019 -1, 90, 91, 92, 454, 454, 454, 454, 454, -1,
3020 460, 44, 3, 46, 5, 365, -1, 8, 9, 10,
3021 -1, 12, -1, -1, -1, 114, 115, 116, 478, 478,
3022 478, 478, 478, 122, -1, 124, -1, -1, 127, -1,
3023 -1, -1, 492, 492, 492, 492, 492, 0, -1, -1,
3024 3, 4, 5, 6, 45, 8, 9, 10, 11, 12,
3025 13, 14, 15, 16, 55, 56, 19, 20, 21, 22,
3026 23, 24, 25, 26, -1, -1, 29, -1, -1, 40,
3027 -1, -1, -1, 36, -1, 38, 39, -1, 41, -1,
3028 43, -1, 45, -1, 47, 48, 49, -1, -1, 52,
3029 53, -1, 55, 56, -1, -1, 67, 68, 69, -1,
3030 63, 64, -1, -1, 75, 76, -1, 70, -1, -1,
3031 -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
3032 91, 92, -1, 94, 95, 96, -1, 90, 91, -1,
3033 -1, -1, -1, -1, -1, -1, 99, -1, 109, 110,
3034 -1, 112, 113, 114, 115, 116, -1, -1, -1, 112,
3035 -1, 122, -1, 124, 117, 118, 127, -1, -1, 122,
3036 -1, 124, -1, 126, -1, 128, -1, -1, -1, 132,
3037 3, 4, 5, 6, -1, 8, 9, 10, 11, 12,
3038 13, 14, 15, 16, -1, -1, -1, 20, 21, 22,
3039 23, 24, 25, 26, 27, -1, 29, 30, -1, 32,
3040 -1, -1, -1, 36, 37, 38, 39, -1, 41, 42,
3041 43, -1, 45, 46, 47, 48, 49, -1, -1, 52,
3042 53, -1, 55, 56, -1, -1, -1, -1, -1, -1,
3043 63, 64, -1, 66, -1, -1, -1, 70, -1, -1,
3044 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3045 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
3046 -1, -1, -1, -1, -1, -1, 99, -1, -1, -1,
3047 -1, -1, -1, -1, -1, -1, -1, -1, -1, 112,
3048 -1, -1, -1, -1, 117, 118, -1, -1, -1, 122,
3049 -1, 124, -1, 126, -1, 128, -1, -1, -1, 132,
3050 3, 4, 5, 6, -1, 8, 9, 10, 11, 12,
3051 13, 14, 15, 16, -1, -1, -1, 20, 21, 22,
3052 23, 24, 25, 26, 27, -1, 29, 30, -1, 32,
3053 -1, -1, -1, 36, 37, 38, 39, -1, 41, 42,
3054 43, -1, 45, 46, 47, 48, 49, -1, -1, 52,
3055 53, -1, 55, 56, -1, -1, -1, -1, -1, -1,
3056 63, 64, -1, 66, -1, -1, -1, 70, -1, -1,
3057 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3058 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
3059 -1, -1, -1, -1, -1, -1, 99, -1, -1, -1,
3060 -1, -1, -1, -1, -1, -1, -1, -1, -1, 112,
3061 -1, -1, -1, -1, 117, 118, -1, -1, -1, 122,
3062 -1, 124, -1, 126, -1, 128, -1, -1, -1, 132,
3063 3, 4, 5, 6, -1, 8, 9, 10, 11, 12,
3064 13, 14, 15, 16, -1, -1, -1, 20, 21, 22,
3065 23, 24, 25, 26, 27, -1, 29, 30, -1, 32,
3066 -1, -1, -1, 36, 37, 38, 39, -1, 41, 42,
3067 43, -1, 45, 46, 47, 48, 49, -1, -1, 52,
3068 53, -1, 55, 56, -1, -1, -1, -1, -1, -1,
3069 63, 64, -1, 66, -1, -1, -1, 70, -1, -1,
3070 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3071 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
3072 -1, -1, -1, -1, -1, -1, 99, -1, -1, -1,
3073 -1, -1, -1, -1, -1, -1, -1, -1, -1, 112,
3074 -1, -1, -1, -1, 117, 118, -1, -1, -1, 122,
3075 -1, 124, -1, 126, -1, 128, -1, -1, -1, 132,
3076 3, 4, 5, 6, -1, 8, 9, 10, 11, 12,
3077 13, 14, 15, 16, -1, -1, 19, 20, 21, 22,
3078 23, 24, 25, 26, -1, -1, 29, -1, -1, 40,
3079 -1, -1, -1, 36, -1, 38, 39, -1, 41, -1,
3080 43, -1, 45, -1, 47, 48, 49, -1, -1, 52,
3081 53, -1, 55, 56, -1, -1, -1, -1, -1, -1,
3082 63, 64, -1, -1, 75, 76, -1, 70, -1, -1,
3083 -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
3084 91, 92, -1, 94, 95, 96, -1, 90, 91, -1,
3085 -1, -1, -1, -1, -1, -1, 99, -1, 109, 110,
3086 -1, 112, 113, 114, 115, 116, -1, -1, -1, 112,
3087 -1, 122, -1, 124, 117, 118, 127, -1, -1, 122,
3088 -1, 124, -1, 126, -1, 128, -1, -1, -1, 132,
3089 3, 4, 5, 6, -1, 8, 9, 10, 11, 12,
3090 13, 14, 15, 16, -1, -1, -1, 20, 21, 22,
3091 23, 24, 25, 26, -1, -1, 29, -1, -1, -1,
3092 -1, -1, -1, 36, -1, 38, 39, -1, 41, -1,
3093 43, -1, 45, -1, 47, 48, 49, -1, -1, 52,
3094 53, -1, 55, 56, -1, -1, -1, -1, -1, -1,
3095 63, 64, -1, -1, -1, -1, -1, 70, -1, -1,
3096 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3097 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
3098 -1, -1, -1, -1, -1, -1, 99, -1, -1, -1,
3099 -1, -1, -1, -1, -1, -1, -1, -1, -1, 112,
3100 -1, -1, -1, -1, 117, 118, -1, -1, -1, 122,
3101 -1, 124, -1, 126, -1, 128, -1, -1, -1, 132,
3102 3, 4, 5, 6, -1, 8, 9, 10, 11, 12,
3103 13, 14, 15, 16, -1, -1, -1, 20, 21, 22,
3104 23, 24, 25, 26, -1, -1, 29, -1, -1, -1,
3105 -1, -1, -1, 36, -1, 38, 39, -1, 41, -1,
3106 43, -1, 45, -1, 47, 48, 49, -1, -1, 52,
3107 53, -1, 55, 56, -1, -1, -1, -1, -1, -1,
3108 63, 64, -1, -1, -1, -1, -1, 70, -1, -1,
3109 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3110 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
3111 -1, -1, -1, -1, -1, -1, 99, -1, -1, -1,
3112 -1, -1, -1, -1, -1, -1, -1, -1, -1, 112,
3113 -1, -1, -1, -1, 117, 118, -1, -1, -1, 122,
3114 -1, 124, -1, 126, -1, 128, -1, -1, -1, 132,
3115 3, 4, 5, 6, -1, 8, 9, 10, 11, 12,
3116 13, 14, 15, 16, -1, -1, -1, 20, 21, 22,
3117 23, 24, 25, 26, -1, -1, 29, -1, -1, -1,
3118 -1, -1, -1, 36, -1, 38, 39, -1, 41, -1,
3119 43, -1, 45, -1, 47, 48, 49, -1, -1, 52,
3120 53, -1, 55, 56, -1, -1, -1, -1, -1, -1,
3121 63, 64, -1, -1, -1, -1, -1, 70, -1, -1,
3122 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3123 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
3124 -1, -1, -1, -1, -1, -1, 99, -1, -1, -1,
3125 -1, -1, -1, -1, -1, -1, -1, -1, -1, 112,
3126 -1, -1, -1, -1, 117, 118, -1, -1, -1, 122,
3127 -1, 124, -1, 126, -1, 128, -1, -1, -1, 132,
3128 3, 4, 5, 6, -1, 8, 9, 10, 11, 12,
3129 13, 14, 15, 16, -1, -1, -1, 20, 21, 22,
3130 23, 24, 25, 26, -1, -1, 29, -1, -1, -1,
3131 -1, -1, -1, 36, -1, 38, 39, -1, 41, -1,
3132 43, -1, 45, -1, 47, 48, 49, -1, -1, 52,
3133 53, -1, 55, 56, -1, -1, -1, -1, -1, -1,
3134 63, 64, -1, -1, -1, -1, -1, 70, -1, -1,
3135 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3136 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
3137 -1, -1, -1, -1, -1, -1, 99, -1, -1, -1,
3138 -1, -1, -1, -1, -1, -1, -1, -1, -1, 112,
3139 -1, -1, -1, -1, 117, 118, -1, -1, -1, 122,
3140 -1, 124, -1, 126, -1, 128, -1, 0, -1, 132,
3141 3, 4, 5, 6, -1, 8, 9, 10, 11, 12,
3142 13, 14, 15, 16, -1, -1, 19, 20, 21, 22,
3143 23, 24, 25, 26, -1, -1, 29, -1, -1, -1,
3144 -1, -1, -1, 36, -1, 38, 39, -1, 41, -1,
3145 43, -1, 45, -1, 47, 48, 49, -1, -1, 52,
3146 53, -1, 55, 56, -1, -1, -1, -1, -1, -1,
3147 63, 64, -1, -1, -1, -1, -1, 70, -1, -1,
3148 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3149 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
3150 -1, -1, -1, -1, -1, -1, 99, -1, -1, -1,
3151 -1, -1, -1, -1, -1, -1, -1, -1, -1, 112,
3152 -1, -1, -1, -1, 117, 118, -1, -1, -1, 122,
3153 -1, 124, -1, 126, -1, 128, 3, 4, 5, 6,
3154 -1, 8, 9, 10, 11, 12, 13, 14, 15, 16,
3155 -1, 18, -1, 20, 21, 22, 23, 24, 25, 26,
3156 27, -1, 29, 30, -1, 32, -1, -1, -1, 36,
3157 37, 38, 39, -1, 41, 42, 43, -1, 45, 46,
3158 47, 48, 49, -1, -1, 52, 53, -1, 55, 56,
3159 -1, -1, -1, -1, -1, -1, 63, 64, -1, 66,
3160 -1, -1, -1, 70, -1, -1, -1, -1, -1, -1,
3161 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3162 -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
3163 -1, -1, 99, -1, -1, -1, -1, -1, -1, -1,
3164 -1, -1, -1, -1, -1, 112, -1, -1, -1, -1,
3165 117, 118, -1, -1, -1, 122, -1, 124, -1, 126,
3166 -1, 128, 3, 4, 5, 6, -1, 8, 9, 10,
3167 11, 12, 13, 14, 15, 16, -1, -1, -1, 20,
3168 21, 22, 23, 24, 25, 26, 27, -1, 29, 30,
3169 -1, 32, -1, -1, -1, 36, 37, 38, 39, -1,
3170 41, 42, 43, -1, 45, 46, 47, 48, 49, -1,
3171 -1, 52, 53, -1, 55, 56, -1, -1, -1, -1,
3172 -1, -1, 63, 64, -1, 66, -1, -1, -1, 70,
3173 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3174 -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
3175 91, -1, -1, -1, -1, -1, -1, -1, 99, -1,
3176 3, -1, 5, 6, -1, 8, 9, 10, 11, 12,
3177 -1, 112, -1, -1, -1, -1, 117, 118, -1, -1,
3178 -1, 122, 25, 124, 27, 126, 29, 128, -1, 32,
3179 -1, -1, -1, 36, -1, -1, -1, -1, -1, -1,
3180 43, -1, 45, 46, -1, -1, -1, -1, -1, -1,
3181 53, -1, 55, 56, -1, -1, -1, -1, -1, -1,
3182 63, -1, -1, -1, -1, -1, -1, 70, -1, -1,
3183 3, -1, 5, 6, -1, 8, 9, 10, 11, 12,
3184 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
3185 -1, -1, 25, -1, 27, -1, 29, -1, -1, -1,
3186 -1, -1, -1, 36, -1, -1, -1, -1, -1, 112,
3187 43, -1, 45, -1, 117, 118, -1, -1, -1, 122,
3188 53, 124, 55, 56, -1, 128, -1, -1, -1, -1,
3189 63, -1, -1, -1, -1, -1, -1, 70, -1, -1,
3190 3, -1, 5, 6, -1, 8, 9, 10, 11, 12,
3191 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
3192 -1, -1, 25, -1, 27, -1, 29, -1, -1, -1,
3193 -1, -1, -1, -1, -1, -1, -1, -1, -1, 112,
3194 -1, -1, 45, -1, 117, 118, -1, -1, -1, 122,
3195 53, 124, 55, 56, -1, 128, -1, -1, -1, -1,
3196 -1, -1, 40, -1, -1, -1, -1, 70, -1, -1,
3197 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3198 -1, -1, -1, -1, -1, -1, -1, 90, 91, 67,
3199 68, 69, -1, 71, 72, 73, 74, 75, 76, 77,
3200 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
3201 88, -1, 90, 91, 92, -1, 94, 95, 96, 122,
3202 -1, 124, -1, -1, 102, 128, 104, -1, 106, 107,
3203 108, 109, 110, 40, 112, 113, 114, 115, 116, -1,
3204 -1, -1, -1, -1, 122, -1, 124, -1, -1, 127,
3205 -1, -1, -1, -1, -1, 133, -1, -1, -1, -1,
3206 67, 68, 69, -1, 71, 72, 73, 74, 75, 76,
3207 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
3208 87, 88, -1, 90, 91, 92, -1, 94, 95, 96,
3209 -1, -1, -1, -1, -1, 102, 40, 104, -1, 106,
3210 107, 108, 109, 110, -1, 112, 113, 114, 115, 116,
3211 -1, -1, -1, -1, -1, 122, -1, 124, -1, -1,
3212 127, -1, -1, 67, 68, 69, 133, 71, 72, 73,
3213 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
3214 84, 85, 86, 87, 88, -1, 90, 91, 92, -1,
3215 94, 95, 96, -1, -1, -1, -1, 40, 102, -1,
3216 104, 105, 106, 107, 108, 109, 110, -1, 112, 113,
3217 114, 115, 116, -1, -1, -1, -1, -1, 122, -1,
3218 124, -1, -1, 127, 67, 68, 69, -1, 71, 72,
3219 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
3220 83, 84, 85, 86, 87, 88, -1, 90, 91, 92,
3221 -1, 94, 95, 96, -1, -1, -1, -1, 40, 102,
3222 -1, 104, -1, 106, 107, 108, 109, 110, -1, 112,
3223 113, 114, 115, 116, -1, -1, -1, -1, -1, 122,
3224 -1, 124, 125, -1, 127, 67, 68, 69, -1, 71,
3225 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
3226 82, 83, 84, 85, 86, 87, 88, -1, 90, 91,
3227 92, -1, 94, 95, 96, -1, -1, -1, -1, 40,
3228 102, -1, 104, 105, 106, 107, 108, 109, 110, -1,
3229 112, 113, 114, 115, 116, -1, -1, -1, -1, -1,
3230 122, -1, 124, -1, -1, 127, 67, 68, 69, -1,
3231 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
3232 81, 82, 83, 84, 85, 86, 87, 88, -1, 90,
3233 91, 92, -1, 94, 95, 96, -1, -1, -1, -1,
3234 40, 102, -1, 104, -1, 106, 107, 108, 109, 110,
3235 -1, 112, 113, 114, 115, 116, -1, -1, -1, -1,
3236 -1, 122, -1, 124, -1, -1, 127, 67, 68, 69,
3237 -1, 71, 72, 73, 74, 75, 76, -1, -1, -1,
3238 -1, -1, -1, -1, -1, -1, -1, -1, 88, -1,
3239 90, 91, 92, -1, 94, 95, 96, -1, -1, -1,
3240 -1, 40, -1, -1, -1, -1, 106, 107, 108, 109,
3241 110, -1, 112, 113, 114, 115, 116, -1, -1, -1,
3242 -1, -1, 122, -1, 124, -1, -1, 127, 67, 68,
3243 69, -1, 71, 72, 73, 74, 75, 76, -1, -1,
3244 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3245 -1, 90, 91, 92, -1, 94, 95, 96, -1, -1,
3246 -1, -1, 40, -1, -1, -1, -1, 106, 107, 108,
3247 109, 110, -1, 112, 113, 114, 115, 116, -1, -1,
3248 -1, -1, -1, 122, -1, 124, -1, -1, 127, 67,
3249 68, 69, -1, 71, 72, 73, 74, 75, 76, -1,
3250 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3251 -1, -1, 90, 91, 92, -1, 94, 95, 96, -1,
3252 -1, -1, -1, 40, -1, -1, -1, -1, -1, 107,
3253 108, 109, 110, -1, 112, 113, 114, 115, 116, -1,
3254 -1, -1, -1, -1, 122, -1, 124, -1, -1, 127,
3255 67, 68, 69, -1, 71, 72, 73, 74, 75, 76,
3256 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3257 -1, -1, -1, 90, 91, 92, -1, 94, 95, 96,
3258 -1, -1, -1, -1, 40, -1, -1, -1, -1, -1,
3259 -1, 108, 109, 110, -1, 112, 113, 114, 115, 116,
3260 -1, -1, -1, -1, -1, 122, -1, 124, -1, -1,
3261 127, 67, 68, 69, -1, 71, 72, 73, 74, 75,
3262 76, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3263 -1, -1, -1, -1, 90, 91, 92, -1, 94, 95,
3264 96, -1, -1, -1, -1, 40, -1, -1, -1, -1,
3265 -1, -1, 108, 109, 110, -1, 112, 113, 114, 115,
3266 116, -1, -1, -1, -1, -1, 122, -1, 124, -1,
3267 -1, 127, 67, 68, 69, -1, 71, 72, 73, 74,
3268 75, 76, -1, -1, -1, -1, -1, -1, -1, -1,
3269 -1, -1, -1, -1, -1, 90, 91, 92, -1, 94,
3270 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
3271 -1, -1, -1, -1, 109, 110, -1, 112, 113, 114,
3272 115, 116, -1, -1, -1, -1, -1, 122, -1, 124,
3276 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
3277 symbol of state STATE-NUM. */
3278 static const yytype_uint8 yystos[] =
3280 0, 3, 4, 5, 6, 8, 9, 10, 11, 12,
3281 13, 14, 15, 16, 19, 20, 21, 22, 23, 24,
3282 25, 26, 27, 29, 36, 38, 39, 41, 43, 45,
3283 47, 48, 49, 52, 53, 55, 56, 63, 64, 70,
3284 90, 91, 99, 112, 117, 118, 122, 124, 126, 128,
3285 135, 136, 137, 138, 144, 147, 148, 154, 158, 159,
3286 160, 161, 163, 171, 179, 182, 185, 188, 189, 190,
3287 191, 195, 197, 206, 214, 217, 230, 231, 232, 235,
3288 236, 237, 238, 241, 243, 244, 89, 50, 122, 122,
3289 164, 122, 3, 19, 126, 183, 184, 184, 220, 3,
3290 237, 3, 216, 237, 122, 184, 220, 122, 126, 122,
3291 127, 237, 122, 234, 237, 239, 240, 237, 237, 237,
3292 237, 237, 235, 226, 227, 228, 234, 30, 32, 37,
3293 42, 46, 66, 99, 132, 143, 144, 145, 148, 150,
3294 165, 166, 181, 189, 233, 3, 0, 138, 126, 3,
3295 46, 150, 156, 157, 236, 18, 27, 31, 32, 44,
3296 46, 205, 242, 191, 100, 40, 67, 68, 69, 71,
3297 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
3298 82, 83, 84, 85, 86, 87, 88, 90, 91, 92,
3299 94, 95, 96, 102, 104, 106, 107, 108, 109, 110,
3300 112, 113, 114, 115, 116, 122, 124, 127, 3, 122,
3301 162, 145, 146, 172, 187, 126, 127, 127, 229, 122,
3302 235, 127, 237, 180, 226, 3, 155, 105, 132, 100,
3303 133, 125, 100, 234, 3, 3, 151, 152, 235, 235,
3304 151, 3, 132, 145, 126, 136, 3, 99, 68, 3,
3305 35, 51, 213, 3, 3, 3, 102, 237, 237, 237,
3306 237, 237, 237, 237, 237, 237, 237, 237, 237, 237,
3307 237, 237, 237, 237, 237, 237, 237, 237, 237, 237,
3308 3, 237, 237, 237, 237, 237, 237, 237, 237, 237,
3309 237, 237, 237, 237, 237, 237, 226, 237, 3, 122,
3310 128, 235, 99, 14, 237, 99, 139, 140, 141, 147,
3311 148, 195, 197, 206, 214, 186, 183, 3, 122, 225,
3312 3, 93, 210, 211, 212, 133, 115, 133, 142, 143,
3313 133, 235, 234, 234, 105, 224, 100, 143, 132, 224,
3314 235, 235, 3, 54, 192, 54, 193, 207, 3, 5,
3315 105, 133, 125, 89, 237, 3, 133, 122, 133, 132,
3316 141, 126, 139, 226, 102, 105, 208, 212, 133, 100,
3317 146, 132, 133, 105, 3, 36, 115, 219, 220, 221,
3318 223, 102, 149, 152, 132, 99, 133, 122, 221, 17,
3319 194, 221, 222, 126, 224, 237, 3, 133, 146, 235,
3320 126, 139, 132, 133, 3, 5, 8, 9, 10, 12,
3321 45, 55, 56, 209, 223, 224, 93, 212, 28, 33,
3322 173, 175, 177, 178, 146, 234, 234, 236, 146, 210,
3323 222, 126, 100, 198, 149, 133, 34, 62, 167, 168,
3324 169, 170, 132, 208, 126, 212, 126, 122, 173, 175,
3325 65, 153, 133, 133, 196, 221, 46, 99, 189, 202,
3326 203, 204, 237, 105, 132, 169, 170, 218, 176, 3,
3327 146, 146, 224, 99, 144, 148, 189, 199, 200, 201,
3328 206, 214, 3, 27, 132, 204, 105, 142, 142, 142,
3329 224, 126, 126, 132, 201, 213, 142, 132, 132, 133,
3330 215, 199, 3, 174, 142, 132, 122, 126, 132, 210,
3334 #define yyerrok (yyerrstatus = 0)
3335 #define yyclearin (yychar = YYEMPTY)
3336 #define YYEMPTY (-2)
3339 #define YYACCEPT goto yyacceptlab
3340 #define YYABORT goto yyabortlab
3341 #define YYERROR goto yyerrorlab
3344 /* Like YYERROR except do call yyerror. This remains here temporarily
3345 to ease the transition to the new meaning of YYERROR, for GCC.
3346 Once GCC version 2 has supplanted version 1, this can go. */
3348 #define YYFAIL goto yyerrlab
3350 #define YYRECOVERING() (!!yyerrstatus)
3352 #define YYBACKUP(Token, Value) \
3354 if (yychar == YYEMPTY && yylen == 1) \
3358 yytoken = YYTRANSLATE (yychar); \
3364 yyerror (YY_("syntax error: cannot back up")); \
3371 #define YYERRCODE 256
3374 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
3375 If N is 0, then set CURRENT to the empty location which ends
3376 the previous symbol: RHS[0] (always defined). */
3378 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
3379 #ifndef YYLLOC_DEFAULT
3380 # define YYLLOC_DEFAULT(Current, Rhs, N) \
3384 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
3385 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
3386 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
3387 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
3391 (Current).first_line = (Current).last_line = \
3392 YYRHSLOC (Rhs, 0).last_line; \
3393 (Current).first_column = (Current).last_column = \
3394 YYRHSLOC (Rhs, 0).last_column; \
3400 /* YY_LOCATION_PRINT -- Print the location on the stream.
3401 This macro was not mandated originally: define only if we know
3402 we won't break user code: when these are the locations we know. */
3404 #ifndef YY_LOCATION_PRINT
3405 # if YYLTYPE_IS_TRIVIAL
3406 # define YY_LOCATION_PRINT(File, Loc) \
3407 fprintf (File, "%d.%d-%d.%d", \
3408 (Loc).first_line, (Loc).first_column, \
3409 (Loc).last_line, (Loc).last_column)
3411 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
3416 /* YYLEX -- calling `yylex' with the right arguments. */
3419 # define YYLEX yylex (YYLEX_PARAM)
3421 # define YYLEX yylex ()
3424 /* Enable debugging if requested. */
3428 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
3429 # define YYFPRINTF fprintf
3432 # define YYDPRINTF(Args) \
3438 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
3442 YYFPRINTF (stderr, "%s ", Title); \
3443 yy_symbol_print (stderr, \
3445 YYFPRINTF (stderr, "\n"); \
3450 /*--------------------------------.
3451 | Print this symbol on YYOUTPUT. |
3452 `--------------------------------*/
3455 #if (defined __STDC__ || defined __C99__FUNC__ \
3456 || defined __cplusplus || defined _MSC_VER)
3458 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
3461 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
3464 YYSTYPE const * const yyvaluep;
3470 if (yytype < YYNTOKENS)
3471 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
3483 /*--------------------------------.
3484 | Print this symbol on YYOUTPUT. |
3485 `--------------------------------*/
3487 #if (defined __STDC__ || defined __C99__FUNC__ \
3488 || defined __cplusplus || defined _MSC_VER)
3490 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
3493 yy_symbol_print (yyoutput, yytype, yyvaluep)
3496 YYSTYPE const * const yyvaluep;
3499 if (yytype < YYNTOKENS)
3500 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
3502 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
3504 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
3505 YYFPRINTF (yyoutput, ")");
3508 /*------------------------------------------------------------------.
3509 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
3511 `------------------------------------------------------------------*/
3513 #if (defined __STDC__ || defined __C99__FUNC__ \
3514 || defined __cplusplus || defined _MSC_VER)
3516 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
3519 yy_stack_print (yybottom, yytop)
3520 yytype_int16 *yybottom;
3521 yytype_int16 *yytop;
3524 YYFPRINTF (stderr, "Stack now");
3525 for (; yybottom <= yytop; yybottom++)
3527 int yybot = *yybottom;
3528 YYFPRINTF (stderr, " %d", yybot);
3530 YYFPRINTF (stderr, "\n");
3533 # define YY_STACK_PRINT(Bottom, Top) \
3536 yy_stack_print ((Bottom), (Top)); \
3540 /*------------------------------------------------.
3541 | Report that the YYRULE is going to be reduced. |
3542 `------------------------------------------------*/
3544 #if (defined __STDC__ || defined __C99__FUNC__ \
3545 || defined __cplusplus || defined _MSC_VER)
3547 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
3550 yy_reduce_print (yyvsp, yyrule)
3555 int yynrhs = yyr2[yyrule];
3557 unsigned long int yylno = yyrline[yyrule];
3558 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
3560 /* The symbols being reduced. */
3561 for (yyi = 0; yyi < yynrhs; yyi++)
3563 YYFPRINTF (stderr, " $%d = ", yyi + 1);
3564 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
3565 &(yyvsp[(yyi + 1) - (yynrhs)])
3567 YYFPRINTF (stderr, "\n");
3571 # define YY_REDUCE_PRINT(Rule) \
3574 yy_reduce_print (yyvsp, Rule); \
3577 /* Nonzero means print parse trace. It is left uninitialized so that
3578 multiple parsers can coexist. */
3580 #else /* !YYDEBUG */
3581 # define YYDPRINTF(Args)
3582 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
3583 # define YY_STACK_PRINT(Bottom, Top)
3584 # define YY_REDUCE_PRINT(Rule)
3585 #endif /* !YYDEBUG */
3588 /* YYINITDEPTH -- initial size of the parser's stacks. */
3590 # define YYINITDEPTH 200
3593 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
3594 if the built-in stack extension method is used).
3596 Do not make this value too large; the results are undefined if
3597 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
3598 evaluated with infinite-precision integer arithmetic. */
3601 # define YYMAXDEPTH 10000
3609 # if defined __GLIBC__ && defined _STRING_H
3610 # define yystrlen strlen
3612 /* Return the length of YYSTR. */
3613 #if (defined __STDC__ || defined __C99__FUNC__ \
3614 || defined __cplusplus || defined _MSC_VER)
3616 yystrlen (const char *yystr)
3624 for (yylen = 0; yystr[yylen]; yylen++)
3632 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
3633 # define yystpcpy stpcpy
3635 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
3637 #if (defined __STDC__ || defined __C99__FUNC__ \
3638 || defined __cplusplus || defined _MSC_VER)
3640 yystpcpy (char *yydest, const char *yysrc)
3643 yystpcpy (yydest, yysrc)
3649 const char *yys = yysrc;
3651 while ((*yyd++ = *yys++) != '\0')
3660 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
3661 quotes and backslashes, so that it's suitable for yyerror. The
3662 heuristic is that double-quoting is unnecessary unless the string
3663 contains an apostrophe, a comma, or backslash (other than
3664 backslash-backslash). YYSTR is taken from yytname. If YYRES is
3665 null, do not copy; instead, return the length of what the result
3668 yytnamerr (char *yyres, const char *yystr)
3673 char const *yyp = yystr;
3680 goto do_not_strip_quotes;
3684 goto do_not_strip_quotes;
3697 do_not_strip_quotes: ;
3701 return yystrlen (yystr);
3703 return yystpcpy (yyres, yystr) - yyres;
3707 /* Copy into YYRESULT an error message about the unexpected token
3708 YYCHAR while in state YYSTATE. Return the number of bytes copied,
3709 including the terminating null byte. If YYRESULT is null, do not
3710 copy anything; just return the number of bytes that would be
3711 copied. As a special case, return 0 if an ordinary "syntax error"
3712 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
3713 size calculation. */
3715 yysyntax_error (char *yyresult, int yystate, int yychar)
3717 int yyn = yypact[yystate];
3719 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
3723 int yytype = YYTRANSLATE (yychar);
3724 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
3725 YYSIZE_T yysize = yysize0;
3727 int yysize_overflow = 0;
3728 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
3729 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
3733 /* This is so xgettext sees the translatable formats that are
3734 constructed on the fly. */
3735 YY_("syntax error, unexpected %s");
3736 YY_("syntax error, unexpected %s, expecting %s");
3737 YY_("syntax error, unexpected %s, expecting %s or %s");
3738 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
3739 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
3743 static char const yyunexpected[] = "syntax error, unexpected %s";
3744 static char const yyexpecting[] = ", expecting %s";
3745 static char const yyor[] = " or %s";
3746 char yyformat[sizeof yyunexpected
3747 + sizeof yyexpecting - 1
3748 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
3749 * (sizeof yyor - 1))];
3750 char const *yyprefix = yyexpecting;
3752 /* Start YYX at -YYN if negative to avoid negative indexes in
3754 int yyxbegin = yyn < 0 ? -yyn : 0;
3756 /* Stay within bounds of both yycheck and yytname. */
3757 int yychecklim = YYLAST - yyn + 1;
3758 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
3761 yyarg[0] = yytname[yytype];
3762 yyfmt = yystpcpy (yyformat, yyunexpected);
3764 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
3765 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
3767 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
3771 yyformat[sizeof yyunexpected - 1] = '\0';
3774 yyarg[yycount++] = yytname[yyx];
3775 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
3776 yysize_overflow |= (yysize1 < yysize);
3778 yyfmt = yystpcpy (yyfmt, yyprefix);
3782 yyf = YY_(yyformat);
3783 yysize1 = yysize + yystrlen (yyf);
3784 yysize_overflow |= (yysize1 < yysize);
3787 if (yysize_overflow)
3788 return YYSIZE_MAXIMUM;
3792 /* Avoid sprintf, as that infringes on the user's name space.
3793 Don't have undefined behavior even if the translation
3794 produced a string with the wrong number of "%s"s. */
3795 char *yyp = yyresult;
3797 while ((*yyp = *yyf) != '\0')
3799 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
3801 yyp += yytnamerr (yyp, yyarg[yyi++]);
3814 #endif /* YYERROR_VERBOSE */
3817 /*-----------------------------------------------.
3818 | Release the memory associated to this symbol. |
3819 `-----------------------------------------------*/
3822 #if (defined __STDC__ || defined __C99__FUNC__ \
3823 || defined __cplusplus || defined _MSC_VER)
3825 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
3828 yydestruct (yymsg, yytype, yyvaluep)
3838 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
3848 /* Prevent warnings from -Wmissing-prototypes. */
3849 #ifdef YYPARSE_PARAM
3850 #if defined __STDC__ || defined __cplusplus
3851 int yyparse (void *YYPARSE_PARAM);
3855 #else /* ! YYPARSE_PARAM */
3856 #if defined __STDC__ || defined __cplusplus
3861 #endif /* ! YYPARSE_PARAM */
3864 /* The lookahead symbol. */
3867 /* The semantic value of the lookahead symbol. */
3870 /* Number of syntax errors so far. */
3875 /*-------------------------.
3876 | yyparse or yypush_parse. |
3877 `-------------------------*/
3879 #ifdef YYPARSE_PARAM
3880 #if (defined __STDC__ || defined __C99__FUNC__ \
3881 || defined __cplusplus || defined _MSC_VER)
3883 yyparse (void *YYPARSE_PARAM)
3886 yyparse (YYPARSE_PARAM)
3887 void *YYPARSE_PARAM;
3889 #else /* ! YYPARSE_PARAM */
3890 #if (defined __STDC__ || defined __C99__FUNC__ \
3891 || defined __cplusplus || defined _MSC_VER)
3904 /* Number of tokens to shift before error messages enabled. */
3907 /* The stacks and their tools:
3908 `yyss': related to states.
3909 `yyvs': related to semantic values.
3911 Refer to the stacks thru separate pointers, to allow yyoverflow
3912 to reallocate them elsewhere. */
3914 /* The state stack. */
3915 yytype_int16 yyssa[YYINITDEPTH];
3917 yytype_int16 *yyssp;
3919 /* The semantic value stack. */
3920 YYSTYPE yyvsa[YYINITDEPTH];
3924 YYSIZE_T yystacksize;
3928 /* Lookahead token as an internal (translated) token number. */
3930 /* The variables used to return semantic value and location from the
3935 /* Buffer for error messages, and its allocated size. */
3937 char *yymsg = yymsgbuf;
3938 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
3941 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
3943 /* The number of symbols on the RHS of the reduced rule.
3944 Keep to zero when no symbol should be popped. */
3950 yystacksize = YYINITDEPTH;
3952 YYDPRINTF ((stderr, "Starting parse\n"));
3957 yychar = YYEMPTY; /* Cause a token to be read. */
3959 /* Initialize stack pointers.
3960 Waste one element of value and location stack
3961 so that they stay on the same level as the state stack.
3962 The wasted elements are never initialized. */
3968 /*------------------------------------------------------------.
3969 | yynewstate -- Push a new state, which is found in yystate. |
3970 `------------------------------------------------------------*/
3972 /* In all cases, when you get here, the value and location stacks
3973 have just been pushed. So pushing a state here evens the stacks. */
3979 if (yyss + yystacksize - 1 <= yyssp)
3981 /* Get the current used size of the three stacks, in elements. */
3982 YYSIZE_T yysize = yyssp - yyss + 1;
3986 /* Give user a chance to reallocate the stack. Use copies of
3987 these so that the &'s don't force the real ones into
3989 YYSTYPE *yyvs1 = yyvs;
3990 yytype_int16 *yyss1 = yyss;
3992 /* Each stack pointer address is followed by the size of the
3993 data in use in that stack, in bytes. This used to be a
3994 conditional around just the two extra args, but that might
3995 be undefined if yyoverflow is a macro. */
3996 yyoverflow (YY_("memory exhausted"),
3997 &yyss1, yysize * sizeof (*yyssp),
3998 &yyvs1, yysize * sizeof (*yyvsp),
4004 #else /* no yyoverflow */
4005 # ifndef YYSTACK_RELOCATE
4006 goto yyexhaustedlab;
4008 /* Extend the stack our own way. */
4009 if (YYMAXDEPTH <= yystacksize)
4010 goto yyexhaustedlab;
4012 if (YYMAXDEPTH < yystacksize)
4013 yystacksize = YYMAXDEPTH;
4016 yytype_int16 *yyss1 = yyss;
4017 union yyalloc *yyptr =
4018 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
4020 goto yyexhaustedlab;
4021 YYSTACK_RELOCATE (yyss_alloc, yyss);
4022 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
4023 # undef YYSTACK_RELOCATE
4025 YYSTACK_FREE (yyss1);
4028 #endif /* no yyoverflow */
4030 yyssp = yyss + yysize - 1;
4031 yyvsp = yyvs + yysize - 1;
4033 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
4034 (unsigned long int) yystacksize));
4036 if (yyss + yystacksize - 1 <= yyssp)
4040 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
4042 if (yystate == YYFINAL)
4052 /* Do appropriate processing given the current state. Read a
4053 lookahead token if we need one and don't already have one. */
4055 /* First try to decide what to do without reference to lookahead token. */
4056 yyn = yypact[yystate];
4057 if (yyn == YYPACT_NINF)
4060 /* Not known => get a lookahead token if don't already have one. */
4062 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
4063 if (yychar == YYEMPTY)
4065 YYDPRINTF ((stderr, "Reading a token: "));
4069 if (yychar <= YYEOF)
4071 yychar = yytoken = YYEOF;
4072 YYDPRINTF ((stderr, "Now at end of input.\n"));
4076 yytoken = YYTRANSLATE (yychar);
4077 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
4080 /* If the proper action on seeing token YYTOKEN is to reduce or to
4081 detect an error, take that action. */
4083 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
4088 if (yyn == 0 || yyn == YYTABLE_NINF)
4094 /* Count tokens shifted since error; after three, turn off error
4099 /* Shift the lookahead token. */
4100 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
4102 /* Discard the shifted token. */
4111 /*-----------------------------------------------------------.
4112 | yydefault -- do the default action for the current state. |
4113 `-----------------------------------------------------------*/
4115 yyn = yydefact[yystate];
4121 /*-----------------------------.
4122 | yyreduce -- Do a reduction. |
4123 `-----------------------------*/
4125 /* yyn is the number of a rule to reduce with. */
4128 /* If YYLEN is nonzero, implement the default value of the action:
4131 Otherwise, the following line sets YYVAL to garbage.
4132 This behavior is undocumented and Bison
4133 users should not rely upon it. Assigning to YYVAL
4134 unconditionally makes the parser a bit smaller, and it avoids a
4135 GCC warning that YYVAL may be used uninitialized. */
4136 yyval = yyvsp[1-yylen];
4139 YY_REDUCE_PRINT (yyn);
4146 /* Line 1464 of skeleton.m4 */
4147 #line 1920 "parser.y"
4148 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4157 /* Line 1464 of skeleton.m4 */
4158 #line 1921 "parser.y"
4159 {(yyval.code)=code_new();}
4168 /* Line 1464 of skeleton.m4 */
4169 #line 1923 "parser.y"
4170 {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
4179 /* Line 1464 of skeleton.m4 */
4180 #line 1924 "parser.y"
4181 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4190 /* Line 1464 of skeleton.m4 */
4191 #line 1939 "parser.y"
4192 {(yyval.code)=(yyvsp[(2) - (3)].code);}
4201 /* Line 1464 of skeleton.m4 */
4202 #line 1940 "parser.y"
4212 /* Line 1464 of skeleton.m4 */
4213 #line 1943 "parser.y"
4223 /* Line 1464 of skeleton.m4 */
4224 #line 1950 "parser.y"
4225 {(yyval.code)=(yyvsp[(3) - (4)].code);}
4234 /* Line 1464 of skeleton.m4 */
4235 #line 1954 "parser.y"
4236 {(yyval.code)=(yyvsp[(1) - (2)].code);}
4245 /* Line 1464 of skeleton.m4 */
4246 #line 1955 "parser.y"
4247 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4256 /* Line 1464 of skeleton.m4 */
4257 #line 1959 "parser.y"
4259 code_t**cc = &global->init->method->body->code;
4260 *cc = code_append(*cc, (yyvsp[(1) - (1)].code));
4270 /* Line 1464 of skeleton.m4 */
4271 #line 1970 "parser.y"
4272 {(yyval.value)=(yyvsp[(2) - (2)].value);}
4281 /* Line 1464 of skeleton.m4 */
4282 #line 1971 "parser.y"
4283 {(yyval.value).c=abc_pushundefined(0);
4284 (yyval.value).t=TYPE_ANY;
4294 /* Line 1464 of skeleton.m4 */
4295 #line 1975 "parser.y"
4296 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4305 /* Line 1464 of skeleton.m4 */
4306 #line 1976 "parser.y"
4307 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4316 /* Line 1464 of skeleton.m4 */
4317 #line 1978 "parser.y"
4318 {(yyval.code) = (yyvsp[(1) - (1)].code);}
4327 /* Line 1464 of skeleton.m4 */
4328 #line 1979 "parser.y"
4329 {(yyval.code) = code_append((yyvsp[(1) - (3)].code), (yyvsp[(3) - (3)].code));}
4338 /* Line 1464 of skeleton.m4 */
4339 #line 1982 "parser.y"
4342 if(variable_exists((yyvsp[(1) - (3)].id)))
4343 syntaxerror("Variable %s already defined", (yyvsp[(1) - (3)].id));
4345 new_variable((yyvsp[(1) - (3)].id), 0, 1, 0);
4348 if(!is_subtype_of((yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo))) {
4349 syntaxerror("Can't convert %s to %s", (yyvsp[(3) - (3)].value).t->name,
4350 (yyvsp[(2) - (3)].classinfo)->name);
4355 if(state->method->uses_slots) {
4356 variable_t* v = find_slot(state, (yyvsp[(1) - (3)].id));
4358 // this variable is stored in a slot
4360 v->type = (yyvsp[(2) - (3)].classinfo);
4366 index = new_variable((yyvsp[(1) - (3)].id), (yyvsp[(2) - (3)].classinfo), 1, 0);
4369 (yyval.code) = slot?abc_getscopeobject(0, 1):0;
4371 if((yyvsp[(2) - (3)].classinfo)) {
4372 if((yyvsp[(3) - (3)].value).c->prev || (yyvsp[(3) - (3)].value).c->opcode != OPCODE_PUSHUNDEFINED) {
4373 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (3)].value).c);
4374 (yyval.code) = converttype((yyval.code), (yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo));
4376 code_free((yyvsp[(3) - (3)].value).c);
4377 (yyval.code) = defaultvalue((yyval.code), (yyvsp[(2) - (3)].classinfo));
4380 if((yyvsp[(3) - (3)].value).c->prev || (yyvsp[(3) - (3)].value).c->opcode != OPCODE_PUSHUNDEFINED) {
4381 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (3)].value).c);
4382 (yyval.code) = abc_coerce_a((yyval.code));
4384 // don't do anything
4385 code_free((yyvsp[(3) - (3)].value).c);
4386 code_free((yyval.code));
4392 (yyval.code) = abc_setslot((yyval.code), index);
4394 (yyval.code) = abc_setlocal((yyval.code), index);
4405 /* Line 1464 of skeleton.m4 */
4406 #line 2042 "parser.y"
4407 {(yyval.code) = code_new();}
4416 /* Line 1464 of skeleton.m4 */
4417 #line 2043 "parser.y"
4418 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4427 /* Line 1464 of skeleton.m4 */
4428 #line 2046 "parser.y"
4429 {PASS12 new_state();}
4438 /* Line 1464 of skeleton.m4 */
4439 #line 2046 "parser.y"
4442 (yyval.code) = code_new();
4443 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (7)].value).c);
4444 code_t*myjmp,*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4446 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].code));
4447 if((yyvsp[(7) - (7)].code)) {
4448 myjmp = (yyval.code) = abc_jump((yyval.code), 0);
4450 myif->branch = (yyval.code) = abc_nop((yyval.code));
4451 if((yyvsp[(7) - (7)].code)) {
4452 (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (7)].code));
4453 myjmp->branch = (yyval.code) = abc_nop((yyval.code));
4455 (yyval.code) = var_block((yyval.code));
4466 /* Line 1464 of skeleton.m4 */
4467 #line 2065 "parser.y"
4468 {(yyval.code)=code_new();}
4477 /* Line 1464 of skeleton.m4 */
4478 #line 2072 "parser.y"
4480 PASS1 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable((yyvsp[(2) - (3)].id),0,1,0);
4481 PASS2 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable((yyvsp[(2) - (3)].id),(yyvsp[(3) - (3)].classinfo),1,0);
4491 /* Line 1464 of skeleton.m4 */
4492 #line 2076 "parser.y"
4495 (yyval.id)=(yyvsp[(1) - (1)].id);
4505 /* Line 1464 of skeleton.m4 */
4506 #line 2081 "parser.y"
4507 {PASS12 new_state();(yyval.for_start).name=(yyvsp[(1) - (2)].id);(yyval.for_start).each=0;}
4516 /* Line 1464 of skeleton.m4 */
4517 #line 2082 "parser.y"
4518 {PASS12 new_state();(yyval.for_start).name=(yyvsp[(1) - (3)].id);(yyval.for_start).each=1;}
4527 /* Line 1464 of skeleton.m4 */
4528 #line 2084 "parser.y"
4530 if((yyvsp[(1) - (8)].for_start).each) syntaxerror("invalid syntax: ; not allowed in for each statement");
4531 (yyval.code) = code_new();
4532 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (8)].code));
4533 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4534 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (8)].value).c);
4535 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4536 (yyval.code) = code_append((yyval.code), (yyvsp[(8) - (8)].code));
4537 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4538 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (8)].code));
4539 (yyval.code) = abc_jump((yyval.code), loopstart);
4540 code_t*out = (yyval.code) = abc_nop((yyval.code));
4541 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, out);
4542 continuejumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, cont);
4545 (yyval.code) = var_block((yyval.code));
4556 /* Line 1464 of skeleton.m4 */
4557 #line 2104 "parser.y"
4559 variable_t*var = find_variable(state, (yyvsp[(2) - (6)].id));
4560 char*tmp1name = concat2((yyvsp[(2) - (6)].id), "__tmp1__");
4561 int it = new_variable(tmp1name, TYPE_INT, 0, 0);
4562 char*tmp2name = concat2((yyvsp[(2) - (6)].id), "__array__");
4563 int array = new_variable(tmp1name, 0, 0, 0);
4565 (yyval.code) = code_new();
4566 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
4567 (yyval.code) = abc_coerce_a((yyval.code));
4568 (yyval.code) = abc_setlocal((yyval.code), array);
4569 (yyval.code) = abc_pushbyte((yyval.code), 0);
4570 (yyval.code) = abc_setlocal((yyval.code), it);
4572 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4574 (yyval.code) = abc_hasnext2((yyval.code), array, it);
4575 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4576 (yyval.code) = abc_getlocal((yyval.code), array);
4577 (yyval.code) = abc_getlocal((yyval.code), it);
4578 if(!(yyvsp[(1) - (6)].for_start).each)
4579 (yyval.code) = abc_nextname((yyval.code));
4581 (yyval.code) = abc_nextvalue((yyval.code));
4582 (yyval.code) = converttype((yyval.code), 0, var->type);
4583 (yyval.code) = abc_setlocal((yyval.code), var->index);
4585 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
4586 (yyval.code) = abc_jump((yyval.code), loopstart);
4588 code_t*out = (yyval.code) = abc_nop((yyval.code));
4589 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, out);
4590 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, loopstart);
4594 (yyval.code) = var_block((yyval.code));
4609 /* Line 1464 of skeleton.m4 */
4610 #line 2148 "parser.y"
4611 {PASS12 new_state();}
4620 /* Line 1464 of skeleton.m4 */
4621 #line 2148 "parser.y"
4624 (yyval.code) = code_new();
4626 code_t*myjmp = (yyval.code) = abc_jump((yyval.code), 0);
4627 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4628 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
4629 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4630 myjmp->branch = cont;
4631 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
4632 (yyval.code) = abc_iftrue((yyval.code), loopstart);
4633 code_t*out = (yyval.code) = abc_nop((yyval.code));
4634 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].id), out);
4635 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].id), cont);
4637 (yyval.code) = var_block((yyval.code));
4648 /* Line 1464 of skeleton.m4 */
4649 #line 2167 "parser.y"
4650 {PASS12 new_state();}
4659 /* Line 1464 of skeleton.m4 */
4660 #line 2167 "parser.y"
4662 (yyval.code) = code_new();
4663 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4664 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (7)].code));
4665 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4666 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].value).c);
4667 (yyval.code) = abc_iftrue((yyval.code), loopstart);
4668 code_t*out = (yyval.code) = abc_nop((yyval.code));
4669 breakjumpsto((yyval.code), (yyvsp[(1) - (7)].id), out);
4670 continuejumpsto((yyval.code), (yyvsp[(1) - (7)].id), cont);
4672 (yyval.code) = var_block((yyval.code));
4683 /* Line 1464 of skeleton.m4 */
4684 #line 2182 "parser.y"
4686 (yyval.code) = abc___break__(0, "");
4696 /* Line 1464 of skeleton.m4 */
4697 #line 2185 "parser.y"
4699 (yyval.code) = abc___break__(0, (yyvsp[(2) - (2)].id));
4709 /* Line 1464 of skeleton.m4 */
4710 #line 2188 "parser.y"
4712 (yyval.code) = abc___continue__(0, "");
4722 /* Line 1464 of skeleton.m4 */
4723 #line 2191 "parser.y"
4725 (yyval.code) = abc___continue__(0, (yyvsp[(2) - (2)].id));
4735 /* Line 1464 of skeleton.m4 */
4736 #line 2195 "parser.y"
4746 /* Line 1464 of skeleton.m4 */
4747 #line 2196 "parser.y"
4748 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4757 /* Line 1464 of skeleton.m4 */
4758 #line 2197 "parser.y"
4759 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4768 /* Line 1464 of skeleton.m4 */
4769 #line 2198 "parser.y"
4770 {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
4779 /* Line 1464 of skeleton.m4 */
4780 #line 2199 "parser.y"
4781 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4790 /* Line 1464 of skeleton.m4 */
4791 #line 2200 "parser.y"
4792 {(yyval.code)=code_append((yyval.code),(yyvsp[(2) - (2)].code));}
4801 /* Line 1464 of skeleton.m4 */
4802 #line 2202 "parser.y"
4804 (yyval.code) = abc_dup(0);
4805 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (4)].value).c);
4806 code_t*j = (yyval.code) = abc_ifne((yyval.code), 0);
4807 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (4)].code));
4808 if((yyval.code)->opcode != OPCODE___BREAK__) {
4809 (yyval.code) = abc___fallthrough__((yyval.code), "");
4811 code_t*e = (yyval.code) = abc_nop((yyval.code));
4822 /* Line 1464 of skeleton.m4 */
4823 #line 2213 "parser.y"
4825 (yyval.code) = (yyvsp[(3) - (3)].code);
4835 /* Line 1464 of skeleton.m4 */
4836 #line 2216 "parser.y"
4837 {PASS12 new_state();}
4846 /* Line 1464 of skeleton.m4 */
4847 #line 2216 "parser.y"
4849 (yyval.code)=(yyvsp[(4) - (8)].value).c;
4850 (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (8)].code));
4851 code_t*out = (yyval.code) = abc_pop((yyval.code));
4852 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].id), out);
4854 code_t*c = (yyval.code),*lastblock=0;
4856 if(c->opcode == OPCODE_IFNE) {
4857 if(!c->next) syntaxerror("internal error in fallthrough handling");
4859 } else if(c->opcode == OPCODE___FALLTHROUGH__) {
4861 c->opcode = OPCODE_JUMP;
4862 c->branch = lastblock;
4864 /* fall through end of switch */
4865 c->opcode = OPCODE_NOP;
4871 (yyval.code) = var_block((yyval.code));
4882 /* Line 1464 of skeleton.m4 */
4883 #line 2245 "parser.y"
4884 {PASS12 new_state();
4885 state->exception_name=(yyvsp[(3) - (5)].id);
4886 PASS1 new_variable((yyvsp[(3) - (5)].id), 0, 0, 0);
4887 PASS2 new_variable((yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].classinfo), 0, 0);
4897 /* Line 1464 of skeleton.m4 */
4898 #line 2250 "parser.y"
4900 namespace_t name_ns = {ACCESS_PACKAGE, ""};
4901 multiname_t name = {QNAME, &name_ns, 0, (yyvsp[(3) - (9)].id)};
4903 NEW(abc_exception_t, e)
4904 e->exc_type = sig2mname((yyvsp[(4) - (9)].classinfo));
4905 e->var_name = multiname_clone(&name);
4906 (yyval.exception) = e;
4909 int i = find_variable_safe(state, (yyvsp[(3) - (9)].id))->index;
4910 e->target = c = abc_nop(0);
4911 c = abc_setlocal(c, i);
4912 c = code_append(c, (yyvsp[(8) - (9)].code));
4926 /* Line 1464 of skeleton.m4 */
4927 #line 2269 "parser.y"
4928 {PASS12 new_state();state->exception_name=0;}
4937 /* Line 1464 of skeleton.m4 */
4938 #line 2269 "parser.y"
4940 (yyvsp[(4) - (5)].code) = var_block((yyvsp[(4) - (5)].code));
4941 if(!(yyvsp[(4) - (5)].code)) {
4942 (yyval.exception)=0;
4944 NEW(abc_exception_t, e)
4945 e->exc_type = 0; //all exceptions
4946 e->var_name = 0; //no name
4949 e->to = code_append(e->to, (yyvsp[(4) - (5)].code));
4950 (yyval.exception) = e;
4962 /* Line 1464 of skeleton.m4 */
4963 #line 2285 "parser.y"
4964 {(yyval.catch_list).l=list_new();(yyval.catch_list).finally=0;list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));}
4973 /* Line 1464 of skeleton.m4 */
4974 #line 2286 "parser.y"
4975 {(yyval.catch_list)=(yyvsp[(1) - (2)].catch_list);list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));}
4984 /* Line 1464 of skeleton.m4 */
4985 #line 2287 "parser.y"
4986 {(yyval.catch_list)=(yyvsp[(1) - (1)].catch_list);}
4995 /* Line 1464 of skeleton.m4 */
4996 #line 2288 "parser.y"
4998 (yyval.catch_list) = (yyvsp[(1) - (2)].catch_list);
4999 (yyval.catch_list).finally = 0;
5000 if((yyvsp[(2) - (2)].exception)) {
5001 list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));
5002 (yyval.catch_list).finally = (yyvsp[(2) - (2)].exception)->to;(yyvsp[(2) - (2)].exception)->to=0;
5013 /* Line 1464 of skeleton.m4 */
5014 #line 2296 "parser.y"
5016 (yyval.catch_list).l=list_new();
5017 (yyval.catch_list).finally = 0;
5018 if((yyvsp[(1) - (1)].exception)) {
5019 list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));
5020 (yyval.catch_list).finally = (yyvsp[(1) - (1)].exception)->to;(yyvsp[(1) - (1)].exception)->to=0;
5031 /* Line 1464 of skeleton.m4 */
5032 #line 2305 "parser.y"
5033 {PASS12 new_state();}
5042 /* Line 1464 of skeleton.m4 */
5043 #line 2305 "parser.y"
5045 code_t*out = abc_nop(0);
5047 code_t*start = abc_nop(0);
5048 (yyval.code) = code_append(start, (yyvsp[(4) - (6)].code));
5049 if(!is_break_or_jump((yyvsp[(4) - (6)].code))) {
5050 (yyval.code) = abc_jump((yyval.code), out);
5052 code_t*end = (yyval.code) = abc_nop((yyval.code));
5055 if((yyvsp[(6) - (6)].catch_list).finally)
5056 tmp = new_variable("__finally__", 0, 0, 0);
5058 abc_exception_list_t*l = (yyvsp[(6) - (6)].catch_list).l;
5061 abc_exception_t*e = l->abc_exception;
5063 (yyval.code) = code_append((yyval.code), e->target);
5064 (yyval.code) = abc_jump((yyval.code), out);
5066 parserassert((ptroff_t)(yyvsp[(6) - (6)].catch_list).finally);
5068 e->target = (yyval.code) = abc_nop((yyval.code));
5069 (yyval.code) = abc___rethrow__((yyval.code));
5077 (yyval.code) = code_append((yyval.code), out);
5079 (yyval.code) = insert_finally((yyval.code), (yyvsp[(6) - (6)].catch_list).finally, tmp);
5081 list_concat(state->method->exceptions, (yyvsp[(6) - (6)].catch_list).l);
5083 (yyval.code) = var_block((yyval.code));
5094 /* Line 1464 of skeleton.m4 */
5095 #line 2350 "parser.y"
5097 (yyval.code)=(yyvsp[(2) - (2)].value).c;
5098 (yyval.code)=abc_throw((yyval.code));
5108 /* Line 1464 of skeleton.m4 */
5109 #line 2354 "parser.y"
5111 if(!state->exception_name)
5112 syntaxerror("re-throw only possible within a catch block");
5113 variable_t*v = find_variable(state, state->exception_name);
5114 (yyval.code)=code_new();
5115 (yyval.code)=abc_getlocal((yyval.code), v->index);
5116 (yyval.code)=abc_throw((yyval.code));
5126 /* Line 1464 of skeleton.m4 */
5127 #line 2365 "parser.y"
5129 (yyval.code) = (yyvsp[(3) - (5)].value).c;
5130 (yyval.code) = abc_pushscope((yyval.code));
5131 (yyval.code) = code_append((yyval.code), (yyvsp[(5) - (5)].code));
5132 (yyval.code) = abc_popscope((yyval.code));
5142 /* Line 1464 of skeleton.m4 */
5143 #line 2375 "parser.y"
5144 {PASS12 (yyval.id)="package";}
5153 /* Line 1464 of skeleton.m4 */
5154 #line 2377 "parser.y"
5155 {PASS12 (yyval.id) = concat3((yyvsp[(1) - (3)].id),".",(yyvsp[(3) - (3)].id));free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;}
5164 /* Line 1464 of skeleton.m4 */
5165 #line 2378 "parser.y"
5166 {PASS12 (yyval.id)=strdup((yyvsp[(1) - (1)].id));}
5175 /* Line 1464 of skeleton.m4 */
5176 #line 2380 "parser.y"
5177 {PASS12 startpackage((yyvsp[(2) - (3)].id));free((yyvsp[(2) - (3)].id));(yyvsp[(2) - (3)].id)=0;}
5186 /* Line 1464 of skeleton.m4 */
5187 #line 2381 "parser.y"
5188 {PASS12 endpackage();(yyval.code)=0;}
5197 /* Line 1464 of skeleton.m4 */
5198 #line 2382 "parser.y"
5199 {PASS12 startpackage("");}
5208 /* Line 1464 of skeleton.m4 */
5209 #line 2383 "parser.y"
5210 {PASS12 endpackage();(yyval.code)=0;}
5219 /* Line 1464 of skeleton.m4 */
5220 #line 2385 "parser.y"
5223 slotinfo_t*s = registry_find((yyvsp[(2) - (2)].classinfo)->package, (yyvsp[(2) - (2)].classinfo)->name);
5224 if(!s) {// || !(s->flags&FLAG_BUILTIN)) {
5225 as3_schedule_class((yyvsp[(2) - (2)].classinfo)->package, (yyvsp[(2) - (2)].classinfo)->name);
5229 classinfo_t*c = (yyvsp[(2) - (2)].classinfo);
5231 syntaxerror("Couldn't import class\n");
5232 state_has_imports();
5233 dict_put(state->imports, c->name, c);
5244 /* Line 1464 of skeleton.m4 */
5245 #line 2400 "parser.y"
5248 if(strncmp("flash.", (yyvsp[(2) - (4)].id), 6)) {
5249 as3_schedule_package((yyvsp[(2) - (4)].id));
5254 i->package = (yyvsp[(2) - (4)].id);
5255 state_has_imports();
5256 list_append(state->wildcard_imports, i);
5267 /* Line 1464 of skeleton.m4 */
5268 #line 2416 "parser.y"
5269 {PASS12 (yyval.flags).flags=0;(yyval.flags).ns=0;}
5278 /* Line 1464 of skeleton.m4 */
5279 #line 2417 "parser.y"
5280 {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
5289 /* Line 1464 of skeleton.m4 */
5290 #line 2418 "parser.y"
5291 {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
5300 /* Line 1464 of skeleton.m4 */
5301 #line 2419 "parser.y"
5304 (yyval.flags).flags=(yyvsp[(1) - (2)].flags).flags|(yyvsp[(2) - (2)].flags).flags;
5305 if((yyvsp[(1) - (2)].flags).ns && (yyvsp[(2) - (2)].flags).ns) syntaxerror("only one namespace allowed in one declaration");
5306 (yyval.flags).ns=(yyvsp[(1) - (2)].flags).ns?(yyvsp[(1) - (2)].flags).ns:(yyvsp[(2) - (2)].flags).ns;
5317 /* Line 1464 of skeleton.m4 */
5318 #line 2427 "parser.y"
5319 {PASS12 (yyval.flags).flags=FLAG_PUBLIC;(yyval.flags).ns=0;}
5328 /* Line 1464 of skeleton.m4 */
5329 #line 2428 "parser.y"
5330 {PASS12 (yyval.flags).flags=FLAG_PRIVATE;(yyval.flags).ns=0;}
5339 /* Line 1464 of skeleton.m4 */
5340 #line 2429 "parser.y"
5341 {PASS12 (yyval.flags).flags=FLAG_PROTECTED;(yyval.flags).ns=0;}
5350 /* Line 1464 of skeleton.m4 */
5351 #line 2430 "parser.y"
5352 {PASS12 (yyval.flags).flags=FLAG_STATIC;(yyval.flags).ns=0;}
5361 /* Line 1464 of skeleton.m4 */
5362 #line 2431 "parser.y"
5363 {PASS12 (yyval.flags).flags=FLAG_DYNAMIC;(yyval.flags).ns=0;}
5372 /* Line 1464 of skeleton.m4 */
5373 #line 2432 "parser.y"
5374 {PASS12 (yyval.flags).flags=FLAG_FINAL;(yyval.flags).ns=0;}
5383 /* Line 1464 of skeleton.m4 */
5384 #line 2433 "parser.y"
5385 {PASS12 (yyval.flags).flags=FLAG_OVERRIDE;(yyval.flags).ns=0;}
5394 /* Line 1464 of skeleton.m4 */
5395 #line 2434 "parser.y"
5396 {PASS12 (yyval.flags).flags=FLAG_NATIVE;(yyval.flags).ns=0;}
5405 /* Line 1464 of skeleton.m4 */
5406 #line 2435 "parser.y"
5407 {PASS12 (yyval.flags).flags=FLAG_PACKAGEINTERNAL;(yyval.flags).ns=0;}
5416 /* Line 1464 of skeleton.m4 */
5417 #line 2436 "parser.y"
5418 {PASS12 (yyval.flags).flags=FLAG_NAMESPACE;
5419 (yyval.flags).ns=(yyvsp[(1) - (1)].id);
5429 /* Line 1464 of skeleton.m4 */
5430 #line 2440 "parser.y"
5431 {(yyval.classinfo)=registry_getobjectclass();}
5440 /* Line 1464 of skeleton.m4 */
5441 #line 2441 "parser.y"
5442 {(yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
5451 /* Line 1464 of skeleton.m4 */
5452 #line 2443 "parser.y"
5453 {PASS12 (yyval.classinfo_list)=list_new();}
5462 /* Line 1464 of skeleton.m4 */
5463 #line 2444 "parser.y"
5464 {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
5473 /* Line 1464 of skeleton.m4 */
5474 #line 2446 "parser.y"
5475 {PASS12 (yyval.classinfo_list)=list_new();}
5484 /* Line 1464 of skeleton.m4 */
5485 #line 2447 "parser.y"
5486 {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
5495 /* Line 1464 of skeleton.m4 */
5496 #line 2451 "parser.y"
5497 {PASS12 startclass(&(yyvsp[(1) - (6)].flags),(yyvsp[(3) - (6)].id),(yyvsp[(4) - (6)].classinfo),(yyvsp[(5) - (6)].classinfo_list));}
5506 /* Line 1464 of skeleton.m4 */
5507 #line 2453 "parser.y"
5508 {PASS12 endclass();(yyval.code)=0;}
5517 /* Line 1464 of skeleton.m4 */
5518 #line 2457 "parser.y"
5519 {PASS12 (yyvsp[(1) - (5)].flags).flags|=FLAG_INTERFACE;
5520 startclass(&(yyvsp[(1) - (5)].flags),(yyvsp[(3) - (5)].id),0,(yyvsp[(4) - (5)].classinfo_list));}
5529 /* Line 1464 of skeleton.m4 */
5530 #line 2460 "parser.y"
5531 {PASS12 endclass();(yyval.code)=0;}
5540 /* Line 1464 of skeleton.m4 */
5541 #line 2473 "parser.y"
5543 code_t*c = state->cls->static_init->header;
5544 c = code_append(c, (yyvsp[(1) - (1)].code));
5545 state->cls->static_init->header = c;
5555 /* Line 1464 of skeleton.m4 */
5556 #line 2484 "parser.y"
5558 syntaxerror("variable declarations not allowed in interfaces");
5568 /* Line 1464 of skeleton.m4 */
5569 #line 2487 "parser.y"
5572 (yyvsp[(1) - (8)].flags).flags |= FLAG_PUBLIC;
5573 if((yyvsp[(1) - (8)].flags).flags&(FLAG_PRIVATE|FLAG_PACKAGEINTERNAL|FLAG_PROTECTED)) {
5574 syntaxerror("invalid method modifiers: interface methods always need to be public");
5576 startfunction(&(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo));
5577 endfunction(&(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo), 0);
5578 list_deep_free((yyvsp[(6) - (8)].params).list);
5588 /* Line 1464 of skeleton.m4 */
5589 #line 2502 "parser.y"
5590 {setstaticfunction((yyvsp[(1) - (3)].flags).flags);}
5599 /* Line 1464 of skeleton.m4 */
5600 #line 2502 "parser.y"
5602 int flags = (yyvsp[(1) - (6)].flags).flags;
5603 namespace_t ns = modifiers2access(&(yyvsp[(1) - (6)].flags));
5605 varinfo_t* info = 0;
5607 memberinfo_t*i = registry_findmember(state->cls->info, ns.name, (yyvsp[(3) - (6)].id), 1);
5609 check_override(i, flags);
5611 info = varinfo_register_onclass(state->cls->info, ns.access, ns.name, (yyvsp[(3) - (6)].id));
5613 slotinfo_t*i = registry_find(state->package, (yyvsp[(3) - (6)].id));
5615 syntaxerror("package %s already contains '%s'", state->package, (yyvsp[(3) - (6)].id));
5617 if(ns.name && ns.name[0]) {
5618 syntaxerror("namespaces not allowed on package-level variables");
5620 info = varinfo_register_global(ns.access, state->package, (yyvsp[(3) - (6)].id));
5623 info->type = (yyvsp[(5) - (6)].classinfo);
5624 info->flags = flags;
5627 multiname_t mname = {QNAME, &ns, 0, (yyvsp[(3) - (6)].id)};
5629 trait_list_t**traits;
5633 ns.name = state->package;
5634 traits = &global->init->traits;
5635 code = &global->init->method->body->code;
5636 } else if(flags&FLAG_STATIC) {
5638 traits = &state->cls->abc->static_traits;
5639 code = &state->cls->static_init->header;
5641 // instance variable
5642 traits = &state->cls->abc->traits;
5643 code = &state->cls->init->header;
5647 if((yyvsp[(5) - (6)].classinfo)) {
5648 MULTINAME(m, (yyvsp[(5) - (6)].classinfo));
5649 t = trait_new_member(traits, multiname_clone(&m), multiname_clone(&mname), 0);
5651 t = trait_new_member(traits, 0, multiname_clone(&mname), 0);
5653 info->slot = t->slot_id;
5655 /* initalization code (if needed) */
5657 if((yyvsp[(6) - (6)].value).c && !is_pushundefined((yyvsp[(6) - (6)].value).c)) {
5658 c = abc_getlocal_0(c);
5659 c = code_append(c, (yyvsp[(6) - (6)].value).c);
5660 c = converttype(c, (yyvsp[(6) - (6)].value).t, (yyvsp[(5) - (6)].classinfo));
5661 c = abc_setslot(c, t->slot_id);
5664 *code = code_append(*code, c);
5666 if((yyvsp[(2) - (6)].token)==KW_CONST) {
5667 t->kind= TRAIT_CONST;
5671 setstaticfunction(0);
5681 /* Line 1464 of skeleton.m4 */
5682 #line 2577 "parser.y"
5683 {(yyval.constant)=0;}
5692 /* Line 1464 of skeleton.m4 */
5693 #line 2578 "parser.y"
5694 {(yyval.constant)=(yyvsp[(2) - (2)].constant);}
5703 /* Line 1464 of skeleton.m4 */
5704 #line 2580 "parser.y"
5705 {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_uint));}
5714 /* Line 1464 of skeleton.m4 */
5715 #line 2581 "parser.y"
5716 {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_int));}
5725 /* Line 1464 of skeleton.m4 */
5726 #line 2582 "parser.y"
5727 {(yyval.constant) = constant_new_uint((yyvsp[(1) - (1)].number_uint));}
5736 /* Line 1464 of skeleton.m4 */
5737 #line 2583 "parser.y"
5738 {(yyval.constant) = constant_new_float((yyvsp[(1) - (1)].number_float));}
5747 /* Line 1464 of skeleton.m4 */
5748 #line 2584 "parser.y"
5749 {(yyval.constant) = constant_new_string2((yyvsp[(1) - (1)].str).str,(yyvsp[(1) - (1)].str).len);free((char*)(yyvsp[(1) - (1)].str).str);}
5758 /* Line 1464 of skeleton.m4 */
5759 #line 2586 "parser.y"
5760 {(yyval.constant) = constant_new_true((yyvsp[(1) - (1)].token));}
5769 /* Line 1464 of skeleton.m4 */
5770 #line 2587 "parser.y"
5771 {(yyval.constant) = constant_new_false((yyvsp[(1) - (1)].token));}
5780 /* Line 1464 of skeleton.m4 */
5781 #line 2588 "parser.y"
5782 {(yyval.constant) = constant_new_null((yyvsp[(1) - (1)].token));}
5791 /* Line 1464 of skeleton.m4 */
5792 #line 2589 "parser.y"
5795 as3_warning("Couldn't resolve %s", (yyvsp[(1) - (1)].id));
5796 (yyval.constant) = constant_new_null((yyvsp[(1) - (1)].id));
5806 /* Line 1464 of skeleton.m4 */
5807 #line 2598 "parser.y"
5810 memset(&(yyval.params),0,sizeof((yyval.params)));
5820 /* Line 1464 of skeleton.m4 */
5821 #line 2602 "parser.y"
5824 (yyval.params)=(yyvsp[(1) - (1)].params);
5834 /* Line 1464 of skeleton.m4 */
5835 #line 2608 "parser.y"
5838 memset(&(yyval.params),0,sizeof((yyval.params)));
5839 (yyval.params).varargs=1;
5840 list_append((yyval.params).list, (yyvsp[(2) - (2)].param));
5850 /* Line 1464 of skeleton.m4 */
5851 #line 2614 "parser.y"
5854 (yyval.params) =(yyvsp[(1) - (4)].params);
5855 (yyval.params).varargs=1;
5856 list_append((yyval.params).list, (yyvsp[(4) - (4)].param));
5866 /* Line 1464 of skeleton.m4 */
5867 #line 2622 "parser.y"
5870 (yyval.params) = (yyvsp[(1) - (3)].params);
5871 list_append((yyval.params).list, (yyvsp[(3) - (3)].param));
5881 /* Line 1464 of skeleton.m4 */
5882 #line 2627 "parser.y"
5885 memset(&(yyval.params),0,sizeof((yyval.params)));
5886 list_append((yyval.params).list, (yyvsp[(1) - (1)].param));
5896 /* Line 1464 of skeleton.m4 */
5897 #line 2633 "parser.y"
5900 (yyval.param) = rfx_calloc(sizeof(param_t));
5901 (yyval.param)->name=(yyvsp[(1) - (4)].id);
5902 (yyval.param)->type = (yyvsp[(3) - (4)].classinfo);
5904 (yyval.param)->value = (yyvsp[(4) - (4)].constant);
5914 /* Line 1464 of skeleton.m4 */
5915 #line 2641 "parser.y"
5918 (yyval.param) = rfx_calloc(sizeof(param_t));
5919 (yyval.param)->name=(yyvsp[(1) - (2)].id);
5920 (yyval.param)->type = TYPE_ANY;
5922 (yyval.param)->value = (yyvsp[(2) - (2)].constant);
5932 /* Line 1464 of skeleton.m4 */
5933 #line 2651 "parser.y"
5934 {PASS12 (yyval.token)=0;}
5943 /* Line 1464 of skeleton.m4 */
5944 #line 2654 "parser.y"
5945 {PASS12 startfunction(&(yyvsp[(1) - (9)].flags),(yyvsp[(3) - (9)].token),(yyvsp[(4) - (9)].id),&(yyvsp[(6) - (9)].params),(yyvsp[(8) - (9)].classinfo));}
5954 /* Line 1464 of skeleton.m4 */
5955 #line 2655 "parser.y"
5958 endfunction(&(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),0,0);
5960 if(!state->method->info) syntaxerror("internal error");
5962 code_t*c = method_header(state->method);
5963 c = wrap_function(c, 0, (yyvsp[(11) - (12)].code));
5965 endfunction(&(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),(yyvsp[(8) - (12)].classinfo),c);
5967 list_deep_free((yyvsp[(6) - (12)].params).list);
5978 /* Line 1464 of skeleton.m4 */
5979 #line 2671 "parser.y"
5980 {PASS12 (yyval.id)=0;}
5989 /* Line 1464 of skeleton.m4 */
5990 #line 2673 "parser.y"
5991 {PASS12 innerfunction((yyvsp[(2) - (7)].id),&(yyvsp[(4) - (7)].params),(yyvsp[(6) - (7)].classinfo));}
6000 /* Line 1464 of skeleton.m4 */
6001 #line 2674 "parser.y"
6004 endfunction(0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),0,0);
6006 methodinfo_t*f = state->method->info;
6007 if(!f || !f->kind) syntaxerror("internal error");
6009 code_t*c = method_header(state->method);
6010 c = wrap_function(c, 0, (yyvsp[(9) - (10)].code));
6012 int index = state->method->var_index;
6013 endfunction(0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),(yyvsp[(6) - (10)].classinfo),c);
6015 (yyval.value).c = abc_getlocal(0, index);
6016 (yyval.value).t = TYPE_FUNCTION(f);
6018 PASS12 list_deep_free((yyvsp[(4) - (10)].params).list);
6028 /* Line 1464 of skeleton.m4 */
6029 #line 2696 "parser.y"
6031 PASS1 static slotinfo_t c;
6032 memset(&c, 0, sizeof(c));
6033 c.name = (yyvsp[(1) - (1)].id);
6034 (yyval.classinfo) = (classinfo_t*)&c;
6036 slotinfo_t*s = find_class((yyvsp[(1) - (1)].id));
6037 if(!s) syntaxerror("Could not find class/method %s (current package: %s)\n", (yyvsp[(1) - (1)].id), state->package);
6038 (yyval.classinfo) = (classinfo_t*)s;
6048 /* Line 1464 of skeleton.m4 */
6049 #line 2707 "parser.y"
6051 PASS1 static slotinfo_t c;
6052 memset(&c, 0, sizeof(c));
6053 c.package = (yyvsp[(1) - (3)].id);
6054 c.name = (yyvsp[(3) - (3)].id);
6055 (yyval.classinfo)=(classinfo_t*)&c;
6057 slotinfo_t*s = registry_find((yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
6058 if(!s) syntaxerror("Couldn't find class/method %s.%s\n", (yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
6059 free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;
6060 (yyval.classinfo) = (classinfo_t*)s;
6070 /* Line 1464 of skeleton.m4 */
6071 #line 2723 "parser.y"
6072 {PASS12 (yyval.classinfo_list)=list_new();list_append((yyval.classinfo_list), (yyvsp[(1) - (1)].classinfo));}
6081 /* Line 1464 of skeleton.m4 */
6082 #line 2724 "parser.y"
6083 {PASS12 (yyval.classinfo_list)=(yyvsp[(1) - (3)].classinfo_list);list_append((yyval.classinfo_list),(yyvsp[(3) - (3)].classinfo));}
6092 /* Line 1464 of skeleton.m4 */
6093 #line 2726 "parser.y"
6094 {(yyval.classinfo)=(yyvsp[(1) - (1)].classinfo);}
6103 /* Line 1464 of skeleton.m4 */
6104 #line 2727 "parser.y"
6105 {(yyval.classinfo)=registry_getanytype();}
6114 /* Line 1464 of skeleton.m4 */
6115 #line 2728 "parser.y"
6116 {(yyval.classinfo)=registry_getanytype();}
6125 /* Line 1464 of skeleton.m4 */
6126 #line 2737 "parser.y"
6127 {(yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
6136 /* Line 1464 of skeleton.m4 */
6137 #line 2738 "parser.y"
6138 {(yyval.classinfo)=0;}
6147 /* Line 1464 of skeleton.m4 */
6148 #line 2742 "parser.y"
6149 {(yyval.value_list).cc=0;(yyval.value_list).len=0;}
6158 /* Line 1464 of skeleton.m4 */
6159 #line 2743 "parser.y"
6160 {(yyval.value_list)=(yyvsp[(2) - (3)].value_list);}
6169 /* Line 1464 of skeleton.m4 */
6170 #line 2745 "parser.y"
6171 {(yyval.value_list).cc=0;(yyval.value_list).len=0;}
6180 /* Line 1464 of skeleton.m4 */
6181 #line 2749 "parser.y"
6182 {(yyval.value_list).len=1;
6183 (yyval.value_list).cc = (yyvsp[(1) - (1)].value).c;
6193 /* Line 1464 of skeleton.m4 */
6194 #line 2753 "parser.y"
6195 {(yyval.value_list) = (yyvsp[(1) - (2)].value_list);}
6204 /* Line 1464 of skeleton.m4 */
6205 #line 2754 "parser.y"
6207 (yyval.value_list).len= (yyvsp[(1) - (2)].value_list).len+1;
6208 (yyval.value_list).cc = code_append((yyvsp[(1) - (2)].value_list).cc, (yyvsp[(2) - (2)].value).c);
6218 /* Line 1464 of skeleton.m4 */
6219 #line 2760 "parser.y"
6221 (yyval.value).c = (yyvsp[(2) - (4)].value).c;
6222 if((yyval.value).c->opcode == OPCODE_COERCE_A) (yyval.value).c = code_cutlast((yyval.value).c);
6224 code_t*paramcode = (yyvsp[(4) - (4)].value_list).cc;
6225 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6226 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6227 (yyval.value).c = code_cutlast((yyval.value).c);
6228 (yyval.value).c = code_append((yyval.value).c, paramcode);
6229 (yyval.value).c = abc_constructprop2((yyval.value).c, name, (yyvsp[(4) - (4)].value_list).len);
6230 multiname_destroy(name);
6231 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
6232 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6233 trait_t*t = traits_find_slotid(state->cls->abc->traits,slot);//FIXME
6234 multiname_t*name = t->name;
6235 (yyval.value).c = code_cutlast((yyval.value).c);
6236 (yyval.value).c = code_append((yyval.value).c, paramcode);
6237 (yyval.value).c = abc_constructprop2((yyval.value).c, name, (yyvsp[(4) - (4)].value_list).len);
6239 (yyval.value).c = code_append((yyval.value).c, paramcode);
6240 (yyval.value).c = abc_construct((yyval.value).c, (yyvsp[(4) - (4)].value_list).len);
6243 (yyval.value).t = TYPE_ANY;
6244 if(TYPE_IS_CLASS((yyvsp[(2) - (4)].value).t) && (yyvsp[(2) - (4)].value).t->data) {
6245 (yyval.value).t = (yyvsp[(2) - (4)].value).t->data;
6247 (yyval.value).c = abc_coerce_a((yyval.value).c);
6248 (yyval.value).t = TYPE_ANY;
6259 /* Line 1464 of skeleton.m4 */
6260 #line 2796 "parser.y"
6263 (yyval.value).c = (yyvsp[(1) - (4)].value).c;
6264 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
6265 (yyval.value).c = code_cutlast((yyval.value).c);
6267 code_t*paramcode = (yyvsp[(3) - (4)].value_list).cc;
6269 (yyval.value).t = TYPE_ANY;
6270 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6271 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6272 (yyval.value).c = code_cutlast((yyval.value).c);
6273 (yyval.value).c = code_append((yyval.value).c, paramcode);
6274 (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).len);
6275 multiname_destroy(name);
6276 } else if((yyval.value).c->opcode == OPCODE_GETSLOT && (yyval.value).c->prev->opcode != OPCODE_GETSCOPEOBJECT) {
6277 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6278 trait_t*t = traits_find_slotid(state->cls->abc->traits,slot);
6279 if(t->kind!=TRAIT_METHOD) {
6280 //ok: flash allows to assign closures to members.
6282 multiname_t*name = t->name;
6283 (yyval.value).c = code_cutlast((yyval.value).c);
6284 (yyval.value).c = code_append((yyval.value).c, paramcode);
6285 //$$.c = abc_callmethod($$.c, t->method, len); //#1051 illegal early access binding
6286 (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).len);
6287 } else if((yyval.value).c->opcode == OPCODE_GETSUPER) {
6288 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6289 (yyval.value).c = code_cutlast((yyval.value).c);
6290 (yyval.value).c = code_append((yyval.value).c, paramcode);
6291 (yyval.value).c = abc_callsuper2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).len);
6292 multiname_destroy(name);
6294 (yyval.value).c = abc_getglobalscope((yyval.value).c);
6295 (yyval.value).c = code_append((yyval.value).c, paramcode);
6296 (yyval.value).c = abc_call((yyval.value).c, (yyvsp[(3) - (4)].value_list).len);
6299 if(TYPE_IS_FUNCTION((yyvsp[(1) - (4)].value).t) && (yyvsp[(1) - (4)].value).t->data) {
6300 (yyval.value).t = ((methodinfo_t*)((yyvsp[(1) - (4)].value).t->data))->return_type;
6302 (yyval.value).c = abc_coerce_a((yyval.value).c);
6303 (yyval.value).t = TYPE_ANY;
6314 /* Line 1464 of skeleton.m4 */
6315 #line 2842 "parser.y"
6317 if(!state->cls) syntaxerror("super() not allowed outside of a class");
6318 if(!state->method) syntaxerror("super() not allowed outside of a function");
6319 if(!state->method->is_constructor) syntaxerror("super() not allowed outside of a constructor");
6321 (yyval.value).c = code_new();
6322 (yyval.value).c = abc_getlocal_0((yyval.value).c);
6324 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value_list).cc);
6326 this is dependent on the control path, check this somewhere else
6327 if(state->method->has_super)
6328 syntaxerror("constructor may call super() only once");
6330 state->method->has_super = 1;
6332 (yyval.value).c = abc_constructsuper((yyval.value).c, (yyvsp[(3) - (4)].value_list).len);
6333 (yyval.value).c = abc_pushundefined((yyval.value).c);
6334 (yyval.value).t = TYPE_ANY;
6344 /* Line 1464 of skeleton.m4 */
6345 #line 2863 "parser.y"
6347 (yyval.value).c = (yyvsp[(2) - (2)].value).c;
6348 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
6349 (yyval.value).c = code_cutlast((yyval.value).c);
6351 multiname_t*name = 0;
6352 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6353 (yyval.value).c->opcode = OPCODE_DELETEPROPERTY;
6354 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
6355 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6356 multiname_t*name = traits_find_slotid(state->cls->abc->traits,slot)->name;
6357 (yyval.value).c = code_cutlast((yyval.value).c);
6358 (yyval.value).c = abc_deleteproperty2((yyval.value).c, name);
6360 (yyval.value).c = abc_getlocal_0((yyval.value).c);
6361 MULTINAME_LATE(m, (yyvsp[(2) - (2)].value).t?(yyvsp[(2) - (2)].value).t->access:ACCESS_PACKAGE, "");
6362 (yyval.value).c = abc_deleteproperty2((yyval.value).c, &m);
6364 (yyval.value).t = TYPE_BOOLEAN;
6374 /* Line 1464 of skeleton.m4 */
6375 #line 2884 "parser.y"
6377 (yyval.code) = abc_returnvoid(0);
6387 /* Line 1464 of skeleton.m4 */
6388 #line 2887 "parser.y"
6390 (yyval.code) = (yyvsp[(2) - (2)].value).c;
6391 (yyval.code) = abc_returnvalue((yyval.code));
6401 /* Line 1464 of skeleton.m4 */
6402 #line 2894 "parser.y"
6403 {(yyval.value)=(yyvsp[(1) - (1)].value);}
6412 /* Line 1464 of skeleton.m4 */
6413 #line 2895 "parser.y"
6414 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6423 /* Line 1464 of skeleton.m4 */
6424 #line 2896 "parser.y"
6426 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
6427 (yyval.value).c = cut_last_push((yyval.value).c);
6428 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
6429 (yyval.value).t = (yyvsp[(3) - (3)].value).t;
6439 /* Line 1464 of skeleton.m4 */
6440 #line 2902 "parser.y"
6442 (yyval.code)=cut_last_push((yyvsp[(1) - (1)].value).c);
6452 /* Line 1464 of skeleton.m4 */
6453 #line 2908 "parser.y"
6454 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6463 /* Line 1464 of skeleton.m4 */
6464 #line 2912 "parser.y"
6465 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6474 /* Line 1464 of skeleton.m4 */
6475 #line 2914 "parser.y"
6476 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6485 /* Line 1464 of skeleton.m4 */
6486 #line 2916 "parser.y"
6487 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6496 /* Line 1464 of skeleton.m4 */
6497 #line 2920 "parser.y"
6499 (yyval.value).c = 0;
6500 namespace_t ns = {ACCESS_PACKAGE, ""};
6501 multiname_t m = {QNAME, &ns, 0, "RegExp"};
6502 if(!(yyvsp[(1) - (1)].regexp).options) {
6503 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
6504 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).pattern);
6505 (yyval.value).c = abc_construct((yyval.value).c, 1);
6507 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
6508 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).pattern);
6509 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).options);
6510 (yyval.value).c = abc_construct((yyval.value).c, 2);
6512 (yyval.value).t = TYPE_REGEXP;
6522 /* Line 1464 of skeleton.m4 */
6523 #line 2937 "parser.y"
6524 {(yyval.value).c = abc_pushbyte(0, (yyvsp[(1) - (1)].number_uint));
6525 //MULTINAME(m, registry_getintclass());
6526 //$$.c = abc_coerce2($$.c, &m); // FIXME
6527 (yyval.value).t = TYPE_INT;
6537 /* Line 1464 of skeleton.m4 */
6538 #line 2942 "parser.y"
6539 {(yyval.value).c = abc_pushshort(0, (yyvsp[(1) - (1)].number_uint));
6540 (yyval.value).t = TYPE_INT;
6550 /* Line 1464 of skeleton.m4 */
6551 #line 2945 "parser.y"
6552 {(yyval.value).c = abc_pushint(0, (yyvsp[(1) - (1)].number_int));
6553 (yyval.value).t = TYPE_INT;
6563 /* Line 1464 of skeleton.m4 */
6564 #line 2948 "parser.y"
6565 {(yyval.value).c = abc_pushuint(0, (yyvsp[(1) - (1)].number_uint));
6566 (yyval.value).t = TYPE_UINT;
6576 /* Line 1464 of skeleton.m4 */
6577 #line 2951 "parser.y"
6578 {(yyval.value).c = abc_pushdouble(0, (yyvsp[(1) - (1)].number_float));
6579 (yyval.value).t = TYPE_FLOAT;
6589 /* Line 1464 of skeleton.m4 */
6590 #line 2954 "parser.y"
6591 {(yyval.value).c = abc_pushstring2(0, &(yyvsp[(1) - (1)].str));free((char*)(yyvsp[(1) - (1)].str).str);
6592 (yyval.value).t = TYPE_STRING;
6602 /* Line 1464 of skeleton.m4 */
6603 #line 2957 "parser.y"
6604 {(yyval.value).c = abc_pushundefined(0);
6605 (yyval.value).t = TYPE_ANY;
6615 /* Line 1464 of skeleton.m4 */
6616 #line 2960 "parser.y"
6617 {(yyval.value).c = abc_pushtrue(0);
6618 (yyval.value).t = TYPE_BOOLEAN;
6628 /* Line 1464 of skeleton.m4 */
6629 #line 2963 "parser.y"
6630 {(yyval.value).c = abc_pushfalse(0);
6631 (yyval.value).t = TYPE_BOOLEAN;
6641 /* Line 1464 of skeleton.m4 */
6642 #line 2966 "parser.y"
6643 {(yyval.value).c = abc_pushnull(0);
6644 (yyval.value).t = TYPE_NULL;
6654 /* Line 1464 of skeleton.m4 */
6655 #line 2970 "parser.y"
6656 {(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);
6657 (yyval.value).t = TYPE_BOOLEAN;
6667 /* Line 1464 of skeleton.m4 */
6668 #line 2973 "parser.y"
6669 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterthan((yyval.value).c);
6670 (yyval.value).t = TYPE_BOOLEAN;
6680 /* Line 1464 of skeleton.m4 */
6681 #line 2976 "parser.y"
6682 {(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);
6683 (yyval.value).t = TYPE_BOOLEAN;
6693 /* Line 1464 of skeleton.m4 */
6694 #line 2979 "parser.y"
6695 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterequals((yyval.value).c);
6696 (yyval.value).t = TYPE_BOOLEAN;
6706 /* Line 1464 of skeleton.m4 */
6707 #line 2982 "parser.y"
6708 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_equals((yyval.value).c);
6709 (yyval.value).t = TYPE_BOOLEAN;
6719 /* Line 1464 of skeleton.m4 */
6720 #line 2985 "parser.y"
6721 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_strictequals((yyval.value).c);
6722 (yyval.value).t = TYPE_BOOLEAN;
6732 /* Line 1464 of skeleton.m4 */
6733 #line 2988 "parser.y"
6734 {(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);
6735 (yyval.value).t = TYPE_BOOLEAN;
6745 /* Line 1464 of skeleton.m4 */
6746 #line 2991 "parser.y"
6747 {(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);
6748 (yyval.value).t = TYPE_BOOLEAN;
6758 /* Line 1464 of skeleton.m4 */
6759 #line 2995 "parser.y"
6760 {(yyval.value).t = join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'O');
6761 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
6762 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(1) - (3)].value).t, (yyval.value).t);
6763 (yyval.value).c = abc_dup((yyval.value).c);
6764 code_t*jmp = (yyval.value).c = abc_iftrue((yyval.value).c, 0);
6765 (yyval.value).c = cut_last_push((yyval.value).c);
6766 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
6767 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (3)].value).t, (yyval.value).t);
6768 code_t*label = (yyval.value).c = abc_label((yyval.value).c);
6769 jmp->branch = label;
6779 /* Line 1464 of skeleton.m4 */
6780 #line 3006 "parser.y"
6782 (yyval.value).t = join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'A');
6783 /*printf("%08x:\n",$1.t);
6784 code_dump($1.c, 0, 0, "", stdout);
6785 printf("%08x:\n",$3.t);
6786 code_dump($3.c, 0, 0, "", stdout);
6787 printf("joining %08x and %08x to %08x\n", $1.t, $3.t, $$.t);*/
6788 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
6789 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(1) - (3)].value).t, (yyval.value).t);
6790 (yyval.value).c = abc_dup((yyval.value).c);
6791 code_t*jmp = (yyval.value).c = abc_iffalse((yyval.value).c, 0);
6792 (yyval.value).c = cut_last_push((yyval.value).c);
6793 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
6794 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (3)].value).t, (yyval.value).t);
6795 code_t*label = (yyval.value).c = abc_label((yyval.value).c);
6796 jmp->branch = label;
6806 /* Line 1464 of skeleton.m4 */
6807 #line 3024 "parser.y"
6808 {(yyval.value).c=(yyvsp[(2) - (2)].value).c;
6809 (yyval.value).c = abc_not((yyval.value).c);
6810 (yyval.value).t = TYPE_BOOLEAN;
6820 /* Line 1464 of skeleton.m4 */
6821 #line 3029 "parser.y"
6822 {(yyval.value).c=(yyvsp[(2) - (2)].value).c;
6823 (yyval.value).c = abc_bitnot((yyval.value).c);
6824 (yyval.value).t = TYPE_INT;
6834 /* Line 1464 of skeleton.m4 */
6835 #line 3034 "parser.y"
6836 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6837 (yyval.value).c = abc_bitand((yyval.value).c);
6838 (yyval.value).t = TYPE_INT;
6848 /* Line 1464 of skeleton.m4 */
6849 #line 3039 "parser.y"
6850 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6851 (yyval.value).c = abc_bitxor((yyval.value).c);
6852 (yyval.value).t = TYPE_INT;
6862 /* Line 1464 of skeleton.m4 */
6863 #line 3044 "parser.y"
6864 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6865 (yyval.value).c = abc_bitor((yyval.value).c);
6866 (yyval.value).t = TYPE_INT;
6876 /* Line 1464 of skeleton.m4 */
6877 #line 3049 "parser.y"
6878 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6879 (yyval.value).c = abc_rshift((yyval.value).c);
6880 (yyval.value).t = TYPE_INT;
6890 /* Line 1464 of skeleton.m4 */
6891 #line 3053 "parser.y"
6892 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6893 (yyval.value).c = abc_urshift((yyval.value).c);
6894 (yyval.value).t = TYPE_INT;
6904 /* Line 1464 of skeleton.m4 */
6905 #line 3057 "parser.y"
6906 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6907 (yyval.value).c = abc_lshift((yyval.value).c);
6908 (yyval.value).t = TYPE_INT;
6918 /* Line 1464 of skeleton.m4 */
6919 #line 3062 "parser.y"
6920 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6921 (yyval.value).c = abc_divide((yyval.value).c);
6922 (yyval.value).t = TYPE_NUMBER;
6932 /* Line 1464 of skeleton.m4 */
6933 #line 3066 "parser.y"
6934 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6935 (yyval.value).c = abc_modulo((yyval.value).c);
6936 (yyval.value).t = TYPE_NUMBER;
6946 /* Line 1464 of skeleton.m4 */
6947 #line 3070 "parser.y"
6948 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6949 if(BOTH_INT((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t)) {
6950 (yyval.value).c = abc_add_i((yyval.value).c);
6951 (yyval.value).t = TYPE_INT;
6953 (yyval.value).c = abc_add((yyval.value).c);
6954 (yyval.value).t = join_types((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t,'+');
6965 /* Line 1464 of skeleton.m4 */
6966 #line 3079 "parser.y"
6967 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6968 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
6969 (yyval.value).c = abc_subtract_i((yyval.value).c);
6970 (yyval.value).t = TYPE_INT;
6972 (yyval.value).c = abc_subtract((yyval.value).c);
6973 (yyval.value).t = TYPE_NUMBER;
6984 /* Line 1464 of skeleton.m4 */
6985 #line 3088 "parser.y"
6986 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6987 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
6988 (yyval.value).c = abc_multiply_i((yyval.value).c);
6989 (yyval.value).t = TYPE_INT;
6991 (yyval.value).c = abc_multiply((yyval.value).c);
6992 (yyval.value).t = TYPE_NUMBER;
7003 /* Line 1464 of skeleton.m4 */
7004 #line 3098 "parser.y"
7005 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7006 (yyval.value).c = abc_in((yyval.value).c);
7007 (yyval.value).t = TYPE_BOOLEAN;
7017 /* Line 1464 of skeleton.m4 */
7018 #line 3103 "parser.y"
7019 {char use_astype=0; // flash player's astype works differently than astypelate
7020 if(use_astype && TYPE_IS_CLASS((yyvsp[(3) - (3)].value).t) && (yyvsp[(3) - (3)].value).t->data) {
7021 MULTINAME(m, (classinfo_t*)((yyvsp[(3) - (3)].value).t->data));
7022 (yyval.value).c = abc_astype2((yyvsp[(1) - (3)].value).c, &m);
7023 (yyval.value).t = (yyvsp[(3) - (3)].value).t->data;
7025 (yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
7026 (yyval.value).c = abc_astypelate((yyval.value).c);
7027 (yyval.value).t = TYPE_ANY;
7038 /* Line 1464 of skeleton.m4 */
7039 #line 3116 "parser.y"
7040 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
7041 (yyval.value).c = abc_instanceof((yyval.value).c);
7042 (yyval.value).t = TYPE_BOOLEAN;
7052 /* Line 1464 of skeleton.m4 */
7053 #line 3121 "parser.y"
7054 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
7055 (yyval.value).c = abc_istypelate((yyval.value).c);
7056 (yyval.value).t = TYPE_BOOLEAN;
7066 /* Line 1464 of skeleton.m4 */
7067 #line 3126 "parser.y"
7069 (yyval.value).c = (yyvsp[(3) - (4)].value).c;
7070 (yyval.value).c = abc_typeof((yyval.value).c);
7071 (yyval.value).t = TYPE_STRING;
7081 /* Line 1464 of skeleton.m4 */
7082 #line 3132 "parser.y"
7084 (yyval.value).c = cut_last_push((yyvsp[(2) - (2)].value).c);
7085 (yyval.value).c = abc_pushundefined((yyval.value).c);
7086 (yyval.value).t = TYPE_ANY;
7096 /* Line 1464 of skeleton.m4 */
7097 #line 3138 "parser.y"
7098 { (yyval.value).c = abc_pushundefined(0);
7099 (yyval.value).t = TYPE_ANY;
7109 /* Line 1464 of skeleton.m4 */
7110 #line 3142 "parser.y"
7111 {(yyval.value)=(yyvsp[(2) - (3)].value);}
7120 /* Line 1464 of skeleton.m4 */
7121 #line 3144 "parser.y"
7123 (yyval.value)=(yyvsp[(2) - (2)].value);
7124 if(IS_INT((yyvsp[(2) - (2)].value).t)) {
7125 (yyval.value).c=abc_negate_i((yyval.value).c);
7126 (yyval.value).t = TYPE_INT;
7128 (yyval.value).c=abc_negate((yyval.value).c);
7129 (yyval.value).t = TYPE_NUMBER;
7140 /* Line 1464 of skeleton.m4 */
7141 #line 3155 "parser.y"
7143 (yyval.value).c = (yyvsp[(1) - (4)].value).c;
7144 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value).c);
7146 MULTINAME_LATE(m, (yyvsp[(1) - (4)].value).t?(yyvsp[(1) - (4)].value).t->access:ACCESS_PACKAGE, "");
7147 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7148 (yyval.value).t = 0; // array elements have unknown type
7158 /* Line 1464 of skeleton.m4 */
7159 #line 3164 "parser.y"
7161 (yyval.value).c = code_new();
7162 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(2) - (3)].value_list).cc);
7163 (yyval.value).c = abc_newarray((yyval.value).c, (yyvsp[(2) - (3)].value_list).len);
7164 (yyval.value).t = registry_getarrayclass();
7174 /* Line 1464 of skeleton.m4 */
7175 #line 3171 "parser.y"
7176 {(yyval.value_list).cc=0;(yyval.value_list).len=0;}
7185 /* Line 1464 of skeleton.m4 */
7186 #line 3172 "parser.y"
7187 {(yyval.value_list)=(yyvsp[(1) - (1)].value_list);}
7196 /* Line 1464 of skeleton.m4 */
7197 #line 3174 "parser.y"
7199 (yyval.value_list).cc = 0;
7200 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(1) - (3)].value).c);
7201 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (3)].value).c);
7202 (yyval.value_list).len = 2;
7212 /* Line 1464 of skeleton.m4 */
7213 #line 3180 "parser.y"
7215 (yyval.value_list).cc = (yyvsp[(1) - (5)].value_list).cc;
7216 (yyval.value_list).len = (yyvsp[(1) - (5)].value_list).len+2;
7217 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (5)].value).c);
7218 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(5) - (5)].value).c);
7228 /* Line 1464 of skeleton.m4 */
7229 #line 3189 "parser.y"
7231 (yyval.value).c = code_new();
7232 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(2) - (3)].value_list).cc);
7233 (yyval.value).c = abc_newobject((yyval.value).c, (yyvsp[(2) - (3)].value_list).len/2);
7234 (yyval.value).t = registry_getobjectclass();
7244 /* Line 1464 of skeleton.m4 */
7245 #line 3196 "parser.y"
7247 code_t*c = (yyvsp[(3) - (3)].value).c;
7248 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
7249 c=abc_multiply_i(c);
7253 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '*'), (yyvsp[(1) - (3)].value).t);
7254 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7255 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7265 /* Line 1464 of skeleton.m4 */
7266 #line 3208 "parser.y"
7268 code_t*c = abc_modulo((yyvsp[(3) - (3)].value).c);
7269 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '%'), (yyvsp[(1) - (3)].value).t);
7270 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7271 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7281 /* Line 1464 of skeleton.m4 */
7282 #line 3214 "parser.y"
7284 code_t*c = abc_lshift((yyvsp[(3) - (3)].value).c);
7285 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '<'), (yyvsp[(1) - (3)].value).t);
7286 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7287 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7297 /* Line 1464 of skeleton.m4 */
7298 #line 3220 "parser.y"
7300 code_t*c = abc_rshift((yyvsp[(3) - (3)].value).c);
7301 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '>'), (yyvsp[(1) - (3)].value).t);
7302 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7303 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7313 /* Line 1464 of skeleton.m4 */
7314 #line 3226 "parser.y"
7316 code_t*c = abc_urshift((yyvsp[(3) - (3)].value).c);
7317 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'U'), (yyvsp[(1) - (3)].value).t);
7318 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7319 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7329 /* Line 1464 of skeleton.m4 */
7330 #line 3232 "parser.y"
7332 code_t*c = abc_divide((yyvsp[(3) - (3)].value).c);
7333 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '/'), (yyvsp[(1) - (3)].value).t);
7334 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7335 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7345 /* Line 1464 of skeleton.m4 */
7346 #line 3238 "parser.y"
7348 code_t*c = abc_bitor((yyvsp[(3) - (3)].value).c);
7349 c=converttype(c, TYPE_INT, (yyvsp[(1) - (3)].value).t);
7350 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7351 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7361 /* Line 1464 of skeleton.m4 */
7362 #line 3244 "parser.y"
7364 code_t*c = abc_bitxor((yyvsp[(3) - (3)].value).c);
7365 c=converttype(c, TYPE_INT, (yyvsp[(1) - (3)].value).t);
7366 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7367 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7377 /* Line 1464 of skeleton.m4 */
7378 #line 3250 "parser.y"
7380 code_t*c = (yyvsp[(3) - (3)].value).c;
7382 if(TYPE_IS_INT((yyvsp[(1) - (3)].value).t)) {
7386 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '+'), (yyvsp[(1) - (3)].value).t);
7389 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7390 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7400 /* Line 1464 of skeleton.m4 */
7401 #line 3263 "parser.y"
7402 { code_t*c = (yyvsp[(3) - (3)].value).c;
7403 if(TYPE_IS_INT((yyvsp[(1) - (3)].value).t)) {
7404 c=abc_subtract_i(c);
7407 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '-'), (yyvsp[(1) - (3)].value).t);
7410 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7411 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7421 /* Line 1464 of skeleton.m4 */
7422 #line 3274 "parser.y"
7424 c = code_append(c, (yyvsp[(3) - (3)].value).c);
7425 c = converttype(c, (yyvsp[(3) - (3)].value).t, (yyvsp[(1) - (3)].value).t);
7426 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 1, 0);
7427 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7437 /* Line 1464 of skeleton.m4 */
7438 #line 3281 "parser.y"
7440 (yyval.value).t = join_types((yyvsp[(3) - (5)].value).t,(yyvsp[(5) - (5)].value).t,'?');
7441 (yyval.value).c = (yyvsp[(1) - (5)].value).c;
7442 code_t*j1 = (yyval.value).c = abc_iffalse((yyval.value).c, 0);
7443 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (5)].value).c);
7444 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (5)].value).t, (yyval.value).t);
7445 code_t*j2 = (yyval.value).c = abc_jump((yyval.value).c, 0);
7446 (yyval.value).c = j1->branch = abc_label((yyval.value).c);
7447 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(5) - (5)].value).c);
7448 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(5) - (5)].value).t, (yyval.value).t);
7449 (yyval.value).c = j2->branch = abc_label((yyval.value).c);
7459 /* Line 1464 of skeleton.m4 */
7460 #line 3294 "parser.y"
7462 classinfo_t*type = (yyvsp[(1) - (2)].value).t;
7463 if((is_getlocal((yyvsp[(1) - (2)].value).c) && TYPE_IS_INT((yyvsp[(1) - (2)].value).t)) || TYPE_IS_NUMBER((yyvsp[(1) - (2)].value).t)) {
7464 int nr = getlocalnr((yyvsp[(1) - (2)].value).c);
7465 code_free((yyvsp[(1) - (2)].value).c);(yyvsp[(1) - (2)].value).c=0;
7466 if(TYPE_IS_INT((yyvsp[(1) - (2)].value).t)) {
7467 (yyval.value).c = abc_getlocal(0, nr);
7468 (yyval.value).c = abc_inclocal_i((yyval.value).c, nr);
7469 } else if(TYPE_IS_NUMBER((yyvsp[(1) - (2)].value).t)) {
7470 (yyval.value).c = abc_getlocal(0, nr);
7471 (yyval.value).c = abc_inclocal((yyval.value).c, nr);
7472 } else syntaxerror("internal error");
7474 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7475 c=abc_increment_i(c);
7481 c=converttype(c, type, (yyvsp[(1) - (2)].value).t);
7482 (yyval.value).c = toreadwrite((yyvsp[(1) - (2)].value).c, c, 0, 1);
7483 (yyval.value).t = (yyvsp[(1) - (2)].value).t;
7494 /* Line 1464 of skeleton.m4 */
7495 #line 3321 "parser.y"
7497 classinfo_t*type = (yyvsp[(1) - (2)].value).t;
7498 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7499 c=abc_decrement_i(c);
7505 c=converttype(c, type, (yyvsp[(1) - (2)].value).t);
7506 (yyval.value).c = toreadwrite((yyvsp[(1) - (2)].value).c, c, 0, 1);
7507 (yyval.value).t = (yyvsp[(1) - (2)].value).t;
7517 /* Line 1464 of skeleton.m4 */
7518 #line 3335 "parser.y"
7520 classinfo_t*type = (yyvsp[(2) - (2)].value).t;
7521 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7522 c=abc_increment_i(c);
7528 c=converttype(c, type, (yyvsp[(2) - (2)].value).t);
7529 (yyval.value).c = toreadwrite((yyvsp[(2) - (2)].value).c, c, 0, 0);
7530 (yyval.value).t = (yyvsp[(2) - (2)].value).t;
7540 /* Line 1464 of skeleton.m4 */
7541 #line 3349 "parser.y"
7543 classinfo_t*type = (yyvsp[(2) - (2)].value).t;
7544 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7545 c=abc_decrement_i(c);
7551 c=converttype(c, type, (yyvsp[(2) - (2)].value).t);
7552 (yyval.value).c = toreadwrite((yyvsp[(2) - (2)].value).c, c, 0, 0);
7553 (yyval.value).t = (yyvsp[(2) - (2)].value).t;
7563 /* Line 1464 of skeleton.m4 */
7564 #line 3364 "parser.y"
7565 { if(!state->cls->info)
7566 syntaxerror("super keyword not allowed outside a class");
7567 classinfo_t*t = state->cls->info->superclass;
7568 if(!t) t = TYPE_OBJECT;
7570 memberinfo_t*f = registry_findmember_nsset(t, state->active_namespaces, (yyvsp[(3) - (3)].id), 1);
7572 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
7573 (yyval.value).c = 0;
7574 (yyval.value).c = abc_getlocal_0((yyval.value).c);
7575 (yyval.value).c = abc_getsuper2((yyval.value).c, &m);
7576 (yyval.value).t = slotinfo_gettype((slotinfo_t*)f);
7586 /* Line 1464 of skeleton.m4 */
7587 #line 3378 "parser.y"
7590 (yyval.value).c = abc_pushundefined(0);
7591 (yyval.value).t = 0;
7592 as3_warning("ignored @ operator");
7602 /* Line 1464 of skeleton.m4 */
7603 #line 3385 "parser.y"
7605 // child attribute TODO
7606 (yyval.value).c = abc_pushundefined(0);
7607 (yyval.value).t = 0;
7608 as3_warning("ignored .@ operator");
7618 /* Line 1464 of skeleton.m4 */
7619 #line 3392 "parser.y"
7621 // namespace declaration TODO
7622 (yyval.value).c = abc_pushundefined(0);
7623 (yyval.value).t = 0;
7624 as3_warning("ignored :: operator");
7634 /* Line 1464 of skeleton.m4 */
7635 #line 3399 "parser.y"
7638 (yyval.value).c = abc_pushundefined(0);
7639 (yyval.value).t = 0;
7640 as3_warning("ignored .. operator");
7650 /* Line 1464 of skeleton.m4 */
7651 #line 3406 "parser.y"
7654 (yyval.value).c = abc_pushundefined(0);
7655 (yyval.value).t = 0;
7656 as3_warning("ignored .() operator");
7666 /* Line 1464 of skeleton.m4 */
7667 #line 3418 "parser.y"
7668 {(yyval.value).c = (yyvsp[(1) - (3)].value).c;
7669 classinfo_t*t = (yyvsp[(1) - (3)].value).t;
7671 if(TYPE_IS_CLASS(t) && t->data) {
7676 memberinfo_t*f = registry_findmember_nsset(t, state->active_namespaces, (yyvsp[(3) - (3)].id), 1);
7678 if(f && !is_static != !(f->flags&FLAG_STATIC))
7680 if(f && f->slot && !noslot) {
7681 (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
7683 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
7684 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7686 /* determine type */
7687 (yyval.value).t = slotinfo_gettype((slotinfo_t*)f);
7688 if(!(yyval.value).t)
7689 (yyval.value).c = abc_coerce_a((yyval.value).c);
7691 /* when resolving a property on an unknown type, we do know the
7692 name of the property (and don't seem to need the package), but
7693 we need to make avm2 try out all access modes */
7694 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(3) - (3)].id)};
7695 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7696 (yyval.value).c = abc_coerce_a((yyval.value).c);
7697 (yyval.value).t = registry_getanytype();
7708 /* Line 1464 of skeleton.m4 */
7709 #line 3451 "parser.y"
7712 /* Queue unresolved identifiers for checking against the parent
7713 function's variables.
7714 We consider everything which is not a local variable "unresolved".
7715 This encompasses class names, members of the surrounding class
7716 etc. which *correct* because local variables of the parent function
7719 if(state->method->inner && !find_variable(state, (yyvsp[(1) - (1)].id))) {
7720 unknown_variable((yyvsp[(1) - (1)].id));
7724 (yyval.value).t = 0;
7725 (yyval.value).c = 0;
7730 /* look at variables */
7731 if((v = find_variable(state, (yyvsp[(1) - (1)].id)))) {
7732 // $1 is a local variable
7733 (yyval.value).c = abc_getlocal((yyval.value).c, v->index);
7734 (yyval.value).t = v->type;
7737 if((v = find_slot(state, (yyvsp[(1) - (1)].id)))) {
7738 (yyval.value).c = abc_getscopeobject((yyval.value).c, 1);
7739 (yyval.value).c = abc_getslot((yyval.value).c, v->index);
7740 (yyval.value).t = v->type;
7744 int i_am_static = (state->method && state->method->info)?(state->method->info->flags&FLAG_STATIC):FLAG_STATIC;
7746 /* look at current class' members */
7747 if(state->cls && (f = registry_findmember_nsset(state->cls->info, state->active_namespaces, (yyvsp[(1) - (1)].id), 1)) &&
7748 (f->flags&FLAG_STATIC) >= i_am_static) {
7749 // $1 is a function in this class
7750 int var_is_static = (f->flags&FLAG_STATIC);
7752 if(f->kind == INFOTYPE_METHOD) {
7753 (yyval.value).t = TYPE_FUNCTION(f);
7755 (yyval.value).t = f->type;
7757 if(var_is_static && !i_am_static) {
7758 /* access to a static member from a non-static location.
7759 do this via findpropstrict:
7760 there doesn't seem to be any non-lookup way to access
7761 static properties of a class */
7762 state->method->late_binding = 1;
7763 (yyval.value).t = f->type;
7764 namespace_t ns = {f->access, ""};
7765 multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
7766 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
7767 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7769 } else if(f->slot>0) {
7770 (yyval.value).c = abc_getlocal_0((yyval.value).c);
7771 (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
7774 namespace_t ns = {f->access, ""};
7775 multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
7776 (yyval.value).c = abc_getlocal_0((yyval.value).c);
7777 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7782 /* look at actual classes, in the current package and imported */
7783 if((a = find_class((yyvsp[(1) - (1)].id)))) {
7784 if(a->access == ACCESS_PACKAGEINTERNAL &&
7785 strcmp(a->package, state->package) &&
7786 strcmp(a->package, internal_filename_package)
7788 syntaxerror("Can't access internal %s %s in package '%s' from package '%s'",
7789 infotypename(a),(yyvsp[(1) - (1)].id), a->package, state->package);
7791 if(a->kind != INFOTYPE_CLASS) {
7793 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
7794 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7795 if(a->kind == INFOTYPE_METHOD) {
7796 methodinfo_t*f = (methodinfo_t*)a;
7797 (yyval.value).t = TYPE_FUNCTION(f);
7799 varinfo_t*v = (varinfo_t*)a;
7800 (yyval.value).t = v->type;
7803 classinfo_t*c = (classinfo_t*)a;
7805 (yyval.value).c = abc_getglobalscope((yyval.value).c);
7806 (yyval.value).c = abc_getslot((yyval.value).c, c->slot);
7809 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
7811 (yyval.value).t = TYPE_CLASS(c);
7816 /* unknown object, let the avm2 resolve it */
7818 as3_softwarning("Couldn't resolve '%s', doing late binding", (yyvsp[(1) - (1)].id));
7819 state->method->late_binding = 1;
7821 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(1) - (1)].id)};
7823 (yyval.value).t = 0;
7824 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
7825 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7836 /* Line 1464 of skeleton.m4 */
7837 #line 3572 "parser.y"
7840 tokenizer_register_namespace((yyvsp[(2) - (2)].id));
7841 (yyval.id)=(yyvsp[(2) - (2)].id);
7851 /* Line 1464 of skeleton.m4 */
7852 #line 3578 "parser.y"
7864 /* Line 1464 of skeleton.m4 */
7865 #line 3581 "parser.y"
7877 /* Line 1464 of skeleton.m4 */
7878 #line 3584 "parser.y"
7890 /* Line 1464 of skeleton.m4 */
7891 #line 3587 "parser.y"
7894 tokenizer_register_namespace((yyvsp[(2) - (2)].classinfo)->name);
7903 /* Line 1464 of skeleton.m4 */
7904 #line 7905 "parser.tab.c"
7907 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
7911 YY_STACK_PRINT (yyss, yyssp);
7915 /* Now `shift' the result of the reduction. Determine what state
7916 that goes to, based on the state we popped back to and the rule
7917 number reduced by. */
7921 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
7922 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
7923 yystate = yytable[yystate];
7925 yystate = yydefgoto[yyn - YYNTOKENS];
7930 /*------------------------------------.
7931 | yyerrlab -- here on detecting error |
7932 `------------------------------------*/
7934 /* If not already recovering from an error, report this error. */
7938 #if ! YYERROR_VERBOSE
7939 yyerror (YY_("syntax error"));
7942 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
7943 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
7945 YYSIZE_T yyalloc = 2 * yysize;
7946 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
7947 yyalloc = YYSTACK_ALLOC_MAXIMUM;
7948 if (yymsg != yymsgbuf)
7949 YYSTACK_FREE (yymsg);
7950 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
7952 yymsg_alloc = yyalloc;
7956 yymsg_alloc = sizeof yymsgbuf;
7960 if (0 < yysize && yysize <= yymsg_alloc)
7962 (void) yysyntax_error (yymsg, yystate, yychar);
7967 yyerror (YY_("syntax error"));
7969 goto yyexhaustedlab;
7977 if (yyerrstatus == 3)
7979 /* If just tried and failed to reuse lookahead token after an
7980 error, discard it. */
7982 if (yychar <= YYEOF)
7984 /* Return failure if at end of input. */
7985 if (yychar == YYEOF)
7990 yydestruct ("Error: discarding",
7996 /* Else will try to reuse lookahead token after shifting the error
8001 /*---------------------------------------------------.
8002 | yyerrorlab -- error raised explicitly by YYERROR. |
8003 `---------------------------------------------------*/
8006 /* Pacify compilers like GCC when the user code never invokes
8007 YYERROR and the label yyerrorlab therefore never appears in user
8009 if (/*CONSTCOND*/ 0)
8012 /* Do not reclaim the symbols of the rule which action triggered
8016 YY_STACK_PRINT (yyss, yyssp);
8021 /*-------------------------------------------------------------.
8022 | yyerrlab1 -- common code for both syntax error and YYERROR. |
8023 `-------------------------------------------------------------*/
8025 yyerrstatus = 3; /* Each real token shifted decrements this. */
8029 yyn = yypact[yystate];
8030 if (yyn != YYPACT_NINF)
8033 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
8041 /* Pop the current state because it cannot handle the error token. */
8046 yydestruct ("Error: popping",
8047 yystos[yystate], yyvsp);
8050 YY_STACK_PRINT (yyss, yyssp);
8056 /* Shift the error token. */
8057 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
8063 /*-------------------------------------.
8064 | yyacceptlab -- YYACCEPT comes here. |
8065 `-------------------------------------*/
8070 /*-----------------------------------.
8071 | yyabortlab -- YYABORT comes here. |
8072 `-----------------------------------*/
8077 #if !defined(yyoverflow) || YYERROR_VERBOSE
8078 /*-------------------------------------------------.
8079 | yyexhaustedlab -- memory exhaustion comes here. |
8080 `-------------------------------------------------*/
8082 yyerror (YY_("memory exhausted"));
8088 if (yychar != YYEMPTY)
8089 yydestruct ("Cleanup: discarding lookahead",
8091 /* Do not reclaim the symbols of the rule which action triggered
8092 this YYABORT or YYACCEPT. */
8094 YY_STACK_PRINT (yyss, yyssp);
8095 while (yyssp != yyss)
8097 yydestruct ("Cleanup: popping",
8098 yystos[*yyssp], yyvsp);
8103 YYSTACK_FREE (yyss);
8106 if (yymsg != yymsgbuf)
8107 YYSTACK_FREE (yymsg);
8109 /* Make sure YYID is used. */
8110 return YYID (yyresult);