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;
248 classinfo_t*classinfo;
249 classinfo_list_t*classinfo_list;
252 unsigned int number_uint;
256 //typedcode_list_t*value_list;
257 codeandnumber_t value_list;
263 for_start_t for_start;
264 abc_exception_t *exception;
267 abc_exception_list_t *l;
273 /* Line 223 of skeleton.m4 */
274 #line 275 "parser.tab.c"
276 # define YYSTYPE_IS_TRIVIAL 1
277 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
278 # define YYSTYPE_IS_DECLARED 1
282 /* Copy the second part of user declarations. */
284 /* Line 273 of skeleton.m4 */
288 static int a3_error(char*s)
290 syntaxerror("%s", s);
291 return 0; //make gcc happy
295 static char* concat2(const char* t1, const char* t2)
299 char*text = malloc(l1+l2+1);
300 memcpy(text , t1, l1);
301 memcpy(text+l1, t2, l2);
305 static char* concat3(const char* t1, const char* t2, const char* t3)
310 char*text = malloc(l1+l2+l3+1);
311 memcpy(text , t1, l1);
312 memcpy(text+l1, t2, l2);
313 memcpy(text+l1+l2, t3, l3);
318 typedef struct _import {
322 DECLARE_LIST(import);
324 DECLARE(methodstate);
325 DECLARE_LIST(methodstate);
327 typedef struct _classstate {
333 methodstate_t*static_init;
335 //code_t*static_init;
337 char has_constructor;
340 struct _methodstate {
349 dict_t*unresolved_variables;
352 char uses_parent_function;
357 int var_index; // for inner methods
358 char is_a_slot; // for inner methods
361 abc_exception_list_t*exceptions;
363 methodstate_list_t*innerfunctions;
366 typedef struct _state {
371 import_list_t*wildcard_imports;
373 char has_own_imports;
374 char new_vars; // e.g. transition between two functions
377 methodstate_t*method;
384 typedef struct _global {
388 dict_t*file2token2info;
391 static global_t*global = 0;
392 static state_t* state = 0;
396 #define MULTINAME(m,x) \
400 registry_fill_multiname(&m, &m##_ns, (slotinfo_t*)(x));
402 #define MEMBER_MULTINAME(m,f,n) \
406 m##_ns.access = ((slotinfo_t*)(f))->access; \
410 m.namespace_set = 0; \
411 m.name = ((slotinfo_t*)(f))->name; \
413 m.type = MULTINAME; \
415 m.namespace_set = &nopackage_namespace_set; \
419 /* warning: list length of namespace set is undefined */
420 #define MULTINAME_LATE(m, access, package) \
421 namespace_t m##_ns = {access, package}; \
422 namespace_set_t m##_nsset; \
423 namespace_list_t m##_l;m##_l.next = 0; \
424 m##_nsset.namespaces = &m##_l; \
425 m##_nsset = m##_nsset; \
426 m##_l.namespace = &m##_ns; \
427 multiname_t m = {MULTINAMEL, 0, &m##_nsset, 0};
429 static namespace_t ns1 = {ACCESS_PRIVATE, ""};
430 static namespace_t ns2 = {ACCESS_PROTECTED, ""};
431 static namespace_t ns3 = {ACCESS_PACKAGEINTERNAL, ""};
432 static namespace_t ns4 = {ACCESS_PACKAGE, ""};
433 static namespace_list_t nl4 = {&ns4,0};
434 static namespace_list_t nl3 = {&ns3,&nl4};
435 static namespace_list_t nl2 = {&ns2,&nl3};
436 static namespace_list_t nl1 = {&ns1,&nl2};
437 static namespace_set_t nopackage_namespace_set = {&nl1};
439 static void new_state()
442 state_t*oldstate = state;
444 memcpy(s, state, sizeof(state_t)); //shallow copy
446 s->imports = dict_new();
450 state->has_own_imports = 0;
451 state->vars = dict_new();
452 state->old = oldstate;
455 static void state_has_imports()
457 state->wildcard_imports = list_clone(state->wildcard_imports);
458 state->imports = dict_clone(state->imports);
459 state->has_own_imports = 1;
462 static void state_destroy(state_t*state)
464 if(state->has_own_imports) {
465 list_free(state->wildcard_imports);
466 dict_destroy(state->imports);state->imports=0;
468 if(state->imports && (!state->old || state->old->imports!=state->imports)) {
469 dict_destroy(state->imports);state->imports=0;
473 for(t=0;t<state->vars->hashsize;t++) {
474 dictentry_t*e =state->vars->slots[t];
476 free(e->data);e->data=0;
480 dict_destroy(state->vars);state->vars=0;
486 static void old_state()
488 if(!state || !state->old)
489 syntaxerror("invalid nesting");
490 state_t*leaving = state;
494 if(as3_pass>1 && leaving->method && leaving->method != state->method && !leaving->method->inner) {
495 free(leaving->method);
498 if(as3_pass>1 && leaving->cls && leaving->cls != state->cls) {
503 state_destroy(leaving);
506 static code_t* method_header(methodstate_t*m);
507 static code_t* wrap_function(code_t*c,code_t*header, code_t*body);
508 static void function_initvars(methodstate_t*m, params_t*params, int flags, char var0);
511 static char* internal_filename_package = 0;
512 void initialize_file(char*filename)
515 syntaxerror("invalid call to initialize_file during parsing of another file");
518 state->package = internal_filename_package = strdup(filename);
520 global->token2info = dict_lookup(global->file2token2info,
521 current_filename // use long version
523 if(!global->token2info) {
524 global->token2info = dict_new2(&ptr_type);
525 dict_put(global->file2token2info, current_filename, global->token2info);
529 state->method = rfx_calloc(sizeof(methodstate_t));
530 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
532 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
533 function_initvars(state->method, 0, 0, 1);
534 global->init = abc_initscript(global->file);
535 state->method->late_binding = 1; // init scripts use getglobalscope, so we need a getlocal0/pushscope
541 if(!state || state->level!=1) {
542 syntaxerror("unexpected end of file in pass %d", as3_pass);
546 code_t*header = method_header(state->method);
547 code_t*c = wrap_function(header, 0, global->init->method->body->code);
548 global->init->method->body->code = c;
549 free(state->method);state->method=0;
552 //free(state->package);state->package=0; // used in registry
553 state_destroy(state);state=0;
556 void initialize_parser()
558 global = rfx_calloc(sizeof(global_t));
559 global->file = abc_file_new();
560 global->file->flags &= ~ABCFILE_LAZY;
561 global->file2token2info = dict_new();
562 global->token2info = 0;
565 void* finish_parser()
567 dict_free_all(global->file2token2info, 1, (void*)dict_destroy);
569 global->token2info=0;
575 static void xx_scopetest()
577 /* findpropstrict doesn't just return a scope object- it
578 also makes it "active" somehow. Push local_0 on the
579 scope stack and read it back with findpropstrict, it'll
580 contain properties like "trace". Trying to find the same
581 property on a "vanilla" local_0 yields only a "undefined" */
582 //c = abc_findpropstrict(c, "[package]::trace");
584 /*c = abc_getlocal_0(c);
585 c = abc_findpropstrict(c, "[package]::trace");
587 c = abc_setlocal_1(c);
589 c = abc_pushbyte(c, 0);
590 c = abc_setlocal_2(c);
592 code_t*xx = c = abc_label(c);
593 c = abc_findpropstrict(c, "[package]::trace");
594 c = abc_pushstring(c, "prop:");
595 c = abc_hasnext2(c, 1, 2);
597 c = abc_setlocal_3(c);
598 c = abc_callpropvoid(c, "[package]::trace", 2);
599 c = abc_getlocal_3(c);
601 c = abc_iftrue(c,xx);*/
604 typedef struct _variable {
608 methodstate_t*is_inner_method;
611 static variable_t* find_variable(state_t*s, char*name)
615 v = dict_lookup(s->vars, name);
617 if(s->new_vars) break;
622 static variable_t* find_slot(state_t*s, const char*name)
624 if(s->method && s->method->slots)
625 return dict_lookup(s->method->slots, name);
629 static variable_t* find_variable_safe(state_t*s, char*name)
631 variable_t* v = find_variable(s, name);
633 syntaxerror("undefined variable: %s", name);
636 static char variable_exists(char*name)
638 return dict_contains(state->vars, name);
640 code_t*defaultvalue(code_t*c, classinfo_t*type);
642 static variable_t* new_variable2(const char*name, classinfo_t*type, char init, char maybeslot)
645 variable_t*v = find_slot(state, name);
651 v->index = state->method->variable_count++;
655 dict_put(state->vars, name, v);
659 static int new_variable(const char*name, classinfo_t*type, char init, char maybeslot)
661 return new_variable2(name, type, init, maybeslot)->index;
664 #define TEMPVARNAME "__as3_temp__"
665 static int gettempvar()
667 variable_t*v = find_variable(state, TEMPVARNAME);
670 return new_variable(TEMPVARNAME, 0, 0, 0);
673 code_t* var_block(code_t*body)
679 for(t=0;t<state->vars->hashsize;t++) {
680 dictentry_t*e = state->vars->slots[t];
682 variable_t*v = (variable_t*)e->data;
683 if(v->type && v->init) {
684 c = defaultvalue(c, v->type);
685 c = abc_setlocal(c, v->index);
686 k = abc_kill(k, v->index);
696 if(x->opcode== OPCODE___BREAK__ ||
697 x->opcode== OPCODE___CONTINUE__) {
698 /* link kill code before break/continue */
699 code_t*e = code_dup(k);
700 code_t*s = code_start(e);
712 c = code_append(c, body);
713 c = code_append(c, k);
717 void unknown_variable(char*name)
719 if(!state->method->unresolved_variables)
720 state->method->unresolved_variables = dict_new();
721 if(!dict_contains(state->method->unresolved_variables, name))
722 dict_put(state->method->unresolved_variables, name, 0);
725 #define parserassert(b) {if(!(b)) parsererror(__FILE__, __LINE__,__func__);}
727 static void parsererror(const char*file, int line, const char*f)
729 syntaxerror("internal error in %s, %s:%d", f, file, line);
733 static code_t* method_header(methodstate_t*m)
736 if(m->uses_slots || (m->late_binding && !m->inner)) {
737 c = abc_getlocal_0(c);
738 c = abc_pushscope(c);
741 c = abc_newactivation(c);
742 c = abc_pushscope(c);
744 methodstate_list_t*l = m->innerfunctions;
746 parserassert(l->methodstate->abc);
747 if(m->uses_slots && l->methodstate->is_a_slot) {
748 c = abc_getscopeobject(c, 1);
749 c = abc_newfunction(c, l->methodstate->abc);
751 c = abc_setlocal(c, l->methodstate->var_index);
752 c = abc_setslot(c, l->methodstate->var_index);
754 c = abc_newfunction(c, l->methodstate->abc);
755 c = abc_setlocal(c, l->methodstate->var_index);
757 free(l->methodstate);l->methodstate=0;
761 c = code_append(c, m->header);
764 if(m->is_constructor && !m->has_super) {
765 // call default constructor
766 c = abc_getlocal_0(c);
767 c = abc_constructsuper(c, 0);
769 list_free(m->innerfunctions);
770 m->innerfunctions = 0;
775 static code_t* wrap_function(code_t*c,code_t*header, code_t*body)
777 c = code_append(c, header);
778 c = code_append(c, var_block(body));
779 /* append return if necessary */
780 if(!c || (c->opcode != OPCODE_RETURNVOID &&
781 c->opcode != OPCODE_RETURNVALUE)) {
782 c = abc_returnvoid(c);
788 static void startpackage(char*name)
791 /*printf("entering package \"%s\"\n", name);*/
792 state->package = strdup(name);
794 static void endpackage()
796 /*printf("leaving package \"%s\"\n", state->package);*/
798 //used e.g. in classinfo_register:
799 //free(state->package);state->package=0;
804 #define FLAG_PUBLIC 256
805 #define FLAG_PROTECTED 512
806 #define FLAG_PRIVATE 1024
807 #define FLAG_PACKAGEINTERNAL 2048
808 #define FLAG_NAMESPACE 4096
810 static int flags2access(int flags)
813 if(flags&FLAG_PUBLIC) {
814 if(access&(FLAG_PRIVATE|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
815 syntaxerror("invalid combination of access levels");
816 access = ACCESS_PACKAGE;
817 } else if(flags&FLAG_PRIVATE) {
818 if(access&(FLAG_PUBLIC|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
819 syntaxerror("invalid combination of access levels");
820 access = ACCESS_PRIVATE;
821 } else if(flags&FLAG_PROTECTED) {
822 if(access&(FLAG_PUBLIC|FLAG_PRIVATE|FLAG_PACKAGEINTERNAL))
823 syntaxerror("invalid combination of access levels");
824 access = ACCESS_PROTECTED;
826 access = ACCESS_PACKAGEINTERNAL;
831 static void function_initvars(methodstate_t*m, params_t*params, int flags, char var0)
836 index = new_variable("this", 0, 0, 0);
837 else if(!m->is_global)
838 index = new_variable((flags&FLAG_STATIC)?"class":"this", state->cls?state->cls->info:0, 0, 0);
840 index = new_variable("globalscope", 0, 0, 0);
843 parserassert(!index);
846 /* as variables and slots share the same number, make sure
847 that those variable indices are reserved */
848 m->variable_count = m->uses_slots;
853 for(p=params->list;p;p=p->next) {
854 new_variable(p->param->name, p->param->type, 0, 1);
858 methodstate_list_t*l = m->innerfunctions;
860 methodstate_t*m = l->methodstate;
861 variable_t* v = new_variable2(m->info->name, TYPE_FUNCTION(m->info), 0, 1);
862 m->var_index = v->index;
863 v->is_inner_method = m;
869 char*as3_globalclass=0;
870 static void startclass(int flags, char*classname, classinfo_t*extends, classinfo_list_t*implements)
873 syntaxerror("inner classes now allowed");
877 classinfo_list_t*mlist=0;
879 if(flags&~(FLAG_PACKAGEINTERNAL|FLAG_PUBLIC|FLAG_FINAL|FLAG_DYNAMIC|FLAG_INTERFACE))
880 syntaxerror("invalid modifier(s)");
882 if((flags&(FLAG_PUBLIC|FLAG_PACKAGEINTERNAL)) == (FLAG_PUBLIC|FLAG_PACKAGEINTERNAL))
883 syntaxerror("public and internal not supported at the same time.");
885 /* create the class name, together with the proper attributes */
889 if(!(flags&FLAG_PUBLIC) && state->package==internal_filename_package) {
890 access = ACCESS_PRIVATE; package = internal_filename_package;
891 } else if(!(flags&FLAG_PUBLIC) && state->package!=internal_filename_package) {
892 access = ACCESS_PACKAGEINTERNAL; package = state->package;
893 } else if(state->package!=internal_filename_package) {
894 access = ACCESS_PACKAGE; package = state->package;
896 syntaxerror("public classes only allowed inside a package");
900 state->cls = rfx_calloc(sizeof(classstate_t));
901 state->cls->init = rfx_calloc(sizeof(methodstate_t));
902 state->cls->static_init = rfx_calloc(sizeof(methodstate_t));
903 /* notice: we make no effort to initialize the top variable (local0) here,
904 even though it has special meaning. We just rely on the facat
905 that pass 1 won't do anything with variables */
907 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->cls);
909 /* set current method to constructor- all code within the class-level (except
910 static variable initializations) will be executed during construction time */
911 state->method = state->cls->init;
913 if(registry_find(package, classname)) {
914 syntaxerror("Package \"%s\" already contains a class called \"%s\"", package, classname);
916 /* build info struct */
917 int num_interfaces = (list_length(implements));
918 state->cls->info = classinfo_register(access, package, classname, num_interfaces);
919 state->cls->info->flags |= flags & (FLAG_DYNAMIC|FLAG_INTERFACE|FLAG_FINAL);
923 state->cls = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
925 state->method = state->cls->init;
926 parserassert(state->cls && state->cls->info);
928 function_initvars(state->cls->init, 0, 0, 1);
929 function_initvars(state->cls->static_init, 0, 0, 0);
931 if(extends && (extends->flags & FLAG_FINAL))
932 syntaxerror("Can't extend final class '%s'", extends->name);
934 /* fill out interfaces and extends (we couldn't resolve those during the first pass) */
935 state->cls->info->superclass = extends?extends:TYPE_OBJECT;
937 classinfo_list_t*l = implements;
938 for(l=implements;l;l=l->next) {
939 if(!(l->classinfo->flags & FLAG_INTERFACE))
940 syntaxerror("'%s' is not an interface", l->classinfo->name);
941 state->cls->info->interfaces[pos++] = l->classinfo;
944 /* generate the abc code for this class */
945 MULTINAME(classname2,state->cls->info);
946 multiname_t*extends2 = sig2mname(extends);
948 state->cls->abc = abc_class_new(global->file, &classname2, extends2);
949 if(state->cls->info->flags&FLAG_FINAL) abc_class_final(state->cls->abc);
950 if(!(state->cls->info->flags&FLAG_DYNAMIC)) abc_class_sealed(state->cls->abc);
951 if(state->cls->info->flags&FLAG_INTERFACE) {
952 abc_class_interface(state->cls->abc);
955 abc_class_protectedNS(state->cls->abc, classname);
957 for(mlist=implements;mlist;mlist=mlist->next) {
958 MULTINAME(m, mlist->classinfo);
959 abc_class_add_interface(state->cls->abc, &m);
962 /* write the construction code for this class to the global init
964 int slotindex = abc_initscript_addClassTrait(global->init, &classname2, state->cls->abc);
966 abc_method_body_t*m = global->init->method->body;
967 __ getglobalscope(m);
968 classinfo_t*s = extends;
973 //TODO: take a look at the current scope stack, maybe
974 // we can re-use something
979 multiname_t*s2 = sig2mname(s);
981 multiname_destroy(s2);
983 __ pushscope(m); count++;
984 m->code = m->code->prev->prev; // invert
986 /* continue appending after last op end */
987 while(m->code && m->code->next) m->code = m->code->next;
989 /* TODO: if this is one of *our* classes, we can also
990 do a getglobalscope/getslot <nr> (which references
991 the init function's slots) */
993 __ getlex2(m, extends2);
995 /* notice: we get a Verify Error #1107 if the top elemnt on the scope
996 stack is not the superclass */
997 __ pushscope(m);count++;
1000 /* notice: we get a verify error #1107 if the top element on the scope
1001 stack is not the global object */
1003 __ pushscope(m);count++;
1005 __ newclass(m,state->cls->abc);
1009 __ setslot(m, slotindex);
1010 multiname_destroy(extends2);
1012 /* flash.display.MovieClip handling */
1014 if(!as3_globalclass && (flags&FLAG_PUBLIC) && slotinfo_equals((slotinfo_t*)registry_getMovieClip(),(slotinfo_t*)extends)) {
1015 if(state->package && state->package[0]) {
1016 as3_globalclass = concat3(state->package, ".", classname);
1018 as3_globalclass = strdup(classname);
1024 static void setstaticfunction(int x)
1028 state->method = state->cls->static_init;
1030 state->method = state->cls->init;
1033 parserassert(state->method);
1037 static void endclass()
1040 if(!state->cls->has_constructor && !(state->cls->info->flags&FLAG_INTERFACE)) {
1042 c = abc_getlocal_0(c);
1043 c = abc_constructsuper(c, 0);
1044 state->cls->init->header = code_append(state->cls->init->header, c);
1045 state->cls->has_constructor=1;
1047 if(state->cls->init) {
1048 if(state->cls->info->flags&FLAG_INTERFACE) {
1049 if(state->cls->init->header)
1050 syntaxerror("interface can not have class-level code");
1052 abc_method_t*m = abc_class_getconstructor(state->cls->abc, 0);
1053 code_t*c = method_header(state->cls->init);
1054 m->body->code = wrap_function(c, 0, m->body->code);
1057 if(state->cls->static_init) {
1058 abc_method_t*m = abc_class_getstaticconstructor(state->cls->abc, 0);
1059 code_t*c = method_header(state->cls->static_init);
1060 m->body->code = wrap_function(c, 0, m->body->code);
1067 void check_code_for_break(code_t*c)
1070 if(c->opcode == OPCODE___BREAK__) {
1071 char*name = string_cstr(c->data[0]);
1072 syntaxerror("Unresolved \"break %s\"", name);
1074 if(c->opcode == OPCODE___CONTINUE__) {
1075 char*name = string_cstr(c->data[0]);
1076 syntaxerror("Unresolved \"continue %s\"", name);
1083 static void check_constant_against_type(classinfo_t*t, constant_t*c)
1085 #define xassert(b) if(!(b)) syntaxerror("Invalid default value %s for type '%s'", constant_tostring(c), t->name)
1086 if(TYPE_IS_NUMBER(t)) {
1087 xassert(c->type == CONSTANT_FLOAT
1088 || c->type == CONSTANT_INT
1089 || c->type == CONSTANT_UINT);
1090 } else if(TYPE_IS_UINT(t)) {
1091 xassert(c->type == CONSTANT_UINT ||
1092 (c->type == CONSTANT_INT && c->i>=0));
1093 } else if(TYPE_IS_INT(t)) {
1094 xassert(c->type == CONSTANT_INT);
1095 } else if(TYPE_IS_BOOLEAN(t)) {
1096 xassert(c->type == CONSTANT_TRUE
1097 || c->type == CONSTANT_FALSE);
1101 static void check_override(memberinfo_t*m, int flags)
1105 if(m->parent == state->cls->info)
1106 syntaxerror("class '%s' already contains a method/slot '%s'", m->parent->name, m->name);
1108 syntaxerror("internal error: overriding method %s, which doesn't have parent", m->name);
1109 if(m->access==ACCESS_PRIVATE)
1111 if(m->flags & FLAG_FINAL)
1112 syntaxerror("can't override final member %s", m->name);
1113 if((m->flags & FLAG_STATIC) && !(flags&FLAG_STATIC))
1114 syntaxerror("can't override static member %s", m->name);
1115 if(!(m->flags & FLAG_STATIC) && (flags&FLAG_STATIC))
1116 syntaxerror("can't override non-static member %s with static declaration", m->name);
1118 if(!(flags&FLAG_OVERRIDE)) {
1119 if(m->parent && !(m->parent->flags&FLAG_INTERFACE)) {
1120 if(m->kind == INFOTYPE_METHOD)
1121 syntaxerror("can't override without explicit 'override' declaration");
1123 syntaxerror("can't override '%s'", m->name);
1128 static methodinfo_t*registerfunction(enum yytokentype getset, int flags, char*name, params_t*params, classinfo_t*return_type, int slot)
1130 methodinfo_t*minfo = 0;
1131 U8 access = flags2access(flags);
1134 minfo = methodinfo_register_global(access, state->package, name);
1135 minfo->return_type = return_type;
1136 } else if(getset != KW_GET && getset != KW_SET) {
1138 memberinfo_t* m = registry_findmember(state->cls->info, name, 0);
1140 syntaxerror("class already contains a %s '%s'", infotypename((slotinfo_t*)m), m->name);
1142 minfo = methodinfo_register_onclass(state->cls->info, access, name);
1143 minfo->return_type = return_type;
1144 // getslot on a member slot only returns "undefined", so no need
1145 // to actually store these
1146 //state->minfo->slot = state->method->abc->method->trait->slot_id;
1148 //class getter/setter
1149 int gs = getset==KW_GET?SUBTYPE_GET:SUBTYPE_SET;
1151 if(getset == KW_GET)
1153 else if(params->list && params->list->param)
1154 type = params->list->param->type;
1155 // not sure wether to look into superclasses here, too
1156 minfo = (methodinfo_t*)registry_findmember(state->cls->info, name, 1);
1158 if(minfo->kind!=INFOTYPE_SLOT)
1159 syntaxerror("class already contains a method called '%s'", name);
1160 if(!(minfo->subtype & (SUBTYPE_GETSET)))
1161 syntaxerror("class already contains a field called '%s'", name);
1162 if(minfo->subtype & gs)
1163 syntaxerror("getter/setter for '%s' already defined", name);
1164 /* make a setter or getter into a getset */
1165 minfo->subtype |= gs;
1166 if(!minfo->return_type) {
1167 minfo->return_type = type;
1169 if(minfo && minfo->return_type != type)
1170 syntaxerror("different type in getter and setter");
1173 minfo = methodinfo_register_onclass(state->cls->info, access, name);
1174 minfo->kind = INFOTYPE_SLOT; //hack
1175 minfo->subtype = gs;
1176 minfo->return_type = type;
1178 /* can't assign a slot as getter and setter might have different slots */
1179 //minfo->slot = slot;
1181 if(flags&FLAG_FINAL) minfo->flags |= FLAG_FINAL;
1182 if(flags&FLAG_STATIC) minfo->flags |= FLAG_STATIC;
1183 if(flags&FLAG_OVERRIDE) minfo->flags |= FLAG_OVERRIDE;
1187 static void innerfunction(char*name, params_t*params, classinfo_t*return_type)
1189 //parserassert(state->method && state->method->info);
1191 methodstate_t*parent_method = state->method;
1194 return_type = 0; // not valid in pass 1
1198 state->new_vars = 1;
1201 state->method = rfx_calloc(sizeof(methodstate_t));
1202 state->method->inner = 1;
1203 state->method->variable_count = 0;
1204 state->method->abc = rfx_calloc(sizeof(abc_method_t));
1206 NEW(methodinfo_t,minfo);
1207 minfo->kind = INFOTYPE_METHOD;
1208 minfo->access = ACCESS_PACKAGEINTERNAL;
1210 state->method->info = minfo;
1213 list_append(parent_method->innerfunctions, state->method);
1215 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
1217 function_initvars(state->method, params, 0, 1);
1221 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1222 state->method->variable_count = 0;
1223 parserassert(state->method);
1225 state->method->info->return_type = return_type;
1226 function_initvars(state->method, params, 0, 1);
1230 static void startfunction(token_t*ns, int flags, enum yytokentype getset, char*name,
1231 params_t*params, classinfo_t*return_type)
1233 if(state->method && state->method->info) {
1234 syntaxerror("not able to start another method scope");
1237 state->new_vars = 1;
1240 state->method = rfx_calloc(sizeof(methodstate_t));
1241 state->method->has_super = 0;
1244 state->method->is_constructor = !strcmp(state->cls->info->name,name);
1246 state->method->is_global = 1;
1247 state->method->late_binding = 1; // for global methods, always push local_0 on the scope stack
1249 if(state->method->is_constructor)
1250 name = "__as3_constructor__";
1253 state->method->info = registerfunction(getset, flags, name, params, return_type, 0);
1255 function_initvars(state->method, params, flags, 1);
1257 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
1261 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1262 state->method->variable_count = 0;
1263 parserassert(state->method);
1266 memberinfo_t*m = registry_findmember(state->cls->info, name, 2);
1267 check_override(m, flags);
1271 state->cls->has_constructor |= state->method->is_constructor;
1274 state->method->info->return_type = return_type;
1275 function_initvars(state->method, params, flags, 1);
1279 static abc_method_t* endfunction(token_t*ns, int flags, enum yytokentype getset, char*name,
1280 params_t*params, classinfo_t*return_type, code_t*body)
1283 // store inner methods in variables
1284 function_initvars(state->method, 0, 0, 0);
1286 methodstate_list_t*ml = state->method->innerfunctions;
1287 dict_t*xvars = dict_new();
1289 methodstate_t*m = ml->methodstate;
1290 parserassert(m->inner);
1291 if(m->unresolved_variables) {
1292 dict_t*d = m->unresolved_variables;
1294 for(t=0;t<d->hashsize;t++) {
1295 dictentry_t*l = d->slots[t];
1297 /* check parent method's variables */
1298 if(find_variable(state, l->key)) {
1299 m->uses_parent_function = 1;
1300 state->method->uses_slots = 1;
1301 dict_put(xvars, l->key, 0);
1308 dict_destroy(m->unresolved_variables);
1309 m->unresolved_variables = 0;
1313 if(state->method->uses_slots) {
1314 state->method->slots = dict_new();
1316 DICT_ITERATE_ITEMS(state->vars, char*, name, variable_t*, v) {
1317 if(v->index && dict_contains(xvars, name)) {
1320 if(v->is_inner_method) {
1321 v->is_inner_method->is_a_slot = 1;
1324 dict_put(state->method->slots, name, v);
1327 state->method->uses_slots = i;
1328 dict_destroy(state->vars);state->vars = 0;
1330 dict_destroy(xvars);
1337 /*if(state->method->uses_parent_function){
1338 syntaxerror("accessing variables of parent function from inner functions not supported yet");
1343 multiname_t*type2 = sig2mname(return_type);
1345 if(state->method->inner) {
1346 f = state->method->abc;
1347 abc_method_init(f, global->file, type2, 1);
1348 } else if(state->method->is_constructor) {
1349 f = abc_class_getconstructor(state->cls->abc, type2);
1350 } else if(!state->method->is_global) {
1351 namespace_t mname_ns = {state->method->info->access, ""};
1352 multiname_t mname = {QNAME, &mname_ns, 0, name};
1354 if(flags&FLAG_STATIC)
1355 f = abc_class_staticmethod(state->cls->abc, type2, &mname);
1357 f = abc_class_method(state->cls->abc, type2, &mname);
1358 slot = f->trait->slot_id;
1360 namespace_t mname_ns = {state->method->info->access, state->package};
1361 multiname_t mname = {QNAME, &mname_ns, 0, name};
1363 f = abc_method_new(global->file, type2, 1);
1364 trait_t*t = trait_new_method(&global->init->traits, multiname_clone(&mname), f);
1365 //abc_code_t*c = global->init->method->body->code;
1367 //flash doesn't seem to allow us to access function slots
1368 //state->method->info->slot = slot;
1370 if(flags&FLAG_OVERRIDE) f->trait->attributes |= TRAIT_ATTR_OVERRIDE;
1371 if(getset == KW_GET) f->trait->kind = TRAIT_GETTER;
1372 if(getset == KW_SET) f->trait->kind = TRAIT_SETTER;
1373 if(params->varargs) f->flags |= METHOD_NEED_REST;
1377 for(p=params->list;p;p=p->next) {
1378 if(params->varargs && !p->next) {
1379 break; //varargs: omit last parameter in function signature
1381 multiname_t*m = sig2mname(p->param->type);
1382 list_append(f->parameters, m);
1383 if(p->param->value) {
1384 check_constant_against_type(p->param->type, p->param->value);
1385 opt=1;list_append(f->optional_parameters, p->param->value);
1387 syntaxerror("non-optional parameter not allowed after optional parameters");
1390 if(state->method->slots) {
1391 DICT_ITERATE_ITEMS(state->method->slots, char*, name, variable_t*, v) {
1393 multiname_t*mname = multiname_new(namespace_new(ACCESS_PACKAGE, ""), name);
1394 multiname_t*type = sig2mname(v->type);
1395 trait_t*t = trait_new_member(&f->body->traits, type, mname, 0);
1396 t->slot_id = v->index;
1401 check_code_for_break(body);
1404 f->body->code = body;
1405 f->body->exceptions = state->method->exceptions;
1406 } else { //interface
1408 syntaxerror("interface methods can't have a method body");
1418 char is_subtype_of(classinfo_t*type, classinfo_t*supertype)
1423 void breakjumpsto(code_t*c, char*name, code_t*jump)
1426 if(c->opcode == OPCODE___BREAK__) {
1427 string_t*name2 = c->data[0];
1428 if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1429 c->opcode = OPCODE_JUMP;
1436 void continuejumpsto(code_t*c, char*name, code_t*jump)
1439 if(c->opcode == OPCODE___CONTINUE__) {
1440 string_t*name2 = c->data[0];
1441 if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1442 c->opcode = OPCODE_JUMP;
1450 #define IS_INT(a) (TYPE_IS_INT((a)) || TYPE_IS_UINT((a)))
1451 #define IS_NUMBER_OR_INT(a) (TYPE_IS_INT((a)) || TYPE_IS_UINT((a)) || TYPE_IS_NUMBER((a)))
1452 #define BOTH_INT(a,b) (IS_INT(a) && IS_INT(b))
1454 classinfo_t*join_types(classinfo_t*type1, classinfo_t*type2, char op)
1456 if(!type1 || !type2)
1457 return registry_getanytype();
1458 if(TYPE_IS_ANY(type1) || TYPE_IS_ANY(type2))
1459 return registry_getanytype();
1462 if(IS_NUMBER_OR_INT(type1) && IS_NUMBER_OR_INT(type2)) {
1471 return registry_getanytype();
1473 code_t*converttype(code_t*c, classinfo_t*from, classinfo_t*to)
1478 return abc_coerce_a(c);
1482 // cast an "any" type to a specific type. subject to
1483 // runtime exceptions
1484 return abc_coerce2(c, &m);
1487 if((TYPE_IS_NUMBER(from) || TYPE_IS_UINT(from) || TYPE_IS_INT(from)) &&
1488 (TYPE_IS_NUMBER(to) || TYPE_IS_UINT(to) || TYPE_IS_INT(to))) {
1489 // allow conversion between number types
1490 return abc_coerce2(c, &m);
1492 //printf("%s.%s\n", from.package, from.name);
1493 //printf("%s.%s\n", to.package, to.name);
1495 classinfo_t*supertype = from;
1497 if(supertype == to) {
1498 // target type is one of from's superclasses
1499 return abc_coerce2(c, &m);
1502 while(supertype->interfaces[t]) {
1503 if(supertype->interfaces[t]==to) {
1504 // target type is one of from's interfaces
1505 return abc_coerce2(c, &m);
1509 supertype = supertype->superclass;
1511 if(TYPE_IS_FUNCTION(from) && TYPE_IS_FUNCTION(to))
1513 if(TYPE_IS_CLASS(from) && TYPE_IS_CLASS(to))
1515 if(TYPE_IS_NULL(from) && !IS_NUMBER_OR_INT(to))
1518 as3_error("can't convert type %s%s%s to %s%s%s",
1519 from->package, from->package?".":"", from->name,
1520 to->package, to->package?".":"", to->name);
1524 code_t*defaultvalue(code_t*c, classinfo_t*type)
1526 if(TYPE_IS_INT(type)) {
1527 c = abc_pushbyte(c, 0);
1528 } else if(TYPE_IS_UINT(type)) {
1529 c = abc_pushuint(c, 0);
1530 } else if(TYPE_IS_FLOAT(type)) {
1532 } else if(TYPE_IS_BOOLEAN(type)) {
1533 c = abc_pushfalse(c);
1535 //c = abc_pushundefined(c);
1537 c = abc_pushnull(c);
1539 c = abc_coerce2(c, &m);
1544 char is_pushundefined(code_t*c)
1546 return (c && !c->prev && !c->next && c->opcode == OPCODE_PUSHUNDEFINED);
1549 static slotinfo_t* find_class(char*name)
1553 c = registry_find(state->package, name);
1556 /* try explicit imports */
1557 dictentry_t* e = dict_get_slot(state->imports, name);
1560 if(!strcmp(e->key, name)) {
1561 c = (slotinfo_t*)e->data;
1567 /* try package.* imports */
1568 import_list_t*l = state->wildcard_imports;
1570 //printf("does package %s contain a class %s?\n", l->import->package, name);
1571 c = registry_find(l->import->package, name);
1576 /* try global package */
1577 c = registry_find("", name);
1580 /* try local "filename" package */
1581 c = registry_find(internal_filename_package, name);
1587 static char is_getlocal(code_t*c)
1589 if(!c || c->prev || c->next)
1591 return(c->opcode == OPCODE_GETLOCAL
1592 || c->opcode == OPCODE_GETLOCAL_0
1593 || c->opcode == OPCODE_GETLOCAL_1
1594 || c->opcode == OPCODE_GETLOCAL_2
1595 || c->opcode == OPCODE_GETLOCAL_3);
1597 static int getlocalnr(code_t*c)
1599 if(c->opcode == OPCODE_GETLOCAL) {return (ptroff_t)c->data[0];}
1600 else if(c->opcode == OPCODE_GETLOCAL_0) {return 0;}
1601 else if(c->opcode == OPCODE_GETLOCAL_1) {return 1;}
1602 else if(c->opcode == OPCODE_GETLOCAL_2) {return 2;}
1603 else if(c->opcode == OPCODE_GETLOCAL_3) {return 3;}
1604 else syntaxerror("Internal error: opcode %02x is not a getlocal call", c->opcode);
1608 static code_t* toreadwrite(code_t*in, code_t*middlepart, char justassign, char readbefore)
1612 [prefix code] [read instruction]
1616 [prefix code] ([dup]) [read instruction] [middlepart] [setvar] [write instruction] [getvar]
1618 if(in && in->opcode == OPCODE_COERCE_A) {
1619 in = code_cutlast(in);
1622 syntaxerror("internal error");
1624 /* chop off read instruction */
1628 prefix = r->prev;r->prev = 0;
1634 char use_temp_var = readbefore;
1636 /* generate the write instruction, and maybe append a dup to the prefix code */
1637 code_t* write = abc_nop(0);
1638 if(r->opcode == OPCODE_GETPROPERTY) {
1639 write->opcode = OPCODE_SETPROPERTY;
1640 multiname_t*m = (multiname_t*)r->data[0];
1641 write->data[0] = multiname_clone(m);
1642 if(m->type == QNAME || m->type == MULTINAME) {
1644 prefix = abc_dup(prefix); // we need the object, too
1647 } else if(m->type == MULTINAMEL) {
1649 /* dupping two values on the stack requires 5 operations and one register-
1650 couldn't adobe just have given us a dup2? */
1651 int temp = gettempvar();
1652 prefix = abc_setlocal(prefix, temp);
1653 prefix = abc_dup(prefix);
1654 prefix = abc_getlocal(prefix, temp);
1655 prefix = abc_swap(prefix);
1656 prefix = abc_getlocal(prefix, temp);
1658 prefix = abc_kill(prefix, temp);
1662 syntaxerror("illegal lvalue: can't assign a value to this expression (not a qname/multiname)");
1664 } else if(r->opcode == OPCODE_GETSLOT) {
1665 write->opcode = OPCODE_SETSLOT;
1666 write->data[0] = r->data[0];
1668 prefix = abc_dup(prefix); // we need the object, too
1671 } else if(r->opcode == OPCODE_GETLOCAL) {
1672 write->opcode = OPCODE_SETLOCAL;
1673 write->data[0] = r->data[0];
1674 } else if(r->opcode == OPCODE_GETLOCAL_0) {
1675 write->opcode = OPCODE_SETLOCAL_0;
1676 } else if(r->opcode == OPCODE_GETLOCAL_1) {
1677 write->opcode = OPCODE_SETLOCAL_1;
1678 } else if(r->opcode == OPCODE_GETLOCAL_2) {
1679 write->opcode = OPCODE_SETLOCAL_2;
1680 } else if(r->opcode == OPCODE_GETLOCAL_3) {
1681 write->opcode = OPCODE_SETLOCAL_3;
1684 syntaxerror("illegal lvalue: can't assign a value to this expression");
1691 /* with getproperty/getslot, we have to be extra careful not
1692 to execute the read code twice, as it might have side-effects
1693 (e.g. if the property is in fact a setter/getter combination)
1695 So read the value, modify it, and write it again,
1696 using prefix only once and making sure (by using a temporary
1697 register) that the return value is what we just wrote */
1698 temp = gettempvar();
1699 c = code_append(c, prefix);
1700 c = code_append(c, r);
1703 c = abc_setlocal(c, temp);
1705 c = code_append(c, middlepart);
1708 c = abc_setlocal(c, temp);
1710 c = code_append(c, write);
1711 c = abc_getlocal(c, temp);
1712 c = abc_kill(c, temp);
1714 /* if we're allowed to execute the read code twice *and*
1715 the middlepart doesn't modify the code, things are easier.
1717 code_t* r2 = code_dup(r);
1718 //c = code_append(c, prefix);
1719 parserassert(!prefix);
1720 c = code_append(c, r);
1721 c = code_append(c, middlepart);
1722 c = code_append(c, write);
1723 c = code_append(c, r2);
1726 /* even smaller version: overwrite the value without reading
1730 c = code_append(c, prefix);
1733 c = code_append(c, middlepart);
1734 c = code_append(c, write);
1735 c = code_append(c, r);
1738 temp = gettempvar();
1740 c = code_append(c, prefix);
1742 c = code_append(c, middlepart);
1744 c = abc_setlocal(c, temp);
1745 c = code_append(c, write);
1746 c = abc_getlocal(c, temp);
1747 c = abc_kill(c, temp);
1753 char is_break_or_jump(code_t*c)
1757 if(c->opcode == OPCODE_JUMP ||
1758 c->opcode == OPCODE___BREAK__ ||
1759 c->opcode == OPCODE___CONTINUE__ ||
1760 c->opcode == OPCODE_THROW ||
1761 c->opcode == OPCODE_RETURNVOID ||
1762 c->opcode == OPCODE_RETURNVALUE) {
1769 #define IS_FINALLY_TARGET(op) \
1770 ((op) == OPCODE___CONTINUE__ || \
1771 (op) == OPCODE___BREAK__ || \
1772 (op) == OPCODE_RETURNVOID || \
1773 (op) == OPCODE_RETURNVALUE || \
1774 (op) == OPCODE___RETHROW__)
1776 static code_t* insert_finally_lookup(code_t*c, code_t*finally, int tempvar)
1778 #define NEED_EXTRA_STACK_ARG
1779 code_t*finally_label = abc_nop(0);
1780 NEW(lookupswitch_t, l);
1786 code_t*prev = i->prev;
1787 if(IS_FINALLY_TARGET(i->opcode)) {
1790 if(i->opcode == OPCODE___RETHROW__ ||
1791 i->opcode == OPCODE_RETURNVALUE) {
1792 if(i->opcode == OPCODE___RETHROW__)
1793 i->opcode = OPCODE_THROW;
1795 p = abc_coerce_a(p);
1796 p = abc_setlocal(p, tempvar);
1798 p = abc_pushbyte(p, count++);
1799 p = abc_jump(p, finally_label);
1800 code_t*target = p = abc_label(p);
1801 #ifdef NEED_EXTRA_STACK_ARG
1805 p = abc_getlocal(p, tempvar);
1808 p->next = i;i->prev = p;
1809 list_append(l->targets, target);
1815 c = abc_pushbyte(c, -1);
1816 c = code_append(c, finally_label);
1817 c = code_append(c, finally);
1819 #ifdef NEED_EXTRA_STACK_ARG
1822 c = abc_lookupswitch(c, l);
1823 c = l->def = abc_label(c);
1824 #ifdef NEED_EXTRA_STACK_ARG
1831 static code_t* insert_finally_simple(code_t*c, code_t*finally, int tempvar)
1835 code_t*prev = i->prev;
1836 if(IS_FINALLY_TARGET(i->opcode)) {
1837 if(i->opcode == OPCODE___RETHROW__)
1838 i->opcode = OPCODE_THROW;
1839 code_t*end = code_dup(finally);
1840 code_t*start = code_start(end);
1841 if(prev) prev->next = start;
1848 return code_append(c, finally);
1851 code_t* insert_finally(code_t*c, code_t*finally, int tempvar)
1857 int num_insertion_points=0;
1859 if(IS_FINALLY_TARGET(i->opcode))
1860 num_insertion_points++;
1867 if(i->branch || i->opcode == OPCODE_LOOKUPSWITCH) {
1872 int simple_version_cost = (1+num_insertion_points)*code_size;
1873 int lookup_version_cost = 4*num_insertion_points + 5;
1875 if(cantdup || simple_version_cost > lookup_version_cost) {
1876 printf("lookup %d > *%d*\n", simple_version_cost, lookup_version_cost);
1877 return insert_finally_lookup(c, finally, tempvar);
1879 printf("simple *%d* < %d\n", simple_version_cost, lookup_version_cost);
1880 return insert_finally_simple(c, finally, tempvar);
1884 #define PASS1 }} if(as3_pass == 1) {{
1885 #define PASS1END }} if(as3_pass == 2) {{
1886 #define PASS2 }} if(as3_pass == 2) {{
1887 #define PASS12 }} {{
1888 #define PASS12END }} if(as3_pass == 2) {{
1892 /* Line 273 of skeleton.m4 */
1893 #line 1894 "parser.tab.c"
1900 typedef YYTYPE_UINT8 yytype_uint8;
1902 typedef unsigned char yytype_uint8;
1906 typedef YYTYPE_INT8 yytype_int8;
1907 #elif (defined __STDC__ || defined __C99__FUNC__ \
1908 || defined __cplusplus || defined _MSC_VER)
1909 typedef signed char yytype_int8;
1911 typedef short int yytype_int8;
1914 #ifdef YYTYPE_UINT16
1915 typedef YYTYPE_UINT16 yytype_uint16;
1917 typedef unsigned short int yytype_uint16;
1921 typedef YYTYPE_INT16 yytype_int16;
1923 typedef short int yytype_int16;
1927 # ifdef __SIZE_TYPE__
1928 # define YYSIZE_T __SIZE_TYPE__
1929 # elif defined size_t
1930 # define YYSIZE_T size_t
1931 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
1932 || defined __cplusplus || defined _MSC_VER)
1933 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
1934 # define YYSIZE_T size_t
1936 # define YYSIZE_T unsigned int
1940 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
1945 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
1946 # define YY_(msgid) dgettext ("bison-runtime", msgid)
1950 # define YY_(msgid) msgid
1954 /* Suppress unused-variable warnings by "using" E. */
1955 #if ! defined lint || defined __GNUC__
1956 # define YYUSE(e) ((void) (e))
1958 # define YYUSE(e) /* empty */
1961 /* Identity function, used to suppress warnings about constant conditions. */
1963 # define YYID(n) (n)
1965 #if (defined __STDC__ || defined __C99__FUNC__ \
1966 || defined __cplusplus || defined _MSC_VER)
1979 #if ! defined yyoverflow || YYERROR_VERBOSE
1981 /* The parser invokes alloca or malloc; define the necessary symbols. */
1983 # ifdef YYSTACK_USE_ALLOCA
1984 # if YYSTACK_USE_ALLOCA
1986 # define YYSTACK_ALLOC __builtin_alloca
1987 # elif defined __BUILTIN_VA_ARG_INCR
1988 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
1990 # define YYSTACK_ALLOC __alloca
1991 # elif defined _MSC_VER
1992 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
1993 # define alloca _alloca
1995 # define YYSTACK_ALLOC alloca
1996 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1997 || defined __cplusplus || defined _MSC_VER)
1998 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
2000 # define _STDLIB_H 1
2007 # ifdef YYSTACK_ALLOC
2008 /* Pacify GCC's `empty if-body' warning. */
2009 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
2010 # ifndef YYSTACK_ALLOC_MAXIMUM
2011 /* The OS might guarantee only one guard page at the bottom of the stack,
2012 and a page size can be as small as 4096 bytes. So we cannot safely
2013 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
2014 to allow for a few compiler-allocated temporary stack slots. */
2015 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
2018 # define YYSTACK_ALLOC YYMALLOC
2019 # define YYSTACK_FREE YYFREE
2020 # ifndef YYSTACK_ALLOC_MAXIMUM
2021 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
2023 # if (defined __cplusplus && ! defined _STDLIB_H \
2024 && ! ((defined YYMALLOC || defined malloc) \
2025 && (defined YYFREE || defined free)))
2026 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
2028 # define _STDLIB_H 1
2032 # define YYMALLOC malloc
2033 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
2034 || defined __cplusplus || defined _MSC_VER)
2035 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
2039 # define YYFREE free
2040 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
2041 || defined __cplusplus || defined _MSC_VER)
2042 void free (void *); /* INFRINGES ON USER NAME SPACE */
2046 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
2049 #if (! defined yyoverflow \
2050 && (! defined __cplusplus \
2051 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
2053 /* A type that is properly aligned for any stack member. */
2056 yytype_int16 yyss_alloc;
2060 /* The size of the maximum gap between one aligned stack and the next. */
2061 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
2063 /* The size of an array large to enough to hold all stacks, each with
2065 # define YYSTACK_BYTES(N) \
2066 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
2067 + YYSTACK_GAP_MAXIMUM)
2069 /* Copy COUNT objects from FROM to TO. The source and destination do
2072 # if defined __GNUC__ && 1 < __GNUC__
2073 # define YYCOPY(To, From, Count) \
2074 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
2076 # define YYCOPY(To, From, Count) \
2080 for (yyi = 0; yyi < (Count); yyi++) \
2081 (To)[yyi] = (From)[yyi]; \
2087 /* Relocate STACK from its old location to the new one. The
2088 local variables YYSIZE and YYSTACKSIZE give the old and new number of
2089 elements in the stack, and YYPTR gives the new location of the
2090 stack. Advance YYPTR to a properly aligned location for the next
2092 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
2095 YYSIZE_T yynewbytes; \
2096 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
2097 Stack = &yyptr->Stack_alloc; \
2098 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
2099 yyptr += yynewbytes / sizeof (*yyptr); \
2105 /* YYFINAL -- State number of the termination state. */
2107 /* YYLAST -- Last index in YYTABLE. */
2110 /* YYNTOKENS -- Number of terminals. */
2111 #define YYNTOKENS 134
2112 /* YYNNTS -- Number of nonterminals. */
2114 /* YYNRULES -- Number of rules. */
2115 #define YYNRULES 303
2116 /* YYNRULES -- Number of states. */
2117 #define YYNSTATES 514
2119 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
2120 #define YYUNDEFTOK 2
2121 #define YYMAXUTOK 363
2123 #define YYTRANSLATE(YYX) \
2124 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
2126 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
2127 static const yytype_uint8 yytranslate[] =
2129 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2130 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2131 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2132 2, 2, 2, 118, 2, 2, 2, 116, 108, 2,
2133 122, 133, 115, 113, 100, 112, 127, 114, 2, 2,
2134 2, 2, 2, 2, 2, 2, 2, 2, 105, 99,
2135 109, 102, 110, 104, 128, 2, 2, 2, 2, 2,
2136 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2137 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2138 2, 124, 2, 125, 107, 2, 2, 2, 2, 2,
2139 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2140 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2141 2, 2, 2, 126, 106, 132, 117, 2, 2, 2,
2142 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2143 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2144 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2145 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2146 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2147 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2148 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2149 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2150 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2151 2, 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, 2, 2, 2, 1, 2, 3, 4,
2155 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
2156 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
2157 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
2158 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
2159 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
2160 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
2161 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
2162 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
2163 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
2164 95, 96, 97, 98, 101, 103, 111, 119, 120, 121,
2169 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
2171 static const yytype_uint16 yyprhs[] =
2173 0, 0, 3, 5, 6, 8, 10, 13, 15, 17,
2174 19, 21, 23, 25, 30, 32, 33, 35, 37, 40,
2175 42, 44, 46, 48, 50, 55, 57, 59, 60, 63,
2176 65, 67, 69, 71, 73, 75, 77, 79, 81, 83,
2177 85, 87, 91, 94, 96, 98, 100, 102, 104, 106,
2178 108, 113, 115, 118, 120, 122, 126, 129, 130, 133,
2179 136, 138, 142, 146, 147, 150, 151, 159, 160, 162,
2180 164, 168, 170, 173, 177, 186, 193, 194, 201, 202,
2181 210, 212, 215, 217, 220, 221, 223, 225, 228, 230,
2182 233, 238, 242, 243, 252, 253, 263, 264, 270, 272,
2183 275, 277, 280, 282, 283, 290, 293, 295, 301, 303,
2184 305, 309, 311, 312, 319, 320, 326, 329, 334, 335,
2185 337, 339, 342, 344, 346, 348, 350, 352, 354, 356,
2186 358, 360, 362, 363, 366, 367, 370, 371, 374, 375,
2187 385, 386, 395, 396, 398, 400, 403, 405, 410, 412,
2188 414, 416, 417, 419, 421, 424, 426, 429, 438, 440,
2189 442, 443, 450, 451, 454, 456, 458, 460, 462, 464,
2190 466, 468, 470, 472, 473, 475, 478, 483, 487, 489,
2191 494, 497, 499, 501, 502, 503, 516, 518, 519, 520,
2192 531, 533, 537, 539, 541, 543, 547, 549, 551, 553,
2193 556, 557, 558, 562, 563, 565, 567, 569, 572, 575,
2194 576, 581, 586, 591, 594, 596, 599, 601, 603, 607,
2195 609, 611, 613, 615, 617, 619, 621, 623, 625, 627,
2196 629, 631, 633, 635, 637, 639, 641, 643, 647, 651,
2197 655, 659, 663, 667, 671, 675, 679, 683, 686, 689,
2198 693, 697, 701, 705, 709, 713, 717, 721, 725, 729,
2199 733, 737, 741, 745, 749, 754, 757, 759, 763, 766,
2200 771, 775, 776, 778, 782, 788, 792, 796, 800, 804,
2201 808, 812, 816, 820, 824, 828, 832, 836, 842, 845,
2202 848, 851, 854, 858, 861, 866, 872, 876, 882, 886,
2206 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
2207 static const yytype_int16 yyrhs[] =
2209 135, 0, -1, 136, -1, -1, 137, -1, 138, -1,
2210 137, 138, -1, 185, -1, 197, -1, 195, -1, 214,
2211 -1, 206, -1, 147, -1, 148, 126, 136, 132, -1,
2212 99, -1, -1, 140, -1, 141, -1, 140, 141, -1,
2213 197, -1, 195, -1, 214, -1, 206, -1, 147, -1,
2214 148, 126, 139, 132, -1, 99, -1, 143, -1, -1,
2215 143, 145, -1, 145, -1, 188, -1, 159, -1, 160,
2216 -1, 161, -1, 163, -1, 171, -1, 154, -1, 182,
2217 -1, 179, -1, 236, -1, 243, -1, 126, 143, 132,
2218 -1, 126, 132, -1, 99, -1, 144, -1, 150, -1,
2219 165, -1, 166, -1, 233, -1, 181, -1, 148, 126,
2220 143, 132, -1, 242, -1, 145, 99, -1, 145, -1,
2221 144, -1, 3, 89, 3, -1, 102, 234, -1, -1,
2222 46, 151, -1, 32, 151, -1, 152, -1, 151, 100,
2223 152, -1, 3, 224, 149, -1, -1, 65, 146, -1,
2224 -1, 64, 122, 155, 235, 133, 146, 153, -1, -1,
2225 150, -1, 236, -1, 46, 3, 224, -1, 3, -1,
2226 13, 122, -1, 13, 50, 122, -1, 158, 156, 99,
2227 235, 99, 236, 133, 146, -1, 158, 157, 68, 235,
2228 133, 146, -1, -1, 14, 122, 162, 235, 133, 146,
2229 -1, -1, 15, 164, 146, 14, 122, 235, 133, -1,
2230 66, -1, 66, 3, -1, 30, -1, 30, 3, -1,
2231 -1, 168, -1, 170, -1, 168, 170, -1, 169, -1,
2232 168, 169, -1, 34, 237, 105, 142, -1, 62, 105,
2233 142, -1, -1, 16, 122, 172, 237, 133, 126, 167,
2234 132, -1, -1, 33, 122, 3, 224, 133, 174, 126,
2235 142, 132, -1, -1, 28, 126, 176, 142, 132, -1,
2236 173, -1, 177, 173, -1, 177, -1, 177, 175, -1,
2237 175, -1, -1, 52, 126, 180, 142, 132, 178, -1,
2238 37, 235, -1, 37, -1, 39, 122, 235, 133, 146,
2239 -1, 3, -1, 19, -1, 184, 127, 183, -1, 183,
2240 -1, -1, 19, 184, 126, 186, 139, 132, -1, -1,
2241 19, 126, 187, 139, 132, -1, 41, 220, -1, 41,
2242 184, 127, 115, -1, -1, 190, -1, 191, -1, 190,
2243 191, -1, 21, -1, 22, -1, 20, -1, 38, -1,
2244 47, -1, 49, -1, 48, -1, 26, -1, 24, -1,
2245 4, -1, -1, 54, 221, -1, -1, 54, 222, -1,
2246 -1, 17, 222, -1, -1, 189, 31, 3, 192, 194,
2247 126, 196, 199, 132, -1, -1, 189, 44, 3, 193,
2248 126, 198, 202, 132, -1, -1, 200, -1, 201, -1,
2249 200, 201, -1, 99, -1, 148, 126, 199, 132, -1,
2250 206, -1, 214, -1, 144, -1, -1, 203, -1, 204,
2251 -1, 203, 204, -1, 99, -1, 46, 3, -1, 189,
2252 27, 213, 3, 122, 210, 133, 224, -1, 46, -1,
2253 32, -1, -1, 189, 205, 3, 207, 224, 149, -1,
2254 -1, 102, 209, -1, 10, -1, 8, -1, 9, -1,
2255 12, -1, 5, -1, 56, -1, 55, -1, 45, -1,
2256 3, -1, -1, 211, -1, 93, 212, -1, 211, 100,
2257 93, 212, -1, 211, 100, 212, -1, 212, -1, 3,
2258 105, 223, 208, -1, 3, 208, -1, 51, -1, 35,
2259 -1, -1, -1, 189, 27, 213, 3, 122, 210, 133,
2260 224, 126, 215, 142, 132, -1, 3, -1, -1, -1,
2261 27, 216, 122, 210, 133, 224, 126, 218, 142, 132,
2262 -1, 3, -1, 184, 127, 3, -1, 220, -1, 219,
2263 -1, 221, -1, 222, 100, 221, -1, 221, -1, 115,
2264 -1, 36, -1, 105, 223, -1, -1, -1, 122, 226,
2265 133, -1, -1, 227, -1, 228, -1, 234, -1, 227,
2266 100, -1, 228, 234, -1, -1, 25, 237, 229, 225,
2267 -1, 237, 122, 226, 133, -1, 53, 122, 226, 133,
2268 -1, 63, 237, -1, 42, -1, 42, 235, -1, 237,
2269 -1, 237, -1, 235, 100, 237, -1, 235, -1, 217,
2270 -1, 238, -1, 241, -1, 230, -1, 232, -1, 231,
2271 -1, 6, -1, 10, -1, 11, -1, 8, -1, 9,
2272 -1, 12, -1, 5, -1, 29, -1, 56, -1, 55,
2273 -1, 45, -1, 237, 109, 237, -1, 237, 110, 237,
2274 -1, 237, 75, 237, -1, 237, 76, 237, -1, 237,
2275 71, 237, -1, 237, 72, 237, -1, 237, 74, 237,
2276 -1, 237, 73, 237, -1, 237, 87, 237, -1, 237,
2277 88, 237, -1, 118, 237, -1, 117, 237, -1, 237,
2278 108, 237, -1, 237, 107, 237, -1, 237, 106, 237,
2279 -1, 237, 96, 237, -1, 237, 95, 237, -1, 237,
2280 94, 237, -1, 237, 114, 237, -1, 237, 116, 237,
2281 -1, 237, 113, 237, -1, 237, 112, 237, -1, 237,
2282 115, 237, -1, 237, 68, 237, -1, 237, 69, 237,
2283 -1, 237, 40, 237, -1, 237, 67, 237, -1, 43,
2284 122, 237, 133, -1, 36, 237, -1, 36, -1, 122,
2285 235, 133, -1, 112, 237, -1, 237, 124, 237, 125,
2286 -1, 124, 226, 125, -1, -1, 240, -1, 234, 105,
2287 234, -1, 240, 100, 234, 105, 234, -1, 70, 239,
2288 132, -1, 237, 80, 237, -1, 237, 79, 237, -1,
2289 237, 85, 237, -1, 237, 84, 237, -1, 237, 86,
2290 237, -1, 237, 78, 237, -1, 237, 77, 237, -1,
2291 237, 83, 237, -1, 237, 81, 237, -1, 237, 82,
2292 237, -1, 237, 102, 237, -1, 237, 104, 237, 105,
2293 237, -1, 237, 91, -1, 237, 90, -1, 91, 237,
2294 -1, 90, 237, -1, 53, 127, 3, -1, 128, 3,
2295 -1, 237, 127, 128, 3, -1, 237, 127, 3, 89,
2296 3, -1, 237, 92, 3, -1, 237, 127, 122, 237,
2297 133, -1, 237, 127, 3, -1, 3, -1, 189, 18,
2298 3, -1, 189, 18, 3, 102, 3, -1, 189, 18,
2299 3, 102, 5, -1, 23, 18, 3, -1
2302 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
2303 static const yytype_uint16 yyrline[] =
2305 0, 1869, 1869, 1871, 1871, 1872, 1873, 1875, 1876, 1877,
2306 1878, 1879, 1880, 1881, 1882, 1884, 1884, 1885, 1886, 1888,
2307 1889, 1890, 1891, 1892, 1893, 1894, 1896, 1897, 1899, 1900,
2308 1903, 1904, 1905, 1906, 1907, 1908, 1909, 1910, 1911, 1912,
2309 1913, 1914, 1915, 1918, 1919, 1920, 1921, 1922, 1923, 1924,
2310 1925, 1927, 1931, 1932, 1936, 1943, 1947, 1948, 1952, 1953,
2311 1955, 1956, 1958, 2019, 2020, 2023, 2023, 2042, 2043, 2044,
2312 2049, 2053, 2058, 2059, 2061, 2081, 2125, 2125, 2144, 2144,
2313 2159, 2162, 2165, 2168, 2172, 2173, 2174, 2175, 2176, 2177,
2314 2179, 2190, 2193, 2193, 2222, 2222, 2246, 2246, 2262, 2263,
2315 2264, 2265, 2273, 2282, 2282, 2327, 2331, 2342, 2351, 2352,
2316 2354, 2355, 2357, 2357, 2359, 2359, 2362, 2377, 2393, 2394,
2317 2395, 2396, 2398, 2399, 2400, 2401, 2402, 2403, 2404, 2405,
2318 2406, 2407, 2409, 2410, 2412, 2413, 2415, 2416, 2420, 2418,
2319 2426, 2424, 2432, 2433, 2434, 2435, 2436, 2437, 2438, 2439,
2320 2441, 2447, 2448, 2449, 2450, 2451, 2452, 2455, 2468, 2468,
2321 2470, 2470, 2543, 2544, 2546, 2547, 2548, 2549, 2550, 2552,
2322 2553, 2554, 2555, 2564, 2568, 2574, 2580, 2588, 2593, 2599,
2323 2607, 2615, 2616, 2617, 2620, 2619, 2636, 2637, 2639, 2638,
2324 2662, 2670, 2683, 2684, 2686, 2687, 2689, 2690, 2691, 2700,
2325 2701, 2705, 2706, 2708, 2709, 2710, 2712, 2716, 2717, 2722,
2326 2723, 2759, 2805, 2826, 2847, 2850, 2857, 2858, 2859, 2865,
2327 2871, 2873, 2875, 2877, 2879, 2881, 2883, 2900, 2905, 2908,
2328 2911, 2914, 2917, 2920, 2923, 2926, 2929, 2933, 2936, 2939,
2329 2942, 2945, 2948, 2951, 2954, 2958, 2969, 2987, 2992, 2997,
2330 3002, 3007, 3012, 3016, 3020, 3025, 3029, 3033, 3042, 3051,
2331 3061, 3066, 3078, 3084, 3089, 3095, 3101, 3105, 3107, 3118,
2332 3127, 3134, 3135, 3137, 3143, 3152, 3159, 3171, 3177, 3183,
2333 3189, 3195, 3201, 3207, 3213, 3226, 3237, 3244, 3257, 3284,
2334 3298, 3312, 3326, 3341, 3348, 3355, 3362, 3369, 3380, 3414,
2335 3535, 3536, 3537, 3539
2339 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
2340 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
2341 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
2342 static const char *const yytname[] =
2344 "$end", "error", "$undefined", "T_IDENTIFIER", "T_NAMESPACE",
2345 "T_STRING", "T_REGEXP", "T_EMPTY", "T_INT", "T_UINT", "T_BYTE",
2346 "T_SHORT", "T_FLOAT", "\"for\"", "\"while\"", "\"do\"", "\"switch\"",
2347 "\"implements\"", "\"namespace\"", "\"package\"", "\"protected\"",
2348 "\"public\"", "\"private\"", "\"use\"", "\"internal\"", "\"new\"",
2349 "\"native\"", "\"function\"", "\"finally\"", "\"undefined\"",
2350 "\"continue\"", "\"class\"", "\"const\"", "\"catch\"", "\"case\"",
2351 "\"set\"", "\"void\"", "\"throw\"", "\"static\"", "\"with\"",
2352 "\"instanceof\"", "\"import\"", "\"return\"", "\"typeof\"",
2353 "\"interface\"", "\"null\"", "\"var\"", "\"dynamic\"", "\"override\"",
2354 "\"final\"", "\"each\"", "\"get\"", "\"try\"", "\"super\"",
2355 "\"extends\"", "\"false\"", "\"true\"", "\"Boolean\"", "\"uint\"",
2356 "\"int\"", "\"Number\"", "\"String\"", "\"default\"", "\"delete\"",
2357 "\"if\"", "\"else\"", "\"break\"", "\"is\"", "\"in\"", "\"as\"",
2358 "\"{ (dictionary)\"", "\"==\"", "\"===\"", "\"!=\"", "\"!==\"", "\"<=\"",
2359 "\">=\"", "\"|=\"", "\"/=\"", "\"%=\"", "\"*=\"", "\"+=\"", "\"-=\"",
2360 "\"^=\"", "\">>=\"", "\"<<=\"", "\">>>=\"", "\"||\"", "\"&&\"", "\"::\"",
2361 "\"--\"", "\"++\"", "\"..\"", "\"...\"", "\"<<\"", "\">>>\"", "\">>\"",
2362 "prec_none", "below_semicolon", "';'", "','", "below_assignment", "'='",
2363 "\"&=\"", "'?'", "':'", "'|'", "'^'", "'&'", "'<'", "'>'", "below_minus",
2364 "'-'", "'+'", "'/'", "'*'", "'%'", "'~'", "'!'", "minusminus_prefix",
2365 "plusplus_prefix", "below_curly", "'('", "new2", "'['", "']'", "'{'",
2366 "'.'", "'@'", "above_identifier", "below_else", "above_function", "'}'",
2367 "')'", "$accept", "PROGRAM", "MAYBE_PROGRAM_CODE_LIST",
2368 "PROGRAM_CODE_LIST", "PROGRAM_CODE", "MAYBE_INPACKAGE_CODE_LIST",
2369 "INPACKAGE_CODE_LIST", "INPACKAGE_CODE", "MAYBECODE", "CODE",
2370 "CODE_STATEMENT", "CODEPIECE", "CODEBLOCK", "PACKAGE_INITCODE",
2371 "CONDITIONAL_COMPILATION", "MAYBEEXPRESSION", "VARIABLE_DECLARATION",
2372 "VARIABLE_LIST", "ONE_VARIABLE", "MAYBEELSE", "IF", "$@1", "FOR_INIT",
2373 "FOR_IN_INIT", "FOR_START", "FOR", "FOR_IN", "WHILE", "$@2", "DO_WHILE",
2374 "$@3", "BREAK", "CONTINUE", "MAYBE_CASE_LIST", "CASE_LIST", "CASE",
2375 "DEFAULT", "SWITCH", "$@4", "CATCH", "$@5", "FINALLY", "$@6",
2376 "CATCH_LIST", "CATCH_FINALLY_LIST", "TRY", "$@7", "THROW", "WITH",
2377 "X_IDENTIFIER", "PACKAGE", "PACKAGE_DECLARATION", "$@8", "$@9", "IMPORT",
2378 "MAYBE_MODIFIERS", "MODIFIER_LIST", "MODIFIER", "EXTENDS",
2379 "EXTENDS_LIST", "IMPLEMENTS_LIST", "CLASS_DECLARATION", "$@10",
2380 "INTERFACE_DECLARATION", "$@11", "MAYBE_CLASS_BODY", "CLASS_BODY",
2381 "CLASS_BODY_ITEM", "MAYBE_INTERFACE_BODY", "INTERFACE_BODY",
2382 "IDECLARATION", "VARCONST", "SLOT_DECLARATION", "$@12",
2383 "MAYBESTATICCONSTANT", "STATICCONSTANT", "MAYBE_PARAM_LIST",
2384 "PARAM_LIST", "PARAM", "GETSET", "FUNCTION_DECLARATION", "$@13",
2385 "MAYBE_IDENTIFIER", "INNERFUNCTION", "$@14", "CLASS", "PACKAGEANDCLASS",
2386 "CLASS_SPEC", "CLASS_SPEC_LIST", "TYPE", "MAYBETYPE",
2387 "MAYBE_PARAM_VALUES", "MAYBE_EXPRESSION_LIST", "EXPRESSION_LIST",
2388 "EXPRESSION_LIST_AND_COMMA", "XX", "NEW", "FUNCTIONCALL", "DELETE",
2389 "RETURN", "NONCOMMAEXPRESSION", "EXPRESSION", "VOIDEXPRESSION", "E",
2390 "CONSTANT", "MAYBE_EXPRPAIR_LIST", "EXPRPAIR_LIST", "VAR_READ",
2391 "NAMESPACE_DECLARATION", "USE_NAMESPACE", 0
2396 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
2398 static const yytype_uint16 yytoknum[] =
2400 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
2401 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
2402 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
2403 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
2404 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
2405 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
2406 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
2407 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
2408 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
2409 345, 346, 347, 348, 349, 350, 351, 352, 353, 59,
2410 44, 354, 61, 355, 63, 58, 124, 94, 38, 60,
2411 62, 356, 45, 43, 47, 42, 37, 126, 33, 357,
2412 358, 359, 40, 360, 91, 93, 123, 46, 64, 361,
2417 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
2418 static const yytype_uint8 yyr1[] =
2420 0, 134, 135, 136, 136, 137, 137, 138, 138, 138,
2421 138, 138, 138, 138, 138, 139, 139, 140, 140, 141,
2422 141, 141, 141, 141, 141, 141, 142, 142, 143, 143,
2423 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
2424 144, 144, 144, 145, 145, 145, 145, 145, 145, 145,
2425 145, 145, 146, 146, 147, 148, 149, 149, 150, 150,
2426 151, 151, 152, 153, 153, 155, 154, 156, 156, 156,
2427 157, 157, 158, 158, 159, 160, 162, 161, 164, 163,
2428 165, 165, 166, 166, 167, 167, 167, 167, 168, 168,
2429 169, 170, 172, 171, 174, 173, 176, 175, 177, 177,
2430 178, 178, 178, 180, 179, 181, 181, 182, 183, 183,
2431 184, 184, 186, 185, 187, 185, 188, 188, 189, 189,
2432 190, 190, 191, 191, 191, 191, 191, 191, 191, 191,
2433 191, 191, 192, 192, 193, 193, 194, 194, 196, 195,
2434 198, 197, 199, 199, 200, 200, 201, 201, 201, 201,
2435 201, 202, 202, 203, 203, 204, 204, 204, 205, 205,
2436 207, 206, 208, 208, 209, 209, 209, 209, 209, 209,
2437 209, 209, 209, 210, 210, 210, 210, 211, 211, 212,
2438 212, 213, 213, 213, 215, 214, 216, 216, 218, 217,
2439 219, 220, 221, 221, 222, 222, 223, 223, 223, 224,
2440 224, 225, 225, 226, 226, 226, 227, 228, 227, 229,
2441 230, 231, 231, 232, 233, 233, 234, 235, 235, 236,
2442 237, 237, 237, 237, 237, 237, 237, 238, 238, 238,
2443 238, 238, 238, 238, 238, 238, 238, 237, 237, 237,
2444 237, 237, 237, 237, 237, 237, 237, 237, 237, 237,
2445 237, 237, 237, 237, 237, 237, 237, 237, 237, 237,
2446 237, 237, 237, 237, 237, 237, 237, 237, 237, 237,
2447 237, 239, 239, 240, 240, 237, 237, 237, 237, 237,
2448 237, 237, 237, 237, 237, 237, 237, 237, 237, 237,
2449 237, 237, 237, 237, 237, 237, 237, 237, 237, 241,
2453 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
2454 static const yytype_uint8 yyr2[] =
2456 0, 2, 1, 0, 1, 1, 2, 1, 1, 1,
2457 1, 1, 1, 4, 1, 0, 1, 1, 2, 1,
2458 1, 1, 1, 1, 4, 1, 1, 0, 2, 1,
2459 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2460 1, 3, 2, 1, 1, 1, 1, 1, 1, 1,
2461 4, 1, 2, 1, 1, 3, 2, 0, 2, 2,
2462 1, 3, 3, 0, 2, 0, 7, 0, 1, 1,
2463 3, 1, 2, 3, 8, 6, 0, 6, 0, 7,
2464 1, 2, 1, 2, 0, 1, 1, 2, 1, 2,
2465 4, 3, 0, 8, 0, 9, 0, 5, 1, 2,
2466 1, 2, 1, 0, 6, 2, 1, 5, 1, 1,
2467 3, 1, 0, 6, 0, 5, 2, 4, 0, 1,
2468 1, 2, 1, 1, 1, 1, 1, 1, 1, 1,
2469 1, 1, 0, 2, 0, 2, 0, 2, 0, 9,
2470 0, 8, 0, 1, 1, 2, 1, 4, 1, 1,
2471 1, 0, 1, 1, 2, 1, 2, 8, 1, 1,
2472 0, 6, 0, 2, 1, 1, 1, 1, 1, 1,
2473 1, 1, 1, 0, 1, 2, 4, 3, 1, 4,
2474 2, 1, 1, 0, 0, 12, 1, 0, 0, 10,
2475 1, 3, 1, 1, 1, 3, 1, 1, 1, 2,
2476 0, 0, 3, 0, 1, 1, 1, 2, 2, 0,
2477 4, 4, 4, 2, 1, 2, 1, 1, 3, 1,
2478 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2479 1, 1, 1, 1, 1, 1, 1, 3, 3, 3,
2480 3, 3, 3, 3, 3, 3, 3, 2, 2, 3,
2481 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
2482 3, 3, 3, 3, 4, 2, 1, 3, 2, 4,
2483 3, 0, 1, 3, 5, 3, 3, 3, 3, 3,
2484 3, 3, 3, 3, 3, 3, 3, 5, 2, 2,
2485 2, 2, 3, 2, 4, 5, 3, 5, 3, 1,
2489 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
2490 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
2491 means the default is an error. */
2492 static const yytype_uint16 yydefact[] =
2494 118, 299, 131, 232, 226, 229, 230, 227, 228, 231,
2495 0, 0, 78, 0, 0, 124, 122, 123, 0, 130,
2496 0, 129, 187, 233, 266, 125, 0, 0, 0, 236,
2497 126, 128, 127, 0, 0, 235, 234, 0, 0, 271,
2498 0, 0, 14, 0, 0, 0, 0, 203, 118, 0,
2499 0, 2, 118, 5, 54, 12, 0, 36, 67, 31,
2500 32, 33, 34, 35, 38, 37, 7, 30, 0, 119,
2501 120, 9, 8, 11, 10, 220, 223, 225, 224, 219,
2502 39, 217, 221, 222, 40, 0, 0, 72, 76, 118,
2503 92, 108, 109, 114, 111, 0, 0, 299, 209, 186,
2504 0, 265, 0, 0, 116, 0, 103, 203, 0, 213,
2505 65, 0, 216, 0, 272, 291, 290, 268, 248, 247,
2506 0, 0, 204, 205, 206, 82, 0, 106, 214, 0,
2507 80, 43, 42, 118, 44, 29, 0, 45, 46, 47,
2508 49, 0, 48, 51, 293, 1, 6, 118, 299, 0,
2509 68, 0, 0, 69, 183, 0, 159, 0, 158, 0,
2510 121, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2511 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2512 0, 0, 0, 0, 289, 288, 0, 0, 0, 0,
2513 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2514 0, 0, 203, 0, 0, 55, 73, 0, 53, 0,
2515 0, 118, 112, 0, 303, 201, 173, 0, 0, 0,
2516 27, 0, 292, 0, 0, 275, 0, 267, 270, 207,
2517 208, 83, 200, 59, 60, 105, 215, 58, 81, 41,
2518 28, 118, 0, 0, 200, 0, 0, 182, 181, 0,
2519 132, 134, 160, 218, 262, 263, 260, 261, 241, 242,
2520 244, 243, 239, 240, 282, 281, 277, 276, 284, 285,
2521 283, 279, 278, 280, 245, 246, 296, 254, 253, 252,
2522 286, 0, 251, 250, 249, 237, 238, 258, 257, 255,
2523 259, 256, 0, 0, 298, 0, 0, 0, 52, 0,
2524 0, 25, 0, 118, 17, 23, 0, 20, 19, 22,
2525 21, 118, 110, 203, 210, 162, 0, 0, 174, 178,
2526 118, 191, 117, 264, 0, 26, 212, 0, 273, 0,
2527 0, 57, 0, 118, 300, 13, 57, 0, 0, 0,
2528 0, 136, 0, 0, 200, 0, 211, 269, 0, 0,
2529 294, 118, 0, 0, 115, 18, 118, 0, 0, 0,
2530 0, 180, 175, 200, 0, 107, 0, 118, 0, 190,
2531 198, 197, 0, 193, 192, 196, 199, 0, 62, 61,
2532 50, 0, 0, 118, 173, 133, 0, 0, 194, 135,
2533 140, 57, 287, 295, 297, 77, 0, 84, 0, 113,
2534 202, 172, 168, 165, 166, 164, 167, 171, 170, 169,
2535 163, 162, 0, 0, 177, 0, 0, 98, 102, 100,
2536 104, 63, 274, 0, 56, 301, 302, 0, 75, 0,
2537 137, 138, 0, 118, 161, 79, 0, 0, 0, 85,
2538 88, 86, 24, 179, 188, 176, 96, 0, 99, 101,
2539 118, 66, 118, 200, 118, 195, 0, 155, 0, 0,
2540 118, 153, 0, 27, 93, 89, 87, 27, 27, 200,
2541 64, 74, 0, 146, 150, 0, 0, 0, 118, 144,
2542 148, 149, 156, 183, 141, 154, 27, 91, 0, 0,
2543 0, 184, 118, 139, 145, 0, 90, 189, 97, 94,
2544 27, 0, 0, 0, 0, 147, 173, 27, 185, 0,
2548 /* YYDEFGOTO[NTERM-NUM]. */
2549 static const yytype_int16 yydefgoto[] =
2551 -1, 50, 51, 52, 53, 302, 303, 304, 324, 325,
2552 134, 135, 209, 305, 136, 378, 137, 237, 234, 451,
2553 57, 223, 151, 152, 58, 59, 60, 61, 207, 62,
2554 89, 138, 139, 438, 439, 440, 441, 63, 210, 417,
2555 503, 418, 468, 419, 420, 64, 220, 140, 65, 94,
2556 372, 66, 311, 211, 67, 141, 69, 70, 341, 343,
2557 387, 307, 454, 308, 433, 477, 478, 479, 459, 460,
2558 461, 159, 309, 344, 361, 410, 317, 318, 319, 249,
2559 310, 500, 100, 75, 467, 373, 374, 375, 389, 376,
2560 331, 314, 121, 122, 123, 215, 76, 77, 78, 142,
2561 124, 79, 80, 81, 82, 113, 114, 83, 143, 84
2564 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
2566 #define YYPACT_NINF -374
2567 static const yytype_int16 yypact[] =
2569 1667, -68, -374, -374, -374, -374, -374, -374, -374, -374,
2570 -30, -97, -374, -57, 20, -374, -374, -374, 49, -374,
2571 2087, -374, 71, -374, 2157, -374, -37, 85, -35, -374,
2572 -374, -374, -374, 6, 8, -374, -374, 2087, 14, 2087,
2573 2087, 2087, -374, 2087, 2087, 2087, 2087, 2087, 627, 88,
2574 177, -374, 497, -374, -374, -374, 81, -374, 2017, -374,
2575 -374, -374, -374, -374, -374, -374, -374, -374, 308, 298,
2576 -374, -374, -374, -374, -374, -374, -374, -374, -374, 79,
2577 -374, 2562, -374, -374, -374, 197, 86, -374, -374, 1919,
2578 -374, -374, -374, -374, -374, -18, 206, -374, -46, -374,
2579 93, 133, 2087, 83, -374, 2087, -374, 2087, 215, 133,
2580 -374, 117, 2562, 94, 127, 133, 133, 201, 133, 133,
2581 -53, 103, 129, 2087, -374, 227, 228, 2087, 2087, 228,
2582 232, -374, -374, 757, -374, -374, 107, -374, -374, -374,
2583 -374, 219, -374, -374, -374, -374, -374, 1017, 170, 236,
2584 -374, 141, 176, -374, 70, 242, -374, 243, -374, 244,
2585 -374, 2087, 2087, 2087, 2087, 2087, 2087, 2087, 2087, 2087,
2586 2087, 2087, 2087, 2087, 2087, 2087, 2087, 2087, 2087, 2087,
2587 2087, 2087, 2087, 2087, -374, -374, 245, 2087, 2087, 2087,
2588 2087, 2087, 2087, 2087, 2087, 2087, 2087, 2087, 2087, 2087,
2589 2087, 2087, 2087, 2087, 11, -374, -374, 2087, 159, 247,
2590 2087, 1147, -374, 85, -374, 137, 24, -49, 16, 2182,
2591 1793, 130, -374, 2087, 2087, -374, 2087, -374, -374, -374,
2592 -374, -374, 157, 164, -374, 79, 79, 164, -374, -374,
2593 -374, 1919, 262, 134, 157, 2087, 2087, -374, -374, 269,
2594 226, 231, -374, 2562, 1009, 489, 489, 489, 2867, 2867,
2595 2867, 2867, 1009, 1009, 2562, 2562, 2562, 2562, 2562, 2562,
2596 2562, 2562, 2562, 2562, 304, 2623, -374, 349, 349, 349,
2597 2562, 2379, 2684, 2745, 2806, 1009, 1009, 201, 201, 133,
2598 133, 133, 148, 2440, 193, 2087, 281, -40, -374, 167,
2599 2253, -374, 154, 1277, -374, -374, 168, -374, -374, -374,
2600 -374, 1147, -374, 2087, -374, 96, 287, 174, 200, -374,
2601 1919, 181, -374, -374, 169, 1793, -374, -36, -374, 204,
2602 26, 208, 228, 887, 212, -374, -20, 53, -31, 199,
2603 125, 309, 125, 205, 157, 2087, -374, -374, 324, 2316,
2604 -374, 1919, 2087, 207, -374, -374, 1147, 202, 209, 67,
2605 26, -374, -374, 157, 25, -374, 110, 1919, 2087, 181,
2606 -374, -374, 210, -374, -374, -374, -374, 2087, -374, -374,
2607 -374, 39, 2087, 1919, 24, -374, 125, 217, -374, 251,
2608 -374, 208, 2562, -374, -374, -374, -14, 27, 221, -374,
2609 -374, -374, -374, -374, -374, -374, -374, -374, -374, -374,
2610 -374, 253, 233, 287, -374, 234, 241, -374, -374, 110,
2611 -374, 267, -374, 126, -374, -374, -374, 250, -374, 252,
2612 251, -374, 125, 230, -374, -374, 2087, 259, 235, 27,
2613 -374, -374, -374, -374, -374, -374, -374, 362, -374, -374,
2614 1919, -374, 1919, 157, 1407, -374, 366, -374, 347, 254,
2615 249, -374, 2501, 1793, -374, -374, -374, 1793, 1793, 157,
2616 -374, -374, 256, -374, -374, 258, 74, 255, 1537, -374,
2617 -374, -374, -374, 70, -374, -374, 1793, -374, 257, 261,
2618 264, -374, 1407, -374, -374, 385, -374, -374, -374, -374,
2619 1793, 270, 268, 265, 271, -374, 24, 1793, -374, 272,
2620 274, 157, -374, -374
2623 /* YYPGOTO[NTERM-NUM]. */
2624 static const yytype_int16 yypgoto[] =
2626 -374, -374, 260, -374, 352, -285, -374, 98, -373, -39,
2627 1, -84, -310, 31, 2, 17, 351, 289, 89, -374,
2628 -374, -374, -374, -374, -374, -374, -374, -374, -374, -374,
2629 -374, -374, -374, -374, -374, -17, -16, -374, -374, 5,
2630 -374, 13, -374, -374, -374, -374, -374, -374, -374, -202,
2631 36, -374, -374, -374, -374, 0, -374, 356, -374, -374,
2632 -374, 58, -374, 59, -374, -65, -374, -48, -374, -374,
2633 -26, -374, 3, -374, 32, -374, -369, -374, -298, -47,
2634 4, -374, -374, -374, -374, -374, 408, -318, 51, 78,
2635 -237, -374, -99, -374, -374, -374, -374, -374, -374, -374,
2636 -27, -3, -52, -7, -374, -374, -374, -374, -374, -374
2639 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
2640 positive, shift that token. If negative, reduce the rule which
2641 number is the opposite. If zero, do what YYDEFACT says.
2642 If YYTABLE_NINF, syntax error. */
2643 #define YYTABLE_NINF -153
2644 static const yytype_int16 yytable[] =
2646 68, 54, 56, 73, 74, 208, 153, 336, 221, 133,
2647 365, 312, 111, 98, 294, 429, 312, 101, 362, 321,
2648 86, 85, 385, 91, 388, 88, 357, 315, 315, 369,
2649 109, 55, 112, 115, 116, 92, 117, 118, 119, 92,
2650 112, 395, 425, 120, 426, 92, 186, 161, -70, 240,
2651 95, 161, 68, 54, 56, 73, 74, 421, 71, 72,
2652 161, 436, 370, 103, 161, 90, 414, 96, 388, 161,
2653 401, 398, 402, 428, 99, 403, 404, 405, 203, 406,
2654 227, 204, 377, 55, 320, 102, 161, 105, 91, 437,
2655 487, 144, 87, 351, 488, 489, 230, 367, 219, 217,
2656 112, 154, 383, 292, 92, 247, 156, 391, 212, 213,
2657 71, 72, 407, 496, 455, 445, 112, 316, 413, 435,
2658 158, 248, 408, 409, 235, 236, 412, 504, 369, 321,
2659 107, 322, 106, 295, 510, 108, 110, 509, 415, 296,
2660 470, 371, 471, 416, 92, 92, 93, 68, 54, 56,
2661 73, 74, 382, 161, 253, 254, 255, 256, 257, 258,
2662 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
2663 269, 270, 271, 272, 273, 274, 275, 145, 55, 161,
2664 277, 278, 279, 280, 281, 282, 283, 284, 285, 286,
2665 287, 288, 289, 290, 291, 112, 293, 328, 359, 329,
2666 205, 360, 333, 300, 297, 71, 72, 147, 206, 214,
2667 218, 68, 54, 306, 358, 216, 472, 112, 222, 112,
2668 327, 312, 224, 184, 185, 186, 225, 226, 228, 229,
2669 231, 232, 490, 241, 2, 238, 208, 242, -71, 244,
2670 245, 240, 337, 338, 246, 250, 251, 252, 276, 240,
2671 15, 16, 17, 2, 19, 202, 21, 203, 298, 313,
2672 204, 299, 330, 326, 332, 334, 335, 208, 25, 15,
2673 16, 17, 339, 19, 513, 21, 456, 30, 31, 32,
2674 340, 346, 348, 208, 350, 342, 354, 25, 349, 352,
2675 315, 184, 185, 186, 356, 456, 30, 31, 32, 208,
2676 364, 366, 2, 68, 54, 306, 112, 363, -108, 368,
2677 377, 68, 54, 306, 381, 199, 200, 201, 15, 16,
2678 17, 384, 19, 202, 21, 203, 386, 393, 204, 457,
2679 427, 390, 450, 397, 399, 154, 25, 423, 392, 155,
2680 156, 422, 400, 431, 162, 30, 31, 32, 457, 396,
2681 424, 432, 157, 442, 158, 359, 68, 54, 306, 444,
2682 446, 112, -151, 447, 463, 469, 208, 464, 208, 482,
2683 112, 163, 164, 165, 483, 166, 167, 168, 169, 170,
2684 171, -152, 491, 452, 492, 453, 484, 493, 502, 497,
2685 506, 507, 183, 498, 184, 185, 186, 499, 187, 188,
2686 189, 355, 505, 508, 146, 511, 512, 243, 434, 150,
2687 192, 193, 194, 195, 196, 233, 197, 198, 199, 200,
2688 201, 379, 465, 466, 448, 160, 202, 501, 203, 462,
2689 494, 204, 449, 458, 485, 104, 495, 430, 411, 184,
2690 185, 186, 0, 443, 0, 0, 0, 0, 0, 0,
2691 0, 0, 0, 0, 476, 474, 475, 480, 481, 0,
2692 458, 197, 198, 199, 200, 201, 0, 0, 0, 0,
2693 0, 202, 0, 203, 0, 0, 204, 0, 476, 474,
2694 475, 480, 481, 0, 0, 0, 0, 0, 0, 0,
2695 0, 0, 476, 474, 475, 480, 481, -4, 0, 0,
2696 1, 2, 3, 4, 0, 5, 6, 7, 8, 9,
2697 10, 11, 12, 13, 0, 0, 14, 15, 16, 17,
2698 18, 19, 20, 21, 0, 0, 23, 0, 0, 162,
2699 0, 0, 0, 24, 0, 25, 26, 0, 27, 0,
2700 28, 0, 29, 0, 30, 31, 32, 0, 0, 33,
2701 34, 0, 35, 36, 0, 0, -153, -153, -153, 0,
2702 37, 38, 0, 0, 170, 171, 0, 39, 0, 0,
2703 0, 0, 0, 0, 0, 0, 0, 0, 0, 184,
2704 185, 186, 0, 187, 188, 189, 0, 40, 41, 0,
2705 0, 0, 0, 0, 0, 0, 42, 0, 195, 196,
2706 0, 197, 198, 199, 200, 201, 0, 0, 0, 43,
2707 0, 202, 0, 203, 44, 45, 204, 0, 0, 46,
2708 0, 47, 0, 48, 0, 49, 0, 0, 0, -4,
2709 1, 2, 3, 4, 0, 5, 6, 7, 8, 9,
2710 10, 11, 12, 13, 0, 0, 0, 15, 16, 17,
2711 18, 19, 20, 21, 22, 0, 23, 125, 0, 126,
2712 0, 0, 0, 24, 127, 25, 26, 0, 27, 128,
2713 28, 0, 29, 129, 30, 31, 32, 0, 0, 33,
2714 34, 0, 35, 36, 0, 0, 0, 0, 0, 0,
2715 37, 38, 0, 130, 0, 0, 0, 39, 0, 0,
2716 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2717 0, 0, 0, 0, 0, 0, 0, 40, 41, 0,
2718 0, 0, 0, 0, 0, 0, 131, 0, 0, 0,
2719 0, 0, 0, 0, 0, 0, 0, 0, 0, 43,
2720 0, 0, 0, 0, 44, 45, 0, 0, 0, 46,
2721 0, 47, 0, 48, 0, 49, 0, 0, 0, 132,
2722 1, 2, 3, 4, 0, 5, 6, 7, 8, 9,
2723 10, 11, 12, 13, 0, 0, 0, 15, 16, 17,
2724 18, 19, 20, 21, 22, 0, 23, 125, 0, 126,
2725 0, 0, 0, 24, 127, 25, 26, 0, 27, 128,
2726 28, 0, 29, 129, 30, 31, 32, 0, 0, 33,
2727 34, 0, 35, 36, 0, 0, 0, 0, 0, 0,
2728 37, 38, 0, 130, 0, 0, 0, 39, 0, 0,
2729 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2730 0, 0, 0, 0, 0, 0, 0, 40, 41, 0,
2731 0, 0, 0, 0, 0, 0, 131, 0, 0, 0,
2732 0, 0, 0, 0, 0, 0, 0, 0, 0, 43,
2733 0, 0, 0, 0, 44, 45, 0, 0, 0, 46,
2734 0, 47, 0, 48, 0, 49, 0, 0, 0, 239,
2735 1, 2, 3, 4, 0, 5, 6, 7, 8, 9,
2736 10, 11, 12, 13, 0, 0, 0, 15, 16, 17,
2737 18, 19, 20, 21, 22, 0, 23, 125, 0, 126,
2738 0, 0, 0, 24, 127, 25, 26, 0, 27, 128,
2739 28, 0, 29, 129, 30, 31, 32, 0, 0, 33,
2740 34, 0, 35, 36, 0, 0, 0, 0, 0, 0,
2741 37, 38, 0, 130, 0, 0, 0, 39, 0, 0,
2742 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2743 0, 0, 0, 0, 0, 0, 0, 40, 41, 0,
2744 0, 0, 0, 0, 0, 0, 131, 0, 0, 0,
2745 0, 0, 0, 0, 0, 0, 0, 0, 0, 43,
2746 0, 0, 0, 0, 44, 45, 0, 0, 0, 46,
2747 0, 47, 0, 48, 0, 49, 0, 0, 0, 380,
2748 1, 2, 3, 4, 0, 5, 6, 7, 8, 9,
2749 10, 11, 12, 13, 0, 0, 14, 15, 16, 17,
2750 18, 19, 20, 21, 0, 0, 23, 0, 0, -153,
2751 0, 0, 0, 24, 0, 25, 26, 0, 27, 0,
2752 28, 0, 29, 0, 30, 31, 32, 0, 0, 33,
2753 34, 0, 35, 36, 0, 0, 0, 0, 0, 0,
2754 37, 38, 0, 0, -153, -153, 0, 39, 0, 0,
2755 0, 0, 0, 0, 0, 0, 0, 0, 0, 184,
2756 185, 186, 0, 187, 188, 189, 0, 40, 41, 0,
2757 0, 0, 0, 0, 0, 0, 42, 0, -153, -153,
2758 0, 197, 198, 199, 200, 201, 0, 0, 0, 43,
2759 0, 202, 0, 203, 44, 45, 204, 0, 0, 46,
2760 0, 47, 0, 48, 0, 49, 0, 0, 0, -3,
2761 1, 2, 3, 4, 0, 5, 6, 7, 8, 9,
2762 10, 11, 12, 13, 0, 0, 0, 15, 16, 17,
2763 18, 19, 20, 21, 0, 0, 23, 0, 0, 0,
2764 0, 0, 0, 24, 0, 25, 26, 0, 27, 0,
2765 28, 0, 29, 0, 30, 31, 32, 0, 0, 33,
2766 34, 0, 35, 36, 0, 0, 0, 0, 0, 0,
2767 37, 38, 0, 0, 0, 0, 0, 39, 0, 0,
2768 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2769 0, 0, 0, 0, 0, 0, 0, 40, 41, 0,
2770 0, 0, 0, 0, 0, 0, 301, 0, 0, 0,
2771 0, 0, 0, 0, 0, 0, 0, 0, 0, 43,
2772 0, 0, 0, 0, 44, 45, 0, 0, 0, 46,
2773 0, 47, 0, 48, 0, 49, 0, 0, 0, -15,
2774 1, 2, 3, 4, 0, 5, 6, 7, 8, 9,
2775 10, 11, 12, 13, 0, 0, 0, 15, 16, 17,
2776 18, 19, 20, 21, 0, 0, 23, 0, 0, 0,
2777 0, 0, 0, 24, 0, 25, 26, 0, 27, 0,
2778 28, 0, 29, 0, 30, 31, 32, 0, 0, 33,
2779 34, 0, 35, 36, 0, 0, 0, 0, 0, 0,
2780 37, 38, 0, 0, 0, 0, 0, 39, 0, 0,
2781 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2782 0, 0, 0, 0, 0, 0, 0, 40, 41, 0,
2783 0, 0, 0, 0, 0, 0, 301, 0, 0, 0,
2784 0, 0, 0, 0, 0, 0, 0, 0, 0, 43,
2785 0, 0, 0, 0, 44, 45, 0, 0, 0, 46,
2786 0, 47, 0, 48, 0, 49, 0, 0, 0, -16,
2787 1, 2, 3, 4, 0, 5, 6, 7, 8, 9,
2788 10, 11, 12, 13, 0, 0, 0, 15, 16, 17,
2789 18, 19, 20, 21, 0, 0, 23, 0, 0, 0,
2790 0, 0, 0, 24, 0, 25, 26, 0, 27, 0,
2791 28, 0, 29, 0, 30, 31, 32, 0, 0, 33,
2792 34, 0, 35, 36, 0, 0, 0, 0, 0, 0,
2793 37, 38, 0, 0, 0, 0, 0, 39, 0, 0,
2794 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2795 0, 0, 0, 0, 0, 0, 0, 40, 41, 0,
2796 0, 0, 0, 0, 0, 0, 473, 0, 0, 0,
2797 0, 0, 0, 0, 0, 0, 0, 0, 0, 43,
2798 0, 0, 0, 0, 44, 45, 0, 0, 0, 46,
2799 0, 47, 0, 48, 0, 49, 0, 0, 0, -142,
2800 1, 2, 3, 4, 0, 5, 6, 7, 8, 9,
2801 10, 11, 12, 13, 0, 0, 0, 15, 16, 17,
2802 18, 19, 20, 21, 0, 0, 23, 0, 0, 0,
2803 0, 0, 0, 24, 0, 25, 26, 0, 27, 0,
2804 28, 0, 29, 0, 30, 31, 32, 0, 0, 33,
2805 34, 0, 35, 36, 0, 0, 0, 0, 0, 0,
2806 37, 38, 0, 0, 0, 0, 0, 39, 0, 0,
2807 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2808 0, 0, 0, 0, 0, 0, 0, 40, 41, 0,
2809 0, 0, 0, 0, 0, 0, 473, 0, 0, 0,
2810 0, 0, 0, 0, 0, 0, 0, 0, 0, 43,
2811 0, 0, 0, 0, 44, 45, 0, 0, 0, 46,
2812 0, 47, 0, 48, 0, 49, 0, -3, 0, -143,
2813 1, 2, 3, 4, 0, 5, 6, 7, 8, 9,
2814 10, 11, 12, 13, 0, 0, 14, 15, 16, 17,
2815 18, 19, 20, 21, 0, 0, 23, 0, 0, 0,
2816 0, 0, 0, 24, 0, 25, 26, 0, 27, 0,
2817 28, 0, 29, 0, 30, 31, 32, 0, 0, 33,
2818 34, 0, 35, 36, 0, 0, 0, 0, 0, 0,
2819 37, 38, 0, 0, 0, 0, 0, 39, 0, 0,
2820 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2821 0, 0, 0, 0, 0, 0, 0, 40, 41, 0,
2822 0, 0, 0, 0, 0, 0, 42, 0, 0, 0,
2823 0, 0, 0, 0, 0, 0, 0, 0, 0, 43,
2824 0, 0, 0, 0, 44, 45, 0, 0, 0, 46,
2825 0, 47, 0, 48, 0, 49, 1, 2, 3, 4,
2826 0, 5, 6, 7, 8, 9, 10, 11, 12, 13,
2827 0, -118, 0, 15, 16, 17, 18, 19, 20, 21,
2828 22, 0, 23, 125, 0, 126, 0, 0, 0, 24,
2829 127, 25, 26, 0, 27, 128, 28, 0, 29, 129,
2830 30, 31, 32, 0, 0, 33, 34, 0, 35, 36,
2831 0, 0, 0, 0, 0, 0, 37, 38, 0, 130,
2832 0, 0, 0, 39, 0, 0, 0, 0, 0, 0,
2833 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2834 0, 0, 0, 40, 41, 0, 0, 0, 0, 0,
2835 0, 0, 131, 0, 0, 0, 0, 0, 0, 0,
2836 0, 0, 0, 0, 0, 43, 0, 0, 0, 0,
2837 44, 45, 0, 0, 0, 46, 0, 47, 0, 48,
2838 0, 49, 1, 2, 3, 4, 0, 5, 6, 7,
2839 8, 9, 10, 11, 12, 13, 0, 0, 0, 15,
2840 16, 17, 18, 19, 20, 21, 22, 0, 23, 125,
2841 0, 126, 0, 0, 0, 24, 127, 25, 26, 0,
2842 27, 128, 28, 0, 29, 129, 30, 31, 32, 0,
2843 0, 33, 34, 0, 35, 36, 0, 0, 0, 0,
2844 0, 0, 37, 38, 0, 130, 0, 0, 0, 39,
2845 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2846 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,
2847 41, 0, 0, 0, 0, 0, 0, 0, 131, 0,
2848 148, 0, 3, 4, 0, 5, 6, 7, 8, 9,
2849 0, 43, 0, 0, 0, 0, 44, 45, 0, 0,
2850 0, 46, 20, 47, 22, 48, 23, 49, 0, 126,
2851 0, 0, 0, 24, 0, 0, 0, 0, 0, 0,
2852 28, 0, 29, 149, 0, 0, 0, 0, 0, 0,
2853 34, 0, 35, 36, 0, 0, 0, 0, 0, 0,
2854 37, 0, 0, 0, 0, 0, 0, 39, 0, 0,
2855 97, 0, 3, 4, 0, 5, 6, 7, 8, 9,
2856 0, 0, 0, 0, 0, 0, 0, 40, 41, 0,
2857 0, 0, 20, 0, 22, 0, 23, 0, 0, 0,
2858 0, 0, 0, 24, 0, 0, 0, 0, 0, 43,
2859 28, 0, 29, 0, 44, 45, 0, 0, 0, 46,
2860 34, 47, 35, 36, 0, 49, 0, 0, 0, 0,
2861 37, 0, 0, 0, 0, 0, 0, 39, 0, 0,
2862 97, 0, 3, 4, 0, 5, 6, 7, 8, 9,
2863 0, 0, 0, 0, 0, 0, 0, 40, 41, 0,
2864 0, 0, 20, 0, 22, 0, 23, 0, 0, 0,
2865 0, 0, 0, 0, 0, 0, 0, 0, 0, 43,
2866 0, 0, 29, 0, 44, 45, 0, 0, 0, 46,
2867 34, 47, 35, 36, 0, 49, 0, 0, 0, 0,
2868 0, 0, 162, 0, 0, 0, 0, 39, 0, 0,
2869 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2870 0, 0, 0, 0, 0, 0, 0, 40, 41, 163,
2871 164, 165, 0, 166, 167, 168, 169, 170, 171, 172,
2872 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
2873 183, 0, 184, 185, 186, 0, 187, 188, 189, 46,
2874 0, 47, 0, 0, 190, 49, 191, 0, 192, 193,
2875 194, 195, 196, 162, 197, 198, 199, 200, 201, 0,
2876 0, 0, 0, 0, 202, 0, 203, 0, 0, 204,
2877 0, 0, 0, 0, 0, 323, 0, 0, 0, 0,
2878 163, 164, 165, 0, 166, 167, 168, 169, 170, 171,
2879 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
2880 182, 183, 0, 184, 185, 186, 0, 187, 188, 189,
2881 0, 0, 0, 0, 0, 190, 162, 191, 0, 192,
2882 193, 194, 195, 196, 0, 197, 198, 199, 200, 201,
2883 0, 0, 0, 0, 0, 202, 0, 203, 0, 0,
2884 204, 0, 0, 163, 164, 165, 353, 166, 167, 168,
2885 169, 170, 171, 172, 173, 174, 175, 176, 177, 178,
2886 179, 180, 181, 182, 183, 0, 184, 185, 186, 0,
2887 187, 188, 189, 0, 0, 0, 0, 0, 190, 162,
2888 191, 0, 192, 193, 194, 195, 196, 0, 197, 198,
2889 199, 200, 201, 0, 0, 0, 0, 0, 202, 0,
2890 203, 0, 0, 204, 0, 0, 163, 164, 165, 394,
2891 166, 167, 168, 169, 170, 171, 172, 173, 174, 175,
2892 176, 177, 178, 179, 180, 181, 182, 183, 0, 184,
2893 185, 186, 0, 187, 188, 189, 0, 0, 0, 0,
2894 162, 190, 0, 191, 345, 192, 193, 194, 195, 196,
2895 0, 197, 198, 199, 200, 201, 0, 0, 0, 0,
2896 0, 202, 0, 203, 0, 0, 204, 163, 164, 165,
2897 0, 166, 167, 168, 169, 170, 171, 172, 173, 174,
2898 175, 176, 177, 178, 179, 180, 181, 182, 183, 0,
2899 184, 185, 186, 0, 187, 188, 189, 0, 0, 0,
2900 0, 162, 190, 0, 191, 0, 192, 193, 194, 195,
2901 196, 0, 197, 198, 199, 200, 201, 0, 0, 0,
2902 0, 0, 202, 0, 203, 347, 0, 204, 163, 164,
2903 165, 0, 166, 167, 168, 169, 170, 171, 172, 173,
2904 174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
2905 0, 184, 185, 186, 0, 187, 188, 189, 0, 0,
2906 0, 0, 162, 190, 0, 191, 486, 192, 193, 194,
2907 195, 196, 0, 197, 198, 199, 200, 201, 0, 0,
2908 0, 0, 0, 202, 0, 203, 0, 0, 204, 163,
2909 164, 165, 0, 166, 167, 168, 169, 170, 171, 172,
2910 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
2911 183, 0, 184, 185, 186, 0, 187, 188, 189, 0,
2912 0, 0, 0, 162, 190, 0, 191, 0, 192, 193,
2913 194, 195, 196, 0, 197, 198, 199, 200, 201, 0,
2914 0, 0, 0, 0, 202, 0, 203, 0, 0, 204,
2915 163, 164, 165, 0, 166, 167, 168, 169, 170, 171,
2916 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2917 0, 0, 0, 184, 185, 186, 0, 187, 188, 189,
2918 0, 0, 0, 0, 162, 0, 0, 0, 0, 192,
2919 193, 194, 195, 196, 0, 197, 198, 199, 200, 201,
2920 0, 0, 0, 0, 0, 202, 0, 203, 0, 0,
2921 204, 163, 164, 165, 0, 166, 167, 168, 169, 170,
2922 171, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2923 0, 0, 0, 0, 184, 185, 186, 0, 187, 188,
2924 189, 0, 0, 0, 0, 162, 0, 0, 0, 0,
2925 0, 193, 194, 195, 196, 0, 197, 198, 199, 200,
2926 201, 0, 0, 0, 0, 0, 202, 0, 203, 0,
2927 0, 204, 163, 164, 165, 0, 166, 167, 168, 169,
2928 170, 171, 0, 0, 0, 0, 0, 0, 0, 0,
2929 0, 0, 0, 0, 0, 184, 185, 186, 0, 187,
2930 188, 189, 0, 0, 0, 0, 162, 0, 0, 0,
2931 0, 0, 0, 194, 195, 196, 0, 197, 198, 199,
2932 200, 201, 0, 0, 0, 0, 0, 202, 0, 203,
2933 0, 0, 204, 163, 164, 165, 0, 166, 167, 168,
2934 169, 170, 171, 0, 0, 0, 0, 0, 0, 0,
2935 0, 0, 0, 0, 0, 0, 184, 185, 186, 0,
2936 187, 188, 189, 0, 0, 0, 0, 162, 0, 0,
2937 0, 0, 0, 0, -153, 195, 196, 0, 197, 198,
2938 199, 200, 201, 0, 0, 0, 0, 0, 202, 0,
2939 203, 0, 0, 204, 163, 164, 165, 0, -153, -153,
2940 -153, -153, 170, 171, 0, 0, 0, 0, 0, 0,
2941 0, 0, 0, 0, 0, 0, 0, 184, 185, 186,
2942 0, 187, 188, 189, 0, 0, 0, 0, 0, 0,
2943 0, 0, 0, 0, 0, 0, 195, 196, 0, 197,
2944 198, 199, 200, 201, 0, 0, 0, 0, 0, 202,
2948 static const yytype_int16 yycheck[] =
2950 0, 0, 0, 0, 0, 89, 58, 244, 107, 48,
2951 320, 213, 39, 20, 3, 384, 218, 24, 316, 3,
2952 50, 89, 340, 3, 342, 122, 311, 3, 3, 3,
2953 37, 0, 39, 40, 41, 19, 43, 44, 45, 19,
2954 47, 351, 3, 46, 5, 19, 92, 100, 68, 133,
2955 14, 100, 52, 52, 52, 52, 52, 367, 0, 0,
2956 100, 34, 36, 27, 100, 122, 364, 18, 386, 100,
2957 3, 356, 5, 383, 3, 8, 9, 10, 124, 12,
2958 133, 127, 102, 52, 133, 122, 100, 122, 3, 62,
2959 463, 3, 122, 133, 467, 468, 123, 133, 105, 102,
2960 107, 27, 133, 202, 19, 35, 32, 344, 126, 127,
2961 52, 52, 45, 486, 432, 413, 123, 93, 93, 133,
2962 46, 51, 55, 56, 127, 128, 363, 500, 3, 3,
2963 122, 115, 126, 122, 507, 127, 122, 506, 28, 128,
2964 450, 115, 452, 33, 19, 19, 126, 147, 147, 147,
2965 147, 147, 99, 100, 161, 162, 163, 164, 165, 166,
2966 167, 168, 169, 170, 171, 172, 173, 174, 175, 176,
2967 177, 178, 179, 180, 181, 182, 183, 0, 147, 100,
2968 187, 188, 189, 190, 191, 192, 193, 194, 195, 196,
2969 197, 198, 199, 200, 201, 202, 203, 224, 102, 226,
2970 3, 105, 241, 210, 207, 147, 147, 126, 122, 3,
2971 127, 211, 211, 211, 313, 122, 453, 224, 3, 226,
2972 223, 423, 105, 90, 91, 92, 132, 100, 125, 100,
2973 3, 3, 469, 126, 4, 3, 320, 18, 68, 3,
2974 99, 325, 245, 246, 68, 3, 3, 3, 3, 333,
2975 20, 21, 22, 4, 24, 122, 26, 124, 99, 122,
2976 127, 14, 105, 133, 100, 3, 132, 351, 38, 20,
2977 21, 22, 3, 24, 511, 26, 46, 47, 48, 49,
2978 54, 133, 89, 367, 3, 54, 132, 38, 295, 122,
2979 3, 90, 91, 92, 126, 46, 47, 48, 49, 383,
2980 100, 132, 4, 303, 303, 303, 313, 133, 127, 105,
2981 102, 311, 311, 311, 102, 114, 115, 116, 20, 21,
2982 22, 122, 24, 122, 26, 124, 17, 3, 127, 99,
2983 382, 126, 65, 126, 132, 27, 38, 127, 345, 31,
2984 32, 368, 133, 126, 40, 47, 48, 49, 99, 352,
2985 377, 100, 44, 132, 46, 102, 356, 356, 356, 126,
2986 126, 368, 132, 122, 105, 3, 450, 132, 452, 3,
2987 377, 67, 68, 69, 27, 71, 72, 73, 74, 75,
2988 76, 132, 126, 133, 126, 133, 132, 132, 3, 132,
2989 122, 126, 88, 132, 90, 91, 92, 133, 94, 95,
2990 96, 303, 132, 132, 52, 133, 132, 147, 391, 58,
2991 106, 107, 108, 109, 110, 126, 112, 113, 114, 115,
2992 116, 332, 439, 439, 419, 69, 122, 492, 124, 436,
2993 478, 127, 419, 433, 460, 27, 483, 386, 360, 90,
2994 91, 92, -1, 411, -1, -1, -1, -1, -1, -1,
2995 -1, -1, -1, -1, 454, 454, 454, 454, 454, -1,
2996 460, 112, 113, 114, 115, 116, -1, -1, -1, -1,
2997 -1, 122, -1, 124, -1, -1, 127, -1, 478, 478,
2998 478, 478, 478, -1, -1, -1, -1, -1, -1, -1,
2999 -1, -1, 492, 492, 492, 492, 492, 0, -1, -1,
3000 3, 4, 5, 6, -1, 8, 9, 10, 11, 12,
3001 13, 14, 15, 16, -1, -1, 19, 20, 21, 22,
3002 23, 24, 25, 26, -1, -1, 29, -1, -1, 40,
3003 -1, -1, -1, 36, -1, 38, 39, -1, 41, -1,
3004 43, -1, 45, -1, 47, 48, 49, -1, -1, 52,
3005 53, -1, 55, 56, -1, -1, 67, 68, 69, -1,
3006 63, 64, -1, -1, 75, 76, -1, 70, -1, -1,
3007 -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
3008 91, 92, -1, 94, 95, 96, -1, 90, 91, -1,
3009 -1, -1, -1, -1, -1, -1, 99, -1, 109, 110,
3010 -1, 112, 113, 114, 115, 116, -1, -1, -1, 112,
3011 -1, 122, -1, 124, 117, 118, 127, -1, -1, 122,
3012 -1, 124, -1, 126, -1, 128, -1, -1, -1, 132,
3013 3, 4, 5, 6, -1, 8, 9, 10, 11, 12,
3014 13, 14, 15, 16, -1, -1, -1, 20, 21, 22,
3015 23, 24, 25, 26, 27, -1, 29, 30, -1, 32,
3016 -1, -1, -1, 36, 37, 38, 39, -1, 41, 42,
3017 43, -1, 45, 46, 47, 48, 49, -1, -1, 52,
3018 53, -1, 55, 56, -1, -1, -1, -1, -1, -1,
3019 63, 64, -1, 66, -1, -1, -1, 70, -1, -1,
3020 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3021 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
3022 -1, -1, -1, -1, -1, -1, 99, -1, -1, -1,
3023 -1, -1, -1, -1, -1, -1, -1, -1, -1, 112,
3024 -1, -1, -1, -1, 117, 118, -1, -1, -1, 122,
3025 -1, 124, -1, 126, -1, 128, -1, -1, -1, 132,
3026 3, 4, 5, 6, -1, 8, 9, 10, 11, 12,
3027 13, 14, 15, 16, -1, -1, -1, 20, 21, 22,
3028 23, 24, 25, 26, 27, -1, 29, 30, -1, 32,
3029 -1, -1, -1, 36, 37, 38, 39, -1, 41, 42,
3030 43, -1, 45, 46, 47, 48, 49, -1, -1, 52,
3031 53, -1, 55, 56, -1, -1, -1, -1, -1, -1,
3032 63, 64, -1, 66, -1, -1, -1, 70, -1, -1,
3033 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3034 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
3035 -1, -1, -1, -1, -1, -1, 99, -1, -1, -1,
3036 -1, -1, -1, -1, -1, -1, -1, -1, -1, 112,
3037 -1, -1, -1, -1, 117, 118, -1, -1, -1, 122,
3038 -1, 124, -1, 126, -1, 128, -1, -1, -1, 132,
3039 3, 4, 5, 6, -1, 8, 9, 10, 11, 12,
3040 13, 14, 15, 16, -1, -1, -1, 20, 21, 22,
3041 23, 24, 25, 26, 27, -1, 29, 30, -1, 32,
3042 -1, -1, -1, 36, 37, 38, 39, -1, 41, 42,
3043 43, -1, 45, 46, 47, 48, 49, -1, -1, 52,
3044 53, -1, 55, 56, -1, -1, -1, -1, -1, -1,
3045 63, 64, -1, 66, -1, -1, -1, 70, -1, -1,
3046 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3047 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
3048 -1, -1, -1, -1, -1, -1, 99, -1, -1, -1,
3049 -1, -1, -1, -1, -1, -1, -1, -1, -1, 112,
3050 -1, -1, -1, -1, 117, 118, -1, -1, -1, 122,
3051 -1, 124, -1, 126, -1, 128, -1, -1, -1, 132,
3052 3, 4, 5, 6, -1, 8, 9, 10, 11, 12,
3053 13, 14, 15, 16, -1, -1, 19, 20, 21, 22,
3054 23, 24, 25, 26, -1, -1, 29, -1, -1, 40,
3055 -1, -1, -1, 36, -1, 38, 39, -1, 41, -1,
3056 43, -1, 45, -1, 47, 48, 49, -1, -1, 52,
3057 53, -1, 55, 56, -1, -1, -1, -1, -1, -1,
3058 63, 64, -1, -1, 75, 76, -1, 70, -1, -1,
3059 -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
3060 91, 92, -1, 94, 95, 96, -1, 90, 91, -1,
3061 -1, -1, -1, -1, -1, -1, 99, -1, 109, 110,
3062 -1, 112, 113, 114, 115, 116, -1, -1, -1, 112,
3063 -1, 122, -1, 124, 117, 118, 127, -1, -1, 122,
3064 -1, 124, -1, 126, -1, 128, -1, -1, -1, 132,
3065 3, 4, 5, 6, -1, 8, 9, 10, 11, 12,
3066 13, 14, 15, 16, -1, -1, -1, 20, 21, 22,
3067 23, 24, 25, 26, -1, -1, 29, -1, -1, -1,
3068 -1, -1, -1, 36, -1, 38, 39, -1, 41, -1,
3069 43, -1, 45, -1, 47, 48, 49, -1, -1, 52,
3070 53, -1, 55, 56, -1, -1, -1, -1, -1, -1,
3071 63, 64, -1, -1, -1, -1, -1, 70, -1, -1,
3072 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3073 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
3074 -1, -1, -1, -1, -1, -1, 99, -1, -1, -1,
3075 -1, -1, -1, -1, -1, -1, -1, -1, -1, 112,
3076 -1, -1, -1, -1, 117, 118, -1, -1, -1, 122,
3077 -1, 124, -1, 126, -1, 128, -1, -1, -1, 132,
3078 3, 4, 5, 6, -1, 8, 9, 10, 11, 12,
3079 13, 14, 15, 16, -1, -1, -1, 20, 21, 22,
3080 23, 24, 25, 26, -1, -1, 29, -1, -1, -1,
3081 -1, -1, -1, 36, -1, 38, 39, -1, 41, -1,
3082 43, -1, 45, -1, 47, 48, 49, -1, -1, 52,
3083 53, -1, 55, 56, -1, -1, -1, -1, -1, -1,
3084 63, 64, -1, -1, -1, -1, -1, 70, -1, -1,
3085 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3086 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
3087 -1, -1, -1, -1, -1, -1, 99, -1, -1, -1,
3088 -1, -1, -1, -1, -1, -1, -1, -1, -1, 112,
3089 -1, -1, -1, -1, 117, 118, -1, -1, -1, 122,
3090 -1, 124, -1, 126, -1, 128, -1, -1, -1, 132,
3091 3, 4, 5, 6, -1, 8, 9, 10, 11, 12,
3092 13, 14, 15, 16, -1, -1, -1, 20, 21, 22,
3093 23, 24, 25, 26, -1, -1, 29, -1, -1, -1,
3094 -1, -1, -1, 36, -1, 38, 39, -1, 41, -1,
3095 43, -1, 45, -1, 47, 48, 49, -1, -1, 52,
3096 53, -1, 55, 56, -1, -1, -1, -1, -1, -1,
3097 63, 64, -1, -1, -1, -1, -1, 70, -1, -1,
3098 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3099 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
3100 -1, -1, -1, -1, -1, -1, 99, -1, -1, -1,
3101 -1, -1, -1, -1, -1, -1, -1, -1, -1, 112,
3102 -1, -1, -1, -1, 117, 118, -1, -1, -1, 122,
3103 -1, 124, -1, 126, -1, 128, -1, -1, -1, 132,
3104 3, 4, 5, 6, -1, 8, 9, 10, 11, 12,
3105 13, 14, 15, 16, -1, -1, -1, 20, 21, 22,
3106 23, 24, 25, 26, -1, -1, 29, -1, -1, -1,
3107 -1, -1, -1, 36, -1, 38, 39, -1, 41, -1,
3108 43, -1, 45, -1, 47, 48, 49, -1, -1, 52,
3109 53, -1, 55, 56, -1, -1, -1, -1, -1, -1,
3110 63, 64, -1, -1, -1, -1, -1, 70, -1, -1,
3111 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3112 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
3113 -1, -1, -1, -1, -1, -1, 99, -1, -1, -1,
3114 -1, -1, -1, -1, -1, -1, -1, -1, -1, 112,
3115 -1, -1, -1, -1, 117, 118, -1, -1, -1, 122,
3116 -1, 124, -1, 126, -1, 128, -1, 0, -1, 132,
3117 3, 4, 5, 6, -1, 8, 9, 10, 11, 12,
3118 13, 14, 15, 16, -1, -1, 19, 20, 21, 22,
3119 23, 24, 25, 26, -1, -1, 29, -1, -1, -1,
3120 -1, -1, -1, 36, -1, 38, 39, -1, 41, -1,
3121 43, -1, 45, -1, 47, 48, 49, -1, -1, 52,
3122 53, -1, 55, 56, -1, -1, -1, -1, -1, -1,
3123 63, 64, -1, -1, -1, -1, -1, 70, -1, -1,
3124 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3125 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
3126 -1, -1, -1, -1, -1, -1, 99, -1, -1, -1,
3127 -1, -1, -1, -1, -1, -1, -1, -1, -1, 112,
3128 -1, -1, -1, -1, 117, 118, -1, -1, -1, 122,
3129 -1, 124, -1, 126, -1, 128, 3, 4, 5, 6,
3130 -1, 8, 9, 10, 11, 12, 13, 14, 15, 16,
3131 -1, 18, -1, 20, 21, 22, 23, 24, 25, 26,
3132 27, -1, 29, 30, -1, 32, -1, -1, -1, 36,
3133 37, 38, 39, -1, 41, 42, 43, -1, 45, 46,
3134 47, 48, 49, -1, -1, 52, 53, -1, 55, 56,
3135 -1, -1, -1, -1, -1, -1, 63, 64, -1, 66,
3136 -1, -1, -1, 70, -1, -1, -1, -1, -1, -1,
3137 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3138 -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
3139 -1, -1, 99, -1, -1, -1, -1, -1, -1, -1,
3140 -1, -1, -1, -1, -1, 112, -1, -1, -1, -1,
3141 117, 118, -1, -1, -1, 122, -1, 124, -1, 126,
3142 -1, 128, 3, 4, 5, 6, -1, 8, 9, 10,
3143 11, 12, 13, 14, 15, 16, -1, -1, -1, 20,
3144 21, 22, 23, 24, 25, 26, 27, -1, 29, 30,
3145 -1, 32, -1, -1, -1, 36, 37, 38, 39, -1,
3146 41, 42, 43, -1, 45, 46, 47, 48, 49, -1,
3147 -1, 52, 53, -1, 55, 56, -1, -1, -1, -1,
3148 -1, -1, 63, 64, -1, 66, -1, -1, -1, 70,
3149 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3150 -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
3151 91, -1, -1, -1, -1, -1, -1, -1, 99, -1,
3152 3, -1, 5, 6, -1, 8, 9, 10, 11, 12,
3153 -1, 112, -1, -1, -1, -1, 117, 118, -1, -1,
3154 -1, 122, 25, 124, 27, 126, 29, 128, -1, 32,
3155 -1, -1, -1, 36, -1, -1, -1, -1, -1, -1,
3156 43, -1, 45, 46, -1, -1, -1, -1, -1, -1,
3157 53, -1, 55, 56, -1, -1, -1, -1, -1, -1,
3158 63, -1, -1, -1, -1, -1, -1, 70, -1, -1,
3159 3, -1, 5, 6, -1, 8, 9, 10, 11, 12,
3160 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
3161 -1, -1, 25, -1, 27, -1, 29, -1, -1, -1,
3162 -1, -1, -1, 36, -1, -1, -1, -1, -1, 112,
3163 43, -1, 45, -1, 117, 118, -1, -1, -1, 122,
3164 53, 124, 55, 56, -1, 128, -1, -1, -1, -1,
3165 63, -1, -1, -1, -1, -1, -1, 70, -1, -1,
3166 3, -1, 5, 6, -1, 8, 9, 10, 11, 12,
3167 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
3168 -1, -1, 25, -1, 27, -1, 29, -1, -1, -1,
3169 -1, -1, -1, -1, -1, -1, -1, -1, -1, 112,
3170 -1, -1, 45, -1, 117, 118, -1, -1, -1, 122,
3171 53, 124, 55, 56, -1, 128, -1, -1, -1, -1,
3172 -1, -1, 40, -1, -1, -1, -1, 70, -1, -1,
3173 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3174 -1, -1, -1, -1, -1, -1, -1, 90, 91, 67,
3175 68, 69, -1, 71, 72, 73, 74, 75, 76, 77,
3176 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
3177 88, -1, 90, 91, 92, -1, 94, 95, 96, 122,
3178 -1, 124, -1, -1, 102, 128, 104, -1, 106, 107,
3179 108, 109, 110, 40, 112, 113, 114, 115, 116, -1,
3180 -1, -1, -1, -1, 122, -1, 124, -1, -1, 127,
3181 -1, -1, -1, -1, -1, 133, -1, -1, -1, -1,
3182 67, 68, 69, -1, 71, 72, 73, 74, 75, 76,
3183 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
3184 87, 88, -1, 90, 91, 92, -1, 94, 95, 96,
3185 -1, -1, -1, -1, -1, 102, 40, 104, -1, 106,
3186 107, 108, 109, 110, -1, 112, 113, 114, 115, 116,
3187 -1, -1, -1, -1, -1, 122, -1, 124, -1, -1,
3188 127, -1, -1, 67, 68, 69, 133, 71, 72, 73,
3189 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
3190 84, 85, 86, 87, 88, -1, 90, 91, 92, -1,
3191 94, 95, 96, -1, -1, -1, -1, -1, 102, 40,
3192 104, -1, 106, 107, 108, 109, 110, -1, 112, 113,
3193 114, 115, 116, -1, -1, -1, -1, -1, 122, -1,
3194 124, -1, -1, 127, -1, -1, 67, 68, 69, 133,
3195 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
3196 81, 82, 83, 84, 85, 86, 87, 88, -1, 90,
3197 91, 92, -1, 94, 95, 96, -1, -1, -1, -1,
3198 40, 102, -1, 104, 105, 106, 107, 108, 109, 110,
3199 -1, 112, 113, 114, 115, 116, -1, -1, -1, -1,
3200 -1, 122, -1, 124, -1, -1, 127, 67, 68, 69,
3201 -1, 71, 72, 73, 74, 75, 76, 77, 78, 79,
3202 80, 81, 82, 83, 84, 85, 86, 87, 88, -1,
3203 90, 91, 92, -1, 94, 95, 96, -1, -1, -1,
3204 -1, 40, 102, -1, 104, -1, 106, 107, 108, 109,
3205 110, -1, 112, 113, 114, 115, 116, -1, -1, -1,
3206 -1, -1, 122, -1, 124, 125, -1, 127, 67, 68,
3207 69, -1, 71, 72, 73, 74, 75, 76, 77, 78,
3208 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
3209 -1, 90, 91, 92, -1, 94, 95, 96, -1, -1,
3210 -1, -1, 40, 102, -1, 104, 105, 106, 107, 108,
3211 109, 110, -1, 112, 113, 114, 115, 116, -1, -1,
3212 -1, -1, -1, 122, -1, 124, -1, -1, 127, 67,
3213 68, 69, -1, 71, 72, 73, 74, 75, 76, 77,
3214 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
3215 88, -1, 90, 91, 92, -1, 94, 95, 96, -1,
3216 -1, -1, -1, 40, 102, -1, 104, -1, 106, 107,
3217 108, 109, 110, -1, 112, 113, 114, 115, 116, -1,
3218 -1, -1, -1, -1, 122, -1, 124, -1, -1, 127,
3219 67, 68, 69, -1, 71, 72, 73, 74, 75, 76,
3220 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3221 -1, -1, -1, 90, 91, 92, -1, 94, 95, 96,
3222 -1, -1, -1, -1, 40, -1, -1, -1, -1, 106,
3223 107, 108, 109, 110, -1, 112, 113, 114, 115, 116,
3224 -1, -1, -1, -1, -1, 122, -1, 124, -1, -1,
3225 127, 67, 68, 69, -1, 71, 72, 73, 74, 75,
3226 76, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3227 -1, -1, -1, -1, 90, 91, 92, -1, 94, 95,
3228 96, -1, -1, -1, -1, 40, -1, -1, -1, -1,
3229 -1, 107, 108, 109, 110, -1, 112, 113, 114, 115,
3230 116, -1, -1, -1, -1, -1, 122, -1, 124, -1,
3231 -1, 127, 67, 68, 69, -1, 71, 72, 73, 74,
3232 75, 76, -1, -1, -1, -1, -1, -1, -1, -1,
3233 -1, -1, -1, -1, -1, 90, 91, 92, -1, 94,
3234 95, 96, -1, -1, -1, -1, 40, -1, -1, -1,
3235 -1, -1, -1, 108, 109, 110, -1, 112, 113, 114,
3236 115, 116, -1, -1, -1, -1, -1, 122, -1, 124,
3237 -1, -1, 127, 67, 68, 69, -1, 71, 72, 73,
3238 74, 75, 76, -1, -1, -1, -1, -1, -1, -1,
3239 -1, -1, -1, -1, -1, -1, 90, 91, 92, -1,
3240 94, 95, 96, -1, -1, -1, -1, 40, -1, -1,
3241 -1, -1, -1, -1, 108, 109, 110, -1, 112, 113,
3242 114, 115, 116, -1, -1, -1, -1, -1, 122, -1,
3243 124, -1, -1, 127, 67, 68, 69, -1, 71, 72,
3244 73, 74, 75, 76, -1, -1, -1, -1, -1, -1,
3245 -1, -1, -1, -1, -1, -1, -1, 90, 91, 92,
3246 -1, 94, 95, 96, -1, -1, -1, -1, -1, -1,
3247 -1, -1, -1, -1, -1, -1, 109, 110, -1, 112,
3248 113, 114, 115, 116, -1, -1, -1, -1, -1, 122,
3249 -1, 124, -1, -1, 127
3252 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
3253 symbol of state STATE-NUM. */
3254 static const yytype_uint8 yystos[] =
3256 0, 3, 4, 5, 6, 8, 9, 10, 11, 12,
3257 13, 14, 15, 16, 19, 20, 21, 22, 23, 24,
3258 25, 26, 27, 29, 36, 38, 39, 41, 43, 45,
3259 47, 48, 49, 52, 53, 55, 56, 63, 64, 70,
3260 90, 91, 99, 112, 117, 118, 122, 124, 126, 128,
3261 135, 136, 137, 138, 144, 147, 148, 154, 158, 159,
3262 160, 161, 163, 171, 179, 182, 185, 188, 189, 190,
3263 191, 195, 197, 206, 214, 217, 230, 231, 232, 235,
3264 236, 237, 238, 241, 243, 89, 50, 122, 122, 164,
3265 122, 3, 19, 126, 183, 184, 18, 3, 237, 3,
3266 216, 237, 122, 184, 220, 122, 126, 122, 127, 237,
3267 122, 234, 237, 239, 240, 237, 237, 237, 237, 237,
3268 235, 226, 227, 228, 234, 30, 32, 37, 42, 46,
3269 66, 99, 132, 143, 144, 145, 148, 150, 165, 166,
3270 181, 189, 233, 242, 3, 0, 138, 126, 3, 46,
3271 150, 156, 157, 236, 27, 31, 32, 44, 46, 205,
3272 191, 100, 40, 67, 68, 69, 71, 72, 73, 74,
3273 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
3274 85, 86, 87, 88, 90, 91, 92, 94, 95, 96,
3275 102, 104, 106, 107, 108, 109, 110, 112, 113, 114,
3276 115, 116, 122, 124, 127, 3, 122, 162, 145, 146,
3277 172, 187, 126, 127, 3, 229, 122, 235, 127, 237,
3278 180, 226, 3, 155, 105, 132, 100, 133, 125, 100,
3279 234, 3, 3, 151, 152, 235, 235, 151, 3, 132,
3280 145, 126, 18, 136, 3, 99, 68, 35, 51, 213,
3281 3, 3, 3, 237, 237, 237, 237, 237, 237, 237,
3282 237, 237, 237, 237, 237, 237, 237, 237, 237, 237,
3283 237, 237, 237, 237, 237, 237, 3, 237, 237, 237,
3284 237, 237, 237, 237, 237, 237, 237, 237, 237, 237,
3285 237, 237, 226, 237, 3, 122, 128, 235, 99, 14,
3286 237, 99, 139, 140, 141, 147, 148, 195, 197, 206,
3287 214, 186, 183, 122, 225, 3, 93, 210, 211, 212,
3288 133, 3, 115, 133, 142, 143, 133, 235, 234, 234,
3289 105, 224, 100, 143, 3, 132, 224, 235, 235, 3,
3290 54, 192, 54, 193, 207, 105, 133, 125, 89, 237,
3291 3, 133, 122, 133, 132, 141, 126, 139, 226, 102,
3292 105, 208, 212, 133, 100, 146, 132, 133, 105, 3,
3293 36, 115, 184, 219, 220, 221, 223, 102, 149, 152,
3294 132, 102, 99, 133, 122, 221, 17, 194, 221, 222,
3295 126, 224, 237, 3, 133, 146, 235, 126, 139, 132,
3296 133, 3, 5, 8, 9, 10, 12, 45, 55, 56,
3297 209, 223, 224, 93, 212, 28, 33, 173, 175, 177,
3298 178, 146, 234, 127, 234, 3, 5, 236, 146, 210,
3299 222, 126, 100, 198, 149, 133, 34, 62, 167, 168,
3300 169, 170, 132, 208, 126, 212, 126, 122, 173, 175,
3301 65, 153, 133, 133, 196, 221, 46, 99, 189, 202,
3302 203, 204, 237, 105, 132, 169, 170, 218, 176, 3,
3303 146, 146, 224, 99, 144, 148, 189, 199, 200, 201,
3304 206, 214, 3, 27, 132, 204, 105, 142, 142, 142,
3305 224, 126, 126, 132, 201, 213, 142, 132, 132, 133,
3306 215, 199, 3, 174, 142, 132, 122, 126, 132, 210,
3310 #define yyerrok (yyerrstatus = 0)
3311 #define yyclearin (yychar = YYEMPTY)
3312 #define YYEMPTY (-2)
3315 #define YYACCEPT goto yyacceptlab
3316 #define YYABORT goto yyabortlab
3317 #define YYERROR goto yyerrorlab
3320 /* Like YYERROR except do call yyerror. This remains here temporarily
3321 to ease the transition to the new meaning of YYERROR, for GCC.
3322 Once GCC version 2 has supplanted version 1, this can go. */
3324 #define YYFAIL goto yyerrlab
3326 #define YYRECOVERING() (!!yyerrstatus)
3328 #define YYBACKUP(Token, Value) \
3330 if (yychar == YYEMPTY && yylen == 1) \
3334 yytoken = YYTRANSLATE (yychar); \
3340 yyerror (YY_("syntax error: cannot back up")); \
3347 #define YYERRCODE 256
3350 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
3351 If N is 0, then set CURRENT to the empty location which ends
3352 the previous symbol: RHS[0] (always defined). */
3354 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
3355 #ifndef YYLLOC_DEFAULT
3356 # define YYLLOC_DEFAULT(Current, Rhs, N) \
3360 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
3361 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
3362 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
3363 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
3367 (Current).first_line = (Current).last_line = \
3368 YYRHSLOC (Rhs, 0).last_line; \
3369 (Current).first_column = (Current).last_column = \
3370 YYRHSLOC (Rhs, 0).last_column; \
3376 /* YY_LOCATION_PRINT -- Print the location on the stream.
3377 This macro was not mandated originally: define only if we know
3378 we won't break user code: when these are the locations we know. */
3380 #ifndef YY_LOCATION_PRINT
3381 # if YYLTYPE_IS_TRIVIAL
3382 # define YY_LOCATION_PRINT(File, Loc) \
3383 fprintf (File, "%d.%d-%d.%d", \
3384 (Loc).first_line, (Loc).first_column, \
3385 (Loc).last_line, (Loc).last_column)
3387 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
3392 /* YYLEX -- calling `yylex' with the right arguments. */
3395 # define YYLEX yylex (YYLEX_PARAM)
3397 # define YYLEX yylex ()
3400 /* Enable debugging if requested. */
3404 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
3405 # define YYFPRINTF fprintf
3408 # define YYDPRINTF(Args) \
3414 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
3418 YYFPRINTF (stderr, "%s ", Title); \
3419 yy_symbol_print (stderr, \
3421 YYFPRINTF (stderr, "\n"); \
3426 /*--------------------------------.
3427 | Print this symbol on YYOUTPUT. |
3428 `--------------------------------*/
3431 #if (defined __STDC__ || defined __C99__FUNC__ \
3432 || defined __cplusplus || defined _MSC_VER)
3434 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
3437 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
3440 YYSTYPE const * const yyvaluep;
3446 if (yytype < YYNTOKENS)
3447 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
3459 /*--------------------------------.
3460 | Print this symbol on YYOUTPUT. |
3461 `--------------------------------*/
3463 #if (defined __STDC__ || defined __C99__FUNC__ \
3464 || defined __cplusplus || defined _MSC_VER)
3466 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
3469 yy_symbol_print (yyoutput, yytype, yyvaluep)
3472 YYSTYPE const * const yyvaluep;
3475 if (yytype < YYNTOKENS)
3476 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
3478 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
3480 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
3481 YYFPRINTF (yyoutput, ")");
3484 /*------------------------------------------------------------------.
3485 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
3487 `------------------------------------------------------------------*/
3489 #if (defined __STDC__ || defined __C99__FUNC__ \
3490 || defined __cplusplus || defined _MSC_VER)
3492 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
3495 yy_stack_print (yybottom, yytop)
3496 yytype_int16 *yybottom;
3497 yytype_int16 *yytop;
3500 YYFPRINTF (stderr, "Stack now");
3501 for (; yybottom <= yytop; yybottom++)
3503 int yybot = *yybottom;
3504 YYFPRINTF (stderr, " %d", yybot);
3506 YYFPRINTF (stderr, "\n");
3509 # define YY_STACK_PRINT(Bottom, Top) \
3512 yy_stack_print ((Bottom), (Top)); \
3516 /*------------------------------------------------.
3517 | Report that the YYRULE is going to be reduced. |
3518 `------------------------------------------------*/
3520 #if (defined __STDC__ || defined __C99__FUNC__ \
3521 || defined __cplusplus || defined _MSC_VER)
3523 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
3526 yy_reduce_print (yyvsp, yyrule)
3531 int yynrhs = yyr2[yyrule];
3533 unsigned long int yylno = yyrline[yyrule];
3534 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
3536 /* The symbols being reduced. */
3537 for (yyi = 0; yyi < yynrhs; yyi++)
3539 YYFPRINTF (stderr, " $%d = ", yyi + 1);
3540 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
3541 &(yyvsp[(yyi + 1) - (yynrhs)])
3543 YYFPRINTF (stderr, "\n");
3547 # define YY_REDUCE_PRINT(Rule) \
3550 yy_reduce_print (yyvsp, Rule); \
3553 /* Nonzero means print parse trace. It is left uninitialized so that
3554 multiple parsers can coexist. */
3556 #else /* !YYDEBUG */
3557 # define YYDPRINTF(Args)
3558 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
3559 # define YY_STACK_PRINT(Bottom, Top)
3560 # define YY_REDUCE_PRINT(Rule)
3561 #endif /* !YYDEBUG */
3564 /* YYINITDEPTH -- initial size of the parser's stacks. */
3566 # define YYINITDEPTH 200
3569 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
3570 if the built-in stack extension method is used).
3572 Do not make this value too large; the results are undefined if
3573 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
3574 evaluated with infinite-precision integer arithmetic. */
3577 # define YYMAXDEPTH 10000
3585 # if defined __GLIBC__ && defined _STRING_H
3586 # define yystrlen strlen
3588 /* Return the length of YYSTR. */
3589 #if (defined __STDC__ || defined __C99__FUNC__ \
3590 || defined __cplusplus || defined _MSC_VER)
3592 yystrlen (const char *yystr)
3600 for (yylen = 0; yystr[yylen]; yylen++)
3608 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
3609 # define yystpcpy stpcpy
3611 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
3613 #if (defined __STDC__ || defined __C99__FUNC__ \
3614 || defined __cplusplus || defined _MSC_VER)
3616 yystpcpy (char *yydest, const char *yysrc)
3619 yystpcpy (yydest, yysrc)
3625 const char *yys = yysrc;
3627 while ((*yyd++ = *yys++) != '\0')
3636 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
3637 quotes and backslashes, so that it's suitable for yyerror. The
3638 heuristic is that double-quoting is unnecessary unless the string
3639 contains an apostrophe, a comma, or backslash (other than
3640 backslash-backslash). YYSTR is taken from yytname. If YYRES is
3641 null, do not copy; instead, return the length of what the result
3644 yytnamerr (char *yyres, const char *yystr)
3649 char const *yyp = yystr;
3656 goto do_not_strip_quotes;
3660 goto do_not_strip_quotes;
3673 do_not_strip_quotes: ;
3677 return yystrlen (yystr);
3679 return yystpcpy (yyres, yystr) - yyres;
3683 /* Copy into YYRESULT an error message about the unexpected token
3684 YYCHAR while in state YYSTATE. Return the number of bytes copied,
3685 including the terminating null byte. If YYRESULT is null, do not
3686 copy anything; just return the number of bytes that would be
3687 copied. As a special case, return 0 if an ordinary "syntax error"
3688 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
3689 size calculation. */
3691 yysyntax_error (char *yyresult, int yystate, int yychar)
3693 int yyn = yypact[yystate];
3695 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
3699 int yytype = YYTRANSLATE (yychar);
3700 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
3701 YYSIZE_T yysize = yysize0;
3703 int yysize_overflow = 0;
3704 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
3705 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
3709 /* This is so xgettext sees the translatable formats that are
3710 constructed on the fly. */
3711 YY_("syntax error, unexpected %s");
3712 YY_("syntax error, unexpected %s, expecting %s");
3713 YY_("syntax error, unexpected %s, expecting %s or %s");
3714 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
3715 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
3719 static char const yyunexpected[] = "syntax error, unexpected %s";
3720 static char const yyexpecting[] = ", expecting %s";
3721 static char const yyor[] = " or %s";
3722 char yyformat[sizeof yyunexpected
3723 + sizeof yyexpecting - 1
3724 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
3725 * (sizeof yyor - 1))];
3726 char const *yyprefix = yyexpecting;
3728 /* Start YYX at -YYN if negative to avoid negative indexes in
3730 int yyxbegin = yyn < 0 ? -yyn : 0;
3732 /* Stay within bounds of both yycheck and yytname. */
3733 int yychecklim = YYLAST - yyn + 1;
3734 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
3737 yyarg[0] = yytname[yytype];
3738 yyfmt = yystpcpy (yyformat, yyunexpected);
3740 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
3741 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
3743 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
3747 yyformat[sizeof yyunexpected - 1] = '\0';
3750 yyarg[yycount++] = yytname[yyx];
3751 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
3752 yysize_overflow |= (yysize1 < yysize);
3754 yyfmt = yystpcpy (yyfmt, yyprefix);
3758 yyf = YY_(yyformat);
3759 yysize1 = yysize + yystrlen (yyf);
3760 yysize_overflow |= (yysize1 < yysize);
3763 if (yysize_overflow)
3764 return YYSIZE_MAXIMUM;
3768 /* Avoid sprintf, as that infringes on the user's name space.
3769 Don't have undefined behavior even if the translation
3770 produced a string with the wrong number of "%s"s. */
3771 char *yyp = yyresult;
3773 while ((*yyp = *yyf) != '\0')
3775 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
3777 yyp += yytnamerr (yyp, yyarg[yyi++]);
3790 #endif /* YYERROR_VERBOSE */
3793 /*-----------------------------------------------.
3794 | Release the memory associated to this symbol. |
3795 `-----------------------------------------------*/
3798 #if (defined __STDC__ || defined __C99__FUNC__ \
3799 || defined __cplusplus || defined _MSC_VER)
3801 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
3804 yydestruct (yymsg, yytype, yyvaluep)
3814 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
3824 /* Prevent warnings from -Wmissing-prototypes. */
3825 #ifdef YYPARSE_PARAM
3826 #if defined __STDC__ || defined __cplusplus
3827 int yyparse (void *YYPARSE_PARAM);
3831 #else /* ! YYPARSE_PARAM */
3832 #if defined __STDC__ || defined __cplusplus
3837 #endif /* ! YYPARSE_PARAM */
3840 /* The lookahead symbol. */
3843 /* The semantic value of the lookahead symbol. */
3846 /* Number of syntax errors so far. */
3851 /*-------------------------.
3852 | yyparse or yypush_parse. |
3853 `-------------------------*/
3855 #ifdef YYPARSE_PARAM
3856 #if (defined __STDC__ || defined __C99__FUNC__ \
3857 || defined __cplusplus || defined _MSC_VER)
3859 yyparse (void *YYPARSE_PARAM)
3862 yyparse (YYPARSE_PARAM)
3863 void *YYPARSE_PARAM;
3865 #else /* ! YYPARSE_PARAM */
3866 #if (defined __STDC__ || defined __C99__FUNC__ \
3867 || defined __cplusplus || defined _MSC_VER)
3880 /* Number of tokens to shift before error messages enabled. */
3883 /* The stacks and their tools:
3884 `yyss': related to states.
3885 `yyvs': related to semantic values.
3887 Refer to the stacks thru separate pointers, to allow yyoverflow
3888 to reallocate them elsewhere. */
3890 /* The state stack. */
3891 yytype_int16 yyssa[YYINITDEPTH];
3893 yytype_int16 *yyssp;
3895 /* The semantic value stack. */
3896 YYSTYPE yyvsa[YYINITDEPTH];
3900 YYSIZE_T yystacksize;
3904 /* Lookahead token as an internal (translated) token number. */
3906 /* The variables used to return semantic value and location from the
3911 /* Buffer for error messages, and its allocated size. */
3913 char *yymsg = yymsgbuf;
3914 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
3917 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
3919 /* The number of symbols on the RHS of the reduced rule.
3920 Keep to zero when no symbol should be popped. */
3926 yystacksize = YYINITDEPTH;
3928 YYDPRINTF ((stderr, "Starting parse\n"));
3933 yychar = YYEMPTY; /* Cause a token to be read. */
3935 /* Initialize stack pointers.
3936 Waste one element of value and location stack
3937 so that they stay on the same level as the state stack.
3938 The wasted elements are never initialized. */
3944 /*------------------------------------------------------------.
3945 | yynewstate -- Push a new state, which is found in yystate. |
3946 `------------------------------------------------------------*/
3948 /* In all cases, when you get here, the value and location stacks
3949 have just been pushed. So pushing a state here evens the stacks. */
3955 if (yyss + yystacksize - 1 <= yyssp)
3957 /* Get the current used size of the three stacks, in elements. */
3958 YYSIZE_T yysize = yyssp - yyss + 1;
3962 /* Give user a chance to reallocate the stack. Use copies of
3963 these so that the &'s don't force the real ones into
3965 YYSTYPE *yyvs1 = yyvs;
3966 yytype_int16 *yyss1 = yyss;
3968 /* Each stack pointer address is followed by the size of the
3969 data in use in that stack, in bytes. This used to be a
3970 conditional around just the two extra args, but that might
3971 be undefined if yyoverflow is a macro. */
3972 yyoverflow (YY_("memory exhausted"),
3973 &yyss1, yysize * sizeof (*yyssp),
3974 &yyvs1, yysize * sizeof (*yyvsp),
3980 #else /* no yyoverflow */
3981 # ifndef YYSTACK_RELOCATE
3982 goto yyexhaustedlab;
3984 /* Extend the stack our own way. */
3985 if (YYMAXDEPTH <= yystacksize)
3986 goto yyexhaustedlab;
3988 if (YYMAXDEPTH < yystacksize)
3989 yystacksize = YYMAXDEPTH;
3992 yytype_int16 *yyss1 = yyss;
3993 union yyalloc *yyptr =
3994 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
3996 goto yyexhaustedlab;
3997 YYSTACK_RELOCATE (yyss_alloc, yyss);
3998 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
3999 # undef YYSTACK_RELOCATE
4001 YYSTACK_FREE (yyss1);
4004 #endif /* no yyoverflow */
4006 yyssp = yyss + yysize - 1;
4007 yyvsp = yyvs + yysize - 1;
4009 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
4010 (unsigned long int) yystacksize));
4012 if (yyss + yystacksize - 1 <= yyssp)
4016 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
4018 if (yystate == YYFINAL)
4028 /* Do appropriate processing given the current state. Read a
4029 lookahead token if we need one and don't already have one. */
4031 /* First try to decide what to do without reference to lookahead token. */
4032 yyn = yypact[yystate];
4033 if (yyn == YYPACT_NINF)
4036 /* Not known => get a lookahead token if don't already have one. */
4038 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
4039 if (yychar == YYEMPTY)
4041 YYDPRINTF ((stderr, "Reading a token: "));
4045 if (yychar <= YYEOF)
4047 yychar = yytoken = YYEOF;
4048 YYDPRINTF ((stderr, "Now at end of input.\n"));
4052 yytoken = YYTRANSLATE (yychar);
4053 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
4056 /* If the proper action on seeing token YYTOKEN is to reduce or to
4057 detect an error, take that action. */
4059 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
4064 if (yyn == 0 || yyn == YYTABLE_NINF)
4070 /* Count tokens shifted since error; after three, turn off error
4075 /* Shift the lookahead token. */
4076 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
4078 /* Discard the shifted token. */
4087 /*-----------------------------------------------------------.
4088 | yydefault -- do the default action for the current state. |
4089 `-----------------------------------------------------------*/
4091 yyn = yydefact[yystate];
4097 /*-----------------------------.
4098 | yyreduce -- Do a reduction. |
4099 `-----------------------------*/
4101 /* yyn is the number of a rule to reduce with. */
4104 /* If YYLEN is nonzero, implement the default value of the action:
4107 Otherwise, the following line sets YYVAL to garbage.
4108 This behavior is undocumented and Bison
4109 users should not rely upon it. Assigning to YYVAL
4110 unconditionally makes the parser a bit smaller, and it avoids a
4111 GCC warning that YYVAL may be used uninitialized. */
4112 yyval = yyvsp[1-yylen];
4115 YY_REDUCE_PRINT (yyn);
4122 /* Line 1464 of skeleton.m4 */
4123 #line 1896 "parser.y"
4124 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4133 /* Line 1464 of skeleton.m4 */
4134 #line 1897 "parser.y"
4135 {(yyval.code)=code_new();}
4144 /* Line 1464 of skeleton.m4 */
4145 #line 1899 "parser.y"
4146 {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
4155 /* Line 1464 of skeleton.m4 */
4156 #line 1900 "parser.y"
4157 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4166 /* Line 1464 of skeleton.m4 */
4167 #line 1914 "parser.y"
4168 {(yyval.code)=(yyvsp[(2) - (3)].code);}
4177 /* Line 1464 of skeleton.m4 */
4178 #line 1915 "parser.y"
4188 /* Line 1464 of skeleton.m4 */
4189 #line 1918 "parser.y"
4199 /* Line 1464 of skeleton.m4 */
4200 #line 1925 "parser.y"
4201 {(yyval.code)=(yyvsp[(3) - (4)].code);}
4210 /* Line 1464 of skeleton.m4 */
4211 #line 1927 "parser.y"
4212 {/*TODO*/(yyval.code)=0;}
4221 /* Line 1464 of skeleton.m4 */
4222 #line 1931 "parser.y"
4223 {(yyval.code)=(yyvsp[(1) - (2)].code);}
4232 /* Line 1464 of skeleton.m4 */
4233 #line 1932 "parser.y"
4234 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4243 /* Line 1464 of skeleton.m4 */
4244 #line 1936 "parser.y"
4246 code_t**cc = &global->init->method->body->code;
4247 *cc = code_append(*cc, (yyvsp[(1) - (1)].code));
4257 /* Line 1464 of skeleton.m4 */
4258 #line 1947 "parser.y"
4259 {(yyval.value)=(yyvsp[(2) - (2)].value);}
4268 /* Line 1464 of skeleton.m4 */
4269 #line 1948 "parser.y"
4270 {(yyval.value).c=abc_pushundefined(0);
4271 (yyval.value).t=TYPE_ANY;
4281 /* Line 1464 of skeleton.m4 */
4282 #line 1952 "parser.y"
4283 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4292 /* Line 1464 of skeleton.m4 */
4293 #line 1953 "parser.y"
4294 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4303 /* Line 1464 of skeleton.m4 */
4304 #line 1955 "parser.y"
4305 {(yyval.code) = (yyvsp[(1) - (1)].code);}
4314 /* Line 1464 of skeleton.m4 */
4315 #line 1956 "parser.y"
4316 {(yyval.code) = code_append((yyvsp[(1) - (3)].code), (yyvsp[(3) - (3)].code));}
4325 /* Line 1464 of skeleton.m4 */
4326 #line 1959 "parser.y"
4329 if(variable_exists((yyvsp[(1) - (3)].id)))
4330 syntaxerror("Variable %s already defined", (yyvsp[(1) - (3)].id));
4332 new_variable((yyvsp[(1) - (3)].id), 0, 1, 0);
4335 if(!is_subtype_of((yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo))) {
4336 syntaxerror("Can't convert %s to %s", (yyvsp[(3) - (3)].value).t->name,
4337 (yyvsp[(2) - (3)].classinfo)->name);
4342 if(state->method->uses_slots) {
4343 variable_t* v = find_slot(state, (yyvsp[(1) - (3)].id));
4345 // this variable is stored in a slot
4347 v->type = (yyvsp[(2) - (3)].classinfo);
4353 index = new_variable((yyvsp[(1) - (3)].id), (yyvsp[(2) - (3)].classinfo), 1, 0);
4356 (yyval.code) = slot?abc_getscopeobject(0, 1):0;
4358 if((yyvsp[(2) - (3)].classinfo)) {
4359 if((yyvsp[(3) - (3)].value).c->prev || (yyvsp[(3) - (3)].value).c->opcode != OPCODE_PUSHUNDEFINED) {
4360 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (3)].value).c);
4361 (yyval.code) = converttype((yyval.code), (yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo));
4363 code_free((yyvsp[(3) - (3)].value).c);
4364 (yyval.code) = defaultvalue((yyval.code), (yyvsp[(2) - (3)].classinfo));
4367 if((yyvsp[(3) - (3)].value).c->prev || (yyvsp[(3) - (3)].value).c->opcode != OPCODE_PUSHUNDEFINED) {
4368 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (3)].value).c);
4369 (yyval.code) = abc_coerce_a((yyval.code));
4371 // don't do anything
4372 code_free((yyvsp[(3) - (3)].value).c);
4373 code_free((yyval.code));
4379 (yyval.code) = abc_setslot((yyval.code), index);
4381 (yyval.code) = abc_setlocal((yyval.code), index);
4392 /* Line 1464 of skeleton.m4 */
4393 #line 2019 "parser.y"
4394 {(yyval.code) = code_new();}
4403 /* Line 1464 of skeleton.m4 */
4404 #line 2020 "parser.y"
4405 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4414 /* Line 1464 of skeleton.m4 */
4415 #line 2023 "parser.y"
4416 {PASS12 new_state();}
4425 /* Line 1464 of skeleton.m4 */
4426 #line 2023 "parser.y"
4429 (yyval.code) = code_new();
4430 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (7)].value).c);
4431 code_t*myjmp,*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4433 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].code));
4434 if((yyvsp[(7) - (7)].code)) {
4435 myjmp = (yyval.code) = abc_jump((yyval.code), 0);
4437 myif->branch = (yyval.code) = abc_nop((yyval.code));
4438 if((yyvsp[(7) - (7)].code)) {
4439 (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (7)].code));
4440 myjmp->branch = (yyval.code) = abc_nop((yyval.code));
4442 (yyval.code) = var_block((yyval.code));
4453 /* Line 1464 of skeleton.m4 */
4454 #line 2042 "parser.y"
4455 {(yyval.code)=code_new();}
4464 /* Line 1464 of skeleton.m4 */
4465 #line 2049 "parser.y"
4467 PASS1 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable((yyvsp[(2) - (3)].id),0,1,0);
4468 PASS2 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable((yyvsp[(2) - (3)].id),(yyvsp[(3) - (3)].classinfo),1,0);
4478 /* Line 1464 of skeleton.m4 */
4479 #line 2053 "parser.y"
4482 (yyval.id)=(yyvsp[(1) - (1)].id);
4492 /* Line 1464 of skeleton.m4 */
4493 #line 2058 "parser.y"
4494 {PASS12 new_state();(yyval.for_start).name=(yyvsp[(1) - (2)].id);(yyval.for_start).each=0;}
4503 /* Line 1464 of skeleton.m4 */
4504 #line 2059 "parser.y"
4505 {PASS12 new_state();(yyval.for_start).name=(yyvsp[(1) - (3)].id);(yyval.for_start).each=1;}
4514 /* Line 1464 of skeleton.m4 */
4515 #line 2061 "parser.y"
4517 if((yyvsp[(1) - (8)].for_start).each) syntaxerror("invalid syntax: ; not allowed in for each statement");
4518 (yyval.code) = code_new();
4519 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (8)].code));
4520 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4521 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (8)].value).c);
4522 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4523 (yyval.code) = code_append((yyval.code), (yyvsp[(8) - (8)].code));
4524 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4525 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (8)].code));
4526 (yyval.code) = abc_jump((yyval.code), loopstart);
4527 code_t*out = (yyval.code) = abc_nop((yyval.code));
4528 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, out);
4529 continuejumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, cont);
4532 (yyval.code) = var_block((yyval.code));
4543 /* Line 1464 of skeleton.m4 */
4544 #line 2081 "parser.y"
4546 variable_t*var = find_variable(state, (yyvsp[(2) - (6)].id));
4547 char*tmp1name = concat2((yyvsp[(2) - (6)].id), "__tmp1__");
4548 int it = new_variable(tmp1name, TYPE_INT, 0, 0);
4549 char*tmp2name = concat2((yyvsp[(2) - (6)].id), "__array__");
4550 int array = new_variable(tmp1name, 0, 0, 0);
4552 (yyval.code) = code_new();
4553 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
4554 (yyval.code) = abc_coerce_a((yyval.code));
4555 (yyval.code) = abc_setlocal((yyval.code), array);
4556 (yyval.code) = abc_pushbyte((yyval.code), 0);
4557 (yyval.code) = abc_setlocal((yyval.code), it);
4559 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4561 (yyval.code) = abc_hasnext2((yyval.code), array, it);
4562 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4563 (yyval.code) = abc_getlocal((yyval.code), array);
4564 (yyval.code) = abc_getlocal((yyval.code), it);
4565 if(!(yyvsp[(1) - (6)].for_start).each)
4566 (yyval.code) = abc_nextname((yyval.code));
4568 (yyval.code) = abc_nextvalue((yyval.code));
4569 (yyval.code) = converttype((yyval.code), 0, var->type);
4570 (yyval.code) = abc_setlocal((yyval.code), var->index);
4572 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
4573 (yyval.code) = abc_jump((yyval.code), loopstart);
4575 code_t*out = (yyval.code) = abc_nop((yyval.code));
4576 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, out);
4577 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, loopstart);
4581 (yyval.code) = var_block((yyval.code));
4596 /* Line 1464 of skeleton.m4 */
4597 #line 2125 "parser.y"
4598 {PASS12 new_state();}
4607 /* Line 1464 of skeleton.m4 */
4608 #line 2125 "parser.y"
4611 (yyval.code) = code_new();
4613 code_t*myjmp = (yyval.code) = abc_jump((yyval.code), 0);
4614 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4615 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
4616 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4617 myjmp->branch = cont;
4618 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
4619 (yyval.code) = abc_iftrue((yyval.code), loopstart);
4620 code_t*out = (yyval.code) = abc_nop((yyval.code));
4621 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].id), out);
4622 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].id), cont);
4624 (yyval.code) = var_block((yyval.code));
4635 /* Line 1464 of skeleton.m4 */
4636 #line 2144 "parser.y"
4637 {PASS12 new_state();}
4646 /* Line 1464 of skeleton.m4 */
4647 #line 2144 "parser.y"
4649 (yyval.code) = code_new();
4650 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4651 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (7)].code));
4652 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4653 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].value).c);
4654 (yyval.code) = abc_iftrue((yyval.code), loopstart);
4655 code_t*out = (yyval.code) = abc_nop((yyval.code));
4656 breakjumpsto((yyval.code), (yyvsp[(1) - (7)].id), out);
4657 continuejumpsto((yyval.code), (yyvsp[(1) - (7)].id), cont);
4659 (yyval.code) = var_block((yyval.code));
4670 /* Line 1464 of skeleton.m4 */
4671 #line 2159 "parser.y"
4673 (yyval.code) = abc___break__(0, "");
4683 /* Line 1464 of skeleton.m4 */
4684 #line 2162 "parser.y"
4686 (yyval.code) = abc___break__(0, (yyvsp[(2) - (2)].id));
4696 /* Line 1464 of skeleton.m4 */
4697 #line 2165 "parser.y"
4699 (yyval.code) = abc___continue__(0, "");
4709 /* Line 1464 of skeleton.m4 */
4710 #line 2168 "parser.y"
4712 (yyval.code) = abc___continue__(0, (yyvsp[(2) - (2)].id));
4722 /* Line 1464 of skeleton.m4 */
4723 #line 2172 "parser.y"
4733 /* Line 1464 of skeleton.m4 */
4734 #line 2173 "parser.y"
4735 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4744 /* Line 1464 of skeleton.m4 */
4745 #line 2174 "parser.y"
4746 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4755 /* Line 1464 of skeleton.m4 */
4756 #line 2175 "parser.y"
4757 {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
4766 /* Line 1464 of skeleton.m4 */
4767 #line 2176 "parser.y"
4768 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4777 /* Line 1464 of skeleton.m4 */
4778 #line 2177 "parser.y"
4779 {(yyval.code)=code_append((yyval.code),(yyvsp[(2) - (2)].code));}
4788 /* Line 1464 of skeleton.m4 */
4789 #line 2179 "parser.y"
4791 (yyval.code) = abc_dup(0);
4792 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (4)].value).c);
4793 code_t*j = (yyval.code) = abc_ifne((yyval.code), 0);
4794 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (4)].code));
4795 if((yyval.code)->opcode != OPCODE___BREAK__) {
4796 (yyval.code) = abc___fallthrough__((yyval.code), "");
4798 code_t*e = (yyval.code) = abc_nop((yyval.code));
4809 /* Line 1464 of skeleton.m4 */
4810 #line 2190 "parser.y"
4812 (yyval.code) = (yyvsp[(3) - (3)].code);
4822 /* Line 1464 of skeleton.m4 */
4823 #line 2193 "parser.y"
4824 {PASS12 new_state();}
4833 /* Line 1464 of skeleton.m4 */
4834 #line 2193 "parser.y"
4836 (yyval.code)=(yyvsp[(4) - (8)].value).c;
4837 (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (8)].code));
4838 code_t*out = (yyval.code) = abc_pop((yyval.code));
4839 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].id), out);
4841 code_t*c = (yyval.code),*lastblock=0;
4843 if(c->opcode == OPCODE_IFNE) {
4844 if(!c->next) syntaxerror("internal error in fallthrough handling");
4846 } else if(c->opcode == OPCODE___FALLTHROUGH__) {
4848 c->opcode = OPCODE_JUMP;
4849 c->branch = lastblock;
4851 /* fall through end of switch */
4852 c->opcode = OPCODE_NOP;
4858 (yyval.code) = var_block((yyval.code));
4869 /* Line 1464 of skeleton.m4 */
4870 #line 2222 "parser.y"
4871 {PASS12 new_state();
4872 state->exception_name=(yyvsp[(3) - (5)].id);
4873 PASS1 new_variable((yyvsp[(3) - (5)].id), 0, 0, 0);
4874 PASS2 new_variable((yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].classinfo), 0, 0);
4884 /* Line 1464 of skeleton.m4 */
4885 #line 2227 "parser.y"
4887 namespace_t name_ns = {ACCESS_PACKAGE, ""};
4888 multiname_t name = {QNAME, &name_ns, 0, (yyvsp[(3) - (9)].id)};
4890 NEW(abc_exception_t, e)
4891 e->exc_type = sig2mname((yyvsp[(4) - (9)].classinfo));
4892 e->var_name = multiname_clone(&name);
4893 (yyval.exception) = e;
4896 int i = find_variable_safe(state, (yyvsp[(3) - (9)].id))->index;
4897 e->target = c = abc_nop(0);
4898 c = abc_setlocal(c, i);
4899 c = code_append(c, (yyvsp[(8) - (9)].code));
4913 /* Line 1464 of skeleton.m4 */
4914 #line 2246 "parser.y"
4915 {PASS12 new_state();state->exception_name=0;}
4924 /* Line 1464 of skeleton.m4 */
4925 #line 2246 "parser.y"
4927 (yyvsp[(4) - (5)].code) = var_block((yyvsp[(4) - (5)].code));
4928 if(!(yyvsp[(4) - (5)].code)) {
4929 (yyval.exception)=0;
4931 NEW(abc_exception_t, e)
4932 e->exc_type = 0; //all exceptions
4933 e->var_name = 0; //no name
4936 e->to = code_append(e->to, (yyvsp[(4) - (5)].code));
4937 (yyval.exception) = e;
4949 /* Line 1464 of skeleton.m4 */
4950 #line 2262 "parser.y"
4951 {(yyval.catch_list).l=list_new();(yyval.catch_list).finally=0;list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));}
4960 /* Line 1464 of skeleton.m4 */
4961 #line 2263 "parser.y"
4962 {(yyval.catch_list)=(yyvsp[(1) - (2)].catch_list);list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));}
4971 /* Line 1464 of skeleton.m4 */
4972 #line 2264 "parser.y"
4973 {(yyval.catch_list)=(yyvsp[(1) - (1)].catch_list);}
4982 /* Line 1464 of skeleton.m4 */
4983 #line 2265 "parser.y"
4985 (yyval.catch_list) = (yyvsp[(1) - (2)].catch_list);
4986 (yyval.catch_list).finally = 0;
4987 if((yyvsp[(2) - (2)].exception)) {
4988 list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));
4989 (yyval.catch_list).finally = (yyvsp[(2) - (2)].exception)->to;(yyvsp[(2) - (2)].exception)->to=0;
5000 /* Line 1464 of skeleton.m4 */
5001 #line 2273 "parser.y"
5003 (yyval.catch_list).l=list_new();
5004 (yyval.catch_list).finally = 0;
5005 if((yyvsp[(1) - (1)].exception)) {
5006 list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));
5007 (yyval.catch_list).finally = (yyvsp[(1) - (1)].exception)->to;(yyvsp[(1) - (1)].exception)->to=0;
5018 /* Line 1464 of skeleton.m4 */
5019 #line 2282 "parser.y"
5020 {PASS12 new_state();}
5029 /* Line 1464 of skeleton.m4 */
5030 #line 2282 "parser.y"
5032 code_t*out = abc_nop(0);
5034 code_t*start = abc_nop(0);
5035 (yyval.code) = code_append(start, (yyvsp[(4) - (6)].code));
5036 if(!is_break_or_jump((yyvsp[(4) - (6)].code))) {
5037 (yyval.code) = abc_jump((yyval.code), out);
5039 code_t*end = (yyval.code) = abc_nop((yyval.code));
5042 if((yyvsp[(6) - (6)].catch_list).finally)
5043 tmp = new_variable("__finally__", 0, 0, 0);
5045 abc_exception_list_t*l = (yyvsp[(6) - (6)].catch_list).l;
5048 abc_exception_t*e = l->abc_exception;
5050 (yyval.code) = code_append((yyval.code), e->target);
5051 (yyval.code) = abc_jump((yyval.code), out);
5053 parserassert((ptroff_t)(yyvsp[(6) - (6)].catch_list).finally);
5055 e->target = (yyval.code) = abc_nop((yyval.code));
5056 (yyval.code) = abc___rethrow__((yyval.code));
5064 (yyval.code) = code_append((yyval.code), out);
5066 (yyval.code) = insert_finally((yyval.code), (yyvsp[(6) - (6)].catch_list).finally, tmp);
5068 list_concat(state->method->exceptions, (yyvsp[(6) - (6)].catch_list).l);
5070 (yyval.code) = var_block((yyval.code));
5081 /* Line 1464 of skeleton.m4 */
5082 #line 2327 "parser.y"
5084 (yyval.code)=(yyvsp[(2) - (2)].value).c;
5085 (yyval.code)=abc_throw((yyval.code));
5095 /* Line 1464 of skeleton.m4 */
5096 #line 2331 "parser.y"
5098 if(!state->exception_name)
5099 syntaxerror("re-throw only possible within a catch block");
5100 variable_t*v = find_variable(state, state->exception_name);
5101 (yyval.code)=code_new();
5102 (yyval.code)=abc_getlocal((yyval.code), v->index);
5103 (yyval.code)=abc_throw((yyval.code));
5113 /* Line 1464 of skeleton.m4 */
5114 #line 2342 "parser.y"
5116 (yyval.code) = (yyvsp[(3) - (5)].value).c;
5117 (yyval.code) = abc_pushscope((yyval.code));
5118 (yyval.code) = code_append((yyval.code), (yyvsp[(5) - (5)].code));
5119 (yyval.code) = abc_popscope((yyval.code));
5129 /* Line 1464 of skeleton.m4 */
5130 #line 2352 "parser.y"
5131 {PASS12 (yyval.id)="package";}
5140 /* Line 1464 of skeleton.m4 */
5141 #line 2354 "parser.y"
5142 {PASS12 (yyval.id) = concat3((yyvsp[(1) - (3)].id),".",(yyvsp[(3) - (3)].id));free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;}
5151 /* Line 1464 of skeleton.m4 */
5152 #line 2355 "parser.y"
5153 {PASS12 (yyval.id)=strdup((yyvsp[(1) - (1)].id));}
5162 /* Line 1464 of skeleton.m4 */
5163 #line 2357 "parser.y"
5164 {PASS12 startpackage((yyvsp[(2) - (3)].id));free((yyvsp[(2) - (3)].id));(yyvsp[(2) - (3)].id)=0;}
5173 /* Line 1464 of skeleton.m4 */
5174 #line 2358 "parser.y"
5175 {PASS12 endpackage();(yyval.code)=0;}
5184 /* Line 1464 of skeleton.m4 */
5185 #line 2359 "parser.y"
5186 {PASS12 startpackage("");}
5195 /* Line 1464 of skeleton.m4 */
5196 #line 2360 "parser.y"
5197 {PASS12 endpackage();(yyval.code)=0;}
5206 /* Line 1464 of skeleton.m4 */
5207 #line 2362 "parser.y"
5210 slotinfo_t*s = registry_find((yyvsp[(2) - (2)].classinfo)->package, (yyvsp[(2) - (2)].classinfo)->name);
5211 if(!s) {// || !(s->flags&FLAG_BUILTIN)) {
5212 as3_schedule_class((yyvsp[(2) - (2)].classinfo)->package, (yyvsp[(2) - (2)].classinfo)->name);
5216 classinfo_t*c = (yyvsp[(2) - (2)].classinfo);
5218 syntaxerror("Couldn't import class\n");
5219 state_has_imports();
5220 dict_put(state->imports, c->name, c);
5231 /* Line 1464 of skeleton.m4 */
5232 #line 2377 "parser.y"
5235 if(strncmp("flash.", (yyvsp[(2) - (4)].id), 6)) {
5236 as3_schedule_package((yyvsp[(2) - (4)].id));
5241 i->package = (yyvsp[(2) - (4)].id);
5242 state_has_imports();
5243 list_append(state->wildcard_imports, i);
5254 /* Line 1464 of skeleton.m4 */
5255 #line 2393 "parser.y"
5256 {PASS12 (yyval.flags)=0;}
5265 /* Line 1464 of skeleton.m4 */
5266 #line 2394 "parser.y"
5267 {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
5276 /* Line 1464 of skeleton.m4 */
5277 #line 2395 "parser.y"
5278 {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].token);}
5287 /* Line 1464 of skeleton.m4 */
5288 #line 2396 "parser.y"
5289 {PASS12 (yyval.flags)=(yyvsp[(1) - (2)].flags)|(yyvsp[(2) - (2)].token);}
5298 /* Line 1464 of skeleton.m4 */
5299 #line 2398 "parser.y"
5300 {PASS12 (yyval.token)=FLAG_PUBLIC;}
5309 /* Line 1464 of skeleton.m4 */
5310 #line 2399 "parser.y"
5311 {PASS12 (yyval.token)=FLAG_PRIVATE;}
5320 /* Line 1464 of skeleton.m4 */
5321 #line 2400 "parser.y"
5322 {PASS12 (yyval.token)=FLAG_PROTECTED;}
5331 /* Line 1464 of skeleton.m4 */
5332 #line 2401 "parser.y"
5333 {PASS12 (yyval.token)=FLAG_STATIC;}
5342 /* Line 1464 of skeleton.m4 */
5343 #line 2402 "parser.y"
5344 {PASS12 (yyval.token)=FLAG_DYNAMIC;}
5353 /* Line 1464 of skeleton.m4 */
5354 #line 2403 "parser.y"
5355 {PASS12 (yyval.token)=FLAG_FINAL;}
5364 /* Line 1464 of skeleton.m4 */
5365 #line 2404 "parser.y"
5366 {PASS12 (yyval.token)=FLAG_OVERRIDE;}
5375 /* Line 1464 of skeleton.m4 */
5376 #line 2405 "parser.y"
5377 {PASS12 (yyval.token)=FLAG_NATIVE;}
5386 /* Line 1464 of skeleton.m4 */
5387 #line 2406 "parser.y"
5388 {PASS12 (yyval.token)=FLAG_PACKAGEINTERNAL;}
5397 /* Line 1464 of skeleton.m4 */
5398 #line 2407 "parser.y"
5399 {PASS12 (yyval.token)=FLAG_NAMESPACE;}
5408 /* Line 1464 of skeleton.m4 */
5409 #line 2409 "parser.y"
5410 {(yyval.classinfo)=registry_getobjectclass();}
5419 /* Line 1464 of skeleton.m4 */
5420 #line 2410 "parser.y"
5421 {(yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
5430 /* Line 1464 of skeleton.m4 */
5431 #line 2412 "parser.y"
5432 {PASS12 (yyval.classinfo_list)=list_new();}
5441 /* Line 1464 of skeleton.m4 */
5442 #line 2413 "parser.y"
5443 {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
5452 /* Line 1464 of skeleton.m4 */
5453 #line 2415 "parser.y"
5454 {PASS12 (yyval.classinfo_list)=list_new();}
5463 /* Line 1464 of skeleton.m4 */
5464 #line 2416 "parser.y"
5465 {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
5474 /* Line 1464 of skeleton.m4 */
5475 #line 2420 "parser.y"
5476 {PASS12 startclass((yyvsp[(1) - (6)].flags),(yyvsp[(3) - (6)].id),(yyvsp[(4) - (6)].classinfo),(yyvsp[(5) - (6)].classinfo_list));}
5485 /* Line 1464 of skeleton.m4 */
5486 #line 2422 "parser.y"
5487 {PASS12 endclass();(yyval.code)=0;}
5496 /* Line 1464 of skeleton.m4 */
5497 #line 2426 "parser.y"
5498 {PASS12 startclass((yyvsp[(1) - (5)].flags)|FLAG_INTERFACE,(yyvsp[(3) - (5)].id),0,(yyvsp[(4) - (5)].classinfo_list));}
5507 /* Line 1464 of skeleton.m4 */
5508 #line 2428 "parser.y"
5509 {PASS12 endclass();(yyval.code)=0;}
5518 /* Line 1464 of skeleton.m4 */
5519 #line 2441 "parser.y"
5521 code_t*c = state->cls->static_init->header;
5522 c = code_append(c, (yyvsp[(1) - (1)].code));
5523 state->cls->static_init->header = c;
5533 /* Line 1464 of skeleton.m4 */
5534 #line 2452 "parser.y"
5536 syntaxerror("variable declarations not allowed in interfaces");
5546 /* Line 1464 of skeleton.m4 */
5547 #line 2455 "parser.y"
5550 (yyvsp[(1) - (8)].flags) |= FLAG_PUBLIC;
5551 if((yyvsp[(1) - (8)].flags)&(FLAG_PRIVATE|FLAG_PACKAGEINTERNAL|FLAG_PROTECTED)) {
5552 syntaxerror("invalid method modifiers: interface methods always need to be public");
5554 startfunction(0,(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo));
5555 endfunction(0,(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo), 0);
5556 list_deep_free((yyvsp[(6) - (8)].params).list);
5566 /* Line 1464 of skeleton.m4 */
5567 #line 2470 "parser.y"
5568 {setstaticfunction((yyvsp[(1) - (3)].flags));}
5577 /* Line 1464 of skeleton.m4 */
5578 #line 2470 "parser.y"
5580 int flags = (yyvsp[(1) - (6)].flags);
5581 U8 access = flags2access((yyvsp[(1) - (6)].flags));
5583 varinfo_t* info = 0;
5585 memberinfo_t*i = registry_findmember(state->cls->info, (yyvsp[(3) - (6)].id), 1);
5587 check_override(i, flags);
5589 info = varinfo_register_onclass(state->cls->info, access, (yyvsp[(3) - (6)].id));
5591 slotinfo_t*i = registry_find(state->package, (yyvsp[(3) - (6)].id));
5593 syntaxerror("package %s already contains '%s'", state->package, (yyvsp[(3) - (6)].id));
5595 info = varinfo_register_global(access, state->package, (yyvsp[(3) - (6)].id));
5598 info->type = (yyvsp[(5) - (6)].classinfo);
5599 info->flags = flags;
5602 namespace_t mname_ns = {access, ""};
5603 multiname_t mname = {QNAME, &mname_ns, 0, (yyvsp[(3) - (6)].id)};
5605 trait_list_t**traits;
5609 mname_ns.name = state->package;
5610 traits = &global->init->traits;
5611 code = &global->init->method->body->code;
5612 } else if(flags&FLAG_STATIC) {
5614 traits = &state->cls->abc->static_traits;
5615 code = &state->cls->static_init->header;
5617 // instance variable
5618 traits = &state->cls->abc->traits;
5619 code = &state->cls->init->header;
5623 if((yyvsp[(5) - (6)].classinfo)) {
5624 MULTINAME(m, (yyvsp[(5) - (6)].classinfo));
5625 t = trait_new_member(traits, multiname_clone(&m), multiname_clone(&mname), 0);
5627 t = trait_new_member(traits, 0, multiname_clone(&mname), 0);
5629 info->slot = t->slot_id;
5631 /* initalization code (if needed) */
5633 if((yyvsp[(6) - (6)].value).c && !is_pushundefined((yyvsp[(6) - (6)].value).c)) {
5634 c = abc_getlocal_0(c);
5635 c = code_append(c, (yyvsp[(6) - (6)].value).c);
5636 c = converttype(c, (yyvsp[(6) - (6)].value).t, (yyvsp[(5) - (6)].classinfo));
5637 c = abc_setslot(c, t->slot_id);
5640 *code = code_append(*code, c);
5642 if((yyvsp[(2) - (6)].token)==KW_CONST) {
5643 t->kind= TRAIT_CONST;
5647 setstaticfunction(0);
5657 /* Line 1464 of skeleton.m4 */
5658 #line 2543 "parser.y"
5659 {(yyval.constant)=0;}
5668 /* Line 1464 of skeleton.m4 */
5669 #line 2544 "parser.y"
5670 {(yyval.constant)=(yyvsp[(2) - (2)].constant);}
5679 /* Line 1464 of skeleton.m4 */
5680 #line 2546 "parser.y"
5681 {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_uint));}
5690 /* Line 1464 of skeleton.m4 */
5691 #line 2547 "parser.y"
5692 {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_int));}
5701 /* Line 1464 of skeleton.m4 */
5702 #line 2548 "parser.y"
5703 {(yyval.constant) = constant_new_uint((yyvsp[(1) - (1)].number_uint));}
5712 /* Line 1464 of skeleton.m4 */
5713 #line 2549 "parser.y"
5714 {(yyval.constant) = constant_new_float((yyvsp[(1) - (1)].number_float));}
5723 /* Line 1464 of skeleton.m4 */
5724 #line 2550 "parser.y"
5725 {(yyval.constant) = constant_new_string2((yyvsp[(1) - (1)].str).str,(yyvsp[(1) - (1)].str).len);free((char*)(yyvsp[(1) - (1)].str).str);}
5734 /* Line 1464 of skeleton.m4 */
5735 #line 2552 "parser.y"
5736 {(yyval.constant) = constant_new_true((yyvsp[(1) - (1)].token));}
5745 /* Line 1464 of skeleton.m4 */
5746 #line 2553 "parser.y"
5747 {(yyval.constant) = constant_new_false((yyvsp[(1) - (1)].token));}
5756 /* Line 1464 of skeleton.m4 */
5757 #line 2554 "parser.y"
5758 {(yyval.constant) = constant_new_null((yyvsp[(1) - (1)].token));}
5767 /* Line 1464 of skeleton.m4 */
5768 #line 2555 "parser.y"
5771 as3_warning("Couldn't resolve %s", (yyvsp[(1) - (1)].id));
5772 (yyval.constant) = constant_new_null((yyvsp[(1) - (1)].id));
5782 /* Line 1464 of skeleton.m4 */
5783 #line 2564 "parser.y"
5786 memset(&(yyval.params),0,sizeof((yyval.params)));
5796 /* Line 1464 of skeleton.m4 */
5797 #line 2568 "parser.y"
5800 (yyval.params)=(yyvsp[(1) - (1)].params);
5810 /* Line 1464 of skeleton.m4 */
5811 #line 2574 "parser.y"
5814 memset(&(yyval.params),0,sizeof((yyval.params)));
5815 (yyval.params).varargs=1;
5816 list_append((yyval.params).list, (yyvsp[(2) - (2)].param));
5826 /* Line 1464 of skeleton.m4 */
5827 #line 2580 "parser.y"
5830 (yyval.params) =(yyvsp[(1) - (4)].params);
5831 (yyval.params).varargs=1;
5832 list_append((yyval.params).list, (yyvsp[(4) - (4)].param));
5842 /* Line 1464 of skeleton.m4 */
5843 #line 2588 "parser.y"
5846 (yyval.params) = (yyvsp[(1) - (3)].params);
5847 list_append((yyval.params).list, (yyvsp[(3) - (3)].param));
5857 /* Line 1464 of skeleton.m4 */
5858 #line 2593 "parser.y"
5861 memset(&(yyval.params),0,sizeof((yyval.params)));
5862 list_append((yyval.params).list, (yyvsp[(1) - (1)].param));
5872 /* Line 1464 of skeleton.m4 */
5873 #line 2599 "parser.y"
5876 (yyval.param) = rfx_calloc(sizeof(param_t));
5877 (yyval.param)->name=(yyvsp[(1) - (4)].id);
5878 (yyval.param)->type = (yyvsp[(3) - (4)].classinfo);
5880 (yyval.param)->value = (yyvsp[(4) - (4)].constant);
5890 /* Line 1464 of skeleton.m4 */
5891 #line 2607 "parser.y"
5894 (yyval.param) = rfx_calloc(sizeof(param_t));
5895 (yyval.param)->name=(yyvsp[(1) - (2)].id);
5896 (yyval.param)->type = TYPE_ANY;
5898 (yyval.param)->value = (yyvsp[(2) - (2)].constant);
5908 /* Line 1464 of skeleton.m4 */
5909 #line 2617 "parser.y"
5910 {PASS12 (yyval.token)=0;}
5919 /* Line 1464 of skeleton.m4 */
5920 #line 2620 "parser.y"
5921 {PASS12 startfunction(0,(yyvsp[(1) - (9)].flags),(yyvsp[(3) - (9)].token),(yyvsp[(4) - (9)].id),&(yyvsp[(6) - (9)].params),(yyvsp[(8) - (9)].classinfo));}
5930 /* Line 1464 of skeleton.m4 */
5931 #line 2621 "parser.y"
5934 endfunction(0,(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),0,0);
5936 if(!state->method->info) syntaxerror("internal error");
5938 code_t*c = method_header(state->method);
5939 c = wrap_function(c, 0, (yyvsp[(11) - (12)].code));
5941 endfunction(0,(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),(yyvsp[(8) - (12)].classinfo),c);
5943 list_deep_free((yyvsp[(6) - (12)].params).list);
5954 /* Line 1464 of skeleton.m4 */
5955 #line 2637 "parser.y"
5956 {PASS12 (yyval.id)=0;}
5965 /* Line 1464 of skeleton.m4 */
5966 #line 2639 "parser.y"
5967 {PASS12 innerfunction((yyvsp[(2) - (7)].id),&(yyvsp[(4) - (7)].params),(yyvsp[(6) - (7)].classinfo));}
5976 /* Line 1464 of skeleton.m4 */
5977 #line 2640 "parser.y"
5980 endfunction(0,0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),0,0);
5982 methodinfo_t*f = state->method->info;
5983 if(!f || !f->kind) syntaxerror("internal error");
5985 code_t*c = method_header(state->method);
5986 c = wrap_function(c, 0, (yyvsp[(9) - (10)].code));
5988 int index = state->method->var_index;
5989 endfunction(0,0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),(yyvsp[(6) - (10)].classinfo),c);
5991 (yyval.value).c = abc_getlocal(0, index);
5992 (yyval.value).t = TYPE_FUNCTION(f);
5994 PASS12 list_deep_free((yyvsp[(4) - (10)].params).list);
6004 /* Line 1464 of skeleton.m4 */
6005 #line 2662 "parser.y"
6007 PASS1 (yyval.classinfo)=0;
6009 slotinfo_t*s = find_class((yyvsp[(1) - (1)].id));
6010 if(!s) syntaxerror("Could not find class/method %s (current package: %s)\n", (yyvsp[(1) - (1)].id), state->package);
6011 (yyval.classinfo) = (classinfo_t*)s;
6021 /* Line 1464 of skeleton.m4 */
6022 #line 2670 "parser.y"
6024 PASS1 static classinfo_t c;
6025 memset(&c, 0, sizeof(c));
6026 c.package = (yyvsp[(1) - (3)].id);
6027 c.name = (yyvsp[(3) - (3)].id);
6028 (yyval.classinfo)=&c;
6030 slotinfo_t*s = registry_find((yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
6031 if(!s) syntaxerror("Couldn't find class/method %s.%s\n", (yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
6032 free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;
6033 (yyval.classinfo) = (classinfo_t*)s;
6043 /* Line 1464 of skeleton.m4 */
6044 #line 2686 "parser.y"
6045 {PASS12 (yyval.classinfo_list)=list_new();list_append((yyval.classinfo_list), (yyvsp[(1) - (1)].classinfo));}
6054 /* Line 1464 of skeleton.m4 */
6055 #line 2687 "parser.y"
6056 {PASS12 (yyval.classinfo_list)=(yyvsp[(1) - (3)].classinfo_list);list_append((yyval.classinfo_list),(yyvsp[(3) - (3)].classinfo));}
6065 /* Line 1464 of skeleton.m4 */
6066 #line 2689 "parser.y"
6067 {(yyval.classinfo)=(yyvsp[(1) - (1)].classinfo);}
6076 /* Line 1464 of skeleton.m4 */
6077 #line 2690 "parser.y"
6078 {(yyval.classinfo)=registry_getanytype();}
6087 /* Line 1464 of skeleton.m4 */
6088 #line 2691 "parser.y"
6089 {(yyval.classinfo)=registry_getanytype();}
6098 /* Line 1464 of skeleton.m4 */
6099 #line 2700 "parser.y"
6100 {(yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
6109 /* Line 1464 of skeleton.m4 */
6110 #line 2701 "parser.y"
6111 {(yyval.classinfo)=0;}
6120 /* Line 1464 of skeleton.m4 */
6121 #line 2705 "parser.y"
6122 {(yyval.value_list).cc=0;(yyval.value_list).len=0;}
6131 /* Line 1464 of skeleton.m4 */
6132 #line 2706 "parser.y"
6133 {(yyval.value_list)=(yyvsp[(2) - (3)].value_list);}
6142 /* Line 1464 of skeleton.m4 */
6143 #line 2708 "parser.y"
6144 {(yyval.value_list).cc=0;(yyval.value_list).len=0;}
6153 /* Line 1464 of skeleton.m4 */
6154 #line 2712 "parser.y"
6155 {(yyval.value_list).len=1;
6156 (yyval.value_list).cc = (yyvsp[(1) - (1)].value).c;
6166 /* Line 1464 of skeleton.m4 */
6167 #line 2716 "parser.y"
6168 {(yyval.value_list) = (yyvsp[(1) - (2)].value_list);}
6177 /* Line 1464 of skeleton.m4 */
6178 #line 2717 "parser.y"
6180 (yyval.value_list).len= (yyvsp[(1) - (2)].value_list).len+1;
6181 (yyval.value_list).cc = code_append((yyvsp[(1) - (2)].value_list).cc, (yyvsp[(2) - (2)].value).c);
6191 /* Line 1464 of skeleton.m4 */
6192 #line 2723 "parser.y"
6194 (yyval.value).c = (yyvsp[(2) - (4)].value).c;
6195 if((yyval.value).c->opcode == OPCODE_COERCE_A) (yyval.value).c = code_cutlast((yyval.value).c);
6197 code_t*paramcode = (yyvsp[(4) - (4)].value_list).cc;
6198 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6199 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6200 (yyval.value).c = code_cutlast((yyval.value).c);
6201 (yyval.value).c = code_append((yyval.value).c, paramcode);
6202 (yyval.value).c = abc_constructprop2((yyval.value).c, name, (yyvsp[(4) - (4)].value_list).len);
6203 multiname_destroy(name);
6204 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
6205 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6206 trait_t*t = traits_find_slotid(state->cls->abc->traits,slot);//FIXME
6207 multiname_t*name = t->name;
6208 (yyval.value).c = code_cutlast((yyval.value).c);
6209 (yyval.value).c = code_append((yyval.value).c, paramcode);
6210 (yyval.value).c = abc_constructprop2((yyval.value).c, name, (yyvsp[(4) - (4)].value_list).len);
6212 (yyval.value).c = code_append((yyval.value).c, paramcode);
6213 (yyval.value).c = abc_construct((yyval.value).c, (yyvsp[(4) - (4)].value_list).len);
6216 (yyval.value).t = TYPE_ANY;
6217 if(TYPE_IS_CLASS((yyvsp[(2) - (4)].value).t) && (yyvsp[(2) - (4)].value).t->data) {
6218 (yyval.value).t = (yyvsp[(2) - (4)].value).t->data;
6220 (yyval.value).c = abc_coerce_a((yyval.value).c);
6221 (yyval.value).t = TYPE_ANY;
6232 /* Line 1464 of skeleton.m4 */
6233 #line 2759 "parser.y"
6236 (yyval.value).c = (yyvsp[(1) - (4)].value).c;
6237 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
6238 (yyval.value).c = code_cutlast((yyval.value).c);
6240 code_t*paramcode = (yyvsp[(3) - (4)].value_list).cc;
6242 (yyval.value).t = TYPE_ANY;
6243 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6244 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6245 (yyval.value).c = code_cutlast((yyval.value).c);
6246 (yyval.value).c = code_append((yyval.value).c, paramcode);
6247 (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).len);
6248 multiname_destroy(name);
6249 } else if((yyval.value).c->opcode == OPCODE_GETSLOT && (yyval.value).c->prev->opcode != OPCODE_GETSCOPEOBJECT) {
6250 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6251 trait_t*t = traits_find_slotid(state->cls->abc->traits,slot);
6252 if(t->kind!=TRAIT_METHOD) {
6253 //ok: flash allows to assign closures to members.
6255 multiname_t*name = t->name;
6256 (yyval.value).c = code_cutlast((yyval.value).c);
6257 (yyval.value).c = code_append((yyval.value).c, paramcode);
6258 //$$.c = abc_callmethod($$.c, t->method, len); //#1051 illegal early access binding
6259 (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).len);
6260 } else if((yyval.value).c->opcode == OPCODE_GETSUPER) {
6261 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6262 (yyval.value).c = code_cutlast((yyval.value).c);
6263 (yyval.value).c = code_append((yyval.value).c, paramcode);
6264 (yyval.value).c = abc_callsuper2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).len);
6265 multiname_destroy(name);
6267 (yyval.value).c = abc_getglobalscope((yyval.value).c);
6268 (yyval.value).c = code_append((yyval.value).c, paramcode);
6269 (yyval.value).c = abc_call((yyval.value).c, (yyvsp[(3) - (4)].value_list).len);
6272 if(TYPE_IS_FUNCTION((yyvsp[(1) - (4)].value).t) && (yyvsp[(1) - (4)].value).t->data) {
6273 (yyval.value).t = ((methodinfo_t*)((yyvsp[(1) - (4)].value).t->data))->return_type;
6275 (yyval.value).c = abc_coerce_a((yyval.value).c);
6276 (yyval.value).t = TYPE_ANY;
6287 /* Line 1464 of skeleton.m4 */
6288 #line 2805 "parser.y"
6290 if(!state->cls) syntaxerror("super() not allowed outside of a class");
6291 if(!state->method) syntaxerror("super() not allowed outside of a function");
6292 if(!state->method->is_constructor) syntaxerror("super() not allowed outside of a constructor");
6294 (yyval.value).c = code_new();
6295 (yyval.value).c = abc_getlocal_0((yyval.value).c);
6297 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value_list).cc);
6299 this is dependent on the control path, check this somewhere else
6300 if(state->method->has_super)
6301 syntaxerror("constructor may call super() only once");
6303 state->method->has_super = 1;
6305 (yyval.value).c = abc_constructsuper((yyval.value).c, (yyvsp[(3) - (4)].value_list).len);
6306 (yyval.value).c = abc_pushundefined((yyval.value).c);
6307 (yyval.value).t = TYPE_ANY;
6317 /* Line 1464 of skeleton.m4 */
6318 #line 2826 "parser.y"
6320 (yyval.value).c = (yyvsp[(2) - (2)].value).c;
6321 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
6322 (yyval.value).c = code_cutlast((yyval.value).c);
6324 multiname_t*name = 0;
6325 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6326 (yyval.value).c->opcode = OPCODE_DELETEPROPERTY;
6327 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
6328 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6329 multiname_t*name = traits_find_slotid(state->cls->abc->traits,slot)->name;
6330 (yyval.value).c = code_cutlast((yyval.value).c);
6331 (yyval.value).c = abc_deleteproperty2((yyval.value).c, name);
6333 (yyval.value).c = abc_getlocal_0((yyval.value).c);
6334 MULTINAME_LATE(m, (yyvsp[(2) - (2)].value).t?(yyvsp[(2) - (2)].value).t->access:ACCESS_PACKAGE, "");
6335 (yyval.value).c = abc_deleteproperty2((yyval.value).c, &m);
6337 (yyval.value).t = TYPE_BOOLEAN;
6347 /* Line 1464 of skeleton.m4 */
6348 #line 2847 "parser.y"
6350 (yyval.code) = abc_returnvoid(0);
6360 /* Line 1464 of skeleton.m4 */
6361 #line 2850 "parser.y"
6363 (yyval.code) = (yyvsp[(2) - (2)].value).c;
6364 (yyval.code) = abc_returnvalue((yyval.code));
6374 /* Line 1464 of skeleton.m4 */
6375 #line 2857 "parser.y"
6376 {(yyval.value)=(yyvsp[(1) - (1)].value);}
6385 /* Line 1464 of skeleton.m4 */
6386 #line 2858 "parser.y"
6387 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6396 /* Line 1464 of skeleton.m4 */
6397 #line 2859 "parser.y"
6399 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
6400 (yyval.value).c = cut_last_push((yyval.value).c);
6401 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
6402 (yyval.value).t = (yyvsp[(3) - (3)].value).t;
6412 /* Line 1464 of skeleton.m4 */
6413 #line 2865 "parser.y"
6415 (yyval.code)=cut_last_push((yyvsp[(1) - (1)].value).c);
6425 /* Line 1464 of skeleton.m4 */
6426 #line 2871 "parser.y"
6427 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6436 /* Line 1464 of skeleton.m4 */
6437 #line 2875 "parser.y"
6438 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6447 /* Line 1464 of skeleton.m4 */
6448 #line 2877 "parser.y"
6449 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6458 /* Line 1464 of skeleton.m4 */
6459 #line 2879 "parser.y"
6460 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6469 /* Line 1464 of skeleton.m4 */
6470 #line 2883 "parser.y"
6472 (yyval.value).c = 0;
6473 namespace_t ns = {ACCESS_PACKAGE, ""};
6474 multiname_t m = {QNAME, &ns, 0, "RegExp"};
6475 if(!(yyvsp[(1) - (1)].regexp).options) {
6476 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
6477 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).pattern);
6478 (yyval.value).c = abc_construct((yyval.value).c, 1);
6480 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
6481 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).pattern);
6482 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).options);
6483 (yyval.value).c = abc_construct((yyval.value).c, 2);
6485 (yyval.value).t = TYPE_REGEXP;
6495 /* Line 1464 of skeleton.m4 */
6496 #line 2900 "parser.y"
6497 {(yyval.value).c = abc_pushbyte(0, (yyvsp[(1) - (1)].number_uint));
6498 //MULTINAME(m, registry_getintclass());
6499 //$$.c = abc_coerce2($$.c, &m); // FIXME
6500 (yyval.value).t = TYPE_INT;
6510 /* Line 1464 of skeleton.m4 */
6511 #line 2905 "parser.y"
6512 {(yyval.value).c = abc_pushshort(0, (yyvsp[(1) - (1)].number_uint));
6513 (yyval.value).t = TYPE_INT;
6523 /* Line 1464 of skeleton.m4 */
6524 #line 2908 "parser.y"
6525 {(yyval.value).c = abc_pushint(0, (yyvsp[(1) - (1)].number_int));
6526 (yyval.value).t = TYPE_INT;
6536 /* Line 1464 of skeleton.m4 */
6537 #line 2911 "parser.y"
6538 {(yyval.value).c = abc_pushuint(0, (yyvsp[(1) - (1)].number_uint));
6539 (yyval.value).t = TYPE_UINT;
6549 /* Line 1464 of skeleton.m4 */
6550 #line 2914 "parser.y"
6551 {(yyval.value).c = abc_pushdouble(0, (yyvsp[(1) - (1)].number_float));
6552 (yyval.value).t = TYPE_FLOAT;
6562 /* Line 1464 of skeleton.m4 */
6563 #line 2917 "parser.y"
6564 {(yyval.value).c = abc_pushstring2(0, &(yyvsp[(1) - (1)].str));free((char*)(yyvsp[(1) - (1)].str).str);
6565 (yyval.value).t = TYPE_STRING;
6575 /* Line 1464 of skeleton.m4 */
6576 #line 2920 "parser.y"
6577 {(yyval.value).c = abc_pushundefined(0);
6578 (yyval.value).t = TYPE_ANY;
6588 /* Line 1464 of skeleton.m4 */
6589 #line 2923 "parser.y"
6590 {(yyval.value).c = abc_pushtrue(0);
6591 (yyval.value).t = TYPE_BOOLEAN;
6601 /* Line 1464 of skeleton.m4 */
6602 #line 2926 "parser.y"
6603 {(yyval.value).c = abc_pushfalse(0);
6604 (yyval.value).t = TYPE_BOOLEAN;
6614 /* Line 1464 of skeleton.m4 */
6615 #line 2929 "parser.y"
6616 {(yyval.value).c = abc_pushnull(0);
6617 (yyval.value).t = TYPE_NULL;
6627 /* Line 1464 of skeleton.m4 */
6628 #line 2933 "parser.y"
6629 {(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);
6630 (yyval.value).t = TYPE_BOOLEAN;
6640 /* Line 1464 of skeleton.m4 */
6641 #line 2936 "parser.y"
6642 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterthan((yyval.value).c);
6643 (yyval.value).t = TYPE_BOOLEAN;
6653 /* Line 1464 of skeleton.m4 */
6654 #line 2939 "parser.y"
6655 {(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);
6656 (yyval.value).t = TYPE_BOOLEAN;
6666 /* Line 1464 of skeleton.m4 */
6667 #line 2942 "parser.y"
6668 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterequals((yyval.value).c);
6669 (yyval.value).t = TYPE_BOOLEAN;
6679 /* Line 1464 of skeleton.m4 */
6680 #line 2945 "parser.y"
6681 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_equals((yyval.value).c);
6682 (yyval.value).t = TYPE_BOOLEAN;
6692 /* Line 1464 of skeleton.m4 */
6693 #line 2948 "parser.y"
6694 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_strictequals((yyval.value).c);
6695 (yyval.value).t = TYPE_BOOLEAN;
6705 /* Line 1464 of skeleton.m4 */
6706 #line 2951 "parser.y"
6707 {(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);
6708 (yyval.value).t = TYPE_BOOLEAN;
6718 /* Line 1464 of skeleton.m4 */
6719 #line 2954 "parser.y"
6720 {(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);
6721 (yyval.value).t = TYPE_BOOLEAN;
6731 /* Line 1464 of skeleton.m4 */
6732 #line 2958 "parser.y"
6733 {(yyval.value).t = join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'O');
6734 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
6735 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(1) - (3)].value).t, (yyval.value).t);
6736 (yyval.value).c = abc_dup((yyval.value).c);
6737 code_t*jmp = (yyval.value).c = abc_iftrue((yyval.value).c, 0);
6738 (yyval.value).c = cut_last_push((yyval.value).c);
6739 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
6740 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (3)].value).t, (yyval.value).t);
6741 code_t*label = (yyval.value).c = abc_label((yyval.value).c);
6742 jmp->branch = label;
6752 /* Line 1464 of skeleton.m4 */
6753 #line 2969 "parser.y"
6755 (yyval.value).t = join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'A');
6756 /*printf("%08x:\n",$1.t);
6757 code_dump($1.c, 0, 0, "", stdout);
6758 printf("%08x:\n",$3.t);
6759 code_dump($3.c, 0, 0, "", stdout);
6760 printf("joining %08x and %08x to %08x\n", $1.t, $3.t, $$.t);*/
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_iffalse((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 2987 "parser.y"
6781 {(yyval.value).c=(yyvsp[(2) - (2)].value).c;
6782 (yyval.value).c = abc_not((yyval.value).c);
6783 (yyval.value).t = TYPE_BOOLEAN;
6793 /* Line 1464 of skeleton.m4 */
6794 #line 2992 "parser.y"
6795 {(yyval.value).c=(yyvsp[(2) - (2)].value).c;
6796 (yyval.value).c = abc_bitnot((yyval.value).c);
6797 (yyval.value).t = TYPE_INT;
6807 /* Line 1464 of skeleton.m4 */
6808 #line 2997 "parser.y"
6809 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6810 (yyval.value).c = abc_bitand((yyval.value).c);
6811 (yyval.value).t = TYPE_INT;
6821 /* Line 1464 of skeleton.m4 */
6822 #line 3002 "parser.y"
6823 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6824 (yyval.value).c = abc_bitxor((yyval.value).c);
6825 (yyval.value).t = TYPE_INT;
6835 /* Line 1464 of skeleton.m4 */
6836 #line 3007 "parser.y"
6837 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6838 (yyval.value).c = abc_bitor((yyval.value).c);
6839 (yyval.value).t = TYPE_INT;
6849 /* Line 1464 of skeleton.m4 */
6850 #line 3012 "parser.y"
6851 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6852 (yyval.value).c = abc_rshift((yyval.value).c);
6853 (yyval.value).t = TYPE_INT;
6863 /* Line 1464 of skeleton.m4 */
6864 #line 3016 "parser.y"
6865 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6866 (yyval.value).c = abc_urshift((yyval.value).c);
6867 (yyval.value).t = TYPE_INT;
6877 /* Line 1464 of skeleton.m4 */
6878 #line 3020 "parser.y"
6879 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6880 (yyval.value).c = abc_lshift((yyval.value).c);
6881 (yyval.value).t = TYPE_INT;
6891 /* Line 1464 of skeleton.m4 */
6892 #line 3025 "parser.y"
6893 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6894 (yyval.value).c = abc_divide((yyval.value).c);
6895 (yyval.value).t = TYPE_NUMBER;
6905 /* Line 1464 of skeleton.m4 */
6906 #line 3029 "parser.y"
6907 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6908 (yyval.value).c = abc_modulo((yyval.value).c);
6909 (yyval.value).t = TYPE_NUMBER;
6919 /* Line 1464 of skeleton.m4 */
6920 #line 3033 "parser.y"
6921 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6922 if(BOTH_INT((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t)) {
6923 (yyval.value).c = abc_add_i((yyval.value).c);
6924 (yyval.value).t = TYPE_INT;
6926 (yyval.value).c = abc_add((yyval.value).c);
6927 (yyval.value).t = join_types((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t,'+');
6938 /* Line 1464 of skeleton.m4 */
6939 #line 3042 "parser.y"
6940 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6941 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
6942 (yyval.value).c = abc_subtract_i((yyval.value).c);
6943 (yyval.value).t = TYPE_INT;
6945 (yyval.value).c = abc_subtract((yyval.value).c);
6946 (yyval.value).t = TYPE_NUMBER;
6957 /* Line 1464 of skeleton.m4 */
6958 #line 3051 "parser.y"
6959 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6960 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
6961 (yyval.value).c = abc_multiply_i((yyval.value).c);
6962 (yyval.value).t = TYPE_INT;
6964 (yyval.value).c = abc_multiply((yyval.value).c);
6965 (yyval.value).t = TYPE_NUMBER;
6976 /* Line 1464 of skeleton.m4 */
6977 #line 3061 "parser.y"
6978 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6979 (yyval.value).c = abc_in((yyval.value).c);
6980 (yyval.value).t = TYPE_BOOLEAN;
6990 /* Line 1464 of skeleton.m4 */
6991 #line 3066 "parser.y"
6992 {char use_astype=0; // flash player's astype works differently than astypelate
6993 if(use_astype && TYPE_IS_CLASS((yyvsp[(3) - (3)].value).t) && (yyvsp[(3) - (3)].value).t->data) {
6994 MULTINAME(m, (classinfo_t*)((yyvsp[(3) - (3)].value).t->data));
6995 (yyval.value).c = abc_astype2((yyvsp[(1) - (3)].value).c, &m);
6996 (yyval.value).t = (yyvsp[(3) - (3)].value).t->data;
6998 (yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
6999 (yyval.value).c = abc_astypelate((yyval.value).c);
7000 (yyval.value).t = TYPE_ANY;
7011 /* Line 1464 of skeleton.m4 */
7012 #line 3079 "parser.y"
7013 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
7014 (yyval.value).c = abc_instanceof((yyval.value).c);
7015 (yyval.value).t = TYPE_BOOLEAN;
7025 /* Line 1464 of skeleton.m4 */
7026 #line 3084 "parser.y"
7027 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
7028 (yyval.value).c = abc_istypelate((yyval.value).c);
7029 (yyval.value).t = TYPE_BOOLEAN;
7039 /* Line 1464 of skeleton.m4 */
7040 #line 3089 "parser.y"
7042 (yyval.value).c = (yyvsp[(3) - (4)].value).c;
7043 (yyval.value).c = abc_typeof((yyval.value).c);
7044 (yyval.value).t = TYPE_STRING;
7054 /* Line 1464 of skeleton.m4 */
7055 #line 3095 "parser.y"
7057 (yyval.value).c = cut_last_push((yyvsp[(2) - (2)].value).c);
7058 (yyval.value).c = abc_pushundefined((yyval.value).c);
7059 (yyval.value).t = TYPE_ANY;
7069 /* Line 1464 of skeleton.m4 */
7070 #line 3101 "parser.y"
7071 { (yyval.value).c = abc_pushundefined(0);
7072 (yyval.value).t = TYPE_ANY;
7082 /* Line 1464 of skeleton.m4 */
7083 #line 3105 "parser.y"
7084 {(yyval.value)=(yyvsp[(2) - (3)].value);}
7093 /* Line 1464 of skeleton.m4 */
7094 #line 3107 "parser.y"
7096 (yyval.value)=(yyvsp[(2) - (2)].value);
7097 if(IS_INT((yyvsp[(2) - (2)].value).t)) {
7098 (yyval.value).c=abc_negate_i((yyval.value).c);
7099 (yyval.value).t = TYPE_INT;
7101 (yyval.value).c=abc_negate((yyval.value).c);
7102 (yyval.value).t = TYPE_NUMBER;
7113 /* Line 1464 of skeleton.m4 */
7114 #line 3118 "parser.y"
7116 (yyval.value).c = (yyvsp[(1) - (4)].value).c;
7117 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value).c);
7119 MULTINAME_LATE(m, (yyvsp[(1) - (4)].value).t?(yyvsp[(1) - (4)].value).t->access:ACCESS_PACKAGE, "");
7120 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7121 (yyval.value).t = 0; // array elements have unknown type
7131 /* Line 1464 of skeleton.m4 */
7132 #line 3127 "parser.y"
7134 (yyval.value).c = code_new();
7135 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(2) - (3)].value_list).cc);
7136 (yyval.value).c = abc_newarray((yyval.value).c, (yyvsp[(2) - (3)].value_list).len);
7137 (yyval.value).t = registry_getarrayclass();
7147 /* Line 1464 of skeleton.m4 */
7148 #line 3134 "parser.y"
7149 {(yyval.value_list).cc=0;(yyval.value_list).len=0;}
7158 /* Line 1464 of skeleton.m4 */
7159 #line 3135 "parser.y"
7160 {(yyval.value_list)=(yyvsp[(1) - (1)].value_list);}
7169 /* Line 1464 of skeleton.m4 */
7170 #line 3137 "parser.y"
7172 (yyval.value_list).cc = 0;
7173 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(1) - (3)].value).c);
7174 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (3)].value).c);
7175 (yyval.value_list).len = 2;
7185 /* Line 1464 of skeleton.m4 */
7186 #line 3143 "parser.y"
7188 (yyval.value_list).cc = (yyvsp[(1) - (5)].value_list).cc;
7189 (yyval.value_list).len = (yyvsp[(1) - (5)].value_list).len+2;
7190 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (5)].value).c);
7191 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(5) - (5)].value).c);
7201 /* Line 1464 of skeleton.m4 */
7202 #line 3152 "parser.y"
7204 (yyval.value).c = code_new();
7205 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(2) - (3)].value_list).cc);
7206 (yyval.value).c = abc_newobject((yyval.value).c, (yyvsp[(2) - (3)].value_list).len/2);
7207 (yyval.value).t = registry_getobjectclass();
7217 /* Line 1464 of skeleton.m4 */
7218 #line 3159 "parser.y"
7220 code_t*c = (yyvsp[(3) - (3)].value).c;
7221 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
7222 c=abc_multiply_i(c);
7226 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '*'), (yyvsp[(1) - (3)].value).t);
7227 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7228 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7238 /* Line 1464 of skeleton.m4 */
7239 #line 3171 "parser.y"
7241 code_t*c = abc_modulo((yyvsp[(3) - (3)].value).c);
7242 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '%'), (yyvsp[(1) - (3)].value).t);
7243 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7244 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7254 /* Line 1464 of skeleton.m4 */
7255 #line 3177 "parser.y"
7257 code_t*c = abc_lshift((yyvsp[(3) - (3)].value).c);
7258 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '<'), (yyvsp[(1) - (3)].value).t);
7259 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7260 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7270 /* Line 1464 of skeleton.m4 */
7271 #line 3183 "parser.y"
7273 code_t*c = abc_rshift((yyvsp[(3) - (3)].value).c);
7274 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '>'), (yyvsp[(1) - (3)].value).t);
7275 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7276 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7286 /* Line 1464 of skeleton.m4 */
7287 #line 3189 "parser.y"
7289 code_t*c = abc_urshift((yyvsp[(3) - (3)].value).c);
7290 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'U'), (yyvsp[(1) - (3)].value).t);
7291 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7292 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7302 /* Line 1464 of skeleton.m4 */
7303 #line 3195 "parser.y"
7305 code_t*c = abc_divide((yyvsp[(3) - (3)].value).c);
7306 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '/'), (yyvsp[(1) - (3)].value).t);
7307 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7308 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7318 /* Line 1464 of skeleton.m4 */
7319 #line 3201 "parser.y"
7321 code_t*c = abc_bitor((yyvsp[(3) - (3)].value).c);
7322 c=converttype(c, TYPE_INT, (yyvsp[(1) - (3)].value).t);
7323 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7324 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7334 /* Line 1464 of skeleton.m4 */
7335 #line 3207 "parser.y"
7337 code_t*c = abc_bitxor((yyvsp[(3) - (3)].value).c);
7338 c=converttype(c, TYPE_INT, (yyvsp[(1) - (3)].value).t);
7339 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7340 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7350 /* Line 1464 of skeleton.m4 */
7351 #line 3213 "parser.y"
7353 code_t*c = (yyvsp[(3) - (3)].value).c;
7355 if(TYPE_IS_INT((yyvsp[(1) - (3)].value).t)) {
7359 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '+'), (yyvsp[(1) - (3)].value).t);
7362 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7363 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7373 /* Line 1464 of skeleton.m4 */
7374 #line 3226 "parser.y"
7375 { code_t*c = (yyvsp[(3) - (3)].value).c;
7376 if(TYPE_IS_INT((yyvsp[(1) - (3)].value).t)) {
7377 c=abc_subtract_i(c);
7380 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '-'), (yyvsp[(1) - (3)].value).t);
7383 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7384 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7394 /* Line 1464 of skeleton.m4 */
7395 #line 3237 "parser.y"
7397 c = code_append(c, (yyvsp[(3) - (3)].value).c);
7398 c = converttype(c, (yyvsp[(3) - (3)].value).t, (yyvsp[(1) - (3)].value).t);
7399 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 1, 0);
7400 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7410 /* Line 1464 of skeleton.m4 */
7411 #line 3244 "parser.y"
7413 (yyval.value).t = join_types((yyvsp[(3) - (5)].value).t,(yyvsp[(5) - (5)].value).t,'?');
7414 (yyval.value).c = (yyvsp[(1) - (5)].value).c;
7415 code_t*j1 = (yyval.value).c = abc_iffalse((yyval.value).c, 0);
7416 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (5)].value).c);
7417 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (5)].value).t, (yyval.value).t);
7418 code_t*j2 = (yyval.value).c = abc_jump((yyval.value).c, 0);
7419 (yyval.value).c = j1->branch = abc_label((yyval.value).c);
7420 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(5) - (5)].value).c);
7421 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (5)].value).t, (yyval.value).t);
7422 (yyval.value).c = j2->branch = abc_label((yyval.value).c);
7432 /* Line 1464 of skeleton.m4 */
7433 #line 3257 "parser.y"
7435 classinfo_t*type = (yyvsp[(1) - (2)].value).t;
7436 if((is_getlocal((yyvsp[(1) - (2)].value).c) && TYPE_IS_INT((yyvsp[(1) - (2)].value).t)) || TYPE_IS_NUMBER((yyvsp[(1) - (2)].value).t)) {
7437 int nr = getlocalnr((yyvsp[(1) - (2)].value).c);
7438 code_free((yyvsp[(1) - (2)].value).c);(yyvsp[(1) - (2)].value).c=0;
7439 if(TYPE_IS_INT((yyvsp[(1) - (2)].value).t)) {
7440 (yyval.value).c = abc_getlocal(0, nr);
7441 (yyval.value).c = abc_inclocal_i((yyval.value).c, nr);
7442 } else if(TYPE_IS_NUMBER((yyvsp[(1) - (2)].value).t)) {
7443 (yyval.value).c = abc_getlocal(0, nr);
7444 (yyval.value).c = abc_inclocal((yyval.value).c, nr);
7445 } else syntaxerror("internal error");
7447 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7448 c=abc_increment_i(c);
7454 c=converttype(c, type, (yyvsp[(1) - (2)].value).t);
7455 (yyval.value).c = toreadwrite((yyvsp[(1) - (2)].value).c, c, 0, 1);
7456 (yyval.value).t = (yyvsp[(1) - (2)].value).t;
7467 /* Line 1464 of skeleton.m4 */
7468 #line 3284 "parser.y"
7470 classinfo_t*type = (yyvsp[(1) - (2)].value).t;
7471 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7472 c=abc_decrement_i(c);
7478 c=converttype(c, type, (yyvsp[(1) - (2)].value).t);
7479 (yyval.value).c = toreadwrite((yyvsp[(1) - (2)].value).c, c, 0, 1);
7480 (yyval.value).t = (yyvsp[(1) - (2)].value).t;
7490 /* Line 1464 of skeleton.m4 */
7491 #line 3298 "parser.y"
7493 classinfo_t*type = (yyvsp[(2) - (2)].value).t;
7494 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7495 c=abc_increment_i(c);
7501 c=converttype(c, type, (yyvsp[(2) - (2)].value).t);
7502 (yyval.value).c = toreadwrite((yyvsp[(2) - (2)].value).c, c, 0, 0);
7503 (yyval.value).t = (yyvsp[(2) - (2)].value).t;
7513 /* Line 1464 of skeleton.m4 */
7514 #line 3312 "parser.y"
7516 classinfo_t*type = (yyvsp[(2) - (2)].value).t;
7517 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7518 c=abc_decrement_i(c);
7524 c=converttype(c, type, (yyvsp[(2) - (2)].value).t);
7525 (yyval.value).c = toreadwrite((yyvsp[(2) - (2)].value).c, c, 0, 0);
7526 (yyval.value).t = (yyvsp[(2) - (2)].value).t;
7536 /* Line 1464 of skeleton.m4 */
7537 #line 3327 "parser.y"
7538 { if(!state->cls->info)
7539 syntaxerror("super keyword not allowed outside a class");
7540 classinfo_t*t = state->cls->info->superclass;
7541 if(!t) t = TYPE_OBJECT;
7543 memberinfo_t*f = registry_findmember(t, (yyvsp[(3) - (3)].id), 1);
7544 namespace_t ns = {f->access, ""};
7545 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
7546 (yyval.value).c = 0;
7547 (yyval.value).c = abc_getlocal_0((yyval.value).c);
7548 (yyval.value).c = abc_getsuper2((yyval.value).c, &m);
7549 (yyval.value).t = slotinfo_gettype((slotinfo_t*)f);
7559 /* Line 1464 of skeleton.m4 */
7560 #line 3341 "parser.y"
7563 (yyval.value).c = abc_pushundefined(0);
7564 (yyval.value).t = 0;
7565 as3_warning("ignored @ operator");
7575 /* Line 1464 of skeleton.m4 */
7576 #line 3348 "parser.y"
7578 // child attribute TODO
7579 (yyval.value).c = abc_pushundefined(0);
7580 (yyval.value).t = 0;
7581 as3_warning("ignored .@ operator");
7591 /* Line 1464 of skeleton.m4 */
7592 #line 3355 "parser.y"
7594 // namespace declaration TODO
7595 (yyval.value).c = abc_pushundefined(0);
7596 (yyval.value).t = 0;
7597 as3_warning("ignored :: operator");
7607 /* Line 1464 of skeleton.m4 */
7608 #line 3362 "parser.y"
7611 (yyval.value).c = abc_pushundefined(0);
7612 (yyval.value).t = 0;
7613 as3_warning("ignored .. operator");
7623 /* Line 1464 of skeleton.m4 */
7624 #line 3369 "parser.y"
7627 (yyval.value).c = abc_pushundefined(0);
7628 (yyval.value).t = 0;
7629 as3_warning("ignored .() operator");
7639 /* Line 1464 of skeleton.m4 */
7640 #line 3381 "parser.y"
7641 {(yyval.value).c = (yyvsp[(1) - (3)].value).c;
7642 classinfo_t*t = (yyvsp[(1) - (3)].value).t;
7644 if(TYPE_IS_CLASS(t) && t->data) {
7649 memberinfo_t*f = registry_findmember(t, (yyvsp[(3) - (3)].id), 1);
7651 if(f && !is_static != !(f->flags&FLAG_STATIC))
7653 if(f && f->slot && !noslot) {
7654 (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
7656 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
7657 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7659 /* determine type */
7660 (yyval.value).t = slotinfo_gettype((slotinfo_t*)f);
7661 if(!(yyval.value).t)
7662 (yyval.value).c = abc_coerce_a((yyval.value).c);
7664 /* when resolving a property on an unknown type, we do know the
7665 name of the property (and don't seem to need the package), but
7666 we need to make avm2 try out all access modes */
7667 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(3) - (3)].id)};
7668 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7669 (yyval.value).c = abc_coerce_a((yyval.value).c);
7670 (yyval.value).t = registry_getanytype();
7681 /* Line 1464 of skeleton.m4 */
7682 #line 3414 "parser.y"
7685 /* Queue unresolved identifiers for checking against the parent
7686 function's variables.
7687 We consider everything which is not a local variable "unresolved".
7688 This encompasses class names, members of the surrounding class
7689 etc. which *correct* because local variables of the parent function
7692 if(state->method->inner && !find_variable(state, (yyvsp[(1) - (1)].id))) {
7693 unknown_variable((yyvsp[(1) - (1)].id));
7697 (yyval.value).t = 0;
7698 (yyval.value).c = 0;
7703 /* look at variables */
7704 if((v = find_variable(state, (yyvsp[(1) - (1)].id)))) {
7705 // $1 is a local variable
7706 (yyval.value).c = abc_getlocal((yyval.value).c, v->index);
7707 (yyval.value).t = v->type;
7710 if((v = find_slot(state, (yyvsp[(1) - (1)].id)))) {
7711 (yyval.value).c = abc_getscopeobject((yyval.value).c, 1);
7712 (yyval.value).c = abc_getslot((yyval.value).c, v->index);
7713 (yyval.value).t = v->type;
7717 int i_am_static = (state->method && state->method->info)?(state->method->info->flags&FLAG_STATIC):FLAG_STATIC;
7719 /* look at current class' members */
7720 if(state->cls && (f = registry_findmember(state->cls->info, (yyvsp[(1) - (1)].id), 1)) &&
7721 (f->flags&FLAG_STATIC) >= i_am_static) {
7722 // $1 is a function in this class
7723 int var_is_static = (f->flags&FLAG_STATIC);
7725 if(f->kind == INFOTYPE_METHOD) {
7726 (yyval.value).t = TYPE_FUNCTION(f);
7728 (yyval.value).t = f->type;
7730 if(var_is_static && !i_am_static) {
7731 /* access to a static member from a non-static location.
7732 do this via findpropstrict:
7733 there doesn't seem to be any non-lookup way to access
7734 static properties of a class */
7735 state->method->late_binding = 1;
7736 (yyval.value).t = f->type;
7737 namespace_t ns = {f->access, ""};
7738 multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
7739 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
7740 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7742 } else if(f->slot>0) {
7743 (yyval.value).c = abc_getlocal_0((yyval.value).c);
7744 (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
7747 namespace_t ns = {f->access, ""};
7748 multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
7749 (yyval.value).c = abc_getlocal_0((yyval.value).c);
7750 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7755 /* look at actual classes, in the current package and imported */
7756 if((a = find_class((yyvsp[(1) - (1)].id)))) {
7757 if(a->access == ACCESS_PACKAGEINTERNAL &&
7758 strcmp(a->package, state->package) &&
7759 strcmp(a->package, internal_filename_package)
7761 syntaxerror("Can't access internal %s %s in package '%s' from package '%s'",
7762 infotypename(a),(yyvsp[(1) - (1)].id), a->package, state->package);
7764 if(a->kind != INFOTYPE_CLASS) {
7766 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
7767 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7768 if(a->kind == INFOTYPE_METHOD) {
7769 methodinfo_t*f = (methodinfo_t*)a;
7770 (yyval.value).t = TYPE_FUNCTION(f);
7772 varinfo_t*v = (varinfo_t*)a;
7773 (yyval.value).t = v->type;
7776 classinfo_t*c = (classinfo_t*)a;
7778 (yyval.value).c = abc_getglobalscope((yyval.value).c);
7779 (yyval.value).c = abc_getslot((yyval.value).c, c->slot);
7782 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
7784 (yyval.value).t = TYPE_CLASS(c);
7789 /* unknown object, let the avm2 resolve it */
7791 as3_softwarning("Couldn't resolve '%s', doing late binding", (yyvsp[(1) - (1)].id));
7792 state->method->late_binding = 1;
7794 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(1) - (1)].id)};
7796 (yyval.value).t = 0;
7797 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
7798 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7809 /* Line 1464 of skeleton.m4 */
7810 #line 3535 "parser.y"
7820 /* Line 1464 of skeleton.m4 */
7821 #line 3536 "parser.y"
7831 /* Line 1464 of skeleton.m4 */
7832 #line 3537 "parser.y"
7842 /* Line 1464 of skeleton.m4 */
7843 #line 3539 "parser.y"
7846 tokenizer_register_namespace((yyvsp[(3) - (3)].id));
7855 /* Line 1464 of skeleton.m4 */
7856 #line 7857 "parser.tab.c"
7859 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
7863 YY_STACK_PRINT (yyss, yyssp);
7867 /* Now `shift' the result of the reduction. Determine what state
7868 that goes to, based on the state we popped back to and the rule
7869 number reduced by. */
7873 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
7874 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
7875 yystate = yytable[yystate];
7877 yystate = yydefgoto[yyn - YYNTOKENS];
7882 /*------------------------------------.
7883 | yyerrlab -- here on detecting error |
7884 `------------------------------------*/
7886 /* If not already recovering from an error, report this error. */
7890 #if ! YYERROR_VERBOSE
7891 yyerror (YY_("syntax error"));
7894 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
7895 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
7897 YYSIZE_T yyalloc = 2 * yysize;
7898 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
7899 yyalloc = YYSTACK_ALLOC_MAXIMUM;
7900 if (yymsg != yymsgbuf)
7901 YYSTACK_FREE (yymsg);
7902 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
7904 yymsg_alloc = yyalloc;
7908 yymsg_alloc = sizeof yymsgbuf;
7912 if (0 < yysize && yysize <= yymsg_alloc)
7914 (void) yysyntax_error (yymsg, yystate, yychar);
7919 yyerror (YY_("syntax error"));
7921 goto yyexhaustedlab;
7929 if (yyerrstatus == 3)
7931 /* If just tried and failed to reuse lookahead token after an
7932 error, discard it. */
7934 if (yychar <= YYEOF)
7936 /* Return failure if at end of input. */
7937 if (yychar == YYEOF)
7942 yydestruct ("Error: discarding",
7948 /* Else will try to reuse lookahead token after shifting the error
7953 /*---------------------------------------------------.
7954 | yyerrorlab -- error raised explicitly by YYERROR. |
7955 `---------------------------------------------------*/
7958 /* Pacify compilers like GCC when the user code never invokes
7959 YYERROR and the label yyerrorlab therefore never appears in user
7961 if (/*CONSTCOND*/ 0)
7964 /* Do not reclaim the symbols of the rule which action triggered
7968 YY_STACK_PRINT (yyss, yyssp);
7973 /*-------------------------------------------------------------.
7974 | yyerrlab1 -- common code for both syntax error and YYERROR. |
7975 `-------------------------------------------------------------*/
7977 yyerrstatus = 3; /* Each real token shifted decrements this. */
7981 yyn = yypact[yystate];
7982 if (yyn != YYPACT_NINF)
7985 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
7993 /* Pop the current state because it cannot handle the error token. */
7998 yydestruct ("Error: popping",
7999 yystos[yystate], yyvsp);
8002 YY_STACK_PRINT (yyss, yyssp);
8008 /* Shift the error token. */
8009 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
8015 /*-------------------------------------.
8016 | yyacceptlab -- YYACCEPT comes here. |
8017 `-------------------------------------*/
8022 /*-----------------------------------.
8023 | yyabortlab -- YYABORT comes here. |
8024 `-----------------------------------*/
8029 #if !defined(yyoverflow) || YYERROR_VERBOSE
8030 /*-------------------------------------------------.
8031 | yyexhaustedlab -- memory exhaustion comes here. |
8032 `-------------------------------------------------*/
8034 yyerror (YY_("memory exhausted"));
8040 if (yychar != YYEMPTY)
8041 yydestruct ("Cleanup: discarding lookahead",
8043 /* Do not reclaim the symbols of the rule which action triggered
8044 this YYABORT or YYACCEPT. */
8046 YY_STACK_PRINT (yyss, yyssp);
8047 while (yyssp != yyss)
8049 yydestruct ("Cleanup: popping",
8050 yystos[*yyssp], yyvsp);
8055 YYSTACK_FREE (yyss);
8058 if (yymsg != yymsgbuf)
8059 YYSTACK_FREE (yymsg);
8061 /* Make sure YYID is used. */
8062 return YYID (yyresult);