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 avm2_parse
68 #define yylex avm2_lex
69 #define yyerror avm2_error
70 #define yylval avm2_lval
71 #define yychar avm2_char
72 #define yydebug avm2_debug
73 #define yynerrs avm2_nerrs
76 /* Copy the first part of user declarations. */
78 /* Line 198 of skeleton.m4 */
87 #include "tokenizer.h"
94 /* Line 198 of skeleton.m4 */
95 #line 96 "parser.tab.c"
97 /* Enabling traces. */
102 /* Enabling verbose error messages. */
103 #ifdef YYERROR_VERBOSE
104 # undef YYERROR_VERBOSE
105 # define YYERROR_VERBOSE 1
107 # define YYERROR_VERBOSE 1
110 /* Enabling the token table. */
111 #ifndef YYTOKEN_TABLE
112 # define YYTOKEN_TABLE 0
119 /* Put the tokens into the symbol table, so that GDB and other debuggers
214 below_semicolon = 350,
215 below_assignment = 351,
217 minusminus_prefix = 355,
218 plusplus_prefix = 356,
220 above_identifier = 358,
228 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
230 /* Line 223 of skeleton.m4 */
235 /* Line 223 of skeleton.m4 */
238 enum yytokentype token;
241 classinfo_t*classinfo;
242 classinfo_list_t*classinfo_list;
245 unsigned int number_uint;
249 //typedcode_list_t*value_list;
250 codeandnumber_t value_list;
256 for_start_t for_start;
257 abc_exception_t *exception;
260 abc_exception_list_t *l;
266 /* Line 223 of skeleton.m4 */
267 #line 268 "parser.tab.c"
269 # define YYSTYPE_IS_TRIVIAL 1
270 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
271 # define YYSTYPE_IS_DECLARED 1
275 /* Copy the second part of user declarations. */
277 /* Line 273 of skeleton.m4 */
281 static int yyerror(char*s)
283 syntaxerror("%s", s);
284 return 0; //make gcc happy
287 static char* concat2(const char* t1, const char* t2)
291 char*text = malloc(l1+l2+1);
292 memcpy(text , t1, l1);
293 memcpy(text+l1, t2, l2);
297 static char* concat3(const char* t1, const char* t2, const char* t3)
302 char*text = malloc(l1+l2+l3+1);
303 memcpy(text , t1, l1);
304 memcpy(text+l1, t2, l2);
305 memcpy(text+l1+l2, t3, l3);
310 typedef struct _import {
314 DECLARE_LIST(import);
316 typedef struct _classstate {
322 char has_constructor;
325 typedef struct _methodstate {
333 abc_exception_list_t*exceptions;
336 typedef struct _state {
341 import_list_t*wildcard_imports;
343 char has_own_imports;
346 methodstate_t*method;
353 typedef struct _global {
360 static global_t*global = 0;
361 static state_t* state = 0;
365 #define MULTINAME(m,x) \
368 registry_fill_multiname(&m, &m##_ns, x);
370 #define MEMBER_MULTINAME(m,f,n) \
374 m##_ns = flags2namespace(f->flags, ""); \
377 m.namespace_set = 0; \
380 m.type = MULTINAME; \
382 m.namespace_set = &nopackage_namespace_set; \
386 /* warning: list length of namespace set is undefined */
387 #define MULTINAME_LATE(m, access, package) \
388 namespace_t m##_ns = {access, package}; \
389 namespace_set_t m##_nsset; \
390 namespace_list_t m##_l;m##_l.next = 0; \
391 m##_nsset.namespaces = &m##_l; \
392 m##_nsset = m##_nsset; \
393 m##_l.namespace = &m##_ns; \
394 multiname_t m = {MULTINAMEL, 0, &m##_nsset, 0};
396 static namespace_t ns1 = {ACCESS_PRIVATE, ""};
397 static namespace_t ns2 = {ACCESS_PROTECTED, ""};
398 static namespace_t ns3 = {ACCESS_PACKAGEINTERNAL, ""};
399 static namespace_t ns4 = {ACCESS_PACKAGE, ""};
400 static namespace_list_t nl4 = {&ns4,0};
401 static namespace_list_t nl3 = {&ns3,&nl4};
402 static namespace_list_t nl2 = {&ns2,&nl3};
403 static namespace_list_t nl1 = {&ns1,&nl2};
404 static namespace_set_t nopackage_namespace_set = {&nl1};
406 static void new_state()
409 state_t*oldstate = state;
411 memcpy(s, state, sizeof(state_t)); //shallow copy
413 s->imports = dict_new();
417 state->has_own_imports = 0;
418 state->vars = dict_new();
419 state->old = oldstate;
421 static void state_has_imports()
423 state->wildcard_imports = list_clone(state->wildcard_imports);
424 state->imports = dict_clone(state->imports);
425 state->has_own_imports = 1;
428 static void state_destroy(state_t*state)
430 if(state->has_own_imports) {
431 list_free(state->wildcard_imports);
432 dict_destroy(state->imports);state->imports=0;
434 if(state->imports && (!state->old || state->old->imports!=state->imports)) {
435 dict_destroy(state->imports);state->imports=0;
439 for(t=0;t<state->vars->hashsize;t++) {
440 dictentry_t*e =state->vars->slots[t];
442 free(e->data);e->data=0;
446 dict_destroy(state->vars);state->vars=0;
452 static void old_state()
454 if(!state || !state->old)
455 syntaxerror("invalid nesting");
456 state_t*leaving = state;
460 if(leaving->method && leaving->method != state->method) {
461 free(leaving->method);
464 if(leaving->cls && leaving->cls != state->cls) {
469 state_destroy(leaving);
472 void initialize_parser()
474 global = rfx_calloc(sizeof(global_t));
475 global->file = abc_file_new();
476 global->file->flags &= ~ABCFILE_LAZY;
477 global->variable_count = 1;
478 global->init = abc_initscript(global->file);
479 code_t*c = global->init->method->body->code;
480 c = abc_getlocal_0(c);
481 c = abc_pushscope(c);
482 /*c = abc_findpropstrict(c, "[package]::trace");
483 c = abc_pushstring(c, "[entering global init function]");
484 c = abc_callpropvoid(c, "[package]::trace", 1);*/
485 global->init->method->body->code = c;
488 void initialize_file(char*filename)
491 state->package = filename;
492 // needed for state->method->late_binding:
493 state->method = rfx_calloc(sizeof(methodstate_t));
497 if(!state || state->level!=1) {
498 syntaxerror("unexpected end of file");
500 state_destroy(state);state=0;
503 void* finish_parser()
505 code_t*c = global->init->method->body->code;
506 /*c = abc_findpropstrict(c, "[package]::trace");
507 c = abc_pushstring(c, "[leaving global init function]");
508 c = abc_callpropvoid(c, "[package]::trace", 1);*/
509 c = abc_returnvoid(c);
510 global->init->method->body->code = c;
515 static void xx_scopetest()
517 /* findpropstrict doesn't just return a scope object- it
518 also makes it "active" somehow. Push local_0 on the
519 scope stack and read it back with findpropstrict, it'll
520 contain properties like "trace". Trying to find the same
521 property on a "vanilla" local_0 yields only a "undefined" */
522 //c = abc_findpropstrict(c, "[package]::trace");
524 /*c = abc_getlocal_0(c);
525 c = abc_findpropstrict(c, "[package]::trace");
527 c = abc_setlocal_1(c);
529 c = abc_pushbyte(c, 0);
530 c = abc_setlocal_2(c);
532 code_t*xx = c = abc_label(c);
533 c = abc_findpropstrict(c, "[package]::trace");
534 c = abc_pushstring(c, "prop:");
535 c = abc_hasnext2(c, 1, 2);
537 c = abc_setlocal_3(c);
538 c = abc_callpropvoid(c, "[package]::trace", 2);
539 c = abc_getlocal_3(c);
541 c = abc_iftrue(c,xx);*/
545 typedef struct _variable {
551 static variable_t* find_variable(char*name)
557 v = dict_lookup(s->vars, name);
565 static variable_t* find_variable_safe(char*name)
567 variable_t* v = find_variable(name);
569 syntaxerror("undefined variable: %s", name);
572 static char variable_exists(char*name)
574 return dict_lookup(state->vars, name)!=0;
576 code_t*defaultvalue(code_t*c, classinfo_t*type);
577 static int new_variable(char*name, classinfo_t*type, char init)
580 v->index = global->variable_count;
584 dict_put(state->vars, name, v);
586 return global->variable_count++;
588 #define TEMPVARNAME "__as3_temp__"
589 static int gettempvar()
591 variable_t*v = find_variable(TEMPVARNAME);
594 return new_variable(TEMPVARNAME, 0, 0);
597 code_t* var_block(code_t*body)
603 for(t=0;t<state->vars->hashsize;t++) {
604 dictentry_t*e = state->vars->slots[t];
606 variable_t*v = (variable_t*)e->data;
607 if(v->type && v->init) {
608 c = defaultvalue(c, v->type);
609 c = abc_setlocal(c, v->index);
610 k = abc_kill(k, v->index);
620 if(x->opcode== OPCODE___BREAK__ ||
621 x->opcode== OPCODE___CONTINUE__) {
622 /* link kill code before break/continue */
623 code_t*e = code_dup(k);
624 code_t*s = code_start(e);
636 c = code_append(c, body);
637 c = code_append(c, k);
641 static code_t* wrap_function(code_t*c,code_t*header, code_t*body)
643 c = code_append(c, header);
644 c = code_append(c, var_block(body));
645 /* append return if necessary */
646 if(!c || (c->opcode != OPCODE_RETURNVOID &&
647 c->opcode != OPCODE_RETURNVALUE)) {
648 c = abc_returnvoid(c);
654 static void startpackage(char*name)
657 /*printf("entering package \"%s\"\n", name);*/
658 state->package = strdup(name);
659 global->variable_count = 1;
661 static void endpackage()
663 /*printf("leaving package \"%s\"\n", state->package);*/
665 //used e.g. in classinfo_register:
666 //free(state->package);state->package=0;
671 void parserassert(int b)
673 if(!b) syntaxerror("internal error: assertion failed");
677 char*as3_globalclass=0;
678 static void startclass(int flags, char*classname, classinfo_t*extends, classinfo_list_t*implements, char interface)
681 syntaxerror("inner classes now allowed");
684 global->variable_count = 1;
685 state->cls = rfx_calloc(sizeof(classstate_t));
686 state->method = rfx_calloc(sizeof(methodstate_t)); // method state, for static constructor
689 classinfo_list_t*mlist=0;
691 if(flags&~(FLAG_PACKAGEINTERNAL|FLAG_PUBLIC|FLAG_FINAL|FLAG_DYNAMIC))
692 syntaxerror("invalid modifier(s)");
694 if((flags&(FLAG_PUBLIC|FLAG_PACKAGEINTERNAL)) == (FLAG_PUBLIC|FLAG_PACKAGEINTERNAL))
695 syntaxerror("public and internal not supported at the same time.");
697 /* create the class name, together with the proper attributes */
701 if(!(flags&FLAG_PUBLIC) && !state->package) {
702 access = ACCESS_PRIVATE; package = current_filename;
703 } else if(!(flags&FLAG_PUBLIC) && state->package) {
704 access = ACCESS_PACKAGEINTERNAL; package = state->package;
705 } else if(state->package) {
706 access = ACCESS_PACKAGE; package = state->package;
708 syntaxerror("public classes only allowed inside a package");
712 if(registry_findclass(package, classname)) {
713 syntaxerror("Package \"%s\" already contains a class called \"%s\"", package, classname);
715 /* build info struct */
716 int num_interfaces = (list_length(implements));
717 state->cls->info = classinfo_register(access, package, classname, num_interfaces);
721 state->cls->info = registry_findclass(package, classname);
722 parserassert((int)state->cls->info);
724 /* fill out interfaces and extends (we couldn't resolve those during the first pass) */
725 state->cls->info->superclass = extends?extends:TYPE_OBJECT;
727 classinfo_list_t*l = implements;
728 for(l=implements;l;l=l->next) {
729 state->cls->info->interfaces[pos++] = l->classinfo;
732 /* generate the abc code for this class */
733 MULTINAME(classname2,state->cls->info);
734 multiname_t*extends2 = sig2mname(extends);
736 state->cls->abc = abc_class_new(global->file, &classname2, extends2);
737 if(flags&FLAG_FINAL) abc_class_final(state->cls->abc);
738 if(!(flags&FLAG_DYNAMIC)) abc_class_sealed(state->cls->abc);
740 state->cls->info->flags |= CLASS_INTERFACE;
741 abc_class_interface(state->cls->abc);
744 abc_class_protectedNS(state->cls->abc, classname);
746 for(mlist=implements;mlist;mlist=mlist->next) {
747 MULTINAME(m, mlist->classinfo);
748 abc_class_add_interface(state->cls->abc, &m);
751 /* write the construction code for this class to the global init
753 int slotindex = abc_initscript_addClassTrait(global->init, &classname2, state->cls->abc);
755 abc_method_body_t*m = global->init->method->body;
756 __ getglobalscope(m);
757 classinfo_t*s = extends;
762 //TODO: take a look at the current scope stack, maybe
763 // we can re-use something
768 multiname_t*s2 = sig2mname(s);
770 multiname_destroy(s2);
772 __ pushscope(m); count++;
773 m->code = m->code->prev->prev; // invert
775 /* continue appending after last op end */
776 while(m->code && m->code->next) m->code = m->code->next;
778 /* TODO: if this is one of *our* classes, we can also
779 do a getglobalscope/getslot <nr> (which references
780 the init function's slots) */
782 __ getlex2(m, extends2);
784 /* notice: we get a Verify Error #1107 if the top elemnt on the scope
785 stack is not the superclass */
786 __ pushscope(m);count++;
789 /* notice: we get a verify error #1107 if the top element on the scope
790 stack is not the global object */
792 __ pushscope(m);count++;
794 __ newclass(m,state->cls->abc);
798 __ setslot(m, slotindex);
799 multiname_destroy(extends2);
801 /* flash.display.MovieClip handling */
803 if(!as3_globalclass && (flags&FLAG_PUBLIC) && classinfo_equals(registry_getMovieClip(),extends)) {
804 if(state->package && state->package[0]) {
805 as3_globalclass = concat3(state->package, ".", classname);
807 as3_globalclass = strdup(classname);
813 static void endclass()
816 if(!state->cls->has_constructor && !(state->cls->info->flags&CLASS_INTERFACE)) {
818 c = abc_getlocal_0(c);
819 c = abc_constructsuper(c, 0);
820 state->cls->init = code_append(state->cls->init, c);
822 if(!state->method->late_binding) {
823 // class initialization code uses late binding
825 c = abc_getlocal_0(c);
826 c = abc_pushscope(c);
827 state->cls->static_init = code_append(c, state->cls->static_init);
830 if(state->cls->init) {
831 abc_method_t*m = abc_class_getconstructor(state->cls->abc, 0);
832 m->body->code = wrap_function(0, state->cls->init, m->body->code);
834 if(state->cls->static_init) {
835 abc_method_t*m = abc_class_getstaticconstructor(state->cls->abc, 0);
836 m->body->code = wrap_function(0, state->cls->static_init, m->body->code);
843 void check_code_for_break(code_t*c)
846 if(c->opcode == OPCODE___BREAK__) {
847 char*name = string_cstr(c->data[0]);
848 syntaxerror("Unresolved \"break %s\"", name);
850 if(c->opcode == OPCODE___CONTINUE__) {
851 char*name = string_cstr(c->data[0]);
852 syntaxerror("Unresolved \"continue %s\"", name);
859 static void check_constant_against_type(classinfo_t*t, constant_t*c)
861 #define xassert(b) if(!(b)) syntaxerror("Invalid default value %s for type '%s'", constant_tostring(c), t->name)
862 if(TYPE_IS_NUMBER(t)) {
863 xassert(c->type == CONSTANT_FLOAT
864 || c->type == CONSTANT_INT
865 || c->type == CONSTANT_UINT);
866 } else if(TYPE_IS_UINT(t)) {
867 xassert(c->type == CONSTANT_UINT ||
868 (c->type == CONSTANT_INT && c->i>0));
869 } else if(TYPE_IS_INT(t)) {
870 xassert(c->type == CONSTANT_INT);
871 } else if(TYPE_IS_BOOLEAN(t)) {
872 xassert(c->type == CONSTANT_TRUE
873 || c->type == CONSTANT_FALSE);
878 static int flags2access(int flags)
881 if(flags&FLAG_PUBLIC) {
882 if(access&(FLAG_PRIVATE|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
883 syntaxerror("invalid combination of access levels");
884 access = ACCESS_PACKAGE;
885 } else if(flags&FLAG_PRIVATE) {
886 if(access&(FLAG_PUBLIC|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
887 syntaxerror("invalid combination of access levels");
888 access = ACCESS_PRIVATE;
889 } else if(flags&FLAG_PROTECTED) {
890 if(access&(FLAG_PUBLIC|FLAG_PRIVATE|FLAG_PACKAGEINTERNAL))
891 syntaxerror("invalid combination of access levels");
892 access = ACCESS_PROTECTED;
894 access = ACCESS_PACKAGEINTERNAL;
900 static memberinfo_t*registerfunction(enum yytokentype getset, int flags, char*name, params_t*params, classinfo_t*return_type, int slot)
902 memberinfo_t*minfo = 0;
905 minfo = memberinfo_register_global(flags2access(flags), state->package, name, MEMBER_METHOD);
906 minfo->return_type = return_type;
907 } else if(getset != KW_GET && getset != KW_SET) {
909 if((minfo = registry_findmember(state->cls->info, name, 0))) {
910 if(minfo->parent == state->cls->info) {
911 syntaxerror("class already contains a member/method called '%s'", name);
912 } else if(!minfo->parent) {
913 syntaxerror("internal error: overriding method %s, which doesn't have parent", name);
915 if(!(minfo->flags&(FLAG_STATIC|FLAG_PRIVATE)))
916 syntaxerror("function %s already exists in superclass. Did you forget the 'override' keyword?");
919 minfo = memberinfo_register(state->cls->info, name, MEMBER_METHOD);
920 minfo->return_type = return_type;
921 // getslot on a member slot only returns "undefined", so no need
922 // to actually store these
923 //state->minfo->slot = state->method->abc->method->trait->slot_id;
925 //class getter/setter
926 int gs = getset==KW_GET?MEMBER_GET:MEMBER_SET;
930 else if(params->list)
931 type = params->list->param->type;
932 // not sure wether to look into superclasses here, too
933 if((minfo=registry_findmember(state->cls->info, name, 0))) {
934 if(minfo->kind & ~(MEMBER_GET|MEMBER_SET))
935 syntaxerror("class already contains a member or method called '%s'", name);
937 syntaxerror("getter/setter for '%s' already defined", name);
938 /* make a setter or getter into a getset */
943 if(type && minfo->type != type)
944 syntaxerror("different type in getter and setter");
946 minfo = memberinfo_register(state->cls->info, name, gs);
949 /* can't assign a slot as getter and setter might have different slots */
950 //minfo->slot = slot;
952 if(flags&FLAG_STATIC) minfo->flags |= FLAG_STATIC;
953 if(flags&FLAG_PUBLIC) minfo->flags |= FLAG_PUBLIC;
954 if(flags&FLAG_PRIVATE) minfo->flags |= FLAG_PRIVATE;
955 if(flags&FLAG_PROTECTED) minfo->flags |= FLAG_PROTECTED;
956 if(flags&FLAG_PACKAGEINTERNAL) minfo->flags |= FLAG_PACKAGEINTERNAL;
957 if(flags&FLAG_OVERRIDE) minfo->flags |= FLAG_OVERRIDE;
961 static void innerfunction(char*name, params_t*params, classinfo_t*return_type)
963 parserassert(state->method && state->method->info);
964 memberinfo_t*parent_method = state->method->info;
973 state->method = rfx_calloc(sizeof(methodstate_t));
974 state->method->inner = 1;
976 NEW(memberinfo_t,minfo);
977 minfo->return_type = return_type;
980 if(!parent_method->subfunctions)
981 parent_method->subfunctions = dict_new();
983 dict_put(parent_method->subfunctions, name, minfo);
984 state->method->info = minfo;
987 static void startfunction(token_t*ns, int flags, enum yytokentype getset, char*name,
988 params_t*params, classinfo_t*return_type)
990 if(state->method && state->method->info) {
991 syntaxerror("not able to start another method scope");
994 state->method = rfx_calloc(sizeof(methodstate_t));
995 state->method->has_super = 0;
998 state->method->is_constructor = !strcmp(state->cls->info->name,name);
999 state->cls->has_constructor |= state->method->is_constructor;
1001 state->method->is_global = 1;
1002 state->method->late_binding = 1; // for global methods, always push local_0 on the scope stack
1004 if(state->method->is_constructor)
1005 name = "__as3_constructor__";
1009 state->method->info = registerfunction(getset, flags, name, params, return_type, 0);
1013 /* retrieve the member info that we stored in the first pass.
1014 TODO: better getter/setter support? */
1015 if(!state->cls) state->method->info = registry_findclass(state->package, name)->function;
1016 else state->method->info = registry_findmember(state->cls->info, name, 0);
1017 state->method->info->return_type = return_type;
1019 global->variable_count = 0;
1020 /* state->vars is initialized by state_new */
1021 if(!state->method->is_global)
1022 new_variable((flags&FLAG_STATIC)?"class":"this", state->cls->info, 0);
1024 new_variable("globalscope", 0, 0);
1026 for(p=params->list;p;p=p->next) {
1027 new_variable(p->param->name, p->param->type, 0);
1032 static abc_method_t* endfunction(token_t*ns, int flags, enum yytokentype getset, char*name,
1033 params_t*params, classinfo_t*return_type, code_t*body)
1042 multiname_t*type2 = sig2mname(return_type);
1044 if(state->method->inner) {
1045 f = abc_method_new(global->file, type2, 1);
1046 //trait_t*t = trait_new_method(&global->init->traits, 0, f);
1047 } else if(state->method->is_constructor) {
1048 f = abc_class_getconstructor(state->cls->abc, type2);
1049 } else if(!state->method->is_global) {
1050 namespace_t mname_ns = flags2namespace(flags, "");
1051 multiname_t mname = {QNAME, &mname_ns, 0, name};
1053 if(flags&FLAG_STATIC)
1054 f = abc_class_staticmethod(state->cls->abc, type2, &mname);
1056 f = abc_class_method(state->cls->abc, type2, &mname);
1057 slot = f->trait->slot_id;
1059 namespace_t mname_ns = flags2namespace(flags, state->package);
1060 multiname_t mname = {QNAME, &mname_ns, 0, name};
1062 f = abc_method_new(global->file, type2, 1);
1063 trait_t*t = trait_new_method(&global->init->traits, multiname_clone(&mname), f);
1064 //abc_code_t*c = global->init->method->body->code;
1066 //flash doesn't seem to allow us to access function slots
1067 //state->method->info->slot = slot;
1069 if(flags&FLAG_OVERRIDE) f->trait->attributes |= TRAIT_ATTR_OVERRIDE;
1070 if(getset == KW_GET) f->trait->kind = TRAIT_GETTER;
1071 if(getset == KW_SET) f->trait->kind = TRAIT_SETTER;
1072 if(params->varargs) f->flags |= METHOD_NEED_REST;
1076 for(p=params->list;p;p=p->next) {
1077 if(params->varargs && !p->next) {
1078 break; //varargs: omit last parameter in function signature
1080 multiname_t*m = sig2mname(p->param->type);
1081 list_append(f->parameters, m);
1082 if(p->param->value) {
1083 check_constant_against_type(p->param->type, p->param->value);
1084 opt=1;list_append(f->optional_parameters, p->param->value);
1086 syntaxerror("non-optional parameter not allowed after optional parameters");
1089 check_code_for_break(body);
1092 f->body->code = body;
1093 f->body->exceptions = state->method->exceptions;
1094 } else { //interface
1096 syntaxerror("interface methods can't have a method body");
1103 char is_subtype_of(classinfo_t*type, classinfo_t*supertype)
1108 void breakjumpsto(code_t*c, char*name, code_t*jump)
1111 if(c->opcode == OPCODE___BREAK__) {
1112 string_t*name2 = c->data[0];
1113 if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1114 c->opcode = OPCODE_JUMP;
1121 void continuejumpsto(code_t*c, char*name, code_t*jump)
1124 if(c->opcode == OPCODE___CONTINUE__) {
1125 string_t*name2 = c->data[0];
1126 if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1127 c->opcode = OPCODE_JUMP;
1135 #define IS_INT(a) (TYPE_IS_INT((a)) || TYPE_IS_UINT((a)))
1136 #define IS_NUMBER_OR_INT(a) (TYPE_IS_INT((a)) || TYPE_IS_UINT((a)) || TYPE_IS_NUMBER((a)))
1137 #define BOTH_INT(a,b) (IS_INT(a) && IS_INT(b))
1139 classinfo_t*join_types(classinfo_t*type1, classinfo_t*type2, char op)
1141 if(!type1 || !type2)
1142 return registry_getanytype();
1143 if(TYPE_IS_ANY(type1) || TYPE_IS_ANY(type2))
1144 return registry_getanytype();
1147 if(IS_NUMBER_OR_INT(type1) && IS_NUMBER_OR_INT(type2)) {
1156 return registry_getanytype();
1158 code_t*converttype(code_t*c, classinfo_t*from, classinfo_t*to)
1163 return abc_coerce_a(c);
1167 // cast an "any" type to a specific type. subject to
1168 // runtime exceptions
1169 return abc_coerce2(c, &m);
1172 if((TYPE_IS_NUMBER(from) || TYPE_IS_UINT(from) || TYPE_IS_INT(from)) &&
1173 (TYPE_IS_NUMBER(to) || TYPE_IS_UINT(to) || TYPE_IS_INT(to))) {
1174 // allow conversion between number types
1175 return abc_coerce2(c, &m);
1177 //printf("%s.%s\n", from.package, from.name);
1178 //printf("%s.%s\n", to.package, to.name);
1180 classinfo_t*supertype = from;
1182 if(supertype == to) {
1183 // target type is one of from's superclasses
1184 return abc_coerce2(c, &m);
1187 while(supertype->interfaces[t]) {
1188 if(supertype->interfaces[t]==to) {
1189 // target type is one of from's interfaces
1190 return abc_coerce2(c, &m);
1194 supertype = supertype->superclass;
1196 if(TYPE_IS_FUNCTION(from) && TYPE_IS_FUNCTION(to))
1198 if(TYPE_IS_CLASS(from) && TYPE_IS_CLASS(to))
1200 syntaxerror("can't convert type %s to %s", from->name, to->name);
1201 return 0; // make gcc happy
1204 code_t*defaultvalue(code_t*c, classinfo_t*type)
1206 if(TYPE_IS_INT(type)) {
1207 c = abc_pushbyte(c, 0);
1208 } else if(TYPE_IS_UINT(type)) {
1209 c = abc_pushuint(c, 0);
1210 } else if(TYPE_IS_FLOAT(type)) {
1212 } else if(TYPE_IS_BOOLEAN(type)) {
1213 c = abc_pushfalse(c);
1215 //c = abc_pushundefined(c);
1217 c = abc_pushnull(c);
1219 c = abc_coerce2(c, &m);
1224 char is_pushundefined(code_t*c)
1226 return (c && !c->prev && !c->next && c->opcode == OPCODE_PUSHUNDEFINED);
1229 static classinfo_t* find_class(char*name)
1233 c = registry_findclass(state->package, name);
1236 /* try explicit imports */
1237 dictentry_t* e = dict_get_slot(state->imports, name);
1240 if(!strcmp(e->key, name)) {
1241 c = (classinfo_t*)e->data;
1247 /* try package.* imports */
1248 import_list_t*l = state->wildcard_imports;
1250 //printf("does package %s contain a class %s?\n", l->import->package, name);
1251 c = registry_findclass(l->import->package, name);
1256 /* try global package */
1257 c = registry_findclass("", name);
1260 /* try local "filename" package */
1261 c = registry_findclass(current_filename_short, name);
1267 static char is_getlocal(code_t*c)
1269 if(!c || c->prev || c->next)
1271 return(c->opcode == OPCODE_GETLOCAL
1272 || c->opcode == OPCODE_GETLOCAL_0
1273 || c->opcode == OPCODE_GETLOCAL_1
1274 || c->opcode == OPCODE_GETLOCAL_2
1275 || c->opcode == OPCODE_GETLOCAL_3);
1277 static int getlocalnr(code_t*c)
1279 if(c->opcode == OPCODE_GETLOCAL) {return (ptroff_t)c->data[0];}
1280 else if(c->opcode == OPCODE_GETLOCAL_0) {return 0;}
1281 else if(c->opcode == OPCODE_GETLOCAL_1) {return 1;}
1282 else if(c->opcode == OPCODE_GETLOCAL_2) {return 2;}
1283 else if(c->opcode == OPCODE_GETLOCAL_3) {return 3;}
1284 else syntaxerror("Internal error: opcode %02x is not a getlocal call", c->opcode);
1288 static code_t* toreadwrite(code_t*in, code_t*middlepart, char justassign, char readbefore)
1292 [prefix code] [read instruction]
1296 [prefix code] ([dup]) [read instruction] [middlepart] [setvar] [write instruction] [getvar]
1299 if(in && in->opcode == OPCODE_COERCE_A) {
1300 in = code_cutlast(in);
1303 syntaxerror("internal error");
1305 /* chop off read instruction */
1309 prefix = r->prev;r->prev = 0;
1315 char use_temp_var = readbefore;
1317 /* generate the write instruction, and maybe append a dup to the prefix code */
1318 code_t* write = abc_nop(0);
1319 if(r->opcode == OPCODE_GETPROPERTY) {
1320 write->opcode = OPCODE_SETPROPERTY;
1321 multiname_t*m = (multiname_t*)r->data[0];
1322 write->data[0] = multiname_clone(m);
1323 if(m->type == QNAME || m->type == MULTINAME) {
1325 prefix = abc_dup(prefix); // we need the object, too
1328 } else if(m->type == MULTINAMEL) {
1330 /* dupping two values on the stack requires 5 operations and one register-
1331 couldn't adobe just have given us a dup2? */
1332 int temp = gettempvar();
1333 prefix = abc_setlocal(prefix, temp);
1334 prefix = abc_dup(prefix);
1335 prefix = abc_getlocal(prefix, temp);
1336 prefix = abc_swap(prefix);
1337 prefix = abc_getlocal(prefix, temp);
1339 prefix = abc_kill(prefix, temp);
1343 syntaxerror("illegal lvalue: can't assign a value to this expression (not a qname/multiname)");
1345 } else if(r->opcode == OPCODE_GETSLOT) {
1346 write->opcode = OPCODE_SETSLOT;
1347 write->data[0] = r->data[0];
1349 prefix = abc_dup(prefix); // we need the object, too
1352 } else if(r->opcode == OPCODE_GETLOCAL) {
1353 write->opcode = OPCODE_SETLOCAL;
1354 write->data[0] = r->data[0];
1355 } else if(r->opcode == OPCODE_GETLOCAL_0) {
1356 write->opcode = OPCODE_SETLOCAL_0;
1357 } else if(r->opcode == OPCODE_GETLOCAL_1) {
1358 write->opcode = OPCODE_SETLOCAL_1;
1359 } else if(r->opcode == OPCODE_GETLOCAL_2) {
1360 write->opcode = OPCODE_SETLOCAL_2;
1361 } else if(r->opcode == OPCODE_GETLOCAL_3) {
1362 write->opcode = OPCODE_SETLOCAL_3;
1365 syntaxerror("illegal lvalue: can't assign a value to this expression");
1372 /* with getproperty/getslot, we have to be extra careful not
1373 to execute the read code twice, as it might have side-effects
1374 (e.g. if the property is in fact a setter/getter combination)
1376 So read the value, modify it, and write it again,
1377 using prefix only once and making sure (by using a temporary
1378 register) that the return value is what we just wrote */
1379 temp = gettempvar();
1380 c = code_append(c, prefix);
1381 c = code_append(c, r);
1384 c = abc_setlocal(c, temp);
1386 c = code_append(c, middlepart);
1389 c = abc_setlocal(c, temp);
1391 c = code_append(c, write);
1392 c = abc_getlocal(c, temp);
1393 c = abc_kill(c, temp);
1395 /* if we're allowed to execute the read code twice *and*
1396 the middlepart doesn't modify the code, things are easier.
1398 code_t* r2 = code_dup(r);
1399 //c = code_append(c, prefix);
1400 parserassert(!prefix);
1401 c = code_append(c, r);
1402 c = code_append(c, middlepart);
1403 c = code_append(c, write);
1404 c = code_append(c, r2);
1407 /* even smaller version: overwrite the value without reading
1411 c = code_append(c, prefix);
1414 c = code_append(c, middlepart);
1415 c = code_append(c, write);
1416 c = code_append(c, r);
1418 temp = gettempvar();
1420 c = code_append(c, prefix);
1422 c = code_append(c, middlepart);
1424 c = abc_setlocal(c, temp);
1425 c = code_append(c, write);
1426 c = abc_getlocal(c, temp);
1427 c = abc_kill(c, temp);
1433 char is_break_or_jump(code_t*c)
1437 if(c->opcode == OPCODE_JUMP ||
1438 c->opcode == OPCODE___BREAK__ ||
1439 c->opcode == OPCODE___CONTINUE__ ||
1440 c->opcode == OPCODE_THROW ||
1441 c->opcode == OPCODE_RETURNVOID ||
1442 c->opcode == OPCODE_RETURNVALUE) {
1449 #define IS_FINALLY_TARGET(op) \
1450 ((op) == OPCODE___CONTINUE__ || \
1451 (op) == OPCODE___BREAK__ || \
1452 (op) == OPCODE_RETURNVOID || \
1453 (op) == OPCODE_RETURNVALUE || \
1454 (op) == OPCODE___RETHROW__)
1456 static code_t* insert_finally_lookup(code_t*c, code_t*finally, int tempvar)
1458 #define NEED_EXTRA_STACK_ARG
1459 code_t*finally_label = abc_nop(0);
1460 NEW(lookupswitch_t, l);
1466 code_t*prev = i->prev;
1467 if(IS_FINALLY_TARGET(i->opcode)) {
1470 if(i->opcode == OPCODE___RETHROW__ ||
1471 i->opcode == OPCODE_RETURNVALUE) {
1472 if(i->opcode == OPCODE___RETHROW__)
1473 i->opcode = OPCODE_THROW;
1475 p = abc_coerce_a(p);
1476 p = abc_setlocal(p, tempvar);
1478 p = abc_pushbyte(p, count++);
1479 p = abc_jump(p, finally_label);
1480 code_t*target = p = abc_label(p);
1481 #ifdef NEED_EXTRA_STACK_ARG
1485 p = abc_getlocal(p, tempvar);
1488 p->next = i;i->prev = p;
1489 list_append(l->targets, target);
1495 c = abc_pushbyte(c, -1);
1496 c = code_append(c, finally_label);
1497 c = code_append(c, finally);
1499 #ifdef NEED_EXTRA_STACK_ARG
1502 c = abc_lookupswitch(c, l);
1503 c = l->def = abc_label(c);
1504 #ifdef NEED_EXTRA_STACK_ARG
1511 static code_t* insert_finally_simple(code_t*c, code_t*finally, int tempvar)
1515 code_t*prev = i->prev;
1516 if(IS_FINALLY_TARGET(i->opcode)) {
1517 if(i->opcode == OPCODE___RETHROW__)
1518 i->opcode = OPCODE_THROW;
1519 code_t*end = code_dup(finally);
1520 code_t*start = code_start(end);
1521 if(prev) prev->next = start;
1528 return code_append(c, finally);
1531 code_t* insert_finally(code_t*c, code_t*finally, int tempvar)
1537 int num_insertion_points=0;
1539 if(IS_FINALLY_TARGET(i->opcode))
1540 num_insertion_points++;
1547 if(i->branch || i->opcode == OPCODE_LOOKUPSWITCH) {
1552 int simple_version_cost = (1+num_insertion_points)*code_size;
1553 int lookup_version_cost = 4*num_insertion_points + 5;
1555 if(cantdup || simple_version_cost > lookup_version_cost) {
1556 printf("lookup %d > *%d*\n", simple_version_cost, lookup_version_cost);
1557 return insert_finally_lookup(c, finally, tempvar);
1559 printf("simple *%d* < %d\n", simple_version_cost, lookup_version_cost);
1560 return insert_finally_simple(c, finally, tempvar);
1564 #define PASS1 }} if(as3_pass == 1) {{
1565 #define PASS1END }} if(as3_pass == 2) {{
1566 #define PASS2 }} if(as3_pass == 2) {{
1567 #define PASS12 }} {{
1568 #define PASS12END }} if(as3_pass == 2) {{
1572 /* Line 273 of skeleton.m4 */
1573 #line 1574 "parser.tab.c"
1580 typedef YYTYPE_UINT8 yytype_uint8;
1582 typedef unsigned char yytype_uint8;
1586 typedef YYTYPE_INT8 yytype_int8;
1587 #elif (defined __STDC__ || defined __C99__FUNC__ \
1588 || defined __cplusplus || defined _MSC_VER)
1589 typedef signed char yytype_int8;
1591 typedef short int yytype_int8;
1594 #ifdef YYTYPE_UINT16
1595 typedef YYTYPE_UINT16 yytype_uint16;
1597 typedef unsigned short int yytype_uint16;
1601 typedef YYTYPE_INT16 yytype_int16;
1603 typedef short int yytype_int16;
1607 # ifdef __SIZE_TYPE__
1608 # define YYSIZE_T __SIZE_TYPE__
1609 # elif defined size_t
1610 # define YYSIZE_T size_t
1611 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
1612 || defined __cplusplus || defined _MSC_VER)
1613 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
1614 # define YYSIZE_T size_t
1616 # define YYSIZE_T unsigned int
1620 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
1625 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
1626 # define YY_(msgid) dgettext ("bison-runtime", msgid)
1630 # define YY_(msgid) msgid
1634 /* Suppress unused-variable warnings by "using" E. */
1635 #if ! defined lint || defined __GNUC__
1636 # define YYUSE(e) ((void) (e))
1638 # define YYUSE(e) /* empty */
1641 /* Identity function, used to suppress warnings about constant conditions. */
1643 # define YYID(n) (n)
1645 #if (defined __STDC__ || defined __C99__FUNC__ \
1646 || defined __cplusplus || defined _MSC_VER)
1659 #if ! defined yyoverflow || YYERROR_VERBOSE
1661 /* The parser invokes alloca or malloc; define the necessary symbols. */
1663 # ifdef YYSTACK_USE_ALLOCA
1664 # if YYSTACK_USE_ALLOCA
1666 # define YYSTACK_ALLOC __builtin_alloca
1667 # elif defined __BUILTIN_VA_ARG_INCR
1668 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
1670 # define YYSTACK_ALLOC __alloca
1671 # elif defined _MSC_VER
1672 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
1673 # define alloca _alloca
1675 # define YYSTACK_ALLOC alloca
1676 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1677 || defined __cplusplus || defined _MSC_VER)
1678 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1680 # define _STDLIB_H 1
1687 # ifdef YYSTACK_ALLOC
1688 /* Pacify GCC's `empty if-body' warning. */
1689 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
1690 # ifndef YYSTACK_ALLOC_MAXIMUM
1691 /* The OS might guarantee only one guard page at the bottom of the stack,
1692 and a page size can be as small as 4096 bytes. So we cannot safely
1693 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
1694 to allow for a few compiler-allocated temporary stack slots. */
1695 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
1698 # define YYSTACK_ALLOC YYMALLOC
1699 # define YYSTACK_FREE YYFREE
1700 # ifndef YYSTACK_ALLOC_MAXIMUM
1701 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
1703 # if (defined __cplusplus && ! defined _STDLIB_H \
1704 && ! ((defined YYMALLOC || defined malloc) \
1705 && (defined YYFREE || defined free)))
1706 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1708 # define _STDLIB_H 1
1712 # define YYMALLOC malloc
1713 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1714 || defined __cplusplus || defined _MSC_VER)
1715 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
1719 # define YYFREE free
1720 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1721 || defined __cplusplus || defined _MSC_VER)
1722 void free (void *); /* INFRINGES ON USER NAME SPACE */
1726 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
1729 #if (! defined yyoverflow \
1730 && (! defined __cplusplus \
1731 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
1733 /* A type that is properly aligned for any stack member. */
1736 yytype_int16 yyss_alloc;
1740 /* The size of the maximum gap between one aligned stack and the next. */
1741 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
1743 /* The size of an array large to enough to hold all stacks, each with
1745 # define YYSTACK_BYTES(N) \
1746 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
1747 + YYSTACK_GAP_MAXIMUM)
1749 /* Copy COUNT objects from FROM to TO. The source and destination do
1752 # if defined __GNUC__ && 1 < __GNUC__
1753 # define YYCOPY(To, From, Count) \
1754 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
1756 # define YYCOPY(To, From, Count) \
1760 for (yyi = 0; yyi < (Count); yyi++) \
1761 (To)[yyi] = (From)[yyi]; \
1767 /* Relocate STACK from its old location to the new one. The
1768 local variables YYSIZE and YYSTACKSIZE give the old and new number of
1769 elements in the stack, and YYPTR gives the new location of the
1770 stack. Advance YYPTR to a properly aligned location for the next
1772 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
1775 YYSIZE_T yynewbytes; \
1776 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
1777 Stack = &yyptr->Stack_alloc; \
1778 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
1779 yyptr += yynewbytes / sizeof (*yyptr); \
1785 /* YYFINAL -- State number of the termination state. */
1787 /* YYLAST -- Last index in YYTABLE. */
1790 /* YYNTOKENS -- Number of terminals. */
1791 #define YYNTOKENS 130
1792 /* YYNNTS -- Number of nonterminals. */
1794 /* YYNRULES -- Number of rules. */
1795 #define YYNRULES 286
1796 /* YYNRULES -- Number of states. */
1797 #define YYNSTATES 479
1799 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
1800 #define YYUNDEFTOK 2
1801 #define YYMAXUTOK 360
1803 #define YYTRANSLATE(YYX) \
1804 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
1806 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
1807 static const yytype_uint8 yytranslate[] =
1809 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1810 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1811 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1812 2, 2, 2, 116, 2, 2, 2, 114, 106, 2,
1813 126, 129, 113, 111, 97, 110, 123, 112, 2, 2,
1814 2, 2, 2, 2, 2, 2, 2, 2, 103, 96,
1815 107, 99, 108, 102, 2, 2, 2, 2, 2, 2,
1816 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1817 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1818 2, 120, 2, 121, 105, 2, 2, 2, 2, 2,
1819 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1820 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1821 2, 2, 2, 122, 104, 128, 115, 2, 2, 2,
1822 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1823 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1824 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1825 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1826 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1827 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1828 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1829 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1830 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1831 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1832 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1833 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1834 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
1835 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1836 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1837 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1838 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
1839 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
1840 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
1841 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
1842 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
1843 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
1844 95, 98, 100, 101, 109, 117, 118, 119, 124, 125,
1849 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
1851 static const yytype_uint16 yyprhs[] =
1853 0, 0, 3, 5, 6, 8, 10, 13, 15, 17,
1854 19, 21, 23, 25, 27, 28, 30, 32, 35, 37,
1855 39, 41, 43, 45, 47, 49, 50, 53, 55, 57,
1856 59, 61, 63, 65, 67, 69, 71, 73, 75, 77,
1857 79, 81, 83, 85, 87, 89, 91, 93, 97, 100,
1858 103, 105, 107, 110, 111, 114, 117, 119, 123, 127,
1859 128, 131, 132, 140, 141, 143, 145, 149, 151, 154,
1860 158, 167, 174, 175, 182, 183, 191, 193, 196, 198,
1861 201, 202, 204, 206, 209, 211, 214, 219, 223, 224,
1862 233, 234, 244, 245, 251, 253, 256, 258, 261, 263,
1863 264, 271, 274, 276, 282, 284, 286, 290, 292, 293,
1864 300, 301, 307, 310, 315, 316, 318, 320, 323, 325,
1865 327, 329, 331, 333, 335, 337, 339, 341, 342, 345,
1866 346, 349, 350, 353, 354, 364, 365, 374, 375, 377,
1867 379, 382, 384, 386, 388, 390, 391, 393, 395, 398,
1868 400, 403, 412, 414, 416, 422, 423, 426, 428, 430,
1869 432, 434, 436, 438, 440, 442, 443, 445, 448, 453,
1870 457, 459, 464, 467, 469, 471, 472, 473, 486, 488,
1871 489, 490, 501, 503, 507, 509, 511, 513, 517, 519,
1872 521, 523, 526, 527, 528, 532, 533, 535, 537, 541,
1873 545, 550, 555, 558, 560, 563, 565, 567, 571, 573,
1874 575, 577, 579, 581, 583, 585, 587, 589, 591, 593,
1875 595, 597, 599, 601, 603, 605, 607, 611, 615, 619,
1876 623, 627, 631, 635, 639, 643, 647, 650, 653, 657,
1877 661, 665, 669, 673, 677, 681, 685, 689, 693, 697,
1878 701, 705, 709, 713, 718, 721, 723, 727, 730, 735,
1879 739, 740, 742, 746, 752, 756, 760, 764, 768, 772,
1880 776, 780, 784, 788, 792, 796, 802, 805, 808, 811,
1881 814, 818, 822, 824, 828, 834, 840
1884 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
1885 static const yytype_int16 yyrhs[] =
1887 131, 0, -1, 132, -1, -1, 133, -1, 134, -1,
1888 133, 134, -1, 180, -1, 192, -1, 190, -1, 208,
1889 -1, 201, -1, 143, -1, 96, -1, -1, 136, -1,
1890 137, -1, 136, 137, -1, 192, -1, 190, -1, 208,
1891 -1, 201, -1, 143, -1, 96, -1, 139, -1, -1,
1892 139, 141, -1, 141, -1, 183, -1, 154, -1, 155,
1893 -1, 156, -1, 158, -1, 166, -1, 149, -1, 177,
1894 -1, 174, -1, 228, -1, 96, -1, 140, -1, 145,
1895 -1, 160, -1, 161, -1, 225, -1, 176, -1, 234,
1896 -1, 235, -1, 122, 139, 128, -1, 122, 128, -1,
1897 141, 96, -1, 141, -1, 140, -1, 99, 226, -1,
1898 -1, 45, 146, -1, 31, 146, -1, 147, -1, 146,
1899 97, 147, -1, 3, 218, 144, -1, -1, 64, 142,
1900 -1, -1, 63, 126, 150, 227, 129, 142, 148, -1,
1901 -1, 145, -1, 228, -1, 45, 3, 218, -1, 3,
1902 -1, 12, 126, -1, 12, 49, 126, -1, 153, 151,
1903 96, 227, 96, 228, 129, 142, -1, 153, 152, 67,
1904 227, 129, 142, -1, -1, 13, 126, 157, 227, 129,
1905 142, -1, -1, 14, 159, 142, 13, 126, 227, 129,
1906 -1, 65, -1, 65, 3, -1, 29, -1, 29, 3,
1907 -1, -1, 163, -1, 165, -1, 163, 165, -1, 164,
1908 -1, 163, 164, -1, 33, 229, 103, 138, -1, 61,
1909 103, 138, -1, -1, 15, 126, 167, 229, 129, 122,
1910 162, 128, -1, -1, 32, 126, 3, 218, 129, 169,
1911 122, 138, 128, -1, -1, 27, 122, 171, 138, 128,
1912 -1, 168, -1, 172, 168, -1, 172, -1, 172, 170,
1913 -1, 170, -1, -1, 51, 122, 175, 138, 128, 173,
1914 -1, 36, 227, -1, 36, -1, 38, 126, 227, 129,
1915 142, -1, 3, -1, 18, -1, 179, 123, 178, -1,
1916 178, -1, -1, 18, 179, 122, 181, 135, 128, -1,
1917 -1, 18, 122, 182, 135, 128, -1, 40, 215, -1,
1918 40, 179, 123, 113, -1, -1, 185, -1, 186, -1,
1919 185, 186, -1, 20, -1, 21, -1, 19, -1, 37,
1920 -1, 46, -1, 48, -1, 47, -1, 25, -1, 23,
1921 -1, -1, 53, 215, -1, -1, 53, 216, -1, -1,
1922 16, 216, -1, -1, 184, 30, 3, 187, 189, 122,
1923 191, 194, 128, -1, -1, 184, 43, 3, 188, 122,
1924 193, 197, 128, -1, -1, 195, -1, 196, -1, 195,
1925 196, -1, 96, -1, 201, -1, 208, -1, 140, -1,
1926 -1, 198, -1, 199, -1, 198, 199, -1, 96, -1,
1927 45, 3, -1, 184, 26, 207, 3, 126, 204, 129,
1928 218, -1, 45, -1, 31, -1, 184, 200, 3, 218,
1929 144, -1, -1, 99, 203, -1, 9, -1, 7, -1,
1930 8, -1, 11, -1, 4, -1, 55, -1, 54, -1,
1931 44, -1, -1, 205, -1, 90, 206, -1, 205, 97,
1932 90, 206, -1, 205, 97, 206, -1, 206, -1, 3,
1933 103, 217, 202, -1, 3, 202, -1, 50, -1, 34,
1934 -1, -1, -1, 184, 26, 207, 3, 126, 204, 129,
1935 218, 122, 209, 138, 128, -1, 3, -1, -1, -1,
1936 26, 210, 126, 204, 129, 218, 122, 212, 138, 128,
1937 -1, 3, -1, 179, 123, 3, -1, 214, -1, 213,
1938 -1, 215, -1, 216, 97, 215, -1, 215, -1, 113,
1939 -1, 35, -1, 103, 217, -1, -1, -1, 126, 220,
1940 129, -1, -1, 221, -1, 226, -1, 221, 97, 226,
1941 -1, 24, 213, 219, -1, 229, 126, 220, 129, -1,
1942 52, 126, 220, 129, -1, 62, 229, -1, 41, -1,
1943 41, 227, -1, 229, -1, 229, -1, 227, 97, 229,
1944 -1, 227, -1, 211, -1, 230, -1, 233, -1, 222,
1945 -1, 224, -1, 5, -1, 9, -1, 10, -1, 7,
1946 -1, 8, -1, 11, -1, 4, -1, 28, -1, 55,
1947 -1, 54, -1, 44, -1, 223, -1, 229, 107, 229,
1948 -1, 229, 108, 229, -1, 229, 73, 229, -1, 229,
1949 74, 229, -1, 229, 69, 229, -1, 229, 70, 229,
1950 -1, 229, 72, 229, -1, 229, 71, 229, -1, 229,
1951 84, 229, -1, 229, 85, 229, -1, 116, 229, -1,
1952 115, 229, -1, 229, 106, 229, -1, 229, 105, 229,
1953 -1, 229, 104, 229, -1, 229, 93, 229, -1, 229,
1954 92, 229, -1, 229, 91, 229, -1, 229, 112, 229,
1955 -1, 229, 114, 229, -1, 229, 111, 229, -1, 229,
1956 110, 229, -1, 229, 113, 229, -1, 229, 67, 229,
1957 -1, 229, 68, 229, -1, 229, 39, 229, -1, 229,
1958 66, 229, -1, 42, 126, 229, 129, -1, 35, 229,
1959 -1, 35, -1, 126, 227, 129, -1, 110, 229, -1,
1960 229, 120, 229, 121, -1, 120, 220, 121, -1, -1,
1961 232, -1, 226, 103, 226, -1, 232, 97, 226, 103,
1962 226, -1, 122, 231, 128, -1, 229, 78, 229, -1,
1963 229, 77, 229, -1, 229, 82, 229, -1, 229, 81,
1964 229, -1, 229, 83, 229, -1, 229, 76, 229, -1,
1965 229, 75, 229, -1, 229, 79, 229, -1, 229, 80,
1966 229, -1, 229, 99, 229, -1, 229, 102, 229, 103,
1967 229, -1, 229, 88, -1, 229, 87, -1, 88, 229,
1968 -1, 87, 229, -1, 52, 123, 3, -1, 229, 123,
1969 3, -1, 3, -1, 184, 17, 3, -1, 184, 17,
1970 3, 99, 3, -1, 184, 17, 3, 99, 4, -1,
1974 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
1975 static const yytype_uint16 yyrline[] =
1977 0, 1548, 1548, 1550, 1550, 1551, 1552, 1554, 1555, 1556,
1978 1557, 1558, 1559, 1560, 1562, 1562, 1563, 1564, 1566, 1567,
1979 1568, 1569, 1570, 1571, 1573, 1574, 1576, 1577, 1580, 1581,
1980 1582, 1583, 1584, 1585, 1586, 1587, 1588, 1589, 1592, 1593,
1981 1594, 1595, 1596, 1597, 1598, 1600, 1601, 1603, 1604, 1605,
1982 1606, 1610, 1617, 1618, 1622, 1623, 1625, 1626, 1628, 1669,
1983 1670, 1673, 1673, 1692, 1693, 1694, 1697, 1700, 1704, 1705,
1984 1707, 1727, 1770, 1770, 1789, 1789, 1804, 1807, 1810, 1813,
1985 1817, 1818, 1819, 1820, 1821, 1822, 1824, 1835, 1838, 1838,
1986 1867, 1867, 1887, 1887, 1904, 1905, 1906, 1907, 1915, 1924,
1987 1924, 1969, 1973, 1984, 1993, 1994, 1996, 1997, 1999, 1999,
1988 2001, 2001, 2004, 2012, 2022, 2023, 2024, 2025, 2027, 2028,
1989 2029, 2030, 2031, 2032, 2033, 2034, 2035, 2037, 2038, 2040,
1990 2041, 2043, 2044, 2048, 2046, 2054, 2052, 2060, 2061, 2062,
1991 2063, 2064, 2065, 2066, 2068, 2074, 2075, 2076, 2077, 2078,
1992 2079, 2082, 2094, 2094, 2096, 2155, 2156, 2158, 2159, 2160,
1993 2161, 2162, 2164, 2165, 2166, 2171, 2174, 2179, 2184, 2191,
1994 2195, 2200, 2206, 2212, 2213, 2214, 2217, 2216, 2238, 2239,
1995 2241, 2240, 2260, 2268, 2276, 2277, 2279, 2280, 2282, 2283,
1996 2284, 2293, 2294, 2298, 2299, 2301, 2302, 2303, 2306, 2311,
1997 2335, 2383, 2403, 2424, 2427, 2434, 2435, 2436, 2442, 2448,
1998 2450, 2452, 2454, 2456, 2458, 2475, 2480, 2483, 2486, 2489,
1999 2492, 2495, 2498, 2501, 2504, 2508, 2509, 2512, 2515, 2518,
2000 2521, 2524, 2527, 2530, 2534, 2545, 2563, 2568, 2573, 2578,
2001 2583, 2588, 2592, 2596, 2601, 2605, 2609, 2618, 2627, 2637,
2002 2642, 2654, 2660, 2665, 2671, 2677, 2681, 2683, 2694, 2703,
2003 2710, 2711, 2713, 2719, 2728, 2735, 2747, 2753, 2759, 2765,
2004 2771, 2777, 2783, 2796, 2807, 2814, 2827, 2854, 2868, 2882,
2005 2896, 2911, 2945, 3043, 3044, 3045, 3047
2009 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
2010 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
2011 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
2012 static const char *const yytname[] =
2014 "$end", "error", "$undefined", "T_IDENTIFIER", "T_STRING", "T_REGEXP",
2015 "T_EMPTY", "T_INT", "T_UINT", "T_BYTE", "T_SHORT", "T_FLOAT", "\"for\"",
2016 "\"while\"", "\"do\"", "\"switch\"", "\"implements\"", "\"namespace\"",
2017 "\"package\"", "\"protected\"", "\"public\"", "\"private\"", "\"use\"",
2018 "\"internal\"", "\"new\"", "\"native\"", "\"function\"", "\"finally\"",
2019 "\"undefined\"", "\"continue\"", "\"class\"", "\"const\"", "\"catch\"",
2020 "\"case\"", "\"set\"", "\"void\"", "\"throw\"", "\"static\"", "\"with\"",
2021 "\"instanceof\"", "\"import\"", "\"return\"", "\"typeof\"",
2022 "\"interface\"", "\"null\"", "\"var\"", "\"dynamic\"", "\"override\"",
2023 "\"final\"", "\"each\"", "\"get\"", "\"try\"", "\"super\"",
2024 "\"extends\"", "\"false\"", "\"true\"", "\"Boolean\"", "\"uint\"",
2025 "\"int\"", "\"Number\"", "\"String\"", "\"default\"", "\"delete\"",
2026 "\"if\"", "\"else\"", "\"break\"", "\"is\"", "\"in\"", "\"as\"",
2027 "\"==\"", "\"===\"", "\"!=\"", "\"!==\"", "\"<=\"", "\">=\"", "\"|=\"",
2028 "\"/=\"", "\"%=\"", "\"*=\"", "\"+=\"", "\"-=\"", "\">>=\"", "\"<<=\"",
2029 "\">>>=\"", "\"||\"", "\"&&\"", "\"::\"", "\"--\"", "\"++\"", "\"..\"",
2030 "\"...\"", "\"<<\"", "\">>>\"", "\">>\"", "prec_none", "below_semicolon",
2031 "';'", "','", "below_assignment", "'='", "\"&=\"", "\"^=\"", "'?'",
2032 "':'", "'|'", "'^'", "'&'", "'<'", "'>'", "below_minus", "'-'", "'+'",
2033 "'/'", "'*'", "'%'", "'~'", "'!'", "minusminus_prefix",
2034 "plusplus_prefix", "below_curly", "'['", "']'", "'{'", "'.'",
2035 "above_identifier", "below_else", "'('", "above_function", "'}'", "')'",
2036 "$accept", "PROGRAM", "MAYBE_PROGRAM_CODE_LIST", "PROGRAM_CODE_LIST",
2037 "PROGRAM_CODE", "MAYBE_INPACKAGE_CODE_LIST", "INPACKAGE_CODE_LIST",
2038 "INPACKAGE_CODE", "MAYBECODE", "CODE", "CODE_STATEMENT", "CODEPIECE",
2039 "CODEBLOCK", "PACKAGE_INITCODE", "MAYBEEXPRESSION",
2040 "VARIABLE_DECLARATION", "VARIABLE_LIST", "ONE_VARIABLE", "MAYBEELSE",
2041 "IF", "$@1", "FOR_INIT", "FOR_IN_INIT", "FOR_START", "FOR", "FOR_IN",
2042 "WHILE", "$@2", "DO_WHILE", "$@3", "BREAK", "CONTINUE",
2043 "MAYBE_CASE_LIST", "CASE_LIST", "CASE", "DEFAULT", "SWITCH", "$@4",
2044 "CATCH", "$@5", "FINALLY", "$@6", "CATCH_LIST", "CATCH_FINALLY_LIST",
2045 "TRY", "$@7", "THROW", "WITH", "X_IDENTIFIER", "PACKAGE",
2046 "PACKAGE_DECLARATION", "$@8", "$@9", "IMPORT", "MAYBE_MODIFIERS",
2047 "MODIFIER_LIST", "MODIFIER", "EXTENDS", "EXTENDS_LIST",
2048 "IMPLEMENTS_LIST", "CLASS_DECLARATION", "$@10", "INTERFACE_DECLARATION",
2049 "$@11", "MAYBE_CLASS_BODY", "CLASS_BODY", "CLASS_BODY_ITEM",
2050 "MAYBE_INTERFACE_BODY", "INTERFACE_BODY", "IDECLARATION", "VARCONST",
2051 "SLOT_DECLARATION", "MAYBESTATICCONSTANT", "STATICCONSTANT",
2052 "MAYBE_PARAM_LIST", "PARAM_LIST", "PARAM", "GETSET",
2053 "FUNCTION_DECLARATION", "$@12", "MAYBE_IDENTIFIER", "INNERFUNCTION",
2054 "$@13", "CLASS", "PACKAGEANDCLASS", "QNAME", "QNAME_LIST", "TYPE",
2055 "MAYBETYPE", "MAYBE_PARAM_VALUES", "MAYBE_EXPRESSION_LIST",
2056 "EXPRESSION_LIST", "NEW", "FUNCTIONCALL", "DELETE", "RETURN",
2057 "NONCOMMAEXPRESSION", "EXPRESSION", "VOIDEXPRESSION", "E", "CONSTANT",
2058 "MAYBE_EXPRPAIR_LIST", "EXPRPAIR_LIST", "VAR_READ",
2059 "NAMESPACE_DECLARATION", "USE_NAMESPACE", 0
2064 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
2066 static const yytype_uint16 yytoknum[] =
2068 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
2069 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
2070 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
2071 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
2072 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
2073 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
2074 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
2075 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
2076 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
2077 345, 346, 347, 348, 349, 350, 59, 44, 351, 61,
2078 352, 353, 63, 58, 124, 94, 38, 60, 62, 354,
2079 45, 43, 47, 42, 37, 126, 33, 355, 356, 357,
2080 91, 93, 123, 46, 358, 359, 40, 360, 125, 41
2084 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
2085 static const yytype_uint8 yyr1[] =
2087 0, 130, 131, 132, 132, 133, 133, 134, 134, 134,
2088 134, 134, 134, 134, 135, 135, 136, 136, 137, 137,
2089 137, 137, 137, 137, 138, 138, 139, 139, 140, 140,
2090 140, 140, 140, 140, 140, 140, 140, 140, 141, 141,
2091 141, 141, 141, 141, 141, 141, 141, 142, 142, 142,
2092 142, 143, 144, 144, 145, 145, 146, 146, 147, 148,
2093 148, 150, 149, 151, 151, 151, 152, 152, 153, 153,
2094 154, 155, 157, 156, 159, 158, 160, 160, 161, 161,
2095 162, 162, 162, 162, 163, 163, 164, 165, 167, 166,
2096 169, 168, 171, 170, 172, 172, 173, 173, 173, 175,
2097 174, 176, 176, 177, 178, 178, 179, 179, 181, 180,
2098 182, 180, 183, 183, 184, 184, 185, 185, 186, 186,
2099 186, 186, 186, 186, 186, 186, 186, 187, 187, 188,
2100 188, 189, 189, 191, 190, 193, 192, 194, 194, 195,
2101 195, 196, 196, 196, 196, 197, 197, 198, 198, 199,
2102 199, 199, 200, 200, 201, 202, 202, 203, 203, 203,
2103 203, 203, 203, 203, 203, 204, 204, 204, 204, 205,
2104 205, 206, 206, 207, 207, 207, 209, 208, 210, 210,
2105 212, 211, 213, 214, 215, 215, 216, 216, 217, 217,
2106 217, 218, 218, 219, 219, 220, 220, 221, 221, 222,
2107 223, 223, 224, 225, 225, 226, 227, 227, 228, 229,
2108 229, 229, 229, 229, 229, 230, 230, 230, 230, 230,
2109 230, 230, 230, 230, 230, 229, 229, 229, 229, 229,
2110 229, 229, 229, 229, 229, 229, 229, 229, 229, 229,
2111 229, 229, 229, 229, 229, 229, 229, 229, 229, 229,
2112 229, 229, 229, 229, 229, 229, 229, 229, 229, 229,
2113 231, 231, 232, 232, 229, 229, 229, 229, 229, 229,
2114 229, 229, 229, 229, 229, 229, 229, 229, 229, 229,
2115 229, 229, 233, 234, 234, 234, 235
2118 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
2119 static const yytype_uint8 yyr2[] =
2121 0, 2, 1, 0, 1, 1, 2, 1, 1, 1,
2122 1, 1, 1, 1, 0, 1, 1, 2, 1, 1,
2123 1, 1, 1, 1, 1, 0, 2, 1, 1, 1,
2124 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2125 1, 1, 1, 1, 1, 1, 1, 3, 2, 2,
2126 1, 1, 2, 0, 2, 2, 1, 3, 3, 0,
2127 2, 0, 7, 0, 1, 1, 3, 1, 2, 3,
2128 8, 6, 0, 6, 0, 7, 1, 2, 1, 2,
2129 0, 1, 1, 2, 1, 2, 4, 3, 0, 8,
2130 0, 9, 0, 5, 1, 2, 1, 2, 1, 0,
2131 6, 2, 1, 5, 1, 1, 3, 1, 0, 6,
2132 0, 5, 2, 4, 0, 1, 1, 2, 1, 1,
2133 1, 1, 1, 1, 1, 1, 1, 0, 2, 0,
2134 2, 0, 2, 0, 9, 0, 8, 0, 1, 1,
2135 2, 1, 1, 1, 1, 0, 1, 1, 2, 1,
2136 2, 8, 1, 1, 5, 0, 2, 1, 1, 1,
2137 1, 1, 1, 1, 1, 0, 1, 2, 4, 3,
2138 1, 4, 2, 1, 1, 0, 0, 12, 1, 0,
2139 0, 10, 1, 3, 1, 1, 1, 3, 1, 1,
2140 1, 2, 0, 0, 3, 0, 1, 1, 3, 3,
2141 4, 4, 2, 1, 2, 1, 1, 3, 1, 1,
2142 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2143 1, 1, 1, 1, 1, 1, 3, 3, 3, 3,
2144 3, 3, 3, 3, 3, 3, 2, 2, 3, 3,
2145 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
2146 3, 3, 3, 4, 2, 1, 3, 2, 4, 3,
2147 0, 1, 3, 5, 3, 3, 3, 3, 3, 3,
2148 3, 3, 3, 3, 3, 5, 2, 2, 2, 2,
2152 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
2153 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
2154 means the default is an error. */
2155 static const yytype_uint16 yydefact[] =
2157 114, 282, 220, 214, 217, 218, 215, 216, 219, 0,
2158 0, 74, 0, 0, 120, 118, 119, 126, 0, 125,
2159 179, 221, 255, 121, 0, 0, 0, 224, 122, 124,
2160 123, 0, 0, 223, 222, 0, 0, 0, 0, 13,
2161 0, 0, 0, 195, 260, 0, 0, 2, 114, 5,
2162 51, 12, 34, 63, 29, 30, 31, 32, 33, 36,
2163 35, 7, 28, 0, 115, 116, 9, 8, 11, 10,
2164 209, 212, 225, 213, 208, 37, 206, 210, 211, 0,
2165 68, 72, 114, 88, 104, 105, 110, 107, 0, 182,
2166 193, 178, 0, 254, 0, 182, 0, 185, 184, 112,
2167 0, 99, 0, 195, 202, 61, 279, 278, 257, 237,
2168 236, 0, 196, 197, 205, 0, 0, 261, 0, 1,
2169 6, 282, 0, 0, 64, 0, 0, 65, 175, 0,
2170 153, 0, 152, 0, 117, 0, 0, 0, 0, 0,
2171 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2172 0, 0, 0, 0, 0, 0, 0, 277, 276, 0,
2173 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2174 0, 0, 0, 0, 0, 0, 195, 69, 0, 0,
2175 78, 102, 203, 0, 76, 38, 114, 39, 50, 0,
2176 40, 41, 42, 44, 0, 43, 45, 46, 0, 114,
2177 108, 0, 195, 199, 165, 0, 0, 0, 25, 280,
2178 0, 0, 259, 0, 0, 264, 0, 256, 192, 55,
2179 56, 192, 54, 0, 0, 174, 173, 0, 127, 129,
2180 192, 207, 251, 252, 249, 250, 230, 231, 233, 232,
2181 228, 229, 271, 270, 266, 265, 272, 273, 268, 267,
2182 269, 234, 235, 243, 242, 241, 274, 0, 240, 239,
2183 238, 226, 227, 247, 246, 244, 248, 245, 0, 281,
2184 0, 0, 0, 79, 101, 204, 77, 48, 114, 27,
2185 206, 49, 0, 0, 0, 23, 0, 114, 16, 22,
2186 19, 18, 21, 20, 114, 106, 0, 155, 0, 0,
2187 166, 170, 114, 183, 113, 253, 0, 24, 201, 0,
2188 198, 262, 0, 0, 53, 0, 53, 0, 0, 0,
2189 0, 131, 0, 0, 53, 0, 258, 200, 114, 286,
2190 47, 26, 0, 283, 0, 111, 17, 0, 194, 0,
2191 0, 172, 167, 192, 0, 103, 0, 114, 0, 190,
2192 189, 0, 188, 191, 0, 58, 57, 0, 114, 165,
2193 128, 0, 0, 186, 130, 135, 154, 275, 73, 0,
2194 0, 80, 109, 161, 158, 159, 157, 160, 164, 163,
2195 162, 156, 155, 0, 0, 169, 0, 0, 94, 98,
2196 96, 100, 59, 263, 0, 52, 0, 71, 0, 132,
2197 133, 0, 114, 75, 284, 285, 0, 0, 0, 81,
2198 84, 82, 171, 180, 168, 92, 0, 95, 97, 114,
2199 62, 114, 192, 114, 187, 0, 149, 0, 0, 114,
2200 147, 0, 25, 89, 85, 83, 25, 25, 192, 60,
2201 70, 0, 141, 144, 0, 0, 114, 139, 142, 143,
2202 150, 175, 136, 148, 25, 87, 0, 0, 0, 176,
2203 134, 140, 0, 86, 181, 93, 90, 25, 0, 0,
2204 0, 165, 25, 177, 0, 0, 192, 91, 151
2207 /* YYDEFGOTO[NTERM-NUM]. */
2208 static const yytype_int16 yydefgoto[] =
2210 -1, 46, 47, 48, 49, 286, 287, 288, 306, 307,
2211 187, 279, 189, 289, 355, 190, 222, 220, 420, 52,
2212 211, 125, 126, 53, 54, 55, 56, 178, 57, 82,
2213 191, 192, 408, 409, 410, 411, 58, 198, 388, 469,
2214 389, 437, 390, 391, 59, 208, 193, 60, 87, 351,
2215 61, 294, 199, 62, 194, 64, 65, 321, 323, 362,
2216 290, 423, 291, 402, 445, 446, 447, 428, 429, 430,
2217 133, 292, 341, 381, 299, 300, 301, 227, 293, 467,
2218 92, 70, 436, 97, 98, 352, 364, 353, 314, 203,
2219 111, 112, 71, 72, 73, 195, 113, 74, 75, 76,
2220 77, 116, 117, 78, 196, 197
2223 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
2225 #define YYPACT_NINF -306
2226 static const yytype_int16 yypact[] =
2228 349, -306, -306, -306, -306, -306, -306, -306, -306, -40,
2229 -85, -306, -37, 35, -306, -306, -306, -306, 30, -306,
2230 68, -306, 52, -306, -24, 18, -16, -306, -306, -306,
2231 -306, -22, -35, -306, -306, 1538, -14, 1538, 1538, -306,
2232 1538, 1538, 1538, 1538, 1538, 1538, 167, -306, 473, -306,
2233 -306, -306, -306, 211, -306, -306, -306, -306, -306, -306,
2234 -306, -306, -306, 217, 640, -306, -306, -306, -306, -306,
2235 -306, -306, -306, -306, 76, -306, 1971, -306, -306, 60,
2236 -306, -306, 1469, -306, -306, -306, -306, -306, -28, -306,
2237 67, -306, 71, 141, 1538, 69, 81, -306, -306, -306,
2238 1538, -306, 186, 1538, 141, -306, 141, 141, 163, 141,
2239 141, 87, 115, -306, 1971, 120, 96, 128, -86, -306,
2240 -306, 165, 227, 230, -306, 138, 169, -306, -5, 238,
2241 -306, 241, -306, 246, -306, 1538, 1538, 1538, 1538, 1538,
2242 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538,
2243 1538, 1538, 1538, 1538, 1538, 1538, 1538, -306, -306, 1538,
2244 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538,
2245 1538, 1538, 1538, 1538, 1538, 254, 1538, -306, 1538, 242,
2246 255, 1538, 1538, 227, 265, -306, 593, -306, 173, 257,
2247 -306, -306, -306, -306, 261, -306, -306, -306, 1538, 845,
2248 -306, 72, 1538, -306, 9, -82, 49, 1599, 1349, -306,
2249 143, 1538, -306, 1538, 1538, -306, 1538, -306, 171, 182,
2250 -306, 171, 182, 1538, 1538, -306, -306, 277, 228, 231,
2251 171, 1971, 962, 836, 836, 836, 2337, 2337, 2337, 2337,
2252 962, 962, 1971, 1971, 1971, 1971, 1971, 1971, 1971, 1971,
2253 1971, 2032, 2093, 340, 340, 340, 1971, 1727, 2154, 2215,
2254 2276, 962, 962, 163, 163, 141, 141, 141, 1788, -306,
2255 156, -55, 287, -306, 76, 76, -306, -306, 719, -306,
2256 1849, -306, 170, 288, 1663, -306, 175, 971, -306, -306,
2257 -306, -306, -306, -306, 845, -306, 164, -69, 294, 172,
2258 207, -306, 1469, 69, -306, -306, 177, 1349, -306, 74,
2259 -306, -306, 203, 63, 209, 227, 112, 73, 84, 183,
2260 18, 296, 18, 188, 209, 1538, -306, -306, 1469, -306,
2261 -306, -306, 1538, 214, 192, -306, -306, 189, -306, 61,
2262 63, -306, -306, 171, 11, -306, 8, 1469, 1538, -306,
2263 -306, 193, -306, -306, 1538, -306, -306, 1538, 1469, 9,
2264 -306, 18, 196, -306, 222, -306, -306, 1971, -306, 88,
2265 179, 130, -306, -306, -306, -306, -306, -306, -306, -306,
2266 -306, -306, 221, 201, 294, -306, 202, 199, -306, -306,
2267 8, -306, 268, -306, 90, -306, 200, -306, 205, 222,
2268 -306, 18, 394, -306, -306, -306, 1538, 232, 210, 130,
2269 -306, -306, -306, -306, -306, -306, 336, -306, -306, 1469,
2270 -306, 1469, 171, 1097, -306, 337, -306, 316, 216, 529,
2271 -306, 1910, 1349, -306, -306, -306, 1349, 1349, 171, -306,
2272 -306, 224, -306, -306, 66, 219, 1223, -306, -306, -306,
2273 -306, -5, -306, -306, 1349, -306, 220, 223, 226, -306,
2274 -306, -306, 347, -306, -306, -306, -306, 1349, 239, 244,
2275 243, 9, 1349, -306, 247, 250, 171, -306, -306
2278 /* YYPGOTO[NTERM-NUM]. */
2279 static const yytype_int16 yypgoto[] =
2281 -306, -306, -306, -306, 327, 85, -306, 93, -227, 197,
2282 1, -76, -244, 16, 58, 332, 270, 75, -306, -306,
2283 -306, -306, -306, -306, -306, -306, -306, -306, -306, -306,
2284 -306, -306, -306, -306, -15, -11, -306, -306, 15, -306,
2285 17, -306, -306, -306, -306, -306, -306, -306, -193, 19,
2286 -306, -306, -306, -306, 0, -306, 335, -306, -306, -306,
2287 31, -306, 39, -306, -306, -306, -38, -306, -306, -23,
2288 -306, 2, 27, -306, -305, -306, -271, -41, 3, -306,
2289 -306, -306, -306, 398, -306, -20, 57, 80, -184, -306,
2290 -93, -306, -306, -306, -306, -306, -26, -17, -46, -18,
2291 -306, -306, -306, -306, -306, -306
2294 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
2295 positive, shift that token. If negative, reduce the rule which
2296 number is the opposite. If zero, do what YYDEFACT says.
2297 If YYTABLE_NINF, syntax error. */
2298 #define YYTABLE_NINF -206
2299 static const yytype_int16 yytable[] =
2301 63, 50, 68, 69, 93, 99, 188, 127, 295, 79,
2302 210, 135, 297, 295, 297, 135, 51, 104, 115, 106,
2303 107, 95, 108, 109, 110, 114, 114, 342, 118, 225,
2304 339, 66, 88, 89, 340, 386, 85, 316, 84, 67,
2305 387, 81, 135, 217, 96, 226, 324, 302, 63, 50,
2306 68, 69, 303, 85, 398, 1, 2, 3, 345, 4,
2307 5, 6, 7, 8, 51, 373, 95, 85, 374, 375,
2308 376, 91, 377, 385, 328, 84, 18, 205, 20, 66,
2309 21, 85, 207, 270, 368, 114, 80, 67, 102, 83,
2310 85, 103, 128, 303, 200, 201, 27, 130, 349, 298,
2311 101, 384, 94, 392, 32, 378, 33, 34, 85, 296,
2312 100, 132, 105, 414, 397, 379, 380, 231, 232, 233,
2313 234, 235, 236, 237, 238, 239, 240, 241, 242, 243,
2314 244, 245, 246, 247, 248, 249, 250, 251, 252, 37,
2315 38, 253, 254, 255, 256, 257, 258, 259, 260, 261,
2316 262, 263, 264, 265, 266, 267, 268, 86, 114, 383,
2317 115, 271, 304, 406, 274, 275, 474, 119, 280, 357,
2318 135, 135, 43, 135, 44, 439, 350, 440, 45, -66,
2319 284, 135, 404, 405, 114, 135, 177, 310, 311, 209,
2320 312, 407, -104, 202, 309, 114, 114, 204, 114, 63,
2321 50, 295, 331, 347, 206, 455, 317, 318, 212, 456,
2322 457, 354, 213, 358, 121, 2, 3, 403, 4, 5,
2323 6, 7, 8, 214, 215, 216, 188, 463, 157, 158,
2324 218, 331, -67, 221, 223, 18, 224, 20, 441, 21,
2325 470, 228, 122, 128, 229, 475, 22, 129, 130, 230,
2326 157, 158, 188, 26, 458, 27, 123, 269, 273, 272,
2327 131, 174, 132, 32, 175, 33, 34, 176, 276, 281,
2328 282, 188, 308, 35, 313, 171, 172, 173, 283, 315,
2329 319, 320, 188, 174, 322, 327, 175, 63, 50, 176,
2330 329, 333, 478, 338, 63, 50, 332, 297, 37, 38,
2331 360, 343, 363, 335, 344, 346, 348, 367, 354, 359,
2332 365, 396, 361, 370, 371, 369, 394, 372, 400, 401,
2333 339, 40, 393, 413, 415, 416, 41, 42, 395, 421,
2334 114, 43, 419, 44, 422, 432, 114, 45, 433, 438,
2335 450, 363, 451, 188, 452, 188, 459, 460, 464, -3,
2336 468, 465, 1, 2, 3, 466, 4, 5, 6, 7,
2337 8, 9, 10, 11, 12, 471, 472, 13, 14, 15,
2338 16, 473, 17, 18, 19, 120, 476, 21, 477, 337,
2339 336, 424, 366, 278, 22, 124, 23, 24, 431, 25,
2340 356, 26, 219, 27, 434, 28, 29, 30, 435, 134,
2341 31, 32, 427, 33, 34, 417, 453, 418, 461, 412,
2342 462, 35, 36, 14, 15, 16, 90, 17, 399, 19,
2343 382, 0, 0, 444, 443, 448, 449, 157, 158, 427,
2344 0, 23, 0, 0, 0, 0, 37, 38, 0, 425,
2345 28, 29, 30, 0, 0, 39, 444, 443, 448, 449,
2346 169, 170, 171, 172, 173, 0, 0, 0, 0, 40,
2347 174, 0, 0, 175, 41, 42, 176, 0, 0, 43,
2348 0, 44, 0, -4, 0, 45, 1, 2, 3, 0,
2349 4, 5, 6, 7, 8, 9, 10, 11, 12, 0,
2350 426, 13, 14, 15, 16, 0, 17, 18, 19, 0,
2351 0, 21, 0, 0, 0, 0, 0, 0, 22, 0,
2352 23, 24, 0, 25, 0, 26, 0, 27, 0, 28,
2353 29, 30, -145, 0, 31, 32, 0, 33, 34, 0,
2354 0, 0, 0, 0, 0, 35, 36, 0, 0, 0,
2355 0, 0, 0, 0, 0, 0, 0, 0, 14, 15,
2356 16, 0, 17, 0, 19, 0, 0, 0, 0, 0,
2357 37, 38, 0, 0, 0, 0, 23, 0, 0, 39,
2358 0, 0, 0, 0, 425, 28, 29, 30, 0, 0,
2359 0, 0, 0, 40, 0, 0, 0, 0, 41, 42,
2360 0, 0, 0, 43, 0, 44, 1, 2, 3, 45,
2361 4, 5, 6, 7, 8, 9, 10, 11, 12, 0,
2362 0, 0, 14, 15, 16, 179, 17, 18, 19, 20,
2363 0, 21, 180, 0, 122, 426, 0, 0, 22, 181,
2364 23, 24, 0, 25, 182, 26, 0, 27, 183, 28,
2365 29, 30, 0, 0, 31, 32, 0, 33, 34, 0,
2366 0, 0, 0, 0, 0, 35, 36, -146, 184, 14,
2367 15, 16, 0, 17, 0, 19, 0, 0, 0, 0,
2368 0, 0, 0, 0, 0, 0, 0, 23, 0, 0,
2369 37, 38, 0, 0, 0, 0, 28, 29, 30, 185,
2370 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2371 0, 0, 0, 40, 0, 0, 0, 0, 41, 42,
2372 0, 0, 0, 43, 0, 44, 0, 0, 0, 45,
2373 0, 277, 1, 2, 3, 0, 4, 5, 6, 7,
2374 8, 9, 10, 11, 12, 0, 0, 0, 14, 15,
2375 16, 179, 17, 18, 19, 20, 0, 21, 180, 0,
2376 122, 0, 0, 0, 22, 181, 23, 24, 0, 25,
2377 182, 26, 0, 27, 183, 28, 29, 30, 0, 0,
2378 31, 32, 0, 33, 34, 0, 0, 0, 0, 0,
2379 0, 35, 36, 0, 184, 0, 0, 0, 0, 0,
2380 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2381 0, 0, 0, 0, 0, 0, 37, 38, 0, 0,
2382 0, 0, 0, 0, 0, 185, 0, 0, 0, 0,
2383 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,
2384 0, 0, 0, 0, 41, 42, 0, 0, 0, 43,
2385 0, 44, 0, 0, 0, 45, 0, 330, 1, 2,
2386 3, 0, 4, 5, 6, 7, 8, 9, 10, 11,
2387 12, 0, 0, 0, 14, 15, 16, 0, 17, 18,
2388 19, 0, 0, 21, 0, 136, 0, 0, 0, 0,
2389 22, 0, 23, 24, 0, 25, 0, 26, 0, 27,
2390 0, 28, 29, 30, 0, 0, 31, 32, 0, 33,
2391 34, 0, -206, -206, -206, 0, 0, 35, 36, 144,
2392 145, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2393 0, 0, 0, 157, 158, 0, 0, 159, 160, 161,
2394 0, 0, 37, 38, 0, 0, 0, 0, 0, 0,
2395 0, 285, 0, 167, 168, 0, 169, 170, 171, 172,
2396 173, 0, 0, 0, 0, 40, 174, 0, 0, 175,
2397 41, 42, 176, 0, 0, 43, 0, 44, 0, 0,
2398 0, 45, 0, -14, 1, 2, 3, 0, 4, 5,
2399 6, 7, 8, 9, 10, 11, 12, 0, 0, 0,
2400 14, 15, 16, 0, 17, 18, 19, 0, 0, 21,
2401 0, -206, 0, 0, 0, 0, 22, 0, 23, 24,
2402 0, 25, 0, 26, 0, 27, 0, 28, 29, 30,
2403 0, 0, 31, 32, 0, 33, 34, 0, 0, 0,
2404 0, 0, 0, 35, 36, -206, -206, 0, 0, 0,
2405 0, 0, 0, 0, 0, 0, 0, 0, 0, 157,
2406 158, 0, 0, 159, 160, 161, 0, 0, 37, 38,
2407 0, 0, 0, 0, 0, 0, 0, 285, 0, -206,
2408 -206, 0, 169, 170, 171, 172, 173, 0, 0, 0,
2409 0, 40, 174, 0, 0, 175, 41, 42, 176, 0,
2410 0, 43, 0, 44, 0, 0, 0, 45, 0, -15,
2411 1, 2, 3, 0, 4, 5, 6, 7, 8, 9,
2412 10, 11, 12, 0, 0, 0, 14, 15, 16, 0,
2413 17, 18, 19, 0, 0, 21, 0, 0, 0, 0,
2414 0, 0, 22, 0, 23, 24, 0, 25, 0, 26,
2415 0, 27, 0, 28, 29, 30, 0, 0, 31, 32,
2416 0, 33, 34, 0, 0, 0, 0, 0, 0, 35,
2417 36, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2418 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2419 0, 0, 0, 0, 37, 38, 0, 0, 0, 0,
2420 0, 0, 0, 442, 0, 0, 0, 0, 0, 0,
2421 0, 0, 0, 0, 0, 0, 0, 40, 0, 0,
2422 0, 0, 41, 42, 0, 0, 0, 43, 0, 44,
2423 0, 0, 0, 45, 0, -137, 1, 2, 3, 0,
2424 4, 5, 6, 7, 8, 9, 10, 11, 12, 0,
2425 0, 0, 14, 15, 16, 0, 17, 18, 19, 0,
2426 0, 21, 0, 0, 0, 0, 0, 0, 22, 0,
2427 23, 24, 0, 25, 0, 26, 0, 27, 0, 28,
2428 29, 30, 0, 0, 31, 32, 0, 33, 34, 0,
2429 0, 0, 0, 0, 0, 35, 36, 0, 0, 0,
2430 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2431 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2432 37, 38, 0, 0, 0, 0, 0, 0, 0, 442,
2433 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2434 0, 0, 0, 40, 0, 0, 0, 0, 41, 42,
2435 0, 0, 0, 43, 0, 44, 0, 0, 0, 45,
2436 0, -138, 1, 2, 3, 0, 4, 5, 6, 7,
2437 8, 9, 10, 11, 12, 0, -114, 0, 14, 15,
2438 16, 179, 17, 18, 19, 20, 0, 21, 180, 0,
2439 122, 0, 0, 0, 22, 181, 23, 24, 0, 25,
2440 182, 26, 0, 27, 183, 28, 29, 30, 0, 0,
2441 31, 32, 0, 33, 34, 0, 0, 0, 0, 0,
2442 0, 35, 36, 0, 184, 0, 0, 0, 0, 0,
2443 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2444 0, 0, 0, 0, 0, 0, 37, 38, 0, 0,
2445 0, 0, 0, 0, 0, 185, 0, 0, 0, 0,
2446 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,
2447 0, 0, 0, 0, 41, 42, 0, 0, 0, 43,
2448 0, 44, 1, 2, 3, 45, 4, 5, 6, 7,
2449 8, 9, 10, 11, 12, 0, 0, 0, 14, 15,
2450 16, 179, 17, 18, 19, 20, 0, 21, 180, 0,
2451 122, 0, 0, 0, 22, 181, 23, 24, 0, 25,
2452 182, 26, 0, 27, 183, 28, 29, 30, 0, 0,
2453 31, 32, 0, 33, 34, 0, 0, 0, 0, 0,
2454 0, 35, 36, 0, 184, 0, 0, 0, 0, 0,
2455 0, 1, 2, 3, 0, 4, 5, 6, 7, 8,
2456 0, 0, 0, 0, 0, 0, 37, 38, 0, 0,
2457 0, 0, 18, 0, 20, 185, 21, 0, 0, 0,
2458 0, 0, 0, 22, 0, 0, 0, 0, 0, 40,
2459 26, 0, 27, 0, 41, 42, 0, 0, 0, 43,
2460 32, 186, 33, 34, 0, 45, 0, 0, 0, 0,
2461 35, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2462 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2463 0, 0, 0, 0, 0, 37, 38, 0, 0, 0,
2464 0, 0, 0, 0, 0, 0, 0, 0, 136, 0,
2465 0, 0, 0, 0, 0, 0, 0, 0, 40, 0,
2466 0, 0, 0, 41, 42, 0, 0, 0, 43, 0,
2467 44, 0, 0, 0, 45, 137, 138, 139, 140, 141,
2468 142, 143, 144, 145, 146, 147, 148, 149, 150, 151,
2469 152, 153, 154, 155, 156, 0, 157, 158, 0, 0,
2470 159, 160, 161, 0, 0, 0, 0, 0, 162, 0,
2471 0, 163, 136, 164, 165, 166, 167, 168, 0, 169,
2472 170, 171, 172, 173, 0, 0, 0, 0, 0, 174,
2473 0, 0, 175, 0, 0, 176, 0, 0, 305, 137,
2474 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
2475 148, 149, 150, 151, 152, 153, 154, 155, 156, 0,
2476 157, 158, 0, 0, 159, 160, 161, 0, 0, 0,
2477 0, 0, 162, 0, 0, 163, 136, 164, 165, 166,
2478 167, 168, 0, 169, 170, 171, 172, 173, 0, 0,
2479 0, 0, 0, 174, 0, 0, 175, 0, 0, 176,
2480 0, 0, 334, 137, 138, 139, 140, 141, 142, 143,
2481 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,
2482 154, 155, 156, 0, 157, 158, 0, 0, 159, 160,
2483 161, 0, 0, 0, 0, 0, 162, 136, 0, 163,
2484 325, 164, 165, 166, 167, 168, 0, 169, 170, 171,
2485 172, 173, 0, 0, 0, 0, 0, 174, 0, 0,
2486 175, 0, 0, 176, 137, 138, 139, 140, 141, 142,
2487 143, 144, 145, 146, 147, 148, 149, 150, 151, 152,
2488 153, 154, 155, 156, 0, 157, 158, 0, 0, 159,
2489 160, 161, 0, 0, 0, 0, 0, 162, 136, 0,
2490 163, 0, 164, 165, 166, 167, 168, 0, 169, 170,
2491 171, 172, 173, 0, 0, 0, 0, 0, 174, 326,
2492 0, 175, 0, 0, 176, 137, 138, 139, 140, 141,
2493 142, 143, 144, 145, 146, 147, 148, 149, 150, 151,
2494 152, 153, 154, 155, 156, 0, 157, 158, 0, 0,
2495 159, 160, 161, 0, 0, 0, 0, 0, 162, 136,
2496 0, 163, -205, 164, 165, 166, 167, 168, 0, 169,
2497 170, 171, 172, 173, 0, 0, 0, 0, 0, 174,
2498 0, 0, 175, 0, 0, 176, 137, 138, 139, 140,
2499 141, 142, 143, 144, 145, 146, 147, 148, 149, 150,
2500 151, 152, 153, 154, 155, 156, 0, 157, 158, 0,
2501 0, 159, 160, 161, 0, 0, 0, 0, 0, 162,
2502 136, 0, 163, 454, 164, 165, 166, 167, 168, 0,
2503 169, 170, 171, 172, 173, 0, 0, 0, 0, 0,
2504 174, 0, 0, 175, 0, 0, 176, 137, 138, 139,
2505 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
2506 150, 151, 152, 153, 154, 155, 156, 0, 157, 158,
2507 0, 0, 159, 160, 161, 0, 0, 0, 0, 0,
2508 162, 136, 0, 163, 0, 164, 165, 166, 167, 168,
2509 0, 169, 170, 171, 172, 173, 0, 0, 0, 0,
2510 0, 174, 0, 0, 175, 0, 0, 176, 137, 138,
2511 139, 140, 141, 142, 143, 144, 145, 0, 0, 0,
2512 0, 0, 0, 0, 0, 0, 0, 156, 0, 157,
2513 158, 0, 0, 159, 160, 161, 0, 0, 0, 0,
2514 0, 0, 136, 0, 0, 0, 164, 165, 166, 167,
2515 168, 0, 169, 170, 171, 172, 173, 0, 0, 0,
2516 0, 0, 174, 0, 0, 175, 0, 0, 176, 137,
2517 138, 139, 140, 141, 142, 143, 144, 145, 0, 0,
2518 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2519 157, 158, 0, 0, 159, 160, 161, 0, 0, 0,
2520 0, 0, 0, 136, 0, 0, 0, 164, 165, 166,
2521 167, 168, 0, 169, 170, 171, 172, 173, 0, 0,
2522 0, 0, 0, 174, 0, 0, 175, 0, 0, 176,
2523 137, 138, 139, 140, 141, 142, 143, 144, 145, 0,
2524 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2525 0, 157, 158, 0, 0, 159, 160, 161, 0, 0,
2526 0, 0, 0, 0, 136, 0, 0, 0, 0, 165,
2527 166, 167, 168, 0, 169, 170, 171, 172, 173, 0,
2528 0, 0, 0, 0, 174, 0, 0, 175, 0, 0,
2529 176, 137, 138, 139, 140, 141, 142, 143, 144, 145,
2530 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2531 0, 0, 157, 158, 0, 0, 159, 160, 161, 0,
2532 0, 0, 0, 0, 0, 136, 0, 0, 0, 0,
2533 0, 166, 167, 168, 0, 169, 170, 171, 172, 173,
2534 0, 0, 0, 0, 0, 174, 0, 0, 175, 0,
2535 0, 176, 137, 138, 139, 140, 141, 142, 143, 144,
2536 145, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2537 0, 0, 0, 157, 158, 0, 0, 159, 160, 161,
2538 0, 0, 0, 0, 0, 0, 136, 0, 0, 0,
2539 0, 0, -206, 167, 168, 0, 169, 170, 171, 172,
2540 173, 0, 0, 0, 0, 0, 174, 0, 0, 175,
2541 0, 0, 176, 137, 138, 139, -206, -206, -206, -206,
2542 144, 145, 0, 0, 0, 0, 0, 0, 0, 0,
2543 0, 0, 0, 0, 157, 158, 0, 0, 159, 160,
2544 161, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2545 0, 0, 0, 0, 167, 168, 0, 169, 170, 171,
2546 172, 173, 0, 0, 0, 0, 0, 174, 0, 0,
2550 static const yytype_int16 yycheck[] =
2552 0, 0, 0, 0, 22, 25, 82, 53, 201, 49,
2553 103, 97, 3, 206, 3, 97, 0, 35, 44, 37,
2554 38, 3, 40, 41, 42, 43, 44, 298, 45, 34,
2555 99, 0, 13, 3, 103, 27, 18, 221, 3, 0,
2556 32, 126, 97, 129, 25, 50, 230, 129, 48, 48,
2557 48, 48, 3, 18, 359, 3, 4, 5, 302, 7,
2558 8, 9, 10, 11, 48, 4, 3, 18, 7, 8,
2559 9, 3, 11, 344, 129, 3, 24, 94, 26, 48,
2560 28, 18, 100, 176, 328, 103, 126, 48, 123, 126,
2561 18, 126, 26, 3, 122, 123, 44, 31, 35, 90,
2562 122, 90, 126, 347, 52, 44, 54, 55, 18, 202,
2563 126, 45, 126, 384, 358, 54, 55, 135, 136, 137,
2564 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
2565 148, 149, 150, 151, 152, 153, 154, 155, 156, 87,
2566 88, 159, 160, 161, 162, 163, 164, 165, 166, 167,
2567 168, 169, 170, 171, 172, 173, 174, 122, 176, 343,
2568 186, 178, 113, 33, 181, 182, 471, 0, 186, 96,
2569 97, 97, 120, 97, 122, 419, 113, 421, 126, 67,
2570 198, 97, 3, 4, 202, 97, 126, 213, 214, 3,
2571 216, 61, 123, 126, 211, 213, 214, 126, 216, 199,
2572 199, 394, 278, 129, 123, 432, 223, 224, 121, 436,
2573 437, 99, 97, 129, 3, 4, 5, 129, 7, 8,
2574 9, 10, 11, 103, 128, 97, 302, 454, 87, 88,
2575 3, 307, 67, 3, 96, 24, 67, 26, 422, 28,
2576 467, 3, 31, 26, 3, 472, 35, 30, 31, 3,
2577 87, 88, 328, 42, 438, 44, 45, 3, 3, 17,
2578 43, 120, 45, 52, 123, 54, 55, 126, 3, 96,
2579 13, 347, 129, 62, 103, 112, 113, 114, 17, 97,
2580 3, 53, 358, 120, 53, 129, 123, 287, 287, 126,
2581 3, 3, 476, 129, 294, 294, 126, 3, 87, 88,
2582 320, 129, 322, 128, 97, 128, 103, 325, 99, 126,
2583 122, 357, 16, 99, 122, 332, 123, 128, 122, 97,
2584 99, 110, 348, 122, 122, 126, 115, 116, 354, 129,
2585 348, 120, 64, 122, 129, 103, 354, 126, 128, 3,
2586 3, 361, 26, 419, 128, 421, 122, 128, 128, 0,
2587 3, 128, 3, 4, 5, 129, 7, 8, 9, 10,
2588 11, 12, 13, 14, 15, 126, 122, 18, 19, 20,
2589 21, 128, 23, 24, 25, 48, 129, 28, 128, 294,
2590 287, 401, 324, 186, 35, 53, 37, 38, 406, 40,
2591 315, 42, 122, 44, 409, 46, 47, 48, 409, 64,
2592 51, 52, 402, 54, 55, 390, 429, 390, 446, 382,
2593 451, 62, 63, 19, 20, 21, 18, 23, 361, 25,
2594 340, -1, -1, 423, 423, 423, 423, 87, 88, 429,
2595 -1, 37, -1, -1, -1, -1, 87, 88, -1, 45,
2596 46, 47, 48, -1, -1, 96, 446, 446, 446, 446,
2597 110, 111, 112, 113, 114, -1, -1, -1, -1, 110,
2598 120, -1, -1, 123, 115, 116, 126, -1, -1, 120,
2599 -1, 122, -1, 0, -1, 126, 3, 4, 5, -1,
2600 7, 8, 9, 10, 11, 12, 13, 14, 15, -1,
2601 96, 18, 19, 20, 21, -1, 23, 24, 25, -1,
2602 -1, 28, -1, -1, -1, -1, -1, -1, 35, -1,
2603 37, 38, -1, 40, -1, 42, -1, 44, -1, 46,
2604 47, 48, 128, -1, 51, 52, -1, 54, 55, -1,
2605 -1, -1, -1, -1, -1, 62, 63, -1, -1, -1,
2606 -1, -1, -1, -1, -1, -1, -1, -1, 19, 20,
2607 21, -1, 23, -1, 25, -1, -1, -1, -1, -1,
2608 87, 88, -1, -1, -1, -1, 37, -1, -1, 96,
2609 -1, -1, -1, -1, 45, 46, 47, 48, -1, -1,
2610 -1, -1, -1, 110, -1, -1, -1, -1, 115, 116,
2611 -1, -1, -1, 120, -1, 122, 3, 4, 5, 126,
2612 7, 8, 9, 10, 11, 12, 13, 14, 15, -1,
2613 -1, -1, 19, 20, 21, 22, 23, 24, 25, 26,
2614 -1, 28, 29, -1, 31, 96, -1, -1, 35, 36,
2615 37, 38, -1, 40, 41, 42, -1, 44, 45, 46,
2616 47, 48, -1, -1, 51, 52, -1, 54, 55, -1,
2617 -1, -1, -1, -1, -1, 62, 63, 128, 65, 19,
2618 20, 21, -1, 23, -1, 25, -1, -1, -1, -1,
2619 -1, -1, -1, -1, -1, -1, -1, 37, -1, -1,
2620 87, 88, -1, -1, -1, -1, 46, 47, 48, 96,
2621 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2622 -1, -1, -1, 110, -1, -1, -1, -1, 115, 116,
2623 -1, -1, -1, 120, -1, 122, -1, -1, -1, 126,
2624 -1, 128, 3, 4, 5, -1, 7, 8, 9, 10,
2625 11, 12, 13, 14, 15, -1, -1, -1, 19, 20,
2626 21, 22, 23, 24, 25, 26, -1, 28, 29, -1,
2627 31, -1, -1, -1, 35, 36, 37, 38, -1, 40,
2628 41, 42, -1, 44, 45, 46, 47, 48, -1, -1,
2629 51, 52, -1, 54, 55, -1, -1, -1, -1, -1,
2630 -1, 62, 63, -1, 65, -1, -1, -1, -1, -1,
2631 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2632 -1, -1, -1, -1, -1, -1, 87, 88, -1, -1,
2633 -1, -1, -1, -1, -1, 96, -1, -1, -1, -1,
2634 -1, -1, -1, -1, -1, -1, -1, -1, -1, 110,
2635 -1, -1, -1, -1, 115, 116, -1, -1, -1, 120,
2636 -1, 122, -1, -1, -1, 126, -1, 128, 3, 4,
2637 5, -1, 7, 8, 9, 10, 11, 12, 13, 14,
2638 15, -1, -1, -1, 19, 20, 21, -1, 23, 24,
2639 25, -1, -1, 28, -1, 39, -1, -1, -1, -1,
2640 35, -1, 37, 38, -1, 40, -1, 42, -1, 44,
2641 -1, 46, 47, 48, -1, -1, 51, 52, -1, 54,
2642 55, -1, 66, 67, 68, -1, -1, 62, 63, 73,
2643 74, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2644 -1, -1, -1, 87, 88, -1, -1, 91, 92, 93,
2645 -1, -1, 87, 88, -1, -1, -1, -1, -1, -1,
2646 -1, 96, -1, 107, 108, -1, 110, 111, 112, 113,
2647 114, -1, -1, -1, -1, 110, 120, -1, -1, 123,
2648 115, 116, 126, -1, -1, 120, -1, 122, -1, -1,
2649 -1, 126, -1, 128, 3, 4, 5, -1, 7, 8,
2650 9, 10, 11, 12, 13, 14, 15, -1, -1, -1,
2651 19, 20, 21, -1, 23, 24, 25, -1, -1, 28,
2652 -1, 39, -1, -1, -1, -1, 35, -1, 37, 38,
2653 -1, 40, -1, 42, -1, 44, -1, 46, 47, 48,
2654 -1, -1, 51, 52, -1, 54, 55, -1, -1, -1,
2655 -1, -1, -1, 62, 63, 73, 74, -1, -1, -1,
2656 -1, -1, -1, -1, -1, -1, -1, -1, -1, 87,
2657 88, -1, -1, 91, 92, 93, -1, -1, 87, 88,
2658 -1, -1, -1, -1, -1, -1, -1, 96, -1, 107,
2659 108, -1, 110, 111, 112, 113, 114, -1, -1, -1,
2660 -1, 110, 120, -1, -1, 123, 115, 116, 126, -1,
2661 -1, 120, -1, 122, -1, -1, -1, 126, -1, 128,
2662 3, 4, 5, -1, 7, 8, 9, 10, 11, 12,
2663 13, 14, 15, -1, -1, -1, 19, 20, 21, -1,
2664 23, 24, 25, -1, -1, 28, -1, -1, -1, -1,
2665 -1, -1, 35, -1, 37, 38, -1, 40, -1, 42,
2666 -1, 44, -1, 46, 47, 48, -1, -1, 51, 52,
2667 -1, 54, 55, -1, -1, -1, -1, -1, -1, 62,
2668 63, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2669 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2670 -1, -1, -1, -1, 87, 88, -1, -1, -1, -1,
2671 -1, -1, -1, 96, -1, -1, -1, -1, -1, -1,
2672 -1, -1, -1, -1, -1, -1, -1, 110, -1, -1,
2673 -1, -1, 115, 116, -1, -1, -1, 120, -1, 122,
2674 -1, -1, -1, 126, -1, 128, 3, 4, 5, -1,
2675 7, 8, 9, 10, 11, 12, 13, 14, 15, -1,
2676 -1, -1, 19, 20, 21, -1, 23, 24, 25, -1,
2677 -1, 28, -1, -1, -1, -1, -1, -1, 35, -1,
2678 37, 38, -1, 40, -1, 42, -1, 44, -1, 46,
2679 47, 48, -1, -1, 51, 52, -1, 54, 55, -1,
2680 -1, -1, -1, -1, -1, 62, 63, -1, -1, -1,
2681 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2682 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2683 87, 88, -1, -1, -1, -1, -1, -1, -1, 96,
2684 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2685 -1, -1, -1, 110, -1, -1, -1, -1, 115, 116,
2686 -1, -1, -1, 120, -1, 122, -1, -1, -1, 126,
2687 -1, 128, 3, 4, 5, -1, 7, 8, 9, 10,
2688 11, 12, 13, 14, 15, -1, 17, -1, 19, 20,
2689 21, 22, 23, 24, 25, 26, -1, 28, 29, -1,
2690 31, -1, -1, -1, 35, 36, 37, 38, -1, 40,
2691 41, 42, -1, 44, 45, 46, 47, 48, -1, -1,
2692 51, 52, -1, 54, 55, -1, -1, -1, -1, -1,
2693 -1, 62, 63, -1, 65, -1, -1, -1, -1, -1,
2694 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2695 -1, -1, -1, -1, -1, -1, 87, 88, -1, -1,
2696 -1, -1, -1, -1, -1, 96, -1, -1, -1, -1,
2697 -1, -1, -1, -1, -1, -1, -1, -1, -1, 110,
2698 -1, -1, -1, -1, 115, 116, -1, -1, -1, 120,
2699 -1, 122, 3, 4, 5, 126, 7, 8, 9, 10,
2700 11, 12, 13, 14, 15, -1, -1, -1, 19, 20,
2701 21, 22, 23, 24, 25, 26, -1, 28, 29, -1,
2702 31, -1, -1, -1, 35, 36, 37, 38, -1, 40,
2703 41, 42, -1, 44, 45, 46, 47, 48, -1, -1,
2704 51, 52, -1, 54, 55, -1, -1, -1, -1, -1,
2705 -1, 62, 63, -1, 65, -1, -1, -1, -1, -1,
2706 -1, 3, 4, 5, -1, 7, 8, 9, 10, 11,
2707 -1, -1, -1, -1, -1, -1, 87, 88, -1, -1,
2708 -1, -1, 24, -1, 26, 96, 28, -1, -1, -1,
2709 -1, -1, -1, 35, -1, -1, -1, -1, -1, 110,
2710 42, -1, 44, -1, 115, 116, -1, -1, -1, 120,
2711 52, 122, 54, 55, -1, 126, -1, -1, -1, -1,
2712 62, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2713 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2714 -1, -1, -1, -1, -1, 87, 88, -1, -1, -1,
2715 -1, -1, -1, -1, -1, -1, -1, -1, 39, -1,
2716 -1, -1, -1, -1, -1, -1, -1, -1, 110, -1,
2717 -1, -1, -1, 115, 116, -1, -1, -1, 120, -1,
2718 122, -1, -1, -1, 126, 66, 67, 68, 69, 70,
2719 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
2720 81, 82, 83, 84, 85, -1, 87, 88, -1, -1,
2721 91, 92, 93, -1, -1, -1, -1, -1, 99, -1,
2722 -1, 102, 39, 104, 105, 106, 107, 108, -1, 110,
2723 111, 112, 113, 114, -1, -1, -1, -1, -1, 120,
2724 -1, -1, 123, -1, -1, 126, -1, -1, 129, 66,
2725 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
2726 77, 78, 79, 80, 81, 82, 83, 84, 85, -1,
2727 87, 88, -1, -1, 91, 92, 93, -1, -1, -1,
2728 -1, -1, 99, -1, -1, 102, 39, 104, 105, 106,
2729 107, 108, -1, 110, 111, 112, 113, 114, -1, -1,
2730 -1, -1, -1, 120, -1, -1, 123, -1, -1, 126,
2731 -1, -1, 129, 66, 67, 68, 69, 70, 71, 72,
2732 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
2733 83, 84, 85, -1, 87, 88, -1, -1, 91, 92,
2734 93, -1, -1, -1, -1, -1, 99, 39, -1, 102,
2735 103, 104, 105, 106, 107, 108, -1, 110, 111, 112,
2736 113, 114, -1, -1, -1, -1, -1, 120, -1, -1,
2737 123, -1, -1, 126, 66, 67, 68, 69, 70, 71,
2738 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
2739 82, 83, 84, 85, -1, 87, 88, -1, -1, 91,
2740 92, 93, -1, -1, -1, -1, -1, 99, 39, -1,
2741 102, -1, 104, 105, 106, 107, 108, -1, 110, 111,
2742 112, 113, 114, -1, -1, -1, -1, -1, 120, 121,
2743 -1, 123, -1, -1, 126, 66, 67, 68, 69, 70,
2744 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
2745 81, 82, 83, 84, 85, -1, 87, 88, -1, -1,
2746 91, 92, 93, -1, -1, -1, -1, -1, 99, 39,
2747 -1, 102, 103, 104, 105, 106, 107, 108, -1, 110,
2748 111, 112, 113, 114, -1, -1, -1, -1, -1, 120,
2749 -1, -1, 123, -1, -1, 126, 66, 67, 68, 69,
2750 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2751 80, 81, 82, 83, 84, 85, -1, 87, 88, -1,
2752 -1, 91, 92, 93, -1, -1, -1, -1, -1, 99,
2753 39, -1, 102, 103, 104, 105, 106, 107, 108, -1,
2754 110, 111, 112, 113, 114, -1, -1, -1, -1, -1,
2755 120, -1, -1, 123, -1, -1, 126, 66, 67, 68,
2756 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
2757 79, 80, 81, 82, 83, 84, 85, -1, 87, 88,
2758 -1, -1, 91, 92, 93, -1, -1, -1, -1, -1,
2759 99, 39, -1, 102, -1, 104, 105, 106, 107, 108,
2760 -1, 110, 111, 112, 113, 114, -1, -1, -1, -1,
2761 -1, 120, -1, -1, 123, -1, -1, 126, 66, 67,
2762 68, 69, 70, 71, 72, 73, 74, -1, -1, -1,
2763 -1, -1, -1, -1, -1, -1, -1, 85, -1, 87,
2764 88, -1, -1, 91, 92, 93, -1, -1, -1, -1,
2765 -1, -1, 39, -1, -1, -1, 104, 105, 106, 107,
2766 108, -1, 110, 111, 112, 113, 114, -1, -1, -1,
2767 -1, -1, 120, -1, -1, 123, -1, -1, 126, 66,
2768 67, 68, 69, 70, 71, 72, 73, 74, -1, -1,
2769 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2770 87, 88, -1, -1, 91, 92, 93, -1, -1, -1,
2771 -1, -1, -1, 39, -1, -1, -1, 104, 105, 106,
2772 107, 108, -1, 110, 111, 112, 113, 114, -1, -1,
2773 -1, -1, -1, 120, -1, -1, 123, -1, -1, 126,
2774 66, 67, 68, 69, 70, 71, 72, 73, 74, -1,
2775 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2776 -1, 87, 88, -1, -1, 91, 92, 93, -1, -1,
2777 -1, -1, -1, -1, 39, -1, -1, -1, -1, 105,
2778 106, 107, 108, -1, 110, 111, 112, 113, 114, -1,
2779 -1, -1, -1, -1, 120, -1, -1, 123, -1, -1,
2780 126, 66, 67, 68, 69, 70, 71, 72, 73, 74,
2781 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2782 -1, -1, 87, 88, -1, -1, 91, 92, 93, -1,
2783 -1, -1, -1, -1, -1, 39, -1, -1, -1, -1,
2784 -1, 106, 107, 108, -1, 110, 111, 112, 113, 114,
2785 -1, -1, -1, -1, -1, 120, -1, -1, 123, -1,
2786 -1, 126, 66, 67, 68, 69, 70, 71, 72, 73,
2787 74, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2788 -1, -1, -1, 87, 88, -1, -1, 91, 92, 93,
2789 -1, -1, -1, -1, -1, -1, 39, -1, -1, -1,
2790 -1, -1, 106, 107, 108, -1, 110, 111, 112, 113,
2791 114, -1, -1, -1, -1, -1, 120, -1, -1, 123,
2792 -1, -1, 126, 66, 67, 68, 69, 70, 71, 72,
2793 73, 74, -1, -1, -1, -1, -1, -1, -1, -1,
2794 -1, -1, -1, -1, 87, 88, -1, -1, 91, 92,
2795 93, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2796 -1, -1, -1, -1, 107, 108, -1, 110, 111, 112,
2797 113, 114, -1, -1, -1, -1, -1, 120, -1, -1,
2801 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
2802 symbol of state STATE-NUM. */
2803 static const yytype_uint8 yystos[] =
2805 0, 3, 4, 5, 7, 8, 9, 10, 11, 12,
2806 13, 14, 15, 18, 19, 20, 21, 23, 24, 25,
2807 26, 28, 35, 37, 38, 40, 42, 44, 46, 47,
2808 48, 51, 52, 54, 55, 62, 63, 87, 88, 96,
2809 110, 115, 116, 120, 122, 126, 131, 132, 133, 134,
2810 140, 143, 149, 153, 154, 155, 156, 158, 166, 174,
2811 177, 180, 183, 184, 185, 186, 190, 192, 201, 208,
2812 211, 222, 223, 224, 227, 228, 229, 230, 233, 49,
2813 126, 126, 159, 126, 3, 18, 122, 178, 179, 3,
2814 213, 3, 210, 229, 126, 3, 179, 213, 214, 215,
2815 126, 122, 123, 126, 229, 126, 229, 229, 229, 229,
2816 229, 220, 221, 226, 229, 226, 231, 232, 227, 0,
2817 134, 3, 31, 45, 145, 151, 152, 228, 26, 30,
2818 31, 43, 45, 200, 186, 97, 39, 66, 67, 68,
2819 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
2820 79, 80, 81, 82, 83, 84, 85, 87, 88, 91,
2821 92, 93, 99, 102, 104, 105, 106, 107, 108, 110,
2822 111, 112, 113, 114, 120, 123, 126, 126, 157, 22,
2823 29, 36, 41, 45, 65, 96, 122, 140, 141, 142,
2824 145, 160, 161, 176, 184, 225, 234, 235, 167, 182,
2825 122, 123, 126, 219, 126, 227, 123, 229, 175, 3,
2826 220, 150, 121, 97, 103, 128, 97, 129, 3, 146,
2827 147, 3, 146, 96, 67, 34, 50, 207, 3, 3,
2828 3, 229, 229, 229, 229, 229, 229, 229, 229, 229,
2829 229, 229, 229, 229, 229, 229, 229, 229, 229, 229,
2830 229, 229, 229, 229, 229, 229, 229, 229, 229, 229,
2831 229, 229, 229, 229, 229, 229, 229, 229, 229, 3,
2832 220, 227, 17, 3, 227, 227, 3, 128, 139, 141,
2833 229, 96, 13, 17, 229, 96, 135, 136, 137, 143,
2834 190, 192, 201, 208, 181, 178, 220, 3, 90, 204,
2835 205, 206, 129, 3, 113, 129, 138, 139, 129, 227,
2836 226, 226, 226, 103, 218, 97, 218, 227, 227, 3,
2837 53, 187, 53, 188, 218, 103, 121, 129, 129, 3,
2838 128, 141, 126, 3, 129, 128, 137, 135, 129, 99,
2839 103, 202, 206, 129, 97, 142, 128, 129, 103, 35,
2840 113, 179, 215, 217, 99, 144, 147, 96, 129, 126,
2841 215, 16, 189, 215, 216, 122, 144, 229, 142, 227,
2842 99, 122, 128, 4, 7, 8, 9, 11, 44, 54,
2843 55, 203, 217, 218, 90, 206, 27, 32, 168, 170,
2844 172, 173, 142, 226, 123, 226, 228, 142, 204, 216,
2845 122, 97, 193, 129, 3, 4, 33, 61, 162, 163,
2846 164, 165, 202, 122, 206, 122, 126, 168, 170, 64,
2847 148, 129, 129, 191, 215, 45, 96, 184, 197, 198,
2848 199, 229, 103, 128, 164, 165, 212, 171, 3, 142,
2849 142, 218, 96, 140, 184, 194, 195, 196, 201, 208,
2850 3, 26, 128, 199, 103, 138, 138, 138, 218, 122,
2851 128, 196, 207, 138, 128, 128, 129, 209, 3, 169,
2852 138, 126, 122, 128, 204, 138, 129, 128, 218
2855 #define yyerrok (yyerrstatus = 0)
2856 #define yyclearin (yychar = YYEMPTY)
2857 #define YYEMPTY (-2)
2860 #define YYACCEPT goto yyacceptlab
2861 #define YYABORT goto yyabortlab
2862 #define YYERROR goto yyerrorlab
2865 /* Like YYERROR except do call yyerror. This remains here temporarily
2866 to ease the transition to the new meaning of YYERROR, for GCC.
2867 Once GCC version 2 has supplanted version 1, this can go. */
2869 #define YYFAIL goto yyerrlab
2871 #define YYRECOVERING() (!!yyerrstatus)
2873 #define YYBACKUP(Token, Value) \
2875 if (yychar == YYEMPTY && yylen == 1) \
2879 yytoken = YYTRANSLATE (yychar); \
2885 yyerror (YY_("syntax error: cannot back up")); \
2892 #define YYERRCODE 256
2895 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
2896 If N is 0, then set CURRENT to the empty location which ends
2897 the previous symbol: RHS[0] (always defined). */
2899 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
2900 #ifndef YYLLOC_DEFAULT
2901 # define YYLLOC_DEFAULT(Current, Rhs, N) \
2905 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
2906 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
2907 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
2908 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
2912 (Current).first_line = (Current).last_line = \
2913 YYRHSLOC (Rhs, 0).last_line; \
2914 (Current).first_column = (Current).last_column = \
2915 YYRHSLOC (Rhs, 0).last_column; \
2921 /* YY_LOCATION_PRINT -- Print the location on the stream.
2922 This macro was not mandated originally: define only if we know
2923 we won't break user code: when these are the locations we know. */
2925 #ifndef YY_LOCATION_PRINT
2926 # if YYLTYPE_IS_TRIVIAL
2927 # define YY_LOCATION_PRINT(File, Loc) \
2928 fprintf (File, "%d.%d-%d.%d", \
2929 (Loc).first_line, (Loc).first_column, \
2930 (Loc).last_line, (Loc).last_column)
2932 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
2937 /* YYLEX -- calling `yylex' with the right arguments. */
2940 # define YYLEX yylex (YYLEX_PARAM)
2942 # define YYLEX yylex ()
2945 /* Enable debugging if requested. */
2949 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
2950 # define YYFPRINTF fprintf
2953 # define YYDPRINTF(Args) \
2959 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
2963 YYFPRINTF (stderr, "%s ", Title); \
2964 yy_symbol_print (stderr, \
2966 YYFPRINTF (stderr, "\n"); \
2971 /*--------------------------------.
2972 | Print this symbol on YYOUTPUT. |
2973 `--------------------------------*/
2976 #if (defined __STDC__ || defined __C99__FUNC__ \
2977 || defined __cplusplus || defined _MSC_VER)
2979 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
2982 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
2985 YYSTYPE const * const yyvaluep;
2991 if (yytype < YYNTOKENS)
2992 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
3004 /*--------------------------------.
3005 | Print this symbol on YYOUTPUT. |
3006 `--------------------------------*/
3008 #if (defined __STDC__ || defined __C99__FUNC__ \
3009 || defined __cplusplus || defined _MSC_VER)
3011 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
3014 yy_symbol_print (yyoutput, yytype, yyvaluep)
3017 YYSTYPE const * const yyvaluep;
3020 if (yytype < YYNTOKENS)
3021 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
3023 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
3025 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
3026 YYFPRINTF (yyoutput, ")");
3029 /*------------------------------------------------------------------.
3030 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
3032 `------------------------------------------------------------------*/
3034 #if (defined __STDC__ || defined __C99__FUNC__ \
3035 || defined __cplusplus || defined _MSC_VER)
3037 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
3040 yy_stack_print (yybottom, yytop)
3041 yytype_int16 *yybottom;
3042 yytype_int16 *yytop;
3045 YYFPRINTF (stderr, "Stack now");
3046 for (; yybottom <= yytop; yybottom++)
3048 int yybot = *yybottom;
3049 YYFPRINTF (stderr, " %d", yybot);
3051 YYFPRINTF (stderr, "\n");
3054 # define YY_STACK_PRINT(Bottom, Top) \
3057 yy_stack_print ((Bottom), (Top)); \
3061 /*------------------------------------------------.
3062 | Report that the YYRULE is going to be reduced. |
3063 `------------------------------------------------*/
3065 #if (defined __STDC__ || defined __C99__FUNC__ \
3066 || defined __cplusplus || defined _MSC_VER)
3068 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
3071 yy_reduce_print (yyvsp, yyrule)
3076 int yynrhs = yyr2[yyrule];
3078 unsigned long int yylno = yyrline[yyrule];
3079 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
3081 /* The symbols being reduced. */
3082 for (yyi = 0; yyi < yynrhs; yyi++)
3084 YYFPRINTF (stderr, " $%d = ", yyi + 1);
3085 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
3086 &(yyvsp[(yyi + 1) - (yynrhs)])
3088 YYFPRINTF (stderr, "\n");
3092 # define YY_REDUCE_PRINT(Rule) \
3095 yy_reduce_print (yyvsp, Rule); \
3098 /* Nonzero means print parse trace. It is left uninitialized so that
3099 multiple parsers can coexist. */
3101 #else /* !YYDEBUG */
3102 # define YYDPRINTF(Args)
3103 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
3104 # define YY_STACK_PRINT(Bottom, Top)
3105 # define YY_REDUCE_PRINT(Rule)
3106 #endif /* !YYDEBUG */
3109 /* YYINITDEPTH -- initial size of the parser's stacks. */
3111 # define YYINITDEPTH 200
3114 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
3115 if the built-in stack extension method is used).
3117 Do not make this value too large; the results are undefined if
3118 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
3119 evaluated with infinite-precision integer arithmetic. */
3122 # define YYMAXDEPTH 10000
3130 # if defined __GLIBC__ && defined _STRING_H
3131 # define yystrlen strlen
3133 /* Return the length of YYSTR. */
3134 #if (defined __STDC__ || defined __C99__FUNC__ \
3135 || defined __cplusplus || defined _MSC_VER)
3137 yystrlen (const char *yystr)
3145 for (yylen = 0; yystr[yylen]; yylen++)
3153 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
3154 # define yystpcpy stpcpy
3156 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
3158 #if (defined __STDC__ || defined __C99__FUNC__ \
3159 || defined __cplusplus || defined _MSC_VER)
3161 yystpcpy (char *yydest, const char *yysrc)
3164 yystpcpy (yydest, yysrc)
3170 const char *yys = yysrc;
3172 while ((*yyd++ = *yys++) != '\0')
3181 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
3182 quotes and backslashes, so that it's suitable for yyerror. The
3183 heuristic is that double-quoting is unnecessary unless the string
3184 contains an apostrophe, a comma, or backslash (other than
3185 backslash-backslash). YYSTR is taken from yytname. If YYRES is
3186 null, do not copy; instead, return the length of what the result
3189 yytnamerr (char *yyres, const char *yystr)
3194 char const *yyp = yystr;
3201 goto do_not_strip_quotes;
3205 goto do_not_strip_quotes;
3218 do_not_strip_quotes: ;
3222 return yystrlen (yystr);
3224 return yystpcpy (yyres, yystr) - yyres;
3228 /* Copy into YYRESULT an error message about the unexpected token
3229 YYCHAR while in state YYSTATE. Return the number of bytes copied,
3230 including the terminating null byte. If YYRESULT is null, do not
3231 copy anything; just return the number of bytes that would be
3232 copied. As a special case, return 0 if an ordinary "syntax error"
3233 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
3234 size calculation. */
3236 yysyntax_error (char *yyresult, int yystate, int yychar)
3238 int yyn = yypact[yystate];
3240 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
3244 int yytype = YYTRANSLATE (yychar);
3245 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
3246 YYSIZE_T yysize = yysize0;
3248 int yysize_overflow = 0;
3249 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
3250 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
3254 /* This is so xgettext sees the translatable formats that are
3255 constructed on the fly. */
3256 YY_("syntax error, unexpected %s");
3257 YY_("syntax error, unexpected %s, expecting %s");
3258 YY_("syntax error, unexpected %s, expecting %s or %s");
3259 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
3260 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
3264 static char const yyunexpected[] = "syntax error, unexpected %s";
3265 static char const yyexpecting[] = ", expecting %s";
3266 static char const yyor[] = " or %s";
3267 char yyformat[sizeof yyunexpected
3268 + sizeof yyexpecting - 1
3269 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
3270 * (sizeof yyor - 1))];
3271 char const *yyprefix = yyexpecting;
3273 /* Start YYX at -YYN if negative to avoid negative indexes in
3275 int yyxbegin = yyn < 0 ? -yyn : 0;
3277 /* Stay within bounds of both yycheck and yytname. */
3278 int yychecklim = YYLAST - yyn + 1;
3279 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
3282 yyarg[0] = yytname[yytype];
3283 yyfmt = yystpcpy (yyformat, yyunexpected);
3285 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
3286 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
3288 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
3292 yyformat[sizeof yyunexpected - 1] = '\0';
3295 yyarg[yycount++] = yytname[yyx];
3296 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
3297 yysize_overflow |= (yysize1 < yysize);
3299 yyfmt = yystpcpy (yyfmt, yyprefix);
3303 yyf = YY_(yyformat);
3304 yysize1 = yysize + yystrlen (yyf);
3305 yysize_overflow |= (yysize1 < yysize);
3308 if (yysize_overflow)
3309 return YYSIZE_MAXIMUM;
3313 /* Avoid sprintf, as that infringes on the user's name space.
3314 Don't have undefined behavior even if the translation
3315 produced a string with the wrong number of "%s"s. */
3316 char *yyp = yyresult;
3318 while ((*yyp = *yyf) != '\0')
3320 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
3322 yyp += yytnamerr (yyp, yyarg[yyi++]);
3335 #endif /* YYERROR_VERBOSE */
3338 /*-----------------------------------------------.
3339 | Release the memory associated to this symbol. |
3340 `-----------------------------------------------*/
3343 #if (defined __STDC__ || defined __C99__FUNC__ \
3344 || defined __cplusplus || defined _MSC_VER)
3346 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
3349 yydestruct (yymsg, yytype, yyvaluep)
3359 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
3369 /* Prevent warnings from -Wmissing-prototypes. */
3370 #ifdef YYPARSE_PARAM
3371 #if defined __STDC__ || defined __cplusplus
3372 int yyparse (void *YYPARSE_PARAM);
3376 #else /* ! YYPARSE_PARAM */
3377 #if defined __STDC__ || defined __cplusplus
3382 #endif /* ! YYPARSE_PARAM */
3385 /* The lookahead symbol. */
3388 /* The semantic value of the lookahead symbol. */
3391 /* Number of syntax errors so far. */
3396 /*-------------------------.
3397 | yyparse or yypush_parse. |
3398 `-------------------------*/
3400 #ifdef YYPARSE_PARAM
3401 #if (defined __STDC__ || defined __C99__FUNC__ \
3402 || defined __cplusplus || defined _MSC_VER)
3404 yyparse (void *YYPARSE_PARAM)
3407 yyparse (YYPARSE_PARAM)
3408 void *YYPARSE_PARAM;
3410 #else /* ! YYPARSE_PARAM */
3411 #if (defined __STDC__ || defined __C99__FUNC__ \
3412 || defined __cplusplus || defined _MSC_VER)
3425 /* Number of tokens to shift before error messages enabled. */
3428 /* The stacks and their tools:
3429 `yyss': related to states.
3430 `yyvs': related to semantic values.
3432 Refer to the stacks thru separate pointers, to allow yyoverflow
3433 to reallocate them elsewhere. */
3435 /* The state stack. */
3436 yytype_int16 yyssa[YYINITDEPTH];
3438 yytype_int16 *yyssp;
3440 /* The semantic value stack. */
3441 YYSTYPE yyvsa[YYINITDEPTH];
3445 YYSIZE_T yystacksize;
3449 /* Lookahead token as an internal (translated) token number. */
3451 /* The variables used to return semantic value and location from the
3456 /* Buffer for error messages, and its allocated size. */
3458 char *yymsg = yymsgbuf;
3459 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
3462 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
3464 /* The number of symbols on the RHS of the reduced rule.
3465 Keep to zero when no symbol should be popped. */
3471 yystacksize = YYINITDEPTH;
3473 YYDPRINTF ((stderr, "Starting parse\n"));
3478 yychar = YYEMPTY; /* Cause a token to be read. */
3480 /* Initialize stack pointers.
3481 Waste one element of value and location stack
3482 so that they stay on the same level as the state stack.
3483 The wasted elements are never initialized. */
3489 /*------------------------------------------------------------.
3490 | yynewstate -- Push a new state, which is found in yystate. |
3491 `------------------------------------------------------------*/
3493 /* In all cases, when you get here, the value and location stacks
3494 have just been pushed. So pushing a state here evens the stacks. */
3500 if (yyss + yystacksize - 1 <= yyssp)
3502 /* Get the current used size of the three stacks, in elements. */
3503 YYSIZE_T yysize = yyssp - yyss + 1;
3507 /* Give user a chance to reallocate the stack. Use copies of
3508 these so that the &'s don't force the real ones into
3510 YYSTYPE *yyvs1 = yyvs;
3511 yytype_int16 *yyss1 = yyss;
3513 /* Each stack pointer address is followed by the size of the
3514 data in use in that stack, in bytes. This used to be a
3515 conditional around just the two extra args, but that might
3516 be undefined if yyoverflow is a macro. */
3517 yyoverflow (YY_("memory exhausted"),
3518 &yyss1, yysize * sizeof (*yyssp),
3519 &yyvs1, yysize * sizeof (*yyvsp),
3525 #else /* no yyoverflow */
3526 # ifndef YYSTACK_RELOCATE
3527 goto yyexhaustedlab;
3529 /* Extend the stack our own way. */
3530 if (YYMAXDEPTH <= yystacksize)
3531 goto yyexhaustedlab;
3533 if (YYMAXDEPTH < yystacksize)
3534 yystacksize = YYMAXDEPTH;
3537 yytype_int16 *yyss1 = yyss;
3538 union yyalloc *yyptr =
3539 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
3541 goto yyexhaustedlab;
3542 YYSTACK_RELOCATE (yyss_alloc, yyss);
3543 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
3544 # undef YYSTACK_RELOCATE
3546 YYSTACK_FREE (yyss1);
3549 #endif /* no yyoverflow */
3551 yyssp = yyss + yysize - 1;
3552 yyvsp = yyvs + yysize - 1;
3554 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
3555 (unsigned long int) yystacksize));
3557 if (yyss + yystacksize - 1 <= yyssp)
3561 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
3563 if (yystate == YYFINAL)
3573 /* Do appropriate processing given the current state. Read a
3574 lookahead token if we need one and don't already have one. */
3576 /* First try to decide what to do without reference to lookahead token. */
3577 yyn = yypact[yystate];
3578 if (yyn == YYPACT_NINF)
3581 /* Not known => get a lookahead token if don't already have one. */
3583 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
3584 if (yychar == YYEMPTY)
3586 YYDPRINTF ((stderr, "Reading a token: "));
3590 if (yychar <= YYEOF)
3592 yychar = yytoken = YYEOF;
3593 YYDPRINTF ((stderr, "Now at end of input.\n"));
3597 yytoken = YYTRANSLATE (yychar);
3598 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
3601 /* If the proper action on seeing token YYTOKEN is to reduce or to
3602 detect an error, take that action. */
3604 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
3609 if (yyn == 0 || yyn == YYTABLE_NINF)
3615 /* Count tokens shifted since error; after three, turn off error
3620 /* Shift the lookahead token. */
3621 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
3623 /* Discard the shifted token. */
3632 /*-----------------------------------------------------------.
3633 | yydefault -- do the default action for the current state. |
3634 `-----------------------------------------------------------*/
3636 yyn = yydefact[yystate];
3642 /*-----------------------------.
3643 | yyreduce -- Do a reduction. |
3644 `-----------------------------*/
3646 /* yyn is the number of a rule to reduce with. */
3649 /* If YYLEN is nonzero, implement the default value of the action:
3652 Otherwise, the following line sets YYVAL to garbage.
3653 This behavior is undocumented and Bison
3654 users should not rely upon it. Assigning to YYVAL
3655 unconditionally makes the parser a bit smaller, and it avoids a
3656 GCC warning that YYVAL may be used uninitialized. */
3657 yyval = yyvsp[1-yylen];
3660 YY_REDUCE_PRINT (yyn);
3667 /* Line 1464 of skeleton.m4 */
3668 #line 1573 "parser.y"
3669 {(yyval.code)=(yyvsp[(1) - (1)].code);}
3678 /* Line 1464 of skeleton.m4 */
3679 #line 1574 "parser.y"
3680 {(yyval.code)=code_new();}
3689 /* Line 1464 of skeleton.m4 */
3690 #line 1576 "parser.y"
3691 {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
3700 /* Line 1464 of skeleton.m4 */
3701 #line 1577 "parser.y"
3702 {(yyval.code)=(yyvsp[(1) - (1)].code);}
3711 /* Line 1464 of skeleton.m4 */
3712 #line 1592 "parser.y"
3722 /* Line 1464 of skeleton.m4 */
3723 #line 1600 "parser.y"
3724 {/*TODO*/(yyval.code)=0;}
3733 /* Line 1464 of skeleton.m4 */
3734 #line 1601 "parser.y"
3735 {/*TODO*/(yyval.code)=0;}
3744 /* Line 1464 of skeleton.m4 */
3745 #line 1603 "parser.y"
3746 {(yyval.code)=(yyvsp[(2) - (3)].code);}
3755 /* Line 1464 of skeleton.m4 */
3756 #line 1604 "parser.y"
3766 /* Line 1464 of skeleton.m4 */
3767 #line 1605 "parser.y"
3768 {(yyval.code)=(yyvsp[(1) - (2)].code);}
3777 /* Line 1464 of skeleton.m4 */
3778 #line 1606 "parser.y"
3779 {(yyval.code)=(yyvsp[(1) - (1)].code);}
3788 /* Line 1464 of skeleton.m4 */
3789 #line 1610 "parser.y"
3791 code_t**cc = &global->init->method->body->code;
3792 *cc = code_append(*cc, (yyvsp[(1) - (1)].code));
3802 /* Line 1464 of skeleton.m4 */
3803 #line 1617 "parser.y"
3804 {(yyval.value)=(yyvsp[(2) - (2)].value);}
3813 /* Line 1464 of skeleton.m4 */
3814 #line 1618 "parser.y"
3815 {(yyval.value).c=abc_pushundefined(0);
3816 (yyval.value).t=TYPE_ANY;
3826 /* Line 1464 of skeleton.m4 */
3827 #line 1622 "parser.y"
3828 {(yyval.code)=(yyvsp[(2) - (2)].code);}
3837 /* Line 1464 of skeleton.m4 */
3838 #line 1623 "parser.y"
3839 {(yyval.code)=(yyvsp[(2) - (2)].code);}
3848 /* Line 1464 of skeleton.m4 */
3849 #line 1625 "parser.y"
3850 {(yyval.code) = (yyvsp[(1) - (1)].code);}
3859 /* Line 1464 of skeleton.m4 */
3860 #line 1626 "parser.y"
3861 {(yyval.code) = code_append((yyvsp[(1) - (3)].code), (yyvsp[(3) - (3)].code));}
3870 /* Line 1464 of skeleton.m4 */
3871 #line 1629 "parser.y"
3873 if(variable_exists((yyvsp[(1) - (3)].id)))
3874 syntaxerror("Variable %s already defined", (yyvsp[(1) - (3)].id));
3876 if(!is_subtype_of((yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo))) {
3877 syntaxerror("Can't convert %s to %s", (yyvsp[(3) - (3)].value).t->name,
3878 (yyvsp[(2) - (3)].classinfo)->name);
3881 int index = new_variable((yyvsp[(1) - (3)].id), (yyvsp[(2) - (3)].classinfo), 1);
3883 if((yyvsp[(2) - (3)].classinfo)) {
3884 if((yyvsp[(3) - (3)].value).c->prev || (yyvsp[(3) - (3)].value).c->opcode != OPCODE_PUSHUNDEFINED) {
3885 (yyval.code) = (yyvsp[(3) - (3)].value).c;
3886 (yyval.code) = converttype((yyval.code), (yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo));
3887 (yyval.code) = abc_setlocal((yyval.code), index);
3889 (yyval.code) = defaultvalue(0, (yyvsp[(2) - (3)].classinfo));
3890 (yyval.code) = abc_setlocal((yyval.code), index);
3893 if((yyvsp[(3) - (3)].value).c->prev || (yyvsp[(3) - (3)].value).c->opcode != OPCODE_PUSHUNDEFINED) {
3894 (yyval.code) = (yyvsp[(3) - (3)].value).c;
3895 (yyval.code) = abc_coerce_a((yyval.code));
3896 (yyval.code) = abc_setlocal((yyval.code), index);
3898 (yyval.code) = code_new();
3902 /* that's the default for a local register, anyway
3904 state->method->initcode = abc_pushundefined(state->method->initcode);
3905 state->method->initcode = abc_setlocal(state->method->initcode, index);
3907 //printf("variable %s -> %d (%s)\n", $2->text, index, $4.t?$4.t->name:"");
3917 /* Line 1464 of skeleton.m4 */
3918 #line 1669 "parser.y"
3919 {(yyval.code) = code_new();}
3928 /* Line 1464 of skeleton.m4 */
3929 #line 1670 "parser.y"
3930 {(yyval.code)=(yyvsp[(2) - (2)].code);}
3939 /* Line 1464 of skeleton.m4 */
3940 #line 1673 "parser.y"
3950 /* Line 1464 of skeleton.m4 */
3951 #line 1673 "parser.y"
3954 (yyval.code) = code_new();
3955 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (7)].value).c);
3956 code_t*myjmp,*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
3958 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].code));
3959 if((yyvsp[(7) - (7)].code)) {
3960 myjmp = (yyval.code) = abc_jump((yyval.code), 0);
3962 myif->branch = (yyval.code) = abc_nop((yyval.code));
3963 if((yyvsp[(7) - (7)].code)) {
3964 (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (7)].code));
3965 myjmp->branch = (yyval.code) = abc_nop((yyval.code));
3967 (yyval.code) = var_block((yyval.code));
3978 /* Line 1464 of skeleton.m4 */
3979 #line 1692 "parser.y"
3980 {(yyval.code)=code_new();}
3989 /* Line 1464 of skeleton.m4 */
3990 #line 1697 "parser.y"
3992 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable((yyvsp[(2) - (3)].id),(yyvsp[(3) - (3)].classinfo),1);
4002 /* Line 1464 of skeleton.m4 */
4003 #line 1700 "parser.y"
4005 (yyval.id)=(yyvsp[(1) - (1)].id);
4015 /* Line 1464 of skeleton.m4 */
4016 #line 1704 "parser.y"
4017 {new_state();(yyval.for_start).name=(yyvsp[(1) - (2)].id);(yyval.for_start).each=0;}
4026 /* Line 1464 of skeleton.m4 */
4027 #line 1705 "parser.y"
4028 {new_state();(yyval.for_start).name=(yyvsp[(1) - (3)].id);(yyval.for_start).each=1;}
4037 /* Line 1464 of skeleton.m4 */
4038 #line 1707 "parser.y"
4040 if((yyvsp[(1) - (8)].for_start).each) syntaxerror("invalid syntax: ; not allowed in for each statement");
4041 (yyval.code) = code_new();
4042 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (8)].code));
4043 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4044 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (8)].value).c);
4045 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4046 (yyval.code) = code_append((yyval.code), (yyvsp[(8) - (8)].code));
4047 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4048 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (8)].code));
4049 (yyval.code) = abc_jump((yyval.code), loopstart);
4050 code_t*out = (yyval.code) = abc_nop((yyval.code));
4051 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, out);
4052 continuejumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, cont);
4055 (yyval.code) = var_block((yyval.code));
4066 /* Line 1464 of skeleton.m4 */
4067 #line 1727 "parser.y"
4069 variable_t*var = find_variable((yyvsp[(2) - (6)].id));
4070 char*tmp1name = concat2((yyvsp[(2) - (6)].id), "__tmp1__");
4071 int it = new_variable(tmp1name, TYPE_INT, 0);
4072 char*tmp2name = concat2((yyvsp[(2) - (6)].id), "__array__");
4073 int array = new_variable(tmp1name, 0, 0);
4075 (yyval.code) = code_new();
4076 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
4077 (yyval.code) = abc_coerce_a((yyval.code));
4078 (yyval.code) = abc_setlocal((yyval.code), array);
4079 (yyval.code) = abc_pushbyte((yyval.code), 0);
4080 (yyval.code) = abc_setlocal((yyval.code), it);
4082 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4084 (yyval.code) = abc_hasnext2((yyval.code), array, it);
4085 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4086 (yyval.code) = abc_getlocal((yyval.code), array);
4087 (yyval.code) = abc_getlocal((yyval.code), it);
4088 if(!(yyvsp[(1) - (6)].for_start).each)
4089 (yyval.code) = abc_nextname((yyval.code));
4091 (yyval.code) = abc_nextvalue((yyval.code));
4092 (yyval.code) = converttype((yyval.code), 0, var->type);
4093 (yyval.code) = abc_setlocal((yyval.code), var->index);
4095 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
4096 (yyval.code) = abc_jump((yyval.code), loopstart);
4098 code_t*out = (yyval.code) = abc_nop((yyval.code));
4099 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, out);
4100 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, loopstart);
4104 (yyval.code) = var_block((yyval.code));
4118 /* Line 1464 of skeleton.m4 */
4119 #line 1770 "parser.y"
4129 /* Line 1464 of skeleton.m4 */
4130 #line 1770 "parser.y"
4133 (yyval.code) = code_new();
4135 code_t*myjmp = (yyval.code) = abc_jump((yyval.code), 0);
4136 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4137 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
4138 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4139 myjmp->branch = cont;
4140 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
4141 (yyval.code) = abc_iftrue((yyval.code), loopstart);
4142 code_t*out = (yyval.code) = abc_nop((yyval.code));
4143 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].id), out);
4144 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].id), cont);
4146 (yyval.code) = var_block((yyval.code));
4157 /* Line 1464 of skeleton.m4 */
4158 #line 1789 "parser.y"
4168 /* Line 1464 of skeleton.m4 */
4169 #line 1789 "parser.y"
4171 (yyval.code) = code_new();
4172 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4173 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (7)].code));
4174 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4175 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].value).c);
4176 (yyval.code) = abc_iftrue((yyval.code), loopstart);
4177 code_t*out = (yyval.code) = abc_nop((yyval.code));
4178 breakjumpsto((yyval.code), (yyvsp[(1) - (7)].id), out);
4179 continuejumpsto((yyval.code), (yyvsp[(1) - (7)].id), cont);
4181 (yyval.code) = var_block((yyval.code));
4192 /* Line 1464 of skeleton.m4 */
4193 #line 1804 "parser.y"
4195 (yyval.code) = abc___break__(0, "");
4205 /* Line 1464 of skeleton.m4 */
4206 #line 1807 "parser.y"
4208 (yyval.code) = abc___break__(0, (yyvsp[(2) - (2)].id));
4218 /* Line 1464 of skeleton.m4 */
4219 #line 1810 "parser.y"
4221 (yyval.code) = abc___continue__(0, "");
4231 /* Line 1464 of skeleton.m4 */
4232 #line 1813 "parser.y"
4234 (yyval.code) = abc___continue__(0, (yyvsp[(2) - (2)].id));
4244 /* Line 1464 of skeleton.m4 */
4245 #line 1817 "parser.y"
4255 /* Line 1464 of skeleton.m4 */
4256 #line 1818 "parser.y"
4257 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4266 /* Line 1464 of skeleton.m4 */
4267 #line 1819 "parser.y"
4268 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4277 /* Line 1464 of skeleton.m4 */
4278 #line 1820 "parser.y"
4279 {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
4288 /* Line 1464 of skeleton.m4 */
4289 #line 1821 "parser.y"
4290 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4299 /* Line 1464 of skeleton.m4 */
4300 #line 1822 "parser.y"
4301 {(yyval.code)=code_append((yyval.code),(yyvsp[(2) - (2)].code));}
4310 /* Line 1464 of skeleton.m4 */
4311 #line 1824 "parser.y"
4313 (yyval.code) = abc_dup(0);
4314 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (4)].value).c);
4315 code_t*j = (yyval.code) = abc_ifne((yyval.code), 0);
4316 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (4)].code));
4317 if((yyval.code)->opcode != OPCODE___BREAK__) {
4318 (yyval.code) = abc___fallthrough__((yyval.code), "");
4320 code_t*e = (yyval.code) = abc_nop((yyval.code));
4331 /* Line 1464 of skeleton.m4 */
4332 #line 1835 "parser.y"
4334 (yyval.code) = (yyvsp[(3) - (3)].code);
4344 /* Line 1464 of skeleton.m4 */
4345 #line 1838 "parser.y"
4355 /* Line 1464 of skeleton.m4 */
4356 #line 1838 "parser.y"
4358 (yyval.code)=(yyvsp[(4) - (8)].value).c;
4359 (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (8)].code));
4360 code_t*out = (yyval.code) = abc_pop((yyval.code));
4361 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].id), out);
4363 code_t*c = (yyval.code),*lastblock=0;
4365 if(c->opcode == OPCODE_IFNE) {
4366 if(!c->next) syntaxerror("internal error in fallthrough handling");
4368 } else if(c->opcode == OPCODE___FALLTHROUGH__) {
4370 c->opcode = OPCODE_JUMP;
4371 c->branch = lastblock;
4373 /* fall through end of switch */
4374 c->opcode = OPCODE_NOP;
4380 (yyval.code) = var_block((yyval.code));
4391 /* Line 1464 of skeleton.m4 */
4392 #line 1867 "parser.y"
4393 {new_state();state->exception_name=(yyvsp[(3) - (5)].id);new_variable((yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].classinfo), 0);}
4402 /* Line 1464 of skeleton.m4 */
4403 #line 1868 "parser.y"
4405 namespace_t name_ns = {ACCESS_PACKAGE, ""};
4406 multiname_t name = {QNAME, &name_ns, 0, (yyvsp[(3) - (9)].id)};
4408 NEW(abc_exception_t, e)
4409 e->exc_type = sig2mname((yyvsp[(4) - (9)].classinfo));
4410 e->var_name = multiname_clone(&name);
4411 (yyval.exception) = e;
4414 int i = find_variable_safe((yyvsp[(3) - (9)].id))->index;
4415 e->target = c = abc_nop(0);
4416 c = abc_setlocal(c, i);
4417 c = code_append(c, (yyvsp[(8) - (9)].code));
4431 /* Line 1464 of skeleton.m4 */
4432 #line 1887 "parser.y"
4433 {new_state();state->exception_name=0;}
4442 /* Line 1464 of skeleton.m4 */
4443 #line 1887 "parser.y"
4445 (yyvsp[(4) - (5)].code) = var_block((yyvsp[(4) - (5)].code));
4446 if(!(yyvsp[(4) - (5)].code)) {
4447 (yyval.exception)=0;
4450 NEW(abc_exception_t, e)
4451 e->exc_type = 0; //all exceptions
4452 e->var_name = 0; //no name
4455 e->to = code_append(e->to, (yyvsp[(4) - (5)].code));
4457 (yyval.exception) = e;
4468 /* Line 1464 of skeleton.m4 */
4469 #line 1904 "parser.y"
4470 {(yyval.catch_list).l=list_new();(yyval.catch_list).finally=0;list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));}
4479 /* Line 1464 of skeleton.m4 */
4480 #line 1905 "parser.y"
4481 {(yyval.catch_list)=(yyvsp[(1) - (2)].catch_list);list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));}
4490 /* Line 1464 of skeleton.m4 */
4491 #line 1906 "parser.y"
4492 {(yyval.catch_list)=(yyvsp[(1) - (1)].catch_list);}
4501 /* Line 1464 of skeleton.m4 */
4502 #line 1907 "parser.y"
4504 (yyval.catch_list) = (yyvsp[(1) - (2)].catch_list);
4505 (yyval.catch_list).finally = 0;
4506 if((yyvsp[(2) - (2)].exception)) {
4507 list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));
4508 (yyval.catch_list).finally = (yyvsp[(2) - (2)].exception)->to;(yyvsp[(2) - (2)].exception)->to=0;
4519 /* Line 1464 of skeleton.m4 */
4520 #line 1915 "parser.y"
4522 (yyval.catch_list).l=list_new();
4523 (yyval.catch_list).finally = 0;
4524 if((yyvsp[(1) - (1)].exception)) {
4525 list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));
4526 (yyval.catch_list).finally = (yyvsp[(1) - (1)].exception)->to;(yyvsp[(1) - (1)].exception)->to=0;
4537 /* Line 1464 of skeleton.m4 */
4538 #line 1924 "parser.y"
4548 /* Line 1464 of skeleton.m4 */
4549 #line 1924 "parser.y"
4551 code_t*out = abc_nop(0);
4553 code_t*start = abc_nop(0);
4554 (yyval.code) = code_append(start, (yyvsp[(4) - (6)].code));
4555 if(!is_break_or_jump((yyvsp[(4) - (6)].code))) {
4556 (yyval.code) = abc_jump((yyval.code), out);
4558 code_t*end = (yyval.code) = abc_nop((yyval.code));
4561 if((yyvsp[(6) - (6)].catch_list).finally)
4562 tmp = new_variable("__finally__", 0, 0);
4564 abc_exception_list_t*l = (yyvsp[(6) - (6)].catch_list).l;
4567 abc_exception_t*e = l->abc_exception;
4569 (yyval.code) = code_append((yyval.code), e->target);
4570 (yyval.code) = abc_jump((yyval.code), out);
4572 parserassert((ptroff_t)(yyvsp[(6) - (6)].catch_list).finally);
4574 e->target = (yyval.code) = abc_nop((yyval.code));
4575 (yyval.code) = abc___rethrow__((yyval.code));
4583 (yyval.code) = code_append((yyval.code), out);
4585 (yyval.code) = insert_finally((yyval.code), (yyvsp[(6) - (6)].catch_list).finally, tmp);
4587 list_concat(state->method->exceptions, (yyvsp[(6) - (6)].catch_list).l);
4589 (yyval.code) = var_block((yyval.code));
4600 /* Line 1464 of skeleton.m4 */
4601 #line 1969 "parser.y"
4603 (yyval.code)=(yyvsp[(2) - (2)].value).c;
4604 (yyval.code)=abc_throw((yyval.code));
4614 /* Line 1464 of skeleton.m4 */
4615 #line 1973 "parser.y"
4617 if(!state->exception_name)
4618 syntaxerror("re-throw only possible within a catch block");
4619 variable_t*v = find_variable(state->exception_name);
4620 (yyval.code)=code_new();
4621 (yyval.code)=abc_getlocal((yyval.code), v->index);
4622 (yyval.code)=abc_throw((yyval.code));
4632 /* Line 1464 of skeleton.m4 */
4633 #line 1984 "parser.y"
4635 (yyval.code) = (yyvsp[(3) - (5)].value).c;
4636 (yyval.code) = abc_pushscope((yyval.code));
4637 (yyval.code) = code_append((yyval.code), (yyvsp[(5) - (5)].code));
4638 (yyval.code) = abc_popscope((yyval.code));
4648 /* Line 1464 of skeleton.m4 */
4649 #line 1994 "parser.y"
4650 {PASS12 (yyval.id)="package";}
4659 /* Line 1464 of skeleton.m4 */
4660 #line 1996 "parser.y"
4661 {PASS12 (yyval.id) = concat3((yyvsp[(1) - (3)].id),".",(yyvsp[(3) - (3)].id));free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;}
4670 /* Line 1464 of skeleton.m4 */
4671 #line 1997 "parser.y"
4672 {PASS12 (yyval.id)=strdup((yyvsp[(1) - (1)].id));}
4681 /* Line 1464 of skeleton.m4 */
4682 #line 1999 "parser.y"
4683 {PASS12 startpackage((yyvsp[(2) - (3)].id));free((yyvsp[(2) - (3)].id));(yyvsp[(2) - (3)].id)=0;}
4692 /* Line 1464 of skeleton.m4 */
4693 #line 2000 "parser.y"
4694 {PASS12 endpackage();(yyval.code)=0;}
4703 /* Line 1464 of skeleton.m4 */
4704 #line 2001 "parser.y"
4705 {PASS12 startpackage("");}
4714 /* Line 1464 of skeleton.m4 */
4715 #line 2002 "parser.y"
4716 {PASS12 endpackage();(yyval.code)=0;}
4725 /* Line 1464 of skeleton.m4 */
4726 #line 2004 "parser.y"
4728 classinfo_t*c = (yyvsp[(2) - (2)].classinfo);
4730 syntaxerror("Couldn't import class\n");
4731 state_has_imports();
4732 dict_put(state->imports, c->name, c);
4743 /* Line 1464 of skeleton.m4 */
4744 #line 2012 "parser.y"
4747 i->package = (yyvsp[(2) - (4)].id);
4748 state_has_imports();
4749 list_append(state->wildcard_imports, i);
4760 /* Line 1464 of skeleton.m4 */
4761 #line 2022 "parser.y"
4762 {PASS12 (yyval.flags)=0;}
4771 /* Line 1464 of skeleton.m4 */
4772 #line 2023 "parser.y"
4773 {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
4782 /* Line 1464 of skeleton.m4 */
4783 #line 2024 "parser.y"
4784 {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].token);}
4793 /* Line 1464 of skeleton.m4 */
4794 #line 2025 "parser.y"
4795 {PASS12 (yyval.flags)=(yyvsp[(1) - (2)].flags)|(yyvsp[(2) - (2)].token);}
4804 /* Line 1464 of skeleton.m4 */
4805 #line 2027 "parser.y"
4806 {PASS12 (yyval.token)=FLAG_PUBLIC;}
4815 /* Line 1464 of skeleton.m4 */
4816 #line 2028 "parser.y"
4817 {PASS12 (yyval.token)=FLAG_PRIVATE;}
4826 /* Line 1464 of skeleton.m4 */
4827 #line 2029 "parser.y"
4828 {PASS12 (yyval.token)=FLAG_PROTECTED;}
4837 /* Line 1464 of skeleton.m4 */
4838 #line 2030 "parser.y"
4839 {PASS12 (yyval.token)=FLAG_STATIC;}
4848 /* Line 1464 of skeleton.m4 */
4849 #line 2031 "parser.y"
4850 {PASS12 (yyval.token)=FLAG_DYNAMIC;}
4859 /* Line 1464 of skeleton.m4 */
4860 #line 2032 "parser.y"
4861 {PASS12 (yyval.token)=FLAG_FINAL;}
4870 /* Line 1464 of skeleton.m4 */
4871 #line 2033 "parser.y"
4872 {PASS12 (yyval.token)=FLAG_OVERRIDE;}
4881 /* Line 1464 of skeleton.m4 */
4882 #line 2034 "parser.y"
4883 {PASS12 (yyval.token)=FLAG_NATIVE;}
4892 /* Line 1464 of skeleton.m4 */
4893 #line 2035 "parser.y"
4894 {PASS12 (yyval.token)=FLAG_PACKAGEINTERNAL;}
4903 /* Line 1464 of skeleton.m4 */
4904 #line 2037 "parser.y"
4905 {(yyval.classinfo)=registry_getobjectclass();}
4914 /* Line 1464 of skeleton.m4 */
4915 #line 2038 "parser.y"
4916 {(yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
4925 /* Line 1464 of skeleton.m4 */
4926 #line 2040 "parser.y"
4927 {PASS12 (yyval.classinfo_list)=list_new();}
4936 /* Line 1464 of skeleton.m4 */
4937 #line 2041 "parser.y"
4938 {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
4947 /* Line 1464 of skeleton.m4 */
4948 #line 2043 "parser.y"
4949 {PASS12 (yyval.classinfo_list)=list_new();}
4958 /* Line 1464 of skeleton.m4 */
4959 #line 2044 "parser.y"
4960 {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
4969 /* Line 1464 of skeleton.m4 */
4970 #line 2048 "parser.y"
4971 {PASS12 startclass((yyvsp[(1) - (6)].flags),(yyvsp[(3) - (6)].id),(yyvsp[(4) - (6)].classinfo),(yyvsp[(5) - (6)].classinfo_list), 0);}
4980 /* Line 1464 of skeleton.m4 */
4981 #line 2050 "parser.y"
4982 {PASS12 endclass();(yyval.code)=0;}
4991 /* Line 1464 of skeleton.m4 */
4992 #line 2054 "parser.y"
4993 {PASS12 startclass((yyvsp[(1) - (5)].flags),(yyvsp[(3) - (5)].id),0,(yyvsp[(4) - (5)].classinfo_list),1);}
5002 /* Line 1464 of skeleton.m4 */
5003 #line 2056 "parser.y"
5004 {PASS12 endclass();(yyval.code)=0;}
5013 /* Line 1464 of skeleton.m4 */
5014 #line 2068 "parser.y"
5016 code_t*c = state->cls->static_init;
5017 c = code_append(c, (yyvsp[(1) - (1)].code));
5018 state->cls->static_init = c;
5028 /* Line 1464 of skeleton.m4 */
5029 #line 2079 "parser.y"
5031 syntaxerror("variable declarations not allowed in interfaces");
5041 /* Line 1464 of skeleton.m4 */
5042 #line 2082 "parser.y"
5045 (yyvsp[(1) - (8)].flags) |= FLAG_PUBLIC;
5046 if((yyvsp[(1) - (8)].flags)&(FLAG_PRIVATE|FLAG_PACKAGEINTERNAL|FLAG_PROTECTED)) {
5047 syntaxerror("invalid method modifiers: interface methods always need to be public");
5049 startfunction(0,(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo));
5050 endfunction(0,(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo), 0);
5060 /* Line 1464 of skeleton.m4 */
5061 #line 2096 "parser.y"
5063 int flags = (yyvsp[(1) - (5)].flags);
5064 memberinfo_t* info = state->cls?
5065 memberinfo_register(state->cls->info, (yyvsp[(3) - (5)].id), MEMBER_SLOT):
5066 memberinfo_register_global(flags2access((yyvsp[(1) - (5)].flags)), state->package, (yyvsp[(3) - (5)].id), MEMBER_SLOT);
5068 info->type = (yyvsp[(4) - (5)].classinfo);
5069 info->flags = flags;
5072 namespace_t mname_ns = {flags2access(flags), ""};
5073 multiname_t mname = {QNAME, &mname_ns, 0, (yyvsp[(3) - (5)].id)};
5075 trait_list_t**traits;
5079 mname_ns.name = state->package;
5080 traits = &global->init->traits;
5081 code = &global->init->method->body->code;
5082 } else if(flags&FLAG_STATIC) {
5084 traits = &state->cls->abc->static_traits;
5085 code = &state->cls->static_init;
5087 // instance variable
5088 traits = &state->cls->abc->traits;
5089 code = &state->cls->init;
5093 if((yyvsp[(4) - (5)].classinfo)) {
5094 MULTINAME(m, (yyvsp[(4) - (5)].classinfo));
5095 t = trait_new_member(traits, multiname_clone(&m), multiname_clone(&mname), 0);
5097 t = trait_new_member(traits, 0, multiname_clone(&mname), 0);
5099 info->slot = t->slot_id;
5101 /* initalization code (if needed) */
5103 if((yyvsp[(5) - (5)].value).c && !is_pushundefined((yyvsp[(5) - (5)].value).c)) {
5104 c = abc_getlocal_0(c);
5105 c = code_append(c, (yyvsp[(5) - (5)].value).c);
5106 c = converttype(c, (yyvsp[(5) - (5)].value).t, (yyvsp[(4) - (5)].classinfo));
5107 c = abc_setslot(c, t->slot_id);
5110 *code = code_append(*code, c);
5112 if((yyvsp[(2) - (5)].token)==KW_CONST) {
5113 t->kind= TRAIT_CONST;
5126 /* Line 1464 of skeleton.m4 */
5127 #line 2155 "parser.y"
5128 {(yyval.constant)=0;}
5137 /* Line 1464 of skeleton.m4 */
5138 #line 2156 "parser.y"
5139 {(yyval.constant)=(yyvsp[(2) - (2)].constant);}
5148 /* Line 1464 of skeleton.m4 */
5149 #line 2158 "parser.y"
5150 {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_uint));}
5159 /* Line 1464 of skeleton.m4 */
5160 #line 2159 "parser.y"
5161 {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_int));}
5170 /* Line 1464 of skeleton.m4 */
5171 #line 2160 "parser.y"
5172 {(yyval.constant) = constant_new_uint((yyvsp[(1) - (1)].number_uint));}
5181 /* Line 1464 of skeleton.m4 */
5182 #line 2161 "parser.y"
5183 {(yyval.constant) = constant_new_float((yyvsp[(1) - (1)].number_float));}
5192 /* Line 1464 of skeleton.m4 */
5193 #line 2162 "parser.y"
5194 {(yyval.constant) = constant_new_string2((yyvsp[(1) - (1)].str).str,(yyvsp[(1) - (1)].str).len);}
5203 /* Line 1464 of skeleton.m4 */
5204 #line 2164 "parser.y"
5205 {(yyval.constant) = constant_new_true((yyvsp[(1) - (1)].token));}
5214 /* Line 1464 of skeleton.m4 */
5215 #line 2165 "parser.y"
5216 {(yyval.constant) = constant_new_false((yyvsp[(1) - (1)].token));}
5225 /* Line 1464 of skeleton.m4 */
5226 #line 2166 "parser.y"
5227 {(yyval.constant) = constant_new_null((yyvsp[(1) - (1)].token));}
5236 /* Line 1464 of skeleton.m4 */
5237 #line 2171 "parser.y"
5239 memset(&(yyval.params),0,sizeof((yyval.params)));
5249 /* Line 1464 of skeleton.m4 */
5250 #line 2174 "parser.y"
5252 (yyval.params)=(yyvsp[(1) - (1)].params);
5262 /* Line 1464 of skeleton.m4 */
5263 #line 2179 "parser.y"
5265 memset(&(yyval.params),0,sizeof((yyval.params)));
5266 (yyval.params).varargs=1;
5267 list_append((yyval.params).list, (yyvsp[(2) - (2)].param));
5277 /* Line 1464 of skeleton.m4 */
5278 #line 2184 "parser.y"
5280 (yyval.params) =(yyvsp[(1) - (4)].params);
5281 (yyval.params).varargs=1;
5282 list_append((yyval.params).list, (yyvsp[(4) - (4)].param));
5292 /* Line 1464 of skeleton.m4 */
5293 #line 2191 "parser.y"
5295 (yyval.params) = (yyvsp[(1) - (3)].params);
5296 list_append((yyval.params).list, (yyvsp[(3) - (3)].param));
5306 /* Line 1464 of skeleton.m4 */
5307 #line 2195 "parser.y"
5309 memset(&(yyval.params),0,sizeof((yyval.params)));
5310 list_append((yyval.params).list, (yyvsp[(1) - (1)].param));
5320 /* Line 1464 of skeleton.m4 */
5321 #line 2200 "parser.y"
5323 (yyval.param) = malloc(sizeof(param_t));
5324 (yyval.param)->name=(yyvsp[(1) - (4)].id);
5325 (yyval.param)->type = (yyvsp[(3) - (4)].classinfo);
5326 (yyval.param)->value = (yyvsp[(4) - (4)].constant);
5336 /* Line 1464 of skeleton.m4 */
5337 #line 2206 "parser.y"
5339 (yyval.param) = malloc(sizeof(param_t));
5340 (yyval.param)->name=(yyvsp[(1) - (2)].id);
5341 (yyval.param)->type = TYPE_ANY;
5342 (yyval.param)->value = (yyvsp[(2) - (2)].constant);
5352 /* Line 1464 of skeleton.m4 */
5353 #line 2212 "parser.y"
5354 {(yyval.token)=(yyvsp[(1) - (1)].token);}
5363 /* Line 1464 of skeleton.m4 */
5364 #line 2213 "parser.y"
5365 {(yyval.token)=(yyvsp[(1) - (1)].token);}
5374 /* Line 1464 of skeleton.m4 */
5375 #line 2214 "parser.y"
5385 /* Line 1464 of skeleton.m4 */
5386 #line 2217 "parser.y"
5387 {PASS12 startfunction(0,(yyvsp[(1) - (9)].flags),(yyvsp[(3) - (9)].token),(yyvsp[(4) - (9)].id),&(yyvsp[(6) - (9)].params),(yyvsp[(8) - (9)].classinfo));}
5396 /* Line 1464 of skeleton.m4 */
5397 #line 2218 "parser.y"
5401 if(!state->method->info) syntaxerror("internal error");
5403 if(state->method->late_binding) {
5404 c = abc_getlocal_0(c);
5405 c = abc_pushscope(c);
5407 if(state->method->is_constructor && !state->method->has_super) {
5408 // call default constructor
5409 c = abc_getlocal_0(c);
5410 c = abc_constructsuper(c, 0);
5412 c = wrap_function(c, 0, (yyvsp[(11) - (12)].code));
5414 endfunction(0,(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),(yyvsp[(8) - (12)].classinfo),c);
5425 /* Line 1464 of skeleton.m4 */
5426 #line 2239 "parser.y"
5436 /* Line 1464 of skeleton.m4 */
5437 #line 2241 "parser.y"
5438 {PASS12 innerfunction((yyvsp[(2) - (7)].id),&(yyvsp[(4) - (7)].params),(yyvsp[(6) - (7)].classinfo));}
5447 /* Line 1464 of skeleton.m4 */
5448 #line 2242 "parser.y"
5452 memberinfo_t*f = state->method->info;
5453 if(!f) syntaxerror("internal error");
5456 c = wrap_function(c, 0, (yyvsp[(9) - (10)].code));
5458 abc_method_t*abc = endfunction(0,0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),(yyvsp[(6) - (10)].classinfo),c);
5460 (yyval.value).c = abc_newfunction(0, abc);
5461 (yyval.value).t = TYPE_FUNCTION(f);
5471 /* Line 1464 of skeleton.m4 */
5472 #line 2260 "parser.y"
5474 PASS1 (yyval.classinfo)=0;
5476 /* try current package */
5477 (yyval.classinfo) = find_class((yyvsp[(1) - (1)].id));
5478 if(!(yyval.classinfo)) syntaxerror("Could not find class %s\n", (yyvsp[(1) - (1)].id));
5488 /* Line 1464 of skeleton.m4 */
5489 #line 2268 "parser.y"
5491 PASS1 (yyval.classinfo)=0;
5493 (yyval.classinfo) = registry_findclass((yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
5494 if(!(yyval.classinfo)) syntaxerror("Couldn't find class %s.%s\n", (yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
5495 free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;
5505 /* Line 1464 of skeleton.m4 */
5506 #line 2279 "parser.y"
5507 {PASS12 (yyval.classinfo_list)=list_new();list_append((yyval.classinfo_list), (yyvsp[(1) - (1)].classinfo));}
5516 /* Line 1464 of skeleton.m4 */
5517 #line 2280 "parser.y"
5518 {PASS12 (yyval.classinfo_list)=(yyvsp[(1) - (3)].classinfo_list);list_append((yyval.classinfo_list),(yyvsp[(3) - (3)].classinfo));}
5527 /* Line 1464 of skeleton.m4 */
5528 #line 2282 "parser.y"
5529 {(yyval.classinfo)=(yyvsp[(1) - (1)].classinfo);}
5538 /* Line 1464 of skeleton.m4 */
5539 #line 2283 "parser.y"
5540 {(yyval.classinfo)=registry_getanytype();}
5549 /* Line 1464 of skeleton.m4 */
5550 #line 2284 "parser.y"
5551 {(yyval.classinfo)=registry_getanytype();}
5560 /* Line 1464 of skeleton.m4 */
5561 #line 2293 "parser.y"
5562 {(yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
5571 /* Line 1464 of skeleton.m4 */
5572 #line 2294 "parser.y"
5573 {(yyval.classinfo)=0;}
5582 /* Line 1464 of skeleton.m4 */
5583 #line 2298 "parser.y"
5584 {(yyval.value_list).cc=0;(yyval.value_list).len=0;}
5593 /* Line 1464 of skeleton.m4 */
5594 #line 2299 "parser.y"
5595 {(yyval.value_list)=(yyvsp[(2) - (3)].value_list);}
5604 /* Line 1464 of skeleton.m4 */
5605 #line 2301 "parser.y"
5606 {(yyval.value_list).cc=0;(yyval.value_list).len=0;}
5615 /* Line 1464 of skeleton.m4 */
5616 #line 2303 "parser.y"
5617 {(yyval.value_list).len=1;
5618 (yyval.value_list).cc = (yyvsp[(1) - (1)].value).c;
5628 /* Line 1464 of skeleton.m4 */
5629 #line 2306 "parser.y"
5631 (yyval.value_list).len= (yyvsp[(1) - (3)].value_list).len+1;
5632 (yyval.value_list).cc = code_append((yyvsp[(1) - (3)].value_list).cc, (yyvsp[(3) - (3)].value).c);
5642 /* Line 1464 of skeleton.m4 */
5643 #line 2311 "parser.y"
5645 MULTINAME(m, (yyvsp[(2) - (3)].classinfo));
5646 (yyval.value).c = code_new();
5648 if((yyvsp[(2) - (3)].classinfo)->slot) {
5649 (yyval.value).c = abc_getglobalscope((yyval.value).c);
5650 (yyval.value).c = abc_getslot((yyval.value).c, (yyvsp[(2) - (3)].classinfo)->slot);
5652 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
5655 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (3)].value_list).cc);
5657 if((yyvsp[(2) - (3)].classinfo)->slot)
5658 (yyval.value).c = abc_construct((yyval.value).c, (yyvsp[(3) - (3)].value_list).len);
5660 (yyval.value).c = abc_constructprop2((yyval.value).c, &m, (yyvsp[(3) - (3)].value_list).len);
5661 (yyval.value).t = (yyvsp[(2) - (3)].classinfo);
5671 /* Line 1464 of skeleton.m4 */
5672 #line 2335 "parser.y"
5675 (yyval.value).c = (yyvsp[(1) - (4)].value).c;
5676 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
5677 (yyval.value).c = code_cutlast((yyval.value).c);
5679 code_t*paramcode = (yyvsp[(3) - (4)].value_list).cc;
5681 (yyval.value).t = TYPE_ANY;
5682 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
5683 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
5684 (yyval.value).c = code_cutlast((yyval.value).c);
5685 (yyval.value).c = code_append((yyval.value).c, paramcode);
5686 (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).len);
5687 multiname_destroy(name);
5688 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
5689 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
5690 trait_t*t = abc_class_find_slotid(state->cls->abc,slot);//FIXME
5691 if(t->kind!=TRAIT_METHOD) {
5692 //ok: flash allows to assign closures to members.
5694 multiname_t*name = t->name;
5695 (yyval.value).c = code_cutlast((yyval.value).c);
5696 (yyval.value).c = code_append((yyval.value).c, paramcode);
5697 //$$.c = abc_callmethod($$.c, t->method, len); //#1051 illegal early access binding
5698 (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).len);
5699 } else if((yyval.value).c->opcode == OPCODE_GETSUPER) {
5700 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
5701 (yyval.value).c = code_cutlast((yyval.value).c);
5702 (yyval.value).c = code_append((yyval.value).c, paramcode);
5703 (yyval.value).c = abc_callsuper2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).len);
5704 multiname_destroy(name);
5706 (yyval.value).c = abc_getlocal_0((yyval.value).c);
5707 (yyval.value).c = code_append((yyval.value).c, paramcode);
5708 (yyval.value).c = abc_call((yyval.value).c, (yyvsp[(3) - (4)].value_list).len);
5713 if(TYPE_IS_FUNCTION((yyvsp[(1) - (4)].value).t) && (yyvsp[(1) - (4)].value).t->function) {
5714 (yyval.value).t = (yyvsp[(1) - (4)].value).t->function->return_type;
5716 (yyval.value).c = abc_coerce_a((yyval.value).c);
5717 (yyval.value).t = TYPE_ANY;
5729 /* Line 1464 of skeleton.m4 */
5730 #line 2383 "parser.y"
5732 if(!state->cls) syntaxerror("super() not allowed outside of a class");
5733 if(!state->method) syntaxerror("super() not allowed outside of a function");
5734 if(!state->method->is_constructor) syntaxerror("super() not allowed outside of a constructor");
5736 (yyval.value).c = code_new();
5737 (yyval.value).c = abc_getlocal_0((yyval.value).c);
5739 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value_list).cc);
5741 this is dependent on the control path, check this somewhere else
5742 if(state->method->has_super)
5743 syntaxerror("constructor may call super() only once");
5745 state->method->has_super = 1;
5746 (yyval.value).c = abc_constructsuper((yyval.value).c, (yyvsp[(3) - (4)].value_list).len);
5747 (yyval.value).c = abc_pushundefined((yyval.value).c);
5748 (yyval.value).t = TYPE_ANY;
5758 /* Line 1464 of skeleton.m4 */
5759 #line 2403 "parser.y"
5761 (yyval.value).c = (yyvsp[(2) - (2)].value).c;
5762 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
5763 (yyval.value).c = code_cutlast((yyval.value).c);
5765 multiname_t*name = 0;
5766 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
5767 (yyval.value).c->opcode = OPCODE_DELETEPROPERTY;
5768 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
5769 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
5770 multiname_t*name = abc_class_find_slotid(state->cls->abc,slot)->name;
5771 (yyval.value).c = code_cutlast((yyval.value).c);
5772 (yyval.value).c = abc_deleteproperty2((yyval.value).c, name);
5774 (yyval.value).c = abc_getlocal_0((yyval.value).c);
5775 MULTINAME_LATE(m, (yyvsp[(2) - (2)].value).t?(yyvsp[(2) - (2)].value).t->access:ACCESS_PACKAGE, "");
5776 (yyval.value).c = abc_deleteproperty2((yyval.value).c, &m);
5778 (yyval.value).t = TYPE_BOOLEAN;
5788 /* Line 1464 of skeleton.m4 */
5789 #line 2424 "parser.y"
5791 (yyval.code) = abc_returnvoid(0);
5801 /* Line 1464 of skeleton.m4 */
5802 #line 2427 "parser.y"
5804 (yyval.code) = (yyvsp[(2) - (2)].value).c;
5805 (yyval.code) = abc_returnvalue((yyval.code));
5815 /* Line 1464 of skeleton.m4 */
5816 #line 2434 "parser.y"
5817 {(yyval.value)=(yyvsp[(1) - (1)].value);}
5826 /* Line 1464 of skeleton.m4 */
5827 #line 2435 "parser.y"
5828 {(yyval.value) = (yyvsp[(1) - (1)].value);}
5837 /* Line 1464 of skeleton.m4 */
5838 #line 2436 "parser.y"
5840 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
5841 (yyval.value).c = cut_last_push((yyval.value).c);
5842 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
5843 (yyval.value).t = (yyvsp[(3) - (3)].value).t;
5853 /* Line 1464 of skeleton.m4 */
5854 #line 2442 "parser.y"
5856 (yyval.code)=cut_last_push((yyvsp[(1) - (1)].value).c);
5866 /* Line 1464 of skeleton.m4 */
5867 #line 2448 "parser.y"
5868 {(yyval.value) = (yyvsp[(1) - (1)].value);}
5877 /* Line 1464 of skeleton.m4 */
5878 #line 2452 "parser.y"
5879 {(yyval.value) = (yyvsp[(1) - (1)].value);}
5888 /* Line 1464 of skeleton.m4 */
5889 #line 2454 "parser.y"
5890 {(yyval.value) = (yyvsp[(1) - (1)].value);}
5899 /* Line 1464 of skeleton.m4 */
5900 #line 2456 "parser.y"
5901 {(yyval.value) = (yyvsp[(1) - (1)].value);}
5910 /* Line 1464 of skeleton.m4 */
5911 #line 2458 "parser.y"
5913 (yyval.value).c = 0;
5914 namespace_t ns = {ACCESS_PACKAGE, ""};
5915 multiname_t m = {QNAME, &ns, 0, "RegExp"};
5916 if(!(yyvsp[(1) - (1)].regexp).options) {
5917 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
5918 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).pattern);
5919 (yyval.value).c = abc_construct((yyval.value).c, 1);
5921 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
5922 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).pattern);
5923 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).options);
5924 (yyval.value).c = abc_construct((yyval.value).c, 2);
5926 (yyval.value).t = TYPE_REGEXP;
5936 /* Line 1464 of skeleton.m4 */
5937 #line 2475 "parser.y"
5938 {(yyval.value).c = abc_pushbyte(0, (yyvsp[(1) - (1)].number_uint));
5939 //MULTINAME(m, registry_getintclass());
5940 //$$.c = abc_coerce2($$.c, &m); // FIXME
5941 (yyval.value).t = TYPE_INT;
5951 /* Line 1464 of skeleton.m4 */
5952 #line 2480 "parser.y"
5953 {(yyval.value).c = abc_pushshort(0, (yyvsp[(1) - (1)].number_uint));
5954 (yyval.value).t = TYPE_INT;
5964 /* Line 1464 of skeleton.m4 */
5965 #line 2483 "parser.y"
5966 {(yyval.value).c = abc_pushint(0, (yyvsp[(1) - (1)].number_int));
5967 (yyval.value).t = TYPE_INT;
5977 /* Line 1464 of skeleton.m4 */
5978 #line 2486 "parser.y"
5979 {(yyval.value).c = abc_pushuint(0, (yyvsp[(1) - (1)].number_uint));
5980 (yyval.value).t = TYPE_UINT;
5990 /* Line 1464 of skeleton.m4 */
5991 #line 2489 "parser.y"
5992 {(yyval.value).c = abc_pushdouble(0, (yyvsp[(1) - (1)].number_float));
5993 (yyval.value).t = TYPE_FLOAT;
6003 /* Line 1464 of skeleton.m4 */
6004 #line 2492 "parser.y"
6005 {(yyval.value).c = abc_pushstring2(0, &(yyvsp[(1) - (1)].str));
6006 (yyval.value).t = TYPE_STRING;
6016 /* Line 1464 of skeleton.m4 */
6017 #line 2495 "parser.y"
6018 {(yyval.value).c = abc_pushundefined(0);
6019 (yyval.value).t = TYPE_ANY;
6029 /* Line 1464 of skeleton.m4 */
6030 #line 2498 "parser.y"
6031 {(yyval.value).c = abc_pushtrue(0);
6032 (yyval.value).t = TYPE_BOOLEAN;
6042 /* Line 1464 of skeleton.m4 */
6043 #line 2501 "parser.y"
6044 {(yyval.value).c = abc_pushfalse(0);
6045 (yyval.value).t = TYPE_BOOLEAN;
6055 /* Line 1464 of skeleton.m4 */
6056 #line 2504 "parser.y"
6057 {(yyval.value).c = abc_pushnull(0);
6058 (yyval.value).t = TYPE_NULL;
6068 /* Line 1464 of skeleton.m4 */
6069 #line 2509 "parser.y"
6070 {(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);
6071 (yyval.value).t = TYPE_BOOLEAN;
6081 /* Line 1464 of skeleton.m4 */
6082 #line 2512 "parser.y"
6083 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterthan((yyval.value).c);
6084 (yyval.value).t = TYPE_BOOLEAN;
6094 /* Line 1464 of skeleton.m4 */
6095 #line 2515 "parser.y"
6096 {(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);
6097 (yyval.value).t = TYPE_BOOLEAN;
6107 /* Line 1464 of skeleton.m4 */
6108 #line 2518 "parser.y"
6109 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterequals((yyval.value).c);
6110 (yyval.value).t = TYPE_BOOLEAN;
6120 /* Line 1464 of skeleton.m4 */
6121 #line 2521 "parser.y"
6122 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_equals((yyval.value).c);
6123 (yyval.value).t = TYPE_BOOLEAN;
6133 /* Line 1464 of skeleton.m4 */
6134 #line 2524 "parser.y"
6135 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_strictequals((yyval.value).c);
6136 (yyval.value).t = TYPE_BOOLEAN;
6146 /* Line 1464 of skeleton.m4 */
6147 #line 2527 "parser.y"
6148 {(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);
6149 (yyval.value).t = TYPE_BOOLEAN;
6159 /* Line 1464 of skeleton.m4 */
6160 #line 2530 "parser.y"
6161 {(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);
6162 (yyval.value).t = TYPE_BOOLEAN;
6172 /* Line 1464 of skeleton.m4 */
6173 #line 2534 "parser.y"
6174 {(yyval.value).t = join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'O');
6175 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
6176 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(1) - (3)].value).t, (yyval.value).t);
6177 (yyval.value).c = abc_dup((yyval.value).c);
6178 code_t*jmp = (yyval.value).c = abc_iftrue((yyval.value).c, 0);
6179 (yyval.value).c = cut_last_push((yyval.value).c);
6180 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
6181 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (3)].value).t, (yyval.value).t);
6182 code_t*label = (yyval.value).c = abc_label((yyval.value).c);
6183 jmp->branch = label;
6193 /* Line 1464 of skeleton.m4 */
6194 #line 2545 "parser.y"
6196 (yyval.value).t = join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'A');
6197 /*printf("%08x:\n",$1.t);
6198 code_dump($1.c, 0, 0, "", stdout);
6199 printf("%08x:\n",$3.t);
6200 code_dump($3.c, 0, 0, "", stdout);
6201 printf("joining %08x and %08x to %08x\n", $1.t, $3.t, $$.t);*/
6202 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
6203 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(1) - (3)].value).t, (yyval.value).t);
6204 (yyval.value).c = abc_dup((yyval.value).c);
6205 code_t*jmp = (yyval.value).c = abc_iffalse((yyval.value).c, 0);
6206 (yyval.value).c = cut_last_push((yyval.value).c);
6207 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
6208 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (3)].value).t, (yyval.value).t);
6209 code_t*label = (yyval.value).c = abc_label((yyval.value).c);
6210 jmp->branch = label;
6220 /* Line 1464 of skeleton.m4 */
6221 #line 2563 "parser.y"
6222 {(yyval.value).c=(yyvsp[(2) - (2)].value).c;
6223 (yyval.value).c = abc_not((yyval.value).c);
6224 (yyval.value).t = TYPE_BOOLEAN;
6234 /* Line 1464 of skeleton.m4 */
6235 #line 2568 "parser.y"
6236 {(yyval.value).c=(yyvsp[(2) - (2)].value).c;
6237 (yyval.value).c = abc_bitnot((yyval.value).c);
6238 (yyval.value).t = TYPE_INT;
6248 /* Line 1464 of skeleton.m4 */
6249 #line 2573 "parser.y"
6250 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6251 (yyval.value).c = abc_bitand((yyval.value).c);
6252 (yyval.value).t = TYPE_INT;
6262 /* Line 1464 of skeleton.m4 */
6263 #line 2578 "parser.y"
6264 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6265 (yyval.value).c = abc_bitxor((yyval.value).c);
6266 (yyval.value).t = TYPE_INT;
6276 /* Line 1464 of skeleton.m4 */
6277 #line 2583 "parser.y"
6278 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6279 (yyval.value).c = abc_bitor((yyval.value).c);
6280 (yyval.value).t = TYPE_INT;
6290 /* Line 1464 of skeleton.m4 */
6291 #line 2588 "parser.y"
6292 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6293 (yyval.value).c = abc_rshift((yyval.value).c);
6294 (yyval.value).t = TYPE_INT;
6304 /* Line 1464 of skeleton.m4 */
6305 #line 2592 "parser.y"
6306 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6307 (yyval.value).c = abc_urshift((yyval.value).c);
6308 (yyval.value).t = TYPE_INT;
6318 /* Line 1464 of skeleton.m4 */
6319 #line 2596 "parser.y"
6320 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6321 (yyval.value).c = abc_lshift((yyval.value).c);
6322 (yyval.value).t = TYPE_INT;
6332 /* Line 1464 of skeleton.m4 */
6333 #line 2601 "parser.y"
6334 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6335 (yyval.value).c = abc_divide((yyval.value).c);
6336 (yyval.value).t = TYPE_NUMBER;
6346 /* Line 1464 of skeleton.m4 */
6347 #line 2605 "parser.y"
6348 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6349 (yyval.value).c = abc_modulo((yyval.value).c);
6350 (yyval.value).t = TYPE_NUMBER;
6360 /* Line 1464 of skeleton.m4 */
6361 #line 2609 "parser.y"
6362 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6363 if(BOTH_INT((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t)) {
6364 (yyval.value).c = abc_add_i((yyval.value).c);
6365 (yyval.value).t = TYPE_INT;
6367 (yyval.value).c = abc_add((yyval.value).c);
6368 (yyval.value).t = join_types((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t,'+');
6379 /* Line 1464 of skeleton.m4 */
6380 #line 2618 "parser.y"
6381 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6382 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
6383 (yyval.value).c = abc_subtract_i((yyval.value).c);
6384 (yyval.value).t = TYPE_INT;
6386 (yyval.value).c = abc_subtract((yyval.value).c);
6387 (yyval.value).t = TYPE_NUMBER;
6398 /* Line 1464 of skeleton.m4 */
6399 #line 2627 "parser.y"
6400 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6401 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
6402 (yyval.value).c = abc_multiply_i((yyval.value).c);
6403 (yyval.value).t = TYPE_INT;
6405 (yyval.value).c = abc_multiply((yyval.value).c);
6406 (yyval.value).t = TYPE_NUMBER;
6417 /* Line 1464 of skeleton.m4 */
6418 #line 2637 "parser.y"
6419 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6420 (yyval.value).c = abc_in((yyval.value).c);
6421 (yyval.value).t = TYPE_BOOLEAN;
6431 /* Line 1464 of skeleton.m4 */
6432 #line 2642 "parser.y"
6433 {char use_astype=0; // flash player's astype works differently than astypelate
6434 if(use_astype && TYPE_IS_CLASS((yyvsp[(3) - (3)].value).t)) {
6435 MULTINAME(m,(yyvsp[(3) - (3)].value).t->cls);
6436 (yyval.value).c = abc_astype2((yyvsp[(1) - (3)].value).c, &m);
6437 (yyval.value).t = (yyvsp[(3) - (3)].value).t->cls;
6439 (yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
6440 (yyval.value).c = abc_astypelate((yyval.value).c);
6441 (yyval.value).t = TYPE_ANY;
6452 /* Line 1464 of skeleton.m4 */
6453 #line 2655 "parser.y"
6454 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
6455 (yyval.value).c = abc_instanceof((yyval.value).c);
6456 (yyval.value).t = TYPE_BOOLEAN;
6466 /* Line 1464 of skeleton.m4 */
6467 #line 2660 "parser.y"
6468 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
6469 (yyval.value).c = abc_istypelate((yyval.value).c);
6470 (yyval.value).t = TYPE_BOOLEAN;
6480 /* Line 1464 of skeleton.m4 */
6481 #line 2665 "parser.y"
6483 (yyval.value).c = (yyvsp[(3) - (4)].value).c;
6484 (yyval.value).c = abc_typeof((yyval.value).c);
6485 (yyval.value).t = TYPE_STRING;
6495 /* Line 1464 of skeleton.m4 */
6496 #line 2671 "parser.y"
6498 (yyval.value).c = cut_last_push((yyvsp[(2) - (2)].value).c);
6499 (yyval.value).c = abc_pushundefined((yyval.value).c);
6500 (yyval.value).t = TYPE_ANY;
6510 /* Line 1464 of skeleton.m4 */
6511 #line 2677 "parser.y"
6512 { (yyval.value).c = abc_pushundefined(0);
6513 (yyval.value).t = TYPE_ANY;
6523 /* Line 1464 of skeleton.m4 */
6524 #line 2681 "parser.y"
6525 {(yyval.value)=(yyvsp[(2) - (3)].value);}
6534 /* Line 1464 of skeleton.m4 */
6535 #line 2683 "parser.y"
6537 (yyval.value)=(yyvsp[(2) - (2)].value);
6538 if(IS_INT((yyvsp[(2) - (2)].value).t)) {
6539 (yyval.value).c=abc_negate_i((yyval.value).c);
6540 (yyval.value).t = TYPE_INT;
6542 (yyval.value).c=abc_negate((yyval.value).c);
6543 (yyval.value).t = TYPE_NUMBER;
6554 /* Line 1464 of skeleton.m4 */
6555 #line 2694 "parser.y"
6557 (yyval.value).c = (yyvsp[(1) - (4)].value).c;
6558 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value).c);
6560 MULTINAME_LATE(m, (yyvsp[(1) - (4)].value).t?(yyvsp[(1) - (4)].value).t->access:ACCESS_PACKAGE, "");
6561 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
6562 (yyval.value).t = 0; // array elements have unknown type
6572 /* Line 1464 of skeleton.m4 */
6573 #line 2703 "parser.y"
6575 (yyval.value).c = code_new();
6576 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(2) - (3)].value_list).cc);
6577 (yyval.value).c = abc_newarray((yyval.value).c, (yyvsp[(2) - (3)].value_list).len);
6578 (yyval.value).t = registry_getarrayclass();
6588 /* Line 1464 of skeleton.m4 */
6589 #line 2710 "parser.y"
6590 {(yyval.value_list).cc=0;(yyval.value_list).len=0;}
6599 /* Line 1464 of skeleton.m4 */
6600 #line 2711 "parser.y"
6601 {(yyval.value_list)=(yyvsp[(1) - (1)].value_list);}
6610 /* Line 1464 of skeleton.m4 */
6611 #line 2713 "parser.y"
6613 (yyval.value_list).cc = 0;
6614 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(1) - (3)].value).c);
6615 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (3)].value).c);
6616 (yyval.value_list).len = 2;
6626 /* Line 1464 of skeleton.m4 */
6627 #line 2719 "parser.y"
6629 (yyval.value_list).cc = (yyvsp[(1) - (5)].value_list).cc;
6630 (yyval.value_list).len = (yyvsp[(1) - (5)].value_list).len+2;
6631 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (5)].value).c);
6632 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(5) - (5)].value).c);
6642 /* Line 1464 of skeleton.m4 */
6643 #line 2728 "parser.y"
6645 (yyval.value).c = code_new();
6646 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(2) - (3)].value_list).cc);
6647 (yyval.value).c = abc_newobject((yyval.value).c, (yyvsp[(2) - (3)].value_list).len/2);
6648 (yyval.value).t = registry_getobjectclass();
6658 /* Line 1464 of skeleton.m4 */
6659 #line 2735 "parser.y"
6661 code_t*c = (yyvsp[(3) - (3)].value).c;
6662 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
6663 c=abc_multiply_i(c);
6667 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '*'), (yyvsp[(1) - (3)].value).t);
6668 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6669 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6679 /* Line 1464 of skeleton.m4 */
6680 #line 2747 "parser.y"
6682 code_t*c = abc_modulo((yyvsp[(3) - (3)].value).c);
6683 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '%'), (yyvsp[(1) - (3)].value).t);
6684 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6685 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6695 /* Line 1464 of skeleton.m4 */
6696 #line 2753 "parser.y"
6698 code_t*c = abc_lshift((yyvsp[(3) - (3)].value).c);
6699 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '<'), (yyvsp[(1) - (3)].value).t);
6700 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6701 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6711 /* Line 1464 of skeleton.m4 */
6712 #line 2759 "parser.y"
6714 code_t*c = abc_rshift((yyvsp[(3) - (3)].value).c);
6715 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '>'), (yyvsp[(1) - (3)].value).t);
6716 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6717 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6727 /* Line 1464 of skeleton.m4 */
6728 #line 2765 "parser.y"
6730 code_t*c = abc_urshift((yyvsp[(3) - (3)].value).c);
6731 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'U'), (yyvsp[(1) - (3)].value).t);
6732 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6733 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6743 /* Line 1464 of skeleton.m4 */
6744 #line 2771 "parser.y"
6746 code_t*c = abc_divide((yyvsp[(3) - (3)].value).c);
6747 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '/'), (yyvsp[(1) - (3)].value).t);
6748 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6749 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6759 /* Line 1464 of skeleton.m4 */
6760 #line 2777 "parser.y"
6762 code_t*c = abc_bitor((yyvsp[(3) - (3)].value).c);
6763 c=converttype(c, TYPE_INT, (yyvsp[(1) - (3)].value).t);
6764 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6765 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6775 /* Line 1464 of skeleton.m4 */
6776 #line 2783 "parser.y"
6778 code_t*c = (yyvsp[(3) - (3)].value).c;
6780 if(TYPE_IS_INT((yyvsp[(1) - (3)].value).t)) {
6784 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '+'), (yyvsp[(1) - (3)].value).t);
6787 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6788 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6798 /* Line 1464 of skeleton.m4 */
6799 #line 2796 "parser.y"
6800 { code_t*c = (yyvsp[(3) - (3)].value).c;
6801 if(TYPE_IS_INT((yyvsp[(1) - (3)].value).t)) {
6802 c=abc_subtract_i(c);
6805 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '-'), (yyvsp[(1) - (3)].value).t);
6808 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6809 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6819 /* Line 1464 of skeleton.m4 */
6820 #line 2807 "parser.y"
6822 c = code_append(c, (yyvsp[(3) - (3)].value).c);
6823 c = converttype(c, (yyvsp[(3) - (3)].value).t, (yyvsp[(1) - (3)].value).t);
6824 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 1, 0);
6825 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6835 /* Line 1464 of skeleton.m4 */
6836 #line 2814 "parser.y"
6838 (yyval.value).t = join_types((yyvsp[(3) - (5)].value).t,(yyvsp[(5) - (5)].value).t,'?');
6839 (yyval.value).c = (yyvsp[(1) - (5)].value).c;
6840 code_t*j1 = (yyval.value).c = abc_iffalse((yyval.value).c, 0);
6841 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (5)].value).c);
6842 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (5)].value).t, (yyval.value).t);
6843 code_t*j2 = (yyval.value).c = abc_jump((yyval.value).c, 0);
6844 (yyval.value).c = j1->branch = abc_label((yyval.value).c);
6845 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(5) - (5)].value).c);
6846 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (5)].value).t, (yyval.value).t);
6847 (yyval.value).c = j2->branch = abc_label((yyval.value).c);
6857 /* Line 1464 of skeleton.m4 */
6858 #line 2827 "parser.y"
6860 classinfo_t*type = (yyvsp[(1) - (2)].value).t;
6861 if((is_getlocal((yyvsp[(1) - (2)].value).c) && TYPE_IS_INT((yyvsp[(1) - (2)].value).t)) || TYPE_IS_NUMBER((yyvsp[(1) - (2)].value).t)) {
6862 int nr = getlocalnr((yyvsp[(1) - (2)].value).c);
6863 code_free((yyvsp[(1) - (2)].value).c);(yyvsp[(1) - (2)].value).c=0;
6864 if(TYPE_IS_INT((yyvsp[(1) - (2)].value).t)) {
6865 (yyval.value).c = abc_getlocal(0, nr);
6866 (yyval.value).c = abc_inclocal_i((yyval.value).c, nr);
6867 } else if(TYPE_IS_NUMBER((yyvsp[(1) - (2)].value).t)) {
6868 (yyval.value).c = abc_getlocal(0, nr);
6869 (yyval.value).c = abc_inclocal((yyval.value).c, nr);
6870 } else syntaxerror("internal error");
6872 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
6873 c=abc_increment_i(c);
6879 c=converttype(c, type, (yyvsp[(1) - (2)].value).t);
6880 (yyval.value).c = toreadwrite((yyvsp[(1) - (2)].value).c, c, 0, 1);
6881 (yyval.value).t = (yyvsp[(1) - (2)].value).t;
6892 /* Line 1464 of skeleton.m4 */
6893 #line 2854 "parser.y"
6895 classinfo_t*type = (yyvsp[(1) - (2)].value).t;
6896 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
6897 c=abc_decrement_i(c);
6903 c=converttype(c, type, (yyvsp[(1) - (2)].value).t);
6904 (yyval.value).c = toreadwrite((yyvsp[(1) - (2)].value).c, c, 0, 1);
6905 (yyval.value).t = (yyvsp[(1) - (2)].value).t;
6915 /* Line 1464 of skeleton.m4 */
6916 #line 2868 "parser.y"
6918 classinfo_t*type = (yyvsp[(2) - (2)].value).t;
6919 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
6920 c=abc_increment_i(c);
6926 c=converttype(c, type, (yyvsp[(2) - (2)].value).t);
6927 (yyval.value).c = toreadwrite((yyvsp[(2) - (2)].value).c, c, 0, 0);
6928 (yyval.value).t = (yyvsp[(2) - (2)].value).t;
6938 /* Line 1464 of skeleton.m4 */
6939 #line 2882 "parser.y"
6941 classinfo_t*type = (yyvsp[(2) - (2)].value).t;
6942 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
6943 c=abc_decrement_i(c);
6949 c=converttype(c, type, (yyvsp[(2) - (2)].value).t);
6950 (yyval.value).c = toreadwrite((yyvsp[(2) - (2)].value).c, c, 0, 0);
6951 (yyval.value).t = (yyvsp[(2) - (2)].value).t;
6961 /* Line 1464 of skeleton.m4 */
6962 #line 2897 "parser.y"
6963 { if(!state->cls->info)
6964 syntaxerror("super keyword not allowed outside a class");
6965 classinfo_t*t = state->cls->info->superclass;
6966 if(!t) t = TYPE_OBJECT;
6968 memberinfo_t*f = registry_findmember(t, (yyvsp[(3) - (3)].id), 1);
6969 namespace_t ns = flags2namespace(f->flags, "");
6970 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
6971 (yyval.value).c = 0;
6972 (yyval.value).c = abc_getlocal_0((yyval.value).c);
6973 (yyval.value).c = abc_getsuper2((yyval.value).c, &m);
6974 (yyval.value).t = memberinfo_gettype(f);
6984 /* Line 1464 of skeleton.m4 */
6985 #line 2912 "parser.y"
6986 {(yyval.value).c = (yyvsp[(1) - (3)].value).c;
6987 classinfo_t*t = (yyvsp[(1) - (3)].value).t;
6989 if(TYPE_IS_CLASS(t) && t->cls) {
6994 memberinfo_t*f = registry_findmember(t, (yyvsp[(3) - (3)].id), 1);
6996 if(f && !is_static != !(f->flags&FLAG_STATIC))
6998 if(f && f->slot && !noslot) {
6999 (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
7001 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
7002 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7004 /* determine type */
7005 (yyval.value).t = memberinfo_gettype(f);
7006 if(!(yyval.value).t)
7007 (yyval.value).c = abc_coerce_a((yyval.value).c);
7009 /* when resolving a property on an unknown type, we do know the
7010 name of the property (and don't seem to need the package), but
7011 we need to make avm2 try out all access modes */
7012 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(3) - (3)].id)};
7013 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7014 (yyval.value).c = abc_coerce_a((yyval.value).c);
7015 (yyval.value).t = registry_getanytype();
7026 /* Line 1464 of skeleton.m4 */
7027 #line 2945 "parser.y"
7029 (yyval.value).t = 0;
7030 (yyval.value).c = 0;
7035 /* look at variables */
7036 if((v = find_variable((yyvsp[(1) - (1)].id)))) {
7037 // $1 is a local variable
7038 (yyval.value).c = abc_getlocal((yyval.value).c, v->index);
7039 (yyval.value).t = v->type;
7043 int i_am_static = (state->method && state->method->info)?(state->method->info->flags&FLAG_STATIC):FLAG_STATIC;
7045 /* look at current class' members */
7046 if(state->cls && (f = registry_findmember(state->cls->info, (yyvsp[(1) - (1)].id), 1)) &&
7047 (f->flags&FLAG_STATIC) >= i_am_static) {
7048 // $1 is a function in this class
7049 int var_is_static = (f->flags&FLAG_STATIC);
7051 if(f->kind == MEMBER_METHOD) {
7052 (yyval.value).t = TYPE_FUNCTION(f);
7054 (yyval.value).t = f->type;
7056 if(var_is_static && !i_am_static) {
7057 /* access to a static member from a non-static location.
7058 do this via findpropstrict:
7059 there doesn't seem to be any non-lookup way to access
7060 static properties of a class */
7061 state->method->late_binding = 1;
7062 (yyval.value).t = f->type;
7063 namespace_t ns = {flags2access(f->flags), ""};
7064 multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
7065 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
7066 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7068 } else if(f->slot>0) {
7069 (yyval.value).c = abc_getlocal_0((yyval.value).c);
7070 (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
7073 namespace_t ns = {flags2access(f->flags), ""};
7074 multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
7075 (yyval.value).c = abc_getlocal_0((yyval.value).c);
7076 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7081 /* look at actual classes, in the current package and imported */
7082 if((a = find_class((yyvsp[(1) - (1)].id)))) {
7083 if(a->flags & FLAG_METHOD) {
7085 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
7086 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7087 if(a->function->kind == MEMBER_METHOD) {
7088 (yyval.value).t = TYPE_FUNCTION(a->function);
7090 (yyval.value).t = a->function->type;
7094 (yyval.value).c = abc_getglobalscope((yyval.value).c);
7095 (yyval.value).c = abc_getslot((yyval.value).c, a->slot);
7098 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
7100 (yyval.value).t = TYPE_CLASS(a);
7105 /* unknown object, let the avm2 resolve it */
7107 if(strcmp((yyvsp[(1) - (1)].id),"trace"))
7108 as3_softwarning("Couldn't resolve '%s', doing late binding", (yyvsp[(1) - (1)].id));
7109 state->method->late_binding = 1;
7111 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(1) - (1)].id)};
7113 (yyval.value).t = 0;
7114 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
7115 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7126 /* Line 1464 of skeleton.m4 */
7127 #line 3043 "parser.y"
7137 /* Line 1464 of skeleton.m4 */
7138 #line 3044 "parser.y"
7148 /* Line 1464 of skeleton.m4 */
7149 #line 3045 "parser.y"
7159 /* Line 1464 of skeleton.m4 */
7160 #line 3047 "parser.y"
7168 /* Line 1464 of skeleton.m4 */
7169 #line 7170 "parser.tab.c"
7172 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
7176 YY_STACK_PRINT (yyss, yyssp);
7180 /* Now `shift' the result of the reduction. Determine what state
7181 that goes to, based on the state we popped back to and the rule
7182 number reduced by. */
7186 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
7187 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
7188 yystate = yytable[yystate];
7190 yystate = yydefgoto[yyn - YYNTOKENS];
7195 /*------------------------------------.
7196 | yyerrlab -- here on detecting error |
7197 `------------------------------------*/
7199 /* If not already recovering from an error, report this error. */
7203 #if ! YYERROR_VERBOSE
7204 yyerror (YY_("syntax error"));
7207 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
7208 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
7210 YYSIZE_T yyalloc = 2 * yysize;
7211 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
7212 yyalloc = YYSTACK_ALLOC_MAXIMUM;
7213 if (yymsg != yymsgbuf)
7214 YYSTACK_FREE (yymsg);
7215 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
7217 yymsg_alloc = yyalloc;
7221 yymsg_alloc = sizeof yymsgbuf;
7225 if (0 < yysize && yysize <= yymsg_alloc)
7227 (void) yysyntax_error (yymsg, yystate, yychar);
7232 yyerror (YY_("syntax error"));
7234 goto yyexhaustedlab;
7242 if (yyerrstatus == 3)
7244 /* If just tried and failed to reuse lookahead token after an
7245 error, discard it. */
7247 if (yychar <= YYEOF)
7249 /* Return failure if at end of input. */
7250 if (yychar == YYEOF)
7255 yydestruct ("Error: discarding",
7261 /* Else will try to reuse lookahead token after shifting the error
7266 /*---------------------------------------------------.
7267 | yyerrorlab -- error raised explicitly by YYERROR. |
7268 `---------------------------------------------------*/
7271 /* Pacify compilers like GCC when the user code never invokes
7272 YYERROR and the label yyerrorlab therefore never appears in user
7274 if (/*CONSTCOND*/ 0)
7277 /* Do not reclaim the symbols of the rule which action triggered
7281 YY_STACK_PRINT (yyss, yyssp);
7286 /*-------------------------------------------------------------.
7287 | yyerrlab1 -- common code for both syntax error and YYERROR. |
7288 `-------------------------------------------------------------*/
7290 yyerrstatus = 3; /* Each real token shifted decrements this. */
7294 yyn = yypact[yystate];
7295 if (yyn != YYPACT_NINF)
7298 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
7306 /* Pop the current state because it cannot handle the error token. */
7311 yydestruct ("Error: popping",
7312 yystos[yystate], yyvsp);
7315 YY_STACK_PRINT (yyss, yyssp);
7321 /* Shift the error token. */
7322 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
7328 /*-------------------------------------.
7329 | yyacceptlab -- YYACCEPT comes here. |
7330 `-------------------------------------*/
7335 /*-----------------------------------.
7336 | yyabortlab -- YYABORT comes here. |
7337 `-----------------------------------*/
7342 #if !defined(yyoverflow) || YYERROR_VERBOSE
7343 /*-------------------------------------------------.
7344 | yyexhaustedlab -- memory exhaustion comes here. |
7345 `-------------------------------------------------*/
7347 yyerror (YY_("memory exhausted"));
7353 if (yychar != YYEMPTY)
7354 yydestruct ("Cleanup: discarding lookahead",
7356 /* Do not reclaim the symbols of the rule which action triggered
7357 this YYABORT or YYACCEPT. */
7359 YY_STACK_PRINT (yyss, yyssp);
7360 while (yyssp != yyss)
7362 yydestruct ("Cleanup: popping",
7363 yystos[*yyssp], yyvsp);
7368 YYSTACK_FREE (yyss);
7371 if (yymsg != yymsgbuf)
7372 YYSTACK_FREE (yymsg);
7374 /* Make sure YYID is used. */
7375 return YYID (yyresult);